PageSourceSearch

https://app.sortly.com/scripts/featureControls-DpdW8btc_bundle.js

js sortly.com collected 2026-10-01 10:20:30 UTC 10,572 bytes, 2 lines download raw bytes

1import{cl as C,j as t,r as d,bL as b,bK as k,cm as H,de as M,dj as W}from"./vendor-BBNELK6W_bundle.js";import{a0 as v,C as z}from"./slackIntegration-CyZu6SDu_bundle.js";import{F as s,T as i,dv as D,ai as U,A as h,t as n,G as V,H as j,a4 as G,fW as E,u as R,b as L,lJ as $,a2 as c,a6 as A,a8 as K,ah as q,e5 as Q,m5 as Y,a3 as J,kU as X,k as T,e as Z,a9 as ee,cj as te,ag as re,h as ne}from"./registration-8fW6h2tH_bundle.js";import{S as ae}from"./index-BWLWa86I_bundle.js";import"./moment-Dt2i7U-U_bundle.js";import{S as se}from"./return-to-origin-YzDXechb_bundle.js";import{a5 as oe,R as ie}from"./index-yTdTJQbB_bundle.js";import"./datadog-DxmyjtSX_bundle.js";import"./sentry-Bq-jBV13_bundle.js";import"./manage-team-sfYinYa__bundle.js";import"./list-DL803xGc_bundle.js";import"./stripe-rL9tfl_U_bundle.js";import"./speedboat-vendor-DJ0pA_pR_bundle.js";const le=()=>{const{t:e}=C();return t.jsx(v.DefaultHeader,{children:t.jsx(s,{justifyContent:"space-between",children:t.jsxs("div",{children:[t.jsx(s,{justifyContent:"space-between",children:t.jsx(i,{as:"h1",children:e("feature_controls.page_headline")})}),t.jsx(s,{justifyContent:"flex-start",children:t.jsx(i,{neutral500:!0,size:"14px",children:e("feature_controls.page_subhead")})})]})})})},ce=e=>d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.736 10.526q.015.285.014.583v.004l-.023 4.14v.002c0 1.64-.486 3.035-1.47 4.022-.986.987-2.381 1.473-4.02 1.473h-6.49c-1.641 0-3.038-.486-4.025-1.473S3.25 16.893 3.25 15.253V8.747c0-1.561.282-2.952 1.084-3.96.83-1.045 2.1-1.537 3.744-1.537h1.666c.835 0 1.621.394 2.122 1.062l.76 1.012q.155.205.376.324c.015.568.116 1.114.29 1.626a2.66 2.66 0 0 1-1.865-1.048l-.761-1.014a1.15 1.15 0 0 0-.922-.462H8.078c-1.339 0-2.107.388-2.57.97-.492.618-.758 1.6-.758 3.027v6.506c0 1.347.393 2.324 1.033 2.963s1.616 1.034 2.965 1.034h6.49c1.343 0 2.318-.394 2.957-1.033.639-.64 1.032-1.617 1.032-2.964v-.004l.023-4.14v-.002l-.001-.158a5.5 5.5 0 0 0 1.487-.423M15.75 11a.75.75 0 0 0-1.5 0v1c0 .69-.56 1.25-1.25 1.25H9.91l.754-.7a.75.75 0 0 0-1.02-1.1l-2.154 2a.75.75 0 0 0 0 1.1l2.154 2a.75.75 0 1 0 1.02-1.1l-.754-.7H13A2.75 2.75 0 0 0 15.75 12z",clipRule:"evenodd"}),d.createElement("path",{fill:"currentColor",d:"M18.7 7.329 15.903 8.7l.486-2.971L14.2 3.67l3.162-.457L18.7.7l1.338 2.514 3.162.457-2.19 2.058.487 2.971z"}),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M18.7 0a.7.7 0 0 1 .618.371l1.171 2.201 2.811.407a.7.7 0 0 1 .38 1.203l-1.918 1.801.426 2.604a.7.7 0 0 1-.999.742L18.7 8.109l-2.49 1.22a.7.7 0 0 1-.998-.742l.426-2.604-1.917-1.801a.7.7 0 0 1 .379-1.203l2.81-.407 1.172-2.2A.7.7 0 0 1 18.7 0m0 2.19-.72 1.353a.7.7 0 0 1-.518.364l-1.724.25 1.13 1.061a.7.7 0 0 1 .212.624l-.267 1.632 1.579-.774a.7.7 0 0 1 .616 0l1.58.774-.268-1.632a.7.7 0 0 1 .212-.624l1.13-1.062-1.724-.249a.7.7 0 0 1-.518-.364z",clipRule:"evenodd"})),ue="https://sortly-pro.zendesk.com/hc/en-us/articles/360002026312#h_01JCNTBZ0HS48RCMS2QAQ3M1KX",de="https://youtu.be/HR1b5p5RlMc",_=D([{element:{key:"returnToOriginEnabled",icon:t.jsx(se,{}),gatedIcon:t.jsx(ce,{}),get title(){return n("return_to_origin.title")},get description(){return n("return_to_origin.description")},get information(){return n("return_to_origin.information")},helpArticleLink:ue,videoLink:de,videoPlaceholderImage:"images/return-to-origin/video-placeholder.jpg",popupType:U.RETURN_TO_ORIGIN,popupFeatureInfo:{ctaTopMargin:32,imageLink:"/images/return-to-origin/upsell.svg",imageCustomStyles:{padding:"20px"},analyticsTitle:e=>n("return_to_origin.upsell.analytics_title",{planName:e}),title:e=>t.jsx(j,{top:15,children:G(n("return_to_origin.upsell.title",{planName:e}))}),get description(){return n("return_to_origin.upsell.description")},showNoThanksButton:!0,showLearnMoreButton:!0,learnMoreLink:"https://help.sortly.com/hc/en-us/articles/43411955336219-How-to-Use-the-Return-to-Origin-Feature",get ctaTrialLabel(){return n("return_to_origin.upsell.cta_text")},get ctaText(){return n("return_to_origin.upsell.cta_text")},advantages:[{id:0,get label(){return n("return_to_origin.upsell.advantages.smooth_process")}},{id:1,get label(){return n("return_to_origin.upsell.advantages.easy_return")}},{id:2,get label(){return n("return_to_origin.upsell.advantages.know_folder_path")}},{id:3,get label(){return n("return_to_origin.upsell.advantages.ultra_features")},showPlusHeader:!0}]},getFeatureState:e=>e?.server?.companies?.current?.returnToOriginEnabled,onSave:e=>V.toggleReturnToOriginFeature(e.returnToOriginEnabled),onSwitcherChange:(e,r,o)=>{e.target.checked||r({type:h.SHOW_MODAL,payload:{component:"NodeActionModal",isDefaultHeadingHidden:!0,styleType:"light",showCrossBtn:!1,autoWidth:!0,disableOutsideClick:!0,data:{warningTitle:n("return_to_origin.disabled_title"),warningSubTitle:n("return_to_origin.disabled_description"),warningNote:n("return_to_origin.disabled_note"),boldHeading:!0,hideNotShowAgain:!0,hasFooterBorder:!0,submitButton:n("common.confirm"),submitButtonMinWidth:"100px",cancelButtonMinWidth:"115px",submitButtonStyleType:"brandCTA",cancelHandler:()=>{r({type:h.HIDE_MODAL}),o("returnToOriginEnabled",!0)},submitHandler:()=>{r({type:h.HIDE_MODAL})}}}})}},include:!0}]),pe=b.div.withConfig({displayName:"ui__FeatureCardWrapper"})(["padding:16px 24px;margin:16px 0;cursor:pointer;box-shadow:0px 5px 20px 0px rgba(79,83,102,0.08);border:1px solid rgba(230,230,240,1);border-radius:12px;overflow:hidden;color:",";"],({theme:e})=>
1e.text.neutral700),he=b.div.withConfig({displayName:"ui__SectionWrapper"})(["height:100%;margin:20px 40px 24px;padding:24px 40px;border-radius:12px;box-shadow:0 5px 20px 0 rgba(60,64,88,0.03);background-color:",";"],({theme:e})=>e.bg.white),ge=b(s).withConfig({displayName:"ui__PlanBadge"})(["padding:5px 8px;border-radius:6px;text-transform:uppercase;font-weight:600;font-size:10px;background-color:",";color:",";"],({theme:e})=>e.text.neutral700,({theme:e})=>e.bg.white),xe=k(["height:20px;padding:0px 7px;border-radius:6px;background-color:",";"],({theme:e})=>e.brand),me=k(["text-transform:uppercase;font-weight:600;color:",";"],({theme:e})=>e.bg.white),_e=k(["font-size:12px;font-weight:400;color:",";"],({theme:e})=>e.text.neutral500),be=b(E).withConfig({displayName:"ui__VideoLink"})(["display:flex;align-items:center;justify-content:center;width:400px;height:225px;border-radius:12px;background-image:",";background-size:contain;"],e=>`url(${e.$background})`),fe=({feature:e})=>{const{t:r}=C(),{register:o,watch:f,setValue:g}=H(),x=R(),[u,y]=d.useState(!1),{mark:{base:w},planFeatures:S={},details:{upsellMark:m}}=L(),{restrictions:a}=$(),l=f(e.key),F=oe(a,e.key,m),p=!S[e.key],I=p?e.gatedIcon:e.icon,N=B=>{if(typeof e.onSwitcherChange=="function")return e.onSwitcherChange(B,x,g)},O=()=>{x({type:h.SHOW_POPUP,popupType:e.popupType,meta:{plan:w,when:"before",featureInfo:e.popupFeatureInfo}})},P=r(l?"common.enabled":"common.disabled");return t.jsxs(pe,{"data-testid":"feature-card",children:[t.jsxs(s,{alignItems:"center",justifyContent:"space-between",children:[t.jsxs(s,{alignItems:"center",children:[I,t.jsx(i,{neutral700:!0,lineHeight:"24px",offsets:{ml:4,mr:8},size:"18px",children:e.title}),t.jsx(c,{when:p,children:t.jsx(ge,{center:!0,children:r("feature_controls.available_at_plan",{planName:F})})}),t.jsx(c,{when:!p,children:t.jsx(ie,{label:r("common.new"),textStyleObj:me,wrapperStyle:xe})})]}),t.jsx(c,{when:p,children:t.jsx(A,{"data-testid":"upgrade-button",minWidth:"165",offsetType:"clear",styleType:"brandCTA",type:"button",onClick:O,children:r("feature_controls.upgrade_plan")})}),t.jsx(c,{when:!p,children:t.jsx(K,{label:q(P),...o(e.key,{onChange:N}),checkboxType:"switcher","data-testid":`${e.key}-switcher`,labelStyle:_e})})]}),t.jsx(i,{neutral500:!0,offsets:{mt:8,mb:16},size:"14px",children:e.description}),t.jsxs(s,{alignItems:"center",onClick:()=>y(!u),children:[t.jsx(Q,{fillColor:Y,rotate:u?-90:0}),t.jsx(i,{block:!0,brand:!0,offsets:{ml:4},weight:500,children:r(u?"feature_controls.hide_details":"feature_controls.show_details")})]}),t.jsxs(c,{when:u,children:[t.jsx(J,{height:"1px",top:"16px",width:"100%"}),t.jsxs(s,{fullWidth:!0,justifyContent:"space-between",children:[t.jsxs(j,{right:20,top:16,width:"50%",children:[t.jsx(i,{block:!0,neutral500:!0,letterSpacing:"0.6px",size:"14px",weight:500,children:r("feature_controls.information")}),t.jsx(i,{block:!0,neutral500:!0,lineHeight:"20px",offsets:{mt:16,mb:12},size:"14px",children:e.information}),t.jsx(c,{when:T(e.helpArticleLink),children:t.jsx(E,{targetBlank:!0,"data-testid":"learn-more-link",href:e.helpArticleLink,children:t.jsxs(s,{alignItems:"center",children:[t.jsx(i,{neutral700:!0,underline:!0,offsets:{mr:4},size:"14px",weight:500,children:r("feature_controls.learn_more")}),t.jsx(X,{})]})})})]}),t.jsx(c,{when:T(e.videoLink),children:t.jsx(j,{top:16,children:t.jsx(be,{targetBlank:!0,$background:e.videoPlaceholderImage,href:e.videoLink})})})]})]})]})},ye=()=>{const{t:e}=C(),r=Z(a=>a),o=M({mode:"onChange",criteriaMode:"all",defaultValues:_.reduce((a,l)=>(a[l.key]=typeof l.getFeatureState=="function"&&l.getFeatureState(r)||!1,a),{})}),f=R(),{updateCurrentCompany:g}=ee(),x=o.getValues(),{planFeatures:u={}}=L(),y=d.useMemo(()=>_.every(a=>!u[a.key]),[u]),w=a=>{f({type:h.UPDATE_CURRENT_COMPANY_REQUEST,payload:{values:a,skipSuccessMessage:!0}}),re({type:"success",message:e("feature_controls.changes_saved")}),_.forEach(l=>{typeof l.onSave=="function"&&l.onSave(a)}),o.reset(a)},m=!!te(x,o.formState.defaultValues)||g;return t.jsx(W,{...o,children:t.jsx(he,{children:t.jsxs("form",{onSubmit:o.handleSubmit(w),children:[t.jsxs(s,{justifyContent:"space-between",children:[t.jsx(i,{block:!0,neutral500:!0,uppercase:!0,letterSpacing:"0.6px",offsets:{mt:20},size:"16px",weight:500,children:e("feature_controls.available_features")}),t.jsx(c,{when:!y,children:t.jsx(A,{"data-testid":"submit-button",disabled:m,disableStyleType:"transparent",minWidth:"170",offsetType:"clear",opacity:m?"0.3":"1",showSpinner:g,styleType:"brandCTA",type:"submit",children:e("common.save_changes")}
1)})]}),_.map(a=>t.jsx(fe,{feature:a},a.key))]})})})},Ne=()=>{const{userStorage:e,updateUserStorage:r}=ne();return d.useEffect(()=>{e?.skipFeatureControlsRouteNewTag||r({skipFeatureControlsRouteNewTag:!0})},[e,r]),t.jsx(z,{$greyBg:!0,children:t.jsxs(s,{style:{flex:1},children:[t.jsx(ae,{active:"feature_controls"}),t.jsxs(v.RightColumn,{children:[t.jsx(le,{}),t.jsx(ye,{})]})]})})};export{Ne as default};
2//# sourceMappingURL=featureControls-DpdW8btc_bundle.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.