nice-elements 1.4.9 → 1.4.10

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.
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "editor.formatOnSave": true,
3
3
  "html.format.wrapLineLength": 0,
4
- "prettier.printWidth": 0
4
+ "prettier.printWidth": 0,
5
+ "[scss]": {
6
+ "editor.defaultFormatter": "vscode.css-language-features"
7
+ }
5
8
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.4.10 (13.10.2022)
4
+
5
+ - used popper for nice help
6
+
3
7
  ## v1.4.9 (23.9.2022)
4
8
 
5
9
  - fixed nice-datetimerange-picker-2 model change
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Nice elements v1.4.9
1
+ # Nice elements v1.4.10
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/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nice-elements",
3
- "version": "1.4.9",
3
+ "version": "1.4.10",
4
4
  "authors": [
5
5
  "Klemen Kastelic <klemen@olaii.com>"
6
6
  ],
package/dist/nice.js CHANGED
@@ -3409,6 +3409,42 @@ angular.module('niceElements')
3409
3409
  restrict: 'E',
3410
3410
  scope: {
3411
3411
  text: '@'
3412
+ },
3413
+ controller: function ($scope, $element, $timeout) {
3414
+ // Setup popper
3415
+ // https://popper.js.org/docs/v2/constructors/
3416
+ $scope.setupPopper = function () {
3417
+ var button = $element[0].getElementsByClassName('nice-help-button')[0];
3418
+ var tooltip = $element[0].getElementsByClassName('nice-help-popup')[0];
3419
+ $scope.popper = Popper.createPopper(button, tooltip, {
3420
+ strategy: 'fixed',
3421
+ placement: 'top',
3422
+ scroll: true,
3423
+ resize: true,
3424
+ modifiers: [
3425
+ {
3426
+ name: 'offset',
3427
+ options: {
3428
+ offset: [0, 5],
3429
+ },
3430
+ },
3431
+ {
3432
+ name: 'arrow',
3433
+ options: {
3434
+ padding: 2,
3435
+ },
3436
+ }
3437
+ ],
3438
+ });
3439
+ };
3440
+
3441
+ // $timeout(function () {
3442
+ // $scope.setupPopper();
3443
+ // });
3444
+
3445
+ $scope.onHover = function () {
3446
+ $scope.setupPopper();
3447
+ }
3412
3448
  }
3413
3449
  };
3414
3450
  });
@@ -5568,10 +5604,13 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
5568
5604
 
5569
5605
 
5570
5606
  $templateCache.put('src/components/nice-help/nice-help.html',
5571
- "<div class=\"nice-help\">\n" +
5572
- "<i class=\"fa fa-question-circle\"></i>\n" +
5573
- "<div class=\"help-window\" ng-bind-html=\"text\">{{ text }}</div>\n" +
5574
- "</div>\n"
5607
+ "<div class=\"nice-help\" ng-mouseover=\"onHover()\">\n" +
5608
+ "<i class=\"fa fa-question-circle nice-help-button\" aria-label=\"\"></i>\n" +
5609
+ "<div class=\"nice-help-popup\">\n" +
5610
+ "<span ng-bind-html=\"text\">{{ text }}</span>\n" +
5611
+ "<div data-popper-arrow class=\"nice-help-arrow\"></div>\n" +
5612
+ "</div>\n" +
5613
+ "</div>"
5575
5614
  );
5576
5615
 
5577
5616