cmat 0.0.117 → 0.0.119

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 (203) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +9 -9
  2. package/fesm2022/cmat-components-breadcrumb.mjs +10 -9
  3. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/cmat-components-card.mjs +6 -6
  5. package/fesm2022/cmat-components-card.mjs.map +1 -1
  6. package/fesm2022/cmat-components-carousel.mjs +16 -16
  7. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  8. package/fesm2022/cmat-components-cascade.mjs +1 -863
  9. package/fesm2022/cmat-components-chip-input.mjs +11 -11
  10. package/fesm2022/cmat-components-code-editor.mjs +3 -3
  11. package/fesm2022/cmat-components-color-picker.mjs +45 -45
  12. package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
  13. package/fesm2022/cmat-components-custom-formly.mjs +214 -214
  14. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  15. package/fesm2022/cmat-components-data-picker.mjs +43 -40
  16. package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
  17. package/fesm2022/cmat-components-date-range.mjs +15 -16
  18. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  19. package/fesm2022/cmat-components-date-time-display.mjs +4 -4
  20. package/fesm2022/cmat-components-drawer.mjs +9 -9
  21. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  22. package/fesm2022/cmat-components-empty-state.mjs +4 -4
  23. package/fesm2022/cmat-components-file-preview.mjs +4 -4
  24. package/fesm2022/cmat-components-filter-toolbar.mjs +12 -13
  25. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  26. package/fesm2022/cmat-components-form-actions.mjs +6 -6
  27. package/fesm2022/cmat-components-fullscreen.mjs +4 -4
  28. package/fesm2022/cmat-components-highlight.mjs +7 -7
  29. package/fesm2022/cmat-components-image-viewer.mjs +7 -7
  30. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  31. package/fesm2022/cmat-components-inline-loading.mjs +3 -3
  32. package/fesm2022/cmat-components-json-editor.mjs +7 -7
  33. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  34. package/fesm2022/cmat-components-knob-input.mjs +6 -6
  35. package/fesm2022/cmat-components-loading-overlay.mjs +5 -5
  36. package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
  37. package/fesm2022/cmat-components-masonry.mjs +4 -4
  38. package/fesm2022/cmat-components-material-color-picker.mjs +1 -337
  39. package/fesm2022/cmat-components-material-datetimepicker.mjs +1 -4312
  40. package/fesm2022/cmat-components-navigation.mjs +1 -3081
  41. package/fesm2022/cmat-components-opt-input.mjs +1 -542
  42. package/fesm2022/cmat-components-org-chart.mjs +1 -529
  43. package/fesm2022/cmat-components-page-header.mjs +4 -4
  44. package/fesm2022/cmat-components-pagination.mjs +21 -21
  45. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  46. package/fesm2022/cmat-components-password-strength.mjs +1 -880
  47. package/fesm2022/cmat-components-popover.mjs +1 -1022
  48. package/fesm2022/cmat-components-progress-bar.mjs +4 -4
  49. package/fesm2022/cmat-components-qrcode.mjs +3 -3
  50. package/fesm2022/cmat-components-rating.mjs +8 -8
  51. package/fesm2022/cmat-components-rich-text-editor.mjs +3 -3
  52. package/fesm2022/cmat-components-select-search.mjs +1 -930
  53. package/fesm2022/cmat-components-select-table.mjs +39 -39
  54. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  55. package/fesm2022/cmat-components-select-tree.mjs +28 -27
  56. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  57. package/fesm2022/cmat-components-skeleton.mjs +5 -5
  58. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  59. package/fesm2022/cmat-components-speed-dial.mjs +12 -12
  60. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  61. package/fesm2022/cmat-components-status-tag.mjs +6 -6
  62. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  63. package/fesm2022/cmat-components-table-toolbar.mjs +4 -4
  64. package/fesm2022/cmat-components-timeline.mjs +19 -19
  65. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  66. package/fesm2022/cmat-components-toast.mjs +14 -14
  67. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  68. package/fesm2022/cmat-components-transfer-picker.mjs +48 -49
  69. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  70. package/fesm2022/cmat-components-treetable.mjs +8 -8
  71. package/fesm2022/cmat-components-upload.mjs +17 -17
  72. package/fesm2022/cmat-components-x6-angular-shape.mjs +1 -1
  73. package/fesm2022/cmat-directives-animate-on-scroll.mjs +1 -221
  74. package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
  75. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  76. package/fesm2022/cmat-directives-data-exporter.mjs +1 -544
  77. package/fesm2022/cmat-directives-debounce.mjs +1 -163
  78. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  79. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  80. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -3
  81. package/fesm2022/cmat-lib-mock-api.mjs +8 -8
  82. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  83. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  84. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  85. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  86. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  87. package/fesm2022/cmat-pipes-secure.mjs +6 -6
  88. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  89. package/fesm2022/cmat-reports.mjs +86 -80
  90. package/fesm2022/cmat-reports.mjs.map +1 -1
  91. package/fesm2022/cmat-services-alert.mjs +4 -4
  92. package/fesm2022/cmat-services-config.mjs +6 -6
  93. package/fesm2022/cmat-services-confirmation.mjs +1 -185
  94. package/fesm2022/cmat-services-data.mjs +5 -5
  95. package/fesm2022/cmat-services-export-as.mjs +4 -4
  96. package/fesm2022/cmat-services-loading.mjs +6 -6
  97. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  98. package/fesm2022/cmat-services-media-watcher.mjs +4 -4
  99. package/fesm2022/cmat-services-platform.mjs +4 -4
  100. package/fesm2022/cmat-services-print.mjs +3 -3
  101. package/fesm2022/cmat-services-splash-screen.mjs +4 -4
  102. package/fesm2022/cmat-services-title.mjs +6 -6
  103. package/fesm2022/cmat-services-translation.mjs +4 -4
  104. package/fesm2022/cmat-services-utils.mjs +7 -7
  105. package/fesm2022/cmat.mjs +77 -39579
  106. package/fesm2022/public-api-BE83BHd7.mjs +930 -0
  107. package/fesm2022/public-api-BE83BHd7.mjs.map +1 -0
  108. package/fesm2022/public-api-BcmOSkgf.mjs +542 -0
  109. package/fesm2022/public-api-BcmOSkgf.mjs.map +1 -0
  110. package/fesm2022/public-api-BmMqKDzm.mjs +4312 -0
  111. package/fesm2022/public-api-BmMqKDzm.mjs.map +1 -0
  112. package/fesm2022/public-api-BnRFazGR.mjs +221 -0
  113. package/fesm2022/public-api-BnRFazGR.mjs.map +1 -0
  114. package/fesm2022/public-api-C9N9rKkB.mjs +185 -0
  115. package/fesm2022/public-api-C9N9rKkB.mjs.map +1 -0
  116. package/fesm2022/public-api-CXmCX9ZQ.mjs +863 -0
  117. package/fesm2022/public-api-CXmCX9ZQ.mjs.map +1 -0
  118. package/fesm2022/public-api-CfILyvuV.mjs +880 -0
  119. package/fesm2022/public-api-CfILyvuV.mjs.map +1 -0
  120. package/fesm2022/public-api-CgtBw-7O.mjs +163 -0
  121. package/fesm2022/public-api-CgtBw-7O.mjs.map +1 -0
  122. package/fesm2022/public-api-DEtzrfqy.mjs +544 -0
  123. package/fesm2022/public-api-DEtzrfqy.mjs.map +1 -0
  124. package/fesm2022/public-api-EK51WC1y.mjs +1022 -0
  125. package/fesm2022/public-api-EK51WC1y.mjs.map +1 -0
  126. package/fesm2022/public-api-IpTsAgZ4.mjs +3081 -0
  127. package/fesm2022/public-api-IpTsAgZ4.mjs.map +1 -0
  128. package/fesm2022/public-api-iRaKIVmd.mjs +338 -0
  129. package/fesm2022/public-api-iRaKIVmd.mjs.map +1 -0
  130. package/fesm2022/public-api-nzzDLiDj.mjs +529 -0
  131. package/fesm2022/public-api-nzzDLiDj.mjs.map +1 -0
  132. package/fesm2022/{cmat-quill-docx-exporter-D9Eo73Wq.mjs → quill-docx-exporter-D9Eo73Wq.mjs} +1 -1
  133. package/fesm2022/quill-docx-exporter-D9Eo73Wq.mjs.map +1 -0
  134. package/package.json +23 -22
  135. package/types/cmat-components-breadcrumb.d.ts +1 -1
  136. package/types/cmat-components-chip-input.d.ts +3 -3
  137. package/types/cmat-components-custom-formly.d.ts +2 -857
  138. package/types/cmat-components-data-picker.d.ts +12 -6
  139. package/types/cmat-components-date-range.d.ts +1 -1
  140. package/types/cmat-components-drawer.d.ts +1 -1
  141. package/types/cmat-components-form-actions.d.ts +1 -1
  142. package/types/cmat-components-knob-input.d.ts +1 -1
  143. package/types/cmat-components-masonry.d.ts +2 -1
  144. package/types/cmat-components-material-color-picker.d.ts +1 -1
  145. package/types/cmat-components-material-datetimepicker.d.ts +2 -836
  146. package/types/cmat-components-navigation.d.ts +1 -1
  147. package/types/cmat-components-opt-input.d.ts +2 -113
  148. package/types/cmat-components-org-chart.d.ts +1 -1
  149. package/types/cmat-components-page-header.d.ts +1 -1
  150. package/types/cmat-components-password-strength.d.ts +2 -201
  151. package/types/cmat-components-popover.d.ts +2 -270
  152. package/types/cmat-components-qrcode.d.ts +2 -113
  153. package/types/cmat-components-rating.d.ts +1 -1
  154. package/types/cmat-components-rich-text-editor.d.ts +1 -1
  155. package/types/cmat-components-select-search.d.ts +2 -200
  156. package/types/cmat-components-select-table.d.ts +3 -3
  157. package/types/cmat-components-select-tree.d.ts +6 -5
  158. package/types/cmat-components-status-tag.d.ts +2 -2
  159. package/types/cmat-components-toast.d.ts +2 -1
  160. package/types/cmat-components-transfer-picker.d.ts +2 -2
  161. package/types/cmat-components-upload.d.ts +1 -1
  162. package/types/cmat-components-x6-angular-shape.d.ts +1 -1
  163. package/types/cmat-directives-data-exporter.d.ts +1 -1
  164. package/types/cmat-directives-debounce.d.ts +2 -34
  165. package/types/cmat-directives-equal-validator.d.ts +1 -1
  166. package/types/cmat-directives-seamless-auto-scroll.d.ts +1 -1
  167. package/types/cmat-lib-mock-api.d.ts +3 -2
  168. package/types/cmat-pipes-secure.d.ts +1 -1
  169. package/types/cmat-reports.d.ts +6 -6
  170. package/types/cmat-services-alert.d.ts +1 -1
  171. package/types/cmat-services-confirmation.d.ts +2 -36
  172. package/types/cmat-services-data.d.ts +1 -1
  173. package/types/cmat-services-export-as.d.ts +1 -1
  174. package/types/cmat-services-loading.d.ts +1 -1
  175. package/types/cmat-services-translation.d.ts +1 -1
  176. package/types/cmat-services-utils.d.ts +2 -2
  177. package/types/cmat.d.ts +78 -7676
  178. package/types/public-api-BFGGDRK3.d.ts +201 -0
  179. package/types/public-api-BXS379ev.d.ts +202 -0
  180. package/types/public-api-C4CvABGO.d.ts +114 -0
  181. package/types/public-api-CSYz4G5Z.d.ts +271 -0
  182. package/types/public-api-NSrmlKKH.d.ts +114 -0
  183. package/types/public-api-PfNpHSSm.d.ts +837 -0
  184. package/types/public-api-f3WtygQS.d.ts +35 -0
  185. package/types/public-api-nBuSXSMJ.d.ts +858 -0
  186. package/types/public-api-yYeZrUAV.d.ts +37 -0
  187. package/fesm2022/cmat-components-cascade.mjs.map +0 -1
  188. package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs +0 -294
  189. package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs.map +0 -1
  190. package/fesm2022/cmat-components-material-color-picker.mjs.map +0 -1
  191. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +0 -1
  192. package/fesm2022/cmat-components-navigation.mjs.map +0 -1
  193. package/fesm2022/cmat-components-opt-input.mjs.map +0 -1
  194. package/fesm2022/cmat-components-org-chart.mjs.map +0 -1
  195. package/fesm2022/cmat-components-password-strength.mjs.map +0 -1
  196. package/fesm2022/cmat-components-popover.mjs.map +0 -1
  197. package/fesm2022/cmat-components-select-search.mjs.map +0 -1
  198. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +0 -1
  199. package/fesm2022/cmat-directives-data-exporter.mjs.map +0 -1
  200. package/fesm2022/cmat-directives-debounce.mjs.map +0 -1
  201. package/fesm2022/cmat-quill-docx-exporter-D9Eo73Wq.mjs.map +0 -1
  202. package/fesm2022/cmat-services-confirmation.mjs.map +0 -1
  203. package/fesm2022/cmat.mjs.map +0 -1
