@cauca-911/material 21.0.1-beta.5 → 21.0.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 (240) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -24
  3. package/{src/assets → assets}/i18n/cauca/en-material.json +104 -104
  4. package/{src/assets → assets}/i18n/cauca/es-material.json +104 -104
  5. package/{src/assets → assets}/i18n/cauca/fr-material.json +106 -106
  6. package/fesm2022/cauca-911-material.mjs +4137 -0
  7. package/fesm2022/cauca-911-material.mjs.map +1 -0
  8. package/package.json +17 -2
  9. package/types/cauca-911-material.d.ts +745 -0
  10. package/.eslintrc.json +0 -79
  11. package/README_PACKAGE.md +0 -5
  12. package/karma.conf.js +0 -50
  13. package/ng-package.json +0 -7
  14. package/src/lib/cauca-material.component.html +0 -1
  15. package/src/lib/cauca-material.component.spec.ts +0 -29
  16. package/src/lib/cauca-material.component.ts +0 -12
  17. package/src/lib/cauca-material.service.spec.ts +0 -16
  18. package/src/lib/cauca-material.service.ts +0 -7
  19. package/src/lib/components/button/button.component.html +0 -52
  20. package/src/lib/components/button/button.component.scss +0 -6
  21. package/src/lib/components/button/button.component.spec.ts +0 -142
  22. package/src/lib/components/button/button.component.ts +0 -22
  23. package/src/lib/components/buttons/base-button.ts +0 -35
  24. package/src/lib/components/buttons/basic-button/basic-button.component.html +0 -5
  25. package/src/lib/components/buttons/basic-button/basic-button.component.scss +0 -12
  26. package/src/lib/components/buttons/basic-button/basic-button.component.spec.ts +0 -106
  27. package/src/lib/components/buttons/basic-button/basic-button.component.ts +0 -17
  28. package/src/lib/components/buttons/fab-button/fab-button.component.html +0 -3
  29. package/src/lib/components/buttons/fab-button/fab-button.component.scss +0 -12
  30. package/src/lib/components/buttons/fab-button/fab-button.component.spec.ts +0 -82
  31. package/src/lib/components/buttons/fab-button/fab-button.component.ts +0 -16
  32. package/src/lib/components/buttons/flat-button/flat-button.component.html +0 -5
  33. package/src/lib/components/buttons/flat-button/flat-button.component.scss +0 -12
  34. package/src/lib/components/buttons/flat-button/flat-button.component.spec.ts +0 -106
  35. package/src/lib/components/buttons/flat-button/flat-button.component.ts +0 -17
  36. package/src/lib/components/buttons/icon-button/icon-button.component.html +0 -3
  37. package/src/lib/components/buttons/icon-button/icon-button.component.scss +0 -23
  38. package/src/lib/components/buttons/icon-button/icon-button.component.spec.ts +0 -38
  39. package/src/lib/components/buttons/icon-button/icon-button.component.ts +0 -15
  40. package/src/lib/components/buttons/link-button/link-button.component.html +0 -1
  41. package/src/lib/components/buttons/link-button/link-button.component.scss +0 -3
  42. package/src/lib/components/buttons/link-button/link-button.component.spec.ts +0 -97
  43. package/src/lib/components/buttons/link-button/link-button.component.ts +0 -25
  44. package/src/lib/components/buttons/menu-item/menu-item.component.html +0 -5
  45. package/src/lib/components/buttons/menu-item/menu-item.component.scss +0 -6
  46. package/src/lib/components/buttons/menu-item/menu-item.component.spec.ts +0 -66
  47. package/src/lib/components/buttons/menu-item/menu-item.component.ts +0 -19
  48. package/src/lib/components/buttons/raised-button/raised-button.component.html +0 -5
  49. package/src/lib/components/buttons/raised-button/raised-button.component.scss +0 -12
  50. package/src/lib/components/buttons/raised-button/raised-button.component.spec.ts +0 -108
  51. package/src/lib/components/buttons/raised-button/raised-button.component.ts +0 -17
  52. package/src/lib/components/buttons/refresh-button/refresh-button.component.html +0 -1
  53. package/src/lib/components/buttons/refresh-button/refresh-button.component.scss +0 -0
  54. package/src/lib/components/buttons/refresh-button/refresh-button.component.spec.ts +0 -81
  55. package/src/lib/components/buttons/refresh-button/refresh-button.component.ts +0 -19
  56. package/src/lib/components/buttons/round-button/round-button.component.html +0 -3
  57. package/src/lib/components/buttons/round-button/round-button.component.scss +0 -34
  58. package/src/lib/components/buttons/round-button/round-button.component.spec.ts +0 -26
  59. package/src/lib/components/buttons/round-button/round-button.component.ts +0 -14
  60. package/src/lib/components/buttons/stroked-button/stroked-button.component.html +0 -5
  61. package/src/lib/components/buttons/stroked-button/stroked-button.component.scss +0 -23
  62. package/src/lib/components/buttons/stroked-button/stroked-button.component.spec.ts +0 -114
  63. package/src/lib/components/buttons/stroked-button/stroked-button.component.ts +0 -17
  64. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.html +0 -9
  65. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.scss +0 -7
  66. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.spec.ts +0 -68
  67. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.ts +0 -155
  68. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.html +0 -6
  69. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.scss +0 -25
  70. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.spec.ts +0 -23
  71. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.ts +0 -23
  72. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.html +0 -77
  73. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.scss +0 -124
  74. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.spec.ts +0 -96
  75. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.ts +0 -228
  76. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.html +0 -9
  77. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.scss +0 -15
  78. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.spec.ts +0 -105
  79. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.ts +0 -48
  80. package/src/lib/components/cauca-date-time-picker/models/dialog-date-time-picker-data.ts +0 -29
  81. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.html +0 -14
  82. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.scss +0 -3
  83. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.ts +0 -87
  84. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.html +0 -12
  85. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.scss +0 -3
  86. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.spec.ts +0 -35
  87. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.ts +0 -57
  88. package/src/lib/components/deprecated-components/cauca-menu-vertical/cauca-menu-vertical.component.html +0 -49
  89. package/src/lib/components/deprecated-components/cauca-menu-vertical/cauca-menu-vertical.component.ts +0 -56
  90. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.html +0 -11
  91. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.scss +0 -4
  92. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.spec.ts +0 -39
  93. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.ts +0 -20
  94. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.html +0 -7
  95. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.scss +0 -41
  96. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.spec.ts +0 -24
  97. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.ts +0 -67
  98. package/src/lib/components/deprecated-components/shared/models/menu-item.ts +0 -11
  99. package/src/lib/components/deprecated-components/shared/models/simple-dialog-data.ts +0 -5
  100. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.html +0 -10
  101. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.scss +0 -14
  102. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.spec.ts +0 -90
  103. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.ts +0 -41
  104. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.html +0 -11
  105. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.scss +0 -29
  106. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.spec.ts +0 -137
  107. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.ts +0 -47
  108. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.html +0 -17
  109. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.scss +0 -14
  110. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.spec.ts +0 -96
  111. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.ts +0 -40
  112. package/src/lib/components/dialogs/delete-dialog/models/delete-dialog-data.spec.ts +0 -7
  113. package/src/lib/components/dialogs/delete-dialog/models/delete-dialog-data.ts +0 -5
  114. package/src/lib/components/dialogs/dialog-styles.css +0 -9
  115. package/src/lib/components/dialogs/dialog-styles.scss +0 -9
  116. package/src/lib/components/dialogs/error-dialog/error-dialog.component.html +0 -10
  117. package/src/lib/components/dialogs/error-dialog/error-dialog.component.scss +0 -10
  118. package/src/lib/components/dialogs/error-dialog/error-dialog.component.spec.ts +0 -91
  119. package/src/lib/components/dialogs/error-dialog/error-dialog.component.ts +0 -32
  120. package/src/lib/components/dialogs/services/dialog.service.spec.ts +0 -82
  121. package/src/lib/components/dialogs/services/dialog.service.ts +0 -107
  122. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.html +0 -24
  123. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.scss +0 -22
  124. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.spec.ts +0 -126
  125. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.ts +0 -66
  126. package/src/lib/components/inputs/color-picker/color-picker.component.html +0 -9
  127. package/src/lib/components/inputs/color-picker/color-picker.component.scss +0 -0
  128. package/src/lib/components/inputs/color-picker/color-picker.component.spec.ts +0 -29
  129. package/src/lib/components/inputs/color-picker/color-picker.component.ts +0 -111
  130. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.html +0 -13
  131. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.scss +0 -0
  132. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.spec.ts +0 -80
  133. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.ts +0 -46
  134. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.html +0 -40
  135. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.scss +0 -39
  136. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.spec.ts +0 -135
  137. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.ts +0 -263
  138. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.html +0 -6
  139. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.scss +0 -27
  140. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.spec.ts +0 -90
  141. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.ts +0 -17
  142. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.html +0 -5
  143. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.scss +0 -8
  144. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.spec.ts +0 -98
  145. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.ts +0 -16
  146. package/src/lib/components/inputs/password/password-input/password-input.component.html +0 -11
  147. package/src/lib/components/inputs/password/password-input/password-input.component.scss +0 -12
  148. package/src/lib/components/inputs/password/password-input/password-input.component.spec.ts +0 -141
  149. package/src/lib/components/inputs/password/password-input/password-input.component.ts +0 -67
  150. package/src/lib/components/inputs/password/password-selection/password-selection.component.html +0 -15
  151. package/src/lib/components/inputs/password/password-selection/password-selection.component.scss +0 -32
  152. package/src/lib/components/inputs/password/password-selection/password-selection.component.spec.ts +0 -138
  153. package/src/lib/components/inputs/password/password-selection/password-selection.component.ts +0 -101
  154. package/src/lib/components/inputs/select-with-search/select-with-search.component.html +0 -19
  155. package/src/lib/components/inputs/select-with-search/select-with-search.component.scss +0 -0
  156. package/src/lib/components/inputs/select-with-search/select-with-search.component.spec.ts +0 -215
  157. package/src/lib/components/inputs/select-with-search/select-with-search.component.ts +0 -108
  158. package/src/lib/components/layout/expandable-panel/expandable-panel.component.html +0 -14
  159. package/src/lib/components/layout/expandable-panel/expandable-panel.component.scss +0 -48
  160. package/src/lib/components/layout/expandable-panel/expandable-panel.component.spec.ts +0 -48
  161. package/src/lib/components/layout/expandable-panel/expandable-panel.component.ts +0 -19
  162. package/src/lib/components/layout/group-container/group-container.component.html +0 -6
  163. package/src/lib/components/layout/group-container/group-container.component.scss +0 -22
  164. package/src/lib/components/layout/group-container/group-container.component.spec.ts +0 -34
  165. package/src/lib/components/layout/group-container/group-container.component.ts +0 -14
  166. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.html +0 -13
  167. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.scss +0 -27
  168. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.spec.ts +0 -144
  169. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.ts +0 -52
  170. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.html +0 -4
  171. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.scss +0 -10
  172. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.spec.ts +0 -80
  173. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.ts +0 -28
  174. package/src/lib/components/layout/page-title/page-title.component.html +0 -35
  175. package/src/lib/components/layout/page-title/page-title.component.scss +0 -40
  176. package/src/lib/components/layout/page-title/page-title.component.spec.ts +0 -162
  177. package/src/lib/components/layout/page-title/page-title.component.ts +0 -28
  178. package/src/lib/components/layout/sections/main-section/main-section.component.html +0 -6
  179. package/src/lib/components/layout/sections/main-section/main-section.component.scss +0 -27
  180. package/src/lib/components/layout/sections/main-section/main-section.component.spec.ts +0 -42
  181. package/src/lib/components/layout/sections/main-section/main-section.component.ts +0 -13
  182. package/src/lib/components/layout/sections/section-column/section-column.component.html +0 -3
  183. package/src/lib/components/layout/sections/section-column/section-column.component.scss +0 -18
  184. package/src/lib/components/layout/sections/section-column/section-column.component.spec.ts +0 -35
  185. package/src/lib/components/layout/sections/section-column/section-column.component.ts +0 -12
  186. package/src/lib/components/layout/sections/section-field/section-field.component.html +0 -21
  187. package/src/lib/components/layout/sections/section-field/section-field.component.scss +0 -44
  188. package/src/lib/components/layout/sections/section-field/section-field.component.spec.ts +0 -74
  189. package/src/lib/components/layout/sections/section-field/section-field.component.ts +0 -22
  190. package/src/lib/components/list-paginator/list-paginator.component.html +0 -16
  191. package/src/lib/components/list-paginator/list-paginator.component.scss +0 -46
  192. package/src/lib/components/list-paginator/list-paginator.component.spec.ts +0 -248
  193. package/src/lib/components/list-paginator/list-paginator.component.ts +0 -81
  194. package/src/lib/components/misc/loading-error/loading-error.component.html +0 -11
  195. package/src/lib/components/misc/loading-error/loading-error.component.scss +0 -0
  196. package/src/lib/components/misc/loading-error/loading-error.component.spec.ts +0 -75
  197. package/src/lib/components/misc/loading-error/loading-error.component.ts +0 -18
  198. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.html +0 -3
  199. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.scss +0 -0
  200. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.spec.ts +0 -43
  201. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.ts +0 -16
  202. package/src/lib/components/misc/snack-bar/snack-bar.component.html +0 -16
  203. package/src/lib/components/misc/snack-bar/snack-bar.component.scss +0 -84
  204. package/src/lib/components/misc/snack-bar/snack-bar.component.spec.ts +0 -136
  205. package/src/lib/components/misc/snack-bar/snack-bar.component.ts +0 -39
  206. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.html +0 -11
  207. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.scss +0 -0
  208. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.spec.ts +0 -67
  209. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.ts +0 -15
  210. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.html +0 -11
  211. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.scss +0 -0
  212. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.spec.ts +0 -77
  213. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.ts +0 -17
  214. package/src/lib/components/presenters/badge/badge.component.html +0 -6
  215. package/src/lib/components/presenters/badge/badge.component.scss +0 -10
  216. package/src/lib/components/presenters/badge/badge.component.spec.ts +0 -41
  217. package/src/lib/components/presenters/badge/badge.component.ts +0 -18
  218. package/src/lib/components/presenters/icon/icon.component.scss +0 -9
  219. package/src/lib/components/presenters/icon/icon.component.spec.ts +0 -38
  220. package/src/lib/components/presenters/icon/icon.component.ts +0 -37
  221. package/src/lib/core/breadcrumb.service.spec.ts +0 -35
  222. package/src/lib/core/breadcrumb.service.ts +0 -24
  223. package/src/lib/core/directives/auto-trim-and-lower.directive.spec.ts +0 -22
  224. package/src/lib/core/directives/auto-trim-and-lower.directive.ts +0 -19
  225. package/src/lib/core/directives/form-error/form-error.module.ts +0 -21
  226. package/src/lib/core/directives/form-error/has-error-root.directive.ts +0 -31
  227. package/src/lib/core/directives/form-error/has-error.directive.ts +0 -95
  228. package/src/lib/core/loading-state.service.spec.ts +0 -57
  229. package/src/lib/core/loading-state.service.ts +0 -44
  230. package/src/lib/core/models/breadcrumb-location.ts +0 -6
  231. package/src/lib/core/models/password-validation.ts +0 -20
  232. package/src/lib/core/validators/password/password-validator.spec.ts +0 -155
  233. package/src/lib/core/validators/password/password-validator.ts +0 -30
  234. package/src/lib/provide-cauca-material.ts +0 -10
  235. package/src/public-api.ts +0 -70
  236. package/src/test.ts +0 -17
  237. package/tsconfig.lib.json +0 -18
  238. package/tsconfig.lib.prod.json +0 -4
  239. package/tsconfig.spec.json +0 -17
  240. /package/{src/assets → assets}/images/loading.gif +0 -0
