dashboard_widget.js
2 years ago
dashboard_widget.js.map
2 years ago
download.js
2 years ago
download.js.map
2 years ago
index.js
2 years ago
index.js.map
2 years ago
layout.js
2 years ago
layout.js.map
2 years ago
settings.js
2 years ago
settings.js.map
2 years ago
layout.js
370 lines
| 1 | // modules are defined as an array |
| 2 | // [ module function, map of requires ] |
| 3 | // |
| 4 | // map of requires is short require name -> numeric require |
| 5 | // |
| 6 | // anything defined in a previous bundle is accessed via the |
| 7 | // orig method which is the require for previous bundles |
| 8 | |
| 9 | (function (modules, entry, mainEntry, parcelRequireName, globalName) { |
| 10 | /* eslint-disable no-undef */ |
| 11 | var globalObject = |
| 12 | typeof globalThis !== 'undefined' |
| 13 | ? globalThis |
| 14 | : typeof self !== 'undefined' |
| 15 | ? self |
| 16 | : typeof window !== 'undefined' |
| 17 | ? window |
| 18 | : typeof global !== 'undefined' |
| 19 | ? global |
| 20 | : {}; |
| 21 | /* eslint-enable no-undef */ |
| 22 | |
| 23 | // Save the require from previous bundle to this closure if any |
| 24 | var previousRequire = |
| 25 | typeof globalObject[parcelRequireName] === 'function' && |
| 26 | globalObject[parcelRequireName]; |
| 27 | |
| 28 | var cache = previousRequire.cache || {}; |
| 29 | // Do not use `require` to prevent Webpack from trying to bundle this call |
| 30 | var nodeRequire = |
| 31 | typeof module !== 'undefined' && |
| 32 | typeof module.require === 'function' && |
| 33 | module.require.bind(module); |
| 34 | |
| 35 | function newRequire(name, jumped) { |
| 36 | if (!cache[name]) { |
| 37 | if (!modules[name]) { |
| 38 | // if we cannot find the module within our internal map or |
| 39 | // cache jump to the current global require ie. the last bundle |
| 40 | // that was added to the page. |
| 41 | var currentRequire = |
| 42 | typeof globalObject[parcelRequireName] === 'function' && |
| 43 | globalObject[parcelRequireName]; |
| 44 | if (!jumped && currentRequire) { |
| 45 | return currentRequire(name, true); |
| 46 | } |
| 47 | |
| 48 | // If there are other bundles on this page the require from the |
| 49 | // previous one is saved to 'previousRequire'. Repeat this as |
| 50 | // many times as there are bundles until the module is found or |
| 51 | // we exhaust the require chain. |
| 52 | if (previousRequire) { |
| 53 | return previousRequire(name, true); |
| 54 | } |
| 55 | |
| 56 | // Try the node require function if it exists. |
| 57 | if (nodeRequire && typeof name === 'string') { |
| 58 | return nodeRequire(name); |
| 59 | } |
| 60 | |
| 61 | var err = new Error("Cannot find module '" + name + "'"); |
| 62 | err.code = 'MODULE_NOT_FOUND'; |
| 63 | throw err; |
| 64 | } |
| 65 | |
| 66 | localRequire.resolve = resolve; |
| 67 | localRequire.cache = {}; |
| 68 | |
| 69 | var module = (cache[name] = new newRequire.Module(name)); |
| 70 | |
| 71 | modules[name][0].call( |
| 72 | module.exports, |
| 73 | localRequire, |
| 74 | module, |
| 75 | module.exports, |
| 76 | this |
| 77 | ); |
| 78 | } |
| 79 | |
| 80 | return cache[name].exports; |
| 81 | |
| 82 | function localRequire(x) { |
| 83 | var res = localRequire.resolve(x); |
| 84 | return res === false ? {} : newRequire(res); |
| 85 | } |
| 86 | |
| 87 | function resolve(x) { |
| 88 | var id = modules[name][1][x]; |
| 89 | return id != null ? id : x; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | function Module(moduleName) { |
| 94 | this.id = moduleName; |
| 95 | this.bundle = newRequire; |
| 96 | this.exports = {}; |
| 97 | } |
| 98 | |
| 99 | newRequire.isParcelRequire = true; |
| 100 | newRequire.Module = Module; |
| 101 | newRequire.modules = modules; |
| 102 | newRequire.cache = cache; |
| 103 | newRequire.parent = previousRequire; |
| 104 | newRequire.register = function (id, exports) { |
| 105 | modules[id] = [ |
| 106 | function (require, module) { |
| 107 | module.exports = exports; |
| 108 | }, |
| 109 | {}, |
| 110 | ]; |
| 111 | }; |
| 112 | |
| 113 | Object.defineProperty(newRequire, 'root', { |
| 114 | get: function () { |
| 115 | return globalObject[parcelRequireName]; |
| 116 | }, |
| 117 | }); |
| 118 | |
| 119 | globalObject[parcelRequireName] = newRequire; |
| 120 | |
| 121 | for (var i = 0; i < entry.length; i++) { |
| 122 | newRequire(entry[i]); |
| 123 | } |
| 124 | |
| 125 | if (mainEntry) { |
| 126 | // Expose entry point to Node, AMD or browser globals |
| 127 | // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js |
| 128 | var mainExports = newRequire(mainEntry); |
| 129 | |
| 130 | // CommonJS |
| 131 | if (typeof exports === 'object' && typeof module !== 'undefined') { |
| 132 | module.exports = mainExports; |
| 133 | |
| 134 | // RequireJS |
| 135 | } else if (typeof define === 'function' && define.amd) { |
| 136 | define(function () { |
| 137 | return mainExports; |
| 138 | }); |
| 139 | |
| 140 | // <script> |
| 141 | } else if (globalName) { |
| 142 | this[globalName] = mainExports; |
| 143 | } |
| 144 | } |
| 145 | })({"hR6B0":[function(require,module,exports) { |
| 146 | var _scrollToTop = require("./modules/scroll-to-top"); |
| 147 | var _notices = require("./modules/notices"); |
| 148 | var _stickySidebar = require("./modules/sticky-sidebar"); |
| 149 | var _support = require("./modules/support"); |
| 150 | jQuery(function($) { |
| 151 | (0, _stickySidebar.StickySidebar).setup(); |
| 152 | (0, _notices.Notices).setup(); |
| 153 | (0, _scrollToTop.ScrollToTop).setup(); |
| 154 | (0, _support.Support).setup(); |
| 155 | }); |
| 156 | |
| 157 | },{"./modules/scroll-to-top":"cgcMF","./modules/notices":"9NjSc","./modules/sticky-sidebar":"dzCa7","./modules/support":"e3uOb"}],"cgcMF":[function(require,module,exports) { |
| 158 | var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); |
| 159 | parcelHelpers.defineInteropFlag(exports); |
| 160 | parcelHelpers.export(exports, "ScrollToTop", function() { |
| 161 | return ScrollToTop; |
| 162 | }); |
| 163 | var $ = jQuery; |
| 164 | var ScrollToTop = { |
| 165 | setup: function setup() { |
| 166 | $("#scroll-to-top").on("click", function() { |
| 167 | window.scrollTo({ |
| 168 | top: 0, |
| 169 | behavior: "smooth" |
| 170 | }); |
| 171 | $(this).blur(); |
| 172 | }); |
| 173 | } |
| 174 | }; |
| 175 | |
| 176 | },{"@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}],"jIm8e":[function(require,module,exports) { |
| 177 | exports.interopDefault = function(a) { |
| 178 | return a && a.__esModule ? a : { |
| 179 | default: a |
| 180 | }; |
| 181 | }; |
| 182 | exports.defineInteropFlag = function(a) { |
| 183 | Object.defineProperty(a, "__esModule", { |
| 184 | value: true |
| 185 | }); |
| 186 | }; |
| 187 | exports.exportAll = function(source, dest) { |
| 188 | Object.keys(source).forEach(function(key) { |
| 189 | if (key === "default" || key === "__esModule" || dest.hasOwnProperty(key)) return; |
| 190 | Object.defineProperty(dest, key, { |
| 191 | enumerable: true, |
| 192 | get: function get() { |
| 193 | return source[key]; |
| 194 | } |
| 195 | }); |
| 196 | }); |
| 197 | return dest; |
| 198 | }; |
| 199 | exports.export = function(dest, destName, get) { |
| 200 | Object.defineProperty(dest, destName, { |
| 201 | enumerable: true, |
| 202 | get: get |
| 203 | }); |
| 204 | }; |
| 205 | |
| 206 | },{}],"9NjSc":[function(require,module,exports) { |
| 207 | var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); |
| 208 | parcelHelpers.defineInteropFlag(exports); |
| 209 | parcelHelpers.export(exports, "Notices", function() { |
| 210 | return Notices; |
| 211 | }); |
| 212 | var _objectSpreadJs = require("@swc/helpers/lib/_object_spread.js"); |
| 213 | var _objectSpreadJsDefault = parcelHelpers.interopDefault(_objectSpreadJs); |
| 214 | var $ = jQuery; |
| 215 | var Notices = { |
| 216 | setup: function() { |
| 217 | $("#dismiss-notice").on("click", function() { |
| 218 | var data = (0, _objectSpreadJsDefault.default)({}, iawpActions.confirm_cache_cleared); |
| 219 | $(".iawp-notice.iawp-warning").hide(); |
| 220 | jQuery.post(ajaxurl, data, function(response) {}).fail(function() {}); |
| 221 | }); |
| 222 | } |
| 223 | }; |
| 224 | |
| 225 | },{"@swc/helpers/lib/_object_spread.js":"d5EJT","@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}],"d5EJT":[function(require,module,exports) { |
| 226 | "use strict"; |
| 227 | Object.defineProperty(exports, "__esModule", { |
| 228 | value: true |
| 229 | }); |
| 230 | exports.default = _objectSpread; |
| 231 | var _defineProperty = _interopRequireDefault(require("./_define_property")); |
| 232 | function _objectSpread(target) { |
| 233 | for(var i = 1; i < arguments.length; i++){ |
| 234 | var source = arguments[i] != null ? arguments[i] : {}; |
| 235 | var ownKeys = Object.keys(source); |
| 236 | if (typeof Object.getOwnPropertySymbols === "function") ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) { |
| 237 | return Object.getOwnPropertyDescriptor(source, sym).enumerable; |
| 238 | })); |
| 239 | ownKeys.forEach(function(key) { |
| 240 | _defineProperty.default(target, key, source[key]); |
| 241 | }); |
| 242 | } |
| 243 | return target; |
| 244 | } |
| 245 | function _interopRequireDefault(obj) { |
| 246 | return obj && obj.__esModule ? obj : { |
| 247 | default: obj |
| 248 | }; |
| 249 | } |
| 250 | |
| 251 | },{"./_define_property":"6IXzf"}],"6IXzf":[function(require,module,exports) { |
| 252 | "use strict"; |
| 253 | Object.defineProperty(exports, "__esModule", { |
| 254 | value: true |
| 255 | }); |
| 256 | exports.default = _defineProperty; |
| 257 | function _defineProperty(obj, key, value) { |
| 258 | if (key in obj) Object.defineProperty(obj, key, { |
| 259 | value: value, |
| 260 | enumerable: true, |
| 261 | configurable: true, |
| 262 | writable: true |
| 263 | }); |
| 264 | else obj[key] = value; |
| 265 | return obj; |
| 266 | } |
| 267 | |
| 268 | },{}],"dzCa7":[function(require,module,exports) { |
| 269 | var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); |
| 270 | parcelHelpers.defineInteropFlag(exports); |
| 271 | parcelHelpers.export(exports, "StickySidebar", function() { |
| 272 | return StickySidebar; |
| 273 | }); |
| 274 | var _objectSpreadJs = require("@swc/helpers/lib/_object_spread.js"); |
| 275 | var _objectSpreadJsDefault = parcelHelpers.interopDefault(_objectSpreadJs); |
| 276 | var $ = jQuery; |
| 277 | var StickySidebar = { |
| 278 | setup: function() { |
| 279 | var _this = this; |
| 280 | if ($("#iawp-layout-sidebar").length == 0) return; |
| 281 | var scrollPosition = window.scrollY; |
| 282 | var sidebar = document.getElementById("iawp-layout-sidebar"); |
| 283 | var sidebarContainer = document.querySelector(".iawp-layout-sidebar"); |
| 284 | var layoutContainer = document.getElementById("iawp-layout"); |
| 285 | var self = this; |
| 286 | if (!sidebar && !layoutContainer) return; // These elements aren't visible on an interrupt page such as migration pending page |
| 287 | sidebar.scroll(0, window.scrollY); |
| 288 | this.setMinMainHeight(); |
| 289 | document.addEventListener("scroll", function() { |
| 290 | var change = scrollPosition - window.scrollY; |
| 291 | if (window.scrollY < 1 || window.scrollY > $(document).height() - $(window).height() - 1) { |
| 292 | scrollPosition = window.scrollY; |
| 293 | return; |
| 294 | } |
| 295 | sidebar.scroll(0, sidebar.scrollTop - change); |
| 296 | scrollPosition = window.scrollY; |
| 297 | }); |
| 298 | window.addEventListener("resize", function() { |
| 299 | _this.setMinMainHeight(); |
| 300 | }); |
| 301 | document.getElementById("collapse-sidebar").addEventListener("click", function() { |
| 302 | var isSidebarCollapsed = layoutContainer.classList.toggle("collapsed"); |
| 303 | _this.saveSidebarState(isSidebarCollapsed); |
| 304 | sidebar.scroll(0, window.scrollY); |
| 305 | _this.setMinMainHeight(); |
| 306 | _this.setTableHorizontal(); |
| 307 | }); |
| 308 | $("#mobile-menu-toggle").on("click", function() { |
| 309 | if ($("#menu-container").hasClass("open")) { |
| 310 | $("#menu-container").removeClass("open"); |
| 311 | $(this).find(".text").text(iawpText.openMobileMenu); |
| 312 | } else { |
| 313 | $("#menu-container").addClass("open"); |
| 314 | $(this).find(".text").text(iawpText.closeMobileMenu); |
| 315 | } |
| 316 | }); |
| 317 | var dataTableContainer = $("#data-table-container"); |
| 318 | var dataTable = $("#data-table"); |
| 319 | // Data table resizing |
| 320 | if (dataTable.width() > dataTableContainer.width()) self.setTableHorizontal(); |
| 321 | $(window).on("resize", function() { |
| 322 | self.setTableHorizontal(); |
| 323 | self.setReportTitleMaxWidth(); |
| 324 | }); |
| 325 | this.setReportTitleMaxWidth(); |
| 326 | }, |
| 327 | saveSidebarState: function(isSidebarCollapsed) { |
| 328 | var data = (0, _objectSpreadJsDefault.default)({}, iawpActions.update_user_settings, { |
| 329 | "is_sidebar_collapsed": isSidebarCollapsed |
| 330 | }); |
| 331 | jQuery.post(ajaxurl, data, function(response) {}).fail(function() {}); |
| 332 | }, |
| 333 | setMinMainHeight: function() { |
| 334 | $(".iawp-layout-main").css("min-height", $(".iawp-layout-sidebar .inner").outerHeight(true) + 32); |
| 335 | }, |
| 336 | setTableHorizontal: function() { |
| 337 | if ($("#data-table").width() > $("#data-table-container").width()) $("#data-table-container").addClass("horizontal"); |
| 338 | else $("#data-table-container").removeClass("horizontal"); |
| 339 | }, |
| 340 | setReportTitleMaxWidth: function() { |
| 341 | if ($(window).width() < 600) $(".rename-report").css("max-width", ""); |
| 342 | else $(".rename-report").css("max-width", "calc(100% - " + $(".report-title-bar .buttons").width() + "px)"); |
| 343 | } |
| 344 | }; |
| 345 | |
| 346 | },{"@swc/helpers/lib/_object_spread.js":"d5EJT","@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}],"e3uOb":[function(require,module,exports) { |
| 347 | var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); |
| 348 | parcelHelpers.defineInteropFlag(exports); |
| 349 | parcelHelpers.export(exports, "Support", function() { |
| 350 | return Support; |
| 351 | }); |
| 352 | var $ = jQuery; |
| 353 | var Support = { |
| 354 | setup: function() { |
| 355 | if ($("body").hasClass("analytics_page_independent-analytics-support-center")) { |
| 356 | $("#search-field").focus(); |
| 357 | var form = document.getElementById("search-form"); |
| 358 | var searchField = document.getElementById("search-field"); |
| 359 | form.onsubmit = function(e) { |
| 360 | e.preventDefault(); |
| 361 | window.open("https://independentwp.com/?post_type=kb_article&s=" + searchField.value); |
| 362 | }; |
| 363 | } |
| 364 | } |
| 365 | }; |
| 366 | |
| 367 | },{"@parcel/transformer-js/src/esmodule-helpers.js":"jIm8e"}]},["hR6B0"], "hR6B0", "parcelRequirec571") |
| 368 | |
| 369 | //# sourceMappingURL=layout.js.map |
| 370 |