@finqu/cool 1.2.4 → 1.2.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/dist/css/cool-grid.css +2 -2
- package/dist/css/cool-grid.css.map +2 -2
- package/dist/css/cool-grid.min.css +1 -1
- package/dist/css/cool-grid.min.css.map +1 -1
- package/dist/css/cool-reboot.css +2 -2
- package/dist/css/cool-reboot.css.map +2 -2
- package/dist/css/cool-reboot.min.css +1 -1
- package/dist/css/cool-reboot.min.css.map +1 -1
- package/dist/css/cool.css +78 -45
- package/dist/css/cool.css.map +5 -5
- package/dist/css/cool.min.css +2 -2
- package/dist/css/cool.min.css.map +1 -1
- package/dist/js/cool.bundle.js +22 -13
- package/dist/js/cool.bundle.js.map +1 -1
- package/dist/js/cool.bundle.min.js +2 -2
- package/dist/js/cool.bundle.min.js.map +1 -1
- package/dist/js/cool.esm.js +22 -13
- package/dist/js/cool.esm.js.map +1 -1
- package/dist/js/cool.esm.min.js +2 -2
- package/dist/js/cool.esm.min.js.map +1 -1
- package/dist/js/cool.js +22 -13
- package/dist/js/cool.js.map +1 -1
- package/dist/js/cool.min.js +2 -2
- package/dist/js/cool.min.js.map +1 -1
- package/html/index.html +80 -0
- package/js/dist/collapse.js +1 -1
- package/js/dist/common.js +1 -1
- package/js/dist/dropdown.js +860 -772
- package/js/dist/dropdown.js.map +1 -1
- package/js/dist/popover.js +1 -1
- package/js/dist/sectiontabs.js +1 -1
- package/js/dist/select.js +3508 -3448
- package/js/dist/select.js.map +1 -1
- package/js/dist/tooltip.js +1 -1
- package/js/src/dropdown.js +19 -9
- package/js/src/select.js +8 -4
- package/package.json +1 -1
- package/scss/_frame.scss +1 -0
- package/scss/_section.scss +32 -0
- package/scss/_variables.scss +1 -1
- package/scss/cool-grid.scss +1 -1
- package/scss/cool-reboot.scss +1 -1
- package/scss/cool.scss +1 -1
package/dist/js/cool.bundle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cool UI v1.2.
|
|
2
|
+
* Cool UI v1.2.5 (https://finqu.fi)
|
|
3
3
|
* Copyright 2011-2019 Finqu Oy
|
|
4
4
|
* Licensed under the ISC license - (http://opensource.org/licenses/ISC)
|
|
5
5
|
*/
|
|
@@ -2247,6 +2247,7 @@
|
|
|
2247
2247
|
_this3.allowNoneOnRadioSelect = _this3.$el.data('allowNoneOnRadioSelect') ? _this3.$el.data('allowNoneOnRadioSelect') : _this3.opts.allowNoneOnRadioSelect;
|
|
2248
2248
|
_this3.showValidStateIcon = _this3.$el.data('showValidStateIcon') ? _this3.$el.data('showValidStateIcon') : _this3.opts.showValidStateIcon;
|
|
2249
2249
|
_this3.itemsToExclude = _this3.$el.data('itemsToExclude') ? _this3.$el.data('itemsToExclude').replace(/\s/g, '').split(',') : _this3.opts.itemsToExclude;
|
|
2250
|
+
_this3.primaryKeyword = _this3.$el.data('primaryKeyword') ? _this3.$el.data('primaryKeyword') : _this3.opts.primaryKeyword;
|
|
2250
2251
|
_this3.preventClose = false;
|
|
2251
2252
|
|
|
2252
2253
|
if (_this3.itemsToExclude.length > 0) {
|
|
@@ -2603,7 +2604,7 @@
|
|
|
2603
2604
|
url: searchUrl
|
|
2604
2605
|
}).done(function (data) {
|
|
2605
2606
|
var items = data.map(function (item) {
|
|
2606
|
-
item.id = item.
|
|
2607
|
+
item.id = item[self.primaryKeyword].toString();
|
|
2607
2608
|
return item;
|
|
2608
2609
|
});
|
|
2609
2610
|
items = items.filter(function (item) {
|
|
@@ -2694,7 +2695,7 @@
|
|
|
2694
2695
|
url: this.searchApi + this.searchString
|
|
2695
2696
|
}).done(function (data) {
|
|
2696
2697
|
var items = data.map(function (item) {
|
|
2697
|
-
item.id = item.
|
|
2698
|
+
item.id = item[self.primaryKeyword].toString();
|
|
2698
2699
|
return item;
|
|
2699
2700
|
});
|
|
2700
2701
|
items = items.filter(function (item) {
|
|
@@ -2825,7 +2826,8 @@
|
|
|
2825
2826
|
var onSelect = this.opts.onSelect;
|
|
2826
2827
|
|
|
2827
2828
|
if (typeof onSelect === 'function') {
|
|
2828
|
-
|
|
2829
|
+
var data = this.getItem('id', el.value);
|
|
2830
|
+
onSelect.call(el, data, this);
|
|
2829
2831
|
}
|
|
2830
2832
|
} // Add more items after plugin is already initialized
|
|
2831
2833
|
;
|
|
@@ -3119,7 +3121,8 @@
|
|
|
3119
3121
|
allowNoneOnRadioSelect: true,
|
|
3120
3122
|
preventUncheck: false,
|
|
3121
3123
|
showValidStateIcon: true,
|
|
3122
|
-
itemsToExclude: []
|
|
3124
|
+
itemsToExclude: [],
|
|
3125
|
+
primaryKeyword: 'id'
|
|
3123
3126
|
};
|
|
3124
3127
|
}
|
|
3125
3128
|
|
|
@@ -3399,20 +3402,26 @@
|
|
|
3399
3402
|
dropdownPosY += parseInt(offsetY, 10);
|
|
3400
3403
|
}
|
|
3401
3404
|
|
|
3402
|
-
if (this.positionObserver) {
|
|
3405
|
+
if (this.positionObserver && this.$container.length > 0) {
|
|
3403
3406
|
// this is not set during init so we have to fetch it
|
|
3404
3407
|
// and let's assume that this containing parent fits and is inside
|
|
3405
3408
|
// viewport
|
|
3406
|
-
var $containingParent =
|
|
3409
|
+
var $containingParent = this.$container.parent();
|
|
3410
|
+
var index = 0;
|
|
3407
3411
|
|
|
3408
|
-
|
|
3409
|
-
$containingParent = $containingParent
|
|
3412
|
+
while ($containingParent.css('overflow-x') !== 'hidden' && $containingParent.css('overflow') !== 'hidden' && ($containingParent.prop('tagName') || '').toLowerCase() !== 'body' && index < 100) {
|
|
3413
|
+
$containingParent = $containingParent.parent();
|
|
3410
3414
|
|
|
3411
|
-
if (!$containingParent) {
|
|
3412
|
-
|
|
3413
|
-
break;
|
|
3415
|
+
if (!$containingParent.get(0)) {
|
|
3416
|
+
return;
|
|
3414
3417
|
}
|
|
3415
|
-
|
|
3418
|
+
|
|
3419
|
+
++index;
|
|
3420
|
+
}
|
|
3421
|
+
|
|
3422
|
+
if (!$containingParent.get(0)) {
|
|
3423
|
+
return;
|
|
3424
|
+
}
|
|
3416
3425
|
|
|
3417
3426
|
var containingBoundingRect = $containingParent.get(0).getBoundingClientRect();
|
|
3418
3427
|
var containerBoundingRect = this.$container.get(0).getBoundingClientRect();
|