@unipin/angular-applet 18.9.7 → 21.0.1

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 (275) hide show
  1. package/README.md +49 -10
  2. package/common/assets/sprites/flagGlobal.png +0 -0
  3. package/common/assets/sprites/flagSprite42.webp +0 -0
  4. package/common/assets/styles/freakflags.scss +263 -0
  5. package/common/assets/styles/theme.css +69 -0
  6. package/fesm2022/unipin-angular-applet-accordion.mjs +242 -0
  7. package/fesm2022/unipin-angular-applet-accordion.mjs.map +1 -0
  8. package/fesm2022/unipin-angular-applet-alert-dialog.mjs +267 -0
  9. package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -0
  10. package/fesm2022/unipin-angular-applet-alert.mjs +94 -0
  11. package/fesm2022/unipin-angular-applet-alert.mjs.map +1 -0
  12. package/fesm2022/unipin-angular-applet-auth.mjs +707 -0
  13. package/fesm2022/unipin-angular-applet-auth.mjs.map +1 -0
  14. package/fesm2022/unipin-angular-applet-avatar.mjs +41 -0
  15. package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -0
  16. package/fesm2022/unipin-angular-applet-badge.mjs +50 -0
  17. package/fesm2022/unipin-angular-applet-badge.mjs.map +1 -0
  18. package/fesm2022/unipin-angular-applet-buttons.mjs +263 -0
  19. package/fesm2022/unipin-angular-applet-buttons.mjs.map +1 -0
  20. package/fesm2022/unipin-angular-applet-calendar.mjs +492 -0
  21. package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -0
  22. package/fesm2022/unipin-angular-applet-collapsible.mjs +97 -0
  23. package/fesm2022/unipin-angular-applet-collapsible.mjs.map +1 -0
  24. package/fesm2022/unipin-angular-applet-common.mjs +342 -0
  25. package/fesm2022/unipin-angular-applet-common.mjs.map +1 -0
  26. package/fesm2022/unipin-angular-applet-containers.mjs +472 -0
  27. package/fesm2022/unipin-angular-applet-containers.mjs.map +1 -0
  28. package/fesm2022/unipin-angular-applet-dialog.mjs +535 -0
  29. package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -0
  30. package/fesm2022/unipin-angular-applet-forms.mjs +1699 -0
  31. package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -0
  32. package/fesm2022/unipin-angular-applet-froala.mjs +298 -0
  33. package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -0
  34. package/fesm2022/unipin-angular-applet-grids.mjs +105 -0
  35. package/fesm2022/unipin-angular-applet-grids.mjs.map +1 -0
  36. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +86 -0
  37. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs.map +1 -0
  38. package/fesm2022/unipin-angular-applet-json-viewer.mjs +71 -0
  39. package/fesm2022/unipin-angular-applet-json-viewer.mjs.map +1 -0
  40. package/fesm2022/unipin-angular-applet-loading-dialog.mjs +252 -0
  41. package/fesm2022/unipin-angular-applet-loading-dialog.mjs.map +1 -0
  42. package/fesm2022/unipin-angular-applet-markdown.mjs +703 -0
  43. package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -0
  44. package/fesm2022/unipin-angular-applet-micro-frontend.mjs +75 -0
  45. package/fesm2022/unipin-angular-applet-micro-frontend.mjs.map +1 -0
  46. package/fesm2022/unipin-angular-applet-popover.mjs +333 -0
  47. package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -0
  48. package/fesm2022/unipin-angular-applet-progress-bar.mjs +38 -0
  49. package/fesm2022/unipin-angular-applet-progress-bar.mjs.map +1 -0
  50. package/fesm2022/unipin-angular-applet-skeleton.mjs +32 -0
  51. package/fesm2022/unipin-angular-applet-skeleton.mjs.map +1 -0
  52. package/fesm2022/unipin-angular-applet-spinner.mjs +144 -0
  53. package/fesm2022/unipin-angular-applet-spinner.mjs.map +1 -0
  54. package/fesm2022/unipin-angular-applet-swipeable.mjs +270 -0
  55. package/fesm2022/unipin-angular-applet-swipeable.mjs.map +1 -0
  56. package/fesm2022/unipin-angular-applet-tabs.mjs +142 -0
  57. package/fesm2022/unipin-angular-applet-tabs.mjs.map +1 -0
  58. package/fesm2022/unipin-angular-applet-tooltip.mjs +118 -0
  59. package/fesm2022/unipin-angular-applet-tooltip.mjs.map +1 -0
  60. package/fesm2022/unipin-angular-applet.mjs +5 -4617
  61. package/fesm2022/unipin-angular-applet.mjs.map +1 -1
  62. package/package.json +132 -29
  63. package/types/unipin-angular-applet-accordion.d.ts +60 -0
  64. package/types/unipin-angular-applet-alert-dialog.d.ts +35 -0
  65. package/types/unipin-angular-applet-alert.d.ts +34 -0
  66. package/types/unipin-angular-applet-auth.d.ts +225 -0
  67. package/types/unipin-angular-applet-avatar.d.ts +16 -0
  68. package/types/unipin-angular-applet-badge.d.ts +20 -0
  69. package/types/unipin-angular-applet-buttons.d.ts +37 -0
  70. package/types/unipin-angular-applet-calendar.d.ts +44 -0
  71. package/types/unipin-angular-applet-collapsible.d.ts +35 -0
  72. package/types/unipin-angular-applet-common.d.ts +94 -0
  73. package/types/unipin-angular-applet-containers.d.ts +179 -0
  74. package/types/unipin-angular-applet-dialog.d.ts +180 -0
  75. package/types/unipin-angular-applet-forms.d.ts +412 -0
  76. package/types/unipin-angular-applet-froala.d.ts +85 -0
  77. package/types/unipin-angular-applet-grids.d.ts +22 -0
  78. package/types/unipin-angular-applet-infinite-scroll.d.ts +51 -0
  79. package/types/unipin-angular-applet-json-viewer.d.ts +30 -0
  80. package/types/unipin-angular-applet-loading-dialog.d.ts +19 -0
  81. package/types/unipin-angular-applet-markdown.d.ts +119 -0
  82. package/types/unipin-angular-applet-micro-frontend.d.ts +11 -0
  83. package/types/unipin-angular-applet-popover.d.ts +58 -0
  84. package/types/unipin-angular-applet-progress-bar.d.ts +14 -0
  85. package/types/unipin-angular-applet-skeleton.d.ts +11 -0
  86. package/types/unipin-angular-applet-spinner.d.ts +12 -0
  87. package/types/unipin-angular-applet-swipeable.d.ts +66 -0
  88. package/types/unipin-angular-applet-tabs.d.ts +40 -0
  89. package/types/unipin-angular-applet-tooltip.d.ts +32 -0
  90. package/types/unipin-angular-applet.d.ts +3 -0
  91. package/esm2022/graphql/generated.mjs +0 -938
  92. package/esm2022/lib/components/approval/detail/approval-detail.component.mjs +0 -78
  93. package/esm2022/lib/components/approval/form/approval-form.component.mjs +0 -128
  94. package/esm2022/lib/components/approval/index.mjs +0 -5
  95. package/esm2022/lib/components/approval/list/approval-list.component.mjs +0 -114
  96. package/esm2022/lib/components/approval/list/provide-approval-entities.util.mjs +0 -9
  97. package/esm2022/lib/components/approval/services/approval.service.mjs +0 -46
  98. package/esm2022/lib/components/audit/detail/audit-detail.component.mjs +0 -123
  99. package/esm2022/lib/components/audit/index.mjs +0 -3
  100. package/esm2022/lib/components/audit/list/audit-list.component.mjs +0 -81
  101. package/esm2022/lib/components/audit/service/audit.service.mjs +0 -49
  102. package/esm2022/lib/components/audit/types/audit-detail-form.type.mjs +0 -2
  103. package/esm2022/lib/components/buttons/group/btn-group.component.mjs +0 -43
  104. package/esm2022/lib/components/buttons/group/interfaces/btn-group-config.interface.mjs +0 -2
  105. package/esm2022/lib/components/buttons/index.mjs +0 -3
  106. package/esm2022/lib/components/buttons/loading/btn-loading.component.mjs +0 -48
  107. package/esm2022/lib/components/containers/applet-container/applet-container.component.mjs +0 -55
  108. package/esm2022/lib/components/containers/applet-container/provide-applet-config.util.mjs +0 -9
  109. package/esm2022/lib/components/containers/colum-header-container/column-header-container.component.mjs +0 -23
  110. package/esm2022/lib/components/containers/column-container/column-container.component.mjs +0 -79
  111. package/esm2022/lib/components/containers/column-container/directives/lazy-route.directive.mjs +0 -57
  112. package/esm2022/lib/components/containers/index.mjs +0 -7
  113. package/esm2022/lib/components/containers/list-container/index.mjs +0 -3
  114. package/esm2022/lib/components/containers/list-container/interfaces/list-container-config.interface.mjs +0 -2
  115. package/esm2022/lib/components/containers/list-container/list-pagination-container/list-pagination-container.component.mjs +0 -58
  116. package/esm2022/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.component.mjs +0 -57
  117. package/esm2022/lib/components/containers/modal-container/modal-container.component.mjs +0 -40
  118. package/esm2022/lib/components/filter/filter.component.mjs +0 -222
  119. package/esm2022/lib/components/filter/index.mjs +0 -2
  120. package/esm2022/lib/components/filter/interfaces/filter-config.interface.mjs +0 -2
  121. package/esm2022/lib/components/filter/interfaces/filter-field.interface.mjs +0 -2
  122. package/esm2022/lib/components/filter/interfaces/filter-search-event.interface.mjs +0 -2
  123. package/esm2022/lib/components/forms/country-input/form-country-input.component.mjs +0 -122
  124. package/esm2022/lib/components/forms/currency-input/form-currency-input.component.mjs +0 -157
  125. package/esm2022/lib/components/forms/date/form-date.component.mjs +0 -117
  126. package/esm2022/lib/components/forms/image-picker/directives/drag-n-drop.directive.mjs +0 -49
  127. package/esm2022/lib/components/forms/image-picker/form-image-picker.component.mjs +0 -68
  128. package/esm2022/lib/components/forms/index.mjs +0 -12
  129. package/esm2022/lib/components/forms/input/form-input.component.mjs +0 -98
  130. package/esm2022/lib/components/forms/number/form-number.component.mjs +0 -97
  131. package/esm2022/lib/components/forms/number/pipes/locale-number.pipe.mjs +0 -33
  132. package/esm2022/lib/components/forms/password/form-password.component.mjs +0 -100
  133. package/esm2022/lib/components/forms/rate-group-code-input/form-rate-group-code-input.component.mjs +0 -135
  134. package/esm2022/lib/components/forms/searchable-select/form-searchable-select.component.mjs +0 -138
  135. package/esm2022/lib/components/forms/select/form-select.component.mjs +0 -119
  136. package/esm2022/lib/components/forms/textarea/form-textarea.component.mjs +0 -88
  137. package/esm2022/lib/components/grids/grid-pagination/grid-pagination.component.mjs +0 -111
  138. package/esm2022/lib/components/grids/grid-snapshot/grid-snapshot.component.mjs +0 -109
  139. package/esm2022/lib/components/grids/index.mjs +0 -4
  140. package/esm2022/lib/components/grids/interfaces/grid-config.interface.mjs +0 -2
  141. package/esm2022/lib/components/grids/services/grid.service.mjs +0 -25
  142. package/esm2022/lib/components/index.mjs +0 -9
  143. package/esm2022/lib/components/infinite-scroll/directive/infinite-scroll.directive.mjs +0 -43
  144. package/esm2022/lib/components/infinite-scroll/index.mjs +0 -3
  145. package/esm2022/lib/components/infinite-scroll/infinite-scroll.component.mjs +0 -36
  146. package/esm2022/lib/components/tabs/index.mjs +0 -3
  147. package/esm2022/lib/components/tabs/tab-content/tab-content.component.mjs +0 -37
  148. package/esm2022/lib/components/tabs/tab-group/tab-group.component.mjs +0 -47
  149. package/esm2022/lib/guards/auth/auth.guard.mjs +0 -10
  150. package/esm2022/lib/guards/index.mjs +0 -2
  151. package/esm2022/lib/interceptors/header/header.interceptor.mjs +0 -29
  152. package/esm2022/lib/interceptors/index.mjs +0 -3
  153. package/esm2022/lib/interceptors/refresh-token/refresh-token.interceptor.mjs +0 -83
  154. package/esm2022/lib/interfaces/index.mjs +0 -2
  155. package/esm2022/lib/interfaces/user/user.interface.mjs +0 -2
  156. package/esm2022/lib/modules/index.mjs +0 -3
  157. package/esm2022/lib/modules/micro-frontend/index.mjs +0 -2
  158. package/esm2022/lib/modules/micro-frontend/utils/mf-bootstrap.util.mjs +0 -55
  159. package/esm2022/lib/modules/micro-frontend/utils/mf-global-state.util.mjs +0 -14
  160. package/esm2022/lib/modules/permission/directive/permission.directive.mjs +0 -41
  161. package/esm2022/lib/modules/permission/guards/permission.guard.mjs +0 -26
  162. package/esm2022/lib/modules/permission/index.mjs +0 -7
  163. package/esm2022/lib/modules/permission/pages/401/unauthorized.page.mjs +0 -15
  164. package/esm2022/lib/modules/permission/pages/loading/loading.page.mjs +0 -65
  165. package/esm2022/lib/modules/permission/pages/loading/provide-loading-config.util.mjs +0 -9
  166. package/esm2022/lib/modules/permission/services/permission.service.mjs +0 -50
  167. package/esm2022/lib/resolvers/auth/auth.resolver.mjs +0 -87
  168. package/esm2022/lib/resolvers/index.mjs +0 -2
  169. package/esm2022/lib/services/auth/auth.service.mjs +0 -171
  170. package/esm2022/lib/services/country/country.service.mjs +0 -43
  171. package/esm2022/lib/services/currency/currency.service.mjs +0 -40
  172. package/esm2022/lib/services/index.mjs +0 -6
  173. package/esm2022/lib/services/profile/profile.service.mjs +0 -82
  174. package/esm2022/lib/services/rate-group-code/rate-group-code.service.mjs +0 -31
  175. package/esm2022/lib/utils/contrast-color-generator/contrast-color-generator.util.mjs +0 -16
  176. package/esm2022/lib/utils/form-error-message/form-error-message.util.mjs +0 -21
  177. package/esm2022/lib/utils/format-capitalize/format-capitalize.util.mjs +0 -18
  178. package/esm2022/lib/utils/index.mjs +0 -5
  179. package/esm2022/lib/utils/redirect-to-first-menu/redirect-to-first-menu.util.mjs +0 -9
  180. package/esm2022/public-api.mjs +0 -10
  181. package/esm2022/unipin-angular-applet.mjs +0 -2
  182. package/graphql/generated.d.ts +0 -16225
  183. package/index.d.ts +0 -2
  184. package/lib/components/approval/detail/approval-detail.component.d.ts +0 -26
  185. package/lib/components/approval/form/approval-form.component.d.ts +0 -33
  186. package/lib/components/approval/index.d.ts +0 -4
  187. package/lib/components/approval/list/approval-list.component.d.ts +0 -33
  188. package/lib/components/approval/list/provide-approval-entities.util.d.ts +0 -3
  189. package/lib/components/approval/services/approval.service.d.ts +0 -18
  190. package/lib/components/audit/detail/audit-detail.component.d.ts +0 -33
  191. package/lib/components/audit/index.d.ts +0 -2
  192. package/lib/components/audit/list/audit-list.component.d.ts +0 -31
  193. package/lib/components/audit/service/audit.service.d.ts +0 -15
  194. package/lib/components/audit/types/audit-detail-form.type.d.ts +0 -12
  195. package/lib/components/buttons/group/btn-group.component.d.ts +0 -18
  196. package/lib/components/buttons/group/interfaces/btn-group-config.interface.d.ts +0 -11
  197. package/lib/components/buttons/index.d.ts +0 -3
  198. package/lib/components/buttons/loading/btn-loading.component.d.ts +0 -19
  199. package/lib/components/containers/applet-container/applet-container.component.d.ts +0 -22
  200. package/lib/components/containers/applet-container/provide-applet-config.util.d.ts +0 -15
  201. package/lib/components/containers/colum-header-container/column-header-container.component.d.ts +0 -7
  202. package/lib/components/containers/column-container/column-container.component.d.ts +0 -26
  203. package/lib/components/containers/column-container/directives/lazy-route.directive.d.ts +0 -17
  204. package/lib/components/containers/index.d.ts +0 -6
  205. package/lib/components/containers/list-container/index.d.ts +0 -3
  206. package/lib/components/containers/list-container/interfaces/list-container-config.interface.d.ts +0 -9
  207. package/lib/components/containers/list-container/list-pagination-container/list-pagination-container.component.d.ts +0 -23
  208. package/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.component.d.ts +0 -23
  209. package/lib/components/containers/modal-container/modal-container.component.d.ts +0 -16
  210. package/lib/components/filter/filter.component.d.ts +0 -44
  211. package/lib/components/filter/index.d.ts +0 -4
  212. package/lib/components/filter/interfaces/filter-config.interface.d.ts +0 -5
  213. package/lib/components/filter/interfaces/filter-field.interface.d.ts +0 -24
  214. package/lib/components/filter/interfaces/filter-search-event.interface.d.ts +0 -4
  215. package/lib/components/forms/country-input/form-country-input.component.d.ts +0 -41
  216. package/lib/components/forms/currency-input/form-currency-input.component.d.ts +0 -52
  217. package/lib/components/forms/date/form-date.component.d.ts +0 -33
  218. package/lib/components/forms/image-picker/directives/drag-n-drop.directive.d.ts +0 -10
  219. package/lib/components/forms/image-picker/form-image-picker.component.d.ts +0 -21
  220. package/lib/components/forms/index.d.ts +0 -11
  221. package/lib/components/forms/input/form-input.component.d.ts +0 -31
  222. package/lib/components/forms/number/form-number.component.d.ts +0 -27
  223. package/lib/components/forms/number/pipes/locale-number.pipe.d.ts +0 -8
  224. package/lib/components/forms/password/form-password.component.d.ts +0 -27
  225. package/lib/components/forms/rate-group-code-input/form-rate-group-code-input.component.d.ts +0 -41
  226. package/lib/components/forms/searchable-select/form-searchable-select.component.d.ts +0 -42
  227. package/lib/components/forms/select/form-select.component.d.ts +0 -34
  228. package/lib/components/forms/textarea/form-textarea.component.d.ts +0 -26
  229. package/lib/components/grids/grid-pagination/grid-pagination.component.d.ts +0 -33
  230. package/lib/components/grids/grid-snapshot/grid-snapshot.component.d.ts +0 -36
  231. package/lib/components/grids/index.d.ts +0 -4
  232. package/lib/components/grids/interfaces/grid-config.interface.d.ts +0 -16
  233. package/lib/components/grids/services/grid.service.d.ts +0 -12
  234. package/lib/components/index.d.ts +0 -8
  235. package/lib/components/infinite-scroll/directive/infinite-scroll.directive.d.ts +0 -15
  236. package/lib/components/infinite-scroll/index.d.ts +0 -2
  237. package/lib/components/infinite-scroll/infinite-scroll.component.d.ts +0 -12
  238. package/lib/components/tabs/index.d.ts +0 -6
  239. package/lib/components/tabs/tab-content/tab-content.component.d.ts +0 -14
  240. package/lib/components/tabs/tab-group/tab-group.component.d.ts +0 -18
  241. package/lib/guards/auth/auth.guard.d.ts +0 -1
  242. package/lib/guards/index.d.ts +0 -1
  243. package/lib/interceptors/header/header.interceptor.d.ts +0 -9
  244. package/lib/interceptors/index.d.ts +0 -2
  245. package/lib/interceptors/refresh-token/refresh-token.interceptor.d.ts +0 -14
  246. package/lib/interfaces/index.d.ts +0 -1
  247. package/lib/interfaces/user/user.interface.d.ts +0 -27
  248. package/lib/modules/index.d.ts +0 -2
  249. package/lib/modules/micro-frontend/index.d.ts +0 -1
  250. package/lib/modules/micro-frontend/utils/mf-bootstrap.util.d.ts +0 -9
  251. package/lib/modules/micro-frontend/utils/mf-global-state.util.d.ts +0 -4
  252. package/lib/modules/permission/directive/permission.directive.d.ts +0 -16
  253. package/lib/modules/permission/guards/permission.guard.d.ts +0 -2
  254. package/lib/modules/permission/index.d.ts +0 -6
  255. package/lib/modules/permission/pages/401/unauthorized.page.d.ts +0 -5
  256. package/lib/modules/permission/pages/loading/loading.page.d.ts +0 -18
  257. package/lib/modules/permission/pages/loading/provide-loading-config.util.d.ts +0 -10
  258. package/lib/modules/permission/services/permission.service.d.ts +0 -21
  259. package/lib/resolvers/auth/auth.resolver.d.ts +0 -14
  260. package/lib/resolvers/index.d.ts +0 -1
  261. package/lib/services/auth/auth.service.d.ts +0 -39
  262. package/lib/services/country/country.service.d.ts +0 -16
  263. package/lib/services/currency/currency.service.d.ts +0 -16
  264. package/lib/services/index.d.ts +0 -5
  265. package/lib/services/profile/profile.service.d.ts +0 -12
  266. package/lib/services/rate-group-code/rate-group-code.service.d.ts +0 -14
  267. package/lib/utils/contrast-color-generator/contrast-color-generator.util.d.ts +0 -4
  268. package/lib/utils/form-error-message/form-error-message.util.d.ts +0 -2
  269. package/lib/utils/format-capitalize/format-capitalize.util.d.ts +0 -1
  270. package/lib/utils/index.d.ts +0 -4
  271. package/lib/utils/redirect-to-first-menu/redirect-to-first-menu.util.d.ts +0 -2
  272. package/public-api.d.ts +0 -11
  273. package/src/assets/scss/forms.scss +0 -65
  274. package/src/assets/scss/grid.scss +0 -7505
  275. package/src/assets/scss/select.scss +0 -328
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unipin-angular-applet-accordion.mjs","sources":["../../../projects/unipin-angular/accordion/directives/accordion.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-item.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-trigger.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-content.directive.ts","../../../projects/unipin-angular/accordion/unipin-angular-applet-accordion.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, input, model, OnInit, effect, output } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordion',\n selector: '[upAccordion]',\n host: {\n '[attr.dir]': 'dir()',\n '[class]': '_computedClass()',\n }\n})\nexport class UpAccordionDirective implements OnInit {\n \n public readonly dir = input<'ltr' | 'rtl'>('ltr');\n public readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n \n public readonly disabled = input(false, { transform: booleanAttribute });\n public readonly collapsible = input(false, { transform: booleanAttribute });\n\n public readonly type = model<'single' | 'multiple'>('single');\n\n public readonly valueChange = output<string | string[]>();\n public readonly value = model<string | string[] | undefined>();\n public readonly defaultValue = model<string | string[] | undefined>();\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n `overflow-hidden`,\n this.orientation() === 'horizontal'? 'w-fit' : 'h-fit',\n this.disabled()? 'cursor-not-allowed opacity-50' : '',\n this.inlineClass()\n );\n }\n )\n\n constructor() {\n effect(\n () => {\n if (this.value()) {\n this.valueChange.emit(this.value() as string | string[]);\n }\n }\n );\n }\n\n public ngOnInit(): void{\n const currentValue = this.value();\n const defaultVal = this.defaultValue();\n \n if (\n (\n currentValue === undefined || \n currentValue === null\n ) && \n defaultVal !== undefined\n ) {\n this.value.set(defaultVal);\n }\n }\n}\n","import { Directive, input, computed, effect, model, booleanAttribute } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionDirective } from './accordion.directive';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordionItem',\n selector: '[upAccordionItem]',\n host: {\n '[class]': '_computedClass()',\n '[attr.data-state]': `isOpened()? 'open' : 'closed'`\n }\n})\nexport class UpAccordionItemDirective {\n \n public readonly value = input.required<string>();\n public readonly isOpened = model<boolean>(false);\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n public readonly disabled = input(false, { transform: booleanAttribute });\n\n protected _computedClass = computed(\n () => {\n const isHorizontal = this.wrapper.orientation() === 'horizontal';\n \n return up(\n this.disabled()? 'opacity-50' : '',\n isHorizontal? 'flex flex-row h-auto w-fit' : 'flex flex-col',\n this.inlineClass()\n );\n }\n );\n\n constructor (\n public readonly wrapper: UpAccordionDirective\n ) {\n effect(\n () => {\n if (this.wrapper.type() === 'single') {\n this.isOpened.set(this.wrapper.value() === this.value());\n return;\n }\n\n const values = Array.isArray(this.wrapper.value())? this.wrapper.value() : (this.wrapper.value()? [this.wrapper.value()] : []);\n this.isOpened.set(\n values!.includes(this.value())\n );\n }\n );\n }\n\n public setOpen(value: boolean): void{\n if (\n this.disabled() || \n this.wrapper.disabled()\n ) {\n return;\n }\n \n if (this.wrapper.type() === 'multiple') {\n const rawValue = this.wrapper.value();\n const currentValues = Array.isArray(rawValue)? [...rawValue] : (rawValue? [rawValue] : []);\n const itemValue = this.value();\n\n if (value) {\n if (!currentValues.includes(itemValue)) {\n currentValues.push(itemValue);\n }\n this.wrapper.value.set(currentValues);\n \n return;\n }\n\n if (!this.wrapper.collapsible()) {\n return;\n }\n\n const nextValues = currentValues.filter(v => v !== itemValue);\n this.wrapper.value.set(nextValues.length ? nextValues : undefined);\n return;\n }\n\n if (value) {\n this.wrapper.value.set(this.value());\n return;\n }\n \n if (this.wrapper.collapsible()) {\n this.wrapper.value.set(undefined);\n return;\n }\n }\n}\n","import { Directive, input, computed } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n standalone: true,\n selector: '[upAccordionTrigger]',\n host: {\n '[attr.tabindex]': '0',\n '[attr.role]': `'button'`,\n '[class]': '_computedClass()',\n '[attr.aria-expanded]': 'this.item.isOpened()',\n '[attr.disabled]': 'this.item.disabled() || null',\n '[attr.data-state]': `this.item.isOpened()? 'open' : 'closed'`,\n '[attr.aria-disabled]': 'this.item.disabled() || this.item.wrapper.disabled() || null',\n '[style.writing-mode]': `this.item.wrapper.orientation() === 'horizontal'? 'sideways-lr' : ''`,\n\n '(click)': 'toggleState()',\n '(keydown)': 'onKeyDown($event)',\n }\n})\nexport class UpAccordionTriggerDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected _computedClass = computed(\n () => {\n const isItemDisabled = this.item.disabled() || this.item.wrapper.disabled();\n \n return up(\n 'w-full flex items-center justify-between text-left gap-4 cursor-pointer',\n isItemDisabled? 'cursor-not-allowed' : '',\n this.item.wrapper.orientation() === 'horizontal'? 'w-fit h-fit' : '',\n this.inlineClass()\n );\n }\n );\n\n constructor(\n public readonly item: UpAccordionItemDirective\n ) { }\n\n public toggleState(): void{\n this.item.setOpen(!this.item.isOpened());\n }\n\n public onKeyDown(event: KeyboardEvent): void{\n if (\n this.item.disabled() || \n this.item.wrapper.disabled()) \n {\n return;\n }\n\n event.preventDefault();\n switch (event.key) {\n case 'Enter':\n case ' ':\n this.toggleState();\n break;\n \n case 'ArrowDown':\n this.focusNextItem();\n break;\n \n case 'ArrowUp':\n this.focusPreviousItem();\n break;\n \n case 'Home':\n this.focusFirstItem();\n break;\n \n case 'End':\n this.focusLastItem();\n break;\n }\n }\n\n protected focusNextItem(): void{\n const triggers = this.getAllTriggers();\n const currentIndex = triggers.indexOf(document.activeElement as HTMLElement);\n \n if (currentIndex < triggers.length - 1) {\n triggers[currentIndex + 1].focus();\n }\n }\n\n protected focusPreviousItem(): void{\n const triggers = this.getAllTriggers();\n const currentIndex = triggers.indexOf(document.activeElement as HTMLElement);\n \n if (currentIndex > 0) {\n triggers[currentIndex - 1].focus();\n }\n }\n\n protected focusFirstItem(): void{\n const triggers = this.getAllTriggers();\n \n if (triggers.length > 0) {\n triggers[0].focus();\n }\n }\n\n protected focusLastItem(): void {\n const triggers = this.getAllTriggers();\n \n if (triggers.length > 0) {\n triggers[triggers.length - 1].focus();\n }\n }\n\n protected getAllTriggers(): HTMLElement[]{\n const accordionElement = (document.activeElement as HTMLElement)?.closest('[upAccordion]');\n \n if (!accordionElement) {\n return [];\n }\n return Array.from(accordionElement.querySelectorAll('[upAccordionTrigger]'));\n }\n}\n","import { Directive, input, computed } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordionContent',\n selector: '[upAccordionContent]',\n host:{\n '[class]': '_computedClass()',\n },\n})\nexport class UpAccordionContentDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected _computedClass = computed(\n () => {\n const isOpened = this.item.isOpened();\n const isDisabled = this.item.disabled() || this.item.wrapper.disabled();\n const isHorizontal = this.item.wrapper.orientation() === 'horizontal';\n \n return up(\n `overflow-hidden transition-all`,\n isDisabled? 'text-gray-400' : '',\n isHorizontal? (\n isOpened? 'w-full opacity-100' : 'max-w-0 opacity-0 text-nowrap'\n ) : (\n isOpened? 'h-auto opacity-100' : 'max-h-0 opacity-0'\n ),\n this.inlineClass()\n );\n }\n );\n\n constructor(\n protected readonly item: UpAccordionItemDirective,\n ) { }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.UpAccordionDirective","i1.UpAccordionItemDirective"],"mappings":";;;;MAaa,oBAAoB,CAAA;AA2B/B,IAAA,WAAA,GAAA;AAzBgB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAgB,KAAK,+CAAC;AACjC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAA4B,UAAU,uDAAC;AAE1D,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,+CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAEvD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,4CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AACxD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,+CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AAE3D,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAwB,QAAQ,gDAAC;QAE7C,IAAA,CAAA,WAAW,GAAG,MAAM,EAAqB;QACzC,IAAA,CAAA,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAiC;QAC9C,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAiC;AAElD,QAAA,IAAA,CAA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ed, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { Validators, ReactiveFormsModule } from '@angular/forms';
5
+ import { UpButtonDirective } from '@unipin/angular-applet/buttons';
6
+ import * as i1$1 from '@unipin/angular-applet/dialog';
7
+ import { UpDialogRef, injectDialogContext } from '@unipin/angular-applet/dialog';
8
+ import { UpCheckboxDirective, UpPasswordComponent, UpInputDirective, UpFormFieldComponent } from '@unipin/angular-applet/forms';
9
+
10
+ class UpAlertComponent {
11
+ constructor(fb) {
12
+ this.fb = fb;
13
+ this.dialogRef = inject(UpDialogRef);
14
+ this.opts = injectDialogContext();
15
+ this.state = computed(() => this.dialogRef?.state() ?? 'closed', ...(ngDevMode ? [{ debugName: "state" }] : []));
16
+ const fields = this.opts.fields;
17
+ if (fields) {
18
+ this.form = this.fb.group({});
19
+ fields.forEach((field) => {
20
+ const defaultValue = field.type === 'checkbox' ? false : null;
21
+ this.form.addControl(field.name, this.fb.control(defaultValue, field.required ? Validators.required : []));
22
+ });
23
+ }
24
+ }
25
+ clickBtn(index) {
26
+ const buttons = this.opts.buttons;
27
+ if (buttons[index].handler) {
28
+ let value = undefined;
29
+ if (this.form) {
30
+ value = { ...this.form?.getRawValue() };
31
+ this.opts.fields?.forEach((field) => {
32
+ if (field.type === 'number' &&
33
+ value[field.name] &&
34
+ !isNaN(value[field.name])) {
35
+ value[field.name] = Number(value[field.name]);
36
+ }
37
+ });
38
+ }
39
+ buttons[index].handler(value);
40
+ }
41
+ this.dialogRef.close();
42
+ }
43
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
44
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0", type: UpAlertComponent, isStandalone: true, selector: "up-alert-dialog", host: { properties: { "attr.data-state": "state()" }, classAttribute: "\n bg-background shadow-lg rounded-lg relative z-50 grid gap-4 outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] data-[state=closed]:duration-200 data-[state=open]:duration-200 w-11/12 max-w-125 mx-auto p-5\n " }, ngImport: i0, template: `
45
+ <!-- Header -->
46
+ <div class="flex flex-col gap-2 text-center sm:text-left">
47
+ <h2 class="text-lg font-semibold">
48
+ {{ opts.title }}
49
+ </h2>
50
+
51
+ <p class="text-muted-foreground text-sm">
52
+ {{ opts.description }}
53
+ </p>
54
+ </div>
55
+
56
+ <!-- Fields -->
57
+ @let fields = opts.fields;
58
+ @if (
59
+ fields &&
60
+ fields.length > 0
61
+ ) {
62
+ <form [formGroup]="form!" class="flex flex-col gap-6 mb-4 mt-5">
63
+ @for (field of fields; track $index) {
64
+ <up-form-field
65
+ [name]="field.name"
66
+ [label]="field.name"
67
+ >
68
+ @switch (field.type) {
69
+ @case ('checkbox') {
70
+ @defer {
71
+ <input
72
+ upCheckbox
73
+ type="checkbox"
74
+ [formControlName]="field.name"
75
+ [required]="field.required?? false"
76
+ />
77
+ }
78
+ }
79
+
80
+ @case ('password') {
81
+ @defer {
82
+ <up-password
83
+ [formControlName]="field.name"
84
+ [placeholder]="field.placeholder"
85
+ [required]="field.required?? false"
86
+ />
87
+ }
88
+ }
89
+
90
+ <!-- TODO: Select type -->
91
+
92
+ @default {
93
+ @defer {
94
+ <input
95
+ upInput
96
+ [type]="field.type"
97
+ [formControlName]="field.name"
98
+ [placeholder]="field.placeholder"
99
+ [required]="field.required?? false"
100
+ />
101
+ }
102
+ }
103
+ }
104
+ </up-form-field>
105
+ }
106
+ </form>
107
+ }
108
+
109
+ <!-- Footer -->
110
+ <div class="flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end">
111
+ @for (btn of opts.buttons; track $index) {
112
+ <button
113
+ upButton
114
+ [variant]="opts.buttons[$index].variant"
115
+ [class]="opts.buttons[$index].additionalClass + ' flex-1'"
116
+ (click)="clickBtn($index)"
117
+ >
118
+ {{ btn.text }}
119
+ </button>
120
+ }
121
+ </div>
122
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: UpButtonDirective, selector: "[upButton]", inputs: ["size", "variant", "class"], exportAs: ["upButton"] }, { kind: "component", type: UpFormFieldComponent, selector: "up-form-field", inputs: ["name", "hint", "label", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.CheckboxRequiredValidator, i1.FormControlName, UpCheckboxDirective], () => [i1.NgControlStatus, i1.RequiredValidator, i1.FormControlName, UpPasswordComponent], () => [i1.DefaultValueAccessor, i1.NgControlStatus, i1.RequiredValidator, i1.FormControlName, UpInputDirective]] }); }
123
+ }
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertComponent, decorators: [{
125
+ type: Component,
126
+ args: [{
127
+ standalone: true,
128
+ selector: 'up-alert-dialog',
129
+ changeDetection: ChangeDetectionStrategy.OnPush,
130
+ host: {
131
+ '[attr.data-state]': 'state()',
132
+ 'class': `
133
+ bg-background shadow-lg rounded-lg relative z-50 grid gap-4 outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] data-[state=closed]:duration-200 data-[state=open]:duration-200 w-11/12 max-w-125 mx-auto p-5
134
+ `,
135
+ },
136
+ imports: [
137
+ ReactiveFormsModule,
138
+ UpInputDirective,
139
+ UpButtonDirective,
140
+ UpCheckboxDirective,
141
+ UpPasswordComponent,
142
+ UpFormFieldComponent,
143
+ ],
144
+ template: `
145
+ <!-- Header -->
146
+ <div class="flex flex-col gap-2 text-center sm:text-left">
147
+ <h2 class="text-lg font-semibold">
148
+ {{ opts.title }}
149
+ </h2>
150
+
151
+ <p class="text-muted-foreground text-sm">
152
+ {{ opts.description }}
153
+ </p>
154
+ </div>
155
+
156
+ <!-- Fields -->
157
+ @let fields = opts.fields;
158
+ @if (
159
+ fields &&
160
+ fields.length > 0
161
+ ) {
162
+ <form [formGroup]="form!" class="flex flex-col gap-6 mb-4 mt-5">
163
+ @for (field of fields; track $index) {
164
+ <up-form-field
165
+ [name]="field.name"
166
+ [label]="field.name"
167
+ >
168
+ @switch (field.type) {
169
+ @case ('checkbox') {
170
+ @defer {
171
+ <input
172
+ upCheckbox
173
+ type="checkbox"
174
+ [formControlName]="field.name"
175
+ [required]="field.required?? false"
176
+ />
177
+ }
178
+ }
179
+
180
+ @case ('password') {
181
+ @defer {
182
+ <up-password
183
+ [formControlName]="field.name"
184
+ [placeholder]="field.placeholder"
185
+ [required]="field.required?? false"
186
+ />
187
+ }
188
+ }
189
+
190
+ <!-- TODO: Select type -->
191
+
192
+ @default {
193
+ @defer {
194
+ <input
195
+ upInput
196
+ [type]="field.type"
197
+ [formControlName]="field.name"
198
+ [placeholder]="field.placeholder"
199
+ [required]="field.required?? false"
200
+ />
201
+ }
202
+ }
203
+ }
204
+ </up-form-field>
205
+ }
206
+ </form>
207
+ }
208
+
209
+ <!-- Footer -->
210
+ <div class="flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end">
211
+ @for (btn of opts.buttons; track $index) {
212
+ <button
213
+ upButton
214
+ [variant]="opts.buttons[$index].variant"
215
+ [class]="opts.buttons[$index].additionalClass + ' flex-1'"
216
+ (click)="clickBtn($index)"
217
+ >
218
+ {{ btn.text }}
219
+ </button>
220
+ }
221
+ </div>
222
+ `
223
+ }]
224
+ }], ctorParameters: () => [{ type: i1.FormBuilder }] });
225
+
226
+ class UpAlertController {
227
+ constructor(dialog) {
228
+ this.dialog = dialog;
229
+ this.MAX_FIELDS = 3;
230
+ this.MAX_BUTTONS = 2;
231
+ }
232
+ show(options, canDismiss = false) {
233
+ if (options.fields &&
234
+ options.fields.length > this.MAX_FIELDS) {
235
+ throw new Error(`AlertService: "fields" exceeded the maximum allowed (${this.MAX_FIELDS}).`);
236
+ }
237
+ if (options.buttons &&
238
+ options.buttons.length > this.MAX_BUTTONS) {
239
+ throw new Error(`AlertService: "buttons" exceeded the maximum allowed (${this.MAX_BUTTONS}).`);
240
+ }
241
+ return this.dialog.open({
242
+ content: UpAlertComponent,
243
+ context: options,
244
+ options: {
245
+ hasBackdrop: true,
246
+ disableClose: !canDismiss,
247
+ closeOnBackdropClick: canDismiss,
248
+ closeOnOutsidePointerEvents: canDismiss
249
+ }
250
+ });
251
+ }
252
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertController, deps: [{ token: i1$1.UpDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
253
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertController, providedIn: 'root' }); }
254
+ }
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertController, decorators: [{
256
+ type: Injectable,
257
+ args: [{
258
+ providedIn: 'root'
259
+ }]
260
+ }], ctorParameters: () => [{ type: i1$1.UpDialogService }] });
261
+
262
+ /**
263
+ * Generated bundle index. Do not edit.
264
+ */
265
+
266
+ export { UpAlertController };
267
+ //# sourceMappingURL=unipin-angular-applet-alert-dialog.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unipin-angular-applet-alert-dialog.mjs","sources":["../../../projects/unipin-angular/alert-dialog/components/alert-dialog.component.ts","../../../projects/unipin-angular/alert-dialog/services/alert-controller.service.ts","../../../projects/unipin-angular/alert-dialog/unipin-angular-applet-alert-dialog.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { UpButtonDirective } from '@unipin/angular-applet/buttons';\nimport { injectDialogContext, UpDialogRef } from '@unipin/angular-applet/dialog';\nimport { UpInputDirective, UpCheckboxDirective, UpFormFieldComponent, UpPasswordComponent } from '@unipin/angular-applet/forms';\nimport { AlertOptions } from '../types/alert-options.type';\n\n@Component({\n standalone: true,\n selector: 'up-alert-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-state]': 'state()',\n 'class': `\n bg-background shadow-lg rounded-lg relative z-50 grid gap-4 outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] data-[state=closed]:duration-200 data-[state=open]:duration-200 w-11/12 max-w-125 mx-auto p-5\n `,\n },\n imports: [\n ReactiveFormsModule,\n UpInputDirective,\n UpButtonDirective, \n UpCheckboxDirective,\n UpPasswordComponent,\n UpFormFieldComponent,\n ],\n template: `\n <!-- Header -->\n <div class=\"flex flex-col gap-2 text-center sm:text-left\">\n <h2 class=\"text-lg font-semibold\">\n {{ opts.title }}\n </h2>\n \n <p class=\"text-muted-foreground text-sm\">\n {{ opts.description }}\n </p>\n </div>\n\n <!-- Fields -->\n @let fields = opts.fields;\n @if (\n fields && \n fields.length > 0\n ) {\n <form [formGroup]=\"form!\" class=\"flex flex-col gap-6 mb-4 mt-5\">\n @for (field of fields; track $index) {\n <up-form-field\n [name]=\"field.name\"\n [label]=\"field.name\"\n >\n @switch (field.type) { \n @case ('checkbox') {\n @defer {\n <input \n upCheckbox \n type=\"checkbox\"\n [formControlName]=\"field.name\" \n [required]=\"field.required?? false\"\n />\n }\n }\n\n @case ('password') {\n @defer {\n <up-password \n [formControlName]=\"field.name\" \n [placeholder]=\"field.placeholder\"\n [required]=\"field.required?? false\"\n />\n }\n }\n\n <!-- TODO: Select type -->\n\n @default {\n @defer {\n <input\n upInput\n [type]=\"field.type\"\n [formControlName]=\"field.name\"\n [placeholder]=\"field.placeholder\"\n [required]=\"field.required?? false\"\n />\n }\n } \n }\n </up-form-field>\n }\n </form>\n }\n\n <!-- Footer -->\n <div class=\"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end\">\n @for (btn of opts.buttons; track $index) {\n <button\n upButton\n [variant]=\"opts.buttons[$index].variant\"\n [class]=\"opts.buttons[$index].additionalClass + ' flex-1'\"\n (click)=\"clickBtn($index)\"\n >\n {{ btn.text }}\n </button>\n }\n </div>\n `\n})\nexport class UpAlertComponent {\n\n public readonly dialogRef = inject(UpDialogRef);\n public readonly opts = injectDialogContext<AlertOptions>();\n\n public readonly state = computed(() => this.dialogRef?.state()?? 'closed');\n\n public form?: FormGroup;\n\n constructor(\n protected fb: FormBuilder\n ) {\n const fields = this.opts.fields;\n \n if (fields) {\n this.form = this.fb.group({ });\n \n fields.forEach(\n (field) => {\n const defaultValue = field.type === 'checkbox'? false : null;\n \n this.form!.addControl(\n field.name,\n this.fb.control(defaultValue, field.required? Validators.required : [])\n );\n } \n );\n }\n }\n\n public clickBtn(index: number): void{\n const buttons = this.opts.buttons;\n\n if (buttons[index].handler) {\n let value: undefined | Record<string, any> = undefined;\n\n if (this.form) {\n value = { ...this.form?.getRawValue() };\n\n this.opts.fields?.forEach(\n (field) => {\n if (\n field.type === 'number' &&\n value![field.name] &&\n !isNaN(value![field.name])\n ) {\n value![field.name] = Number(value![field.name]);\n }\n }\n );\n }\n buttons[index].handler(value);\n }\n\n this.dialogRef.close();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { UpDialogRef, UpDialogService } from '@unipin/angular-applet/dialog';\nimport { AlertOptions } from '../types/alert-options.type';\nimport { UpAlertComponent } from '../components/alert-dialog.component';\n\n@Injectable({ \n providedIn: 'root' \n})\nexport class UpAlertController {\n\n protected readonly MAX_FIELDS = 3;\n protected readonly MAX_BUTTONS = 2;\n\n constructor(protected dialog: UpDialogService) {}\n\n public show(options: AlertOptions, canDismiss: boolean = false): UpDialogRef{\n if (\n options.fields && \n options.fields.length > this.MAX_FIELDS\n ) {\n throw new Error(\n `AlertService: \"fields\" exceeded the maximum allowed (${ this.MAX_FIELDS }).`\n );\n }\n\n if (\n options.buttons && \n options.buttons.length > this.MAX_BUTTONS\n ) {\n throw new Error(\n `AlertService: \"buttons\" exceeded the maximum allowed (${ this.MAX_BUTTONS }).`\n );\n }\n\n return this.dialog.open(\n {\n content: UpAlertComponent,\n context: options,\n options: {\n hasBackdrop: true,\n disableClose: !canDismiss,\n closeOnBackdropClick: canDismiss,\n closeOnOutsidePointerEvents: canDismiss\n }\n }\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;MAyGa,gBAAgB,CAAA;AAS3B,IAAA,WAAA,CACY,EAAe,EAAA;QAAf,IAAA,CAAA,EAAE,GAAF,EAAE;AARE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;QAC/B,IAAA,CAAA,IAAI,GAAG,mBAAmB,EAAgB;AAE1C,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAG,QAAQ,iDAAC;AAOxE,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAA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
+ import { cva } from 'class-variance-authority';
2
+ import * as i0 from '@angular/core';
3
+ import { input, computed, Directive } from '@angular/core';
4
+ import { up } from '@unipin/angular-applet/common';
5
+
6
+ const alertVariants = cva('[&_ng-icon]:text-[16px] relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>ng-icon]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>ng-icon]:gap-x-3 gap-y-0.5 items-start [&>ng-icon]:size-4 [&>ng-icon]:translate-y-0.5 [&>ng-icon]:text-current', {
7
+ variants: {
8
+ variant: {
9
+ default: 'dark:text-white',
10
+ success: 'text-green-600',
11
+ warning: 'text-yellow-600',
12
+ destructive: 'text-destructive',
13
+ },
14
+ },
15
+ defaultVariants: {
16
+ variant: 'default',
17
+ },
18
+ });
19
+
20
+ class UpAlertDirective {
21
+ constructor() {
22
+ this.variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
23
+ this.inlineClass = input('', ...(ngDevMode ? [{ debugName: "inlineClass", alias: 'class' }] : [{ alias: 'class' }]));
24
+ this._computedClass = computed(() => {
25
+ return up('select-none outline-none', alertVariants({
26
+ variant: this.variant(),
27
+ }), this.inlineClass());
28
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
29
+ }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
31
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.0", type: UpAlertDirective, isStandalone: true, selector: "[upAlert]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlert"], ngImport: i0 }); }
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertDirective, decorators: [{
34
+ type: Directive,
35
+ args: [{
36
+ standalone: true,
37
+ exportAs: 'upAlert',
38
+ selector: '[upAlert]',
39
+ host: {
40
+ '[class]': '_computedClass()',
41
+ }
42
+ }]
43
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
44
+
45
+ class UpAlertTitleDirective {
46
+ constructor() {
47
+ this.inlineClass = input('', ...(ngDevMode ? [{ debugName: "inlineClass", alias: 'class' }] : [{ alias: 'class' }]));
48
+ this._computedClass = computed(() => {
49
+ return up('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', this.inlineClass());
50
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
51
+ }
52
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
53
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.0", type: UpAlertTitleDirective, isStandalone: true, selector: "[upAlertTitle]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlertTitle"], ngImport: i0 }); }
54
+ }
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertTitleDirective, decorators: [{
56
+ type: Directive,
57
+ args: [{
58
+ standalone: true,
59
+ exportAs: 'upAlertTitle',
60
+ selector: '[upAlertTitle]',
61
+ host: {
62
+ '[class]': '_computedClass()',
63
+ }
64
+ }]
65
+ }], propDecorators: { inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
66
+
67
+ class UpAlertDescriptionDirective {
68
+ constructor() {
69
+ this.inlineClass = input('', ...(ngDevMode ? [{ debugName: "inlineClass", alias: 'class' }] : [{ alias: 'class' }]));
70
+ this._computedClass = computed(() => {
71
+ return up('col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', this.inlineClass());
72
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
73
+ }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
75
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.0", type: UpAlertDescriptionDirective, isStandalone: true, selector: "[upAlertDescription]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlertDescription"], ngImport: i0 }); }
76
+ }
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: UpAlertDescriptionDirective, decorators: [{
78
+ type: Directive,
79
+ args: [{
80
+ standalone: true,
81
+ exportAs: 'upAlertDescription',
82
+ selector: '[upAlertDescription]',
83
+ host: {
84
+ '[class]': '_computedClass()',
85
+ }
86
+ }]
87
+ }], propDecorators: { inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
88
+
89
+ /**
90
+ * Generated bundle index. Do not edit.
91
+ */
92
+
93
+ export { UpAlertDescriptionDirective, UpAlertDirective, UpAlertTitleDirective, alertVariants };
94
+ //# sourceMappingURL=unipin-angular-applet-alert.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unipin-angular-applet-alert.mjs","sources":["../../../projects/unipin-angular/alert/types/alert-variant.type.ts","../../../projects/unipin-angular/alert/directives/alert.directive.ts","../../../projects/unipin-angular/alert/directives/alert-title.directive.ts","../../../projects/unipin-angular/alert/directives/alert-description.directive.ts","../../../projects/unipin-angular/alert/unipin-angular-applet-alert.ts"],"sourcesContent":["import { cva, VariantProps } from 'class-variance-authority';\n\nexport const alertVariants = cva(\n '[&_ng-icon]:text-[16px] relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>ng-icon]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>ng-icon]:gap-x-3 gap-y-0.5 items-start [&>ng-icon]:size-4 [&>ng-icon]:translate-y-0.5 [&>ng-icon]:text-current',\n {\n variants: {\n variant: {\n default: 'dark:text-white',\n success: 'text-green-600',\n warning: 'text-yellow-600',\n destructive: 'text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport type AlertVariants = VariantProps<typeof alertVariants>;\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { alertVariants, AlertVariants } from '../types/alert-variant.type';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlert',\n selector: '[upAlert]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertDirective {\n\n public readonly variant = input<AlertVariants['variant']>('default');\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'select-none outline-none',\n alertVariants(\n {\n variant: this.variant(),\n }\n ),\n this.inlineClass(),\n );\n }\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlertTitle',\n selector: '[upAlertTitle]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertTitleDirective {\n\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n 'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight',\n this.inlineClass(),\n );\n }\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlertDescription',\n selector: '[upAlertDescription]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertDescriptionDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',\n this.inlineClass(),\n );\n }\n );\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,aAAa,GAAG,GAAG,CAC9B,+QAA+Q,EAC/Q;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,OAAO,EAAE,gBAAgB;AACzB,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,WAAW,EAAE,kBAAkB;AAChC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;;MCHU,gBAAgB,CAAA;AAR7B,IAAA,WAAA,GAAA;AAUkB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAA2B,SAAS,mDAAC;AACpD,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,+CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAEpD,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAC1C,MAAK;AACH,YAAA,OAAO,EAAE,CACP,0BAA0B,EAC1B,aAAa,CACX;AACE,gBAAA,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;AACxB,aAAA,CACF,EACD,IAAI,CAAC,WAAW,EAAE,CACnB;AACH,QAAA,CAAC,0DACF;AACF,IAAA;8GAlBY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EA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