nice-elements 1.9.8 → 1.9.9

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.9.9 (5.12.2023)
4
+
5
+ - changed input internal type to text if type is number,
6
+ - added input modes to nice input,
7
+ - worked on demo page
8
+
9
+ ## v1.9.8 (17.11.2023)
10
+
11
+ -
12
+
3
13
  ## v1.9.7 (26.10.2023)
4
14
 
5
15
  - fixed nice search on update
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![Nice elements](https://github.com/Klemen1337/angularjs-nice-elements/raw/master/demo/assets/logo.png)
2
2
 
3
- # Nice elements v1.9.8
3
+ # Nice elements v1.9.9
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.9.8",
3
+ "version": "1.9.9",
4
4
  "authors": [
5
5
  "Klemen Kastelic <klemen@olaii.com>"
6
6
  ],
package/dist/nice.js CHANGED
@@ -3764,6 +3764,7 @@ angular.module('niceElements')
3764
3764
  attrs.textArea = angular.isDefined(attrs.textArea);
3765
3765
  attrs.noMargin = angular.isDefined(attrs.noMargin);
3766
3766
  attrs.required = attrs.required === 'true';
3767
+ scope.inputMode = null;
3767
3768
  //attrs.required = angular.isDefined(attrs.required);
3768
3769
 
3769
3770
  if (!scope.textArea) {
@@ -3777,13 +3778,19 @@ angular.module('niceElements')
3777
3778
  if (input) input.focus();
3778
3779
  }
3779
3780
 
3781
+ if (scope.numbersOnly) {
3782
+ scope.inputMode = "numeric";
3783
+ }
3784
+
3780
3785
  // Set internal type
3781
3786
  scope.internalType = attrs.type;
3782
3787
  if (attrs.type == "percent") {
3783
3788
  scope.internalType = "percent";
3789
+ scope.inputMode = "decimal";
3784
3790
  attrs.symbol = '%';
3785
3791
  } else if (attrs.type == "number") {
3786
- scope.internalType = "number";
3792
+ scope.internalType = "text";
3793
+ scope.inputMode = "decimal";
3787
3794
  if (scope.model) {
3788
3795
  scope.model = Number(scope.model);
3789
3796
  } else {
@@ -3791,8 +3798,10 @@ angular.module('niceElements')
3791
3798
  }
3792
3799
  } else if (attrs.type == "integer") {
3793
3800
  scope.internalType = "text";
3801
+ scope.inputMode = "numeric";
3794
3802
  scope.model = Number(scope.model);
3795
3803
  } else if (attrs.type == "email") {
3804
+ scope.inputMode = "email";
3796
3805
  // TODO: get rid of the errors
3797
3806
  scope.regexexp = new RegExp('^[_a-zA-Z0-9]+(.[_a-zA-Z0-9]+)*@[a-zA-Z0-9]+(.[a-zA-Z0-9]+)+(.[a-zA-Z]{2,4})');
3798
3807
  }
@@ -5824,7 +5833,7 @@ angular.module('niceElements')
5824
5833
  .service('NiceService', function () {
5825
5834
  var service = {
5826
5835
  name: "Nice elements",
5827
- version: "1.9.8",
5836
+ version: "1.9.9",
5828
5837
  getHeader: function () {
5829
5838
  return {};
5830
5839
  }
@@ -6519,7 +6528,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6519
6528
  " 'nice-disabled': isDisabled\n" +
6520
6529
  " }\">\n" +
6521
6530
  "<textarea ng-if=\"textArea\" class=\"form-control\" ng-model=\"$parent.model\" id=\"{{ id }}\" tabindex=\"{{ tabIndex }}\" placeholder=\"{{ placeholder }}\" rows=\"{{textAreaLines}}\" max=\"{{ max }}\" min=\"{{ min }}\" ng-minlength=\"minlength\" ng-maxlength=\"maxlength\" ng-required=\"required\" ng-pattern=\"regexexp\" ng-disabled=\"isDisabled\"></textarea>\n" +
6522
- "<input ng-if=\"!textArea\" class=\"form-control\" type=\"{{ internalType }}\" ng-model=\"$parent.model\" name=\"{{ name }}\" id=\"{{ id }}\" tabindex=\"{{ tabIndex }}\" placeholder=\"{{ placeholder }}\" max=\"{{ max }}\" min=\"{{ min }}\" ng-minlength=\"minlength\" ng-maxlength=\"maxlength\" ng-required=\"required\" ng-keypress=\"keypress($event)\" ng-pattern=\"regexexp\" ng-disabled=\"isDisabled\">\n" +
6531
+ "<input ng-if=\"!textArea\" class=\"form-control\" type=\"{{ internalType }}\" inputmode=\"{{ inputMode }}\" ng-model=\"$parent.model\" name=\"{{ name }}\" id=\"{{ id }}\" tabindex=\"{{ tabIndex }}\" placeholder=\"{{ placeholder }}\" max=\"{{ max }}\" min=\"{{ min }}\" ng-minlength=\"minlength\" ng-maxlength=\"maxlength\" ng-required=\"required\" ng-keypress=\"keypress($event)\" ng-pattern=\"regexexp\" ng-disabled=\"isDisabled\">\n" +
6523
6532
  "<div class=\"input-group-addon\" ng-if=\"symbol\">{{ symbol }}</div>\n" +
6524
6533
  "<button class=\"input-group-btn\" ng-if=\"multilanguageField\" ng-click=\"openMultilanguage()\">\n" +
6525
6534
  "<nice-icon icon=\"icon-translate\"></nice-icon>\n" +