{"version":3,"sources":["borders-manage-run.js","list-tooltip.js","sticky-column.js","sticky-row.js","styled-list-tooltip.js","styled-list.js","WPTB_BordersManage.js","WPTB_TableDirectives.js"],"names":["document","addEventListener","e","tables","querySelectorAll","responsiveFront","detail","i","length","WPTB_BordersManage","table","bordersInitialization","sortingTable","Array","from","map","t","classList","alignment","some","c","match","RegExp","exec","liElement","tooltip","querySelector","textElement","savedInnerHtml","innerHTML","concat","textPosObj","getBoundingClientRect","liPosObject","textElementRelativePosObj","Math","abs","x","y","calculatedPos","left","top","offsetHeight","height","posXAxisLeft","offsetWidth","posXAxisRight","width","multiplier","posYAxisTop","posYAxisBottom","setAttribute","calculateTooltipPosition","window","StickyTableComponent","_ref","_this","this","mainTable","matrixContainer","parentContainer","stickyTable","originalFirstColumnCells","stickyFirstColumnCells","stickyStyleAndPosition","style","toFixed","minWidth","add","paddingLeft","_window$getComputedSt2","getComputedStyle","paddingTop","setTimeout","originalCell","originalCellIndex","originalCellHeight","calculateElementBg","element","documentElement","colorValue","backgroundColor","type","_match$groups","_wrapRegExp","opacity","groups","Number","parseInt","parentNode","assignCellBg","cell","getFirstColumnCells","targetTableElement","firstColumnRowIndex","firstColumnCells","rowElement","rowIndex","cellIndex","rowspanAttr","rowSpan","push","setVisibility","status","dataset","visible","init","promises","clonedTable","cloneNode","includes","removeChild","generateStickyTableClone","imageElement","Promise","res","complete","naturalHeight","all","then","insertAdjacentElement","verticalScrollAmount","scrollLeft","scrolled","startOperation","tableObject","stickyComponent","responsiveStatus","wptbResponsiveFrontendInstance","isResponsiveEnabledForCurrentBreakpoint","stickyStatus","wptbFirstColumnSticky","WptbFrontendBase","getTableObjects","forEach","stickyRow","stickyHeight","tableTop","tableEnd","firstRow","getAttribute","tablePosition","scrollPosition","pageYOffset","bottom","maxWidth","col","getPropertyValue","scroll","remove","li","position","tooltipTipPad","target","p","newStyle","replace","options","arguments","undefined","WPTB_RecalculateIndexes","thisObject","itemsPerHeader","tableMaxCols","maxCols","cellsStylesScheme","tableDirectives","WPTB_TableDirectives","typeFirst","typeSecond","borderRadiusVal","switchMode","getDirective","WPTB_GetDirectionAfterReconstruction","_typeof","hasOwnProperty","switchModeObj","tableOld","newTable","switchBorderOnlyColumnRow","borderRadiusesSet","spaceBorderSpacingExchange","call","value","tds","_toConsumableArray","setDirective","td","borderRadius","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","rowsLength","rows","dataYIndexStart","borderWidth","innerBordersSet","tableRows","columnCount","firstRowTdLast","firstRowTds","children","xIndex","colSpan","row","previousSibling","borderRightWidth","nextSibling","borderLeftWidth","_ret","rowsCount","v","borderBottomWidth","tdsBetween","tdsBottom","tdsRow","borderTopWidth","getElementsByTagName","typeNumber","borderSpacing","split","reverse","join","rowBgColorReplaceToCellBgColor","color","trs","tr","wptbBgColor","changeRowBgColor","tblRow","selector","bgColor","wptbRowBgColor","orgColor","changeColumnBgColor","index","wptbColumnBgColor","wptbOwnBgColor","tableDirectivesDataKey","getDirectives","encodedTableDirectives","JSON","parse","atob","saveDirectives","btoa","stringify","way","field"],"mappings":"orIACAA,SAASC,iBAAiB,mBAAoB,SAAUC,IACpD,SAAsBA,GAGlB,IAFA,IAAMC,EAASH,SAASI,iBAAiB,uBACnCC,EAAkBH,EAAEI,OAAOD,gBACxBE,EAAI,EAAGA,EAAIJ,EAAOK,OAAQD,IACT,IAAIE,mBAAmB,CAAEC,MAAOP,EAAOI,KAC/CI,sBAAsBN,GAG5CO,CAAaV,KACd,GCXHF,SAASC,iBAAiB,mBAAoB,WAQdY,MAAMC,KAAKd,SAASI,iBAAiB,uCAE7CW,IAAI,SAAAC,GAChB,IAAMC,EAAYJ,MAAMC,KAAKE,EAAEC,WAE3BC,EAAY,MAGhBD,EAAUE,KAAK,SAAAC,GAELC,EADQ,IAAIC,OAAO,wBACLC,KAAKH,GAEzB,OAAc,OAAVC,IACAH,EAAYG,EAAM,IACX,KAMfL,EAAEf,iBAAiB,aAAc,YAWrC,SAAkCu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,EAAMD,EAAIjP,IAI1B,OAAOgL,GAGX9H,KAAKiI,aAAe,SAAU8D,EAAKjE,GAC/B9H,KAAK6G,gBAAkB7G,KAAKuL,gBACxBvL,KAAK6G,kBAAiB7G,KAAK6G,gBAAkB,IAEjD,IADA,IAAImF,EAAQhM,KAAK6G,gBACT/J,EAAI,EAAGA,EAAIiP,EAAIhP,OAAQD,IAAK,CAEhC,GAAGA,IAAMiP,EAAIhP,OAAS,EAAG,CACrBiP,EAAMD,EAAIjP,IAAMgL,EAChB9H,KAAK4L,iBACL,MAEAI,EAAM1E,eAAeyE,EAAIjP,MACzBkP,EAAMD,EAAIjP,IAAM,IAGpBkP,EAAQA,EAAMD,EAAIjP,MAI1BkD,KAAK6G,gBAAkB7G,KAAKuL","file":"wptb-pro.js","sourcesContent":["\ndocument.addEventListener('responsive:front', function (e){\n function sortingTable(e) {\n const tables = document.querySelectorAll('.wptb-preview-table');\n const responsiveFront = e.detail.responsiveFront;\n for (let i = 0; i < tables.length; i++) {\n const bordersManage = new WPTB_BordersManage({ table: tables[i] });\n bordersManage.bordersInitialization(responsiveFront);\n }\n }\n sortingTable(e);\n}, false)\n\n","document.addEventListener('DOMContentLoaded', function () {\n\n /**\n * Add realtime tooltip position recalculation support for list elements.\n *\n * There are so many factors that will affect the layout of table. Because of this, dynamically calculation the tooltip position will yield better results.\n */\n function listToolTipSupport() {\n const tooltipElements = Array.from(document.querySelectorAll('.wptb-list-container .wptb-tooltip'));\n\n tooltipElements.map(t => {\n const classList = Array.from(t.classList);\n\n let alignment = 'top';\n\n // get alignment of list tooltip element\n classList.some(c => {\n const regex = new RegExp(/^wptb-tooltip-(.+)$/g);\n const match = regex.exec(c);\n\n if (match !== null) {\n alignment = match[1];\n return true;\n }\n return false;\n });\n\n // bind calculation to mouseenter event\n t.addEventListener('mouseenter', () => {\n calculateTooltipPosition(t,alignment);\n })\n });\n\n /**\n * Calculate tooltip position of list element.\n *\n * @param {HTMLElement} liElement list element\n * @param {string} alignment alignment type, possible values are top, right, bottom, left\n */\n function calculateTooltipPosition(liElement, alignment) {\n const tooltip = liElement.querySelector('.tooltip');\n const textElement = liElement.querySelector('p');\n\n // tip padding value\n const tooltipTipPad = 10;\n\n // save html content of text element for future restore\n const savedInnerHtml = textElement.innerHTML;\n\n // wrapping text content of p element with a span value to calculate the correct size for its text content\n textElement.innerHTML = `${savedInnerHtml}`;\n\n const textPosObj = textElement.querySelector('#sizeCalculator').getBoundingClientRect();\n const liPosObject = liElement.getBoundingClientRect();\n\n // calculate the position of text element relative to list element\n const textElementRelativePosObj = {\n left: Math.abs(liPosObject.x - textPosObj.x),\n top: Math.abs(liPosObject.y - textPosObj.y)\n }\n\n // position object for final tooltip element position\n const calculatedPos = {\n left: 0,\n top: 0,\n }\n\n // calculate for position left and right\n if (alignment === 'left' || alignment === 'right') {\n calculatedPos.top = textElementRelativePosObj.top - (tooltip.offsetHeight / 2) + (textPosObj.height / 2);\n\n // position left multiplier\n const posXAxisLeft = -(tooltip.offsetWidth + tooltipTipPad);\n\n // position right multiplier\n const posXAxisRight = textPosObj.width + tooltipTipPad;\n\n const multiplier = alignment === 'left' ? posXAxisLeft : posXAxisRight;\n calculatedPos.left = textElementRelativePosObj.left + multiplier;\n } else {\n calculatedPos.left = textElementRelativePosObj.left + (textPosObj.width / 2) - (tooltip.offsetWidth / 2);\n\n // position top multiplier\n const posYAxisTop = -(tooltip.offsetHeight + tooltipTipPad);\n\n // position bottom multiplier\n const posYAxisBottom = textPosObj.height + tooltipTipPad;\n\n const multiplier = alignment === 'top' ? posYAxisTop : posYAxisBottom;\n calculatedPos.top = textElementRelativePosObj.top + multiplier;\n }\n\n textElement.innerHTML = savedInnerHtml;\n\n tooltip.setAttribute('style', `left: ${calculatedPos.left}px; top: ${calculatedPos.top}px`);\n }\n }\n\n listToolTipSupport();\n});\n\n","window.addEventListener('DOMContentLoaded', () => {\n /**\n * Sticky table component.\n *\n * @param {WptbTableObject} prop0 table object\n * @param {HTMLTableElement} prop0.mainTable target table\n * @param {Node} prop0.matrixContainer matrix container element\n * @param {Node} prop0.parentContainer parent container element\n * @constructor\n */\n function StickyTableComponent({mainTable, matrixContainer, parentContainer}) {\n /**\n * Default background color for cells.\n * @type {string}\n */\n const defaultCellBg = 'rgb(1,1,1)';\n\n /**\n * Cloned and stickied table.\n * @type {null | HTMLTableElement}\n */\n this.stickyTable = null;\n\n /**\n * First column cells in original table.\n * @type {Array}\n */\n this.originalFirstColumnCells = [];\n\n /**\n * First column cells of sticky table.\n * @type {Array}\n */\n this.stickyFirstColumnCells = [];\n\n /**\n * Calculate overall width for first column of table.\n * Final value will be fixed to 2 fraction digits.\n */\n const calculateFirstColumnWidth = () => {\n const firstColumCell = mainTable.querySelector('td');\n return firstColumCell.getBoundingClientRect().width.toFixed(2);\n }\n\n /**\n * Calculate cell heights of sticky cells.\n */\n const calculateStickyCellHeights = () => {\n setTimeout(() => {\n this.originalFirstColumnCells.map((originalCell, originalCellIndex) => {\n const {height: originalCellHeight} = window.getComputedStyle(originalCell);\n\n this.stickyFirstColumnCells[originalCellIndex].style.height = originalCellHeight;\n })\n }, 100);\n }\n\n /**\n * Sticky table style and position calculations\n */\n const stickyStyleAndPosition = () => {\n // calculate width\n this.stickyTable.style.width = `${calculateFirstColumnWidth(mainTable)}px`;\n this.stickyTable.style.minWidth = 'unset';\n\n this.stickyTable.classList.add('wptb-pro-sticky-column-table');\n\n // calculate position\n const {paddingLeft, paddingTop} = window.getComputedStyle(matrixContainer);\n this.stickyTable.style.left = paddingLeft;\n this.stickyTable.style.top = paddingTop;\n\n // calculate height of sticky cells\n calculateStickyCellHeights();\n }\n\n\n /**\n * Get opacity of given rgb/rgba color.\n * @param {String} colorValue rgb/rgba color value\n *\n * @return {Number} opacity value\n */\n const colorOpacity = (colorValue) => {\n const match = colorValue.match(/(?.+)\\((.+\\,\\s?(?.+)\\s?)\\)/);\n\n const {type, opacity} = match?.groups;\n\n if (type && type === 'rgba') {\n if (opacity) {\n return Number.parseInt(opacity, 10);\n }\n }\n\n return 1;\n }\n\n /**\n * Find suitable background color for elements.\n * @param {Node} element element\n * @return {String} calculated element bg color\n */\n const calculateElementBg = (element) => {\n // if element is document root, assign default color\n if (element === document.documentElement) {\n return defaultCellBg;\n }\n\n const {backgroundColor} = window.getComputedStyle(element);\n const opacity = colorOpacity(backgroundColor);\n\n if (opacity === 1) {\n return backgroundColor;\n }\n\n return calculateElementBg(element.parentNode);\n }\n\n\n /**\n * Assign cell background color if they are transparent.\n * @param {HTMLTableCellElement} cell table cell\n */\n const assignCellBg = (cell) => {\n cell.style.backgroundColor = calculateElementBg(cell);\n }\n\n /**\n * Get first column cells of target table.\n * @param {HTMLTableElement} targetTableElement target table\n * @return {Array} first column cells\n */\n const getFirstColumnCells = (targetTableElement) => {\n // index to mark rows with first column, will be used to identify and support cells with rowSpan values higher than 1\n let firstColumnRowIndex = 0;\n\n let firstColumnCells = [];\n\n Array.from(targetTableElement.querySelectorAll('tr')).map((rowElement, rowIndex) => {\n Array.from(rowElement.querySelectorAll('td')).map((cell, cellIndex) => {\n if (firstColumnRowIndex === rowIndex) {\n if (cellIndex === 0) {\n let rowspanAttr = cell.rowSpan ? Number.parseInt(cell.rowSpan, 10) : 1;\n\n firstColumnRowIndex += rowspanAttr;\n firstColumnCells.push(cell);\n }\n }\n })\n })\n\n return firstColumnCells;\n }\n\n /**\n * Generate sticky clone of the first column.\n */\n const generateStickyTableClone = () => {\n this.originalFirstColumnCells = getFirstColumnCells(mainTable);\n\n // assign cell background colors especially to support transparent rows/cells\n this.originalFirstColumnCells.map(assignCellBg);\n\n const clonedTable = mainTable.cloneNode(true);\n\n this.stickyFirstColumnCells = getFirstColumnCells(clonedTable);\n\n\n Array.from(clonedTable.querySelectorAll('tr')).map((rowElement) => {\n Array.from(rowElement.querySelectorAll('td')).map((cell) => {\n if (!this.stickyFirstColumnCells.includes(cell)) {\n rowElement.removeChild(cell);\n }\n })\n })\n\n return clonedTable;\n }\n\n /**\n * Operations related to table matrix container.\n */\n const matrixContainerOperations = () => {\n matrixContainer.classList.add('wptb-pro-sticky-matrix-container');\n matrixContainer.insertAdjacentElement('beforeend', this.stickyTable);\n }\n\n /**\n * Add listener to various events.\n */\n const attachToEvents = () => {\n parentContainer.addEventListener('scroll', () => {\n const verticalScrollAmount = parentContainer.scrollLeft;\n this.stickyTable.dataset.scrolled = verticalScrollAmount > 0;\n this.stickyTable.style.left = `${verticalScrollAmount}px`;\n }, true);\n }\n\n /**\n * Set visibility for sticky table.\n * @param {boolean} status visibility status\n */\n this.setVisibility = (status) => {\n this.stickyTable.dataset.visible = status;\n }\n\n /**\n * Check for disruptions that may change dimensions of table after loaded.\n *\n * @return {Promise} promise object which will be resolved when all layout disruptions are resolved\n */\n const checkLayoutDisruptions = () => {\n const tableImages = Array.from(this.stickyTable.querySelectorAll('img'));\n\n const promises = tableImages.map(imageElement => {\n return new Promise(res => {\n if (imageElement.complete && imageElement.naturalHeight !== 0) {\n return res();\n } else {\n imageElement.addEventListener('loaded', () => {\n return res();\n })\n imageElement.addEventListener('error', () => {\n return res();\n })\n }\n })\n })\n\n return Promise.all(promises);\n }\n\n /**\n * Initialize component.\n */\n this.init = () => {\n // generate sticky table element\n // in order to support recalculation of sticky table properties upon events (e.g. window resize), check for the availability of an already generated sticky table\n if (!this.stickyTable) {\n this.stickyTable = generateStickyTableClone();\n }\n\n checkLayoutDisruptions().then(() => {\n // wait period to give browser time to paint images to DOM\n setTimeout(() => {\n // style and position related operations\n stickyStyleAndPosition();\n\n // matrix container related operations\n matrixContainerOperations();\n\n // attach to various events\n attachToEvents();\n }, 500);\n })\n }\n }\n\n /**\n * WPTB sticky column.\n * @constructor\n */\n function WptbStickyColumn() {\n /**\n * Attach to various events to support functionality\n *\n * @param {StickyTableComponent} stickyComponent sticky component\n */\n const attachToEvents = (stickyComponent) => {\n window.addEventListener('resize', () => {\n stickyComponent.setVisibility(!wptbResponsiveFrontendInstance.isResponsiveEnabledForCurrentBreakpoint(stickyComponent.stickyTable));\n })\n\n }\n\n /**\n * Start sticky column operation.\n *\n * @param {WptbTableObject} tableObject table object\n */\n const startOperation = (tableObject) => {\n const {mainTable} = tableObject;\n\n const responsiveStatus = wptbResponsiveFrontendInstance.isResponsiveEnabledForCurrentBreakpoint(mainTable);\n\n const stickyStatus = mainTable.dataset.wptbFirstColumnSticky === 'true' || mainTable.dataset.wptbFirstColumnSticky === '1';\n\n // only initialize sticky column operations if responsive mode is disabled and operation is enabled for target table\n if (!responsiveStatus && stickyStatus) {\n const stickyComponent = new StickyTableComponent(tableObject);\n stickyComponent.init();\n attachToEvents(stickyComponent);\n }\n }\n\n /**\n * Initialize sticky column.\n */\n this.init = () => {\n WptbFrontendBase.getTableObjects().map(startOperation);\n }\n }\n\n // initialize sticky column\n new WptbStickyColumn().init();\n})\n","document.addEventListener('DOMContentLoaded', function() {\n \n function topRowSticky() {\n const tables = document.querySelectorAll('.wptb-preview-table');\n \n if (tables.length > 0) {\n tables.forEach(table => {\n let firstRow = table.querySelector('tbody > tr:first-child');\n\n let isStickyHeader = firstRow.getAttribute('data-wptb-sticky-row');\n if (isStickyHeader == 'true') {\n tableStickyHeader(table, firstRow);\n }\n });\n }\n \n \n function tableStickyHeader(table, stickyRow) {\n const tablePosition = table.getBoundingClientRect();\n const stickyHeight = stickyRow.getBoundingClientRect().height;\n const scrollPosition = window.pageYOffset;\n const tableTop = tablePosition.top + scrollPosition;\n const tableEnd = (tablePosition.bottom - stickyHeight) + scrollPosition;\n\n stickyRow.style.maxWidth = tablePosition.width + 'px';\n\n const columnsInRow = Array.from(stickyRow.querySelectorAll('td'));\n columnsInRow.map(col => {\n let style = window.getComputedStyle(col);\n let width = style.getPropertyValue('width');\n col.style.width = width;\n });\n\n // Add Scroll Event for Adding or Removing class\n document.addEventListener('scroll', function() {\n let scroll = window.pageYOffset;\n\n if ( scroll > (tableTop + stickyHeight) && scroll < tableEnd) {\n stickyRow.classList.add('wptb-sticky-header');\n } \n \n if ( scroll > tableEnd || scroll < tableTop ){\n stickyRow.classList.remove('wptb-sticky-header');\n }\n });\n }\n }\n\n topRowSticky();\n});\n","document.addEventListener('DOMContentLoaded', function () {\n\n /**\n * Add realtime tooltip position recalculation support for list elements.\n *\n * There are so many factors that will affect the layout of table. Because of this, dynamically calculation the tooltip position will yield better results.\n */\n function styledListToolTipSupport() {\n const tooltipElements = Array.from(document.querySelectorAll('.wptb-styled_list-container .wptb-tooltip'));\n\n tooltipElements.map(t => {\n const classList = Array.from(t.classList);\n\n let alignment = 'top';\n\n // get alignment of list tooltip element\n classList.some(c => {\n const regex = new RegExp(/^wptb-tooltip-(.+)$/g);\n const match = regex.exec(c);\n\n if (match !== null) {\n alignment = match[1];\n return true;\n }\n return false;\n });\n\n // bind calculation to mouseenter event\n t.addEventListener('mouseenter', (e) => {\n calculateTooltipPosition(e.target,alignment);\n })\n });\n\n /**\n * Calculate tooltip position of list element.\n *\n * @param {HTMLElement} liElement list element\n * @param {string} alignment alignment type, possible values are top, right, bottom, left\n */\n function calculateTooltipPosition(li, position) {\n const tooltip = li.querySelector('.tooltip');\n const textElement = li.querySelector('p');\n\n // tip padding value\n const tooltipTipPad = 10;\n\n // save html content of text element for future restore\n const savedInnerHtml = textElement.innerHTML;\n\n // wrapping text content of p element with a span value to calculate the correct size for its text content\n textElement.innerHTML = `${savedInnerHtml}`;\n\n const textPosObj = textElement.querySelector('#sizeCalculator').getBoundingClientRect();\n\n const liPosObject = li.getBoundingClientRect();\n\n // calculate the position of text element relative to list element\n const textElementRelativePosObj = {\n left: Math.abs(liPosObject.x - textPosObj.x),\n top: Math.abs(liPosObject.y - textPosObj.y)\n }\n\n // position object for final tooltip element position\n const calculatedPos = {\n left: 0,\n top: 0,\n }\n\n // calculate for position left and right\n if (position === 'left' || position === 'right') {\n calculatedPos.top = textElementRelativePosObj.top - (tooltip.offsetHeight / 2) + (textPosObj.height / 2) - (tooltipTipPad/2);\n\n // position left multiplier\n const posXAxisLeft = -(tooltip.offsetWidth + tooltipTipPad);\n\n // position right multiplier\n const posXAxisRight = textPosObj.width + tooltipTipPad;\n\n const multiplier = position === 'left' ? posXAxisLeft : posXAxisRight;\n calculatedPos.left = textElementRelativePosObj.left + multiplier;\n } else {\n calculatedPos.left = textElementRelativePosObj.left + (textPosObj.width / 2) - (tooltip.offsetWidth / 2);\n\n // position top multiplier\n const posYAxisTop = -(tooltip.offsetHeight + tooltipTipPad);\n\n // position bottom multiplier\n const posYAxisBottom = textPosObj.height + tooltipTipPad;\n\n const multiplier = position === 'top' ? posYAxisTop : posYAxisBottom;\n calculatedPos.top = textElementRelativePosObj.top + multiplier;\n }\n\n textElement.innerHTML = savedInnerHtml;\n\n tooltip.setAttribute('style', `left: ${calculatedPos.left}px; top: ${calculatedPos.top}px`);\n }\n }\n\n styledListToolTipSupport();\n});\n\n","/**\n * Styled list element related frontend js scripts.\n */\ndocument.addEventListener('DOMContentLoaded', () => {\n /**\n * Fix for vertical spacing between icon and text components of styled list element being overridden by both plugin and theme styles.\n */\n function marginFix() {\n const listP = Array.from(document.querySelectorAll('.wptb-styled_list-container li p'));\n\n listP.map(p => {\n const styleAttr = p.getAttribute('style');\n const newStyle = styleAttr.replace(/margin-left: (\\d+)px/, '$& !important');\n p.setAttribute('style', newStyle);\n })\n }\n\n marginFix();\n})\n","var WPTB_BordersManage = function (options = {}) {\n let table = options.table;\n this.table = options.table;\n WPTB_RecalculateIndexes(table);\n const thisObject = this;\n this.itemsPerHeader = 0;\n this.tableMaxCols = table.maxCols;\n this.cellsStylesScheme = {};\n\n const tableDirectives = new WPTB_TableDirectives(table);\n\n /**\n * checks whether the table should be in the sort state\n * and connects the necessary handlers\n *\n * @param {object} responsiveFront\n */\n this.bordersInitialization = function(responsiveFront) {\n let typeFirst;\n let typeSecond;\n let borderRadiusVal;\n if(tableDirectives.getDirective(['innerBorders', 'active']) === 'row') {\n typeFirst = 'row';\n typeSecond = 'column';\n } else if(tableDirectives.getDirective(['innerBorders', 'active']) === 'column') {\n typeFirst = 'column';\n typeSecond = 'row';\n }\n if(tableDirectives.getDirective(['innerBorders', 'borderRadiuses']))\n borderRadiusVal = tableDirectives.getDirective(['innerBorders', 'borderRadiuses', tableDirectives.getDirective(['innerBorders', 'active'])]);\n if(!typeFirst || typeof typeFirst !== 'string' || !typeSecond || typeof typeSecond !== 'string') return;\n\n let switchMode = WPTB_GetDirectionAfterReconstruction(this.table, typeFirst, typeSecond, 'column', responsiveFront);\n\n if(typeof switchMode === 'object' && switchMode.hasOwnProperty('switch')) {\n function borderRadiusesSetRun (e) {\n let switchModeObj = switchMode.switch(e);\n if(typeof switchModeObj === 'object') {\n this.itemsPerHeader = switchModeObj.itemsPerHeader;\n if(switchModeObj.hasOwnProperty('newTable')) {\n let tableOld = this.table;\n this.table = switchModeObj.newTable;\n this.switchBorderOnlyColumnRow(switchModeObj.type[0]);\n this.borderRadiusesSet(switchModeObj.type[0], borderRadiusVal);\n this.spaceBorderSpacingExchange(switchModeObj.type[1]);\n this.table = tableOld;\n } else {\n this.switchBorderOnlyColumnRow(switchModeObj.type[0]);\n this.borderRadiusesSet(switchModeObj.type[0], borderRadiusVal);\n this.spaceBorderSpacingExchange(switchModeObj.type[1]);\n }\n }\n }\n //borderRadiusesSetRun.call(thisObject);\n this.table.addEventListener(\n 'table:rebuilt',\n function (e) {\n borderRadiusesSetRun.call(thisObject, e);\n },\n false\n );\n }\n }\n\n /**\n * sets border Radiuses for necessary Cells\n *\n * @param {string} type\n * @param {string} value\n */\n this.borderRadiusesSet = function (type, value) {\n if(!parseInt(value, 10)){\n value = null;\n }\n let tds = this.table.querySelectorAll('td');\n tds = [...tds];\n if(type === 'all') {\n tableDirectives.setDirective(['innerBorders', 'borderRadiuses', 'all'], value);\n if(value) {\n value = value + 'px';\n }\n tds.map(td => {\n td.style.borderRadius = value;\n })\n } else if(type === 'row') {\n tableDirectives.setDirective(['innerBorders', 'borderRadiuses', 'row'], value);\n tds.map(td => {\n td.style.borderRadius = null;\n })\n if(value) {\n let tds1 = this.table.querySelectorAll('tr td:first-child');\n tds1 = [...tds1];\n tds1.map(td => {\n td.style.borderTopLeftRadius = value + 'px';\n td.style.borderBottomLeftRadius = value + 'px';\n })\n\n let tds2 = this.table.querySelectorAll('tr td:last-child');\n tds2 = [...tds2];\n tds2.map(td => {\n td.style.borderTopRightRadius = value + 'px';\n td.style.borderBottomRightRadius = value + 'px';\n })\n }\n } else if(type === 'column') {\n tableDirectives.setDirective(['innerBorders', 'borderRadiuses', 'column'], value);\n tds.map(td => {\n td.style.borderRadius = null;\n })\n if(value) {\n let rowsLength = this.table.rows.length;\n let dataYIndexStart = 0;\n while (rowsLength > 0) {\n let tdsTop = this.table.querySelectorAll(`[data-y-index=\"${dataYIndexStart}\"]`);\n tdsTop = [...tdsTop];\n tdsTop.map((td) => {\n td.style.borderTopLeftRadius = value + 'px';\n td.style.borderTopRightRadius = value + 'px';\n });\n\n let tdsBottom;\n if(this.itemsPerHeader && dataYIndexStart + this.itemsPerHeader < rowsLength && dataYIndexStart + 1 < rowsLength) {\n tdsBottom = this.table.querySelectorAll(`[data-y-index=\"${dataYIndexStart + this.itemsPerHeader}\"]`);\n } else {\n tdsBottom = this.table.querySelectorAll('tr:last-child td');\n }\n\n tdsBottom = [...tdsBottom];\n tdsBottom.map((td) => {\n td.style.borderBottomLeftRadius = value + 'px';\n td.style.borderBottomRightRadius = value + 'px';\n });\n\n if (this.itemsPerHeader) {\n rowsLength -= this.itemsPerHeader + 1;\n dataYIndexStart += this.itemsPerHeader + 1;\n } else {\n rowsLength = 0;\n }\n }\n }\n }\n };\n\n this.switchBorderOnlyColumnRow = function (type) {\n let borderWidth = tableDirectives.getDirective(['innerBorders', 'borderWidth']);\n this.innerBordersSet(borderWidth);\n\n if (type === 'row') {\n let tableRows = this.table.rows;\n let columnCount = 0;\n if (tableRows.length > 0) {\n let firstRow = tableRows[0];\n let firstRowTds = firstRow.children;\n firstRowTds = [...firstRowTds];\n let firstRowTdLast = firstRowTds[firstRowTds.length - 1]\n columnCount = parseInt(firstRowTdLast.dataset.xIndex) + firstRowTdLast.colSpan;\n }\n\n tableRows = [...tableRows];\n\n tableRows.map(row => {\n let tds = row.children;\n tds = [...tds];\n tds.map(td => {\n if(td.previousSibling === null) {\n if (td.colSpan < columnCount) {\n td.style.borderRightWidth = '0px';\n }\n } else if(td.nextSibling === null) {\n td.style.borderLeftWidth = '0px';\n } else {\n td.style.borderRightWidth = '0px';\n td.style.borderLeftWidth = '0px';\n }\n });\n });\n tableDirectives.setDirective(['innerBorders', 'active'], 'row');\n } else if (type === 'column') {\n let tableRows = this.table.rows;\n let rowsCount = tableRows.length;\n if (rowsCount <= 1) return;\n\n let rowsLength = this.table.rows.length;\n let dataYIndexStart = 0;\n while (rowsLength > 0) {\n let tdsTop = this.table.querySelectorAll(`[data-y-index=\"${dataYIndexStart}\"]`);\n tdsTop = [...tdsTop];\n tdsTop.map((td) => {\n if (td.rowSpan < rowsCount) {\n td.style.borderBottomWidth = '0px';\n }\n });\n\n let tdsBetween = [];\n let tdsBottom;\n if(this.itemsPerHeader && dataYIndexStart + this.itemsPerHeader < rowsLength && dataYIndexStart + 1 < rowsLength) {\n for(let i = dataYIndexStart + 1; i < dataYIndexStart + this.itemsPerHeader; i++) {\n let tdsRow = this.table.querySelectorAll(`[data-y-index=\"${i}\"]`);\n tdsRow = [...tdsRow];\n tdsBetween = tdsBetween.concat(tdsRow);\n }\n\n tdsBottom = this.table.querySelectorAll(`[data-y-index=\"${dataYIndexStart + this.itemsPerHeader}\"]`);\n } else {\n for(let i = dataYIndexStart + 1; i < this.table.rows.length - 1; i++) {\n let tdsRow = this.table.querySelectorAll(`[data-y-index=\"${i}\"]`);\n tdsRow = [...tdsRow];\n tdsBetween = tdsBetween.concat(tdsRow);\n }\n\n tdsBottom = this.table.querySelectorAll('tr:last-child td');\n }\n\n tdsBetween.map(td => {\n td.style.borderTopWidth = '0px';\n td.style.borderBottomWidth = '0px';\n })\n\n tdsBottom = [...tdsBottom];\n tdsBottom.map((td) => {\n td.style.borderTopWidth = '0px';\n });\n\n if (this.itemsPerHeader) {\n rowsLength -= this.itemsPerHeader + 1;\n dataYIndexStart += this.itemsPerHeader + 1;\n } else {\n rowsLength = 0;\n }\n }\n\n tableDirectives.setDirective(['innerBorders', 'active'], 'column');\n } else if (type == 'all') {\n tableDirectives.setDirective(['innerBorders', 'active'], 'all');\n }\n }\n\n this.innerBordersSet = function (value) {\n let tds = this.table.getElementsByTagName('td');\n tds = [...tds];\n tds.map(td => {\n td.style.borderWidth = value + 'px';\n });\n\n tableDirectives.setDirective(['innerBorders', 'borderWidth'], value);\n tableDirectives.setDirective(['innerBorders', 'active'], 'all');\n }\n\n this.spaceBorderSpacingExchange = function (typeNumber) {\n if(this.table.style.borderSpacing) {\n if((typeNumber === 2 && !tableDirectives.getDirective(['innerBorders', 'borderSpacing', 'exchangeNum'])) ||\n (typeof tableDirectives.getDirective(['innerBorders', 'borderSpacing', 'exchangeNum']) === 'number' &&\n tableDirectives.getDirective(['innerBorders', 'borderSpacing', 'exchangeNum']) !== typeNumber)){\n this.table.style.borderSpacing = this.table.style.borderSpacing.split(' ').reverse().join(' ');\n tableDirectives.setDirective(['innerBorders', 'borderSpacing', 'exchangeNum'], typeNumber);\n }\n }\n }\n\n this.rowBgColorReplaceToCellBgColor = function (color) {\n let borderRadiusVal = tableDirectives.getDirective(['innerBorders', 'borderRadiuses', tableDirectives.getDirective(['innerBorders', 'active'])]);\n let type;\n if(borderRadiusVal > 0) {\n type = true;\n } else {\n type = false;\n }\n // if(type && this.table.dataset.rowsBgColorSetToCells && !color) {\n // return;\n // } else if(type) {\n // this.table.dataset.rowsBgColorSetToCells = '1';\n // } else if(this.table.dataset.rowsBgColorSetToCells){\n // delete this.table.dataset.rowsBgColorSetToCells;\n // } else {\n // return;\n // }\n let trs = this.table.querySelectorAll('tr');\n\n for (let i = 0; i < trs.length; i++) {\n let tr = trs[i];\n if(!tr) continue;\n // @deprecated\n // let tds = tr.querySelectorAll('td');\n\n let rowBgColor;\n if(!tr.dataset.wptbBgColor) {\n let trStyles = window.getComputedStyle(tr, null);\n rowBgColor = trStyles.getPropertyValue('background-color');\n // @deprecated in favor of background menu\n // tr.dataset.wptbBgColor = rowBgColor;\n } else {\n rowBgColor = tr.dataset.wptbBgColor;\n }\n if(type === true) {\n tr.style.backgroundColor = '#ffffff00';\n } else {\n tr.style.backgroundColor = tr.dataset.wptbBgColor ? tr.dataset.wptbBgColor : null;\n }\n\n // @deprecated\n // for(let j = 0; j < tds.length; j++) {\n // let td = tds[j];\n // if(type === true) {\n // if(!td.dataset.wptbOwnBgColor) {\n // td.style.backgroundColor = rowBgColor;\n // td.dataset.wptbBgColorFromRow = rowBgColor;\n // }\n // } else {\n // if(!td.dataset.wptbOwnBgColor) {\n // td.style.backgroundColor = null;\n // delete td.dataset.wptbBgColorFromRow;\n // }\n // }\n // }\n }\n }\n\n this.changeRowBgColor = function (tblRow, selector) {\n const bgColor = selector.dataset.wptbRowBgColor;\n const orgColor = tblRow.getAttribute('org-bg-color');\n\n if (bgColor) {\n // @deprecated in favor of background menu\n // tblRow.dataset.wptbBgColor = bgColor;\n\n if (orgColor) tblRow.setAttribute('org-bg-color', bgColor);\n else tblRow.style.backgroundColor = bgColor;\n }\n }\n \n this.changeColumnBgColor = function (selector) {\n const index = parseInt(selector.dataset.xIndex) + 1;\n const bgColor = selector.dataset.wptbColumnBgColor;\n const trs = this.table.querySelectorAll('tr');\n\n trs.forEach(tr => {\n let td = tr.querySelector(`td:nth-child(${index})`);\n \n if (!td.dataset.wptbOwnBgColor) td.style.backgroundColor = bgColor;\n });\n }\n}\n","var WPTB_TableDirectives = function (table) {\n this.table = table;\n const tableDirectivesDataKey = 'wptbTableDirectives';\n\n this.getDirectives = function () {\n const encodedTableDirectives = this.table.dataset[tableDirectivesDataKey];\n if (encodedTableDirectives === undefined) {\n return false;\n } else {\n return JSON.parse(atob(encodedTableDirectives));\n }\n }\n\n this.saveDirectives = function () {\n if(!this.tableDirectives) return;\n const encodedTableDirectives = btoa(JSON.stringify(this.tableDirectives));\n this.table.dataset[tableDirectivesDataKey] = encodedTableDirectives;\n }\n\n this.getDirective = function (way) {\n this.tableDirectives = this.getDirectives();\n if(!this.tableDirectives) this.tableDirectives = {};\n let field = this.tableDirectives;\n let value;\n for(let i = 0; i < way.length; i++) {\n if(!field.hasOwnProperty(way[i])) {\n value = false;\n break;\n } else {\n if(i === way.length - 1) {\n value = field[way[i]];\n break;\n }\n field = field[way[i]];\n }\n }\n\n return value;\n }\n\n this.setDirective = function (way, value) {\n this.tableDirectives = this.getDirectives();\n if(!this.tableDirectives) this.tableDirectives = {};\n let field = this.tableDirectives;\n for(let i = 0; i < way.length; i++) {\n\n if(i === way.length - 1) {\n field[way[i]] = value;\n this.saveDirectives();\n break;\n }\n if(!field.hasOwnProperty(way[i])) {\n field[way[i]] = {};\n }\n\n field = field[way[i]];\n }\n }\n\n this.tableDirectives = this.getDirectives();\n}\n"]}