@nexlylab/widget 1.32.14 → 1.32.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/INSTALL.txt +1 -1
- package/dist/runtime/{1.32.14/chunks/ClickToLoadEmbed-CDdotCS8-W2yBrg7b.js → 1.32.16/chunks/ClickToLoadEmbed-CVZbpoTT-CKUzZ7gL.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/PanelInfoVideo-BKn3ucAb-BrU-Qlul.js → 1.32.16/chunks/PanelInfoVideo-BKq2v0QM-BrU-Qlul.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/assistant-link-components-MZWf5ty7-C44wlQAi.js → 1.32.16/chunks/assistant-link-components-DkuhHIF9-CPkAMFv6.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/assistant-link-policy-DWaWTnGr-Cc-yj-a-.js → 1.32.16/chunks/assistant-link-policy-CS93s-vA-Cc-yj-a-.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/block-rating-DH7mp-_R-CoiP5C2K.js → 1.32.16/chunks/block-rating-DGpoz2o3-CoiP5C2K.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/external-url-LRu_ntew-CJQjg_od.js → 1.32.16/chunks/external-url-BzUbjdMo-CJQjg_od.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-C1WD1dlq-Dm9kbc85.js → 1.32.16/chunks/index-6HKNPucI-Dm9kbc85.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-Bu9Gh6Nc-BfWdQCT7.js → 1.32.16/chunks/index-BCtNBIxP-CcsFQ7Dx.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/index-BD-jPdzs-ZRnEJoQe.js → 1.32.16/chunks/index-BIMK2_g0-ZRnEJoQe.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-BSoCdILD-D6wzHiS0.js → 1.32.16/chunks/index-BJClDxSC-D6wzHiS0.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-CNJUK2bK-C0OfCXUx.js → 1.32.16/chunks/index-BLT1bBjC-6c5Ar61I.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/index-C6_8JGpJ-BqZmEVev.js → 1.32.16/chunks/index-BW-8QNI--BqZmEVev.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-C75hX_dj-VhJcCfAC.js → 1.32.16/chunks/index-BncytMlP-VhJcCfAC.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-k-jZV_MQ-H31PHMqm.js → 1.32.16/chunks/index-BoVToqY3-H31PHMqm.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-B8aKMeg5-BLxOZxZv.js → 1.32.16/chunks/index-C5MpFJwF-BLxOZxZv.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-Dh0aThiP-Aqz1AnQ5.js → 1.32.16/chunks/index-CISMnUXx-Aqz1AnQ5.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-Dkv5YXXW-pkywvGDF.js → 1.32.16/chunks/index-CIe60p_E-pkywvGDF.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-1o6W5wiJ-I68tb-d3.js → 1.32.16/chunks/index-CIgDHLEK-I68tb-d3.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-DP_6HfDM-DAdxCQyi.js → 1.32.16/chunks/index-CUGV3nk2-DAdxCQyi.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-DO0-ht8E-DUgMllqN.js → 1.32.16/chunks/index-CbGT4d5Q-DUgMllqN.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-DTVlG27U-DP0QKkgf.js → 1.32.16/chunks/index-Cdmdsj1E-DP0QKkgf.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-D-ZhVFzi-A3rpkVmQ.js → 1.32.16/chunks/index-Cf4eQF9g-mnUzfS1e.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/index-CMFQhtEe-BcW8HKb8.js → 1.32.16/chunks/index-ChL-bSAN-BcW8HKb8.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-qpVhJY7A-Cgivx3vY.js → 1.32.16/chunks/index-Chn4ATvZ-CSI6_0RJ.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/index-Dt6OpItC-R_xuAEQV.js → 1.32.16/chunks/index-Cmt7uZiE-R_xuAEQV.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-Czz6Gyh_-C3bBvEcm.js → 1.32.16/chunks/index-CogJkGmU-C3bBvEcm.js} +1 -1
- package/dist/runtime/1.32.16/chunks/index-CsoMgZU8-C1BzRUwZ.js +2 -0
- package/dist/runtime/{1.32.14/chunks/index-D72orqXX-C_0Ll4qr.js → 1.32.16/chunks/index-Cxwd1OKy-C_0Ll4qr.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-BylVnv7X-DBhSkJ7i.js → 1.32.16/chunks/index-D-uANagm-DBhSkJ7i.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-DDEE3QfX-3B-eE3K7.js → 1.32.16/chunks/index-DG-KS4AB-3B-eE3K7.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-V1EfdiK7-bdo5pwX-.js → 1.32.16/chunks/index-DHdp5nGO-bdo5pwX-.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-hHQjRGar-TEMHje2B.js → 1.32.16/chunks/index-DL04XhIK-TEMHje2B.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-IW3aNe-y-W1lJrIDD.js → 1.32.16/chunks/index-DNwWHPWp-W1lJrIDD.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-D9grn5WJ-Dp5AxBD4.js → 1.32.16/chunks/index-DO5eKOOB-Dp5AxBD4.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-B9ozeox8-oy07dUaV.js → 1.32.16/chunks/index-Dc8zecP4-oy07dUaV.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-csHaX5dv-BpgnWlB8.js → 1.32.16/chunks/index-DchTua3m-BpgnWlB8.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-CmYYEi7N-Dr1V6OGz.js → 1.32.16/chunks/index-DdI8qMqt-Dr1V6OGz.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-DphwDFW6-C9wFr7fa.js → 1.32.16/chunks/index-Dfcx_9km-C9wFr7fa.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-Gi-3UOyp-DuzPeEIz.js → 1.32.16/chunks/index-DhYv8bbj-DGasnsaZ.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/index-CqV8rHvG-DS9JaGVN.js → 1.32.16/chunks/index-Dtiss_wT-CLkn_6EY.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/index-uM4Y0lxc-Dsa9X9U7.js → 1.32.16/chunks/index-MAmLiP1_-Dsa9X9U7.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-Chy2Zmo5-CiRb-0NX.js → 1.32.16/chunks/index-Or6sA2eF-CiRb-0NX.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-DPNGQF5b-_M0CWPEY.js → 1.32.16/chunks/index-PSL_6OT1-_M0CWPEY.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-B1ef1IlE-QeFj7CR9.js → 1.32.16/chunks/index-SgPuWMUv-QeFj7CR9.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-CwbUW6dx-BLBDoJCM.js → 1.32.16/chunks/index-fotohjEP-BLBDoJCM.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-BnKOhYKk-CkemNrch.js → 1.32.16/chunks/index-pQ7fPgLl-JdphAk2-.js} +2 -2
- package/dist/runtime/{1.32.14/chunks/index-BvlAsO4n-DbuSZfeK.js → 1.32.16/chunks/index-svAzoy0Y-DbuSZfeK.js} +1 -1
- package/dist/runtime/{1.32.14/chunks/index-DZKtK9hT-DQBGsPwB.js → 1.32.16/chunks/index-tAu73-sK-DQBGsPwB.js} +1 -1
- package/dist/runtime/1.32.16/nexly.js +61 -0
- package/dist/v1.js +1 -1
- package/package.json +1 -1
- package/dist/runtime/1.32.14/chunks/index-BljIlfbh-D9I6jaso.js +0 -2
- package/dist/runtime/1.32.14/nexly.js +0 -61
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/allowed-elements-BXnLJV1S-C-_lr2zm.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/index-BPDIV1BN-DINkyYvc.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/index-BcsmWDTX-Dw9WA5Ac.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/index-C262wwK4-DpyhuXqd.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/index-DMQkz1bV-BuMYksln.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/index-DZADUAKv-DPfvWVuj.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/index.modern-CioVZ357-BA5NTOmY.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +0 -0
- /package/dist/runtime/{1.32.14 → 1.32.16}/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as h,j as e,Q as m,o as j}from"../nexly.js";const C={slug:"recruitment-pipeline",name:"Recruitment Pipeline",version:"1.0.0",category:"interactive",requiredService:"recruitment-pipeline",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"recruitment-pipeline",inputSchema:{type:"object",properties:{stageCounts:{type:"object",properties:{contacted:{type:"number"},interested:{type:"number"},pending:{type:"number"},active:{type:"number"}}},topFollowUpToday:{type:"object",properties:{id:{type:"string"},name:{type:"string"},stage:{type:"string"},notes:{type:"string"},lastContactDate:{type:"string"}}},topFollowUpMessage:{type:"string"},prospects:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},contactInfo:{type:"string"},stage:{type:"string"},notes:{type:"string"},lastContactDate:{type:"string"},aiFollowupMessage:{type:"string"}}}},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",stageCounts:{contacted:3,interested:5,pending:2,active:4},topFollowUpToday:{id:"preview-1",name:"Piotr Nowak",stage:"interested",notes:"Met at networking event, interested in health products",lastContactDate:new Date(Date.now()-5*864e5).toISOString().slice(0,10)},topFollowUpMessage:"Hi Piotr! I was thinking about you — I'd love to share how our latest health product has been helping people in similar situations. Can we hop on a 10-minute call this week?",prospects:[{id:"preview-1",name:"Piotr Nowak",stage:"interested",notes:"Met at networking event",lastContactDate:new Date(Date.now()-5*864e5).toISOString().slice(0,10)},{id:"preview-2",name:"Anna Kowalska",stage:"pending",notes:"Waiting for reply after product demo",lastContactDate:new Date(Date.now()-2*864e5).toISOString().slice(0,10)},{id:"preview-3",name:"Maria Wiśniewska",stage:"contacted",lastContactDate:new Date(Date.now()-8*864e5).toISOString().slice(0,10)},{id:"preview-4",name:"Tomasz Wójcik",stage:"active",lastContactDate:new Date().toISOString().slice(0,10)}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — funnel summary + top follow-up + AI script",value:"basic"},{label:"Pro — full prospect list with Kanban + AI panel",value:"pro"}],group:"Display"}],events:{emits:[{name:"rp:prospectAdded",description:"User added a new prospect"},{name:"rp:stageChanged",description:"User moved a prospect to a new stage"},{name:"rp:followUpCopied",description:"User copied the AI follow-up message"}],listens:[{name:"rp:refresh",description:"Force refresh recruitment pipeline data"}]}},o={contacted:"recruitment.stage.contacted",interested:"recruitment.stage.interested",pending:"recruitment.stage.pending",active:"recruitment.stage.active"},p={contacted:"es-rp__stage--contacted",interested:"es-rp__stage--interested",pending:"es-rp__stage--pending",active:"es-rp__stage--active"};function D({data:n,config:y,actions:f,metadata:w,i18n:b}){const s=b?.t??(t=>t),v=y.mode??n.mode??"basic",i=n.stageCounts??{contacted:0,interested:0,pending:0,active:0},a=n.topFollowUpToday,c=n.topFollowUpMessage,l=n.prospects??[],[_,u]=h.useState("idle"),[r,g]=h.useState(null);if(i.contacted+i.interested+i.pending+i.active===0&&!a&&!n.error)return e.jsx(m,{blockType:"recruitment-pipeline",children:e.jsxs("div",{className:"es-block__body es-rp__body",children:[e.jsx("div",{className:"es-rp__funnel",role:"list","aria-label":s("recruitment.pipeline_stages_aria"),children:["contacted","interested","pending","active"].map(t=>e.jsxs("div",{role:"listitem",className:`es-rp__funnel-stage ${p[t]??""} es-rp__stage--empty`,children:[e.jsx("span",{className:"es-rp__funnel-count",children:"0"}),e.jsx("span",{className:"es-rp__funnel-label",children:s(o[t])})]},t))}),e.jsx("p",{style:{fontSize:13,color:"var(--es-color-on-surface-muted, #4B5563)",margin:"8px 0 0",textAlign:"center"},children:w?.dataQuality==="none"?s("recruitment.signin_prompt"):s("recruitment.empty_pipeline")})]})});if(n.error)return e.jsx(m,{blockType:"recruitment-pipeline",error:j(n.error)});async function x(){const t=c??"";if(t)try{await navigator.clipboard.writeText(t),u("copied"),f.emit("rp:followUpCopied",{prospectId:a?.id}),setTimeout(()=>u("idle"),2e3)}catch{}}const d=r?l.filter(t=>t.stage===r):l;return e.jsx(m,{blockType:"recruitment-pipeline",children:e.jsxs("div",{className:"es-block__body es-rp__body",children:[e.jsx("div",{className:"es-rp__funnel",role:"list","aria-label":s("recruitment.pipeline_stages_aria"),children:["contacted","interested","pending","active"].map(t=>e.jsxs("button",{role:"listitem",className:`es-rp__funnel-stage ${p[t]??""} ${r===t?"es-rp__funnel-stage--active":""}`,onClick:()=>g(r===t?null:t),"aria-pressed":r===t,"aria-label":s("recruitment.stage_count_aria",{stage:s(o[t]),count:i[t]}),children:[e.jsx("span",{className:"es-rp__funnel-count",children:i[t]}),e.jsx("span",{className:"es-rp__funnel-label",children:s(o[t])})]},t))}),a&&e.jsxs("div",{className:"es-rp__followup-card",children:[e.jsxs("div",{className:"es-rp__followup-eyebrow",children:["📅 ",s("recruitment.follow_up_today")]}),e.jsx("div",{className:"es-rp__followup-name",children:a.name}),e.jsxs("div",{className:"es-rp__followup-meta",children:[e.jsx("span",{className:`es-rp__badge ${p[a.stage]??""}`,children:s(o[a.stage])}),a.lastContactDate&&e.jsx("span",{className:"es-rp__followup-date",children:s("recruitment.last_contact",{date:a.lastContactDate})})]}),a.notes&&e.jsx("div",{className:"es-rp__followup-notes",children:a.notes}),c&&e.jsxs("div",{className:"es-rp__followup-message",children:[e.jsxs("div",{className:"es-rp__followup-message-header",children:[e.jsxs("span",{className:"es-rp__ai-label",children:["✨ ",s("recruitment.ai_followup_script")]}),e.jsx("button",{className:`es-rp__copy-btn${_==="copied"?" es-rp__copy-btn--copied":""}`,onClick:x,"aria-label":s("recruitment.copy_followup_aria"),title:s("common.copy_to_clipboard"),children:_==="copied"?"✓":"⎘"})]}),e.jsx("p",{className:"es-rp__followup-message-text",children:c})]})]}),v==="pro"&&e.jsxs("div",{className:"es-rp__prospect-list",children:[e.jsxs("div",{className:"es-rp__prospect-list-header",children:[e.jsx("span",{className:"es-rp__section-title",children:r?s("recruitment.stage_filtered",{stage:s(o[r]),count:d.length}):s("recruitment.all_prospects",{count:l.length})}),r&&e.jsx("button",{className:"es-rp__clear-filter",onClick:()=>g(null),children:s("recruitment.clear_filter")})]}),d.length===0?e.jsx("p",{className:"es-rp__empty",children:s("recruitment.empty_stage")}):e.jsx("ul",{className:"es-rp__prospects","aria-label":s("recruitment.prospects_list_aria"),children:d.map(t=>e.jsxs("li",{className:"es-rp__prospect-item",children:[e.jsxs("div",{className:"es-rp__prospect-header",children:[e.jsx("span",{className:"es-rp__prospect-name",children:t.name}),e.jsx("span",{className:`es-rp__badge ${p[t.stage]??""}`,children:s(o[t.stage])})]}),t.contactInfo&&e.jsx("span",{className:"es-rp__prospect-contact",children:t.contactInfo}),t.notes&&e.jsx("p",{className:"es-rp__prospect-notes",children:t.notes}),t.lastContactDate&&e.jsx("span",{className:"es-rp__prospect-date",children:s("recruitment.last_contact",{date:t.lastContactDate})})]},t.id))})]})]})})}export{D as Component,C as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-PSL_6OT1-_M0CWPEY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as P,j as s,Q as m}from"../nexly.js";const n=28,u=2*Math.PI*n;function w({data:t,config:g,actions:h,metadata:N,i18n:_}){const i=_?.t??(e=>e),b=g.mode??t.mode??"basic",p=t.report,a=t.aiPitch,[v,x]=P.useState("idle");if(!p&&!t.error)return s.jsx(m,{blockType:"product-sales-intel",children:s.jsx("div",{className:"psi-block",children:s.jsxs("div",{className:"psi-pv-card",children:[s.jsxs("div",{className:"psi-ring-container",children:[s.jsx("svg",{className:"psi-ring-svg",width:72,height:72,viewBox:"0 0 72 72",children:s.jsx("circle",{className:"psi-ring-track",cx:36,cy:36,r:n})}),s.jsxs("div",{className:"psi-ring-label",children:[s.jsx("span",{className:"psi-ring-pct",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:"0%"}),s.jsx("span",{className:"psi-ring-sub",children:"PV"})]})]}),s.jsxs("div",{className:"psi-pv-info",children:[s.jsx("div",{className:"psi-pv-title",children:i("product_sales_intel.personal_volume")}),s.jsx("div",{className:"psi-pv-amount",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:"—"}),s.jsx("div",{className:"psi-pv-target",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:N?.dataQuality==="none"?i("product_sales_intel.signin_prompt"):i("product_sales_intel.loading")})]})]})})});if(t.error||!p)return s.jsx(m,{blockType:"product-sales-intel",children:s.jsx("p",{style:{color:"var(--es-color-error, #AD2C26)",fontSize:13},children:i("product_sales_intel.load_error")})});const{pvSummary:c,products:l,topProduct:r}=p,y=u-u*c.progressPct/100,j=l[0]?.pvPoints??1,f=()=>{a&&(navigator.clipboard.writeText(a).catch(()=>{}),x("copied"),h?.emit?.("psi:pitchCopied",{pitch:a}),setTimeout(()=>x("idle"),2e3))},o=e=>{h?.emit?.("psi:productSelected",{productId:e.productId,name:e.name})};return s.jsx(m,{blockType:"product-sales-intel",children:s.jsxs("div",{className:"psi-block",children:[s.jsxs("div",{className:"psi-pv-card",children:[s.jsxs("div",{className:"psi-ring-container",children:[s.jsxs("svg",{className:"psi-ring-svg",width:72,height:72,viewBox:"0 0 72 72",children:[s.jsx("circle",{className:"psi-ring-track",cx:36,cy:36,r:n}),s.jsx("circle",{className:"psi-ring-fill",cx:36,cy:36,r:n,strokeDasharray:u,strokeDashoffset:y})]}),s.jsxs("div",{className:"psi-ring-label",children:[s.jsxs("span",{className:"psi-ring-pct",children:[c.progressPct,"%"]}),s.jsx("span",{className:"psi-ring-sub",children:"PV"})]})]}),s.jsxs("div",{className:"psi-pv-info",children:[s.jsx("div",{className:"psi-pv-title",children:i("product_sales_intel.personal_volume")}),s.jsx("div",{className:"psi-pv-amount",children:c.personalVolume.toLocaleString()}),s.jsx("div",{className:"psi-pv-target",children:i("product_sales_intel.target_label",{value:c.pvTarget.toLocaleString()})}),c.gapToPv>0&&s.jsx("div",{className:"psi-pv-gap",children:i("product_sales_intel.pv_to_go",{value:c.gapToPv.toLocaleString()})})]})]}),r&&s.jsxs("div",{className:"psi-top-product",onClick:()=>o(r),onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),o(r))},tabIndex:0,role:"button",children:[s.jsx("span",{className:"psi-top-label",children:i("product_sales_intel.top_product")}),s.jsx("span",{className:"psi-top-name",children:r.name}),s.jsxs("span",{className:"psi-top-badge",children:[r.pvPoints," PV"]})]}),b==="pro"&&l.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"psi-section-title",children:i("product_sales_intel.all_products",{count:l.length})}),s.jsx("div",{className:"psi-product-list",children:l.map(e=>{const k=j>0?Math.round(e.pvPoints/j*100):0;return s.jsxs("div",{className:"psi-product-row",onClick:()=>o(e),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),o(e))},tabIndex:0,role:"button",children:[s.jsxs("div",{className:"psi-product-header",children:[s.jsx("span",{className:"psi-product-name",children:e.name}),s.jsxs("div",{className:"psi-product-stats",children:[s.jsx("span",{className:"psi-product-stat",children:i("product_sales_intel.units_sold",{count:e.unitsSold})}),s.jsxs("span",{className:"psi-product-stat",children:["$",e.revenue.toLocaleString()]}),s.jsxs("span",{className:"psi-product-pv",children:[e.pvPoints," PV"]})]})]}),s.jsx("div",{className:"psi-product-bar-track",children:s.jsx("div",{className:"psi-product-bar-fill",style:{width:`${k}%`}})})]},e.productId)})})]}),a&&s.jsxs("div",{className:"psi-pitch-box",children:[s.jsxs("div",{className:"psi-pitch-header",children:[s.jsx("span",{className:"psi-pitch-label",children:i("product_sales_intel.ai_coach_label")}),s.jsx("button",{className:`psi-copy-btn${v==="copied"?" psi-copied":""}`,onClick:f,children:v==="copied"?`✓ ${i("common.copied")}`:i("common.copy")})]}),s.jsx("p",{className:"psi-pitch-text",children:a})]})]})})}const C={slug:"product-sales-intel",name:"Product Sales Intelligence",version:"1.0.0",category:"data",requiredService:"product-sales-intel",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:260,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"product-sales-intel",inputSchema:{type:"object",properties:{report:{type:"object"},aiPitch:{type:"string"},mode:{type:"string"}},required:["report","mode"]}},events:{emits:[{name:"psi:productSelected",description:"User clicked on a product in the list"},{name:"psi:pitchCopied",description:"User copied the AI product pitch"}]}};export{w as Component,w as ProductSalesIntelBlock,C as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-SgPuWMUv-QeFj7CR9.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{w as B,p as T,f as O,x as E,A as W,S as G,O as X}from"./accent-legibility-BJF2VO5n-CDPQ7suO.js";import{H as J,r as j,j as s,d as K}from"../nexly.js";const Q=4.5,x="#3B6FD4",Z={"--ai-bg":"#FFFFFF","--ai-bg-elevated":"#F9FAFB","--ai-bg-card":"#F3F4F6","--ai-bg-input":"#FFFFFF","--ai-bg-footer":"#F9FAFB","--ai-fg":"#111827","--ai-fg-secondary":"#374151","--ai-muted":"#4B5563","--ai-muted-dim":"#6B7280","--ai-border":"#E5E7EB","--ai-border-subtle":"#F3F4F6","--ai-assistant-bubble":"#F3F4F6","--ai-assistant-bubble-fg":"#111827","--ai-shadow":"0 20px 60px -15px rgba(15, 23, 42, 0.25)","--ai-success":"#00672B","--ai-warning":"#9C5300","--ai-error":"#AD2C26","--ai-info":"#03669D","--es-color-surface":"#FFFFFF","--es-color-surface-elevated":"#F9FAFB","--es-color-surface-hover":"#F3F4F6","--es-color-on-surface":"#111827","--es-color-on-surface-muted":"#4B5563","--es-color-border":"#E5E7EB","--es-color-control-border":"#6B7280","--es-color-error":"#AD2C26","--es-color-success":"#00672B","--es-color-on-success":"#FFFFFF"},ee={"--ai-bg":"#0F1115","--ai-bg-elevated":"#171A20","--ai-bg-card":"#171A20","--ai-bg-input":"#0F1115","--ai-bg-footer":"#0F1115","--ai-fg":"#F3F4F6","--ai-fg-secondary":"#D1D5DB","--ai-muted":"#9CA3AF","--ai-muted-dim":"#6B7280","--ai-border":"#252A33","--ai-border-subtle":"#1B1F26","--ai-assistant-bubble":"#171A20","--ai-assistant-bubble-fg":"#F3F4F6","--ai-shadow":"0 20px 60px -15px rgba(0, 0, 0, 0.7)","--ai-success":"#4ADE80","--ai-warning":"#FACC15","--ai-error":"#F87171","--ai-info":"#38BDF8","--es-color-surface":"#0F1115","--es-color-surface-elevated":"#171A20","--es-color-surface-hover":"#252A33","--es-color-on-surface":"#F3F4F6","--es-color-on-surface-muted":"#9CA3AF","--es-color-border":"#252A33","--es-color-control-border":"#6B7280","--es-color-error":"#F87171","--es-color-success":"#4ADE80","--es-color-on-success":"#0F1115"};function Y(e){const a=X("#FFFFFF",e),r=X("#000000",e);return a>=r?"#FFFFFF":"#000000"}function ae(e){const[a,r,o]=O(e),t=G(e)<.2?28:-28;return T([Math.max(0,Math.min(255,a+t)),Math.max(0,Math.min(255,r+t)),Math.max(0,Math.min(255,o+t))])}function L({brandColor:e,mode:a}){const r=a==="light"?Z:ee,o=e&&B(e)?e:x,t=T(O(o)),l=Y(t),f={ai:["--ai-bg","--ai-bg-elevated","--ai-bg-card","--ai-bg-input","--ai-bg-sidebar","--ai-bg-footer"],es:["--es-color-surface","--es-color-surface-elevated","--es-color-surface-hover"]},w=(C,c)=>{const g=new Set([c]);for(const S of f[C]){const b=r[S];typeof b=="string"&&B(b)&&g.add(b)}return[...g]},p=E({accent:t,surface:w("ai",r["--ai-bg-card"]),backdrop:r["--ai-bg"],tintAlpha:a==="light"?.08:.12,mode:a}),m=E({accent:t,surface:w("es",r["--es-color-surface-elevated"]),backdrop:r["--es-color-surface"],tintAlpha:a==="light"?.08:.12,mode:a}),u=W(t,w("es",r["--es-color-surface"]),Q,a);return{...r,"--ai-accent":t,"--ai-accent-fg":l,"--ai-accent-hover":ae(t),"--ai-accent-subtle":p.tint,"--ai-accent-on-subtle":p.onTint,"--ai-accent-on-subtle-strong":p.onStrongTint,"--ai-accent-border":p.boundary,"--ai-user-bubble":t,"--ai-user-bubble-fg":l,"--ai-scrollbar":t,"--es-color-primary":u,"--es-color-on-primary":Y(u),"--es-color-primary-muted":m.tint,"--es-color-primary-on-muted":m.onTint,"--es-color-interactive":u}}const ge=L({brandColor:x,mode:"light"}),be=L({brandColor:x,mode:"dark"}),n={shape:"--es-demo-launcher-shape",width:"--es-demo-launcher-width",height:"--es-demo-launcher-height",radius:"--es-demo-launcher-radius",background:"--es-demo-launcher-background",shadow:"--es-demo-launcher-shadow",padding:"--es-demo-launcher-padding",offsetX:"--es-demo-launcher-offset-x",offsetY:"--es-demo-launcher-offset-y"},i={width:{min:32,max:240,step:2},height:{min:32,max:240,step:2},radius:{min:0,max:64,step:1},padding:{min:0,max:32,step:1},offsetX:{min:0,max:240,step:2},offsetY:{min:0,max:240,step:2}},H=8,re=8,oe=.6,d={shape:"pill",width:56,height:56,radius:12,background:"accent",shadow:!0,padding:0,offsetX:20,offsetY:20},se=new Set(["pill","circle","square","rectangle"]),te=new Set(["accent","neutral","none"]);function ne(e){if(typeof e!="string")return;const a=/^\s*(-?\d+(?:\.\d+)?)\s*(?:px)?\s*$/i.exec(e);if(!a)return;const r=Number(a[1]);return Number.isFinite(r)?r:void 0}function F(e,a,r){const o=ne(e);return o===void 0?r:Math.min(a.max,Math.max(a.min,o))}function R(e,a,r){if(typeof e!="string")return r;const o=e.trim().toLowerCase();return a.has(o)?o:r}function ie(e,a){if(typeof e!="string")return a;const r=e.trim().toLowerCase();return r==="true"||r==="1"?!0:r==="false"||r==="0"?!1:a}function U(e){const a=e.shape==="circle"||e.shape==="square";return{width:e.width,height:a?e.width:e.height}}function le(e,a,r,o){if(e==="pill")return o;const t=Math.max(0,Math.floor((Math.min(r.width,r.height)-H)/2)),l=a==="accent"?Math.min(re,t):0;return Math.min(t,Math.max(l,o))}function ce(e){const a=e??{},r=d,o=R(a[n.shape],se,r.shape),t=R(a[n.background],te,r.background),l=F(a[n.width],i.width,r.width),f=F(a[n.height],i.height,r.height);return{shape:o,width:l,height:f,radius:F(a[n.radius],i.radius,r.radius),background:t,shadow:ie(a[n.shadow],r.shadow),padding:le(o,t,U({shape:o,width:l,height:f}),F(a[n.padding],i.padding,r.padding)),offsetX:F(a[n.offsetX],i.offsetX,r.offsetX),offsetY:F(a[n.offsetY],i.offsetY,r.offsetY)}}const N={accent:"var(--ai-accent)",neutral:"var(--ai-bg)",none:"transparent"};function de(e){const{width:a,height:r}=U(e),o=e.shape==="circle"?"50%":e.shape==="pill"?"calc(var(--es-demo-launcher-h) / 2)":`${e.radius}px`;return{"--es-demo-launcher-w":`${a}px`,"--es-demo-launcher-h":`${r}px`,"--es-demo-launcher-radius":o,"--es-demo-launcher-bg":N[e.background],"--es-demo-launcher-dot-ring":e.background==="none"?N.neutral:N[e.background],"--es-demo-launcher-shadow":e.shadow?"var(--ai-shadow)":"none","--es-demo-launcher-pad":`${e.padding}px`,"--es-demo-launcher-coin":`${oe}`,"--es-demo-launcher-mark-min":`${H}px`,"--es-demo-launcher-x":`${e.offsetX}px`,"--es-demo-launcher-y":`${e.offsetY}px`}}const Fe={slug:"demo",name:"Demo",version:"0.1.0",slots:["header","main","footer"],cssVariables:{"--ai-accent":x},structure:{header:{id:"header",label:"Header",accepts:!0},main:{id:"main",label:"Main Content",accepts:!0},footer:{id:"footer",label:"Footer",accepts:!0}},defaultViews:[],requiredServices:["support-chat"],description:"Neutral, brand-adaptive shell for demo clones. Carries no mascot and no brand of its own: the logo, name and accent colour all come from the product, and the rest of the palette is derived around them so it stays legible for any input.",author:"E-Commerce Studio",packageName:"@ecommerce-studio/theme-demo",options:[{id:"colorScheme",type:"select",label:"Appearance mode",default:"auto",group:"Appearance",options:[{label:"Auto (match visitor)",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}]},{id:"brandColor",type:"color",label:"Brand colour",default:x,cssVariable:"--ai-accent",group:"Colors"},{id:"launcherShape",type:"select",label:"Button shape",default:d.shape,cssVariable:n.shape,group:"Launcher",options:[{label:"Pill (wordmark on a chip)",value:"pill"},{label:"Circle",value:"circle"},{label:"Square",value:"square"},{label:"Rectangle",value:"rectangle"}]},{id:"launcherWidth",type:"range",label:"Width (side for circle / square)",default:d.width,unit:"px",cssVariable:n.width,group:"Launcher",...i.width},{id:"launcherHeight",type:"range",label:"Height (pill / rectangle)",default:d.height,unit:"px",cssVariable:n.height,group:"Launcher",...i.height},{id:"launcherRadius",type:"range",label:"Corner radius (square / rectangle)",default:d.radius,unit:"px",cssVariable:n.radius,group:"Launcher",...i.radius},{id:"launcherBackground",type:"select",label:"Background",default:d.background,cssVariable:n.background,group:"Launcher",options:[{label:"Brand colour",value:"accent"},{label:"Neutral",value:"neutral"},{label:"None (transparent)",value:"none"}]},{id:"launcherShadow",type:"toggle",label:"Shadow",default:d.shadow,cssVariable:n.shadow,group:"Launcher"},{id:"launcherPadding",type:"range",label:"Logo padding",default:d.padding,unit:"px",cssVariable:n.padding,group:"Launcher",...i.padding},{id:"launcherOffsetX",type:"range",label:"Distance from side",default:d.offsetX,unit:"px",cssVariable:n.offsetX,group:"Launcher",...i.offsetX},{id:"launcherOffsetY",type:"range",label:"Distance from bottom",default:d.offsetY,unit:"px",cssVariable:n.offsetY,group:"Launcher",...i.offsetY}],supports:{customCss:!1,customJs:!1,darkMode:!0,rtl:!1,views:!0}};function ue(e){const a=[e?.["--ai-accent"],e?.["--es-color-primary"]];for(const r of a)if(typeof r=="string"&&B(r))return r;return x}function he(e){const a=(e??"").trim().split(/\s+/).filter(Boolean);return a.length===0?"":a.slice(0,2).map(r=>[...r][0]??"").join("").toLocaleUpperCase()}function xe({brandName:e="",logoUrl:a,position:r="bottom-right",sidebarPosition:o="right",initialOpen:t=!1,views:l=[],activeView:f="",onViewChange:w=()=>{},children:p=null,cssVariables:m,t:u,colorScheme:C,builderMode:c=!1,unreadCount:g=0,onSettingsClick:S,onOpenChange:b,panelReadAloudControl:q}){const A=J(C)==="light"?"light":"dark",[_,M]=j.useState(t||c),y=j.useMemo(()=>ce(m),[m]),P=j.useMemo(()=>({...L({brandColor:ue(m),mode:A}),...de(y),...c?{width:"100%",height:"100%"}:{}}),[m,y,A,c]),I=()=>M(h=>{const v=!h;return b?.(v),v}),z=()=>{M(!1),b?.(!1)},D=r==="bottom-left",V=o!=="hidden"&&l.length>1,k=he(e);return s.jsxs("div",{className:["es-demo",`es-demo--${A}`].join(" "),style:P,children:[!c&&s.jsxs("button",{type:"button",className:["es-demo__launcher",`es-demo__launcher--${y.shape}`,`es-demo__launcher--bg-${y.background}`,D&&"es-demo__launcher--left",_&&"es-demo__launcher--hidden"].filter(Boolean).join(" "),onClick:I,"aria-label":u?.("floating.open_widget")??"Open chat widget",tabIndex:_?-1:0,"aria-hidden":_,children:[a?s.jsx("img",{className:"es-demo__launcher-logo",src:a,alt:""}):s.jsx("span",{className:"es-demo__launcher-monogram","aria-hidden":"true",children:k||"•"}),g>0&&s.jsx("span",{className:"es-demo__launcher-dot","aria-label":u?.("floating.unread",{count:g})??`${g} unread`})]}),s.jsxs("div",{className:["es-demo__panel",D&&!c&&"es-demo__panel--left",(_||c)&&"es-demo__panel--open"].filter(Boolean).join(" "),role:"dialog","aria-label":u?.("chat.widget_aria")??"Chat widget","aria-hidden":c?!1:!_,children:[s.jsxs("header",{className:"es-demo__header",children:[s.jsxs("div",{className:"es-demo__brand",children:[a?s.jsx("img",{className:"es-demo__brand-logo",src:a,alt:""}):k&&s.jsx("span",{className:"es-demo__brand-monogram","aria-hidden":"true",children:k}),e&&s.jsx("h1",{className:"es-demo__brand-name",children:e})]}),s.jsxs("div",{className:"es-demo__header-actions",children:[q,!c&&s.jsx("button",{type:"button",className:"es-demo__header-btn",onClick:z,"aria-label":u?.("header.close_widget")??"Close widget",children:s.jsx(me,{})})]})]}),s.jsxs("div",{className:["es-demo__body",V&&`es-demo__body--rail-${o}`].filter(Boolean).join(" "),children:[V&&s.jsx("nav",{className:`es-demo__rail es-demo__rail--${o}`,"aria-label":u?.("nav.views")??"Views",children:l.map(h=>{const v=K(h.icon||h.slug),$=h.slug===f;return s.jsxs("button",{type:"button",className:["es-demo__rail-item",$&&"es-demo__rail-item--active"].filter(Boolean).join(" "),onClick:()=>w(h.slug),"aria-current":$?"page":void 0,title:h.label,children:[v?s.jsx(v,{size:20}):null,s.jsx("span",{className:"es-demo__rail-label",children:h.label})]},h.slug)})}),s.jsx("main",{className:"es-demo__content",style:{containerName:"es-slot",containerType:"inline-size"},children:p})]})]})]})}function me({size:e=20}){return s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:s.jsx("path",{d:"m6 9 6 6 6-6"})})}export{x as DEFAULT_BRAND,d as LAUNCHER_DEFAULTS,i as LAUNCHER_LIMITS,n as LAUNCHER_VARS,Q as TEXT_FLOOR,xe as ThemeShell,be as darkVariables,L as deriveDemoPalette,ae as hoverStep,Y as inkOn,de as launcherRootStyle,ge as lightVariables,Fe as manifest,he as monogram,ce as resolveLauncherSettings};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-fotohjEP-BLBDoJCM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,j as e,Q as U,o as ue}from"../nexly.js";import{C as ye}from"./block-rating-DH7mp-_R-CoiP5C2K.js";import{j as ge}from"./PanelInfoVideo-BKn3ucAb-BrU-Qlul.js";import{m as J}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const Fe={slug:"daily-action-plan",name:"Daily Action Plan",version:"4.0.0",category:"data",requiredService:"daily-action-plan",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},showGreeting:{type:"boolean",default:!0},showFocus:{type:"boolean",default:!0},showPlays:{type:"boolean",default:!0},showStructural:{type:"boolean",default:!0},showRisk:{type:"boolean",default:!0},showBlocker:{type:"boolean",default:!0},showMyBenefits:{type:"boolean",default:!0}}},defaultConfig:{readAloudEnabled:!1,showGreeting:!0,showFocus:!0,showPlays:!0,showStructural:!0,showRisk:!0,showBlocker:!0,showMyBenefits:!0},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"daily-action-plan",inputSchema:{type:"object",properties:{personalGreeting:{type:"object",properties:{userName:{type:"string"},rankBadge:{type:"string"},summary:{type:"string"},tone:{type:"string",enum:["calm","urgent","celebratory"]}}},todaysFocus:{type:"object",properties:{domain:{type:"string",enum:["relationship","recruitment","sales","structural","risk","market"]},summary:{type:"string"},details:{type:"object",properties:{whyThisToday:{type:"string"},expectedOutcome:{type:"string"},deadlineUtc:{type:"string"}}}}},relationshipPlay:{type:"object",description:"Named downliner outreach play (empty when no real downliner available)",properties:{targetName:{type:"string"},summary:{type:"string"},details:{type:"object",properties:{targetContext:{type:"string"},messageHook:{type:"string"},channelHint:{type:"string",enum:["kakao","line","whatsapp","telegram","email","dashboard","none"]},draftMessage:{type:"string"},complianceNote:{type:"string"}}}}},recruitmentPlay:{type:"object",description:"Recruitment action (actionType='none' when not applicable)",properties:{actionType:{type:"string",enum:["warm_intro","event_invite","follow_up","qualification_call","content_share","none"]},summary:{type:"string"},details:{type:"object",properties:{candidateOrSegment:{type:"string"},rationale:{type:"string"},concreteStep:{type:"string"},complianceNote:{type:"string"}}}}},salesPlay:{type:"object",description:"iMine product or cycle action",properties:{linkedToBinarySide:{type:"string",enum:["left","right","both","none"]},summary:{type:"string"},details:{type:"object",properties:{productOrCycleAction:{type:"string"},rationale:{type:"string"},concreteStep:{type:"string"},marketSignal:{type:"string"},complianceNote:{type:"string"}}}}},structuralCheck:{type:"object",description:"Binary tree, rank, cycle cap, and time alert metrics",properties:{normalRank:{type:"object",properties:{currentRank:{type:"string"},nextRank:{type:"string"},currentVolume:{type:"number"},requiredVolume:{type:"number"},volumeProgressPercent:{type:"number"},creditsEarned:{type:"number"},requiredCredits:{type:"number"},creditsProgressPercent:{type:"number"},binaryQualifyingPlacements:{type:"number"},binaryProgressPercent:{type:"number"},qualifyingBranchLeaders:{type:"number"},branchProgressPercent:{type:"number"},bottleneckProgressPercent:{type:"number"},blockingConditions:{type:"array",items:{type:"string"}}}},paidRank:{type:"object",properties:{currentPaidRank:{type:"string"},nextPaidRank:{type:"string"},active:{type:"boolean"},riskOfDrop:{type:"boolean"},reason:{type:"string"},retentionProgress:{type:"number"},advanceProgress:{type:"number"},rollingWindowSales:{type:"number"},thresholdForCurrentRank:{type:"number"},thresholdForNextRank:{type:"number"},windowDays:{type:"number"},gracePeriodEndsDate:{type:"string"}}},binary:{type:"object",properties:{leftVolume:{type:"number"},rightVolume:{type:"number"},balanced:{type:"boolean"},reason:{type:"string"}}},cycleCap:{type:"object",properties:{}},timeAlert:{type:"object",properties:{}}}},riskFlag:{type:"object",description:"Most critical risk today (severity='none' = no risk)",properties:{severity:{type:"string",enum:["none","low","medium","high","critical"]},riskType:{type:"string"},summary:{type:"string"},details:{type:"object",properties:{description:{type:"string"},preventiveAction:{type:"string"},timeSensitivity:{type:"string"}}}}},myBenefits:{type:"object",description:"Deterministic near-term benefits timeline (1-3 nearest events; empty summary+events hides the tile)",properties:{summary:{type:"string"},events:{type:"array",items:{type:"object",properties:{kind:{type:"string",enum:["mining_start","first_reward","rank_grace","rank_retention","cycles_today","promo"]},dateUtc:{type:"string"},label:{type:"string"},narration:{type:"string"}}}}}}}},previewDataOverride:{personalGreeting:{userName:"Aleksandra",rankBadge:"Senior Manager",summary:"Aleksandra, right leg needs 5 BP to close a cycle before 15:00 UTC.",tone:"urgent"},todaysFocus:{domain:"relationship",summary:"Message Minsu about right-leg cycle close before 15:00 UTC.",details:{whyThisToday:"Minsu is your top right-leg Developer with 12,500 USDT team sales — highest leverage today.",expectedOutcome:"Right-leg +500 USDT or 1 new referral from Minsu by end of day.",deadlineUtc:"15:00 UTC"}},relationshipPlay:{targetName:"Minsu",summary:"Message Minsu on Kakao to align on a right-leg pack placement before 15:00 UTC.",details:{targetContext:"Right-leg Developer, recent activity, team_sales 12,500.",messageHook:"Ask about right-leg cycle close this week.",channelHint:"kakao",draftMessage:"Hi Minsu, we're 5 BP away from closing a right-leg cycle today. Can we align on a pack placement before 15:00 UTC?",complianceNote:"No income guarantee — frame as qualifying for cycle, not earning."}},recruitmentPlay:{actionType:"warm_intro",summary:"Send a warm intro to a BTC-interested contact today — greed index at 71.",details:{candidateOrSegment:"One warm contact who showed interest in BTC mining last week.",rationale:"Greed 71 creates a good opening to discuss Hash Power packages.",concreteStep:"Send iMine partner intro link today by 21:00 local time.",complianceNote:"Frame as 'here's how it works', no ROI claims."}},salesPlay:{linkedToBinarySide:"right",summary:"Place 500 USDT on right leg before 15:00 UTC to close 1 cycle.",details:{productOrCycleAction:"Hash Power Package — right-leg placement (500 USDT)",rationale:"Right 4,200 vs Left 4,500 — right-leg 500 USDT closes 1 cycle.",concreteStep:"Open iMine Distributor Hub → Hash Power Package → right leg → 1 pack.",marketSignal:"BTC up 7% this week — bullish sentiment supports placement urgency.",complianceNote:"No specific earnings amount. Frame as 'activates Senior Manager cycle'."}},structuralCheck:{normalRank:{currentRank:"Senior Manager",nextRank:"Vice President",currentVolume:58e3,requiredVolume:5e4,volumeProgressPercent:100,creditsEarned:500,requiredCredits:1e3,creditsProgressPercent:50,binaryQualifyingPlacements:2,binaryProgressPercent:67,qualifyingBranchLeaders:1,branchProgressPercent:33,bottleneckProgressPercent:33,blockingConditions:[]},paidRank:{currentPaidRank:"Senior Manager",nextPaidRank:"Vice President",active:!0,riskOfDrop:!1,reason:"On track this week.",retentionProgress:.85,advanceProgress:.42,rollingWindowSales:17e3,thresholdForCurrentRank:2e4,thresholdForNextRank:4e4,windowDays:90,gracePeriodEndsDate:null},binary:{leftVolume:4500,rightVolume:4200,balanced:!1,reason:"Right +500 USDT closes 1 cycle."},cycleCap:{dailyCycleLimit:8,cyclesCompletedToday:0,remainingCyclesToday:8,capWasteRisk:!1},timeAlert:{autoPlacementTimeUtc:"15:00",hoursUntilAutoPlacement:4.5,placementUrgency:"high"}},riskFlag:{severity:"low",riskType:"cap_waste",summary:"Right-leg gap may cause 1 missed cycle if not topped up before 15:00 UTC.",details:{description:"If right-leg is not topped up before 15:00 UTC auto-placement, 1 cycle may be missed.",preventiveAction:"Suggest Minsu or place 1 pack on right leg by 14:30 UTC.",timeSensitivity:"4.5 hours"}},myBenefits:{summary:"Your next 3 milestones — mining starts tomorrow, first reward 2 days after.",events:[{kind:"mining_start",dateUtc:"2026-08-14",label:"Mining starts",narration:"Your Hash Power package begins mining tomorrow."},{kind:"first_reward",dateUtc:"2026-08-16",label:"First reward",narration:"Your first mining reward lands 2 days after mining starts."},{kind:"cycles_today",dateUtc:"",label:"0 of 8 cycles used",narration:"You have 8 cycles available today — none used yet."}]}}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"showGreeting",type:"toggle",label:"Show personal greeting",default:!0,group:"Sections"},{id:"showFocus",type:"toggle",label:"Show today's focus",default:!0,group:"Sections"},{id:"showPlays",type:"toggle",label:"Show action plays (relationship / recruitment / sales)",default:!0,group:"Sections"},{id:"showStructural",type:"toggle",label:"Show structural check (rank / binary / cycle)",default:!0,group:"Sections"},{id:"showRisk",type:"toggle",label:"Show risk flag",default:!0,group:"Sections"},{id:"showBlocker",type:"toggle",label:"Show rank blocker tile (structure / payout)",default:!0,group:"Sections"},{id:"showMyBenefits",type:"toggle",label:"Show My Benefits (mining/reward/rank timeline)",default:!0,group:"Sections"}],events:{emits:[{name:"dap:legSelected",description:"User selected a recommended binary leg"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"dap:refresh",description:"Force refresh daily action plan"}]},supportedPlacements:["main"]},he=[/MLM\s+PROFILE\s+DATA\s+missing/i,/USER\s+CONTEXT\s+missing/i,/^Cannot\s+verify/i,/Profile\s+data\s+missing/i,/Profile\s+incomplete/i];function X(a){return he.some(s=>s.test(a.trim()))}function l(a){return!a||a.trim()===""}function _e(a){return Math.round(a).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Z(a,s){const t=new Date(a);return isNaN(t.getTime())?a:new Intl.DateTimeFormat(s,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(t)}function ee(a,s){const t=new Date(a);return isNaN(t.getTime())?a:new Intl.DateTimeFormat(s,{day:"2-digit",month:"short",year:"numeric",timeZone:"UTC"}).format(t)}function P(a){return a.filter(s=>typeof s=="string"&&s.trim()!=="").join(`
|
|
1
|
+
import{r as E,j as e,Q as U,o as ue}from"../nexly.js";import{C as ye}from"./block-rating-DGpoz2o3-CoiP5C2K.js";import{j as ge}from"./PanelInfoVideo-BKq2v0QM-BrU-Qlul.js";import{m as J}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const Fe={slug:"daily-action-plan",name:"Daily Action Plan",version:"4.0.0",category:"data",requiredService:"daily-action-plan",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},showGreeting:{type:"boolean",default:!0},showFocus:{type:"boolean",default:!0},showPlays:{type:"boolean",default:!0},showStructural:{type:"boolean",default:!0},showRisk:{type:"boolean",default:!0},showBlocker:{type:"boolean",default:!0},showMyBenefits:{type:"boolean",default:!0}}},defaultConfig:{readAloudEnabled:!1,showGreeting:!0,showFocus:!0,showPlays:!0,showStructural:!0,showRisk:!0,showBlocker:!0,showMyBenefits:!0},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"daily-action-plan",inputSchema:{type:"object",properties:{personalGreeting:{type:"object",properties:{userName:{type:"string"},rankBadge:{type:"string"},summary:{type:"string"},tone:{type:"string",enum:["calm","urgent","celebratory"]}}},todaysFocus:{type:"object",properties:{domain:{type:"string",enum:["relationship","recruitment","sales","structural","risk","market"]},summary:{type:"string"},details:{type:"object",properties:{whyThisToday:{type:"string"},expectedOutcome:{type:"string"},deadlineUtc:{type:"string"}}}}},relationshipPlay:{type:"object",description:"Named downliner outreach play (empty when no real downliner available)",properties:{targetName:{type:"string"},summary:{type:"string"},details:{type:"object",properties:{targetContext:{type:"string"},messageHook:{type:"string"},channelHint:{type:"string",enum:["kakao","line","whatsapp","telegram","email","dashboard","none"]},draftMessage:{type:"string"},complianceNote:{type:"string"}}}}},recruitmentPlay:{type:"object",description:"Recruitment action (actionType='none' when not applicable)",properties:{actionType:{type:"string",enum:["warm_intro","event_invite","follow_up","qualification_call","content_share","none"]},summary:{type:"string"},details:{type:"object",properties:{candidateOrSegment:{type:"string"},rationale:{type:"string"},concreteStep:{type:"string"},complianceNote:{type:"string"}}}}},salesPlay:{type:"object",description:"iMine product or cycle action",properties:{linkedToBinarySide:{type:"string",enum:["left","right","both","none"]},summary:{type:"string"},details:{type:"object",properties:{productOrCycleAction:{type:"string"},rationale:{type:"string"},concreteStep:{type:"string"},marketSignal:{type:"string"},complianceNote:{type:"string"}}}}},structuralCheck:{type:"object",description:"Binary tree, rank, cycle cap, and time alert metrics",properties:{normalRank:{type:"object",properties:{currentRank:{type:"string"},nextRank:{type:"string"},currentVolume:{type:"number"},requiredVolume:{type:"number"},volumeProgressPercent:{type:"number"},creditsEarned:{type:"number"},requiredCredits:{type:"number"},creditsProgressPercent:{type:"number"},binaryQualifyingPlacements:{type:"number"},binaryProgressPercent:{type:"number"},qualifyingBranchLeaders:{type:"number"},branchProgressPercent:{type:"number"},bottleneckProgressPercent:{type:"number"},blockingConditions:{type:"array",items:{type:"string"}}}},paidRank:{type:"object",properties:{currentPaidRank:{type:"string"},nextPaidRank:{type:"string"},active:{type:"boolean"},riskOfDrop:{type:"boolean"},reason:{type:"string"},retentionProgress:{type:"number"},advanceProgress:{type:"number"},rollingWindowSales:{type:"number"},thresholdForCurrentRank:{type:"number"},thresholdForNextRank:{type:"number"},windowDays:{type:"number"},gracePeriodEndsDate:{type:"string"}}},binary:{type:"object",properties:{leftVolume:{type:"number"},rightVolume:{type:"number"},balanced:{type:"boolean"},reason:{type:"string"}}},cycleCap:{type:"object",properties:{}},timeAlert:{type:"object",properties:{}}}},riskFlag:{type:"object",description:"Most critical risk today (severity='none' = no risk)",properties:{severity:{type:"string",enum:["none","low","medium","high","critical"]},riskType:{type:"string"},summary:{type:"string"},details:{type:"object",properties:{description:{type:"string"},preventiveAction:{type:"string"},timeSensitivity:{type:"string"}}}}},myBenefits:{type:"object",description:"Deterministic near-term benefits timeline (1-3 nearest events; empty summary+events hides the tile)",properties:{summary:{type:"string"},events:{type:"array",items:{type:"object",properties:{kind:{type:"string",enum:["mining_start","first_reward","rank_grace","rank_retention","cycles_today","promo"]},dateUtc:{type:"string"},label:{type:"string"},narration:{type:"string"}}}}}}}},previewDataOverride:{personalGreeting:{userName:"Aleksandra",rankBadge:"Senior Manager",summary:"Aleksandra, right leg needs 5 BP to close a cycle before 15:00 UTC.",tone:"urgent"},todaysFocus:{domain:"relationship",summary:"Message Minsu about right-leg cycle close before 15:00 UTC.",details:{whyThisToday:"Minsu is your top right-leg Developer with 12,500 USDT team sales — highest leverage today.",expectedOutcome:"Right-leg +500 USDT or 1 new referral from Minsu by end of day.",deadlineUtc:"15:00 UTC"}},relationshipPlay:{targetName:"Minsu",summary:"Message Minsu on Kakao to align on a right-leg pack placement before 15:00 UTC.",details:{targetContext:"Right-leg Developer, recent activity, team_sales 12,500.",messageHook:"Ask about right-leg cycle close this week.",channelHint:"kakao",draftMessage:"Hi Minsu, we're 5 BP away from closing a right-leg cycle today. Can we align on a pack placement before 15:00 UTC?",complianceNote:"No income guarantee — frame as qualifying for cycle, not earning."}},recruitmentPlay:{actionType:"warm_intro",summary:"Send a warm intro to a BTC-interested contact today — greed index at 71.",details:{candidateOrSegment:"One warm contact who showed interest in BTC mining last week.",rationale:"Greed 71 creates a good opening to discuss Hash Power packages.",concreteStep:"Send iMine partner intro link today by 21:00 local time.",complianceNote:"Frame as 'here's how it works', no ROI claims."}},salesPlay:{linkedToBinarySide:"right",summary:"Place 500 USDT on right leg before 15:00 UTC to close 1 cycle.",details:{productOrCycleAction:"Hash Power Package — right-leg placement (500 USDT)",rationale:"Right 4,200 vs Left 4,500 — right-leg 500 USDT closes 1 cycle.",concreteStep:"Open iMine Distributor Hub → Hash Power Package → right leg → 1 pack.",marketSignal:"BTC up 7% this week — bullish sentiment supports placement urgency.",complianceNote:"No specific earnings amount. Frame as 'activates Senior Manager cycle'."}},structuralCheck:{normalRank:{currentRank:"Senior Manager",nextRank:"Vice President",currentVolume:58e3,requiredVolume:5e4,volumeProgressPercent:100,creditsEarned:500,requiredCredits:1e3,creditsProgressPercent:50,binaryQualifyingPlacements:2,binaryProgressPercent:67,qualifyingBranchLeaders:1,branchProgressPercent:33,bottleneckProgressPercent:33,blockingConditions:[]},paidRank:{currentPaidRank:"Senior Manager",nextPaidRank:"Vice President",active:!0,riskOfDrop:!1,reason:"On track this week.",retentionProgress:.85,advanceProgress:.42,rollingWindowSales:17e3,thresholdForCurrentRank:2e4,thresholdForNextRank:4e4,windowDays:90,gracePeriodEndsDate:null},binary:{leftVolume:4500,rightVolume:4200,balanced:!1,reason:"Right +500 USDT closes 1 cycle."},cycleCap:{dailyCycleLimit:8,cyclesCompletedToday:0,remainingCyclesToday:8,capWasteRisk:!1},timeAlert:{autoPlacementTimeUtc:"15:00",hoursUntilAutoPlacement:4.5,placementUrgency:"high"}},riskFlag:{severity:"low",riskType:"cap_waste",summary:"Right-leg gap may cause 1 missed cycle if not topped up before 15:00 UTC.",details:{description:"If right-leg is not topped up before 15:00 UTC auto-placement, 1 cycle may be missed.",preventiveAction:"Suggest Minsu or place 1 pack on right leg by 14:30 UTC.",timeSensitivity:"4.5 hours"}},myBenefits:{summary:"Your next 3 milestones — mining starts tomorrow, first reward 2 days after.",events:[{kind:"mining_start",dateUtc:"2026-08-14",label:"Mining starts",narration:"Your Hash Power package begins mining tomorrow."},{kind:"first_reward",dateUtc:"2026-08-16",label:"First reward",narration:"Your first mining reward lands 2 days after mining starts."},{kind:"cycles_today",dateUtc:"",label:"0 of 8 cycles used",narration:"You have 8 cycles available today — none used yet."}]}}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"showGreeting",type:"toggle",label:"Show personal greeting",default:!0,group:"Sections"},{id:"showFocus",type:"toggle",label:"Show today's focus",default:!0,group:"Sections"},{id:"showPlays",type:"toggle",label:"Show action plays (relationship / recruitment / sales)",default:!0,group:"Sections"},{id:"showStructural",type:"toggle",label:"Show structural check (rank / binary / cycle)",default:!0,group:"Sections"},{id:"showRisk",type:"toggle",label:"Show risk flag",default:!0,group:"Sections"},{id:"showBlocker",type:"toggle",label:"Show rank blocker tile (structure / payout)",default:!0,group:"Sections"},{id:"showMyBenefits",type:"toggle",label:"Show My Benefits (mining/reward/rank timeline)",default:!0,group:"Sections"}],events:{emits:[{name:"dap:legSelected",description:"User selected a recommended binary leg"},{name:"chat:draft",description:"Seed the chat composer with a draft message + quick-reply chips"}],listens:[{name:"dap:refresh",description:"Force refresh daily action plan"}]},supportedPlacements:["main"]},he=[/MLM\s+PROFILE\s+DATA\s+missing/i,/USER\s+CONTEXT\s+missing/i,/^Cannot\s+verify/i,/Profile\s+data\s+missing/i,/Profile\s+incomplete/i];function X(a){return he.some(s=>s.test(a.trim()))}function l(a){return!a||a.trim()===""}function _e(a){return Math.round(a).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Z(a,s){const t=new Date(a);return isNaN(t.getTime())?a:new Intl.DateTimeFormat(s,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(t)}function ee(a,s){const t=new Date(a);return isNaN(t.getTime())?a:new Intl.DateTimeFormat(s,{day:"2-digit",month:"short",year:"numeric",timeZone:"UTC"}).format(t)}function P(a){return a.filter(s=>typeof s=="string"&&s.trim()!=="").join(`
|
|
2
2
|
`)}function be(a,s,t){const r=a.details;return P([`${s("dap.section.focus")} · ${a.domain}`,!l(a.summary)&&a.summary,r&&!l(r.whyThisToday)&&`${s("dap.focus.why")}: ${r.whyThisToday}`,r&&!l(r.expectedOutcome)&&`${s("dap.gaio.field.expected")}: ${r.expectedOutcome}`,r&&r.deadlineUtc&&!l(r.deadlineUtc)&&`${s("dap.gaio.field.deadline")}: ${Z(r.deadlineUtc,t)}`])}function ke(a,s){const t=a.details;return P([`${s("dap.gaio.field.severity")}: ${a.severity}`,!l(a.summary)&&a.summary,t&&!l(t.description)&&t.description,t&&!l(t.preventiveAction)&&`${s("dap.gaio.field.preventive")}: ${t.preventiveAction}`,t&&!l(t.timeSensitivity)&&`${s("dap.gaio.field.time_sensitivity")}: ${t.timeSensitivity}`])}function fe(a,s){const t=a.details;return P([`${s("dap.section.relationship")} · ${a.targetName}`,!l(a.summary)&&a.summary,t&&!l(t.targetContext)&&`${s("dap.gaio.field.context")}: ${t.targetContext}`,t&&!l(t.messageHook)&&`${s("dap.gaio.field.hook")}: ${t.messageHook}`,t&&t.channelHint&&t.channelHint!=="none"&&`${s("dap.gaio.field.channel")}: ${t.channelHint}`,t&&!l(t.draftMessage)&&`${s("dap.gaio.field.draft")}: ${t.draftMessage}`,t&&!l(t.complianceNote)&&`${s("dap.gaio.field.compliance")}: ${t.complianceNote}`])}function xe(a,s){const t=a.details;return P([`${s("dap.section.recruitment")} · ${a.actionType.replace(/_/g," ")}`,!l(a.summary)&&a.summary,t&&!l(t.candidateOrSegment)&&`${s("dap.gaio.field.candidate")}: ${t.candidateOrSegment}`,t&&!l(t.rationale)&&`${s("dap.play.why")}: ${t.rationale}`,t&&!l(t.concreteStep)&&`${s("dap.play.do")}: ${t.concreteStep}`,t&&!l(t.complianceNote)&&`${s("dap.gaio.field.compliance")}: ${t.complianceNote}`])}function je(a,s){const t=a.details;return P([`${s("dap.section.sales")} · ${a.linkedToBinarySide}`,!l(a.summary)&&a.summary,t&&!l(t.productOrCycleAction)&&`${s("dap.gaio.field.product")}: ${t.productOrCycleAction}`,t&&!l(t.rationale)&&`${s("dap.play.why")}: ${t.rationale}`,t&&!l(t.concreteStep)&&`${s("dap.play.do")}: ${t.concreteStep}`,t&&!l(t.marketSignal)&&`${s("dap.gaio.field.market")}: ${t.marketSignal}`,t&&!l(t.complianceNote)&&`${s("dap.gaio.field.compliance")}: ${t.complianceNote}`])}function Ne(a,s,t){return P([s("dap.section.my_benefits"),!l(a.summary)&&a.summary,...a.events.map(r=>{const n=r.dateUtc?` (${ee(r.dateUtc,t)})`:"";return`${s(`dap.benefits.kind.${r.kind}`)} — ${r.label}${n}: ${r.narration}`})])}function ae(a,s){const t=!!a.riskOfDrop,r=a.retentionProgress,n=typeof r=="number"&&r<1,m=Math.max(0,(a.thresholdForCurrentRank??0)-(a.rollingWindowSales??0)),h=a.windowDays??0,k=m>0&&h>0;let b;return a.active===!1?b=s("dap.blocker.paid_rank.unlock"):n||t?b=k?s("dap.blocker.paid_rank.at_risk",{gap:_e(m),days:h}):s("dap.blocker.paid_rank.unlock"):b=s("dap.blocker.paid_rank.safe",{rank:J(a.currentPaidRank,s)}),{atRisk:t,message:b}}function te(a,s){if(a.active===!1||a.riskOfDrop||typeof a.retentionProgress=="number"&&a.retentionProgress<1)return;const t=a.nextPaidRank,r=a.thresholdForNextRank??0;if(!t||r<=0)return;const n=typeof a.advanceProgress=="number"?a.advanceProgress:0,m=Math.round(Math.max(0,Math.min(1,n))*100);return s("dap.blocker.paid_rank.advance",{percent:m,rank:J(t,s)})}function ve(a,s,t){const r=s?ae(s,t):void 0,n=s?te(s,t):void 0;return P([a.length>0&&`${t("dap.blocker.normal_rank.title")} (${t("dap.blocker.normal_rank.badge")})`,...a,r&&`${t("dap.blocker.paid_rank.title")}: ${r.message}`,n,r?.atRisk&&s?.gracePeriodEndsDate?t("dap.blocker.paid_rank.grace",{date:s.gracePeriodEndsDate}):void 0])}function we(a){if(!a)return!0;if(!l(a.summary))return!1;const s=a.details;return s?l(s.whyThisToday)&&l(s.expectedOutcome)&&l(s.deadlineUtc):!0}function Te(a){if(!a)return!0;const s=a.normalRank;return s?(s.blockingConditions??[]).filter(t=>!X(t)).length===0&&s.currentVolume===0&&s.requiredVolume===0:!0}function Y(a){return a==="critical"||a==="high"?"var(--es-color-error, #AD2C26)":a==="medium"?"var(--es-color-warning, #9C5300)":"var(--es-color-on-surface-muted, #4B5563)"}const Se={relationship:"🤝",recruitment:"📣",sales:"🛒",structural:"📊",risk:"⚠️",market:"📈"},Pe={mining_start:"⛏️",first_reward:"🎁",rank_grace:"⏳",rank_retention:"🛡️",cycles_today:"🔄",promo:"✨"};function $e({open:a}){return e.jsx("svg",{className:`es-dap__chevron${a?" es-dap__chevron--open":""}`,width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})}function O({teaser:a,isOpen:s,children:t}){return s?e.jsx("div",{className:"es-dap__teaser-reveal",children:t}):e.jsx("p",{className:"es-dap__teaser-text",children:a})}function M({isOpen:a,onToggle:s,expandLabel:t,collapseLabel:r,t:n}){return e.jsxs("button",{className:"es-dap__more-toggle",type:"button",onClick:s,"aria-expanded":a,"aria-label":a?r:t,children:[n(a?"dap.teaser.less":"dap.teaser.more"),e.jsx($e,{open:a})]})}function S({moreToggle:a,gaioLink:s}){return!a&&!s?null:e.jsxs("div",{className:"es-dap__actions",children:[a,s]})}function Ce(a){const s=a.trim(),t=/^\[(normal|paid)\]\s*/i.exec(s);return t&&t[1]?{scope:t[1].toLowerCase(),text:s.slice(t[0].length)}:{scope:"normal",text:s}}const Re=[{labelKey:"dap.blocker.credits",pct:a=>a.creditsProgressPercent},{labelKey:"dap.blocker.binary_structure",pct:a=>a.binaryProgressPercent},{labelKey:"dap.blocker.branch_leaders",pct:a=>a.branchProgressPercent},{labelKey:"dap.blocker.team_sales",pct:a=>a.volumeProgressPercent}];function Le({normalRank:a,paidRank:s,normalConditions:t,gaioLink:r,t:n}){const m=a?Re.filter(g=>{const f=g.pct(a);return typeof f=="number"&&f<100}):[],h=m.length>0&&m.length===t.length,k=h&&m.some(g=>g.labelKey==="dap.blocker.branch_leaders"),b=t.length>0,i=s?ae(s,n):void 0,x=s?te(s,n):void 0;return e.jsxs("div",{className:"es-dap__card es-dap__blocker-tile",children:[b&&e.jsxs("div",{className:"es-dap__blocker-section",children:[e.jsxs("div",{className:"es-dap__blocker-head",children:[e.jsx("span",{className:"es-dap__blocker-title",children:n("dap.blocker.normal_rank.title")}),e.jsx("span",{className:"es-dap__pill es-dap__pill--warn",children:n("dap.blocker.normal_rank.badge")})]}),e.jsx("ul",{className:"es-dap__blocker-list",children:t.map((g,f)=>{const j=h?m[f]:void 0;return e.jsxs("li",{className:"es-dap__blocker-item es-dap__blocker-item--structure",children:[j&&e.jsx("span",{className:"es-dap__blocker-itemlabel",children:n(j.labelKey)}),e.jsx("span",{className:"es-dap__blocker-msg",children:g})]},f)})}),k&&e.jsx("p",{className:"es-dap__blocker-note",children:n("dap.blocker.excluded_structure")})]}),s&&i&&e.jsxs("div",{className:`es-dap__blocker-section${b?" es-dap__blocker-section--divided":""}`,children:[e.jsxs("div",{className:"es-dap__blocker-head",children:[e.jsx("span",{className:"es-dap__blocker-title",children:n("dap.blocker.paid_rank.title")}),e.jsx("span",{className:`es-dap__pill ${i.atRisk?"es-dap__pill--danger":"es-dap__pill--ok"}`,children:n("dap.blocker.paid_rank.badge")})]}),e.jsx("p",{className:`es-dap__blocker-item es-dap__blocker-item--${i.atRisk?"risk":"safe"}`,children:e.jsx("span",{className:"es-dap__blocker-msg",children:i.message})}),x&&e.jsx("p",{className:"es-dap__blocker-note es-dap__blocker-note--advance",children:x}),i.atRisk&&s.gracePeriodEndsDate&&e.jsx("p",{className:"es-dap__blocker-note es-dap__blocker-note--grace",children:n("dap.blocker.paid_rank.grace",{date:s.gracePeriodEndsDate})})]}),e.jsx(S,{gaioLink:r})]})}function Oe({benefits:a,lang:s,gaioLink:t,t:r}){return e.jsxs("div",{className:"es-dap__card es-dap__benefits-tile",children:[e.jsx("div",{className:"es-dap__blocker-head",children:e.jsx("span",{className:"es-dap__blocker-title",children:r("dap.section.my_benefits")})}),!l(a.summary)&&e.jsx("p",{className:"es-dap__benefits-summary",children:a.summary}),a.events.length>0&&e.jsx("ul",{className:"es-dap__benefits-list",children:a.events.map((n,m)=>e.jsxs("li",{className:`es-dap__benefits-item es-dap__benefits-item--${n.kind}`,children:[e.jsx("span",{className:"es-dap__benefits-icon","aria-hidden":"true",children:Pe[n.kind]??"•"}),e.jsxs("div",{className:"es-dap__benefits-body",children:[e.jsxs("div",{className:"es-dap__benefits-row",children:[e.jsx("span",{className:"es-dap__benefits-label",children:n.label}),n.dateUtc&&e.jsx("span",{className:"es-dap__benefits-date","data-es-no-read":!0,children:ee(n.dateUtc,s)})]}),!l(n.narration)&&e.jsx("p",{className:"es-dap__benefits-narration",children:n.narration})]})]},m))}),e.jsx(S,{gaioLink:t})]})}function Me({text:a,copyLabel:s,copiedLabel:t}){const[r,n]=E.useState(!1);function m(){const h=()=>{n(!0),window.setTimeout(()=>n(!1),2e3)},k=navigator?.clipboard;k?.writeText&&k.writeText(a).then(h,()=>{})}return e.jsx("button",{className:"es-dap__copy-btn",type:"button",onClick:m,children:r?`${t} ✓`:`📋 ${s}`})}function z({label:a,message:s,btnLabel:t,onNavigate:r}){return e.jsxs("div",{className:"es-dap__card es-dap__tile-cta",children:[e.jsx("div",{className:"es-dap__tile-cta-header",children:e.jsx("span",{className:"es-dap__section-label",children:a})}),e.jsx("p",{className:"es-dap__tile-cta-message",children:s}),e.jsx("button",{className:"es-dap__tile-cta-btn",type:"button",onClick:r,children:t})]})}function T({section:a,summary:s,content:t,onTalk:r,t:n}){return e.jsxs("button",{type:"button",className:"es-dap__gaio-link","aria-label":n("dap.gaio.aria",{section:a}),onClick:()=>r(a,s,t),children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",n("dap.talk_to_gaio")]})}function He({data:a,config:s,metadata:t,i18n:r,actions:n,baseUrl:m,externalContext:h,auth:k,previewMode:b}){const i=r?.t??(y=>y),x=r?.currentLanguage??"en",g=h?.hasChatView===!0,f=s.showFocus??!0,j=s.showPlays??!0,q=s.showStructural??!0,se=s.showRisk??!0,ie=s.showBlocker??!0,re=s.showMyBenefits??!0,ne=a.personalGreeting,u=a.todaysFocus,d=a.relationshipPlay,p=a.recruitmentPlay,o=a.salesPlay,C=a.structuralCheck,c=a.riskFlag,N=a.myBenefits,[_,le]=E.useState({});function R(y){le($=>({...$,[y]:!$[y]}))}function B(){n.navigate("gaio-coach")}const v=E.useCallback((y,$,me)=>{n.emit("chat:draft",{message:`[${y}]
|
|
3
3
|
${me}`,autoSend:!1,quickChips:[{labelKey:"dap.gaio.chip.how",label:i("dap.gaio.chip.how"),message:i("dap.gaio.chip.how_msg",{summary:$}),autoSend:!0},{labelKey:"dap.gaio.chip.why",label:i("dap.gaio.chip.why"),message:i("dap.gaio.chip.why_msg",{summary:$}),autoSend:!0},{labelKey:"dap.gaio.chip.draft",label:i("dap.gaio.chip.draft"),message:i("dap.gaio.chip.draft_msg",{summary:$}),autoSend:!0},{labelKey:"dap.gaio.chip.other",label:i("dap.gaio.chip.other"),message:"",autoSend:!1}]})},[n,i]),w=y=>e.jsx(ye,{compact:!0,blockSlug:"daily-action-plan",sectionKey:y,baseUrl:m,apiKey:h?.apiKey,jwt:k?.jwt,previewMode:b,t:i});if(!u&&!ne&&!a.error)return e.jsx(U,{blockType:"daily-action-plan",children:e.jsx("div",{className:"es-block__body es-dap__body",children:e.jsxs("div",{className:"es-dap__empty",children:[e.jsx("div",{className:"es-dap__empty-title",children:i("dap.title")}),e.jsx("p",{className:"es-dap__empty-message",children:t?.dataQuality==="none"?i("dap.empty.sign_in"):i("dap.empty.preparing")}),[1,2,3].map(y=>e.jsxs("div",{className:"es-dap__card es-dap__card--placeholder",children:[e.jsx("div",{className:"es-dap__placeholder-line es-dap__placeholder-line--label"}),e.jsx("div",{className:"es-dap__placeholder-line"})]},y))]})})});if(a.error)return e.jsx(U,{blockType:"daily-action-plan",error:ue(a.error)});const V=we(u),G=Te(C),oe=C?.normalRank?.blockingConditions?.filter(y=>!X(y))??[],ce=f&&!V,D=j&&!!d&&!!d.targetName&&!l(d.summary),A=j&&!!p&&p.actionType!=="none"&&!l(p.summary),L=!!o&&o.linkedToBinarySide==="none"&&!l(o.details?.concreteStep),F=j&&!!o&&(!l(o.summary)||L),de=q&&!G,W=se&&!!c&&c.severity!=="none",I=re&&!!N&&(!l(N.summary)||N.events.length>0);if(!(ce||D||A||F||de||W||I))return e.jsx(U,{blockType:"daily-action-plan",children:e.jsx("div",{className:"es-block__body es-dap__body",children:e.jsxs("div",{className:"es-dap__block-cta",children:[e.jsx("p",{className:"es-dap__block-cta-message",children:i("dap.empty.block_cta")}),e.jsx("button",{className:"es-dap__block-cta-btn",type:"button",onClick:B,children:i("dap.empty.block_cta_btn")})]})})});const pe=C?.normalRank,H=C?.paidRank,K=oe.map(Ce).filter(y=>y.scope==="normal").map(y=>y.text),Q=ie&&!!C&&(K.length>0||!!H);return e.jsxs(U,{blockType:"daily-action-plan",children:[e.jsx("div",{className:"es-dap__icon-row",children:e.jsx(ge,{panelKey:"daily-action-plan",baseUrl:m,apiKey:h?.apiKey,t:i})}),e.jsxs("div",{className:"es-block__body es-dap__body es-dap__deck",children:[f&&(V?e.jsx(z,{label:i("dap.section.focus"),message:i("dap.empty.tile_cta"),btnLabel:i("dap.empty.tile_cta_btn"),onNavigate:B}):u&&e.jsxs("div",{className:"es-dap__hero",children:[e.jsxs("div",{className:"es-dap__hero-lead",children:[e.jsx("span",{"aria-hidden":"true",children:Se[u.domain]??"🎯"})," ",i("dap.section.focus")," · ",u.domain,u.details?.deadlineUtc&&e.jsxs("span",{className:"es-dap__hero-deadline","data-es-no-read":!0,children:[" · ⏱ ",Z(u.details.deadlineUtc,x)]})]}),e.jsx("p",{className:"es-dap__hero-headline",children:u.summary}),u.details?.whyThisToday&&e.jsxs(O,{teaser:u.details.whyThisToday,isOpen:_.focus??!1,children:[e.jsx("p",{className:"es-dap__detail-text",children:u.details.whyThisToday}),u.details?.expectedOutcome&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--outcome",children:u.details.expectedOutcome})]}),e.jsx(S,{moreToggle:u.details?.whyThisToday&&e.jsx(M,{isOpen:_.focus??!1,onToggle:()=>R("focus"),expandLabel:i("dap.aria.expand_focus"),collapseLabel:i("dap.aria.collapse_focus"),t:i}),gaioLink:g&&e.jsx(T,{section:i("dap.section.focus"),summary:u.summary,content:be(u,i,x),onTalk:v,t:i})}),w("focus")]})),W&&c&&e.jsxs("div",{className:"es-dap__risk",style:{borderLeftColor:Y(c.severity)},children:[e.jsxs("div",{className:"es-dap__risk-head",children:[e.jsx("span",{className:"es-dap__risk-title",children:i("dap.section.risk")}),e.jsx("span",{className:"es-dap__pill es-dap__pill--warn",style:{color:Y(c.severity)},children:i(`dap.risk.severity.${c.severity}`)})]}),e.jsx("p",{className:"es-dap__risk-blurb",children:i("dap.risk.blurb")}),c.summary&&e.jsx("p",{className:"es-dap__risk-summary",children:c.summary}),c.details?.description&&e.jsxs(O,{teaser:c.details.description,isOpen:_.risk??!1,children:[e.jsx("p",{className:"es-dap__detail-text",children:c.details.description}),c.details?.preventiveAction&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--step",children:c.details.preventiveAction}),c.details?.timeSensitivity&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--deadline",children:c.details.timeSensitivity})]}),e.jsx(S,{moreToggle:c.details?.description&&e.jsx(M,{isOpen:_.risk??!1,onToggle:()=>R("risk"),expandLabel:i("dap.aria.expand_risk"),collapseLabel:i("dap.aria.collapse_risk"),t:i}),gaioLink:g&&e.jsx(T,{section:i("dap.section.risk"),summary:c.summary||c.details?.description||i("dap.section.risk"),content:ke(c,i),onTalk:v,t:i})}),w("risk")]}),Q&&e.jsxs(e.Fragment,{children:[e.jsx(Le,{normalRank:pe,paidRank:H,normalConditions:K,gaioLink:g&&e.jsx(T,{section:i("dap.gaio.section.blocker"),summary:i("dap.gaio.section.blocker"),content:ve(K,H,i),onTalk:v,t:i}),t:i}),w("blocker")]}),q&&G&&!Q&&e.jsx(z,{label:i("dap.section.structural"),message:i("dap.empty.tile_cta"),btnLabel:i("dap.empty.tile_cta_btn"),onNavigate:B}),I&&N&&e.jsxs(e.Fragment,{children:[e.jsx(Oe,{benefits:N,lang:x,gaioLink:g&&e.jsx(T,{section:i("dap.section.my_benefits"),summary:N.summary||i("dap.section.my_benefits"),content:Ne(N,i,x),onTalk:v,t:i}),t:i}),w("my_benefits")]}),j&&(D||A||F)&&e.jsxs("div",{className:"es-dap__play-rail",children:[D&&d&&e.jsxs("div",{className:"es-dap__play",children:[e.jsxs("div",{className:"es-dap__play-head",children:[e.jsx("span",{"aria-hidden":"true",children:"🤝"}),e.jsxs("span",{className:"es-dap__play-label",children:[i("dap.section.relationship")," · ",d.targetName]}),e.jsx("span",{className:"es-dap__play-spacer"}),d.details?.channelHint&&d.details.channelHint!=="none"&&e.jsxs("span",{className:"es-dap__pill",children:[e.jsx("span",{"aria-hidden":"true",children:"💬"})," ",d.details.channelHint]})]}),e.jsx("div",{className:"es-dap__play-summary",children:d.summary}),d.details?.draftMessage&&e.jsxs(O,{teaser:d.details.draftMessage,isOpen:_.relationship??!1,children:[e.jsx("blockquote",{className:"es-dap__draft-message",children:d.details.draftMessage}),e.jsx(Me,{text:d.details.draftMessage,copyLabel:i("dap.play.copy_send"),copiedLabel:i("dap.play.copied")})]}),d.details?.complianceNote&&e.jsxs("div",{className:"es-dap__compliance",children:[e.jsx("span",{className:"es-dap__compliance-ico","aria-hidden":"true",children:"ⓘ"}),e.jsx("span",{children:d.details.complianceNote})]}),e.jsx(S,{moreToggle:d.details?.draftMessage&&e.jsx(M,{isOpen:_.relationship??!1,onToggle:()=>R("relationship"),expandLabel:i("dap.aria.expand_relationship"),collapseLabel:i("dap.aria.collapse_relationship"),t:i}),gaioLink:g&&e.jsx(T,{section:i("dap.section.relationship"),summary:d.summary,content:fe(d,i),onTalk:v,t:i})}),w("relationship")]}),A&&p&&e.jsxs("div",{className:"es-dap__play",children:[e.jsxs("div",{className:"es-dap__play-head",children:[e.jsx("span",{"aria-hidden":"true",children:"📣"}),e.jsx("span",{className:"es-dap__play-label",children:i("dap.section.recruitment")}),e.jsx("span",{className:"es-dap__play-spacer"}),e.jsx("span",{className:"es-dap__pill es-dap__pill--info",children:p.actionType.replace(/_/g," ")})]}),e.jsx("div",{className:"es-dap__play-summary",children:p.summary}),p.details?.rationale&&e.jsxs(O,{teaser:p.details.rationale,isOpen:_.recruitment??!1,children:[p.details?.candidateOrSegment&&e.jsx("p",{className:"es-dap__detail-text",children:p.details.candidateOrSegment}),e.jsx("p",{className:"es-dap__detail-text",children:p.details.rationale})]}),p.details?.concreteStep&&e.jsxs("div",{className:"es-dap__do",children:[e.jsxs("b",{children:[i("dap.play.do"),":"]})," ",p.details.concreteStep]}),p.details?.complianceNote&&e.jsxs("div",{className:"es-dap__compliance",children:[e.jsx("span",{className:"es-dap__compliance-ico","aria-hidden":"true",children:"ⓘ"}),e.jsx("span",{children:p.details.complianceNote})]}),e.jsx(S,{moreToggle:p.details?.rationale&&e.jsx(M,{isOpen:_.recruitment??!1,onToggle:()=>R("recruitment"),expandLabel:i("dap.aria.expand_recruitment"),collapseLabel:i("dap.aria.collapse_recruitment"),t:i}),gaioLink:g&&e.jsx(T,{section:i("dap.section.recruitment"),summary:p.summary,content:xe(p,i),onTalk:v,t:i})}),w("recruitment")]}),F&&o&&e.jsxs("div",{className:"es-dap__play",children:[e.jsxs("div",{className:"es-dap__play-head",children:[e.jsx("span",{"aria-hidden":"true",children:"🛒"}),e.jsx("span",{className:"es-dap__play-label",children:L?`${i("dap.section.sales")} · ${i("dap.sales.educational")}`:`${i("dap.section.sales")} · ${o.linkedToBinarySide}`}),e.jsx("span",{className:"es-dap__play-spacer"}),!L&&e.jsx("span",{className:"es-dap__pill es-dap__pill--ok",children:`${o.linkedToBinarySide} ${i("dap.gauge.leg")}`}),L&&e.jsx("span",{className:"es-dap__pill es-dap__pill--info",children:i("dap.sales.no_cycle")})]}),o.summary&&e.jsx("div",{className:"es-dap__play-summary",children:o.summary}),o.details?.rationale&&e.jsxs(O,{teaser:o.details.rationale,isOpen:_.sales??!1,children:[o.details?.productOrCycleAction&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--product",children:o.details.productOrCycleAction}),e.jsx("p",{className:"es-dap__detail-text",children:o.details.rationale})]}),o.details?.concreteStep&&e.jsxs("div",{className:"es-dap__do",children:[e.jsxs("b",{children:[i("dap.play.do"),":"]})," ",o.details.concreteStep]}),o.details?.marketSignal&&e.jsx("p",{className:"es-dap__detail-text es-dap__detail-text--market",children:o.details.marketSignal}),o.details?.complianceNote&&e.jsxs("div",{className:"es-dap__compliance",children:[e.jsx("span",{className:"es-dap__compliance-ico","aria-hidden":"true",children:"ⓘ"}),e.jsx("span",{children:o.details.complianceNote})]}),e.jsx(S,{moreToggle:o.details?.rationale&&e.jsx(M,{isOpen:_.sales??!1,onToggle:()=>R("sales"),expandLabel:i("dap.aria.expand_sales"),collapseLabel:i("dap.aria.collapse_sales"),t:i}),gaioLink:!L&&g&&e.jsx(T,{section:i("dap.section.sales"),summary:o.summary,content:je(o,i),onTalk:v,t:i})}),w("sales")]})]})]})]})}export{He as Component,Fe as manifest};
|
|
4
|
-
//# sourceMappingURL=index-
|
|
4
|
+
//# sourceMappingURL=index-pQ7fPgLl-JdphAk2-.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as n,j as s,Q as H}from"../nexly.js";const L={slug:"support-session-nav",name:"Support Session Navigator",version:"1.0.0",category:"interactive",configSchema:{},defaultConfig:{},sizing:{minWidth:200,preferredHeight:"fill",scrollable:!0},supportedPlacements:["sidebar","main"],events:{emits:[{name:"support-chat:select-session",description:"User selected a past support session"}]}};function M(a,o){const u=Date.now()-new Date(a).getTime(),r=Math.floor(u/6e4);if(r<1)return o("time.just_now");if(r<60)return o("time.minutes_ago",{count:r});const i=Math.floor(r/60);return i<24?o("time.hours_ago",{count:i}):o("time.days_ago",{count:Math.floor(i/24)})}function T({actions:a,baseUrl:o,productId:u,i18n:r,supportSessionId:i,auth:k,externalContext:g}){const t=r?.t??(e=>e),m=k?.jwt,w=g?.showTicketsTab??!1,[v,l]=n.useState(!1),[x,y]=n.useState([]),[p,b]=n.useState(!1),[f,j]=n.useState(null),[d,h]=n.useState(i??null);n.useEffect(()=>{h(i??null)},[i]);const _=n.useCallback(async()=>{b(!0),j(null);try{const e=await fetch(`${o}/api/support-chat/sessions?productId=${encodeURIComponent(u||"")}`,{headers:{...m?{Authorization:`Bearer ${m}`}:{}},credentials:"include"});if(!e.ok)throw new Error(`HTTP ${e.status}`);const c=await e.json();if(!c.success||!c.data)throw new Error("Invalid response");y(c.data.sessions)}catch{j(t("support_session_nav.load_error"))}finally{b(!1)}},[o,m,u,t]);n.useEffect(()=>a.on("support-chat:session",e=>{const{sessionId:c}=e;c&&h(c),v&&_()}),[a,_,v]),n.useEffect(()=>a.on("support-chat:showHistory",()=>{l(!0),_()}),[a,_]),n.useEffect(()=>a.on("support-chat:clearHistory",()=>{l(!1)}),[a]);const C=n.useCallback(e=>{e!==d&&(h(e),a.emit("support-chat:select-session",{sessionId:e})),l(!1)},[a,d]),N=n.useCallback(()=>{a.emit("support-chat:clearHistory",void 0),h(null),l(!1)},[a]),S=n.useCallback(()=>{l(!1)},[]),E=n.useCallback(()=>{a.emit("support-chat:showTickets",void 0),l(!1)},[a]);return v?s.jsxs(H,{blockType:"support-session-nav",children:[s.jsxs("div",{className:"es-ssn__header",children:[s.jsx("span",{className:"es-ssn__header-title",children:t("support_session_nav.title")}),s.jsxs("div",{className:"es-ssn__header-actions",children:[s.jsx("button",{type:"button",className:"es-ssn__action-btn","aria-label":t("support_chat.new_conversation_button"),title:t("support_chat.new_conversation_button"),onClick:N,children:s.jsxs("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("path",{d:"M12 5H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),s.jsx("path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"})]})}),s.jsx("button",{type:"button",className:"es-ssn__action-btn es-ssn__action-btn--active","aria-label":t("support_chat.history_button"),title:t("support_chat.history_button"),"aria-pressed":"true",onClick:S,children:s.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("polyline",{points:"12 6 12 12 16 14"})]})}),w&&s.jsx("button",{type:"button",className:"es-ssn__action-btn","aria-label":t("support_chat.tickets_tab_button"),title:t("support_chat.tickets_tab_button"),onClick:E,children:s.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("path",{d:"M2 9a3 3 0 1 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 1 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"}),s.jsx("path",{d:"m9 12 2 2 4-4"})]})})]})]}),s.jsx("div",{className:"es-block__body",children:s.jsxs("div",{className:"es-ssn__list",role:"list","aria-label":t("support_session_nav.list_aria"),children:[p&&s.jsx("div",{className:"es-ssn__loading",role:"status",children:t("support_session_nav.loading")}),f&&!p&&s.jsx("div",{className:"es-ssn__error",role:"alert",children:f}),!p&&!f&&x.length===0&&s.jsx("div",{className:"es-ssn__empty",children:t("support_session_nav.empty")}),!p&&x.map(e=>s.jsxs("button",{role:"listitem",type:"button",className:`es-ssn__item${e.id===d?" es-ssn__item--active":""}`,onClick:()=>C(e.id),"aria-current":e.id===d?"true":void 0,children:[s.jsx("div",{className:"es-ssn__item-preview",children:e.firstUserMessage??t("support_session_nav.no_preview")}),s.jsxs("div",{className:"es-ssn__item-meta",children:[s.jsx("span",{className:`es-ssn__item-status es-ssn__item-status--${e.status}`,"aria-label":e.status,children:e.status}),s.jsx("span",{children:M(e.updatedAt,t)}),e.messageCount>0&&s.jsx("span",{children:t("support_session_nav.message_count",{count:e.messageCount})})]})]},e.id))]})})]}):null}export{T as Component,L as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-svAzoy0Y-DbuSZfeK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{r as p,j as e,Q as N}from"../nexly.js";import{S as k,I,L as M,$ as T,j as L,_ as E,k as z,m as D}from"./index.modern-CioVZ357-BA5NTOmY.js";import"./_commonjsHelpers-C6fGbg64-BC8KDfbh.js";const R={slug:"event-map",name:"Event Map",version:"1.0.0",category:"interactive",requiredService:"event-scraper",configSchema:{properties:{zoom:{type:"number",default:12},showFilters:{type:"boolean",default:!0}}},defaultConfig:{zoom:12,showFilters:!0},dataContract:{serviceSlug:"event-scraper",inputSchema:{type:"object",properties:{events:{type:"array",items:{type:"object",properties:{id:{type:"string"},title:{type:"string"},date:{type:"string"},lat:{type:"number"},lng:{type:"number"},isFree:{type:"boolean"}}}},centerLat:{type:"number"},centerLng:{type:"number"}},required:["events"]},previewDataOverride:{events:[{id:"evt-1",title:"Tech Startup Networking Night",date:"2026-04-10T18:00:00Z",lat:37.4979,lng:127.0276,isFree:!0},{id:"evt-2",title:"AI & Machine Learning Summit",date:"2026-04-15T09:00:00Z",lat:37.5563,lng:126.9177,isFree:!1},{id:"evt-3",title:"Web3 Developer Workshop",date:"2026-04-20T14:00:00Z",lat:37.5145,lng:127.1059,isFree:!0}],centerLat:37.5665,centerLng:126.978}},fields:[{id:"zoom",type:"range",label:"Default zoom level",default:12,min:8,max:18,step:1,group:"Map"},{id:"showFilters",type:"toggle",label:"Show filter controls",default:!0,group:"Display"}],events:{emits:[{name:"eventMap:markerClicked",description:"User clicked on an event map marker"},{name:"eventMap:viewChanged",description:"Map viewport moved or zoomed"}],listens:[{name:"events:refresh",description:"Reload events and re-render markers"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function A(s,n){const d=new Date(s);return Number.isNaN(d.getTime())?s:new Intl.DateTimeFormat(n,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(d)}function W({events:s,selectedId:n,onSelect:d,useAdvanced:v,onPrimaryInk:r,onSuccessInk:g}){const c=T();return p.useEffect(()=>{if(!c||!n)return;const t=s.find(o=>o.id===n);t&&c.panTo({lat:t.lat,lng:t.lng})},[c,n,s]),v?e.jsx(e.Fragment,{children:s.map((t,o)=>{const u=t.id!=null&&t.id===n;return e.jsx(L,{position:{lat:t.lat,lng:t.lng},title:t.title,onClick:()=>d(t.id??null),children:e.jsx(E,{background:u?"var(--es-color-interactive, #2563EB)":t.isFree?"var(--es-color-success, #00672B)":"var(--es-color-primary, #2563EB)",borderColor:z,glyphColor:!u&&t.isFree?g:r,scale:u?1.25:1})},t.id??o)})}):e.jsx(e.Fragment,{children:s.map((t,o)=>e.jsx(D,{position:{lat:t.lat,lng:t.lng},title:t.title,onClick:()=>d(t.id??null)},t.id??o))})}const Z={id:"__builder_placeholder__",title:"Sample event location",lat:37.5665,lng:126.978};function q({data:s,actions:n,i18n:d,builderMode:v}){const r=d?.t??(a=>a),g=d?.currentLanguage??s.language??"en",[c,t]=p.useState(null),o=p.useRef(null),u=k(o,"--es-color-on-primary","#ffffff"),S=k(o,"--es-color-on-success","#ffffff"),b=s.events??[],j=s.googleMapsApiKey,y=s.googleMapsMapId??void 0,C=!!y,m=b.length,i=p.useMemo(()=>b.filter(a=>typeof a.lat=="number"&&typeof a.lng=="number"),[b]),l=c!=null?i.find(a=>a.id===c)??null:null,x=p.useCallback(a=>{if(t(a),a){const f=i.find(h=>h.id===a);f&&n.emit("events:eventSelected",{id:a,event:f}),n.emit("events:markerHighlight",{id:a})}else n.emit("events:markerHighlight",{id:null})},[n,i]);if(p.useEffect(()=>{const a=n.on("events:hover",f=>{const h=f?.id??null;h!=null&&i.some(w=>w.id===h)&&t(h)});return()=>a()},[n,i]),!j)return e.jsx(N,{blockType:"event-map",children:e.jsx("div",{className:"es-block__body",children:e.jsxs("div",{className:"es-map-placeholder",children:[e.jsx("div",{className:"es-map-placeholder__icon","aria-hidden":"true",children:"🗺"}),e.jsx("div",{className:"es-map-placeholder__message",children:r("event_map.no_key_message")}),m>0&&e.jsx("div",{className:"es-map-placeholder__count",children:r("event_map.events_available",{count:m})}),e.jsx("div",{className:"es-map-placeholder__hint",children:r("event_map.use_event_list_hint")})]})})});const _=v&&i.length===0?[Z]:i,F=_.length>0?{lat:_[0].lat,lng:_[0].lng}:{lat:37.5665,lng:126.978};return e.jsx(N,{blockType:"event-map",children:e.jsxs("div",{className:"es-block__body es-block__body--map",ref:o,children:[e.jsx(I,{apiKey:j,language:g,children:e.jsx(M,{className:"es-eventmap__canvas",defaultCenter:F,defaultZoom:_.length>0?12:10,mapTypeControl:!1,fullscreenControl:!1,streetViewControl:!1,...y?{mapId:y}:{},children:e.jsx(W,{events:_,selectedId:c,onSelect:x,useAdvanced:C,onPrimaryInk:u,onSuccessInk:S})})}),!v&&m>0&&i.length===0&&e.jsxs("div",{className:"es-eventmap__no-coords-overlay",role:"note",children:[e.jsx("div",{className:"es-eventmap__no-coords-overlay__icon","aria-hidden":"true",children:"📍"}),e.jsx("div",{className:"es-eventmap__no-coords-overlay__message",children:r("event_map.no_coords_notice")}),e.jsx("div",{className:"es-eventmap__no-coords-overlay__count",children:r("event_map.events_no_coords",{count:m})})]}),!v&&i.length>0&&m>i.length&&e.jsxs("div",{className:"es-eventmap__no-coords-badge",role:"note",children:[e.jsx("span",{className:"es-eventmap__no-coords-badge__icon","aria-hidden":"true",children:"📍"}),e.jsx("span",{className:"es-eventmap__no-coords-badge__text",children:r("event_map.partial_no_coords_badge",{count:m-i.length})})]}),l&&e.jsxs("div",{className:"es-eventmap__detail",role:"dialog","aria-label":l.title,children:[e.jsx("button",{type:"button",className:"es-eventmap__detail-close",onClick:()=>x(null),"aria-label":r("event_map.close_details"),children:"×"}),e.jsxs("div",{className:"es-eventmap__detail-header",children:[e.jsx("h3",{className:"es-eventmap__detail-title",children:l.title}),l.isFree&&e.jsx("span",{className:"es-eventmap__detail-badge",children:r("event_list.free")})]}),e.jsxs("div",{className:"es-eventmap__detail-meta",children:[l.date&&e.jsxs("span",{className:"es-eventmap__detail-meta-item",children:[e.jsx("span",{"aria-hidden":"true",children:"🗓"}),A(l.date,g)]}),(l.address||l.location)&&e.jsxs("span",{className:"es-eventmap__detail-meta-item",children:[e.jsx("span",{"aria-hidden":"true",children:"📍"}),l.address||l.location]})]}),l.url&&e.jsxs("a",{href:l.url,className:"es-eventmap__detail-cta",target:"_blank",rel:"noopener noreferrer",children:[r("event_list.view_details")," →"]})]})]})})}export{q as Component,R as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
2
|
+
//# sourceMappingURL=index-tAu73-sK-DQBGsPwB.js.map
|