cmat 0.0.110 → 0.0.112
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.
- package/fesm2022/cmat-components-adapter.mjs +531 -536
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +150 -42
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +1120 -629
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +861 -441
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +580 -335
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +197 -105
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-color-picker.mjs +1762 -825
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +701 -456
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +137 -30
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +410 -258
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +201 -41
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +198 -35
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +102 -26
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +167 -47
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +203 -112
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +489 -215
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +117 -27
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +276 -230
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +615 -420
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
- package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +120 -40
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +3080 -1404
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +540 -466
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +528 -125
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +141 -32
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +866 -534
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +873 -434
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +1012 -731
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +98 -35
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +463 -287
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +377 -203
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +926 -496
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +1280 -842
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +998 -690
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +143 -57
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +457 -303
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +136 -44
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +464 -168
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +346 -262
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +372 -112
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +904 -410
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +43 -25
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +162 -76
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +457 -356
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +207 -195
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +50 -30
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +41 -25
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +50 -38
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +44 -31
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +60 -49
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-reports.mjs +2751 -0
- package/fesm2022/cmat-reports.mjs.map +1 -0
- package/fesm2022/cmat-services-alert.mjs +249 -277
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +110 -81
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +184 -73
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +136 -125
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +165 -183
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +116 -95
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +75 -66
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +69 -64
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +48 -45
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-print.mjs +985 -669
- package/fesm2022/cmat-services-print.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +53 -38
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +57 -47
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +79 -68
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +424 -517
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs +23 -33
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs +12 -16
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/fesm2022/cmat.mjs +39806 -22071
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +5 -1
- package/types/cmat-components-adapter.d.ts +145 -156
- package/types/cmat-components-breadcrumb.d.ts +108 -86
- package/types/cmat-components-card.d.ts +34 -18
- package/types/cmat-components-carousel.d.ts +251 -134
- package/types/cmat-components-cascade.d.ts +158 -117
- package/types/cmat-components-chip-input.d.ts +105 -71
- package/types/cmat-components-code-editor.d.ts +59 -34
- package/types/cmat-components-color-picker.d.ts +378 -236
- package/types/cmat-components-custom-formly.d.ts +776 -814
- package/types/cmat-components-data-picker.d.ts +502 -360
- package/types/cmat-components-date-range.d.ts +106 -77
- package/types/cmat-components-date-time-display.d.ts +36 -13
- package/types/cmat-components-drawer.d.ts +91 -61
- package/types/cmat-components-empty-state.d.ts +47 -17
- package/types/cmat-components-file-preview.d.ts +42 -14
- package/types/cmat-components-filter-toolbar.d.ts +57 -25
- package/types/cmat-components-form-actions.d.ts +18 -10
- package/types/cmat-components-fullscreen.d.ts +21 -13
- package/types/cmat-components-highlight.d.ts +33 -26
- package/types/cmat-components-image-viewer.d.ts +119 -58
- package/types/cmat-components-inline-loading.d.ts +24 -11
- package/types/cmat-components-json-editor.d.ts +39 -28
- package/types/cmat-components-knob-input.d.ts +172 -101
- package/types/cmat-components-loading-overlay.d.ts +8 -11
- package/types/cmat-components-masonry.d.ts +27 -14
- package/types/cmat-components-material-color-picker.d.ts +56 -42
- package/types/cmat-components-material-datetimepicker.d.ts +817 -454
- package/types/cmat-components-navigation.d.ts +295 -221
- package/types/cmat-components-opt-input.d.ts +111 -90
- package/types/cmat-components-org-chart.d.ts +53 -35
- package/types/cmat-components-page-header.d.ts +37 -14
- package/types/cmat-components-pagination.d.ts +144 -107
- package/types/cmat-components-password-strength.d.ts +197 -86
- package/types/cmat-components-popover.d.ts +264 -166
- package/types/cmat-components-progress-bar.d.ts +17 -14
- package/types/cmat-components-qrcode.d.ts +111 -42
- package/types/cmat-components-rating.d.ts +105 -59
- package/types/cmat-components-rich-text-editor.d.ts +39 -16
- package/types/cmat-components-select-search.d.ts +195 -99
- package/types/cmat-components-select-table.d.ts +241 -142
- package/types/cmat-components-select-tree.d.ts +185 -118
- package/types/cmat-components-skeleton.d.ts +55 -32
- package/types/cmat-components-speed-dial.d.ts +86 -61
- package/types/cmat-components-status-tag.d.ts +42 -24
- package/types/cmat-components-table-toolbar.d.ts +30 -12
- package/types/cmat-components-timeline.d.ts +83 -51
- package/types/cmat-components-toast.d.ts +84 -85
- package/types/cmat-components-transfer-picker.d.ts +228 -181
- package/types/cmat-components-treetable.d.ts +63 -39
- package/types/cmat-components-upload.d.ts +205 -106
- package/types/cmat-components-x6-angular-shape.d.ts +29 -37
- package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
- package/types/cmat-directives-arrow-cursor.d.ts +55 -35
- package/types/cmat-directives-autofocus.d.ts +8 -11
- package/types/cmat-directives-data-exporter.d.ts +71 -40
- package/types/cmat-directives-debounce.d.ts +31 -28
- package/types/cmat-directives-digit-only.d.ts +90 -53
- package/types/cmat-directives-equal-validator.d.ts +11 -14
- package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
- package/types/cmat-lib-mock-api.d.ts +46 -55
- package/types/cmat-pipes-bytes.d.ts +7 -10
- package/types/cmat-pipes-date-format.d.ts +7 -10
- package/types/cmat-pipes-find-by-key.d.ts +8 -12
- package/types/cmat-pipes-group-by.d.ts +11 -15
- package/types/cmat-pipes-keys.d.ts +10 -13
- package/types/cmat-pipes-secure.d.ts +14 -17
- package/types/cmat-pipes-uppercase.d.ts +7 -10
- package/types/cmat-reports.d.ts +1131 -0
- package/types/cmat-services-alert.d.ts +80 -87
- package/types/cmat-services-config.d.ts +37 -43
- package/types/cmat-services-confirmation.d.ts +31 -37
- package/types/cmat-services-data.d.ts +18 -21
- package/types/cmat-services-export-as.d.ts +28 -33
- package/types/cmat-services-loading.d.ts +27 -31
- package/types/cmat-services-local-storage.d.ts +17 -21
- package/types/cmat-services-media-watcher.d.ts +14 -18
- package/types/cmat-services-platform.d.ts +8 -11
- package/types/cmat-services-print.d.ts +97 -92
- package/types/cmat-services-splash-screen.d.ts +11 -14
- package/types/cmat-services-title.d.ts +9 -12
- package/types/cmat-services-translation.d.ts +19 -22
- package/types/cmat-services-utils.d.ts +76 -80
- package/types/cmat-validators.d.ts +5 -8
- package/types/cmat-version.d.ts +8 -10
- package/types/cmat.d.ts +7551 -5194
|
@@ -1,441 +1,880 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as i1 from
|
|
4
|
-
import { MatButtonModule } from
|
|
5
|
-
import * as i2 from
|
|
6
|
-
import { MatRippleModule } from
|
|
7
|
-
import * as i3 from
|
|
8
|
-
import { MatIconModule } from
|
|
9
|
-
import { FormControl, Validators } from
|
|
10
|
-
import * as i1$1 from
|
|
11
|
-
import { MatProgressBarModule } from
|
|
12
|
-
import * as i1
|
|
13
|
-
import { MatCardModule } from
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, effect, input, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import * as i1$2 from "@angular/material/button";
|
|
4
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
5
|
+
import * as i2 from "@angular/material/core";
|
|
6
|
+
import { MatRippleModule } from "@angular/material/core";
|
|
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$1 from "@angular/material/progress-bar";
|
|
11
|
+
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
|
12
|
+
import * as i1 from "@angular/material/card";
|
|
13
|
+
import { MatCardModule } from "@angular/material/card";
|
|
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.2.3",
|
|
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.2.3",
|
|
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.2.3",
|
|
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
|
+
});
|
|
40
161
|
var Colors;
|
|
41
|
-
(function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
162
|
+
(function(Colors) {
|
|
163
|
+
Colors["primary"] = "primary";
|
|
164
|
+
Colors["accent"] = "accent";
|
|
165
|
+
Colors["warn"] = "warn";
|
|
45
166
|
})(Colors || (Colors = {}));
|
|
46
167
|
var Criteria;
|
|
47
|
-
(function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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";
|
|
54
175
|
})(Criteria || (Criteria = {}));
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
return null;
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
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
|
+
};
|
|
96
208
|
const RegExpValidator = {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
209
|
+
"lowerCase": RegExp(/^(?=.*?[a-z])/),
|
|
210
|
+
"upperCase": RegExp(/^(?=.*?[A-Z])/),
|
|
211
|
+
"digit": RegExp(/^(?=.*?[0-9])/),
|
|
212
|
+
"specialChar": RegExp(/^(?=.*?[" !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"])/)
|
|
101
213
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatPasswordStrengthInfoComponent, isStandalone: true, selector: "cmat-password-strength-info", inputs: { passwordComponent: { classPropertyName: "passwordComponent", publicName: "passwordComponent", isSignal: true, isRequired: true, transformFunction: null }, enableScoreInfo: { classPropertyName: "enableScoreInfo", publicName: "enableScoreInfo", isSignal: true, isRequired: false, transformFunction: null }, lowerCaseCriteriaMsg: { classPropertyName: "lowerCaseCriteriaMsg", publicName: "lowerCaseCriteriaMsg", isSignal: true, isRequired: false, transformFunction: null }, upperCaseCriteriaMsg: { classPropertyName: "upperCaseCriteriaMsg", publicName: "upperCaseCriteriaMsg", isSignal: true, isRequired: false, transformFunction: null }, digitsCriteriaMsg: { classPropertyName: "digitsCriteriaMsg", publicName: "digitsCriteriaMsg", isSignal: true, isRequired: false, transformFunction: null }, specialCharsCriteriaMsg: { classPropertyName: "specialCharsCriteriaMsg", publicName: "specialCharsCriteriaMsg", isSignal: true, isRequired: false, transformFunction: null }, customCharsCriteriaMsg: { classPropertyName: "customCharsCriteriaMsg", publicName: "customCharsCriteriaMsg", isSignal: true, isRequired: false, transformFunction: null }, minCharsCriteriaMsg: { classPropertyName: "minCharsCriteriaMsg", publicName: "minCharsCriteriaMsg", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["cmatPasswordStrengthInfo"], ngImport: i0, 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>\u5BC6\u7801\u5F3A\u5EA6= {{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", 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"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
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.2.3",
|
|
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.2.3",
|
|
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.2.3",
|
|
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.2.3",
|
|
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.2.3",
|
|
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.2.3",
|
|
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
|
+
});
|
|
440
878
|
export { CmatPassToggleVisibilityComponent, CmatPasswordStrengthComponent, CmatPasswordStrengthInfoComponent };
|
|
441
|
-
|
|
879
|
+
|
|
880
|
+
//# sourceMappingURL=cmat-components-password-strength.mjs.map
|