nice-elements 1.7.4 → 1.7.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,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.7.6 (9.1.2023)
4
+
5
+ - added form required check to nice dropdown
6
+
7
+ ## v1.7.5 (29.12.2022)
8
+
9
+ - fixed replace true bug
10
+
3
11
  ## v1.7.4 (29.12.2022)
4
12
 
5
13
  - created nice-title component,
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- ![Nice elements](demo/assets/logo.png)
1
+ ![Nice elements](https://github.com/Klemen1337/angularjs-nice-elements/raw/master/demo/assets/logo.png)
2
2
 
3
- # Nice elements v1.7.4
3
+ # Nice elements v1.7.6
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.4",
3
+ "version": "1.7.6",
4
4
  "authors": [
5
5
  "Klemen Kastelic <klemen@olaii.com>"
6
6
  ],
package/dist/nice.js CHANGED
@@ -2354,7 +2354,6 @@ angular.module('niceElements')
2354
2354
  $scope.noMargin = $scope.noMargin === 'true' || $scope.noMargin === true;
2355
2355
  $scope.multiple = $scope.multiple === 'true' || $scope.multiple === true;
2356
2356
  $scope.clearOnSelect = $scope.clearOnSelect === 'true' || $scope.clearOnSelect === true;
2357
- $scope.valid = $scope.formDropdown;
2358
2357
  $scope.isOpen = false;
2359
2358
  $scope.selected = null;
2360
2359
  $scope.selectedIndex = 0;
@@ -2624,6 +2623,11 @@ angular.module('niceElements')
2624
2623
  }
2625
2624
  }
2626
2625
  });
2626
+
2627
+ // Handle required
2628
+ $timeout(function () {
2629
+ $scope.formDropdown.$setValidity('required', !(!$scope.selected && $scope.required));
2630
+ });
2627
2631
  }
2628
2632
 
2629
2633
  // ----------------------------------- Watch for keydown and keypress -----------------------------------
@@ -3582,7 +3586,6 @@ angular.module('niceElements')
3582
3586
  return {
3583
3587
  templateUrl: 'src/components/nice-icon/nice-icon.html',
3584
3588
  restrict: 'E',
3585
- replace: true,
3586
3589
  scope: {
3587
3590
  icon: '@'
3588
3591
  },
@@ -5059,7 +5062,7 @@ angular.module('niceElements')
5059
5062
  .directive('niceTitle', function () {
5060
5063
  return {
5061
5064
  templateUrl: 'src/components/nice-title/nice-title.html',
5062
- replace: true,
5065
+ restrict: 'E',
5063
5066
  scope: {
5064
5067
  labelWidth: '=?',
5065
5068
  title: '=?',