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rap","webpack://google-spreadsheet-to-wp-table-sync/./assets/src/scripts/Chunk/Frontend/common_func.js","webpack://google-spreadsheet-to-wp-table-sync/./assets/src/scripts/Chunk/Frontend/data_tables_async.js","webpack://google-spreadsheet-to-wp-table-sync/./assets/src/scripts/Chunk/Frontend/data_table_default.js"],"sourcesContent":["jQuery(document).ready(function ($) {\r\n class ManageTab {\r\n constructor() {\r\n this.events();\r\n this.showFirstTabContent();\r\n }\r\n events() {\r\n var buttons = $('.tab_hidden_input');\r\n\r\n buttons.each(function () {\r\n $(this).on(\"click\", function (e) {\r\n let target = e.currentTarget;\r\n\r\n $(target)\r\n .parents(\".tabs_container\")\r\n .find(`.tab_contents .tab-content`)\r\n .removeClass(\"active\");\r\n\r\n let inputID = $(target).data(\"id\");\r\n\r\n $(`#${inputID}`).addClass('active');\r\n });\r\n })\r\n }\r\n\r\n showContent(e) {\r\n target\r\n .parents(\".tab_bottom_side\")\r\n .find(`.tab_contents .tab-content`)\r\n .removeClass(\"active\");\r\n\r\n let inputID = target.attr(\"id\").match(/(\\d+)/)[0];\r\n\r\n target\r\n .parents(\".tab_bottom_side\")\r\n .find(`.tab_contents #tab-content${inputID}`)\r\n .addClass(\"active\");\r\n }\r\n\r\n // Add checked in tabs and get the design.\r\n showFirstTabContent() {\r\n $(\".tabs_container\").each(function () {\r\n $(this)\r\n .find(\".tab_hidden_input:first\")\r\n .prop(\"checked\", true);\r\n });\r\n }\r\n\r\n }\r\n new ManageTab();\r\n});\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// Frontend Data table design and other config applied like pagination, shorting and so on \r\n\r\nexport default class Global_Table_Config {\r\n table_configuration($, i, elem, table_name, table_settings, sheetUrl) {\r\n let dom = `<\"filtering_input filtering_input_${i}\"${\r\n table_settings?.show_x_entries ? \"l\" : \"\"\r\n }${\r\n table_settings?.search_bar ? \"f\" : \"\"\r\n }>rt<\"bottom_options bottom_options_${i}\"${\r\n table_settings?.show_info_block ? \"i\" : \"\"\r\n }${ table_settings?.pagination ? \"p\" : \"\"}>`;\r\n\r\n if (this.isProPluginActive()) {\r\n dom = `B<\"filtering_input filtering_input_${i}\"${\r\n table_settings?.show_x_entries ? \"l\" : \"\"\r\n }${\r\n table_settings?.search_bar ? \"f\" : \"\"\r\n }>rt<\"bottom_options bottom_options_${i}\"${\r\n table_settings?.show_info_block ? \"i\" : \"\"\r\n }${ table_settings?.pagination ? \"p\" : \"\"}>`;\r\n\r\n // change the cell format according to feature saved at database\r\n this.changeCellFormat(\r\n table_settings?.cell_format,\r\n $(elem).find(\"#create_tables th, td\"),\r\n $\r\n );\r\n\r\n this.changeRedirectionType(\r\n table_settings?.redirection_type,\r\n $(elem).find(\"#create_tables a\"),\r\n $\r\n );\r\n }\r\n\r\n if ( $.fn.DataTable && $(elem).find(\"#create_tables\").length ) {\r\n $(elem).find(\"#create_tables\").DataTable(this.table_obj($, table_name, table_settings, dom));\r\n }\r\n\r\n this.setPdfUrl(sheetUrl, $(elem).find(\".dt-buttons\"));\r\n\r\n if (this.isProPluginActive()) {\r\n this.reveal_export_btns($, elem, table_settings);\r\n }\r\n\r\n this.swap_input_filter($, i, table_settings);\r\n\r\n this.swap_bottom_options($, i, table_settings);\r\n }\r\n\r\n changeRedirectionType(type, links, $) {\r\n if (!links.length) return;\r\n $.each(links, function (i, link) {\r\n $(link).attr(\"target\", type);\r\n });\r\n }\r\n\r\n changeCellFormat(formatStyle, tableCell, $) {\r\n switch (formatStyle) {\r\n case \"wrap\":\r\n $.each(tableCell, function (i, cell) {\r\n $(cell).removeClass(\"clip_style\");\r\n $(cell).removeClass(\"expanded_style\");\r\n $(cell).addClass(\"wrap_style\");\r\n });\r\n break;\r\n\r\n case \"clip\":\r\n $.each(tableCell, function (i, cell) {\r\n $(cell).removeClass(\"wrap_style\");\r\n $(cell).removeClass(\"expanded_style\");\r\n $(cell).addClass(\"clip_style\");\r\n });\r\n break;\r\n case \"expand\":\r\n $.each(tableCell, function (i, cell) {\r\n $(cell).removeClass(\"clip_style\");\r\n $(cell).removeClass(\"wrap_style\");\r\n $(cell).addClass(\"expanded_style\");\r\n });\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n isProPluginActive() {\r\n if (front_end_data.isProActive || front_end_data.isProActive != '') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n getSpreadsheetID(url) {\r\n if (!url || url == \"\") return;\r\n\r\n let sheetID = null;\r\n\r\n sheetID = url.split(/\\//)[5];\r\n\r\n if (sheetID) return sheetID;\r\n\r\n return null;\r\n }\r\n\r\n getGridID(url) {\r\n if (!url || url == \"\") return;\r\n\r\n let gridID = null;\r\n\r\n gridID = url.match(/gid=(\\w+)/);\r\n\r\n if ( gridID != null ) {\r\n gridID = gridID[1];\r\n }\r\n\r\n if (gridID) {\r\n return gridID;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n //PDF Export as PDF\r\n setPdfUrl(url, elem) {\r\n let spreadsheetID = this.getSpreadsheetID(url);\r\n let gridID = this.getGridID(url);\r\n let pdfUrl = `https://docs.google.com/spreadsheets/d/${spreadsheetID}/export?format=pdf&id=${spreadsheetID}&gid=${gridID}`;\r\n // Forntend part design `\r\n \r\n \r\n \r\n `\r\n );\r\n }\r\n\r\n table_obj($, table_name, table_settings, dom) {\r\n\r\n // console.log(table_settings)\r\n\r\n let table_object = {\r\n dom: dom,\r\n order: [],\r\n // order: [[0, 'asc']], // use this to target any column and make it default sorting - asc \\\\ desc 0 is num of col\r\n responsive: true,\r\n lengthMenu: [\r\n [1, 5, 10, 15],\r\n [1, 5, 10, 15],\r\n ],\r\n pageLength: parseInt(table_settings.default_rows_per_page),\r\n lengthChange: true,\r\n ordering: table_settings.allow_sorting,\r\n destroy: true,\r\n scrollX: true,\r\n };\r\n\r\n\r\n //Sorting mechanisiam change\r\n /* let numberOfColumns = $('.gswpts_tables_container').find('thead th').length;\r\n // Set the initial sorting order for each column\r\n for (let i = 0; i < numberOfColumns; i++) {\r\n table_object.order.push([i, 'asc']);\r\n // table_object.order.push([i, '']);\r\n } */\r\n\r\n $('.gswpts_tables_container').each(function () {\r\n let numberOfColumns = $(this).find('thead th').length;\r\n let table_object = {\r\n order: []\r\n };\r\n \r\n for (let i = 0; i < numberOfColumns; i++) {\r\n // table_object.order.push([i, 'asc']);\r\n table_object.order.push([i, '']);\r\n }\r\n // console.log(table_object.order);\r\n });\r\n\r\n if (this.isProPluginActive()) {\r\n table_object.buttons = [\r\n {\r\n // text: `JSON  `,\r\n // className: \"ui inverted yellow button export_btns json_btn\",\r\n text: ``,\r\n className: \"ui inverted button export_btns json_btn\",\r\n action: function (e, dt, button, config) {\r\n var data = dt.buttons.exportData();\r\n $.fn.dataTable.fileSave(\r\n new Blob([JSON.stringify(data)]),\r\n `${table_name}.json`\r\n );\r\n },\r\n titleAttr: \"Export as JSON\",\r\n },\r\n {\r\n text: ``,\r\n extend: \"csv\",\r\n className: \"ui inverted button export_btns csv_btn\",\r\n title: `${table_name}`,\r\n titleAttr: \"Export as CSV\",\r\n },\r\n {\r\n text: ``,\r\n extend: \"excel\",\r\n className: \"ui inverted button export_btns excel_btn\",\r\n title: `${table_name}`,\r\n titleAttr: \"Export as Excel\",\r\n },\r\n {\r\n text: ``,\r\n extend: \"print\",\r\n className: \"ui inverted button export_btns print_btn\",\r\n title: `${table_name}`,\r\n titleAttr: \"Print Table\",\r\n },\r\n {\r\n text: ``,\r\n extend: \"copy\",\r\n className: \"ui inverted button export_btns copy_btn\",\r\n title: `${table_name}`,\r\n titleAttr: \"Copy to Clipboard\",\r\n },\r\n ];\r\n\r\n table_object.lengthMenu = [\r\n [1, 5, 10, 15, 25, 50, 100, -1],\r\n [1, 5, 10, 15, 25, 50, 100, \"All\"],\r\n ];\r\n\r\n if (table_settings.vertical_scrolling) {\r\n table_object.scrollY = `${table_settings.vertical_scrolling}px`;\r\n }\r\n\r\n if ( ! table_settings?.hide_on_desktop && ! table_settings?.hide_on_mobile ) {\r\n if (table_settings.hide_column ) {\r\n table_object.columnDefs = this.hideColumnByScreen(\r\n table_settings.hide_column\r\n );\r\n } \r\n } else {\r\n if (this.screenSize() === \"desktop\" ) {\r\n if (table_settings.hide_column && table_settings?.hide_on_desktop ) {\r\n table_object.columnDefs = this.hideColumnByScreen(\r\n table_settings.hide_column\r\n );\r\n }\r\n } else {\r\n if (table_settings.hide_column && table_settings?.hide_on_mobile) {\r\n table_object.columnDefs = this.hideColumnByScreen(\r\n table_settings.hide_column\r\n );\r\n }\r\n }\r\n }\r\n\r\n \r\n }\r\n\r\n return table_object;\r\n }\r\n\r\n // Return an array that will define the columns to hide\r\n hideColumnByScreen(arrayValues) {\r\n return [\r\n {\r\n targets: this.convertArrayStringToInteger(arrayValues),\r\n visible: false,\r\n searchable: false,\r\n },\r\n ];\r\n }\r\n\r\n // get the current screen size of user if greater than 740 return desktop or return mobile\r\n screenSize() {\r\n // Desktop screen size\r\n if (screen.width > 740) {\r\n return \"desktop\";\r\n } else {\r\n return \"mobile\";\r\n }\r\n }\r\n\r\n // convert string to integer from arrays\r\n convertArrayStringToInteger(arr) {\r\n if (!arr) return [];\r\n return arr.map((val) => parseInt(val));\r\n }\r\n\r\n reveal_export_btns($, elem, table_settings) {\r\n if (!table_settings) return;\r\n\r\n let export_btns = table_settings.table_export;\r\n\r\n if (export_btns != \"empty\" && export_btns) {\r\n export_btns.forEach((btn) => {\r\n $(elem)\r\n .find(\".\" + btn + \"_btn\")\r\n .removeClass(\"export_btns\");\r\n });\r\n }\r\n }\r\n\r\n swap_input_filter($, i, table_settings) {\r\n /* If checkbox is checked then swap filter */\r\n if (table_settings?.swap_filter_inputs) {\r\n $(\".filtering_input_\" + i + \"\").css(\"flex-direction\", \"row-reverse\");\r\n $(\".filtering_input_\" + i + \" > #create_tables_length\").css({\r\n \"margin-right\": \"0\",\r\n \"margin-left\": \"auto\",\r\n });\r\n $(\".filtering_input_\" + i + \" > #create_tables_filter\").css({\r\n \"margin-left\": \"0\",\r\n \"margin-right\": \"auto\",\r\n });\r\n } else {\r\n /* Set back to default position */\r\n $(\".filtering_input_\" + i + \"\").css(\"flex-direction\", \"row\");\r\n $(\".filtering_input_\" + i + \" > #create_tables_length\").css({\r\n \"margin-right\": \"auto\",\r\n \"margin-left\": \"0\",\r\n });\r\n $(\".filtering_input_\" + i + \" > #create_tables_filter\").css({\r\n \"margin-left\": \"auto\",\r\n \"margin-right\": \"0\",\r\n });\r\n }\r\n }\r\n\r\n swap_bottom_options($, i, table_settings) {\r\n let style = {\r\n flex_direction: \"row-reverse\",\r\n table_info_style: {\r\n margin_left: \"auto\",\r\n margin_right: 0,\r\n },\r\n table_paginate_style: {\r\n margin_left: 0,\r\n margin_right: \"auto\",\r\n },\r\n };\r\n\r\n if (table_settings?.swap_bottom_options) {\r\n this.bottom_option_style($, style, i);\r\n } else {\r\n style[\"flex_direction\"] = \"row\";\r\n\r\n style.table_info_style[\"margin_left\"] = 0;\r\n style.table_info_style[\"margin_right\"] = \"auto\";\r\n\r\n style.table_paginate_style[\"margin_left\"] = \"auto\";\r\n style.table_paginate_style[\"margin_right\"] = 0;\r\n\r\n this.bottom_option_style($, style, i);\r\n }\r\n }\r\n\r\n bottom_option_style($, $arg, i) {\r\n $(\".bottom_options_\" + i + \"\").css(\"flex-direction\", $arg[\"flex_direction\"]);\r\n $(\".bottom_options_\" + i + \" > #create_tables_info\").css({\r\n \"margin-left\": $arg[\"table_info_style\"][\"margin_left\"],\r\n \"margin-right\": $arg[\"table_info_style\"][\"margin_right\"],\r\n });\r\n $(\".bottom_options_\" + i + \" > #create_tables_paginate\").css({\r\n \"margin-left\": $arg[\"table_paginate_style\"][\"margin_left\"],\r\n \"margin-right\": $arg[\"table_paginate_style\"][\"margin_right\"],\r\n });\r\n }\r\n\r\n /**\r\n * Header merge \r\n */\r\n handleHeaderMergedCells($, elem) {\r\n var tableHeaders = $(elem).find('.thead-item[data-merge]');\r\n \r\n if(tableHeaders){\r\n tableHeaders.each(function (index, header) {\r\n // Check if the current header has the data-merge attribute.\r\n var dataMerge = $(header).attr('data-merge');\r\n \r\n if (dataMerge) {\r\n dataMerge = JSON.parse(dataMerge);\r\n var startCol = dataMerge[0];\r\n var numCols = dataMerge[1];\r\n \r\n // Add parentCellstart class to the starting cell\r\n $(header).addClass('parentCellstart');\r\n \r\n $(header).css({\r\n 'text-align': 'center',\r\n });\r\n \r\n // Update colspan attribute\r\n $(header).attr('colspan', numCols);\r\n \r\n // Get the next cell in the row\r\n var nextCell = $(header).next();\r\n \r\n // Loop through numCols starting from 1\r\n for (var i = 1; i < numCols; i++) {\r\n if (nextCell && nextCell.length) {\r\n $(nextCell).addClass('childCell');\r\n // nextCell.style.display = 'none'; \r\n nextCell = $(nextCell).next();\r\n }\r\n }\r\n \r\n $(elem).find('.childCell').css('display', 'none');\r\n \r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Table body merge\r\n * @param {* table body merge} $ \r\n * @param {*} elem \r\n */\r\n\r\n handleMergedCells($, elem) {\r\n var tableRows = $(elem).find('.gswpts_rows');\r\n \r\n tableRows.each(function () {\r\n var cells = $(this).find('td');\r\n \r\n cells.each(function () {\r\n if ($(this).hasClass('parentCellstart')) {\r\n\r\n // Apply the logic from the previous conversation here\r\n var dataMerge = JSON.parse($(this).attr('data-merge'));\r\n var dataIndex = JSON.parse($(this).attr('data-index'));\r\n \r\n for (var i = 0; i < dataMerge[0]; i++) {\r\n for (var j = 0; j < dataMerge[1]; j++) {\r\n var targetIndex = [\r\n dataIndex[0] + i,\r\n dataIndex[1] + j\r\n ];\r\n \r\n var targetCell = $(elem).find('[data-index=\"[' + targetIndex.join(',') + ']\"]');\r\n \r\n if (targetCell) {\r\n var cellDivContent = targetCell.find('.cell_div').text().trim();\r\n if (cellDivContent === '') {\r\n targetCell.addClass('merged-cell');\r\n targetCell.hide();\r\n\r\n if ($(this).hasClass('parentCellstart')) {\r\n $(this).css({\r\n 'text-align': 'center',\r\n 'vertical-align': 'middle'\r\n });\r\n }\r\n } else {\r\n targetCell.addClass('normal-cell');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * \r\n * Add dynamic table width in header from body td calculated on tr\r\n */\r\n handleTableWidth($, elem) {\r\n // Check if elem has a prevObject property\r\n if (elem.prevObject && elem.prevObject.length > 0) {\r\n elem = elem.prevObject;\r\n }\r\n\r\n // Ensure that the desired element is present in the jQuery object\r\n if (elem.length === 0) {\r\n console.log(\"No element found within the given object.\");\r\n return;\r\n }\r\n\r\n // Loop through each element in elem (there should be only one)\r\n elem.each(function (index, container) {\r\n // Find the element within the container\r\n var row = $(container).find(\"tr.gswpts_rows\");\r\n\r\n // Check if the element exists in the container\r\n if (row.length > 0) {\r\n // Get the bounding rectangle of the element\r\n var rect = row[0].getBoundingClientRect();\r\n\r\n // Get the total width from the bounding rectangle\r\n var totalWidth = rect.width;\r\n\r\n // Get the table element within the container\r\n var table = $(container).find(\".ui.celled.display.table.gswpts_tables.dataTable.no-footer\");\r\n\r\n // Set the width of the table\r\n table.css('width', totalWidth + \"px\");\r\n\r\n // Log the total width to the console\r\n // console.log(\"Total Width for Table with ID \" + container.id + \": \" + totalWidth + \" pixels\");\r\n }\r\n });\r\n }\r\n\r\n html_loader() {\r\n let loader = `\r\n
\r\n
\r\n
Loading
\r\n
\r\n

