403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/admin/wbs24.ozonapinew/filter/js/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/admin/wbs24.ozonapinew/filter/js/app.js
(function(){"use strict";var t={7246:function(t,e,n){var i=n(6369),s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"wbs24spa__filter"},[e("div",{staticClass:"adm-detail-content-wrap"},[t.saveButtonIsReady?e("div",t._l(t.filterIds,(function(n,i){return e("EntitySwitch",{key:i,attrs:{filterId:n,lang:t.lang}})})),1):t._e(),t._l(t.filterIds,(function(n,i){return e("CatalogFilter",{key:i,ref:"filters",refInFor:!0,attrs:{filterId:n},on:{"show-save-button":t.showSaveButton}})})),t.saveButtonIsReady?e("div",{staticClass:"adm-detail-content-btns-wrap"},[e("div",{staticClass:"adm-detail-content-btns"},[e("input",{staticClass:"adm-btn-save",attrs:{type:"submit"},domProps:{value:t.lang.save},on:{click:t.save}}),t.saved?e("span",{staticClass:"msg-confirm"},[t._v(t._s(t.lang.saved))]):t._e()])]):t._e()],2)])},o=[],a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"adm-detail-content"},[e("div",{staticClass:"adm-detail-title"},[t._v(t._s(this.lang.filter_mode_label))]),e("div",{staticClass:"adm-detail-content-item-block"},[e("HintText",{attrs:{text:t.notify,html:!0}}),e("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedValue,expression:"selectedValue"}],staticStyle:{"margin-left":"10px"},on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.selectedValue=e.target.multiple?n:n[0]},t.setParam]}},t._l(t.options,(function(n){return e("option",{key:n.value,domProps:{value:n.value}},[t._v(" "+t._s(n.text)+" ")])})),0)],1)])},r=[],l=function(){var t=this,e=t._self._c;return t.text?e("span",{staticClass:"wbs24spa__hint-wrapper"},[e("img",{attrs:{src:"/bitrix/js/main/core/images/hint.gif"}}),t.html?t._e():e("div",{staticClass:"hint-text"},[t._v(t._s(t.text))]),t.html?e("div",{staticClass:"hint-text",domProps:{innerHTML:t._s(t.text)}}):t._e()]):t._e()},c=[],u={name:"HintText",props:["text","html"]},d=u,f=n(1001),p=(0,f.Z)(d,l,c,!1,null,null,null),h=p.exports,m={name:"EntitySwitch",components:{HintText:h},props:["filterId","lang"],data:function(){return{settings:{},selectedValue:"prices_and_stocks",options:[{text:this.lang.filter_mode_disabled,value:"nothing"},{text:this.lang.filter_mode_prices_and_stocks,value:"prices_and_stocks"},{text:this.lang.filter_mode_prices,value:"prices"},{text:this.lang.filter_mode_stocks,value:"stocks"}],notify:this.lang.filter_mode_hint}},mounted:async function(){await this.loadSettings();let t=await this.getParam();t&&(this.selectedValue=t)},methods:{loadSettings:function(){if("undefined"!==window){const t=window.document.getElementById("wbs24-ozonapinew-settings");if(t)for(let e in t.dataset)this.settings[e]=t.dataset[e];else this.settings=!1}},getParam:async function(){let t=this.filterId,e=t.split("_"),n=e[2],i=await this.post({action:"getParam",profile_id:this.settings.profileId,code:"entity_type_iblock_"+n});return i},setParam:async function(){let t=this.filterId,e=t.split("_"),n=e[2];await this.post({action:"saveEntityTypeFilter",profile_id:this.settings.profileId,code:"entity_type_iblock_"+n,value:this.selectedValue})},post:async function(t){let e=[],n=await fetch(this.settings.backendUrl,{method:"POST",headers:{"Content-Type":"application/json;charset=utf-8"},body:JSON.stringify(t)});return n.ok&&(e=await n.json()),e}}},v=m,g=(0,f.Z)(v,a,r,!1,null,null,null),_=g.exports,w=function(){var t=this,e=t._self._c;return e("div",{staticClass:"adm-detail-content"},[e("div",{staticClass:"adm-detail-title"},[t._v(t._s(t.lang.filter_label))]),t.filter?e("div",t._l(t.filter,(function(n,i){return e("div",{key:i},[e("SubFilter",{attrs:{settings:t.settings,lang:t.lang,post:t.post,sectionTree:t.sectionTree,allowedOperators:t.allowedOperators,conditions:t.conditions,el:n,filter:t.filter,indexes:[i]},on:{"add-filter-element":t.addFilterElement,"delete-filter-element":t.deleteFilterElement,"set-filter-operator":t.setFilterOperator,"change-filter-logic":t.changeFilterLogic}})],1)})),0):t._e()])},S=[],y=(n(7658),function(){var t=this,e=t._self._c;return t.el.items?e("div",{staticClass:"filter_block"},[e("div",{staticClass:"filter_group",class:String(t.el.value).toLowerCase()},t._l(t.el.items,(function(n,i){return e("div",{key:i+"_"+n.value,staticClass:"filter_item"},[e("div",{staticClass:"logic",on:{click:function(e){t.changeLogic(t.getIndexesForSubElement(i))}}},[e("div",{staticClass:"label_and"},[t._v(t._s(t.lang.and))]),e("div",{staticClass:"label_or"},[t._v(t._s(t.lang.or))])]),n.name?e("div",[t._v(" "+t._s(n.name)+" "),e("SelectOperator",{attrs:{operators:t.allowedOperators,currentOperator:n.operator,propType:n.type},on:{"set-operator":function(e){t.setOperator(e,t.getIndexesForSubElement(i))}}}),"SECTION_ID"==n.code?e("SectionSearch",{attrs:{settings:t.settings,lang:t.lang,post:t.post,sectionTree:t.sectionTree,initialSectionId:n.value},on:{"set-section-to-filter":function(e){return t.setSectionToFilter(e,n)}}}):"ACTIVE"==n.code||"AVAILABLE"==n.code?e("SelectValue",{attrs:{currentValue:n.value,values:t.getAllowedValuesByCode(n.code)},on:{"set-value-to-filter":function(e){return t.setValueToFilter(e,n)}}}):e("input",{directives:[{name:"model",rawName:"v-model",value:n.value,expression:"subEl.value"}],attrs:{type:"text"},domProps:{value:n.value},on:{input:function(e){e.target.composing||t.$set(n,"value",e.target.value)}}}),e("input",{staticClass:"adm-btn",attrs:{type:"button",value:"X"},on:{click:function(e){t.deleteFilterElement(t.getIndexesForSubElement(i))}}})],1):t._e(),e("SubFilter",{attrs:{settings:t.settings,lang:t.lang,post:t.post,sectionTree:t.sectionTree,allowedOperators:t.allowedOperators,conditions:t.conditions,el:n,filter:t.filter,indexes:t.getIndexesForSubElement(i)},on:{"add-filter-element":t.addFilterElement,"delete-filter-element":t.deleteFilterElement,"set-filter-operator":t.setOperator,"change-filter-logic":t.changeLogic}})],1)})),0),e("div",[e("SelectCondition",{attrs:{lang:t.lang,conditions:t.conditions},on:{"add-condition":function(e){return t.addCondition(e,t.indexes)}}}),t.el.items&&t.indexes.length>1?e("input",{staticClass:"adm-btn",attrs:{type:"button",value:"X"},on:{click:function(e){return t.deleteFilterElement(t.indexes)}}}):t._e()],1)]):t._e()}),b=[],I=function(){var t=this,e=t._self._c;return e("select",{directives:[{name:"model",rawName:"v-model",value:t.selectOperator,expression:"selectOperator"}],on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.selectOperator=e.target.multiple?n:n[0]},function(e){return t.$emit("set-operator",t.selectOperator)}]}},t._l(t.allowedOperators,(function(n,i){return e("option",{key:i,domProps:{value:n.operator}},[t._v(" "+t._s(n.name)+" ")])})),0)},x=[],O={name:"SelectOperator",props:["operators","currentOperator","propType"],mounted:function(){this.selectOperator=this.currentOperator},data:function(){return{selectOperator:"="}},computed:{allowedOperators:function(){let t=[];for(let e of this.operators)e.types.includes(this.propType)&&t.push(e);return t}}},C=O,T=(0,f.Z)(C,I,x,!1,null,null,null),E=T.exports,k=function(){var t=this,e=t._self._c;return e("span",[e("select",{directives:[{name:"model",rawName:"v-model",value:t.currentElement,expression:"currentElement"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.currentElement=e.target.multiple?n:n[0]}}},t._l(t.conditions,(function(n,i){return e("option",{key:i,domProps:{value:i}},[t._v(" "+t._s(n.name)+" ")])})),0),e("input",{staticClass:"adm-btn",attrs:{type:"button",value:t.lang.add},on:{click:function(e){return t.$emit("add-condition",t.currentElement)}}})])},F=[],N={name:"SelectCondition",props:["lang","conditions"],data:function(){return{currentElement:""}}},L=N,V=(0,f.Z)(L,k,F,!1,null,null,null),B=V.exports,A=function(){var t=this,e=t._self._c;return e("span",{staticClass:"section_search"},[e("span",{staticClass:"section_name",class:{section_name__warning:t.currentSectionWarning}},[t._v(" "+t._s(t.currentSectionName)+" "),t.currentSectionWarning?e("HintText",{attrs:{text:t.warningHint}}):t._e()],1),e("input",{staticClass:"adm-btn",attrs:{type:"button",value:"..."},on:{click:function(e){t.showSectionTree=!t.showSectionTree}}}),t.showSectionTree?e("div",{staticClass:"section_tree"},t._l(t.sectionTree,(function(n,i){return e("SectionElement",{key:i,attrs:{parentActive:i==t.activeIndex,parentIndex:i,elem:n,lang:t.lang},on:{"drop-other-branches":t.dropOtherBranches,"set-section":t.setSection}})})),1):t._e()])},P=[],$=function(){var t=this,e=t._self._c;return e("div",{staticClass:"section_sub_block"},[e("button",{staticClass:"section_button",class:{section_button__warning:"N"==t.elem.active},on:{mouseover:function(e){return t.$emit("drop-other-branches",t.parentIndex)},click:function(e){return t.$emit("set-section",t.elem)}}},[t._v(" "+t._s(t.elem.name)+" "),"N"==t.elem.active?e("HintText",{attrs:{text:t.lang.not_active}}):t._e(),t._v(" "+t._s(t.elem.items.length?" >":"")+" ")],1),t.parentActive?e("div",{staticClass:"section_sub_tree"},t._l(t.elem.items,(function(n,i){return e("SectionElement",{key:i,attrs:{parentActive:t.parentActive&&i==t.activeIndex,parentIndex:i,elem:n,lang:t.lang},on:{"drop-other-branches":t.dropOtherBranches,"set-section":t.setSection}})})),1):t._e()])},H=[],Z={name:"SectionElement",components:{HintText:h},props:["elem","parentActive","parentIndex","lang"],data:function(){return{activeIndex:-1}},methods:{dropOtherBranches:function(t){this.activeIndex=t},setSection:function(t){this.$emit("set-section",t)}}},j=Z,R=(0,f.Z)(j,$,H,!1,null,null,null),z=R.exports,W={name:"SectionSearch",components:{SectionElement:z,HintText:h},props:["settings","lang","post","sectionTree","initialSectionId"],data:function(){return{showSectionTree:!1,currentSectionName:"",currentSectionWarning:!1,warningHint:"",activeIndex:-1,timer:null}},watch:{},created:function(){this.timer=setInterval(this.setCurrentSectionName,500)},updated:function(){this.timer&&this.currentSectionName&&clearTimeout(this.timer)},methods:{dropOtherBranches:function(t){this.activeIndex=t},setCurrentSectionName:function(){if(this.sectionTree.length)if(this.initialSectionId){let t=this.getSectionById(this.initialSectionId,this.sectionTree),e="["+this.initialSectionId+"] ",n=!0;this.warningHint=this.lang.not_available,t&&(e=t.name,"Y"==t.active?n=!1:this.warningHint=this.lang.not_active),this.currentSectionName=e,this.currentSectionWarning=n}else this.currentSectionName=this.lang.not_selected},getSectionById:function(t,e){let n=null;for(let i of e){if(i.id==t){n=i;break}if(i.items.length&&(n=this.getSectionById(t,i.items),n))break}return n},setSection:function(t){this.$emit("set-section-to-filter",t.id),this.currentSectionWarning="N"==t.active,this.currentSectionName=t.name,this.activeIndex=-1,this.showSectionTree=!1}}},q=W,D=(0,f.Z)(q,A,P,!1,null,null,null),G=D.exports,J=function(){var t=this,e=t._self._c;return e("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedValue,expression:"selectedValue"}],on:{change:[function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.selectedValue=e.target.multiple?n:n[0]},function(e){return t.$emit("set-value-to-filter",t.selectedValue)}]}},t._l(t.values,(function(n,i){return e("option",{key:i,domProps:{value:n.value}},[t._v(" "+t._s(n.name)+" ")])})),0)},M=[],U={name:"SelectValue",props:["values","currentValue"],data:function(){return{selectedValue:""}},mounted:function(){let t=this.currentValue;t||(t=this.values[0].value??""),this.selectedValue=t,this.$emit("set-value-to-filter",this.selectedValue)}},X=U,Y=(0,f.Z)(X,J,M,!1,null,null,null),K=Y.exports,Q={name:"SubFilter",components:{SelectOperator:E,SelectCondition:B,SectionSearch:G,SelectValue:K},props:["settings","lang","post","sectionTree","allowedOperators","conditions","el","filter","indexes"],methods:{getIndexesForSubElement:function(t){let e=this.indexes.slice();return e.push(t),e},addCondition:function(t,e){let n,i=this.conditions[t];n="LOGIC"==i.code?{code:i.code,value:"OR",items:[]}:{code:i.code,name:i.name,operator:"=",type:i.type,value:""},this.$emit("add-filter-element",e,n)},addFilterElement:function(t,e){this.$emit("add-filter-element",t,e)},deleteFilterElement:function(t){this.$emit("delete-filter-element",t)},setOperator:function(t,e){this.$emit("set-filter-operator",t,e)},changeLogic:function(t){this.$emit("change-filter-logic",t)},setValueToFilter:function(t,e){e.value=t},setSectionToFilter:function(t,e){e.value=t},getAllowedValuesByCode:function(t){let e=[];for(let n of this.conditions)n.code==t&&"undefined"!=n.values&&(e=n.values);return e}}},tt=Q,et=(0,f.Z)(tt,y,b,!1,null,null,null),nt=et.exports,it={name:"CatalogFilter",props:["filterId"],components:{SubFilter:nt},data:function(){return{settings:{},lang:{},sectionTree:[],filter:[{code:"LOGIC",value:"AND",items:[]}],allowedOperators:[],conditions:[]}},mounted:async function(){this.loadSettings(),this.settings&&(await this.loadLang(),await this.loadAllowedOperators(),await this.loadConditions(),await this.loadFilter(),await this.loadSectionTree(),this.showSaveButton())},methods:{loadSettings:function(){if("undefined"!==window){const t=window.document.getElementById("wbs24-ozonapinew-settings");if(t)for(let e in t.dataset)this.settings[e]=t.dataset[e];else this.settings=!1}},loadLang:async function(){this.lang=await this.post({action:"getLang"})},loadAllowedOperators:function(){this.allowedOperators=[{name:this.lang.equal,operator:"=",types:["S","N","L","E","B"]},{name:this.lang.not_equal,operator:"!=",types:["S","N","L","E","B"]},{name:this.lang.less,operator:"<",types:["S","N","L","E"]},{name:this.lang.less_or_equal,operator:"<=",types:["S","N","L","E"]},{name:this.lang.more_or_equal,operator:">=",types:["S","N","L","E"]},{name:this.lang.more,operator:">",types:["S","N","L","E"]},{name:this.lang.contain,operator:"%",types:["S","L","E"]},{name:this.lang.not_contain,operator:"!%",types:["S","L","E"]}]},loadFilter:async function(){let t=await this.post({action:"getParam",profile_id:this.settings.profileId,code:this.filterId});t||(t="[]"),this.setFilter(JSON.parse(t))},loadConditions:async function(){let t=this.filterId,e=t.split("_"),n=e[2];this.conditions=await this.post({action:"getConditions",profile_id:this.settings.profileId,iblock_id:n})},save:async function(){await this.post({action:"saveParam",profile_id:this.settings.profileId,code:this.filterId,value:this.filter})},setFilter:function(t){0==t.length&&(t=[{code:"LOGIC",value:"AND",items:[]}]),this.filter=t},addFilterElement:function(t,e){let n=t[0]??!1;!1!==n&&e.code&&this.setItems(this.filter[n].items,t,1,e)},setItems:function(t,e,n,i){const s=e[n]??!1;!1===s?t.push(i):this.setItems(t[s].items,e,n+1,i)},deleteFilterElement:function(t){let e=t[0]??!1;!1!==e&&this.deleteElement(this.filter[e],t,1)},deleteElement:function(t,e,n){const i=e[n]??!1;!1!==i&&(e.length==n+1?t.items.splice(i,1):this.deleteElement(t.items[i],e,n+1))},setFilterOperator:function(t,e){let n=e[0]??!1;!1!==n&&this.setOperator(this.filter[n].items,e,1,t)},setOperator:function(t,e,n,i){const s=e[n]??!1;!1===s?t.operator=i:this.setOperator(t[s].items??t[s],e,n+1,i)},changeFilterLogic:function(t){let e=t[0]??!1;!1!==e&&this.changeLogic(this.filter[e],t,1)},changeLogic:function(t,e,n){const i=e[n]??!1;!1!==i&&(e.length==n+1?t.value="OR"==t.value?"AND":"OR":this.changeLogic(t.items[i],e,n+1))},loadSectionTree:async function(){let t=this.filterId,e=t.split("_"),n=e[2],i=await this.post({action:"getSectionTree",profile_id:this.settings.profileId,iblock_id:n});this.sectionTree=i},showSaveButton:function(){this.$emit("show-save-button")},post:async function(t){let e=[];t.mode=this.settings.mode;let n=await fetch(this.settings.backendUrl,{method:"POST",headers:{"Content-Type":"application/json;charset=utf-8"},body:JSON.stringify(t)});return n.ok&&(e=await n.json()),e}}},st=it,ot=(0,f.Z)(st,w,S,!1,null,null,null),at=ot.exports,rt={name:"App",props:["filterIdsString"],components:{CatalogFilter:at,EntitySwitch:_},data:function(){return{filterIds:[],saveButtonIsReady:!1,saved:!1,lang:{}}},mounted:function(){this.filterIds=this.filterIdsString.split(",")},methods:{showSaveButton:function(){this.saveButtonIsReady||(this.lang=this.$refs.filters[0].lang,this.saveButtonIsReady=!0)},save:async function(){for(let t=0;t<this.filterIds.length;t++)await this.$refs.filters[t].save();this.saveNotify()},saveNotify:function(){this.saved=!0,setTimeout((()=>this.saved=!1),1e3)}}},lt=rt,ct=(0,f.Z)(lt,s,o,!1,null,null,null),ut=ct.exports;if(i.ZP.config.productionTip=!1,"undefined"!==window){const t=window.document.getElementById("wbs24-ozonapinew-settings"),e=t.dataset.allowFilterIds;new i.ZP({render(){const t=arguments[0];return t(ut,{attrs:{filterIdsString:e}})}}).$mount("#filter")}}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.m=t,function(){var t=[];n.O=function(e,i,s,o){if(!i){var a=1/0;for(u=0;u<t.length;u++){i=t[u][0],s=t[u][1],o=t[u][2];for(var r=!0,l=0;l<i.length;l++)(!1&o||a>=o)&&Object.keys(n.O).every((function(t){return n.O[t](i[l])}))?i.splice(l--,1):(r=!1,o<a&&(a=o));if(r){t.splice(u--,1);var c=s();void 0!==c&&(e=c)}}return e}o=o||0;for(var u=t.length;u>0&&t[u-1][2]>o;u--)t[u]=t[u-1];t[u]=[i,s,o]}}(),function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){var t={143:0};n.O.j=function(e){return 0===t[e]};var e=function(e,i){var s,o,a=i[0],r=i[1],l=i[2],c=0;if(a.some((function(e){return 0!==t[e]}))){for(s in r)n.o(r,s)&&(n.m[s]=r[s]);if(l)var u=l(n)}for(e&&e(i);c<a.length;c++)o=a[c],n.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return n.O(u)},i=self["webpackChunkwbs24_ozonapinew_filter"]=self["webpackChunkwbs24_ozonapinew_filter"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))}();var i=n.O(void 0,[998],(function(){return n(7246)}));i=n.O(i)})();
//# sourceMappingURL=app.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit