eoss 0.1.0-alpha.25 → 0.1.0-alpha.26

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.
Files changed (254) hide show
  1. package/lib/0.js +1 -1
  2. package/lib/1.js +1 -1
  3. package/lib/10.js +1 -1
  4. package/lib/11.js +1 -1
  5. package/lib/12.js +1 -1
  6. package/lib/13.js +1 -1
  7. package/lib/14.js +1 -1
  8. package/lib/15.js +1 -1
  9. package/lib/16.js +1 -1
  10. package/lib/17.js +1 -1
  11. package/lib/18.js +1 -1
  12. package/lib/19.js +1 -1
  13. package/lib/20.js +1 -1
  14. package/lib/21.js +1 -1
  15. package/lib/22.js +1 -1
  16. package/lib/23.js +1 -1
  17. package/lib/24.js +1 -1
  18. package/lib/25.js +1 -1
  19. package/lib/26.js +1 -1
  20. package/lib/27.js +1 -1
  21. package/lib/28.js +1 -1
  22. package/lib/29.js +1 -1
  23. package/lib/3.js +1 -1
  24. package/lib/30.js +1 -1
  25. package/lib/31.js +1 -1
  26. package/lib/32.js +1 -1
  27. package/lib/33.js +1 -1
  28. package/lib/34.js +1 -1
  29. package/lib/35.js +1 -1
  30. package/lib/36.js +1 -1
  31. package/lib/37.js +1 -1
  32. package/lib/38.js +1 -1
  33. package/lib/39.js +1 -1
  34. package/lib/4.js +1 -1
  35. package/lib/40.js +1 -1
  36. package/lib/41.js +1 -1
  37. package/lib/42.js +1 -1
  38. package/lib/43.js +1 -1
  39. package/lib/44.js +1 -1
  40. package/lib/45.js +1 -1
  41. package/lib/46.js +1 -1
  42. package/lib/47.js +1 -1
  43. package/lib/48.js +1 -1
  44. package/lib/49.js +1 -1
  45. package/lib/5.js +1 -1
  46. package/lib/50.js +1 -1
  47. package/lib/51.js +1 -1
  48. package/lib/52.js +1 -1
  49. package/lib/53.js +1 -1
  50. package/lib/54.js +1 -1
  51. package/lib/55.js +1 -1
  52. package/lib/56.js +1 -1
  53. package/lib/57.js +1 -1
  54. package/lib/58.js +1 -1
  55. package/lib/59.js +1 -1
  56. package/lib/6.js +1 -1
  57. package/lib/60.js +1 -1
  58. package/lib/61.js +1 -1
  59. package/lib/62.js +1 -1
  60. package/lib/63.js +1 -1
  61. package/lib/64.js +1 -1
  62. package/lib/65.js +1 -1
  63. package/lib/66.js +1 -1
  64. package/lib/67.js +1 -1
  65. package/lib/68.js +1 -1
  66. package/lib/69.js +1 -1
  67. package/lib/7.js +1 -1
  68. package/lib/70.js +1 -1
  69. package/lib/71.js +1 -1
  70. package/lib/72.js +1 -1
  71. package/lib/73.js +1 -1
  72. package/lib/74.js +1 -1
  73. package/lib/75.js +1 -1
  74. package/lib/76.js +1 -1
  75. package/lib/77.js +1 -1
  76. package/lib/78.js +1 -1
  77. package/lib/79.js +1 -1
  78. package/lib/8.js +1 -1
  79. package/lib/80.js +1 -1
  80. package/lib/81.js +1 -1
  81. package/lib/9.js +1 -1
  82. package/lib/account-login.js +1000 -971
  83. package/lib/alert.js +2 -2
  84. package/lib/aside.js +2 -2
  85. package/lib/audit-trajectory.js +75 -71
  86. package/lib/autocomplete.js +2136 -1951
  87. package/lib/avatar.js +2 -2
  88. package/lib/backtop.js +2 -2
  89. package/lib/badge.js +2 -2
  90. package/lib/breadcrumb-item.js +4 -4
  91. package/lib/breadcrumb.js +4 -4
  92. package/lib/button-group.js +12 -12
  93. package/lib/button.js +2 -2
  94. package/lib/ca-login.js +913 -888
  95. package/lib/calendar.js +872 -847
  96. package/lib/card.js +2 -2
  97. package/lib/carousel-item.js +905 -880
  98. package/lib/carousel.js +1042 -1017
  99. package/lib/cascader-panel.js +926 -901
  100. package/lib/cascader.js +2022 -1837
  101. package/lib/checkbox-button.js +2 -2
  102. package/lib/checkbox-group.js +1000 -971
  103. package/lib/checkbox.js +2 -2
  104. package/lib/col.js +2 -2
  105. package/lib/collapse-item.js +2174 -1980
  106. package/lib/collapse.js +2175 -1980
  107. package/lib/color-picker.js +1112 -952
  108. package/lib/config/api.js +3 -0
  109. package/lib/container.js +2 -2
  110. package/lib/cron.js +2 -2
  111. package/lib/data-table.js +1007 -978
  112. package/lib/date-picker.js +2142 -1957
  113. package/lib/dialog.js +910 -885
  114. package/lib/divider.js +2 -2
  115. package/lib/drawer.js +2 -2
  116. package/lib/dropdown-item.js +4 -4
  117. package/lib/dropdown-menu.js +1104 -944
  118. package/lib/dropdown.js +925 -900
  119. package/lib/email-login.js +999 -970
  120. package/lib/empty.js +2 -2
  121. package/lib/eoss.common.js +8751 -4166
  122. package/lib/flip.js +2 -2
  123. package/lib/flow-group.js +906 -881
  124. package/lib/flow.js +1112 -1083
  125. package/lib/flows.js +1010 -981
  126. package/lib/footer.js +2 -2
  127. package/lib/form-item.js +909 -884
  128. package/lib/form.js +2185 -1986
  129. package/lib/guide.js +620 -0
  130. package/lib/header.js +2 -2
  131. package/lib/icon.js +981 -952
  132. package/lib/icons.js +2 -2
  133. package/lib/image-viewer.js +907 -882
  134. package/lib/image.js +4 -4
  135. package/lib/index.js +1 -1
  136. package/lib/infinite-scroll.js +2 -2
  137. package/lib/input-number.js +4 -4
  138. package/lib/input.js +910 -885
  139. package/lib/link.js +2 -2
  140. package/lib/loading.js +2 -2
  141. package/lib/login.js +1027 -998
  142. package/lib/lowcode.js +17336 -13510
  143. package/lib/main.js +14933 -14625
  144. package/lib/marquee.js +907 -882
  145. package/lib/menu-item-group.js +2 -2
  146. package/lib/menu-item.js +2 -2
  147. package/lib/menu.js +2011 -1826
  148. package/lib/message-box.js +923 -898
  149. package/lib/message.js +911 -886
  150. package/lib/notification.js +911 -886
  151. package/lib/option-group.js +2 -2
  152. package/lib/option.js +907 -882
  153. package/lib/page-header.js +2 -2
  154. package/lib/pagination.js +910 -885
  155. package/lib/phone-login.js +998 -969
  156. package/lib/popconfirm.js +12 -12
  157. package/lib/popover.js +2009 -1824
  158. package/lib/process-config.js +1015 -986
  159. package/lib/process-module.js +1001 -972
  160. package/lib/process-rule.js +1019 -990
  161. package/lib/progress.js +5 -5
  162. package/lib/qr-code.js +4 -4
  163. package/lib/qrcode-login.js +1057 -1028
  164. package/lib/radio-button.js +2 -2
  165. package/lib/radio-group.js +998 -969
  166. package/lib/radio.js +2 -2
  167. package/lib/rate.js +907 -882
  168. package/lib/row.js +2 -2
  169. package/lib/scrollbar.js +904 -879
  170. package/lib/select.js +2135 -1945
  171. package/lib/selector-panel.js +1009 -980
  172. package/lib/selector.js +1001 -972
  173. package/lib/slider.js +2 -2
  174. package/lib/step.js +2172 -1977
  175. package/lib/steps.js +907 -882
  176. package/lib/submenu.js +1119 -959
  177. package/lib/switch.js +907 -882
  178. package/lib/tab-pane.js +2 -2
  179. package/lib/table-column.js +906 -881
  180. package/lib/table.js +2236 -2047
  181. package/lib/tabs.js +911 -886
  182. package/lib/tag.js +2 -2
  183. package/lib/theme-chalk/base.css +1 -1
  184. package/lib/theme-chalk/guide.css +1 -0
  185. package/lib/theme-chalk/icon.css +1 -1
  186. package/lib/theme-chalk/index.css +1 -1
  187. package/lib/theme-chalk/lowcode-view.css +1 -0
  188. package/lib/theme-chalk/lowcode.css +1 -1
  189. package/lib/theme-chalk/main.css +1 -1
  190. package/lib/theme-chalk/pagination.css +1 -1
  191. package/lib/theme-chalk/select-dropdown.css +1 -1
  192. package/lib/theme-chalk/select.css +1 -1
  193. package/lib/theme-chalk/wujie.css +1 -0
  194. package/lib/time-picker.js +1977 -1792
  195. package/lib/time-select.js +1978 -1793
  196. package/lib/timeline-item.js +2 -2
  197. package/lib/timeline.js +2 -2
  198. package/lib/tips.js +998 -969
  199. package/lib/toolbar.js +2 -2
  200. package/lib/tooltip.js +2006 -1821
  201. package/lib/transfer.js +916 -891
  202. package/lib/tree-group.js +978 -949
  203. package/lib/tree.js +999 -970
  204. package/lib/update-history.js +76 -72
  205. package/lib/upload.js +1028 -999
  206. package/lib/utils/frame.js +133 -0
  207. package/lib/wujie.js +5037 -0
  208. package/package.json +3 -2
  209. package/packages/cascader/src/cascader.vue +1 -1
  210. package/packages/date-picker/src/picker.vue +1 -1
  211. package/packages/form/src/form-item-render.vue +10 -6
  212. package/packages/guide/index.js +8 -0
  213. package/packages/guide/src/directive.js +47 -0
  214. package/packages/guide/src/guide.vue +89 -0
  215. package/packages/guide/src/manager.js +133 -0
  216. package/packages/input/src/input.vue +1 -1
  217. package/packages/lowcode/src/aside.vue +41 -8
  218. package/packages/lowcode/src/attribute/bind.vue +2 -4
  219. package/packages/lowcode/src/attribute/dependency.vue +3 -16
  220. package/packages/lowcode/src/attribute/function.vue +2 -4
  221. package/packages/lowcode/src/attribute/property.vue +3 -15
  222. package/packages/lowcode/src/attribute/styles.vue +105 -11
  223. package/packages/lowcode/src/attribute.vue +5 -35
  224. package/packages/lowcode/src/canvas.vue +223 -97
  225. package/packages/lowcode/src/iframe.vue +60 -0
  226. package/packages/lowcode/src/lowcode.vue +32 -8
  227. package/packages/lowcode/src/pages.vue +1 -1
  228. package/packages/lowcode/src/render.vue +312 -70
  229. package/packages/lowcode/src/util/source-generator.js +7 -11
  230. package/packages/lowcode/src/util/source-parser.js +1 -1
  231. package/packages/lowcode-view/index.js +1 -1
  232. package/packages/lowcode-view/src/Iframe.vue +55 -0
  233. package/packages/lowcode-view/src/Modulels.vue +239 -0
  234. package/packages/lowcode-view/src/render.vue +337 -0
  235. package/packages/lowcode-view/src/view.vue +763 -0
  236. package/packages/main/src/components/pages.vue +11 -2
  237. package/packages/main/src/event-center.js +160 -0
  238. package/packages/main/src/minxs.js +60 -90
  239. package/packages/progress/src/progress.vue +1 -1
  240. package/packages/select/src/select.vue +2 -1
  241. package/packages/theme-chalk/src/common/var.scss +34 -10
  242. package/packages/theme-chalk/src/guide.scss +93 -0
  243. package/packages/theme-chalk/src/icon.scss +425 -426
  244. package/packages/theme-chalk/src/index.scss +2 -0
  245. package/packages/theme-chalk/src/lowcode-view.scss +288 -0
  246. package/packages/theme-chalk/src/lowcode.scss +11 -1
  247. package/packages/theme-chalk/src/select-dropdown.scss +1 -1
  248. package/packages/theme-chalk/src/wujie.scss +5 -0
  249. package/packages/wujie/index.js +10 -0
  250. package/packages/wujie/src/wujie.vue +205 -0
  251. package/src/config/api.js +3 -0
  252. package/src/index.js +325 -319
  253. package/src/utils/frame.js +102 -0
  254. package/packages/lowcode/src/view.vue +0 -187
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 209);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 214);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -525,7 +525,7 @@ function scrollMove(wrap) {
525
525
 
526
526
  /***/ }),
