@seniorsistemas/angular-components 19.3.1 → 19.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/breadcrumb/lib/dynamic-breadcrumb/dynamic-breadcrumb.component.d.ts +1 -2
  2. package/calendar-mask/lib/calendar-mask/calendar-mask.directive.d.ts +0 -1
  3. package/chips/lib/chips/chips/chips.component.d.ts +1 -2
  4. package/code-editor/lib/code-editor/code-editor.component.d.ts +0 -2
  5. package/code-editor/lib/code-editor/infra/utils/custom-translations/custom-translations.module.d.ts +1 -3
  6. package/common/lib/svg-factory/svg-factory.directive.d.ts +1 -2
  7. package/content-generator/lib/content-generator/content-generator.component.d.ts +1 -6
  8. package/content-generator/lib/services/IAssist/iassist.service.d.ts +0 -3
  9. package/country-phone-picker/lib/country-phone-picker/country-phone-picker.component.d.ts +0 -3
  10. package/country-phone-picker/lib/country-phone-picker/country-phone-picker.service.d.ts +0 -2
  11. package/currency/lib/currency.service.d.ts +0 -2
  12. package/custom-fields/lib/custom-fields/custom-fields.component.d.ts +3 -7
  13. package/custom-fields/lib/custom-fields/custom-fields.service.d.ts +0 -2
  14. package/dynamic-form/dynamic-form/components/lookup/lookup.component.d.ts +2 -4
  15. package/dynamic-form/dynamic-form/components/lookup/types/lookup-models.d.ts +4 -0
  16. package/dynamic-form/dynamic-form/form-field/configurations/fields/lookup-field.d.ts +2 -1
  17. package/dynamic-form/dynamic-form/form-field/fields/autocomplete/autocomplete-field.component.d.ts +1 -2
  18. package/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.d.ts +1 -3
  19. package/dynamic-form/dynamic-form/form-field/fields/calendar/calendar-field.component.d.ts +1 -2
  20. package/dynamic-form/dynamic-form/form-field/fields/chips/chips-field.component.d.ts +1 -3
  21. package/dynamic-form/dynamic-form/form-field/fields/country-phone-picker/country-phone-picker-field.component.d.ts +1 -2
  22. package/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.d.ts +1 -3
  23. package/dynamic-form/dynamic-form/form-field/fields/file-picker/file-picker-field.component.d.ts +1 -2
  24. package/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.d.ts +1 -3
  25. package/dynamic-form/dynamic-form/form-field/fields/password/password-field.component.d.ts +1 -2
  26. package/dynamic-form/dynamic-form/form-field/fields/text/text-field.component.d.ts +1 -2
  27. package/dynamic-form/dynamic-form/form-field/fields/text-area/text-area-field.component.d.ts +1 -2
  28. package/dynamic-form/public-api.d.ts +1 -0
  29. package/empty-state/lib/empty-state/go-back/go-back.component.d.ts +0 -2
  30. package/esm2022/badge/lib/badge/badge.component.mjs +3 -3
  31. package/esm2022/breadcrumb/lib/dynamic-breadcrumb/dynamic-breadcrumb.component.mjs +10 -13
  32. package/esm2022/calendar-mask/lib/calendar-mask/calendar-mask.directive.mjs +7 -11
  33. package/esm2022/chips/lib/chips/chips/chips.component.mjs +5 -8
  34. package/esm2022/code-editor/lib/code-editor/code-editor.component.mjs +6 -9
  35. package/esm2022/code-editor/lib/code-editor/infra/utils/custom-translations/custom-translations.module.mjs +8 -13
  36. package/esm2022/common/lib/svg-factory/svg-factory.directive.mjs +6 -10
  37. package/esm2022/content-generator/lib/content-generator/content-generator.component.mjs +24 -30
  38. package/esm2022/content-generator/lib/services/IAssist/iassist.service.mjs +9 -12
  39. package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.component.mjs +15 -23
  40. package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.service.mjs +6 -9
  41. package/esm2022/currency/lib/currency.service.mjs +6 -9
  42. package/esm2022/custom-fields/lib/custom-fields/custom-fields.component.mjs +17 -25
  43. package/esm2022/custom-fields/lib/custom-fields/custom-fields.service.mjs +6 -9
  44. package/esm2022/dynamic-form/dynamic-form/components/lookup/lookup.component.mjs +26 -35
  45. package/esm2022/dynamic-form/dynamic-form/components/lookup/types/lookup-models.mjs +2 -0
  46. package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/lookup-field.mjs +1 -1
  47. package/esm2022/dynamic-form/dynamic-form/form-field/fields/autocomplete/autocomplete-field.component.mjs +6 -10
  48. package/esm2022/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.mjs +12 -17
  49. package/esm2022/dynamic-form/dynamic-form/form-field/fields/calendar/calendar-field.component.mjs +5 -8
  50. package/esm2022/dynamic-form/dynamic-form/form-field/fields/chips/chips-field.component.mjs +12 -17
  51. package/esm2022/dynamic-form/dynamic-form/form-field/fields/country-phone-picker/country-phone-picker-field.component.mjs +5 -8
  52. package/esm2022/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.mjs +13 -19
  53. package/esm2022/dynamic-form/dynamic-form/form-field/fields/file-picker/file-picker-field.component.mjs +6 -10
  54. package/esm2022/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.mjs +14 -19
  55. package/esm2022/dynamic-form/dynamic-form/form-field/fields/password/password-field.component.mjs +5 -8
  56. package/esm2022/dynamic-form/dynamic-form/form-field/fields/text/text-field.component.mjs +5 -8
  57. package/esm2022/dynamic-form/dynamic-form/form-field/fields/text-area/text-area-field.component.mjs +5 -8
  58. package/esm2022/dynamic-form/public-api.mjs +1 -1
  59. package/esm2022/empty-state/lib/empty-state/go-back/go-back.component.mjs +8 -11
  60. package/esm2022/file-picker/lib/file-picker/file-picker.component.mjs +17 -21
  61. package/esm2022/gantt/lib/gantt/components/gantt/gantt.mjs +6 -2
  62. package/esm2022/gantt/lib/gantt/gantt.component.mjs +8 -4
  63. package/esm2022/global-search/lib/global-search/global-search.component.mjs +5 -8
  64. package/esm2022/image-cropper/lib/image-cropper/image-cropper.service.mjs +7 -12
  65. package/esm2022/infinite-scroll/lib/infinite-scroll/infinite-scroll.directive.mjs +5 -8
  66. package/esm2022/info-sign/lib/info-sign/info-sign.directive.mjs +6 -10
  67. package/esm2022/inline-edit/lib/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.mjs +9 -12
  68. package/esm2022/inline-edit/lib/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.mjs +14 -17
  69. package/esm2022/inline-edit/lib/inline-edit/components/inline-edit-item/inline-edit-item.component.mjs +12 -15
  70. package/esm2022/insights/lib/insights/components/insights-card/insights-card.component.mjs +15 -19
  71. package/esm2022/interactive-content/lib/interactive-content/interactive-content.directive.mjs +5 -8
  72. package/esm2022/kanban/lib/kanban/components/kanban-column/kanban-column.component.mjs +10 -13
  73. package/esm2022/kanban/lib/kanban/components/kanban-item/kanban-item.component.mjs +10 -13
  74. package/esm2022/kanban/lib/kanban/kanban.component.mjs +23 -17
  75. package/esm2022/loading-state/lib/loading-state/loading-state.directive.mjs +10 -16
  76. package/esm2022/locale/lib/locale/locale.service.mjs +8 -12
  77. package/esm2022/locale/lib/locale/pipes/localized-bignumber.pipe.mjs +6 -9
  78. package/esm2022/locale/lib/locale/pipes/localized-currency.pipe.mjs +6 -9
  79. package/esm2022/locale/lib/locale/pipes/localized-date.pipe.mjs +6 -9
  80. package/esm2022/locale/lib/locale/pipes/localized-number.pipe.mjs +6 -9
  81. package/esm2022/locale/lib/locale/pipes/localized-time.pipe.mjs +6 -9
  82. package/esm2022/localized-number-input/lib/localized-number-input/localized-number-input.directive.mjs +6 -9
  83. package/esm2022/navigation-button/lib/navigation-button/navigation-button.component.mjs +5 -8
  84. package/esm2022/numeric/lib/numeric.pipe.mjs +8 -12
  85. package/esm2022/numeric/lib/numeric.service.mjs +6 -9
  86. package/esm2022/password-strength/lib/password-strength/password-strength.component.mjs +8 -11
  87. package/esm2022/password-strength/lib/password-strength/password-strength.directive.mjs +10 -16
  88. package/esm2022/picklist/lib/picklist/picklist.component.mjs +5 -8
  89. package/esm2022/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.component.mjs +15 -19
  90. package/esm2022/progressbar/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.mjs +8 -11
  91. package/esm2022/progressbar/lib/progressbar/progressbar.module.mjs +5 -4
  92. package/esm2022/select-button/lib/select-button/select-button.component.mjs +3 -3
  93. package/esm2022/shared/lib/accessibility/paginator-accessibility.directive.mjs +8 -13
  94. package/esm2022/shared/lib/accessibility/table-checkbox-accessibility.directive.mjs +5 -8
  95. package/esm2022/slide-in-bar/lib/slide-in-bar/slide-in-bar.component.mjs +9 -12
  96. package/esm2022/speech-recognition/lib/speech-recognition/speech-recognition/speech-recognition.component.mjs +12 -16
  97. package/esm2022/speech-recognition/lib/speech-recognition/speech-recognition.service.mjs +12 -16
  98. package/esm2022/speech-recognition/lib/speech-recognition/text-to-speech.service.mjs +8 -10
  99. package/esm2022/split-button/lib/split-button/split-button.component.mjs +5 -8
  100. package/esm2022/table/lib/table/row-toggler/row-toggler.directive.mjs +7 -7
  101. package/esm2022/table/lib/table/table-column/table-columns.component.mjs +19 -28
  102. package/esm2022/table/lib/table/table-paging/table-paging.component.mjs +9 -16
  103. package/esm2022/table-header/lib/table-header/table-header-checkbox.component.mjs +11 -13
  104. package/esm2022/text-area/lib/text-area/text-area.component.mjs +5 -8
  105. package/esm2022/thumbnail/lib/thumbnail/thumbnail.component.mjs +8 -11
  106. package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu/tiered-menu.component.mjs +16 -24
  107. package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu-item/tiered-menu-item.component.mjs +8 -11
  108. package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu-nested/tiered-menu-nested.component.mjs +12 -16
  109. package/esm2022/tiered-menu/lib/tiered-menu/tiered-menu.directive.mjs +13 -25
  110. package/esm2022/toast/lib/toast/toast.service.mjs +7 -12
  111. package/esm2022/tree/lib/tree/components/tree-node-item/tree-node-item.component.mjs +10 -14
  112. package/esm2022/workspace-switch/lib/workspace-switch/workspace-switch.component.mjs +6 -10
  113. package/fesm2022/seniorsistemas-angular-components-badge.mjs +2 -2
  114. package/fesm2022/seniorsistemas-angular-components-badge.mjs.map +1 -1
  115. package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs +10 -12
  116. package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs.map +1 -1
  117. package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs +6 -10
  118. package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs.map +1 -1
  119. package/fesm2022/seniorsistemas-angular-components-chips.mjs +4 -7
  120. package/fesm2022/seniorsistemas-angular-components-chips.mjs.map +1 -1
  121. package/fesm2022/seniorsistemas-angular-components-code-editor.mjs +10 -18
  122. package/fesm2022/seniorsistemas-angular-components-code-editor.mjs.map +1 -1
  123. package/fesm2022/seniorsistemas-angular-components-common.mjs +5 -9
  124. package/fesm2022/seniorsistemas-angular-components-common.mjs.map +1 -1
  125. package/fesm2022/seniorsistemas-angular-components-content-generator.mjs +29 -40
  126. package/fesm2022/seniorsistemas-angular-components-content-generator.mjs.map +1 -1
  127. package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs +16 -28
  128. package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs.map +1 -1
  129. package/fesm2022/seniorsistemas-angular-components-currency.mjs +5 -8
  130. package/fesm2022/seniorsistemas-angular-components-currency.mjs.map +1 -1
  131. package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs +45 -59
  132. package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs.map +1 -1
  133. package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +111 -163
  134. package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
  135. package/fesm2022/seniorsistemas-angular-components-empty-state.mjs +4 -8
  136. package/fesm2022/seniorsistemas-angular-components-empty-state.mjs.map +1 -1
  137. package/fesm2022/seniorsistemas-angular-components-file-picker.mjs +17 -22
  138. package/fesm2022/seniorsistemas-angular-components-file-picker.mjs.map +1 -1
  139. package/fesm2022/seniorsistemas-angular-components-gantt.mjs +12 -4
  140. package/fesm2022/seniorsistemas-angular-components-gantt.mjs.map +1 -1
  141. package/fesm2022/seniorsistemas-angular-components-global-search.mjs +4 -7
  142. package/fesm2022/seniorsistemas-angular-components-global-search.mjs.map +1 -1
  143. package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs +6 -11
  144. package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs.map +1 -1
  145. package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs +4 -7
  146. package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs.map +1 -1
  147. package/fesm2022/seniorsistemas-angular-components-info-sign.mjs +5 -9
  148. package/fesm2022/seniorsistemas-angular-components-info-sign.mjs.map +1 -1
  149. package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs +29 -38
  150. package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs.map +1 -1
  151. package/fesm2022/seniorsistemas-angular-components-insights.mjs +17 -22
  152. package/fesm2022/seniorsistemas-angular-components-insights.mjs.map +1 -1
  153. package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs +4 -7
  154. package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs.map +1 -1
  155. package/fesm2022/seniorsistemas-angular-components-kanban.mjs +30 -30
  156. package/fesm2022/seniorsistemas-angular-components-kanban.mjs.map +1 -1
  157. package/fesm2022/seniorsistemas-angular-components-loading-state.mjs +7 -15
  158. package/fesm2022/seniorsistemas-angular-components-loading-state.mjs.map +1 -1
  159. package/fesm2022/seniorsistemas-angular-components-locale.mjs +22 -41
  160. package/fesm2022/seniorsistemas-angular-components-locale.mjs.map +1 -1
  161. package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs +5 -8
  162. package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs.map +1 -1
  163. package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs +4 -7
  164. package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs.map +1 -1
  165. package/fesm2022/seniorsistemas-angular-components-numeric.mjs +9 -16
  166. package/fesm2022/seniorsistemas-angular-components-numeric.mjs.map +1 -1
  167. package/fesm2022/seniorsistemas-angular-components-password-strength.mjs +13 -24
  168. package/fesm2022/seniorsistemas-angular-components-password-strength.mjs.map +1 -1
  169. package/fesm2022/seniorsistemas-angular-components-picklist.mjs +4 -7
  170. package/fesm2022/seniorsistemas-angular-components-picklist.mjs.map +1 -1
  171. package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs +14 -21
  172. package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs.map +1 -1
  173. package/fesm2022/seniorsistemas-angular-components-progressbar.mjs +11 -14
  174. package/fesm2022/seniorsistemas-angular-components-progressbar.mjs.map +1 -1
  175. package/fesm2022/seniorsistemas-angular-components-select-button.mjs +2 -2
  176. package/fesm2022/seniorsistemas-angular-components-select-button.mjs.map +1 -1
  177. package/fesm2022/seniorsistemas-angular-components-shared.mjs +10 -18
  178. package/fesm2022/seniorsistemas-angular-components-shared.mjs.map +1 -1
  179. package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs +7 -10
  180. package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs.map +1 -1
  181. package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs +23 -34
  182. package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs.map +1 -1
  183. package/fesm2022/seniorsistemas-angular-components-split-button.mjs +4 -7
  184. package/fesm2022/seniorsistemas-angular-components-split-button.mjs.map +1 -1
  185. package/fesm2022/seniorsistemas-angular-components-table-header.mjs +10 -12
  186. package/fesm2022/seniorsistemas-angular-components-table-header.mjs.map +1 -1
  187. package/fesm2022/seniorsistemas-angular-components-table.mjs +29 -46
  188. package/fesm2022/seniorsistemas-angular-components-table.mjs.map +1 -1
  189. package/fesm2022/seniorsistemas-angular-components-text-area.mjs +4 -7
  190. package/fesm2022/seniorsistemas-angular-components-text-area.mjs.map +1 -1
  191. package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs +6 -9
  192. package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs.map +1 -1
  193. package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs +30 -55
  194. package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs.map +1 -1
  195. package/fesm2022/seniorsistemas-angular-components-toast.mjs +6 -11
  196. package/fesm2022/seniorsistemas-angular-components-toast.mjs.map +1 -1
  197. package/fesm2022/seniorsistemas-angular-components-tree.mjs +9 -14
  198. package/fesm2022/seniorsistemas-angular-components-tree.mjs.map +1 -1
  199. package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs +5 -9
  200. package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs.map +1 -1
  201. package/file-picker/lib/file-picker/file-picker.component.d.ts +0 -4
  202. package/file-upload/README.md +9 -37
  203. package/gantt/lib/gantt/gantt.component.d.ts +1 -0
  204. package/global-search/lib/global-search/global-search.component.d.ts +1 -2
  205. package/ia-insight/README.md +17 -0
  206. package/image-cropper/lib/image-cropper/image-cropper.service.d.ts +1 -2
  207. package/infinite-scroll/lib/infinite-scroll/infinite-scroll.directive.d.ts +1 -2
  208. package/info-sign/lib/info-sign/info-sign.directive.d.ts +1 -2
  209. package/inline-edit/lib/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.d.ts +1 -2
  210. package/inline-edit/lib/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.d.ts +0 -2
  211. package/inline-edit/lib/inline-edit/components/inline-edit-item/inline-edit-item.component.d.ts +0 -2
  212. package/insights/lib/insights/components/insights-card/insights-card.component.d.ts +0 -4
  213. package/interactive-content/lib/interactive-content/interactive-content.directive.d.ts +1 -2
  214. package/kanban/lib/kanban/components/kanban-column/kanban-column.component.d.ts +0 -2
  215. package/kanban/lib/kanban/components/kanban-item/kanban-item.component.d.ts +0 -2
  216. package/kanban/lib/kanban/kanban.component.d.ts +2 -2
  217. package/loading-state/lib/loading-state/loading-state.directive.d.ts +1 -2
  218. package/locale/lib/locale/locale.service.d.ts +0 -3
  219. package/locale/lib/locale/pipes/localized-bignumber.pipe.d.ts +0 -2
  220. package/locale/lib/locale/pipes/localized-currency.pipe.d.ts +0 -2
  221. package/locale/lib/locale/pipes/localized-date.pipe.d.ts +0 -2
  222. package/locale/lib/locale/pipes/localized-number.pipe.d.ts +0 -2
  223. package/locale/lib/locale/pipes/localized-time.pipe.d.ts +0 -2
  224. package/localized-number-input/lib/localized-number-input/localized-number-input.directive.d.ts +0 -2
  225. package/navigation-button/lib/navigation-button/navigation-button.component.d.ts +1 -2
  226. package/numeric/lib/numeric.pipe.d.ts +0 -3
  227. package/numeric/lib/numeric.service.d.ts +0 -2
  228. package/package.json +1 -1
  229. package/password-strength/lib/password-strength/password-strength.component.d.ts +0 -2
  230. package/password-strength/lib/password-strength/password-strength.directive.d.ts +1 -2
  231. package/picklist/lib/picklist/picklist.component.d.ts +1 -2
  232. package/product-header/README.md +17 -0
  233. package/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.component.d.ts +0 -4
  234. package/progressbar/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.d.ts +0 -2
  235. package/progressbar/lib/progressbar/progressbar.module.d.ts +2 -1
  236. package/shared/lib/accessibility/paginator-accessibility.directive.d.ts +1 -3
  237. package/shared/lib/accessibility/table-checkbox-accessibility.directive.d.ts +1 -2
  238. package/slide-in-bar/lib/slide-in-bar/slide-in-bar.component.d.ts +0 -2
  239. package/speech-recognition/lib/speech-recognition/speech-recognition/speech-recognition.component.d.ts +0 -4
  240. package/speech-recognition/lib/speech-recognition/speech-recognition.service.d.ts +1 -5
  241. package/speech-recognition/lib/speech-recognition/text-to-speech.service.d.ts +1 -3
  242. package/split-button/lib/split-button/split-button.component.d.ts +1 -2
  243. package/table/lib/table/row-toggler/row-toggler.directive.d.ts +1 -1
  244. package/table/lib/table/table-column/table-columns.component.d.ts +2 -6
  245. package/table/lib/table/table-paging/table-paging.component.d.ts +0 -3
  246. package/table-header/lib/table-header/table-header-checkbox.component.d.ts +1 -1
  247. package/text-area/lib/text-area/text-area.component.d.ts +1 -2
  248. package/text-area-ia/README.md +17 -0
  249. package/thumbnail/lib/thumbnail/thumbnail.component.d.ts +0 -2
  250. package/tiered-menu/lib/tiered-menu/components/tiered-menu/tiered-menu.component.d.ts +1 -3
  251. package/tiered-menu/lib/tiered-menu/components/tiered-menu-item/tiered-menu-item.component.d.ts +0 -2
  252. package/tiered-menu/lib/tiered-menu/components/tiered-menu-nested/tiered-menu-nested.component.d.ts +0 -2
  253. package/tiered-menu/lib/tiered-menu/tiered-menu.directive.d.ts +1 -5
  254. package/toast/lib/toast/toast.service.d.ts +0 -2
  255. package/tree/lib/tree/components/tree-node-item/tree-node-item.component.d.ts +1 -3
  256. package/workspace-switch/lib/workspace-switch/workspace-switch.component.d.ts +1 -2
  257. package/confirm-dialog/README.md +0 -226
  258. package/numeric-mask/README.md +0 -395
  259. package/pin-code-field/README.md +0 -366
  260. package/spotlight/README.md +0 -311