\r\n

\r\n

\r\n
\r\n `;\r\n return loader;\r\n }\r\n\r\n clearOverflow() {\r\n if (\r\n /Android|webOS|iPhone|iPad|Mac|Macintosh|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\r\n navigator.userAgent\r\n )\r\n ) {\r\n if (\r\n this.detectBrowser() == \"Chrome\" ||\r\n this.detectBrowser() == \"Safari\" ||\r\n this.detectBrowser() == \"MSIE\"\r\n ) {\r\n let tableScrollBody = document.querySelectorAll(\r\n \".gswpts_tables_container .dataTables_scrollBody\"\r\n );\r\n\r\n if (tableScrollBody) {\r\n tableScrollBody.forEach((element) => {\r\n if (\r\n element.parentElement.parentElement.parentElement.parentElement.classList.contains(\r\n \"collapse_style\"\r\n )\r\n ) {\r\n element.style.overflow = \"unset\";\r\n element.style.height = \"unset\";\r\n element.style.maxHeight = \"unset\";\r\n }\r\n });\r\n }\r\n\r\n // this.hideEmptyCell();\r\n }\r\n }\r\n }\r\n\r\n detectBrowser() {\r\n if ((navigator.userAgent.indexOf(\"Opera\") || navigator.userAgent.indexOf(\"OPR\")) != -1) {\r\n return \"Opera\";\r\n } else if (navigator.userAgent.indexOf(\"Chrome\") != -1) {\r\n return \"Chrome\";\r\n } else if (navigator.userAgent.indexOf(\"Safari\") != -1) {\r\n return \"Safari\";\r\n } else if (navigator.userAgent.indexOf(\"Firefox\") != -1) {\r\n return \"Firefox\";\r\n } else if (navigator.userAgent.indexOf(\"MSIE\") != -1 || !!document.documentMode == true) {\r\n return \"IE\"; //crap\r\n } else {\r\n return \"Unknown\";\r\n }\r\n }\r\n\r\n hideEmptyCell() {\r\n let tableCells = document.querySelectorAll(\".gswpts_tables_container td\");\r\n if (!tableCells) return;\r\n\r\n tableCells.forEach((element) => {\r\n if (element.innerText == \"\") {\r\n // element.style.display = \"none\";\r\n element.innerText = \"No data\";\r\n }\r\n });\r\n }\r\n\r\n bindDragScroll($container, $scroller) {\r\n var $window = jQuery(window);\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var x2 = 0;\r\n var y2 = 0;\r\n var t = 0;\r\n\r\n $container.on(\"mousedown\", down);\r\n $container.on(\"click\", preventDefault);\r\n $scroller.on(\"mousewheel\", horizontalMouseWheel); // prevent macbook trigger prev/next page while scrolling\r\n\r\n function down(evt) {\r\n if (evt.button === 0) {\r\n t = Date.now();\r\n x = x2 = evt.pageX;\r\n y = y2 = evt.pageY;\r\n\r\n $container.addClass(\"down\");\r\n $window.on(\"mousemove\", move);\r\n $window.on(\"mouseup\", up);\r\n\r\n evt.preventDefault();\r\n }\r\n }\r\n\r\n function move(evt) {\r\n // alert(\"move\");\r\n if ($container.hasClass(\"down\")) {\r\n var _x = evt.pageX;\r\n var _y = evt.pageY;\r\n var deltaX = _x - x;\r\n var deltaY = _y - y;\r\n\r\n $scroller[0].scrollLeft -= deltaX;\r\n\r\n x = _x;\r\n y = _y;\r\n }\r\n }\r\n\r\n function up(evt) {\r\n $window.off(\"mousemove\", move);\r\n $window.off(\"mouseup\", up);\r\n\r\n var deltaT = Date.now() - t;\r\n var deltaX = evt.pageX - x2;\r\n var deltaY = evt.pageY - y2;\r\n if (deltaT <= 300) {\r\n $scroller.stop().animate(\r\n {\r\n scrollTop: \"-=\" + deltaY * 3,\r\n scrollLeft: \"-=\" + deltaX * 3,\r\n },\r\n 500,\r\n function (x, t, b, c, d) {\r\n // easeOutCirc function from http://gsgd.co.uk/sandbox/jquery/easing/\r\n return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;\r\n }\r\n );\r\n }\r\n\r\n t = 0;\r\n\r\n $container.removeClass(\"down\");\r\n }\r\n\r\n function preventDefault(evt) {\r\n if (x2 !== evt.pageX || y2 !== evt.pageY) {\r\n evt.preventDefault();\r\n return false;\r\n }\r\n }\r\n\r\n function horizontalMouseWheel(evt) {\r\n evt = evt.originalEvent;\r\n var x = $scroller.scrollLeft();\r\n var max = $scroller[0].scrollWidth - $scroller[0].offsetWidth;\r\n var dir = evt.deltaX || evt.wheelDeltaX;\r\n var stop = dir > 0 ? x >= max : x <= 0;\r\n if (stop && dir) {\r\n evt.preventDefault();\r\n }\r\n }\r\n }\r\n\r\n addGrabCursonOnMouseDown(elem) {\r\n elem.mousedown((e) => {\r\n elem.css({\r\n cursor: \"grab\",\r\n });\r\n });\r\n elem.mouseup((e) => {\r\n elem.css({\r\n cursor: \"auto\",\r\n });\r\n });\r\n }\r\n}\r\n","import Global_Table_Config from \"./common_func\";\r\n\r\nif (front_end_data.isProActive) {\r\n jQuery(document).ready(function ($) {\r\n class Data_Tables_Async {\r\n constructor() {\r\n this.frontend_table = $(\".gswpts_tables_container\");\r\n\r\n if (front_end_data.asynchronous_loading == \"on\") {\r\n this.events();\r\n } else {\r\n return;\r\n }\r\n }\r\n events() {\r\n this.get_frontend_table();\r\n }\r\n\r\n get_frontend_table() {\r\n $.each(this.frontend_table, function (i, elem) {\r\n let id = $(elem).attr(\"id\");\r\n $.ajax({\r\n url : front_end_data.admin_ajax,\r\n data : {\r\n action : \"gswpts_sheet_fetch\",\r\n id : id,\r\n nonce : window?.front_end_data?.nonce,\r\n },\r\n type: \"post\",\r\n success: (res) => {\r\n let tableClass = new Global_Table_Config();\r\n let table_settings = res.data.table_settings;\r\n\r\n if (tableClass.isProPluginActive()) {\r\n if (table_settings?.responsive_style) {\r\n $(elem).addClass(table_settings?.responsive_style);\r\n }\r\n\r\n if (table_settings?.import_styles) {\r\n $(elem).addClass(`gswpts_default-style`);\r\n } else {\r\n $(elem).addClass(\r\n `gswpts_${\r\n table_settings?.table_style\r\n ? table_settings?.table_style\r\n : \"default-style\"\r\n }`\r\n );\r\n }\r\n\r\n $(elem).addClass(`gswpts_default-style`);\r\n }\r\n\r\n if (table_settings?.show_title == \"true\") {\r\n $(elem).find(\"h3\").html(res.data.table_name);\r\n }\r\n\r\n $(elem).find(\".gswpts_tables_content\").html(res.data.output);\r\n\r\n let table_name = res.data.name;\r\n let sheetUrl = res.data.source_url;\r\n\r\n tableClass.table_configuration(\r\n $,\r\n i,\r\n elem,\r\n table_name,\r\n table_settings,\r\n sheetUrl\r\n );\r\n\r\n let scrollerContainer = $(elem).find(\".dataTables_scroll\");\r\n let scrollerElement = $(elem).find(\".dataTables_scrollBody\");\r\n\r\n //Removed extra header when click the sort icon and has header merge\r\n \r\n function handleCommonActions(theadElement) {\r\n console.clear(); // Clearing few basic logs that are not needed to show\r\n \r\n if (theadElement) {\r\n theadElement.style.display = 'none';\r\n }\r\n }\r\n\r\n function handlePagination() {\r\n var createTablesPaginate = document.getElementById('create_tables_paginate');\r\n \r\n if (createTablesPaginate) {\r\n var container = createTablesPaginate.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n }\r\n } \r\n \r\n \r\n // Removed extra header when clicking the sort icon and has header merge\r\n if (scrollerElement) {\r\n var sortingElements = document.querySelectorAll('.sorting');\r\n var dataTablesLength = document.querySelectorAll('.dataTables_length');\r\n var dataTables_filter = document.querySelectorAll('.dataTables_filter');\r\n var createTablesFilterInputs = document.querySelectorAll('.dataTables_filter input');\r\n\r\n var paginateContainer = document.getElementById('create_tables_paginate');\r\n\r\n \r\n // Add a click event listener to each sorting element\r\n sortingElements.forEach(function (sortingElement) {\r\n sortingElement.addEventListener('click', function () {\r\n // Find the .dataTables_scrollBody element within the same container\r\n var container = sortingElement.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n \r\n // Find the element within the .dataTables_scrollBody\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n });\r\n });\r\n \r\n // Add a click event listener to each dataTablesLength element\r\n dataTablesLength.forEach(function (LengthElement) {\r\n LengthElement.addEventListener('click', function () {\r\n var container = LengthElement.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n console.log(\"click on dataTablesLength\");\r\n });\r\n });\r\n \r\n // Add a click event listener to each dataTables_filter element\r\n dataTables_filter.forEach(function (FilterElement) {\r\n FilterElement.addEventListener('click', function () {\r\n var container = FilterElement.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n console.log(\"click on dataTables_filter\");\r\n });\r\n });\r\n \r\n createTablesFilterInputs.forEach(function (createTablesFilterInput) {\r\n createTablesFilterInput.addEventListener('input',function () {\r\n var container = createTablesFilterInput.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n console.log(\"click on handleSearchFilter\");\r\n });\r\n });\r\n\r\n /* paginationButtons.forEach(function (paginationButton) {\r\n paginationButton.addEventListener('click', function () {\r\n console.log(\"click on pagination\");\r\n var container = paginationButton.closest(\".gswpts_tables_container\");\r\n console.log(container)\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n console.log(\"click on pagination hide\");\r\n \r\n });\r\n }); */\r\n\r\n if (paginateContainer) {\r\n paginateContainer.addEventListener('click', function (event) {\r\n // Check if the clicked element is a paginate button\r\n if (event.target.classList.contains('paginate_button')) {\r\n handlePagination();\r\n console.log(\"click on paginate\");\r\n }\r\n });\r\n }\r\n\r\n }\r\n\r\n // END \r\n\r\n // Additional code for handling merged cells and text alignment\r\n tableClass.handleMergedCells($, elem);\r\n\r\n //Additional code for handling header merged cells and text alignment\r\n tableClass.handleHeaderMergedCells($, elem);\r\n\r\n // Add functionality of scrolling the table.\r\n tableClass.bindDragScroll(scrollerContainer, scrollerElement);\r\n tableClass.addGrabCursonOnMouseDown($(elem).find(\"#create_tables\"));\r\n\r\n // table width fixing\r\n tableClass.handleTableWidth($, $(elem).find(\".gswpts_tables_container\"));\r\n\r\n tableClass.clearOverflow();\r\n\r\n /**\r\n * FE Sorting fix by disable the sorting when has vertical merge \r\n */\r\n var tableRows = document.querySelectorAll('.gswpts_rows');\r\n var verticalMergeFound = false;\r\n if(tableRows){\r\n tableRows.forEach(function (row) {\r\n var cells = row.querySelectorAll('td');\r\n cells.forEach(function (cell, index) {\r\n var rowspan = cell.getAttribute('rowspan');\r\n \r\n if (rowspan && parseInt(rowspan) > 1) {\r\n verticalMergeFound = true;\r\n }\r\n });\r\n });\r\n }\r\n\r\n if (verticalMergeFound) {\r\n $.ajax({\r\n url : front_end_data.admin_ajax,\r\n data : {\r\n action : \"swptls_update_sorting_fe\",\r\n id : id,\r\n nonce : window?.front_end_data?.nonce,\r\n allow_sorting: false, \r\n },\r\n type: \"post\",\r\n success: (res) => {\r\n \r\n },\r\n error: (err) => {\r\n \r\n },\r\n });\r\n\r\n }\r\n // END \r\n \r\n },\r\n error: (err) => {\r\n alert(\"Something went wrong\");\r\n console.error(err);\r\n $(elem)\r\n .find(\".gswpts_tables_content\")\r\n .html(\"Table could not be loaded. Try again\");\r\n },\r\n });\r\n\r\n\r\n \r\n\r\n });\r\n }\r\n }\r\n\r\n new Data_Tables_Async();\r\n });\r\n} else {\r\n jQuery(document).ready(function ($) {\r\n class Data_Tables_Async {\r\n constructor() {\r\n this.frontend_table = $(\".gswpts_tables_container\");\r\n if (front_end_data.asynchronous_loading == \"on\") {\r\n this.events();\r\n } else {\r\n return;\r\n }\r\n }\r\n events() {\r\n this.get_frontend_table();\r\n }\r\n get_frontend_table() {\r\n $.each(this.frontend_table, function (i, elem) {\r\n let id = $(elem).attr(\"id\");\r\n\r\n $.ajax({\r\n url: front_end_data.admin_ajax,\r\n data: {\r\n action: \"gswpts_sheet_fetch\",\r\n id: id,\r\n nonce : window?.front_end_data?.nonce,\r\n },\r\n type: \"post\",\r\n success: (res) => {\r\n let table_settings = res.data.table_settings;\r\n\r\n if (table_settings.responsive_style) {\r\n $(elem).addClass(table_settings.responsive_style);\r\n }\r\n\r\n if (table_settings.show_title) {\r\n $(elem).find(\"h3\").html(res.data.table_name);\r\n }\r\n\r\n $(elem).find(\".gswpts_tables_content\").html(res.data.output);\r\n\r\n $(elem).addClass(\r\n `gswpts_${\r\n table_settings.table_style\r\n ? table_settings.table_style\r\n : \"default-style\"\r\n }`\r\n );\r\n\r\n let table_name = res.data.table_name;\r\n let sheetUrl = res.data.source_url;\r\n\r\n let tableClass = new Global_Table_Config();\r\n\r\n tableClass.table_configuration(\r\n $,\r\n i,\r\n elem,\r\n table_name,\r\n table_settings,\r\n sheetUrl\r\n );\r\n\r\n // tableClass.handleMergedCells($, elem);\r\n // tableClass.clearOverflow();\r\n },\r\n error: (err) => {\r\n alert(\"Something went wrong\");\r\n console.error(err);\r\n $(elem)\r\n .find(\".gswpts_tables_content\")\r\n .html(\"Table could not be loaded. Try again\");\r\n },\r\n });\r\n\r\n\r\n });\r\n }\r\n }\r\n\r\n new Data_Tables_Async();\r\n });\r\n}\r\n","import Global_Table_Config from \"./common_func\";\r\n\r\nif (front_end_data.isProActive) {\r\n jQuery(document).ready(function ($) {\r\n class Data_Tables_Default {\r\n constructor() {\r\n this.frontend_table = $(\".gswpts_tables_container\");\r\n if (front_end_data.asynchronous_loading == \"off\") {\r\n this.events();\r\n } else {\r\n return;\r\n }\r\n }\r\n events() {\r\n this.get_frontend_table();\r\n }\r\n\r\n get_frontend_table() {\r\n $.each(this.frontend_table, function (i, elem) {\r\n let table_settings = JSON.parse($(elem).attr(\"data-table_settings\"));\r\n\r\n let table_name = $(elem).attr(\"data-table_name\");\r\n let sheetUrl = $(elem).attr(\"data-url\");\r\n\r\n let table_obj = new Global_Table_Config();\r\n\r\n table_obj.table_configuration($, i, elem, table_name, table_settings, sheetUrl);\r\n\r\n let scrollerContainer = $(elem).find(\".dataTables_scroll\");\r\n let scrollerElement = $(elem).find(\".dataTables_scrollBody\");\r\n\r\n \r\n //Removed extra header when click the sort icon and has header merge \r\n function handleCommonActions(theadElement) {\r\n console.clear(); // Clearing few basic logs that are not needed to show\r\n \r\n if (theadElement) {\r\n theadElement.style.display = 'none';\r\n }\r\n }\r\n\r\n function handlePagination() {\r\n var createTablesPaginate = document.getElementById('create_tables_paginate');\r\n \r\n if (createTablesPaginate) {\r\n var container = createTablesPaginate.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n }\r\n } \r\n\r\n \r\n // Removed extra header when clicking the sort icon and has header merge\r\n if (scrollerElement) {\r\n var sortingElements = document.querySelectorAll('.sorting');\r\n var dataTablesLength = document.querySelectorAll('.dataTables_length');\r\n var dataTables_filter = document.querySelectorAll('.dataTables_filter');\r\n var createTablesFilterInputs = document.querySelectorAll('.dataTables_filter input');\r\n\r\n var paginateContainer = document.getElementById('create_tables_paginate');\r\n\r\n \r\n // Add a click event listener to each sorting element\r\n sortingElements.forEach(function (sortingElement) {\r\n sortingElement.addEventListener('click', function () {\r\n // Find the .dataTables_scrollBody element within the same container\r\n var container = sortingElement.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n \r\n // Find the element within the .dataTables_scrollBody\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n });\r\n });\r\n \r\n // Add a click event listener to each dataTablesLength element\r\n dataTablesLength.forEach(function (LengthElement) {\r\n LengthElement.addEventListener('click', function () {\r\n var container = LengthElement.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n console.log(\"click on dataTablesLength\");\r\n });\r\n });\r\n \r\n // Add a click event listener to each dataTables_filter element\r\n dataTables_filter.forEach(function (FilterElement) {\r\n FilterElement.addEventListener('click', function () {\r\n var container = FilterElement.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n console.log(\"click on dataTables_filter\");\r\n });\r\n });\r\n \r\n createTablesFilterInputs.forEach(function (createTablesFilterInput) {\r\n createTablesFilterInput.addEventListener('input',function () {\r\n var container = createTablesFilterInput.closest(\".gswpts_tables_container\");\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n console.log(\"click on handleSearchFilter\");\r\n });\r\n });\r\n\r\n /* paginationButtons.forEach(function (paginationButton) {\r\n paginationButton.addEventListener('click', function () {\r\n console.log(\"click on pagination\");\r\n var container = paginationButton.closest(\".gswpts_tables_container\");\r\n console.log(container)\r\n var scrollBody = container.querySelector('.dataTables_scrollBody');\r\n var thead = scrollBody.querySelector('thead');\r\n handleCommonActions(thead);\r\n console.log(\"click on pagination hide\");\r\n \r\n });\r\n }); */\r\n\r\n if (paginateContainer) {\r\n paginateContainer.addEventListener('click', function (event) {\r\n // Check if the clicked element is a paginate button\r\n if (event.target.classList.contains('paginate_button')) {\r\n handlePagination();\r\n console.log(\"click on paginate\");\r\n }\r\n });\r\n }\r\n\r\n }\r\n \r\n // Add functionality of scolling the table\r\n table_obj.bindDragScroll(scrollerContainer, scrollerElement);\r\n table_obj.addGrabCursonOnMouseDown($(elem).find(\"#create_tables\"));\r\n \r\n // Additional code for handling merged cells and text alignment\r\n table_obj.handleMergedCells($, elem);\r\n\r\n table_obj.handleHeaderMergedCells($, elem);\r\n\r\n table_obj.handleTableWidth($, $(elem).find(\".gswpts_tables_container\"));\r\n\r\n table_obj.clearOverflow();\r\n });\r\n }\r\n }\r\n\r\n new Data_Tables_Default();\r\n });\r\n} else {\r\n jQuery(document).ready(function ($) {\r\n class Data_Tables_Default {\r\n constructor() {\r\n this.frontend_table = $(\".gswpts_tables_container\");\r\n if (front_end_data.asynchronous_loading == \"off\") {\r\n this.events();\r\n } else {\r\n return;\r\n }\r\n }\r\n events() {\r\n this.get_frontend_table();\r\n }\r\n\r\n get_frontend_table() {\r\n $.each(this.frontend_table, function (i, elem) {\r\n let table_settings = JSON.parse($(elem).attr(\"data-table_settings\"));\r\n\r\n let table_name = $(elem).attr(\"data-table_name\");\r\n let sheetUrl = $(elem).attr(\"data-url\");\r\n\r\n let table_obj = new Global_Table_Config();\r\n\r\n table_obj.table_configuration($, i, elem, table_name, table_settings, sheetUrl);\r\n // table_obj.handleMergedCells($, elem);\r\n table_obj.clearOverflow();\r\n });\r\n }\r\n }\r\n\r\n new Data_Tables_Default();\r\n });\r\n}\r\n"],"names":["jQuery","document","ready","$","this","events","showFirstTabContent","each","on","e","target","currentTarget","parents","find","removeClass","inputID","data","addClass","attr","match","prop","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","Global_Table_Config","i","elem","table_name","table_settings","sheetUrl","dom","show_x_entries","search_bar","show_info_block","pagination","isProPluginActive","changeCellFormat","cell_format","changeRedirectionType","redirection_type","fn","DataTable","length","table_obj","setPdfUrl","reveal_export_btns","swap_input_filter","swap_bottom_options","type","links","link","formatStyle","tableCell","cell","front_end_data","isProActive","url","split","gridID","spreadsheetID","getSpreadsheetID","getGridID","pdfUrl","append","iconsURL","filePdf","table_object","order","responsive","lengthMenu","pageLength","parseInt","default_rows_per_page","lengthChange","ordering","allow_sorting","destroy","scrollX","numberOfColumns","push","buttons","text","curlyBrackets","className","action","dt","button","config","exportData","dataTable","fileSave","Blob","JSON","stringify","titleAttr","fileCSV","extend","title","fileExcel","printIcon","copySolid","vertical_scrolling","scrollY","hide_on_desktop","hide_on_mobile","screenSize","hide_column","columnDefs","hideColumnByScreen","arrayValues","targets","convertArrayStringToInteger","visible","searchable","screen","width","arr","map","val","export_btns","table_export","forEach","btn","swap_filter_inputs","css","style","flex_direction","table_info_style","margin_left","margin_right","table_paginate_style","bottom_option_style","$arg","tableHeaders","index","header","dataMerge","parse","numCols","nextCell","next","hasClass","dataIndex","j","targetIndex","targetCell","join","trim","hide","prevObject","container","row","totalWidth","getBoundingClientRect","console","log","test","navigator","userAgent","detectBrowser","tableScrollBody","querySelectorAll","element","parentElement","classList","contains","overflow","height","maxHeight","indexOf","documentMode","tableCells","innerText","$container","$scroller","$window","window","x","x2","y2","t","move","evt","_x","pageX","deltaX","pageY","scrollLeft","up","off","deltaT","Date","now","deltaY","stop","animate","scrollTop","b","c","d","Math","sqrt","preventDefault","originalEvent","max","scrollWidth","offsetWidth","dir","wheelDeltaX","mousedown","cursor","mouseup","frontend_table","asynchronous_loading","get_frontend_table","id","ajax","admin_ajax","nonce","success","res","tableClass","responsive_style","import_styles","table_style","show_title","html","output","name","source_url","table_configuration","scrollerContainer","scrollerElement","handleCommonActions","theadElement","clear","display","sortingElements","dataTablesLength","dataTables_filter","createTablesFilterInputs","paginateContainer","getElementById","sortingElement","addEventListener","closest","querySelector","LengthElement","FilterElement","createTablesFilterInput","event","createTablesPaginate","handleMergedCells","handleHeaderMergedCells","bindDragScroll","addGrabCursonOnMouseDown","handleTableWidth","clearOverflow","tableRows","verticalMergeFound","rowspan","getAttribute","error","err","alert"],"sourceRoot":""}