@finqu/cool 1.1.3 → 1.1.5

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.1.2 (https://finqu.fi)
2
+ * Cool UI v1.1.3 (https://finqu.fi)
3
3
  * Copyright 2011-2019 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
@@ -1256,8 +1256,12 @@ $.fn.extend({
1256
1256
  window.Cool = window.Cool || {};
1257
1257
  window.Cool.settings = window.Cool.settings || {};
1258
1258
 
1259
- class Common {
1260
- static initialize(opts) {
1259
+ var Common =
1260
+ /*#__PURE__*/
1261
+ function () {
1262
+ function Common() {}
1263
+
1264
+ Common.initialize = function initialize(opts) {
1261
1265
  // There's an error if opts is not defined
1262
1266
  opts = opts || {}; // Save settings for later use
1263
1267
 
@@ -1276,7 +1280,7 @@ class Common {
1276
1280
 
1277
1281
  $(document).on('focus', '.form-control', function () {
1278
1282
  if (!$(this).hasClass('disabled') && $(this).not(':disabled') && !$(this).attr('readonly')) {
1279
- let $inputGroup = $(this).closest('.input-group');
1283
+ var $inputGroup = $(this).closest('.input-group');
1280
1284
 
1281
1285
  if (!$inputGroup.hasClass('input-group-focus')) {
1282
1286
  $inputGroup.addClass('input-group-focus');
@@ -1286,7 +1290,7 @@ class Common {
1286
1290
 
1287
1291
  $(document).on('blur', '.form-control', function () {
1288
1292
  if (!$(this).hasClass('disabled') && $(this).not(':disabled') && !$(this).attr('readonly')) {
1289
- let $inputGroup = $(this).closest('.input-group');
1293
+ var $inputGroup = $(this).closest('.input-group');
1290
1294
 
1291
1295
  if ($inputGroup.hasClass('input-group-focus')) {
1292
1296
  $inputGroup.removeClass('input-group-focus');
@@ -1295,9 +1299,9 @@ class Common {
1295
1299
  }); // Custom Form group
1296
1300
 
1297
1301
  $('.form-label-group').each(function (i, formLabelGroup) {
1298
- let $formLabelGroup = $(formLabelGroup);
1302
+ var $formLabelGroup = $(formLabelGroup);
1299
1303
  $formLabelGroup.find('input').on('blur input change', function () {
1300
- let val = $(this).val();
1304
+ var val = $(this).val();
1301
1305
 
1302
1306
  if (val) {
1303
1307
  $(formLabelGroup).addClass('label-on-top');
@@ -1313,11 +1317,11 @@ class Common {
1313
1317
  }
1314
1318
  });
1315
1319
  $(document).on('click', '[data-table-link]', function (e) {
1316
- let $container = $(this).parents('table, .table');
1317
- let href = $(this).data('tableLink');
1318
- let target = $(e.target);
1319
- let exceptions = ['input', 'button', 'a', 'label', 'td.col-select'];
1320
- let linkDisabled = false;
1320
+ var $container = $(this).parents('table, .table');
1321
+ var href = $(this).data('tableLink');
1322
+ var target = $(e.target);
1323
+ var exceptions = ['input', 'button', 'a', 'label', 'td.col-select'];
1324
+ var linkDisabled = false;
1321
1325
  $.each(exceptions, function (item) {
1322
1326
  if (target.is(item) || item == 'a' && target.parent().is(item)) {
1323
1327
  linkDisabled = true;
@@ -1339,12 +1343,12 @@ class Common {
1339
1343
  }
1340
1344
  });
1341
1345
  $(document).on('click', '[data-table-btn]', function (e) {
1342
- let $container = $(this).parents('table, .table');
1343
- let $self = $(this);
1344
- let btn = $(this).data('tableButton');
1345
- let target = $(e.target);
1346
- let exceptions = ['input', 'button', 'a', 'label', 'td.col-select'];
1347
- let btnDisabled = false;
1346
+ var $container = $(this).parents('table, .table');
1347
+ var $self = $(this);
1348
+ var btn = $(this).data('tableButton');
1349
+ var target = $(e.target);
1350
+ var exceptions = ['input', 'button', 'a', 'label', 'td.col-select'];
1351
+ var btnDisabled = false;
1348
1352
 
1349
1353
  if (!btn) {
1350
1354
  btn = $self.find('button')[0];
@@ -1403,11 +1407,11 @@ class Common {
1403
1407
  }
1404
1408
  }); // Sidebar left scroll
1405
1409
 
1406
- let $sidebarLeft = $('.sidebar-left');
1407
- let $sidebarLeftContent = $sidebarLeft.find('.sidebar-content');
1410
+ var $sidebarLeft = $('.sidebar-left');
1411
+ var $sidebarLeftContent = $sidebarLeft.find('.sidebar-content');
1408
1412
 
1409
1413
  if ($sidebarLeftContent.length) {
1410
- let sidebarLeftScroll = new PerfectScrollbar($sidebarLeftContent[0], {
1414
+ var sidebarLeftScroll = new PerfectScrollbar($sidebarLeftContent[0], {
1411
1415
  wheelSpeed: 2,
1412
1416
  wheelPropagation: true,
1413
1417
  minScrollbarLength: 20,
@@ -1416,12 +1420,12 @@ class Common {
1416
1420
  } // Sidebar tabs
1417
1421
 
1418
1422
 
1419
- let $sidebarTabs = $(document).find('.sidebar-tab');
1423
+ var $sidebarTabs = $(document).find('.sidebar-tab');
1420
1424
 
1421
1425
  if ($sidebarTabs.length) {
1422
1426
  $.each($sidebarTabs, function (i, el) {
1423
- let scrollContainer = $(el).find('.tab-content');
1424
- const sidebarTabsScroll = new PerfectScrollbar(scrollContainer[0], {
1427
+ var scrollContainer = $(el).find('.tab-content');
1428
+ var sidebarTabsScroll = new PerfectScrollbar(scrollContainer[0], {
1425
1429
  wheelSpeed: 2,
1426
1430
  wheelPropagation: true,
1427
1431
  minScrollbarLength: 20,
@@ -1429,8 +1433,8 @@ class Common {
1429
1433
  });
1430
1434
  });
1431
1435
  $('[name="sidebar-tab-select"]').on('click', function () {
1432
- let val = $(this).val();
1433
- let $tab = $('#sidebar-tab-' + val);
1436
+ var val = $(this).val();
1437
+ var $tab = $('#sidebar-tab-' + val);
1434
1438
  $sidebarTabs.not($tab).removeClass('active');
1435
1439
  $tab.addClass('active');
1436
1440
  $('[name="sidebar-tab-select"]').not($(this)).removeClass('active');
@@ -1458,19 +1462,26 @@ class Common {
1458
1462
  });
1459
1463
  });
1460
1464
  }
1461
- }
1465
+ };
1462
1466
 
1463
- }
1467
+ return Common;
1468
+ }();
1464
1469
 
1465
1470
  window.Cool.initialize = Common.initialize;
1466
1471
 
1467
- const debounce = function debounce(func, wait, immediate) {
1468
- let timeout;
1472
+ function _inheritsLoose(subClass, superClass) {
1473
+ subClass.prototype = Object.create(superClass.prototype);
1474
+ subClass.prototype.constructor = subClass;
1475
+ subClass.__proto__ = superClass;
1476
+ }
1477
+
1478
+ var debounce = function debounce(func, wait, immediate) {
1479
+ var timeout;
1469
1480
  return function () {
1470
- let context = this;
1471
- let args = arguments;
1481
+ var context = this;
1482
+ var args = arguments;
1472
1483
 
1473
- let later = function later() {
1484
+ var later = function later() {
1474
1485
  timeout = null;
1475
1486
 
1476
1487
  if (!immediate) {
@@ -1478,7 +1489,7 @@ const debounce = function debounce(func, wait, immediate) {
1478
1489
  }
1479
1490
  };
1480
1491
 
1481
- let callNow = immediate && !timeout;
1492
+ var callNow = immediate && !timeout;
1482
1493
  clearTimeout(timeout);
1483
1494
  timeout = setTimeout(later, wait);
1484
1495
 
@@ -1488,8 +1499,8 @@ const debounce = function debounce(func, wait, immediate) {
1488
1499
  };
1489
1500
  };
1490
1501
 
1491
- const touchEvents = function touchEvents() {
1492
- let result = false;
1502
+ var touchEvents = function touchEvents() {
1503
+ var result = false;
1493
1504
 
1494
1505
  if ('ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch) {
1495
1506
  result = true;
@@ -1498,106 +1509,126 @@ const touchEvents = function touchEvents() {
1498
1509
  return result;
1499
1510
  };
1500
1511
 
1501
- class AbstractUIComponent {
1512
+ var AbstractUIComponent =
1513
+ /*#__PURE__*/
1514
+ function () {
1515
+ function AbstractUIComponent() {}
1516
+
1517
+ var _proto = AbstractUIComponent.prototype;
1518
+
1502
1519
  // Init callback
1503
- onInit() {
1504
- let onInit = this.opts.onInit;
1520
+ _proto.onInit = function onInit() {
1521
+ var onInit = this.opts.onInit;
1505
1522
 
1506
1523
  if (typeof onInit === 'function') {
1507
1524
  onInit.call(this.el);
1508
1525
  }
1509
1526
  } // Update callback
1527
+ ;
1510
1528
 
1511
-
1512
- onUpdate() {
1513
- let onUpdate = this.opts.onUpdate;
1529
+ _proto.onUpdate = function onUpdate() {
1530
+ var onUpdate = this.opts.onUpdate;
1514
1531
 
1515
1532
  if (typeof onUpdate === 'function') {
1516
1533
  onUpdate.call(this.el);
1517
1534
  }
1518
1535
  } // Destroy callback
1536
+ ;
1519
1537
 
1520
-
1521
- onDestroy() {
1522
- let onDestroy = this.opts.onDestroy;
1538
+ _proto.onDestroy = function onDestroy() {
1539
+ var onDestroy = this.opts.onDestroy;
1523
1540
 
1524
1541
  if (typeof onDestroy === 'function') {
1525
1542
  onDestroy.call(this.el);
1526
1543
  }
1527
1544
  } // Show callback
1545
+ ;
1528
1546
 
1529
-
1530
- onShow() {
1531
- let onShow = this.opts.onShow;
1547
+ _proto.onShow = function onShow() {
1548
+ var onShow = this.opts.onShow;
1532
1549
 
1533
1550
  if (typeof onShow === 'function') {
1534
1551
  onShow.call(this.el);
1535
1552
  }
1536
1553
  } // Close callback
1554
+ ;
1537
1555
 
1538
-
1539
- onClose() {
1540
- let onClose = this.opts.onClose;
1556
+ _proto.onClose = function onClose() {
1557
+ var onClose = this.opts.onClose;
1541
1558
 
1542
1559
  if (typeof onClose === 'function') {
1543
1560
  onClose.call(this.el);
1544
1561
  }
1545
1562
  } // Debug log
1563
+ ;
1546
1564
 
1547
-
1548
- log() {
1565
+ _proto.log = function log() {
1549
1566
  if (this.debug) {
1550
1567
  if (typeof this.debug === 'function') {
1551
- this.debug(...arguments);
1568
+ this.debug.apply(this, arguments);
1552
1569
  } else {
1553
- console.log(...arguments);
1570
+ var _console;
1571
+
1572
+ (_console = console).log.apply(_console, arguments);
1554
1573
  }
1555
1574
  }
1556
- }
1575
+ };
1557
1576
 
1558
- }
1577
+ return AbstractUIComponent;
1578
+ }();
1579
+
1580
+ var NAME = 'coolPopover';
1581
+ var DATA_KEY = 'plugin_coolPopover';
1559
1582
 
1560
- const NAME = 'coolPopover';
1561
- const DATA_KEY = 'plugin_coolPopover';
1583
+ var Popover =
1584
+ /*#__PURE__*/
1585
+ function (_AbstractUIComponent) {
1586
+ _inheritsLoose(Popover, _AbstractUIComponent);
1562
1587
 
1563
- class Popover extends AbstractUIComponent {
1564
- constructor(el, opts) {
1565
- super();
1566
- this.opts = {};
1588
+ function Popover(el, opts) {
1589
+ var _this;
1590
+
1591
+ _this = _AbstractUIComponent.call(this) || this;
1592
+ _this.opts = {};
1567
1593
 
1568
1594
  if (window.Cool.settings.popover) {
1569
- $.extend(true, this.opts, $.fn[NAME].defaults, window.Cool.settings.popover, opts);
1595
+ $.extend(true, _this.opts, $.fn[NAME].defaults, window.Cool.settings.popover, opts);
1570
1596
  } else {
1571
- $.extend(true, this.opts, $.fn[NAME].defaults, opts);
1597
+ $.extend(true, _this.opts, $.fn[NAME].defaults, opts);
1572
1598
  }
1573
1599
 
1574
- this.el = el;
1575
- this.debug = this.opts.debug;
1576
- this.init();
1600
+ _this.el = el;
1601
+ _this.debug = _this.opts.debug;
1602
+
1603
+ _this.init();
1604
+
1605
+ return _this;
1577
1606
  } // Init plugin
1578
1607
 
1579
1608
 
1580
- init() {
1609
+ var _proto = Popover.prototype;
1610
+
1611
+ _proto.init = function init() {
1581
1612
  this.buildCache();
1582
1613
  this.bindEvents();
1583
1614
  this.onInit();
1584
1615
  } // Remove plugin instance completely
1616
+ ;
1585
1617
 
1586
-
1587
- destroy() {
1618
+ _proto.destroy = function destroy() {
1588
1619
  this.unbindEvents();
1589
1620
  this.$el.removeData(DATA_KEY);
1590
1621
  this.onDestroy();
1591
1622
  } // Update plugin data
1623
+ ;
1592
1624
 
1593
-
1594
- update() {
1625
+ _proto.update = function update() {
1595
1626
  this.buildCache();
1596
1627
  this.onUpdate();
1597
1628
  } // Cache DOM nodes for performance
1629
+ ;
1598
1630
 
1599
-
1600
- buildCache() {
1631
+ _proto.buildCache = function buildCache() {
1601
1632
  this.$el = $(this.el);
1602
1633
  this.$container = this.$el.data('container') ? $(this.$el.data('container')) : $(this.opts.container);
1603
1634
  this.id = 'popover-' + this.generateUUID();
@@ -1611,58 +1642,61 @@ class Popover extends AbstractUIComponent {
1611
1642
  this.title = this.$el.data('title') ? this.$el.data('title') : this.opts.title;
1612
1643
  this.content = this.$el.data('content') ? this.$el.data('content') : this.opts.content;
1613
1644
  } // Bind events that trigger methods
1645
+ ;
1614
1646
 
1647
+ _proto.bindEvents = function bindEvents() {
1648
+ var _this2 = this;
1615
1649
 
1616
- bindEvents() {
1617
1650
  if (this.trigger === 'click') {
1618
- this.$el.on('click' + '.' + NAME, () => {
1619
- if (this.$popover) {
1620
- this.close();
1651
+ this.$el.on('click' + '.' + NAME, function () {
1652
+ if (_this2.$popover) {
1653
+ _this2.close();
1621
1654
  } else {
1622
- this.show();
1655
+ _this2.show();
1623
1656
  }
1624
1657
  });
1625
1658
  } else if (this.trigger === 'hover') {
1626
- this.$el.on('mouseenter' + '.' + NAME, () => {
1627
- this.show();
1659
+ this.$el.on('mouseenter' + '.' + NAME, function () {
1660
+ _this2.show();
1628
1661
  });
1629
- this.$el.on('mouseleave' + '.' + NAME, () => {
1630
- this.close();
1662
+ this.$el.on('mouseleave' + '.' + NAME, function () {
1663
+ _this2.close();
1631
1664
  });
1632
1665
  } else if (this.trigger === 'focus') {
1633
- this.$el.on('focusin' + '.' + NAME, () => {
1634
- this.show();
1666
+ this.$el.on('focusin' + '.' + NAME, function () {
1667
+ _this2.show();
1635
1668
  });
1636
- this.$el.on('focusout' + '.' + NAME, () => {
1637
- this.close();
1669
+ this.$el.on('focusout' + '.' + NAME, function () {
1670
+ _this2.close();
1638
1671
  });
1639
1672
  }
1640
1673
 
1641
- $(window).on('resize', debounce(() => {
1642
- if (this.$popover) {
1643
- this.setPosition();
1644
- this.onUpdate();
1674
+ $(window).on('resize', debounce(function () {
1675
+ if (_this2.$popover) {
1676
+ _this2.setPosition();
1677
+
1678
+ _this2.onUpdate();
1645
1679
  }
1646
1680
  }, 250));
1647
1681
  } // Unbind events that trigger methods
1682
+ ;
1648
1683
 
1649
-
1650
- unbindEvents() {
1684
+ _proto.unbindEvents = function unbindEvents() {
1651
1685
  this.$el.off('.' + NAME);
1652
1686
  } // Generate UUID
1687
+ ;
1653
1688
 
1654
-
1655
- generateUUID() {
1689
+ _proto.generateUUID = function generateUUID() {
1656
1690
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
1657
- let r = Math.random() * 16 | 0,
1691
+ var r = Math.random() * 16 | 0,
1658
1692
  v = c == 'x' ? r : r & 0x3 | 0x8;
1659
1693
  return v.toString(16);
1660
1694
  });
1661
1695
  } // Build popover
1696
+ ;
1662
1697
 
1663
-
1664
- buildPopover() {
1665
- let content;
1698
+ _proto.buildPopover = function buildPopover() {
1699
+ var content;
1666
1700
 
1667
1701
  if (typeof this.content === 'function') {
1668
1702
  content = this.content();
@@ -1687,27 +1721,27 @@ class Popover extends AbstractUIComponent {
1687
1721
  this.log('Title: ' + this.title);
1688
1722
  this.log('Content: ' + this.content);
1689
1723
  } // Set positions
1724
+ ;
1690
1725
 
1691
-
1692
- setPosition(placement) {
1726
+ _proto.setPosition = function setPosition(placement) {
1693
1727
  if (typeof placement === 'undefined' || placement === null) {
1694
1728
  placement = this.placement;
1695
1729
  }
1696
1730
 
1697
1731
  this.$popover.addClass('popover-' + placement);
1698
- let containerInnerWidth = this.$container.innerWidth();
1699
- let containerInnerHeight = this.$container.innerHeight();
1700
- let popoverWidth = this.$popover.outerWidth(true);
1701
- let popoverHeight = this.$popover.outerHeight(true);
1702
- let popoverTriggerWidth = this.$el.outerWidth();
1703
- let popoverTriggerHeight = this.$el.outerHeight();
1704
- let popoverTriggerPosX = this.$el.position().left;
1705
- let popoverTriggerPosY = this.$el.position().top;
1706
- let arrowWidth = this.$arrow.outerWidth(true);
1707
- let arrowHeight = this.$arrow.outerHeight(true);
1708
- let arrowPos;
1709
- let popoverPosX;
1710
- let popoverPosY;
1732
+ var containerInnerWidth = this.$container.innerWidth();
1733
+ var containerInnerHeight = this.$container.innerHeight();
1734
+ var popoverWidth = this.$popover.outerWidth(true);
1735
+ var popoverHeight = this.$popover.outerHeight(true);
1736
+ var popoverTriggerWidth = this.$el.outerWidth();
1737
+ var popoverTriggerHeight = this.$el.outerHeight();
1738
+ var popoverTriggerPosX = this.$el.position().left;
1739
+ var popoverTriggerPosY = this.$el.position().top;
1740
+ var arrowWidth = this.$arrow.outerWidth(true);
1741
+ var arrowHeight = this.$arrow.outerHeight(true);
1742
+ var arrowPos;
1743
+ var popoverPosX;
1744
+ var popoverPosY;
1711
1745
 
1712
1746
  if (placement === 'top') {
1713
1747
  popoverPosX = Math.round(popoverTriggerPosX - (popoverWidth - popoverTriggerWidth) / 2);
@@ -1747,14 +1781,14 @@ class Popover extends AbstractUIComponent {
1747
1781
  'will-change': 'transform'
1748
1782
  }); // Correct placement if popover goes outside of container
1749
1783
 
1750
- let popoverOverflowCount = 0;
1751
- let popoverPosition = {
1784
+ var popoverOverflowCount = 0;
1785
+ var popoverPosition = {
1752
1786
  left: this.$popover.position().left,
1753
1787
  top: this.$popover.position().top,
1754
1788
  right: containerInnerWidth - (this.$popover.position().left + popoverWidth),
1755
1789
  bottom: containerInnerHeight - (this.$popover.position().top + popoverHeight)
1756
1790
  };
1757
- let popoverOverflow = {
1791
+ var popoverOverflow = {
1758
1792
  left: false,
1759
1793
  top: false,
1760
1794
  right: false,
@@ -1833,8 +1867,8 @@ class Popover extends AbstractUIComponent {
1833
1867
 
1834
1868
  if (popoverOverflow.left) {
1835
1869
  this.log('Popover overflowing from left');
1836
- let overflowAmount = Math.abs(popoverPosition.left);
1837
- let excludePlacements = ['top', 'bottom'];
1870
+ var overflowAmount = Math.abs(popoverPosition.left);
1871
+ var excludePlacements = ['top', 'bottom'];
1838
1872
 
1839
1873
  if (popoverTriggerPosX >= popoverPosX + overflowAmount && excludePlacements.indexOf(placement) < 0) {
1840
1874
  this.log('Popover adjusting width');
@@ -1849,33 +1883,39 @@ class Popover extends AbstractUIComponent {
1849
1883
 
1850
1884
  if (popoverOverflow.top) {
1851
1885
  this.log('Popover overflowing from top');
1852
- let overflowAmount = Math.abs(popoverPosition.top);
1886
+
1887
+ var _overflowAmount = Math.abs(popoverPosition.top);
1888
+
1853
1889
  this.log('Popover adjusting position y');
1854
- popoverPosY += overflowAmount;
1855
- arrowPos -= overflowAmount;
1890
+ popoverPosY += _overflowAmount;
1891
+ arrowPos -= _overflowAmount;
1856
1892
  }
1857
1893
 
1858
1894
  if (popoverOverflow.right) {
1859
1895
  this.log('Popover overflowing from right');
1860
- let overflowAmount = Math.abs(popoverPosition.right);
1861
- let excludePlacements = ['top', 'bottom'];
1862
1896
 
1863
- if (popoverTriggerPosX <= popoverPosX - overflowAmount && excludePlacements.indexOf(placement) < 0) {
1897
+ var _overflowAmount2 = Math.abs(popoverPosition.right);
1898
+
1899
+ var _excludePlacements = ['top', 'bottom'];
1900
+
1901
+ if (popoverTriggerPosX <= popoverPosX - _overflowAmount2 && _excludePlacements.indexOf(placement) < 0) {
1864
1902
  this.log('Popover adjusting width');
1865
- popoverWidth -= overflowAmount;
1903
+ popoverWidth -= _overflowAmount2;
1866
1904
  } else {
1867
1905
  this.log('Popover adjusting position x');
1868
- popoverPosX -= overflowAmount;
1869
- arrowPos += overflowAmount;
1906
+ popoverPosX -= _overflowAmount2;
1907
+ arrowPos += _overflowAmount2;
1870
1908
  }
1871
1909
  }
1872
1910
 
1873
1911
  if (popoverOverflow.bottom) {
1874
1912
  this.log('Popover overflowing from bottom');
1875
- let overflowAmount = Math.abs(popoverPosition.bottom);
1913
+
1914
+ var _overflowAmount3 = Math.abs(popoverPosition.bottom);
1915
+
1876
1916
  this.log('Popover adjusting position y');
1877
- popoverPosY -= overflowAmount;
1878
- arrowPos += overflowAmount;
1917
+ popoverPosY -= _overflowAmount3;
1918
+ arrowPos += _overflowAmount3;
1879
1919
  }
1880
1920
 
1881
1921
  if (placement === 'top') {
@@ -1935,9 +1975,9 @@ class Popover extends AbstractUIComponent {
1935
1975
  this.log('Popover position bottom: ' + popoverPosition.bottom + 'px');
1936
1976
  }
1937
1977
  } // Show
1978
+ ;
1938
1979
 
1939
-
1940
- show() {
1980
+ _proto.show = function show() {
1941
1981
  if (this.$popover) {
1942
1982
  return;
1943
1983
  }
@@ -1959,20 +1999,25 @@ class Popover extends AbstractUIComponent {
1959
1999
 
1960
2000
  this.onShow();
1961
2001
  } // Close
2002
+ ;
1962
2003
 
2004
+ _proto.close = function close() {
2005
+ var _this3 = this;
1963
2006
 
1964
- close() {
1965
2007
  if (!this.$popover) {
1966
2008
  return;
1967
2009
  }
1968
2010
 
1969
2011
  if (this.animation && !this.$popover.hasClass('animated')) {
1970
- this.$popover.animateCss(this.animationOut, () => {
1971
- this.$popover.remove();
1972
- this.$el.removeAttr('data-popover');
1973
- this.$popover = null;
1974
- this.placementChanged = false;
1975
- this.onClose();
2012
+ this.$popover.animateCss(this.animationOut, function () {
2013
+ _this3.$popover.remove();
2014
+
2015
+ _this3.$el.removeAttr('data-popover');
2016
+
2017
+ _this3.$popover = null;
2018
+ _this3.placementChanged = false;
2019
+
2020
+ _this3.onClose();
1976
2021
  });
1977
2022
  } else {
1978
2023
  this.$popover.remove();
@@ -1981,13 +2026,13 @@ class Popover extends AbstractUIComponent {
1981
2026
  this.placementChanged = false;
1982
2027
  this.onClose();
1983
2028
  }
1984
- }
2029
+ };
1985
2030
 
1986
- static _jQueryInterface(config) {
2031
+ Popover._jQueryInterface = function _jQueryInterface(config) {
1987
2032
  return this.each(function () {
1988
- let data = $(this).data(DATA_KEY);
2033
+ var data = $(this).data(DATA_KEY);
1989
2034
 
1990
- const _config = typeof config === 'object' && config;
2035
+ var _config = typeof config === 'object' && config;
1991
2036
 
1992
2037
  if (!data) {
1993
2038
  data = new Popover(this, _config);
@@ -2002,17 +2047,18 @@ class Popover extends AbstractUIComponent {
2002
2047
  data[config]();
2003
2048
  }
2004
2049
  });
2005
- }
2050
+ };
2006
2051
 
2007
- }
2052
+ return Popover;
2053
+ }(AbstractUIComponent);
2008
2054
 
2009
2055
  if (typeof $ !== 'undefined') {
2010
2056
  // jQuery
2011
- const JQUERY_NO_CONFLICT = $.fn[NAME];
2057
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
2012
2058
  $.fn[NAME] = Popover._jQueryInterface;
2013
2059
  $.fn[NAME].Constructor = Popover;
2014
2060
 
2015
- $.fn[NAME].noConflict = () => {
2061
+ $.fn[NAME].noConflict = function () {
2016
2062
  $.fn[NAME] = JQUERY_NO_CONFLICT;
2017
2063
  return Popover._jQueryInterface;
2018
2064
  };
@@ -2036,55 +2082,71 @@ if (typeof $ !== 'undefined') {
2036
2082
  };
2037
2083
  }
2038
2084
 
2039
- const NAME$1 = 'coolSelect';
2040
- const DATA_KEY$1 = 'plugin_coolSelect';
2085
+ var NAME$1 = 'coolSelect';
2086
+ var DATA_KEY$1 = 'plugin_coolSelect';
2087
+
2088
+ var Select =
2089
+ /*#__PURE__*/
2090
+ function (_AbstractUIComponent) {
2091
+ _inheritsLoose(Select, _AbstractUIComponent);
2092
+
2093
+ function Select(el, opts) {
2094
+ var _this;
2041
2095
 
2042
- class Select extends AbstractUIComponent {
2043
- constructor(el, opts) {
2044
- super();
2045
- this.opts = {};
2096
+ _this = _AbstractUIComponent.call(this) || this;
2097
+ _this.opts = {};
2046
2098
 
2047
2099
  if (window.Cool.settings.select) {
2048
- $.extend(true, this.opts, $.fn[NAME$1].defaults, window.Cool.settings.select, opts);
2100
+ $.extend(true, _this.opts, $.fn[NAME$1].defaults, window.Cool.settings.select, opts);
2049
2101
  } else {
2050
- $.extend(true, this.opts, $.fn[NAME$1].defaults, opts);
2102
+ $.extend(true, _this.opts, $.fn[NAME$1].defaults, opts);
2051
2103
  }
2052
2104
 
2053
- this.el = el;
2054
- this.debug = this.opts.debug;
2055
- this.init();
2105
+ _this.el = el;
2106
+ _this.debug = _this.opts.debug;
2107
+
2108
+ _this.init();
2109
+
2110
+ return _this;
2056
2111
  } // Init plugin
2057
2112
 
2058
2113
 
2059
- init() {
2060
- $.when(this.buildCache()).then(() => {
2061
- this.buildScroll();
2062
- this.bindEvents();
2114
+ var _proto = Select.prototype;
2115
+
2116
+ _proto.init = function init() {
2117
+ var _this2 = this;
2118
+
2119
+ $.when(this.buildCache()).then(function () {
2120
+ _this2.buildScroll();
2063
2121
 
2064
- if (this.data[this.name].length > 0) {
2065
- this.setData();
2122
+ _this2.bindEvents();
2123
+
2124
+ if (_this2.data[_this2.name].length > 0) {
2125
+ _this2.setData();
2066
2126
  }
2067
2127
 
2068
- this.onInit();
2128
+ _this2.onInit();
2069
2129
  });
2070
2130
  } // Remove plugin instance completely
2131
+ ;
2071
2132
 
2072
-
2073
- destroy() {
2133
+ _proto.destroy = function destroy() {
2074
2134
  this.unbindEvents();
2075
2135
  this.$el.removeData(DATA_KEY$1);
2076
2136
  this.onDestroy();
2077
2137
  } // Update plugin data
2138
+ ;
2078
2139
 
2079
-
2080
- update() {
2140
+ _proto.update = function update() {
2081
2141
  this.buildCache();
2082
2142
  this.bindEvents();
2083
2143
  this.onUpdate();
2084
2144
  } // Cache DOM nodes for performance
2145
+ ;
2085
2146
 
2147
+ _proto.buildCache = function buildCache() {
2148
+ var _this3 = this;
2086
2149
 
2087
- buildCache() {
2088
2150
  this.$el = $(this.el);
2089
2151
  this.$selectHeader = this.$el.find('.select-header');
2090
2152
  this.$selectIconContainer = this.$selectHeader.find('.select-icon');
@@ -2115,7 +2177,7 @@ class Select extends AbstractUIComponent {
2115
2177
  }
2116
2178
 
2117
2179
  if (this.items.length) {
2118
- let items = this._renderItemList(this.items);
2180
+ var items = this._renderItemList(this.items);
2119
2181
 
2120
2182
  this.$select = $("\n <div class=\"select-content\">\n\n " + this._renderSearch() + "\n\n <div class=\"select-scrollable-content\">" + items + "</div>\n\n " + this._renderFooter() + "\n\n </div>\n ");
2121
2183
  this.$el.append(this.$select);
@@ -2168,8 +2230,8 @@ class Select extends AbstractUIComponent {
2168
2230
  this.$closeButton = this.$select.find('[data-select-close]');
2169
2231
  }
2170
2232
 
2171
- $.each(this.$selectLabels, (i, el) => {
2172
- this.searchData.push({
2233
+ $.each(this.$selectLabels, function (i, el) {
2234
+ _this3.searchData.push({
2173
2235
  id: i,
2174
2236
  val: $(el).text().trim()
2175
2237
  });
@@ -2186,11 +2248,11 @@ class Select extends AbstractUIComponent {
2186
2248
  return true;
2187
2249
  }
2188
2250
  } // Build scroll
2251
+ ;
2189
2252
 
2190
-
2191
- buildScroll() {
2253
+ _proto.buildScroll = function buildScroll() {
2192
2254
  if (this.$scrollableContent.length > 0) {
2193
- let scrollContentHeight = this.scrollContentHeight;
2255
+ var scrollContentHeight = this.scrollContentHeight;
2194
2256
 
2195
2257
  if (this.showSearch) {
2196
2258
  scrollContentHeight = scrollContentHeight - (this.$searchContainer.outerHeight(true) || 0);
@@ -2226,30 +2288,34 @@ class Select extends AbstractUIComponent {
2226
2288
  }
2227
2289
  }
2228
2290
  } // Bind events that trigger methods
2291
+ ;
2229
2292
 
2293
+ _proto.bindEvents = function bindEvents() {
2294
+ var _this4 = this;
2230
2295
 
2231
- bindEvents() {
2232
- let self = this;
2233
- this.$selectHeader.on('click' + '.' + NAME$1, () => {
2234
- if (this.contentOpen) {
2235
- this.close();
2296
+ var self = this;
2297
+ this.$selectHeader.on('click' + '.' + NAME$1, function () {
2298
+ if (_this4.contentOpen) {
2299
+ _this4.close();
2236
2300
  } else {
2237
- this.show();
2301
+ _this4.show();
2238
2302
  }
2239
2303
  });
2240
2304
  this.$el.on('change' + '.' + NAME$1, 'input[type="checkbox"]', function () {
2241
- let val = $(this).val();
2305
+ var val = $(this).val();
2242
2306
 
2243
2307
  if (this.checked) {
2244
2308
  self.data[self.name].indexOf(val) === -1 ? self.data[self.name].push(val) : false;
2245
2309
  } else {
2246
- self.data[self.name] = self.data[self.name].filter(n => n != val);
2310
+ self.data[self.name] = self.data[self.name].filter(function (n) {
2311
+ return n != val;
2312
+ });
2247
2313
  }
2248
2314
 
2249
2315
  self.onSelect(this);
2250
2316
  });
2251
2317
  this.$el.on('change' + '.' + NAME$1, 'input[type="radio"]', function () {
2252
- let val = $(this).val();
2318
+ var val = $(this).val();
2253
2319
 
2254
2320
  if (this.checked) {
2255
2321
  self.data[self.name] = val;
@@ -2305,8 +2371,8 @@ class Select extends AbstractUIComponent {
2305
2371
  }
2306
2372
 
2307
2373
  if (this.showFooter) {
2308
- this.$closeButton.on('click' + '.' + NAME$1, () => {
2309
- this.close();
2374
+ this.$closeButton.on('click' + '.' + NAME$1, function () {
2375
+ _this4.close();
2310
2376
  });
2311
2377
  }
2312
2378
 
@@ -2316,32 +2382,32 @@ class Select extends AbstractUIComponent {
2316
2382
  }
2317
2383
  });
2318
2384
  } // Unbind events that trigger methods
2385
+ ;
2319
2386
 
2320
-
2321
- unbindEvents() {
2387
+ _proto.unbindEvents = function unbindEvents() {
2322
2388
  this.$el.off('.' + NAME$1);
2323
2389
  } // Get data
2390
+ ;
2324
2391
 
2325
-
2326
- getData(data) {
2392
+ _proto.getData = function getData(data) {
2327
2393
  if (data) {
2328
2394
  return this.data[data];
2329
2395
  } else {
2330
2396
  return this.data;
2331
2397
  }
2332
2398
  } // Set data
2399
+ ;
2333
2400
 
2334
-
2335
- setData() {
2336
- let self = this;
2337
- let type = null;
2338
- let faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2401
+ _proto.setData = function setData() {
2402
+ var self = this;
2403
+ var type = null;
2404
+ var faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2339
2405
  this.$selectIconContainer.html("<i class=\"" + faNameSpace + " fa-check text-green icon\"></i>");
2340
2406
 
2341
2407
  if (this.searchApi.length) {
2342
- let searchUrl = this.searchApi;
2343
- let itemCount = this.data[this.name].length;
2344
- let currentCount = 0;
2408
+ var searchUrl = this.searchApi;
2409
+ var itemCount = this.data[this.name].length;
2410
+ var currentCount = 0;
2345
2411
  this.data[this.name].forEach(function (value) {
2346
2412
  searchUrl += encodeURIComponent('#' + value);
2347
2413
  currentCount++;
@@ -2354,13 +2420,15 @@ class Select extends AbstractUIComponent {
2354
2420
  method: 'GET',
2355
2421
  url: searchUrl
2356
2422
  }).done(function (data) {
2357
- let items = data.map(function (item) {
2423
+ var items = data.map(function (item) {
2424
+ var label = '';
2425
+
2358
2426
  if (item.name) {
2359
- let label = item.name;
2427
+ label = item.name;
2360
2428
  } else if (item.label) {
2361
- let label = item.label;
2429
+ label = item.label;
2362
2430
  } else if (item.value) {
2363
- let label = item.value;
2431
+ label = item.value;
2364
2432
  }
2365
2433
 
2366
2434
  return {
@@ -2371,7 +2439,7 @@ class Select extends AbstractUIComponent {
2371
2439
  items = items.filter(function (item) {
2372
2440
  return self.data[self.name].indexOf(item.id) > -1;
2373
2441
  });
2374
- let result = $(self._renderItemList(items));
2442
+ var result = $(self._renderItemList(items));
2375
2443
  $.when(self.$scrollableContent.append(result)).then(function () {
2376
2444
  if (self.$scrollableContent[0].offsetHeight < self.$scrollableContent[0].scrollHeight) {
2377
2445
  self.scroll.update();
@@ -2391,14 +2459,14 @@ class Select extends AbstractUIComponent {
2391
2459
 
2392
2460
  if (type == 'checkbox') {
2393
2461
  self.data[self.name].forEach(function (value) {
2394
- let $input = self.$select.find(':input').filter(function () {
2462
+ var $input = self.$select.find(':input').filter(function () {
2395
2463
  return this.value == value;
2396
2464
  });
2397
2465
  $input.prop('checked', true);
2398
2466
  self.onSelect($input[0]);
2399
2467
  });
2400
2468
  } else if (type == 'radio') {
2401
- let $input = self.$select.find(':input').filter(function () {
2469
+ var $input = self.$select.find(':input').filter(function () {
2402
2470
  return this.value == self.data[self.name];
2403
2471
  });
2404
2472
  $input.prop('checked', true);
@@ -2416,14 +2484,14 @@ class Select extends AbstractUIComponent {
2416
2484
 
2417
2485
  if (type == 'checkbox') {
2418
2486
  this.data[this.name].forEach(function (value) {
2419
- let $input = self.$select.find(':input').filter(function () {
2487
+ var $input = self.$select.find(':input').filter(function () {
2420
2488
  return this.value == value;
2421
2489
  });
2422
2490
  $input.prop('checked', true);
2423
2491
  self.onSelect($input[0]);
2424
2492
  });
2425
2493
  } else if (type == 'radio') {
2426
- let $input = this.$select.find(':input').filter(function () {
2494
+ var $input = this.$select.find(':input').filter(function () {
2427
2495
  return this.value == self.data[self.name];
2428
2496
  });
2429
2497
  $input.prop('checked', true);
@@ -2432,11 +2500,11 @@ class Select extends AbstractUIComponent {
2432
2500
  }
2433
2501
  }
2434
2502
  } // Search
2503
+ ;
2435
2504
 
2436
-
2437
- search() {
2438
- let self = this;
2439
- let faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2505
+ _proto.search = function search() {
2506
+ var self = this;
2507
+ var faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2440
2508
 
2441
2509
  if (this.searchString.length) {
2442
2510
  if (this.searchApi.length) {
@@ -2445,7 +2513,7 @@ class Select extends AbstractUIComponent {
2445
2513
  method: 'GET',
2446
2514
  url: this.searchApi + this.searchString
2447
2515
  }).done(function (data) {
2448
- let items = data.map(function (item) {
2516
+ var items = data.map(function (item) {
2449
2517
  return {
2450
2518
  id: item.id.toString(),
2451
2519
  label: item.name || item.label || item.value || null
@@ -2453,14 +2521,14 @@ class Select extends AbstractUIComponent {
2453
2521
  });
2454
2522
  items = items.filter(function (item) {
2455
2523
  return !(self.data[self.name].indexOf(item.id) > -1);
2456
- }); // Remove 0 id from results
2524
+ }); // Remove id with value 0 from results
2457
2525
 
2458
2526
  items = items.filter(function (item) {
2459
- return [0].indexOf(item.id) > -1;
2527
+ return item.id > 0;
2460
2528
  });
2461
- let result = $(self._renderItemList(items));
2529
+ var result = $(self._renderItemList(items));
2462
2530
  $.when(self.$scrollableContent.append(result)).then(function () {
2463
- let faNameSpace = self.opts.faPro ? 'fal' : 'fas';
2531
+ var faNameSpace = self.opts.faPro ? 'fal' : 'fas';
2464
2532
  self.$searchIconContainer.html("<i class=\"" + faNameSpace + " fa-times icon\"></i>");
2465
2533
  self.$searchIconContainer.attr('data-clear-search', 'true');
2466
2534
 
@@ -2476,7 +2544,7 @@ class Select extends AbstractUIComponent {
2476
2544
  });
2477
2545
  });
2478
2546
  } else {
2479
- let results = this.searchData.filter(function (item) {
2547
+ var results = this.searchData.filter(function (item) {
2480
2548
  return item.val.toLocaleLowerCase().indexOf(self.searchString.toLocaleLowerCase()) > -1;
2481
2549
  });
2482
2550
  this.$selectItems.removeClass('d-none');
@@ -2507,16 +2575,16 @@ class Select extends AbstractUIComponent {
2507
2575
 
2508
2576
  this.onUpdate();
2509
2577
  } // Show
2578
+ ;
2510
2579
 
2511
-
2512
- show() {
2580
+ _proto.show = function show() {
2513
2581
  if (this.$el.hasClass('show')) {
2514
2582
  return;
2515
2583
  }
2516
2584
 
2517
- let $otherSelects = $('.select.show');
2518
- let zindex = 1;
2519
- let faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2585
+ var $otherSelects = $('.select.show');
2586
+ var zindex = 1;
2587
+ var faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2520
2588
 
2521
2589
  if ($otherSelects.length) {
2522
2590
  zindex = parseInt($otherSelects.first().css('z-index'), 10) + 2;
@@ -2546,14 +2614,14 @@ class Select extends AbstractUIComponent {
2546
2614
  this.contentOpen = true;
2547
2615
  this.onShow();
2548
2616
  } // Close
2617
+ ;
2549
2618
 
2550
-
2551
- close() {
2552
- let self = this;
2553
- let faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2619
+ _proto.close = function close() {
2620
+ var self = this;
2621
+ var faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2554
2622
  this.$el.css('max-height', '');
2555
2623
  this.$el.removeClass('show');
2556
- setTimeout(() => {
2624
+ setTimeout(function () {
2557
2625
  self.$el.removeAttr('style');
2558
2626
  }, 300);
2559
2627
 
@@ -2565,46 +2633,48 @@ class Select extends AbstractUIComponent {
2565
2633
 
2566
2634
  this.contentOpen = false;
2567
2635
  this.onClose();
2568
- }
2636
+ };
2569
2637
 
2570
- onSelect(el) {
2571
- let onSelect = this.opts.onSelect;
2638
+ _proto.onSelect = function onSelect(el) {
2639
+ var onSelect = this.opts.onSelect;
2572
2640
 
2573
2641
  if (typeof onSelect === 'function') {
2574
2642
  onSelect.call(el);
2575
2643
  }
2576
- }
2644
+ };
2577
2645
 
2578
- _renderItemList(items) {
2579
- let html = '';
2646
+ _proto._renderItemList = function _renderItemList(items) {
2647
+ var result = '';
2580
2648
 
2581
- for (let i = 0; i < items.length; ++i) {
2582
- html += "\n\n <div class=\"select-item\">\n\n <div class=\"select-item-" + this.type + "\">\n\n <div class=\"styled-" + this.type + "\">\">\n\n <input type=\"" + this.type + "\">\" id=\"select-" + this.name + "-" + items[i].id + "\" value=\"" + items[i].id + "\">\n\n <label for=\"select-" + this.name + "-" + items[i].id + "\">\n\n <span class=\"radio-inner\">\n <svg viewBox=\"0 0 18 18\">\n <polyline points=\"1.5 6 4.5 9 10.5 1\"></polyline>\n </svg>\n </span>\n\n <span class=\"" + this.type + "\">-label\" data-label>\n " + items[i].label + "\n </span>\n\n </label>\n\n </div>\n\n </div>\n\n </div>\n\n ";
2649
+ for (var i = 0; i < items.length; ++i) {
2650
+ result += "\n\n <div class=\"select-item\">\n\n <div class=\"select-item-" + this.type + "\">\n\n <div class=\"styled-" + this.type + "\">\n\n <input type=\"" + this.type + "\" id=\"select-" + this.name + "-" + items[i].id + "\" value=\"" + items[i].id + "\">\n\n <label for=\"select-" + this.name + "-" + items[i].id + "\">\n\n <span class=\"radio-inner\">\n <svg viewBox=\"0 0 18 18\">\n <polyline points=\"1.5 6 4.5 9 10.5 1\"></polyline>\n </svg>\n </span>\n\n <span class=\"" + this.type + "-label\" data-label>\n " + items[i].label + "\n </span>\n\n </label>\n\n </div>\n\n </div>\n\n </div>\n\n ";
2583
2651
  }
2584
- }
2585
2652
 
2586
- _renderSearch() {
2653
+ return result;
2654
+ };
2655
+
2656
+ _proto._renderSearch = function _renderSearch() {
2587
2657
  if (!this.showSearch) {
2588
2658
  return '';
2589
2659
  }
2590
2660
 
2591
- let faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2661
+ var faNameSpace = this.opts.faPro ? 'fal' : 'fas';
2592
2662
  return "\n\n <div class=\"select-search\">\n\n <div class=\"select-search-input\">\n\n <input type=\"text\" name=\"select-search\" value=\"\" placeholder=\"" + this.opts.searchPlaceholder + "\">\n\n </div>\n\n <div class=\"select-search-icon\">\n\n <i class=\"" + faNameSpace + " fa-search icon\"></i>\n\n </div>\n\n </div>\n\n ";
2593
- }
2663
+ };
2594
2664
 
2595
- _renderFooter() {
2665
+ _proto._renderFooter = function _renderFooter() {
2596
2666
  if (!this.showFooter) {
2597
2667
  return '';
2598
2668
  }
2599
2669
 
2600
2670
  return "\n\n <div class=\"select-footer\">\n\n <button class=\"btn btn-primary\" type=\"button\" data-select-close>\n " + this.opts.btnCloseText + "\n </button>\n\n </div>\n\n ";
2601
- }
2671
+ };
2602
2672
 
2603
- static _jQueryInterface(config) {
2673
+ Select._jQueryInterface = function _jQueryInterface(config) {
2604
2674
  return this.each(function () {
2605
- let data = $(this).data(DATA_KEY$1);
2675
+ var data = $(this).data(DATA_KEY$1);
2606
2676
 
2607
- const _config = typeof config === 'object' && config;
2677
+ var _config = typeof config === 'object' && config;
2608
2678
 
2609
2679
  if (!data) {
2610
2680
  data = new Select(this, _config);
@@ -2619,18 +2689,19 @@ class Select extends AbstractUIComponent {
2619
2689
  data[config]();
2620
2690
  }
2621
2691
  });
2622
- }
2692
+ };
2623
2693
 
2624
- }
2694
+ return Select;
2695
+ }(AbstractUIComponent);
2625
2696
 
2626
2697
  if (typeof $ !== 'undefined') {
2627
2698
  // jQuery
2628
- const JQUERY_NO_CONFLICT = $.fn[NAME$1];
2699
+ var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
2629
2700
  $.fn[NAME$1] = Select._jQueryInterface;
2630
2701
  $.fn[NAME$1].Constructor = Select;
2631
2702
 
2632
- $.fn[NAME$1].noConflict = () => {
2633
- $.fn[NAME$1] = JQUERY_NO_CONFLICT;
2703
+ $.fn[NAME$1].noConflict = function () {
2704
+ $.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
2634
2705
  return Select._jQueryInterface;
2635
2706
  };
2636
2707
 
@@ -2657,49 +2728,66 @@ if (typeof $ !== 'undefined') {
2657
2728
  };
2658
2729
  }
2659
2730
 
2660
- const NAME$2 = 'coolDropdown';
2661
- const DATA_KEY$2 = 'plugin_coolDropdown';
2731
+ var NAME$2 = 'coolDropdown';
2732
+ var DATA_KEY$2 = 'plugin_coolDropdown';
2733
+
2734
+ var Dropdown =
2735
+ /*#__PURE__*/
2736
+ function (_AbstractUIComponent) {
2737
+ _inheritsLoose(Dropdown, _AbstractUIComponent);
2738
+
2739
+ function Dropdown(el, opts) {
2740
+ var _this;
2662
2741
 
2663
- class Dropdown extends AbstractUIComponent {
2664
- constructor(el, opts) {
2665
- super();
2666
- this.opts = {};
2742
+ _this = _AbstractUIComponent.call(this) || this;
2743
+ _this.opts = {};
2667
2744
 
2668
2745
  if (window.Cool.settings.dropdown) {
2669
- $.extend(true, this.opts, $.fn[NAME$2].defaults, window.Cool.settings.dropdown, opts);
2746
+ $.extend(true, _this.opts, $.fn[NAME$2].defaults, window.Cool.settings.dropdown, opts);
2670
2747
  } else {
2671
- $.extend(true, this.opts, $.fn[NAME$2].defaults, opts);
2748
+ $.extend(true, _this.opts, $.fn[NAME$2].defaults, opts);
2672
2749
  }
2673
2750
 
2674
- this.el = el;
2675
- this.debug = this.opts.debug;
2676
- this.init();
2751
+ _this.el = el;
2752
+ _this.debug = _this.opts.debug;
2753
+
2754
+ _this.init();
2755
+
2756
+ return _this;
2677
2757
  } // Init plugin
2678
2758
 
2679
2759
 
2680
- init() {
2681
- $.when(this.buildCache()).then(() => {
2682
- this.buildScroll();
2683
- this.bindEvents();
2684
- this.onInit();
2760
+ var _proto = Dropdown.prototype;
2761
+
2762
+ _proto.init = function init() {
2763
+ var _this2 = this;
2764
+
2765
+ $.when(this.buildCache()).then(function () {
2766
+ _this2.buildScroll();
2767
+
2768
+ _this2.bindEvents();
2769
+
2770
+ _this2.onInit();
2685
2771
  });
2686
2772
  } // Remove plugin instance completely
2773
+ ;
2687
2774
 
2688
-
2689
- destroy() {
2775
+ _proto.destroy = function destroy() {
2690
2776
  this.unbindEvents();
2691
2777
  this.$el.removeData(DATA_KEY$2);
2692
2778
  this.onDestroy();
2693
2779
  } // Update plugin data
2780
+ ;
2694
2781
 
2695
-
2696
- update() {
2782
+ _proto.update = function update() {
2697
2783
  this.buildCache();
2698
2784
  this.onUpdate();
2699
2785
  } // Cache DOM nodes for performance
2786
+ ;
2700
2787
 
2788
+ _proto.buildCache = function buildCache() {
2789
+ var _this3 = this;
2701
2790
 
2702
- buildCache() {
2703
2791
  this.$el = $(this.el);
2704
2792
  this.$el.addClass('dropdown-trigger');
2705
2793
  this.$container = this.$el.parent('.dropdown');
@@ -2727,31 +2815,45 @@ class Dropdown extends AbstractUIComponent {
2727
2815
  }
2728
2816
 
2729
2817
  if (typeof this.content === 'function') {
2730
- let menuRight = this.opts.align === 'end' ? ' dropdown-menu-right' : '';
2818
+ var menuRight = this.opts.align === 'end' ? ' dropdown-menu-right' : '';
2731
2819
  this.$dropdown = $("\n <div class=\"dropdown-menu" + menuRight + "\" id=\"" + this.id + "\">\n " + this.content + "\n </div>\n ");
2732
- $.when(this.$el.after(this.$dropdown)).then(() => {
2733
- this.$scrollableContent = this.$dropdown.find('.dropdown-scrollable-content') ? this.$dropdown.find('.dropdown-scrollable-content') : false;
2734
- this.$dropdown.hasClass('dropdown-menu-right') ? this.align = 'end' : this.align = 'start';
2735
- this.$dropdownItem = this.$dropdown.find('.dropdown-item');
2820
+ $.when(this.$el.after(this.$dropdown)).then(function () {
2821
+ _this3.$scrollableContent = _this3.$dropdown.find('.dropdown-scrollable-content') ? _this3.$dropdown.find('.dropdown-scrollable-content') : false;
2822
+ _this3.$dropdown.hasClass('dropdown-menu-right') ? _this3.align = 'end' : _this3.align = 'start';
2823
+ _this3.$dropdownItem = _this3.$dropdown.find('.dropdown-item');
2736
2824
 
2737
- if (this.minWidth) {
2738
- this.$dropdown.css('min-width', this.minWidth + 'px');
2825
+ if (_this3.minWidth) {
2826
+ _this3.$dropdown.css('min-width', _this3.minWidth + 'px');
2739
2827
  }
2740
2828
 
2741
- this.log(this.$el);
2742
- this.log(this.$container);
2743
- this.log(this.$dropdown);
2744
- this.log(this.$scrollableContent);
2745
- this.log('Id: ' + this.id);
2746
- this.log('Animation: ' + this.animation);
2747
- this.log('Animation in: ' + this.animationIn);
2748
- this.log('Animation out: ' + this.animationOut);
2749
- this.log('Animation speed: ' + this.animationSpeed);
2750
- this.log('Offset: ' + this.offset);
2751
- this.log('Min width: ' + this.minWidth);
2752
- this.log('Content: ' + this.content);
2753
- this.log('Scroll: ' + this.scroll);
2754
- this.log('Scroll content height: ' + this.scrollContentHeight + 'px');
2829
+ _this3.log(_this3.$el);
2830
+
2831
+ _this3.log(_this3.$container);
2832
+
2833
+ _this3.log(_this3.$dropdown);
2834
+
2835
+ _this3.log(_this3.$scrollableContent);
2836
+
2837
+ _this3.log('Id: ' + _this3.id);
2838
+
2839
+ _this3.log('Animation: ' + _this3.animation);
2840
+
2841
+ _this3.log('Animation in: ' + _this3.animationIn);
2842
+
2843
+ _this3.log('Animation out: ' + _this3.animationOut);
2844
+
2845
+ _this3.log('Animation speed: ' + _this3.animationSpeed);
2846
+
2847
+ _this3.log('Offset: ' + _this3.offset);
2848
+
2849
+ _this3.log('Min width: ' + _this3.minWidth);
2850
+
2851
+ _this3.log('Content: ' + _this3.content);
2852
+
2853
+ _this3.log('Scroll: ' + _this3.scroll);
2854
+
2855
+ _this3.log('Scroll content height: ' + _this3.scrollContentHeight + 'px');
2856
+
2755
2857
  return true;
2756
2858
  });
2757
2859
  } else {
@@ -2781,9 +2883,9 @@ class Dropdown extends AbstractUIComponent {
2781
2883
  return true;
2782
2884
  }
2783
2885
  } // Build scroll
2886
+ ;
2784
2887
 
2785
-
2786
- buildScroll() {
2888
+ _proto.buildScroll = function buildScroll() {
2787
2889
  if (this.opts.scroll && this.$scrollableContent.length) {
2788
2890
  this.$scrollableContent.css({
2789
2891
  'max-height': this.scrollContentHeight + 'px'
@@ -2806,15 +2908,17 @@ class Dropdown extends AbstractUIComponent {
2806
2908
  }
2807
2909
  }
2808
2910
  } // Bind events that trigger methods
2911
+ ;
2809
2912
 
2913
+ _proto.bindEvents = function bindEvents() {
2914
+ var _this4 = this;
2810
2915
 
2811
- bindEvents() {
2812
- let self = this;
2813
- this.$el.on('click' + '.' + NAME$2, () => {
2814
- if (this.contentOpen) {
2815
- this.close();
2916
+ var self = this;
2917
+ this.$el.on('click' + '.' + NAME$2, function () {
2918
+ if (_this4.contentOpen) {
2919
+ _this4.close();
2816
2920
  } else {
2817
- this.show();
2921
+ _this4.show();
2818
2922
  }
2819
2923
  });
2820
2924
  this.$dropdownItem.on('click' + '.' + NAME$2, function () {
@@ -2824,45 +2928,46 @@ class Dropdown extends AbstractUIComponent {
2824
2928
 
2825
2929
  self.onItemClick(this);
2826
2930
  });
2827
- $(document).on('touchstart click', e => {
2828
- if (!this.$el.is(e.target) && !this.$dropdown.is(e.target) && this.$dropdown.has(e.target).length === 0 && this.contentOpen) {
2829
- this.close();
2931
+ $(document).on('touchstart click', function (e) {
2932
+ if (!_this4.$el.is(e.target) && !_this4.$dropdown.is(e.target) && _this4.$dropdown.has(e.target).length === 0 && _this4.contentOpen) {
2933
+ _this4.close();
2830
2934
  }
2831
2935
  });
2832
- $(window).on('resize', debounce(() => {
2833
- this.setPosition();
2834
- this.onUpdate();
2936
+ $(window).on('resize', debounce(function () {
2937
+ _this4.setPosition();
2938
+
2939
+ _this4.onUpdate();
2835
2940
  }, 250));
2836
2941
  } // Unbind events that trigger methods
2942
+ ;
2837
2943
 
2838
-
2839
- unbindEvents() {
2944
+ _proto.unbindEvents = function unbindEvents() {
2840
2945
  this.$el.off('.' + NAME$2);
2841
2946
  } // Generate UUID
2947
+ ;
2842
2948
 
2843
-
2844
- generateUUID() {
2949
+ _proto.generateUUID = function generateUUID() {
2845
2950
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
2846
- let r = Math.random() * 16 | 0,
2951
+ var r = Math.random() * 16 | 0,
2847
2952
  v = c == 'x' ? r : r & 0x3 | 0x8;
2848
2953
  return v.toString(16);
2849
2954
  });
2850
2955
  } // Set positions
2956
+ ;
2851
2957
 
2852
-
2853
- setPosition(placement) {
2958
+ _proto.setPosition = function setPosition(placement) {
2854
2959
  if (typeof str === 'undefined' || str === null) {
2855
2960
  placement = this.placement;
2856
2961
  }
2857
2962
 
2858
- let dropdownWidth = this.$dropdown.outerWidth(true);
2859
- let dropdownHeight = this.$dropdown.outerHeight(true);
2860
- let dropdownTriggerWidth = this.$el.outerWidth(true);
2861
- let dropdownTriggerHeight = this.$el.outerHeight(true);
2862
- let dropdownTriggerPosX = this.$el.position().left;
2863
- let dropdownTriggerPosY = this.$el.position().top;
2864
- let dropdownPosX;
2865
- let dropdownPosY;
2963
+ var dropdownWidth = this.$dropdown.outerWidth(true);
2964
+ var dropdownHeight = this.$dropdown.outerHeight(true);
2965
+ var dropdownTriggerWidth = this.$el.outerWidth(true);
2966
+ var dropdownTriggerHeight = this.$el.outerHeight(true);
2967
+ var dropdownTriggerPosX = this.$el.position().left;
2968
+ var dropdownTriggerPosY = this.$el.position().top;
2969
+ var dropdownPosX;
2970
+ var dropdownPosY;
2866
2971
 
2867
2972
  if (placement === 'top') {
2868
2973
  if (this.align === 'end') {
@@ -2889,9 +2994,9 @@ class Dropdown extends AbstractUIComponent {
2889
2994
  }
2890
2995
 
2891
2996
  if (this.offset) {
2892
- let offsets = this.offset.split(',');
2893
- let offsetX = offsets[0];
2894
- let offsetY = offsets[1];
2997
+ var offsets = this.offset.split(',');
2998
+ var offsetX = offsets[0];
2999
+ var offsetY = offsets[1];
2895
3000
  dropdownPosX += parseInt(offsetX, 10);
2896
3001
  dropdownPosY += parseInt(offsetY, 10);
2897
3002
  }
@@ -2912,9 +3017,9 @@ class Dropdown extends AbstractUIComponent {
2912
3017
  this.log('Dropdown position x: ' + dropdownPosX + 'px');
2913
3018
  this.log('Dropdown position y: ' + dropdownPosY + 'px');
2914
3019
  } // Show
3020
+ ;
2915
3021
 
2916
-
2917
- show() {
3022
+ _proto.show = function show() {
2918
3023
  if (!this.$dropdown || this.$dropdown.hasClass('show')) {
2919
3024
  return;
2920
3025
  }
@@ -2943,17 +3048,20 @@ class Dropdown extends AbstractUIComponent {
2943
3048
  this.contentOpen = true;
2944
3049
  this.onShow();
2945
3050
  } // Close
3051
+ ;
2946
3052
 
3053
+ _proto.close = function close() {
3054
+ var _this5 = this;
2947
3055
 
2948
- close() {
2949
3056
  if (!this.$dropdown) {
2950
3057
  return;
2951
3058
  }
2952
3059
 
2953
3060
  if (this.animation && !this.$dropdown.hasClass('animated')) {
2954
- this.$dropdown.animateCss(this.animationOut, () => {
2955
- this.$dropdown.removeClass('show');
2956
- this.$el.removeAttr('data-dropdown');
3061
+ this.$dropdown.animateCss(this.animationOut, function () {
3062
+ _this5.$dropdown.removeClass('show');
3063
+
3064
+ _this5.$el.removeAttr('data-dropdown');
2957
3065
  });
2958
3066
  } else {
2959
3067
  this.$dropdown.removeClass('show');
@@ -2963,21 +3071,21 @@ class Dropdown extends AbstractUIComponent {
2963
3071
  this.contentOpen = false;
2964
3072
  this.onClose();
2965
3073
  } // Item callback
3074
+ ;
2966
3075
 
2967
-
2968
- onItemClick(el) {
2969
- let onItemClick = this.opts.onItemClick;
3076
+ _proto.onItemClick = function onItemClick(el) {
3077
+ var onItemClick = this.opts.onItemClick;
2970
3078
 
2971
3079
  if (typeof onItemClick === 'function') {
2972
3080
  onItemClick.call(el);
2973
3081
  }
2974
- }
3082
+ };
2975
3083
 
2976
- static _jQueryInterface(config) {
3084
+ Dropdown._jQueryInterface = function _jQueryInterface(config) {
2977
3085
  return this.each(function () {
2978
- let data = $(this).data(DATA_KEY$2);
3086
+ var data = $(this).data(DATA_KEY$2);
2979
3087
 
2980
- const _config = typeof config === 'object' && config;
3088
+ var _config = typeof config === 'object' && config;
2981
3089
 
2982
3090
  if (!data) {
2983
3091
  data = new Dropdown(this, _config);
@@ -2992,18 +3100,19 @@ class Dropdown extends AbstractUIComponent {
2992
3100
  data[config]();
2993
3101
  }
2994
3102
  });
2995
- }
3103
+ };
2996
3104
 
2997
- }
3105
+ return Dropdown;
3106
+ }(AbstractUIComponent);
2998
3107
 
2999
3108
  if (typeof $ !== 'undefined') {
3000
3109
  // jQuery
3001
- const JQUERY_NO_CONFLICT = $.fn[NAME$2];
3110
+ var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
3002
3111
  $.fn[NAME$2] = Dropdown._jQueryInterface;
3003
3112
  $.fn[NAME$2].Constructor = Dropdown;
3004
3113
 
3005
- $.fn[NAME$2].noConflict = () => {
3006
- $.fn[NAME$2] = JQUERY_NO_CONFLICT;
3114
+ $.fn[NAME$2].noConflict = function () {
3115
+ $.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
3007
3116
  return Dropdown._jQueryInterface;
3008
3117
  };
3009
3118
 
@@ -3029,47 +3138,58 @@ if (typeof $ !== 'undefined') {
3029
3138
  };
3030
3139
  }
3031
3140
 
3032
- const NAME$3 = 'coolTooltip';
3033
- const DATA_KEY$3 = 'plugin_coolTooltip';
3141
+ var NAME$3 = 'coolTooltip';
3142
+ var DATA_KEY$3 = 'plugin_coolTooltip';
3143
+
3144
+ var Tooltip =
3145
+ /*#__PURE__*/
3146
+ function (_AbstractUIComponent) {
3147
+ _inheritsLoose(Tooltip, _AbstractUIComponent);
3034
3148
 
3035
- class Tooltip extends AbstractUIComponent {
3036
- constructor(el, opts) {
3037
- super();
3038
- this.opts = {};
3149
+ function Tooltip(el, opts) {
3150
+ var _this;
3151
+
3152
+ _this = _AbstractUIComponent.call(this) || this;
3153
+ _this.opts = {};
3039
3154
 
3040
3155
  if (window.Cool.settings.tooltip) {
3041
- $.extend(true, this.opts, $.fn[NAME$3].defaults, window.Cool.settings.tooltip, opts);
3156
+ $.extend(true, _this.opts, $.fn[NAME$3].defaults, window.Cool.settings.tooltip, opts);
3042
3157
  } else {
3043
- $.extend(true, this.opts, $.fn[NAME$3].defaults, opts);
3158
+ $.extend(true, _this.opts, $.fn[NAME$3].defaults, opts);
3044
3159
  }
3045
3160
 
3046
- this.el = el;
3047
- this.debug = this.opts.debug;
3048
- this.init();
3161
+ _this.el = el;
3162
+ _this.debug = _this.opts.debug;
3163
+
3164
+ _this.init();
3165
+
3166
+ return _this;
3049
3167
  } // Init plugin
3050
3168
 
3051
3169
 
3052
- init() {
3170
+ var _proto = Tooltip.prototype;
3171
+
3172
+ _proto.init = function init() {
3053
3173
  this.buildCache();
3054
3174
  this.bindEvents();
3055
3175
  this.onInit();
3056
3176
  } // Remove plugin instance completely
3177
+ ;
3057
3178
 
3058
-
3059
- destroy() {
3179
+ _proto.destroy = function destroy() {
3060
3180
  this.unbindEvents();
3061
3181
  this.$el.removeData(DATA_KEY$3);
3062
3182
  this.onDestroy();
3063
3183
  } // Update plugin data
3184
+ ;
3064
3185
 
3065
-
3066
- update() {
3186
+ _proto.update = function update() {
3067
3187
  this.buildCache();
3068
3188
  this.onUpdate();
3069
3189
  } // Cache DOM nodes for performance
3190
+ ;
3070
3191
 
3071
-
3072
- buildCache() {
3192
+ _proto.buildCache = function buildCache() {
3073
3193
  this.$el = $(this.el);
3074
3194
  this.$container = this.$el.data('container') ? $(this.$el.data('container')) : $(this.opts.container);
3075
3195
  this.id = 'tooltip-' + this.generateUUID();
@@ -3081,39 +3201,42 @@ class Tooltip extends AbstractUIComponent {
3081
3201
  this.placementChanged = false;
3082
3202
  this.content = this.$el.data('content') ? this.$el.data('content') : this.opts.content;
3083
3203
  } // Bind events that trigger methods
3204
+ ;
3084
3205
 
3206
+ _proto.bindEvents = function bindEvents() {
3207
+ var _this2 = this;
3085
3208
 
3086
- bindEvents() {
3087
- this.$el.on('mouseenter' + '.' + NAME$3, () => {
3088
- this.show();
3209
+ this.$el.on('mouseenter' + '.' + NAME$3, function () {
3210
+ _this2.show();
3089
3211
  });
3090
- this.$el.on('mouseleave' + '.' + NAME$3, () => {
3091
- this.close();
3212
+ this.$el.on('mouseleave' + '.' + NAME$3, function () {
3213
+ _this2.close();
3092
3214
  });
3093
- $(window).on('resize', debounce(() => {
3094
- if (this.$tooltip) {
3095
- this.setPosition();
3096
- this.onUpdate();
3215
+ $(window).on('resize', debounce(function () {
3216
+ if (_this2.$tooltip) {
3217
+ _this2.setPosition();
3218
+
3219
+ _this2.onUpdate();
3097
3220
  }
3098
3221
  }, 250));
3099
3222
  } // Unbind events that trigger methods
3223
+ ;
3100
3224
 
3101
-
3102
- unbindEvents() {
3225
+ _proto.unbindEvents = function unbindEvents() {
3103
3226
  this.$el.off('.' + NAME$3);
3104
3227
  } // Generate UUID
3228
+ ;
3105
3229
 
3106
-
3107
- generateUUID() {
3230
+ _proto.generateUUID = function generateUUID() {
3108
3231
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
3109
- let r = Math.random() * 16 | 0,
3232
+ var r = Math.random() * 16 | 0,
3110
3233
  v = c == 'x' ? r : r & 0x3 | 0x8;
3111
3234
  return v.toString(16);
3112
3235
  });
3113
3236
  } // Build tooltip
3237
+ ;
3114
3238
 
3115
-
3116
- buildTooltip() {
3239
+ _proto.buildTooltip = function buildTooltip() {
3117
3240
  this.$tooltip = $("\n\n <div class=\"tooltip\" role=\"tooltip\" id=\"" + this.id + "\">\n\n <div class=\"arrow\"></div>\n\n <div class=\"tooltip-inner\">" + this.content + "</div>\n\n </div>\n\n ");
3118
3241
  this.$container.append(this.$tooltip);
3119
3242
  this.$arrow = this.$tooltip.find('.arrow');
@@ -3129,27 +3252,27 @@ class Tooltip extends AbstractUIComponent {
3129
3252
  this.log('Placement: ' + this.placement);
3130
3253
  this.log('Content: ' + this.content);
3131
3254
  } // Set positions
3255
+ ;
3132
3256
 
3133
-
3134
- setPosition(placement) {
3257
+ _proto.setPosition = function setPosition(placement) {
3135
3258
  if (typeof placement === 'undefined' || placement === null) {
3136
3259
  placement = this.placement;
3137
3260
  }
3138
3261
 
3139
3262
  this.$tooltip.addClass('tooltip-' + placement);
3140
- let containerInnerWidth = this.$container.innerWidth();
3141
- let containerInnerHeight = this.$container.innerHeight();
3142
- let tooltipWidth = this.$tooltip.outerWidth(true);
3143
- let tooltipHeight = this.$tooltip.outerHeight(true);
3144
- let tooltipTriggerWidth = this.$el.outerWidth();
3145
- let tooltipTriggerHeight = this.$el.outerHeight();
3146
- let tooltipTriggerPosX = this.$el.offset().left;
3147
- let tooltipTriggerPosY = this.$el.offset().top;
3148
- let arrowWidth = this.$arrow.outerWidth(true);
3149
- let arrowHeight = this.$arrow.outerHeight(true);
3150
- let arrowPos;
3151
- let tooltipPosX;
3152
- let tooltipPosY;
3263
+ var containerInnerWidth = this.$container.innerWidth();
3264
+ var containerInnerHeight = this.$container.innerHeight();
3265
+ var tooltipWidth = this.$tooltip.outerWidth(true);
3266
+ var tooltipHeight = this.$tooltip.outerHeight(true);
3267
+ var tooltipTriggerWidth = this.$el.outerWidth();
3268
+ var tooltipTriggerHeight = this.$el.outerHeight();
3269
+ var tooltipTriggerPosX = this.$el.offset().left;
3270
+ var tooltipTriggerPosY = this.$el.offset().top;
3271
+ var arrowWidth = this.$arrow.outerWidth(true);
3272
+ var arrowHeight = this.$arrow.outerHeight(true);
3273
+ var arrowPos;
3274
+ var tooltipPosX;
3275
+ var tooltipPosY;
3153
3276
 
3154
3277
  if (placement === 'top') {
3155
3278
  tooltipPosX = Math.round(tooltipTriggerPosX - (tooltipWidth - tooltipTriggerWidth) / 2);
@@ -3189,14 +3312,14 @@ class Tooltip extends AbstractUIComponent {
3189
3312
  'will-change': 'transform'
3190
3313
  }); // Correct placement if tooltip goes outside of container
3191
3314
 
3192
- let tooltipOverflowCount = 0;
3193
- let tooltipPosition = {
3315
+ var tooltipOverflowCount = 0;
3316
+ var tooltipPosition = {
3194
3317
  left: this.$tooltip.position().left,
3195
3318
  top: this.$tooltip.position().top,
3196
3319
  right: containerInnerWidth - (this.$tooltip.position().left + tooltipWidth),
3197
3320
  bottom: containerInnerHeight - (this.$tooltip.position().top + tooltipHeight)
3198
3321
  };
3199
- let tooltipOverflow = {
3322
+ var tooltipOverflow = {
3200
3323
  left: false,
3201
3324
  top: false,
3202
3325
  right: false,
@@ -3275,8 +3398,8 @@ class Tooltip extends AbstractUIComponent {
3275
3398
 
3276
3399
  if (tooltipOverflow.left) {
3277
3400
  this.log('Tooltip overflowing from left');
3278
- let overflowAmount = Math.abs(tooltipPosition.left);
3279
- let excludePlacements = ['top', 'bottom'];
3401
+ var overflowAmount = Math.abs(tooltipPosition.left);
3402
+ var excludePlacements = ['top', 'bottom'];
3280
3403
 
3281
3404
  if (tooltipTriggerPosX >= tooltipPosX + overflowAmount && excludePlacements.indexOf(placement) < 0) {
3282
3405
  this.log('Tooltip adjusting width');
@@ -3291,33 +3414,39 @@ class Tooltip extends AbstractUIComponent {
3291
3414
 
3292
3415
  if (tooltipOverflow.top) {
3293
3416
  this.log('Tooltip overflowing from top');
3294
- let overflowAmount = Math.abs(tooltipPosition.top);
3417
+
3418
+ var _overflowAmount = Math.abs(tooltipPosition.top);
3419
+
3295
3420
  this.log('Tooltip adjusting position y');
3296
- tooltipPosY += overflowAmount;
3297
- arrowPos -= overflowAmount;
3421
+ tooltipPosY += _overflowAmount;
3422
+ arrowPos -= _overflowAmount;
3298
3423
  }
3299
3424
 
3300
3425
  if (tooltipOverflow.right) {
3301
3426
  this.log('Tooltip overflowing from right');
3302
- let overflowAmount = Math.abs(tooltipPosition.right);
3303
- let excludePlacements = ['top', 'bottom'];
3304
3427
 
3305
- if (tooltipTriggerPosX <= tooltipPosX - overflowAmount && excludePlacements.indexOf(placement) < 0) {
3428
+ var _overflowAmount2 = Math.abs(tooltipPosition.right);
3429
+
3430
+ var _excludePlacements = ['top', 'bottom'];
3431
+
3432
+ if (tooltipTriggerPosX <= tooltipPosX - _overflowAmount2 && _excludePlacements.indexOf(placement) < 0) {
3306
3433
  this.log('Tooltip adjusting width');
3307
- tooltipWidth -= overflowAmount;
3434
+ tooltipWidth -= _overflowAmount2;
3308
3435
  } else {
3309
3436
  this.log('Tooltip adjusting position x');
3310
- tooltipPosX -= overflowAmount;
3311
- arrowPos += overflowAmount;
3437
+ tooltipPosX -= _overflowAmount2;
3438
+ arrowPos += _overflowAmount2;
3312
3439
  }
3313
3440
  }
3314
3441
 
3315
3442
  if (tooltipOverflow.bottom) {
3316
3443
  this.log('Tooltip overflowing from bottom');
3317
- let overflowAmount = Math.abs(tooltipPosition.bottom);
3444
+
3445
+ var _overflowAmount3 = Math.abs(tooltipPosition.bottom);
3446
+
3318
3447
  this.log('Tooltip adjusting position y');
3319
- tooltipPosY -= overflowAmount;
3320
- arrowPos += overflowAmount;
3448
+ tooltipPosY -= _overflowAmount3;
3449
+ arrowPos += _overflowAmount3;
3321
3450
  }
3322
3451
 
3323
3452
  if (placement === 'top') {
@@ -3377,9 +3506,9 @@ class Tooltip extends AbstractUIComponent {
3377
3506
  this.log('Tooltip position bottom: ' + tooltipPosition.bottom + 'px');
3378
3507
  }
3379
3508
  } // Show
3509
+ ;
3380
3510
 
3381
-
3382
- show() {
3511
+ _proto.show = function show() {
3383
3512
  if (this.$tooltip) {
3384
3513
  return;
3385
3514
  }
@@ -3401,20 +3530,25 @@ class Tooltip extends AbstractUIComponent {
3401
3530
 
3402
3531
  this.onShow();
3403
3532
  } // Close
3533
+ ;
3404
3534
 
3535
+ _proto.close = function close() {
3536
+ var _this3 = this;
3405
3537
 
3406
- close() {
3407
3538
  if (!this.$tooltip) {
3408
3539
  return;
3409
3540
  }
3410
3541
 
3411
3542
  if (this.animation && !this.$tooltip.hasClass('animated')) {
3412
- this.$tooltip.animateCss(this.animationOut, () => {
3413
- this.$tooltip.remove();
3414
- this.$el.removeAttr('data-tooltip');
3415
- this.$tooltip = null;
3416
- this.placementChanged = false;
3417
- this.onClose();
3543
+ this.$tooltip.animateCss(this.animationOut, function () {
3544
+ _this3.$tooltip.remove();
3545
+
3546
+ _this3.$el.removeAttr('data-tooltip');
3547
+
3548
+ _this3.$tooltip = null;
3549
+ _this3.placementChanged = false;
3550
+
3551
+ _this3.onClose();
3418
3552
  });
3419
3553
  } else {
3420
3554
  this.$tooltip.remove();
@@ -3423,13 +3557,13 @@ class Tooltip extends AbstractUIComponent {
3423
3557
  this.placementChanged = false;
3424
3558
  this.onClose();
3425
3559
  }
3426
- }
3560
+ };
3427
3561
 
3428
- static _jQueryInterface(config) {
3562
+ Tooltip._jQueryInterface = function _jQueryInterface(config) {
3429
3563
  return this.each(function () {
3430
- let data = $(this).data(DATA_KEY$3);
3564
+ var data = $(this).data(DATA_KEY$3);
3431
3565
 
3432
- const _config = typeof config === 'object' && config;
3566
+ var _config = typeof config === 'object' && config;
3433
3567
 
3434
3568
  if (!data) {
3435
3569
  data = new Tooltip(this, _config);
@@ -3444,18 +3578,19 @@ class Tooltip extends AbstractUIComponent {
3444
3578
  data[config]();
3445
3579
  }
3446
3580
  });
3447
- }
3581
+ };
3448
3582
 
3449
- }
3583
+ return Tooltip;
3584
+ }(AbstractUIComponent);
3450
3585
 
3451
3586
  if (typeof $ !== 'undefined') {
3452
3587
  // jQuery
3453
- const JQUERY_NO_CONFLICT = $.fn[NAME$3];
3588
+ var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
3454
3589
  $.fn[NAME$3] = Tooltip._jQueryInterface;
3455
3590
  $.fn[NAME$3].Constructor = Tooltip;
3456
3591
 
3457
- $.fn[NAME$3].noConflict = () => {
3458
- $.fn[NAME$3] = JQUERY_NO_CONFLICT;
3592
+ $.fn[NAME$3].noConflict = function () {
3593
+ $.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
3459
3594
  return Tooltip._jQueryInterface;
3460
3595
  };
3461
3596
 
@@ -3476,48 +3611,59 @@ if (typeof $ !== 'undefined') {
3476
3611
  };
3477
3612
  }
3478
3613
 
3479
- const NAME$4 = 'coolSectionTabs';
3480
- const DATA_KEY$4 = 'plugin_coolSectionTabs';
3614
+ var NAME$4 = 'coolSectionTabs';
3615
+ var DATA_KEY$4 = 'plugin_coolSectionTabs';
3616
+
3617
+ var SectionTabs =
3618
+ /*#__PURE__*/
3619
+ function (_AbstractUIComponent) {
3620
+ _inheritsLoose(SectionTabs, _AbstractUIComponent);
3481
3621
 
3482
- class SectionTabs extends AbstractUIComponent {
3483
- constructor(el, opts) {
3484
- super();
3485
- this.opts = {};
3622
+ function SectionTabs(el, opts) {
3623
+ var _this;
3624
+
3625
+ _this = _AbstractUIComponent.call(this) || this;
3626
+ _this.opts = {};
3486
3627
 
3487
3628
  if (window.Cool.settings.sectionTabs) {
3488
- $.extend(true, this.opts, $.fn[NAME$4].defaults, window.Cool.settings.sectionTabs, opts);
3629
+ $.extend(true, _this.opts, $.fn[NAME$4].defaults, window.Cool.settings.sectionTabs, opts);
3489
3630
  } else {
3490
- $.extend(true, this.opts, $.fn[NAME$4].defaults, opts);
3631
+ $.extend(true, _this.opts, $.fn[NAME$4].defaults, opts);
3491
3632
  }
3492
3633
 
3493
- this.el = el;
3494
- this.debug = this.opts.debug;
3495
- this.init();
3634
+ _this.el = el;
3635
+ _this.debug = _this.opts.debug;
3636
+
3637
+ _this.init();
3638
+
3639
+ return _this;
3496
3640
  } // Init plugin
3497
3641
 
3498
3642
 
3499
- init() {
3643
+ var _proto = SectionTabs.prototype;
3644
+
3645
+ _proto.init = function init() {
3500
3646
  this.buildCache();
3501
3647
  this.bindEvents();
3502
3648
  this.checkForChanges();
3503
3649
  this.onInit();
3504
3650
  } // Remove plugin instance completely
3651
+ ;
3505
3652
 
3506
-
3507
- destroy() {
3653
+ _proto.destroy = function destroy() {
3508
3654
  this.unbindEvents();
3509
3655
  this.$el.removeData(DATA_KEY$4);
3510
3656
  this.onDestroy();
3511
3657
  } // Update plugin data
3658
+ ;
3512
3659
 
3513
-
3514
- update() {
3660
+ _proto.update = function update() {
3515
3661
  this.buildCache();
3516
3662
  this.onUpdate();
3517
3663
  } // Cache DOM nodes for performance
3664
+ ;
3518
3665
 
3519
-
3520
- buildCache() {
3666
+ _proto.buildCache = function buildCache() {
3521
3667
  this.$el = $(this.el);
3522
3668
  this.$dropdownContainer = this.$el.find('.dropdown-container');
3523
3669
  this.$dropdownList = this.$el.find('.dropdown-list');
@@ -3531,50 +3677,52 @@ class SectionTabs extends AbstractUIComponent {
3531
3677
  this.log(this.$dropdownList);
3532
3678
  this.log(this.tabsCount);
3533
3679
  } // Bind events that trigger methods
3680
+ ;
3534
3681
 
3682
+ _proto.bindEvents = function bindEvents() {
3683
+ var _this2 = this;
3535
3684
 
3536
- bindEvents() {
3537
- $(window).on('resize', debounce(() => {
3538
- this.checkForChanges();
3685
+ $(window).on('resize', debounce(function () {
3686
+ _this2.checkForChanges();
3539
3687
  }, 250));
3540
3688
  } // Unbind events that trigger methods
3689
+ ;
3541
3690
 
3542
-
3543
- unbindEvents() {
3691
+ _proto.unbindEvents = function unbindEvents() {
3544
3692
  this.$el.off('.' + this._name);
3545
3693
  } // Move to list
3694
+ ;
3546
3695
 
3547
-
3548
- moveToList(el) {
3696
+ _proto.moveToList = function moveToList(el) {
3549
3697
  $(el).insertBefore(this.$dropdownContainer);
3550
3698
  this.checkForChanges();
3551
3699
  } // Move to dropdown
3700
+ ;
3552
3701
 
3553
-
3554
- moveToDropdown(el) {
3702
+ _proto.moveToDropdown = function moveToDropdown(el) {
3555
3703
  $(el).appendTo(this.$dropdownList);
3556
3704
  this.checkForChanges();
3557
3705
  } // Overflow status
3706
+ ;
3558
3707
 
3559
-
3560
- overflowStatus() {
3708
+ _proto.overflowStatus = function overflowStatus() {
3561
3709
  if (this.$el[0].offsetWidth < this.$el[0].scrollWidth) {
3562
3710
  return true;
3563
3711
  } else {
3564
3712
  return false;
3565
3713
  }
3566
3714
  } // CheckForChanges
3715
+ ;
3567
3716
 
3568
-
3569
- checkForChanges() {
3570
- let dropdownItems = this.$dropdownList.children();
3571
- let moveableTabs = this.$el.find('> .tab-item').not(this.$dropdownContainer);
3572
- let tabs = this.$el.find('> .tab-item:visible');
3573
- let usedSpace = 0;
3717
+ _proto.checkForChanges = function checkForChanges() {
3718
+ var dropdownItems = this.$dropdownList.children();
3719
+ var moveableTabs = this.$el.find('> .tab-item').not(this.$dropdownContainer);
3720
+ var tabs = this.$el.find('> .tab-item:visible');
3721
+ var usedSpace = 0;
3574
3722
  $.each(tabs, function (i, el) {
3575
3723
  usedSpace += $(el).outerWidth(true);
3576
3724
  });
3577
- let freeSpace = this.$el[0].offsetWidth - usedSpace;
3725
+ var freeSpace = this.$el[0].offsetWidth - usedSpace;
3578
3726
 
3579
3727
  if (dropdownItems.length > 0) {
3580
3728
  if (!this.$dropdownContainer.hasClass('visible')) {
@@ -3597,13 +3745,13 @@ class SectionTabs extends AbstractUIComponent {
3597
3745
  }
3598
3746
  }
3599
3747
  }
3600
- }
3748
+ };
3601
3749
 
3602
- static _jQueryInterface(config) {
3750
+ SectionTabs._jQueryInterface = function _jQueryInterface(config) {
3603
3751
  return this.each(function () {
3604
- let data = $(this).data(DATA_KEY$4);
3752
+ var data = $(this).data(DATA_KEY$4);
3605
3753
 
3606
- const _config = typeof config === 'object' && config;
3754
+ var _config = typeof config === 'object' && config;
3607
3755
 
3608
3756
  if (!data) {
3609
3757
  data = new SectionTabs(this, _config);
@@ -3618,18 +3766,19 @@ class SectionTabs extends AbstractUIComponent {
3618
3766
  data[config]();
3619
3767
  }
3620
3768
  });
3621
- }
3769
+ };
3622
3770
 
3623
- }
3771
+ return SectionTabs;
3772
+ }(AbstractUIComponent);
3624
3773
 
3625
3774
  if (typeof $ !== 'undefined') {
3626
3775
  // jQuery
3627
- const JQUERY_NO_CONFLICT = $.fn[NAME$4];
3776
+ var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];
3628
3777
  $.fn[NAME$4] = SectionTabs._jQueryInterface;
3629
3778
  $.fn[NAME$4].Constructor = SectionTabs;
3630
3779
 
3631
- $.fn[NAME$4].noConflict = () => {
3632
- $.fn[NAME$4] = JQUERY_NO_CONFLICT;
3780
+ $.fn[NAME$4].noConflict = function () {
3781
+ $.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
3633
3782
  return SectionTabs._jQueryInterface;
3634
3783
  };
3635
3784
 
@@ -3641,47 +3790,58 @@ if (typeof $ !== 'undefined') {
3641
3790
  };
3642
3791
  }
3643
3792
 
3644
- const NAME$5 = 'coolCollapse';
3645
- const DATA_KEY$5 = 'plugin_coolCollapse';
3793
+ var NAME$5 = 'coolCollapse';
3794
+ var DATA_KEY$5 = 'plugin_coolCollapse';
3795
+
3796
+ var Collapse =
3797
+ /*#__PURE__*/
3798
+ function (_AbstractUIComponent) {
3799
+ _inheritsLoose(Collapse, _AbstractUIComponent);
3800
+
3801
+ function Collapse(el, opts) {
3802
+ var _this;
3646
3803
 
3647
- class Collapse extends AbstractUIComponent {
3648
- constructor(el, opts) {
3649
- super();
3650
- this.opts = {};
3804
+ _this = _AbstractUIComponent.call(this) || this;
3805
+ _this.opts = {};
3651
3806
 
3652
3807
  if (window.Cool.settings.collapse) {
3653
- $.extend(true, this.opts, $.fn[NAME$5].defaults, window.Cool.settings.dialog, opts);
3808
+ $.extend(true, _this.opts, $.fn[NAME$5].defaults, window.Cool.settings.dialog, opts);
3654
3809
  } else {
3655
- $.extend(true, this.opts, $.fn[NAME$5].defaults, opts);
3810
+ $.extend(true, _this.opts, $.fn[NAME$5].defaults, opts);
3656
3811
  }
3657
3812
 
3658
- this.el = el;
3659
- this.debug = this.opts.debug;
3660
- this.init();
3813
+ _this.el = el;
3814
+ _this.debug = _this.opts.debug;
3815
+
3816
+ _this.init();
3817
+
3818
+ return _this;
3661
3819
  } // Init plugin
3662
3820
 
3663
3821
 
3664
- init() {
3822
+ var _proto = Collapse.prototype;
3823
+
3824
+ _proto.init = function init() {
3665
3825
  this.buildCache();
3666
3826
  this.bindEvents();
3667
3827
  this.onInit();
3668
3828
  } // Remove plugin instance completely
3829
+ ;
3669
3830
 
3670
-
3671
- destroy() {
3831
+ _proto.destroy = function destroy() {
3672
3832
  this.unbindEvents();
3673
3833
  this.$el.removeData(DATA_KEY$5);
3674
3834
  this.onDestroy();
3675
3835
  } // Update plugin data
3836
+ ;
3676
3837
 
3677
-
3678
- update() {
3838
+ _proto.update = function update() {
3679
3839
  this.buildCache();
3680
3840
  this.onUpdate();
3681
3841
  } // Cache DOM nodes for performance
3842
+ ;
3682
3843
 
3683
-
3684
- buildCache() {
3844
+ _proto.buildCache = function buildCache() {
3685
3845
  this.$el = $(this.el);
3686
3846
  this.$target = this.$el.data('target') ? $(document).find(this.$el.data('target')) : $(document).find(this.opts.target);
3687
3847
  this.expanded = this.$el.attr('aria-expanded') == 'true' ? true : false;
@@ -3704,33 +3864,36 @@ class Collapse extends AbstractUIComponent {
3704
3864
  this.log('Expanded: ' + this.expanded);
3705
3865
  this.log('Target height: ' + this.targetHeight + 'px');
3706
3866
  } // Bind events that trigger methods
3867
+ ;
3707
3868
 
3869
+ _proto.bindEvents = function bindEvents() {
3870
+ var _this2 = this;
3708
3871
 
3709
- bindEvents() {
3710
- this.$el.on('click' + '.' + this.name, e => {
3711
- if (this.expanded) {
3712
- this.close();
3872
+ this.$el.on('click' + '.' + this.name, function (e) {
3873
+ if (_this2.expanded) {
3874
+ _this2.close();
3713
3875
  } else {
3714
- this.show();
3876
+ _this2.show();
3715
3877
  }
3716
3878
  });
3717
- $(window).on('resize', debounce(() => {
3718
- if (this.$target.length) {
3719
- this.targetHeight = this.$target.height();
3720
- this.log('Target height: ' + this.targetHeight + 'px');
3879
+ $(window).on('resize', debounce(function () {
3880
+ if (_this2.$target.length) {
3881
+ _this2.targetHeight = _this2.$target.height();
3882
+
3883
+ _this2.log('Target height: ' + _this2.targetHeight + 'px');
3721
3884
  }
3722
3885
  }, 250));
3723
3886
  } // Unbind events that trigger methods
3887
+ ;
3724
3888
 
3725
-
3726
- unbindEvents() {
3889
+ _proto.unbindEvents = function unbindEvents() {
3727
3890
  this.$el.off('.' + this.name);
3728
3891
  } // Which transition
3892
+ ;
3729
3893
 
3730
-
3731
- whichTransitionEvent() {
3732
- let el = document.createElement('text-transition');
3733
- let transEndEventNames = {
3894
+ _proto.whichTransitionEvent = function whichTransitionEvent() {
3895
+ var el = document.createElement('text-transition');
3896
+ var transEndEventNames = {
3734
3897
  'WebkitTransition': 'webkitTransitionEnd',
3735
3898
  // Saf 6, Android Browser
3736
3899
  'MozTransition': 'transitionend',
@@ -3739,15 +3902,17 @@ class Collapse extends AbstractUIComponent {
3739
3902
 
3740
3903
  };
3741
3904
 
3742
- for (let t in transEndEventNames) {
3905
+ for (var t in transEndEventNames) {
3743
3906
  if (el.style[t] !== undefined) {
3744
3907
  return transEndEventNames[t];
3745
3908
  }
3746
3909
  }
3747
3910
  } // Show
3911
+ ;
3748
3912
 
3913
+ _proto.show = function show() {
3914
+ var _this3 = this;
3749
3915
 
3750
- show() {
3751
3916
  this.$target.removeClass('collapse visible');
3752
3917
  this.$target.addClass('collapsing');
3753
3918
 
@@ -3766,24 +3931,30 @@ class Collapse extends AbstractUIComponent {
3766
3931
  this.$indicator.addClass('visible');
3767
3932
  }
3768
3933
 
3769
- this.$target.one(this.whichTransitionEvent(), () => {
3770
- this.$target.removeClass('collapsing');
3934
+ this.$target.one(this.whichTransitionEvent(), function () {
3935
+ _this3.$target.removeClass('collapsing');
3771
3936
 
3772
- if (this.$el.is('button')) {
3773
- this.$el.attr('disabled', false);
3937
+ if (_this3.$el.is('button')) {
3938
+ _this3.$el.attr('disabled', false);
3774
3939
  }
3775
3940
 
3776
- this.$target.removeAttr('style');
3777
- this.$target.addClass('collapse visible');
3778
- this.$el.attr('aria-expanded', true);
3779
- this.$target.css('height', 'auto');
3780
- this.expanded = true;
3941
+ _this3.$target.removeAttr('style');
3942
+
3943
+ _this3.$target.addClass('collapse visible');
3944
+
3945
+ _this3.$el.attr('aria-expanded', true);
3946
+
3947
+ _this3.$target.css('height', 'auto');
3948
+
3949
+ _this3.expanded = true;
3781
3950
  });
3782
3951
  this.onShow();
3783
3952
  } // Close
3953
+ ;
3784
3954
 
3955
+ _proto.close = function close() {
3956
+ var _this4 = this;
3785
3957
 
3786
- close() {
3787
3958
  this.$target.removeClass('collapse visible');
3788
3959
  this.$target.addClass('collapsing');
3789
3960
 
@@ -3796,34 +3967,37 @@ class Collapse extends AbstractUIComponent {
3796
3967
  }
3797
3968
 
3798
3969
  this.$target.css('height', this.$target.height());
3799
- setTimeout(() => {
3800
- this.$target.css('height', 0);
3970
+ setTimeout(function () {
3971
+ _this4.$target.css('height', 0);
3801
3972
  }, 10);
3802
3973
 
3803
3974
  if (this.$indicator.length && this.$indicator.hasClass('visible')) {
3804
3975
  this.$indicator.removeClass('visible');
3805
3976
  }
3806
3977
 
3807
- this.$target.one(this.whichTransitionEvent(), () => {
3808
- this.$target.removeClass('collapsing');
3978
+ this.$target.one(this.whichTransitionEvent(), function () {
3979
+ _this4.$target.removeClass('collapsing');
3809
3980
 
3810
- if (this.$el.is('button')) {
3811
- this.$el.attr('disabled', false);
3981
+ if (_this4.$el.is('button')) {
3982
+ _this4.$el.attr('disabled', false);
3812
3983
  }
3813
3984
 
3814
- this.$target.removeAttr('style');
3815
- this.$target.addClass('collapse');
3816
- this.$el.attr('aria-expanded', false);
3817
- this.expanded = false;
3985
+ _this4.$target.removeAttr('style');
3986
+
3987
+ _this4.$target.addClass('collapse');
3988
+
3989
+ _this4.$el.attr('aria-expanded', false);
3990
+
3991
+ _this4.expanded = false;
3818
3992
  });
3819
3993
  this.onClose();
3820
- }
3994
+ };
3821
3995
 
3822
- static _jQueryInterface(config) {
3996
+ Collapse._jQueryInterface = function _jQueryInterface(config) {
3823
3997
  return this.each(function () {
3824
- let data = $(this).data(DATA_KEY$5);
3998
+ var data = $(this).data(DATA_KEY$5);
3825
3999
 
3826
- const _config = typeof config === 'object' && config;
4000
+ var _config = typeof config === 'object' && config;
3827
4001
 
3828
4002
  if (!data) {
3829
4003
  data = new Collapse(this, _config);
@@ -3838,18 +4012,19 @@ class Collapse extends AbstractUIComponent {
3838
4012
  data[config]();
3839
4013
  }
3840
4014
  });
3841
- }
4015
+ };
3842
4016
 
3843
- }
4017
+ return Collapse;
4018
+ }(AbstractUIComponent);
3844
4019
 
3845
4020
  if (typeof $ !== 'undefined') {
3846
4021
  // jQuery
3847
- const JQUERY_NO_CONFLICT = $.fn[NAME$5];
4022
+ var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];
3848
4023
  $.fn[NAME$5] = Collapse._jQueryInterface;
3849
4024
  $.fn[NAME$5].Constructor = Collapse;
3850
4025
 
3851
- $.fn[NAME$5].noConflict = () => {
3852
- $.fn[NAME$5] = JQUERY_NO_CONFLICT;
4026
+ $.fn[NAME$5].noConflict = function () {
4027
+ $.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
3853
4028
  return Collapse._jQueryInterface;
3854
4029
  };
3855
4030
 
@@ -3864,11 +4039,13 @@ if (typeof $ !== 'undefined') {
3864
4039
  };
3865
4040
  }
3866
4041
 
3867
- const NAME$6 = 'coolToast';
3868
- const DATA_KEY$6 = 'plugin_coolToast';
4042
+ var NAME$6 = 'coolToast';
4043
+ var DATA_KEY$6 = 'plugin_coolToast';
3869
4044
 
3870
- class Toast {
3871
- constructor(container, opts) {
4045
+ var Toast =
4046
+ /*#__PURE__*/
4047
+ function () {
4048
+ function Toast(container, opts) {
3872
4049
  this.settings = {};
3873
4050
 
3874
4051
  if (window.Cool.settings.toast) {
@@ -3889,7 +4066,9 @@ class Toast {
3889
4066
  } // Add item to queue
3890
4067
 
3891
4068
 
3892
- addQueue(toast) {
4069
+ var _proto = Toast.prototype;
4070
+
4071
+ _proto.addQueue = function addQueue(toast) {
3893
4072
  this.queue.push(toast);
3894
4073
 
3895
4074
  if (this.processingQueue) {
@@ -3898,9 +4077,9 @@ class Toast {
3898
4077
 
3899
4078
  return this.processQueue();
3900
4079
  } // Process queue
4080
+ ;
3901
4081
 
3902
-
3903
- processQueue() {
4082
+ _proto.processQueue = function processQueue() {
3904
4083
  if (this.processingQueue) {
3905
4084
  this.queue.shift();
3906
4085
  }
@@ -3913,26 +4092,26 @@ class Toast {
3913
4092
  this.processingQueue = true;
3914
4093
  return this.show(this.queue[0]);
3915
4094
  } // Init toast
4095
+ ;
3916
4096
 
3917
-
3918
- init(opts) {
3919
- let settings = {};
4097
+ _proto.init = function init(opts) {
4098
+ var settings = {};
3920
4099
  $.extend(true, settings, this.settings, opts);
3921
- let toast = this.buildToast(settings);
4100
+ var toast = this.buildToast(settings);
3922
4101
  this.addQueue(toast);
3923
4102
  this.onInit(toast);
3924
4103
  return toast;
3925
4104
  } // Remove plugin instance completely
4105
+ ;
3926
4106
 
3927
-
3928
- destroy() {
4107
+ _proto.destroy = function destroy() {
3929
4108
  this.$container.removeData(DATA_KEY$6);
3930
4109
  this.onDestroy();
3931
4110
  } // Build toast
4111
+ ;
3932
4112
 
3933
-
3934
- buildToast(settings) {
3935
- let toast = {
4113
+ _proto.buildToast = function buildToast(settings) {
4114
+ var toast = {
3936
4115
  uuid: 'toast-' + this.generateUUID(),
3937
4116
  placement: settings.placement,
3938
4117
  placementX: settings.placementX,
@@ -3967,33 +4146,35 @@ class Toast {
3967
4146
  this.toasts.push(toast);
3968
4147
  return toast;
3969
4148
  } // Bind events that trigger methods
4149
+ ;
3970
4150
 
4151
+ _proto.bindEvents = function bindEvents(toast) {
4152
+ var _this = this;
3971
4153
 
3972
- bindEvents(toast) {
3973
- let self = this;
3974
- toast.$el.on('click', '[data-toast-close]', () => {
4154
+ var self = this;
4155
+ toast.$el.on('click', '[data-toast-close]', function () {
3975
4156
  if (toast.$el) {
3976
4157
  self.close(toast);
3977
4158
  }
3978
4159
  });
3979
- $(window).on('resize', debounce(() => {
4160
+ $(window).on('resize', debounce(function () {
3980
4161
  if (toast.$el) {
3981
- this.setPosition(toast);
4162
+ _this.setPosition(toast);
3982
4163
  }
3983
4164
  }, 250));
3984
4165
  } // Generate UUID
4166
+ ;
3985
4167
 
3986
-
3987
- generateUUID() {
4168
+ _proto.generateUUID = function generateUUID() {
3988
4169
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
3989
- let r = Math.random() * 16 | 0,
4170
+ var r = Math.random() * 16 | 0,
3990
4171
  v = c == 'x' ? r : r & 0x3 | 0x8;
3991
4172
  return v.toString(16);
3992
4173
  });
3993
4174
  } // Set positions
4175
+ ;
3994
4176
 
3995
-
3996
- setPosition(toast, placement, placementY, placementX) {
4177
+ _proto.setPosition = function setPosition(toast, placement, placementY, placementX) {
3997
4178
  if (typeof placementY === 'undefined' || placementY === null) {
3998
4179
  placementY = toast.placementY;
3999
4180
  }
@@ -4007,15 +4188,17 @@ class Toast {
4007
4188
  }
4008
4189
 
4009
4190
  if (toast.offset) {
4010
- let offsets = toast.offset.split(',');
4011
- let offsetX = parseInt(offsets[0], 10);
4012
- let offsetY = parseInt(offsets[1], 10);
4191
+ var offsets = toast.offset.split(',');
4192
+
4193
+ var _offsetX = parseInt(offsets[0], 10);
4194
+
4195
+ var _offsetY = parseInt(offsets[1], 10);
4013
4196
  }
4014
4197
 
4015
- let toastWidth = toast.$el.outerWidth(true);
4016
- let toastHeight = toast.$el.outerHeight(true);
4017
- let toastPosX;
4018
- let toastPosY;
4198
+ var toastWidth = toast.$el.outerWidth(true);
4199
+ var toastHeight = toast.$el.outerHeight(true);
4200
+ var toastPosX;
4201
+ var toastPosY;
4019
4202
 
4020
4203
  if (placement) {
4021
4204
  if (placement === 'top-left') {
@@ -4129,9 +4312,11 @@ class Toast {
4129
4312
  this.log('Toast position Y: ' + toastPosX + 'px');
4130
4313
  this.log('Toast position x: ' + toastPosY + 'px');
4131
4314
  } // Show
4315
+ ;
4132
4316
 
4317
+ _proto.show = function show(toast) {
4318
+ var _this2 = this;
4133
4319
 
4134
- show(toast) {
4135
4320
  this.$container.append(toast.$el);
4136
4321
  this.bindEvents(toast);
4137
4322
  this.setPosition(toast);
@@ -4145,25 +4330,29 @@ class Toast {
4145
4330
  }
4146
4331
 
4147
4332
  if (toast.dismiss) {
4148
- setTimeout(() => {
4149
- this.close(toast);
4333
+ setTimeout(function () {
4334
+ _this2.close(toast);
4150
4335
  }, toast.dismiss * 1000);
4151
4336
  }
4152
4337
 
4153
4338
  this.onShow(toast);
4154
4339
  } // Close
4340
+ ;
4155
4341
 
4342
+ _proto.close = function close(toast) {
4343
+ var _this3 = this;
4156
4344
 
4157
- close(toast) {
4158
4345
  if (toast.animation && !toast.$inner.hasClass('animated')) {
4159
4346
  toast.$el.removeClass('show');
4160
- toast.$inner.animateCss(toast.animationOut, () => {
4347
+ toast.$inner.animateCss(toast.animationOut, function () {
4161
4348
  toast.$el.remove();
4162
- this.toasts = $.grep(this.toasts, function (item) {
4349
+ _this3.toasts = $.grep(_this3.toasts, function (item) {
4163
4350
  return item.uuid != toast.uuid;
4164
4351
  });
4165
- this.processQueue();
4166
- this.onClose(toast);
4352
+
4353
+ _this3.processQueue();
4354
+
4355
+ _this3.onClose(toast);
4167
4356
  });
4168
4357
  } else {
4169
4358
  toast.$el.remove();
@@ -4174,70 +4363,72 @@ class Toast {
4174
4363
  this.onClose(toast);
4175
4364
  }
4176
4365
  } // Initialize callback
4366
+ ;
4177
4367
 
4178
-
4179
- onInitialize() {
4180
- let onInitialize = this.onInitialize;
4368
+ _proto.onInitialize = function onInitialize() {
4369
+ var onInitialize = this.onInitialize;
4181
4370
 
4182
4371
  if (typeof onInitialize === 'function') {
4183
4372
  onInitialize.call(this.container);
4184
4373
  }
4185
4374
  } // Destroy callback
4375
+ ;
4186
4376
 
4187
-
4188
- onDestroy() {
4189
- let onDestroy = this.onDestroy;
4377
+ _proto.onDestroy = function onDestroy() {
4378
+ var onDestroy = this.onDestroy;
4190
4379
 
4191
4380
  if (typeof onDestroy === 'function') {
4192
4381
  onDestroy.call(this.container);
4193
4382
  }
4194
4383
  } // Init callback
4384
+ ;
4195
4385
 
4196
-
4197
- onInit(toast) {
4198
- let onInit = toast.onInit;
4386
+ _proto.onInit = function onInit(toast) {
4387
+ var onInit = toast.onInit;
4199
4388
 
4200
4389
  if (typeof onInit === 'function') {
4201
4390
  onInit.call(toast);
4202
4391
  }
4203
4392
  } // Show callback
4393
+ ;
4204
4394
 
4205
-
4206
- onShow(toast) {
4207
- let onShow = toast.onShow;
4395
+ _proto.onShow = function onShow(toast) {
4396
+ var onShow = toast.onShow;
4208
4397
 
4209
4398
  if (typeof onShow === 'function') {
4210
4399
  onShow.call(toast);
4211
4400
  }
4212
4401
  } // Close callback
4402
+ ;
4213
4403
 
4214
-
4215
- onClose(toast) {
4216
- let onClose = toast.onClose;
4404
+ _proto.onClose = function onClose(toast) {
4405
+ var onClose = toast.onClose;
4217
4406
 
4218
4407
  if (typeof onClose === 'function') {
4219
4408
  onClose.call(toast);
4220
4409
  }
4221
4410
  } // Debug log
4411
+ ;
4222
4412
 
4223
-
4224
- log() {
4413
+ _proto.log = function log() {
4225
4414
  if (this.debug) {
4226
4415
  if (typeof this.debug === 'function') {
4227
- this.debug(...arguments);
4416
+ this.debug.apply(this, arguments);
4228
4417
  } else {
4229
- console.log(...arguments);
4418
+ var _console;
4419
+
4420
+ (_console = console).log.apply(_console, arguments);
4230
4421
  }
4231
4422
  }
4232
4423
  } // Render template
4424
+ ;
4233
4425
 
4234
-
4235
- _renderTemplate(toast) {
4236
- let faNameSpace = this.faPro ? 'far' : 'fas';
4237
- let content = '';
4238
- let header = '';
4239
- let body = '';
4240
- let bodyCloseBtn = '';
4426
+ _proto._renderTemplate = function _renderTemplate(toast) {
4427
+ var faNameSpace = this.faPro ? 'far' : 'fas';
4428
+ var content = '';
4429
+ var header = '';
4430
+ var body = '';
4431
+ var bodyCloseBtn = '';
4241
4432
 
4242
4433
  if (typeof toast.content === 'function') {
4243
4434
  content = toast.content();
@@ -4253,13 +4444,13 @@ class Toast {
4253
4444
 
4254
4445
  body = "\n <div class=\"toast-body\">\n\n <span>" + content + "</span>\n " + bodyCloseBtn + "\n\n </div>\n ";
4255
4446
  return "\n <div class=\"toast toast-" + toast.size + " toast-" + toast.theme + "\" role=\"alert\" id=\"" + toast.uuid + "\">\n\n <div class=\"toast-inner\">\n\n " + header + "\n " + body + "\n\n </div>\n\n </div>\n ";
4256
- }
4447
+ };
4257
4448
 
4258
- static _jQueryInterface(config) {
4449
+ Toast._jQueryInterface = function _jQueryInterface(config) {
4259
4450
  return this.each(function () {
4260
- let data = $(this).data(DATA_KEY$6);
4451
+ var data = $(this).data(DATA_KEY$6);
4261
4452
 
4262
- const _config = typeof config === 'object' && config;
4453
+ var _config = typeof config === 'object' && config;
4263
4454
 
4264
4455
  if (!data) {
4265
4456
  data = new Toast(this, _config);
@@ -4274,22 +4465,25 @@ class Toast {
4274
4465
  data[config]();
4275
4466
  }
4276
4467
  });
4277
- }
4468
+ };
4278
4469
 
4279
- }
4470
+ return Toast;
4471
+ }();
4280
4472
 
4281
4473
  if (typeof $ !== 'undefined') {
4474
+ var _$$fn$NAME$defaults;
4475
+
4282
4476
  // jQuery
4283
- const JQUERY_NO_CONFLICT = $.fn[NAME$6];
4477
+ var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
4284
4478
  $.fn[NAME$6] = Toast._jQueryInterface;
4285
4479
  $.fn[NAME$6].Constructor = Toast;
4286
4480
 
4287
- $.fn[NAME$6].noConflict = () => {
4288
- $.fn[NAME$6] = JQUERY_NO_CONFLICT;
4481
+ $.fn[NAME$6].noConflict = function () {
4482
+ $.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
4289
4483
  return Toast._jQueryInterface;
4290
4484
  };
4291
4485
 
4292
- $.fn[NAME$6].defaults = {
4486
+ $.fn[NAME$6].defaults = (_$$fn$NAME$defaults = {
4293
4487
  title: '',
4294
4488
  content: '',
4295
4489
  template: '',
@@ -4309,18 +4503,17 @@ if (typeof $ !== 'undefined') {
4309
4503
  debug: false,
4310
4504
  onInitialize: null,
4311
4505
  onDestroy: null,
4312
- onInit: null,
4313
- onDestroy: null,
4314
- onShow: null,
4315
- onClose: null
4316
- };
4506
+ onInit: null
4507
+ }, _$$fn$NAME$defaults["onDestroy"] = null, _$$fn$NAME$defaults.onShow = null, _$$fn$NAME$defaults.onClose = null, _$$fn$NAME$defaults);
4317
4508
  }
4318
4509
 
4319
- const NAME$7 = 'coolDialog';
4320
- const DATA_KEY$7 = 'plugin_coolDialog';
4510
+ var NAME$7 = 'coolDialog';
4511
+ var DATA_KEY$7 = 'plugin_coolDialog';
4321
4512
 
4322
- class Dialog {
4323
- constructor(container, opts) {
4513
+ var Dialog =
4514
+ /*#__PURE__*/
4515
+ function () {
4516
+ function Dialog(container, opts) {
4324
4517
  this.settings = {};
4325
4518
 
4326
4519
  if (window.Cool.settings.dialog) {
@@ -4339,26 +4532,28 @@ class Dialog {
4339
4532
  } // Init dialog
4340
4533
 
4341
4534
 
4342
- init(opts) {
4343
- let settings = {};
4535
+ var _proto = Dialog.prototype;
4536
+
4537
+ _proto.init = function init(opts) {
4538
+ var settings = {};
4344
4539
  $.extend(true, settings, this.settings, opts);
4345
- let dialog = this.buildDialog(settings);
4540
+ var dialog = this.buildDialog(settings);
4346
4541
  this.show(dialog);
4347
4542
  this.bindEvents(dialog);
4348
4543
  this.onInit(dialog);
4349
4544
  return dialog;
4350
4545
  } // Remove plugin instance completely
4546
+ ;
4351
4547
 
4352
-
4353
- destroy() {
4548
+ _proto.destroy = function destroy() {
4354
4549
  this.$container.removeData(DATA_KEY$7);
4355
4550
  this.onDestroy();
4356
4551
  } // Build dialog
4552
+ ;
4357
4553
 
4358
-
4359
- buildDialog(settings) {
4360
- let self = this;
4361
- let dialog = {
4554
+ _proto.buildDialog = function buildDialog(settings) {
4555
+ var self = this;
4556
+ var dialog = {
4362
4557
  uuid: 'dialog-' + this.generateUUID(),
4363
4558
  title: settings.title,
4364
4559
  template: settings.template,
@@ -4400,10 +4595,10 @@ class Dialog {
4400
4595
  this.dialogs.push(dialog);
4401
4596
  return dialog;
4402
4597
  } // Bind events that trigger methods
4598
+ ;
4403
4599
 
4404
-
4405
- bindEvents(dialog) {
4406
- let self = this;
4600
+ _proto.bindEvents = function bindEvents(dialog) {
4601
+ var self = this;
4407
4602
  dialog.$el.on('click', '[data-dialog-close]', function (e) {
4408
4603
  dialog.$el.trigger('dialog.close');
4409
4604
 
@@ -4436,18 +4631,20 @@ class Dialog {
4436
4631
  }
4437
4632
  }));
4438
4633
  } // Generate UUID
4634
+ ;
4439
4635
 
4440
-
4441
- generateUUID() {
4636
+ _proto.generateUUID = function generateUUID() {
4442
4637
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
4443
- let r = Math.random() * 16 | 0,
4638
+ var r = Math.random() * 16 | 0,
4444
4639
  v = c == 'x' ? r : r & 0x3 | 0x8;
4445
4640
  return v.toString(16);
4446
4641
  });
4447
4642
  } // Show
4643
+ ;
4448
4644
 
4645
+ _proto.show = function show(dialog) {
4646
+ var _this = this;
4449
4647
 
4450
- show(dialog) {
4451
4648
  if (!this.$container.hasClass('has-dialogs')) {
4452
4649
  this.$container.addClass('has-dialogs');
4453
4650
  }
@@ -4457,8 +4654,8 @@ class Dialog {
4457
4654
  }
4458
4655
 
4459
4656
  if (this.dialogs.length > 1) {
4460
- let $prevDialog = $(this.dialogs).eq(-2)[0].$el;
4461
- let zIndex = parseInt($prevDialog.css('z-index'), 10) + 1;
4657
+ var $prevDialog = $(this.dialogs).eq(-2)[0].$el;
4658
+ var zIndex = parseInt($prevDialog.css('z-index'), 10) + 1;
4462
4659
  dialog.$el.css('z-index', zIndex);
4463
4660
  $prevDialog.css({
4464
4661
  'transition': 'opacity 0.3s',
@@ -4469,8 +4666,8 @@ class Dialog {
4469
4666
 
4470
4667
  if (dialog.backdrop && $('.dialog-backdrop').length < 1) {
4471
4668
  this.$container.append('<div class="dialog-backdrop"></div>');
4472
- let checkForBackdrop = setInterval(() => {
4473
- if (this.dialogs.length == 0 && $('.dialog-backdrop').length) {
4669
+ var checkForBackdrop = setInterval(function () {
4670
+ if (_this.dialogs.length == 0 && $('.dialog-backdrop').length) {
4474
4671
  $('.dialog-backdrop').remove();
4475
4672
  clearInterval(checkForBackdrop);
4476
4673
  }
@@ -4495,10 +4692,12 @@ class Dialog {
4495
4692
 
4496
4693
  this.onShow(dialog);
4497
4694
  } // Close
4695
+ ;
4498
4696
 
4697
+ _proto.close = function close(dialog) {
4698
+ var _this2 = this;
4499
4699
 
4500
- close(dialog) {
4501
- let $prevDialog = null;
4700
+ var $prevDialog = null;
4502
4701
 
4503
4702
  if (this.dialogs.length > 1) {
4504
4703
  $prevDialog = $(this.dialogs).eq(-2)[0].$el;
@@ -4509,17 +4708,17 @@ class Dialog {
4509
4708
  }
4510
4709
 
4511
4710
  if (dialog.animation) {
4512
- dialog.$el.find('.dialog-content').animateCss(dialog.animationOut, () => {
4711
+ dialog.$el.find('.dialog-content').animateCss(dialog.animationOut, function () {
4513
4712
  dialog.$el.remove();
4514
- this.dialogs = $.grep(this.dialogs, function (item) {
4713
+ _this2.dialogs = $.grep(_this2.dialogs, function (item) {
4515
4714
  return item.uuid != dialog.uuid;
4516
4715
  });
4517
4716
 
4518
- if (this.dialogs.length == 0) {
4519
- this.$container.removeClass('has-dialogs');
4717
+ if (_this2.dialogs.length == 0) {
4718
+ _this2.$container.removeClass('has-dialogs');
4520
4719
 
4521
- if (this.$container.hasClass('dialog-prevent-scroll')) {
4522
- this.$container.removeClass('dialog-prevent-scroll');
4720
+ if (_this2.$container.hasClass('dialog-prevent-scroll')) {
4721
+ _this2.$container.removeClass('dialog-prevent-scroll');
4523
4722
  }
4524
4723
  } else {
4525
4724
  if ($prevDialog) {
@@ -4548,78 +4747,80 @@ class Dialog {
4548
4747
 
4549
4748
  this.onClose(dialog);
4550
4749
  } // Initialize callback
4750
+ ;
4551
4751
 
4552
-
4553
- onInitialize() {
4554
- let onInitialize = this.onInitialize;
4752
+ _proto.onInitialize = function onInitialize() {
4753
+ var onInitialize = this.onInitialize;
4555
4754
 
4556
4755
  if (typeof onInitialize === 'function') {
4557
4756
  onInitialize.call(this.container);
4558
4757
  }
4559
4758
  } // Destroy callback
4759
+ ;
4560
4760
 
4561
-
4562
- onDestroy() {
4563
- let onDestroy = this.onDestroy;
4761
+ _proto.onDestroy = function onDestroy() {
4762
+ var onDestroy = this.onDestroy;
4564
4763
 
4565
4764
  if (typeof onDestroy === 'function') {
4566
4765
  onDestroy.call(this.container);
4567
4766
  }
4568
4767
  } // Init callback
4768
+ ;
4569
4769
 
4570
-
4571
- onInit(dialog) {
4572
- let onInit = dialog.onInit;
4770
+ _proto.onInit = function onInit(dialog) {
4771
+ var onInit = dialog.onInit;
4573
4772
 
4574
4773
  if (typeof onInit === 'function') {
4575
4774
  onInit.call(dialog);
4576
4775
  }
4577
4776
  } // Show callback
4777
+ ;
4578
4778
 
4579
-
4580
- onShow(dialog) {
4581
- let onShow = dialog.onShow;
4779
+ _proto.onShow = function onShow(dialog) {
4780
+ var onShow = dialog.onShow;
4582
4781
 
4583
4782
  if (typeof onShow === 'function') {
4584
4783
  onShow.call(dialog);
4585
4784
  }
4586
4785
  } // Close callback
4786
+ ;
4587
4787
 
4588
-
4589
- onClose(dialog) {
4590
- let onClose = dialog.onClose;
4788
+ _proto.onClose = function onClose(dialog) {
4789
+ var onClose = dialog.onClose;
4591
4790
 
4592
4791
  if (typeof onClose === 'function') {
4593
4792
  onClose.call(dialog);
4594
4793
  }
4595
4794
  } // Debug log
4795
+ ;
4596
4796
 
4597
-
4598
- log() {
4797
+ _proto.log = function log() {
4599
4798
  if (this.debug) {
4600
4799
  if (typeof this.debug === 'function') {
4601
- this.debug(...arguments);
4800
+ this.debug.apply(this, arguments);
4602
4801
  } else {
4603
- console.log(...arguments);
4802
+ var _console;
4803
+
4804
+ (_console = console).log.apply(_console, arguments);
4604
4805
  }
4605
4806
  }
4606
4807
  } // Render footer
4808
+ ;
4607
4809
 
4608
-
4609
- _renderFooter(dialog) {
4610
- let footer = '';
4810
+ _proto._renderFooter = function _renderFooter(dialog) {
4811
+ var footer = '';
4611
4812
 
4612
4813
  if (typeof dialog.footer === 'function') {
4613
4814
  footer = dialog.footer();
4614
4815
  } else if (dialog.footer !== '' && dialog.footer !== false && dialog.footer !== true) {
4615
4816
  footer = dialog.footer;
4616
4817
  } else if (dialog.footer === true) {
4617
- let btnCancel = '';
4618
- let btnRemove = '';
4619
- let btnConfirm = '';
4620
- let btnStyle = '';
4621
- let btnClasses = '';
4622
- let btnAttrs = '';
4818
+ var btnCancel = '';
4819
+ var btnRemove = '';
4820
+ var btnConfirm = '';
4821
+ var btnStyle = '';
4822
+ var btnClasses = '';
4823
+ var btnAttrs = '';
4623
4824
 
4624
4825
  if (dialog.actions.close.visible) {
4625
4826
  btnStyle = dialog.actions.close.primary ? 'btn-primary' : 'btn-secondary';
@@ -4651,21 +4852,21 @@ class Dialog {
4651
4852
  return "\n <div class=\"dialog-footer\">\n " + footer + "\n </div>\n ";
4652
4853
  }
4653
4854
  } // Render template
4654
-
4655
-
4656
- _renderTemplate(dialog) {
4657
- let faNameSpace = this.faPro ? 'far' : 'fas';
4658
- let classes = dialog.classes ? ' ' + dialog.classes : '';
4659
- let centered = dialog.centered ? ' dialog-centered' : '';
4660
- let size = dialog.size ? ' dialog-' + dialog.size : '';
4661
- let uuid = ' data-dialog-uuid="' + dialog.uuid + '"';
4662
- let backdrop = dialog.backdrop ? ' data-dialog-backdrop="true"' : ' data-dialog-backdrop="false"';
4663
- let title = dialog.title;
4664
- let closeBtn = dialog.closeBtn ? "<button type=\"button\" data-dialog-close><i class=\"" + faNameSpace + " fa-times icon\"></i></button>" : '';
4665
- let maxBodyHeight = dialog.maxBodyHeight ? ' style="max-height: ' + dialog.maxBodyHeight + 'px"' : '';
4666
- let body = '';
4667
-
4668
- let footer = this._renderFooter(dialog);
4855
+ ;
4856
+
4857
+ _proto._renderTemplate = function _renderTemplate(dialog) {
4858
+ var faNameSpace = this.faPro ? 'far' : 'fas';
4859
+ var classes = dialog.classes ? ' ' + dialog.classes : '';
4860
+ var centered = dialog.centered ? ' dialog-centered' : '';
4861
+ var size = dialog.size ? ' dialog-' + dialog.size : '';
4862
+ var uuid = ' data-dialog-uuid="' + dialog.uuid + '"';
4863
+ var backdrop = dialog.backdrop ? ' data-dialog-backdrop="true"' : ' data-dialog-backdrop="false"';
4864
+ var title = dialog.title;
4865
+ var closeBtn = dialog.closeBtn ? "<button type=\"button\" data-dialog-close><i class=\"" + faNameSpace + " fa-times icon\"></i></button>" : '';
4866
+ var maxBodyHeight = dialog.maxBodyHeight ? ' style="max-height: ' + dialog.maxBodyHeight + 'px"' : '';
4867
+ var body = '';
4868
+
4869
+ var footer = this._renderFooter(dialog);
4669
4870
 
4670
4871
  if (typeof dialog.body === 'function') {
4671
4872
  body = dialog.body();
@@ -4674,12 +4875,12 @@ class Dialog {
4674
4875
  }
4675
4876
 
4676
4877
  return "\n <div class=\"dialog" + classes + centered + size + "\"" + uuid + backdrop + ">\n\n <div class=\"dialog-container\">\n\n <div class=\"dialog-content\">\n\n <div class=\"dialog-header\">\n\n <span class=\"dialog-title\">\n " + title + "\n </span>\n\n " + closeBtn + "\n\n </div>\n\n <div class=\"dialog-body\"" + maxBodyHeight + ">\n\n " + body + "\n\n </div>\n\n " + footer + "\n\n </div>\n\n </div>\n\n </div>\n ";
4677
- }
4878
+ };
4678
4879
 
4679
- static _jQueryInterface(config) {
4680
- let data = $(this).data(DATA_KEY$7);
4880
+ Dialog._jQueryInterface = function _jQueryInterface(config) {
4881
+ var data = $(this).data(DATA_KEY$7);
4681
4882
 
4682
- const _config = typeof config === 'object' && config;
4883
+ var _config = typeof config === 'object' && config;
4683
4884
 
4684
4885
  if (!data) {
4685
4886
  data = new Dialog(this, _config);
@@ -4693,22 +4894,25 @@ class Dialog {
4693
4894
 
4694
4895
  data[config]();
4695
4896
  }
4696
- }
4897
+ };
4697
4898
 
4698
- }
4899
+ return Dialog;
4900
+ }();
4699
4901
 
4700
4902
  if (typeof $ !== 'undefined') {
4903
+ var _$$fn$NAME$defaults$1;
4904
+
4701
4905
  // jQuery
4702
- const JQUERY_NO_CONFLICT = $.fn[NAME$7];
4906
+ var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
4703
4907
  $.fn[NAME$7] = Dialog._jQueryInterface;
4704
4908
  $.fn[NAME$7].Constructor = Dialog;
4705
4909
 
4706
- $.fn[NAME$7].noConflict = () => {
4707
- $.fn[NAME$7] = JQUERY_NO_CONFLICT;
4910
+ $.fn[NAME$7].noConflict = function () {
4911
+ $.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
4708
4912
  return Dialog._jQueryInterface;
4709
4913
  };
4710
4914
 
4711
- $.fn[NAME$7].defaults = {
4915
+ $.fn[NAME$7].defaults = (_$$fn$NAME$defaults$1 = {
4712
4916
  title: '',
4713
4917
  template: '',
4714
4918
  body: '',
@@ -4730,46 +4934,42 @@ if (typeof $ !== 'undefined') {
4730
4934
  debug: true,
4731
4935
  onInitialize: null,
4732
4936
  onDestroy: null,
4733
- onInit: null,
4734
- onDestroy: null,
4735
- onShow: null,
4736
- onClose: null,
4737
- actions: {
4738
- close: {
4739
- primary: false,
4740
- visible: true,
4741
- content: 'Close',
4742
- classes: '',
4743
- attrs: ''
4744
- },
4745
- remove: {
4746
- primary: false,
4747
- visible: true,
4748
- content: 'Remove',
4749
- classes: '',
4750
- attrs: ''
4751
- },
4752
- confirm: {
4753
- primary: true,
4754
- visible: true,
4755
- content: 'Confirm',
4756
- classes: '',
4757
- attrs: ''
4758
- }
4759
- }
4760
- };
4937
+ onInit: null
4938
+ }, _$$fn$NAME$defaults$1["onDestroy"] = null, _$$fn$NAME$defaults$1.onShow = null, _$$fn$NAME$defaults$1.onClose = null, _$$fn$NAME$defaults$1.actions = {
4939
+ close: {
4940
+ primary: false,
4941
+ visible: true,
4942
+ content: 'Close',
4943
+ classes: '',
4944
+ attrs: ''
4945
+ },
4946
+ remove: {
4947
+ primary: false,
4948
+ visible: true,
4949
+ content: 'Remove',
4950
+ classes: '',
4951
+ attrs: ''
4952
+ },
4953
+ confirm: {
4954
+ primary: true,
4955
+ visible: true,
4956
+ content: 'Confirm',
4957
+ classes: '',
4958
+ attrs: ''
4959
+ }
4960
+ }, _$$fn$NAME$defaults$1);
4761
4961
  }
4762
4962
 
4763
4963
  var index_esm = {
4764
- Common,
4765
- Popover,
4766
- Select,
4767
- Dropdown,
4768
- Tooltip,
4769
- SectionTabs,
4770
- Collapse,
4771
- Toast,
4772
- Dialog
4964
+ Common: Common,
4965
+ Popover: Popover,
4966
+ Select: Select,
4967
+ Dropdown: Dropdown,
4968
+ Tooltip: Tooltip,
4969
+ SectionTabs: SectionTabs,
4970
+ Collapse: Collapse,
4971
+ Toast: Toast,
4972
+ Dialog: Dialog
4773
4973
  };
4774
4974
 
4775
4975
  export default index_esm;