PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 5.9.0
Essential Addons for Elementor – Popular Elementor Templates & Widgets v5.9.0
6.6.9 6.6.8 6.6.7 6.6.6 6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / assets / front-end / js / view / advanced-data-table.js
essential-addons-for-elementor-lite / assets / front-end / js / view Last commit date
advanced-accordion.js 2 years ago advanced-accordion.min.js 2 years ago advanced-data-table.js 2 years ago advanced-data-table.min.js 2 years ago advanced-tabs.js 2 years ago advanced-tabs.min.js 2 years ago beehive-elements.js 3 years ago beehive-elements.min.js 4 years ago betterdocs-category-grid.js 3 years ago betterdocs-category-grid.min.js 4 years ago business-reviews.js 3 years ago business-reviews.min.js 3 years ago content-ticker.js 3 years ago content-ticker.min.js 3 years ago count-down.js 3 years ago count-down.min.js 3 years ago data-table.js 3 years ago data-table.min.js 3 years ago event-calendar.js 2 years ago event-calendar.min.js 2 years ago facebook-feed.js 2 years ago facebook-feed.min.js 2 years ago fancy-text.js 3 years ago fancy-text.min.js 3 years ago filterable-gallery.js 2 years ago filterable-gallery.min.js 2 years ago general.js 2 years ago general.min.js 2 years ago image-accordion.js 2 years ago image-accordion.min.js 2 years ago interactive-circle.js 2 years ago interactive-circle.min.js 2 years ago load-more.js 2 years ago load-more.min.js 2 years ago login-register.js 2 years ago login-register.min.js 2 years ago nft-gallery.js 3 years ago nft-gallery.min.js 3 years ago post-grid.js 3 years ago post-grid.min.js 3 years ago price-table.js 3 years ago price-table.min.js 3 years ago product-grid.js 3 years ago product-grid.min.js 3 years ago progress-bar.js 3 years ago progress-bar.min.js 3 years ago quick-view.js 2 years ago quick-view.min.js 3 years ago reading-progress.js 3 years ago reading-progress.min.js 3 years ago scroll-to-top.js 3 years ago scroll-to-top.min.js 3 years ago simple-menu.js 2 years ago simple-menu.min.js 2 years ago sticky-video.js 2 years ago sticky-video.min.js 2 years ago svg-draw.js 2 years ago svg-draw.min.js 2 years ago table-of-content.js 3 years ago table-of-content.min.js 3 years ago twitter-feed.js 2 years ago twitter-feed.min.js 2 years ago typeform.js 3 years ago typeform.min.js 3 years ago woo-cart.js 2 years ago woo-cart.min.js 2 years ago woo-checkout.js 2 years ago woo-checkout.min.js 2 years ago woo-product-carousel.js 3 years ago woo-product-carousel.min.js 3 years ago woo-product-gallery.js 3 years ago woo-product-gallery.min.js 3 years ago woo-product-list.js 2 years ago woo-product-list.min.js 2 years ago wrapper-link.js 3 years ago wrapper-link.min.js 2 years ago
advanced-data-table.js
100 lines
1 /******/ (function(modules) { // webpackBootstrap
2 /******/ // The module cache
3 /******/ var installedModules = {};
4 /******/
5 /******/ // The require function
6 /******/ function __webpack_require__(moduleId) {
7 /******/
8 /******/ // Check if module is in cache
9 /******/ if(installedModules[moduleId]) {
10 /******/ return installedModules[moduleId].exports;
11 /******/ }
12 /******/ // Create a new module (and put it into the cache)
13 /******/ var module = installedModules[moduleId] = {
14 /******/ i: moduleId,
15 /******/ l: false,
16 /******/ exports: {}
17 /******/ };
18 /******/
19 /******/ // Execute the module function
20 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 /******/
22 /******/ // Flag the module as loaded
23 /******/ module.l = true;
24 /******/
25 /******/ // Return the exports of the module
26 /******/ return module.exports;
27 /******/ }
28 /******/
29 /******/
30 /******/ // expose the modules object (__webpack_modules__)
31 /******/ __webpack_require__.m = modules;
32 /******/
33 /******/ // expose the module cache
34 /******/ __webpack_require__.c = installedModules;
35 /******/
36 /******/ // define getter function for harmony exports
37 /******/ __webpack_require__.d = function(exports, name, getter) {
38 /******/ if(!__webpack_require__.o(exports, name)) {
39 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40 /******/ }
41 /******/ };
42 /******/
43 /******/ // define __esModule on exports
44 /******/ __webpack_require__.r = function(exports) {
45 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47 /******/ }
48 /******/ Object.defineProperty(exports, '__esModule', { value: true });
49 /******/ };
50 /******/
51 /******/ // create a fake namespace object
52 /******/ // mode & 1: value is a module id, require it
53 /******/ // mode & 2: merge all properties of value into the ns
54 /******/ // mode & 4: return value when already ns object
55 /******/ // mode & 8|1: behave like require
56 /******/ __webpack_require__.t = function(value, mode) {
57 /******/ if(mode & 1) value = __webpack_require__(value);
58 /******/ if(mode & 8) return value;
59 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60 /******/ var ns = Object.create(null);
61 /******/ __webpack_require__.r(ns);
62 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64 /******/ return ns;
65 /******/ };
66 /******/
67 /******/ // getDefaultExport function for compatibility with non-harmony modules
68 /******/ __webpack_require__.n = function(module) {
69 /******/ var getter = module && module.__esModule ?
70 /******/ function getDefault() { return module['default']; } :
71 /******/ function getModuleExports() { return module; };
72 /******/ __webpack_require__.d(getter, 'a', getter);
73 /******/ return getter;
74 /******/ };
75 /******/
76 /******/ // Object.prototype.hasOwnProperty.call
77 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78 /******/
79 /******/ // __webpack_public_path__
80 /******/ __webpack_require__.p = "";
81 /******/
82 /******/
83 /******/ // Load entry module and return exports
84 /******/ return __webpack_require__(__webpack_require__.s = "./src/js/view/advanced-data-table.js");
85 /******/ })
86 /************************************************************************/
87 /******/ ({
88
89 /***/ "./src/js/view/advanced-data-table.js":
90 /*!********************************************!*\
91 !*** ./src/js/view/advanced-data-table.js ***!
92 \********************************************/
93 /*! no static exports found */
94 /***/ (function(module, exports) {
95
96 eval("function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar advancedDataTable = /*#__PURE__*/function () {\n function advancedDataTable() {\n _classCallCheck(this, advancedDataTable);\n // register hooks\n elementorFrontend.hooks.addAction(\"frontend/element_ready/eael-advanced-data-table.default\", this.initFrontend.bind(this));\n }\n\n // init frontend features\n _createClass(advancedDataTable, [{\n key: \"initFrontend\",\n value: function initFrontend($scope, $) {\n var table = $scope[0].querySelector(\".ea-advanced-data-table\");\n var search = $scope[0].querySelector(\".ea-advanced-data-table-search\");\n var pagination = $scope[0].querySelector(\".ea-advanced-data-table-pagination\");\n var classCollection = {};\n if (!ea.isEditMode && table !== null) {\n // search\n this.initTableSearch(table, search, pagination);\n\n // sort\n this.initTableSort(table, pagination, classCollection);\n\n // paginated table\n this.initTablePagination(table, pagination, classCollection);\n\n // woocommerce\n this.initWooFeatures(table);\n var isEscapedHtmlString = function isEscapedHtmlString(str) {\n return /&[a-zA-Z]+;/.test(str);\n },\n decodeEscapedHtmlString = function decodeEscapedHtmlString(str) {\n var textarea = document.createElement('textarea');\n textarea.innerHTML = str;\n return textarea.value;\n };\n if ($(table).hasClass('ea-advanced-data-table-static')) {\n $(table).find('th, td').each(function () {\n var text = $(this)[0].innerHTML;\n if (isEscapedHtmlString(text)) {\n text = decodeEscapedHtmlString(text);\n $(this).html(text.replace(\"<script>\", \"\").replace(\"</script>\", \"\").replace(\"<script\", \"\"));\n }\n });\n }\n }\n }\n\n // frontend - search\n }, {\n key: \"initTableSearch\",\n value: function initTableSearch(table, search, pagination) {\n if (search) {\n search.addEventListener(\"input\", function (e) {\n var input = e.target.value.toLowerCase();\n var hasSort = table.classList.contains(\"ea-advanced-data-table-sortable\");\n var offset = table.rows[0].parentNode.tagName.toLowerCase() == \"thead\" ? 1 : 0;\n if (table.rows.length > 1) {\n if (input.length > 0) {\n if (hasSort) {\n table.classList.add(\"ea-advanced-data-table-unsortable\");\n }\n if (pagination && pagination.innerHTML.length > 0) {\n pagination.style.display = \"none\";\n }\n for (var i = offset; i < table.rows.length; i++) {\n var matchFound = false;\n if (table.rows[i].cells.length > 0) {\n for (var j = 0; j < table.rows[i].cells.length; j++) {\n if (table.rows[i].cells[j].textContent.toLowerCase().indexOf(input) > -1) {\n matchFound = true;\n break;\n }\n }\n }\n if (matchFound) {\n table.rows[i].style.display = \"table-row\";\n } else {\n table.rows[i].style.display = \"none\";\n }\n }\n } else {\n if (hasSort) {\n table.classList.remove(\"ea-advanced-data-table-unsortable\");\n }\n if (pagination && pagination.innerHTML.length > 0) {\n pagination.style.display = \"\";\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n var currentPage = paginationType == \"button\" ? pagination.querySelector(\".ea-adtp-current\").dataset.page : pagination.querySelector(\"select\").value;\n var startIndex = (currentPage - 1) * table.dataset.itemsPerPage + 1;\n var endIndex = currentPage * table.dataset.itemsPerPage;\n for (var _i = 1; _i <= table.rows.length - 1; _i++) {\n if (_i >= startIndex && _i <= endIndex) {\n table.rows[_i].style.display = \"table-row\";\n } else {\n table.rows[_i].style.display = \"none\";\n }\n }\n } else {\n for (var _i2 = 1; _i2 <= table.rows.length - 1; _i2++) {\n table.rows[_i2].style.display = \"table-row\";\n }\n }\n }\n }\n });\n }\n }\n\n // frontend - sort\n }, {\n key: \"initTableSort\",\n value: function initTableSort(table, pagination, classCollection) {\n if (table.classList.contains(\"ea-advanced-data-table-sortable\")) {\n table.addEventListener(\"click\", function (e) {\n var target = null;\n if (e.target.tagName.toLowerCase() === \"th\") {\n target = e.target;\n }\n if (e.target.parentNode.tagName.toLowerCase() === \"th\") {\n target = e.target.parentNode;\n }\n if (e.target.parentNode.parentNode.tagName.toLowerCase() === \"th\") {\n target = e.target.parentNode.parentNode;\n }\n if (target === null) {\n return;\n }\n var index = target.cellIndex;\n var currentPage = 1;\n var startIndex = 1;\n var endIndex = table.rows.length - 1;\n var sort = \"\";\n var classList = target.classList;\n var collection = [];\n var origTable = table.cloneNode(true);\n if (classList.contains(\"asc\")) {\n target.classList.remove(\"asc\");\n target.classList.add(\"desc\");\n sort = \"desc\";\n } else if (classList.contains(\"desc\")) {\n target.classList.remove(\"desc\");\n target.classList.add(\"asc\");\n sort = \"asc\";\n } else {\n target.classList.add(\"asc\");\n sort = \"asc\";\n }\n if (pagination && pagination.innerHTML.length > 0) {\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n currentPage = paginationType == \"button\" ? pagination.querySelector(\".ea-adtp-current\").dataset.page : pagination.querySelector(\"select\").value;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + 1;\n endIndex = endIndex - (currentPage - 1) * table.dataset.itemsPerPage >= table.dataset.itemsPerPage ? currentPage * table.dataset.itemsPerPage : endIndex;\n }\n\n // collect header class\n classCollection[currentPage] = [];\n table.querySelectorAll(\"th\").forEach(function (el) {\n if (el.cellIndex != index) {\n el.classList.remove(\"asc\", \"desc\");\n }\n classCollection[currentPage].push(el.classList.contains(\"asc\") ? \"asc\" : el.classList.contains(\"desc\") ? \"desc\" : \"\");\n });\n\n // collect table cells value\n for (var i = 1; i <= table.rows.length - 1; i++) {\n var value = void 0;\n var cell = table.rows[i].cells[index];\n var data = cell.innerText;\n var regex = new RegExp(\"([0-9]{4}[-./*](0[1-9]|1[0-2])[-./*]([0-2]{1}[0-9]{1}|3[0-1]{1})|([0-2]{1}[0-9]{1}|3[0-1]{1})[-./*](0[1-9]|1[0-2])[-./*][0-9]{4})\");\n if (data.match(regex)) {\n var dataString = data.split(/[\\.\\-\\/\\*]/),\n date = '';\n if (dataString[0].length == 4) {\n date = dataString[0] + \"-\" + dataString[1] + \"-\" + dataString[2];\n } else {\n date = dataString[2] + \"-\" + dataString[1] + \"-\" + dataString[0];\n }\n value = Date.parse(date);\n } else if (isNaN(parseInt(data))) {\n value = data.toLowerCase();\n } else {\n value = parseFloat(data);\n }\n collection.push({\n index: i,\n value: value\n });\n }\n\n // sort collection array\n if (sort == \"asc\") {\n collection.sort(function (x, y) {\n return x.value > y.value ? 1 : -1;\n });\n } else if (sort == \"desc\") {\n collection.sort(function (x, y) {\n return x.value < y.value ? 1 : -1;\n });\n }\n\n // sort table\n collection.forEach(function (row, index) {\n table.rows[1 + index].innerHTML = origTable.rows[row.index].innerHTML;\n });\n });\n }\n }\n\n // frontend - pagination\n }, {\n key: \"initTablePagination\",\n value: function initTablePagination(table, pagination, classCollection) {\n if (table.classList.contains(\"ea-advanced-data-table-paginated\")) {\n var paginationHTML = \"\";\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n var currentPage = 1;\n var startIndex = table.rows[0].parentNode.tagName.toLowerCase() == \"thead\" ? 1 : 0;\n var endIndex = currentPage * table.dataset.itemsPerPage;\n var maxPages = Math.ceil((table.rows.length - 1) / table.dataset.itemsPerPage);\n pagination.insertAdjacentHTML(\"beforeend\", ''); // insert pagination\n if (maxPages > 1) {\n if (paginationType == \"button\") {\n paginationHTML += \"<a href=\\\"#\\\" data-page=\\\"1\\\" class=\\\"ea-adtp-current ea-adtp-show\\\">1</a><a class=\\\"dots-1st ea-adtp-hide\\\">...</a>\";\n for (var i = 2; i < maxPages; i++) {\n var _cssClass = i <= 6 || i === maxPages ? 'ea-adtp-show' : 'ea-adtp-hide';\n paginationHTML += \"<a href=\\\"#\\\" data-page=\\\"\".concat(i, \"\\\" class=\\\"\").concat(_cssClass, \"\\\">\").concat(i, \"</a>\");\n }\n var dots2 = '',\n cssClass = 'ea-adtp-show';\n if (maxPages > 7) {\n dots2 = \"<a class=\\\"dots-last\\\">...</a>\";\n cssClass = 'ea-adtp-hide';\n }\n paginationHTML += dots2 + \"<a href=\\\"#\\\" data-page=\\\"\".concat(maxPages, \"\\\" class=\\\"\").concat(cssClass, \"\\\">\").concat(maxPages, \"</a>\");\n pagination.insertAdjacentHTML(\"beforeend\", \"<a href=\\\"#\\\" data-page=\\\"1\\\" class=\\\"ea-adtp-1st\\\">&laquo;</a>\".concat(paginationHTML, \"<a href=\\\"#\\\" data-page=\\\"\").concat(maxPages, \"\\\" class=\\\"ea-adtp-last\\\">&raquo;</a>\"));\n } else {\n for (var _i3 = 1; _i3 <= maxPages; _i3++) {\n paginationHTML += \"<option value=\\\"\".concat(_i3, \"\\\">\").concat(_i3, \"</option>\");\n }\n pagination.insertAdjacentHTML(\"beforeend\", \"<select>\".concat(paginationHTML, \"</select>\"));\n }\n }\n\n // make initial item visible\n for (var _i4 = 0; _i4 <= endIndex; _i4++) {\n if (_i4 >= table.rows.length) {\n break;\n }\n table.rows[_i4].style.display = \"table-row\";\n }\n\n // paginate on click\n if (paginationType == \"button\") {\n var _$ = jQuery;\n _$('a:not(.dots-1st, .dots-last)', pagination).on(\"click\", function (e) {\n e.preventDefault();\n if (e.target.tagName.toLowerCase() == \"a\") {\n currentPage = e.target.dataset.page;\n offset = table.rows[0].parentNode.tagName.toLowerCase() == \"thead\" ? 1 : 0;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + offset;\n endIndex = currentPage * table.dataset.itemsPerPage;\n if (maxPages > 7) {\n var countFrom = 1,\n countTo = 6;\n _$('a.ea-adtp-current', pagination).removeClass('ea-adtp-current');\n if (currentPage > maxPages - 5) {\n countFrom = maxPages - 5;\n countTo = maxPages;\n } else if (currentPage > 5) {\n countFrom = currentPage - 2;\n countTo = parseInt(currentPage) + 2;\n }\n _$('a.ea-adtp-show', pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n for (var page = countFrom; page <= countTo; page++) {\n _$(\"a[data-page=\\\"\".concat(page, \"\\\"]:not(.ea-adtp-1st,.ea-adtp-last)\"), pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n }\n _$(\"a[data-page=\\\"\".concat(currentPage, \"\\\"]\"), pagination).addClass('ea-adtp-current');\n if (_$(\"a[data-page=\\\"2\\\"]\", pagination).hasClass('ea-adtp-hide')) {\n _$(\"a.dots-1st\", pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n } else {\n _$(\"a.dots-1st\", pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n }\n if (_$(\"a[data-page=\\\"\".concat(maxPages - 1, \"\\\"]\"), pagination).hasClass('ea-adtp-hide')) {\n _$(\"a.dots-last\", pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n } else {\n _$(\"a.dots-last\", pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n }\n } else {\n _$('a.ea-adtp-current', pagination).removeClass('ea-adtp-current');\n _$(\"a[data-page=\\\"\".concat(currentPage, \"\\\"]\"), pagination).addClass('ea-adtp-current');\n }\n for (var _i5 = offset; _i5 <= table.rows.length - 1; _i5++) {\n if (_i5 >= startIndex && _i5 <= endIndex) {\n table.rows[_i5].style.display = \"table-row\";\n } else {\n table.rows[_i5].style.display = \"none\";\n }\n }\n table.querySelectorAll(\"th\").forEach(function (el, index) {\n el.classList.remove(\"asc\", \"desc\");\n if (typeof classCollection[currentPage] != \"undefined\") {\n if (classCollection[currentPage][index]) {\n el.classList.add(classCollection[currentPage][index]);\n }\n }\n });\n }\n });\n } else {\n if (pagination.hasChildNodes()) {\n pagination.querySelector(\"select\").addEventListener(\"input\", function (e) {\n e.preventDefault();\n currentPage = e.target.value;\n offset = table.rows[0].parentNode.tagName.toLowerCase() == \"thead\" ? 1 : 0;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + offset;\n endIndex = currentPage * table.dataset.itemsPerPage;\n for (var _i6 = offset; _i6 <= table.rows.length - 1; _i6++) {\n if (_i6 >= startIndex && _i6 <= endIndex) {\n table.rows[_i6].style.display = \"table-row\";\n } else {\n table.rows[_i6].style.display = \"none\";\n }\n }\n table.querySelectorAll(\"th\").forEach(function (el, index) {\n el.classList.remove(\"asc\", \"desc\");\n if (typeof classCollection[currentPage] != \"undefined\") {\n if (classCollection[currentPage][index]) {\n el.classList.add(classCollection[currentPage][index]);\n }\n }\n });\n });\n }\n }\n }\n }\n\n // woocommerce features\n }, {\n key: \"initWooFeatures\",\n value: function initWooFeatures(table) {\n table.querySelectorAll(\".nt_button_woo\").forEach(function (el) {\n el.classList.add(\"add_to_cart_button\", \"ajax_add_to_cart\");\n });\n table.querySelectorAll(\".nt_woo_quantity\").forEach(function (el) {\n el.addEventListener(\"input\", function (e) {\n var product_id = e.target.dataset.product_id;\n var quantity = e.target.value;\n $(\".nt_add_to_cart_\".concat(product_id), $(table)).data(\"quantity\", quantity);\n });\n });\n }\n }]);\n return advancedDataTable;\n}();\nea.hooks.addAction(\"init\", \"ea\", function () {\n if (ea.elementStatusCheck('eaelAdvancedDataTable')) {\n return false;\n }\n new advancedDataTable();\n});\n\n//# sourceURL=webpack:///./src/js/view/advanced-data-table.js?");
97
98 /***/ })
99
100 /******/ });