@finqu/cool 1.2.26 → 1.2.28

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,5 @@
1
1
  /*!
2
- * Cool UI v1.2.26 (https://finqu.fi)
2
+ * Cool UI v1.2.28 (https://finqu.fi)
3
3
  * Copyright 2011-2020 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
@@ -3764,21 +3764,25 @@ function (_AbstractUIComponent) {
3764
3764
  this.placement = this.$el.data('placement') ? this.$el.data('placement') : this.opts.placement;
3765
3765
  this.placementChanged = false;
3766
3766
  this.content = this.$el.data('content') ? this.$el.data('content') : this.opts.content;
3767
+ this.trigger = this.$el.data('trigger') ? this.$el.data('trigger') : this.opts.trigger;
3767
3768
  } // Bind events that trigger methods
3768
3769
  ;
3769
3770
 
3770
3771
  _proto.bindEvents = function bindEvents() {
3771
3772
  var _this2 = this;
3772
3773
 
3773
- this.$el.on('mouseenter' + '.' + NAME$3, function () {
3774
- _this2.show();
3775
- });
3776
- this.$el.on('mouseleave' + '.' + NAME$3, function () {
3777
- _this2.close();
3778
- });
3779
- this.$el.on('blur' + '.' + NAME$3, function () {
3780
- _this2.close();
3781
- });
3774
+ if (this.trigger === 'auto') {
3775
+ this.$el.on('mouseenter' + '.' + NAME$3, function () {
3776
+ _this2.show();
3777
+ });
3778
+ this.$el.on('mouseleave' + '.' + NAME$3, function () {
3779
+ _this2.close();
3780
+ });
3781
+ this.$el.on('blur' + '.' + NAME$3, function () {
3782
+ _this2.close();
3783
+ });
3784
+ }
3785
+
3782
3786
  this.$el.on('destroyed' + '.' + NAME$3, function () {
3783
3787
  _this2.close();
3784
3788
  });
@@ -3821,6 +3825,7 @@ function (_AbstractUIComponent) {
3821
3825
  this.log('Animation speed: ' + this.animationSpeed);
3822
3826
  this.log('Placement: ' + this.placement);
3823
3827
  this.log('Content: ' + this.content);
3828
+ this.log('Trigger: ' + this.trigger);
3824
3829
  } // Set positions
3825
3830
  ;
3826
3831
 
@@ -4172,6 +4177,7 @@ if (typeof $ !== 'undefined') {
4172
4177
  animationSpeed: 'fastest',
4173
4178
  placement: 'bottom',
4174
4179
  content: '',
4180
+ trigger: 'auto',
4175
4181
  onInit: null,
4176
4182
  onUpdate: null,
4177
4183
  onDestroy: null,
@@ -4265,7 +4271,8 @@ function (_AbstractUIComponent) {
4265
4271
 
4266
4272
  _proto.moveToList = function moveToList(el) {
4267
4273
  var $el = $(el);
4268
- $el.removeClass('dropdown-item');
4274
+ var $itemActionEl = $el.find('.tab-item-action');
4275
+ $itemActionEl.removeClass('dropdown-item');
4269
4276
  $el.insertBefore(this.$dropdownContainer);
4270
4277
  this.checkForChanges();
4271
4278
  } // Move to dropdown
@@ -4273,9 +4280,10 @@ function (_AbstractUIComponent) {
4273
4280
 
4274
4281
  _proto.moveToDropdown = function moveToDropdown(el) {
4275
4282
  var $el = $(el);
4283
+ var $itemActionEl = $el.find('.tab-item-action');
4276
4284
 
4277
- if (!$el.hasClass('dropdown-item')) {
4278
- $el.addClass('dropdown-item');
4285
+ if (!$itemActionEl.hasClass('dropdown-item')) {
4286
+ $itemActionEl.addClass('dropdown-item');
4279
4287
  }
4280
4288
 
4281
4289
  $el.appendTo(this.$dropdownList);