@seniorsistemas/angular-components 19.3.0 → 19.3.2

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 (254) 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 +0 -2
  15. package/dynamic-form/dynamic-form/form-field/fields/autocomplete/autocomplete-field.component.d.ts +1 -2
  16. package/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.d.ts +1 -3
  17. package/dynamic-form/dynamic-form/form-field/fields/calendar/calendar-field.component.d.ts +1 -2
  18. package/dynamic-form/dynamic-form/form-field/fields/chips/chips-field.component.d.ts +1 -3
  19. package/dynamic-form/dynamic-form/form-field/fields/country-phone-picker/country-phone-picker-field.component.d.ts +1 -2
  20. package/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.d.ts +1 -3
  21. package/dynamic-form/dynamic-form/form-field/fields/file-picker/file-picker-field.component.d.ts +1 -2
  22. package/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.d.ts +1 -3
  23. package/dynamic-form/dynamic-form/form-field/fields/password/password-field.component.d.ts +1 -2
  24. package/dynamic-form/dynamic-form/form-field/fields/text/text-field.component.d.ts +1 -2
  25. package/dynamic-form/dynamic-form/form-field/fields/text-area/text-area-field.component.d.ts +1 -2
  26. package/empty-state/lib/empty-state/go-back/go-back.component.d.ts +0 -2
  27. package/esm2022/badge/lib/badge/badge.component.mjs +3 -3
  28. package/esm2022/breadcrumb/lib/dynamic-breadcrumb/dynamic-breadcrumb.component.mjs +10 -13
  29. package/esm2022/calendar-mask/lib/calendar-mask/calendar-mask.directive.mjs +7 -11
  30. package/esm2022/chips/lib/chips/chips/chips.component.mjs +5 -8
  31. package/esm2022/code-editor/lib/code-editor/code-editor.component.mjs +6 -9
  32. package/esm2022/code-editor/lib/code-editor/infra/utils/custom-translations/custom-translations.module.mjs +8 -13
  33. package/esm2022/common/lib/svg-factory/svg-factory.directive.mjs +6 -10
  34. package/esm2022/content-generator/lib/content-generator/content-generator.component.mjs +24 -30
  35. package/esm2022/content-generator/lib/services/IAssist/iassist.service.mjs +9 -12
  36. package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.component.mjs +15 -23
  37. package/esm2022/country-phone-picker/lib/country-phone-picker/country-phone-picker.service.mjs +6 -9
  38. package/esm2022/currency/lib/currency.service.mjs +6 -9
  39. package/esm2022/custom-fields/lib/custom-fields/custom-fields.component.mjs +17 -25
  40. package/esm2022/custom-fields/lib/custom-fields/custom-fields.service.mjs +6 -9
  41. package/esm2022/dynamic-form/dynamic-form/components/lookup/lookup.component.mjs +22 -28
  42. package/esm2022/dynamic-form/dynamic-form/form-field/fields/autocomplete/autocomplete-field.component.mjs +6 -10
  43. package/esm2022/dynamic-form/dynamic-form/form-field/fields/bignumber/bignumber-field.component.mjs +12 -17
  44. package/esm2022/dynamic-form/dynamic-form/form-field/fields/calendar/calendar-field.component.mjs +5 -8
  45. package/esm2022/dynamic-form/dynamic-form/form-field/fields/chips/chips-field.component.mjs +12 -17
  46. package/esm2022/dynamic-form/dynamic-form/form-field/fields/country-phone-picker/country-phone-picker-field.component.mjs +5 -8
  47. package/esm2022/dynamic-form/dynamic-form/form-field/fields/currency/currency-field.component.mjs +13 -19
  48. package/esm2022/dynamic-form/dynamic-form/form-field/fields/file-picker/file-picker-field.component.mjs +6 -10
  49. package/esm2022/dynamic-form/dynamic-form/form-field/fields/number/number-field.component.mjs +14 -19
  50. package/esm2022/dynamic-form/dynamic-form/form-field/fields/password/password-field.component.mjs +5 -8
  51. package/esm2022/dynamic-form/dynamic-form/form-field/fields/text/text-field.component.mjs +5 -8
  52. package/esm2022/dynamic-form/dynamic-form/form-field/fields/text-area/text-area-field.component.mjs +5 -8
  53. package/esm2022/empty-state/lib/empty-state/go-back/go-back.component.mjs +8 -11
  54. package/esm2022/file-picker/lib/file-picker/file-picker.component.mjs +17 -21
  55. package/esm2022/gantt/lib/gantt/components/gantt/gantt.mjs +6 -2
  56. package/esm2022/gantt/lib/gantt/gantt.component.mjs +8 -4
  57. package/esm2022/global-search/lib/global-search/global-search.component.mjs +5 -8
  58. package/esm2022/image-cropper/lib/image-cropper/image-cropper.service.mjs +7 -12
  59. package/esm2022/infinite-scroll/lib/infinite-scroll/infinite-scroll.directive.mjs +5 -8
  60. package/esm2022/info-sign/lib/info-sign/info-sign.directive.mjs +6 -10
  61. package/esm2022/inline-edit/lib/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.mjs +9 -12
  62. package/esm2022/inline-edit/lib/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.mjs +14 -17
  63. package/esm2022/inline-edit/lib/inline-edit/components/inline-edit-item/inline-edit-item.component.mjs +12 -15
  64. package/esm2022/insights/lib/insights/components/insights-card/insights-card.component.mjs +15 -19
  65. package/esm2022/interactive-content/lib/interactive-content/interactive-content.directive.mjs +5 -8
  66. package/esm2022/kanban/lib/kanban/components/kanban-column/kanban-column.component.mjs +10 -13
  67. package/esm2022/kanban/lib/kanban/components/kanban-item/kanban-item.component.mjs +10 -13
  68. package/esm2022/kanban/lib/kanban/kanban.component.mjs +23 -17
  69. package/esm2022/loading-state/lib/loading-state/loading-state.directive.mjs +10 -16
  70. package/esm2022/locale/lib/locale/locale.service.mjs +8 -12
  71. package/esm2022/locale/lib/locale/pipes/localized-bignumber.pipe.mjs +6 -9
  72. package/esm2022/locale/lib/locale/pipes/localized-currency.pipe.mjs +6 -9
  73. package/esm2022/locale/lib/locale/pipes/localized-date.pipe.mjs +6 -9
  74. package/esm2022/locale/lib/locale/pipes/localized-number.pipe.mjs +6 -9
  75. package/esm2022/locale/lib/locale/pipes/localized-time.pipe.mjs +6 -9
  76. package/esm2022/localized-number-input/lib/localized-number-input/localized-number-input.directive.mjs +6 -9
  77. package/esm2022/navigation-button/lib/navigation-button/navigation-button.component.mjs +5 -8
  78. package/esm2022/numeric/lib/numeric.pipe.mjs +8 -12
  79. package/esm2022/numeric/lib/numeric.service.mjs +6 -9
  80. package/esm2022/password-strength/lib/password-strength/password-strength.component.mjs +8 -11
  81. package/esm2022/password-strength/lib/password-strength/password-strength.directive.mjs +10 -16
  82. package/esm2022/picklist/lib/picklist/picklist.component.mjs +5 -8
  83. package/esm2022/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.component.mjs +15 -19
  84. package/esm2022/progressbar/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.mjs +8 -11
  85. package/esm2022/progressbar/lib/progressbar/progressbar.module.mjs +5 -4
  86. package/esm2022/select-button/lib/select-button/select-button.component.mjs +3 -3
  87. package/esm2022/shared/lib/accessibility/paginator-accessibility.directive.mjs +8 -13
  88. package/esm2022/shared/lib/accessibility/table-checkbox-accessibility.directive.mjs +5 -8
  89. package/esm2022/slide-in-bar/lib/slide-in-bar/slide-in-bar.component.mjs +9 -12
  90. package/esm2022/speech-recognition/lib/speech-recognition/speech-recognition/speech-recognition.component.mjs +12 -16
  91. package/esm2022/speech-recognition/lib/speech-recognition/speech-recognition.service.mjs +12 -16
  92. package/esm2022/speech-recognition/lib/speech-recognition/text-to-speech.service.mjs +8 -10
  93. package/esm2022/split-button/lib/split-button/split-button.component.mjs +5 -8
  94. package/esm2022/table/lib/table/row-toggler/row-toggler.directive.mjs +7 -7
  95. package/esm2022/table/lib/table/table-column/table-columns.component.mjs +20 -29
  96. package/esm2022/table/lib/table/table-paging/table-paging.component.mjs +9 -16
  97. package/esm2022/table-header/lib/table-header/table-header-checkbox.component.mjs +11 -13
  98. package/esm2022/text-area/lib/text-area/text-area.component.mjs +5 -8
  99. package/esm2022/thumbnail/lib/thumbnail/thumbnail.component.mjs +8 -11
  100. package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu/tiered-menu.component.mjs +16 -24
  101. package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu-item/tiered-menu-item.component.mjs +8 -11
  102. package/esm2022/tiered-menu/lib/tiered-menu/components/tiered-menu-nested/tiered-menu-nested.component.mjs +12 -16
  103. package/esm2022/tiered-menu/lib/tiered-menu/tiered-menu.directive.mjs +13 -25
  104. package/esm2022/toast/lib/toast/toast.service.mjs +7 -12
  105. package/esm2022/tree/lib/tree/components/tree-node-item/tree-node-item.component.mjs +10 -14
  106. package/esm2022/workspace-switch/lib/workspace-switch/workspace-switch.component.mjs +6 -10
  107. package/fesm2022/seniorsistemas-angular-components-badge.mjs +2 -2
  108. package/fesm2022/seniorsistemas-angular-components-badge.mjs.map +1 -1
  109. package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs +10 -12
  110. package/fesm2022/seniorsistemas-angular-components-breadcrumb.mjs.map +1 -1
  111. package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs +6 -10
  112. package/fesm2022/seniorsistemas-angular-components-calendar-mask.mjs.map +1 -1
  113. package/fesm2022/seniorsistemas-angular-components-chips.mjs +4 -7
  114. package/fesm2022/seniorsistemas-angular-components-chips.mjs.map +1 -1
  115. package/fesm2022/seniorsistemas-angular-components-code-editor.mjs +10 -18
  116. package/fesm2022/seniorsistemas-angular-components-code-editor.mjs.map +1 -1
  117. package/fesm2022/seniorsistemas-angular-components-common.mjs +5 -9
  118. package/fesm2022/seniorsistemas-angular-components-common.mjs.map +1 -1
  119. package/fesm2022/seniorsistemas-angular-components-content-generator.mjs +29 -40
  120. package/fesm2022/seniorsistemas-angular-components-content-generator.mjs.map +1 -1
  121. package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs +16 -28
  122. package/fesm2022/seniorsistemas-angular-components-country-phone-picker.mjs.map +1 -1
  123. package/fesm2022/seniorsistemas-angular-components-currency.mjs +5 -8
  124. package/fesm2022/seniorsistemas-angular-components-currency.mjs.map +1 -1
  125. package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs +45 -59
  126. package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs.map +1 -1
  127. package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +108 -157
  128. package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
  129. package/fesm2022/seniorsistemas-angular-components-empty-state.mjs +4 -8
  130. package/fesm2022/seniorsistemas-angular-components-empty-state.mjs.map +1 -1
  131. package/fesm2022/seniorsistemas-angular-components-file-picker.mjs +17 -22
  132. package/fesm2022/seniorsistemas-angular-components-file-picker.mjs.map +1 -1
  133. package/fesm2022/seniorsistemas-angular-components-gantt.mjs +12 -4
  134. package/fesm2022/seniorsistemas-angular-components-gantt.mjs.map +1 -1
  135. package/fesm2022/seniorsistemas-angular-components-global-search.mjs +4 -7
  136. package/fesm2022/seniorsistemas-angular-components-global-search.mjs.map +1 -1
  137. package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs +6 -11
  138. package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs.map +1 -1
  139. package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs +4 -7
  140. package/fesm2022/seniorsistemas-angular-components-infinite-scroll.mjs.map +1 -1
  141. package/fesm2022/seniorsistemas-angular-components-info-sign.mjs +5 -9
  142. package/fesm2022/seniorsistemas-angular-components-info-sign.mjs.map +1 -1
  143. package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs +29 -38
  144. package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs.map +1 -1
  145. package/fesm2022/seniorsistemas-angular-components-insights.mjs +17 -22
  146. package/fesm2022/seniorsistemas-angular-components-insights.mjs.map +1 -1
  147. package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs +4 -7
  148. package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs.map +1 -1
  149. package/fesm2022/seniorsistemas-angular-components-kanban.mjs +30 -30
  150. package/fesm2022/seniorsistemas-angular-components-kanban.mjs.map +1 -1
  151. package/fesm2022/seniorsistemas-angular-components-loading-state.mjs +7 -15
  152. package/fesm2022/seniorsistemas-angular-components-loading-state.mjs.map +1 -1
  153. package/fesm2022/seniorsistemas-angular-components-locale.mjs +22 -41
  154. package/fesm2022/seniorsistemas-angular-components-locale.mjs.map +1 -1
  155. package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs +5 -8
  156. package/fesm2022/seniorsistemas-angular-components-localized-number-input.mjs.map +1 -1
  157. package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs +4 -7
  158. package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs.map +1 -1
  159. package/fesm2022/seniorsistemas-angular-components-numeric.mjs +9 -16
  160. package/fesm2022/seniorsistemas-angular-components-numeric.mjs.map +1 -1
  161. package/fesm2022/seniorsistemas-angular-components-password-strength.mjs +13 -24
  162. package/fesm2022/seniorsistemas-angular-components-password-strength.mjs.map +1 -1
  163. package/fesm2022/seniorsistemas-angular-components-picklist.mjs +4 -7
  164. package/fesm2022/seniorsistemas-angular-components-picklist.mjs.map +1 -1
  165. package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs +14 -21
  166. package/fesm2022/seniorsistemas-angular-components-profile-picture-picker.mjs.map +1 -1
  167. package/fesm2022/seniorsistemas-angular-components-progressbar.mjs +11 -14
  168. package/fesm2022/seniorsistemas-angular-components-progressbar.mjs.map +1 -1
  169. package/fesm2022/seniorsistemas-angular-components-select-button.mjs +2 -2
  170. package/fesm2022/seniorsistemas-angular-components-select-button.mjs.map +1 -1
  171. package/fesm2022/seniorsistemas-angular-components-shared.mjs +10 -18
  172. package/fesm2022/seniorsistemas-angular-components-shared.mjs.map +1 -1
  173. package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs +7 -10
  174. package/fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs.map +1 -1
  175. package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs +23 -34
  176. package/fesm2022/seniorsistemas-angular-components-speech-recognition.mjs.map +1 -1
  177. package/fesm2022/seniorsistemas-angular-components-split-button.mjs +4 -7
  178. package/fesm2022/seniorsistemas-angular-components-split-button.mjs.map +1 -1
  179. package/fesm2022/seniorsistemas-angular-components-table-header.mjs +10 -12
  180. package/fesm2022/seniorsistemas-angular-components-table-header.mjs.map +1 -1
  181. package/fesm2022/seniorsistemas-angular-components-table.mjs +30 -47
  182. package/fesm2022/seniorsistemas-angular-components-table.mjs.map +1 -1
  183. package/fesm2022/seniorsistemas-angular-components-text-area.mjs +4 -7
  184. package/fesm2022/seniorsistemas-angular-components-text-area.mjs.map +1 -1
  185. package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs +6 -9
  186. package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs.map +1 -1
  187. package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs +30 -55
  188. package/fesm2022/seniorsistemas-angular-components-tiered-menu.mjs.map +1 -1
  189. package/fesm2022/seniorsistemas-angular-components-toast.mjs +6 -11
  190. package/fesm2022/seniorsistemas-angular-components-toast.mjs.map +1 -1
  191. package/fesm2022/seniorsistemas-angular-components-tree.mjs +9 -14
  192. package/fesm2022/seniorsistemas-angular-components-tree.mjs.map +1 -1
  193. package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs +5 -9
  194. package/fesm2022/seniorsistemas-angular-components-workspace-switch.mjs.map +1 -1
  195. package/file-picker/lib/file-picker/file-picker.component.d.ts +0 -4
  196. package/file-upload/README.md +9 -37
  197. package/gantt/lib/gantt/gantt.component.d.ts +1 -0
  198. package/global-search/lib/global-search/global-search.component.d.ts +1 -2
  199. package/ia-insight/README.md +17 -0
  200. package/image-cropper/lib/image-cropper/image-cropper.service.d.ts +1 -2
  201. package/infinite-scroll/lib/infinite-scroll/infinite-scroll.directive.d.ts +1 -2
  202. package/info-sign/lib/info-sign/info-sign.directive.d.ts +1 -2
  203. package/inline-edit/lib/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.d.ts +1 -2
  204. package/inline-edit/lib/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.d.ts +0 -2
  205. package/inline-edit/lib/inline-edit/components/inline-edit-item/inline-edit-item.component.d.ts +0 -2
  206. package/insights/lib/insights/components/insights-card/insights-card.component.d.ts +0 -4
  207. package/interactive-content/lib/interactive-content/interactive-content.directive.d.ts +1 -2
  208. package/kanban/lib/kanban/components/kanban-column/kanban-column.component.d.ts +0 -2
  209. package/kanban/lib/kanban/components/kanban-item/kanban-item.component.d.ts +0 -2
  210. package/kanban/lib/kanban/kanban.component.d.ts +2 -2
  211. package/loading-state/lib/loading-state/loading-state.directive.d.ts +1 -2
  212. package/locale/lib/locale/locale.service.d.ts +0 -3
  213. package/locale/lib/locale/pipes/localized-bignumber.pipe.d.ts +0 -2
  214. package/locale/lib/locale/pipes/localized-currency.pipe.d.ts +0 -2
  215. package/locale/lib/locale/pipes/localized-date.pipe.d.ts +0 -2
  216. package/locale/lib/locale/pipes/localized-number.pipe.d.ts +0 -2
  217. package/locale/lib/locale/pipes/localized-time.pipe.d.ts +0 -2
  218. package/localized-number-input/lib/localized-number-input/localized-number-input.directive.d.ts +0 -2
  219. package/navigation-button/lib/navigation-button/navigation-button.component.d.ts +1 -2
  220. package/numeric/lib/numeric.pipe.d.ts +0 -3
  221. package/numeric/lib/numeric.service.d.ts +0 -2
  222. package/package.json +12 -12
  223. package/password-strength/lib/password-strength/password-strength.component.d.ts +0 -2
  224. package/password-strength/lib/password-strength/password-strength.directive.d.ts +1 -2
  225. package/picklist/lib/picklist/picklist.component.d.ts +1 -2
  226. package/product-header/README.md +17 -0
  227. package/profile-picture-picker/lib/profile-picture-picker/profile-picture-picker.component.d.ts +0 -4
  228. package/progressbar/lib/progressbar/components/progressbar-determinate/progressbar-determinate.component.d.ts +0 -2
  229. package/progressbar/lib/progressbar/progressbar.module.d.ts +2 -1
  230. package/shared/lib/accessibility/paginator-accessibility.directive.d.ts +1 -3
  231. package/shared/lib/accessibility/table-checkbox-accessibility.directive.d.ts +1 -2
  232. package/slide-in-bar/lib/slide-in-bar/slide-in-bar.component.d.ts +0 -2
  233. package/speech-recognition/lib/speech-recognition/speech-recognition/speech-recognition.component.d.ts +0 -4
  234. package/speech-recognition/lib/speech-recognition/speech-recognition.service.d.ts +1 -5
  235. package/speech-recognition/lib/speech-recognition/text-to-speech.service.d.ts +1 -3
  236. package/split-button/lib/split-button/split-button.component.d.ts +1 -2
  237. package/table/lib/table/row-toggler/row-toggler.directive.d.ts +1 -1
  238. package/table/lib/table/table-column/table-columns.component.d.ts +2 -6
  239. package/table/lib/table/table-paging/table-paging.component.d.ts +0 -3
  240. package/table-header/lib/table-header/table-header-checkbox.component.d.ts +1 -1
  241. package/text-area/lib/text-area/text-area.component.d.ts +1 -2
  242. package/text-area-ia/README.md +17 -0
  243. package/thumbnail/lib/thumbnail/thumbnail.component.d.ts +0 -2
  244. package/tiered-menu/lib/tiered-menu/components/tiered-menu/tiered-menu.component.d.ts +1 -3
  245. package/tiered-menu/lib/tiered-menu/components/tiered-menu-item/tiered-menu-item.component.d.ts +0 -2
  246. package/tiered-menu/lib/tiered-menu/components/tiered-menu-nested/tiered-menu-nested.component.d.ts +0 -2
  247. package/tiered-menu/lib/tiered-menu/tiered-menu.directive.d.ts +1 -5
  248. package/toast/lib/toast/toast.service.d.ts +0 -2
  249. package/tree/lib/tree/components/tree-node-item/tree-node-item.component.d.ts +1 -3
  250. package/workspace-switch/lib/workspace-switch/workspace-switch.component.d.ts +1 -2
  251. package/confirm-dialog/README.md +0 -226
  252. package/numeric-mask/README.md +0 -395
  253. package/pin-code-field/README.md +0 -366
  254. package/spotlight/README.md +0 -311
