nice-elements 1.10.13 → 1.10.15

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,18 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.10.15 (25.10.2024)
4
+
5
+ - created nice-view component,
6
+ - fixed nice-date const variable,
7
+ - worked on nice-no-data color,
8
+ - worked on example pages,
9
+ - removed sticky column background blur
10
+
11
+ ## v1.10.14 (24.10.2024)
12
+
13
+ - fixed tooltip content compile,
14
+ - added nice tooltip disable prop
15
+
3
16
  ## v1.10.13 (24.10.2024)
4
17
 
5
18
  - worked on nice tooltip,
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.10.13
3
+ # Nice elements v1.10.15
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.10.13",
3
+ "version": "1.10.15",
4
4
  "authors": ["Klemen Kastelic <klemen@olaii.com>"],
5
5
  "description": "Nice elements",
6
6
  "keywords": [],
package/dist/nice.js CHANGED
@@ -1138,7 +1138,7 @@ angular.module('niceElements')
1138
1138
 
1139
1139
  // ------------------ Time changes ------------------
1140
1140
  $scope.timeChange = function () {
1141
- const selectedDate = angular.copy($scope.model);
1141
+ let selectedDate = angular.copy($scope.model);
1142
1142
  selectedDate = $scope._removeTime(selectedDate);
1143
1143
  selectedDate.hours($scope.innerDate.hour);
1144
1144
  selectedDate.minutes($scope.innerDate.minute);
@@ -5599,7 +5599,7 @@ angular.module('niceElements')
5599
5599
  .directive('niceTooltip', function () {
5600
5600
  return {
5601
5601
  restrict: 'A',
5602
- controller: function ($scope, $element, $attrs) {
5602
+ controller: function ($scope, $element, $attrs, $compile) {
5603
5603
  const id = Math.random().toString(36).substring(7);
5604
5604
  const showEvents = ['mouseenter', 'focus'];
5605
5605
  const hideEvents = ['mouseleave', 'blur'];
@@ -5612,9 +5612,8 @@ angular.module('niceElements')
5612
5612
  tooltipWindow.id = 'nice-tooltip-window-' + id;
5613
5613
 
5614
5614
  // Popper body
5615
- const tooltipWindowBody = document.createElement('div');
5616
- tooltipWindowBody.innerHTML = $attrs.niceTooltip;
5617
- tooltipWindow.append(tooltipWindowBody);
5615
+ const content = $compile("<div class='nice-tooltip-body'>" + $attrs.niceTooltip + "</div>")($scope);
5616
+ tooltipWindow.append(content[0]);
5618
5617
 
5619
5618
  // Popper arrow
5620
5619
  const tooltipWindowArrow = document.createElement('div');
@@ -5647,6 +5646,7 @@ angular.module('niceElements')
5647
5646
  });
5648
5647
 
5649
5648
  function show() {
5649
+ if ($attrs.niceTooltipDisabled == true || $attrs.niceTooltipDisabled == "true") return;
5650
5650
  tooltipWindow.setAttribute('data-show', '');
5651
5651
  popper.update();
5652
5652
  }
@@ -5834,6 +5834,37 @@ angular.module('niceElements')
5834
5834
 
5835
5835
  'use strict';
5836
5836
 
5837
+ /**
5838
+ * @ngdoc directive
5839
+ * @name niceElements.directive:niceView
5840
+ * @description
5841
+ * # niceView
5842
+ */
5843
+ angular.module('niceElements')
5844
+ .directive('niceView', function () {
5845
+ return {
5846
+ templateUrl: 'src/components/nice-view/nice-view.html',
5847
+ restrict: 'E',
5848
+ replace: true,
5849
+ transclude: {
5850
+ 'header': '?niceViewHeader',
5851
+ 'footer': '?niceViewFooter'
5852
+ },
5853
+ scope: {
5854
+ niceTitle: '@',
5855
+ niceSubtitle: '@',
5856
+ niceIcon: '@',
5857
+ submit: '=',
5858
+ },
5859
+ controller: function ($scope, $transclude) {
5860
+ $scope.hasHeader = $transclude.isSlotFilled('header') || $scope.niceTitle || $scope.niceSubtitle || $scope.niceIcon;
5861
+ $scope.hasFooter = $transclude.isSlotFilled('footer');
5862
+ }
5863
+ };
5864
+ });
5865
+
5866
+ 'use strict';
5867
+
5837
5868
  /**
5838
5869
  * @ngdoc directive
5839
5870
  * @name niceElements.directive:niceWrapper
@@ -5867,7 +5898,7 @@ angular.module('niceElements')
5867
5898
  $scope.hasTitle = $transclude.isSlotFilled('title');
5868
5899
  $scope.hasSubtitle = $transclude.isSlotFilled('subtitle');
5869
5900
  $scope.hasFooter = $transclude.isSlotFilled('footer');
5870
- $scope.hasHeader = $scope.hasTitle || $scope.hasSubtitle || $scope.title || $scope.subtitle || $scope.collapsable;
5901
+ $scope.hasHeader = $scope.hasTitle || $scope.hasSubtitle || $scope.title || $scope.niceTitle || $scope.subtitle || $scope.collapsable;
5871
5902
 
5872
5903
  $scope.toggle = function () {
5873
5904
  if (!$scope.collapsable) return;
@@ -6036,7 +6067,7 @@ angular.module('niceElements')
6036
6067
  .service('NiceService', function ($rootScope) {
6037
6068
  var service = {
6038
6069
  name: "Nice elements",
6039
- version: "1.10.12",
6070
+ version: "1.10.15",
6040
6071
  getHeader: function () {
6041
6072
  return {};
6042
6073
  },
@@ -8165,6 +8196,23 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
8165
8196
  );
8166
8197
 
8167
8198
 
8199
+ $templateCache.put('src/components/nice-view/nice-view.html',
8200
+ "<form class=\"nice-view\" ng-submit=\"submit\" ng-class=\"{ 'nice-view-has-header': hasHeader, 'nice-view-has-footer': hasFooter }\">\n" +
8201
+ "<div class=\"nice-view-header\" ng-if=\"hasHeader\">\n" +
8202
+ "<div class=\"nice-view-header-wrapper\">\n" +
8203
+ "<nice-icon ng-if=\"niceIcon\" icon=\"{{ niceIcon }}\"></nice-icon>\n" +
8204
+ "<div>\n" +
8205
+ "<div class=\"nice-view-header-subtitle\">{{ niceSubtitle }}</div>\n" +
8206
+ "<div class=\"nice-view-header-title\">{{ niceTitle }}</div>\n" +
8207
+ "</div>\n" +
8208
+ "</div>\n" +
8209
+ "</div>\n" +
8210
+ "<div class=\"nice-view-body\" ng-transclude></div>\n" +
8211
+ "<div class=\"nice-view-footer\" ng-if=\"hasFooter\" ng-transclude=\"footer\"></div>\n" +
8212
+ "</form>"
8213
+ );
8214
+
8215
+
8168
8216
  $templateCache.put('src/components/nice-wrapper/nice-wrapper.html',
8169
8217
  "<div class=\"nice-wrapper\" ng-class=\"{ 'collapsable': collapsable, 'has-header': hasHeader, 'has-footer': hasFooter, 'nice-wrapper-sticky-footer': stickyFooter, 'nice-wrapper-sticky-header': stickyHeader }\">\n" +
8170
8218
  "<div class=\"nice-wrapper-header\" ng-if=\"hasHeader\" ng-click=\"toggle()\">\n" +