public_html/layouts/basic/components/IconsModal.min.js.map
{"version":3,"file":"IconsModal.min.js","sources":["IconsModal.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nwindow.AppComponents_IconsModal_Js = class {\n\t/**\n\t * Set page\n\t * @param {int} page\n\t */\n\tsetPage(page = 1) {\n\t\tlet min = (page - 1) * this.pageLimit;\n\t\tlet max = page * this.pageLimit;\n\t\tlet elements = this.container.find('.js-icon-item:not(.not-match)');\n\t\tthis.container.find('.js-icon-item').addClass('d-none');\n\t\telements.slice(min, max).removeClass('d-none');\n\t\tthis.container.find('.js-page--set').data('id', page).find('.page-link').text(page);\n\t\tif (elements.eq(max + 1).length) {\n\t\t\tthis.container.find('.js-page--next,.js-page--last').removeClass('disabled');\n\t\t} else {\n\t\t\tthis.container.find('.js-page--next,.js-page--last').addClass('disabled');\n\t\t}\n\t\tif (min !== 0 && elements.eq(min - 1).length) {\n\t\t\tthis.container.find('.js-page--previous,.js-page--first').removeClass('disabled');\n\t\t} else {\n\t\t\tthis.container.find('.js-page--previous,.js-page--first').addClass('disabled');\n\t\t}\n\t}\n\t/**\n\t * Register pagination events\n\t */\n\tregisterPaginationEvents() {\n\t\tthis.container.on('click', '.js-page--next:not(.disabled)', () => {\n\t\t\tlet currentPage = this.container.find('.js-page--set.active').data('id');\n\t\t\tthis.setPage(parseInt(currentPage) + 1);\n\t\t});\n\t\tthis.container.on('click', '.js-page--previous:not(.disabled)', () => {\n\t\t\tlet currentPage = this.container.find('.js-page--set.active').data('id');\n\t\t\tif (currentPage !== 1) {\n\t\t\t\tthis.setPage(currentPage - 1);\n\t\t\t}\n\t\t});\n\t\tthis.container.on('click', '.js-page--first:not(.disabled)', () => {\n\t\t\tthis.setPage(1);\n\t\t});\n\t\tthis.container.on('click', '.js-page--last:not(.disabled)', () => {\n\t\t\tlet elements = this.container.find('.js-icon-item:not(.not-match)');\n\t\t\tlet totalPages = Math.ceil(elements.length / this.pageLimit);\n\t\t\tthis.setPage(totalPages);\n\t\t});\n\t}\n\t/**\n\t * Register Icon Search\n\t */\n\tregisterSearchIcon() {\n\t\tthis.container.find('.js-icon-search').on('keyup', (e) => {\n\t\t\tthis.container.find('.js-icon-item.not-match').removeClass('not-match');\n\t\t\tlet value = e.currentTarget.value.toString().replace('\"', '').toLowerCase();\n\t\t\tif (value.length) {\n\t\t\t\tthis.container.find(`.js-icon-item:not([data-icon-search*=\"${value}\"])`).addClass('not-match');\n\t\t\t}\n\t\t\tthis.setPage(1);\n\t\t});\n\t}\n\t/**\n\t * Register events\n\t */\n\tregisterEvents(container) {\n\t\tthis.container = container;\n\t\tthis.pageLimit = parseInt(this.container.find('.js-page-size').val());\n\t\tthis.setPage();\n\t\tthis.registerPaginationEvents();\n\t\tthis.registerSearchIcon();\n\t}\n};\n"],"names":["window","AppComponents_IconsModal_Js","page","min","pageLimit","max","elements","container","find","addClass","slice","removeClass","data","text","eq","length","on","currentPage","setPage","parseInt","totalPages","Math","ceil","e","value","currentTarget","toString","replace","toLowerCase","val","registerPaginationEvents","registerSearchIcon"],"mappings":";;AAAA,kKACA,urBAEAA,MAAM,CAACC,2BAAP,cACC,UAAA,CAAA,SAAA,MAAA,EAAA,CAAA,eAAA,CAAA,IAAA,CAAA,MAAA,EAAA,CAAA,OAAA,YAAA,CAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,SAAA,CAAA,KAAA;AACD;AACA;AACA,IACC,SAAkB,OAAA,EAAA,CAAA,IAAVC,IAAU,wDAAH,CAAG,CACbC,GAAG,CAAG,CAACD,IAAI,CAAG,CAAR,EAAa,KAAKE,SADX,CAEbC,GAAG,CAAGH,IAAI,CAAG,IAAA,CAAKE,SAFL,CAGbE,QAAQ,CAAG,IAAA,CAAKC,SAAL,CAAeC,IAAf,CAAoB,+BAApB,CAHE,CAIjB,KAAKD,SAAL,CAAeC,IAAf,CAAoB,eAApB,CAAA,CAAqCC,QAArC,CA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