@@ -1,7 +1,7 @@
1
- import * as i2 from '@angular/common';
1
+ import * as i1 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, Component, ViewChild, Input, NgModule } from '@angular/core';
4
+ import { Injectable, inject, Component, ViewChild, Input, NgModule } from '@angular/core';
5
5
  import { Subject, from } from 'rxjs';
6
6
  import { takeUntil } from 'rxjs/operators';
7
7
 
@@ -80,7 +80,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
80
80
  * @category Data
81
81
  */
82
82
  class ThumbnailComponent {
83
- thumbnailService;
83
+ thumbnailService = inject(ThumbnailService);
84
84
  static nextId = 0;
85
85
  fallback = false;
86
86
  orientation = 0;
@@ -106,9 +106,6 @@ class ThumbnailComponent {
106
106
  /** @description Aplica estilo de marca ao thumbnail. @default false */
107
107
  isBrand = false;
108
108
  ngUnsubscribe = new Subject();
109
- constructor(thumbnailService) {
110
- this.thumbnailService = thumbnailService;
111
- }
112
109
  ngOnDestroy() {
113
110
  this.ngUnsubscribe.next();
114
111
  this.ngUnsubscribe.complete();
@@ -129,13 +126,13 @@ class ThumbnailComponent {
129
126
  });
130
127
  }
131
128
  }