@@ -1,49 +0,0 @@
1
- @for (menu of menuItems; track menu) {
2
- <h4 [class]="menu.activated ? 'selected' : ''">
3
- <div (click)="goTo(menu.path, $event)" class="menu">
4
- @if (menu.icon) {
5
- <div class="menu-icon">
6
- @if (isIconArray(menu.icon)) {
7
- <fa-icon [icon]="menu.icon"></fa-icon>
8
- }
9
- @if (!isIconArray(menu.icon)) {
10
- <img [src]="menu.icon" />
11
- }
12
- </div>
13
- }
14
- @if (menu.label) {
15
- <div class="menu-caption">
16
- <span>{{menu.label | translate}}</span>
17
- </div>
18
- }
19
- </div>
20
- @if (menu.childs.length && menu.activated) {
21
- <div class="submenu">
22
- @for (submenu of menu.childs; track submenu) {
23
- <div
24
- [class]="submenu.activated ? 'menu selected' : 'menu'"
25
- (click)="goTo(submenu.path, $event)">
26
- @if (!submenu.icon) {
27
- <div class="menu-dot">&bull;</div>
28
- }
29
- @if (submenu.icon) {
30
- <div class="menu-icon">
31
- @if (isIconArray(submenu.icon)) {
32
- <fa-icon [icon]="submenu.icon"></fa-icon>
33
- }
34
- @if (!isIconArray(submenu.icon)) {
35
- <img [src]="submenu.icon" />
36
- }
37
- </div>
38
- }
39
- @if (submenu.label) {
40
- <div class="menu-caption">
41
- <span>{{submenu.label | translate}}</span>
42
- </div>
43
- }
44
- </div>
45
- }
46
- </div>
47
- }
48
- </h4>
49
- }
@@ -1,56 +0,0 @@
1
- import { Component, EventEmitter, Input, Output, inject } from '@angular/core';
2
-
3
- import {NavigationEnd, Router} from '@angular/router';
4
- import {MenuItem} from '../shared/models/menu-item';
5
- import { FaIconComponent } from '@fortawesome/angular-fontawesome';
6
- import { TranslateModule } from '@ngx-translate/core';
7
-
8
- @Component({
9
- selector: 'cauca-menu-vertical',
10
- templateUrl: './cauca-menu-vertical.component.html',
11
- styleUrls: ['./cauca-menu-vertical.component.scss'],
12
- imports: [
13
- FaIconComponent,
14
- TranslateModule
15
- ]
16
- })
17
- export class CaucaMenuVerticalComponent {
18
-
19
- @Output() public itemClick = new EventEmitter();
20
- @Input() public menuItems: MenuItem[] = [];
21
-
22
- private readonly router = inject(Router);
23
-
24
- public constructor() {
25
- this.router.events.subscribe((route: NavigationEnd) => {
26
- if (route instanceof NavigationEnd) {
27
- this.selectActiveRoute(route);
28
- }
29
- });
30
- }
31
-
32
- public goTo(path: string, e: any): void {
33
- this.router.navigate([path]);
34
- this.itemClick.emit();
35
-
36
- e.stopPropagation();
37
- }
38
-
39
- public isIconArray(icon: string | string[] | null | undefined): icon is string[] {
40
- return Array.isArray(icon);
41
- }
42
-
43
- private selectActiveRoute(route: NavigationEnd): void {
44
- this.menuItems.forEach((menu: MenuItem) => {
45
- if (route.url) {
46
- menu.activated = (route.url === menu.path || (menu.childs.length && route.url.indexOf(menu.path) > -1));
47
- }
48
-
49
- menu.childs.forEach((subMenu: MenuItem) => {
50
- if (route.url) {
51
- subMenu.activated = (route.url === subMenu.path || route.urlAfterRedirects === subMenu.path);
52
- }
53
- });
54
- });
55
- }
56
- }
@@ -1,11 +0,0 @@
1
- <h1 mat-dialog-title>{{data.title}}</h1>
2
- <div mat-dialog-content>
3
- <div [innerHTML]="data.message"></div>
4
- </div>
5
- @if (data.buttons) {
6
- <div mat-dialog-actions>
7
- @for (label of data.buttons; track label; let i = $index) {
8
- <button mat-raised-button (click)="onClick(i)">{{label}}</button>
9
- }
10
- </div>
11
- }
@@ -1,4 +0,0 @@
1
- div[mat-dialog-actions] {
2
- margin-top: 20px;
3
- text-align: center;
4
- }
@@ -1,39 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import {
3
- MAT_DIALOG_DATA,
4
- MatDialogModule,
5
- MatDialogRef
6
- } from '@angular/material/dialog';
7
- import { CaucaSimpleDialogComponent } from './cauca-simple-dialog.component';
8
-
9
- describe('CaucaSimpleDialogComponent', () => {
10
- let component: CaucaSimpleDialogComponent;
11
- let fixture: ComponentFixture<CaucaSimpleDialogComponent>;
12
-
13
- beforeEach(waitForAsync(() => {
14
- TestBed.configureTestingModule({
15
- imports: [
16
- CaucaSimpleDialogComponent,
17
- MatDialogModule,
18
- ],
19
- providers: [{
20
- provide: MatDialogRef,
21
- useValue: {}
22
- }, {
23
- provide: MAT_DIALOG_DATA,
24
- useValue: {}
25
- }]
26
- })
27
- .compileComponents();
28
- }));
29
-
30
- beforeEach(() => {
31
- fixture = TestBed.createComponent(CaucaSimpleDialogComponent);
32
- component = fixture.componentInstance;
33
- fixture.detectChanges();
34
- });
35
-
36
- it('should create', () => {
37
- expect(component).toBeTruthy();
38
- });
39
- });
@@ -1,20 +0,0 @@
1
- import { Component, inject } from '@angular/core';
2
-
3
- import { MAT_DIALOG_DATA, MatDialogActions, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';
4
- import { SimpleDialogData } from '../shared/models/simple-dialog-data';
5
- import { MatButtonModule } from '@angular/material/button';
6
-
7
- @Component({
8
- selector: 'cauca-simple-dialog',
9
- templateUrl: './cauca-simple-dialog.component.html',
10
- styleUrls: ['./cauca-simple-dialog.component.scss'],
11
- imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatButtonModule]
12
- })
13
- export class CaucaSimpleDialogComponent{
14
- public readonly data = inject<SimpleDialogData>(MAT_DIALOG_DATA);
15
- private readonly dialogRef = inject<MatDialogRef<CaucaSimpleDialogComponent>>(MatDialogRef);
16
-
17
- public onClick(buttonIndex: number): void {
18
- this.dialogRef.close(buttonIndex);
19
- }
20
- }
@@ -1,7 +0,0 @@
1
- <div #container class="slideshow">
2
- @for (url of images; track url; let index = $index) {
3
- <div [class.active]="index === selectedIndex" [class.entering]="states[index] === 'in'" [class.leaving]="states[index] === 'out'">
4
- <img [src]="url" />
5
- </div>
6
- }
7
- </div>
@@ -1,41 +0,0 @@
1
- .slideshow {
2
- margin: 0 auto;
3
- position: relative;
4
- overflow: hidden;
5
- }
6
-
7
- .slideshow > div {
8
- width: 100%;
9
- height: 100%;
10
- position: absolute;
11
- transition: transform 500ms ease-in, opacity 500ms ease-in;
12
-
13
- /* Default state - off-screen to the right, ready to enter */
14
- transform: translateX(100%);
15
- opacity: 0;
16
-
17
- &.active {
18
- /* Active slide - centered */
19
- transform: translateX(0%);
20
- opacity: 1;
21
- }
22
-
23
- &.leaving {
24
- /* Leaving slide - move off-screen to the left */
25
- transform: translateX(-100%);
26
- opacity: 0;
27
- }
28
-
29
- &.entering {
30
- /* Entering slide - animate from right to center */
31
- transform: translateX(0%);
32
- opacity: 1;
33
- }
34
- }
35
-
36
- img {
37
- max-height: 100%;
38
- max-width: 100%;
39
- margin: 0 auto;
40
- display: block;
41
- }
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import { CaucaSlideshowComponent } from './cauca-slideshow.component';
3
-
4
- describe('CaucaSlideshowComponent', () => {
5
- let component: CaucaSlideshowComponent;
6
- let fixture: ComponentFixture<CaucaSlideshowComponent>;
7
-
8
- beforeEach(waitForAsync(() => {
9
- TestBed.configureTestingModule({
10
- imports: [ CaucaSlideshowComponent ]
11
- })
12
- .compileComponents();
13
- }));
14
-
15
- beforeEach(() => {
16
- fixture = TestBed.createComponent(CaucaSlideshowComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- });
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,67 +0,0 @@
1
- import { Component, OnInit, ElementRef, Input, ViewChild } from '@angular/core';
2
-
3
-
4
- @Component({
5
- selector: 'cauca-slideshow',
6
- templateUrl: './cauca-slideshow.component.html',
7
- styleUrls: ['./cauca-slideshow.component.scss'],
8
- imports: [],
9
- })
10
- export class CaucaSlideshowComponent implements OnInit {
11
- @ViewChild('container', { static: true })
12
- public container: ElementRef;
13
- @Input()
14
- public height = '150px';
15
- @Input()
16
- public autoPlay = true;
17
- public states = [];
18
- public selectedIndex = 0;
19
-
20
- private timer = null;
21
- private items = [];
22
-
23
- @Input()
24
- public set images(list: string[]) {
25
- this.items = list;
26
- this.restart();
27
- }
28
- public get images(): string[] {
29
- return this.items;
30
- }
31
-
32
- public ngOnInit(): void {
33
- this.container.nativeElement.style.height = this.height;
34
- this.container.nativeElement.style.width = '100%';
35
- }
36
-
37
- public getState(index: number): string {
38
- if (this.states[index]) {
39
- return this.states[index];
40
- }
41
-
42
- return (this.selectedIndex === index ? 'in' : 'out');
43
- }
44
-
45
- public restart(): void {
46
- if (this.timer) {
47
- window.clearInterval(this.timer);
48
- }
49
- if (this.images && this.images.length) {
50
- this.timer = window.setInterval(() => this.changed('next'), 5000);
51
- }
52
- }
53
-
54
- public next(): void {
55
- if (this.selectedIndex < this.items.length - 1) {
56
- this.selectedIndex++;
57
- } else {
58
- this.selectedIndex = 0;
59
- }
60
- }
61
-
62
- private changed(action: string): void {
63
- this.states[this.selectedIndex] = 'out';
64
- this[action]();
65
- this.states[this.selectedIndex] = 'in';
66
- }
67
- }
@@ -1,11 +0,0 @@
1
- export class MenuItem {
2
- public activated: boolean;
3
- public childs: MenuItem[] = [];
4
-
5
- public constructor(
6
- public label: string,
7
- public path: string,
8
- public icon: string | string[] = '',
9
- ) {
10
- }
11
- }
@@ -1,5 +0,0 @@
1
- export class SimpleDialogData {
2
- public title: string;
3
- public message: string;
4
- public buttons: string[] = [];
5
- }
@@ -1,10 +0,0 @@
1
- <div mat-dialog-title>
2
- <div class="h6">{{ title | translate }}</div>
3
- <cauca-icon-button id="closeButton" (buttonClick)="closeClick()" icon="close" />
4
- </div>
5
- <div class="alert-dialog-content" mat-dialog-content>
6
- <p>{{ message | translate }}</p>
7
- </div>
8
- <mat-dialog-actions align="end">
9
- <cauca-raised-button id="okButton" label="ok" color="primary" (buttonClick)="closeClick()" />
10
- </mat-dialog-actions>
@@ -1,14 +0,0 @@
1
- @use "../dialog-styles";
2
-
3
- :host > div:first-child {
4
- display: flex;
5
- align-items: center;
6
-
7
- div:first-child {
8
- flex: 1;
9
- }
10
- }
11
-
12
- .alert-dialog-content {
13
- white-space: pre-wrap;
14
- }
@@ -1,90 +0,0 @@
1
- import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
2
-
3
- import { AlertDialogComponent } from './alert-dialog.component';
4
- import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
5
- import { TranslateModule, TranslatePipe } from '@ngx-translate/core';
6
- import { MockComponents, MockModule, MockPipe, ngMocks } from 'ng-mocks';
7
- import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout';
8
- import { of } from 'rxjs';
9
- import { IconButtonComponent } from '../../buttons/icon-button/icon-button.component';
10
- import { RaisedButtonComponent } from '../../buttons/raised-button/raised-button.component';
11
-
12
- describe('AlertDialogComponent', () => {
13
- let component: AlertDialogComponent;
14
- let fixture: ComponentFixture<AlertDialogComponent>;
15
- let mockMatDialog: any;
16
- let breakpointObserverMock: jasmine.SpyObj<BreakpointObserver>;
17
-
18
- beforeEach(async () => {
19
- breakpointObserverMock = jasmine.createSpyObj('BreakpointObserver', ['observe']);
20
- breakpointObserverMock.observe.and.returnValue(of({ matches: true, breakpoints: {} }));
21
-
22
- mockMatDialog = jasmine.createSpyObj('MatDialogRef', ['close', 'addPanelClass', 'updateSize']);
23
- await TestBed.configureTestingModule({
24
- imports: [
25
- AlertDialogComponent,
26
- MockModule(TranslateModule)
27
- ],
28
- declarations: [
29
- MockPipe(TranslatePipe, value => value),
30
- ...MockComponents(IconButtonComponent, RaisedButtonComponent)
31
- ],
32
- providers: [
33
- { provide: MatDialogRef, useValue: mockMatDialog },
34
- { provide: MAT_DIALOG_DATA, useValue: [] },
35
- { provide: BreakpointObserver, useValue: breakpointObserverMock },
36
- ]
37
- })
38
- .compileComponents();
39
-
40
- fixture = TestBed.createComponent(AlertDialogComponent);
41
- component = fixture.componentInstance;
42
- fixture.detectChanges();
43
- });
44
-
45
- it('should create', () => {
46
- expect(component).toBeTruthy();
47
- });
48
-
49
- it('should initially add a global style class', () => {
50
- expect(mockMatDialog.addPanelClass).toHaveBeenCalledWith('dialog-global-style');
51
- });
52
-
53
- it('should update dialog size when breakpoint matches', fakeAsync(() => {
54
- mockMatDialog.updateSize.calls.reset();
55
- const breakpointState: BreakpointState = { matches: true, breakpoints: {} };
56
- breakpointObserverMock.observe.and.returnValue(of(breakpointState));
57
-
58
- TestBed.createComponent(AlertDialogComponent);
59
- fixture.detectChanges();
60
-
61
- expect(mockMatDialog.updateSize).toHaveBeenCalledWith('100vw');
62
- }));
63
-
64
- it('should update dialog size when breakpoint does not match', fakeAsync(() => {
65
- mockMatDialog.updateSize.calls.reset();
66
- const breakpointState: BreakpointState = { matches: false, breakpoints: {} };
67
- breakpointObserverMock.observe.and.returnValue(of(breakpointState));
68
-
69
- TestBed.createComponent(AlertDialogComponent);
70
- fixture.detectChanges();
71
-
72
- expect(mockMatDialog.updateSize).toHaveBeenCalledWith('auto');
73
- }));
74
-
75
- it('should close dialog when pressing ok', async () => {
76
- const closeButton = ngMocks.find<RaisedButtonComponent>('#okButton', null)?.componentInstance;
77
-
78
- closeButton.buttonClick.emit();
79
-
80
- expect(mockMatDialog.close).toHaveBeenCalled();
81
- });
82
-
83
- it('should close dialog when pressing close', async () => {
84
- const closeButton = ngMocks.find<IconButtonComponent>('#closeButton', null)?.componentInstance;
85
-
86
- closeButton.buttonClick.emit();
87
-
88
- expect(mockMatDialog.close).toHaveBeenCalled();
89
- });
90
- });
@@ -1,41 +0,0 @@
1
- import { Component, Inject } from '@angular/core';
2
- import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
3
- import { ConfirmationOptions } from '../services/dialog.service';
4
- import { TranslateModule } from '@ngx-translate/core';
5
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
- import { BreakpointObserver } from '@angular/cdk/layout';
7
- import { RaisedButtonComponent } from '../../buttons/raised-button/raised-button.component';
8
- import { IconButtonComponent } from '../../buttons/icon-button/icon-button.component';
9
-
10
- @Component({
11
- selector: 'cauca-alert-dialog',
12
- templateUrl: './alert-dialog.component.html',
13
- styleUrls: ['./alert-dialog.component.scss'],
14
- standalone: true,
15
- imports: [TranslateModule, RaisedButtonComponent, IconButtonComponent, MatDialogModule]
16
- })
17
- export class AlertDialogComponent {
18
-
19
- public title: string = '';
20
- public message: string = '';
21
-
22
- public constructor(
23
- public dialogRef: MatDialogRef<AlertDialogComponent>,
24
- @Inject(MAT_DIALOG_DATA) public data: AlertDialogData,
25
- breakdownObserver: BreakpointObserver) {
26
- this.title = data.title;
27
- this.message = data.message;
28
- dialogRef.addPanelClass("dialog-global-style");
29
- breakdownObserver.observe('(max-width: 500px)').pipe(takeUntilDestroyed()).subscribe(result => dialogRef.updateSize(result.matches ? '100vw' : 'auto'));
30
- }
31
-
32
- public closeClick(): void {
33
- this.dialogRef.close();
34
- }
35
- }
36
-
37
- export interface AlertDialogData {
38
- title: string;
39
- message: string;
40
- options: ConfirmationOptions;
41
- }
@@ -1,11 +0,0 @@
1
- <div mat-dialog-title>
2
- <div class="h6 title">{{ title | translate: options.titleArgs }}</div>
3
- <cauca-icon-button id="close-button" (buttonClick)="cancelClick()" icon="close" />
4
- </div>
5
- <div mat-dialog-content>
6
- <p class="message">{{ message | translate: options.messageArgs }}</p>
7
- </div>
8
- <mat-dialog-actions align="end" class="action-buttons">
9
- <cauca-stroked-button class="no-button" [label]="options.noText" [color]="options.noColor" (buttonClick)="noClick()" />
10
- <cauca-raised-button class="yes-button" [label]="options.yesText" [color]="options.yesColor" (buttonClick)="yesClick()" />
11
- </mat-dialog-actions>
@@ -1,29 +0,0 @@
1
- @use "../dialog-styles";
2
-
3
- :host > div:first-child {
4
- display: flex;
5
- align-items: center;
6
-
7
- div:first-child {
8
- flex: 1;
9
- }
10
- }
11
-
12
- .yes-button {
13
- padding-left: 8px;
14
- }
15
-
16
- .message {
17
- white-space: pre-wrap;
18
- }
19
-
20
- .title {
21
- padding-top: 8px;
22
- }
23
-
24
- .action-buttons {
25
- display: flex;
26
- align-items: center;
27
- flex-direction: row;
28
- gap: 8px;
29
- }