ps-toolkit-ui 1.5.30 → 1.5.31
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/bundles/ps-toolkit-ui.umd.js +18 -16
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/form.class.js +2 -1
- package/esm2015/lib/classes/helper.class.js +18 -17
- package/fesm2015/ps-toolkit-ui.js +18 -16
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/form.class.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -879,56 +879,57 @@
|
|
|
879
879
|
function HelperClass() {
|
|
880
880
|
}
|
|
881
881
|
HelperClass.getLabel = function (inp) {
|
|
882
|
+
var n = inp.label != null ? inp.label : inp.name;
|
|
882
883
|
if (inp.error === exports.InputError.Required) {
|
|
883
|
-
return inp.l('FormErrorRequired',
|
|
884
|
+
return inp.l('FormErrorRequired', n);
|
|
884
885
|
}
|
|
885
886
|
else if (inp.error === exports.InputError.Invalid) {
|
|
886
|
-
return inp.l('FormErrorInvalid',
|
|
887
|
+
return inp.l('FormErrorInvalid', n);
|
|
887
888
|
}
|
|
888
889
|
else if (inp.error === exports.InputError.Length) {
|
|
889
|
-
return inp.l('FormErrorLength', [
|
|
890
|
+
return inp.l('FormErrorLength', [n, inp.minLength]);
|
|
890
891
|
}
|
|
891
892
|
else if (inp.error === exports.InputError.MinLength) {
|
|
892
|
-
return inp.l('FormErrorMinLength', [
|
|
893
|
+
return inp.l('FormErrorMinLength', [n, inp.minLength]);
|
|
893
894
|
}
|
|
894
895
|
else if (inp.error === exports.InputError.MaxLength) {
|
|
895
|
-
return inp.l('FormErrorMaxLength', [
|
|
896
|
+
return inp.l('FormErrorMaxLength', [n, inp.maxLength]);
|
|
896
897
|
}
|
|
897
898
|
else if (inp.error === exports.InputError.MinAmount) {
|
|
898
|
-
return inp.l('FormErrorMinAmount', [
|
|
899
|
+
return inp.l('FormErrorMinAmount', [n, inp.minLength]);
|
|
899
900
|
}
|
|
900
901
|
else if (inp.error === exports.InputError.MaxAmount) {
|
|
901
|
-
return inp.l('FormErrorMaxAmount', [
|
|
902
|
+
return inp.l('FormErrorMaxAmount', [n, inp.maxLength]);
|
|
902
903
|
}
|
|
903
904
|
else if (inp.error === exports.InputError.Expired) {
|
|
904
|
-
return inp.l('FormErrorExpired',
|
|
905
|
+
return inp.l('FormErrorExpired', n);
|
|
905
906
|
}
|
|
906
907
|
else if (inp.error === exports.InputError.Wrong) {
|
|
907
|
-
return inp.l('FormErrorWrong',
|
|
908
|
+
return inp.l('FormErrorWrong', n);
|
|
908
909
|
}
|
|
909
910
|
else if (inp.error === exports.InputError.Error) {
|
|
910
|
-
return inp.l('FormError',
|
|
911
|
+
return inp.l('FormError', n);
|
|
911
912
|
}
|
|
912
913
|
else if (inp.error === exports.InputError.NotMatch) {
|
|
913
914
|
return inp.l('FormErrorNotMatch', inp.match.name);
|
|
914
915
|
}
|
|
915
916
|
else if (inp.error === exports.InputError.Exist) {
|
|
916
|
-
return inp.l('FormErrorExist',
|
|
917
|
+
return inp.l('FormErrorExist', n);
|
|
917
918
|
}
|
|
918
919
|
else if (inp.error === exports.InputError.NotExist) {
|
|
919
|
-
return inp.l('FormErrorNotExist',
|
|
920
|
+
return inp.l('FormErrorNotExist', n);
|
|
920
921
|
}
|
|
921
922
|
else if (inp.error === exports.InputError.NotAllowed) {
|
|
922
|
-
return inp.l('FormErrorNotAllowed', [
|
|
923
|
+
return inp.l('FormErrorNotAllowed', [n, inp.allowed.join(', ')]);
|
|
923
924
|
}
|
|
924
925
|
else if (inp.error === exports.InputError.MaxContent) {
|
|
925
|
-
return inp.l('FormErrorMaxContent', [
|
|
926
|
+
return inp.l('FormErrorMaxContent', [n, inp.maxLength]);
|
|
926
927
|
}
|
|
927
928
|
else if (inp.error === exports.InputError.Upload) {
|
|
928
|
-
return inp.l('FormErrorUpload',
|
|
929
|
+
return inp.l('FormErrorUpload', n);
|
|
929
930
|
}
|
|
930
931
|
var desc = inp.description !== null ? ' (' + inp.l(inp.description) + ')' : '';
|
|
931
|
-
return inp.l(
|
|
932
|
+
return inp.l(n) + desc;
|
|
932
933
|
};
|
|
933
934
|
HelperClass.nationalCodeValid = function (c) {
|
|
934
935
|
if (!RegExp(/^\d{10}$/).test(c) || RegExp(/^(.)\1+$/).test(c)) {
|
|
@@ -1775,6 +1776,7 @@
|
|
|
1775
1776
|
this.inEditVisible = true;
|
|
1776
1777
|
this.inEditRequired = true;
|
|
1777
1778
|
this.displayLabel = true;
|
|
1779
|
+
this.label = null;
|
|
1778
1780
|
this.withClear = false;
|
|
1779
1781
|
this.minLength = -1;
|
|
1780
1782
|
this.maxLength = -1;
|