nice-elements 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.7.3 (22.12.2022)
4
+
5
+ - added regex error and regex-raw to nice input component
6
+
3
7
  ## v1.7.2 (15.12.2022)
4
8
 
5
9
  - fixed nice dropdown alignment,
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![Nice elements](/demo/assets/logo.png)
2
2
 
3
- # Nice elements v1.7.2
3
+ # Nice elements v1.7.3
4
4
 
5
5
  Nice elements is an AngularJS v1.5.8 module that contains nice form elements like inputs, choice fields, search, toggle, dropdown, etc.
6
6
 
package/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nice-elements",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "authors": [
5
5
  "Klemen Kastelic <klemen@olaii.com>"
6
6
  ],
package/dist/nice.js CHANGED
@@ -3597,6 +3597,8 @@ angular.module('niceElements')
3597
3597
  type: '@',
3598
3598
  title: '@?',
3599
3599
  regex: '@?',
3600
+ regexRaw: '@?',
3601
+ regexError: '@?',
3600
3602
  placeholder: '@',
3601
3603
  min: '@?',
3602
3604
  max: '@?',
@@ -3687,6 +3689,10 @@ angular.module('niceElements')
3687
3689
  scope.regexexp = new RegExp(scope.regex);
3688
3690
  }
3689
3691
 
3692
+ if (angular.isDefined(scope.regexRaw) && scope.regexRaw != '') {
3693
+ scope.regexexp = regexRaw;
3694
+ }
3695
+
3690
3696
  scope.$watch('model', function (value_new, value_old) {
3691
3697
  scope.internalModel = scope.model;
3692
3698
  });
@@ -6070,7 +6076,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6070
6076
  "</div>\n" +
6071
6077
  "<div ng-if=\"forma.$error && forma.$dirty\">\n" +
6072
6078
  "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate translate-context=\"Nice\">Email is not valid.</div>\n" +
6073
- "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\" translate translate-context=\"Nice\">This field requires a specific pattern.</div>\n" +
6079
+ "<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\">\n" +
6080
+ "<span ng-if=\"regexError\">{{ regexError }}</span>\n" +
6081
+ "<span ng-if=\"!regexError\" translate translate-context=\"Nice\">This field requires a specific pattern.</span>\n" +
6082
+ "</div>\n" +
6074
6083
  "<div class=\"error-message\" ng-if=\"forma.$error.minlength\">\n" +
6075
6084
  "<translate translate-context=\"Nice\">Your input is too short. It must contain at least</translate>&nbsp;{{ minlength }}&nbsp;<translate translate-context=\"Nice\">characters</translate>.\n" +
6076
6085
  "</div>\n" +