@uniformdev/context-devtools 12.2.1-alpha.177 → 12.2.1-alpha.183
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/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var fe=Object.defineProperty,ye=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var ee=(e,n,a)=>n in e?fe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,i=(e,n)=>{for(var a in n||(n={}))Q.call(n,a)&&ee(e,a,n[a]);if(O)for(var a of O(n))X.call(n,a)&&ee(e,a,n[a]);return e},s=(e,n)=>ye(e,be(n));var w=(e,n)=>{var a={};for(var r in e)Q.call(e,r)&&n.indexOf(r)<0&&(a[r]=e[r]);if(e!=null&&O)for(var r of O(e))n.indexOf(r)<0&&X.call(e,r)&&(a[r]=e[r]);return a};Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";var Ee=require("react"),N=require("formik"),ve=require("yup"),we=require("react-use"),te=require("@uniformdev/context");function ne(e){if(e&&e.__esModule)return e;var n={__proto__:null,[Symbol.toStringTag]:"Module"};return e&&Object.keys(e).forEach(function(a){if(a!=="default"){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}}),n.default=e,Object.freeze(n)}var t=ne(Ee),M=ne(ve);const Ce="_menu_6gnmz_1",Le="_logo_6gnmz_7",Ne="_logo__svg_6gnmz_12",xe="_menu__list_6gnmz_16",ke="_menu__item_6gnmz_25",je="_menu__link_6gnmz_35",He="_menu__icon_6gnmz_51";var x={menu:Ce,logo:Le,logo__svg:Ne,menu__list:xe,menu__item:ke,menu__link:je,"menu__link--active":"_menu__link--active_6gnmz_47",menu__icon:He};const Ie=[{title:"Dimensions",href:"/dimensions",icon:`<svg
|
|
2
2
|
width="24"
|
|
3
3
|
height="24"
|
|
4
4
|
viewBox="0 0 24 24"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
</svg>`},{title:"Settings",href:"/settings",icon:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
34
34
|
<path d="M19.1469 12.716C19.1986 12.2636 19.201 11.8069 19.1539 11.354L21.7429 9.474C21.8681 9.3822 21.9548 9.24723 21.9862 9.0952C22.0176 8.94316 21.9915 8.78489 21.9129 8.651L19.9939 5.399C19.9182 5.26986 19.7985 5.17231 19.6568 5.1242C19.515 5.07608 19.3606 5.08063 19.2219 5.137L16.3599 6.292C15.9237 5.9578 15.4502 5.67525 14.9489 5.45L14.5739 2.545C14.5547 2.39441 14.4813 2.25598 14.3673 2.15566C14.2534 2.05534 14.1068 1.99999 13.9549 2H10.0859C9.93402 1.99997 9.78728 2.05527 9.67317 2.15558C9.55906 2.25588 9.48539 2.39432 9.46595 2.545L9.09395 5.433C8.63957 5.63249 8.20723 5.87882 7.80395 6.168L5.00895 4.954C4.87173 4.89484 4.71787 4.88672 4.57519 4.9311C4.4325 4.97549 4.3104 5.06945 4.23095 5.196L2.22195 8.398C2.1396 8.52998 2.10934 8.68789 2.13707 8.84096C2.1648 8.99403 2.24854 9.1313 2.37195 9.226L4.86795 11.142C4.83172 11.4266 4.81302 11.7131 4.81195 12C4.81195 12.18 4.82095 12.362 4.83795 12.558L2.26495 14.375C2.13766 14.4647 2.04844 14.5987 2.01478 14.7508C1.98112 14.9028 2.00543 15.0619 2.08295 15.197L3.95695 18.474C4.11095 18.742 4.43695 18.857 4.72595 18.746L7.56095 17.644C8.00795 17.997 8.49195 18.294 9.00795 18.53L9.33795 21.396C9.37495 21.709 9.63795 21.946 9.95195 21.95L13.8169 22H13.8249C14.1349 22 14.3989 21.771 14.4439 21.463L14.8549 18.59C15.3703 18.3674 15.8579 18.0855 16.3079 17.75L19.1279 18.93C19.4129 19.05 19.7419 18.944 19.9029 18.679L21.8669 15.452C21.9477 15.319 21.976 15.1608 21.9464 15.0081C21.9168 14.8554 21.8315 14.7192 21.7069 14.626L19.1469 12.716ZM11.9999 15C10.3459 15 8.99995 13.655 8.99995 12C8.99995 10.346 10.3449 9 11.9999 9C13.6539 9 14.9999 10.345 14.9999 12C14.9999 13.654 13.6539 15 11.9999 15Z" fill="white"/>
|
|
35
35
|
</svg>
|
|
36
|
-
`}],Ie=n=>{var e=v(n,[]);const a=l=>{if(l.preventDefault(),l.currentTarget.pathname)return e.saveSettings(s(i({},e.settings),{route:l.currentTarget.pathname}))},r=l=>{var _;const o=x["menu__link--active"];return!((_=e.settings)==null?void 0:_.route)&&l==="/dimensions"||e.settings.route===l?o:""};return t.createElement("nav",{className:x.menu},t.createElement("a",{className:x.logo,href:"/settings",onClick:l=>a(l)},t.createElement("svg",{className:"logo__svg",width:"120",height:"38",viewBox:"0 0 120 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{clipPath:"url(#clip0_41_612)"},t.createElement("path",{d:"M8.82261 3.73315L0 8.82209V18.9999L8.82261 13.911L17.6474 8.82209L8.82261 3.73315Z",fill:"#83C6E1"}),t.createElement("path",{d:"M8.82261 24.089V13.9111L0 19.0001V29.1779L8.82261 34.2669L17.6474 29.1779V19.0001L8.82261 24.089Z",fill:"#438FD5"}),t.createElement("path",{d:"M17.6474 8.82202L8.82263 13.911L17.6474 18.9999V29.1777L26.47 24.0888V13.911L17.6474 8.82202Z",fill:"#F4220B"}),t.createElement("path",{d:"M64.6069 13.9025H67.8036V25.5528H64.6069V13.9025ZM64.4902 8.5415H67.9181V11.7348H64.4902V8.5415ZM72.5153 10.1025V13.9025H70.3691V16.6272H72.5153V25.5528H75.7119V16.6272H78.2774V13.9025H75.7119V11.2684H78.2774V8.5415H75.2213L72.5153 10.1025ZM83.1059 13.7859L80.3999 15.3469V24.1084L83.1059 25.6694H88.0748L90.7808 24.1084V15.3469L88.0748 13.7859H83.1059ZM87.5842 22.9425H83.5943V16.5106H87.5842V22.9425ZM97.4723 14.8611L95.8103 13.9025H94.2779V25.5528H97.4745V16.6272H101.486V13.9025H99.1344L97.4723 14.8611ZM55.713 13.7859L53.8499 14.8611L51.9847 13.7859H50.7289V25.5528H53.9256V16.5106H57.9133V25.5528H61.1099V15.3469L58.4039 13.7859H55.713ZM44.0353 22.9425H40.0454V13.9025H36.851V24.1084L39.557 25.6694H42.3753L44.0309 24.7129L44.0331 24.7151L44.0353 24.7129V24.7151L45.6887 25.6694H47.2297V13.9025H44.0353V22.9425ZM117.51 13.7859H115.271L113.079 15.0425L110.909 13.7859H108.67L107.015 14.7402L105.359 13.7859H103.818V25.5528H107.015V16.5106H110.421V25.5528H113.615V16.5106H117.022V25.5528H120.216V15.3469L117.51 13.7859Z",fill:"white"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_41_612"},t.createElement("rect",{width:"120",height:"38",fill:"white"}))))),t.createElement("ul",{className:x.menu__list},He.map((l,o)=>t.createElement("li",{className:x.menu__item,key:o},t.createElement("a",{className:`${x.menu__link} ${r(l.href)}`,href:l.href,title:l.title,onClick:_=>a(_)},t.createElement("i",{className:x.menu__icon,dangerouslySetInnerHTML:{__html:l.icon}}),l.title)))))},Ve=()=>t.createElement("article",null,t.createElement("h1",null,"Something when wrong"),t.createElement("p",null,"We could not find the page you're looking for.")),$e="_accordion_1y4mw_1",Me="_accordion__content_1y4mw_2",Te="_accordion__title_1y4mw_6",Ue="_accordion__btn_1y4mw_12",Se="_accordion__icon_1y4mw_24";var H={accordion:$e,accordion__content:Me,accordion__title:Te,accordion__btn:Ue,accordion__icon:Se,"accordion__icon--active":"_accordion__icon--active_1y4mw_28"};const ae=({children:e})=>t.createElement("div",{className:H.accordion},e),oe=({title:e,children:n})=>{const[a,r]=t.useState(!1),l=e.split(" ").join("-").toLocaleLowerCase();return t.createElement(t.Fragment,null,t.createElement("h3",{className:`${H.accordion__title}`},t.createElement("button",{"aria-expanded":a,className:H.accordion__btn,title:e,id:l,"aria-controls":`${l}-section`,onClick:()=>r(o=>!o),type:"button"},e,t.createElement("i",{className:`${H.accordion__icon} ${a?H["accordion__icon--active"]:""}`},t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z",fill:"currentColor"}))))),t.createElement("div",{id:`${l}-section`,className:`${H.accordion__content}`,role:"region","aria-labelledby":l},a?n:null))},Pe="_btn_15bw2_1";var re={btn:Pe,"btn--primary":"_btn--primary_15bw2_15","btn--secondary":"_btn--secondary_15bw2_19","btn--unimportant":"_btn--unimportant_15bw2_22","btn--ghost":"_btn--ghost_15bw2_26"};const A=l=>{var o=l,{buttonType:e="primary",children:n,className:a}=o,r=v(o,["buttonType","children","className"]);return t.createElement(t.Fragment,null,t.createElement("button",i({type:"button",className:`${re.btn} ${re[`btn--${e}`]}${a?` ${a}`:""}`},r),n))},Oe="_cta_ddty5_1",Ae="_cta__title_ddty5_17",De="_cta__text_ddty5_24",ze="_cta__close_ddty5_30";var w={cta:Oe,"cta--with-icon":"_cta--with-icon_ddty5_12",cta__title:Ae,cta__text:De,cta__close:ze,"cta__btn-group":"_cta__btn-group_ddty5_50"};const le=({title:e,text:n,buttonGroup:a,children:r})=>t.createElement("div",{className:`${w.cta}`},t.createElement("h2",{className:`${w.cta__title}`},e),t.createElement("p",{className:`${w.cta__text}`},n),r,a?t.createElement("div",{className:`${w["cta__btn-group"]}`},a):null);var D={"input-switch":"_input-switch_13lsn_1","input-switch__label":"_input-switch__label_13lsn_8","input-switch__control":"_input-switch__control_13lsn_13","input-switch__checkbox":"_input-switch__checkbox_13lsn_17","input-switch__btn":"_input-switch__btn_13lsn_25"};const Ze=a=>{var r=a,{label:e}=r,n=v(r,["label"]);return t.createElement("label",{className:D["input-switch"]},t.createElement("span",{className:D["input-switch__label"]},e),t.createElement("input",i({type:"checkbox",className:D["input-switch__checkbox"]},n)),t.createElement("span",{className:D["input-switch__btn"]}))},qe="_table_fo951_1",Re="_table__head_fo951_8",Be="_table__body_fo951_13",Fe="_table__row_fo951_16",Ke="_table__heading_fo951_19",Ge="_table__data_fo951_32";var C={table:qe,table__head:Re,table__body:Be,table__row:Fe,table__heading:Ke,table__data:Ge,"table__data--left":"_table__data--left_fo951_39","table__data--right":"_table__data--right_fo951_43","table__data--center":"_table__data--center_fo951_47","table__data--light":"_table__data--light_fo951_51","table__data--dark":"_table__data--dark_fo951_55","t-border-bottom":"_t-border-bottom_fo951_59","t-border-left":"_t-border-left_fo951_63"};const K=({children:e})=>t.createElement("table",{className:C.table},e),Je=({children:e})=>t.createElement("thead",{className:C.table__head},e),G=({children:e})=>t.createElement("tbody",{className:C.table__body},e),z=({border:e,children:n})=>t.createElement("tr",{className:`${C.table__row} ${e?C[`t-border-${e}`]:""}`},n),ie=({children:e})=>t.createElement("th",{className:C.table__heading},e),k=({alignment:e="left",border:n,color:a="dark",children:r})=>t.createElement("td",{className:`${C.table__data} ${C[`table__data--${e}`]} ${C[`table__data--${a}`]} ${n?C[`t-border-${n}`]:""}`},r),We="_page_1ntvl_1",Ye="_page__title_1ntvl_5",Qe="_divider_1ntvl_24",Xe="_submitButton_1ntvl_43",et="_popIn_1ntvl_1",tt="_error_1ntvl_50";var L={page:We,page__title:Ye,"page__heading-group":"_page__heading-group_1ntvl_17",divider:Qe,submitButton:Xe,popIn:et,error:tt};const nt=({dimensionIndex:{index:e},state:{scores:n,data:a},actions:r})=>{const l=t.useMemo(()=>Object.keys(e).filter(c=>!n[c]).map(c=>{var p;return(p=e[c])!=null?p:{name:c,dim:c,type:"Unknown"}}),[n,e]),o=Object.keys(n).length,_=o+l.length,u=()=>{r.rawUpdate([{type:"setcontrol",data:!a.controlGroup}])};return t.createElement(t.Fragment,null,t.createElement("article",{className:L.page},t.createElement("div",{className:L["page__heading-group"]},t.createElement("h2",{className:L.page__title},"Dimensions",t.createElement("small",null,o," active of ",_)),t.createElement(Ze,{label:"Control Group",onChange:u,checked:a.controlGroup})),o>0?t.createElement(K,null,t.createElement(G,null,Object.entries(n).map(([c,p],b)=>{var h;const{name:m,type:d,category:E}=(h=e==null?void 0:e[c])!=null?h:{name:c,dim:c,type:"Unknown"};return t.createElement(z,{key:b},t.createElement(k,null,t.createElement("b",null,p)),t.createElement(k,null,t.createElement("span",{className:L.divider,role:"presentation"}),t.createElement("strong",null,E?`${E}:`:""," ",m)),t.createElement(k,{alignment:"right",color:"light"},d))}))):t.createElement(le,{title:a.controlGroup?"In control group":"No active dimensions",text:a.controlGroup?"You are part of the personalization control group. While in the control group you do not have dimension scores and will not see personalized content. A/B tests will still run.":"You do not have score in any dimensions yet.",buttonGroup:a.controlGroup?t.createElement(A,{buttonType:"secondary",onClick:u},"Exit control group"):null}),t.createElement(ae,null,t.createElement(oe,{title:"Inactive Dimensions"},t.createElement(K,null,t.createElement(G,null,l.map(({dim:c,type:p,name:b,category:m})=>t.createElement(z,{key:c},t.createElement(k,null,t.createElement("strong",null,m?`${m}:`:""," ",b)),t.createElement(k,{alignment:"right",color:"light"},p)))))))))},at=n=>{var e=v(n,[]);const{state:{data:a}}=e;return t.createElement(t.Fragment,null,t.createElement("article",{className:L.page},t.createElement("h1",{className:L.page__title},"Quirks"),t.createElement("p",null,"Microcopy here is TBD"),Object.keys(a.quirks).length?t.createElement(K,null,t.createElement(Je,null,t.createElement(z,null,t.createElement(ie,null,"Key"),t.createElement(ie,null,"Value"))),t.createElement(G,null,Object.entries(a.quirks).map(([r,l],o)=>t.createElement(z,{key:o,border:"bottom"},t.createElement(k,null,t.createElement("strong",null,r)),t.createElement(k,null,l))))):t.createElement(le,{title:"No quirks configured",text:"There are currently no quirks setup."})))};var y={"text-input":"_text-input_14cgg_1","select-input":"_select-input_14cgg_9","input-wrapper":"_input-wrapper_14cgg_18","input-label":"_input-label_14cgg_22","input-text":"_input-text_14cgg_29","input-caption":"_input-caption_14cgg_36","error-msg":"_error-msg_14cgg_41"};const J=l=>{var o=l,{field:e,form:n,meta:a}=o,r=v(o,["field","form","meta"]);const p=r,{label:_,caption:u}=p,c=v(p,["label","caption"]);return t.createElement("div",{className:y["input-wrapper"]},t.createElement("label",{className:y["input-label"]},t.createElement("span",{className:y["input-text"]},_),t.createElement("input",i(i({type:"text",className:y["text-input"]},e),c))),u?t.createElement("span",{className:y["input-caption"]},u):null,t.createElement(N.ErrorMessage,{component:"div",className:y["error-msg"],name:e.name}))},ot=l=>{var o=l,{field:e,form:n,meta:a}=o,r=v(o,["field","form","meta"]);const b=r,{label:_,options:u,caption:c}=b,p=v(b,["label","options","caption"]);return t.createElement("div",{className:y["input-wrapper"]},t.createElement("label",{className:y["input-label"]},t.createElement("span",{className:y["input-text"]},_),t.createElement("select",s(i(i({},e),p),{className:y["select-input"]}),u.map((m,d)=>t.createElement("option",{value:m.value,key:d},m.text)))),c?t.createElement("span",{className:y["input-caption"]},c):null,t.createElement(N.ErrorMessage,{component:"div",className:y["error-msg"],name:e.name}))},rt=M.object({apiKey:M.string().matches(/^uf.+$/,"API keys start with `uf`, double check your API key"),apiHost:M.string().matches(/^https:\/\/(localhost:8889|([a-z]+\.)?uniform.app)$/,"API host must be a Uniform domain."),logLevel:M.string(),projectId:M.string().uuid()}),lt=({settings:e,saveSettings:n,dimensionIndex:{error:a,loading:r}})=>{const l=[{value:"none",text:"Logging off"},{value:"info",text:"Log info, warnings, and errors"},{value:"warn",text:"Log warnings and errors"},{value:"error",text:"Log errors"},{value:"debug",text:"Verbose debug logging"}];return t.createElement(N.Formik,{initialValues:i({apiHost:"",apiKey:"",projectId:"",logLevel:"none"},e),validationSchema:rt,enableReinitialize:!0,onSubmit:o=>{n(s(i({},e),{apiHost:o.apiHost,apiKey:o.apiKey,projectId:o.projectId,logLevel:o.logLevel}))}},({dirty:o,isValid:_})=>t.createElement(N.Form,{className:L.page},t.createElement("h1",{className:L.page__title},"Settings"),t.createElement(N.Field,{component:ot,label:"Logging",caption:"Logs can be viewed in the browser console",id:"logging",name:"logLevel",options:l}),t.createElement("fieldset",null,t.createElement("legend",null,"Data Connection"),!r&&a?t.createElement("p",{className:L.error},"Unable to fetch data from Uniform",t.createElement("br",null),t.createElement("em",null,a.message)):null,t.createElement("p",null,t.createElement("small",null,"Adding an API key and project ID enables richer dimension data to be shown. You must have access to the Uniform project to do this.")),t.createElement(N.Field,{component:J,label:"Uniform API key",caption:"Generate an API key in your Uniform team settings. Grant only Context: Read Drafts permission.",id:"api-key",name:"apiKey",autoComplete:"off"}),t.createElement(N.Field,{component:J,label:"Uniform Project ID",caption:"Available after generating an API key ",id:"project-id",name:"projectId",autoComplete:"off"}),t.createElement(ae,null,t.createElement(oe,{title:"Advanced"},t.createElement(N.Field,{component:J,label:"Alternative API Host",caption:"Use a non-standard Uniform API endpoint. Most people will not not need this option.",id:"api-host",name:"apiHost",autoComplete:"off"}))),o?t.createElement(A,{type:"submit",className:L.submitButton,disabled:!_},"Save"):null)))},it=({settings:e,saveSettings:n})=>{const a=()=>{n(s(i({},e),{route:"/settings"}))},r=()=>{n(s(i({},e),{ignoreApiKeyPrompt:!0}))},l=!(e==null?void 0:e.apiKey);return!e.ignoreApiKeyPrompt&&l?t.createElement("div",{className:`${w.cta} ${w["cta--with-icon"]}`},t.createElement("h2",{className:`${w.cta__title}`},"Connect this site"),t.createElement("p",{className:`${w.cta__text}`},"Add a Uniform API key to get better data."),t.createElement("div",{className:`${w["cta__btn-group"]}`},t.createElement(A,{buttonType:"secondary",onClick:a},"Connect this site"),t.createElement(A,{buttonType:"ghost",onClick:r},"Skip for now")),t.createElement("button",{type:"button",className:`${w.cta__close}`,title:"close",onClick:r},t.createElement("span",{hidden:!0},"Close"))):null};const st="_layout_1hzp7_64",ct="_layout__main_1hzp7_84",_t="_scrollbar_1hzp7_91";var Z={layout:st,"layout--browser-ext":"_layout--browser-ext_1hzp7_75",layout__main:ct,scrollbar:_t},ut=Object.defineProperty,mt=(e,n,a)=>n in e?ut(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,a)=>(typeof require!="undefined"?require:n)[a]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var pt=(e,n)=>()=>(e&&(n=e(e=0)),n),dt=(e,n,a)=>(mt(e,typeof n!="symbol"?n+"":n,a),a),ht=(e,n,a)=>{if(!n.has(e))throw TypeError("Cannot "+a)},g=(e,n,a)=>(ht(e,n,"read from private field"),a?a.call(e):n.get(e)),j=(e,n,a)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,a)},f=pt(()=>{});f();var se="_";f();var gt=async e=>await e(),ce=class extends Error{constructor(e,n,a,r,l){super(`${e}
|
|
37
|
-
${r}${l?" "+l:""} (${n} ${a})`);this.errorMessage=e,this.fetchMethod=n,this.fetchUri=a,this.statusCode=r,this.statusText=l,Object.setPrototypeOf(this,
|
|
36
|
+
`}],Ve=n=>{var e=w(n,[]);const a=l=>{if(l.preventDefault(),l.currentTarget.pathname)return e.saveSettings(s(i({},e.settings),{route:l.currentTarget.pathname}))},r=l=>{var _;const o=x["menu__link--active"];return!((_=e.settings)==null?void 0:_.route)&&l==="/dimensions"||e.settings.route===l?o:""};return t.createElement("nav",{className:x.menu},t.createElement("a",{className:x.logo,href:"/settings",onClick:l=>a(l)},t.createElement("svg",{className:"logo__svg",width:"120",height:"38",viewBox:"0 0 120 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{clipPath:"url(#clip0_41_612)"},t.createElement("path",{d:"M8.82261 3.73315L0 8.82209V18.9999L8.82261 13.911L17.6474 8.82209L8.82261 3.73315Z",fill:"#83C6E1"}),t.createElement("path",{d:"M8.82261 24.089V13.9111L0 19.0001V29.1779L8.82261 34.2669L17.6474 29.1779V19.0001L8.82261 24.089Z",fill:"#438FD5"}),t.createElement("path",{d:"M17.6474 8.82202L8.82263 13.911L17.6474 18.9999V29.1777L26.47 24.0888V13.911L17.6474 8.82202Z",fill:"#F4220B"}),t.createElement("path",{d:"M64.6069 13.9025H67.8036V25.5528H64.6069V13.9025ZM64.4902 8.5415H67.9181V11.7348H64.4902V8.5415ZM72.5153 10.1025V13.9025H70.3691V16.6272H72.5153V25.5528H75.7119V16.6272H78.2774V13.9025H75.7119V11.2684H78.2774V8.5415H75.2213L72.5153 10.1025ZM83.1059 13.7859L80.3999 15.3469V24.1084L83.1059 25.6694H88.0748L90.7808 24.1084V15.3469L88.0748 13.7859H83.1059ZM87.5842 22.9425H83.5943V16.5106H87.5842V22.9425ZM97.4723 14.8611L95.8103 13.9025H94.2779V25.5528H97.4745V16.6272H101.486V13.9025H99.1344L97.4723 14.8611ZM55.713 13.7859L53.8499 14.8611L51.9847 13.7859H50.7289V25.5528H53.9256V16.5106H57.9133V25.5528H61.1099V15.3469L58.4039 13.7859H55.713ZM44.0353 22.9425H40.0454V13.9025H36.851V24.1084L39.557 25.6694H42.3753L44.0309 24.7129L44.0331 24.7151L44.0353 24.7129V24.7151L45.6887 25.6694H47.2297V13.9025H44.0353V22.9425ZM117.51 13.7859H115.271L113.079 15.0425L110.909 13.7859H108.67L107.015 14.7402L105.359 13.7859H103.818V25.5528H107.015V16.5106H110.421V25.5528H113.615V16.5106H117.022V25.5528H120.216V15.3469L117.51 13.7859Z",fill:"white"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_41_612"},t.createElement("rect",{width:"120",height:"38",fill:"white"}))))),t.createElement("ul",{className:x.menu__list},Ie.map((l,o)=>t.createElement("li",{className:x.menu__item,key:o},t.createElement("a",{className:`${x.menu__link} ${r(l.href)}`,href:l.href,title:l.title,onClick:_=>a(_)},t.createElement("i",{className:x.menu__icon,dangerouslySetInnerHTML:{__html:l.icon}}),l.title)))))},$e=()=>t.createElement("article",null,t.createElement("h1",null,"Something when wrong"),t.createElement("p",null,"We could not find the page you're looking for.")),Me="_accordion_1y4mw_1",Te="_accordion__content_1y4mw_2",Ue="_accordion__title_1y4mw_6",Se="_accordion__btn_1y4mw_12",Pe="_accordion__icon_1y4mw_24";var H={accordion:Me,accordion__content:Te,accordion__title:Ue,accordion__btn:Se,accordion__icon:Pe,"accordion__icon--active":"_accordion__icon--active_1y4mw_28"};const ae=({children:e})=>t.createElement("div",{className:H.accordion},e),re=({title:e,children:n})=>{const[a,r]=t.useState(!1),l=e.split(" ").join("-").toLocaleLowerCase();return t.createElement(t.Fragment,null,t.createElement("h3",{className:`${H.accordion__title}`},t.createElement("button",{"aria-expanded":a,className:H.accordion__btn,title:e,id:l,"aria-controls":`${l}-section`,onClick:()=>r(o=>!o),type:"button"},e,t.createElement("i",{className:`${H.accordion__icon} ${a?H["accordion__icon--active"]:""}`},t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z",fill:"currentColor"}))))),t.createElement("div",{id:`${l}-section`,className:`${H.accordion__content}`,role:"region","aria-labelledby":l},a?n:null))},Oe="_btn_15bw2_1";var oe={btn:Oe,"btn--primary":"_btn--primary_15bw2_15","btn--secondary":"_btn--secondary_15bw2_19","btn--unimportant":"_btn--unimportant_15bw2_22","btn--ghost":"_btn--ghost_15bw2_26"};const A=l=>{var o=l,{buttonType:e="primary",children:n,className:a}=o,r=w(o,["buttonType","children","className"]);return t.createElement(t.Fragment,null,t.createElement("button",i({type:"button",className:`${oe.btn} ${oe[`btn--${e}`]}${a?` ${a}`:""}`},r),n))},Ae="_cta_ddty5_1",ze="_cta__title_ddty5_17",De="_cta__text_ddty5_24",Ze="_cta__close_ddty5_30";var C={cta:Ae,"cta--with-icon":"_cta--with-icon_ddty5_12",cta__title:ze,cta__text:De,cta__close:Ze,"cta__btn-group":"_cta__btn-group_ddty5_50"};const le=({title:e,text:n,buttonGroup:a,children:r})=>t.createElement("div",{className:`${C.cta}`},t.createElement("h2",{className:`${C.cta__title}`},e),t.createElement("p",{className:`${C.cta__text}`},n),r,a?t.createElement("div",{className:`${C["cta__btn-group"]}`},a):null);var z={"input-switch":"_input-switch_13lsn_1","input-switch__label":"_input-switch__label_13lsn_8","input-switch__control":"_input-switch__control_13lsn_13","input-switch__checkbox":"_input-switch__checkbox_13lsn_17","input-switch__btn":"_input-switch__btn_13lsn_25"};const qe=a=>{var r=a,{label:e}=r,n=w(r,["label"]);return t.createElement("label",{className:z["input-switch"]},t.createElement("span",{className:z["input-switch__label"]},e),t.createElement("input",i({type:"checkbox",className:z["input-switch__checkbox"]},n)),t.createElement("span",{className:z["input-switch__btn"]}))},Re="_table_fo951_1",Fe="_table__head_fo951_8",Ke="_table__body_fo951_13",Be="_table__row_fo951_16",Ge="_table__heading_fo951_19",Je="_table__data_fo951_32";var L={table:Re,table__head:Fe,table__body:Ke,table__row:Be,table__heading:Ge,table__data:Je,"table__data--left":"_table__data--left_fo951_39","table__data--right":"_table__data--right_fo951_43","table__data--center":"_table__data--center_fo951_47","table__data--light":"_table__data--light_fo951_51","table__data--dark":"_table__data--dark_fo951_55","t-border-bottom":"_t-border-bottom_fo951_59","t-border-left":"_t-border-left_fo951_63"};const B=({children:e})=>t.createElement("table",{className:L.table},e),We=({children:e})=>t.createElement("thead",{className:L.table__head},e),G=({children:e})=>t.createElement("tbody",{className:L.table__body},e),D=({border:e,children:n})=>t.createElement("tr",{className:`${L.table__row} ${e?L[`t-border-${e}`]:""}`},n),ie=({children:e})=>t.createElement("th",{className:L.table__heading},e),k=({alignment:e="left",border:n,color:a="dark",children:r})=>t.createElement("td",{className:`${L.table__data} ${L[`table__data--${e}`]} ${L[`table__data--${a}`]} ${n?L[`t-border-${n}`]:""}`},r),Ye="_page_1ay01_1",Qe="_page__text_1ay01_5",Xe="_page__title_1ay01_10",et="_divider_1ay01_29",tt="_popIn_1ay01_1",nt="_error_1ay01_55";var y={page:Ye,page__text:Qe,page__title:Xe,"page__heading-group":"_page__heading-group_1ay01_22",divider:et,"submit-btn":"_submit-btn_1ay01_48",popIn:tt,error:nt};const at=({dimensionIndex:{index:e},state:{scores:n,data:a},actions:r})=>{const l=t.useMemo(()=>Object.keys(e).filter(c=>!n[c]).map(c=>{var p;return(p=e[c])!=null?p:{name:c,dim:c,type:"Unknown"}}),[n,e]),o=Object.keys(n).length,_=o+l.length,m=()=>{r.rawUpdate([{type:"setcontrol",data:!a.controlGroup}])};return t.createElement(t.Fragment,null,t.createElement("article",{className:y.page},t.createElement("div",{className:y["page__heading-group"]},t.createElement("h2",{className:y.page__title},"Dimensions",t.createElement("small",null,o," active of ",_)),t.createElement(qe,{label:"Control Group",onChange:m,checked:a.controlGroup})),o>0?t.createElement(B,null,t.createElement(G,null,Object.entries(n).map(([c,p],f)=>{var h;const{name:u,type:d,category:v}=(h=e==null?void 0:e[c])!=null?h:{name:c,dim:c,type:"Unknown"};return t.createElement(D,{key:f},t.createElement(k,null,t.createElement("b",null,p)),t.createElement(k,null,t.createElement("span",{className:y.divider,role:"presentation"}),t.createElement("strong",null,v?`${v}:`:""," ",u)),t.createElement(k,{alignment:"right",color:"light"},d))}))):t.createElement(le,{title:a.controlGroup?"In control group":"No active dimensions",text:a.controlGroup?"You are part of the personalization control group. While in the control group you do not have dimension scores and will not see personalized content. A/B tests will still run.":"You do not have score in any dimensions yet.",buttonGroup:a.controlGroup?t.createElement(A,{buttonType:"secondary",onClick:m},"Exit control group"):null}),t.createElement(ae,null,t.createElement(re,{title:"Inactive Dimensions"},t.createElement(B,null,t.createElement(G,null,l.map(({dim:c,type:p,name:f,category:u})=>t.createElement(D,{key:c},t.createElement(k,null,t.createElement("strong",null,u?`${u}:`:""," ",f)),t.createElement(k,{alignment:"right",color:"light"},p)))))))))},rt=n=>{var e=w(n,[]);const{state:{data:a}}=e;return t.createElement(t.Fragment,null,t.createElement("article",{className:y.page},t.createElement("h1",{className:y.page__title},"Quirks"),t.createElement("p",{className:y.page__text},"Keys defined in Uniform and their current, programmatically defined values for this visit."),Object.keys(a.quirks).length?t.createElement(B,null,t.createElement(We,null,t.createElement(D,null,t.createElement(ie,null,"Key"),t.createElement(ie,null,"Value"))),t.createElement(G,null,Object.entries(a.quirks).map(([r,l],o)=>t.createElement(D,{key:o,border:"bottom"},t.createElement(k,null,t.createElement("strong",null,r)),t.createElement(k,null,l))))):t.createElement(le,{title:"No quirks configured",text:"There are currently no quirks setup."})))};var b={"text-input":"_text-input_1svz8_1","select-input":"_select-input_1svz8_9","input-wrapper":"_input-wrapper_1svz8_24","input-label":"_input-label_1svz8_28","input-text":"_input-text_1svz8_35","input-caption":"_input-caption_1svz8_42","error-msg":"_error-msg_1svz8_47"};const J=l=>{var o=l,{field:e,form:n,meta:a}=o,r=w(o,["field","form","meta"]);const p=r,{label:_,caption:m}=p,c=w(p,["label","caption"]);return t.createElement("div",{className:b["input-wrapper"]},t.createElement("label",{className:b["input-label"]},t.createElement("span",{className:b["input-text"]},_),t.createElement("input",i(i({type:"text",className:b["text-input"]},e),c))),m?t.createElement("span",{className:b["input-caption"]},m):null,t.createElement(N.ErrorMessage,{component:"div",className:b["error-msg"],name:e.name}))},ot=l=>{var o=l,{field:e,form:n,meta:a}=o,r=w(o,["field","form","meta"]);const f=r,{label:_,options:m,caption:c}=f,p=w(f,["label","options","caption"]);return t.createElement("div",{className:b["input-wrapper"]},t.createElement("label",{className:b["input-label"]},t.createElement("span",{className:b["input-text"]},_),t.createElement("select",s(i(i({},e),p),{className:b["select-input"]}),m.map((u,d)=>t.createElement("option",{value:u.value,key:d},u.text)))),c?t.createElement("span",{className:b["input-caption"]},c):null,t.createElement(N.ErrorMessage,{component:"div",className:b["error-msg"],name:e.name}))},lt="_form_1dp40_1",it="_form__fieldset_1dp40_8",st="_form__legend_1dp40_13";var se={form:lt,form__fieldset:it,form__legend:st};const ct=a=>{var r=a,{children:e}=r,n=w(r,["children"]);return t.createElement("fieldset",i({className:se.form__fieldset},n),e)},_t=({children:e})=>t.createElement("legend",{className:se.form__legend},e),mt=M.object({apiKey:M.string().matches(/^uf.+$/,"API keys start with `uf`, double check your API key"),apiHost:M.string().matches(/^https:\/\/(localhost:8889|([a-z]+\.)?uniform.app)$/,"API host must be a Uniform domain."),logLevel:M.string(),projectId:M.string().uuid()}),ut=({settings:e,saveSettings:n,dimensionIndex:{error:a,loading:r}})=>{const l=[{value:"none",text:"Logging off"},{value:"info",text:"Log info, warnings, and errors"},{value:"warn",text:"Log warnings and errors"},{value:"error",text:"Log errors"},{value:"debug",text:"Verbose debug logging"}];return t.createElement(N.Formik,{initialValues:i({apiHost:"",apiKey:"",projectId:"",logLevel:"none"},e),validationSchema:mt,enableReinitialize:!0,onSubmit:o=>{n(s(i({},e),{apiHost:o.apiHost,apiKey:o.apiKey,projectId:o.projectId,logLevel:o.logLevel}))}},({dirty:o,isValid:_,isSubmitting:m})=>t.createElement(N.Form,{className:y.page},t.createElement("h1",{className:y.page__title},"Settings"),t.createElement(N.Field,{component:ot,label:"Logging",caption:"Logs can be viewed in the browser console",id:"logging",name:"logLevel",options:l,disabled:m}),t.createElement(ct,{disabled:m},t.createElement(_t,null,"Data Connection"),!r&&a?t.createElement("p",{className:y.error},"Unable to fetch data from Uniform",t.createElement("br",null),t.createElement("em",null,a.message)):null,t.createElement("p",{className:y.page__text},t.createElement("small",null,"Adding an API key and project ID enables richer dimension data to be shown. You must have access to the Uniform project to do this.")),t.createElement(N.Field,{component:J,label:"Uniform API key",caption:"Generate an API key in your Uniform team settings. Grant only Context: Read Drafts permission.",id:"api-key",name:"apiKey",autoComplete:"off"}),t.createElement(N.Field,{component:J,label:"Uniform Project ID",caption:"Available after generating an API key ",id:"project-id",name:"projectId",autoComplete:"off"}),t.createElement(ae,null,t.createElement(re,{title:"Advanced"},t.createElement(N.Field,{component:J,label:"Alternative API Host",caption:"Use a non-standard Uniform API endpoint. Most people will not not need this option.",id:"api-host",name:"apiHost",autoComplete:"off"}))),o?t.createElement(A,{type:"submit",className:y["submit-btn"],disabled:!_},"Save"):null)))},pt=({settings:e,saveSettings:n})=>{const a=()=>{n(s(i({},e),{route:"/settings"}))},r=()=>{n(s(i({},e),{ignoreApiKeyPrompt:!0}))},l=!(e==null?void 0:e.apiKey);return!e.ignoreApiKeyPrompt&&l?t.createElement("div",{className:`${C.cta} ${C["cta--with-icon"]}`},t.createElement("h2",{className:`${C.cta__title}`},"Connect this site"),t.createElement("p",{className:`${C.cta__text}`},"Add a Uniform API key to get better data."),t.createElement("div",{className:`${C["cta__btn-group"]}`},t.createElement(A,{buttonType:"secondary",onClick:a},"Connect this site"),t.createElement(A,{buttonType:"ghost",onClick:r},"Skip for now")),t.createElement("button",{type:"button",className:`${C.cta__close}`,title:"close",onClick:r},t.createElement("span",{hidden:!0},"Close"))):null};const dt="_layout_nno34_64",ht="_layout__main_nno34_84",gt="_scrollbar_nno34_91";var Z={layout:dt,"layout--browser-ext":"_layout--browser-ext_nno34_75",layout__main:ht,scrollbar:gt},ft=Object.defineProperty,yt=(e,n,a)=>n in e?ft(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,a)=>(typeof require!="undefined"?require:n)[a]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var bt=(e,n)=>()=>(e&&(n=e(e=0)),n),Et=(e,n,a)=>(yt(e,typeof n!="symbol"?n+"":n,a),a),vt=(e,n,a)=>{if(!n.has(e))throw TypeError("Cannot "+a)},g=(e,n,a)=>(vt(e,n,"read from private field"),a?a.call(e):n.get(e)),j=(e,n,a)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,a)},E=bt(()=>{});E();var ce="_";E();var wt=async e=>await e(),_e=class extends Error{constructor(e,n,a,r,l){super(`${e}
|
|
37
|
+
${r}${l?" "+l:""} (${n} ${a})`);this.errorMessage=e,this.fetchMethod=n,this.fetchUri=a,this.statusCode=r,this.statusText=l,Object.setPrototypeOf(this,_e.prototype)}};E();E();var I=class{constructor(e){Et(this,"options");var n,a,r,l,o,_;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options=s(i({},e),{fetch:(n=e.fetch)!=null?n:fetch,apiHost:(a=e.apiHost)!=null?a:"https://uniform.app",apiKey:(r=e.apiKey)!=null?r:null,projectId:(l=e.projectId)!=null?l:null,bearerToken:(o=e.bearerToken)!=null?o:null,limitPolicy:(_=e.limitPolicy)!=null?_:wt})}async apiClient(e,n){return this.options.limitPolicy(async()=>{var a;let r=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},l=await fetch(e.toString(),s(i({},n),{headers:i(i({},n==null?void 0:n.headers),r)}));if(!l.ok){let o="";try{let _=await l.text();try{let m=JSON.parse(_);m.errorMessage?o=Array.isArray(m.errorMessage)?m.errorMessage.join(", "):m.errorMessage:o=_}catch{o=_}}catch{o="General error"}throw new _e(o,(a=n==null?void 0:n.method)!=null?a:"GET",e.toString(),l.status)}return(n==null?void 0:n.expectNoContent)?null:await l.json()})}createUrl(e,n){let a=new URL(`${this.options.apiHost}${e}`);return Object.entries(n!=null?n:{}).forEach(([r,l])=>{var o;typeof l!="undefined"&&l!==null&&a.searchParams.append(r,(o=l==null?void 0:l.toString())!=null?o:"")}),a}},T,q=class extends I{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,a=this.createUrl(g(q,T),s(i({},e),{projectId:n}));return await this.apiClient(a)}async upsert(e){let n=this.createUrl(g(q,T));await this.apiClient(n,{method:"PUT",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}async remove(e){let n=this.createUrl(g(q,T));await this.apiClient(n,{method:"DELETE",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}},Ct=q;T=new WeakMap,j(Ct,T,"/api/v2/aggregate");E();var U,R,V=class extends I{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,a=this.createUrl(g(V,U),s(i({},e),{projectId:n}));return await this.apiClient(a)}async upsertCategory(e){let n=this.createUrl(g(V,U));await this.apiClient(n,{method:"PUT",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}async removeCategory(e){let n=this.createUrl(g(V,U));await this.apiClient(n,{method:"DELETE",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}async upsertValue(e){let n=this.createUrl(g(V,R));await this.apiClient(n,{method:"PUT",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}async removeValue(e){let n=this.createUrl(g(V,R));await this.apiClient(n,{method:"DELETE",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}},me=V;U=new WeakMap,R=new WeakMap,j(me,U,"/api/v1/enrichments"),j(me,R,"/api/v1/enrichment-values");E();var W,ue=class extends I{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,a=this.createUrl(g(ue,W),s(i({},e),{projectId:n}));return await this.apiClient(a)}},Lt=ue;W=new WeakMap,j(Lt,W,"/api/v2/manifest");E();var S,F=class extends I{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,a=this.createUrl(g(F,S),s(i({},e),{projectId:n}));return await this.apiClient(a)}async upsert(e){let n=this.createUrl(g(F,S));await this.apiClient(n,{method:"PUT",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}async remove(e){let n=this.createUrl(g(F,S));await this.apiClient(n,{method:"DELETE",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}},Nt=F;S=new WeakMap,j(Nt,S,"/api/v2/quirk");E();var P,K=class extends I{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,a=this.createUrl(g(K,P),s(i({},e),{projectId:n}));return await this.apiClient(a)}async upsert(e){let n=this.createUrl(g(K,P));await this.apiClient(n,{method:"PUT",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}async remove(e){let n=this.createUrl(g(K,P));await this.apiClient(n,{method:"DELETE",body:JSON.stringify(s(i({},e),{projectId:this.options.projectId})),expectNoContent:!0})}},xt=K;P=new WeakMap,j(xt,P,"/api/v2/signal");E();E();E();var Y,pe=class extends I{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,a=this.createUrl(g(pe,Y),s(i({},e),{projectId:n}));return await this.apiClient(a)}},de=pe;Y=new WeakMap,j(de,Y,"/api/v2/dimension");E();function kt(e){let n=e.category==="ENR"?"Enrichment":e.category==="SIG"?"Signal":e.subcategory==="1"?"Intent":e.subcategory==="0"?"Audience":"Aggregate";return{dim:e.dim,name:e.name,type:n,category:e.category==="ENR"?e.subcategory:void 0}}function he(e,n){var a,r,l,o;if((r=(a=n.project.pz)==null?void 0:a.agg)==null?void 0:r[e])return{dim:e,name:e,type:"Aggregate"};if((o=(l=n.project.pz)==null?void 0:l.sig)==null?void 0:o[e])return{dim:e,name:e,type:"Signal"};if(e.indexOf(ce)>=0){let[_,m]=e.split(ce);return{dim:e,name:m,type:"Enrichment",category:_}}}function jt({apiHost:e,apiKey:n,projectId:a},r){const l=t.useMemo(()=>{var p,f,u,d;const c={};return r&&(Object.keys((f=(p=r==null?void 0:r.project.pz)==null?void 0:p.sig)!=null?f:{}).forEach(v=>{const h=he(v,r);h&&(c[v]=h)}),Object.keys((d=(u=r==null?void 0:r.project.pz)==null?void 0:u.agg)!=null?d:{}).forEach(v=>{const h=he(v,r);h&&(c[v]=h)})),c},[r]),{loading:o,error:_,value:m}=we.useAsync(async()=>{if(!n||!a)return l;const p=(await new de({projectId:a,apiKey:n,apiHost:e||void 0}).get()).dimensions,f=i({},l);return p.forEach(u=>{f[u.dim]=kt(u)}),f},[e,n,a,l]);return{loading:o,error:_,index:m!=null?m:l}}function ge(e){const n=typeof chrome!="undefined"&&typeof chrome.storage!="undefined",a=jt(e.settings,e.state.manifest),r=s(i({},e),{dimensionIndex:a}),l=()=>{var o;switch((o=e.settings)==null?void 0:o.route){case void 0:case"/":case"/dimensions":return t.createElement(at,i({},r));case"/quirks":return t.createElement(rt,i({},r));case"/settings":return t.createElement(ut,i({},r));default:return t.createElement($e,null)}};return t.createElement("div",{className:`${Z.layout} ${n?"":Z["layout--browser-ext"]}`},t.createElement(Ve,i({},e)),t.createElement("main",{className:`${Z.layout__main} ${Z.scrollbar}`},t.createElement(pt,i({},e)),l()))}var Ht={"embed-btn":"_embed-btn_1dhzs_1"};const It=n=>{var e=w(n,[]);return t.createElement("button",i({type:"button","data-uniform-dev-tools-version":"2",className:Ht["embed-btn"]},e),t.createElement("span",{hidden:!0},"Uniform devtools"),t.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M13.325 3.05011L8.66741 20.4323L10.5993 20.9499L15.2568 3.56775L13.325 3.05011Z",fill:"currentColor"}),t.createElement("path",{d:"M7.61197 18.3608L8.97136 16.9124L8.97086 16.8933L3.87657 12.1121L8.66699 7.00798L7.20868 5.63928L1.04956 12.2017L7.61197 18.3608Z",fill:"currentColor"}),t.createElement("path",{d:"M16.388 18.3608L15.0286 16.9124L15.0291 16.8933L20.1234 12.1121L15.333 7.00798L16.7913 5.63928L22.9504 12.2017L16.388 18.3608Z",fill:"currentColor"})))};function Vt({context:e,initialSettings:n}){const[a,r]=t.useState(!1),l=e!=null?e:typeof window!="undefined"?window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__:void 0,o=l!=null?l:new te.Context({manifest:{project:{}}}),[_,m]=t.useState({data:o.storage.data,manifest:o.manifest.data,scores:o.scores,personalizations:[],tests:[]}),[c,p]=t.useState(n!=null?n:{});t.useEffect(()=>{var d;const u=te.createDebugConsoleLogDrain((d=c.logLevel)!=null?d:"none");return o.events.on("log",u),()=>{o.events.off("log",u)}},[c,o]),t.useEffect(()=>{const u=()=>{m(h=>s(i({},h),{scores:o.scores,data:o.storage.data,manifest:o.manifest.data}))},d=h=>{!h.changed||m($=>s(i({},$),{personalizations:[...$.personalizations,h]}))},v=h=>{!h.variantAssigned||m($=>s(i({},$),{tests:[...$.tests,h]}))};return o.events.on("personalizationResult",d),o.events.on("testResult",v),o.storage.events.on("*",u),()=>{o.storage.events.off("*",u),o.events.off("personalizationResult",d),o.events.off("testResult",v)}},[o,c]);const f=t.useMemo(()=>({update:d=>o.update(d),forget:()=>o.forget(!1),rawUpdate:d=>o.storage.updateData(d)}),[o]);return l?t.createElement("div",{"data-uniform-dev-tools-version":"2"},t.createElement(It,{onClick:()=>r(u=>!u)}),a?t.createElement(ge,{state:_,actions:f,settings:c,saveSettings:p}):null):t.createElement("p",null,"Unable to find Uniform Context. Ensure the devtools plugin is activated.")}exports.ContextDevTools=ge;exports.EmbeddedContextDevTools=Vt;
|
package/dist/index.mjs
CHANGED
|
@@ -41,7 +41,7 @@ const menu__list = "_menu__list_6gnmz_16";
|
|
|
41
41
|
const menu__item = "_menu__item_6gnmz_25";
|
|
42
42
|
const menu__link = "_menu__link_6gnmz_35";
|
|
43
43
|
const menu__icon = "_menu__icon_6gnmz_51";
|
|
44
|
-
var styles$
|
|
44
|
+
var styles$a = {
|
|
45
45
|
menu,
|
|
46
46
|
logo,
|
|
47
47
|
logo__svg,
|
|
@@ -113,16 +113,16 @@ const Menu = (_a) => {
|
|
|
113
113
|
};
|
|
114
114
|
const isActivePath = (href) => {
|
|
115
115
|
var _a2;
|
|
116
|
-
const cssName = styles$
|
|
116
|
+
const cssName = styles$a["menu__link--active"];
|
|
117
117
|
if (!((_a2 = props.settings) == null ? void 0 : _a2.route) && href === "/dimensions") {
|
|
118
118
|
return cssName;
|
|
119
119
|
}
|
|
120
120
|
return props.settings.route === href ? cssName : "";
|
|
121
121
|
};
|
|
122
122
|
return /* @__PURE__ */ React.createElement("nav", {
|
|
123
|
-
className: styles$
|
|
123
|
+
className: styles$a["menu"]
|
|
124
124
|
}, /* @__PURE__ */ React.createElement("a", {
|
|
125
|
-
className: styles$
|
|
125
|
+
className: styles$a["logo"],
|
|
126
126
|
href: "/settings",
|
|
127
127
|
onClick: (e) => handleLinkClick(e)
|
|
128
128
|
}, /* @__PURE__ */ React.createElement("svg", {
|
|
@@ -153,17 +153,17 @@ const Menu = (_a) => {
|
|
|
153
153
|
height: "38",
|
|
154
154
|
fill: "white"
|
|
155
155
|
}))))), /* @__PURE__ */ React.createElement("ul", {
|
|
156
|
-
className: styles$
|
|
156
|
+
className: styles$a["menu__list"]
|
|
157
157
|
}, links.map((item, index) => /* @__PURE__ */ React.createElement("li", {
|
|
158
|
-
className: styles$
|
|
158
|
+
className: styles$a["menu__item"],
|
|
159
159
|
key: index
|
|
160
160
|
}, /* @__PURE__ */ React.createElement("a", {
|
|
161
|
-
className: `${styles$
|
|
161
|
+
className: `${styles$a["menu__link"]} ${isActivePath(item.href)}`,
|
|
162
162
|
href: item.href,
|
|
163
163
|
title: item.title,
|
|
164
164
|
onClick: (e) => handleLinkClick(e)
|
|
165
165
|
}, /* @__PURE__ */ React.createElement("i", {
|
|
166
|
-
className: styles$
|
|
166
|
+
className: styles$a["menu__icon"],
|
|
167
167
|
dangerouslySetInnerHTML: { __html: item.icon }
|
|
168
168
|
}), item.title)))));
|
|
169
169
|
};
|
|
@@ -175,7 +175,7 @@ const accordion__content = "_accordion__content_1y4mw_2";
|
|
|
175
175
|
const accordion__title = "_accordion__title_1y4mw_6";
|
|
176
176
|
const accordion__btn = "_accordion__btn_1y4mw_12";
|
|
177
177
|
const accordion__icon = "_accordion__icon_1y4mw_24";
|
|
178
|
-
var styles$
|
|
178
|
+
var styles$9 = {
|
|
179
179
|
accordion,
|
|
180
180
|
accordion__content,
|
|
181
181
|
accordion__title,
|
|
@@ -185,24 +185,24 @@ var styles$8 = {
|
|
|
185
185
|
};
|
|
186
186
|
const Accordion = ({ children }) => {
|
|
187
187
|
return /* @__PURE__ */ React.createElement("div", {
|
|
188
|
-
className: styles$
|
|
188
|
+
className: styles$9["accordion"]
|
|
189
189
|
}, children);
|
|
190
190
|
};
|
|
191
191
|
const AccordionItem = ({ title, children }) => {
|
|
192
192
|
const [visibility, setVisibility] = React.useState(false);
|
|
193
193
|
const id = title.split(" ").join("-").toLocaleLowerCase();
|
|
194
194
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h3", {
|
|
195
|
-
className: `${styles$
|
|
195
|
+
className: `${styles$9["accordion__title"]}`
|
|
196
196
|
}, /* @__PURE__ */ React.createElement("button", {
|
|
197
197
|
"aria-expanded": visibility,
|
|
198
|
-
className: styles$
|
|
198
|
+
className: styles$9["accordion__btn"],
|
|
199
199
|
title,
|
|
200
200
|
id,
|
|
201
201
|
"aria-controls": `${id}-section`,
|
|
202
202
|
onClick: () => setVisibility((prev) => !prev),
|
|
203
203
|
type: "button"
|
|
204
204
|
}, title, /* @__PURE__ */ React.createElement("i", {
|
|
205
|
-
className: `${styles$
|
|
205
|
+
className: `${styles$9["accordion__icon"]} ${visibility ? styles$9["accordion__icon--active"] : ""}`
|
|
206
206
|
}, /* @__PURE__ */ React.createElement("svg", {
|
|
207
207
|
width: "24",
|
|
208
208
|
height: "24",
|
|
@@ -214,13 +214,13 @@ const AccordionItem = ({ title, children }) => {
|
|
|
214
214
|
fill: "currentColor"
|
|
215
215
|
}))))), /* @__PURE__ */ React.createElement("div", {
|
|
216
216
|
id: `${id}-section`,
|
|
217
|
-
className: `${styles$
|
|
217
|
+
className: `${styles$9["accordion__content"]}`,
|
|
218
218
|
role: "region",
|
|
219
219
|
"aria-labelledby": id
|
|
220
220
|
}, visibility ? children : null));
|
|
221
221
|
};
|
|
222
222
|
const btn = "_btn_15bw2_1";
|
|
223
|
-
var styles$
|
|
223
|
+
var styles$8 = {
|
|
224
224
|
btn,
|
|
225
225
|
"btn--primary": "_btn--primary_15bw2_15",
|
|
226
226
|
"btn--secondary": "_btn--secondary_15bw2_19",
|
|
@@ -231,14 +231,14 @@ const Button = (_b) => {
|
|
|
231
231
|
var _c = _b, { buttonType = "primary", children, className } = _c, props = __objRest(_c, ["buttonType", "children", "className"]);
|
|
232
232
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("button", __spreadValues({
|
|
233
233
|
type: "button",
|
|
234
|
-
className: `${styles$
|
|
234
|
+
className: `${styles$8.btn} ${styles$8[`btn--${buttonType}`]}${className ? ` ${className}` : ""}`
|
|
235
235
|
}, props), children));
|
|
236
236
|
};
|
|
237
237
|
const cta = "_cta_ddty5_1";
|
|
238
238
|
const cta__title = "_cta__title_ddty5_17";
|
|
239
239
|
const cta__text = "_cta__text_ddty5_24";
|
|
240
240
|
const cta__close = "_cta__close_ddty5_30";
|
|
241
|
-
var styles$
|
|
241
|
+
var styles$7 = {
|
|
242
242
|
cta,
|
|
243
243
|
"cta--with-icon": "_cta--with-icon_ddty5_12",
|
|
244
244
|
cta__title,
|
|
@@ -248,16 +248,16 @@ var styles$6 = {
|
|
|
248
248
|
};
|
|
249
249
|
const NoActiveDimensions = ({ title, text, buttonGroup, children }) => {
|
|
250
250
|
return /* @__PURE__ */ React.createElement("div", {
|
|
251
|
-
className: `${styles$
|
|
251
|
+
className: `${styles$7["cta"]}`
|
|
252
252
|
}, /* @__PURE__ */ React.createElement("h2", {
|
|
253
|
-
className: `${styles$
|
|
253
|
+
className: `${styles$7["cta__title"]}`
|
|
254
254
|
}, title), /* @__PURE__ */ React.createElement("p", {
|
|
255
|
-
className: `${styles$
|
|
255
|
+
className: `${styles$7["cta__text"]}`
|
|
256
256
|
}, text), children, buttonGroup ? /* @__PURE__ */ React.createElement("div", {
|
|
257
|
-
className: `${styles$
|
|
257
|
+
className: `${styles$7["cta__btn-group"]}`
|
|
258
258
|
}, buttonGroup) : null);
|
|
259
259
|
};
|
|
260
|
-
var styles$
|
|
260
|
+
var styles$6 = {
|
|
261
261
|
"input-switch": "_input-switch_13lsn_1",
|
|
262
262
|
"input-switch__label": "_input-switch__label_13lsn_8",
|
|
263
263
|
"input-switch__control": "_input-switch__control_13lsn_13",
|
|
@@ -267,14 +267,14 @@ var styles$5 = {
|
|
|
267
267
|
const SwitchInput = (_d) => {
|
|
268
268
|
var _e = _d, { label } = _e, props = __objRest(_e, ["label"]);
|
|
269
269
|
return /* @__PURE__ */ React.createElement("label", {
|
|
270
|
-
className: styles$
|
|
270
|
+
className: styles$6["input-switch"]
|
|
271
271
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
272
|
-
className: styles$
|
|
272
|
+
className: styles$6["input-switch__label"]
|
|
273
273
|
}, label), /* @__PURE__ */ React.createElement("input", __spreadValues({
|
|
274
274
|
type: "checkbox",
|
|
275
|
-
className: styles$
|
|
275
|
+
className: styles$6["input-switch__checkbox"]
|
|
276
276
|
}, props)), /* @__PURE__ */ React.createElement("span", {
|
|
277
|
-
className: styles$
|
|
277
|
+
className: styles$6["input-switch__btn"]
|
|
278
278
|
}));
|
|
279
279
|
};
|
|
280
280
|
const table = "_table_fo951_1";
|
|
@@ -283,7 +283,7 @@ const table__body = "_table__body_fo951_13";
|
|
|
283
283
|
const table__row = "_table__row_fo951_16";
|
|
284
284
|
const table__heading = "_table__heading_fo951_19";
|
|
285
285
|
const table__data = "_table__data_fo951_32";
|
|
286
|
-
var styles$
|
|
286
|
+
var styles$5 = {
|
|
287
287
|
table,
|
|
288
288
|
table__head,
|
|
289
289
|
table__body,
|
|
@@ -300,46 +300,47 @@ var styles$4 = {
|
|
|
300
300
|
};
|
|
301
301
|
const Table = ({ children }) => {
|
|
302
302
|
return /* @__PURE__ */ React.createElement("table", {
|
|
303
|
-
className: styles$
|
|
303
|
+
className: styles$5["table"]
|
|
304
304
|
}, children);
|
|
305
305
|
};
|
|
306
306
|
const THead = ({ children }) => {
|
|
307
307
|
return /* @__PURE__ */ React.createElement("thead", {
|
|
308
|
-
className: styles$
|
|
308
|
+
className: styles$5["table__head"]
|
|
309
309
|
}, children);
|
|
310
310
|
};
|
|
311
311
|
const TBody = ({ children }) => {
|
|
312
312
|
return /* @__PURE__ */ React.createElement("tbody", {
|
|
313
|
-
className: styles$
|
|
313
|
+
className: styles$5["table__body"]
|
|
314
314
|
}, children);
|
|
315
315
|
};
|
|
316
316
|
const TRow = ({ border, children }) => {
|
|
317
317
|
return /* @__PURE__ */ React.createElement("tr", {
|
|
318
|
-
className: `${styles$
|
|
318
|
+
className: `${styles$5["table__row"]} ${border ? styles$5[`t-border-${border}`] : ""}`
|
|
319
319
|
}, children);
|
|
320
320
|
};
|
|
321
321
|
const THeading = ({ children }) => {
|
|
322
322
|
return /* @__PURE__ */ React.createElement("th", {
|
|
323
|
-
className: styles$
|
|
323
|
+
className: styles$5["table__heading"]
|
|
324
324
|
}, children);
|
|
325
325
|
};
|
|
326
326
|
const TData = ({ alignment = "left", border, color = "dark", children }) => {
|
|
327
327
|
return /* @__PURE__ */ React.createElement("td", {
|
|
328
|
-
className: `${styles$
|
|
328
|
+
className: `${styles$5["table__data"]} ${styles$5[`table__data--${alignment}`]} ${styles$5[`table__data--${color}`]} ${border ? styles$5[`t-border-${border}`] : ""}`
|
|
329
329
|
}, children);
|
|
330
330
|
};
|
|
331
|
-
const page = "
|
|
332
|
-
const
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
const popIn = "
|
|
336
|
-
const error = "
|
|
337
|
-
var styles$
|
|
331
|
+
const page = "_page_1ay01_1";
|
|
332
|
+
const page__text = "_page__text_1ay01_5";
|
|
333
|
+
const page__title = "_page__title_1ay01_10";
|
|
334
|
+
const divider = "_divider_1ay01_29";
|
|
335
|
+
const popIn = "_popIn_1ay01_1";
|
|
336
|
+
const error = "_error_1ay01_55";
|
|
337
|
+
var styles$4 = {
|
|
338
338
|
page,
|
|
339
|
+
page__text,
|
|
339
340
|
page__title,
|
|
340
|
-
"page__heading-group": "_page__heading-
|
|
341
|
+
"page__heading-group": "_page__heading-group_1ay01_22",
|
|
341
342
|
divider,
|
|
342
|
-
|
|
343
|
+
"submit-btn": "_submit-btn_1ay01_48",
|
|
343
344
|
popIn,
|
|
344
345
|
error
|
|
345
346
|
};
|
|
@@ -360,11 +361,11 @@ const Dimensions = ({
|
|
|
360
361
|
actions.rawUpdate([{ type: "setcontrol", data: !data.controlGroup }]);
|
|
361
362
|
};
|
|
362
363
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("article", {
|
|
363
|
-
className: styles$
|
|
364
|
+
className: styles$4["page"]
|
|
364
365
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
365
|
-
className: styles$
|
|
366
|
+
className: styles$4["page__heading-group"]
|
|
366
367
|
}, /* @__PURE__ */ React.createElement("h2", {
|
|
367
|
-
className: styles$
|
|
368
|
+
className: styles$4["page__title"]
|
|
368
369
|
}, "Dimensions", /* @__PURE__ */ React.createElement("small", null, activeDims, " active of ", totalDims)), /* @__PURE__ */ React.createElement(SwitchInput, {
|
|
369
370
|
label: "Control Group",
|
|
370
371
|
onChange: toggleControlGroup,
|
|
@@ -379,7 +380,7 @@ const Dimensions = ({
|
|
|
379
380
|
return /* @__PURE__ */ React.createElement(TRow, {
|
|
380
381
|
key: index
|
|
381
382
|
}, /* @__PURE__ */ React.createElement(TData, null, /* @__PURE__ */ React.createElement("b", null, value)), /* @__PURE__ */ React.createElement(TData, null, /* @__PURE__ */ React.createElement("span", {
|
|
382
|
-
className: styles$
|
|
383
|
+
className: styles$4["divider"],
|
|
383
384
|
role: "presentation"
|
|
384
385
|
}), /* @__PURE__ */ React.createElement("strong", null, category ? `${category}:` : "", " ", name)), /* @__PURE__ */ React.createElement(TData, {
|
|
385
386
|
alignment: "right",
|
|
@@ -409,10 +410,12 @@ const Quirks = (_f) => {
|
|
|
409
410
|
state: { data }
|
|
410
411
|
} = props;
|
|
411
412
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("article", {
|
|
412
|
-
className: styles$
|
|
413
|
+
className: styles$4["page"]
|
|
413
414
|
}, /* @__PURE__ */ React.createElement("h1", {
|
|
414
|
-
className: styles$
|
|
415
|
-
}, "Quirks"), /* @__PURE__ */ React.createElement("p",
|
|
415
|
+
className: styles$4["page__title"]
|
|
416
|
+
}, "Quirks"), /* @__PURE__ */ React.createElement("p", {
|
|
417
|
+
className: styles$4["page__text"]
|
|
418
|
+
}, "Keys defined in Uniform and their current, programmatically defined values for this visit."), Object.keys(data.quirks).length ? /* @__PURE__ */ React.createElement(Table, null, /* @__PURE__ */ React.createElement(THead, null, /* @__PURE__ */ React.createElement(TRow, null, /* @__PURE__ */ React.createElement(THeading, null, "Key"), /* @__PURE__ */ React.createElement(THeading, null, "Value"))), /* @__PURE__ */ React.createElement(TBody, null, Object.entries(data.quirks).map(([key, value], index) => {
|
|
416
419
|
return /* @__PURE__ */ React.createElement(TRow, {
|
|
417
420
|
key: index,
|
|
418
421
|
border: "bottom"
|
|
@@ -422,57 +425,76 @@ const Quirks = (_f) => {
|
|
|
422
425
|
text: "There are currently no quirks setup."
|
|
423
426
|
})));
|
|
424
427
|
};
|
|
425
|
-
var styles$
|
|
426
|
-
"text-input": "_text-
|
|
427
|
-
"select-input": "_select-
|
|
428
|
-
"input-wrapper": "_input-
|
|
429
|
-
"input-label": "_input-
|
|
430
|
-
"input-text": "_input-
|
|
431
|
-
"input-caption": "_input-
|
|
432
|
-
"error-msg": "_error-
|
|
428
|
+
var styles$3 = {
|
|
429
|
+
"text-input": "_text-input_1svz8_1",
|
|
430
|
+
"select-input": "_select-input_1svz8_9",
|
|
431
|
+
"input-wrapper": "_input-wrapper_1svz8_24",
|
|
432
|
+
"input-label": "_input-label_1svz8_28",
|
|
433
|
+
"input-text": "_input-text_1svz8_35",
|
|
434
|
+
"input-caption": "_input-caption_1svz8_42",
|
|
435
|
+
"error-msg": "_error-msg_1svz8_47"
|
|
433
436
|
};
|
|
434
437
|
const InputText = (_g) => {
|
|
435
|
-
var _h = _g, { field, form, meta } = _h, rawProps = __objRest(_h, ["field", "form", "meta"]);
|
|
438
|
+
var _h = _g, { field, form: form2, meta } = _h, rawProps = __objRest(_h, ["field", "form", "meta"]);
|
|
436
439
|
const _a = rawProps, { label, caption } = _a, passThroughProps = __objRest(_a, ["label", "caption"]);
|
|
437
440
|
return /* @__PURE__ */ React.createElement("div", {
|
|
438
|
-
className: styles$
|
|
441
|
+
className: styles$3["input-wrapper"]
|
|
439
442
|
}, /* @__PURE__ */ React.createElement("label", {
|
|
440
|
-
className: styles$
|
|
443
|
+
className: styles$3["input-label"]
|
|
441
444
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
442
|
-
className: styles$
|
|
445
|
+
className: styles$3["input-text"]
|
|
443
446
|
}, label), /* @__PURE__ */ React.createElement("input", __spreadValues(__spreadValues({
|
|
444
447
|
type: "text",
|
|
445
|
-
className: styles$
|
|
448
|
+
className: styles$3["text-input"]
|
|
446
449
|
}, field), passThroughProps))), caption ? /* @__PURE__ */ React.createElement("span", {
|
|
447
|
-
className: styles$
|
|
450
|
+
className: styles$3["input-caption"]
|
|
448
451
|
}, caption) : null, /* @__PURE__ */ React.createElement(ErrorMessage, {
|
|
449
452
|
component: "div",
|
|
450
|
-
className: styles$
|
|
453
|
+
className: styles$3["error-msg"],
|
|
451
454
|
name: field.name
|
|
452
455
|
}));
|
|
453
456
|
};
|
|
454
457
|
const SelectInput = (_i) => {
|
|
455
|
-
var _j = _i, { field, form, meta } = _j, rawProps = __objRest(_j, ["field", "form", "meta"]);
|
|
458
|
+
var _j = _i, { field, form: form2, meta } = _j, rawProps = __objRest(_j, ["field", "form", "meta"]);
|
|
456
459
|
const _a = rawProps, { label, options, caption } = _a, passThroughProps = __objRest(_a, ["label", "options", "caption"]);
|
|
457
460
|
return /* @__PURE__ */ React.createElement("div", {
|
|
458
|
-
className: styles$
|
|
461
|
+
className: styles$3["input-wrapper"]
|
|
459
462
|
}, /* @__PURE__ */ React.createElement("label", {
|
|
460
|
-
className: styles$
|
|
463
|
+
className: styles$3["input-label"]
|
|
461
464
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
462
|
-
className: styles$
|
|
465
|
+
className: styles$3["input-text"]
|
|
463
466
|
}, label), /* @__PURE__ */ React.createElement("select", __spreadProps(__spreadValues(__spreadValues({}, field), passThroughProps), {
|
|
464
|
-
className: styles$
|
|
467
|
+
className: styles$3["select-input"]
|
|
465
468
|
}), options.map((o, index) => /* @__PURE__ */ React.createElement("option", {
|
|
466
469
|
value: o.value,
|
|
467
470
|
key: index
|
|
468
471
|
}, o.text)))), caption ? /* @__PURE__ */ React.createElement("span", {
|
|
469
|
-
className: styles$
|
|
472
|
+
className: styles$3["input-caption"]
|
|
470
473
|
}, caption) : null, /* @__PURE__ */ React.createElement(ErrorMessage, {
|
|
471
474
|
component: "div",
|
|
472
|
-
className: styles$
|
|
475
|
+
className: styles$3["error-msg"],
|
|
473
476
|
name: field.name
|
|
474
477
|
}));
|
|
475
478
|
};
|
|
479
|
+
const form = "_form_1dp40_1";
|
|
480
|
+
const form__fieldset = "_form__fieldset_1dp40_8";
|
|
481
|
+
const form__legend = "_form__legend_1dp40_13";
|
|
482
|
+
var styles$2 = {
|
|
483
|
+
form,
|
|
484
|
+
form__fieldset,
|
|
485
|
+
form__legend
|
|
486
|
+
};
|
|
487
|
+
const Fieldset = (_k) => {
|
|
488
|
+
var _l = _k, { children } = _l, props = __objRest(_l, ["children"]);
|
|
489
|
+
return /* @__PURE__ */ React.createElement("fieldset", __spreadValues({
|
|
490
|
+
className: styles$2["form__fieldset"]
|
|
491
|
+
}, props), children);
|
|
492
|
+
};
|
|
493
|
+
const Legend = ({ children }) => {
|
|
494
|
+
return /* @__PURE__ */ React.createElement("legend", {
|
|
495
|
+
className: styles$2["form__legend"]
|
|
496
|
+
}, children);
|
|
497
|
+
};
|
|
476
498
|
const editableSettingsSchema = yup.object({
|
|
477
499
|
apiKey: yup.string().matches(/^uf.+$/, "API keys start with `uf`, double check your API key"),
|
|
478
500
|
apiHost: yup.string().matches(/^https:\/\/(localhost:8889|([a-z]+\.)?uniform.app)$/, "API host must be a Uniform domain."),
|
|
@@ -523,20 +545,25 @@ const Settings = ({
|
|
|
523
545
|
logLevel: values.logLevel
|
|
524
546
|
}));
|
|
525
547
|
}
|
|
526
|
-
}, ({ dirty, isValid }) => /* @__PURE__ */ React.createElement(Form, {
|
|
527
|
-
className: styles$
|
|
548
|
+
}, ({ dirty, isValid, isSubmitting }) => /* @__PURE__ */ React.createElement(Form, {
|
|
549
|
+
className: styles$4["page"]
|
|
528
550
|
}, /* @__PURE__ */ React.createElement("h1", {
|
|
529
|
-
className: styles$
|
|
551
|
+
className: styles$4["page__title"]
|
|
530
552
|
}, "Settings"), /* @__PURE__ */ React.createElement(Field, {
|
|
531
553
|
component: SelectInput,
|
|
532
554
|
label: "Logging",
|
|
533
555
|
caption: "Logs can be viewed in the browser console",
|
|
534
556
|
id: "logging",
|
|
535
557
|
name: "logLevel",
|
|
536
|
-
options: logOptions
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
558
|
+
options: logOptions,
|
|
559
|
+
disabled: isSubmitting
|
|
560
|
+
}), /* @__PURE__ */ React.createElement(Fieldset, {
|
|
561
|
+
disabled: isSubmitting
|
|
562
|
+
}, /* @__PURE__ */ React.createElement(Legend, null, "Data Connection"), !loading && error2 ? /* @__PURE__ */ React.createElement("p", {
|
|
563
|
+
className: styles$4.error
|
|
564
|
+
}, "Unable to fetch data from Uniform", /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("em", null, error2.message)) : null, /* @__PURE__ */ React.createElement("p", {
|
|
565
|
+
className: styles$4["page__text"]
|
|
566
|
+
}, /* @__PURE__ */ React.createElement("small", null, "Adding an API key and project ID enables richer dimension data to be shown. You must have access to the Uniform project to do this.")), /* @__PURE__ */ React.createElement(Field, {
|
|
540
567
|
component: InputText,
|
|
541
568
|
label: "Uniform API key",
|
|
542
569
|
caption: "Generate an API key in your Uniform team settings. Grant only Context: Read Drafts permission.",
|
|
@@ -561,7 +588,7 @@ const Settings = ({
|
|
|
561
588
|
autoComplete: "off"
|
|
562
589
|
}))), dirty ? /* @__PURE__ */ React.createElement(Button, {
|
|
563
590
|
type: "submit",
|
|
564
|
-
className: styles$
|
|
591
|
+
className: styles$4["submit-btn"],
|
|
565
592
|
disabled: !isValid
|
|
566
593
|
}, "Save") : null)));
|
|
567
594
|
};
|
|
@@ -574,13 +601,13 @@ const ConnectApiKey = ({ settings, saveSettings }) => {
|
|
|
574
601
|
};
|
|
575
602
|
const missingApiKey = !(settings == null ? void 0 : settings.apiKey);
|
|
576
603
|
return !settings.ignoreApiKeyPrompt && missingApiKey ? /* @__PURE__ */ React.createElement("div", {
|
|
577
|
-
className: `${styles$
|
|
604
|
+
className: `${styles$7["cta"]} ${styles$7["cta--with-icon"]}`
|
|
578
605
|
}, /* @__PURE__ */ React.createElement("h2", {
|
|
579
|
-
className: `${styles$
|
|
606
|
+
className: `${styles$7["cta__title"]}`
|
|
580
607
|
}, "Connect this site"), /* @__PURE__ */ React.createElement("p", {
|
|
581
|
-
className: `${styles$
|
|
608
|
+
className: `${styles$7["cta__text"]}`
|
|
582
609
|
}, "Add a Uniform API key to get better data."), /* @__PURE__ */ React.createElement("div", {
|
|
583
|
-
className: `${styles$
|
|
610
|
+
className: `${styles$7["cta__btn-group"]}`
|
|
584
611
|
}, /* @__PURE__ */ React.createElement(Button, {
|
|
585
612
|
buttonType: "secondary",
|
|
586
613
|
onClick: handleRedirect
|
|
@@ -589,7 +616,7 @@ const ConnectApiKey = ({ settings, saveSettings }) => {
|
|
|
589
616
|
onClick: dismissPrompt
|
|
590
617
|
}, "Skip for now")), /* @__PURE__ */ React.createElement("button", {
|
|
591
618
|
type: "button",
|
|
592
|
-
className: `${styles$
|
|
619
|
+
className: `${styles$7["cta__close"]}`,
|
|
593
620
|
title: "close",
|
|
594
621
|
onClick: dismissPrompt
|
|
595
622
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
@@ -597,12 +624,12 @@ const ConnectApiKey = ({ settings, saveSettings }) => {
|
|
|
597
624
|
}, "Close"))) : null;
|
|
598
625
|
};
|
|
599
626
|
var modernNormalize = "";
|
|
600
|
-
const layout = "
|
|
601
|
-
const layout__main = "
|
|
602
|
-
const scrollbar = "
|
|
627
|
+
const layout = "_layout_nno34_64";
|
|
628
|
+
const layout__main = "_layout__main_nno34_84";
|
|
629
|
+
const scrollbar = "_scrollbar_nno34_91";
|
|
603
630
|
var styles$1 = {
|
|
604
631
|
layout,
|
|
605
|
-
"layout--browser-ext": "_layout--browser-
|
|
632
|
+
"layout--browser-ext": "_layout--browser-ext_nno34_75",
|
|
606
633
|
layout__main,
|
|
607
634
|
scrollbar
|
|
608
635
|
};
|
|
@@ -876,8 +903,8 @@ function ContextDevTools(props) {
|
|
|
876
903
|
var styles = {
|
|
877
904
|
"embed-btn": "_embed-btn_1dhzs_1"
|
|
878
905
|
};
|
|
879
|
-
const EmbedToggleButton = (
|
|
880
|
-
var props = __objRest(
|
|
906
|
+
const EmbedToggleButton = (_m) => {
|
|
907
|
+
var props = __objRest(_m, []);
|
|
881
908
|
return /* @__PURE__ */ React.createElement("button", __spreadValues({
|
|
882
909
|
type: "button",
|
|
883
910
|
"data-uniform-dev-tools-version": "2",
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._menu_6gnmz_1{background:var(--brand-secondary-1);padding:var(--spacing-base);min-width:200px}._logo_6gnmz_7{display:inline-block;margin:0 var(--spacing-base)}._logo__svg_6gnmz_12{display:block}._menu__list_6gnmz_16{display:flex;flex-flow:column nowrap;padding:0;margin:0;list-style-type:none;height:calc(100% - var(--spacing-base) * 2.5)}._menu__item_6gnmz_25{padding:0;margin:0;list-style-type:none}._menu__item_6gnmz_25:last-of-type{margin-top:auto}._menu__link_6gnmz_35{align-items:center;border-radius:var(--rounded-base);display:flex;color:var(--white);gap:var(--spacing-sm);padding:var(--spacing-sm) var(--spacing-base);text-decoration:none;transition:background-color .25s ease-in-out}._menu__link_6gnmz_35:hover,._menu__link--active_6gnmz_47{background:var(--gray-700)}._menu__icon_6gnmz_51{align-items:center;display:flex}._accordion_1y4mw_1,._accordion__content_1y4mw_2{will-change:height}._accordion__title_1y4mw_6{border-bottom:2px solid var(--brand-secondary-1);font-size:var(--font-base);margin:0}._accordion__btn_1y4mw_12{align-items:center;border:none;background:none;cursor:pointer;display:flex;width:100%;padding:var(--spacing-sm) 0;font-weight:var(--font-bold);justify-content:space-between}._accordion__icon_1y4mw_24{align-self:center}._accordion__icon--active_1y4mw_28{transform:rotate(-180deg)}._accordion__content_1y4mw_2{padding:var(--spacing-sm) 0}._btn_15bw2_1{align-items:center;border:1px solid transparent;cursor:pointer;display:inline-flex;padding:var(--spacing-sm) var(--spacing-base);transition:opacity .2s ease-in-out,border-color .2s ease-in-out;font-size:var(--font-sm)}._btn_15bw2_1:hover{opacity:.8}._btn--primary_15bw2_15{background:var(--brand-secondary-1)}._btn--secondary_15bw2_19{background:var(--brand-secondary-5)}._btn--unimportant_15bw2_22{background:var(--brand-secondary-3);color:var(--brand-secondary-1)}._btn--ghost_15bw2_26{background:transparent;color:var(--brand-secondary-5)}._btn--ghost_15bw2_26:hover{border:1px solid var(--brand-secondary-5)}._btn--primary_15bw2_15,._btn--secondary_15bw2_19{color:var(--white)}._btn--primary_15bw2_15,._btn--secondary_15bw2_19,._btn--unimportant_15bw2_22{font-weight:var(--font-bold)}._cta_ddty5_1{background-color:var(--gray-100);padding:var(--spacing-base) var(--spacing-md);margin:var(--spacing-base) 0;position:relative}._cta_ddty5_1:first-of-type{margin:0 0 var(--spacing-base)}._cta--with-icon_ddty5_12{background:var(--gray-100) url(data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBmaWxsLXJ1bGU9ImV2ZW5vZGQiCiAgICBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICBkPSJNOSAyQzguNDQ3NzEgMiA4IDIuNDQ3NzIgOCAzVjVDOCA1LjU1MjI4IDguNDQ3NzEgNiA5IDZDOS41NTIyOSA2IDEwIDUuNTUyMjggMTAgNVYzQzEwIDIuNDQ3NzIgOS41NTIyOSAyIDkgMlpNOCA5SDE2VjExQzE2IDEzLjIwOTEgMTQuMjA5MSAxNSAxMiAxNUM5Ljc5MDg2IDE1IDggMTMuMjA5MSA4IDExVjlaTTEzIDE2LjkxN0MxNS44Mzc3IDE2LjQ0MSAxOCAxMy45NzMgMTggMTFWN0g2VjExQzYgMTMuOTczIDguMTYyMjkgMTYuNDQxIDExIDE2LjkxN1YyMkMxMSAyMi41NTIzIDExLjQ0NzcgMjMgMTIgMjNDMTIuNTUyMyAyMyAxMyAyMi41NTIzIDEzIDIyVjE2LjkxN1pNMTQgM0MxNCAyLjQ0NzcyIDE0LjQ0NzcgMiAxNSAyQzE1LjU1MjMgMiAxNiAyLjQ0NzcyIDE2IDNWNUMxNiA1LjU1MjI4IDE1LjU1MjMgNiAxNSA2QzE0LjQ0NzcgNiAxNCA1LjU1MjI4IDE0IDVWM1oiCiAgICBmaWxsPSIjMmVjZGI0IgogIC8+Cjwvc3ZnPg==) no-repeat var(--spacing-sm) var(--spacing-base);padding:var(--spacing-base) var(--spacing-xl)}._cta__title_ddty5_17{color:var(--brand-secondary-1);margin:0;font-size:var(--font-base);font-weight:var(--font-bold)}._cta__text_ddty5_24{color:var(--brand-secondary-1);margin:var(--spacing-xs) 0 0;font-size:var(--font-sm)}._cta__close_ddty5_30{align-items:center;border:none;background:transparent url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoCiAgICBkPSJNNi4yMjUzIDQuODExMDhDNS44MzQ3NyA0LjQyMDU2IDUuMjAxNjEgNC40MjA1NiA0LjgxMTA4IDQuODExMDhDNC40MjA1NiA1LjIwMTYxIDQuNDIwNTYgNS44MzQ3NyA0LjgxMTA4IDYuMjI1M0wxMC41ODU4IDEyTDQuODExMTQgMTcuNzc0N0M0LjQyMDYyIDE4LjE2NTIgNC40MjA2MiAxOC43OTg0IDQuODExMTQgMTkuMTg4OUM1LjIwMTY3IDE5LjU3OTQgNS44MzQ4MyAxOS41Nzk0IDYuMjI1MzUgMTkuMTg4OUwxMiAxMy40MTQyTDE3Ljc3NDcgMTkuMTg4OUMxOC4xNjUyIDE5LjU3OTQgMTguNzk4NCAxOS41Nzk0IDE5LjE4ODkgMTkuMTg4OUMxOS41Nzk0IDE4Ljc5ODQgMTkuNTc5NCAxOC4xNjUyIDE5LjE4ODkgMTcuNzc0N0wxMy40MTQyIDEyTDE5LjE4OSA2LjIyNTNDMTkuNTc5NSA1LjgzNDc3IDE5LjU3OTUgNS4yMDE2MSAxOS4xODkgNC44MTEwOEMxOC43OTg1IDQuNDIwNTYgMTguMTY1MyA0LjQyMDU2IDE3Ljc3NDggNC44MTEwOEwxMiAxMC41ODU4TDYuMjI1MyA0LjgxMTA4WiIKICAgIGZpbGw9IiMyZWNkYjQiCiAgICAvPgo8L3N2Zz4=) no-repeat center center;cursor:pointer;color:var(--brand-secondary-3);display:flex;padding:0;position:absolute;width:24px;height:24px;top:var(--spacing-base);right:var(--spacing-sm);transition:opacity .2s ease-in-out}._cta__close_ddty5_30:hover{opacity:.6}._cta__btn-group_ddty5_50{display:flex;margin:var(--spacing-sm) 0 0;gap:var(--spacing-base)}._input-switch_13lsn_1{align-items:center;cursor:pointer;display:flex;gap:var(--spacing-xs)}._input-switch__label_13lsn_8{color:var(--gray-500);font-size:var(--font-sm)}._input-switch__control_13lsn_13{background:var(--gray-600)}._input-switch__checkbox_13lsn_17{overflow:hidden;clip:rect(0,0,0,0);height:0;width:0;text-indent:-9999px}._input-switch__btn_13lsn_25{display:block;background:var(--gray-400);border-radius:var(--rounded-full);position:relative;height:16px;width:32px}._input-switch__btn_13lsn_25:before{border-radius:var(--rounded-full);background:var(--white);content:"";display:block;width:13px;height:13px;position:absolute;top:0;bottom:0;margin:auto 0;transform:translate(2px);transition:transform .2s ease-in-out,background-color .3s ease-in-out}._input-switch__checkbox_13lsn_17:checked~._input-switch__btn_13lsn_25:before{transform:translate(17px)}._input-switch__checkbox_13lsn_17:checked~._input-switch__btn_13lsn_25{background:var(--brand-secondary-5)}._table_fo951_1{border-collapse:collapse;display:table;width:100%;font-size:var(--font-sm)}._table__head_fo951_8{background:var(--gray-50);text-align:left}._table__heading_fo951_19{outline:none;padding:var(--spacing-sm)}._table__head_fo951_8>._table__row_fo951_16{border-bottom:1px solid var(--gray-200)}._table__row_fo951_16:where(:last-child){border:none}._table__data_fo951_32{padding:var(--spacing-base);max-width:180px;overflow-wrap:break-word;position:relative}._table__data--left_fo951_39{text-align:left}._table__data--right_fo951_43{text-align:right}._table__data--center_fo951_47{text-align:center}._table__data--light_fo951_51{color:var(--gray-400)}._table__data--dark_fo951_55{color:var(--brand-secondary-1)}._t-border-bottom_fo951_59{border-bottom:1px solid var(--gray-200)}._t-border-left_fo951_63{border-left:1px solid var(--gray-200)}._page_1ntvl_1{color:var(--brand-secondary-1)}._page__title_1ntvl_5{margin:0 0 var(--spacing-sm);font-size:var(--font-md)}._page__title_1ntvl_5>small{display:block;font-size:var(--font-xs);font-weight:var(--font-regular);margin:var(--spacing-xxs) 0 0}._page__heading-group_1ntvl_17{align-items:baseline;display:flex;justify-content:space-between}._divider_1ntvl_24{background:var(--gray-300);display:block;width:1px;height:calc(100% - 1rem);position:absolute;inset:0 auto 0 0;margin:auto 0}@-webkit-keyframes _popIn_1ntvl_1{0%{transform:scale(1)}to{transform:scale(1.2)}}@keyframes _popIn_1ntvl_1{0%{transform:scale(1)}to{transform:scale(1.2)}}._submitButton_1ntvl_43{position:absolute;right:1rem;bottom:1rem;-webkit-animation:.5s 2 alternate _popIn_1ntvl_1;animation:.5s 2 alternate _popIn_1ntvl_1}._error_1ntvl_50{color:var(--brand-secondary-5);font-size:var(--font-sm)}._text-input_14cgg_1{background:var(--white);border:1px solid var(--gray-500);border-radius:var(--rounded-base);color:var(--brand-secondary-1);padding:var(--spacing-base)}._select-input_14cgg_9{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--white) url(data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBkPSJNNi4zNDMxNyA3Ljc1NzMyTDQuOTI4OTYgOS4xNzE1NEwxMiAxNi4yNDI2TDE5LjA3MTEgOS4xNzE1N0wxNy42NTY5IDcuNzU3MzVMMTIgMTMuNDE0Mkw2LjM0MzE3IDcuNzU3MzJaIgogICAgZmlsbD0iIzgyODI4MiIKICAvPgo8L3N2Zz4=) no-repeat 98% 50%;border:1px solid var(--gray-500);border-radius:var(--rounded-base);color:var(--brand-secondary-1);padding:var(--spacing-base)}._input-wrapper_14cgg_18{margin:var(--spacing-base) 0}._input-label_14cgg_22{color:var(--brand-secondary-1);display:flex;flex-direction:column;margin:0 0 var(--spacing-sm)}._input-text_14cgg_29{color:var(--brand-secondary-1);display:block;font-weight:var(--font-bold);margin:0 0 var(--spacing-sm)}._input-caption_14cgg_36{color:var(--gray-600);font-size:var(--font-sm)}._error-msg_14cgg_41{color:var(--brand-secondary-5);display:block}/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[data-uniform-dev-tools-version="2"]{--brand-primary-1: #438fd5;--brand-primary-2: #f4220b;--brand-primary-3: #83c6e1;--brand-secondary-1: #1f2b34;--brand-secondary-2: #ecf1f1;--brand-secondary-3: #2ecdb4;--brand-secondary-4: #f6f1c3;--brand-secondary-5: #d9534f;--brand-secondary-6: #dbf6f2;--input-border: rgba(31, 43, 52, .5);--site-width: 652px;--min-height: 385px;--spacing-base: 1.15rem;--spacing-xs: calc(var(--spacing-base) - .75rem);--spacing-sm: calc(var(--spacing-base) - .5rem);--spacing-md: calc(var(--spacing-base) * 1.5);--spacing-lg: calc(var(--spacing-base) * 2);--spacing-xl: calc(var(--spacing-base) * 2.5);--font-base: 1rem;--font-xxs: calc(var(--font-base) - .5rem);--font-xs: calc(var(--font-base) - .25rem);--font-sm: calc(var(--font-base) - .125rem);--font-md: calc(var(--font-base) * 1.25);--font-lg: calc(var(--font-base) * 1.5);--font-regular: 400;--font-bold: 700;--shadow-base: rgba(50, 50, 93, .25) 0px 2px 5px -1px, rgba(0, 0, 0, .3) 0px 1px 3px -1px;--rounded-base: 6px;--rounded-full: 99999px;--white: #fff;--gray-50: #f9fafb;--gray-100: #f3f4f6;--gray-200: #e5e7eb;--gray-300: #d1d5db;--gray-400: #9ca3af;--gray-500: #6b7280;--gray-600: #4b5563;--gray-700: #374151;--gray-800: #1f2937;--gray-900: #111827;--z-10: 10}._layout_1hzp7_64{display:grid;grid-template-columns:200px auto;font-weight:var(--font-regular);font-size:var(--base-font-size);font-family:var(--base-font-family);line-height:var(--base-line-height);height:var(--min-height);min-width:var(--site-width)}._layout--browser-ext_1hzp7_75{box-shadow:var(--shadow-base);position:fixed;bottom:82px;right:var(--spacing-base);z-index:var(--z-10);max-width:var(--site-width)}._layout__main_1hzp7_84{background:var(--white);padding:var(--spacing-base);overflow-y:auto}@supports ((scrollbar-color: #d1d5db transparent) and (scrollbar-width: thin)){._scrollbar_1hzp7_91{scrollbar-color:#d1d5db transparent;scrollbar-width:thin}}._scrollbar_1hzp7_91::-webkit-scrollbar{width:8px;height:8px}._scrollbar_1hzp7_91::-webkit-scrollbar-track{background:transparent;border-radius:var(--rounded-base)}._scrollbar_1hzp7_91::-webkit-scrollbar-thumb{background:var(--gray-300);border-radius:var(--rounded-base)}._scrollbar_1hzp7_91::-webkit-scrollbar-thumb:hover{background:var(--gray-500)}._embed-btn_1dhzs_1{align-items:center;border-radius:var(--rounded-full);background:var(--brand-secondary-5);border:none;box-shadow:var(--shadow-base);color:var(--white);cursor:pointer;display:flex;justify-content:center;position:fixed;bottom:var(--spacing-base);right:var(--spacing-base);z-index:20;width:52px;height:52px;transform:scale(.9);transition:transform .25s ease-in-out}._embed-btn_1dhzs_1:hover{transform:scale(1)}._embed-btn_1dhzs_1 svg{display:block;max-width:100%;height:auto}
|
|
1
|
+
._menu_6gnmz_1{background:var(--brand-secondary-1);padding:var(--spacing-base);min-width:200px}._logo_6gnmz_7{display:inline-block;margin:0 var(--spacing-base)}._logo__svg_6gnmz_12{display:block}._menu__list_6gnmz_16{display:flex;flex-flow:column nowrap;padding:0;margin:0;list-style-type:none;height:calc(100% - var(--spacing-base) * 2.5)}._menu__item_6gnmz_25{padding:0;margin:0;list-style-type:none}._menu__item_6gnmz_25:last-of-type{margin-top:auto}._menu__link_6gnmz_35{align-items:center;border-radius:var(--rounded-base);display:flex;color:var(--white);gap:var(--spacing-sm);padding:var(--spacing-sm) var(--spacing-base);text-decoration:none;transition:background-color .25s ease-in-out}._menu__link_6gnmz_35:hover,._menu__link--active_6gnmz_47{background:var(--gray-700)}._menu__icon_6gnmz_51{align-items:center;display:flex}._accordion_1y4mw_1,._accordion__content_1y4mw_2{will-change:height}._accordion__title_1y4mw_6{border-bottom:2px solid var(--brand-secondary-1);font-size:var(--font-base);margin:0}._accordion__btn_1y4mw_12{align-items:center;border:none;background:none;cursor:pointer;display:flex;width:100%;padding:var(--spacing-sm) 0;font-weight:var(--font-bold);justify-content:space-between}._accordion__icon_1y4mw_24{align-self:center}._accordion__icon--active_1y4mw_28{transform:rotate(-180deg)}._accordion__content_1y4mw_2{padding:var(--spacing-sm) 0}._btn_15bw2_1{align-items:center;border:1px solid transparent;cursor:pointer;display:inline-flex;padding:var(--spacing-sm) var(--spacing-base);transition:opacity .2s ease-in-out,border-color .2s ease-in-out;font-size:var(--font-sm)}._btn_15bw2_1:hover{opacity:.8}._btn--primary_15bw2_15{background:var(--brand-secondary-1)}._btn--secondary_15bw2_19{background:var(--brand-secondary-5)}._btn--unimportant_15bw2_22{background:var(--brand-secondary-3);color:var(--brand-secondary-1)}._btn--ghost_15bw2_26{background:transparent;color:var(--brand-secondary-5)}._btn--ghost_15bw2_26:hover{border:1px solid var(--brand-secondary-5)}._btn--primary_15bw2_15,._btn--secondary_15bw2_19{color:var(--white)}._btn--primary_15bw2_15,._btn--secondary_15bw2_19,._btn--unimportant_15bw2_22{font-weight:var(--font-bold)}._cta_ddty5_1{background-color:var(--gray-100);padding:var(--spacing-base) var(--spacing-md);margin:var(--spacing-base) 0;position:relative}._cta_ddty5_1:first-of-type{margin:0 0 var(--spacing-base)}._cta--with-icon_ddty5_12{background:var(--gray-100) url(data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBmaWxsLXJ1bGU9ImV2ZW5vZGQiCiAgICBjbGlwLXJ1bGU9ImV2ZW5vZGQiCiAgICBkPSJNOSAyQzguNDQ3NzEgMiA4IDIuNDQ3NzIgOCAzVjVDOCA1LjU1MjI4IDguNDQ3NzEgNiA5IDZDOS41NTIyOSA2IDEwIDUuNTUyMjggMTAgNVYzQzEwIDIuNDQ3NzIgOS41NTIyOSAyIDkgMlpNOCA5SDE2VjExQzE2IDEzLjIwOTEgMTQuMjA5MSAxNSAxMiAxNUM5Ljc5MDg2IDE1IDggMTMuMjA5MSA4IDExVjlaTTEzIDE2LjkxN0MxNS44Mzc3IDE2LjQ0MSAxOCAxMy45NzMgMTggMTFWN0g2VjExQzYgMTMuOTczIDguMTYyMjkgMTYuNDQxIDExIDE2LjkxN1YyMkMxMSAyMi41NTIzIDExLjQ0NzcgMjMgMTIgMjNDMTIuNTUyMyAyMyAxMyAyMi41NTIzIDEzIDIyVjE2LjkxN1pNMTQgM0MxNCAyLjQ0NzcyIDE0LjQ0NzcgMiAxNSAyQzE1LjU1MjMgMiAxNiAyLjQ0NzcyIDE2IDNWNUMxNiA1LjU1MjI4IDE1LjU1MjMgNiAxNSA2QzE0LjQ0NzcgNiAxNCA1LjU1MjI4IDE0IDVWM1oiCiAgICBmaWxsPSIjMmVjZGI0IgogIC8+Cjwvc3ZnPg==) no-repeat var(--spacing-sm) var(--spacing-base);padding:var(--spacing-base) var(--spacing-xl)}._cta__title_ddty5_17{color:var(--brand-secondary-1);margin:0;font-size:var(--font-base);font-weight:var(--font-bold)}._cta__text_ddty5_24{color:var(--brand-secondary-1);margin:var(--spacing-xs) 0 0;font-size:var(--font-sm)}._cta__close_ddty5_30{align-items:center;border:none;background:transparent url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoCiAgICBkPSJNNi4yMjUzIDQuODExMDhDNS44MzQ3NyA0LjQyMDU2IDUuMjAxNjEgNC40MjA1NiA0LjgxMTA4IDQuODExMDhDNC40MjA1NiA1LjIwMTYxIDQuNDIwNTYgNS44MzQ3NyA0LjgxMTA4IDYuMjI1M0wxMC41ODU4IDEyTDQuODExMTQgMTcuNzc0N0M0LjQyMDYyIDE4LjE2NTIgNC40MjA2MiAxOC43OTg0IDQuODExMTQgMTkuMTg4OUM1LjIwMTY3IDE5LjU3OTQgNS44MzQ4MyAxOS41Nzk0IDYuMjI1MzUgMTkuMTg4OUwxMiAxMy40MTQyTDE3Ljc3NDcgMTkuMTg4OUMxOC4xNjUyIDE5LjU3OTQgMTguNzk4NCAxOS41Nzk0IDE5LjE4ODkgMTkuMTg4OUMxOS41Nzk0IDE4Ljc5ODQgMTkuNTc5NCAxOC4xNjUyIDE5LjE4ODkgMTcuNzc0N0wxMy40MTQyIDEyTDE5LjE4OSA2LjIyNTNDMTkuNTc5NSA1LjgzNDc3IDE5LjU3OTUgNS4yMDE2MSAxOS4xODkgNC44MTEwOEMxOC43OTg1IDQuNDIwNTYgMTguMTY1MyA0LjQyMDU2IDE3Ljc3NDggNC44MTEwOEwxMiAxMC41ODU4TDYuMjI1MyA0LjgxMTA4WiIKICAgIGZpbGw9IiMyZWNkYjQiCiAgICAvPgo8L3N2Zz4=) no-repeat center center;cursor:pointer;color:var(--brand-secondary-3);display:flex;padding:0;position:absolute;width:24px;height:24px;top:var(--spacing-base);right:var(--spacing-sm);transition:opacity .2s ease-in-out}._cta__close_ddty5_30:hover{opacity:.6}._cta__btn-group_ddty5_50{display:flex;margin:var(--spacing-sm) 0 0;gap:var(--spacing-base)}._input-switch_13lsn_1{align-items:center;cursor:pointer;display:flex;gap:var(--spacing-xs)}._input-switch__label_13lsn_8{color:var(--gray-500);font-size:var(--font-sm)}._input-switch__control_13lsn_13{background:var(--gray-600)}._input-switch__checkbox_13lsn_17{overflow:hidden;clip:rect(0,0,0,0);height:0;width:0;text-indent:-9999px}._input-switch__btn_13lsn_25{display:block;background:var(--gray-400);border-radius:var(--rounded-full);position:relative;height:16px;width:32px}._input-switch__btn_13lsn_25:before{border-radius:var(--rounded-full);background:var(--white);content:"";display:block;width:13px;height:13px;position:absolute;top:0;bottom:0;margin:auto 0;transform:translate(2px);transition:transform .2s ease-in-out,background-color .3s ease-in-out}._input-switch__checkbox_13lsn_17:checked~._input-switch__btn_13lsn_25:before{transform:translate(17px)}._input-switch__checkbox_13lsn_17:checked~._input-switch__btn_13lsn_25{background:var(--brand-secondary-5)}._table_fo951_1{border-collapse:collapse;display:table;width:100%;font-size:var(--font-sm)}._table__head_fo951_8{background:var(--gray-50);text-align:left}._table__heading_fo951_19{outline:none;padding:var(--spacing-sm)}._table__head_fo951_8>._table__row_fo951_16{border-bottom:1px solid var(--gray-200)}._table__row_fo951_16:where(:last-child){border:none}._table__data_fo951_32{padding:var(--spacing-base);max-width:180px;overflow-wrap:break-word;position:relative}._table__data--left_fo951_39{text-align:left}._table__data--right_fo951_43{text-align:right}._table__data--center_fo951_47{text-align:center}._table__data--light_fo951_51{color:var(--gray-400)}._table__data--dark_fo951_55{color:var(--brand-secondary-1)}._t-border-bottom_fo951_59{border-bottom:1px solid var(--gray-200)}._t-border-left_fo951_63{border-left:1px solid var(--gray-200)}._page_1ay01_1{color:var(--brand-secondary-1)}._page__text_1ay01_5{margin:var(--spacing-sm) 0}._page__title_1ay01_10{margin:0 0 var(--spacing-sm);font-size:var(--font-md)}._page__title_1ay01_10>small{display:block;font-size:var(--font-xs);font-weight:var(--font-regular);margin:var(--spacing-xxs) 0 0}._page__heading-group_1ay01_22{align-items:baseline;display:flex;justify-content:space-between}._divider_1ay01_29{background:var(--gray-300);display:block;width:1px;height:calc(100% - 1rem);position:absolute;inset:0 auto 0 0;margin:auto 0}@-webkit-keyframes _popIn_1ay01_1{0%{transform:scale(1)}to{transform:scale(1.2)}}@keyframes _popIn_1ay01_1{0%{transform:scale(1)}to{transform:scale(1.2)}}._submit-btn_1ay01_48{position:absolute;right:var(--spacing-base);bottom:var(--spacing-base);-webkit-animation:.5s 2 alternate _popIn_1ay01_1;animation:.5s 2 alternate _popIn_1ay01_1}._error_1ay01_55{color:var(--brand-secondary-5);font-size:var(--font-sm)}._text-input_1svz8_1{background:var(--white);border:1px solid var(--gray-500);border-radius:var(--rounded-base);color:var(--brand-secondary-1);padding:var(--spacing-base)}._select-input_1svz8_9:disabled,._text-input_1svz8_1:disabled{cursor:not-allowed;color:var(--gray-200)}._select-input_1svz8_9{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--white) url(data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBkPSJNNi4zNDMxNyA3Ljc1NzMyTDQuOTI4OTYgOS4xNzE1NEwxMiAxNi4yNDI2TDE5LjA3MTEgOS4xNzE1N0wxNy42NTY5IDcuNzU3MzVMMTIgMTMuNDE0Mkw2LjM0MzE3IDcuNzU3MzJaIgogICAgZmlsbD0iIzgyODI4MiIKICAvPgo8L3N2Zz4=) no-repeat 98% 50%;border:1px solid var(--gray-500);border-radius:var(--rounded-base);color:var(--brand-secondary-1);padding:var(--spacing-base)}._input-wrapper_1svz8_24{margin:var(--spacing-base) 0}._input-label_1svz8_28{color:var(--brand-secondary-1);display:flex;flex-direction:column;margin:0 0 var(--spacing-sm)}._input-text_1svz8_35{color:var(--brand-secondary-1);display:block;font-weight:var(--font-bold);margin:0 0 var(--spacing-sm)}._input-caption_1svz8_42{color:var(--gray-600);font-size:var(--font-sm)}._error-msg_1svz8_47{color:var(--brand-secondary-5);display:block}._form_1dp40_1 p{color:red}._form__fieldset_1dp40_8{border:none;padding:0}._form__legend_1dp40_13{font-size:var(--font-base);font-weight:var(--font-bold)}/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[data-uniform-dev-tools-version="2"]{--brand-primary-1: #438fd5;--brand-primary-2: #f4220b;--brand-primary-3: #83c6e1;--brand-secondary-1: #1f2b34;--brand-secondary-2: #ecf1f1;--brand-secondary-3: #2ecdb4;--brand-secondary-4: #f6f1c3;--brand-secondary-5: #d9534f;--brand-secondary-6: #dbf6f2;--input-border: rgba(31, 43, 52, .5);--site-width: 700px;--min-height: 450px;--spacing-base: 1.15rem;--spacing-xs: calc(var(--spacing-base) - .75rem);--spacing-sm: calc(var(--spacing-base) - .5rem);--spacing-md: calc(var(--spacing-base) * 1.5);--spacing-lg: calc(var(--spacing-base) * 2);--spacing-xl: calc(var(--spacing-base) * 2.5);--font-base: 1rem;--font-xxs: calc(var(--font-base) - .5rem);--font-xs: calc(var(--font-base) - .25rem);--font-sm: calc(var(--font-base) - .125rem);--font-md: calc(var(--font-base) * 1.25);--font-lg: calc(var(--font-base) * 1.5);--font-regular: 400;--font-bold: 700;--shadow-base: rgba(50, 50, 93, .25) 0px 2px 5px -1px, rgba(0, 0, 0, .3) 0px 1px 3px -1px;--rounded-base: 6px;--rounded-full: 99999px;--white: #fff;--gray-50: #f9fafb;--gray-100: #f3f4f6;--gray-200: #e5e7eb;--gray-300: #d1d5db;--gray-400: #9ca3af;--gray-500: #6b7280;--gray-600: #4b5563;--gray-700: #374151;--gray-800: #1f2937;--gray-900: #111827;--z-10: 10}._layout_nno34_64{display:grid;grid-template-columns:200px auto;font-weight:var(--font-regular);font-size:var(--base-font-size);font-family:var(--base-font-family);line-height:var(--base-line-height);height:var(--min-height);min-width:var(--site-width)}._layout--browser-ext_nno34_75{box-shadow:var(--shadow-base);position:fixed;bottom:82px;right:var(--spacing-base);z-index:var(--z-10);max-width:var(--site-width)}._layout__main_nno34_84{background:var(--white);padding:var(--spacing-base);overflow-y:auto}@supports ((scrollbar-color: #d1d5db transparent) and (scrollbar-width: thin)){._scrollbar_nno34_91{scrollbar-color:#d1d5db transparent;scrollbar-width:thin}}._scrollbar_nno34_91::-webkit-scrollbar{width:8px;height:8px}._scrollbar_nno34_91::-webkit-scrollbar-track{background:transparent;border-radius:var(--rounded-base)}._scrollbar_nno34_91::-webkit-scrollbar-thumb{background:var(--gray-300);border-radius:var(--rounded-base)}._scrollbar_nno34_91::-webkit-scrollbar-thumb:hover{background:var(--gray-500)}._embed-btn_1dhzs_1{align-items:center;border-radius:var(--rounded-full);background:var(--brand-secondary-5);border:none;box-shadow:var(--shadow-base);color:var(--white);cursor:pointer;display:flex;justify-content:center;position:fixed;bottom:var(--spacing-base);right:var(--spacing-base);z-index:20;width:52px;height:52px;transform:scale(.9);transition:transform .25s ease-in-out}._embed-btn_1dhzs_1:hover{transform:scale(1)}._embed-btn_1dhzs_1 svg{display:block;max-width:100%;height:auto}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/context-devtools",
|
|
3
|
-
"version": "12.2.1-alpha.
|
|
3
|
+
"version": "12.2.1-alpha.183+49960035",
|
|
4
4
|
"description": "Uniform Context developer tools components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"vite-plugin-dts": "^0.9.9"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@uniformdev/context": "^12.2.1-alpha.
|
|
46
|
+
"@uniformdev/context": "^12.2.1-alpha.183+49960035",
|
|
47
47
|
"formik": "2.2.9",
|
|
48
48
|
"react": "^17.0.2",
|
|
49
49
|
"react-dom": "^17.0.2",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"files": [
|
|
54
54
|
"/dist"
|
|
55
55
|
],
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "49960035ff35b493601e3cb0de247eff3c8019ac"
|
|
57
57
|
}
|