@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.esm.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
|
*/
|
|
@@ -2243,6 +2243,7 @@ function (_AbstractUIComponent) {
|
|
|
2243
2243
|
_this3.allowNoneOnRadioSelect = _this3.$el.data('allowNoneOnRadioSelect') ? _this3.$el.data('allowNoneOnRadioSelect') : _this3.opts.allowNoneOnRadioSelect;
|
|
2244
2244
|
_this3.showValidStateIcon = _this3.$el.data('showValidStateIcon') ? _this3.$el.data('showValidStateIcon') : _this3.opts.showValidStateIcon;
|
|
2245
2245
|
_this3.itemsToExclude = _this3.$el.data('itemsToExclude') ? _this3.$el.data('itemsToExclude').replace(/\s/g, '').split(',') : _this3.opts.itemsToExclude;
|
|
2246
|
+
_this3.primaryKeyword = _this3.$el.data('primaryKeyword') ? _this3.$el.data('primaryKeyword') : _this3.opts.primaryKeyword;
|
|
2246
2247
|
_this3.preventClose = false;
|
|
2247
2248
|
|
|
2248
2249
|
if (_this3.itemsToExclude.length > 0) {
|
|
@@ -2599,7 +2600,7 @@ function (_AbstractUIComponent) {
|
|
|
2599
2600
|
url: searchUrl
|
|
2600
2601
|
}).done(function (data) {
|
|
2601
2602
|
var items = data.map(function (item) {
|
|
2602
|
-
item.id = item.
|
|
2603
|
+
item.id = item[self.primaryKeyword].toString();
|
|
2603
2604
|
return item;
|
|
2604
2605
|
});
|
|
2605
2606
|
items = items.filter(function (item) {
|
|
@@ -2690,7 +2691,7 @@ function (_AbstractUIComponent) {
|
|
|
2690
2691
|
url: this.searchApi + this.searchString
|
|
2691
2692
|
}).done(function (data) {
|
|
2692
2693
|
var items = data.map(function (item) {
|
|
2693
|
-
item.id = item.
|
|
2694
|
+
item.id = item[self.primaryKeyword].toString();
|
|
2694
2695
|
return item;
|
|
2695
2696
|
});
|
|
2696
2697
|
items = items.filter(function (item) {
|
|
@@ -2821,7 +2822,8 @@ function (_AbstractUIComponent) {
|
|
|
2821
2822
|
var onSelect = this.opts.onSelect;
|
|
2822
2823
|
|
|
2823
2824
|
if (typeof onSelect === 'function') {
|
|
2824
|
-
|
|
2825
|
+
var data = this.getItem('id', el.value);
|
|
2826
|
+
onSelect.call(el, data, this);
|
|
2825
2827
|
}
|
|
2826
2828
|
} // Add more items after plugin is already initialized
|
|
2827
2829
|
;
|
|
@@ -3115,7 +3117,8 @@ if (typeof $ !== 'undefined') {
|
|
|
3115
3117
|
allowNoneOnRadioSelect: true,
|
|
3116
3118
|
preventUncheck: false,
|
|
3117
3119
|
showValidStateIcon: true,
|
|
3118
|
-
itemsToExclude: []
|
|
3120
|
+
itemsToExclude: [],
|
|
3121
|
+
primaryKeyword: 'id'
|
|
3119
3122
|
};
|
|
3120
3123
|
}
|
|
3121
3124
|
|
|
@@ -3395,20 +3398,26 @@ function (_AbstractUIComponent) {
|
|
|
3395
3398
|
dropdownPosY += parseInt(offsetY, 10);
|
|
3396
3399
|
}
|
|
3397
3400
|
|
|
3398
|
-
if (this.positionObserver) {
|
|
3401
|
+
if (this.positionObserver && this.$container.length > 0) {
|
|
3399
3402
|
// this is not set during init so we have to fetch it
|
|
3400
3403
|
// and let's assume that this containing parent fits and is inside
|
|
3401
3404
|
// viewport
|
|
3402
|
-
var $containingParent =
|
|
3405
|
+
var $containingParent = this.$container.parent();
|
|
3406
|
+
var index = 0;
|
|
3403
3407
|
|
|
3404
|
-
|
|
3405
|
-
$containingParent = $containingParent
|
|
3408
|
+
while ($containingParent.css('overflow-x') !== 'hidden' && $containingParent.css('overflow') !== 'hidden' && ($containingParent.prop('tagName') || '').toLowerCase() !== 'body' && index < 100) {
|
|
3409
|
+
$containingParent = $containingParent.parent();
|
|
3406
3410
|
|
|
3407
|
-
if (!$containingParent) {
|
|
3408
|
-
|
|
3409
|
-
break;
|
|
3411
|
+
if (!$containingParent.get(0)) {
|
|
3412
|
+
return;
|
|
3410
3413
|
}
|
|
3411
|
-
|
|
3414
|
+
|
|
3415
|
+
++index;
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3418
|
+
if (!$containingParent.get(0)) {
|
|
3419
|
+
return;
|
|
3420
|
+
}
|
|
3412
3421
|
|
|
3413
3422
|
var containingBoundingRect = $containingParent.get(0).getBoundingClientRect();
|
|
3414
3423
|
var containerBoundingRect = this.$container.get(0).getBoundingClientRect();
|