132
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThumbnailComponent, deps: [{ token: ThumbnailService }], target: i0.ɵɵFactoryTarget.Component });
133
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ThumbnailComponent, selector: "s-thumbnail", inputs: { id: "id", size: "size", imageSource: "imageSource", imageFallback: "imageFallback", imageAlt: "imageAlt", iconClass: "iconClass", hasAction: "hasAction", actionIconClass: "actionIconClass", isTile: "isTile", isBrand: "isBrand" }, viewQueries: [{ propertyName: "imgEl", first: true, predicate: ["img"], descendants: true }], ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{align-items:center;background-color:#ccc;display:flex;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ThumbnailComponent, selector: "s-thumbnail", inputs: { id: "id", size: "size", imageSource: "imageSource", imageFallback: "imageFallback", imageAlt: "imageAlt", iconClass: "iconClass", hasAction: "hasAction", actionIconClass: "actionIconClass", isTile: "isTile", isBrand: "isBrand" }, viewQueries: [{ propertyName: "imgEl", first: true, predicate: ["img"], descendants: true }], ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{align-items:center;background-color:#ccc;display:flex;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
134
131
  }
135
132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThumbnailComponent, decorators: [{
136
133
  type: Component,
137
134
  args: [{ selector: 's-thumbnail', template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{align-items:center;background-color:#ccc;display:flex;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}\n"] }]
138
- }], ctorParameters: () => [{ type: ThumbnailService }], propDecorators: { imgEl: [{
135
+ }], propDecorators: { imgEl: [{
139
136
  type: ViewChild,
140
137
  args: ['img', { static: false }]
141
138
  }], id: [{
@@ -1 +1 @@
1
- {"version":3,"file":"seniorsistemas-angular-components-thumbnail.mjs","sources":["../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.service.ts","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.component.ts","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.component.html","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.module.ts","../../projects/angular-components/thumbnail/src/seniorsistemas-angular-components-thumbnail.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\n\n@Injectable()\nexport class ThumbnailService {\n public getBinaryFile(img: HTMLImageElement) {\n return new Promise(resolve => {\n const getOrientation = this.getOrientation.bind(this);\n\n let http: XMLHttpRequest | null = new XMLHttpRequest();\n http.addEventListener(\"load\", () => {\n if (http?.readyState === 4 && (http.status == 200 || http.status === 0)) {\n const orientation = getOrientation(http.response);\n http = null;\n resolve(orientation);\n }\n });\n\n http.addEventListener(\"error\", () => {\n http = null;\n throw new Error(\"Não foi possível carregar a imagem\");\n });\n\n http.open(\"GET\", img.src, true);\n http.responseType = \"arraybuffer\";\n http.send(null);\n });\n }\n\n /**\n * Retorna a tag da orientação EXIF {-1} Não definido, {-2} Não é formato JPEG, {1, 2, 3, 4, 5, 6, 7, 8} valores da orientação.\n */\n private getOrientation(file: ArrayBuffer): number {\n const view = new DataView(file);\n\n if (view.getUint16(0, false) != 0xffd8) return -2; // not jpeg\n\n const length = view.byteLength;\n let offset = 2;\n\n while (offset < length) {\n const marker = view.getUint16(offset, false);\n offset += 2;\n\n if (marker == 0xffe1) {\n if (view.getUint32((offset += 2), false) != 0x45786966) {\n return -1; // not defined\n }\n const little = view.getUint16((offset += 6), false) == 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n\n for (let i = 0; i < tags; i++)\n if (view.getUint16(offset + i * 12, little) == 0x0112) return view.getUint16(offset + i * 12 + 8, little);\n // tslint:disable-next-line: no-bitwise\n } else if ((marker & 0xff00) != 0xff00) break;\n else offset += view.getUint16(offset, false);\n }\n return -1; // not defined\n }\n}\n","import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild } from '@angular/core';\n\nimport { from, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { ThumbnailSize } from './thumbnail-size';\nimport { ThumbnailService } from './thumbnail.service';\n\n/**\n * @description Componente de miniatura de imagem com suporte a imagem de fallback,\n * ícone de ação sobrepôsto, orientação automática e diferentes tamanhos predefinidos.\n *\n * @example\n * ```html\n * <s-thumbnail\n * [imageSource]=\"urlDaImagem\"\n * size=\"large\"\n * iconClass=\"fas fa-user\" />\n * ```\n *\n * @category Data\n */\n@Component({\n selector: 's-thumbnail',\n templateUrl: './thumbnail.component.html',\n styleUrls: ['./thumbnail.component.scss'],\n})\nexport class ThumbnailComponent implements AfterViewInit, OnDestroy {\n public static nextId = 0;\n public fallback = false;\n public orientation = 0;\n\n @ViewChild('img', { static: false })\n public imgEl: ElementRef | null = null;\n\n /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */\n @Input()\n public id = `s-thumbnail-${ThumbnailComponent.nextId++}`;\n\n /** @description Tamanho da miniatura: `'small'`, `'medium'`, `'large'`, etc. @default 'medium' */\n @Input()\n public size: ThumbnailSize = 'medium';\n\n /** @description URL da imagem principal. */\n @Input()\n public imageSource?: string;\n\n /** @description URL da imagem de fallback exibida quando a principal falha ao carregar. */\n @Input()\n public imageFallback?: string;\n\n /** @description Texto alternativo (atributo `alt`) da imagem. */\n @Input()\n public imageAlt?: string;\n\n /** @description Classe do ícone exibido quando não há imagem disponível. @default 'far fa-image' */\n @Input()\n public iconClass = 'far fa-image';\n\n /** @description Habilita a exibição de um botão de ação sobrepôsto. @default false */\n @Input()\n public hasAction = false;\n\n /** @description Classe do ícone do botão de ação. @default 'fas fa-camera' */\n @Input()\n public actionIconClass = 'fas fa-camera';\n\n /** @description Aplica estilo de tile ao thumbnail. @default false */\n @Input()\n public isTile = false;\n\n /** @description Aplica estilo de marca ao thumbnail. @default false */\n @Input()\n public isBrand = false;\n\n private ngUnsubscribe = new Subject<void>();\n\n constructor(private readonly thumbnailService: ThumbnailService) {}\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n public ngAfterViewInit(): void {\n if (this.imgEl) {\n this.imgEl.nativeElement.addEventListener('load', () => {\n from(this.thumbnailService.getBinaryFile(this.imgEl?.nativeElement))\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((value: unknown) => {\n if (typeof value === 'number') {\n this.orientation = value;\n } else {\n console.error('Valor retornado não é um número:', value);\n }\n });\n });\n }\n }\n}\n\n","<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { ThumbnailComponent } from \"./thumbnail.component\";\nimport { ThumbnailService } from \"./thumbnail.service\";\n\n@NgModule({\n imports: [CommonModule],\n declarations: [ThumbnailComponent],\n exports: [ThumbnailComponent],\n providers: [ThumbnailService],\n})\nexport class ThumbnailModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ThumbnailService"],"mappings":";;;;;;;MAGa,gBAAgB,CAAA;AAClB,IAAA,aAAa,CAAC,GAAqB,EAAA;AACtC,QAAA,OAAO,IAAI,OAAO,CAAC,OAAO,IAAG;YACzB,MAAM,cAAc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sBADd,KAAK;gBAKC,SAAS,EAAA,CAAA;sBADf,KAAK;gBAKC,SAAS,EAAA,CAAA;sBADf,KAAK;gBAKC,eAAe,EAAA,CAAA;sBADrB,KAAK;gBAKC,MAAM,EAAA,CAAA;sBADZ,KAAK;gBAKC,OAAO,EAAA,CAAA;sBADb,KAAK;;;ME5DG,eAAe,CAAA;wGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAJT,YAAA,EAAA,CAAA,kBAAkB,CADvB,EAAA,OAAA,EAAA,CAAA,YAAY,aAEZ,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAGnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAFb,SAAA,EAAA,CAAC,gBAAgB,CAAC,YAHnB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAKb,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,SAAS,EAAE,CAAC,gBAAgB,CAAC;AAChC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"seniorsistemas-angular-components-thumbnail.mjs","sources":["../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.service.ts","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.component.ts","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.component.html","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.module.ts","../../projects/angular-components/thumbnail/src/seniorsistemas-angular-components-thumbnail.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\n\n@Injectable()\nexport class ThumbnailService {\n public getBinaryFile(img: HTMLImageElement) {\n return new Promise(resolve => {\n const getOrientation = this.getOrientation.bind(this);\n\n let http: XMLHttpRequest | null = new XMLHttpRequest();\n http.addEventListener(\"load\", () => {\n if (http?.readyState === 4 && (http.status == 200 || http.status === 0)) {\n const orientation = getOrientation(http.response);\n http = null;\n resolve(orientation);\n }\n });\n\n http.addEventListener(\"error\", () => {\n http = null;\n throw new Error(\"Não foi possível carregar a imagem\");\n });\n\n http.open(\"GET\", img.src, true);\n http.responseType = \"arraybuffer\";\n http.send(null);\n });\n }\n\n /**\n * Retorna a tag da orientação EXIF {-1} Não definido, {-2} Não é formato JPEG, {1, 2, 3, 4, 5, 6, 7, 8} valores da orientação.\n */\n private getOrientation(file: ArrayBuffer): number {\n const view = new DataView(file);\n\n if (view.getUint16(0, false) != 0xffd8) return -2; // not jpeg\n\n const length = view.byteLength;\n let offset = 2;\n\n while (offset < length) {\n const marker = view.getUint16(offset, false);\n offset += 2;\n\n if (marker == 0xffe1) {\n if (view.getUint32((offset += 2), false) != 0x45786966) {\n return -1; // not defined\n }\n const little = view.getUint16((offset += 6), false) == 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n\n for (let i = 0; i < tags; i++)\n if (view.getUint16(offset + i * 12, little) == 0x0112) return view.getUint16(offset + i * 12 + 8, little);\n // tslint:disable-next-line: no-bitwise\n } else if ((marker & 0xff00) != 0xff00) break;\n else offset += view.getUint16(offset, false);\n }\n return -1; // not defined\n }\n}\n","import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild, inject } from '@angular/core';\n\nimport { from, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { ThumbnailSize } from './thumbnail-size';\nimport { ThumbnailService } from './thumbnail.service';\n\n/**\n * @description Componente de miniatura de imagem com suporte a imagem de fallback,\n * ícone de ação sobrepôsto, orientação automática e diferentes tamanhos predefinidos.\n *\n * @example\n * ```html\n * <s-thumbnail\n * [imageSource]=\"urlDaImagem\"\n * size=\"large\"\n * iconClass=\"fas fa-user\" />\n * ```\n *\n * @category Data\n */\n@Component({\n selector: 's-thumbnail',\n templateUrl: './thumbnail.component.html',\n styleUrls: ['./thumbnail.component.scss'],\n})\nexport class ThumbnailComponent implements AfterViewInit, OnDestroy {\n private readonly thumbnailService = inject(ThumbnailService);\n\n public static nextId = 0;\n public fallback = false;\n public orientation = 0;\n\n @ViewChild('img', { static: false })\n public imgEl: ElementRef | null = null;\n\n /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */\n @Input()\n public id = `s-thumbnail-${ThumbnailComponent.nextId++}`;\n\n /** @description Tamanho da miniatura: `'small'`, `'medium'`, `'large'`, etc. @default 'medium' */\n @Input()\n public size: ThumbnailSize = 'medium';\n\n /** @description URL da imagem principal. */\n @Input()\n public imageSource?: string;\n\n /** @description URL da imagem de fallback exibida quando a principal falha ao carregar. */\n @Input()\n public imageFallback?: string;\n\n /** @description Texto alternativo (atributo `alt`) da imagem. */\n @Input()\n public imageAlt?: string;\n\n /** @description Classe do ícone exibido quando não há imagem disponível. @default 'far fa-image' */\n @Input()\n public iconClass = 'far fa-image';\n\n /** @description Habilita a exibição de um botão de ação sobrepôsto. @default false */\n @Input()\n public hasAction = false;\n\n /** @description Classe do ícone do botão de ação. @default 'fas fa-camera' */\n @Input()\n public actionIconClass = 'fas fa-camera';\n\n /** @description Aplica estilo de tile ao thumbnail. @default false */\n @Input()\n public isTile = false;\n\n /** @description Aplica estilo de marca ao thumbnail. @default false */\n @Input()\n public isBrand = false;\n\n private ngUnsubscribe = new Subject<void>();\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n public ngAfterViewInit(): void {\n if (this.imgEl) {\n this.imgEl.nativeElement.addEventListener('load', () => {\n from(this.thumbnailService.getBinaryFile(this.imgEl?.nativeElement))\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((value: unknown) => {\n if (typeof value === 'number') {\n this.orientation = value;\n } else {\n console.error('Valor retornado não é um número:', value);\n }\n });\n });\n }\n }\n}\n\n","<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { ThumbnailComponent } from \"./thumbnail.component\";\nimport { ThumbnailService } from \"./thumbnail.service\";\n\n@NgModule({\n imports: [CommonModule],\n declarations: [ThumbnailComponent],\n exports: [ThumbnailComponent],\n providers: [ThumbnailService],\n})\nexport class ThumbnailModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAGa,gBAAgB,CAAA;AAClB,IAAA,aAAa,CAAC,GAAqB,EAAA;AACtC,QAAA,OAAO,IAAI,OAAO,CAAC,OAAO,IAAG;YACzB,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEtD,YAAA,IAAI,IAAI,GAA0B,IAAI,cAAc,EAAE,CAAC;AACvD,YAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAK;gBAC/B,IAAI,IAAI,EAAE,UAAU,KAAK,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;oBACrE,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAClD,IAAI,GAAG,IAAI,CAAC;oBACZ,OAAO,CAAC,WAAW,CAAC,CAAC;iBACxB;AACL,aA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CAAA,EAAA,CAAA,CAAA;AAGnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAFb,SAAA,EAAA,CAAC,gBAAgB,CAAC,YAHnB,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAKb,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,SAAS,EAAE,CAAC,gBAAgB,CAAC;AAChC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, Input, HostListener, Output, Directive, NgModule } from '@angular/core';
2
+ import { Injectable, EventEmitter, inject, Component, Input, HostListener, ApplicationRef, ComponentFactoryResolver, Injector, ChangeDetectorRef, Output, ElementRef, Directive, NgModule } from '@angular/core';
3
3
  import { Subject } from 'rxjs';
4
4
  import { takeUntil } from 'rxjs/operators';
5
5
  import { disableScroll, enableScroll } from '@seniorsistemas/angular-components/utils';
6
- import * as i3 from '@angular/common';
6
+ import * as i1 from '@angular/common';
7
7
  import { CommonModule } from '@angular/common';
8
8
 
9
9
  class TieredMenuService {
@@ -83,16 +83,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
83
83
  }] });
84
84
 
85
85
  class TieredMenuItemComponent {
86
- _tieredMenuEventService;
86
+ _tieredMenuEventService = inject(TieredMenuEventService);
87
87
  item;
88
88
  focused = false;
89
89
  highlight = false;
90
90
  triggerEvent = 'click';
91
91
  closeOnClick = false;
92
92
  _showTimeout;
93
- constructor(_tieredMenuEventService) {
94
- this._tieredMenuEventService = _tieredMenuEventService;
95
- }
96
93
  onClick() {
97
94
  if (this.item.disabled)
98
95
  return;
@@ -120,13 +117,13 @@ class TieredMenuItemComponent {
120
117
  onMouseLeave() {
121
118
  window.clearTimeout(this._showTimeout);
122
119
  }
123
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuItemComponent, deps: [{ token: TieredMenuEventService }], target: i0.ɵɵFactoryTarget.Component });
124
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TieredMenuItemComponent, selector: "s-tiered-menu-item", inputs: { item: "item", focused: "focused", highlight: "highlight", triggerEvent: "triggerEvent", closeOnClick: "closeOnClick" }, host: { listeners: { "click": "onClick()", "touchend": "onClick()", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0, template: "<div\n [id]=\"item.id\"\n class=\"tiered-menu-item\"\n role=\"menuitem\"\n [tabindex]=\"focused && !item.disabled ? 0 : -1\"\n [attr.aria-disabled]=\"item.disabled || null\"\n [attr.aria-haspopup]=\"item.submenu ? 'menu' : null\"\n [attr.aria-expanded]=\"item.submenu ? item.isOpen : null\"\n [attr.data-key]=\"item.dataKey\"\n [ngClass]=\"{\n 'tiered-menu-item--open': item.isOpen,\n 'tiered-menu-item--focused': focused,\n 'tiered-menu-item--disabled': item.disabled,\n }\"\n>\n <div class=\"tiered-menu-item-content\">\n <span\n class=\"icon\"\n [ngClass]=\"item.iconClass\"\n ></span>\n <span class=\"label\">{{ item.label }}</span>\n </div>\n @if (item.submenu) {\n <span\n class=\"submenu-icon fas\"\n [class.fa-chevron-left]=\"item.isOpen\"\n [class.fa-chevron-right]=\"!item.isOpen\"\n >\n </span>\n }\n</div>\n", styles: [".tiered-menu-item{align-items:center;display:flex;justify-content:space-between;padding:8px 16px;-webkit-user-select:none;user-select:none;cursor:pointer}.tiered-menu-item .tiered-menu-item-content .label{margin:0 12px}.tiered-menu-item:hover{background-color:#e9e6e6}.tiered-menu-item--focused{background-color:#ccc!important}.tiered-menu-item--open{background-color:#e4e2e2}.tiered-menu-item--disabled{opacity:50%;cursor:default}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
121
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TieredMenuItemComponent, selector: "s-tiered-menu-item", inputs: { item: "item", focused: "focused", highlight: "highlight", triggerEvent: "triggerEvent", closeOnClick: "closeOnClick" }, host: { listeners: { "click": "onClick()", "touchend": "onClick()", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0, template: "<div\n [id]=\"item.id\"\n class=\"tiered-menu-item\"\n role=\"menuitem\"\n [tabindex]=\"focused && !item.disabled ? 0 : -1\"\n [attr.aria-disabled]=\"item.disabled || null\"\n [attr.aria-haspopup]=\"item.submenu ? 'menu' : null\"\n [attr.aria-expanded]=\"item.submenu ? item.isOpen : null\"\n [attr.data-key]=\"item.dataKey\"\n [ngClass]=\"{\n 'tiered-menu-item--open': item.isOpen,\n 'tiered-menu-item--focused': focused,\n 'tiered-menu-item--disabled': item.disabled,\n }\"\n>\n <div class=\"tiered-menu-item-content\">\n <span\n class=\"icon\"\n [ngClass]=\"item.iconClass\"\n ></span>\n <span class=\"label\">{{ item.label }}</span>\n </div>\n @if (item.submenu) {\n <span\n class=\"submenu-icon fas\"\n [class.fa-chevron-left]=\"item.isOpen\"\n [class.fa-chevron-right]=\"!item.isOpen\"\n >\n </span>\n }\n</div>\n", styles: [".tiered-menu-item{align-items:center;display:flex;justify-content:space-between;padding:8px 16px;-webkit-user-select:none;user-select:none;cursor:pointer}.tiered-menu-item .tiered-menu-item-content .label{margin:0 12px}.tiered-menu-item:hover{background-color:#e9e6e6}.tiered-menu-item--focused{background-color:#ccc!important}.tiered-menu-item--open{background-color:#e4e2e2}.tiered-menu-item--disabled{opacity:50%;cursor:default}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
125
122
  }
126
123
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuItemComponent, decorators: [{
127
124
  type: Component,
128
125
  args: [{ selector: 's-tiered-menu-item', template: "<div\n [id]=\"item.id\"\n class=\"tiered-menu-item\"\n role=\"menuitem\"\n [tabindex]=\"focused && !item.disabled ? 0 : -1\"\n [attr.aria-disabled]=\"item.disabled || null\"\n [attr.aria-haspopup]=\"item.submenu ? 'menu' : null\"\n [attr.aria-expanded]=\"item.submenu ? item.isOpen : null\"\n [attr.data-key]=\"item.dataKey\"\n [ngClass]=\"{\n 'tiered-menu-item--open': item.isOpen,\n 'tiered-menu-item--focused': focused,\n 'tiered-menu-item--disabled': item.disabled,\n }\"\n>\n <div class=\"tiered-menu-item-content\">\n <span\n class=\"icon\"\n [ngClass]=\"item.iconClass\"\n ></span>\n <span class=\"label\">{{ item.label }}</span>\n </div>\n @if (item.submenu) {\n <span\n class=\"submenu-icon fas\"\n [class.fa-chevron-left]=\"item.isOpen\"\n [class.fa-chevron-right]=\"!item.isOpen\"\n >\n </span>\n }\n</div>\n", styles: [".tiered-menu-item{align-items:center;display:flex;justify-content:space-between;padding:8px 16px;-webkit-user-select:none;user-select:none;cursor:pointer}.tiered-menu-item .tiered-menu-item-content .label{margin:0 12px}.tiered-menu-item:hover{background-color:#e9e6e6}.tiered-menu-item--focused{background-color:#ccc!important}.tiered-menu-item--open{background-color:#e4e2e2}.tiered-menu-item--disabled{opacity:50%;cursor:default}\n"] }]
129
- }], ctorParameters: () => [{ type: TieredMenuEventService }], propDecorators: { item: [{
126
+ }], propDecorators: { item: [{
130
127
  type: Input,
131
128
  args: [{ required: true }]
132
129
  }], focused: [{
@@ -161,8 +158,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
161
158
  }] });
162
159
 
163
160
  class TieredMenuNestedComponent {
164
- tieredMenuService;
165
- _tieredMenuEventService;
161
+ tieredMenuService = inject(TieredMenuService);
162
+ _tieredMenuEventService = inject(TieredMenuEventService);
166
163
  items;
167
164
  top = 0;
168
165
  left = 0;
@@ -205,10 +202,6 @@ class TieredMenuNestedComponent {
205
202
  break;
206
203
  }
207
204
  }
208
- constructor(tieredMenuService, _tieredMenuEventService) {
209
- this.tieredMenuService = tieredMenuService;
210
- this._tieredMenuEventService = _tieredMenuEventService;
211
- }
212
205
  ngOnInit() {
213
206
  this.tieredMenuService.currentItems = this.items;
214
207
  this._subscribeEvents();
@@ -312,13 +305,13 @@ class TieredMenuNestedComponent {
312
305
  }
313
306
  });
314
307
  }
315
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuNestedComponent, deps: [{ token: TieredMenuService }, { token: TieredMenuEventService }], target: i0.ɵɵFactoryTarget.Component });
316
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TieredMenuNestedComponent, selector: "ng-component", host: { listeners: { "window:resize": "onResize()", "document:click": "onDocumentClick($event)", "document:keydown": "onKeydownHandler($event)" } }, ngImport: i0, template: "<div\n class=\"menu menu--nested\"\n [ngStyle]=\"{\n top: top + 'px',\n left: left + 'px',\n }\"\n>\n <ng-container\n *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: items }\"\n ></ng-container>\n</div>\n\n<ng-template\n #itemsTemplate\n let-items\n>\n @for (item of items; track item.id) {\n <div>\n @if (item.visible && !item.divider) {\n <s-tiered-menu-item\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [closeOnClick]=\"true\"\n >\n </s-tiered-menu-item>\n }\n @if (item.divider) {\n <s-tiered-menu-divider></s-tiered-menu-divider>\n }\n @if (item.submenu && item.isOpen) {\n <div>\n <div class=\"submenu\">\n <ng-container\n *ngTemplateOutlet=\"\n itemsTemplate;\n context: { $implicit: item.submenu }\n \"\n ></ng-container>\n </div>\n </div>\n }\n </div>\n }\n</ng-template>\n", styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px #0000001a;display:inline-flex;flex-direction:column;min-width:176px;padding:4px 0;position:absolute;z-index:9999;overflow:auto;width:calc(100vw - 8px)}.menu .submenu{margin-left:24px}\n"], dependencies: [{ kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TieredMenuItemComponent, selector: "s-tiered-menu-item", inputs: ["item", "focused", "highlight", "triggerEvent", "closeOnClick"] }, { kind: "component", type: TieredMenuDividerComponent, selector: "s-tiered-menu-divider" }] });
308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuNestedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
309
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TieredMenuNestedComponent, selector: "ng-component", host: { listeners: { "window:resize": "onResize()", "document:click": "onDocumentClick($event)", "document:keydown": "onKeydownHandler($event)" } }, ngImport: i0, template: "<div\n class=\"menu menu--nested\"\n [ngStyle]=\"{\n top: top + 'px',\n left: left + 'px',\n }\"\n>\n <ng-container\n *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: items }\"\n ></ng-container>\n</div>\n\n<ng-template\n #itemsTemplate\n let-items\n>\n @for (item of items; track item.id) {\n <div>\n @if (item.visible && !item.divider) {\n <s-tiered-menu-item\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [closeOnClick]=\"true\"\n >\n </s-tiered-menu-item>\n }\n @if (item.divider) {\n <s-tiered-menu-divider></s-tiered-menu-divider>\n }\n @if (item.submenu && item.isOpen) {\n <div>\n <div class=\"submenu\">\n <ng-container\n *ngTemplateOutlet=\"\n itemsTemplate;\n context: { $implicit: item.submenu }\n \"\n ></ng-container>\n </div>\n </div>\n }\n </div>\n }\n</ng-template>\n", styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px #0000001a;display:inline-flex;flex-direction:column;min-width:176px;padding:4px 0;position:absolute;z-index:9999;overflow:auto;width:calc(100vw - 8px)}.menu .submenu{margin-left:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TieredMenuItemComponent, selector: "s-tiered-menu-item", inputs: ["item", "focused", "highlight", "triggerEvent", "closeOnClick"] }, { kind: "component", type: TieredMenuDividerComponent, selector: "s-tiered-menu-divider" }] });
317
310
  }
318
311
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuNestedComponent, decorators: [{
319
312
  type: Component,
320
313
  args: [{ template: "<div\n class=\"menu menu--nested\"\n [ngStyle]=\"{\n top: top + 'px',\n left: left + 'px',\n }\"\n>\n <ng-container\n *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: items }\"\n ></ng-container>\n</div>\n\n<ng-template\n #itemsTemplate\n let-items\n>\n @for (item of items; track item.id) {\n <div>\n @if (item.visible && !item.divider) {\n <s-tiered-menu-item\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [closeOnClick]=\"true\"\n >\n </s-tiered-menu-item>\n }\n @if (item.divider) {\n <s-tiered-menu-divider></s-tiered-menu-divider>\n }\n @if (item.submenu && item.isOpen) {\n <div>\n <div class=\"submenu\">\n <ng-container\n *ngTemplateOutlet=\"\n itemsTemplate;\n context: { $implicit: item.submenu }\n \"\n ></ng-container>\n </div>\n </div>\n }\n </div>\n }\n</ng-template>\n", styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px #0000001a;display:inline-flex;flex-direction:column;min-width:176px;padding:4px 0;position:absolute;z-index:9999;overflow:auto;width:calc(100vw - 8px)}.menu .submenu{margin-left:24px}\n"] }]
321
- }], ctorParameters: () => [{ type: TieredMenuService }, { type: TieredMenuEventService }], propDecorators: { onResize: [{
314
+ }], propDecorators: { onResize: [{
322
315
  type: HostListener,
323
316
  args: ['window:resize']
324
317
  }], onDocumentClick: [{
@@ -330,12 +323,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
330
323
  }] } });
331
324
 
332
325
  class TieredMenuComponent {
333
- _appRef;
334
- _componentFactoryResolver;
335
- _injector;
336
- _changeDetectorRef;
337
- tieredMenuService;
338
- _tieredMenuEventService;
326
+ _appRef = inject(ApplicationRef);
327
+ _componentFactoryResolver = inject(ComponentFactoryResolver);
328
+ _injector = inject(Injector);
329
+ _changeDetectorRef = inject(ChangeDetectorRef);
330
+ tieredMenuService = inject(TieredMenuService);
331
+ _tieredMenuEventService = inject(TieredMenuEventService);
339
332
  ariaLabel;
340
333
  items = [];
341
334
  top = 0;
@@ -346,14 +339,6 @@ class TieredMenuComponent {
346
339
  _menuDivElement = null;
347
340
  _unsubscribe$ = new Subject();
348
341
  destroyRequest = new EventEmitter();
349
- constructor(_appRef, _componentFactoryResolver, _injector, _changeDetectorRef, tieredMenuService, _tieredMenuEventService) {
350
- this._appRef = _appRef;
351
- this._componentFactoryResolver = _componentFactoryResolver;
352
- this._injector = _injector;
353
- this._changeDetectorRef = _changeDetectorRef;
354
- this.tieredMenuService = tieredMenuService;
355
- this._tieredMenuEventService = _tieredMenuEventService;
356
- }
357
342
  onResize() {
358
343
  this._tieredMenuEventService.closeAllMenusEvent.emit();
359
344
  }
@@ -630,13 +615,13 @@ class TieredMenuComponent {
630
615
  }
631
616
  });
632
617
  }
633
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuComponent, deps: [{ token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: TieredMenuService }, { token: TieredMenuEventService }], target: i0.ɵɵFactoryTarget.Component });
634
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TieredMenuComponent, selector: "s-tiered-menu", inputs: { ariaLabel: "ariaLabel" }, outputs: { destroyRequest: "destroyRequest" }, host: { listeners: { "window:resize": "onResize()", "document:click": "onDocumentClick($event)", "document:keydown": "onKeydownHandler($event)" } }, ngImport: i0, template: "<div\n class=\"menu\"\n role=\"application\"\n [attr.aria-label]=\"ariaLabel\"\n [ngStyle]=\"{\n left: left + 'px',\n top: top + 'px',\n }\"\n>\n <!-- <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n fieldUtils.triggerEvent=\"hover\"\n [closeOnClick]=\"false\"\n >\n </s-tiered-menu-item>\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n </div> -->\n @for (item of items; track $index) {\n @if (item.visible && !item.divider) {\n <s-tiered-menu-item\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n fieldUtils.triggerEvent=\"hover\"\n [closeOnClick]=\"false\"\n />\n }\n @if (item.divider) {\n <s-tiered-menu-divider />\n }\n }\n</div>\n", styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px #0000001a;display:inline-flex;flex-direction:column;max-height:100vh;min-width:176px;padding:4px 0;overflow-y:auto;position:absolute;z-index:9999}\n"], dependencies: [{ kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TieredMenuItemComponent, selector: "s-tiered-menu-item", inputs: ["item", "focused", "highlight", "triggerEvent", "closeOnClick"] }, { kind: "component", type: TieredMenuDividerComponent, selector: "s-tiered-menu-divider" }] });
618
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
619
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TieredMenuComponent, selector: "s-tiered-menu", inputs: { ariaLabel: "ariaLabel" }, outputs: { destroyRequest: "destroyRequest" }, host: { listeners: { "window:resize": "onResize()", "document:click": "onDocumentClick($event)", "document:keydown": "onKeydownHandler($event)" } }, ngImport: i0, template: "<div\n class=\"menu\"\n role=\"application\"\n [attr.aria-label]=\"ariaLabel\"\n [ngStyle]=\"{\n left: left + 'px',\n top: top + 'px',\n }\"\n>\n <!-- <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n fieldUtils.triggerEvent=\"hover\"\n [closeOnClick]=\"false\"\n >\n </s-tiered-menu-item>\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n </div> -->\n @for (item of items; track $index) {\n @if (item.visible && !item.divider) {\n <s-tiered-menu-item\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n fieldUtils.triggerEvent=\"hover\"\n [closeOnClick]=\"false\"\n />\n }\n @if (item.divider) {\n <s-tiered-menu-divider />\n }\n }\n</div>\n", styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px #0000001a;display:inline-flex;flex-direction:column;max-height:100vh;min-width:176px;padding:4px 0;overflow-y:auto;position:absolute;z-index:9999}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TieredMenuItemComponent, selector: "s-tiered-menu-item", inputs: ["item", "focused", "highlight", "triggerEvent", "closeOnClick"] }, { kind: "component", type: TieredMenuDividerComponent, selector: "s-tiered-menu-divider" }] });
635
620
  }
636
621
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuComponent, decorators: [{
637
622
  type: Component,
638
623
  args: [{ selector: 's-tiered-menu', template: "<div\n class=\"menu\"\n role=\"application\"\n [attr.aria-label]=\"ariaLabel\"\n [ngStyle]=\"{\n left: left + 'px',\n top: top + 'px',\n }\"\n>\n <!-- <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n fieldUtils.triggerEvent=\"hover\"\n [closeOnClick]=\"false\"\n >\n </s-tiered-menu-item>\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n </div> -->\n @for (item of items; track $index) {\n @if (item.visible && !item.divider) {\n <s-tiered-menu-item\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n fieldUtils.triggerEvent=\"hover\"\n [closeOnClick]=\"false\"\n />\n }\n @if (item.divider) {\n <s-tiered-menu-divider />\n }\n }\n</div>\n", styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px #0000001a;display:inline-flex;flex-direction:column;max-height:100vh;min-width:176px;padding:4px 0;overflow-y:auto;position:absolute;z-index:9999}\n"] }]
639
- }], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: TieredMenuService }, { type: TieredMenuEventService }], propDecorators: { ariaLabel: [{
624
+ }], propDecorators: { ariaLabel: [{
640
625
  type: Input
641
626
  }], destroyRequest: [{
642
627
  type: Output
@@ -665,14 +650,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
665
650
  * @category Navegação
666
651
  */
667
652
  class TieredMenuDirective {
668
- _elementRef;
669
- _appRef;
670
- _componentFactoryResolver;
671
- _injector;
672
- _tieredMenuEventService;
673
- _tieredMenuService;
674
- _tieredMenuGlobalService;
675
- _changeDetectorRef;
653
+ _elementRef = inject(ElementRef);
654
+ _appRef = inject(ApplicationRef);
655
+ _componentFactoryResolver = inject(ComponentFactoryResolver);
656
+ _injector = inject(Injector);
657
+ _tieredMenuEventService = inject(TieredMenuEventService);
658
+ _tieredMenuService = inject(TieredMenuService);
659
+ _tieredMenuGlobalService = inject(TieredMenuGlobalService);
660
+ _changeDetectorRef = inject(ChangeDetectorRef);
676
661
  /**
677
662
  * @description Lista de itens exibidos no menu. Cada item pode conter um array de `children`
678
663
  * para criar submenus aninhados, além de propriedades como `label`, `icon`,
@@ -707,16 +692,6 @@ class TieredMenuDirective {
707
692
  this._setMenuPosition();
708
693
  this._componentRef?.hostView.detectChanges();
709
694
  });
710
- constructor(_elementRef, _appRef, _componentFactoryResolver, _injector, _tieredMenuEventService, _tieredMenuService, _tieredMenuGlobalService, _changeDetectorRef) {
711
- this._elementRef = _elementRef;
712
- this._appRef = _appRef;
713
- this._componentFactoryResolver = _componentFactoryResolver;
714
- this._injector = _injector;
715
- this._tieredMenuEventService = _tieredMenuEventService;
716
- this._tieredMenuService = _tieredMenuService;
717
- this._tieredMenuGlobalService = _tieredMenuGlobalService;
718
- this._changeDetectorRef = _changeDetectorRef;
719
- }
720
695
  ngOnInit() {
721
696
  this._itemsAreValid = !!this.items?.length;
722
697
  if (!this._itemsAreValid)
@@ -888,7 +863,7 @@ class TieredMenuDirective {
888
863
  this._tieredMenuService.items.find((i) => i.label === this.focusedItem?.label) ??
889
864
  this._tieredMenuService.items[0];
890
865
  }
891
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuDirective, deps: [{ token: i0.ElementRef }, { token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: TieredMenuEventService }, { token: TieredMenuService }, { token: TieredMenuGlobalService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
866
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
892
867
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: TieredMenuDirective, selector: "[sTieredMenu]", inputs: { items: "items", focusedItem: "focusedItem", triggerEvent: "triggerEvent", ariaLabel: "ariaLabel" }, outputs: { tieredMenuOpened: "tieredMenuOpened", tieredMenuClosed: "tieredMenuClosed" }, host: { listeners: { "click": "onClick($event)" } }, providers: [TieredMenuEventService, TieredMenuService], usesOnChanges: true, ngImport: i0 });
893
868
  }
894
869
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TieredMenuDirective, decorators: [{
@@ -897,7 +872,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
897
872
  selector: '[sTieredMenu]',
898
873
  providers: [TieredMenuEventService, TieredMenuService],
899
874
  }]
900
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: TieredMenuEventService }, { type: TieredMenuService }, { type: TieredMenuGlobalService }, { type: i0.ChangeDetectorRef }], propDecorators: { items: [{
875
+ }], propDecorators: { items: [{
901
876
  type: Input
902
877
  }], focusedItem: [{
903
878
  type: Input