527
527
 
528
- /***/ 209:
528
+ /***/ 214:
529
529
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
530
530
 
531
531
  "use strict";
@@ -599,7 +599,7 @@ render._withStripped = true
599
599
  var vue_popper = __webpack_require__(13);
600
600
 
601
601
  // EXTERNAL MODULE: external "eoss/lib/dropdown-item"
602
- var dropdown_item_ = __webpack_require__(95);
602
+ var dropdown_item_ = __webpack_require__(98);
603
603
  var dropdown_item_default = /*#__PURE__*/__webpack_require__.n(dropdown_item_);
604
604
 
605
605
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dropdown/src/dropdown-menu.vue?vue&type=script&lang=js&
@@ -1461,9 +1461,7 @@ module.exports = require("vue");
1461
1461
  /***/ 42:
1462
1462
  /***/ (function(module, exports, __webpack_require__) {
1463
1463
 
1464
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1465
-
1466
- /**
1464
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
1467
1465
  * @fileOverview Kickass library to create and place poppers near their reference elements.
1468
1466
  * @version {{version}}
1469
1467
  * @license
@@ -1486,60 +1484,68 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
1486
1484
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1487
1485
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1488
1486
  * SOFTWARE.
1489
- */
1490
-
1491
- //
1492
- // Cross module loader
1493
- // Supported: Node, AMD, Browser globals
1494
- //
1495
- (function (root, factory) {
1496
- if (true) {
1497
- // AMD. Register as an anonymous module.
1487
+ */
1488
+
1489
+ //
1490
+ // Cross module loader
1491
+ // Supported: Node, AMD, Browser globals
1492
+ //
1493
+ (function (root, factory) {
1494
+ if (true) {
1495
+ // AMD. Register as an anonymous module.
1498
1496
  !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1499
1497
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1500
1498
  (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
1501
1499
  __WEBPACK_AMD_DEFINE_FACTORY__),
1502
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1503
- } else {}
1504
- })(this, function () {
1505
- 'use strict';
1506
-
1507
- var root = window;
1508
- // default options
1509
- var DEFAULTS = {
1510
- // placement of the popper
1511
- placement: 'bottom',
1512
-
1513
- gpuAcceleration: true,
1514
-
1515
- // shift popper from its origin by the given amount of pixels (can be negative)
1516
- offset: 0,
1517
-
1518
- // the element which will act as boundary of the popper
1519
- boundariesElement: 'viewport',
1520
-
1521
- // amount of pixel used to define a minimum distance between the boundaries and the popper
1522
- boundariesPadding: 5,
1523
-
1524
- // popper will try to prevent overflow following this order,
1525
- // by default, then, it could overflow on the left and on top of the boundariesElement
1526
- preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
1527
-
1528
- // the behavior used by flip to change the placement of the popper
1529
- flipBehavior: 'flip',
1530
-
1531
- arrowElement: '[x-arrow]',
1532
-
1533
- arrowOffset: 0,
1534
-
1535
- // list of functions used to modify the offsets before they are applied to the popper
1536
- modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
1537
-
1538
- modifiersIgnored: [],
1539
-
1540
- forceAbsolute: false
1541
- };
1542
-
1500
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1501
+ } else {}
1502
+ })(this, function () {
1503
+ 'use strict';
1504
+
1505
+ var root = window;
1506
+ // default options
1507
+ var DEFAULTS = {
1508
+ // placement of the popper
1509
+ placement: 'bottom',
1510
+
1511
+ gpuAcceleration: true,
1512
+
1513
+ // shift popper from its origin by the given amount of pixels (can be negative)
1514
+ offset: 0,
1515
+
1516
+ // the element which will act as boundary of the popper
1517
+ boundariesElement: 'viewport',
1518
+
1519
+ // amount of pixel used to define a minimum distance between the boundaries and the popper
1520
+ boundariesPadding: 5,
1521
+
1522
+ // popper will try to prevent overflow following this order,
1523
+ // by default, then, it could overflow on the left and on top of the boundariesElement
1524
+ preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
1525
+
1526
+ // the behavior used by flip to change the placement of the popper
1527
+ flipBehavior: 'flip',
1528
+
1529
+ arrowElement: '[x-arrow]',
1530
+
1531
+ arrowOffset: 0,
1532
+
1533
+ // list of functions used to modify the offsets before they are applied to the popper
1534
+ modifiers: [
1535
+ 'shift',
1536
+ 'offset',
1537
+ 'preventOverflow',
1538
+ 'keepTogether',
1539
+ 'arrow',
1540
+ 'flip',
1541
+ 'applyStyle'
1542
+ ],
1543
+
1544
+ modifiersIgnored: [],
1545
+
1546
+ forceAbsolute: false
1547
+ };
1548
+
1543
1549
  /**
1544
1550
  * Create a new Popper.js instance
1545
1551
  * @constructor Popper
@@ -1604,114 +1610,125 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
1604
1610
  *
1605
1611
  * @param {Boolean} [options.removeOnDestroy=false]
1606
1612
  * Set to true if you want to automatically remove the popper when you call the `destroy` method.
1607
- */
1608
- function Popper(reference, popper, options) {
1609
- this._reference = reference.jquery ? reference[0] : reference;
1610
- this.state = {};
1611
-
1612
- // if the popper variable is a configuration object, parse it to generate an HTMLElement
1613
- // generate a default popper if is not defined
1614
- var isNotDefined = typeof popper === 'undefined' || popper === null;
1615
- var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
1616
- if (isNotDefined || isConfig) {
1617
- this._popper = this.parse(isConfig ? popper : {});
1618
- }
1619
- // otherwise, use the given HTMLElement as popper
1620
- else {
1621
- this._popper = popper.jquery ? popper[0] : popper;
1622
- }
1623
-
1624
- // with {} we create a new object with the options inside it
1625
- this._options = Object.assign({}, DEFAULTS, options);
1626
-
1627
- // refactoring modifiers' list
1628
- this._options.modifiers = this._options.modifiers.map(function (modifier) {
1629
- // remove ignored modifiers
1630
- if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
1631
-
1632
- // set the x-placement attribute before everything else because it could be used to add margins to the popper
1633
- // margins needs to be calculated to get the correct popper offsets
1634
- if (modifier === 'applyStyle') {
1635
- this._popper.setAttribute('x-placement', this._options.placement);
1636
- }
1637
-
1638
- // return predefined modifier identified by string or keep the custom one
1639
- return this.modifiers[modifier] || modifier;
1640
- }.bind(this));
1641
-
1642
- // make sure to apply the popper position before any computation
1643
- this.state.position = this._getPosition(this._popper, this._reference);
1644
- setStyle(this._popper, { position: this.state.position, top: 0 });
1645
-
1646
- // fire the first update to position the popper in the right place
1647
- this.update();
1648
-
1649
- // setup event listeners, they will take care of update the position in specific situations
1650
- this._setupEventListeners();
1651
- return this;
1652
- }
1653
-
1654
- //
1655
- // Methods
1656
- //
1613
+ */
1614
+ function Popper(reference, popper, options) {
1615
+ this._reference = reference.jquery ? reference[0] : reference;
1616
+ this.state = {};
1617
+
1618
+ // if the popper variable is a configuration object, parse it to generate an HTMLElement
1619
+ // generate a default popper if is not defined
1620
+ var isNotDefined = typeof popper === 'undefined' || popper === null;
1621
+ var isConfig =
1622
+ popper && Object.prototype.toString.call(popper) === '[object Object]';
1623
+ if (isNotDefined || isConfig) {
1624
+ this._popper = this.parse(isConfig ? popper : {});
1625
+ }
1626
+ // otherwise, use the given HTMLElement as popper
1627
+ else {
1628
+ this._popper = popper.jquery ? popper[0] : popper;
1629
+ }
1630
+
1631
+ // with {} we create a new object with the options inside it
1632
+ this._options = Object.assign({}, DEFAULTS, options);
1633
+
1634
+ // refactoring modifiers' list
1635
+ this._options.modifiers = this._options.modifiers.map(
1636
+ function (modifier) {
1637
+ // remove ignored modifiers
1638
+ if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
1639
+
1640
+ // set the x-placement attribute before everything else because it could be used to add margins to the popper
1641
+ // margins needs to be calculated to get the correct popper offsets
1642
+ if (modifier === 'applyStyle') {
1643
+ this._popper.setAttribute('x-placement', this._options.placement);
1644
+ }
1645
+
1646
+ // return predefined modifier identified by string or keep the custom one
1647
+ return this.modifiers[modifier] || modifier;
1648
+ }.bind(this)
1649
+ );
1650
+
1651
+ // make sure to apply the popper position before any computation
1652
+ this.state.position = this._getPosition(this._popper, this._reference);
1653
+ setStyle(this._popper, { position: this.state.position, top: 0 });
1654
+
1655
+ // fire the first update to position the popper in the right place
1656
+ this.update();
1657
+
1658
+ // setup event listeners, they will take care of update the position in specific situations
1659
+ this._setupEventListeners();
1660
+ return this;
1661
+ }
1662
+
1663
+ //
1664
+ // Methods
1665
+ //
1657
1666
  /**
1658
1667
  * Destroy the popper
1659
1668
  * @method
1660
1669
  * @memberof Popper
1661
- */
1662
- Popper.prototype.destroy = function () {
1663
- this._popper.removeAttribute('x-placement');
1664
- this._popper.style.left = '';
1665
- this._popper.style.position = '';
1666
- this._popper.style.top = '';
1667
- this._popper.style[getSupportedPropertyName('transform')] = '';
1668
- this._removeEventListeners();
1669
-
1670
- // remove the popper if user explicity asked for the deletion on destroy
1671
- if (this._options.removeOnDestroy) {
1672
- this._popper.remove();
1673
- }
1674
- return this;
1675
- };
1676
-
1670
+ */
1671
+ Popper.prototype.destroy = function () {
1672
+ this._popper.removeAttribute('x-placement');
1673
+ this._popper.style.left = '';
1674
+ this._popper.style.position = '';
1675
+ this._popper.style.top = '';
1676
+ this._popper.style[getSupportedPropertyName('transform')] = '';
1677
+ this._removeEventListeners();
1678
+
1679
+ // remove the popper if user explicity asked for the deletion on destroy
1680
+ if (this._options.removeOnDestroy) {
1681
+ this._popper.remove();
1682
+ }
1683
+ return this;
1684
+ };
1685
+
1677
1686
  /**
1678
1687
  * Updates the position of the popper, computing the new offsets and applying the new style
1679
1688
  * @method
1680
1689
  * @memberof Popper
1681
- */
1682
- Popper.prototype.update = function () {
1683
- var data = { instance: this, styles: {} };
1684
-
1685
- // store placement inside the data object, modifiers will be able to edit `placement` if needed
1686
- // and refer to _originalPlacement to know the original value
1687
- data.placement = this._options.placement;
1688
- data._originalPlacement = this._options.placement;
1689
-
1690
- // compute the popper and reference offsets and put them inside data.offsets
1691
- data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
1692
-
1693
- // get boundaries
1694
- data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
1695
-
1696
- data = this.runModifiers(data, this._options.modifiers);
1697
-
1698
- if (typeof this.state.updateCallback === 'function') {
1699
- this.state.updateCallback(data);
1700
- }
1701
- };
1702
-
1690
+ */
1691
+ Popper.prototype.update = function () {
1692
+ var data = { instance: this, styles: {} };
1693
+
1694
+ // store placement inside the data object, modifiers will be able to edit `placement` if needed
1695
+ // and refer to _originalPlacement to know the original value
1696
+ data.placement = this._options.placement;
1697
+ data._originalPlacement = this._options.placement;
1698
+
1699
+ // compute the popper and reference offsets and put them inside data.offsets
1700
+ data.offsets = this._getOffsets(
1701
+ this._popper,
1702
+ this._reference,
1703
+ data.placement
1704
+ );
1705
+
1706
+ // get boundaries
1707
+ data.boundaries = this._getBoundaries(
1708
+ data,
1709
+ this._options.boundariesPadding,
1710
+ this._options.boundariesElement
1711
+ );
1712
+
1713
+ data = this.runModifiers(data, this._options.modifiers);
1714
+
1715
+ if (typeof this.state.updateCallback === 'function') {
1716
+ this.state.updateCallback(data);
1717
+ }
1718
+ };
1719
+
1703
1720
  /**
1704
1721
  * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
1705
1722
  * @method
1706
1723
  * @memberof Popper
1707
1724
  * @param {Function} callback
1708
- */
1709
- Popper.prototype.onCreate = function (callback) {
1710
- // the createCallbacks return as first argument the popper instance
1711
- callback(this);
1712
- return this;
1713
- };
1714
-
1725
+ */
1726
+ Popper.prototype.onCreate = function (callback) {
1727
+ // the createCallbacks return as first argument the popper instance
1728
+ callback(this);
1729
+ return this;
1730
+ };
1731
+
1715
1732
  /**
1716
1733
  * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
1717
1734
  * used to style popper and its arrow.
@@ -1719,93 +1736,101 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
1719
1736
  * @method
1720
1737
  * @memberof Popper
1721
1738
  * @param {Function} callback
1722
- */
1723
- Popper.prototype.onUpdate = function (callback) {
1724
- this.state.updateCallback = callback;
1725
- return this;
1726
- };
1727
-
1739
+ */
1740
+ Popper.prototype.onUpdate = function (callback) {
1741
+ this.state.updateCallback = callback;
1742
+ return this;
1743
+ };
1744
+
1728
1745
  /**
1729
1746
  * Helper used to generate poppers from a configuration file
1730
1747
  * @method
1731
1748
  * @memberof Popper
1732
1749
  * @param config {Object} configuration
1733
1750
  * @returns {HTMLElement} popper
1734
- */
1735
- Popper.prototype.parse = function (config) {
1736
- var defaultConfig = {
1737
- tagName: 'div',
1738
- classNames: ['popper'],
1739
- attributes: [],
1740
- parent: root.document.body,
1741
- content: '',
1742
- contentType: 'text',
1743
- arrowTagName: 'div',
1744
- arrowClassNames: ['popper__arrow'],
1745
- arrowAttributes: ['x-arrow']
1746
- };
1747
- config = Object.assign({}, defaultConfig, config);
1748
-
1749
- var d = root.document;
1750
-
1751
- var popper = d.createElement(config.tagName);
1752
- addClassNames(popper, config.classNames);
1753
- addAttributes(popper, config.attributes);
1754
- if (config.contentType === 'node') {
1755
- popper.appendChild(config.content.jquery ? config.content[0] : config.content);
1756
- } else if (config.contentType === 'html') {
1757
- popper.innerHTML = config.content;
1758
- } else {
1759
- popper.textContent = config.content;
1760
- }
1761
-
1762
- if (config.arrowTagName) {
1763
- var arrow = d.createElement(config.arrowTagName);
1764
- addClassNames(arrow, config.arrowClassNames);
1765
- addAttributes(arrow, config.arrowAttributes);
1766
- popper.appendChild(arrow);
1767
- }
1768
-
1769
- var parent = config.parent.jquery ? config.parent[0] : config.parent;
1770
-
1771
- // if the given parent is a string, use it to match an element
1772
- // if more than one element is matched, the first one will be used as parent
1773
- // if no elements are matched, the script will throw an error
1774
- if (typeof parent === 'string') {
1775
- parent = d.querySelectorAll(config.parent);
1776
- if (parent.length > 1) {
1777
- console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
1778
- }
1779
- if (parent.length === 0) {
1780
- throw "ERROR: the given `parent` doesn't exists!";
1781
- }
1782
- parent = parent[0];
1783
- }
1784
- // if the given parent is a DOM nodes list or an array of nodes with more than one element,
1785
- // the first one will be used as parent
1786
- if (parent.length > 1 && parent instanceof Element === false) {
1787
- console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
1788
- parent = parent[0];
1789
- }
1790
-
1791
- // append the generated popper to its parent
1792
- parent.appendChild(popper);
1793
-
1794
- return popper;
1795
-
1751
+ */
1752
+ Popper.prototype.parse = function (config) {
1753
+ var defaultConfig = {
1754
+ tagName: 'div',
1755
+ classNames: ['popper'],
1756
+ attributes: [],
1757
+ parent: root.document.body,
1758
+ content: '',
1759
+ contentType: 'text',
1760
+ arrowTagName: 'div',
1761
+ arrowClassNames: ['popper__arrow'],
1762
+ arrowAttributes: ['x-arrow']
1763
+ };
1764
+ config = Object.assign({}, defaultConfig, config);
1765
+
1766
+ var d = root.document;
1767
+
1768
+ var popper = d.createElement(config.tagName);
1769
+ addClassNames(popper, config.classNames);
1770
+ addAttributes(popper, config.attributes);
1771
+ if (config.contentType === 'node') {
1772
+ popper.appendChild(
1773
+ config.content.jquery ? config.content[0] : config.content
1774
+ );
1775
+ } else if (config.contentType === 'html') {
1776
+ popper.innerHTML = config.content;
1777
+ } else {
1778
+ popper.textContent = config.content;
1779
+ }
1780
+
1781
+ if (config.arrowTagName) {
1782
+ var arrow = d.createElement(config.arrowTagName);
1783
+ addClassNames(arrow, config.arrowClassNames);
1784
+ addAttributes(arrow, config.arrowAttributes);
1785
+ popper.appendChild(arrow);
1786
+ }
1787
+
1788
+ var parent = config.parent.jquery ? config.parent[0] : config.parent;
1789
+
1790
+ // if the given parent is a string, use it to match an element
1791
+ // if more than one element is matched, the first one will be used as parent
1792
+ // if no elements are matched, the script will throw an error
1793
+ if (typeof parent === 'string') {
1794
+ parent = d.querySelectorAll(config.parent);
1795
+ if (parent.length > 1) {
1796
+ console.warn(
1797
+ 'WARNING: the given `parent` query(' +
1798
+ config.parent +
1799
+ ') matched more than one element, the first one will be used'
1800
+ );
1801
+ }
1802
+ if (parent.length === 0) {
1803
+ throw "ERROR: the given `parent` doesn't exists!";
1804
+ }
1805
+ parent = parent[0];
1806
+ }
1807
+ // if the given parent is a DOM nodes list or an array of nodes with more than one element,
1808
+ // the first one will be used as parent
1809
+ if (parent.length > 1 && parent instanceof Element === false) {
1810
+ console.warn(
1811
+ 'WARNING: you have passed as parent a list of elements, the first one will be used'
1812
+ );
1813
+ parent = parent[0];
1814
+ }
1815
+
1816
+ // append the generated popper to its parent
1817
+ parent.appendChild(popper);
1818
+
1819
+ return popper;
1820
+
1796
1821
  /**
1797
1822
  * Adds class names to the given element
1798
1823
  * @function
1799
1824
  * @ignore
1800
1825
  * @param {HTMLElement} target
1801
1826
  * @param {Array} classes
1802
- */
1803
- function addClassNames(element, classNames) {
1804
- classNames.forEach(function (className) {
1805
- element.classList.add(className);
1806
- });
1807
- }
1808
-
1827
+ */
1828
+ function addClassNames(element, classNames) {
1829
+ classNames.forEach(function (className) {
1830
+ element.classList.add(className);
1831
+ });
1832
+ }
1833
+
1809
1834
  /**
1810
1835
  * Adds attributes to the given element
1811
1836
  * @function
@@ -1814,14 +1839,17 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
1814
1839
  * @param {Array} attributes
1815
1840
  * @example
1816
1841
  * addAttributes(element, [ 'data-info:foobar' ]);
1817
- */
1818
- function addAttributes(element, attributes) {
1819
- attributes.forEach(function (attribute) {
1820
- element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
1821
- });
1822
- }
1823
- };
1824
-
1842
+ */
1843
+ function addAttributes(element, attributes) {
1844
+ attributes.forEach(function (attribute) {
1845
+ element.setAttribute(
1846
+ attribute.split(':')[0],
1847
+ attribute.split(':')[1] || ''
1848
+ );
1849
+ });
1850
+ }
1851
+ };
1852
+
1825
1853
  /**
1826
1854
  * Helper used to get the position which will be applied to the popper
1827
1855
  * @method
@@ -1829,20 +1857,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
1829
1857
  * @param config {HTMLElement} popper element
1830
1858
  * @param reference {HTMLElement} reference element
1831
1859
  * @returns {String} position
1832
- */
1833
- Popper.prototype._getPosition = function (popper, reference) {
1834
- var container = getOffsetParent(reference);
1835
-
1836
- if (this._options.forceAbsolute) {
1837
- return 'absolute';
1838
- }
1839
-
1840
- // Decide if the popper will be fixed
1841
- // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
1842
- var isParentFixed = isFixed(reference, container);
1843
- return isParentFixed ? 'fixed' : 'absolute';
1844
- };
1845
-
1860
+ */
1861
+ Popper.prototype._getPosition = function (popper, reference) {
1862
+ var container = getOffsetParent(reference);
1863
+
1864
+ if (this._options.forceAbsolute) {
1865
+ return 'absolute';
1866
+ }
1867
+
1868
+ // Decide if the popper will be fixed
1869
+ // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
1870
+ var isParentFixed = isFixed(reference, container);
1871
+ return isParentFixed ? 'fixed' : 'absolute';
1872
+ };
1873
+
1846
1874
  /**
1847
1875
  * Get offsets to the popper
1848
1876
  * @method
@@ -1851,93 +1879,112 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
1851
1879
  * @param {Element} popper - the popper element
1852
1880
  * @param {Element} reference - the reference element (the popper will be relative to this)
1853
1881
  * @returns {Object} An object containing the offsets which will be applied to the popper
1854
- */
1855
- Popper.prototype._getOffsets = function (popper, reference, placement) {
1856
- placement = placement.split('-')[0];
1857
- var popperOffsets = {};
1858
-
1859
- popperOffsets.position = this.state.position;
1860
- var isParentFixed = popperOffsets.position === 'fixed';
1861
-
1862
- //
1863
- // Get reference element position
1864
- //
1865
- var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
1866
-
1867
- //
1868
- // Get popper sizes
1869
- //
1870
- var popperRect = getOuterSizes(popper);
1871
-
1872
- //
1873
- // Compute offsets of popper
1874
- //
1875
-
1876
- // depending by the popper placement we have to compute its offsets slightly differently
1877
- if (['right', 'left'].indexOf(placement) !== -1) {
1878
- popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
1879
- if (placement === 'left') {
1880
- popperOffsets.left = referenceOffsets.left - popperRect.width;
1881
- } else {
1882
- popperOffsets.left = referenceOffsets.right;
1883
- }
1884
- } else {
1885
- popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
1886
- if (placement === 'top') {
1887
- popperOffsets.top = referenceOffsets.top - popperRect.height;
1888
- } else {
1889
- popperOffsets.top = referenceOffsets.bottom;
1890
- }
1891
- }
1892
-
1893
- // Add width and height to our offsets object
1894
- popperOffsets.width = popperRect.width;
1895
- popperOffsets.height = popperRect.height;
1896
-
1897
- return {
1898
- popper: popperOffsets,
1899
- reference: referenceOffsets
1900
- };
1901
- };
1902
-
1882
+ */
1883
+ Popper.prototype._getOffsets = function (popper, reference, placement) {
1884
+ placement = placement.split('-')[0];
1885
+ var popperOffsets = {};
1886
+
1887
+ popperOffsets.position = this.state.position;
1888
+ var isParentFixed = popperOffsets.position === 'fixed';
1889
+
1890
+ //
1891
+ // Get reference element position
1892
+ //
1893
+ var referenceOffsets = getOffsetRectRelativeToCustomParent(
1894
+ reference,
1895
+ getOffsetParent(popper),
1896
+ isParentFixed
1897
+ );
1898
+
1899
+ //
1900
+ // Get popper sizes
1901
+ //
1902
+ var popperRect = getOuterSizes(popper);
1903
+
1904
+ //
1905
+ // Compute offsets of popper
1906
+ //
1907
+
1908
+ // depending by the popper placement we have to compute its offsets slightly differently
1909
+ if (['right', 'left'].indexOf(placement) !== -1) {
1910
+ popperOffsets.top =
1911
+ referenceOffsets.top +
1912
+ referenceOffsets.height / 2 -
1913
+ popperRect.height / 2;
1914
+ if (placement === 'left') {
1915
+ popperOffsets.left = referenceOffsets.left - popperRect.width;
1916
+ } else {
1917
+ popperOffsets.left = referenceOffsets.right;
1918
+ }
1919
+ } else {
1920
+ popperOffsets.left =
1921
+ referenceOffsets.left +
1922
+ referenceOffsets.width / 2 -
1923
+ popperRect.width / 2;
1924
+ if (placement === 'top') {
1925
+ popperOffsets.top = referenceOffsets.top - popperRect.height;
1926
+ } else {
1927
+ popperOffsets.top = referenceOffsets.bottom;
1928
+ }
1929
+ }
1930
+
1931
+ // Add width and height to our offsets object
1932
+ popperOffsets.width = popperRect.width;
1933
+ popperOffsets.height = popperRect.height;
1934
+
1935
+ return {
1936
+ popper: popperOffsets,
1937
+ reference: referenceOffsets
1938
+ };
1939
+ };
1940
+
1903
1941
  /**
1904
1942
  * Setup needed event listeners used to update the popper position
1905
1943
  * @method
1906
1944
  * @memberof Popper
1907
1945
  * @access private
1908
- */
1909
- Popper.prototype._setupEventListeners = function () {
1910
- // NOTE: 1 DOM access here
1911
- this.state.updateBound = this.update.bind(this);
1912
- root.addEventListener('resize', this.state.updateBound);
1913
- // if the boundariesElement is window we don't need to listen for the scroll event
1914
- if (this._options.boundariesElement !== 'window') {
1915
- var target = getScrollParent(this._reference);
1916
- // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
1917
- if (target === root.document.body || target === root.document.documentElement) {
1918
- target = root;
1919
- }
1920
- target.addEventListener('scroll', this.state.updateBound);
1921
- this.state.scrollTarget = target;
1922
- }
1923
- };
1924
-
1946
+ */
1947
+ Popper.prototype._setupEventListeners = function () {
1948
+ // NOTE: 1 DOM access here
1949
+ this.state.updateBound = this.update.bind(this);
1950
+ root.addEventListener('resize', this.state.updateBound);
1951
+ // if the boundariesElement is window we don't need to listen for the scroll event
1952
+ if (this._options.boundariesElement !== 'window') {
1953
+ var target = getScrollParent(this._reference);
1954
+ // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
1955
+ if (
1956
+ target === root.document.body ||
1957
+ target === root.document.documentElement
1958
+ ) {
1959
+ target = root;
1960
+ }
1961
+ target.addEventListener('scroll', this.state.updateBound);
1962
+ this.state.scrollTarget = target;
1963
+ }
1964
+ };
1965
+
1925
1966
  /**
1926
1967
  * Remove event listeners used to update the popper position
1927
1968
  * @method
1928
1969
  * @memberof Popper
1929
1970
  * @access private
1930
- */
1931
- Popper.prototype._removeEventListeners = function () {
1932
- // NOTE: 1 DOM access here
1933
- root.removeEventListener('resize', this.state.updateBound);
1934
- if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
1935
- this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
1936
- this.state.scrollTarget = null;
1937
- }
1938
- this.state.updateBound = null;
1939
- };
1940
-
1971
+ */
1972
+ Popper.prototype._removeEventListeners = function () {
1973
+ // NOTE: 1 DOM access here
1974
+ root.removeEventListener('resize', this.state.updateBound);
1975
+ if (
1976
+ this._options.boundariesElement !== 'window' &&
1977
+ this.state.scrollTarget
1978
+ ) {
1979
+ this.state.scrollTarget.removeEventListener(
1980
+ 'scroll',
1981
+ this.state.updateBound
1982
+ );
1983
+ this.state.scrollTarget = null;
1984
+ }
1985
+ this.state.updateBound = null;
1986
+ };
1987
+
1941
1988
  /**
1942
1989
  * Computed the boundaries limits and return them
1943
1990
  * @method
@@ -1947,66 +1994,98 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
1947
1994
  * @param {Number} padding - Boundaries padding
1948
1995
  * @param {Element} boundariesElement - Element used to define the boundaries
1949
1996
  * @returns {Object} Coordinates of the boundaries
1950
- */
1951
- Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
1952
- // NOTE: 1 DOM access here
1953
- var boundaries = {};
1954
- var width, height;
1955
- if (boundariesElement === 'window') {
1956
- var body = root.document.body,
1957
- html = root.document.documentElement;
1958
-
1959
- height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
1960
- width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
1961
-
1962
- boundaries = {
1963
- top: 0,
1964
- right: width,
1965
- bottom: height,
1966
- left: 0
1967
- };
1968
- } else if (boundariesElement === 'viewport') {
1969
- var offsetParent = getOffsetParent(this._popper);
1970
- var scrollParent = getScrollParent(this._popper);
1971
- var offsetParentRect = getOffsetRect(offsetParent);
1972
-
1973
- // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
1974
- var getScrollTopValue = function getScrollTopValue(element) {
1975
- return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
1976
- };
1977
- var getScrollLeftValue = function getScrollLeftValue(element) {
1978
- return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
1979
- };
1980
-
1981
- // if the popper is fixed we don't have to substract scrolling from the boundaries
1982
- var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
1983
- var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
1984
-
1985
- boundaries = {
1986
- top: 0 - (offsetParentRect.top - scrollTop),
1987
- right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
1988
- bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
1989
- left: 0 - (offsetParentRect.left - scrollLeft)
1990
- };
1991
- } else {
1992
- if (getOffsetParent(this._popper) === boundariesElement) {
1993
- boundaries = {
1994
- top: 0,
1995
- left: 0,
1996
- right: boundariesElement.clientWidth,
1997
- bottom: boundariesElement.clientHeight
1998
- };
1999
- } else {
2000
- boundaries = getOffsetRect(boundariesElement);
2001
- }
2002
- }
2003
- boundaries.left += padding;
2004
- boundaries.right -= padding;
2005
- boundaries.top = boundaries.top + padding;
2006
- boundaries.bottom = boundaries.bottom - padding;
2007
- return boundaries;
2008
- };
2009
-
1997
+ */
1998
+ Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
1999
+ // NOTE: 1 DOM access here
2000
+ var boundaries = {};
2001
+ var width, height;
2002
+ if (boundariesElement === 'window') {
2003
+ var body = root.document.body,
2004
+ html = root.document.documentElement;
2005
+
2006
+ height = Math.max(
2007
+ body.scrollHeight,
2008
+ body.offsetHeight,
2009
+ html.clientHeight,
2010
+ html.scrollHeight,
2011
+ html.offsetHeight
2012
+ );
2013
+ width = Math.max(
2014
+ body.scrollWidth,
2015
+ body.offsetWidth,
2016
+ html.clientWidth,
2017
+ html.scrollWidth,
2018
+ html.offsetWidth
2019
+ );
2020
+
2021
+ boundaries = {
2022
+ top: 0,
2023
+ right: width,
2024
+ bottom: height,
2025
+ left: 0
2026
+ };
2027
+ } else if (boundariesElement === 'viewport') {
2028
+ var offsetParent = getOffsetParent(this._popper);
2029
+ var scrollParent = getScrollParent(this._popper);
2030
+ var offsetParentRect = getOffsetRect(offsetParent);
2031
+
2032
+ // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
2033
+ var getScrollTopValue = function (element) {
2034
+ return element == document.body
2035
+ ? Math.max(
2036
+ document.documentElement.scrollTop,
2037
+ document.body.scrollTop
2038
+ )
2039
+ : element.scrollTop;
2040
+ };
2041
+ var getScrollLeftValue = function (element) {
2042
+ return element == document.body
2043
+ ? Math.max(
2044
+ document.documentElement.scrollLeft,
2045
+ document.body.scrollLeft
2046
+ )
2047
+ : element.scrollLeft;
2048
+ };
2049
+
2050
+ // if the popper is fixed we don't have to substract scrolling from the boundaries
2051
+ var scrollTop =
2052
+ data.offsets.popper.position === 'fixed'
2053
+ ? 0
2054
+ : getScrollTopValue(scrollParent);
2055
+ var scrollLeft =
2056
+ data.offsets.popper.position === 'fixed'
2057
+ ? 0
2058
+ : getScrollLeftValue(scrollParent);
2059
+
2060
+ boundaries = {
2061
+ top: 0 - (offsetParentRect.top - scrollTop),
2062
+ right:
2063
+ root.document.documentElement.clientWidth -
2064
+ (offsetParentRect.left - scrollLeft),
2065
+ bottom:
2066
+ root.document.documentElement.clientHeight -
2067
+ (offsetParentRect.top - scrollTop),
2068
+ left: 0 - (offsetParentRect.left - scrollLeft)
2069
+ };
2070
+ } else {
2071
+ if (getOffsetParent(this._popper) === boundariesElement) {
2072
+ boundaries = {
2073
+ top: 0,
2074
+ left: 0,
2075
+ right: boundariesElement.clientWidth,
2076
+ bottom: boundariesElement.clientHeight
2077
+ };
2078
+ } else {
2079
+ boundaries = getOffsetRect(boundariesElement);
2080
+ }
2081
+ }
2082
+ boundaries.left += padding;
2083
+ boundaries.right -= padding;
2084
+ boundaries.top = boundaries.top + padding;
2085
+ boundaries.bottom = boundaries.bottom - padding;
2086
+ return boundaries;
2087
+ };
2088
+
2010
2089
  /**
2011
2090
  * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
2012
2091
  * @method
@@ -2015,22 +2094,27 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2015
2094
  * @param {Object} data
2016
2095
  * @param {Array} modifiers
2017
2096
  * @param {Function} ends
2018
- */
2019
- Popper.prototype.runModifiers = function (data, modifiers, ends) {
2020
- var modifiersToRun = modifiers.slice();
2021
- if (ends !== undefined) {
2022
- modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
2023
- }
2024
-
2025
- modifiersToRun.forEach(function (modifier) {
2026
- if (isFunction(modifier)) {
2027
- data = modifier.call(this, data);
2028
- }
2029
- }.bind(this));
2030
-
2031
- return data;
2032
- };
2033
-
2097
+ */
2098
+ Popper.prototype.runModifiers = function (data, modifiers, ends) {
2099
+ var modifiersToRun = modifiers.slice();
2100
+ if (ends !== undefined) {
2101
+ modifiersToRun = this._options.modifiers.slice(
2102
+ 0,
2103
+ getArrayKeyIndex(this._options.modifiers, ends)
2104
+ );
2105
+ }
2106
+
2107
+ modifiersToRun.forEach(
2108
+ function (modifier) {
2109
+ if (isFunction(modifier)) {
2110
+ data = modifier.call(this, data);
2111
+ }
2112
+ }.bind(this)
2113
+ );
2114
+
2115
+ return data;
2116
+ };
2117
+
2034
2118
  /**
2035
2119
  * Helper used to know if the given modifier depends from another one.
2036
2120
  * @method
@@ -2038,191 +2122,204 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2038
2122
  * @param {String} requesting - name of requesting modifier
2039
2123
  * @param {String} requested - name of requested modifier
2040
2124
  * @returns {Boolean}
2041
- */
2042
- Popper.prototype.isModifierRequired = function (requesting, requested) {
2043
- var index = getArrayKeyIndex(this._options.modifiers, requesting);
2044
- return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
2045
- return modifier === requested;
2046
- }).length;
2047
- };
2048
-
2049
- //
2050
- // Modifiers
2051
- //
2052
-
2125
+ */
2126
+ Popper.prototype.isModifierRequired = function (requesting, requested) {
2127
+ var index = getArrayKeyIndex(this._options.modifiers, requesting);
2128
+ return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
2129
+ return modifier === requested;
2130
+ }).length;
2131
+ };
2132
+
2133
+ //
2134
+ // Modifiers
2135
+ //
2136
+
2053
2137
  /**
2054
2138
  * Modifiers list
2055
2139
  * @namespace Popper.modifiers
2056
2140
  * @memberof Popper
2057
2141
  * @type {Object}
2058
- */
2059
- Popper.prototype.modifiers = {};
2060
-
2142
+ */
2143
+ Popper.prototype.modifiers = {};
2144
+
2061
2145
  /**
2062
2146
  * Apply the computed styles to the popper element
2063
2147
  * @method
2064
2148
  * @memberof Popper.modifiers
2065
2149
  * @argument {Object} data - The data object generated by `update` method
2066
2150
  * @returns {Object} The same data object
2067
- */
2068
- Popper.prototype.modifiers.applyStyle = function (data) {
2069
- // apply the final offsets to the popper
2070
- // NOTE: 1 DOM access here
2071
- var styles = {
2072
- position: data.offsets.popper.position
2073
- };
2074
-
2075
- // round top and left to avoid blurry text
2076
- var left = Math.round(data.offsets.popper.left);
2077
- var top = Math.round(data.offsets.popper.top);
2078
-
2079
- // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
2080
- // we automatically use the supported prefixed version if needed
2081
- var prefixedProperty;
2082
- if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
2083
- styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
2084
- styles.top = 0;
2085
- styles.left = 0;
2086
- }
2087
- // othwerise, we use the standard `left` and `top` properties
2088
- else {
2089
- styles.left = left;
2090
- styles.top = top;
2091
- }
2092
-
2093
- // any property present in `data.styles` will be applied to the popper,
2094
- // in this way we can make the 3rd party modifiers add custom styles to it
2095
- // Be aware, modifiers could override the properties defined in the previous
2096
- // lines of this modifier!
2097
- Object.assign(styles, data.styles);
2098
-
2099
- setStyle(this._popper, styles);
2100
-
2101
- // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
2102
- // NOTE: 1 DOM access here
2103
- this._popper.setAttribute('x-placement', data.placement);
2104
-
2105
- // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
2106
- if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
2107
- setStyle(data.arrowElement, data.offsets.arrow);
2108
- }
2109
-
2110
- return data;
2111
- };
2112
-
2151
+ */
2152
+ Popper.prototype.modifiers.applyStyle = function (data) {
2153
+ // apply the final offsets to the popper
2154
+ // NOTE: 1 DOM access here
2155
+ var styles = {
2156
+ position: data.offsets.popper.position
2157
+ };
2158
+
2159
+ // round top and left to avoid blurry text
2160
+ var left = Math.round(data.offsets.popper.left);
2161
+ var top = Math.round(data.offsets.popper.top);
2162
+
2163
+ // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
2164
+ // we automatically use the supported prefixed version if needed
2165
+ var prefixedProperty;
2166
+ if (
2167
+ this._options.gpuAcceleration &&
2168
+ (prefixedProperty = getSupportedPropertyName('transform'))
2169
+ ) {
2170
+ styles[prefixedProperty] =
2171
+ 'translate3d(' + left + 'px, ' + top + 'px, 0)';
2172
+ styles.top = 0;
2173
+ styles.left = 0;
2174
+ }
2175
+ // othwerise, we use the standard `left` and `top` properties
2176
+ else {
2177
+ styles.left = left;
2178
+ styles.top = top;
2179
+ }
2180
+
2181
+ // any property present in `data.styles` will be applied to the popper,
2182
+ // in this way we can make the 3rd party modifiers add custom styles to it
2183
+ // Be aware, modifiers could override the properties defined in the previous
2184
+ // lines of this modifier!
2185
+ Object.assign(styles, data.styles);
2186
+
2187
+ setStyle(this._popper, styles);
2188
+
2189
+ // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
2190
+ // NOTE: 1 DOM access here
2191
+ this._popper.setAttribute('x-placement', data.placement);
2192
+
2193
+ // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
2194
+ if (
2195
+ this.isModifierRequired(
2196
+ this.modifiers.applyStyle,
2197
+ this.modifiers.arrow
2198
+ ) &&
2199
+ data.offsets.arrow
2200
+ ) {
2201
+ setStyle(data.arrowElement, data.offsets.arrow);
2202
+ }
2203
+
2204
+ return data;
2205
+ };
2206
+
2113
2207
  /**
2114
2208
  * Modifier used to shift the popper on the start or end of its reference element side
2115
2209
  * @method
2116
2210
  * @memberof Popper.modifiers
2117
2211
  * @argument {Object} data - The data object generated by `update` method
2118
2212
  * @returns {Object} The data object, properly modified
2119
- */
2120
- Popper.prototype.modifiers.shift = function (data) {
2121
- var placement = data.placement;
2122
- var basePlacement = placement.split('-')[0];
2123
- var shiftVariation = placement.split('-')[1];
2124
-
2125
- // if shift shiftVariation is specified, run the modifier
2126
- if (shiftVariation) {
2127
- var reference = data.offsets.reference;
2128
- var popper = getPopperClientRect(data.offsets.popper);
2129
-
2130
- var shiftOffsets = {
2131
- y: {
2132
- start: { top: reference.top },
2133
- end: { top: reference.top + reference.height - popper.height }
2134
- },
2135
- x: {
2136
- start: { left: reference.left },
2137
- end: { left: reference.left + reference.width - popper.width }
2138
- }
2139
- };
2140
-
2141
- var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
2142
-
2143
- data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
2144
- }
2145
-
2146
- return data;
2147
- };
2148
-
2213
+ */
2214
+ Popper.prototype.modifiers.shift = function (data) {
2215
+ var placement = data.placement;
2216
+ var basePlacement = placement.split('-')[0];
2217
+ var shiftVariation = placement.split('-')[1];
2218
+
2219
+ // if shift shiftVariation is specified, run the modifier
2220
+ if (shiftVariation) {
2221
+ var reference = data.offsets.reference;
2222
+ var popper = getPopperClientRect(data.offsets.popper);
2223
+
2224
+ var shiftOffsets = {
2225
+ y: {
2226
+ start: { top: reference.top },
2227
+ end: { top: reference.top + reference.height - popper.height }
2228
+ },
2229
+ x: {
2230
+ start: { left: reference.left },
2231
+ end: { left: reference.left + reference.width - popper.width }
2232
+ }
2233
+ };
2234
+
2235
+ var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
2236
+
2237
+ data.offsets.popper = Object.assign(
2238
+ popper,
2239
+ shiftOffsets[axis][shiftVariation]
2240
+ );
2241
+ }
2242
+
2243
+ return data;
2244
+ };
2245
+
2149
2246
  /**
2150
2247
  * Modifier used to make sure the popper does not overflows from it's boundaries
2151
2248
  * @method
2152
2249
  * @memberof Popper.modifiers
2153
2250
  * @argument {Object} data - The data object generated by `update` method
2154
2251
  * @returns {Object} The data object, properly modified
2155
- */
2156
- Popper.prototype.modifiers.preventOverflow = function (data) {
2157
- var order = this._options.preventOverflowOrder;
2158
- var popper = getPopperClientRect(data.offsets.popper);
2159
-
2160
- var check = {
2161
- left: function left() {
2162
- var left = popper.left;
2163
- if (popper.left < data.boundaries.left) {
2164
- left = Math.max(popper.left, data.boundaries.left);
2165
- }
2166
- return { left: left };
2167
- },
2168
- right: function right() {
2169
- var left = popper.left;
2170
- if (popper.right > data.boundaries.right) {
2171
- left = Math.min(popper.left, data.boundaries.right - popper.width);
2172
- }
2173
- return { left: left };
2174
- },
2175
- top: function top() {
2176
- var top = popper.top;
2177
- if (popper.top < data.boundaries.top) {
2178
- top = Math.max(popper.top, data.boundaries.top);
2179
- }
2180
- return { top: top };
2181
- },
2182
- bottom: function bottom() {
2183
- var top = popper.top;
2184
- if (popper.bottom > data.boundaries.bottom) {
2185
- top = Math.min(popper.top, data.boundaries.bottom - popper.height);
2186
- }
2187
- return { top: top };
2188
- }
2189
- };
2190
-
2191
- order.forEach(function (direction) {
2192
- data.offsets.popper = Object.assign(popper, check[direction]());
2193
- });
2194
-
2195
- return data;
2196
- };
2197
-
2252
+ */
2253
+ Popper.prototype.modifiers.preventOverflow = function (data) {
2254
+ var order = this._options.preventOverflowOrder;
2255
+ var popper = getPopperClientRect(data.offsets.popper);
2256
+
2257
+ var check = {
2258
+ left: function () {
2259
+ var left = popper.left;
2260
+ if (popper.left < data.boundaries.left) {
2261
+ left = Math.max(popper.left, data.boundaries.left);
2262
+ }
2263
+ return { left: left };
2264
+ },
2265
+ right: function () {
2266
+ var left = popper.left;
2267
+ if (popper.right > data.boundaries.right) {
2268
+ left = Math.min(popper.left, data.boundaries.right - popper.width);
2269
+ }
2270
+ return { left: left };
2271
+ },
2272
+ top: function () {
2273
+ var top = popper.top;
2274
+ if (popper.top < data.boundaries.top) {
2275
+ top = Math.max(popper.top, data.boundaries.top);
2276
+ }
2277
+ return { top: top };
2278
+ },
2279
+ bottom: function () {
2280
+ var top = popper.top;
2281
+ if (popper.bottom > data.boundaries.bottom) {
2282
+ top = Math.min(popper.top, data.boundaries.bottom - popper.height);
2283
+ }
2284
+ return { top: top };
2285
+ }
2286
+ };
2287
+
2288
+ order.forEach(function (direction) {
2289
+ data.offsets.popper = Object.assign(popper, check[direction]());
2290
+ });
2291
+
2292
+ return data;
2293
+ };
2294
+
2198
2295
  /**
2199
2296
  * Modifier used to make sure the popper is always near its reference
2200
2297
  * @method
2201
2298
  * @memberof Popper.modifiers
2202
2299
  * @argument {Object} data - The data object generated by _update method
2203
2300
  * @returns {Object} The data object, properly modified
2204
- */
2205
- Popper.prototype.modifiers.keepTogether = function (data) {
2206
- var popper = getPopperClientRect(data.offsets.popper);
2207
- var reference = data.offsets.reference;
2208
- var f = Math.floor;
2209
-
2210
- if (popper.right < f(reference.left)) {
2211
- data.offsets.popper.left = f(reference.left) - popper.width;
2212
- }
2213
- if (popper.left > f(reference.right)) {
2214
- data.offsets.popper.left = f(reference.right);
2215
- }
2216
- if (popper.bottom < f(reference.top)) {
2217
- data.offsets.popper.top = f(reference.top) - popper.height;
2218
- }
2219
- if (popper.top > f(reference.bottom)) {
2220
- data.offsets.popper.top = f(reference.bottom);
2221
- }
2222
-
2223
- return data;
2224
- };
2225
-
2301
+ */
2302
+ Popper.prototype.modifiers.keepTogether = function (data) {
2303
+ var popper = getPopperClientRect(data.offsets.popper);
2304
+ var reference = data.offsets.reference;
2305
+ var f = Math.floor;
2306
+
2307
+ if (popper.right < f(reference.left)) {
2308
+ data.offsets.popper.left = f(reference.left) - popper.width;
2309
+ }
2310
+ if (popper.left > f(reference.right)) {
2311
+ data.offsets.popper.left = f(reference.right);
2312
+ }
2313
+ if (popper.bottom < f(reference.top)) {
2314
+ data.offsets.popper.top = f(reference.top) - popper.height;
2315
+ }
2316
+ if (popper.top > f(reference.bottom)) {
2317
+ data.offsets.popper.top = f(reference.bottom);
2318
+ }
2319
+
2320
+ return data;
2321
+ };
2322
+
2226
2323
  /**
2227
2324
  * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
2228
2325
  * Requires the `preventOverflow` modifier before it in order to work.
@@ -2231,61 +2328,81 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2231
2328
  * @memberof Popper.modifiers
2232
2329
  * @argument {Object} data - The data object generated by _update method
2233
2330
  * @returns {Object} The data object, properly modified
2234
- */
2235
- Popper.prototype.modifiers.flip = function (data) {
2236
- // check if preventOverflow is in the list of modifiers before the flip modifier.
2237
- // otherwise flip would not work as expected.
2238
- if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
2239
- console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
2240
- return data;
2241
- }
2242
-
2243
- if (data.flipped && data.placement === data._originalPlacement) {
2244
- // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
2245
- return data;
2246
- }
2247
-
2248
- var placement = data.placement.split('-')[0];
2249
- var placementOpposite = getOppositePlacement(placement);
2250
- var variation = data.placement.split('-')[1] || '';
2251
-
2252
- var flipOrder = [];
2253
- if (this._options.flipBehavior === 'flip') {
2254
- flipOrder = [placement, placementOpposite];
2255
- } else {
2256
- flipOrder = this._options.flipBehavior;
2257
- }
2258
-
2259
- flipOrder.forEach(function (step, index) {
2260
- if (placement !== step || flipOrder.length === index + 1) {
2261
- return;
2262
- }
2263
-
2264
- placement = data.placement.split('-')[0];
2265
- placementOpposite = getOppositePlacement(placement);
2266
-
2267
- var popperOffsets = getPopperClientRect(data.offsets.popper);
2268
-
2269
- // this boolean is used to distinguish right and bottom from top and left
2270
- // they need different computations to get flipped
2271
- var a = ['right', 'bottom'].indexOf(placement) !== -1;
2272
-
2273
- // using Math.floor because the reference offsets may contain decimals we are not going to consider here
2274
- if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
2275
- // we'll use this boolean to detect any flip loop
2276
- data.flipped = true;
2277
- data.placement = flipOrder[index + 1];
2278
- if (variation) {
2279
- data.placement += '-' + variation;
2280
- }
2281
- data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
2282
-
2283
- data = this.runModifiers(data, this._options.modifiers, this._flip);
2284
- }
2285
- }.bind(this));
2286
- return data;
2287
- };
2288
-
2331
+ */
2332
+ Popper.prototype.modifiers.flip = function (data) {
2333
+ // check if preventOverflow is in the list of modifiers before the flip modifier.
2334
+ // otherwise flip would not work as expected.
2335
+ if (
2336
+ !this.isModifierRequired(
2337
+ this.modifiers.flip,
2338
+ this.modifiers.preventOverflow
2339
+ )
2340
+ ) {
2341
+ console.warn(
2342
+ 'WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!'
2343
+ );
2344
+ return data;
2345
+ }
2346
+
2347
+ if (data.flipped && data.placement === data._originalPlacement) {
2348
+ // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
2349
+ return data;
2350
+ }
2351
+
2352
+ var placement = data.placement.split('-')[0];
2353
+ var placementOpposite = getOppositePlacement(placement);
2354
+ var variation = data.placement.split('-')[1] || '';
2355
+
2356
+ var flipOrder = [];
2357
+ if (this._options.flipBehavior === 'flip') {
2358
+ flipOrder = [placement, placementOpposite];
2359
+ } else {
2360
+ flipOrder = this._options.flipBehavior;
2361
+ }
2362
+
2363
+ flipOrder.forEach(
2364
+ function (step, index) {
2365
+ if (placement !== step || flipOrder.length === index + 1) {
2366
+ return;
2367
+ }
2368
+
2369
+ placement = data.placement.split('-')[0];
2370
+ placementOpposite = getOppositePlacement(placement);
2371
+
2372
+ var popperOffsets = getPopperClientRect(data.offsets.popper);
2373
+
2374
+ // this boolean is used to distinguish right and bottom from top and left
2375
+ // they need different computations to get flipped
2376
+ var a = ['right', 'bottom'].indexOf(placement) !== -1;
2377
+
2378
+ // using Math.floor because the reference offsets may contain decimals we are not going to consider here
2379
+ if (
2380
+ (a &&
2381
+ Math.floor(data.offsets.reference[placement]) >
2382
+ Math.floor(popperOffsets[placementOpposite])) ||
2383
+ (!a &&
2384
+ Math.floor(data.offsets.reference[placement]) <
2385
+ Math.floor(popperOffsets[placementOpposite]))
2386
+ ) {
2387
+ // we'll use this boolean to detect any flip loop
2388
+ data.flipped = true;
2389
+ data.placement = flipOrder[index + 1];
2390
+ if (variation) {
2391
+ data.placement += '-' + variation;
2392
+ }
2393
+ data.offsets.popper = this._getOffsets(
2394
+ this._popper,
2395
+ this._reference,
2396
+ data.placement
2397
+ ).popper;
2398
+
2399
+ data = this.runModifiers(data, this._options.modifiers, this._flip);
2400
+ }
2401
+ }.bind(this)
2402
+ );
2403
+ return data;
2404
+ };
2405
+
2289
2406
  /**
2290
2407
  * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
2291
2408
  * The offsets will shift the popper on the side of its reference element.
@@ -2293,23 +2410,23 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2293
2410
  * @memberof Popper.modifiers
2294
2411
  * @argument {Object} data - The data object generated by _update method
2295
2412
  * @returns {Object} The data object, properly modified
2296
- */
2297
- Popper.prototype.modifiers.offset = function (data) {
2298
- var offset = this._options.offset;
2299
- var popper = data.offsets.popper;
2300
-
2301
- if (data.placement.indexOf('left') !== -1) {
2302
- popper.top -= offset;
2303
- } else if (data.placement.indexOf('right') !== -1) {
2304
- popper.top += offset;
2305
- } else if (data.placement.indexOf('top') !== -1) {
2306
- popper.left -= offset;
2307
- } else if (data.placement.indexOf('bottom') !== -1) {
2308
- popper.left += offset;
2309
- }
2310
- return data;
2311
- };
2312
-
2413
+ */
2414
+ Popper.prototype.modifiers.offset = function (data) {
2415
+ var offset = this._options.offset;
2416
+ var popper = data.offsets.popper;
2417
+
2418
+ if (data.placement.indexOf('left') !== -1) {
2419
+ popper.top -= offset;
2420
+ } else if (data.placement.indexOf('right') !== -1) {
2421
+ popper.top += offset;
2422
+ } else if (data.placement.indexOf('top') !== -1) {
2423
+ popper.left -= offset;
2424
+ } else if (data.placement.indexOf('bottom') !== -1) {
2425
+ popper.left += offset;
2426
+ }
2427
+ return data;
2428
+ };
2429
+
2313
2430
  /**
2314
2431
  * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
2315
2432
  * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
@@ -2317,136 +2434,147 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2317
2434
  * @memberof Popper.modifiers
2318
2435
  * @argument {Object} data - The data object generated by _update method
2319
2436
  * @returns {Object} The data object, properly modified
2320
- */
2321
- Popper.prototype.modifiers.arrow = function (data) {
2322
- var arrow = this._options.arrowElement;
2323
- var arrowOffset = this._options.arrowOffset;
2324
-
2325
- // if the arrowElement is a string, suppose it's a CSS selector
2326
- if (typeof arrow === 'string') {
2327
- arrow = this._popper.querySelector(arrow);
2328
- }
2329
-
2330
- // if arrow element is not found, don't run the modifier
2331
- if (!arrow) {
2332
- return data;
2333
- }
2334
-
2335
- // the arrow element must be child of its popper
2336
- if (!this._popper.contains(arrow)) {
2337
- console.warn('WARNING: `arrowElement` must be child of its popper element!');
2338
- return data;
2339
- }
2340
-
2341
- // arrow depends on keepTogether in order to work
2342
- if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
2343
- console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
2344
- return data;
2345
- }
2346
-
2347
- var arrowStyle = {};
2348
- var placement = data.placement.split('-')[0];
2349
- var popper = getPopperClientRect(data.offsets.popper);
2350
- var reference = data.offsets.reference;
2351
- var isVertical = ['left', 'right'].indexOf(placement) !== -1;
2352
-
2353
- var len = isVertical ? 'height' : 'width';
2354
- var side = isVertical ? 'top' : 'left';
2355
- var translate = isVertical ? 'translateY' : 'translateX';
2356
- var altSide = isVertical ? 'left' : 'top';
2357
- var opSide = isVertical ? 'bottom' : 'right';
2358
- var arrowSize = getOuterSizes(arrow)[len];
2359
-
2360
- //
2361
- // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
2362
- //
2363
-
2364
- // top/left side
2365
- if (reference[opSide] - arrowSize < popper[side]) {
2366
- data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
2367
- }
2368
- // bottom/right side
2369
- if (reference[side] + arrowSize > popper[opSide]) {
2370
- data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
2371
- }
2372
-
2373
- // compute center of the popper
2374
- var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
2375
-
2376
- var sideValue = center - popper[side];
2377
-
2378
- // prevent arrow from being placed not contiguously to its popper
2379
- sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
2380
- arrowStyle[side] = sideValue;
2381
- arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
2382
-
2383
- data.offsets.arrow = arrowStyle;
2384
- data.arrowElement = arrow;
2385
-
2386
- return data;
2387
- };
2388
-
2389
- //
2390
- // Helpers
2391
- //
2392
-
2437
+ */
2438
+ Popper.prototype.modifiers.arrow = function (data) {
2439
+ var arrow = this._options.arrowElement;
2440
+ var arrowOffset = this._options.arrowOffset;
2441
+
2442
+ // if the arrowElement is a string, suppose it's a CSS selector
2443
+ if (typeof arrow === 'string') {
2444
+ arrow = this._popper.querySelector(arrow);
2445
+ }
2446
+
2447
+ // if arrow element is not found, don't run the modifier
2448
+ if (!arrow) {
2449
+ return data;
2450
+ }
2451
+
2452
+ // the arrow element must be child of its popper
2453
+ if (!this._popper.contains(arrow)) {
2454
+ console.warn(
2455
+ 'WARNING: `arrowElement` must be child of its popper element!'
2456
+ );
2457
+ return data;
2458
+ }
2459
+
2460
+ // arrow depends on keepTogether in order to work
2461
+ if (
2462
+ !this.isModifierRequired(
2463
+ this.modifiers.arrow,
2464
+ this.modifiers.keepTogether
2465
+ )
2466
+ ) {
2467
+ console.warn(
2468
+ 'WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!'
2469
+ );
2470
+ return data;
2471
+ }
2472
+
2473
+ var arrowStyle = {};
2474
+ var placement = data.placement.split('-')[0];
2475
+ var popper = getPopperClientRect(data.offsets.popper);
2476
+ var reference = data.offsets.reference;
2477
+ var isVertical = ['left', 'right'].indexOf(placement) !== -1;
2478
+
2479
+ var len = isVertical ? 'height' : 'width';
2480
+ var side = isVertical ? 'top' : 'left';
2481
+ var translate = isVertical ? 'translateY' : 'translateX';
2482
+ var altSide = isVertical ? 'left' : 'top';
2483
+ var opSide = isVertical ? 'bottom' : 'right';
2484
+ var arrowSize = getOuterSizes(arrow)[len];
2485
+
2486
+ //
2487
+ // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
2488
+ //
2489
+
2490
+ // top/left side
2491
+ if (reference[opSide] - arrowSize < popper[side]) {
2492
+ data.offsets.popper[side] -=
2493
+ popper[side] - (reference[opSide] - arrowSize);
2494
+ }
2495
+ // bottom/right side
2496
+ if (reference[side] + arrowSize > popper[opSide]) {
2497
+ data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
2498
+ }
2499
+
2500
+ // compute center of the popper
2501
+ var center =
2502
+ reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
2503
+
2504
+ var sideValue = center - popper[side];
2505
+
2506
+ // prevent arrow from being placed not contiguously to its popper
2507
+ sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
2508
+ arrowStyle[side] = sideValue;
2509
+ arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
2510
+
2511
+ data.offsets.arrow = arrowStyle;
2512
+ data.arrowElement = arrow;
2513
+
2514
+ return data;
2515
+ };
2516
+
2517
+ //
2518
+ // Helpers
2519
+ //
2520
+
2393
2521
  /**
2394
2522
  * Get the outer sizes of the given element (offset size + margins)
2395
2523
  * @function
2396
2524
  * @ignore
2397
2525
  * @argument {Element} element
2398
2526
  * @returns {Object} object containing width and height properties
2399
- */
2400
- function getOuterSizes(element) {
2401
- // NOTE: 1 DOM access here
2402
- var _display = element.style.display,
2403
- _visibility = element.style.visibility;
2404
- element.style.display = 'block';
2405
- element.style.visibility = 'hidden';
2406
- var calcWidthToForceRepaint = element.offsetWidth;
2407
- // original method
2408
- var styles = root.getComputedStyle(element);
2409
- var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
2410
- var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
2411
- var result = {
2412
- width: element.offsetWidth + y,
2413
- height: element.offsetHeight + x
2414
- };
2415
-
2416
- // reset element styles
2417
- element.style.display = _display;
2418
- element.style.visibility = _visibility;
2419
- return result;
2420
- }
2421
-
2527
+ */
2528
+ function getOuterSizes(element) {
2529
+ // NOTE: 1 DOM access here
2530
+ var _display = element.style.display,
2531
+ _visibility = element.style.visibility;
2532
+ element.style.display = 'block';
2533
+ element.style.visibility = 'hidden';
2534
+ var calcWidthToForceRepaint = element.offsetWidth;
2535
+ // original method
2536
+ var styles = root.getComputedStyle(element);
2537
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
2538
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
2539
+ var result = {
2540
+ width: element.offsetWidth + y,
2541
+ height: element.offsetHeight + x
2542
+ };
2543
+
2544
+ // reset element styles
2545
+ element.style.display = _display;
2546
+ element.style.visibility = _visibility;
2547
+ return result;
2548
+ }
2549
+
2422
2550
  /**
2423
2551
  * Get the opposite placement of the given one/
2424
2552
  * @function
2425
2553
  * @ignore
2426
2554
  * @argument {String} placement
2427
2555
  * @returns {String} flipped placement
2428
- */
2429
- function getOppositePlacement(placement) {
2430
- var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
2431
- return placement.replace(/left|right|bottom|top/g, function (matched) {
2432
- return hash[matched];
2433
- });
2434
- }
2435
-
2556
+ */
2557
+ function getOppositePlacement(placement) {
2558
+ var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
2559
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
2560
+ return hash[matched];
2561
+ });
2562
+ }
2563
+
2436
2564
  /**
2437
2565
  * Given the popper offsets, generate an output similar to getBoundingClientRect
2438
2566
  * @function
2439
2567
  * @ignore
2440
2568
  * @argument {Object} popperOffsets
2441
2569
  * @returns {Object} ClientRect like output
2442
- */
2443
- function getPopperClientRect(popperOffsets) {
2444
- var offsets = Object.assign({}, popperOffsets);
2445
- offsets.right = offsets.left + offsets.width;
2446
- offsets.bottom = offsets.top + offsets.height;
2447
- return offsets;
2448
- }
2449
-
2570
+ */
2571
+ function getPopperClientRect(popperOffsets) {
2572
+ var offsets = Object.assign({}, popperOffsets);
2573
+ offsets.right = offsets.left + offsets.width;
2574
+ offsets.bottom = offsets.top + offsets.height;
2575
+ return offsets;
2576
+ }
2577
+
2450
2578
  /**
2451
2579
  * Given an array and the key to find, returns its index
2452
2580
  * @function
@@ -2454,76 +2582,88 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2454
2582
  * @argument {Array} arr
2455
2583
  * @argument keyToFind
2456
2584
  * @returns index or null
2457
- */
2458
- function getArrayKeyIndex(arr, keyToFind) {
2459
- var i = 0,
2460
- key;
2461
- for (key in arr) {
2462
- if (arr[key] === keyToFind) {
2463
- return i;
2464
- }
2465
- i++;
2466
- }
2467
- return null;
2468
- }
2469
-
2585
+ */
2586
+ function getArrayKeyIndex(arr, keyToFind) {
2587
+ var i = 0,
2588
+ key;
2589
+ for (key in arr) {
2590
+ if (arr[key] === keyToFind) {
2591
+ return i;
2592
+ }
2593
+ i++;
2594
+ }
2595
+ return null;
2596
+ }
2597
+
2470
2598
  /**
2471
2599
  * Get CSS computed property of the given element
2472
2600
  * @function
2473
2601
  * @ignore
2474
2602
  * @argument {Eement} element
2475
2603
  * @argument {String} property
2476
- */
2477
- function getStyleComputedProperty(element, property) {
2478
- // NOTE: 1 DOM access here
2479
- var css = root.getComputedStyle(element, null);
2480
- return css[property];
2481
- }
2604
+ */
2605
+ function getStyleComputedProperty(element, property) {
2606
+ // NOTE: 1 DOM access here
2607
+ var css = root.getComputedStyle(element, null);
2608
+ return css[property];
2609
+ }
2482
2610
  /**
2483
2611
  * Returns the offset parent of the given element
2484
2612
  * @function
2485
2613
  * @ignore
2486
2614
  * @argument {Element} element
2487
2615
  * @returns {Element} offset parent
2488
- */
2489
- function getOffsetParent(element) {
2490
- var offsetParent = element.offsetParent;
2491
- return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
2492
- }
2493
-
2616
+ */
2617
+ function getOffsetParent(element) {
2618
+ var offsetParent = element.offsetParent;
2619
+ return offsetParent === root.document.body || !offsetParent
2620
+ ? root.document.documentElement
2621
+ : offsetParent;
2622
+ }
2623
+
2494
2624
  /**
2495
2625
  * Returns the scrolling parent of the given element
2496
2626
  * @function
2497
2627
  * @ignore
2498
2628
  * @argument {Element} element
2499
2629
  * @returns {Element} offset parent
2500
- */
2501
- function getScrollParent(element) {
2502
- var parent = element.parentNode;
2503
- if (!parent || parent.nodeType !== 1) {
2504
- return element;
2505
- }
2506
-
2507
- if (parent === root.document) {
2508
- // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
2509
- // greater than 0 and return the proper element
2510
- if (root.document.body.scrollTop || root.document.body.scrollLeft) {
2511
- return root.document.body;
2512
- } else {
2513
- return root.document.documentElement;
2514
- }
2515
- }
2516
-
2517
- // Firefox want us to check `-x` and `-y` variations as well
2518
- if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
2519
- // If the detected scrollParent is body, we perform an additional check on its parentNode
2520
- // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
2521
- // fixes issue #65
2522
- return parent;
2523
- }
2524
- return getScrollParent(element.parentNode);
2525
- }
2526
-
2630
+ */
2631
+ function getScrollParent(element) {
2632
+ var parent = element.parentNode;
2633
+ if (!parent || parent.nodeType !== 1) {
2634
+ return element;
2635
+ }
2636
+
2637
+ if (parent === root.document) {
2638
+ // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
2639
+ // greater than 0 and return the proper element
2640
+ if (root.document.body.scrollTop || root.document.body.scrollLeft) {
2641
+ return root.document.body;
2642
+ } else {
2643
+ return root.document.documentElement;
2644
+ }
2645
+ }
2646
+
2647
+ // Firefox want us to check `-x` and `-y` variations as well
2648
+ if (
2649
+ ['scroll', 'auto'].indexOf(
2650
+ getStyleComputedProperty(parent, 'overflow')
2651
+ ) !== -1 ||
2652
+ ['scroll', 'auto'].indexOf(
2653
+ getStyleComputedProperty(parent, 'overflow-x')
2654
+ ) !== -1 ||
2655
+ ['scroll', 'auto'].indexOf(
2656
+ getStyleComputedProperty(parent, 'overflow-y')
2657
+ ) !== -1
2658
+ ) {
2659
+ // If the detected scrollParent is body, we perform an additional check on its parentNode
2660
+ // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
2661
+ // fixes issue #65
2662
+ return parent;
2663
+ }
2664
+ return getScrollParent(element.parentNode);
2665
+ }
2666
+
2527
2667
  /**
2528
2668
  * Check if the given element is fixed or is inside a fixed parent
2529
2669
  * @function
@@ -2531,109 +2671,122 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2531
2671
  * @argument {Element} element
2532
2672
  * @argument {Element} customContainer
2533
2673
  * @returns {Boolean} answer to "isFixed?"
2534
- */
2535
- function isFixed(element) {
2536
- if (element === root.document.body) {
2537
- return false;
2538
- }
2539
- if (getStyleComputedProperty(element, 'position') === 'fixed') {
2540
- return true;
2541
- }
2542
- return element.parentNode && element.parentNode.nodeType === 1 ? isFixed(element.parentNode) : element;
2543
- }
2544
-
2674
+ */
2675
+ function isFixed(element) {
2676
+ if (element === root.document.body) {
2677
+ return false;
2678
+ }
2679
+ if (getStyleComputedProperty(element, 'position') === 'fixed') {
2680
+ return true;
2681
+ }
2682
+ return element.parentNode && element.parentNode.nodeType === 1
2683
+ ? isFixed(element.parentNode)
2684
+ : element;
2685
+ }
2686
+
2545
2687
  /**
2546
2688
  * Set the style to the given popper
2547
2689
  * @function
2548
2690
  * @ignore
2549
2691
  * @argument {Element} element - Element to apply the style to
2550
2692
  * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
2551
- */
2552
- function setStyle(element, styles) {
2553
- function is_numeric(n) {
2554
- return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2555
- }
2556
- Object.keys(styles).forEach(function (prop) {
2557
- var unit = '';
2558
- // add unit if the value is numeric and is one of the following
2559
- if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
2560
- unit = 'px';
2561
- }
2562
- element.style[prop] = styles[prop] + unit;
2563
- });
2564
- }
2565
-
2693
+ */
2694
+ function setStyle(element, styles) {
2695
+ function is_numeric(n) {
2696
+ return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2697
+ }
2698
+ Object.keys(styles).forEach(function (prop) {
2699
+ var unit = '';
2700
+ // add unit if the value is numeric and is one of the following
2701
+ if (
2702
+ ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==
2703
+ -1 &&
2704
+ is_numeric(styles[prop])
2705
+ ) {
2706
+ unit = 'px';
2707
+ }
2708
+ element.style[prop] = styles[prop] + unit;
2709
+ });
2710
+ }
2711
+
2566
2712
  /**
2567
2713
  * Check if the given variable is a function
2568
2714
  * @function
2569
2715
  * @ignore
2570
2716
  * @argument {*} functionToCheck - variable to check
2571
2717
  * @returns {Boolean} answer to: is a function?
2572
- */
2573
- function isFunction(functionToCheck) {
2574
- var getType = {};
2575
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
2576
- }
2577
-
2718
+ */
2719
+ function isFunction(functionToCheck) {
2720
+ var getType = {};
2721
+ return (
2722
+ functionToCheck &&
2723
+ getType.toString.call(functionToCheck) === '[object Function]'
2724
+ );
2725
+ }
2726
+
2578
2727
  /**
2579
2728
  * Get the position of the given element, relative to its offset parent
2580
2729
  * @function
2581
2730
  * @ignore
2582
2731
  * @param {Element} element
2583
2732
  * @return {Object} position - Coordinates of the element and its `scrollTop`
2584
- */
2585
- function getOffsetRect(element) {
2586
- var transform = getStyle(element, 'transform').replace(/[^0-9\-,]/g, '').split(',');
2587
- var elementRect = {
2588
- width: element.offsetWidth,
2589
- height: element.offsetHeight,
2590
- left: element.offsetLeft + (transform[4] ? parseInt(transform[4], 10) : 0),
2591
- top: element.offsetTop + (transform[5] ? parseInt(transform[5], 10) : 0)
2592
- };
2593
-
2594
- elementRect.right = elementRect.left + elementRect.width;
2595
- elementRect.bottom = elementRect.top + elementRect.height;
2596
-
2597
- // position
2598
- return elementRect;
2599
- }
2600
-
2733
+ */
2734
+ function getOffsetRect(element) {
2735
+ var transform = getStyle(element, 'transform')
2736
+ .replace(/[^0-9\-,]/g, '')
2737
+ .split(',');
2738
+ var elementRect = {
2739
+ width: element.offsetWidth,
2740
+ height: element.offsetHeight,
2741
+ left:
2742
+ element.offsetLeft + (transform[4] ? parseInt(transform[4], 10) : 0),
2743
+ top: element.offsetTop + (transform[5] ? parseInt(transform[5], 10) : 0)
2744
+ };
2745
+
2746
+ elementRect.right = elementRect.left + elementRect.width;
2747
+ elementRect.bottom = elementRect.top + elementRect.height;
2748
+
2749
+ // position
2750
+ return elementRect;
2751
+ }
2752
+
2601
2753
  /**
2602
2754
  * Get bounding client rect of given element
2603
2755
  * @function
2604
2756
  * @ignore
2605
2757
  * @param {HTMLElement} element
2606
2758
  * @return {Object} client rect
2607
- */
2608
- function getBoundingClientRect(element) {
2609
- var rect = element.getBoundingClientRect();
2610
-
2611
- // whether the IE version is lower than 11
2612
- var isIE = /MSIE|Trident/.test(navigator.userAgent);
2613
-
2614
- // fix ie document bounding top always 0 bug
2615
- var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
2616
-
2617
- return {
2618
- left: rect.left,
2619
- top: rectTop,
2620
- right: rect.right,
2621
- bottom: rect.bottom,
2622
- width: rect.right - rect.left,
2623
- height: rect.bottom - rectTop
2624
- };
2625
- }
2626
-
2627
- function getStyle(dom, attr) {
2628
- if (dom.style[attr]) {
2629
- return dom.style[attr];
2630
- }
2631
- if (window.getComputedStyle) {
2632
- return getComputedStyle(dom, null)[attr];
2633
- }
2634
- return dom.currentStyle[attr];
2635
- }
2636
-
2759
+ */
2760
+ function getBoundingClientRect(element) {
2761
+ var rect = element.getBoundingClientRect();
2762
+
2763
+ // whether the IE version is lower than 11
2764
+ var isIE = /MSIE|Trident/.test(navigator.userAgent);
2765
+
2766
+ // fix ie document bounding top always 0 bug
2767
+ var rectTop =
2768
+ isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
2769
+
2770
+ return {
2771
+ left: rect.left,
2772
+ top: rectTop,
2773
+ right: rect.right,
2774
+ bottom: rect.bottom,
2775
+ width: rect.right - rect.left,
2776
+ height: rect.bottom - rectTop
2777
+ };
2778
+ }
2779
+
2780
+ function getStyle(dom, attr) {
2781
+ if (dom.style[attr]) {
2782
+ return dom.style[attr];
2783
+ }
2784
+ if (window.getComputedStyle) {
2785
+ return getComputedStyle(dom, null)[attr];
2786
+ }
2787
+ return dom.currentStyle[attr];
2788
+ }
2789
+
2637
2790
  /**
2638
2791
  * Given an element and one of its parents, return the offset
2639
2792
  * @function
@@ -2641,49 +2794,51 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2641
2794
  * @param {HTMLElement} element
2642
2795
  * @param {HTMLElement} parent
2643
2796
  * @return {Object} rect
2644
- */
2645
- function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
2646
- var elementRect = getBoundingClientRect(element);
2647
- var parentRect = getBoundingClientRect(parent);
2648
-
2649
- if (fixed) {
2650
- var scrollParent = getScrollParent(parent);
2651
- parentRect.top += scrollParent.scrollTop;
2652
- parentRect.bottom += scrollParent.scrollTop;
2653
- parentRect.left += scrollParent.scrollLeft;
2654
- parentRect.right += scrollParent.scrollLeft;
2655
- }
2656
-
2657
- var rect = {
2658
- top: elementRect.top - parentRect.top,
2659
- left: elementRect.left - parentRect.left,
2660
- bottom: elementRect.top - parentRect.top + elementRect.height,
2661
- right: elementRect.left - parentRect.left + elementRect.width,
2662
- width: elementRect.width,
2663
- height: elementRect.height
2664
- };
2665
- return rect;
2666
- }
2667
-
2797
+ */
2798
+ function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
2799
+ var elementRect = getBoundingClientRect(element);
2800
+ var parentRect = getBoundingClientRect(parent);
2801
+
2802
+ if (fixed) {
2803
+ var scrollParent = getScrollParent(parent);
2804
+ parentRect.top += scrollParent.scrollTop;
2805
+ parentRect.bottom += scrollParent.scrollTop;
2806
+ parentRect.left += scrollParent.scrollLeft;
2807
+ parentRect.right += scrollParent.scrollLeft;
2808
+ }
2809
+
2810
+ var rect = {
2811
+ top: elementRect.top - parentRect.top,
2812
+ left: elementRect.left - parentRect.left,
2813
+ bottom: elementRect.top - parentRect.top + elementRect.height,
2814
+ right: elementRect.left - parentRect.left + elementRect.width,
2815
+ width: elementRect.width,
2816
+ height: elementRect.height
2817
+ };
2818
+ return rect;
2819
+ }
2820
+
2668
2821
  /**
2669
2822
  * Get the prefixed supported property name
2670
2823
  * @function
2671
2824
  * @ignore
2672
2825
  * @argument {String} property (camelCase)
2673
2826
  * @returns {String} prefixed property (camelCase)
2674
- */
2675
- function getSupportedPropertyName(property) {
2676
- var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
2677
-
2678
- for (var i = 0; i < prefixes.length; i++) {
2679
- var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
2680
- if (typeof root.document.body.style[toCheck] !== 'undefined') {
2681
- return toCheck;
2682
- }
2683
- }
2684
- return null;
2685
- }
2686
-
2827
+ */
2828
+ function getSupportedPropertyName(property) {
2829
+ var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
2830
+
2831
+ for (var i = 0; i < prefixes.length; i++) {
2832
+ var toCheck = prefixes[i]
2833
+ ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1)
2834
+ : property;
2835
+ if (typeof root.document.body.style[toCheck] !== 'undefined') {
2836
+ return toCheck;
2837
+ }
2838
+ }
2839
+ return null;
2840
+ }
2841
+
2687
2842
  /**
2688
2843
  * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
2689
2844
  * objects to a target object. It will return the target object.
@@ -2691,41 +2846,46 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2691
2846
  * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
2692
2847
  * @function
2693
2848
  * @ignore
2694
- */
2695
- if (!Object.assign) {
2696
- Object.defineProperty(Object, 'assign', {
2697
- enumerable: false,
2698
- configurable: true,
2699
- writable: true,
2700
- value: function value(target) {
2701
- if (target === undefined || target === null) {
2702
- throw new TypeError('Cannot convert first argument to object');
2703
- }
2849
+ */
2850
+ if (!Object.assign) {
2851
+ Object.defineProperty(Object, 'assign', {
2852
+ enumerable: false,
2853
+ configurable: true,
2854
+ writable: true,
2855
+ value: function (target) {
2856
+ if (target === undefined || target === null) {
2857
+ throw new TypeError('Cannot convert first argument to object');
2858
+ }
2859
+
2860
+ var to = Object(target);
2861
+ for (var i = 1; i < arguments.length; i++) {
2862
+ var nextSource = arguments[i];
2863
+ if (nextSource === undefined || nextSource === null) {
2864
+ continue;
2865
+ }
2866
+ nextSource = Object(nextSource);
2867
+
2868
+ var keysArray = Object.keys(nextSource);
2869
+ for (
2870
+ var nextIndex = 0, len = keysArray.length;
2871
+ nextIndex < len;
2872
+ nextIndex++
2873
+ ) {
2874
+ var nextKey = keysArray[nextIndex];
2875
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
2876
+ if (desc !== undefined && desc.enumerable) {
2877
+ to[nextKey] = nextSource[nextKey];
2878
+ }
2879
+ }
2880
+ }
2881
+ return to;
2882
+ }
2883
+ });
2884
+ }
2885
+
2886
+ return Popper;
2887
+ });
2704
2888
 
2705
- var to = Object(target);
2706
- for (var i = 1; i < arguments.length; i++) {
2707
- var nextSource = arguments[i];
2708
- if (nextSource === undefined || nextSource === null) {
2709
- continue;
2710
- }
2711
- nextSource = Object(nextSource);
2712
-
2713
- var keysArray = Object.keys(nextSource);
2714
- for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
2715
- var nextKey = keysArray[nextIndex];
2716
- var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
2717
- if (desc !== undefined && desc.enumerable) {
2718
- to[nextKey] = nextSource[nextKey];
2719
- }
2720
- }
2721
- }
2722
- return to;
2723
- }
2724
- });
2725
- }
2726
-
2727
- return Popper;
2728
- });
2729
2889
 
2730
2890
  /***/ }),
2731
2891
 
@@ -2988,7 +3148,7 @@ function insertAfter(newEl, targetEl) {
2988
3148
 
2989
3149
  /***/ }),
2990
3150
 
2991
- /***/ 95:
3151
+ /***/ 98:
2992
3152
  /***/ (function(module, exports) {
2993
3153
 
2994
3154
  module.exports = require("eoss/lib/dropdown-item");