@cauca-911/material 20.2.13 → 20.2.14

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 (246) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -22
  3. package/fesm2022/cauca-911-material.mjs +4629 -0
  4. package/fesm2022/cauca-911-material.mjs.map +1 -0
  5. package/package.json +38 -23
  6. package/types/cauca-911-material.d.ts +795 -0
  7. package/.eslintrc.json +0 -77
  8. package/README_PACKAGE.md +0 -5
  9. package/karma.conf.js +0 -50
  10. package/ng-package.json +0 -7
  11. package/src/lib/cauca-material.component.html +0 -1
  12. package/src/lib/cauca-material.component.spec.ts +0 -29
  13. package/src/lib/cauca-material.component.ts +0 -12
  14. package/src/lib/cauca-material.service.spec.ts +0 -16
  15. package/src/lib/cauca-material.service.ts +0 -7
  16. package/src/lib/components/button/button.component.html +0 -52
  17. package/src/lib/components/button/button.component.scss +0 -6
  18. package/src/lib/components/button/button.component.spec.ts +0 -134
  19. package/src/lib/components/button/button.component.ts +0 -21
  20. package/src/lib/components/buttons/base-button.ts +0 -35
  21. package/src/lib/components/buttons/basic-button/basic-button.component.html +0 -5
  22. package/src/lib/components/buttons/basic-button/basic-button.component.scss +0 -12
  23. package/src/lib/components/buttons/basic-button/basic-button.component.spec.ts +0 -106
  24. package/src/lib/components/buttons/basic-button/basic-button.component.ts +0 -17
  25. package/src/lib/components/buttons/fab-button/fab-button.component.html +0 -3
  26. package/src/lib/components/buttons/fab-button/fab-button.component.scss +0 -12
  27. package/src/lib/components/buttons/fab-button/fab-button.component.spec.ts +0 -82
  28. package/src/lib/components/buttons/fab-button/fab-button.component.ts +0 -16
  29. package/src/lib/components/buttons/flat-button/flat-button.component.html +0 -5
  30. package/src/lib/components/buttons/flat-button/flat-button.component.scss +0 -12
  31. package/src/lib/components/buttons/flat-button/flat-button.component.spec.ts +0 -106
  32. package/src/lib/components/buttons/flat-button/flat-button.component.ts +0 -17
  33. package/src/lib/components/buttons/icon-button/icon-button.component.html +0 -3
  34. package/src/lib/components/buttons/icon-button/icon-button.component.scss +0 -23
  35. package/src/lib/components/buttons/icon-button/icon-button.component.spec.ts +0 -38
  36. package/src/lib/components/buttons/icon-button/icon-button.component.ts +0 -15
  37. package/src/lib/components/buttons/link-button/link-button.component.html +0 -1
  38. package/src/lib/components/buttons/link-button/link-button.component.scss +0 -3
  39. package/src/lib/components/buttons/link-button/link-button.component.spec.ts +0 -97
  40. package/src/lib/components/buttons/link-button/link-button.component.ts +0 -25
  41. package/src/lib/components/buttons/menu-item/menu-item.component.html +0 -5
  42. package/src/lib/components/buttons/menu-item/menu-item.component.scss +0 -6
  43. package/src/lib/components/buttons/menu-item/menu-item.component.spec.ts +0 -66
  44. package/src/lib/components/buttons/menu-item/menu-item.component.ts +0 -19
  45. package/src/lib/components/buttons/raised-button/raised-button.component.html +0 -5
  46. package/src/lib/components/buttons/raised-button/raised-button.component.scss +0 -12
  47. package/src/lib/components/buttons/raised-button/raised-button.component.spec.ts +0 -108
  48. package/src/lib/components/buttons/raised-button/raised-button.component.ts +0 -17
  49. package/src/lib/components/buttons/refresh-button/refresh-button.component.html +0 -1
  50. package/src/lib/components/buttons/refresh-button/refresh-button.component.scss +0 -0
  51. package/src/lib/components/buttons/refresh-button/refresh-button.component.spec.ts +0 -81
  52. package/src/lib/components/buttons/refresh-button/refresh-button.component.ts +0 -19
  53. package/src/lib/components/buttons/round-button/round-button.component.html +0 -3
  54. package/src/lib/components/buttons/round-button/round-button.component.scss +0 -34
  55. package/src/lib/components/buttons/round-button/round-button.component.spec.ts +0 -26
  56. package/src/lib/components/buttons/round-button/round-button.component.ts +0 -14
  57. package/src/lib/components/buttons/stroked-button/stroked-button.component.html +0 -5
  58. package/src/lib/components/buttons/stroked-button/stroked-button.component.scss +0 -23
  59. package/src/lib/components/buttons/stroked-button/stroked-button.component.spec.ts +0 -114
  60. package/src/lib/components/buttons/stroked-button/stroked-button.component.ts +0 -17
  61. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.html +0 -9
  62. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.scss +0 -7
  63. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.spec.ts +0 -68
  64. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.ts +0 -155
  65. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.html +0 -6
  66. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.scss +0 -25
  67. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.spec.ts +0 -23
  68. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.ts +0 -23
  69. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.html +0 -53
  70. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.scss +0 -124
  71. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.spec.ts +0 -93
  72. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.ts +0 -227
  73. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.html +0 -9
  74. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.scss +0 -15
  75. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.spec.ts +0 -103
  76. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.ts +0 -47
  77. package/src/lib/components/cauca-date-time-picker/models/dialog-date-time-picker-data.ts +0 -29
  78. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.html +0 -11
  79. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.scss +0 -3
  80. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.ts +0 -87
  81. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.html +0 -8
  82. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.scss +0 -3
  83. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.spec.ts +0 -35
  84. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.ts +0 -57
  85. package/src/lib/components/deprecated-components/cauca-menu-sidebar/cauca-menu-sidebar.component.html +0 -19
  86. package/src/lib/components/deprecated-components/cauca-menu-sidebar/cauca-menu-sidebar.component.scss +0 -142
  87. package/src/lib/components/deprecated-components/cauca-menu-sidebar/cauca-menu-sidebar.component.spec.ts +0 -30
  88. package/src/lib/components/deprecated-components/cauca-menu-sidebar/cauca-menu-sidebar.component.ts +0 -112
  89. package/src/lib/components/deprecated-components/cauca-menu-vertical/cauca-menu-vertical.component.html +0 -26
  90. package/src/lib/components/deprecated-components/cauca-menu-vertical/cauca-menu-vertical.component.scss +0 -52
  91. package/src/lib/components/deprecated-components/cauca-menu-vertical/cauca-menu-vertical.component.spec.ts +0 -28
  92. package/src/lib/components/deprecated-components/cauca-menu-vertical/cauca-menu-vertical.component.ts +0 -53
  93. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.html +0 -7
  94. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.scss +0 -4
  95. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.spec.ts +0 -39
  96. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.ts +0 -20
  97. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.html +0 -7
  98. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.scss +0 -41
  99. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.spec.ts +0 -24
  100. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.ts +0 -67
  101. package/src/lib/components/deprecated-components/shared/models/menu-item.ts +0 -11
  102. package/src/lib/components/deprecated-components/shared/models/simple-dialog-data.ts +0 -5
  103. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.html +0 -10
  104. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.scss +0 -14
  105. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.spec.ts +0 -90
  106. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.ts +0 -41
  107. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.html +0 -11
  108. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.scss +0 -29
  109. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.spec.ts +0 -137
  110. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.ts +0 -47
  111. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.html +0 -17
  112. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.scss +0 -14
  113. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.spec.ts +0 -96
  114. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.ts +0 -40
  115. package/src/lib/components/dialogs/delete-dialog/models/delete-dialog-data.spec.ts +0 -7
  116. package/src/lib/components/dialogs/delete-dialog/models/delete-dialog-data.ts +0 -5
  117. package/src/lib/components/dialogs/dialog-styles.css +0 -9
  118. package/src/lib/components/dialogs/dialog-styles.scss +0 -9
  119. package/src/lib/components/dialogs/error-dialog/error-dialog.component.html +0 -10
  120. package/src/lib/components/dialogs/error-dialog/error-dialog.component.scss +0 -10
  121. package/src/lib/components/dialogs/error-dialog/error-dialog.component.spec.ts +0 -91
  122. package/src/lib/components/dialogs/error-dialog/error-dialog.component.ts +0 -32
  123. package/src/lib/components/dialogs/services/dialog.service.spec.ts +0 -82
  124. package/src/lib/components/dialogs/services/dialog.service.ts +0 -107
  125. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.html +0 -24
  126. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.scss +0 -22
  127. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.spec.ts +0 -126
  128. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.ts +0 -66
  129. package/src/lib/components/inputs/color-picker/color-picker.component.html +0 -9
  130. package/src/lib/components/inputs/color-picker/color-picker.component.scss +0 -0
  131. package/src/lib/components/inputs/color-picker/color-picker.component.spec.ts +0 -29
  132. package/src/lib/components/inputs/color-picker/color-picker.component.ts +0 -111
  133. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.html +0 -13
  134. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.scss +0 -0
  135. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.spec.ts +0 -80
  136. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.ts +0 -46
  137. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.html +0 -40
  138. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.scss +0 -39
  139. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.spec.ts +0 -135
  140. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.ts +0 -263
  141. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.html +0 -6
  142. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.scss +0 -27
  143. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.spec.ts +0 -90
  144. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.ts +0 -17
  145. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.html +0 -5
  146. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.scss +0 -8
  147. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.spec.ts +0 -98
  148. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.ts +0 -16
  149. package/src/lib/components/inputs/password/password-input/password-input.component.html +0 -11
  150. package/src/lib/components/inputs/password/password-input/password-input.component.scss +0 -12
  151. package/src/lib/components/inputs/password/password-input/password-input.component.spec.ts +0 -141
  152. package/src/lib/components/inputs/password/password-input/password-input.component.ts +0 -67
  153. package/src/lib/components/inputs/password/password-selection/password-selection.component.html +0 -15
  154. package/src/lib/components/inputs/password/password-selection/password-selection.component.scss +0 -32
  155. package/src/lib/components/inputs/password/password-selection/password-selection.component.spec.ts +0 -138
  156. package/src/lib/components/inputs/password/password-selection/password-selection.component.ts +0 -100
  157. package/src/lib/components/inputs/select-with-search/select-with-search.component.html +0 -19
  158. package/src/lib/components/inputs/select-with-search/select-with-search.component.scss +0 -0
  159. package/src/lib/components/inputs/select-with-search/select-with-search.component.spec.ts +0 -213
  160. package/src/lib/components/inputs/select-with-search/select-with-search.component.ts +0 -108
  161. package/src/lib/components/layout/expandable-panel/expandable-panel.component.html +0 -12
  162. package/src/lib/components/layout/expandable-panel/expandable-panel.component.scss +0 -43
  163. package/src/lib/components/layout/expandable-panel/expandable-panel.component.spec.ts +0 -48
  164. package/src/lib/components/layout/expandable-panel/expandable-panel.component.ts +0 -19
  165. package/src/lib/components/layout/group-container/group-container.component.html +0 -6
  166. package/src/lib/components/layout/group-container/group-container.component.scss +0 -22
  167. package/src/lib/components/layout/group-container/group-container.component.spec.ts +0 -34
  168. package/src/lib/components/layout/group-container/group-container.component.ts +0 -14
  169. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.html +0 -13
  170. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.scss +0 -27
  171. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.spec.ts +0 -144
  172. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.ts +0 -52
  173. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.html +0 -4
  174. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.scss +0 -10
  175. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.spec.ts +0 -80
  176. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.ts +0 -28
  177. package/src/lib/components/layout/page-title/page-title.component.html +0 -28
  178. package/src/lib/components/layout/page-title/page-title.component.scss +0 -40
  179. package/src/lib/components/layout/page-title/page-title.component.spec.ts +0 -162
  180. package/src/lib/components/layout/page-title/page-title.component.ts +0 -28
  181. package/src/lib/components/layout/sections/main-section/main-section.component.html +0 -6
  182. package/src/lib/components/layout/sections/main-section/main-section.component.scss +0 -27
  183. package/src/lib/components/layout/sections/main-section/main-section.component.spec.ts +0 -42
  184. package/src/lib/components/layout/sections/main-section/main-section.component.ts +0 -13
  185. package/src/lib/components/layout/sections/section-column/section-column.component.html +0 -3
  186. package/src/lib/components/layout/sections/section-column/section-column.component.scss +0 -18
  187. package/src/lib/components/layout/sections/section-column/section-column.component.spec.ts +0 -35
  188. package/src/lib/components/layout/sections/section-column/section-column.component.ts +0 -12
  189. package/src/lib/components/layout/sections/section-field/section-field.component.html +0 -21
  190. package/src/lib/components/layout/sections/section-field/section-field.component.scss +0 -44
  191. package/src/lib/components/layout/sections/section-field/section-field.component.spec.ts +0 -74
  192. package/src/lib/components/layout/sections/section-field/section-field.component.ts +0 -22
  193. package/src/lib/components/list-paginator/list-paginator.component.html +0 -16
  194. package/src/lib/components/list-paginator/list-paginator.component.scss +0 -46
  195. package/src/lib/components/list-paginator/list-paginator.component.spec.ts +0 -248
  196. package/src/lib/components/list-paginator/list-paginator.component.ts +0 -81
  197. package/src/lib/components/misc/loading-error/loading-error.component.html +0 -11
  198. package/src/lib/components/misc/loading-error/loading-error.component.scss +0 -0
  199. package/src/lib/components/misc/loading-error/loading-error.component.spec.ts +0 -75
  200. package/src/lib/components/misc/loading-error/loading-error.component.ts +0 -18
  201. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.html +0 -3
  202. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.scss +0 -0
  203. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.spec.ts +0 -43
  204. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.ts +0 -16
  205. package/src/lib/components/misc/snack-bar/snack-bar.component.html +0 -16
  206. package/src/lib/components/misc/snack-bar/snack-bar.component.scss +0 -84
  207. package/src/lib/components/misc/snack-bar/snack-bar.component.spec.ts +0 -136
  208. package/src/lib/components/misc/snack-bar/snack-bar.component.ts +0 -39
  209. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.html +0 -11
  210. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.scss +0 -0
  211. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.spec.ts +0 -67
  212. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.ts +0 -15
  213. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.html +0 -11
  214. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.scss +0 -0
  215. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.spec.ts +0 -77
  216. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.ts +0 -17
  217. package/src/lib/components/presenters/badge/badge.component.html +0 -6
  218. package/src/lib/components/presenters/badge/badge.component.scss +0 -10
  219. package/src/lib/components/presenters/badge/badge.component.spec.ts +0 -41
  220. package/src/lib/components/presenters/badge/badge.component.ts +0 -18
  221. package/src/lib/components/presenters/icon/icon.component.scss +0 -9
  222. package/src/lib/components/presenters/icon/icon.component.spec.ts +0 -38
  223. package/src/lib/components/presenters/icon/icon.component.ts +0 -37
  224. package/src/lib/core/breadcrumb.service.spec.ts +0 -35
  225. package/src/lib/core/breadcrumb.service.ts +0 -24
  226. package/src/lib/core/directives/auto-trim-and-lower.directive.spec.ts +0 -22
  227. package/src/lib/core/directives/auto-trim-and-lower.directive.ts +0 -19
  228. package/src/lib/core/directives/form-error/form-error.module.ts +0 -21
  229. package/src/lib/core/directives/form-error/has-error-root.directive.ts +0 -29
  230. package/src/lib/core/directives/form-error/has-error.directive.ts +0 -95
  231. package/src/lib/core/loading-state.service.spec.ts +0 -57
  232. package/src/lib/core/loading-state.service.ts +0 -44
  233. package/src/lib/core/models/breadcrumb-location.ts +0 -6
  234. package/src/lib/core/models/password-validation.ts +0 -20
  235. package/src/lib/core/validators/password/password-validator.spec.ts +0 -155
  236. package/src/lib/core/validators/password/password-validator.ts +0 -30
  237. package/src/lib/provide-cauca-material.ts +0 -10
  238. package/src/public-api.ts +0 -74
  239. package/src/test.ts +0 -17
  240. package/tsconfig.lib.json +0 -22
  241. package/tsconfig.lib.prod.json +0 -4
  242. package/tsconfig.spec.json +0 -17
  243. /package/{src/assets → assets}/i18n/cauca/en-material.json +0 -0
  244. /package/{src/assets → assets}/i18n/cauca/es-material.json +0 -0
  245. /package/{src/assets → assets}/i18n/cauca/fr-material.json +0 -0
  246. /package/{src/assets → assets}/images/loading.gif +0 -0
