{"version":3,"file":"Paging.js","names":["Paging","a","setters","Component","default","Event","on","off","trigger","deepMerge","ajax","mix","isFiresTouchEvents","LoaderMixin","Accessibility","execute","with","constructor","element","options","arguments","length","templateName","classNames","loading","observerOptions","rootMargin","threshold","events","update","updated","isLocalEvents","insertMode","isInfiniteScroll","modelId","resultModelId","pagingType","resultTemplate","scrollTopOnUpdate","containerId","isContentPaging","useAutoLoadResult","scrollTopOffset","initState","state","isKeyboardControl","nextPageURL","initObserver","targetContainer","selectors","loadButton","resultsContainer","initCache","querySelector","pageLinks","querySelectorAll","document","bindEvents","onSearchUpdated","bind","onClick","onKeyboardControl","observer","window","IntersectionObserver","onObserve","observe","data","detail","onUpdated","scrollTopSpeed","loadContent","pagingModel","render","then","focusContentAdded","template","componentOptions","removeLoader","replaceChildren","isAppend","scrollResultTop","event","indexOf","key","MutationObserver","onPageContentAdded","childList","mutations","Array","from","addedNodes","some","node","tagName","focusableElements","getFocusableElements","focus","disconnect","renderResults","resultContainer","contentTiles","fragment","createRange","createContextualFragment","innerHTML","appendChild","emit","paging","container","getElementById","topOfElement","scrollY","getBoundingClientRect","top","scroll","behavior","entries","intersectionRatio","isLoading","addLoader","overlay","updatePaging","e","preventDefault","target","currentTarget","url","getAttribute","dataset","viewAll","initializeViewAll","loaderOptions","catch","onUpdateFailed","bubbles","destroy","removeListener"],"sources":["components/search/Paging.js"],"sourcesContent":["import Component from 'core/Component';\nimport { Event } from 'services/EventEmitter';\nimport { on, off, trigger } from 'toolbox/event';\nimport { deepMerge } from 'toolbox/deepMerge';\nimport { ajax } from 'toolbox/ajax';\nimport { mix } from 'core/mixwith';\nimport { isFiresTouchEvents } from 'toolbox/device';\nimport LoaderMixin from 'mixins/Loader';\nimport Accessibility from 'mixins/Accessibility';\n\n/**\n * This is a description of the Paging constructor function.\n * @class\n * @classdesc This is a description of the Paging class.\n * @extends Component\n */\nexport default class Paging extends mix(Component).with(LoaderMixin, Accessibility) {\n /**\n * Constructor of the class that mainly merge the options of the components\n *\n * @param {HTMLElement} element HTMLElement of the component\n * @param {Object} options That belongs to the component\n */\n constructor(element, options = {}) {\n super(element, deepMerge({\n templateName: 'search/paging',\n classNames: {\n loading: 'm-loading',\n },\n observerOptions: {\n rootMargin: '0px 0px 50% 0px',\n threshold: 0,\n },\n events: {\n update: 'search.paging.update',\n updated: 'search.updated',\n },\n isLocalEvents: false, // to be able to have several paging on same page need to fire local events\n insertMode: false,\n isInfiniteScroll: false,\n modelId: 'paging',\n resultModelId: 'searchgrid',\n pagingType: null,\n resultTemplate: null,\n scrollTopOnUpdate: true,\n containerId: null,\n isContentPaging: false, // TO BE DEPRECATED (replaced by useAutoLoadResult)\n useAutoLoadResult: false,\n /* 'useAutoLoadResult' is used to indicate to load result pages itself and not to delegate\n * to another FE comp(for example searchgrid) which handles the result list container (via event.Emit),\n * is equivalent to 'isContentPaging' which is TO DEPRECATE\n * If 'useAutoLoadResult' is true, 'containerId', 'resultTemplate', 'resultModelId' are needed\n */\n scrollTopOffset: 120, // Change the edge offset If you have a fixed navigation bar\n }, options));\n }\n\n /**\n * Init the different state of the component\n * It helps to avoid heavy DOM manipulation\n */\n initState() {\n this.isInfiniteScroll = this.options.isInfiniteScroll && this.options.pagingType !== 'paging';\n this.state.isKeyboardControl = false;\n if (this.isInfiniteScroll) {\n this.nextPageURL = this.options.nextPageURL;\n this.initObserver();\n }\n if (this.options.pagingType === 'loadmore') {\n this.targetContainer = this.selectors.loadButton;\n } else if (this.options.pagingType === 'paging') {\n this.targetContainer = this.selectors.resultsContainer;\n } else {\n this.targetContainer = this.element;\n }\n }\n\n /**\n * All selectors must be cached. Never cache elements that are out of the component scope\n */\n initCache() {\n this.selectors.loadButton = this.element.querySelector('[data-js-load-more]');\n this.selectors.pageLinks = this.element.querySelectorAll('[data-js-link]');\n this.selectors.resultsContainer = this.options.containerId ? document.querySelector(`#${this.options.containerId}`) : null;\n }\n\n /**\n * Should contain only event listeners and nothing else\n * All the event handlers should be into a separated function. No usage of anonymous function\n */\n bindEvents() {\n if (this.options.isLocalEvents) {\n on(this.options.events.updated, this.element, this.onSearchUpdated.bind(this));\n } else {\n Event.on(this.options.events.updated, this.onSearchUpdated, this);\n }\n on('click', this.selectors.pageLinks, this.onClick.bind(this));\n if (this.selectors.loadButton) {\n on('keydown', this.selectors.loadButton, this.onKeyboardControl.bind(this));\n }\n }\n\n /**\n * Initialize IntersectionObserver for infinite scroll\n */\n initObserver() {\n this.observer = new window.IntersectionObserver(this.onObserve.bind(this), this.options.observerOptions);\n this.observer.observe(this.element);\n }\n\n /**\n * Update pagination state after search update\n *\n * @param {Object} data Model for search components\n */\n onSearchUpdated(data) {\n if (!this.options.isContentPaging && !this.options.useAutoLoadResult) {\n data = this.options.isLocalEvents ? data.detail : data;\n this.update(data);\n }\n }\n\n /**\n * Update pagination state after search update\n *\n * @param {Object} data Model for search components\n */\n onUpdated(data) {\n data = deepMerge(data, {\n insertMode: this.options.insertMode,\n scrollTopSpeed: this.options.scrollTopSpeed,\n scrollTopOffset: this.options.scrollTopOffset,\n });\n\n this.update(data);\n this.loadContent(data);\n }\n\n /**\n * Update pagination state after search update\n *\n * @param {Object} data Model for search components\n */\n update(data) {\n const pagingModel = data && data[this.options.modelId];\n\n if (pagingModel && !this.isInfiniteScroll) {\n this.render(pagingModel).then(this.focusContentAdded(data.template));\n } else if (pagingModel) {\n this.nextPageURL = pagingModel.componentOptions && pagingModel.componentOptions.nextPageURL;\n this.options.insertMode = true;\n }\n this.removeLoader(this.targetContainer);\n }\n\n\n /**\n * Load handlebar template for content result\n *\n * @param {Object} data Data model for template rendering\n */\n loadContent(data) {\n if (this.selectors.resultsContainer && this.options.resultTemplate) {\n this.render(data[this.options.resultModelId], {\n templateName: this.options.resultTemplate,\n element: this.selectors.resultsContainer,\n replaceChildren: true,\n isAppend: !!this.options.insertMode,\n }).then(this.focusContentAdded(this.selectors.resultsContainer));\n\n if (this.options.scrollTopOnUpdate && !this.options.insertMode) {\n this.scrollResultTop(data);\n }\n }\n }\n\n /**\n * KeyDown event handler\n *\n * @param {Object} event Event object\n */\n onKeyboardControl(event) {\n if (['Enter', ' '].indexOf(event.key) !== -1) {\n this.state.isKeyboardControl = true;\n this.onClick(event);\n }\n }\n\n /**\n * Fosus on the first element of added content\n *\n * @param {HTMLElement} template with result items\n */\n focusContentAdded(template) {\n if (!template || !this.state.isKeyboardControl) {\n return;\n }\n\n // Init mutation observer to capture new content\n new MutationObserver(this.onPageContentAdded.bind(this)).observe(\n template,\n { childList: true },\n );\n\n this.state.isKeyboardControl = false;\n }\n\n /**\n * Called when a series of dom mutations occur.\n * Sets the keyboard focus on the first new displayed element\n * @param {Array} mutations an array of MutationRecords given by the mutation observer\n * @param {Object} observer MutationObserver instance\n */\n onPageContentAdded(mutations, observer) {\n Array.from(mutations[0].addedNodes).some((node) => {\n // Find a first DOM node element\n if (node.tagName) {\n // Set the keyboard focus on the first focusable element of the node\n const focusableElements = this.getFocusableElements(node);\n if (focusableElements) {\n focusableElements[0].focus();\n // disconnect the observer and stop execution if the focus is set\n observer.disconnect();\n return true;\n }\n }\n return false;\n });\n }\n\n /**\n * Render content result\n *\n * @param {Object} data due to search updated\n * @param {Object} template with data\n */\n renderResults(data, template) {\n if (!data.resultContainer) {\n return;\n }\n\n const contentTiles = template.default(data[this.options.resultModelId]);\n // Generate fragment to setup the different classes and observers before it's inject in the DOM three\n const fragment = document.createRange().createContextualFragment(contentTiles);\n\n if (!data.insertMode) {\n data.resultContainer.innerHTML = '';\n }\n\n data.resultContainer.appendChild(fragment);\n Event.emit('registry.registerChildren', data.resultContainer);\n }\n\n /**\n * Scrolls to top of content results\n * @param {Object} data contains required parameters such as setup options and result container\n */\n scrollResultTop(data = {}) {\n if (data.paging.componentOptions.containerId) {\n const container = document.getElementById(data.paging.componentOptions.containerId);\n const topOfElement = window.scrollY + container.getBoundingClientRect().top - this.options.scrollTopOffset;\n window.scroll({ top: topOfElement, behavior: 'smooth' });\n }\n }\n\n /**\n * Load next page when observer sentinel appears in view port.\n *\n * @param {Object[]} entries IntersectionObserverEntry objects\n */\n onObserve(entries) {\n if (entries[0].intersectionRatio <= 0 || !this.nextPageURL || this.state.isLoading) {\n if (!this.state.isLoading) {\n this.element.innerHTML = '';\n }\n return;\n }\n this.addLoader(this.targetContainer, { overlay: true });\n this.updatePaging(this.nextPageURL);\n }\n\n /**\n * Handler on click on page link\n *\n * @param {Object} e HTML Event object\n */\n onClick(e) {\n e.preventDefault();\n\n if (e && isFiresTouchEvents(e)) {\n this.state.isKeyboardControl = true;\n }\n if (this.state.isLoading) {\n return;\n }\n const target = e.currentTarget;\n const url = target.getAttribute('href');\n if (target.dataset.viewAll) {\n this.targetContainer = this.element;\n this.element.innerHTML = '';\n this.addLoader(this.targetContainer, { overlay: true });\n this.initializeViewAll();\n }\n if (url) {\n this.updatePaging(url);\n }\n }\n\n /**\n * Initialize \"View All\"\n */\n initializeViewAll() {\n this.isInfiniteScroll = this.options.isInfiniteScroll;\n\n if (this.isInfiniteScroll) {\n off('click', this.selectors.pageLinks);\n this.initObserver();\n }\n }\n\n /**\n * Loads a new page\n *\n * @param {String} url New page URL\n */\n updatePaging(url) {\n let loaderOptions = {};\n if (this.options.pagingType !== 'loadmore') {\n loaderOptions = { overlay: true };\n }\n if (this.options.pagingType !== 'paging') {\n this.addLoader(this.targetContainer, loaderOptions);\n }\n if (this.options.isContentPaging || this.options.useAutoLoadResult) {\n this.addLoader(this.targetContainer, loaderOptions);\n ajax(url)\n .then(this.onUpdated.bind(this))\n .catch(this.onUpdateFailed.bind(this));\n } else if (this.options.isLocalEvents) {\n trigger(this.options.events.update, this.element, {\n bubbles: true,\n insertMode: this.isInfiniteScroll ? true : this.options.insertMode,\n paging: true,\n url,\n });\n } else {\n Event.emit(this.options.events.update, {\n insertMode: this.isInfiniteScroll ? true : this.options.insertMode,\n paging: true,\n url,\n });\n }\n }\n\n /**\n * Callback when a search failed\n */\n onUpdateFailed() {\n if (this.options.isLocalEvents) {\n trigger('search.failed', this.element, { bubbles: true });\n } else {\n Event.emit('search.failed');\n }\n }\n\n /**\n * Destroy is called automatically after the component is being removed from the DOM\n * You must always destroy the listeners attached to an element to avoid any memory leaks\n */\n destroy() {\n if (this.options.isLocalEvents) {\n off(this.options.events.updated, this.element);\n } else {\n Event.removeListener(this.options.events.updated, this.onSearchUpdated, this);\n }\n off('click', this.selectors.pageLinks);\n if (this.selectors.loadButton) {\n off('keydown', this.selectors.loadButton);\n }\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n}\n"],"mappings":"qPAgBqBA,CAAM,QAAAC,CAAA,oBAAAC,OAAA,WAAAD,CAAA,EAhBpBE,CAAS,CAAAF,CAAA,CAAAG,OAAA,WAAAH,CAAA,EACPI,CAAK,CAAAJ,CAAA,CAALI,KAAK,WAAAJ,CAAA,EACLK,CAAE,CAAAL,CAAA,CAAFK,EAAE,CAAEC,CAAG,CAAAN,CAAA,CAAHM,GAAG,CAAEC,CAAO,CAAAP,CAAA,CAAPO,OAAO,WAAAP,CAAA,EAChBQ,CAAS,CAAAR,CAAA,CAATQ,SAAS,WAAAR,CAAA,EACTS,CAAI,CAAAT,CAAA,CAAJS,IAAI,WAAAT,CAAA,EACJU,CAAG,CAAAV,CAAA,CAAHU,GAAG,WAAAV,CAAA,EACHW,CAAkB,CAAAX,CAAA,CAAlBW,kBAAkB,WAAAX,CAAA,EACpBY,CAAW,CAAAZ,CAAA,CAAAG,OAAA,WAAAH,CAAA,EACXa,CAAa,CAAAb,CAAA,CAAAG,OAAA,GAAAW,OAAA,SAAAA,CAAA,EAAAd,CAAA,WAQCD,CAAM,CAAZ,aAAqB,CAAAW,CAAG,CAACR,CAAS,CAAC,CAACa,IAAI,CAACH,CAAW,CAAEC,CAAa,CAAE,CAOhFG,WAAWA,CAACC,CAAO,CAAgB,IAAd,CAAAC,CAAO,GAAAC,SAAA,CAAAC,MAAA,WAAAD,SAAA,IAAAA,SAAA,IAAG,CAAC,CAAC,CAC7B,KAAK,CAACF,CAAO,CAAET,CAAS,CAAC,CACrB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