PageSourceSearch

https://dashboard.merchbridge.com/static/js/154.8ea45dde.chunk.js

js merchbridge.com collected 2026-10-02 00:55:56 UTC 8,989 bytes, 47 lines download raw bytes

1(this.webpackJsonpapp=this.webpackJsonpapp||[]).push([[154],{1825:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return J}));var n=a(1),c=a(1388),o=a(5),r=a(0),l=a.n(r),i=a(9),s=a(1542),d=r.createElement("path",{d:"M8.586 13H2a1 1 0 1 1 0-2h6.586L7.293 9.707a.999.999 0 1 1 1.414-1.414l3 3a.999.999 0 0 1 0 1.414l-3 3a.997.997 0 0 1-1.414 0 .999.999 0 0 1 0-1.414L8.586 13zM18 20H2a1 1 0 0 1-1-1v-2a1 1 0 1 1 2 0v1h14V5.618l-7-3.5-7 3.5V7a1 1 0 1 1-2 0V5c0-.379.214-.725.553-.895l8-4c.281-.14.613-.14.894 0l8 4c.339.17.553.516.553.895v14a1 1 0 0 1-1 1z"}),u=function(e){return r.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),d)},m=a(1385),p=a(1521),g=a(1536),v=a(1538),E=a(1533),b=a(1374),h=a(12),f=a(28),A=a(340),O=a(230),y=a(35),x=a(7),P=a(19),C=a(2);const w=y.a`
2  mutation deleteStore($id: ID!) {
3    deleteStore(id: $id)
4  }
5`;function j(e){let{open:t,onClose:a,store:c,refetch:o}=e;const[r,{loading:i}]=Object(x.c)(w),{toggleToast:s,setNotify:d}=Object(P.b)(),u=l.a.useCallback(()=>{c.id&&(s&&s(),d&&d({err:!1,msg:null}),r({variables:{id:c.id}}).then(()=>{o&&o(),d({err:!1,msg:"Delete Tiktok account success"})}).catch(e=>{d({err:!0,msg:Object(C.ib)(e.toString())})}).finally(()=>{a&&a()}))},[c.id,s,d]);return l.a.createElement(n.E,{open:t,onClose:a,sectioned:!0,title:"Delete Tiktok Account confirmation",primaryAction:{content:"Submit",onAction:u,loading:i},secondaryActions:[{content:"Cancel",onAction:a}]},l.a.createElement("p",null,"Are you sure want to delete ",l.a.createElement("strong",null,c.title)))}var k=a(751),S=a(750),D=a(16),I=a(21);function M(e){let{open:t,onClose:a,store:c}=e;const[o,r]=l.a.useState(""),[i,{loading:s}]=Object(x.c)(D.Pb),{toggleToast:d,setNotify:u}=Object(P.b)(),m=l.a.useRef(null),p=l.a.useCallback(()=>{m.current=!0,c.id&&o&&(d&&d(),u&&u({err:!1,msg:null}),i({variables:{storeID:c.id,emailToReceiveFileURL:o}}).then(()=>{u({err:!1,msg:"Export product id success, please check your email"})}).catch(e=>{u({err:!0,msg:Object(C.ib)(e.toString())})}).finally(()=>{a&&a()}))},[i,c.id,a,d,u,o]);return l.a.createElement(n.E,{title:"Export product id",sectioned:!0,open:t,onClose:a,primaryAction:{content:"Export",onAction:p,loading:s},secondaryActions:[{content:"Cancel",onAction:a}]},l.a.createElement("div",null,l.a.createElement(I.a,{required:!0,label:"Your Email"}),l.a.createElement(n.cb,{value:o,placeholder:"Enter your email",onChange:r,error:m.current&&!o?"Your email is required":null})))}var N=a(752),T=a(753);const F=[{value:!1,label:"Enable"},{value:!0,label:"Disabled"}];function B(e){let{open:t,onClose:a,store:c}=e;const{id:o,disabledAutoMap:i}=c,[s,d]=Object(r.useState)([!!i]),[u,{loading:m}]=Object(x.c)(D.L),{toggleToast:p,setNotify:g}=Object(P.b)(),v=l.a.useCallback(()=>{o&&u({variables:{storeID:o,newValue:!!s[0]&&s[0]}}).then(()=>{g({err:!1,msg:"Update store succes"})}).catch(e=>{g({err:!0,msg:Object(C.ib)(e.toString())})}).finally(()=>{a&&a()})},[u,o,s,a,p,g]),E=Object(r.useCallback)(e=>{d(e)},[]);return l.a.createElement(n.E,{title:"Update auto map",sectioned:!0,open:t,onClose:a,primaryAction:{content:"Submit",onAction:v,loading:m},secondaryActions:[{content:"Cancel",onAction:a}]},l.a.createElement(n.k,{choices:F,selected:s,onChange:E}))}var K=a(754),$=a(264);function L(e){let{store:t,refetch:a,currentParam:c}=e;const[o,i]=Object(f.a)(!1),[d,y]=Object(f.a)(!1),[x,P]=Object(r.useState)(null),[C,w]=Object(f.a)(!1),[D,I]=Object(r.useState)({msg:null,err:!1}),F=!!t.apiKey&&!t.certificate,L=null===t||void 0===t?void 0:t.id,R=Object(r.useCallback)(e=>{P(e),y()},[L]),U=["Deactivated","Disconnected"].includes(null===t||void 0===t?void 0:t.status),V=[{content:"Manage",icon:s.a,onAction:()=>h.a.push(`/${c}/store/edit/${t.id}`)},F&&{content:"Switch to API store",icon:u,onAction:()=>h.a.push(`/${c}/store/switch/${t.id}`)},!F&&{content:"Fetch All Orders",icon:m.a,onAction:()=>R("fetchAll")},!F&&{content:"Fetch Orders by ID",icon:m.a,onAction:()=>R("fetchOrderByIds")},!F&&{content:"Export Product ID",icon:p.a,onAction:()=>R("exportProduct")},!F&&{content:"Fetch All Products",icon:m.a,onAction:()=>R("fetchAllProduct")},!F&&{content:"Fetch Products by ID",icon:m.a,onAction:()=>R("fetchProductByIds")},!F&&{content:"Change Auto Map",icon:g.a,onAction:()=>R("disabledAutoMap")},{content:"Re-gen API Key",icon:v.a,onAction:()=>R("reGen")},{content:"Mark as "+(U?"Connected":"Deactivated"),icon:E.a,onAction:()=>R("markStatus")},!F&&{content:"Deactivate All Promotions",icon:g.a,onAction:()=>R("deactivatePromotions")},{content:"Index Order",icon:m.a,onAction:()=>R("indexOrder")},{content:"Delete",icon:b.a,destructive:!0,onAction:()=>R("delete")}
5].filter(Boolean),z={open:d,onClose:y,storeId:null===t||void 0===t?void 0:t.id,isDeactivated:U,refetch:a,store:t,toggleActiveToast:w,setNotify:I},G={delete:l.a.createElement(j,z),reGen:l.a.createElement(A.a,z),fetchOrderByIds:l.a.createElement(S.a,z),fetchAll:l.a.createElement(k.a,z),markStatus:l.a.createElement(O.a,z),exportProduct:l.a.createElement(M,z),fetchAllProduct:l.a.createElement(N.a,z),fetchProductByIds:l.a.createElement(T.a,z),disabledAutoMap:l.a.createElement(B,z),deactivatePromotions:l.a.createElement(K.a,z),indexOrder:l.a.createElement($.a,z)},H=l.a.createElement(n.g,{children:"Actions",disclosure:!0,onClick:i}),J=C&&D.msg&&l.a.createElement(n.fb,{content:D.msg,error:D.err,duration:2e3,onDismiss:w});return l.a.createElement(r.Fragment,null,J,l.a.createElement(n.K,{activator:H,onClose:i,active:o},l.a.createElement(n.a,{items:V})),G[x])}var R=a(98),U=a(37),V=a(161),z=a(755),G=a(472),H=a(11);function J(e){let{data:t,filter:a,handlePaginationChange:r,refetch:i,currentParam:s}=e;const{currentUser:d}=Object(H.c)(),{isSeller:u,isStoreManager:m,isMarketplaceManager:p}=Object(C.j)(d),[g,v]=l.a.useState([]),{checkAllMarkup:E,checkItemMarkup:b}=Object(V.b)();l.a.useEffect(()=>{var e;const a=((null===t||void 0===t||null===(e=t.stores)||void 0===e?void 0:e.nodes)||[]).map(e=>{var t;let a=e.status,o=null;"Connected"===a&&(o="success"),("Suspended"===a||e.suspended)&&(o="critical",a="Suspended"),"Deactivated"===a&&(a="Deactivated",o="attention");let r="Add On",g="info";e.certificate&&(r="API",g="warning");const v=(null===e||void 0===e?void 0:e.domain)||"";let E=e.owners,h=e.manager?[{role:"Owner",store_id:e.div,user:e.manager}]:null;m&&(E=E.filter(e=>e.user&&e.user.id===(null===d||void 0===d?void 0:d.id)));const f=null===e||void 0===e||null===(t=e.group)||void 0===t?void 0:t.name;return[b(e.id),l.a.createElement("div",{className:"id-wrap"},l.a.createElement("span",null,e.id)),l.a.createElement("div",{className:"avatar-container"},l.a.createElement("div",{className:"avatar-box"},l.a.createElement(n.d,{customer:!0,name:"John Smith"})),l.a.createElement("div",{className:"avatar-right"},l.a.createElement("div",null,e.title),l.a.createElement("p",null,e.email),l.a.createElement(n.e,{status:g},r),l.a.createElement("p",null,l.a.createElement("b",null,"Shop Code: "),l.a.createElement("span",null,v)))),l.a.createElement("div",{className:"stores-wrap"},u||p?l.a.createElement(G.a,{owners:h}):null,l.a.createElement(G.a,{owners:E})),l.a.createElement("div",{className:"group-wrap"},f),l.a.createElement("div",null,e.apiKey&&l.a.createElement(R.a,{text:e.apiKey})),l.a.createElement("div",{className:"status-container"},l.a.createElement("div",null,l.a.createElement(n.e,{status:o},a)),(null===e||void 0===e?void 0:e.note)?l.a.createElement("div",{className:"status-tooltip"},l.a.createElement(n.gb,{content:e.note},l.a.createElement(n.g,{size:"slim",plain:!0,icon:l.a.createElement(n.w,{source:c.a})}))):null),l.a.createElement("div",{className:"count-pushed"},l.a.createElement(z.a,{node:e})),l.a.createElement("div",{className:"actions"},l.a.createElement(L,{store:e,refetch:i,currentParam:s}))]});v(a)},[t,b]);let{limit:h,offset:f}=a;const A=Object(o.get)(t,"stores.total",0),O={page:f/h+1,totalPage:Math.ceil(A/h),offset:f,limit:h,onChange:r,total:A};return l.a.createElement(l.a.Fragment,null,l.a.createElement(q,null,l.a.createElement(n.n,{rows:g,headings:[E,"ID","Account","Manager/Owners","Group","API Key","Status","Total Pushed","Action"],columnContentTypes:["text","text","text","text","text","text","text","text","numeric"],verticalAlign:"middle"})),l.a.createElement(Y,null,l.a.createElement(U.PaginationPolaris,{aggregation:O,showTotal:!0})))}const q=i.b.div`
6  .Polaris-Page-Header {
7    padding-top: 0;
8  }
9
10  .avatar-container {
11    display: flex;
12    .avatar-right {
13      margin-left: 10px;
14    }
15  }
16
17  .status-container {
18    display: flex;
19    align-items: center;
20    column-gap: 0.6rem;
21
22    button {
23      margin-right: 5px;
24    }
25
26    .status-tooltip {
27      margin-top: 5px;
28    }
29  }
30
31  .actions {
32    button {
33      margin-right: 8px;
34    }
35  }
36
37  .group-wrap,
38  .id-wrap {
39    white-space: normal;
40    max-width: 20rem;
41  }
42`,Y=i.b.div`
43  padding: 1.6rem;
44  overflow-x: scroll;
45  background: var(--p-surface-subdued, #f4f6f8);
46`}}]);
47//# sourceMappingURL=154.8ea45dde.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.