nice-elements 1.8.2 → 1.8.4

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,16 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.8.4 (2.6.2023)
4
+
5
+ - added filterFunction to nice dropdown,
6
+ - worked on nice-datetimerange-picker-2 mobile style,
7
+ - added size param to nice-icon,
8
+ - worked on nice-icon demo view
9
+
10
+ ## v1.8.3 (30.5.2023)
11
+
12
+ - added clickDisabled prop to nice-checkbox component
13
+
3
14
  ## v1.8.2 (6.4.2023)
4
15
 
5
16
  - added select with mouse down to nice choice,
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.8.2
3
+ # Nice elements v1.8.4
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.8.2",
3
+ "version": "1.8.4",
4
4
  "authors": [
5
5
  "Klemen Kastelic <klemen@olaii.com>"
6
6
  ],
package/dist/nice.js CHANGED
@@ -419,6 +419,7 @@ angular.module('niceElements')
419
419
  model: '=',
420
420
  title: '@',
421
421
  noMargin: '@',
422
+ clickDisabled: '@',
422
423
  onChange: '&?',
423
424
  isDisabled: '=',
424
425
  },
@@ -426,7 +427,7 @@ angular.module('niceElements')
426
427
  if ($scope.model === undefined) $scope.model = false;
427
428
 
428
429
  $scope.toggle = function () {
429
- if ($scope.isDisabled) return;
430
+ if ($scope.isDisabled || $scope.clickDisabled) return;
430
431
  $scope.model = !$scope.model;
431
432
  if ($scope.onChange) $scope.onChange({ model: $scope.model });
432
433
  };
@@ -2346,6 +2347,7 @@ angular.module('niceElements')
2346
2347
  selectedText: '@',
2347
2348
  dropdownDistance: '@',
2348
2349
  searchFunction: '=?',
2350
+ filterFunction: '=?',
2349
2351
  isInline: '=',
2350
2352
  clearOnSelect: '@',
2351
2353
  enableLoadMore: '@' // Enable load more
@@ -2523,7 +2525,8 @@ angular.module('niceElements')
2523
2525
  $scope.handleSearch = function () {
2524
2526
  $scope.loading = true;
2525
2527
  $scope.searchFunction($scope.internal.search).then(function (response) {
2526
- $scope.internalList = response;
2528
+ if ($scope.filterFunction) $scope.internalList = $scope.filterFunction(response);
2529
+ else $scope.internalList = response;
2527
2530
  $scope.loading = false;
2528
2531
  $scope.handleDefault();
2529
2532
  }, function (error) {
@@ -2625,7 +2628,8 @@ angular.module('niceElements')
2625
2628
 
2626
2629
  // ----------------------------------- Watch for list change -----------------------------------
2627
2630
  $scope.$watchCollection('list', function (value_new, value_old) {
2628
- $scope.internalList = angular.copy($scope.list);
2631
+ if ($scope.filterFunction) $scope.internalList = $scope.filterFunction(angular.copy($scope.list));
2632
+ else $scope.internalList = angular.copy($scope.list);
2629
2633
  $scope.handleDefault();
2630
2634
  });
2631
2635
 
@@ -3647,7 +3651,8 @@ angular.module('niceElements')
3647
3651
  restrict: 'E',
3648
3652
  replace: true,
3649
3653
  scope: {
3650
- icon: '@'
3654
+ icon: '@',
3655
+ size: '=',
3651
3656
  },
3652
3657
  };
3653
3658
  });
@@ -5580,7 +5585,7 @@ angular.module('niceElements')
5580
5585
  .service('NiceService', function () {
5581
5586
  var service = {
5582
5587
  name: "Nice elements",
5583
- version: "1.8.2",
5588
+ version: "1.8.4",
5584
5589
  getHeader: function () {
5585
5590
  return {};
5586
5591
  }
@@ -6173,7 +6178,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
6173
6178
 
6174
6179
 
6175
6180
  $templateCache.put('src/components/nice-icon/nice-icon.html',
6176
- "<svg class=\"nice-icon\">\n" +
6181
+ "<svg class=\"nice-icon\" ng-style=\"{ 'width': size + 'px', 'height': size + 'px' }\">\n" +
6177
6182
  "<use ng-attr-xlink:href=\"{{ '#' + icon }}\" xlink:href=\"\"></use>\n" +
6178
6183
  "</svg>"
6179
6184
  );