@@ -1,18 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, forwardRef, ElementRef, Component, Input, ViewChild, Output, HostListener, NgModule } from '@angular/core';
2
+ import { inject, EventEmitter, forwardRef, ElementRef, Component, Input, ViewChild, Output, HostListener, NgModule } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
- import { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';
5
- import * as i1 from '@seniorsistemas/angular-components/image-cropper';
6
- import { ImageCropperModule, ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';
7
- import * as i2 from 'primeng/api';
4
+ import * as i4 from '@ngx-translate/core';
5
+ import { TranslateService, TranslateModule } from '@ngx-translate/core';
8
6
  import { ConfirmationService } from 'primeng/api';
9
- import * as i3 from '@ngx-translate/core';
10
- import { TranslateModule } from '@ngx-translate/core';
11
- import * as i4 from '@seniorsistemas/angular-components/button';
7
+ import { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';
8
+ import { ImageCropperService, ImageCropperModule } from '@seniorsistemas/angular-components/image-cropper';
9
+ import * as i1 from '@seniorsistemas/angular-components/button';
12
10
  import { ButtonModule } from '@seniorsistemas/angular-components/button';
13
- import * as i5 from '@seniorsistemas/angular-components/thumbnail';
11
+ import * as i2 from '@seniorsistemas/angular-components/thumbnail';
14
12
  import { ThumbnailModule } from '@seniorsistemas/angular-components/thumbnail';
15
- import * as i6 from 'primeng/confirmdialog';
13
+ import * as i3 from 'primeng/confirmdialog';
16
14
  import { ConfirmDialogModule } from 'primeng/confirmdialog';
17
15
  import { CommonModule } from '@angular/common';
18
16
 
@@ -36,9 +34,9 @@ import { CommonModule } from '@angular/common';
36
34
  * @category Inputs
37
35
  */
38
36
  class ProfilePicturePickerComponent {
39
- imageCropperService;
40
- confirmationService;
41
- translateService;
37
+ imageCropperService = inject(ImageCropperService);
38
+ confirmationService = inject(ConfirmationService);
39
+ translateService = inject(TranslateService);
42
40
  /**
43
41
  * @description Título simples exibido quando nenhuma imagem está selecionada.
44
42
  */
@@ -132,11 +130,6 @@ class ProfilePicturePickerComponent {
132
130
  }
133
131
  _onChange;
134
132
  _onTouched;
135
- constructor(imageCropperService, confirmationService, translateService) {
136
- this.imageCropperService = imageCropperService;
137
- this.confirmationService = confirmationService;
138
- this.translateService = translateService;
139
- }
140
133
  writeValue(value) {
141
134
  this.image = value;
142
135
  }
@@ -290,14 +283,14 @@ class ProfilePicturePickerComponent {
290
283
  const { left, right } = element.nativeElement.getBoundingClientRect();
291
284
  return right - left;
292
285
  }
293
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProfilePicturePickerComponent, deps: [{ token: i1.ImageCropperService }, { token: i2.ConfirmationService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
286
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProfilePicturePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
294
287
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ProfilePicturePickerComponent, selector: "s-profile-picture-picker", inputs: { simpleTitle: "simpleTitle", actionTitle: "actionTitle", subtitle: "subtitle", aspectRatio: "aspectRatio", cropperLabelsConfig: "cropperLabelsConfig", removeButtonLabel: "removeButtonLabel", changeButtonLabel: "changeButtonLabel", confirmationTexts: "confirmationTexts", maxFileSize: "maxFileSize", accept: "accept", supportedExtensions: "supportedExtensions", image: "image" }, outputs: { changedImage: "changedImage", imageChange: "imageChange", removedImage: "removedImage", invalidFile: "invalidFile" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)", "window:resize": "onResize()" } }, providers: [
295
288
  {
296
289
  provide: NG_VALUE_ACCESSOR,
297
290
  useExisting: forwardRef(() => ProfilePicturePickerComponent),
298
291
  multi: true,
299
292
  },
300
- ], viewQueries: [{ propertyName: "uploadPicture", first: true, predicate: ["uploadPicture"], descendants: true }, { propertyName: "info", first: true, predicate: ["info"], descendants: true }, { propertyName: "thumbnail", first: true, predicate: ["thumbnail"], descendants: true, read: ElementRef }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef }], ngImport: i0, template: "<p-confirmDialog></p-confirmDialog>\n\n<input\n #fileInput\n [accept]=\"accept\"\n class=\"file-input\"\n type=\"file\"\n (change)=\"photoSelected($event)\"\n/>\n<div\n #uploadPicture\n class=\"upload-picture\"\n>\n <s-thumbnail\n #thumbnail\n iconClass=\"far fa-user\"\n [imageSource]=\"imageBase64\"\n [hasAction]=\"!image\"\n (click)=\"selectPhoto()\"\n >\n </s-thumbnail>\n <div\n #info\n class=\"info\"\n >\n @if (image) {\n <div class=\"buttons\">\n <s-button\n [label]=\"changeButtonLabel || 'platform.angular_components.change_photo' | translate\"\n priority=\"primary\"\n (clicked)=\"selectPhoto()\"\n >\n </s-button>\n <s-button\n [label]=\"removeButtonLabel || 'platform.angular_components.remove' | translate\"\n priority=\"secondary\"\n (clicked)=\"removePhoto()\"\n >\n </s-button>\n </div>\n } @else {\n <p class=\"title\">\n {{ simpleTitle || 'platform.angular_components.drag_your_photo_or' | translate }}\n <span\n class=\"action-title\"\n (click)=\"selectPhoto()\"\n >\n {{ actionTitle || 'platform.angular_components.select_a_file' | translate }}\n </span>\n </p>\n }\n <p class=\"subtitle\">{{ subtitle }}</p>\n </div>\n</div>\n", styles: [".file-input{display:none}.upload-picture{display:flex;flex-wrap:wrap}.upload-picture .info{display:flex;flex-direction:column;padding:12px 20px;align-items:flex-start}.upload-picture .info .title{font-family:Open Sans,sans-serif;font-weight:700;font-size:.875rem;line-height:150%;color:#333}.upload-picture .info .title .action-title{cursor:pointer;color:#428bca}.upload-picture .info .buttons{display:flex;gap:8px}.upload-picture .info .buttons s-button{margin:0}.upload-picture .info .subtitle{padding:6px 0;font-family:Open Sans,sans-serif;font-weight:400;font-size:.75rem;line-height:150%;color:#697882;text-align:center}.upload-picture--small .info{align-items:center}.upload-picture--small .info .title,.upload-picture--small .info .subtitle{text-align:center}.upload-picture--small .info .buttons{justify-content:center;flex-wrap:wrap}\n"], dependencies: [{ kind: "component", type: i4.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "component", type: i5.ThumbnailComponent, selector: "s-thumbnail", inputs: ["id", "size", "imageSource", "imageFallback", "imageAlt", "iconClass", "hasAction", "actionIconClass", "isTile", "isBrand"] }, { kind: "component", type: i6.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
293
+ ], viewQueries: [{ propertyName: "uploadPicture", first: true, predicate: ["uploadPicture"], descendants: true }, { propertyName: "info", first: true, predicate: ["info"], descendants: true }, { propertyName: "thumbnail", first: true, predicate: ["thumbnail"], descendants: true, read: ElementRef }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef }], ngImport: i0, template: "<p-confirmDialog></p-confirmDialog>\n\n<input\n #fileInput\n [accept]=\"accept\"\n class=\"file-input\"\n type=\"file\"\n (change)=\"photoSelected($event)\"\n/>\n<div\n #uploadPicture\n class=\"upload-picture\"\n>\n <s-thumbnail\n #thumbnail\n iconClass=\"far fa-user\"\n [imageSource]=\"imageBase64\"\n [hasAction]=\"!image\"\n (click)=\"selectPhoto()\"\n >\n </s-thumbnail>\n <div\n #info\n class=\"info\"\n >\n @if (image) {\n <div class=\"buttons\">\n <s-button\n [label]=\"changeButtonLabel || 'platform.angular_components.change_photo' | translate\"\n priority=\"primary\"\n (clicked)=\"selectPhoto()\"\n >\n </s-button>\n <s-button\n [label]=\"removeButtonLabel || 'platform.angular_components.remove' | translate\"\n priority=\"secondary\"\n (clicked)=\"removePhoto()\"\n >\n </s-button>\n </div>\n } @else {\n <p class=\"title\">\n {{ simpleTitle || 'platform.angular_components.drag_your_photo_or' | translate }}\n <span\n class=\"action-title\"\n (click)=\"selectPhoto()\"\n >\n {{ actionTitle || 'platform.angular_components.select_a_file' | translate }}\n </span>\n </p>\n }\n <p class=\"subtitle\">{{ subtitle }}</p>\n </div>\n</div>\n", styles: [".file-input{display:none}.upload-picture{display:flex;flex-wrap:wrap}.upload-picture .info{display:flex;flex-direction:column;padding:12px 20px;align-items:flex-start}.upload-picture .info .title{font-family:Open Sans,sans-serif;font-weight:700;font-size:.875rem;line-height:150%;color:#333}.upload-picture .info .title .action-title{cursor:pointer;color:#428bca}.upload-picture .info .buttons{display:flex;gap:8px}.upload-picture .info .buttons s-button{margin:0}.upload-picture .info .subtitle{padding:6px 0;font-family:Open Sans,sans-serif;font-weight:400;font-size:.75rem;line-height:150%;color:#697882;text-align:center}.upload-picture--small .info{align-items:center}.upload-picture--small .info .title,.upload-picture--small .info .subtitle{text-align:center}.upload-picture--small .info .buttons{justify-content:center;flex-wrap:wrap}\n"], dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "component", type: i2.ThumbnailComponent, selector: "s-thumbnail", inputs: ["id", "size", "imageSource", "imageFallback", "imageAlt", "iconClass", "hasAction", "actionIconClass", "isTile", "isBrand"] }, { kind: "component", type: i3.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
301
294
  }
302
295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProfilePicturePickerComponent, decorators: [{
303
296
  type: Component,
@@ -308,7 +301,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
308
301
  multi: true,
309
302
  },
310
303
  ], template: "<p-confirmDialog></p-confirmDialog>\n\n<input\n #fileInput\n [accept]=\"accept\"\n class=\"file-input\"\n type=\"file\"\n (change)=\"photoSelected($event)\"\n/>\n<div\n #uploadPicture\n class=\"upload-picture\"\n>\n <s-thumbnail\n #thumbnail\n iconClass=\"far fa-user\"\n [imageSource]=\"imageBase64\"\n [hasAction]=\"!image\"\n (click)=\"selectPhoto()\"\n >\n </s-thumbnail>\n <div\n #info\n class=\"info\"\n >\n @if (image) {\n <div class=\"buttons\">\n <s-button\n [label]=\"changeButtonLabel || 'platform.angular_components.change_photo' | translate\"\n priority=\"primary\"\n (clicked)=\"selectPhoto()\"\n >\n </s-button>\n <s-button\n [label]=\"removeButtonLabel || 'platform.angular_components.remove' | translate\"\n priority=\"secondary\"\n (clicked)=\"removePhoto()\"\n >\n </s-button>\n </div>\n } @else {\n <p class=\"title\">\n {{ simpleTitle || 'platform.angular_components.drag_your_photo_or' | translate }}\n <span\n class=\"action-title\"\n (click)=\"selectPhoto()\"\n >\n {{ actionTitle || 'platform.angular_components.select_a_file' | translate }}\n </span>\n </p>\n }\n <p class=\"subtitle\">{{ subtitle }}</p>\n </div>\n</div>\n", styles: [".file-input{display:none}.upload-picture{display:flex;flex-wrap:wrap}.upload-picture .info{display:flex;flex-direction:column;padding:12px 20px;align-items:flex-start}.upload-picture .info .title{font-family:Open Sans,sans-serif;font-weight:700;font-size:.875rem;line-height:150%;color:#333}.upload-picture .info .title .action-title{cursor:pointer;color:#428bca}.upload-picture .info .buttons{display:flex;gap:8px}.upload-picture .info .buttons s-button{margin:0}.upload-picture .info .subtitle{padding:6px 0;font-family:Open Sans,sans-serif;font-weight:400;font-size:.75rem;line-height:150%;color:#697882;text-align:center}.upload-picture--small .info{align-items:center}.upload-picture--small .info .title,.upload-picture--small .info .subtitle{text-align:center}.upload-picture--small .info .buttons{justify-content:center;flex-wrap:wrap}\n"] }]
311
- }], ctorParameters: () => [{ type: i1.ImageCropperService }, { type: i2.ConfirmationService }, { type: i3.TranslateService }], propDecorators: { simpleTitle: [{
304
+ }], propDecorators: { simpleTitle: [{
312
305
  type: Input
313
306
  }], actionTitle: [{
314
307
  type: Input
@@ -1 +1 @@
1
- {"version":3,"file":"seniorsistemas-angular-components-profile-picture-picker.mjs","sources":["../../projects/angular-components/profile-picture-picker/src/lib/profile-picture-picker/profile-picture-picker.component.ts","../../projects/angular-components/profile-picture-picker/src/lib/profile-picture-picker/profile-picture-picker.component.html","../../projects/angular-components/profile-picture-picker/src/lib/profile-picture-picker/profile-picture-picker.module.ts","../../projects/angular-components/profile-picture-picker/src/lib/profile-picture-picker/validators/validators.ts","../../projects/angular-components/profile-picture-picker/src/seniorsistemas-angular-components-profile-picture-picker.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostListener,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { ConfirmationService } from 'primeng/api';\nimport { ConfirmationTexts, CropperLabelsConfig, FileValidationErrors, ProfilePicturePickerData } from './models/index';\nimport { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\nimport { ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';\n\n/**\n * @description Componente para seleção, edição e remoção de foto de perfil do usuário.\n * Permite ao usuário fazer upload de uma imagem, recortá-la com o {@link ImageCropperService}\n * e confirmar ou remover a foto atual. Implementa {@link ControlValueAccessor} para uso\n * em formulários reativos e template-driven do Angular.\n *\n * @example\n * ```html\n * <s-profile-picture-picker\n * formControlName=\"avatar\"\n * subtitle=\"Formatos aceitos: JPG e PNG\"\n * [maxFileSize]=\"2097152\"\n * accept=\"image/jpeg,image/png\"\n * (imageChange)=\"onImageChange($event)\"\n * (removedImage)=\"onImageRemoved()\" />\n * ```\n *\n * @category Inputs\n */\n@Component({\n selector: 's-profile-picture-picker',\n templateUrl: 'profile-picture-picker.component.html',\n styleUrls: ['profile-picture-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ProfilePicturePickerComponent),\n multi: true,\n },\n ],\n})\nexport class ProfilePicturePickerComponent implements OnInit, ControlValueAccessor {\n /**\n * @description Título simples exibido quando nenhuma imagem está selecionada.\n */\n @Input()\n public simpleTitle!: string;\n\n /**\n * @description Título de ação exibido como label principal do botão de upload.\n */\n @Input()\n public actionTitle!: string;\n\n /**\n * @description Legenda exibida abaixo do título, descrevendo formatos suportados\n * ou outras orientações para o usuário. Campo obrigatório.\n */\n @Input({ required: true })\n public subtitle!: string;\n\n /**\n * @description Proporção (aspect ratio) do recorte da imagem.\n * Por exemplo, `1` para quadrado, `16/9` para widescreen.\n *\n * @default 1\n */\n @Input()\n public aspectRatio = 1;\n\n /**\n * @description Configurações de rótulos exibidos no componente de recorte de imagem (cropper).\n * Permite sobrescrever os textos padrão dos botões e instruções do cropper.\n */\n @Input()\n public cropperLabelsConfig?: CropperLabelsConfig;\n\n /**\n * @description Texto do botão de remoção da foto atual.\n * Se não informado, utiliza o label padrão de remoção.\n */\n @Input()\n public removeButtonLabel?: string;\n\n /**\n * @description Texto do botão de troca da foto atual.\n * Se não informado, utiliza o label padrão de alteração.\n */\n @Input()\n public changeButtonLabel?: string;\n\n /**\n * @description Textos personalizados exibidos no diálogo de confirmação\n * ao remover ou substituir a foto. Permite sobrescrever título, mensagem e botões.\n */\n @Input()\n public confirmationTexts?: ConfirmationTexts;\n\n /**\n * @description Tamanho máximo permitido para o arquivo de imagem, em bytes.\n * Quando o arquivo excede esse limite, o output `invalidFile` é emitido.\n */\n @Input()\n public maxFileSize?: number;\n\n /**\n * @description Tipos MIME aceitos pelo input de arquivo.\n * Exemplo: `\"image/jpeg,image/png\"`.\n */\n @Input()\n public accept?: string;\n\n /**\n * @description Lista de extensões de arquivo aceitas para validação.\n * Exemplo: `['.jpg', '.jpeg', '.png']`.\n *\n * @default []\n */\n @Input()\n public supportedExtensions: string[] = [];\n\n /**\n * @description Imagem atual do componente. Pode ser uma string base64, um objeto\n * {@link ProfilePicturePickerData} com metadados, ou `null` para sem imagem.\n *\n * @default null\n */\n @Input()\n public image: string | ProfilePicturePickerData | null = null;\n\n @ViewChild('uploadPicture')\n public uploadPicture: ElementRef | null = null;\n\n @ViewChild('info')\n public info: ElementRef | null = null;\n\n @ViewChild('thumbnail', { read: ElementRef })\n public thumbnail: ElementRef | null = null;\n\n @ViewChild('fileInput', { read: ElementRef })\n public fileInput: ElementRef | null = null;\n\n /**\n * @deprecated Use `imageChange` em vez deste output.\n * @description Emitido ao selecionar ou recortar uma nova imagem. Emite a string base64 da imagem.\n */\n @Output()\n public changedImage: EventEmitter<string> = new EventEmitter();\n\n /**\n * @description Emitido ao selecionar, recortar ou alterar a imagem.\n * Emite a string base64 ou um objeto {@link ProfilePicturePickerData} com os dados da imagem.\n */\n @Output()\n public imageChange = new EventEmitter<string | ProfilePicturePickerData>();\n\n /**\n * @description Emitido quando o usuário confirma a remoção da foto atual.\n */\n @Output()\n public removedImage = new EventEmitter();\n\n /**\n * @description Emitido quando o arquivo selecionado não passa na validação.\n * Emite um objeto {@link FileValidationErrors} descrevendo os erros encontrados\n * (ex.: tamanho excedido, extensão inválida).\n */\n @Output()\n public invalidFile: EventEmitter<FileValidationErrors> = new EventEmitter();\n\n public get imageBase64(): string {\n return typeof this.image === 'string' ? this.image : (this.image?.base64 ?? '');\n }\n\n private _onChange?: (value: string | ProfilePicturePickerData) => void;\n private _onTouched?: () => void;\n\n constructor(\n private readonly imageCropperService: ImageCropperService,\n private readonly confirmationService: ConfirmationService,\n private readonly translateService: TranslateService,\n ) {}\n\n public writeValue(value: string | ProfilePicturePickerData): void {\n this.image = value;\n }\n\n public registerOnChange(onChange: (value: string | ProfilePicturePickerData) => void): void {\n this._onChange = onChange;\n }\n\n public registerOnTouched(onTouched: () => void): void {\n this._onTouched = onTouched;\n }\n\n public ngOnInit(): void {\n this._normalizeSuportedExtensions();\n }\n\n @HostListener('dragover', ['$event'])\n public onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n @HostListener('dragleave', ['$event'])\n public onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n }\n\n @HostListener('drop', ['$event'])\n public onDrop(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n this._onTouched?.();\n\n const files: File[] = [];\n const dataTransferFiles = event.dataTransfer?.files;\n\n if (!isNullOrUndefined(dataTransferFiles)) {\n for (let i = 0; i < dataTransferFiles?.length; i++) {\n const item = dataTransferFiles.item(i);\n if (!isNullOrUndefined(item)) {\n files.push(item);\n }\n }\n }\n\n this._showImageCropper(files);\n }\n\n // Verificando o redimensionamento para ajustar o design para ficar responsivo.\n @HostListener('window:resize')\n public onResize(): void {\n if (this.uploadPicture && this.info && this.thumbnail) {\n const uploadPictureWidth = this._getWidthElement(this.uploadPicture);\n const infoWidth = this._getWidthElement(this.info);\n const thumbnailWidth = this._getWidthElement(this.thumbnail);\n\n if (thumbnailWidth + infoWidth > uploadPictureWidth) {\n this.uploadPicture.nativeElement.classList.add('upload-picture--small');\n } else {\n this.uploadPicture.nativeElement.classList.remove('upload-picture--small');\n }\n }\n }\n\n public selectPhoto(): void {\n const fileInputElement = this.fileInput?.nativeElement;\n fileInputElement.value = '';\n fileInputElement.click();\n\n this._onTouched?.();\n }\n\n public removePhoto(): void {\n this.confirmationService.confirm({\n message:\n this.confirmationTexts?.removalMessage ??\n this.translateService.instant('platform.angular_components.confirmation_remove_image'),\n acceptLabel:\n this.confirmationTexts?.removalAcceptLabel ??\n this.translateService.instant('platform.angular_components.remove'),\n rejectLabel:\n this.confirmationTexts?.removalRejectLabel ??\n this.translateService.instant('platform.angular_components.cancel'),\n header:\n this.confirmationTexts?.removalHeader ??\n this.translateService.instant('platform.angular_components.remove_image'),\n rejectButtonStyleClass: 'ui-button-secondary',\n accept: () => {\n const fileInputElement = this.fileInput?.nativeElement;\n fileInputElement.value = '';\n this.image = null;\n this.removedImage.emit();\n },\n });\n }\n\n public photoSelected(event: any): void {\n this._showImageCropper(event.srcElement.files);\n }\n\n private _showImageCropper(files: File[]): void {\n if (!this._validateData(files)) {\n return;\n }\n\n const file = files[0];\n\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n fileReader.onloadend = (fileEvent: any) => {\n this.imageCropperService.show({\n imageSource: fileEvent.target.result,\n croppedImage: (image) => {\n this.changedImage.emit(image);\n\n const data: ProfilePicturePickerData = { source: file, base64: image };\n\n // Se o tipo do image for string eu preciso atualizar e mandar para o imageChange uma string.\n // Se for ProfilePicturePickerData eu preciso mandar o data completo.\n if (typeof this.image === 'string') {\n this.image = image;\n this.imageChange.emit(image);\n } else {\n this.image = data;\n this.imageChange.emit(data);\n }\n\n this._onChange?.(this.image);\n },\n changeImage: () => this.selectPhoto(),\n allowSelectAnother: false,\n aspectRatio: this.aspectRatio,\n ...this.cropperLabelsConfig,\n });\n };\n }\n\n private _normalizeSuportedExtensions(): void {\n this.supportedExtensions = this.supportedExtensions?.map((extension) =>\n extension.replace('.', '').toLocaleLowerCase(),\n );\n }\n\n private _validateData(files: File[]): boolean {\n if (!files.length) {\n return false;\n }\n\n if (files.length > 1) {\n this.invalidFile.emit({ file: null, validation: 'maxFileLimit' });\n return false;\n }\n\n const file = files[0];\n\n if (!file.type.includes('image')) {\n this.invalidFile.emit({ file, validation: 'typeInvalid' });\n return false;\n }\n\n if (!this._validateFileExtension(file)) {\n this.invalidFile.emit({ file, validation: 'unsupportedExtension' });\n return false;\n }\n\n if (!this._validateFileSize(file)) {\n this.invalidFile.emit({ file, validation: 'maxFileSize' });\n return false;\n }\n\n return true;\n }\n\n private _validateFileExtension(file: File): boolean {\n if (this.supportedExtensions?.length) {\n const extension = file.name.split('.').pop()?.toLowerCase() ?? '';\n return this.supportedExtensions.includes(extension);\n }\n return true;\n }\n\n private _validateFileSize(file: File): boolean {\n if (this.maxFileSize) {\n return file.size <= this.maxFileSize;\n }\n return true;\n }\n\n private _getWidthElement(element: ElementRef): number {\n const { left, right } = element.nativeElement.getBoundingClientRect();\n return right - left;\n }\n}\n\n","<p-confirmDialog></p-confirmDialog>\n\n<input\n #fileInput\n [accept]=\"accept\"\n class=\"file-input\"\n type=\"file\"\n (change)=\"photoSelected($event)\"\n/>\n<div\n #uploadPicture\n class=\"upload-picture\"\n>\n <s-thumbnail\n #thumbnail\n iconClass=\"far fa-user\"\n [imageSource]=\"imageBase64\"\n [hasAction]=\"!image\"\n (click)=\"selectPhoto()\"\n >\n </s-thumbnail>\n <div\n #info\n class=\"info\"\n >\n @if (image) {\n <div class=\"buttons\">\n <s-button\n [label]=\"changeButtonLabel || 'platform.angular_components.change_photo' | translate\"\n priority=\"primary\"\n (clicked)=\"selectPhoto()\"\n >\n </s-button>\n <s-button\n [label]=\"removeButtonLabel || 'platform.angular_components.remove' | translate\"\n priority=\"secondary\"\n (clicked)=\"removePhoto()\"\n >\n </s-button>\n </div>\n } @else {\n <p class=\"title\">\n {{ simpleTitle || 'platform.angular_components.drag_your_photo_or' | translate }}\n <span\n class=\"action-title\"\n (click)=\"selectPhoto()\"\n >\n {{ actionTitle || 'platform.angular_components.select_a_file' | translate }}\n </span>\n </p>\n }\n <p class=\"subtitle\">{{ subtitle }}</p>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { ConfirmationService } from 'primeng/api';\nimport { ConfirmDialogModule } from 'primeng/confirmdialog';\n\nimport { ThumbnailModule } from '@seniorsistemas/angular-components/thumbnail';\n\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { ProfilePicturePickerComponent } from './profile-picture-picker.component';\nimport { ImageCropperModule, ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';\n\n@NgModule({\n imports: [CommonModule, TranslateModule, ButtonModule, ThumbnailModule, ImageCropperModule, ConfirmDialogModule],\n declarations: [ProfilePicturePickerComponent],\n exports: [ProfilePicturePickerComponent],\n providers: [ImageCropperService, ConfirmationService],\n})\nexport class ProfilePicturePickerModule { }\n","import { AbstractControl, ValidatorFn } from \"@angular/forms\";\n\nconst maxFileSize = (size: number): ValidatorFn => {\n return (control: AbstractControl) => {\n if (control.value?.source?.size > size) {\n return {\n maxFileSize: true,\n };\n }\n\n return null;\n };\n};\n\nconst fileExtension = (extensions: string[]) => {\n return (control: AbstractControl) => {\n if (extensions.length) {\n const extension = control.value?.source?.name?.split(\".\").pop().toLowerCase();\n if (extension?.includes(extension)) {\n return {\n fileExtension: true,\n };\n }\n }\n return null;\n };\n};\n\nexport const Validators = {\n maxFileSize,\n fileExtension,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAmBA;;;;;;;;;;;;;;;;;;AAkBG;MAaU,6BAA6B,CAAA;AAyIjB,IAAA,mBAAA,CAAA;AACA,IAAA,mBAAA,CAAA;AACA,IAAA,gBAAA,CAAA;AA1IrB;;AAEG;AAEI,IAAA,WAAW,CAAU;AAE5B;;AAEG;AAEI,IAAA,WAAW,CAAU;AAE5B;;;AAGG;AAEI,IAAA,QAAQ,CAAU;AAEzB;;;;;AAKG;IAEI,WAAW,GAAG,CAAC,CAAC;AAEvB;;;AAGG;AAEI,IAAA,mBAAmB,CAAuB;AAEjD;;;AAGG;AAEI,IAAA,iBAAiB,CAAU;AAElC;;;AAGG;AAEI,IAAA,iBAAiB,CAAU;AAElC;;;AAGG;AAEI,IAAA,iBAAiB,CAAqB;AAE7C;;;AAGG;AAEI,IAAA,WAAW,CAAU;AAE5B;;;AAGG;AAEI,IAAA,MAAM,CAAU;AAEvB;;;;;AAKG;IAEI,mBAAmB,GAAa,EAAE,CAAC;AAE1C;;;;;AAKG;IAEI,KAAK,GAA6C,IAAI,CAAC;IAGvD,aAAa,GAAsB,IAAI,CAAC;IAGxC,IAAI,GAAsB,IAAI,CAAC;IAG/B,SAAS,GAAsB,IAAI,CAAC;IAGpC,SAAS,GAAsB,IAAI,CAAC;AAE3C;;;AAGG;AAEI,IAAA,YAAY,GAAyB,IAAI,YAAY,EAAE,C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Aa,EAAE,IAAI;iBACtB,CAAC;aACL;SACJ;AACD,QAAA,OAAO,IAAI,CAAC;AAChB,KAAC,CAAC;AACN,CAAC,CAAC;AAEW,MAAA,UAAU,GAAG;IACtB,WAAW;IACX,aAAa;;;AC9BjB;;AAEG;;;;"}
1
+ {"version":3,"file":"seniorsistemas-angular-components-profile-picture-picker.mjs","sources":["../../projects/angular-components/profile-picture-picker/src/lib/profile-picture-picker/profile-picture-picker.component.ts","../../projects/angular-components/profile-picture-picker/src/lib/profile-picture-picker/profile-picture-picker.component.html","../../projects/angular-components/profile-picture-picker/src/lib/profile-picture-picker/profile-picture-picker.module.ts","../../projects/angular-components/profile-picture-picker/src/lib/profile-picture-picker/validators/validators.ts","../../projects/angular-components/profile-picture-picker/src/seniorsistemas-angular-components-profile-picture-picker.ts"],"sourcesContent":["import { Component, ElementRef, EventEmitter, forwardRef, HostListener, Input, OnInit, Output, ViewChild, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { ConfirmationService } from 'primeng/api';\nimport { ConfirmationTexts, CropperLabelsConfig, FileValidationErrors, ProfilePicturePickerData } from './models/index';\nimport { isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\nimport { ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';\n\n/**\n * @description Componente para seleção, edição e remoção de foto de perfil do usuário.\n * Permite ao usuário fazer upload de uma imagem, recortá-la com o {@link ImageCropperService}\n * e confirmar ou remover a foto atual. Implementa {@link ControlValueAccessor} para uso\n * em formulários reativos e template-driven do Angular.\n *\n * @example\n * ```html\n * <s-profile-picture-picker\n * formControlName=\"avatar\"\n * subtitle=\"Formatos aceitos: JPG e PNG\"\n * [maxFileSize]=\"2097152\"\n * accept=\"image/jpeg,image/png\"\n * (imageChange)=\"onImageChange($event)\"\n * (removedImage)=\"onImageRemoved()\" />\n * ```\n *\n * @category Inputs\n */\n@Component({\n selector: 's-profile-picture-picker',\n templateUrl: 'profile-picture-picker.component.html',\n styleUrls: ['profile-picture-picker.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ProfilePicturePickerComponent),\n multi: true,\n },\n ],\n})\nexport class ProfilePicturePickerComponent implements OnInit, ControlValueAccessor {\n private readonly imageCropperService = inject(ImageCropperService);\n private readonly confirmationService = inject(ConfirmationService);\n private readonly translateService = inject(TranslateService);\n\n /**\n * @description Título simples exibido quando nenhuma imagem está selecionada.\n */\n @Input()\n public simpleTitle!: string;\n\n /**\n * @description Título de ação exibido como label principal do botão de upload.\n */\n @Input()\n public actionTitle!: string;\n\n /**\n * @description Legenda exibida abaixo do título, descrevendo formatos suportados\n * ou outras orientações para o usuário. Campo obrigatório.\n */\n @Input({ required: true })\n public subtitle!: string;\n\n /**\n * @description Proporção (aspect ratio) do recorte da imagem.\n * Por exemplo, `1` para quadrado, `16/9` para widescreen.\n *\n * @default 1\n */\n @Input()\n public aspectRatio = 1;\n\n /**\n * @description Configurações de rótulos exibidos no componente de recorte de imagem (cropper).\n * Permite sobrescrever os textos padrão dos botões e instruções do cropper.\n */\n @Input()\n public cropperLabelsConfig?: CropperLabelsConfig;\n\n /**\n * @description Texto do botão de remoção da foto atual.\n * Se não informado, utiliza o label padrão de remoção.\n */\n @Input()\n public removeButtonLabel?: string;\n\n /**\n * @description Texto do botão de troca da foto atual.\n * Se não informado, utiliza o label padrão de alteração.\n */\n @Input()\n public changeButtonLabel?: string;\n\n /**\n * @description Textos personalizados exibidos no diálogo de confirmação\n * ao remover ou substituir a foto. Permite sobrescrever título, mensagem e botões.\n */\n @Input()\n public confirmationTexts?: ConfirmationTexts;\n\n /**\n * @description Tamanho máximo permitido para o arquivo de imagem, em bytes.\n * Quando o arquivo excede esse limite, o output `invalidFile` é emitido.\n */\n @Input()\n public maxFileSize?: number;\n\n /**\n * @description Tipos MIME aceitos pelo input de arquivo.\n * Exemplo: `\"image/jpeg,image/png\"`.\n */\n @Input()\n public accept?: string;\n\n /**\n * @description Lista de extensões de arquivo aceitas para validação.\n * Exemplo: `['.jpg', '.jpeg', '.png']`.\n *\n * @default []\n */\n @Input()\n public supportedExtensions: string[] = [];\n\n /**\n * @description Imagem atual do componente. Pode ser uma string base64, um objeto\n * {@link ProfilePicturePickerData} com metadados, ou `null` para sem imagem.\n *\n * @default null\n */\n @Input()\n public image: string | ProfilePicturePickerData | null = null;\n\n @ViewChild('uploadPicture')\n public uploadPicture: ElementRef | null = null;\n\n @ViewChild('info')\n public info: ElementRef | null = null;\n\n @ViewChild('thumbnail', { read: ElementRef })\n public thumbnail: ElementRef | null = null;\n\n @ViewChild('fileInput', { read: ElementRef })\n public fileInput: ElementRef | null = null;\n\n /**\n * @deprecated Use `imageChange` em vez deste output.\n * @description Emitido ao selecionar ou recortar uma nova imagem. Emite a string base64 da imagem.\n */\n @Output()\n public changedImage: EventEmitter<string> = new EventEmitter();\n\n /**\n * @description Emitido ao selecionar, recortar ou alterar a imagem.\n * Emite a string base64 ou um objeto {@link ProfilePicturePickerData} com os dados da imagem.\n */\n @Output()\n public imageChange = new EventEmitter<string | ProfilePicturePickerData>();\n\n /**\n * @description Emitido quando o usuário confirma a remoção da foto atual.\n */\n @Output()\n public removedImage = new EventEmitter();\n\n /**\n * @description Emitido quando o arquivo selecionado não passa na validação.\n * Emite um objeto {@link FileValidationErrors} descrevendo os erros encontrados\n * (ex.: tamanho excedido, extensão inválida).\n */\n @Output()\n public invalidFile: EventEmitter<FileValidationErrors> = new EventEmitter();\n\n public get imageBase64(): string {\n return typeof this.image === 'string' ? this.image : (this.image?.base64 ?? '');\n }\n\n private _onChange?: (value: string | ProfilePicturePickerData) => void;\n private _onTouched?: () => void;\n\n public writeValue(value: string | ProfilePicturePickerData): void {\n this.image = value;\n }\n\n public registerOnChange(onChange: (value: string | ProfilePicturePickerData) => void): void {\n this._onChange = onChange;\n }\n\n public registerOnTouched(onTouched: () => void): void {\n this._onTouched = onTouched;\n }\n\n public ngOnInit(): void {\n this._normalizeSuportedExtensions();\n }\n\n @HostListener('dragover', ['$event'])\n public onDragOver(event: DragEvent) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n @HostListener('dragleave', ['$event'])\n public onDragLeave(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n }\n\n @HostListener('drop', ['$event'])\n public onDrop(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n this._onTouched?.();\n\n const files: File[] = [];\n const dataTransferFiles = event.dataTransfer?.files;\n\n if (!isNullOrUndefined(dataTransferFiles)) {\n for (let i = 0; i < dataTransferFiles?.length; i++) {\n const item = dataTransferFiles.item(i);\n if (!isNullOrUndefined(item)) {\n files.push(item);\n }\n }\n }\n\n this._showImageCropper(files);\n }\n\n // Verificando o redimensionamento para ajustar o design para ficar responsivo.\n @HostListener('window:resize')\n public onResize(): void {\n if (this.uploadPicture && this.info && this.thumbnail) {\n const uploadPictureWidth = this._getWidthElement(this.uploadPicture);\n const infoWidth = this._getWidthElement(this.info);\n const thumbnailWidth = this._getWidthElement(this.thumbnail);\n\n if (thumbnailWidth + infoWidth > uploadPictureWidth) {\n this.uploadPicture.nativeElement.classList.add('upload-picture--small');\n } else {\n this.uploadPicture.nativeElement.classList.remove('upload-picture--small');\n }\n }\n }\n\n public selectPhoto(): void {\n const fileInputElement = this.fileInput?.nativeElement;\n fileInputElement.value = '';\n fileInputElement.click();\n\n this._onTouched?.();\n }\n\n public removePhoto(): void {\n this.confirmationService.confirm({\n message:\n this.confirmationTexts?.removalMessage ??\n this.translateService.instant('platform.angular_components.confirmation_remove_image'),\n acceptLabel:\n this.confirmationTexts?.removalAcceptLabel ??\n this.translateService.instant('platform.angular_components.remove'),\n rejectLabel:\n this.confirmationTexts?.removalRejectLabel ??\n this.translateService.instant('platform.angular_components.cancel'),\n header:\n this.confirmationTexts?.removalHeader ??\n this.translateService.instant('platform.angular_components.remove_image'),\n rejectButtonStyleClass: 'ui-button-secondary',\n accept: () => {\n const fileInputElement = this.fileInput?.nativeElement;\n fileInputElement.value = '';\n this.image = null;\n this.removedImage.emit();\n },\n });\n }\n\n public photoSelected(event: any): void {\n this._showImageCropper(event.srcElement.files);\n }\n\n private _showImageCropper(files: File[]): void {\n if (!this._validateData(files)) {\n return;\n }\n\n const file = files[0];\n\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n fileReader.onloadend = (fileEvent: any) => {\n this.imageCropperService.show({\n imageSource: fileEvent.target.result,\n croppedImage: (image) => {\n this.changedImage.emit(image);\n\n const data: ProfilePicturePickerData = { source: file, base64: image };\n\n // Se o tipo do image for string eu preciso atualizar e mandar para o imageChange uma string.\n // Se for ProfilePicturePickerData eu preciso mandar o data completo.\n if (typeof this.image === 'string') {\n this.image = image;\n this.imageChange.emit(image);\n } else {\n this.image = data;\n this.imageChange.emit(data);\n }\n\n this._onChange?.(this.image);\n },\n changeImage: () => this.selectPhoto(),\n allowSelectAnother: false,\n aspectRatio: this.aspectRatio,\n ...this.cropperLabelsConfig,\n });\n };\n }\n\n private _normalizeSuportedExtensions(): void {\n this.supportedExtensions = this.supportedExtensions?.map((extension) =>\n extension.replace('.', '').toLocaleLowerCase(),\n );\n }\n\n private _validateData(files: File[]): boolean {\n if (!files.length) {\n return false;\n }\n\n if (files.length > 1) {\n this.invalidFile.emit({ file: null, validation: 'maxFileLimit' });\n return false;\n }\n\n const file = files[0];\n\n if (!file.type.includes('image')) {\n this.invalidFile.emit({ file, validation: 'typeInvalid' });\n return false;\n }\n\n if (!this._validateFileExtension(file)) {\n this.invalidFile.emit({ file, validation: 'unsupportedExtension' });\n return false;\n }\n\n if (!this._validateFileSize(file)) {\n this.invalidFile.emit({ file, validation: 'maxFileSize' });\n return false;\n }\n\n return true;\n }\n\n private _validateFileExtension(file: File): boolean {\n if (this.supportedExtensions?.length) {\n const extension = file.name.split('.').pop()?.toLowerCase() ?? '';\n return this.supportedExtensions.includes(extension);\n }\n return true;\n }\n\n private _validateFileSize(file: File): boolean {\n if (this.maxFileSize) {\n return file.size <= this.maxFileSize;\n }\n return true;\n }\n\n private _getWidthElement(element: ElementRef): number {\n const { left, right } = element.nativeElement.getBoundingClientRect();\n return right - left;\n }\n}\n\n","<p-confirmDialog></p-confirmDialog>\n\n<input\n #fileInput\n [accept]=\"accept\"\n class=\"file-input\"\n type=\"file\"\n (change)=\"photoSelected($event)\"\n/>\n<div\n #uploadPicture\n class=\"upload-picture\"\n>\n <s-thumbnail\n #thumbnail\n iconClass=\"far fa-user\"\n [imageSource]=\"imageBase64\"\n [hasAction]=\"!image\"\n (click)=\"selectPhoto()\"\n >\n </s-thumbnail>\n <div\n #info\n class=\"info\"\n >\n @if (image) {\n <div class=\"buttons\">\n <s-button\n [label]=\"changeButtonLabel || 'platform.angular_components.change_photo' | translate\"\n priority=\"primary\"\n (clicked)=\"selectPhoto()\"\n >\n </s-button>\n <s-button\n [label]=\"removeButtonLabel || 'platform.angular_components.remove' | translate\"\n priority=\"secondary\"\n (clicked)=\"removePhoto()\"\n >\n </s-button>\n </div>\n } @else {\n <p class=\"title\">\n {{ simpleTitle || 'platform.angular_components.drag_your_photo_or' | translate }}\n <span\n class=\"action-title\"\n (click)=\"selectPhoto()\"\n >\n {{ actionTitle || 'platform.angular_components.select_a_file' | translate }}\n </span>\n </p>\n }\n <p class=\"subtitle\">{{ subtitle }}</p>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { ConfirmationService } from 'primeng/api';\nimport { ConfirmDialogModule } from 'primeng/confirmdialog';\n\nimport { ThumbnailModule } from '@seniorsistemas/angular-components/thumbnail';\n\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { ProfilePicturePickerComponent } from './profile-picture-picker.component';\nimport { ImageCropperModule, ImageCropperService } from '@seniorsistemas/angular-components/image-cropper';\n\n@NgModule({\n imports: [CommonModule, TranslateModule, ButtonModule, ThumbnailModule, ImageCropperModule, ConfirmDialogModule],\n declarations: [ProfilePicturePickerComponent],\n exports: [ProfilePicturePickerComponent],\n providers: [ImageCropperService, ConfirmationService],\n})\nexport class ProfilePicturePickerModule { }\n","import { AbstractControl, ValidatorFn } from \"@angular/forms\";\n\nconst maxFileSize = (size: number): ValidatorFn => {\n return (control: AbstractControl) => {\n if (control.value?.source?.size > size) {\n return {\n maxFileSize: true,\n };\n }\n\n return null;\n };\n};\n\nconst fileExtension = (extensions: string[]) => {\n return (control: AbstractControl) => {\n if (extensions.length) {\n const extension = control.value?.source?.name?.split(\".\").pop().toLowerCase();\n if (extension?.includes(extension)) {\n return {\n fileExtension: true,\n };\n }\n }\n return null;\n };\n};\n\nexport const Validators = {\n maxFileSize,\n fileExtension,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;AAkBG;MAaU,6BAA6B,CAAA;AACrB,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAClD,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAClD,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE7D;;AAEG;AAEI,IAAA,WAAW,CAAU;AAE5B;;AAEG;AAEI,IAAA,WAAW,CAAU;AAE5B;;;AAGG;AAEI,IAAA,QAAQ,CAAU;AAEzB;;;;;AAKG;IAEI,WAAW,GAAG,CAAC,CAAC;AAEvB;;;AAGG;AAEI,IAAA,mBAAmB,CAAuB;AAEjD;;;AAGG;AAEI,IAAA,iBAAiB,CAAU;AAElC;;;AAGG;AAEI,IAAA,iBAAiB,CAAU;AAElC;;;AAGG;AAEI,IAAA,iBAAiB,CAAqB;AAE7C;;;AAGG;AAEI,IAAA,WAAW,CAAU;AAE5B;;;AAGG;AAEI,IAAA,MAAM,CAAU;AAEvB;;;;;AAKG;IAEI,mBAAmB,GAAa,EAAE,CAAC;AAE1C;;;;;AA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a;;;AC9BjB;;AAEG;;;;"}
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/common';
2
+ import { inject, Component, Input, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i1 from '@seniorsistemas/angular-components/locale';
5
+ import { LocaleService, LocaleModule } from '@seniorsistemas/angular-components/locale';
6
6
 
7
7
  class ProgressBarDeterminateComponent {
8
- localeService;
8
+ localeService = inject(LocaleService);
9
9
  value;
10
10
  activeColor;
11
11
  numberFormatOptions;
@@ -13,9 +13,6 @@ class ProgressBarDeterminateComponent {
13
13
  targetLabel;
14
14
  showValue = true;
15
15
  numberFormat = new Intl.NumberFormat('pt-BR');
16
- constructor(localeService) {
17
- this.localeService = localeService;
18
- }
19
16
  ngOnInit() {
20
17
  this.validateValues();
21
18
  this.onGetLocale();
@@ -38,13 +35,13 @@ class ProgressBarDeterminateComponent {
38
35
  throw new Error('Invalid value for targetValue');
39
36
  }
40
37
  }
41
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarDeterminateComponent, deps: [{ token: i1.LocaleService }], target: i0.ɵɵFactoryTarget.Component });
42
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ProgressBarDeterminateComponent, selector: "s-progressbar-determinate", inputs: { value: "value", activeColor: "activeColor", numberFormatOptions: "numberFormatOptions", targetValue: "targetValue", targetLabel: "targetLabel", showValue: "showValue" }, ngImport: i0, template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue': activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow',\n }\"\n [ngStyle]=\"{ width: value + '%' }\"\n >\n {{ showValue && value ? numberFormat?.format(value) + '%' : '' }}\n </div>\n </div>\n @if (targetValue) {\n <div\n class=\"target\"\n [ngStyle]=\"{\n left: targetValue <= 50 ? targetValue + '%' : 'unset',\n right: targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start',\n }\"\n >\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat?.format(value) + '%' }}\n </span>\n </div>\n }\n</div>\n", styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{align-items:center;color:#fff;display:flex;font-family:Open Sans,sans-serif;font-size:14px;height:100%;justify-content:center;line-height:150%;-webkit-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{align-items:flex-start;bottom:-38px;display:flex;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:Open Sans,sans-serif;font-size:12px;line-height:150%;padding:2px 12px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
38
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarDeterminateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
39
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ProgressBarDeterminateComponent, selector: "s-progressbar-determinate", inputs: { value: "value", activeColor: "activeColor", numberFormatOptions: "numberFormatOptions", targetValue: "targetValue", targetLabel: "targetLabel", showValue: "showValue" }, ngImport: i0, template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue': activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow',\n }\"\n [ngStyle]=\"{ width: value + '%' }\"\n >\n {{ showValue && value ? numberFormat?.format(value) + '%' : '' }}\n </div>\n </div>\n @if (targetValue) {\n <div\n class=\"target\"\n [ngStyle]=\"{\n left: targetValue <= 50 ? targetValue + '%' : 'unset',\n right: targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start',\n }\"\n >\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat?.format(value) + '%' }}\n </span>\n </div>\n }\n</div>\n", styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{align-items:center;color:#fff;display:flex;font-family:Open Sans,sans-serif;font-size:14px;height:100%;justify-content:center;line-height:150%;-webkit-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{align-items:flex-start;bottom:-38px;display:flex;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:Open Sans,sans-serif;font-size:12px;line-height:150%;padding:2px 12px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
43
40
  }
44
41
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarDeterminateComponent, decorators: [{
45
42
  type: Component,
46
43
  args: [{ selector: 's-progressbar-determinate', template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue': activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow',\n }\"\n [ngStyle]=\"{ width: value + '%' }\"\n >\n {{ showValue && value ? numberFormat?.format(value) + '%' : '' }}\n </div>\n </div>\n @if (targetValue) {\n <div\n class=\"target\"\n [ngStyle]=\"{\n left: targetValue <= 50 ? targetValue + '%' : 'unset',\n right: targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start',\n }\"\n >\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat?.format(value) + '%' }}\n </span>\n </div>\n }\n</div>\n", styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{align-items:center;color:#fff;display:flex;font-family:Open Sans,sans-serif;font-size:14px;height:100%;justify-content:center;line-height:150%;-webkit-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{align-items:flex-start;bottom:-38px;display:flex;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:Open Sans,sans-serif;font-size:12px;line-height:150%;padding:2px 12px}\n"] }]
47
- }], ctorParameters: () => [{ type: i1.LocaleService }], propDecorators: { value: [{
44
+ }], propDecorators: { value: [{
48
45
  type: Input,
49
46
  args: [{ required: true }]
50
47
  }], activeColor: [{
@@ -64,7 +61,7 @@ class ProgressBarIndeterminateComponent {
64
61
  activeColor;
65
62
  label;
66
63
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarIndeterminateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
67
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ProgressBarIndeterminateComponent, selector: "s-progressbar-indeterminate", inputs: { activeColor: "activeColor", label: "label" }, ngImport: i0, template: "<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n @if (label) {\n <span class=\"progressbar-label\">{{ label }}</span>\n }\n</div>\n", styles: [".progressbar-indeterminate{display:flex;flex-direction:column;align-items:center}.progressbar-indeterminate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;margin:8px 0;overflow:hidden;width:100%}.progressbar-indeterminate .indeterminate-bar{animation:indeterminate-progress 5s infinite;background-color:#428bca;height:100%;width:40%}.progressbar-indeterminate .indeterminate-bar--blue{background-color:#428bca}.progressbar-indeterminate .indeterminate-bar--green{background-color:#0c9348}.progressbar-indeterminate .indeterminate-bar--red{background-color:#c13018}.progressbar-indeterminate .indeterminate-bar--yellow{background-color:#fcbf10}.progressbar-indeterminate .progressbar-label{font-family:\"Open Sans\" sans-serif;font-size:12px;line-height:150%;color:#212533}@keyframes indeterminate-progress{0%{transform:translate(-250%)}to{transform:translate(250%)}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
64
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ProgressBarIndeterminateComponent, selector: "s-progressbar-indeterminate", inputs: { activeColor: "activeColor", label: "label" }, ngImport: i0, template: "<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n @if (label) {\n <span class=\"progressbar-label\">{{ label }}</span>\n }\n</div>\n", styles: [".progressbar-indeterminate{display:flex;flex-direction:column;align-items:center}.progressbar-indeterminate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;margin:8px 0;overflow:hidden;width:100%}.progressbar-indeterminate .indeterminate-bar{animation:indeterminate-progress 5s infinite;background-color:#428bca;height:100%;width:40%}.progressbar-indeterminate .indeterminate-bar--blue{background-color:#428bca}.progressbar-indeterminate .indeterminate-bar--green{background-color:#0c9348}.progressbar-indeterminate .indeterminate-bar--red{background-color:#c13018}.progressbar-indeterminate .indeterminate-bar--yellow{background-color:#fcbf10}.progressbar-indeterminate .progressbar-label{font-family:\"Open Sans\" sans-serif;font-size:12px;line-height:150%;color:#212533}@keyframes indeterminate-progress{0%{transform:translate(-250%)}to{transform:translate(250%)}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
68
65
  }
69
66
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarIndeterminateComponent, decorators: [{
70
67
  type: Component,
@@ -182,13 +179,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
182
179
  /* eslint-disable max-len */
183
180
  class ProgressBarModule {
184
181
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
185
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, declarations: [ProgressBarComponent, ProgressBarDeterminateComponent, ProgressBarIndeterminateComponent], imports: [CommonModule], exports: [ProgressBarComponent] });
186
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, imports: [CommonModule] });
182
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, declarations: [ProgressBarComponent, ProgressBarDeterminateComponent, ProgressBarIndeterminateComponent], imports: [CommonModule, LocaleModule], exports: [ProgressBarComponent] });
183
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, imports: [CommonModule, LocaleModule] });
187
184
  }
188
185
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, decorators: [{
189
186
  type: NgModule,
190
187
  args: [{
191
- imports: [CommonModule],
188
+ imports: [CommonModule, LocaleModule],
192
189
  declarations: [ProgressBarComponent, ProgressBarDeterminateComponent, ProgressBarIndeterminateComponent],
193
190
  exports: [ProgressBarComponent],
194
191
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"seniorsistemas-angular-components-progressbar.mjs","sources":["../../projects/angular-components/progressbar/src/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.ts","../../projects/angular-components/progressbar/src/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.html","../../projects/angular-components/progressbar/src/lib/progressbar/components/progressbar-indeterminate/progressbar-indeterminate.component.ts","../../projects/angular-components/progressbar/src/lib/progressbar/components/progressbar-indeterminate/progressbar-indeterminate.component.html","../../projects/angular-components/progressbar/src/lib/progressbar/progressbar.component.ts","../../projects/angular-components/progressbar/src/lib/progressbar/progressbar.component.html","../../projects/angular-components/progressbar/src/lib/progressbar/progressbar.module.ts","../../projects/angular-components/progressbar/src/seniorsistemas-angular-components-progressbar.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\n\nimport { ProgressBarColors } from '../../types';\nimport { LocaleService } from '@seniorsistemas/angular-components/locale';\n\n@Component({\n\tselector: 's-progressbar-determinate',\n\ttemplateUrl: './progressbar-determinate.component.html',\n\tstyleUrls: ['./progressbar-determinate.component.scss'],\n})\nexport class ProgressBarDeterminateComponent implements OnInit {\n\t@Input({ required: true })\n\tpublic value!: number;\n\n\t@Input({ required: true })\n\tpublic activeColor!: ProgressBarColors;\n\n\t@Input()\n\tpublic numberFormatOptions?: Intl.NumberFormatOptions;\n\n\t@Input()\n\tpublic targetValue?: number;\n\n\t@Input()\n\tpublic targetLabel?: string;\n\n\t@Input()\n\tpublic showValue = true;\n\n\tpublic numberFormat?: Intl.NumberFormat = new Intl.NumberFormat('pt-BR');\n\n\tconstructor(private readonly localeService: LocaleService) { }\n\n\tpublic ngOnInit() {\n\t\tthis.validateValues();\n\n\t\tthis.onGetLocale();\n\t}\n\n\tprivate onGetLocale(): void {\n\t\tthis.localeService.getLocale().subscribe({\n\t\t\tnext: (locale) => {\n\t\t\t\tthis.numberFormat = new Intl.NumberFormat(locale ?? 'pt-BR', this.numberFormatOptions);\n\t\t\t},\n\t\t\terror: () => {\n\t\t\t\tthis.numberFormat = new Intl.NumberFormat('pt-BR', this.numberFormatOptions);\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate validateValues(): void {\n\t\tif (this.value < 0 || this.value > 100) {\n\t\t\tthrow new Error('Invalid value for value');\n\t\t}\n\t\tif (this.targetValue && (this.targetValue < 0 || this.targetValue > 100)) {\n\t\t\tthrow new Error('Invalid value for targetValue');\n\t\t}\n\t}\n}\n","<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue': activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow',\n }\"\n [ngStyle]=\"{ width: value + '%' }\"\n >\n {{ showValue && value ? numberFormat?.format(value) + '%' : '' }}\n </div>\n </div>\n @if (targetValue) {\n <div\n class=\"target\"\n [ngStyle]=\"{\n left: targetValue <= 50 ? targetValue + '%' : 'unset',\n right: targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start',\n }\"\n >\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat?.format(value) + '%' }}\n </span>\n </div>\n }\n</div>\n","import { Component, Input } from '@angular/core';\n\nimport { ProgressBarColors } from '../../types';\n\n@Component({\n selector: 's-progressbar-indeterminate',\n templateUrl: './progressbar-indeterminate.component.html',\n styleUrls: ['./progressbar-indeterminate.component.scss'],\n})\nexport class ProgressBarIndeterminateComponent {\n @Input({ required: true })\n public activeColor!: ProgressBarColors;\n\n @Input()\n public label?: string;\n}\n","<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n @if (label) {\n <span class=\"progressbar-label\">{{ label }}</span>\n }\n</div>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { ProgressBarColors, ProgressBarMode } from './types';\n\n/**\n * @description Componente de barra de progresso que representa visualmente o avanço de uma tarefa.\n * Suporta modo determinado (valor percentual) e indeterminado (progresso desconhecido),\n * além de um valor-alvo para comparação.\n *\n * @example\n * ```html\n * <s-progressbar\n * [value]=\"75\"\n * activeColor=\"blue\"\n * label=\"Upload\"\n * [showValue]=\"true\"\n * />\n * ```\n *\n * @category Feedback\n */\n@Component({\n selector: 's-progressbar',\n templateUrl: './progressbar.component.html',\n styleUrls: ['./progressbar.component.scss'],\n})\nexport class ProgressBarComponent implements OnInit {\n /**\n * @description Valor atual do progresso, em percentual (0 a 100).\n * Não utilizado quando `mode` é `'indeterminate'`.\n * Lança erro se o valor estiver fora do intervalo permitido.\n */\n @Input()\n public value!: number;\n\n /**\n * @description Cor ativa da barra de progresso. Campo obrigatório.\n * Valores aceitos: `'blue'`, `'green'`, `'red'`, `'yellow'`.\n */\n @Input({ required: true })\n public activeColor!: ProgressBarColors;\n\n /**\n * @description Opções de formatação numérica utilizadas para exibir o valor percentual.\n * Baseado na API `Intl.NumberFormat`.\n *\n * @default `{ style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 2 }`\n */\n @Input()\n public numberFormatOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n roundingMode: 'trunc',\n };\n\n /**\n * @description Valor-alvo em percentual (0 a 100), exibido como marcador de referência na barra.\n * Não utilizado quando `mode` é `'indeterminate'`.\n */\n @Input()\n public targetValue?: number;\n\n /** @description Rótulo descritivo exibido ao lado da barra de progresso principal. */\n @Input()\n public label?: string;\n\n /** @description Rótulo descritivo exibido ao lado do marcador de valor-alvo. */\n @Input()\n public targetLabel?: string;\n\n /**\n * @description Quando `true`, exibe o valor percentual atual sobre ou próximo da barra.\n *\n * @default true\n */\n @Input()\n public showValue = true;\n\n /**\n * @description Modo de operação da barra de progresso.\n * - `'determinate'`: exibe o progresso baseado em `value` (padrão).\n * - `'indeterminate'`: animação contínua sem valor definido; `value`, `targetValue` e `targetLabel` não devem ser usados.\n *\n * @default 'determinate'\n */\n @Input()\n public mode: ProgressBarMode = 'determinate';\n\n public ngOnInit(): void {\n this.validateInputs();\n }\n\n private validateInputs(): void {\n if (this.value < 0 || this.value > 100) {\n throw new Error('Invalid value for value');\n }\n\n if (this.targetValue && (this.targetValue < 0 || this.targetValue > 100)) {\n throw new Error('Invalid value for targetValue');\n }\n\n if (this.mode === 'indeterminate' && (this.value || this.targetValue || this.targetLabel)) {\n throw new Error(\n 'When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.',\n );\n }\n }\n}\n\n","@if (mode === 'determinate') {\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\"\n >\n </s-progressbar-determinate>\n} @else {\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\"\n >\n </s-progressbar-indeterminate>\n}\n","/* eslint-disable max-len */\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ProgressBarComponent } from './progressbar.component';\nimport { ProgressBarDeterminateComponent } from './components/progressbar-determinate/progressbar-determinate.component';\nimport { ProgressBarIndeterminateComponent } from './components/progressbar-indeterminate/progressbar-indeterminate.component';\n\n@NgModule({\n\timports: [CommonModule],\n\tdeclarations: [ProgressBarComponent, ProgressBarDeterminateComponent, ProgressBarIndeterminateComponent],\n\texports: [ProgressBarComponent],\n})\nexport class ProgressBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i1.ProgressBarDeterminateComponent","i2.ProgressBarIndeterminateComponent"],"mappings":";;;;;;MAUa,+BAA+B,CAAA;AAqBd,IAAA,aAAA,CAAA;AAnBtB,IAAA,KAA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CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"seniorsistemas-angular-components-progressbar.mjs","sources":["../../projects/angular-components/progressbar/src/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.ts","../../projects/angular-components/progressbar/src/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.html","../../projects/angular-components/progressbar/src/lib/progressbar/components/progressbar-indeterminate/progressbar-indeterminate.component.ts","../../projects/angular-components/progressbar/src/lib/progressbar/components/progressbar-indeterminate/progressbar-indeterminate.component.html","../../projects/angular-components/progressbar/src/lib/progressbar/progressbar.component.ts","../../projects/angular-components/progressbar/src/lib/progressbar/progressbar.component.html","../../projects/angular-components/progressbar/src/lib/progressbar/progressbar.module.ts","../../projects/angular-components/progressbar/src/seniorsistemas-angular-components-progressbar.ts"],"sourcesContent":["import { Component, Input, OnInit, inject } from '@angular/core';\n\nimport { ProgressBarColors } from '../../types';\nimport { LocaleService } from '@seniorsistemas/angular-components/locale';\n\n@Component({\n\tselector: 's-progressbar-determinate',\n\ttemplateUrl: './progressbar-determinate.component.html',\n\tstyleUrls: ['./progressbar-determinate.component.scss'],\n})\nexport class ProgressBarDeterminateComponent implements OnInit {\n\tprivate readonly localeService = inject(LocaleService);\n\n\t@Input({ required: true })\n\tpublic value!: number;\n\n\t@Input({ required: true })\n\tpublic activeColor!: ProgressBarColors;\n\n\t@Input()\n\tpublic numberFormatOptions?: Intl.NumberFormatOptions;\n\n\t@Input()\n\tpublic targetValue?: number;\n\n\t@Input()\n\tpublic targetLabel?: string;\n\n\t@Input()\n\tpublic showValue = true;\n\n\tpublic numberFormat?: Intl.NumberFormat = new Intl.NumberFormat('pt-BR');\n\n\tpublic ngOnInit() {\n\t\tthis.validateValues();\n\n\t\tthis.onGetLocale();\n\t}\n\n\tprivate onGetLocale(): void {\n\t\tthis.localeService.getLocale().subscribe({\n\t\t\tnext: (locale) => {\n\t\t\t\tthis.numberFormat = new Intl.NumberFormat(locale ?? 'pt-BR', this.numberFormatOptions);\n\t\t\t},\n\t\t\terror: () => {\n\t\t\t\tthis.numberFormat = new Intl.NumberFormat('pt-BR', this.numberFormatOptions);\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate validateValues(): void {\n\t\tif (this.value < 0 || this.value > 100) {\n\t\t\tthrow new Error('Invalid value for value');\n\t\t}\n\t\tif (this.targetValue && (this.targetValue < 0 || this.targetValue > 100)) {\n\t\t\tthrow new Error('Invalid value for targetValue');\n\t\t}\n\t}\n}\n","<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue': activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow',\n }\"\n [ngStyle]=\"{ width: value + '%' }\"\n >\n {{ showValue && value ? numberFormat?.format(value) + '%' : '' }}\n </div>\n </div>\n @if (targetValue) {\n <div\n class=\"target\"\n [ngStyle]=\"{\n left: targetValue <= 50 ? targetValue + '%' : 'unset',\n right: targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start',\n }\"\n >\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat?.format(value) + '%' }}\n </span>\n </div>\n }\n</div>\n","import { Component, Input } from '@angular/core';\n\nimport { ProgressBarColors } from '../../types';\n\n@Component({\n selector: 's-progressbar-indeterminate',\n templateUrl: './progressbar-indeterminate.component.html',\n styleUrls: ['./progressbar-indeterminate.component.scss'],\n})\nexport class ProgressBarIndeterminateComponent {\n @Input({ required: true })\n public activeColor!: ProgressBarColors;\n\n @Input()\n public label?: string;\n}\n","<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n @if (label) {\n <span class=\"progressbar-label\">{{ label }}</span>\n }\n</div>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { ProgressBarColors, ProgressBarMode } from './types';\n\n/**\n * @description Componente de barra de progresso que representa visualmente o avanço de uma tarefa.\n * Suporta modo determinado (valor percentual) e indeterminado (progresso desconhecido),\n * além de um valor-alvo para comparação.\n *\n * @example\n * ```html\n * <s-progressbar\n * [value]=\"75\"\n * activeColor=\"blue\"\n * label=\"Upload\"\n * [showValue]=\"true\"\n * />\n * ```\n *\n * @category Feedback\n */\n@Component({\n selector: 's-progressbar',\n templateUrl: './progressbar.component.html',\n styleUrls: ['./progressbar.component.scss'],\n})\nexport class ProgressBarComponent implements OnInit {\n /**\n * @description Valor atual do progresso, em percentual (0 a 100).\n * Não utilizado quando `mode` é `'indeterminate'`.\n * Lança erro se o valor estiver fora do intervalo permitido.\n */\n @Input()\n public value!: number;\n\n /**\n * @description Cor ativa da barra de progresso. Campo obrigatório.\n * Valores aceitos: `'blue'`, `'green'`, `'red'`, `'yellow'`.\n */\n @Input({ required: true })\n public activeColor!: ProgressBarColors;\n\n /**\n * @description Opções de formatação numérica utilizadas para exibir o valor percentual.\n * Baseado na API `Intl.NumberFormat`.\n *\n * @default `{ style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 2 }`\n */\n @Input()\n public numberFormatOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n roundingMode: 'trunc',\n };\n\n /**\n * @description Valor-alvo em percentual (0 a 100), exibido como marcador de referência na barra.\n * Não utilizado quando `mode` é `'indeterminate'`.\n */\n @Input()\n public targetValue?: number;\n\n /** @description Rótulo descritivo exibido ao lado da barra de progresso principal. */\n @Input()\n public label?: string;\n\n /** @description Rótulo descritivo exibido ao lado do marcador de valor-alvo. */\n @Input()\n public targetLabel?: string;\n\n /**\n * @description Quando `true`, exibe o valor percentual atual sobre ou próximo da barra.\n *\n * @default true\n */\n @Input()\n public showValue = true;\n\n /**\n * @description Modo de operação da barra de progresso.\n * - `'determinate'`: exibe o progresso baseado em `value` (padrão).\n * - `'indeterminate'`: animação contínua sem valor definido; `value`, `targetValue` e `targetLabel` não devem ser usados.\n *\n * @default 'determinate'\n */\n @Input()\n public mode: ProgressBarMode = 'determinate';\n\n public ngOnInit(): void {\n this.validateInputs();\n }\n\n private validateInputs(): void {\n if (this.value < 0 || this.value > 100) {\n throw new Error('Invalid value for value');\n }\n\n if (this.targetValue && (this.targetValue < 0 || this.targetValue > 100)) {\n throw new Error('Invalid value for targetValue');\n }\n\n if (this.mode === 'indeterminate' && (this.value || this.targetValue || this.targetLabel)) {\n throw new Error(\n 'When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.',\n );\n }\n }\n}\n\n","@if (mode === 'determinate') {\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\"\n >\n </s-progressbar-determinate>\n} @else {\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\"\n >\n </s-progressbar-indeterminate>\n}\n","/* eslint-disable max-len */\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LocaleModule } from '@seniorsistemas/angular-components/locale';\nimport { ProgressBarComponent } from './progressbar.component';\nimport { ProgressBarDeterminateComponent } from './components/progressbar-determinate/progressbar-determinate.component';\nimport { ProgressBarIndeterminateComponent } from './components/progressbar-indeterminate/progressbar-indeterminate.component';\n\n@NgModule({\n\timports: [CommonModule, LocaleModule],\n\tdeclarations: [ProgressBarComponent, ProgressBarDeterminateComponent, ProgressBarIndeterminateComponent],\n\texports: [ProgressBarComponent],\n})\nexport class ProgressBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names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158
158
  useExisting: forwardRef(() => SelectButtonComponent),
159
159
  multi: true,
160
160
  },
161
- ], ngImport: i0, template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n @for(item of items; track item.value; let i = $index) {\n <s-select-button-item\n *ngFor=\"let item of items; index as i\"\n [label]=\"item.label\"\n [active]=\"activeItems.has(item)\"\n [disabled]=\"disabled || (item.disabled ?? false)\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n }\n</div>", styles: [".select-button{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SelectButtonItemComponent, selector: "s-select-button-item", inputs: ["label", "active", "first", "last", "disabled"] }] });
161
+ ], ngImport: i0, template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n @for(item of items; track item.value; let i = $index) {\n <s-select-button-item\n [label]=\"item.label\"\n [active]=\"activeItems.has(item)\"\n [disabled]=\"disabled || (item.disabled ?? false)\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n }\n</div>", styles: [".select-button{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SelectButtonItemComponent, selector: "s-select-button-item", inputs: ["label", "active", "first", "last", "disabled"] }] });
162
162
  }
163
163
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectButtonComponent, decorators: [{
164
164
  type: Component,
@@ -168,7 +168,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
168
168
  useExisting: forwardRef(() => SelectButtonComponent),
169
169
  multi: true,
170
170
  },
171
- ], template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n @for(item of items; track item.value; let i = $index) {\n <s-select-button-item\n *ngFor=\"let item of items; index as i\"\n [label]=\"item.label\"\n [active]=\"activeItems.has(item)\"\n [disabled]=\"disabled || (item.disabled ?? false)\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n }\n</div>", styles: [".select-button{overflow:hidden}\n"] }]
171
+ ], template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n @for(item of items; track item.value; let i = $index) {\n <s-select-button-item\n [label]=\"item.label\"\n [active]=\"activeItems.has(item)\"\n [disabled]=\"disabled || (item.disabled ?? false)\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n }\n</div>", styles: [".select-button{overflow:hidden}\n"] }]
172
172
  }], propDecorators: { items: [{
173
173
  type: Input,
174
174
  args: [{ required: true }]
@@ -1 +1 @@
1
- {"version":3,"file":"seniorsistemas-angular-components-select-button.mjs","sources":["../../projects/angular-components/select-button/src/lib/select-button/components/select-button-item/select-button-item.component.ts","../../projects/angular-components/select-button/src/lib/select-button/components/select-button-item/select-button-item.component.html","../../projects/angular-components/select-button/src/lib/select-button/select-button.component.ts","../../projects/angular-components/select-button/src/lib/select-button/select-button.component.html","../../projects/angular-components/select-button/src/lib/select-button/select-button.module.ts","../../projects/angular-components/select-button/src/seniorsistemas-angular-components-select-button.ts"],"sourcesContent":["import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"s-select-button-item\",\n templateUrl: \"./select-button-item.component.html\",\n styleUrls: [\"./select-button-item.component.scss\"],\n})\nexport class SelectButtonItemComponent {\n @Input({ required: true })\n public label!: string;\n\n @Input()\n public active = false;\n\n @Input()\n public first = false;\n\n @Input()\n public last = false;\n\n @Input()\n public disabled = false;\n}\n","<button\n class=\"select-button-item\"\n [ngClass]=\"{\n 'select-button-item--active': active,\n 'select-button-item--disabled': disabled,\n 'select-button-item--first': first,\n 'select-button-item--last': last\n }\">\n <span class=\"select-button-item__label\">{{ label }}</span>\n</button>","import { Component, EventEmitter, Input, Output, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { SelectButtonItem } from './models/select-button-item';\n\n/**\n * @description Componente de seleção por botões agrupados, onde cada opção é representada\n * visualmente como um botão clicável. Suporta seleção simples e múltipla. Implementa\n * {@link ControlValueAccessor} para integração com formulários Angular.\n *\n * @example\n * ```html\n * <s-select-button\n * formControlName=\"visualizacao\"\n * [items]=\"opcoesVisualizacao\"\n * [multiple]=\"false\"\n * (itemSelected)=\"onVisualizacaoChange($event)\" />\n * ```\n *\n * @category Inputs\n */\n@Component({\n selector: 's-select-button',\n templateUrl: './select-button.component.html',\n styleUrls: ['./select-button.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectButtonComponent),\n multi: true,\n },\n ],\n})\nexport class SelectButtonComponent implements ControlValueAccessor {\n /**\n * @description Lista de itens exibidos como botões de seleção.\n * Cada item pode possuir `label`, `value` e `disabled`. Campo obrigatório.\n */\n @Input({ required: true })\n public items!: SelectButtonItem[];\n\n /**\n * @description Habilita a seleção de múltiplos itens ao mesmo tempo.\n * Quando `false`, apenas um item pode estar ativo por vez.\n *\n * @default false\n */\n @Input()\n public multiple = false;\n\n /**\n * @description Emitido após a seleção de um item, com a lista completa dos itens\n * atualmente selecionados (array de {@link SelectButtonItem}).\n */\n @Output()\n public itemSelected = new EventEmitter<SelectButtonItem[]>();\n\n /**\n * @description Emitido no momento do clique em um item, antes da atualização\n * do estado de seleção. Útil para side-effects imediatos ao clique.\n */\n @Output()\n public itemClicked = new EventEmitter<SelectButtonItem>();\n\n public disabled = false;\n public activeItems = new Set<SelectButtonItem>();\n public onChange?: (value: SelectButtonItem[]) => void;\n public onTouched?: (value: SelectButtonItem[]) => void;\n\n public writeValue(value?: SelectButtonItem | SelectButtonItem[]): void {\n if (!value) {\n return;\n }\n\n this.activeItems.clear();\n\n if (Array.isArray(value)) {\n value.forEach((item: SelectButtonItem) => {\n this.items.forEach((iItem: SelectButtonItem) => {\n if (this._compareItems(item, iItem)) {\n this.activeItems.add(iItem);\n }\n });\n });\n } else {\n this.items.forEach((iItem: SelectButtonItem) => {\n if (this._compareItems(value, iItem)) {\n this.activeItems.add(iItem);\n }\n });\n }\n }\n\n public registerOnChange(onChange: (value: SelectButtonItem[]) => void): void {\n this.onChange = onChange;\n }\n\n public registerOnTouched(onTouched: (value: SelectButtonItem[]) => void): void {\n this.onTouched = onTouched;\n }\n\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n public onItemSelect(item: SelectButtonItem): void {\n if (this.disabled || item.disabled) {\n return;\n }\n\n this.itemClicked.emit(item);\n\n if (!this.multiple) {\n this.activeItems.clear();\n }\n this.activeItems.add(item);\n this.itemSelected.emit([...this.activeItems]);\n\n this.onChange?.([...this.activeItems]);\n this.onTouched?.([...this.activeItems]);\n }\n\n private _compareItems(item1: SelectButtonItem, item2: SelectButtonItem): boolean {\n const _compare = (a: any, b: any): boolean => {\n if (a === b) {\n return true;\n }\n\n if (\n a === undefined ||\n b === undefined ||\n typeof a !== 'object' ||\n a === null ||\n typeof b !== 'object' ||\n b === null\n ) {\n return false;\n }\n\n if (Array.isArray(a) !== Array.isArray(b)) {\n return false;\n }\n\n let keysA = Object.keys(a);\n let keysB = Object.keys(b);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n for (let key of keysA) {\n if (!keysB.includes(key) || !_compare(a[key], b[key])) {\n return false;\n }\n }\n\n for (let key in a) {\n if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {\n return false;\n }\n }\n\n return true;\n };\n\n return _compare(item1, item2);\n }\n}\n\n","<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n @for(item of items; track item.value; let i = $index) {\n <s-select-button-item\n *ngFor=\"let item of items; index as i\"\n [label]=\"item.label\"\n [active]=\"activeItems.has(item)\"\n [disabled]=\"disabled || (item.disabled ?? false)\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n }\n</div>","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { SelectButtonComponent } from \"./select-button.component\";\nimport { SelectButtonItemComponent } from \"./components/select-button-item/select-button-item.component\";\n\n@NgModule({\n imports: [CommonModule],\n declarations: [\n SelectButtonComponent,\n SelectButtonItemComponent,\n ],\n exports: [SelectButtonComponent],\n})\nexport class SelectButtonModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.SelectButtonItemComponent"],"mappings":";;;;;;MAOa,yBAAyB,CAAA;AAE3B,IAAA,KAAK,CAAU;IAGf,MAAM,GAAG,KAAK,CAAC;IAGf,KAAK,GAAG,KAAK,CAAC;IAGd,IAAI,GAAG,KAAK,CAAC;IAGb,QAAQ,GAAG,KAAK,CAAC;wGAdf,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,8JCPtC,8UASS,EAAA,MAAA,EAAA,CAAA,kuBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FDFI,yBAAyB,EAAA,UAAA,EA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C,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE;wBACV,qBAAqB;wBACrB,yBAAyB;AAC5B,qBAAA;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"seniorsistemas-angular-components-select-button.mjs","sources":["../../projects/angular-components/select-button/src/lib/select-button/components/select-button-item/select-button-item.component.ts","../../projects/angular-components/select-button/src/lib/select-button/components/select-button-item/select-button-item.component.html","../../projects/angular-components/select-button/src/lib/select-button/select-button.component.ts","../../projects/angular-components/select-button/src/lib/select-button/select-button.component.html","../../projects/angular-components/select-button/src/lib/select-button/select-button.module.ts","../../projects/angular-components/select-button/src/seniorsistemas-angular-components-select-button.ts"],"sourcesContent":["import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"s-select-button-item\",\n templateUrl: \"./select-button-item.component.html\",\n styleUrls: [\"./select-button-item.component.scss\"],\n})\nexport class SelectButtonItemComponent {\n @Input({ required: true })\n public label!: string;\n\n @Input()\n public active = false;\n\n @Input()\n public first = false;\n\n @Input()\n public last = false;\n\n @Input()\n public disabled = false;\n}\n","<button\n class=\"select-button-item\"\n [ngClass]=\"{\n 'select-button-item--active': active,\n 'select-button-item--disabled': disabled,\n 'select-button-item--first': first,\n 'select-button-item--last': last\n }\">\n <span class=\"select-button-item__label\">{{ label }}</span>\n</button>","import { Component, EventEmitter, Input, Output, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { SelectButtonItem } from './models/select-button-item';\n\n/**\n * @description Componente de seleção por botões agrupados, onde cada opção é representada\n * visualmente como um botão clicável. Suporta seleção simples e múltipla. Implementa\n * {@link ControlValueAccessor} para integração com formulários Angular.\n *\n * @example\n * ```html\n * <s-select-button\n * formControlName=\"visualizacao\"\n * [items]=\"opcoesVisualizacao\"\n * [multiple]=\"false\"\n * (itemSelected)=\"onVisualizacaoChange($event)\" />\n * ```\n *\n * @category Inputs\n */\n@Component({\n selector: 's-select-button',\n templateUrl: './select-button.component.html',\n styleUrls: ['./select-button.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectButtonComponent),\n multi: true,\n },\n ],\n})\nexport class SelectButtonComponent implements ControlValueAccessor {\n /**\n * @description Lista de itens exibidos como botões de seleção.\n * Cada item pode possuir `label`, `value` e `disabled`. Campo obrigatório.\n */\n @Input({ required: true })\n public items!: SelectButtonItem[];\n\n /**\n * @description Habilita a seleção de múltiplos itens ao mesmo tempo.\n * Quando `false`, apenas um item pode estar ativo por vez.\n *\n * @default false\n */\n @Input()\n public multiple = false;\n\n /**\n * @description Emitido após a seleção de um item, com a lista completa dos itens\n * atualmente selecionados (array de {@link SelectButtonItem}).\n */\n @Output()\n public itemSelected = new EventEmitter<SelectButtonItem[]>();\n\n /**\n * @description Emitido no momento do clique em um item, antes da atualização\n * do estado de seleção. Útil para side-effects imediatos ao clique.\n */\n @Output()\n public itemClicked = new EventEmitter<SelectButtonItem>();\n\n public disabled = false;\n public activeItems = new Set<SelectButtonItem>();\n public onChange?: (value: SelectButtonItem[]) => void;\n public onTouched?: (value: SelectButtonItem[]) => void;\n\n public writeValue(value?: SelectButtonItem | SelectButtonItem[]): void {\n if (!value) {\n return;\n }\n\n this.activeItems.clear();\n\n if (Array.isArray(value)) {\n value.forEach((item: SelectButtonItem) => {\n this.items.forEach((iItem: SelectButtonItem) => {\n if (this._compareItems(item, iItem)) {\n this.activeItems.add(iItem);\n }\n });\n });\n } else {\n this.items.forEach((iItem: SelectButtonItem) => {\n if (this._compareItems(value, iItem)) {\n this.activeItems.add(iItem);\n }\n });\n }\n }\n\n public registerOnChange(onChange: (value: SelectButtonItem[]) => void): void {\n this.onChange = onChange;\n }\n\n public registerOnTouched(onTouched: (value: SelectButtonItem[]) => void): void {\n this.onTouched = onTouched;\n }\n\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n public onItemSelect(item: SelectButtonItem): void {\n if (this.disabled || item.disabled) {\n return;\n }\n\n this.itemClicked.emit(item);\n\n if (!this.multiple) {\n this.activeItems.clear();\n }\n this.activeItems.add(item);\n this.itemSelected.emit([...this.activeItems]);\n\n this.onChange?.([...this.activeItems]);\n this.onTouched?.([...this.activeItems]);\n }\n\n private _compareItems(item1: SelectButtonItem, item2: SelectButtonItem): boolean {\n const _compare = (a: any, b: any): boolean => {\n if (a === b) {\n return true;\n }\n\n if (\n a === undefined ||\n b === undefined ||\n typeof a !== 'object' ||\n a === null ||\n typeof b !== 'object' ||\n b === null\n ) {\n return false;\n }\n\n if (Array.isArray(a) !== Array.isArray(b)) {\n return false;\n }\n\n let keysA = Object.keys(a);\n let keysB = Object.keys(b);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n for (let key of keysA) {\n if (!keysB.includes(key) || !_compare(a[key], b[key])) {\n return false;\n }\n }\n\n for (let key in a) {\n if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {\n return false;\n }\n }\n\n return true;\n };\n\n return _compare(item1, item2);\n }\n}\n\n","<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n @for(item of items; track item.value; let i = $index) {\n <s-select-button-item\n [label]=\"item.label\"\n [active]=\"activeItems.has(item)\"\n [disabled]=\"disabled || (item.disabled ?? false)\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n }\n</div>","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { SelectButtonComponent } from \"./select-button.component\";\nimport { SelectButtonItemComponent } from \"./components/select-button-item/select-button-item.component\";\n\n@NgModule({\n imports: [CommonModule],\n declarations: [\n SelectButtonComponent,\n SelectButtonItemComponent,\n ],\n exports: [SelectButtonComponent],\n})\nexport class SelectButtonModule { }","/**\n * Generated bundle index. Do not edit.\n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