Initial commit
This commit is contained in:
commit
22a1006598
1816 files changed
+410742
No files matched your search
@@ -0,0 +1 @@
|
||||
import{c as e,P as t,W as s,a6 as a,y as l,aK as i,aL as n,aB as r,aI as o,aJ as c,E as d,j as u,h as _,i as f,k as m,ay as h,aH as p}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as g,W as v,X as b,Z as w,ab as y,a5 as $,a9 as k,aa as C,J as S,az as F,Y as A,a8 as x,a6 as I}from"../../../vendor.js?ver=3.1.8";import{P as T}from"../../../PaginationBar.js?ver=3.1.8";import{I as P,C as j}from"../../../_IndividualProgress.js?ver=3.1.8";import{C as q}from"../../../Confirm.js?ver=3.1.8";import{_ as D,I as E,a as B,T as H}from"../../../fc-bits-ui.js?ver=3.1.8";import{P as z}from"../../../PageHeader.js?ver=3.1.8";import{F as L}from"../../../FloatingBulkActionShell.js?ver=3.1.8";import"../../../Badge.js?ver=3.1.8";const R={class:"fluentcrm_settings_wrapper"},Y={class:"fcrm_funnels_activities_page"},U={class:"fcrm_page_header_top_nav_wrapper"},V={class:"fcrm_page_header_top_nav"},W={class:"fcrm_page_header_top_nav_links"},J={class:"fcrm-layout-width"},M={class:"fcrm_table_wrapper"},K={class:"fcrm_table_body fcrm_pt_24"},N={key:1},Q={key:0},X=["title"],Z={key:1,class:"fcrm_badge fcrm_badge_plain"},G=["title"],O=["title"],ee={style:{display:"flex","align-items":"center",gap:"4px"}},te={class:"el-dropdown-link"},se={class:"el-popover__reference"},ae={class:"el-popover__reference"},le={class:"fcrm_empty_state"},ie={class:"fcrm_empty_state_text"},ne={class:"fcrm_bulk_action_bar"},re={class:"fcrm_bulk_action_left"},oe={class:"fc_bulk_selection_count"};const ce=D({name:"FunnelSubscribers",props:[],components:{PaginationBar:T,PageHeader:z,ContactCard:j,IndividualProgress:P,Confirm:q,SuccessFilled:l,Delete:a,InfoFilled:s,MoreFilled:t,Close:e,Icons:E,FloatingBulkActionShell:L},data(){return{funnel:{},subscribers:[],loading:!1,pagination:{total:0,per_page:10,current_page:1},sequences:[],stats:{metrics:[],total_revenue:0,revenue_currency:"USD"},visualization_type:"chart",search:"",deleting:!1,updating:!1,selectedIds:[],selected_status:"",selected_sequence:"",funnel_statuses:{active:this.$t("Active"),completed:this.$t("Completed"),cancelled:this.$t("Cancelled"),pending:this.$t("Pending")},loading_first:!0,syncSteps:!1,current_mode:"system"===H.getCurrentTheme()?H.getSystemTheme():H.getCurrentTheme()}},methods:{fetchSubscribers(){this.loading=!0;let e=["funnel","sequences"];this.loading_first||(e=[]),this.$get("funnels/all-activities",{per_page:this.pagination.per_page,page:this.pagination.current_page,with:e,search:this.search,status:this.selected_status,sequence_id:this.selected_sequence}).then(e=>{this.subscribers=e.activities.data,this.pagination.total=e.activities.total}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1,this.loading_first=!1})},rowStatusClass:({row:e})=>"fc_table_row_"+e.status,removeFromFunnel(e){this.deleting=!0,this.$del(`funnels/${e.funnel_id}/subscribers`,{subscriber_ids:[e.subscriber_id]}).then(e=>{this.$notify.success(e.message),this.fetchSubscribers()}).catch(e=>{this.handleError(e)}).finally(()=>{this.deleting=!1})},bulkRemove(){if(!this.selectedIds.length)return this.$notify.error(this.$t("Please select subscribers first")),!1;this.deleting=!0,this.$post("funnels/remove-bulk-subscribers",{funnel_subscriber_ids:this.selectedIds}).then(e=>{this.$notify.success(e.message),this.selectedIds=[],this.fetchSubscribers()}).catch(e=>{this.handleError(e)}).finally(()=>{this.deleting=!1})},changeFunnelSubscriptionStatus(e,t){this.updating=!0,this.$put(`funnels/${e.funnel_id}/subscribers/${e.subscriber_id}/status`,{status:t}).then(e=>{this.$notify.success(e.message),this.fetchSubscribers()}).catch(e=>{this.handleError(e)}).finally(()=>{this.updating=!1})},onSelection(e){const t=[];this.each(e,e=>{t.push(e.id)}),this.selectedIds=t},clearSelection(){this.$refs.activitiesTable&&this.$refs.activitiesTable.clearSelection(),this.selectedIds=[]},onThemeChanged(e){var t;this.current_mode=(null==(t=e.detail)?void 0:t.effective)||("system"===H.getCurrentTheme()?H.getSystemTheme():H.getCurrentTheme())}},mounted(){window.addEventListener(B,this.onThemeChanged),this.fetchSubscribers(),this.changeTitle(this.$t("All Automation Activities"))},beforeUnmount(){window.removeEventListener(B,this.onThemeChanged)}},[["render",function(e,t,s,a,l,T){const P=g("router-link"),j=n,q=i,D=g("page-header"),E=r,B=o,H=g("individual-progress"),z=g("InfoFilled"),L=d,ce=c,de=g("contact-card"),ue=g("SuccessFilled"),_e=g("MoreFilled"),fe=f,me=g("Delete"),he=m,pe=g("confirm"),ge=_,ve=u,be=g("Icons"),we=p,ye=g("pagination-bar"),$e=g("Close"),ke=g("floating-bulk-action-shell"),Ce=h;return v(),b("div",R,[w("div",Y,[w("div",U,[w("div",V,[w("ul",W,[w("li",null,[y(P,{to:"/funnels",class:"fcrm_top_nav_link"},{default:$(()=>[k(C(e.$t("Automation Funnels")),1)],void 0),_:1})]),w("li",null,[y(P,{to:"/funnels/funnel/all-activities",class:"fcrm_top_nav_link"},{default:$(()=>[k(C(e.$t("All Activities")),1)],void 0),_:1})])])]),t[3]||(t[3]=w("div",{class:"fcrm_page_header_top_actions"},null,-1))]),w("div",J,[y(D,null,{title:$(()=>[k(C(e.$Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{D as e,c as t,S as i,ak as n,aU as s,$ as o,aW as l,aV as c,E as a,e as r,at as _,ao as d,P as u,n as h,h as p,i as f,j as m,k as g,aN as k,aT as b,aw as v,ay as y,aK as w,aL as C,ax as $,ae as S,aZ as x,aO as T,a_ as B,az as V,aP as q,aJ as A,av as F,aB as j,aD as I,aA as E,g as L,ap as P}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as D,W as M,X as O,Z as R,Y as U,a5 as N,ab as H,a9 as J,aa as z,J as K,a8 as W,az as Z,a0 as G,a7 as Q,_ as Y,$ as X,ax as ee,a6 as te,b2 as ie,av as ne}from"../../../../vendor.js?ver=3.1.8";import{F as se,a as oe}from"../../../../FieldEditor.js?ver=3.1.8";import{A as le}from"../../../../Animation.js?ver=3.1.8";import{P as ce}from"../../../../ProBadge.js?ver=3.1.8";import{_ as ae,I as re}from"../../../../fc-bits-ui.js?ver=3.1.8";import{R as _e}from"../../../../_report_widget.js?ver=3.1.8";import{I as de}from"../../../../InlineDoc.js?ver=3.1.8";import{P as ue}from"../../../../PromoCard.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";import"../../../../_FormBuilder2.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../EmailComposer.js?ver=3.1.8";import"../../../../BlockComposer.js?ver=3.1.8";import"../../../../EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../TestEmail.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../_MergeCodes.js?ver=3.1.8";import"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../_TaxonomyTermsSelector.js?ver=3.1.8";import"../../../../_MailerConfig.js?ver=3.1.8";import"../../../../ItemCopier.js?ver=3.1.8";const he={class:"fcrm_funnel_blocks_panel"},pe={class:"fcrm_funnel_blocks_panel_header"},fe={class:"fcrm_funnel_blocks_panel_header_bottom"},me={key:0,class:"fcrm_funnel_blocks_panel_header_bottom_content"},ge={key:1,class:"fcrm_funnel_blocks_panel_header_bottom_content"},ke={key:2,class:"fcrm_funnel_blocks_panel_header_bottom_content"},be={class:"fcrm_funnel_blocks_wrapper_list"},ve={key:0,class:"fcrm_funnel_blocks_wrapper_item_title"},ye=["onClick"],we=["onClick"],Ce={class:"fcrm_trigger_selection_item_icon"},$e=["innerHTML"],Se={key:1},xe={class:"fcrm_trigger_selection_item_content"},Te={class:"fcrm_trigger_selection_item_title"},Be=["innerHTML"],Ve={key:0,class:"fcrm_empty_state"},qe={class:"fcrm_empty_state_text"};const Ae=ae({name:"blockChoice",components:{Icons:re,ProBadge:ce,Animation:le,CaretBottom:n,Menu:i,Close:t,Search:e},props:["blocks","condition_type","choice_context","show_close"],emits:["close","insert"],data:()=>({selectType:"action",searchBlock:"",closedCategories:[]}),mounted(){setTimeout(()=>{this.$refs.actions_search_input&&this.$refs.actions_search_input.focus()},300)},watch:{condition_type(){this.selectType="action"},searchBlock(e){e&&(this.selectType="all")}},computed:{current_items(){if("all"==this.selectType){const e={action:{title:this.$t("Actions"),categories:{}},benchmark:{title:this.$t("Goals"),categories:{}},conditional:{title:this.$t("Conditionals"),categories:{}}};if(this.each(this.blocks,(t,i)=>{if(!this.shouldIncludeBlock(t,i))return;const n=this.resolveBlockType(t,i);if(e[n]){const s=t.category||"Other";e[n].categories[s]||(e[n].categories[s]={title:s,items:{}}),t.action_name||(t.action_name=i),e[n].categories[s].items[i]=t}}),this.searchBlock){const t=this.searchBlock.toLowerCase();Object.keys(e).forEach(i=>{e[i].categories=Object.entries(e[i].categories).reduce((e,[i,n])=>{const s=Object.entries(n.items).reduce((e,[i,n])=>(n.title.toLowerCase().includes(t)&&(e[i]=n),e),{});return Object.keys(s).length>0&&(e[i]={title:n.title,items:s}),e},{})})}return e}const e={title:"",categories:{}};return this.each(this.blocks,(t,i)=>{if(!this.shouldIncludeBlock(t,i))return;if(this.resolveBlockType(t,i)===this.selectType){const n=t.category||"Other";e.categories[n]||(e.categories[n]={title:n,items:{}}),t.action_name||(t.action_name=i),e.categories[n].items[i]=t}}),{items:e}}},methods:{shouldIncludeBlock(e,t){return"child"!==this.choice_context||"conditional"!==e.type},resolveBlockType(e,t){let i=e.type;return"conditional"==i&&"funnel_ab_testing"==t&&"child"!=this.choice_context&&(i="action"),i},getCategoryKey:(e,t)=>`${e}::${t}`,toggleCategory(e){const t=this.closedCategories.indexOf(e);t>-1?this.closedCategories.splice(t,1):this.closedCategories.push(e)},isCategoryOpen(e){return!this.closedCategories.includes(e)},insert(e,t){if(t&&t.is_pro)return this.$alert('<p><strong>This block require pro version of FluentCRM</strong></p><p style="line-height: 22px; margin-bottom: 15px !important;">Please download and install FluentCRM Pro to activate this block</p><p><a class="el-button el-buttonLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{aQ as s,W as t,X as a,ab as e}from"../../../vendor.js?ver=3.1.8";import{_ as i}from"../../../fc-bits-ui.js?ver=3.1.8";import"../../../vendor-element-plus.js?ver=3.1.8";const o={class:"fcrm_funnel_root fc_funnel_root"};const n=i({name:"FunnelRoute",data:()=>({app_ready:!1,options:{}}),methods:{getOptions(){this.app_ready=!1;const s={fields:"campaigns,email_sequences"};this.has_company_module&&(s.fields=`${s.fields},companies`),this.$get("reports/options",s).then(s=>{this.options=s.options,this.options.tags=this.appVars.available_tags,this.options.lists=this.appVars.available_lists,this.options.editable_statuses=this.appVars.available_contact_editable_statuses}).catch(s=>{this.handleError(s)}).finally(()=>{this.app_ready=!0})}},mounted(){this.getOptions(),this.changeTitle(this.$t("Automations"))}},[["render",function(i,n,p,r,l,h){const c=s("router-view");return t(),a("div",o,[e(c,{options:l.options},null,8,["options"])])}]]);export{n as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{ay as e,av as t,k as s,g as a,c as n,W as i,aZ as l,a_ as r,aJ as c,b9 as o,aE as u,aH as d,aI as _,E as p,aO as m,j as h,h as f,i as b,e as g,aK as v,aL as y,aT as k,ap as w}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as S,a6 as C,W as $,X as x,Y as A,aa as q,a8 as F,Z as E,J as P,az as R,ab as I,a9 as B,a5 as T,a0 as V,b2 as j,av as L}from"../../../vendor.js?ver=3.1.8";import{P as D}from"../../../PaginationBar.js?ver=3.1.8";import{D as N}from"../../../DataTable.js?ver=3.1.8";import{F as z}from"../../../FloatingBulkActionShell.js?ver=3.1.8";import{I as O,C as U}from"../../../_IndividualProgress.js?ver=3.1.8";import{E as M}from"../../../_eChart.js?ver=3.1.8";import{_ as W,I as H,a as Y,T as G}from"../../../fc-bits-ui.js?ver=3.1.8";import{R as K}from"../../../_report_widget.js?ver=3.1.8";import{C as Z}from"../../../Confirm.js?ver=3.1.8";import{L as J,C as Q}from"../../../_LinkMetrics.js?ver=3.1.8";import{G as X}from"../../../GenericPromo.js?ver=3.1.8";import{S as ee}from"../../../_StepPicker.js?ver=3.1.8";import{B as te}from"../../../Badge.js?ver=3.1.8";import"../Email/Campaigns/_components/EmailPreview.js?ver=3.1.8";import"../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../SettingsIcons.js?ver=3.1.8";import"../../../PromoCard.js?ver=3.1.8";const se={style:{"min-height":"400px"}},ae={key:1,class:"fc_chart_empty",style:{"text-align":"center",padding:"40px 0",opacity:".6"}};const ne={class:"fcrm_funnel_step_reports"},ie={class:"fcrm_funnel_step_reports--list"},le={class:"fcrm_funnel_step_reports--card-title"},re={class:"fcrm_funnel_step_reports--card-stats-badges"},ce={key:0,class:"fcrm_funnel_step_reports--card fcrm_funnel_step_reports--card-result"},oe={class:"fcrm_funnel_step_reports--card-title"};const ue={class:"fcrm_funnel_email_reports"},de={key:0,class:"fcrm_funnel_email_lists"},_e={class:"fcrm_funnel_email_card--left"},pe=["onClick"],me={class:"fcrm_funnel_email_card--meta"},he={class:"icon"},fe={class:"fcrm_funnel_email_card--right"},be={class:"fcrm_quick_stats_wrap"},ge={class:"fcrm_quick_stats_label"},ve={class:"fcrm_quick_stats"},ye=["onClick"],ke={class:"icon"},we={class:"fcrm_quick_stat_digit"},Se=["title"],Ce={class:"icon"},$e={class:"fcrm_quick_stat_digit"},xe=["onClick","title"],Ae={class:"icon"},qe={class:"fcrm_quick_stat_digit"},Fe=["title"],Ee={class:"icon"},Pe={class:"fcrm_quick_stat_digit"},Re={key:0,class:"fcrm_quick_stat--revenue"},Ie={class:"icon"},Be={class:"fcrm_quick_stat_digit"},Te={key:1,class:"text-align-center"};const Ve={class:"fcrm_sync_new_steps_content"},je={style:{"font-size":"16px"}},Le={key:0},De={key:1},Ne={key:2};const ze={class:"fcrm_funnel_subscribers_report"},Oe={class:"fcrm_page_header_top_nav_wrapper"},Ue={class:"fcrm_page_header_breadcrumb"},Me={class:"fcrm_page_header_top_actions"},We={key:0,class:"fcrm_funnel_matrics_wrapper fc_m_24"},He={class:"fcrm_funnel_matrics_header"},Ye={class:"fcrm_funnel_matrics_body"},Ge={key:3,class:"fcrm_funnel_matrics_stat"},Ke={class:"count"},Ze={class:"icon"},Je={class:"fcrm_empty_state"},Qe={class:"fcrm_empty_state_text"},Xe={key:1},et={class:"icon"},tt={key:0},st={key:1},at={key:0},nt=["title"],it={class:"icon"},lt=["title"],rt=["title"],ct={class:"el-dropdown-link"},ot={class:"el-popover__reference"},ut={class:"icon"},dt={class:"el-popover__reference"},_t={class:"icon"},pt={class:"el-popover__reference"},mt={class:"icon"},ht={class:"el-popover__reference"},ft={class:"icon"},bt={class:"fcrm_bulk_action_bar"},gt={class:"fcrm_bulk_action_left"},vt={class:"fc_bulk_selection_count"},yt={class:"icon"},kt={style:{padding:"10px 20px"}};const wt=W({name:"FunnelSubscribers",props:["funnel_id"],components:{Icons:H,Badge:te,PaginationBar:D,DataTable:N,FloatingBulkActionShell:z,ContactCard:U,IndividualProgress:O,FunnelChart:W({name:"funnel-reporting-bar",props:["funnel_id","stats"],components:{EChart:M},data:()=>({fetching:!0,eChartOptions:null,maxCumulativeValue:0}),computed:{},methods:{setupChartItems(){if(!this.stats.metrics||0===this.stats.metrics.length)return this.eChartOptions=null,void(this.fetching=!1);const e=[],t=[],s=[],a=this.getBackgroundColors(this.stats.metrics.length);let n=0;this.each(this.stats.metrics,(i,l)=>{t.push({value:i.count,itemStyle:{color:"benchmark"===i.type?"red":a[l]}}),s.push(i.count),e.push(i.label+"\n"+i.percent+"%"),i.count>n&&(n=i.count)}),this.maxCumulativeValue=n+10;const i=e.length,l=i>8?Math.max(8/i*100,10):100,r=this;this.eChartOptions={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:e=>{const t=r.stats.metrics[e[0].dataIndex];let s=`<strong>${t.label}</strong><br/>`;return s+=`${t.percent}%<br/>`,e.forEach(e=>{const t=`<span style="display:inline-block;margin-right:4px;border-radius:4px;width:10px;height:10px;background-color:${e.color};"></span>`;s+=`${t} ${e.seriesName}: ${e.value}<br/>`}),t.revenues&&(s+=`Revenue: ${t.revenues.join(" & ")}`),s}},legend:{top:10,data:[this.$t("Contacts"),this.$t("Line")]},grid:{left:40,right:85,bottom:60,top:50,containLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{S as e,R as t,_ as s}from"../../../fc-bits.js?ver=3.1.8";import{$ as a,ae as l,an as i,aU as n,ax as o,aV as r,aW as c,E as d,k as _,e as u,aB as p,g as h,a6 as m,aj as g,aL as f,aK as b,ay as y,B as v,i as C,aG as w,az as k,aX as F,a4 as $,J as L,ac as V,a7 as S,u as T,c as A,L as P,D,j as x,h as q,aI as M,aQ as I,aP as B,aH as R}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as j,W as H,Y as E,a5 as U,X as O,ab as Z,ax as z,Z as N,aa as W,J as K,az as Q,a0 as Y,a9 as G,a8 as J,a7 as X,a6 as ee,$ as te,_ as se,bU as ae,b2 as le,bS as ie,bV as ne,bT as oe,bW as re}from"../../../vendor.js?ver=3.1.8";import{P as ce}from"../../../ProBadge.js?ver=3.1.8";import{P as de}from"../../../PromoCard.js?ver=3.1.8";import{_ as _e,I as ue,a as pe,T as he}from"../../../fc-bits-ui.js?ver=3.1.8";import{C as me}from"../../../Confirm.js?ver=3.1.8";import{P as ge}from"../../../PaginationBar.js?ver=3.1.8";import{I as fe}from"../../../InlineDoc.js?ver=3.1.8";import{F as be}from"../../../Filterer.js?ver=3.1.8";import{a as ye}from"../../../data_config.js?ver=3.1.8";import{P as ve}from"../../../PageHeader.js?ver=3.1.8";import{F as Ce}from"../../../FloatingBulkActionShell.js?ver=3.1.8";import{B as we}from"../../../Badge.js?ver=3.1.8";const ke={key:0,class:"el-dialog__title"},Fe={key:1,class:"el-dialog__title"},$e={key:0,class:"fcrm_trigger_selection_wrapper"},Le={class:"fcrm_trigger_selection_inner"},Ve={class:"fcrm_trigger_selection_sidebar"},Se={class:"fc_trigger_icon"},Te=["innerHTML"],Ae={class:"fcrm_trigger_label"},Pe={key:0,class:"fcrm_trigger_selection_sidebar--footer"},De={class:"fcrm_trigger_selection_main"},xe={class:"fcrm_trigger_selection_internal_label_wrapper"},qe={class:"icon"},Me={class:"fcrm_trigger_selection_header"},Ie={class:"fcrm_trigger_selection_header_title"},Be={key:0,class:"fcrm_trigger_selection_list"},Re=["onClick"],je={class:"fcrm_trigger_selection_item_icon"},He=["innerHTML"],Ee={key:1},Ue={class:"fcrm_trigger_selection_item_content"},Oe={class:"fcrm_trigger_selection_item_title"},Ze={class:"fcrm_trigger_selection_item_description"},ze=["href"],Ne={key:1,class:"fcrm_trigger_prebuild_template_wrapper"},We={key:0,class:"fcrm_trigger_prebuild_template_list--section"},Ke={class:"fcrm_trigger_prebuild_template_list"},Qe={class:"fcrm_trigger_prebuild_template_item_icon"},Ye={class:"fcrm_trigger_prebuild_template_item_title"},Ge={class:"fcrm_trigger_prebuild_template_item_description"},Je={class:"fcrm_trigger_prebuild_template_item_overlay"},Xe={class:"icon"},et={class:"icon"},tt=["href"],st={key:1,class:"fcrm_promo_block"},at={key:0,class:"dialog-footer"};const lt=_e({name:"CreateFunnelModal",components:{Icons:ue,PromoCard:de,ProBadge:ce,Back:i,CirclePlus:l,Finished:a},props:["visible","triggers"],emits:["close"],data(){var e,t;return{saving:!1,funnel:{title:"",trigger_name:""},templates:[],templatesLoading:!1,showCreateNewAutomations:!0,dialogVisible:this.visible,selected_category:(null==(t=null==(e=window.fcAdmin)?void 0:e.addons)?void 0:t.fluentcampaign)?this.$t("CRM"):"__all__",allCategoryKey:"__all__",allowed_categories:[],searchTrigger:"",showProDialog:!1}},watch:{visible(e){this.dialogVisible=e},dialogVisible(){this.$emit("close")}},computed:{has_campaign_pro(){var e,t;return!!(null==(t=null==(e=window.fcAdmin)?void 0:e.addons)?void 0:t.fluentcampaign)},effectiveSelectedCategory(){return(this.searchTrigger||"").trim()?this.allCategoryKey:this.selected_category},funnel_categories(){const e=[];return this.each(this.triggers,t=>{-1===e.indexOf(t.category)&&e.push(t.category)}),e.sort()},funnelTriggers(){const e=(this.searchTrigger||"").trim().toLowerCase(),t=!!e,s=[this.$t("CRM")],a={};this.each(this.triggers,(l,i)=>{const n=this.effectiveSelectedCategory===this.allCategoryKey||l.category===this.effectiveSelectedCategory;if(t||n){if(e){const t=(l.description||"").replace(/<[^>]*>/g," ");if(!`${l.label||""} ${t} ${l.category||""} ${i||""}`.toLowerCase().includes(e))return}s.includes(l.category)||s.push(l.category),a[i]=l}});const l={};if(s.forEach(e=>{this.each(a,(t,s)=>{t.category===e&&(l[s]=t)})}),!this.has_campaign_pro){const e={},t={};return this.each(l,(s,a)=>{s.disabled?t[a]=s:e[a]=s}),{...e,...t}}return l}},methods:{funnelActiveHandle(e){this.funnel.trigger_name&&this.funnel.trigger_name==e?this.funnel.trigger_name="":this.funnel.trigger_name=e},saveFunnel(){this.saving=!0,this.$post("funnels",{funnel:this.funnel}).then(e=>{this.$notify.success(e.message),this.$router.push({name:"edit_funnel",params:{funnel_id:e.funnel.id},query:{is_new:"yes"}})}).catch(e=>{this.handleError(e)}).finally(()=>{this.saving=!1})},getCatIcon(e){e=e.replaceAll(" ","").toLowerCase();const t=this.appVars.funnel_cat_icons[e];return t?"string"==typeof t?t.startsWith("<")?t:'<i class="'+t+'"></i>':t.svg?t.svg:t.icon?'<i class="'+t.icon+'"></i>':"":""},getElIcon:e=>n[e]||a,createFromTemplate(e){this.checkImportable(e)&&this.$post("funnels/create-from-template",{template:e}).then(e=>{this.$notify.success(e.messLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{aZ as e,a_ as o,ay as t,k as r,aR as s,aw as i,e as n,ax as l,ap as a}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as d,W as c,X as u,Z as _,ab as p,a5 as m,a9 as f,aa as v,a6 as h,J as b,a8 as k,Y as g,az as y,av as j}from"../../../vendor.js?ver=3.1.8";import{a as q,F as $}from"../../../FieldEditor.js?ver=3.1.8";import{_ as w,I as F}from"../../../fc-bits-ui.js?ver=3.1.8";import{P as x}from"../../../PromoCard.js?ver=3.1.8";import"../../../fc-bits.js?ver=3.1.8";import"../../../_FormBuilder2.js?ver=3.1.8";import"../../../PhotoWidget.js?ver=3.1.8";import"../../../input-popover-dropdown.js?ver=3.1.8";import"../../../data_config.js?ver=3.1.8";import"../../../_OptionSelector.js?ver=3.1.8";import"../../../_AjaxSelector.js?ver=3.1.8";import"../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../EmailComposer.js?ver=3.1.8";import"../../../BlockComposer.js?ver=3.1.8";import"../../../EmailPreview.js?ver=3.1.8";import"../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../TestEmail.js?ver=3.1.8";import"../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../PaginationBar.js?ver=3.1.8";import"../../../_MergeCodes.js?ver=3.1.8";import"../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../_TaxonomyTermsSelector.js?ver=3.1.8";import"../../../_MailerConfig.js?ver=3.1.8";import"../../../ItemCopier.js?ver=3.1.8";const C={class:"fcrm_funnel_import_page"},I={class:"fcrm_funnel_top_nav_wrapper"},S={class:"fcrm_page_header_breadcrumb"},E={class:"fcrm_funnel_import_body fcrm_max_w_800"},V={key:0,class:"fcrm_funnel_import_upload_step"},B={class:"fcrm_funnel_import_card"},N={class:"fcrm_funnel_import_card--header"},P={class:"fcrm_funnel_import_card--header-left"},A={class:"fcrm_funnel_import_card--header-title"},J={class:"fcrm_funnel_import_card--header-description"},O={class:"fcrm_funnel_import_card--body"},T={class:"fcrm_upload_file_box"},U={class:"fcrm_upload_file_box_label"},L={class:"upload-icon"},Q={class:"el-upload__text"},R={key:0},D={key:1,class:"fcrm_funnel_import_root_editor fc_funnel_editor"},M={class:"fcrm_fixed_bottom_actions"},W={key:2,class:"fcrm_funnel_import_root_editor"},Z={class:"fcrm_fixed_bottom_actions"};const z=w({name:"ImportFunnel",components:{PromoCard:x,Icons:F,FieldEditor:$,FormField:q},props:["options"],data:()=>({ArrowRightBold:j(a),sequences:[],funnel:{},blocks:{},block_fields:{},step:"upload",sequence_step:0,importing:!1,inline_errors:!1}),computed:{url(){let e=window.ajaxurl;return e+=(e.match(/\?/)?"&":"?")+jQuery.param({action:"fluentcrm_import_funnel"}),e},current_block(){return this.sequences[this.sequence_step]||!1},current_block_fields(){if(!this.current_block)return{};const e=this.current_block.action_name;return this.block_fields[e]}},methods:{success(e){this.sequences=e.funnel_sequences,this.funnel=e.funnel,this.blocks=e.blocks,this.block_fields=e.block_fields,this.step="root_editor"},error(e){const o=JSON.parse(e.message);this.$notify.error(o.message),o.requires&&(this.inline_errors=o.requires)},showSequenceEditor(e){jQuery("html, body").animate({scrollTop:0},"slow"),this.sequence_step=e,this.step="sequence_editor"},completeImport(){this.importing=!0,this.$post("funnels/import",{funnel:this.funnel,sequences:JSON.stringify(this.sequences)}).then(e=>{this.$notify.success(e.message),this.$router.push({name:"edit_funnel",params:{funnel_id:e.funnel.id}})}).catch(e=>{this.handleError(e)}).finally(()=>{this.importing=!1})}}},[["render",function(a,j,q,$,w,F){const x=e,z=o,G=d("Icons"),X=r,Y=s,H=n,K=i,ee=d("field-editor"),oe=d("form-field"),te=l,re=d("PromoCard"),se=t;return c(),u("div",C,[_("div",I,[_("div",S,[p(z,{class:"fcrm_funnel_breadcrumb","separator-icon":w.ArrowRightBold},{default:m(()=>[p(x,{to:{name:"funnels"}},{default:m(()=>[f(v(a.$t("Automation Funnels")),1)],void 0,!0),_:1}),p(x,null,{default:m(()=>[f(v(a.$t("Import Automation Funnel")),1)],void 0,!0),_:1})],void 0),_:1},8,["separator-icon"])])]),h((c(),u("div",E,[a.has_campaign_pro?(c(),u(b,{key:0},["upload"==w.step?(c(),u("div",V,[_("div",B,[_("div",N,[_("div",P,[_("div",A,v(a.$t("Import Automation")),1),_("div",J,v(a.$t("import_your_exported_automation_json_file")),1)])]),_("div",O,[_("div",T,[_("h3",U,v(a.$t("Upload JSON File")),1),p(Y,{drag:"",limit:1,action:F.url,ref:"uploader",multiple:!1,"on-error":F.error,"on-success":F.success},{default:m(()=>[_("span",L,[p(G,{"icon-name":"upload"})]),_("div",Q,[f(v(a.$t("Drop JSON file here or"))+" ",1),_("em",null,v(a.$t("click to upload")),1)]),p(X,null,{default:m(()=>[f(v(a.$t("Browse File")),1)],void 0,!0),_:1})],void 0),_:1},8,["action","on-error","on-success"])]),w.inline_errors?(c(),u("pre",R,v(w.inline_errors),1)):k("",!0)])])])):"root_editor"==w.step?(c(),u("div",D,[p(ee,{title_badge:a.$t("Trigger"),key:"is_editing_root",show_controls:!1,options:q.options,data:w.funnel.settings,settings:w.funnel.settingsFields},{after_header:m(()=>[p(K,{label:a.$t("Funnel Name")},{default:m(()=>[p(H,{placeholder:a.$t("Funnel Name"),modelValue:w.funnel.titleLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{P as t,aB as e,bj as s,bi as i,aJ as n,aQ as a,aO as o}from"../../../../vendor-element-plus.js?ver=3.1.8";import{c6 as l,aQ as r,W as c,X as d,ab as u,a5 as f,Z as _,aa as p,J as h,az as m,Y as b,a0 as y,a9 as g,a8 as v}from"../../../../vendor.js?ver=3.1.8";import{_ as $}from"../../../../fc-bits-ui.js?ver=3.1.8";const k={key:0,class:"fc_loading"},w={key:1,style:{padding:"10px 15px"},class:"fc_individual_progress"},z={style:{"margin-bottom":"15px"}},I={class:"fluentcrm_clickable"};const L=$({name:"LazyIndividualProgress",props:["subscriber_id","funnel"],data:()=>({funnel_subscriber:{},sequences:[],loading:!0,isLoaded:!1,MoreFilledIcon:t}),computed:{keyedMetrics(){return this.isLoaded?l(this.funnel_subscriber.metrics,"sequence_id"):{}},timelines(){if(!this.isLoaded)return[];let t=this.$t("Entrance (%s)",this.funnel.title);"pending"===this.funnel_subscriber.status?t+=this.$t("_In_Wfdoc"):"waiting"===this.funnel_subscriber.status&&(t+=this.$t("_In_Wfna"));const e=[{content:t,timestamp:this.nsHumanDiffTime(this.funnel_subscriber.created_at),size:"large",type:"primary",icon:this.MoreFilledIcon}];let s=!1;return this.each(this.sequences,(t,i)=>{const n=this.keyedMetrics[t.id]||{};let a=t.title;"pending"===a?a+=this.$t("_In_Wfdc"):"waiting"===a&&(a+=this.$t("_In_Wfna")),"conditional"==t.type&&(s=t);let o="";if(t.condition_type){o="fc_path_"+t.condition_type,s&&(o="fc_"+s.action_name+" "+o);let e=this.$t("Condition:")+" "+t.condition_type;if("funnel_ab_testing"==s.action_name){const s="yes"==t.condition_type?this.$t("B"):this.$t("A");e=this.$t("Path: ")+s,o+="_"+s}a+=" ( "+e+" )"}n.status||(o+=" fc_timeline_empty"),e.push({content:a,status:n.status,notes:n.notes,timestamp:this.nsHumanDiffTime(n.created_at),color:this.getTimelineColor(n),wrapper_class:o})}),e}},methods:{getTimelineColor:t=>t.status&&"completed"===t.status?"#0bbd87":"",fetchData(){this.loading=!0,this.$get(`funnels/${this.funnel.id}/subscribers/${this.subscriber_id}`).then(t=>{this.funnel_subscriber=t.funnel_subscriber,this.sequences=t.sequences}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1,this.isLoaded=!0})},maybeFetchData(){this.isLoaded||this.fetchData()}}},[["render",function(t,l,$,L,D,q){const W=e,j=a,x=n,C=i,F=s,M=r("router-link"),T=o;return c(),d("div",null,[u(T,{placement:"right",onShow:l[0]||(l[0]=t=>q.maybeFetchData()),width:"400","popper-class":"fc_individual_progress_popover",trigger:"click"},{reference:f(()=>[_("span",I,p($.funnel.title),1)]),default:f(()=>[_("div",null,[D.loading?(c(),d("div",k,[u(W,{loading:!0,rows:3})])):D.isLoaded?(c(),d("div",w,[_("div",z,p(t.$t("Current Status:"))+" "+p(D.funnel_subscriber.status),1),u(F,null,{default:f(()=>[(c(!0),d(h,null,m(q.timelines,(t,e)=>(c(),b(C,{key:e,class:y(t.wrapper_class),icon:t.icon,type:t.type,color:t.color,size:t.size,timestamp:t.timestamp},{default:f(()=>[g(p(t.content)+" ",1),_("template",null,[t.notes?(c(),b(x,{key:0,class:"item",effect:"dark",content:t.notes,placement:"top-start"},{default:f(()=>[u(j,{size:"small",type:"info"},{default:f(()=>[g(p(t.status),1)],void 0,!0),_:2},1024)],void 0,!0),_:2},1032,["content"])):t.status?(c(),b(j,{key:1,size:"small",type:"info"},{default:f(()=>[g(p(t.status),1)],void 0,!0),_:2},1024)):v("",!0)])],void 0,!0),_:2},1032,["class","icon","type","color","size","timestamp"]))),128))],void 0,!0),_:1}),u(M,{to:{name:"edit_funnel",params:{funnel_id:this.funnel.id}}},{default:f(()=>[g(p(t.$t("View Automation Steps")),1)],void 0,!0),_:1},8,["to"])])):v("",!0)])],void 0),_:1})])}]]);export{L as default};
|
||||
Reference in new issue
Block a user