nice-elements 1.4.5 → 1.4.6

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,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## v1.4.5 (1.8.2022)
3
+ ## v1.4.6 (26.8.2022)
4
+
5
+ - fixed popper in nice-date, nice-search,
6
+ - fixed with in nice-daterange-picker-2
7
+
8
+ ## v1.4.5 (26.8.2022)
4
9
 
5
10
  - added @popperjs/core v2.11.6,
6
11
  - changed dropdown to popper in nice-dropdown, nice-date, nice-search2 and nice-daterange-picker-2
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Nice elements v1.4.5
1
+ # Nice elements v1.4.6
2
2
 
3
3
  Nice elements is an AngularJS v1.5.8 module that contains nice form elements like inputs, choice fields, search, toggle, dropdown, etc.
4
4
 
package/dist/nice.js CHANGED
@@ -921,7 +921,7 @@ angular.module('niceElements')
921
921
  isInline: '=',
922
922
  onChange: '&?'
923
923
  },
924
- controller: function($scope, $element, gettextCatalog) {
924
+ controller: function($scope, $element, $timeout, gettextCatalog) {
925
925
  $scope.isOpen = false;
926
926
  $scope.hours = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
927
927
  $scope.minutes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59];
@@ -1000,7 +1000,10 @@ angular.module('niceElements')
1000
1000
  ],
1001
1001
  });
1002
1002
  };
1003
- if (!$scope.inline) $scope.setupPopper();
1003
+
1004
+ $timeout(function() {
1005
+ if (!$scope.isInline) $scope.setupPopper();
1006
+ })
1004
1007
 
1005
1008
 
1006
1009
  // ------------------ Time changes ------------------
@@ -1208,7 +1211,9 @@ angular.module('niceElements')
1208
1211
  $scope.toggleOpen = function() {
1209
1212
  if (!$scope.isDisabled) {
1210
1213
  $scope.isOpen = !$scope.isOpen;
1211
- $scope.popper.update();
1214
+ $timeout(function() {
1215
+ if ($scope.popper) $scope.popper.update();
1216
+ })
1212
1217
  }
1213
1218
  };
1214
1219
  }
@@ -4428,6 +4433,9 @@ angular.module('niceElements')
4428
4433
  // ------------------- On focus -------------------
4429
4434
  $scope.open = function() {
4430
4435
  $scope.isOpen = true;
4436
+ $timeout(function() {
4437
+ if ($scope.popper) $scope.popper.update();
4438
+ });
4431
4439
  };
4432
4440
 
4433
4441
 
@@ -5169,7 +5177,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5169
5177
  "<i class=\"fa fa-calendar\"></i>\n" +
5170
5178
  "</span>\n" +
5171
5179
  "</div>\n" +
5172
- "<div class=\"nice-date-dropdown-wrapper\">\n" +
5180
+ "<div ng-class=\"{ 'nice-date-dropdown-wrapper': !inline }\">\n" +
5173
5181
  "<div ng-class=\"{ 'nice-date-dropdown': !inline }\" ng-if=\"inline || isOpen\">\n" +
5174
5182
  "<div class=\"nice-date-date\" ng-class=\"{ 'with-time': time }\">\n" +
5175
5183
  "<div class=\"nice-date-header\">\n" +