package/.eslintrc.json DELETED
@@ -1,77 +0,0 @@
1
- {
2
- "extends": "../../.eslintrc.json",
3
- "ignorePatterns": [
4
- "!**/*",
5
- "**/*.spec.ts",
6
- "**/test.ts",
7
- "build/**/*",
8
- "dist/**/*"
9
- ],
10
- "overrides": [
11
- {
12
- "files": [
13
- "*.ts"
14
- ],
15
- "parserOptions": {
16
- "project": [
17
- "projects/cauca-material/tsconfig.lib.json"
18
- ]
19
- },
20
- "rules": {
21
- "@angular-eslint/component-selector": [
22
- "error",
23
- {
24
- "type": "element",
25
- "prefix": "cauca"
26
- }
27
- ],
28
- "@angular-eslint/directive-selector": [
29
- "error",
30
- {
31
- "type": "attribute",
32
- "style": "camelCase"
33
- }
34
- ],
35
- "@angular-eslint/prefer-standalone": "off",
36
- "@typescript-eslint/consistent-type-definitions": "error",
37
- "@typescript-eslint/dot-notation": "off",
38
- "@typescript-eslint/explicit-member-accessibility": [
39
- "error",
40
- {
41
- "accessibility": "explicit"
42
- }
43
- ],
44
- "@typescript-eslint/no-inferrable-types": "off",
45
- "@typescript-eslint/member-ordering": [
46
- "error", {
47
- "default": [
48
- "signature",
49
- "public-field",
50
- "protected-field",
51
- "private-field",
52
- ["get", "set"],
53
- "constructor",
54
- "public-method",
55
- "protected-method",
56
- "private-method"
57
- ]
58
- }
59
- ],
60
- "brace-style": [
61
- "error",
62
- "1tbs"
63
- ],
64
- "id-blacklist": "off",
65
- "id-match": "off",
66
- "no-underscore-dangle": "off",
67
- "@angular-eslint/prefer-inject": "off"
68
- }
69
- },
70
- {
71
- "files": [
72
- "*.html"
73
- ],
74
- "rules": {}
75
- }
76
- ]
77
- }
package/README_PACKAGE.md DELETED
@@ -1,5 +0,0 @@
1
- # @cauca-911/material
2
-
3
- Run `npm install @cauca-911/material --save` to add this library to your project
4
-
5
- ## To use this library, you need to import the module with specific configuration
package/karma.conf.js DELETED
@@ -1,50 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- clearContext: false // leave Jasmine Spec Runner output visible in browser
17
- },
18
- coverageReporter: {
19
- dir: 'build/reports/coverage',
20
- reporters: [
21
- { type: 'html', subdir: 'report-html' },
22
- { type: 'lcov', subdir: 'report-lcov' }
23
- ]
24
- },
25
- reporters: ['progress', 'kjhtml', 'coverage'],
26
- port: 9876,
27
- colors: true,
28
- logLevel: config.LOG_INFO,
29
- autoWatch: true,
30
- browsers: ['Chrome'],
31
- customLaunchers: {
32
- ChromeHeadlessNoSandbox: {
33
- base: 'ChromeHeadless',
34
- flags: [
35
- '--no-sandbox',
36
- '--disable-setuid-sandbox',
37
- '--disable-extensions',
38
- '--disable-web-security',
39
- '--disable-gpu',
40
- '--no-proxy-server'
41
- ]
42
- }
43
- },
44
- singleRun: false,
45
- restartOnFileChange: true,
46
- captureTimeout: 120000,
47
- browserDisconnectTimeout: 20000,
48
- browserNoActivityTimeout: 120000,
49
- });
50
- };
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/cauca-material",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
@@ -1 +0,0 @@
1
- <div>{{'core.noGenericComponentOnThisLibrary' | translate}}</div>
@@ -1,29 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import { TranslateModule } from '@ngx-translate/core';
3
-
4
- import { CaucaMaterialComponent } from './cauca-material.component';
5
-
6
- describe('CaucaMaterialComponent', () => {
7
- let component: CaucaMaterialComponent;
8
- let fixture: ComponentFixture<CaucaMaterialComponent>;
9
-
10
- beforeEach(waitForAsync(() => {
11
- TestBed.configureTestingModule({
12
- imports: [
13
- CaucaMaterialComponent,
14
- TranslateModule.forRoot()
15
- ]
16
- })
17
- .compileComponents();
18
- }));
19
-
20
- beforeEach(() => {
21
- fixture = TestBed.createComponent(CaucaMaterialComponent);
22
- component = fixture.componentInstance;
23
- fixture.detectChanges();
24
- });
25
-
26
- it('should create', () => {
27
- expect(component).toBeTruthy();
28
- });
29
- });
@@ -1,12 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { TranslateModule } from '@ngx-translate/core';
3
-
4
- @Component({
5
- selector: 'cauca-material',
6
- templateUrl: './cauca-material.component.html',
7
- styles: [],
8
- imports: [TranslateModule]
9
- })
10
- export class CaucaMaterialComponent {
11
-
12
- }
@@ -1,16 +0,0 @@
1
- import { TestBed } from '@angular/core/testing';
2
-
3
- import { CaucaMaterialService } from './cauca-material.service';
4
-
5
- describe('CaucaMaterialService', () => {
6
- let service: CaucaMaterialService;
7
-
8
- beforeEach(() => {
9
- TestBed.configureTestingModule({});
10
- service = TestBed.inject(CaucaMaterialService);
11
- });
12
-
13
- it('should be created', () => {
14
- expect(service).toBeTruthy();
15
- });
16
- });
@@ -1,7 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
-
3
- @Injectable({
4
- providedIn: 'root'
5
- })
6
- export class CaucaMaterialService {
7
- }
@@ -1,52 +0,0 @@
1
- @if (type === 'basic') {
2
- <button [ngClass]="class" mat-button (click)="buttonClick.emit()" [disabled]="disable || inProgress" [color]="color" class="button-basic">
3
- @if (inProgress || icon) {
4
- <mat-icon [class.button-spin]="inProgress">{{ inProgress ? 'update' : icon }}</mat-icon>
5
- }
6
- <span>{{label}}</span>
7
- </button>
8
- }
9
-
10
- @if (type === 'raised') {
11
- <button [ngClass]="class" matButton="elevated" (click)="buttonClick.emit()" [disabled]="disable || inProgress" [color]="color" class="button-raised">
12
- @if (inProgress || icon) {
13
- <mat-icon [class.button-spin]="inProgress">{{ inProgress ? 'update' : icon }}</mat-icon>
14
- }
15
- <span>{{label}}</span>
16
- </button>
17
- }
18
-
19
- @if (type === 'stroked') {
20
- <button [ngClass]="class" matButton="outlined" (click)="buttonClick.emit()" [disabled]="disable || inProgress" [color]="color" class="button-stroked">
21
- @if (inProgress || icon) {
22
- <mat-icon [class.button-spin]="inProgress">{{ inProgress ? 'update' : icon }}</mat-icon>
23
- }
24
- <span>{{label}}</span>
25
- </button>
26
- }
27
-
28
- @if (type === 'flat') {
29
- <button [ngClass]="class" matButton="filled" (click)="buttonClick.emit()" [disabled]="disable || inProgress" [color]="color" class="button-flat">
30
- @if (inProgress || icon) {
31
- <mat-icon [class.button-spin]="inProgress">{{ inProgress ? 'update' : icon }}</mat-icon>
32
- }
33
- <span>{{label}}</span>
34
- </button>
35
- }
36
-
37
- @if (type === 'icon') {
38
- <button [ngClass]="class" matIconButton (click)="buttonClick.emit()" [disabled]="disable || inProgress" [color]="color" class="button-icon">
39
- @if (inProgress || icon) {
40
- <mat-icon [class.button-spin]="inProgress">{{ inProgress ? 'update' : icon }}</mat-icon>
41
- }
42
- </button>
43
- }
44
-
45
- @if (type === 'fab') {
46
- <button [ngClass]="class" matFab (click)="buttonClick.emit()" [disabled]="disable || inProgress" [color]="color" class="button-icon">
47
- @if (inProgress || icon) {
48
- <mat-icon [class.button-spin]="inProgress">{{ inProgress ? 'update' : icon }}</mat-icon>
49
- }
50
- <span>{{label}}</span>
51
- </button>
52
- }
@@ -1,6 +0,0 @@
1
- @keyframes spinner {
2
- to { transform: rotate(360deg); }
3
- }
4
- .button-spin {
5
- animation: spinner 1s linear infinite;
6
- }
@@ -1,134 +0,0 @@
1
- import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
2
-
3
- import { ButtonComponent } from './button.component';
4
- import { HarnessLoader } from '@angular/cdk/testing';
5
- import { MatButtonModule } from '@angular/material/button';
6
- import { MatIconModule } from '@angular/material/icon';
7
- import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
8
- import { MatButtonHarness } from '@angular/material/button/testing';
9
- import { MatIconHarness } from '@angular/material/icon/testing';
10
-
11
- describe('ButtonWithProgressComponent', () => {
12
- let component: ButtonComponent;
13
- let fixture: ComponentFixture<ButtonComponent>;
14
- let loader: HarnessLoader;
15
-
16
- beforeEach(async () => {
17
- await TestBed.configureTestingModule({
18
- imports: [
19
- MatButtonModule,
20
- MatIconModule
21
- ]
22
- })
23
- .compileComponents();
24
-
25
- fixture = TestBed.createComponent(ButtonComponent);
26
- loader = TestbedHarnessEnvironment.loader(fixture);
27
- component = fixture.componentInstance;
28
- fixture.detectChanges();
29
- });
30
-
31
- it('should create', () => {
32
- expect(component).toBeTruthy();
33
- });
34
-
35
- it('should mat-icon-button when type is icon', async () => {
36
-
37
- component.type = 'icon';
38
-
39
- const button = await loader.getHarnessOrNull(MatButtonHarness);
40
- expect(await button.getVariant()).toBe('icon');
41
- });
42
-
43
- it('should mat-flat-button when type is flat', async () => {
44
-
45
- component.type = 'flat';
46
-
47
- const button = await loader.getHarnessOrNull(MatButtonHarness);
48
- expect(await button.getAppearance()).toBe('filled');
49
- });
50
-
51
- it('should mat-raised-button when type is raised', async () => {
52
-
53
- component.type = 'raised';
54
-
55
- const button = await loader.getHarnessOrNull(MatButtonHarness);
56
- expect(await button.getAppearance()).toBe('elevated');
57
- });
58
-
59
- it('should mat-stroked-button when type is stroked', async () => {
60
-
61
- component.type = 'stroked';
62
-
63
- fixture.detectChanges();
64
-
65
- const button = await loader.getHarnessOrNull(MatButtonHarness);
66
- expect(await button.getAppearance()).toBe('outlined');
67
- });
68
-
69
- it('should mat-basic-button when type is basic', async () => {
70
-
71
- component.type = 'basic';
72
-
73
- const button = await loader.getHarnessOrNull(MatButtonHarness);
74
- expect(await button.getVariant()).toBe('basic');
75
- });
76
-
77
- it('should correctly display label', async () => {
78
- const someLabel = 'someLabel';
79
-
80
- component.label = someLabel;
81
-
82
- const button = await loader.getHarnessOrNull(MatButtonHarness);
83
- expect(await button.getText()).toBe(someLabel);
84
- });
85
-
86
- it('should disable button when disabled is set', async () => {
87
- component.disable = true;
88
-
89
- const button = await loader.getHarnessOrNull(MatButtonHarness);
90
- expect(await button.isDisabled()).toBeTrue();
91
- });
92
-
93
- it('should enable button when disabled is not set', async () => {
94
- component.disable = false;
95
-
96
- const button = await loader.getHarnessOrNull(MatButtonHarness);
97
- expect(await button.isDisabled()).toBeFalse();
98
- });
99
-
100
- it('should disable button when disabled is not set and show load icon', async () => {
101
- component.inProgress = true;
102
-
103
- const button = await loader.getHarnessOrNull(MatButtonHarness);
104
- const icon = await button.getHarness(MatIconHarness);
105
- expect(await button.isDisabled()).toBeTrue();
106
- expect(await icon.getName()).toBe('update');
107
- });
108
-
109
- it('should show correct icon when not loading and icon is set', async () => {
110
- component.icon = 'test';
111
-
112
- const button = await loader.getHarnessOrNull(MatButtonHarness);
113
- const icon = await button.getHarness(MatIconHarness);
114
- expect(await icon.getName()).toBe('test');
115
- });
116
-
117
- it('should not show any icon when not set', async () => {
118
- component.icon = null;
119
-
120
- const button = await loader.getHarnessOrNull(MatButtonHarness);
121
- const icon = await button.getHarnessOrNull(MatIconHarness);
122
- expect(icon).toBe(null);
123
- });
124
-
125
- it('should emit buttonClick event when clicked', fakeAsync(async () => {
126
- const clickSpy = spyOn(component.buttonClick, 'emit');
127
- const button = await loader.getHarnessOrNull(MatButtonHarness);
128
-
129
- button.click();
130
- tick();
131
-
132
- expect(clickSpy).toHaveBeenCalled();
133
- }));
134
- });
@@ -1,21 +0,0 @@
1
- import { NgClass } from '@angular/common';
2
- import { Component, Input, Output, EventEmitter } from '@angular/core';
3
- import { MatButtonModule } from '@angular/material/button';
4
- import { MatIconModule } from '@angular/material/icon';
5
-
6
- @Component({
7
- selector: 'cauca-button',
8
- templateUrl: './button.component.html',
9
- styleUrls: ['./button.component.scss'],
10
- imports: [MatIconModule, MatButtonModule, NgClass]
11
- })
12
- export class ButtonComponent {
13
- @Input() public class: string | null = null;
14
- @Input() public inProgress: boolean = false;
15
- @Input() public disable: boolean = false;
16
- @Input() public label: string = '';
17
- @Input() public icon: string | null = null;
18
- @Input() public color: string = '';
19
- @Input() public type: 'basic' | 'raised' | 'stroked' | 'flat' | 'icon' | 'fab' = 'basic';
20
- @Output() public buttonClick: EventEmitter<void> = new EventEmitter<void>();
21
- }
@@ -1,35 +0,0 @@
1
- import { InputSignal, input, computed, output, Directive, OutputEmitterRef, signal } from "@angular/core";
2
-
3
- @Directive()
4
- export abstract class BaseButton {
5
- public colorOnHover: InputSignal<string> = input(undefined);
6
- public color: InputSignal<string> = input(undefined);
7
- public icon: InputSignal<string> = input();
8
- public iconAlignment: InputSignal<'left' | 'right'> = input('left');
9
- public isDisabled: InputSignal<boolean> = input(false);
10
- public isInProgress: InputSignal<boolean> = input(false);
11
-
12
- public iconColor = computed(() => this.isHovered() ? this.colorOnHover() || this.color() : this.color());
13
- public showIcon = computed(() => !!this.icon() || this.isInProgress());
14
- public iconToShow = computed(() => this.isInProgress() ? 'update' : this.icon());
15
- public buttonDisabled = computed(() => this.isDisabled() || this.isInProgress());
16
-
17
- public buttonClick: OutputEmitterRef<void> = output();
18
-
19
- public isHovered = signal(false);
20
-
21
- public onMouseEnter(): void {
22
- this.isHovered.set(true);
23
- }
24
-
25
- public onMouseLeave(): void {
26
- this.isHovered.set(false);
27
- }
28
- }
29
-
30
- @Directive()
31
- export abstract class BaseButtonWithLabel extends BaseButton {
32
- public translateLabel: InputSignal<boolean> = input(true);
33
- public label: InputSignal<string> = input();
34
- public small: InputSignal<boolean> = input(false);
35
- }
@@ -1,5 +0,0 @@
1
- <button mat-button [ngClass]="small() ? 'small-button' : ''" [color]="color()" onclick="this.blur()" [disabled]="buttonDisabled()" (click)="buttonClick.emit()">
2
- @if(showIcon() && iconAlignment() === 'left') { <mat-icon [class.button-spin]="isInProgress()">{{iconToShow()}}</mat-icon> }
3
- @if (translateLabel()) {{{label()|translate}}} @else {{{label()}}}
4
- @if(showIcon() && iconAlignment() === 'right') { <mat-icon [class.button-spin]="isInProgress()">{{iconToShow()}}</mat-icon> }
5
- </button>
@@ -1,12 +0,0 @@
1
- .mdc-button.mat-white,
2
- .mat-stroked-button.mat-white {
3
- color: white;
4
- border-color: white;
5
- }
6
- .mdc-button.mat-white:hover,
7
- .mat-mdc-outlined-button.mat-white:hover {
8
- background-color: transparent;
9
- }
10
- mat-icon {
11
- color: inherit;
12
- }
@@ -1,106 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { BasicButtonComponent } from './basic-button.component';
4
- import { MatIconHarness } from '@angular/material/icon/testing';
5
- import { MatButtonHarness } from '@angular/material/button/testing';
6
- import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
7
- import { HarnessLoader } from '@angular/cdk/testing';
8
- import { TranslatePipe } from '@ngx-translate/core';
9
- import { MockPipe } from 'ng-mocks';
10
-
11
- describe('BasicButtonComponent', () => {
12
- let component: BasicButtonComponent;
13
- let fixture: ComponentFixture<BasicButtonComponent>;
14
- let loader: HarnessLoader;
15
-
16
- beforeEach(async () => {
17
- await TestBed.configureTestingModule({
18
- imports: [
19
- BasicButtonComponent,
20
- ],
21
- declarations: [MockPipe(TranslatePipe, key => key)]
22
- })
23
- .compileComponents();
24
-
25
- fixture = TestBed.createComponent(BasicButtonComponent);
26
- loader = TestbedHarnessEnvironment.loader(fixture);
27
- component = fixture.componentInstance;
28
- fixture.detectChanges();
29
- });
30
-
31
- it('should create', () => {
32
- expect(component).toBeTruthy();
33
- });
34
-
35
- it('should display the provided icon', async() => {
36
- fixture.componentRef.setInput('icon', 'twidelidou');
37
-
38
- fixture.detectChanges();
39
-
40
- const icon = await loader.getHarness(MatIconHarness);
41
- expect(await icon.getName()).toBe(component.icon());
42
- });
43
-
44
- it('should display the label', async () => {
45
- fixture.componentRef.setInput('label', 'twidelidou');
46
-
47
- fixture.detectChanges();
48
-
49
- const button = await loader.getHarness(MatButtonHarness);
50
- expect(await button.getText()).toContain(component.label());
51
- });
52
-
53
- it('should disable button when disabled is set', async () => {
54
- fixture.componentRef.setInput('isDisabled', true);
55
-
56
- const button = await loader.getHarnessOrNull(MatButtonHarness);
57
- expect(await button.isDisabled()).toBeTrue();
58
- });
59
-
60
- it('should enable button when disabled is not set', async () => {
61
- fixture.componentRef.setInput('isDisabled', false);
62
-
63
- const button = await loader.getHarnessOrNull(MatButtonHarness);
64
- expect(await button.isDisabled()).toBeFalse();
65
- });
66
-
67
- it('should disable button when disabled is not set and show load icon', async () => {
68
- fixture.componentRef.setInput('isInProgress', true);
69
-
70
- const button = await loader.getHarnessOrNull(MatButtonHarness);
71
- const icon = await button.getHarness(MatIconHarness);
72
- expect(await button.isDisabled()).toBeTrue();
73
- expect(await icon.getName()).toBe('update');
74
- });
75
-
76
- it('should not show any icon when not set', async () => {
77
- fixture.componentRef.setInput('icon', null);
78
-
79
- const button = await loader.getHarnessOrNull(MatButtonHarness);
80
- const icon = await button.getHarnessOrNull(MatIconHarness);
81
- expect(icon).toBe(null);
82
- });
83
-
84
- it('should emit buttonClick event when clicked', async () => {
85
- const clickSpy = spyOn(component.buttonClick, 'emit');
86
- const button = await loader.getHarness(MatButtonHarness);
87
-
88
- await button.click();
89
-
90
- expect(clickSpy).toHaveBeenCalled();
91
- });
92
-
93
- it('should add small-button class when small is set', () => {
94
- fixture.componentRef.setInput('small', false);
95
-
96
- fixture.detectChanges();
97
-
98
- expect(fixture.nativeElement.querySelector('button')).not.toHaveClass('small-button');
99
-
100
- fixture.componentRef.setInput('small', true);
101
-
102
- fixture.detectChanges();
103
-
104
- expect(fixture.nativeElement.querySelector('button')).toHaveClass('small-button');
105
- });
106
- });
@@ -1,17 +0,0 @@
1
- import { NgClass } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { MatButton } from '@angular/material/button';
4
- import { MatIcon } from '@angular/material/icon';
5
- import { TranslateModule } from '@ngx-translate/core';
6
- import { BaseButtonWithLabel } from '../base-button';
7
-
8
- @Component({
9
- selector: 'cauca-basic-button',
10
- standalone: true,
11
- changeDetection: ChangeDetectionStrategy.OnPush,
12
- imports: [MatIcon, MatButton, TranslateModule, NgClass],
13
- templateUrl: './basic-button.component.html',
14
- styleUrl: './basic-button.component.scss'
15
- })
16
- export class BasicButtonComponent extends BaseButtonWithLabel {
17
- }
@@ -1,3 +0,0 @@
1
- <button mat-fab [color]="color()" onclick="this.blur()" [disabled]="buttonDisabled()" (click)="buttonClick.emit()">
2
- @if (showIcon()) { <mat-icon [style.color]="iconColor()" [class.button-spin]="isInProgress()">{{iconToShow()}}</mat-icon> }
3
- </button>
@@ -1,12 +0,0 @@
1
- .mdc-button.mat-white,
2
- .mat-mdc-fab {
3
- color: white;
4
- border-color: white;
5
- }
6
- .mdc-button.mat-white:hover,
7
- .mat-mdc-outlined-button.mat-white:hover {
8
- background-color: transparent;
9
- }
10
- mat-icon {
11
- color: inherit;
12
- }