@arsedizioni/ars-utils 20.0.16 → 20.0.18
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/clipper.ui/index.d.ts +1 -1
- package/core/index.d.ts +4 -4
- package/fesm2022/arsedizioni-ars-utils-core.mjs +79 -75
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +34 -33
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/package.json +9 -9
package/clipper.ui/index.d.ts
CHANGED
|
@@ -1031,7 +1031,7 @@ declare class ClipperDocumentMenuComponent implements OnInit, OnDestroy {
|
|
|
1031
1031
|
private changeDetector;
|
|
1032
1032
|
private clipperService;
|
|
1033
1033
|
readonly useSelections: _angular_core.InputSignal<boolean>;
|
|
1034
|
-
readonly selectionSource: _angular_core.InputSignal<"
|
|
1034
|
+
readonly selectionSource: _angular_core.InputSignal<"none" | "selection" | "bag">;
|
|
1035
1035
|
protected selection: () => ClipperDocumentInfo[];
|
|
1036
1036
|
readonly parent: _angular_core.InputSignal<ClipperSearchResultManager>;
|
|
1037
1037
|
readonly item: _angular_core.InputSignal<ClipperDocumentInfo>;
|
package/core/index.d.ts
CHANGED
|
@@ -112,10 +112,10 @@ declare enum DateFormat {
|
|
|
112
112
|
ShortISO8601 = 12
|
|
113
113
|
}
|
|
114
114
|
interface PasswordStrength {
|
|
115
|
-
score
|
|
116
|
-
label
|
|
117
|
-
color
|
|
118
|
-
suggestions
|
|
115
|
+
score?: number;
|
|
116
|
+
label?: string;
|
|
117
|
+
color?: string;
|
|
118
|
+
suggestions?: string[];
|
|
119
119
|
isValid: boolean;
|
|
120
120
|
}
|
|
121
121
|
declare class SystemUtils {
|
|
@@ -673,82 +673,86 @@ class SystemUtils {
|
|
|
673
673
|
* @returns the password strength info
|
|
674
674
|
*/
|
|
675
675
|
static calculatePasswordStrength(password) {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
676
|
+
if (password?.length > 0) {
|
|
677
|
+
let score = 0;
|
|
678
|
+
const suggestions = [];
|
|
679
|
+
// Length
|
|
680
|
+
if (password.length >= 10)
|
|
681
|
+
score++;
|
|
682
|
+
else
|
|
683
|
+
suggestions.push('Usa almeno 10 caratteri');
|
|
684
|
+
if (password.length >= 12)
|
|
685
|
+
score++;
|
|
686
|
+
else if (password.length >= 10)
|
|
687
|
+
suggestions.push('Considera di usare più di 12 caratteri');
|
|
688
|
+
// Lowercase letters
|
|
689
|
+
if (/[a-z]/.test(password))
|
|
690
|
+
score++;
|
|
691
|
+
else
|
|
692
|
+
suggestions.push('Aggiungi lettere minuscole');
|
|
693
|
+
// Uppercase letters
|
|
694
|
+
if (/[A-Z]/.test(password))
|
|
695
|
+
score++;
|
|
696
|
+
else
|
|
697
|
+
suggestions.push('Aggiungi lettere maiuscole');
|
|
698
|
+
// Numbers
|
|
699
|
+
if (/\d/.test(password))
|
|
700
|
+
score++;
|
|
701
|
+
else
|
|
702
|
+
suggestions.push('Aggiungi numeri');
|
|
703
|
+
// Special characters
|
|
704
|
+
if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(password))
|
|
705
|
+
score++;
|
|
706
|
+
else
|
|
707
|
+
suggestions.push('Aggiungi caratteri speciali (!@#$%^&*)');
|
|
708
|
+
// Common patterns
|
|
709
|
+
if (/(.)\1{2,}/.test(password)) {
|
|
710
|
+
score = Math.max(0, score - 1);
|
|
711
|
+
suggestions.push('Evita di ripetere lo stesso carattere');
|
|
712
|
+
}
|
|
713
|
+
if (/123|abc|qwe/i.test(password)) {
|
|
714
|
+
score = Math.max(0, score - 1);
|
|
715
|
+
suggestions.push('Evita sequenze comuni (123, abc, qwe)');
|
|
716
|
+
}
|
|
717
|
+
// Label and color
|
|
718
|
+
let label;
|
|
719
|
+
let color;
|
|
720
|
+
let isValid;
|
|
721
|
+
if (score <= 2) {
|
|
722
|
+
label = 'Molto debole';
|
|
723
|
+
color = '#f44336';
|
|
724
|
+
isValid = false;
|
|
725
|
+
}
|
|
726
|
+
else if (score <= 3) {
|
|
727
|
+
label = 'Debole';
|
|
728
|
+
color = '#ff9800';
|
|
729
|
+
isValid = false;
|
|
730
|
+
}
|
|
731
|
+
else if (score <= 4) {
|
|
732
|
+
label = 'Media';
|
|
733
|
+
color = '#ffc107';
|
|
734
|
+
isValid = true;
|
|
735
|
+
}
|
|
736
|
+
else if (score <= 5) {
|
|
737
|
+
label = 'Forte';
|
|
738
|
+
color = '#8bc34a';
|
|
739
|
+
isValid = true;
|
|
740
|
+
}
|
|
741
|
+
else {
|
|
742
|
+
label = 'Molto forte';
|
|
743
|
+
color = '#4caf50';
|
|
744
|
+
isValid = true;
|
|
745
|
+
}
|
|
746
|
+
return {
|
|
747
|
+
score: score,
|
|
748
|
+
label: label,
|
|
749
|
+
color: color,
|
|
750
|
+
suggestions: suggestions,
|
|
751
|
+
isValid: isValid
|
|
752
|
+
};
|
|
739
753
|
}
|
|
740
|
-
else
|
|
741
|
-
|
|
742
|
-
color = '#4caf50';
|
|
743
|
-
isValid = true;
|
|
744
|
-
}
|
|
745
|
-
return {
|
|
746
|
-
score: score,
|
|
747
|
-
label: label,
|
|
748
|
-
color: color,
|
|
749
|
-
suggestions: suggestions,
|
|
750
|
-
isValid
|
|
751
|
-
};
|
|
754
|
+
else
|
|
755
|
+
return { isValid: false };
|
|
752
756
|
}
|
|
753
757
|
/**
|
|
754
758
|
* Check if current browser supports touch
|