@@ -0,0 +1,880 @@
1
+ import * as i2 from "@angular/material/core";
2
+ import { MatRippleModule } from "@angular/material/core";
3
+ import * as i0 from "@angular/core";
4
+ import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, effect, input, output, signal, untracked } from "@angular/core";
5
+ import * as i1$2 from "@angular/material/button";
6
+ import { MatButtonModule } from "@angular/material/button";
7
+ import * as i3 from "@angular/material/icon";
8
+ import { MatIconModule } from "@angular/material/icon";
9
+ import { FormControl, Validators } from "@angular/forms";
10
+ import * as i1 from "@angular/material/card";
11
+ import { MatCardModule } from "@angular/material/card";
12
+ import * as i1$1 from "@angular/material/progress-bar";
13
+ import { MatProgressBarModule } from "@angular/material/progress-bar";
14
+ var CmatPassToggleVisibilityComponent = class CmatPassToggleVisibilityComponent {
15
+ constructor() {
16
+ this.isVisible = input(false, ...ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []);
17
+ this.isVisibleChange = output();
18
+ this.tabindex = input(...ngDevMode ? [void 0, { debugName: "tabindex" }] : /* istanbul ignore next */ []);
19
+ this._type = "text";
20
+ }
21
+ get type() {
22
+ return this.isVisible() ? "text" : "password";
23
+ }
24
+ toggleVisibility() {
25
+ const newValue = !this.isVisible();
26
+ this.isVisibleChange.emit(newValue);
27
+ }
28
+ static {
29
+ this.ɵfac = i0.ɵɵngDeclareFactory({
30
+ minVersion: "12.0.0",
31
+ version: "22.3.0",
32
+ ngImport: i0,
33
+ type: CmatPassToggleVisibilityComponent,
34
+ deps: [],
35
+ target: i0.ɵɵFactoryTarget.Component
36
+ });
37
+ }
38
+ static {
39
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
40
+ minVersion: "17.1.0",
41
+ version: "22.3.0",
42
+ type: CmatPassToggleVisibilityComponent,
43
+ isStandalone: true,
44
+ selector: "cmat-pass-toggle-visibility",
45
+ inputs: {
46
+ isVisible: {
47
+ classPropertyName: "isVisible",
48
+ publicName: "isVisible",
49
+ isSignal: true,
50
+ isRequired: false,
51
+ transformFunction: null
52
+ },
53
+ tabindex: {
54
+ classPropertyName: "tabindex",
55
+ publicName: "tabindex",
56
+ isSignal: true,
57
+ isRequired: false,
58
+ transformFunction: null
59
+ }
60
+ },
61
+ outputs: { isVisibleChange: "isVisibleChange" },
62
+ exportAs: ["cmatPassToggleVisibility"],
63
+ ngImport: i0,
64
+ template: "<button type=\"button\" class=\"matIconButton cdk-focused cdk-mouse-focused\" matIconButton \r\n matRipple [matRippleCentered]=\"true\" [attr.tabindex]=\"tabindex() ? tabindex() : null\" (click)=\"toggleVisibility()\">\r\n <mat-icon svgIcon=\"{{isVisible() ? 'mat_outline:visibility' : 'mat_outline:visibility_off' }}\"></mat-icon>\r\n</button>\r\n",
65
+ dependencies: [
66
+ {
67
+ kind: "ngmodule",
68
+ type: MatButtonModule
69
+ },
70
+ {
71
+ kind: "component",
72
+ type: i1$2.MatIconButton,
73
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
74
+ exportAs: ["matButton", "matAnchor"]
75
+ },
76
+ {
77
+ kind: "ngmodule",
78
+ type: MatRippleModule
79
+ },
80
+ {
81
+ kind: "directive",
82
+ type: i2.MatRipple,
83
+ selector: "[mat-ripple], [matRipple]",
84
+ inputs: [
85
+ "matRippleColor",
86
+ "matRippleUnbounded",
87
+ "matRippleCentered",
88
+ "matRippleRadius",
89
+ "matRippleAnimation",
90
+ "matRippleDisabled",
91
+ "matRippleTrigger"
92
+ ],
93
+ exportAs: ["matRipple"]
94
+ },
95
+ {
96
+ kind: "ngmodule",
97
+ type: MatIconModule
98
+ },
99
+ {
100
+ kind: "component",
101
+ type: i3.MatIcon,
102
+ selector: "mat-icon",
103
+ inputs: [
104
+ "color",
105
+ "inline",
106
+ "svgIcon",
107
+ "fontSet",
108
+ "fontIcon"
109
+ ],
110
+ exportAs: ["matIcon"]
111
+ }
112
+ ],
113
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
114
+ encapsulation: i0.ViewEncapsulation.None
115
+ });
116
+ }
117
+ };
118
+ i0.ɵɵngDeclareClassMetadata({
119
+ minVersion: "12.0.0",
120
+ version: "22.3.0",
121
+ ngImport: i0,
122
+ type: CmatPassToggleVisibilityComponent,
123
+ decorators: [{
124
+ type: Component,
125
+ args: [{
126
+ selector: "cmat-pass-toggle-visibility",
127
+ encapsulation: ViewEncapsulation.None,
128
+ changeDetection: ChangeDetectionStrategy.OnPush,
129
+ exportAs: "cmatPassToggleVisibility",
130
+ imports: [
131
+ MatButtonModule,
132
+ MatRippleModule,
133
+ MatIconModule
134
+ ],
135
+ template: "<button type=\"button\" class=\"matIconButton cdk-focused cdk-mouse-focused\" matIconButton \r\n matRipple [matRippleCentered]=\"true\" [attr.tabindex]=\"tabindex() ? tabindex() : null\" (click)=\"toggleVisibility()\">\r\n <mat-icon svgIcon=\"{{isVisible() ? 'mat_outline:visibility' : 'mat_outline:visibility_off' }}\"></mat-icon>\r\n</button>\r\n"
136
+ }]
137
+ }],
138
+ propDecorators: {
139
+ isVisible: [{
140
+ type: i0.Input,
141
+ args: [{
142
+ isSignal: true,
143
+ alias: "isVisible",
144
+ required: false
145
+ }]
146
+ }],
147
+ isVisibleChange: [{
148
+ type: i0.Output,
149
+ args: ["isVisibleChange"]
150
+ }],
151
+ tabindex: [{
152
+ type: i0.Input,
153
+ args: [{
154
+ isSignal: true,
155
+ alias: "tabindex",
156
+ required: false
157
+ }]
158
+ }]
159
+ }
160
+ });
161
+ var Colors;
162
+ (function(Colors) {
163
+ Colors["primary"] = "primary";
164
+ Colors["accent"] = "accent";
165
+ Colors["warn"] = "warn";
166
+ })(Colors || (Colors = {}));
167
+ var Criteria;
168
+ (function(Criteria) {
169
+ Criteria["at_least_eight_chars"] = "minChar";
170
+ Criteria["at_least_one_lower_case_char"] = "lowerCase";
171
+ Criteria["at_least_one_upper_case_char"] = "upperCase";
172
+ Criteria["at_least_one_digit_char"] = "digit";
173
+ Criteria["at_least_one_special_char"] = " specialChar";
174
+ Criteria["at_custom_chars"] = "customChars";
175
+ })(Criteria || (Criteria = {}));
176
+ var CmatPasswordStrengthValidator = class {
177
+ isUndefinedOrEmpty(control) {
178
+ const value = typeof control.value === "string" ? control.value : "";
179
+ if (!value || value.length === 0) return;
180
+ }
181
+ validate(criteria, regex) {
182
+ return (control) => {
183
+ this.isUndefinedOrEmpty(control);
184
+ const value = typeof control.value === "string" ? control.value : "";
185
+ if (!regex.test(value)) {
186
+ const failed = {};
187
+ failed[criteria] = {
188
+ actualValue: value,
189
+ requiredPattern: regex
190
+ };
191
+ return failed;
192
+ }
193
+ return null;
194
+ };
195
+ }
196
+ confirm(password) {
197
+ return (control) => {
198
+ this.isUndefinedOrEmpty(control);
199
+ const value = typeof control.value === "string" ? control.value : "";
200
+ if (value !== password) return { notConfirmed: {
201
+ password,
202
+ passwordConfirmation: value
203
+ } };
204
+ return null;
205
+ };
206
+ }
207
+ };
208
+ const RegExpValidator = {
209
+ "lowerCase": RegExp(/^(?=.*?[a-z])/),
210
+ "upperCase": RegExp(/^(?=.*?[A-Z])/),
211
+ "digit": RegExp(/^(?=.*?[0-9])/),
212
+ "specialChar": RegExp(/^(?=.*?[" !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"])/)
213
+ };
214
+ var CmatPasswordStrengthComponent = class CmatPasswordStrengthComponent {
215
+ constructor() {
216
+ this.password = input("", ...ngDevMode ? [{ debugName: "password" }] : /* istanbul ignore next */ []);
217
+ this.externalError = input(false, ...ngDevMode ? [{ debugName: "externalError" }] : /* istanbul ignore next */ []);
218
+ this.enableLengthRule = input(true, ...ngDevMode ? [{ debugName: "enableLengthRule" }] : /* istanbul ignore next */ []);
219
+ this.enableLowerCaseLetterRule = input(true, ...ngDevMode ? [{ debugName: "enableLowerCaseLetterRule" }] : /* istanbul ignore next */ []);
220
+ this.enableUpperCaseLetterRule = input(true, ...ngDevMode ? [{ debugName: "enableUpperCaseLetterRule" }] : /* istanbul ignore next */ []);
221
+ this.enableDigitRule = input(true, ...ngDevMode ? [{ debugName: "enableDigitRule" }] : /* istanbul ignore next */ []);
222
+ this.enableSpecialCharRule = input(true, ...ngDevMode ? [{ debugName: "enableSpecialCharRule" }] : /* istanbul ignore next */ []);
223
+ this.min = input(8, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
224
+ this.max = input(30, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
225
+ this.customValidator = input(...ngDevMode ? [void 0, { debugName: "customValidator" }] : /* istanbul ignore next */ []);
226
+ this.warnThreshold = input(21, ...ngDevMode ? [{ debugName: "warnThreshold" }] : /* istanbul ignore next */ []);
227
+ this.accentThreshold = input(81, ...ngDevMode ? [{ debugName: "accentThreshold" }] : /* istanbul ignore next */ []);
228
+ this.strengthChanged = output();
229
+ this.criteriaMap = signal(/* @__PURE__ */ new Map(), ...ngDevMode ? [{ debugName: "criteriaMap" }] : /* istanbul ignore next */ []);
230
+ this.containAtLeastMinChars = signal(false, ...ngDevMode ? [{ debugName: "containAtLeastMinChars" }] : /* istanbul ignore next */ []);
231
+ this.containAtLeastOneLowerCaseLetter = signal(false, ...ngDevMode ? [{ debugName: "containAtLeastOneLowerCaseLetter" }] : /* istanbul ignore next */ []);
232
+ this.containAtLeastOneUpperCaseLetter = signal(false, ...ngDevMode ? [{ debugName: "containAtLeastOneUpperCaseLetter" }] : /* istanbul ignore next */ []);
233
+ this.containAtLeastOneDigit = signal(false, ...ngDevMode ? [{ debugName: "containAtLeastOneDigit" }] : /* istanbul ignore next */ []);
234
+ this.containAtLeastOneSpecialChar = signal(false, ...ngDevMode ? [{ debugName: "containAtLeastOneSpecialChar" }] : /* istanbul ignore next */ []);
235
+ this.containAtCustomChars = signal(false, ...ngDevMode ? [{ debugName: "containAtCustomChars" }] : /* istanbul ignore next */ []);
236
+ this.passwordFormControl = new FormControl();
237
+ this.passwordConfirmationFormControl = new FormControl();
238
+ this.validatorsArray = signal([], ...ngDevMode ? [{ debugName: "validatorsArray" }] : /* istanbul ignore next */ []);
239
+ this.validators = signal(null, ...ngDevMode ? [{ debugName: "validators" }] : /* istanbul ignore next */ []);
240
+ this.strength = computed(() => this._strength() || 0, ...ngDevMode ? [{ debugName: "strength" }] : /* istanbul ignore next */ []);
241
+ this.color = computed(() => this._color(), ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
242
+ this.cmatPasswordStrengthValidator = new CmatPasswordStrengthValidator();
243
+ this._strength = signal(0, ...ngDevMode ? [{ debugName: "_strength" }] : /* istanbul ignore next */ []);
244
+ this._color = signal("warn", ...ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []);
245
+ this._isProcessingEffect = false;
246
+ this.setRulesAndValidators();
247
+ effect(() => {
248
+ if (this._isProcessingEffect) return;
249
+ const pwd = this.password();
250
+ untracked(() => {
251
+ if (!pwd || pwd.length === 0) {
252
+ this.reset();
253
+ return;
254
+ }
255
+ this.calculatePasswordStrength(false);
256
+ });
257
+ });
258
+ effect(() => {
259
+ if (this._isProcessingEffect) return;
260
+ if (this.externalError()) this._color.set(Colors.warn);
261
+ });
262
+ effect(() => {
263
+ if (this._isProcessingEffect) return;
264
+ this.enableLengthRule();
265
+ this.enableLowerCaseLetterRule();
266
+ this.enableUpperCaseLetterRule();
267
+ this.enableDigitRule();
268
+ this.enableSpecialCharRule();
269
+ this.min();
270
+ this.max();
271
+ this.customValidator();
272
+ untracked(() => {
273
+ this.setRulesAndValidators();
274
+ const pwd = this.password();
275
+ if (pwd && pwd.length > 0) this.calculatePasswordStrength(false);
276
+ });
277
+ });
278
+ }
279
+ parseCustomValidatorsRegex() {
280
+ const validator = this.customValidator();
281
+ if (validator instanceof RegExp) return validator;
282
+ else return RegExp(validator);
283
+ }
284
+ setRulesAndValidators() {
285
+ this.validatorsArray.set([]);
286
+ this.criteriaMap.set(/* @__PURE__ */ new Map());
287
+ this.passwordConfirmationFormControl.setValidators(Validators.compose([Validators.required, this.cmatPasswordStrengthValidator.confirm(this.password())]));
288
+ const validators = [Validators.required];
289
+ if (this.enableLengthRule()) {
290
+ this.criteriaMap().set(Criteria.at_least_eight_chars, RegExp(`^.{${this.min()},${this.max()}}$`));
291
+ validators.push(Validators.minLength(this.min()));
292
+ validators.push(Validators.maxLength(this.max()));
293
+ }
294
+ if (this.enableLowerCaseLetterRule()) {
295
+ this.criteriaMap().set(Criteria.at_least_one_lower_case_char, RegExpValidator.lowerCase);
296
+ validators.push(Validators.pattern(RegExpValidator.lowerCase));
297
+ }
298
+ if (this.enableUpperCaseLetterRule()) {
299
+ this.criteriaMap().set(Criteria.at_least_one_upper_case_char, RegExpValidator.upperCase);
300
+ validators.push(Validators.pattern(RegExpValidator.upperCase));
301
+ }
302
+ if (this.enableDigitRule()) {
303
+ this.criteriaMap().set(Criteria.at_least_one_digit_char, RegExpValidator.digit);
304
+ validators.push(Validators.pattern(RegExpValidator.digit));
305
+ }
306
+ if (this.enableSpecialCharRule()) {
307
+ this.criteriaMap().set(Criteria.at_least_one_special_char, RegExpValidator.specialChar);
308
+ validators.push(Validators.pattern(RegExpValidator.specialChar));
309
+ }
310
+ if (this.customValidator()) {
311
+ this.criteriaMap().set(Criteria.at_custom_chars, this.parseCustomValidatorsRegex());
312
+ validators.push(Validators.pattern(this.parseCustomValidatorsRegex()));
313
+ }
314
+ this.criteriaMap().forEach((value, key) => {
315
+ validators.push(this.cmatPasswordStrengthValidator.validate(key, value));
316
+ });
317
+ this.passwordFormControl.setValidators(Validators.compose([...validators]));
318
+ this.validatorsArray.set(validators);
319
+ this.validators.set(Validators.compose([...validators]));
320
+ }
321
+ calculatePasswordStrength(rebuildValidators = false) {
322
+ try {
323
+ this._isProcessingEffect = true;
324
+ if (rebuildValidators) this.setRulesAndValidators();
325
+ const requirements = [];
326
+ const unit = 100 / this.criteriaMap().size;
327
+ requirements.push(this.enableLengthRule() ? this._containAtLeastMinChars() : false, this.enableLowerCaseLetterRule() ? this._containAtLeastOneLowerCaseLetter() : false, this.enableUpperCaseLetterRule() ? this._containAtLeastOneUpperCaseLetter() : false, this.enableDigitRule() ? this._containAtLeastOneDigit() : false, this.enableSpecialCharRule() ? this._containAtLeastOneSpecialChar() : false, this.customValidator() ? this._containCustomChars() : false);
328
+ this._strength.set(requirements.filter((v) => v).length * unit);
329
+ this.strengthChanged.emit(this.strength());
330
+ const currentStrength = this._strength();
331
+ if (currentStrength < this.warnThreshold()) this._color.set(Colors.warn);
332
+ else if (currentStrength < this.accentThreshold()) this._color.set(Colors.accent);
333
+ else this._color.set(Colors.primary);
334
+ } finally {
335
+ this._isProcessingEffect = false;
336
+ }
337
+ }
338
+ reset() {
339
+ try {
340
+ this._isProcessingEffect = true;
341
+ this._strength.set(0);
342
+ this.containAtLeastMinChars.set(false);
343
+ this.containAtLeastOneLowerCaseLetter.set(false);
344
+ this.containAtLeastOneUpperCaseLetter.set(false);
345
+ this.containAtLeastOneDigit.set(false);
346
+ this.containAtCustomChars.set(false);
347
+ this.containAtLeastOneSpecialChar.set(false);
348
+ this._color.set(Colors.warn);
349
+ this.strengthChanged.emit(this.strength());
350
+ } finally {
351
+ this._isProcessingEffect = false;
352
+ }
353
+ }
354
+ _containAtLeastMinChars() {
355
+ const result = this.password().length >= this.min();
356
+ this.containAtLeastMinChars.set(result);
357
+ return result;
358
+ }
359
+ _containAtLeastOneLowerCaseLetter() {
360
+ const result = this.criteriaMap().get(Criteria.at_least_one_lower_case_char)?.test(this.password());
361
+ this.containAtLeastOneLowerCaseLetter.set(result);
362
+ return result ?? false;
363
+ }
364
+ _containAtLeastOneUpperCaseLetter() {
365
+ const result = this.criteriaMap().get(Criteria.at_least_one_upper_case_char)?.test(this.password());
366
+ this.containAtLeastOneUpperCaseLetter.set(result);
367
+ return result ?? false;
368
+ }
369
+ _containAtLeastOneDigit() {
370
+ const result = this.criteriaMap().get(Criteria.at_least_one_digit_char)?.test(this.password());
371
+ this.containAtLeastOneDigit.set(result);
372
+ return result ?? false;
373
+ }
374
+ _containAtLeastOneSpecialChar() {
375
+ const result = this.criteriaMap().get(Criteria.at_least_one_special_char)?.test(this.password());
376
+ this.containAtLeastOneSpecialChar.set(result);
377
+ return result ?? false;
378
+ }
379
+ _containCustomChars() {
380
+ const result = this.criteriaMap().get(Criteria.at_custom_chars)?.test(this.password());
381
+ this.containAtCustomChars.set(result);
382
+ return result ?? false;
383
+ }
384
+ _checkPassword() {
385
+ this.calculatePasswordStrength();
386
+ this.passwordConfirmationFormControl.updateValueAndValidity();
387
+ }
388
+ static {
389
+ this.ɵfac = i0.ɵɵngDeclareFactory({
390
+ minVersion: "12.0.0",
391
+ version: "22.3.0",
392
+ ngImport: i0,
393
+ type: CmatPasswordStrengthComponent,
394
+ deps: [],
395
+ target: i0.ɵɵFactoryTarget.Component
396
+ });
397
+ }
398
+ static {
399
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
400
+ minVersion: "17.1.0",
401
+ version: "22.3.0",
402
+ type: CmatPasswordStrengthComponent,
403
+ isStandalone: true,
404
+ selector: "cmat-password-strength",
405
+ inputs: {
406
+ password: {
407
+ classPropertyName: "password",
408
+ publicName: "password",
409
+ isSignal: true,
410
+ isRequired: false,
411
+ transformFunction: null
412
+ },
413
+ externalError: {
414
+ classPropertyName: "externalError",
415
+ publicName: "externalError",
416
+ isSignal: true,
417
+ isRequired: false,
418
+ transformFunction: null
419
+ },
420
+ enableLengthRule: {
421
+ classPropertyName: "enableLengthRule",
422
+ publicName: "enableLengthRule",
423
+ isSignal: true,
424
+ isRequired: false,
425
+ transformFunction: null
426
+ },
427
+ enableLowerCaseLetterRule: {
428
+ classPropertyName: "enableLowerCaseLetterRule",
429
+ publicName: "enableLowerCaseLetterRule",
430
+ isSignal: true,
431
+ isRequired: false,
432
+ transformFunction: null
433
+ },
434
+ enableUpperCaseLetterRule: {
435
+ classPropertyName: "enableUpperCaseLetterRule",
436
+ publicName: "enableUpperCaseLetterRule",
437
+ isSignal: true,
438
+ isRequired: false,
439
+ transformFunction: null
440
+ },
441
+ enableDigitRule: {
442
+ classPropertyName: "enableDigitRule",
443
+ publicName: "enableDigitRule",
444
+ isSignal: true,
445
+ isRequired: false,
446
+ transformFunction: null
447
+ },
448
+ enableSpecialCharRule: {
449
+ classPropertyName: "enableSpecialCharRule",
450
+ publicName: "enableSpecialCharRule",
451
+ isSignal: true,
452
+ isRequired: false,
453
+ transformFunction: null
454
+ },
455
+ min: {
456
+ classPropertyName: "min",
457
+ publicName: "min",
458
+ isSignal: true,
459
+ isRequired: false,
460
+ transformFunction: null
461
+ },
462
+ max: {
463
+ classPropertyName: "max",
464
+ publicName: "max",
465
+ isSignal: true,
466
+ isRequired: false,
467
+ transformFunction: null
468
+ },
469
+ customValidator: {
470
+ classPropertyName: "customValidator",
471
+ publicName: "customValidator",
472
+ isSignal: true,
473
+ isRequired: false,
474
+ transformFunction: null
475
+ },
476
+ warnThreshold: {
477
+ classPropertyName: "warnThreshold",
478
+ publicName: "warnThreshold",
479
+ isSignal: true,
480
+ isRequired: false,
481
+ transformFunction: null
482
+ },
483
+ accentThreshold: {
484
+ classPropertyName: "accentThreshold",
485
+ publicName: "accentThreshold",
486
+ isSignal: true,
487
+ isRequired: false,
488
+ transformFunction: null
489
+ }
490
+ },
491
+ outputs: { strengthChanged: "strengthChanged" },
492
+ exportAs: ["cmatPasswordStrength"],
493
+ ngImport: i0,
494
+ template: "<mat-progress-bar mode=\"determinate\" [color]=\"color()\" [value]=\"strength()\"></mat-progress-bar>",
495
+ dependencies: [{
496
+ kind: "ngmodule",
497
+ type: MatProgressBarModule
498
+ }, {
499
+ kind: "component",
500
+ type: i1$1.MatProgressBar,
501
+ selector: "mat-progress-bar",
502
+ inputs: [
503
+ "color",
504
+ "value",
505
+ "bufferValue",
506
+ "mode"
507
+ ],
508
+ outputs: ["animationEnd"],
509
+ exportAs: ["matProgressBar"]
510
+ }],
511
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
512
+ encapsulation: i0.ViewEncapsulation.None
513
+ });
514
+ }
515
+ };
516
+ i0.ɵɵngDeclareClassMetadata({
517
+ minVersion: "12.0.0",
518
+ version: "22.3.0",
519
+ ngImport: i0,
520
+ type: CmatPasswordStrengthComponent,
521
+ decorators: [{
522
+ type: Component,
523
+ args: [{
524
+ selector: "cmat-password-strength",
525
+ exportAs: "cmatPasswordStrength",
526
+ encapsulation: ViewEncapsulation.None,
527
+ changeDetection: ChangeDetectionStrategy.OnPush,
528
+ imports: [MatProgressBarModule],
529
+ template: "<mat-progress-bar mode=\"determinate\" [color]=\"color()\" [value]=\"strength()\"></mat-progress-bar>"
530
+ }]
531
+ }],
532
+ ctorParameters: () => [],
533
+ propDecorators: {
534
+ password: [{
535
+ type: i0.Input,
536
+ args: [{
537
+ isSignal: true,
538
+ alias: "password",
539
+ required: false
540
+ }]
541
+ }],
542
+ externalError: [{
543
+ type: i0.Input,
544
+ args: [{
545
+ isSignal: true,
546
+ alias: "externalError",
547
+ required: false
548
+ }]
549
+ }],
550
+ enableLengthRule: [{
551
+ type: i0.Input,
552
+ args: [{
553
+ isSignal: true,
554
+ alias: "enableLengthRule",
555
+ required: false
556
+ }]
557
+ }],
558
+ enableLowerCaseLetterRule: [{
559
+ type: i0.Input,
560
+ args: [{
561
+ isSignal: true,
562
+ alias: "enableLowerCaseLetterRule",
563
+ required: false
564
+ }]
565
+ }],
566
+ enableUpperCaseLetterRule: [{
567
+ type: i0.Input,
568
+ args: [{
569
+ isSignal: true,
570
+ alias: "enableUpperCaseLetterRule",
571
+ required: false
572
+ }]
573
+ }],
574
+ enableDigitRule: [{
575
+ type: i0.Input,
576
+ args: [{
577
+ isSignal: true,
578
+ alias: "enableDigitRule",
579
+ required: false
580
+ }]
581
+ }],
582
+ enableSpecialCharRule: [{
583
+ type: i0.Input,
584
+ args: [{
585
+ isSignal: true,
586
+ alias: "enableSpecialCharRule",
587
+ required: false
588
+ }]
589
+ }],
590
+ min: [{
591
+ type: i0.Input,
592
+ args: [{
593
+ isSignal: true,
594
+ alias: "min",
595
+ required: false
596
+ }]
597
+ }],
598
+ max: [{
599
+ type: i0.Input,
600
+ args: [{
601
+ isSignal: true,
602
+ alias: "max",
603
+ required: false
604
+ }]
605
+ }],
606
+ customValidator: [{
607
+ type: i0.Input,
608
+ args: [{
609
+ isSignal: true,
610
+ alias: "customValidator",
611
+ required: false
612
+ }]
613
+ }],
614
+ warnThreshold: [{
615
+ type: i0.Input,
616
+ args: [{
617
+ isSignal: true,
618
+ alias: "warnThreshold",
619
+ required: false
620
+ }]
621
+ }],
622
+ accentThreshold: [{
623
+ type: i0.Input,
624
+ args: [{
625
+ isSignal: true,
626
+ alias: "accentThreshold",
627
+ required: false
628
+ }]
629
+ }],
630
+ strengthChanged: [{
631
+ type: i0.Output,
632
+ args: ["strengthChanged"]
633
+ }]
634
+ }
635
+ });
636
+ var CmatPasswordStrengthInfoComponent = class CmatPasswordStrengthInfoComponent {
637
+ constructor() {
638
+ this.passwordComponent = input.required(...ngDevMode ? [{ debugName: "passwordComponent" }] : /* istanbul ignore next */ []);
639
+ this.enableScoreInfo = input(false, ...ngDevMode ? [{ debugName: "enableScoreInfo" }] : /* istanbul ignore next */ []);
640
+ this.lowerCaseCriteriaMsg = input("包含至少一个小写字母", ...ngDevMode ? [{ debugName: "lowerCaseCriteriaMsg" }] : /* istanbul ignore next */ []);
641
+ this.upperCaseCriteriaMsg = input("包含至少一个大写字母", ...ngDevMode ? [{ debugName: "upperCaseCriteriaMsg" }] : /* istanbul ignore next */ []);
642
+ this.digitsCriteriaMsg = input("包含至少一个数字", ...ngDevMode ? [{ debugName: "digitsCriteriaMsg" }] : /* istanbul ignore next */ []);
643
+ this.specialCharsCriteriaMsg = input("包含至少一个特殊字符", ...ngDevMode ? [{ debugName: "specialCharsCriteriaMsg" }] : /* istanbul ignore next */ []);
644
+ this.customCharsCriteriaMsg = input("包含至少一个传统字符", ...ngDevMode ? [{ debugName: "customCharsCriteriaMsg" }] : /* istanbul ignore next */ []);
645
+ this.minCharsCriteriaMsg = input(...ngDevMode ? [void 0, { debugName: "minCharsCriteriaMsg" }] : /* istanbul ignore next */ []);
646
+ this.pageLoaded = signal(false, ...ngDevMode ? [{ debugName: "pageLoaded" }] : /* istanbul ignore next */ []);
647
+ setTimeout(() => {
648
+ this.pageLoaded.set(true);
649
+ }, 100);
650
+ }
651
+ getMinCharsMsg() {
652
+ return this.minCharsCriteriaMsg() ?? `包含至少 ${this.passwordComponent().min()} 个字符`;
653
+ }
654
+ getEnterIndex(itemType) {
655
+ const enabledItems = [];
656
+ if (this.passwordComponent().enableLowerCaseLetterRule()) enabledItems.push("lowerCase");
657
+ if (this.passwordComponent().enableUpperCaseLetterRule()) enabledItems.push("upperCase");
658
+ if (this.passwordComponent().enableDigitRule()) enabledItems.push("digit");
659
+ if (this.passwordComponent().enableSpecialCharRule()) enabledItems.push("specialChar");
660
+ if (this.passwordComponent().enableLengthRule()) enabledItems.push("length");
661
+ if (this.passwordComponent().customValidator()) enabledItems.push("custom");
662
+ if (this.enableScoreInfo()) enabledItems.push("score");
663
+ return enabledItems.findIndex((i) => i === itemType);
664
+ }
665
+ getLeaveIndex(itemType) {
666
+ const enabledItems = [];
667
+ if (this.passwordComponent().enableLowerCaseLetterRule()) enabledItems.push("lowerCase");
668
+ if (this.passwordComponent().enableUpperCaseLetterRule()) enabledItems.push("upperCase");
669
+ if (this.passwordComponent().enableDigitRule()) enabledItems.push("digit");
670
+ if (this.passwordComponent().enableSpecialCharRule()) enabledItems.push("specialChar");
671
+ if (this.passwordComponent().enableLengthRule()) enabledItems.push("length");
672
+ if (this.passwordComponent().customValidator()) enabledItems.push("custom");
673
+ if (this.enableScoreInfo()) enabledItems.push("score");
674
+ return enabledItems.length - enabledItems.findIndex((j) => j === itemType) - 1;
675
+ }
676
+ static {
677
+ this.ɵfac = i0.ɵɵngDeclareFactory({
678
+ minVersion: "12.0.0",
679
+ version: "22.3.0",
680
+ ngImport: i0,
681
+ type: CmatPasswordStrengthInfoComponent,
682
+ deps: [],
683
+ target: i0.ɵɵFactoryTarget.Component
684
+ });
685
+ }
686
+ static {
687
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
688
+ minVersion: "17.0.0",
689
+ version: "22.3.0",
690
+ type: CmatPasswordStrengthInfoComponent,
691
+ isStandalone: true,
692
+ selector: "cmat-password-strength-info",
693
+ inputs: {
694
+ passwordComponent: {
695
+ classPropertyName: "passwordComponent",
696
+ publicName: "passwordComponent",
697
+ isSignal: true,
698
+ isRequired: true,
699
+ transformFunction: null
700
+ },
701
+ enableScoreInfo: {
702
+ classPropertyName: "enableScoreInfo",
703
+ publicName: "enableScoreInfo",
704
+ isSignal: true,
705
+ isRequired: false,
706
+ transformFunction: null
707
+ },
708
+ lowerCaseCriteriaMsg: {
709
+ classPropertyName: "lowerCaseCriteriaMsg",
710
+ publicName: "lowerCaseCriteriaMsg",
711
+ isSignal: true,
712
+ isRequired: false,
713
+ transformFunction: null
714
+ },
715
+ upperCaseCriteriaMsg: {
716
+ classPropertyName: "upperCaseCriteriaMsg",
717
+ publicName: "upperCaseCriteriaMsg",
718
+ isSignal: true,
719
+ isRequired: false,
720
+ transformFunction: null
721
+ },
722
+ digitsCriteriaMsg: {
723
+ classPropertyName: "digitsCriteriaMsg",
724
+ publicName: "digitsCriteriaMsg",
725
+ isSignal: true,
726
+ isRequired: false,
727
+ transformFunction: null
728
+ },
729
+ specialCharsCriteriaMsg: {
730
+ classPropertyName: "specialCharsCriteriaMsg",
731
+ publicName: "specialCharsCriteriaMsg",
732
+ isSignal: true,
733
+ isRequired: false,
734
+ transformFunction: null
735
+ },
736
+ customCharsCriteriaMsg: {
737
+ classPropertyName: "customCharsCriteriaMsg",
738
+ publicName: "customCharsCriteriaMsg",
739
+ isSignal: true,
740
+ isRequired: false,
741
+ transformFunction: null
742
+ },
743
+ minCharsCriteriaMsg: {
744
+ classPropertyName: "minCharsCriteriaMsg",
745
+ publicName: "minCharsCriteriaMsg",
746
+ isSignal: true,
747
+ isRequired: false,
748
+ transformFunction: null
749
+ }
750
+ },
751
+ exportAs: ["cmatPasswordStrengthInfo"],
752
+ ngImport: i0,
753
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<mat-card class=\"info-card\">\r\n <mat-card-content>\r\n @if (passwordComponent().enableLowerCaseLetterRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('lowerCase')\" [style.--leave-item-index]=\"getLeaveIndex('lowerCase')\">\r\n @if (passwordComponent().containAtLeastOneLowerCaseLetter()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{lowerCaseCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().enableUpperCaseLetterRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('upperCase')\" [style.--leave-item-index]=\"getLeaveIndex('upperCase')\">\r\n @if (passwordComponent().containAtLeastOneUpperCaseLetter()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{upperCaseCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().enableDigitRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('digit')\" [style.--leave-item-index]=\"getLeaveIndex('digit')\">\r\n @if (passwordComponent().containAtLeastOneDigit()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{digitsCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().enableSpecialCharRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('specialChar')\"\r\n [style.--leave-item-index]=\"getLeaveIndex('specialChar')\">\r\n @if (passwordComponent().containAtLeastOneSpecialChar()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{specialCharsCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().enableLengthRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('length')\" [style.--leave-item-index]=\"getLeaveIndex('length')\">\r\n @if (passwordComponent().containAtLeastMinChars()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{getMinCharsMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().customValidator()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('custom')\" [style.--leave-item-index]=\"getLeaveIndex('custom')\">\r\n @if (passwordComponent().containAtCustomChars()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{customCharsCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (enableScoreInfo()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('score')\" [style.--leave-item-index]=\"getLeaveIndex('score')\">\r\n @if (passwordComponent().strength() === 100) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>密码强度= {{passwordComponent().strength()}} %100</span>\r\n </div>\r\n }\r\n\r\n </mat-card-content>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</mat-card>\r\n",
754
+ styles: ["cmat-password-strength-info{margin-top:20px}cmat-password-strength-info .mat-mdc-card{display:flex;flex-direction:row;flex:1 1 0%;margin:.5rem;box-sizing:border-box;place-content:stretch;align-items:stretch}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content{display:flex;flex-direction:column;box-sizing:border-box;max-width:100%;place-content:stretch;align-items:stretch}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content .mat-icon{margin-right:1rem}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content .info-row{display:flex;flex-direction:row;box-sizing:border-box;align-items:center}cmat-password-strength-info .info-card .info-row.info-row-enter{transition-property:opacity,transform;transition-delay:calc(.3s * var(--enter-item-index,0));transition-duration:1s;transition-timing-function:cubic-bezier(.8,-.6,.2,1.5)}@starting-style{cmat-password-strength-info .info-card .info-row.info-row-enter{transform:scale(.5);opacity:0}}cmat-password-strength-info .info-card .info-row.info-row-leave{transition-property:opacity,transform,height;transition-delay:calc(.3s * var(--leave-item-index,0));transition-duration:1s;transition-timing-function:cubic-bezier(.8,-.6,.2,1.5);opacity:0;transform:scale(.5);height:0;margin:0}@starting-style{cmat-password-strength-info .info-card .info-row.info-row-leave{transform:scale(1);opacity:1;height:inherit}}cmat-password-strength-info .shake-info-animation{animation:shake 1s}cmat-password-strength-info .flip-in-x-animation{backface-visibility:visible;animation:flipInX 1s ease-in}cmat-password-strength-info .flip-in-y-animation{backface-visibility:visible;animation:flipInY 1s ease-in}@keyframes shake{0%{transform:translateZ(0)}10%{transform:translate3d(-10px,0,0)}20%{transform:translate3d(10px,0,0)}30%{transform:translate3d(-10px,0,0)}40%{transform:translate3d(10px,0,0)}50%{transform:translate3d(-10px,0,0)}60%{transform:translate3d(10px,0,0)}70%{transform:translate3d(-10px,0,0)}80%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-10px,0,0)}to{transform:translateZ(0)}}@keyframes flipInX{0%{opacity:0;transform:perspective(400px) rotateX(90deg)}40%{opacity:1;transform:perspective(400px) rotateX(-20deg)}60%{transform:perspective(400px) rotateX(10deg)}80%{transform:perspective(400px) rotateX(-5deg)}to{opacity:1;transform:perspective(400px) rotate3d(0,0,0,0)}}@keyframes flipInY{0%{opacity:0;transform:perspective(400px) rotateY(90deg)}40%{opacity:1;transform:perspective(400px) rotateY(-20deg)}60%{transform:perspective(400px) rotateY(10deg)}80%{transform:perspective(400px) rotateY(-5deg)}to{opacity:1;transform:perspective(400px) rotate3d(0,0,0,0)}}\n"],
755
+ dependencies: [
756
+ {
757
+ kind: "ngmodule",
758
+ type: MatCardModule
759
+ },
760
+ {
761
+ kind: "component",
762
+ type: i1.MatCard,
763
+ selector: "mat-card",
764
+ inputs: ["appearance"],
765
+ exportAs: ["matCard"]
766
+ },
767
+ {
768
+ kind: "directive",
769
+ type: i1.MatCardContent,
770
+ selector: "mat-card-content"
771
+ },
772
+ {
773
+ kind: "ngmodule",
774
+ type: MatIconModule
775
+ },
776
+ {
777
+ kind: "component",
778
+ type: i3.MatIcon,
779
+ selector: "mat-icon",
780
+ inputs: [
781
+ "color",
782
+ "inline",
783
+ "svgIcon",
784
+ "fontSet",
785
+ "fontIcon"
786
+ ],
787
+ exportAs: ["matIcon"]
788
+ }
789
+ ],
790
+ encapsulation: i0.ViewEncapsulation.None
791
+ });
792
+ }
793
+ };
794
+ i0.ɵɵngDeclareClassMetadata({
795
+ minVersion: "12.0.0",
796
+ version: "22.3.0",
797
+ ngImport: i0,
798
+ type: CmatPasswordStrengthInfoComponent,
799
+ decorators: [{
800
+ type: Component,
801
+ args: [{
802
+ selector: "cmat-password-strength-info",
803
+ exportAs: "cmatPasswordStrengthInfo",
804
+ encapsulation: ViewEncapsulation.None,
805
+ imports: [MatCardModule, MatIconModule],
806
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<mat-card class=\"info-card\">\r\n <mat-card-content>\r\n @if (passwordComponent().enableLowerCaseLetterRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('lowerCase')\" [style.--leave-item-index]=\"getLeaveIndex('lowerCase')\">\r\n @if (passwordComponent().containAtLeastOneLowerCaseLetter()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{lowerCaseCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().enableUpperCaseLetterRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('upperCase')\" [style.--leave-item-index]=\"getLeaveIndex('upperCase')\">\r\n @if (passwordComponent().containAtLeastOneUpperCaseLetter()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{upperCaseCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().enableDigitRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('digit')\" [style.--leave-item-index]=\"getLeaveIndex('digit')\">\r\n @if (passwordComponent().containAtLeastOneDigit()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{digitsCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().enableSpecialCharRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('specialChar')\"\r\n [style.--leave-item-index]=\"getLeaveIndex('specialChar')\">\r\n @if (passwordComponent().containAtLeastOneSpecialChar()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{specialCharsCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().enableLengthRule()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('length')\" [style.--leave-item-index]=\"getLeaveIndex('length')\">\r\n @if (passwordComponent().containAtLeastMinChars()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{getMinCharsMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (passwordComponent().customValidator()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('custom')\" [style.--leave-item-index]=\"getLeaveIndex('custom')\">\r\n @if (passwordComponent().containAtCustomChars()) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>{{customCharsCriteriaMsg()}}</span>\r\n </div>\r\n }\r\n\r\n @if (enableScoreInfo()) {\r\n <div class=\"info-row info-row-enter\" animate.leave=\"info-row-leave\"\r\n [style.--enter-item-index]=\"getEnterIndex('score')\" [style.--leave-item-index]=\"getLeaveIndex('score')\">\r\n @if (passwordComponent().strength() === 100) {\r\n <mat-icon animate.enter=\"flip-in-x-animation\" color=\"primary\" svgIcon=\"mat_outline:done\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n } @else {\r\n <mat-icon animate.enter=\"shake-info-animation\" color=\"warn\" svgIcon=\"mat_outline:error\" [class.animate-none]=\"!pageLoaded()\"></mat-icon>\r\n }\r\n <span>密码强度= {{passwordComponent().strength()}} %100</span>\r\n </div>\r\n }\r\n\r\n </mat-card-content>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</mat-card>\r\n",
807
+ styles: ["cmat-password-strength-info{margin-top:20px}cmat-password-strength-info .mat-mdc-card{display:flex;flex-direction:row;flex:1 1 0%;margin:.5rem;box-sizing:border-box;place-content:stretch;align-items:stretch}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content{display:flex;flex-direction:column;box-sizing:border-box;max-width:100%;place-content:stretch;align-items:stretch}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content .mat-icon{margin-right:1rem}cmat-password-strength-info .mat-mdc-card .mat-mdc-card-content .info-row{display:flex;flex-direction:row;box-sizing:border-box;align-items:center}cmat-password-strength-info .info-card .info-row.info-row-enter{transition-property:opacity,transform;transition-delay:calc(.3s * var(--enter-item-index,0));transition-duration:1s;transition-timing-function:cubic-bezier(.8,-.6,.2,1.5)}@starting-style{cmat-password-strength-info .info-card .info-row.info-row-enter{transform:scale(.5);opacity:0}}cmat-password-strength-info .info-card .info-row.info-row-leave{transition-property:opacity,transform,height;transition-delay:calc(.3s * var(--leave-item-index,0));transition-duration:1s;transition-timing-function:cubic-bezier(.8,-.6,.2,1.5);opacity:0;transform:scale(.5);height:0;margin:0}@starting-style{cmat-password-strength-info .info-card .info-row.info-row-leave{transform:scale(1);opacity:1;height:inherit}}cmat-password-strength-info .shake-info-animation{animation:shake 1s}cmat-password-strength-info .flip-in-x-animation{backface-visibility:visible;animation:flipInX 1s ease-in}cmat-password-strength-info .flip-in-y-animation{backface-visibility:visible;animation:flipInY 1s ease-in}@keyframes shake{0%{transform:translateZ(0)}10%{transform:translate3d(-10px,0,0)}20%{transform:translate3d(10px,0,0)}30%{transform:translate3d(-10px,0,0)}40%{transform:translate3d(10px,0,0)}50%{transform:translate3d(-10px,0,0)}60%{transform:translate3d(10px,0,0)}70%{transform:translate3d(-10px,0,0)}80%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-10px,0,0)}to{transform:translateZ(0)}}@keyframes flipInX{0%{opacity:0;transform:perspective(400px) rotateX(90deg)}40%{opacity:1;transform:perspective(400px) rotateX(-20deg)}60%{transform:perspective(400px) rotateX(10deg)}80%{transform:perspective(400px) rotateX(-5deg)}to{opacity:1;transform:perspective(400px) rotate3d(0,0,0,0)}}@keyframes flipInY{0%{opacity:0;transform:perspective(400px) rotateY(90deg)}40%{opacity:1;transform:perspective(400px) rotateY(-20deg)}60%{transform:perspective(400px) rotateY(10deg)}80%{transform:perspective(400px) rotateY(-5deg)}to{opacity:1;transform:perspective(400px) rotate3d(0,0,0,0)}}\n"]
808
+ }]
809
+ }],
810
+ ctorParameters: () => [],
811
+ propDecorators: {
812
+ passwordComponent: [{
813
+ type: i0.Input,
814
+ args: [{
815
+ isSignal: true,
816
+ alias: "passwordComponent",
817
+ required: true
818
+ }]
819
+ }],
820
+ enableScoreInfo: [{
821
+ type: i0.Input,
822
+ args: [{
823
+ isSignal: true,
824
+ alias: "enableScoreInfo",
825
+ required: false
826
+ }]
827
+ }],
828
+ lowerCaseCriteriaMsg: [{
829
+ type: i0.Input,
830
+ args: [{
831
+ isSignal: true,
832
+ alias: "lowerCaseCriteriaMsg",
833
+ required: false
834
+ }]
835
+ }],
836
+ upperCaseCriteriaMsg: [{
837
+ type: i0.Input,
838
+ args: [{
839
+ isSignal: true,
840
+ alias: "upperCaseCriteriaMsg",
841
+ required: false
842
+ }]
843
+ }],
844
+ digitsCriteriaMsg: [{
845
+ type: i0.Input,
846
+ args: [{
847
+ isSignal: true,
848
+ alias: "digitsCriteriaMsg",
849
+ required: false
850
+ }]
851
+ }],
852
+ specialCharsCriteriaMsg: [{
853
+ type: i0.Input,
854
+ args: [{
855
+ isSignal: true,
856
+ alias: "specialCharsCriteriaMsg",
857
+ required: false
858
+ }]
859
+ }],
860
+ customCharsCriteriaMsg: [{
861
+ type: i0.Input,
862
+ args: [{
863
+ isSignal: true,
864
+ alias: "customCharsCriteriaMsg",
865
+ required: false
866
+ }]
867
+ }],
868
+ minCharsCriteriaMsg: [{
869
+ type: i0.Input,
870
+ args: [{
871
+ isSignal: true,
872
+ alias: "minCharsCriteriaMsg",
873
+ required: false
874
+ }]
875
+ }]
876
+ }
877
+ });
878
+ export { CmatPasswordStrengthComponent as n, CmatPassToggleVisibilityComponent as r, CmatPasswordStrengthInfoComponent as t };
879
+
880
+ //# sourceMappingURL=public-api-CfILyvuV.mjs.map