| Server IP : 52.25.153.185 / Your IP : 216.73.217.43 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-45-cloud-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/fluent-crm/assets/ |
Upload File : |
import{aw as e,aF as i,a_ as t}from"./vendor-element-plus.js?ver=3.2.0";import{aa as l,Y as o,Z as a,a4 as s,a2 as d,P as n,aA as r}from"./vendor.js?ver=3.2.0";import{_ as h}from"./fc-bits-ui.js?ver=3.2.0";const m=h({name:"AjaxSelector",props:["field","modelValue"],emits:["change","update:modelValue"],data(){return{model:this.modelValue,loading:!1,options:[]}},watch:{model(e){this.$emit("update:modelValue",e),this.$emit("change",e)}},methods:{fetchOptions(e){let i=this.field.option_key;this.field.extended_key&&(i+="_"+this.field.extended_key);let t="";if(this.field.cacheable){if(t+="_fcrm_ajax_cache_"+i,window[t])return void(this.options=window[t])}else if(this.field.experimental_cache&&(t+="_fcrm_ajax_cache_"+i+"_"+e+" "+JSON.stringify(this.model),this.field.sub_option_key&&(t+="_"+JSON.stringify(this.field.sub_option_key)),window[t]))return void(this.options=window[t]);if(this.doing_ajax)return!1;this.loading=!0;const l={search:e,values:this.model,option_key:i};this.field.sub_option_key&&(l.sub_option_key=this.field.sub_option_key),this.$get("reports/ajax-options",l).then(e=>{this.options=e.options,t&&e.options&&(window[t]=e.options)}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchOptions("")}},[["render",function(h,m,p,c,f,u){const _=i,b=t,w=e;return l((o(),a(b,{modelValue:f.model,"onUpdate:modelValue":m[0]||(m[0]=e=>f.model=e),multiple:p.field.is_multiple,filterable:"",remote:!p.field.cacheable,clearable:p.field.clearable,disabled:p.field.disabled,"reserve-keyword":"","allow-create":p.field.creatable,size:p.field.size,placeholder:p.field.placeholder||h.$t("Please enter a keyword"),"remote-method":u.fetchOptions},{default:s(()=>[(o(!0),d(n,null,r(f.options,e=>(o(),a(_,{key:e.id,label:e.title,value:e.id},null,8,["label","value"]))),128))],void 0),_:1},8,["modelValue","multiple","remote","clearable","disabled","allow-create","size","placeholder","remote-method"])),[[w,f.loading]])}]]);export{m as A};