@cauca-911/material 21.0.1 → 21.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) 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 +4145 -0
  7. package/fesm2022/cauca-911-material.mjs.map +1 -0
  8. package/package.json +38 -23
  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/cauca-911-material-21.0.0.tgz +0 -0
  13. package/karma.conf.js +0 -50
  14. package/ng-package.json +0 -7
  15. package/src/lib/cauca-material.component.html +0 -1
  16. package/src/lib/cauca-material.component.spec.ts +0 -29
  17. package/src/lib/cauca-material.component.ts +0 -12
  18. package/src/lib/cauca-material.service.spec.ts +0 -16
  19. package/src/lib/cauca-material.service.ts +0 -7
  20. package/src/lib/components/button/button.component.html +0 -52
  21. package/src/lib/components/button/button.component.scss +0 -6
  22. package/src/lib/components/button/button.component.spec.ts +0 -142
  23. package/src/lib/components/button/button.component.ts +0 -22
  24. package/src/lib/components/buttons/base-button.ts +0 -35
  25. package/src/lib/components/buttons/basic-button/basic-button.component.html +0 -5
  26. package/src/lib/components/buttons/basic-button/basic-button.component.scss +0 -12
  27. package/src/lib/components/buttons/basic-button/basic-button.component.spec.ts +0 -106
  28. package/src/lib/components/buttons/basic-button/basic-button.component.ts +0 -17
  29. package/src/lib/components/buttons/fab-button/fab-button.component.html +0 -3
  30. package/src/lib/components/buttons/fab-button/fab-button.component.scss +0 -12
  31. package/src/lib/components/buttons/fab-button/fab-button.component.spec.ts +0 -82
  32. package/src/lib/components/buttons/fab-button/fab-button.component.ts +0 -16
  33. package/src/lib/components/buttons/flat-button/flat-button.component.html +0 -5
  34. package/src/lib/components/buttons/flat-button/flat-button.component.scss +0 -12
  35. package/src/lib/components/buttons/flat-button/flat-button.component.spec.ts +0 -106
  36. package/src/lib/components/buttons/flat-button/flat-button.component.ts +0 -17
  37. package/src/lib/components/buttons/icon-button/icon-button.component.html +0 -3
  38. package/src/lib/components/buttons/icon-button/icon-button.component.scss +0 -23
  39. package/src/lib/components/buttons/icon-button/icon-button.component.spec.ts +0 -38
  40. package/src/lib/components/buttons/icon-button/icon-button.component.ts +0 -15
  41. package/src/lib/components/buttons/link-button/link-button.component.html +0 -1
  42. package/src/lib/components/buttons/link-button/link-button.component.scss +0 -3
  43. package/src/lib/components/buttons/link-button/link-button.component.spec.ts +0 -97
  44. package/src/lib/components/buttons/link-button/link-button.component.ts +0 -25
  45. package/src/lib/components/buttons/menu-item/menu-item.component.html +0 -5
  46. package/src/lib/components/buttons/menu-item/menu-item.component.scss +0 -6
  47. package/src/lib/components/buttons/menu-item/menu-item.component.spec.ts +0 -66
  48. package/src/lib/components/buttons/menu-item/menu-item.component.ts +0 -19
  49. package/src/lib/components/buttons/raised-button/raised-button.component.html +0 -5
  50. package/src/lib/components/buttons/raised-button/raised-button.component.scss +0 -12
  51. package/src/lib/components/buttons/raised-button/raised-button.component.spec.ts +0 -108
  52. package/src/lib/components/buttons/raised-button/raised-button.component.ts +0 -17
  53. package/src/lib/components/buttons/refresh-button/refresh-button.component.html +0 -1
  54. package/src/lib/components/buttons/refresh-button/refresh-button.component.scss +0 -0
  55. package/src/lib/components/buttons/refresh-button/refresh-button.component.spec.ts +0 -81
  56. package/src/lib/components/buttons/refresh-button/refresh-button.component.ts +0 -19
  57. package/src/lib/components/buttons/round-button/round-button.component.html +0 -3
  58. package/src/lib/components/buttons/round-button/round-button.component.scss +0 -34
  59. package/src/lib/components/buttons/round-button/round-button.component.spec.ts +0 -26
  60. package/src/lib/components/buttons/round-button/round-button.component.ts +0 -14
  61. package/src/lib/components/buttons/stroked-button/stroked-button.component.html +0 -5
  62. package/src/lib/components/buttons/stroked-button/stroked-button.component.scss +0 -23
  63. package/src/lib/components/buttons/stroked-button/stroked-button.component.spec.ts +0 -114
  64. package/src/lib/components/buttons/stroked-button/stroked-button.component.ts +0 -17
  65. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.html +0 -9
  66. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.scss +0 -7
  67. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.spec.ts +0 -68
  68. package/src/lib/components/cauca-date-time-picker/cauca-date-time-picker.component.ts +0 -155
  69. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.html +0 -6
  70. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.scss +0 -25
  71. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.spec.ts +0 -23
  72. package/src/lib/components/cauca-date-time-picker/components/desktop-time-picker/desktop-time-picker.component.ts +0 -23
  73. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.html +0 -77
  74. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.scss +0 -124
  75. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.spec.ts +0 -96
  76. package/src/lib/components/cauca-date-time-picker/components/dialog-date-time-picker/dialog-date-time-picker.component.ts +0 -228
  77. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.html +0 -9
  78. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.scss +0 -15
  79. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.spec.ts +0 -105
  80. package/src/lib/components/cauca-date-time-picker/components/mobile-time-picker/mobile-time-picker.component.ts +0 -48
  81. package/src/lib/components/cauca-date-time-picker/models/dialog-date-time-picker-data.ts +0 -29
  82. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.html +0 -14
  83. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.scss +0 -3
  84. package/src/lib/components/deprecated-components/cauca-input-file/cauca-input-file.component.ts +0 -87
  85. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.html +0 -12
  86. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.scss +0 -3
  87. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.spec.ts +0 -35
  88. package/src/lib/components/deprecated-components/cauca-input-multiple-langue/cauca-input-multiple-langue.component.ts +0 -57
  89. package/src/lib/components/deprecated-components/cauca-menu-vertical/cauca-menu-vertical.component.html +0 -49
  90. package/src/lib/components/deprecated-components/cauca-menu-vertical/cauca-menu-vertical.component.ts +0 -56
  91. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.html +0 -11
  92. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.scss +0 -4
  93. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.spec.ts +0 -39
  94. package/src/lib/components/deprecated-components/cauca-simple-dialog/cauca-simple-dialog.component.ts +0 -20
  95. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.html +0 -7
  96. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.scss +0 -41
  97. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.spec.ts +0 -24
  98. package/src/lib/components/deprecated-components/cauca-slideshow/cauca-slideshow.component.ts +0 -67
  99. package/src/lib/components/deprecated-components/shared/models/menu-item.ts +0 -11
  100. package/src/lib/components/deprecated-components/shared/models/simple-dialog-data.ts +0 -5
  101. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.html +0 -10
  102. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.scss +0 -14
  103. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.spec.ts +0 -90
  104. package/src/lib/components/dialogs/alert-dialog/alert-dialog.component.ts +0 -41
  105. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.html +0 -11
  106. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.scss +0 -29
  107. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.spec.ts +0 -137
  108. package/src/lib/components/dialogs/confirm-dialog/confirm-dialog.component.ts +0 -47
  109. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.html +0 -17
  110. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.scss +0 -14
  111. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.spec.ts +0 -96
  112. package/src/lib/components/dialogs/delete-dialog/delete-dialog.component.ts +0 -40
  113. package/src/lib/components/dialogs/delete-dialog/models/delete-dialog-data.spec.ts +0 -7
  114. package/src/lib/components/dialogs/delete-dialog/models/delete-dialog-data.ts +0 -5
  115. package/src/lib/components/dialogs/dialog-styles.css +0 -9
  116. package/src/lib/components/dialogs/dialog-styles.scss +0 -9
  117. package/src/lib/components/dialogs/error-dialog/error-dialog.component.html +0 -10
  118. package/src/lib/components/dialogs/error-dialog/error-dialog.component.scss +0 -10
  119. package/src/lib/components/dialogs/error-dialog/error-dialog.component.spec.ts +0 -91
  120. package/src/lib/components/dialogs/error-dialog/error-dialog.component.ts +0 -32
  121. package/src/lib/components/dialogs/services/dialog.service.spec.ts +0 -82
  122. package/src/lib/components/dialogs/services/dialog.service.ts +0 -107
  123. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.html +0 -24
  124. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.scss +0 -22
  125. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.spec.ts +0 -126
  126. package/src/lib/components/dialogs/text-input-dialog/text-input-dialog.component.ts +0 -66
  127. package/src/lib/components/inputs/color-picker/color-picker.component.html +0 -9
  128. package/src/lib/components/inputs/color-picker/color-picker.component.scss +0 -0
  129. package/src/lib/components/inputs/color-picker/color-picker.component.spec.ts +0 -29
  130. package/src/lib/components/inputs/color-picker/color-picker.component.ts +0 -111
  131. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.html +0 -13
  132. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.scss +0 -0
  133. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.spec.ts +0 -80
  134. package/src/lib/components/inputs/date-range-picker/date-range-picker.component.ts +0 -46
  135. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.html +0 -40
  136. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.scss +0 -39
  137. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.spec.ts +0 -135
  138. package/src/lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.ts +0 -263
  139. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.html +0 -6
  140. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.scss +0 -27
  141. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.spec.ts +0 -90
  142. package/src/lib/components/inputs/password/password-criteria/password-criteria.component.ts +0 -17
  143. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.html +0 -5
  144. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.scss +0 -8
  145. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.spec.ts +0 -98
  146. package/src/lib/components/inputs/password/password-criteria-viewer/password-criteria-viewer.component.ts +0 -16
  147. package/src/lib/components/inputs/password/password-input/password-input.component.html +0 -11
  148. package/src/lib/components/inputs/password/password-input/password-input.component.scss +0 -12
  149. package/src/lib/components/inputs/password/password-input/password-input.component.spec.ts +0 -141
  150. package/src/lib/components/inputs/password/password-input/password-input.component.ts +0 -67
  151. package/src/lib/components/inputs/password/password-selection/password-selection.component.html +0 -15
  152. package/src/lib/components/inputs/password/password-selection/password-selection.component.scss +0 -32
  153. package/src/lib/components/inputs/password/password-selection/password-selection.component.spec.ts +0 -138
  154. package/src/lib/components/inputs/password/password-selection/password-selection.component.ts +0 -101
  155. package/src/lib/components/inputs/select-with-search/select-with-search.component.html +0 -19
  156. package/src/lib/components/inputs/select-with-search/select-with-search.component.scss +0 -0
  157. package/src/lib/components/inputs/select-with-search/select-with-search.component.spec.ts +0 -215
  158. package/src/lib/components/inputs/select-with-search/select-with-search.component.ts +0 -108
  159. package/src/lib/components/layout/expandable-panel/expandable-panel.component.html +0 -14
  160. package/src/lib/components/layout/expandable-panel/expandable-panel.component.scss +0 -48
  161. package/src/lib/components/layout/expandable-panel/expandable-panel.component.spec.ts +0 -48
  162. package/src/lib/components/layout/expandable-panel/expandable-panel.component.ts +0 -19
  163. package/src/lib/components/layout/group-container/group-container.component.html +0 -6
  164. package/src/lib/components/layout/group-container/group-container.component.scss +0 -22
  165. package/src/lib/components/layout/group-container/group-container.component.spec.ts +0 -34
  166. package/src/lib/components/layout/group-container/group-container.component.ts +0 -14
  167. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.html +0 -13
  168. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.scss +0 -27
  169. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.spec.ts +0 -144
  170. package/src/lib/components/layout/menu-expandable-panel/menu-expandable-panel.component.ts +0 -52
  171. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.html +0 -4
  172. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.scss +0 -10
  173. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.spec.ts +0 -80
  174. package/src/lib/components/layout/menu-expandable-panel-item/menu-expandable-panel-item.component.ts +0 -28
  175. package/src/lib/components/layout/page-title/page-title.component.html +0 -28
  176. package/src/lib/components/layout/page-title/page-title.component.scss +0 -40
  177. package/src/lib/components/layout/page-title/page-title.component.spec.ts +0 -162
  178. package/src/lib/components/layout/page-title/page-title.component.ts +0 -28
  179. package/src/lib/components/layout/sections/main-section/main-section.component.html +0 -6
  180. package/src/lib/components/layout/sections/main-section/main-section.component.scss +0 -27
  181. package/src/lib/components/layout/sections/main-section/main-section.component.spec.ts +0 -42
  182. package/src/lib/components/layout/sections/main-section/main-section.component.ts +0 -13
  183. package/src/lib/components/layout/sections/section-column/section-column.component.html +0 -3
  184. package/src/lib/components/layout/sections/section-column/section-column.component.scss +0 -18
  185. package/src/lib/components/layout/sections/section-column/section-column.component.spec.ts +0 -35
  186. package/src/lib/components/layout/sections/section-column/section-column.component.ts +0 -12
  187. package/src/lib/components/layout/sections/section-field/section-field.component.html +0 -21
  188. package/src/lib/components/layout/sections/section-field/section-field.component.scss +0 -44
  189. package/src/lib/components/layout/sections/section-field/section-field.component.spec.ts +0 -74
  190. package/src/lib/components/layout/sections/section-field/section-field.component.ts +0 -22
  191. package/src/lib/components/list-paginator/list-paginator.component.html +0 -16
  192. package/src/lib/components/list-paginator/list-paginator.component.scss +0 -46
  193. package/src/lib/components/list-paginator/list-paginator.component.spec.ts +0 -248
  194. package/src/lib/components/list-paginator/list-paginator.component.ts +0 -81
  195. package/src/lib/components/misc/loading-error/loading-error.component.html +0 -11
  196. package/src/lib/components/misc/loading-error/loading-error.component.scss +0 -0
  197. package/src/lib/components/misc/loading-error/loading-error.component.spec.ts +0 -75
  198. package/src/lib/components/misc/loading-error/loading-error.component.ts +0 -18
  199. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.html +0 -3
  200. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.scss +0 -0
  201. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.spec.ts +0 -43
  202. package/src/lib/components/misc/loading-spinner-indicator/loading-spinner-indicator.component.ts +0 -16
  203. package/src/lib/components/misc/snack-bar/snack-bar.component.html +0 -16
  204. package/src/lib/components/misc/snack-bar/snack-bar.component.scss +0 -84
  205. package/src/lib/components/misc/snack-bar/snack-bar.component.spec.ts +0 -136
  206. package/src/lib/components/misc/snack-bar/snack-bar.component.ts +0 -39
  207. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.html +0 -11
  208. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.scss +0 -0
  209. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.spec.ts +0 -67
  210. package/src/lib/components/notifications/saving-confirmed-box/saving-confirmed-box.component.ts +0 -15
  211. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.html +0 -11
  212. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.scss +0 -0
  213. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.spec.ts +0 -77
  214. package/src/lib/components/notifications/saving-error-box/saving-error-box.component.ts +0 -17
  215. package/src/lib/components/presenters/badge/badge.component.html +0 -6
  216. package/src/lib/components/presenters/badge/badge.component.scss +0 -10
  217. package/src/lib/components/presenters/badge/badge.component.spec.ts +0 -41
  218. package/src/lib/components/presenters/badge/badge.component.ts +0 -18
  219. package/src/lib/components/presenters/icon/icon.component.scss +0 -9
  220. package/src/lib/components/presenters/icon/icon.component.spec.ts +0 -38
  221. package/src/lib/components/presenters/icon/icon.component.ts +0 -37
  222. package/src/lib/core/breadcrumb.service.spec.ts +0 -35
  223. package/src/lib/core/breadcrumb.service.ts +0 -24
  224. package/src/lib/core/directives/auto-trim-and-lower.directive.spec.ts +0 -22
  225. package/src/lib/core/directives/auto-trim-and-lower.directive.ts +0 -19
  226. package/src/lib/core/directives/form-error/form-error.module.ts +0 -21
  227. package/src/lib/core/directives/form-error/has-error-root.directive.ts +0 -31
  228. package/src/lib/core/directives/form-error/has-error.directive.ts +0 -95
  229. package/src/lib/core/loading-state.service.spec.ts +0 -57
  230. package/src/lib/core/loading-state.service.ts +0 -44
  231. package/src/lib/core/models/breadcrumb-location.ts +0 -6
  232. package/src/lib/core/models/password-validation.ts +0 -20
  233. package/src/lib/core/validators/password/password-validator.spec.ts +0 -155
  234. package/src/lib/core/validators/password/password-validator.ts +0 -30
  235. package/src/lib/provide-cauca-material.ts +0 -10
  236. package/src/public-api.ts +0 -70
  237. package/src/test.ts +0 -17
  238. package/tsconfig.lib.json +0 -18
  239. package/tsconfig.lib.prod.json +0 -4
  240. package/tsconfig.spec.json +0 -17
  241. /package/{src/assets → assets}/images/loading.gif +0 -0
package/.eslintrc.json DELETED
@@ -1,79 +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
- "style": "kebab-case"
27
- }
28
- ],
29
- "@angular-eslint/directive-selector": [
30
- "error",
31
- {
32
- "type": "attribute",
33
- "prefix": "",
34
- "style": "camelCase"
35
- }
36
- ],
37
- "@angular-eslint/prefer-standalone": "off",
38
- "@typescript-eslint/consistent-type-definitions": "error",
39
- "@typescript-eslint/dot-notation": "off",
40
- "@typescript-eslint/explicit-member-accessibility": [
41
- "error",
42
- {
43
- "accessibility": "explicit"
44
- }
45
- ],
46
- "@typescript-eslint/no-inferrable-types": "off",
47
- "@typescript-eslint/member-ordering": [
48
- "error", {
49
- "default": [
50
- "signature",
51
- "public-field",
52
- "protected-field",
53
- "private-field",
54
- ["get", "set"],
55
- "constructor",
56
- "public-method",
57
- "protected-method",
58
- "private-method"
59
- ]
60
- }
61
- ],
62
- "brace-style": [
63
- "error",
64
- "1tbs"
65
- ],
66
- "id-blacklist": "off",
67
- "id-match": "off",
68
- "no-underscore-dangle": "off",
69
- "@angular-eslint/prefer-inject": "off"
70
- }
71
- },
72
- {
73
- "files": [
74
- "*.html"
75
- ],
76
- "rules": {}
77
- }
78
- ]
79
- }
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
Binary file
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,142 +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
- fixture.componentRef.setInput('type', 'icon');
38
- fixture.detectChanges();
39
-
40
- const button = await loader.getHarnessOrNull(MatButtonHarness);
41
- expect(await button.getVariant()).toBe('icon');
42
- });
43
-
44
- it('should mat-flat-button when type is flat', async () => {
45
-
46
- fixture.componentRef.setInput('type', 'flat');
47
- fixture.detectChanges();
48
-
49
- const button = await loader.getHarnessOrNull(MatButtonHarness);
50
- expect(await button.getAppearance()).toBe('filled');
51
- });
52
-
53
- it('should mat-raised-button when type is raised', async () => {
54
-
55
- fixture.componentRef.setInput('type', 'raised');
56
- fixture.detectChanges();
57
-
58
- const button = await loader.getHarnessOrNull(MatButtonHarness);
59
- expect(await button.getAppearance()).toBe('elevated');
60
- });
61
-
62
- it('should mat-stroked-button when type is stroked', async () => {
63
-
64
- fixture.componentRef.setInput('type', 'stroked');
65
-
66
- fixture.detectChanges();
67
-
68
- const button = await loader.getHarnessOrNull(MatButtonHarness);
69
- expect(await button.getAppearance()).toBe('outlined');
70
- });
71
-
72
- it('should mat-basic-button when type is basic', async () => {
73
-
74
- fixture.componentRef.setInput('type', 'basic');
75
-
76
- const button = await loader.getHarnessOrNull(MatButtonHarness);
77
- expect(await button.getVariant()).toBe('basic');
78
- });
79
-
80
- it('should correctly display label', async () => {
81
- const someLabel = 'someLabel';
82
-
83
- fixture.componentRef.setInput('label', someLabel);
84
- fixture.detectChanges();
85
-
86
- const button = await loader.getHarnessOrNull(MatButtonHarness);
87
- expect(await button.getText()).toBe(someLabel);
88
- });
89
-
90
- it('should disable button when disabled is set', async () => {
91
- fixture.componentRef.setInput('disable', true);
92
- fixture.detectChanges();
93
-
94
- const button = await loader.getHarnessOrNull(MatButtonHarness);
95
- expect(await button.isDisabled()).toBeTrue();
96
- });
97
-
98
- it('should enable button when disabled is not set', async () => {
99
- fixture.componentRef.setInput('disable', false);
100
- fixture.detectChanges();
101
-
102
- const button = await loader.getHarnessOrNull(MatButtonHarness);
103
- expect(await button.isDisabled()).toBeFalse();
104
- });
105
-
106
- it('should disable button when disabled is not set and show load icon', async () => {
107
- fixture.componentRef.setInput('inProgress', true);
108
- fixture.detectChanges();
109
-
110
- const button = await loader.getHarnessOrNull(MatButtonHarness);
111
- const icon = await button.getHarness(MatIconHarness);
112
- expect(await button.isDisabled()).toBeTrue();
113
- expect(await icon.getName()).toBe('update');
114
- });
115
-
116
- it('should show correct icon when not loading and icon is set', async () => {
117
- fixture.componentRef.setInput('icon', 'test');
118
- fixture.detectChanges();
119
-
120
- const button = await loader.getHarnessOrNull(MatButtonHarness);
121
- const icon = await button.getHarness(MatIconHarness);
122
- expect(await icon.getName()).toBe('test');
123
- });
124
-
125
- it('should not show any icon when not set', async () => {
126
- fixture.componentRef.setInput('icon', null);
127
-
128
- const button = await loader.getHarnessOrNull(MatButtonHarness);
129
- const icon = await button.getHarnessOrNull(MatIconHarness);
130
- expect(icon).toBe(null);
131
- });
132
-
133
- it('should emit buttonClick event when clicked', fakeAsync(async () => {
134
- const clickSpy = spyOn(component.buttonClick, 'emit');
135
- const button = await loader.getHarnessOrNull(MatButtonHarness);
136
-
137
- button.click();
138
- tick();
139
-
140
- expect(clickSpy).toHaveBeenCalled();
141
- }));
142
- });
@@ -1,22 +0,0 @@
1
- import { NgClass } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, input, output } 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
- changeDetection: ChangeDetectionStrategy.OnPush
12
- })
13
- export class ButtonComponent {
14
- public class = input<string | null>(null);
15
- public inProgress = input<boolean>(false);
16
- public disable = input<boolean>(false);
17
- public label = input<string>('');
18
- public icon = input<string | null>(null);
19
- public color = input<string>('');
20
- public type = input<'basic' | 'raised' | 'stroked' | 'flat' | 'icon' | 'fab'>('basic');
21
- public buttonClick = output<void>();
22
- }
@@ -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
- }