@lokalise/harmony 1.6.0-exp-jwtutils.21 → 1.6.0-exp-jwtutils.22
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/harmony.cjs +1 -1
- package/dist/harmony.mjs +46 -35
- package/dist/types/src/features/auth/core/middleware/publicApiHeadersMiddleware.d.ts +2 -0
- package/dist/types/src/features/auth/index.d.ts +1 -0
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +6 -6
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +6 -6
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +6 -6
- package/dist/types/src/features/publicApi/index.d.ts +1 -1
- package/dist/types/src/features/publicApi/projects.d.ts +216 -112
- package/dist/types/src/features/publicApi/types/language.d.ts +2 -2
- package/dist/types/src/features/publicApi/types/project.d.ts +68 -28
- package/package.json +1 -1
package/dist/harmony.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";var kt=Object.defineProperty;var Nt=(e,t,n)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>Nt(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),b=require("react"),f=require("@lokalise/louis"),r=require("zod"),x=require("@lokalise/frontend-http-client"),Ze=require("@lokalise/universal-ts-utils/api-contracts/apiContracts"),C=require("@tanstack/react-query"),J=require("@lokalise/universal-ts-utils/node"),Xe=require("date-fns"),Ct=require("date-fns-tz");function At(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=At(b);var $=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z,Ie;function ge(){if(Ie)return Z;Ie=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Z=e,Z}var X,xe;function Lt(){if(xe)return X;xe=1;var e=typeof $=="object"&&$&&$.Object===Object&&$;return X=e,X}var ee,Re;function tt(){if(Re)return ee;Re=1;var e=Lt(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return ee=n,ee}var te,ke;function Ot(){if(ke)return te;ke=1;var e=tt(),t=function(){return e.Date.now()};return te=t,te}var ne,Ne;function qt(){if(Ne)return ne;Ne=1;var e=/\s/;function t(n){for(var s=n.length;s--&&e.test(n.charAt(s)););return s}return ne=t,ne}var re,Ce;function Mt(){if(Ce)return re;Ce=1;var e=qt(),t=/^\s+/;function n(s){return s&&s.slice(0,e(s)+1).replace(t,"")}return re=n,re}var se,Ae;function nt(){if(Ae)return se;Ae=1;var e=tt(),t=e.Symbol;return se=t,se}var ae,Le;function Ut(){if(Le)return ae;Le=1;var e=nt(),t=Object.prototype,n=t.hasOwnProperty,s=t.toString,a=e?e.toStringTag:void 0;function i(c){var l=n.call(c,a),d=c[a];try{c[a]=void 0;var u=!0}catch{}var m=s.call(c);return u&&(l?c[a]=d:delete c[a]),m}return ae=i,ae}var oe,Oe;function Bt(){if(Oe)return oe;Oe=1;var e=Object.prototype,t=e.toString;function n(s){return t.call(s)}return oe=n,oe}var ie,qe;function Dt(){if(qe)return ie;qe=1;var e=nt(),t=Ut(),n=Bt(),s="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function c(l){return l==null?l===void 0?a:s:i&&i in Object(l)?t(l):n(l)}return ie=c,ie}var ce,Me;function Ft(){if(Me)return ce;Me=1;function e(t){return t!=null&&typeof t=="object"}return ce=e,ce}var ue,Ue;function Ht(){if(Ue)return ue;Ue=1;var e=Dt(),t=Ft(),n="[object Symbol]";function s(a){return typeof a=="symbol"||t(a)&&e(a)==n}return ue=s,ue}var le,Be;function $t(){if(Be)return le;Be=1;var e=Mt(),t=ge(),n=Ht(),s=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function d(u){if(typeof u=="number")return u;if(n(u))return s;if(t(u)){var m=typeof u.valueOf=="function"?u.valueOf():u;u=t(m)?m+"":m}if(typeof u!="string")return u===0?u:+u;u=e(u);var p=i.test(u);return p||c.test(u)?l(u.slice(2),p?2:8):a.test(u)?s:+u}return le=d,le}var de,De;function rt(){if(De)return de;De=1;var e=ge(),t=Ot(),n=$t(),s="Expected a function",a=Math.max,i=Math.min;function c(l,d,u){var m,p,y,j,h,z,w=0,P=!1,g=!1,E=!0;if(typeof l!="function")throw new TypeError(s);d=n(d)||0,e(u)&&(P=!!u.leading,g="maxWait"in u,y=g?a(n(u.maxWait)||0,d):y,E="trailing"in u?!!u.trailing:E);function T(_){var I=m,q=p;return m=p=void 0,w=_,j=l.apply(q,I),j}function v(_){return w=_,h=setTimeout(H,d),P?T(_):j}function F(_){var I=_-z,q=_-w,Ee=d-I;return g?i(Ee,y-q):Ee}function Se(_){var I=_-z,q=_-w;return z===void 0||I>=d||I<0||g&&q>=y}function H(){var _=t();if(Se(_))return we(_);h=setTimeout(H,F(_))}function we(_){return h=void 0,E&&m?T(_):(m=p=void 0,j)}function xt(){h!==void 0&&clearTimeout(h),w=0,m=z=p=h=void 0}function Rt(){return h===void 0?j:we(t())}function V(){var _=t(),I=Se(_);if(m=arguments,p=this,z=_,I){if(h===void 0)return v(z);if(g)return clearTimeout(h),h=setTimeout(H,d),T(z)}return h===void 0&&(h=setTimeout(H,d)),j}return V.cancel=xt,V.flush=Rt,V}return de=c,de}var Gt=rt();const Kt=et(Gt);var me,Fe;function Qt(){if(Fe)return me;Fe=1;var e=rt(),t=ge(),n="Expected a function";function s(a,i,c){var l=!0,d=!0;if(typeof a!="function")throw new TypeError(n);return t(c)&&(l="leading"in c?!!c.leading:l,d="trailing"in c?!!c.trailing:d),e(a,i,{leading:l,maxWait:i,trailing:d})}return me=s,me}var Jt=Qt();const Wt=et(Jt),Yt=(e,t,n,s)=>{switch(t){case"debounce":return Kt(e,n,s);case"throttle":return Wt(e,n,s);default:return e}},Vt=e=>{const t=M.useRef(e);return M.useEffect(()=>{t.current=e}),M.useMemo(()=>(...n)=>{var s;return(s=t.current)===null||s===void 0?void 0:s.call(t,...n)},[])},Zt=e=>{const[t,n]=M.useState((e==null?void 0:e.current)||null);return e&&setTimeout(()=>{e.current!==t&&n(e.current)},0),{refProxy:M.useMemo(()=>new Proxy(a=>{a!==t&&n(a)},{get(a,i){return i==="current"?t:a[i]},set(a,i,c){return i==="current"?n(c):a[i]=c,!0}}),[t]),refElement:t,setRefElement:n}},Xt=(e,t)=>t==="border-box"?{width:e.borderBoxSize[0].inlineSize,height:e.borderBoxSize[0].blockSize}:t==="content-box"?{width:e.contentBoxSize[0].inlineSize,height:e.contentBoxSize[0].blockSize}:{width:e.contentRect.width,height:e.contentRect.height};function en({skipOnMount:e=!1,refreshMode:t,refreshRate:n=1e3,refreshOptions:s,handleWidth:a=!0,handleHeight:i=!0,targetRef:c,observerOptions:l,onResize:d}={}){const u=b.useRef(e),m=Vt(d),[p,y]=b.useState({width:void 0,height:void 0}),{refProxy:j,refElement:h}=Zt(c),{box:z}=l||{},w=b.useCallback(g=>{if(!a&&!i)return;if(u.current){u.current=!1;return}const E=(T,v)=>a&&T.width!==v.width||i&&T.height!==v.height;g.forEach(T=>{const v=Xt(T,z);y(F=>E(F,v)?(m==null||m({width:v.width,height:v.height,entry:T}),v):F)})},[a,i,u,z]),P=b.useCallback(Yt(w,t,n,s),[w,t,n,s]);return b.useEffect(()=>{let g;return h?(g=new window.ResizeObserver(P),g.observe(h,l)):(p.width||p.height)&&(m==null||m({width:null,height:null,entry:null}),y({width:void 0,height:void 0})),()=>{var E,T,v;(E=g==null?void 0:g.disconnect)===null||E===void 0||E.call(g),(v=(T=P).cancel)===null||v===void 0||v.call(T)}},[P,h]),Object.assign({ref:j},p)}function st(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=st(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function N(){for(var e,t,n=0,s="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=st(e))&&(s&&(s+=" "),s+=t);return s}const tn="_headerContainer_1cubo_1",nn="_navigationTabList_1cubo_8",rn="_navigationTab_1cubo_8",sn="_headerContent_1cubo_34",an="_staticEnabled_1cubo_50",L={headerContainer:tn,navigationTabList:nn,navigationTab:rn,headerContent:sn,staticEnabled:an},on=77,U=({sticky:e,children:t})=>{const{ref:n,height:s}=en({refreshMode:"debounce",refreshRate:0}),[a,i]=b.useState(!1),c=()=>a?!e:!0;b.useEffect(()=>{const d=()=>{i(window.scrollY>0)};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]);const l=`${s||on}px`;return o.jsx("div",{style:{minHeight:l},children:o.jsx("div",{children:o.jsxs("div",{ref:n,className:N(L.headerContent,{[L.staticEnabled]:c()}),children:[o.jsx(U.Header,{}),o.jsx(U.Tabs,{}),t]})})})};U.Header=({children:e})=>o.jsx("div",{className:L.headerContainer,children:e});U.Tabs=({children:e})=>o.jsx("div",{className:"flex justify-between gap-2 nowrap",children:e});const cn="_sidebarContainer_bmdti_1",un={sidebarContainer:cn},ln="_logoLink_1baxb_1",dn={logoLink:ln},mn=({src:e,href:t="/",ariaLabel:n="Home",alt:s="Lokalise"})=>o.jsx("a",{className:dn.logoLink,href:t,"aria-label":n,children:o.jsx("img",{src:e,alt:s})}),fn="_link_1weq1_1",_n="_active_1weq1_18",He={link:fn,active:_n},bn=({label:e,to:t,icon:n})=>o.jsx(f.Tooltip,{placement:"right",tooltip:e,children:o.jsx(f.Link,{className:N(He.link,{[He.active]:window.location.pathname.startsWith(t)}),href:t,children:o.jsx(n,{size:"25px"})})}),gn="_dropdownButton_hwh0c_1",hn="_dropdownButtonActive_hwh0c_18",$e={dropdownButton:gn,dropdownButtonActive:hn},pn=({children:e,icon:t})=>o.jsx(f.Menu,{menuButton:({opened:n})=>o.jsx(f.Tooltip,{placement:"right",tooltip:"Help",children:o.jsx("button",{type:"button",className:N($e.dropdownButton,{[$e.dropdownButtonActive]:n}),children:o.jsx(t,{size:"25px"})})}),children:o.jsx(f.MenuList,{placement:"right-start",children:e})}),vn="_iconContainer_nz34m_1",Tn={iconContainer:vn},at=({className:e=""})=>o.jsx("div",{"aria-label":"Upgrade Icon",className:N(Tn.iconContainer,"flex-row","items-center","justify-center",e),children:o.jsx(f.CaretUpIcon,{})}),yn="_menuContainer_wbu3u_5",jn="_profileButton_wbu3u_16",zn="_profileImage_wbu3u_29",Sn="_profileImageHighlight_wbu3u_37",wn="_profileImageUpgradeIcon_wbu3u_41",En="_userIconWrapper_wbu3u_47",R={menuContainer:yn,profileButton:jn,profileImage:zn,profileImageHighlight:Sn,profileImageUpgradeIcon:wn,userIconWrapper:En},ot=b.createContext({}),B=()=>b.useContext(ot),Pn=({children:e})=>{const{currentTeam:t,otherTeams:n,showUpgradeCta:s,showBillingButton:a,allowTeamCreation:i,isLimitedView:c,isProviderAlpha:l,canAccessTeamSettings:d,isEndOfTrialActive:u,isTeamSuspended:m}=B();return o.jsx(f.Menu,{menuButton:()=>o.jsxs("button",{className:R.profileButton,"aria-label":"Profile menu",type:"button",children:[t!=null&&t.logoUrl?o.jsx("img",{src:t.logoUrl,className:N(R.profileImage,{[R.profileImageHighlight]:s}),alt:"Team Logo"}):o.jsx("div",{className:N(R.userIconWrapper,"flex-row","align-center","items-center",{[R.profileImageHighlight]:s}),children:o.jsx(f.UserIcon,{size:"25px"})}),s&&o.jsx(at,{className:R.profileImageUpgradeIcon})]}),children:o.jsx(f.MenuList,{placement:"right-end",className:R.menuContainer,children:e({allowTeamCreation:i,otherTeams:n,isLimitedView:c,canAccessTeamSettings:d,isEndOfTrialActive:u,isTeamSuspended:m,showBillingButton:a,isProviderAlpha:l})})})},he=0,it=9999,ct=[150,151,250,251],ut=[152,153,252,253],lt=[154,155,157,158,254,255,258,354,355,358],dt=[156,159,160,256,259,260],pe=9998,W=e=>e===he,ve=e=>e===it,In=e=>ct.includes(e),xn=e=>ut.includes(e),Rn=e=>lt.includes(e),kn=e=>dt.includes(e),Nn=e=>e>he&&e<pe,Cn=e=>e===pe,An=/\n/,Ge=(e,t,n)=>e.split(t).flatMap((s,a)=>a!==0?[b.cloneElement(n,{key:Math.random().toString(32).slice(0,10)}),s]:s),Ln=(e,t,n)=>typeof e=="string"?Ge(e,t,n):e.flatMap(s=>typeof s=="string"?Ge(s,t,n):s),On=e=>Ln(e,An,o.jsx("br",{})),qn=/(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi,Mn=e=>e.match(qn)??[],Ke=(e,t,n)=>{const s=e.split(t);if(s.length===1)return e;const a=[];return s[0]!==""&&a.push(s[0]),s.shift(),s[s.length-1]===""&&s.pop(),a.push(o.jsx("a",{href:t,target:"_blank",rel:"noreferrer noopener",children:t},t+n)),a.push(s.join(t)),a.filter(i=>i!=="")},Qe=e=>{const t=Mn(e);return t!=null&&t.length?t.reduce((n,s,a)=>typeof n=="string"?Ke(n,s,a):n.flatMap(i=>typeof i=="string"?Ke(i,s,a):i),e):e},Un=e=>typeof e=="string"?Qe(e):e.flatMap(t=>typeof t=="string"?Qe(t):t,e),Bn=(e,t="PP")=>Xe.format(e,t),Dn=(e,t,n="PP")=>Xe.format(Ct.toZonedTime(e,t),n),Fn=e=>{b.useEffect(e,[])},Hn=({children:e,config:t})=>{const{teams:n,currentTeamId:s,planId:a,isLimitedView:i,isTeamSuspended:c,canAccessTeamSettings:l,isEndOfTrialActive:d}=t,u=n.find(g=>g.id===s),m=n.filter(g=>g.id!==s),p=(u==null?void 0:u.role)??"",y=["biller","owner"].includes(p),j=W(a)||ve(a),P={...t,currentTeam:u,otherTeams:m,canChangeBilling:y,isOnFreeOrTrialPlan:j,showUpgradeCta:!i&&j&&y&&!c,showBillingButton:!i&&l&&y,allowTeamCreation:!i&&!d};return o.jsx(ot.Provider,{value:P,children:e})},$n=({config:e,children:t})=>o.jsx(Hn,{config:e,children:o.jsx(Pn,{children:t})}),Gn="_container_q5pot_1",Kn="_profileEmail_q5pot_5",Je={container:Gn,profileEmail:Kn},Qn=({href:e,onClick:t,userEmail:n,hideBottomDivider:s})=>{const{isEndOfTrialActive:a,isTeamSuspended:i}=B();return a||i?null:o.jsxs(o.Fragment,{children:[o.jsx(f.MenuItem,{href:e,onClick:()=>{t==null||t()},children:o.jsxs("div",{className:`flex-col ${Je.container}`,children:[o.jsx("span",{children:"Profile Settings"}),o.jsx("span",{className:Je.profileEmail,children:n})]})}),!s&&o.jsx(f.MenuDivider,{})]})},Jn="_wrapper_15d85_1",Wn="_profileImage_15d85_14",Yn="_teamName_15d85_22",Vn="_planLabel_15d85_29",Zn="_membership_15d85_38",Xn="_defaultProfileImage_15d85_44",A={wrapper:Jn,profileImage:Wn,teamName:Yn,planLabel:Vn,membership:Zn,defaultProfileImage:Xn},mt=({team:e,onClick:t,hidePlanLabel:n})=>{const{currentTeam:s,planId:a}=B(),i=e||s;if(!i)return null;const c=W(a)?"Free":ve(a)?"Trial":void 0,l=t?f.MenuItem:"div";return o.jsxs(l,{className:`flex-row gap-2 flex-nowrap items-center ${A.wrapper}`,...t&&{onClick:()=>t(i)},children:[i.logoUrl?o.jsx("img",{className:A.profileImage,src:i.logoUrl,alt:"Team Logo"}):o.jsx("span",{className:`flex-row justify-center items-center ${A.defaultProfileImage}`,children:o.jsx(f.UserIcon,{size:"25px"})}),o.jsxs("div",{className:"flex-col items-start",children:[o.jsxs("div",{className:"flex-row items-center flex-nowrap gap-2",children:[o.jsx("span",{title:i.name,className:A.teamName,children:i.name}),c&&!n&&o.jsx("span",{className:`flex-row justify-center items-center ${A.planLabel}`,children:c})]}),o.jsx("span",{className:A.membership,children:i.role})]})]})},er="_teamsContainer_1t68g_1",tr={teamsContainer:er},nr=({onSwitchTeam:e})=>{const{otherTeams:t}=B();return t.length===0?null:o.jsx("div",{className:`flex-col items-stretch ${tr.teamsContainer}`,children:t.map(n=>o.jsx(mt,{team:n,onClick:e,hidePlanLabel:!0},n.id))})},rr="_container_1u995_1",sr="_planCta_1u995_15",ar="_upgradeIconWrapper_1u995_19",fe={container:rr,planCta:sr,upgradeIconWrapper:ar},or=({upgradeOptionHref:e})=>{const{planId:t,trialDaysLeft:n,showUpgradeCta:s}=B();if(!s)return null;const c=W(t)?"Your team is currently on the Free plan":`Free trial ends in ${n} ${n===1?"day":"days"}`;return o.jsxs(f.MenuItem,{href:e,className:`flex-col gap-1 items-start ${fe.container}`,children:[o.jsx("span",{className:fe.planCta,children:c}),o.jsxs("div",{className:`flex-row items-center gap-1 ${fe.upgradeIconWrapper}`,children:[o.jsx(at,{}),o.jsx("span",{children:"See upgrade options"})]})]})},S=({children:e,...t})=>o.jsx("nav",{...t,className:un.sidebarContainer,children:e});S.Top=({children:e})=>o.jsx("div",{children:e});S.Bottom=({children:e})=>o.jsx("div",{children:e});S.Avatar=mn;S.IconLink=bn;S.Menu=pn;S.ProfileMenu=$n;S.TeamSwitch=nr;S.TeamMenuItem=mt;S.UpgradeMenuItem=or;S.ProfileSettingsMenuItem=Qn;const ir="_breadcrumbsItem_1hm6a_1",cr="_breadcrumbs_1hm6a_1",We={breadcrumbsItem:ir,breadcrumbs:cr},ur=({items:e})=>o.jsx("nav",{"aria-label":"breadcrumb",className:We.breadcrumbs,children:e.map((t,n)=>o.jsxs(b.Fragment,{children:[o.jsx(f.Link,{className:We.breadcrumbsItem,href:t.link,rel:"noreferrer",children:t.name}),n<e.length-1&&o.jsx("span",{children:" — "})]},`${t.link}-${t.name}`))}),lr=({items:e})=>o.jsx(o.Fragment,{children:e.map((t,n)=>o.jsxs(b.Fragment,{children:[!!n&&t.some(s=>s.visible)&&o.jsx(f.MenuDivider,{}),t.filter(({visible:s})=>s).map(({link:s,label:a,onClick:i})=>o.jsx(f.MenuItem,{href:s||"#","aria-label":a,onClick:i,children:a},a))]},t[0].label))}),dr="_badge_1pc1v_1",mr="_tag_1pc1v_15",fr="_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21",_r="_disabled_1pc1v_57",br="_projectNavigationItem_1pc1v_61",gr="_projectNavigationItemDisabled_1pc1v_67",k={badge:dr,tag:mr,withNavLinkStyle:fr,disabled:_r,projectNavigationItem:br,projectNavigationItemDisabled:gr},Ye=({label:e,badge:t,novel:n})=>o.jsxs("div",{className:"flex gap-1",children:[o.jsxs("div",{children:[o.jsx("span",{children:e}),!!t&&o.jsx("div",{className:k.badge,"aria-label":`${t} items requiring attention`,children:t>9?"9+":t})]}),!!n&&o.jsx(f.Tag,{className:k.tag,children:n})]}),_e=b.forwardRef(({label:e,href:t="",disabled:n=!1,badge:s,onClick:a,novel:i},c)=>o.jsx(f.Tooltip,{tooltip:"You do not have access to this function",show:n,children:o.jsx("div",{className:n?k.projectNavigationItemDisabled:k.projectNavigationItem,children:a||n||!t?o.jsx("button",{type:"button",ref:c,className:N(k.withNavLinkStyle,{[k.disabled]:n}),disabled:n,onClick:a,children:o.jsx(Ye,{label:e,badge:s,novel:i})}):o.jsx("a",{href:t,className:k.withNavLinkStyle,children:o.jsx(Ye,{label:e,badge:s,novel:i})})})}));_e.displayName="NavigationTabsItem";const hr=e=>(e==null?void 0:e.some(t=>t.some(n=>n.visible)))??!1,pr=e=>e.visible&&(!e.dropdown||hr(e.dropdown)),vr=({navigation:e,activeItem:t})=>o.jsx("nav",{"aria-label":"Project",children:o.jsx("ul",{className:L.navigationTabList,"aria-orientation":"horizontal",children:e.filter(pr).map(n=>{var s,a,i;return n.dropdown?o.jsx("li",{className:L.navigationTab,"data-testid":n.key,"aria-selected":(s=n.isActive)==null?void 0:s.call(n,t),children:o.jsx(f.Menu,{menuButton:({opened:c})=>o.jsx(_e,{label:n.label,disabled:n.disabled,active:c}),children:o.jsx(f.MenuList,{children:o.jsx(lr,{items:n.dropdown})})})},n.key):o.jsx("li",{className:L.navigationTab,"data-testid":n.key,"aria-selected":(a=n.isActive)==null?void 0:a.call(n,t),children:o.jsx(_e,{label:n.label,href:n.link,onClick:n.onClick,disabled:n.disabled,badge:n.badge,novel:n.novel,active:(i=n.isActive)==null?void 0:i.call(n,t)})},n.key)})})}),Tr=r.z.object({lang_id:r.z.number(),lang_iso:r.z.string(),lang_name:r.z.string(),is_writable:r.z.union([r.z.literal(0),r.z.literal(1)])}),yr=r.z.object({user_id:r.z.number(),email:r.z.string().email(),fullname:r.z.string(),created_at:r.z.string(),created_at_timestamp:r.z.number(),admin_rights:r.z.array(r.z.string()),languages:r.z.array(Tr),is_admin:r.z.boolean(),is_reviewer:r.z.boolean()}),jr=r.z.object({project_id:r.z.string(),contributors:r.z.array(yr)}),ft=J.buildGetRoute({description:"Get the details of a project contributor",requestPathParamsSchema:r.z.object({projectId:r.z.string(),contributorId:r.z.number()}),pathResolver:({projectId:e,contributorId:t})=>`/projects/${e}/contributors/${t}`,successResponseBodySchema:jr}),zr=r.z.object({lang_iso:r.z.string(),custom_iso:r.z.string().optional()}),Sr=r.z.object({language_id:r.z.number(),language_iso:r.z.string(),progress:r.z.number(),words_to_do:r.z.number()}),Te=r.z.union([r.z.literal("localization_files"),r.z.literal("paged_documents"),r.z.literal("marketing")]),wr=r.z.object({per_platform_key_names:r.z.boolean(),reviewing:r.z.boolean(),auto_toggle_unverified:r.z.boolean(),offline_translation:r.z.boolean(),key_editing:r.z.boolean(),inline_machine_translations:r.z.boolean(),custom_translation_statuses:r.z.boolean(),custom_translation_statuses_allow_multiple:r.z.boolean(),segmentation:r.z.boolean(),contributor_preview_download_enabled:r.z.boolean()}),Er=r.z.object({not_reviewed:r.z.number(),unverified:r.z.number(),spelling_grammar:r.z.number(),inconsistent_placeholders:r.z.number(),inconsistent_html:r.z.number(),different_number_of_urls:r.z.number(),different_urls:r.z.number(),leading_whitespace:r.z.number(),trailing_whitespace:r.z.number(),different_number_of_email_address:r.z.number(),different_email_address:r.z.number(),different_brackets:r.z.number(),different_numbers:r.z.number(),double_space:r.z.number(),special_placeholder:r.z.number(),unbalanced_brackets:r.z.number()}),Pr=r.z.object({progress_total:r.z.number(),keys_total:r.z.number(),team:r.z.number(),base_words:r.z.number(),qa_issues_total:r.z.number(),qa_issues:Er}),K=r.z.object({project_id:r.z.string(),uuid:r.z.string().uuid(),project_type:Te,name:r.z.string(),description:r.z.string(),created_at:r.z.string(),created_at_timestamp:r.z.number(),created_by:r.z.number(),created_by_email:r.z.string(),team_id:r.z.number(),base_language_id:r.z.number(),base_language_iso:r.z.string(),settings:wr,statistics:Pr,languages:r.z.array(Sr)}),Ir=r.z.object({name:r.z.string(),team_id:r.z.string(),base_lang_iso:r.z.string(),languages:r.z.array(zr),project_type:Te,is_segmentation_enabled:r.z.boolean()}),ye=()=>"/projects",_t=Ze.buildPayloadRoute({description:"Create a new project",method:"post",pathResolver:ye,requestBodySchema:Ir,successResponseBodySchema:K}),xr=r.z.object({project_type:Te.optional(),filter_team_id:r.z.number().optional(),filter_names:r.z.string().optional(),include_statistics:r.z.boolean().optional(),include_settings:r.z.boolean().optional(),limit:r.z.number().optional(),page:r.z.number().optional()}),Rr=r.z.array(r.z.union([K.omit({statistics:!0,settings:!0}),K.pick({settings:!0,statistics:!0}).partial()])),bt=J.buildGetRoute({description:"List all projects",pathResolver:ye,requestQuerySchema:xr,successResponseBodySchema:Rr}),kr=r.z.object({project_id:r.z.string()}),gt=J.buildGetRoute({description:"Retrieve a project",pathResolver:ye,requestQuerySchema:kr,successResponseBodySchema:K}),ht=r.z.union([r.z.literal("owner"),r.z.literal("admin"),r.z.literal("biller"),r.z.literal("member")]),pt=r.z.object({user_id:r.z.number(),email:r.z.string().email(),fullname:r.z.string(),created_at:r.z.string(),created_at_timestamp:r.z.number(),role:ht}),Nr=r.z.object({team_id:r.z.number(),team_user:pt}),vt=J.buildGetRoute({description:"Get the details of a team user",requestPathParamsSchema:r.z.object({teamId:r.z.number(),userId:r.z.number()}),pathResolver:({teamId:e,userId:t})=>`/teams/${e}/users/${t}`,successResponseBodySchema:Nr}),Tt=r.z.object({accessToken:r.z.string(),refreshToken:r.z.string()}),Y=Ze.buildPayloadRoute({description:"Takes a teamId and returns a JWT token access and refresh token for the user",method:"post",requestPathParamsSchema:r.z.object({teamId:r.z.number()}),pathResolver:e=>`/team/${e.teamId}/actions/get-user-token`,requestHeaderSchema:r.z.union([r.z.object({Authorization:r.z.string().startsWith("Bearer ")}),r.z.object({"x-csrf-token":r.z.string()})]),requestBodySchema:r.z.undefined(),successResponseBodySchema:Tt});function Cr(e,t={}){return C.useMutation({...t,mutationFn:n=>x.sendByPayloadRoute(e,_t,{body:n})})}const yt={teamUserKey:(e,t)=>["GetTeamUsers",e,t]},jt=(e,t)=>C.useQuery({...t,queryFn:({queryKey:[n,s,a]})=>x.sendByGetRoute(e,vt,{pathParams:{teamId:s,userId:a}})}),zt={teamKeyCsrf:(e,t)=>["getUserToken","x-csrf-token",t,e],teamKeyJwt:(e,t)=>["getUserToken","Authorization",`Bearer ${t}`,e]},St=(e,t)=>C.useQuery({...t,queryFn:({queryKey:[n,s,a,i]})=>x.sendByPayloadRoute(e,Y,{pathParams:{teamId:i},headers:s==="x-csrf-token"?{"x-csrf-token":a}:{Authorization:a}})}),Ar={paramsKey:e=>["listProjects",e]};function Lr(e,t){return C.useQuery({...t,queryFn:({queryKey:[n,s]})=>x.sendByGetRoute(e,bt,{queryParams:s})})}const wt={projectUserKey:(e,t)=>["RetrieveContributor",e,t]},Et=(e,t)=>C.useQuery({...t,queryFn:({queryKey:[n,s,a]})=>x.sendByGetRoute(e,ft,{pathParams:{projectId:s,contributorId:a}})}),Or={projectIdKey:e=>["retrieveProject",e]};function qr(e,t){return C.useQuery({...t,queryFn:({queryKey:[n,s]})=>x.sendByGetRoute(e,gt,{queryParams:{project_id:s}})})}const Mr=r.z.object({userId:r.z.number(),userUuid:r.z.string(),teamId:r.z.number(),userTeamRole:ht,userEmail:r.z.string().email(),userName:r.z.string(),userCurrentTeamId:r.z.number(),planId:r.z.number(),planName:r.z.string(),isProviderAlpha:r.z.boolean(),isFullyAuthenticated:r.z.boolean(),exp:r.z.number()});function D(e){try{const t=e.split(".")[1],n=atob(t);return Mr.parse(JSON.parse(n))}catch{return}}const Q=class Q extends CustomEvent{constructor(t){super(Q.eventName,{detail:{token:t,payload:D(t.accessToken)}})}};Pe(Q,"eventName","new-jwt-issued");let O=Q;function je(){const e=be(document.cookie,"accessToken"),t=be(document.cookie,"refreshToken");return!e||!t?Promise.resolve(void 0):Promise.resolve({accessToken:e,refreshToken:t})}function Pt(){return Promise.resolve(be(document.cookie,"csrf_token"))}function be(e,t){var n,s;return(s=(n=e.split(";").find(a=>a.trim().startsWith(`${t}=`)))==null?void 0:n.trim())==null?void 0:s.substring(t.length+1)}function Ur(e,t){const{data:n,isFetching:s}=C.useQuery({queryKey:["csrf-token"],queryFn:Pt}),a=St(e,{queryKey:zt.teamKeyCsrf(t,n??""),enabled:s||n!==void 0}),i=b.useRef();return b.useEffect(()=>{a.data&&a.data.accessToken!==i.current&&(window.dispatchEvent(new O(a.data)),i.current=a.data.accessToken)},[a.data]),{...a,isFetching:a.isFetching||s}}function ze(){const[e,t]=b.useState();return b.useEffect(()=>{let n=!1;const s=a=>{t(a.detail.payload),n=!0};return je().then(a=>a&&D(a.accessToken)).then(a=>{n||t(a)}),window.addEventListener(O.eventName,s),()=>{window.removeEventListener(O.eventName,s)}},[]),e}function Br(e){const t=ze();return jt(e,{queryKey:yt.teamUserKey((t==null?void 0:t.teamId)??0,(t==null?void 0:t.userId)??0)})}function Dr(e,t){const n=ze();return Et(e,{queryKey:wt.projectUserKey(t,(n==null?void 0:n.userId)??0),enabled:n!==void 0})}async function Fr(){const e=await je();if(!e)return Promise.resolve(void 0);const t=D(e.accessToken);return t?{...e,payload:t}:Promise.resolve(void 0)}function G(e){return{Authorization:`Bearer ${e}`}}function Hr(e,t){return n=>async(s,a)=>{var l;const i=await t.getCachedJwtToken();if(i===void 0)return n(s,a);const c=await n(s,{...a,headers:{...a.headers,...G(i.accessToken)}});if(i&&(c.status===401||c.status===403)){const d=D(i.accessToken);if(!d)return c;const u=await x.sendByPayloadRoute(e,Y,{pathParams:{teamId:d.teamId},headers:G(i.refreshToken)});return await((l=t.onNewJwtTokenIssued)==null?void 0:l.call(t,u)),n(s,{...a,headers:{...a.headers,...G(u.accessToken)}})}return c}}const It={wretch:{lokaliseAuth(e){return this.middlewares([Hr(this,e)])}}};function $r(e,t){return n=>async(s,a)=>{var d;if(await t.getCachedJwtToken()!==void 0)return n(s,a);const c=await t.getCsrfToken();if(c===void 0)return n(s,a);const l=await x.sendByPayloadRoute(e,Y,{pathParams:{teamId:await t.getTeamId()},headers:{"x-csrf-token":c}});return await((d=t.onNewJwtTokenIssued)==null?void 0:d.call(t,l)),n(s,{...a,headers:{...a.headers,...G(l.accessToken)}})}}const Gr={wretch:{lokaliseAuth(e={}){return this.addon(It).lokaliseAuth(Ve(e))},promoteClassicSession(e){const t=Ve(e);return this.middlewares([$r(this,t)])}}};function Ve(e){return{...e,getCachedJwtToken:e.getCachedJwtToken??je,getCsrfToken:"getCsrfToken"in e?e.getCsrfToken:Pt,onNewJwtTokenIssued:t=>{var n;return window.dispatchEvent(new O(t)),((n=e.onNewJwtTokenIssued)==null?void 0:n.call(e,t))??Promise.resolve()}}}exports.Breadcrumbs=ur;exports.ENTERPRISE_OPENSOURCE_PLAN_ID=pe;exports.ENTERPRISE_PLAN_IDS=dt;exports.ESSENTIAL_PLAN_IDS=ut;exports.FREE_PLAN_ID=he;exports.JWT_TOKEN_SCHEMA=Tt;exports.LokaliseAuthAddon=It;exports.LokaliseAuthBrowserAddon=Gr;exports.NavigationPanel=U;exports.NavigationTabs=vr;exports.PRO_PLAN_IDS=lt;exports.START_PLAN_IDS=ct;exports.Sidebar=S;exports.TEAM_USER_SCHEMA=pt;exports.TRIAL_PLAN_ID=it;exports.convertNewLineToBreakTag=On;exports.createProject=_t;exports.formatDate=Bn;exports.formatDateTz=Dn;exports.getAuthenticatedSessionDetailFromRequest=Fr;exports.getTeamUser=vt;exports.getTeamUsersQueryKey=yt;exports.getUserToken=Y;exports.getUserTokenKey=zt;exports.isEnterpriseOpenSourcePlan=Cn;exports.isEnterprisePlan=kn;exports.isEssentialPlan=xn;exports.isFreePlan=W;exports.isPaidPlan=Nn;exports.isProPlan=Rn;exports.isStartPlan=In;exports.isTrialPlan=ve;exports.listProjects=bt;exports.listProjectsKey=Ar;exports.makeUrlClickable=Un;exports.parseJwtTokenPayload=D;exports.retrieveContributor=ft;exports.retrieveContributorKeys=wt;exports.retrieveProject=gt;exports.retrieveProjectQueryKey=Or;exports.useAuthenticatedProjectContributor=Dr;exports.useAuthenticatedSessionPayload=ze;exports.useAuthenticatedUser=Br;exports.useCreateProjectMutation=Cr;exports.useEffectOnce=Fn;exports.useGetPromotedClassicSessionJwtQuery=Ur;exports.useGetTeamUsersQuery=jt;exports.useGetUserTokenQuery=St;exports.useListProjectsQuery=Lr;exports.useRetrieveContributorQuery=Et;exports.useRetrieveProjectQuery=qr;
|
1
|
+
"use strict";var kt=Object.defineProperty;var Ct=(e,t,n)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>Ct(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),b=require("react"),f=require("@lokalise/louis"),r=require("zod"),x=require("@lokalise/frontend-http-client"),Ze=require("@lokalise/universal-ts-utils/api-contracts/apiContracts"),N=require("@tanstack/react-query"),J=require("@lokalise/universal-ts-utils/node"),Xe=require("date-fns"),Nt=require("date-fns-tz");function At(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=At(b);var $=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z,Ie;function ge(){if(Ie)return Z;Ie=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Z=e,Z}var X,xe;function Lt(){if(xe)return X;xe=1;var e=typeof $=="object"&&$&&$.Object===Object&&$;return X=e,X}var ee,Re;function tt(){if(Re)return ee;Re=1;var e=Lt(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return ee=n,ee}var te,ke;function Ot(){if(ke)return te;ke=1;var e=tt(),t=function(){return e.Date.now()};return te=t,te}var ne,Ce;function qt(){if(Ce)return ne;Ce=1;var e=/\s/;function t(n){for(var s=n.length;s--&&e.test(n.charAt(s)););return s}return ne=t,ne}var re,Ne;function Mt(){if(Ne)return re;Ne=1;var e=qt(),t=/^\s+/;function n(s){return s&&s.slice(0,e(s)+1).replace(t,"")}return re=n,re}var se,Ae;function nt(){if(Ae)return se;Ae=1;var e=tt(),t=e.Symbol;return se=t,se}var ae,Le;function Ut(){if(Le)return ae;Le=1;var e=nt(),t=Object.prototype,n=t.hasOwnProperty,s=t.toString,a=e?e.toStringTag:void 0;function i(c){var l=n.call(c,a),d=c[a];try{c[a]=void 0;var u=!0}catch{}var m=s.call(c);return u&&(l?c[a]=d:delete c[a]),m}return ae=i,ae}var oe,Oe;function Bt(){if(Oe)return oe;Oe=1;var e=Object.prototype,t=e.toString;function n(s){return t.call(s)}return oe=n,oe}var ie,qe;function Dt(){if(qe)return ie;qe=1;var e=nt(),t=Ut(),n=Bt(),s="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function c(l){return l==null?l===void 0?a:s:i&&i in Object(l)?t(l):n(l)}return ie=c,ie}var ce,Me;function Ht(){if(Me)return ce;Me=1;function e(t){return t!=null&&typeof t=="object"}return ce=e,ce}var ue,Ue;function Ft(){if(Ue)return ue;Ue=1;var e=Dt(),t=Ht(),n="[object Symbol]";function s(a){return typeof a=="symbol"||t(a)&&e(a)==n}return ue=s,ue}var le,Be;function $t(){if(Be)return le;Be=1;var e=Mt(),t=ge(),n=Ft(),s=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function d(u){if(typeof u=="number")return u;if(n(u))return s;if(t(u)){var m=typeof u.valueOf=="function"?u.valueOf():u;u=t(m)?m+"":m}if(typeof u!="string")return u===0?u:+u;u=e(u);var p=i.test(u);return p||c.test(u)?l(u.slice(2),p?2:8):a.test(u)?s:+u}return le=d,le}var de,De;function rt(){if(De)return de;De=1;var e=ge(),t=Ot(),n=$t(),s="Expected a function",a=Math.max,i=Math.min;function c(l,d,u){var m,p,y,j,h,z,w=0,P=!1,g=!1,E=!0;if(typeof l!="function")throw new TypeError(s);d=n(d)||0,e(u)&&(P=!!u.leading,g="maxWait"in u,y=g?a(n(u.maxWait)||0,d):y,E="trailing"in u?!!u.trailing:E);function T(_){var I=m,q=p;return m=p=void 0,w=_,j=l.apply(q,I),j}function v(_){return w=_,h=setTimeout(F,d),P?T(_):j}function H(_){var I=_-z,q=_-w,Ee=d-I;return g?i(Ee,y-q):Ee}function Se(_){var I=_-z,q=_-w;return z===void 0||I>=d||I<0||g&&q>=y}function F(){var _=t();if(Se(_))return we(_);h=setTimeout(F,H(_))}function we(_){return h=void 0,E&&m?T(_):(m=p=void 0,j)}function xt(){h!==void 0&&clearTimeout(h),w=0,m=z=p=h=void 0}function Rt(){return h===void 0?j:we(t())}function V(){var _=t(),I=Se(_);if(m=arguments,p=this,z=_,I){if(h===void 0)return v(z);if(g)return clearTimeout(h),h=setTimeout(F,d),T(z)}return h===void 0&&(h=setTimeout(F,d)),j}return V.cancel=xt,V.flush=Rt,V}return de=c,de}var Gt=rt();const Kt=et(Gt);var me,He;function Qt(){if(He)return me;He=1;var e=rt(),t=ge(),n="Expected a function";function s(a,i,c){var l=!0,d=!0;if(typeof a!="function")throw new TypeError(n);return t(c)&&(l="leading"in c?!!c.leading:l,d="trailing"in c?!!c.trailing:d),e(a,i,{leading:l,maxWait:i,trailing:d})}return me=s,me}var Jt=Qt();const Wt=et(Jt),Yt=(e,t,n,s)=>{switch(t){case"debounce":return Kt(e,n,s);case"throttle":return Wt(e,n,s);default:return e}},Vt=e=>{const t=M.useRef(e);return M.useEffect(()=>{t.current=e}),M.useMemo(()=>(...n)=>{var s;return(s=t.current)===null||s===void 0?void 0:s.call(t,...n)},[])},Zt=e=>{const[t,n]=M.useState((e==null?void 0:e.current)||null);return e&&setTimeout(()=>{e.current!==t&&n(e.current)},0),{refProxy:M.useMemo(()=>new Proxy(a=>{a!==t&&n(a)},{get(a,i){return i==="current"?t:a[i]},set(a,i,c){return i==="current"?n(c):a[i]=c,!0}}),[t]),refElement:t,setRefElement:n}},Xt=(e,t)=>t==="border-box"?{width:e.borderBoxSize[0].inlineSize,height:e.borderBoxSize[0].blockSize}:t==="content-box"?{width:e.contentBoxSize[0].inlineSize,height:e.contentBoxSize[0].blockSize}:{width:e.contentRect.width,height:e.contentRect.height};function en({skipOnMount:e=!1,refreshMode:t,refreshRate:n=1e3,refreshOptions:s,handleWidth:a=!0,handleHeight:i=!0,targetRef:c,observerOptions:l,onResize:d}={}){const u=b.useRef(e),m=Vt(d),[p,y]=b.useState({width:void 0,height:void 0}),{refProxy:j,refElement:h}=Zt(c),{box:z}=l||{},w=b.useCallback(g=>{if(!a&&!i)return;if(u.current){u.current=!1;return}const E=(T,v)=>a&&T.width!==v.width||i&&T.height!==v.height;g.forEach(T=>{const v=Xt(T,z);y(H=>E(H,v)?(m==null||m({width:v.width,height:v.height,entry:T}),v):H)})},[a,i,u,z]),P=b.useCallback(Yt(w,t,n,s),[w,t,n,s]);return b.useEffect(()=>{let g;return h?(g=new window.ResizeObserver(P),g.observe(h,l)):(p.width||p.height)&&(m==null||m({width:null,height:null,entry:null}),y({width:void 0,height:void 0})),()=>{var E,T,v;(E=g==null?void 0:g.disconnect)===null||E===void 0||E.call(g),(v=(T=P).cancel)===null||v===void 0||v.call(T)}},[P,h]),Object.assign({ref:j},p)}function st(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=st(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function C(){for(var e,t,n=0,s="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=st(e))&&(s&&(s+=" "),s+=t);return s}const tn="_headerContainer_1cubo_1",nn="_navigationTabList_1cubo_8",rn="_navigationTab_1cubo_8",sn="_headerContent_1cubo_34",an="_staticEnabled_1cubo_50",L={headerContainer:tn,navigationTabList:nn,navigationTab:rn,headerContent:sn,staticEnabled:an},on=77,U=({sticky:e,children:t})=>{const{ref:n,height:s}=en({refreshMode:"debounce",refreshRate:0}),[a,i]=b.useState(!1),c=()=>a?!e:!0;b.useEffect(()=>{const d=()=>{i(window.scrollY>0)};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]);const l=`${s||on}px`;return o.jsx("div",{style:{minHeight:l},children:o.jsx("div",{children:o.jsxs("div",{ref:n,className:C(L.headerContent,{[L.staticEnabled]:c()}),children:[o.jsx(U.Header,{}),o.jsx(U.Tabs,{}),t]})})})};U.Header=({children:e})=>o.jsx("div",{className:L.headerContainer,children:e});U.Tabs=({children:e})=>o.jsx("div",{className:"flex justify-between gap-2 nowrap",children:e});const cn="_sidebarContainer_bmdti_1",un={sidebarContainer:cn},ln="_logoLink_1baxb_1",dn={logoLink:ln},mn=({src:e,href:t="/",ariaLabel:n="Home",alt:s="Lokalise"})=>o.jsx("a",{className:dn.logoLink,href:t,"aria-label":n,children:o.jsx("img",{src:e,alt:s})}),fn="_link_1weq1_1",_n="_active_1weq1_18",Fe={link:fn,active:_n},bn=({label:e,to:t,icon:n})=>o.jsx(f.Tooltip,{placement:"right",tooltip:e,children:o.jsx(f.Link,{className:C(Fe.link,{[Fe.active]:window.location.pathname.startsWith(t)}),href:t,children:o.jsx(n,{size:"25px"})})}),gn="_dropdownButton_hwh0c_1",hn="_dropdownButtonActive_hwh0c_18",$e={dropdownButton:gn,dropdownButtonActive:hn},pn=({children:e,icon:t})=>o.jsx(f.Menu,{menuButton:({opened:n})=>o.jsx(f.Tooltip,{placement:"right",tooltip:"Help",children:o.jsx("button",{type:"button",className:C($e.dropdownButton,{[$e.dropdownButtonActive]:n}),children:o.jsx(t,{size:"25px"})})}),children:o.jsx(f.MenuList,{placement:"right-start",children:e})}),vn="_iconContainer_nz34m_1",Tn={iconContainer:vn},at=({className:e=""})=>o.jsx("div",{"aria-label":"Upgrade Icon",className:C(Tn.iconContainer,"flex-row","items-center","justify-center",e),children:o.jsx(f.CaretUpIcon,{})}),yn="_menuContainer_wbu3u_5",jn="_profileButton_wbu3u_16",zn="_profileImage_wbu3u_29",Sn="_profileImageHighlight_wbu3u_37",wn="_profileImageUpgradeIcon_wbu3u_41",En="_userIconWrapper_wbu3u_47",R={menuContainer:yn,profileButton:jn,profileImage:zn,profileImageHighlight:Sn,profileImageUpgradeIcon:wn,userIconWrapper:En},ot=b.createContext({}),B=()=>b.useContext(ot),Pn=({children:e})=>{const{currentTeam:t,otherTeams:n,showUpgradeCta:s,showBillingButton:a,allowTeamCreation:i,isLimitedView:c,isProviderAlpha:l,canAccessTeamSettings:d,isEndOfTrialActive:u,isTeamSuspended:m}=B();return o.jsx(f.Menu,{menuButton:()=>o.jsxs("button",{className:R.profileButton,"aria-label":"Profile menu",type:"button",children:[t!=null&&t.logoUrl?o.jsx("img",{src:t.logoUrl,className:C(R.profileImage,{[R.profileImageHighlight]:s}),alt:"Team Logo"}):o.jsx("div",{className:C(R.userIconWrapper,"flex-row","align-center","items-center",{[R.profileImageHighlight]:s}),children:o.jsx(f.UserIcon,{size:"25px"})}),s&&o.jsx(at,{className:R.profileImageUpgradeIcon})]}),children:o.jsx(f.MenuList,{placement:"right-end",className:R.menuContainer,children:e({allowTeamCreation:i,otherTeams:n,isLimitedView:c,canAccessTeamSettings:d,isEndOfTrialActive:u,isTeamSuspended:m,showBillingButton:a,isProviderAlpha:l})})})},he=0,it=9999,ct=[150,151,250,251],ut=[152,153,252,253],lt=[154,155,157,158,254,255,258,354,355,358],dt=[156,159,160,256,259,260],pe=9998,W=e=>e===he,ve=e=>e===it,In=e=>ct.includes(e),xn=e=>ut.includes(e),Rn=e=>lt.includes(e),kn=e=>dt.includes(e),Cn=e=>e>he&&e<pe,Nn=e=>e===pe,An=/\n/,Ge=(e,t,n)=>e.split(t).flatMap((s,a)=>a!==0?[b.cloneElement(n,{key:Math.random().toString(32).slice(0,10)}),s]:s),Ln=(e,t,n)=>typeof e=="string"?Ge(e,t,n):e.flatMap(s=>typeof s=="string"?Ge(s,t,n):s),On=e=>Ln(e,An,o.jsx("br",{})),qn=/(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi,Mn=e=>e.match(qn)??[],Ke=(e,t,n)=>{const s=e.split(t);if(s.length===1)return e;const a=[];return s[0]!==""&&a.push(s[0]),s.shift(),s[s.length-1]===""&&s.pop(),a.push(o.jsx("a",{href:t,target:"_blank",rel:"noreferrer noopener",children:t},t+n)),a.push(s.join(t)),a.filter(i=>i!=="")},Qe=e=>{const t=Mn(e);return t!=null&&t.length?t.reduce((n,s,a)=>typeof n=="string"?Ke(n,s,a):n.flatMap(i=>typeof i=="string"?Ke(i,s,a):i),e):e},Un=e=>typeof e=="string"?Qe(e):e.flatMap(t=>typeof t=="string"?Qe(t):t,e),Bn=(e,t="PP")=>Xe.format(e,t),Dn=(e,t,n="PP")=>Xe.format(Nt.toZonedTime(e,t),n),Hn=e=>{b.useEffect(e,[])},Fn=({children:e,config:t})=>{const{teams:n,currentTeamId:s,planId:a,isLimitedView:i,isTeamSuspended:c,canAccessTeamSettings:l,isEndOfTrialActive:d}=t,u=n.find(g=>g.id===s),m=n.filter(g=>g.id!==s),p=(u==null?void 0:u.role)??"",y=["biller","owner"].includes(p),j=W(a)||ve(a),P={...t,currentTeam:u,otherTeams:m,canChangeBilling:y,isOnFreeOrTrialPlan:j,showUpgradeCta:!i&&j&&y&&!c,showBillingButton:!i&&l&&y,allowTeamCreation:!i&&!d};return o.jsx(ot.Provider,{value:P,children:e})},$n=({config:e,children:t})=>o.jsx(Fn,{config:e,children:o.jsx(Pn,{children:t})}),Gn="_container_q5pot_1",Kn="_profileEmail_q5pot_5",Je={container:Gn,profileEmail:Kn},Qn=({href:e,onClick:t,userEmail:n,hideBottomDivider:s})=>{const{isEndOfTrialActive:a,isTeamSuspended:i}=B();return a||i?null:o.jsxs(o.Fragment,{children:[o.jsx(f.MenuItem,{href:e,onClick:()=>{t==null||t()},children:o.jsxs("div",{className:`flex-col ${Je.container}`,children:[o.jsx("span",{children:"Profile Settings"}),o.jsx("span",{className:Je.profileEmail,children:n})]})}),!s&&o.jsx(f.MenuDivider,{})]})},Jn="_wrapper_15d85_1",Wn="_profileImage_15d85_14",Yn="_teamName_15d85_22",Vn="_planLabel_15d85_29",Zn="_membership_15d85_38",Xn="_defaultProfileImage_15d85_44",A={wrapper:Jn,profileImage:Wn,teamName:Yn,planLabel:Vn,membership:Zn,defaultProfileImage:Xn},mt=({team:e,onClick:t,hidePlanLabel:n})=>{const{currentTeam:s,planId:a}=B(),i=e||s;if(!i)return null;const c=W(a)?"Free":ve(a)?"Trial":void 0,l=t?f.MenuItem:"div";return o.jsxs(l,{className:`flex-row gap-2 flex-nowrap items-center ${A.wrapper}`,...t&&{onClick:()=>t(i)},children:[i.logoUrl?o.jsx("img",{className:A.profileImage,src:i.logoUrl,alt:"Team Logo"}):o.jsx("span",{className:`flex-row justify-center items-center ${A.defaultProfileImage}`,children:o.jsx(f.UserIcon,{size:"25px"})}),o.jsxs("div",{className:"flex-col items-start",children:[o.jsxs("div",{className:"flex-row items-center flex-nowrap gap-2",children:[o.jsx("span",{title:i.name,className:A.teamName,children:i.name}),c&&!n&&o.jsx("span",{className:`flex-row justify-center items-center ${A.planLabel}`,children:c})]}),o.jsx("span",{className:A.membership,children:i.role})]})]})},er="_teamsContainer_1t68g_1",tr={teamsContainer:er},nr=({onSwitchTeam:e})=>{const{otherTeams:t}=B();return t.length===0?null:o.jsx("div",{className:`flex-col items-stretch ${tr.teamsContainer}`,children:t.map(n=>o.jsx(mt,{team:n,onClick:e,hidePlanLabel:!0},n.id))})},rr="_container_1u995_1",sr="_planCta_1u995_15",ar="_upgradeIconWrapper_1u995_19",fe={container:rr,planCta:sr,upgradeIconWrapper:ar},or=({upgradeOptionHref:e})=>{const{planId:t,trialDaysLeft:n,showUpgradeCta:s}=B();if(!s)return null;const c=W(t)?"Your team is currently on the Free plan":`Free trial ends in ${n} ${n===1?"day":"days"}`;return o.jsxs(f.MenuItem,{href:e,className:`flex-col gap-1 items-start ${fe.container}`,children:[o.jsx("span",{className:fe.planCta,children:c}),o.jsxs("div",{className:`flex-row items-center gap-1 ${fe.upgradeIconWrapper}`,children:[o.jsx(at,{}),o.jsx("span",{children:"See upgrade options"})]})]})},S=({children:e,...t})=>o.jsx("nav",{...t,className:un.sidebarContainer,children:e});S.Top=({children:e})=>o.jsx("div",{children:e});S.Bottom=({children:e})=>o.jsx("div",{children:e});S.Avatar=mn;S.IconLink=bn;S.Menu=pn;S.ProfileMenu=$n;S.TeamSwitch=nr;S.TeamMenuItem=mt;S.UpgradeMenuItem=or;S.ProfileSettingsMenuItem=Qn;const ir="_breadcrumbsItem_1hm6a_1",cr="_breadcrumbs_1hm6a_1",We={breadcrumbsItem:ir,breadcrumbs:cr},ur=({items:e})=>o.jsx("nav",{"aria-label":"breadcrumb",className:We.breadcrumbs,children:e.map((t,n)=>o.jsxs(b.Fragment,{children:[o.jsx(f.Link,{className:We.breadcrumbsItem,href:t.link,rel:"noreferrer",children:t.name}),n<e.length-1&&o.jsx("span",{children:" — "})]},`${t.link}-${t.name}`))}),lr=({items:e})=>o.jsx(o.Fragment,{children:e.map((t,n)=>o.jsxs(b.Fragment,{children:[!!n&&t.some(s=>s.visible)&&o.jsx(f.MenuDivider,{}),t.filter(({visible:s})=>s).map(({link:s,label:a,onClick:i})=>o.jsx(f.MenuItem,{href:s||"#","aria-label":a,onClick:i,children:a},a))]},t[0].label))}),dr="_badge_1pc1v_1",mr="_tag_1pc1v_15",fr="_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21",_r="_disabled_1pc1v_57",br="_projectNavigationItem_1pc1v_61",gr="_projectNavigationItemDisabled_1pc1v_67",k={badge:dr,tag:mr,withNavLinkStyle:fr,disabled:_r,projectNavigationItem:br,projectNavigationItemDisabled:gr},Ye=({label:e,badge:t,novel:n})=>o.jsxs("div",{className:"flex gap-1",children:[o.jsxs("div",{children:[o.jsx("span",{children:e}),!!t&&o.jsx("div",{className:k.badge,"aria-label":`${t} items requiring attention`,children:t>9?"9+":t})]}),!!n&&o.jsx(f.Tag,{className:k.tag,children:n})]}),_e=b.forwardRef(({label:e,href:t="",disabled:n=!1,badge:s,onClick:a,novel:i},c)=>o.jsx(f.Tooltip,{tooltip:"You do not have access to this function",show:n,children:o.jsx("div",{className:n?k.projectNavigationItemDisabled:k.projectNavigationItem,children:a||n||!t?o.jsx("button",{type:"button",ref:c,className:C(k.withNavLinkStyle,{[k.disabled]:n}),disabled:n,onClick:a,children:o.jsx(Ye,{label:e,badge:s,novel:i})}):o.jsx("a",{href:t,className:k.withNavLinkStyle,children:o.jsx(Ye,{label:e,badge:s,novel:i})})})}));_e.displayName="NavigationTabsItem";const hr=e=>(e==null?void 0:e.some(t=>t.some(n=>n.visible)))??!1,pr=e=>e.visible&&(!e.dropdown||hr(e.dropdown)),vr=({navigation:e,activeItem:t})=>o.jsx("nav",{"aria-label":"Project",children:o.jsx("ul",{className:L.navigationTabList,"aria-orientation":"horizontal",children:e.filter(pr).map(n=>{var s,a,i;return n.dropdown?o.jsx("li",{className:L.navigationTab,"data-testid":n.key,"aria-selected":(s=n.isActive)==null?void 0:s.call(n,t),children:o.jsx(f.Menu,{menuButton:({opened:c})=>o.jsx(_e,{label:n.label,disabled:n.disabled,active:c}),children:o.jsx(f.MenuList,{children:o.jsx(lr,{items:n.dropdown})})})},n.key):o.jsx("li",{className:L.navigationTab,"data-testid":n.key,"aria-selected":(a=n.isActive)==null?void 0:a.call(n,t),children:o.jsx(_e,{label:n.label,href:n.link,onClick:n.onClick,disabled:n.disabled,badge:n.badge,novel:n.novel,active:(i=n.isActive)==null?void 0:i.call(n,t)})},n.key)})})}),Tr=r.z.object({lang_id:r.z.number(),lang_iso:r.z.string(),lang_name:r.z.string(),is_writable:r.z.union([r.z.literal(0),r.z.literal(1)])}),yr=r.z.object({user_id:r.z.number(),email:r.z.string().email(),fullname:r.z.string(),created_at:r.z.string(),created_at_timestamp:r.z.number(),admin_rights:r.z.array(r.z.string()),languages:r.z.array(Tr),is_admin:r.z.boolean(),is_reviewer:r.z.boolean()}),jr=r.z.object({project_id:r.z.string(),contributors:r.z.array(yr)}),ft=J.buildGetRoute({description:"Get the details of a project contributor",requestPathParamsSchema:r.z.object({projectId:r.z.string(),contributorId:r.z.number()}),pathResolver:({projectId:e,contributorId:t})=>`/projects/${e}/contributors/${t}`,successResponseBodySchema:jr}),zr=r.z.object({lang_iso:r.z.string(),custom_iso:r.z.string().optional()}),Sr=r.z.object({language_id:r.z.number(),language_iso:r.z.string(),progress:r.z.number(),words_to_do:r.z.number()}),Te=r.z.union([r.z.literal("localization_files"),r.z.literal("paged_documents"),r.z.literal("marketing")]),wr=r.z.object({per_platform_key_names:r.z.boolean(),reviewing:r.z.boolean(),auto_toggle_unverified:r.z.boolean(),offline_translation:r.z.boolean(),key_editing:r.z.boolean(),inline_machine_translations:r.z.boolean(),custom_translation_statuses:r.z.boolean(),custom_translation_statuses_allow_multiple:r.z.boolean(),segmentation:r.z.boolean(),contributor_preview_download_enabled:r.z.boolean()}),Er=r.z.object({not_reviewed:r.z.number(),unverified:r.z.number(),spelling_grammar:r.z.number(),inconsistent_placeholders:r.z.number(),inconsistent_html:r.z.number(),different_number_of_urls:r.z.number(),different_urls:r.z.number(),leading_whitespace:r.z.number(),trailing_whitespace:r.z.number(),different_number_of_email_address:r.z.number(),different_email_address:r.z.number(),different_brackets:r.z.number(),different_numbers:r.z.number(),double_space:r.z.number(),special_placeholder:r.z.number(),unbalanced_brackets:r.z.number()}),Pr=r.z.object({progress_total:r.z.number(),keys_total:r.z.number(),team:r.z.number(),base_words:r.z.number(),qa_issues_total:r.z.number(),qa_issues:Er,languages:r.z.array(Sr)}),K=r.z.object({project_id:r.z.string(),uuid:r.z.string().uuid(),project_type:Te,name:r.z.string(),description:r.z.string(),created_at:r.z.string(),created_at_timestamp:r.z.number(),created_by:r.z.number(),created_by_email:r.z.string(),team_id:r.z.number(),base_language_id:r.z.number(),base_language_iso:r.z.string(),settings:wr,statistics:Pr}),Ir=r.z.object({name:r.z.string(),team_id:r.z.string(),base_lang_iso:r.z.string(),languages:r.z.array(zr),project_type:Te,is_segmentation_enabled:r.z.boolean()}),ye=()=>"/projects",_t=Ze.buildPayloadRoute({description:"Create a new project",method:"post",pathResolver:ye,requestBodySchema:Ir,successResponseBodySchema:K}),xr=r.z.object({project_type:Te.optional(),filter_team_id:r.z.number().optional(),filter_names:r.z.string().optional(),include_statistics:r.z.boolean().optional(),include_settings:r.z.boolean().optional(),limit:r.z.number().optional(),page:r.z.number().optional()}),Rr=r.z.array(r.z.union([K.omit({statistics:!0,settings:!0}),K.pick({settings:!0,statistics:!0}).partial()])),bt=J.buildGetRoute({description:"List all projects",pathResolver:ye,requestQuerySchema:xr,successResponseBodySchema:Rr}),kr=r.z.object({project_id:r.z.string()}),gt=J.buildGetRoute({description:"Retrieve a project",pathResolver:ye,requestQuerySchema:kr,successResponseBodySchema:K}),ht=r.z.union([r.z.literal("owner"),r.z.literal("admin"),r.z.literal("biller"),r.z.literal("member")]),pt=r.z.object({user_id:r.z.number(),email:r.z.string().email(),fullname:r.z.string(),created_at:r.z.string(),created_at_timestamp:r.z.number(),role:ht}),Cr=r.z.object({team_id:r.z.number(),team_user:pt}),vt=J.buildGetRoute({description:"Get the details of a team user",requestPathParamsSchema:r.z.object({teamId:r.z.number(),userId:r.z.number()}),pathResolver:({teamId:e,userId:t})=>`/teams/${e}/users/${t}`,successResponseBodySchema:Cr}),Tt=r.z.object({accessToken:r.z.string(),refreshToken:r.z.string()}),Y=Ze.buildPayloadRoute({description:"Takes a teamId and returns a JWT token access and refresh token for the user",method:"post",requestPathParamsSchema:r.z.object({teamId:r.z.number()}),pathResolver:e=>`/team/${e.teamId}/actions/get-user-token`,requestHeaderSchema:r.z.union([r.z.object({Authorization:r.z.string().startsWith("Bearer ")}),r.z.object({"x-csrf-token":r.z.string()})]),requestBodySchema:r.z.undefined(),successResponseBodySchema:Tt});function Nr(e,t={}){return N.useMutation({...t,mutationFn:n=>x.sendByPayloadRoute(e,_t,{body:n})})}const yt={teamUserKey:(e,t)=>["GetTeamUsers",e,t]},jt=(e,t)=>N.useQuery({...t,queryFn:({queryKey:[n,s,a]})=>x.sendByGetRoute(e,vt,{pathParams:{teamId:s,userId:a}})}),zt={teamKeyCsrf:(e,t)=>["getUserToken","x-csrf-token",t,e],teamKeyJwt:(e,t)=>["getUserToken","Authorization",`Bearer ${t}`,e]},St=(e,t)=>N.useQuery({...t,queryFn:({queryKey:[n,s,a,i]})=>x.sendByPayloadRoute(e,Y,{pathParams:{teamId:i},headers:s==="x-csrf-token"?{"x-csrf-token":a}:{Authorization:a}})}),Ar={paramsKey:e=>["listProjects",e]};function Lr(e,t){return N.useQuery({...t,queryFn:({queryKey:[n,s]})=>x.sendByGetRoute(e,bt,{queryParams:s})})}const wt={projectUserKey:(e,t)=>["RetrieveContributor",e,t]},Et=(e,t)=>N.useQuery({...t,queryFn:({queryKey:[n,s,a]})=>x.sendByGetRoute(e,ft,{pathParams:{projectId:s,contributorId:a}})}),Or={projectIdKey:e=>["retrieveProject",e]};function qr(e,t){return N.useQuery({...t,queryFn:({queryKey:[n,s]})=>x.sendByGetRoute(e,gt,{queryParams:{project_id:s}})})}const Mr=r.z.object({userId:r.z.number(),userUuid:r.z.string(),teamId:r.z.number(),userTeamRole:ht,userEmail:r.z.string().email(),userName:r.z.string(),userCurrentTeamId:r.z.number(),planId:r.z.number(),planName:r.z.string(),isProviderAlpha:r.z.boolean(),isFullyAuthenticated:r.z.boolean(),exp:r.z.number()});function D(e){try{const t=e.split(".")[1],n=atob(t);return Mr.parse(JSON.parse(n))}catch{return}}const Q=class Q extends CustomEvent{constructor(t){super(Q.eventName,{detail:{token:t,payload:D(t.accessToken)}})}};Pe(Q,"eventName","new-jwt-issued");let O=Q;function je(){const e=be(document.cookie,"accessToken"),t=be(document.cookie,"refreshToken");return!e||!t?Promise.resolve(void 0):Promise.resolve({accessToken:e,refreshToken:t})}function Pt(){return Promise.resolve(be(document.cookie,"csrf_token"))}function be(e,t){var n,s;return(s=(n=e.split(";").find(a=>a.trim().startsWith(`${t}=`)))==null?void 0:n.trim())==null?void 0:s.substring(t.length+1)}function Ur(e,t){const{data:n,isFetching:s}=N.useQuery({queryKey:["csrf-token"],queryFn:Pt}),a=St(e,{queryKey:zt.teamKeyCsrf(t,n??""),enabled:s||n!==void 0}),i=b.useRef();return b.useEffect(()=>{a.data&&a.data.accessToken!==i.current&&(window.dispatchEvent(new O(a.data)),i.current=a.data.accessToken)},[a.data]),{...a,isFetching:a.isFetching||s}}function ze(){const[e,t]=b.useState();return b.useEffect(()=>{let n=!1;const s=a=>{t(a.detail.payload),n=!0};return je().then(a=>a&&D(a.accessToken)).then(a=>{n||t(a)}),window.addEventListener(O.eventName,s),()=>{window.removeEventListener(O.eventName,s)}},[]),e}function Br(e){const t=ze();return jt(e,{queryKey:yt.teamUserKey((t==null?void 0:t.teamId)??0,(t==null?void 0:t.userId)??0)})}function Dr(e,t){const n=ze();return Et(e,{queryKey:wt.projectUserKey(t,(n==null?void 0:n.userId)??0),enabled:n!==void 0})}async function Hr(){const e=await je();if(!e)return Promise.resolve(void 0);const t=D(e.accessToken);return t?{...e,payload:t}:Promise.resolve(void 0)}function Fr(){return e=>(t,n)=>e(t,{...n,headers:{...n.headers,"x-lokalise-plugin":"true"},credentials:"omit"})}function G(e){return{Authorization:`Bearer ${e}`}}function $r(e,t){return n=>async(s,a)=>{var l;const i=await t.getCachedJwtToken();if(i===void 0)return n(s,a);const c=await n(s,{...a,headers:{...a.headers,...G(i.accessToken)}});if(i&&(c.status===401||c.status===403)){const d=D(i.accessToken);if(!d)return c;const u=await x.sendByPayloadRoute(e,Y,{pathParams:{teamId:d.teamId},headers:G(i.refreshToken)});return await((l=t.onNewJwtTokenIssued)==null?void 0:l.call(t,u)),n(s,{...a,headers:{...a.headers,...G(u.accessToken)}})}return c}}const It={wretch:{lokaliseAuth(e){return this.middlewares([$r(this,e)])}}};function Gr(e,t){return n=>async(s,a)=>{var d;if(await t.getCachedJwtToken()!==void 0)return n(s,a);const c=await t.getCsrfToken();if(c===void 0)return n(s,a);const l=await x.sendByPayloadRoute(e,Y,{pathParams:{teamId:await t.getTeamId()},headers:{"x-csrf-token":c}});return await((d=t.onNewJwtTokenIssued)==null?void 0:d.call(t,l)),n(s,{...a,headers:{...a.headers,...G(l.accessToken)}})}}const Kr={wretch:{lokaliseAuth(e={}){return this.addon(It).lokaliseAuth(Ve(e))},promoteClassicSession(e){const t=Ve(e);return this.middlewares([Gr(this,t)])}}};function Ve(e){return{...e,getCachedJwtToken:e.getCachedJwtToken??je,getCsrfToken:"getCsrfToken"in e?e.getCsrfToken:Pt,onNewJwtTokenIssued:t=>{var n;return window.dispatchEvent(new O(t)),((n=e.onNewJwtTokenIssued)==null?void 0:n.call(e,t))??Promise.resolve()}}}exports.Breadcrumbs=ur;exports.ENTERPRISE_OPENSOURCE_PLAN_ID=pe;exports.ENTERPRISE_PLAN_IDS=dt;exports.ESSENTIAL_PLAN_IDS=ut;exports.FREE_PLAN_ID=he;exports.JWT_TOKEN_SCHEMA=Tt;exports.LokaliseAuthAddon=It;exports.LokaliseAuthBrowserAddon=Kr;exports.NavigationPanel=U;exports.NavigationTabs=vr;exports.PRO_PLAN_IDS=lt;exports.START_PLAN_IDS=ct;exports.Sidebar=S;exports.TEAM_USER_SCHEMA=pt;exports.TRIAL_PLAN_ID=it;exports.convertNewLineToBreakTag=On;exports.createProject=_t;exports.formatDate=Bn;exports.formatDateTz=Dn;exports.getAuthenticatedSessionDetailFromRequest=Hr;exports.getTeamUser=vt;exports.getTeamUsersQueryKey=yt;exports.getUserToken=Y;exports.getUserTokenKey=zt;exports.isEnterpriseOpenSourcePlan=Nn;exports.isEnterprisePlan=kn;exports.isEssentialPlan=xn;exports.isFreePlan=W;exports.isPaidPlan=Cn;exports.isProPlan=Rn;exports.isStartPlan=In;exports.isTrialPlan=ve;exports.listProjects=bt;exports.listProjectsKey=Ar;exports.makeUrlClickable=Un;exports.parseJwtTokenPayload=D;exports.publicApiHeadersMiddleware=Fr;exports.retrieveContributor=ft;exports.retrieveContributorKeys=wt;exports.retrieveProject=gt;exports.retrieveProjectQueryKey=Or;exports.useAuthenticatedProjectContributor=Dr;exports.useAuthenticatedSessionPayload=ze;exports.useAuthenticatedUser=Br;exports.useCreateProjectMutation=Nr;exports.useEffectOnce=Hn;exports.useGetPromotedClassicSessionJwtQuery=Ur;exports.useGetTeamUsersQuery=jt;exports.useGetUserTokenQuery=St;exports.useListProjectsQuery=Lr;exports.useRetrieveContributorQuery=Et;exports.useRetrieveProjectQuery=qr;
|
package/dist/harmony.mjs
CHANGED
@@ -3,7 +3,7 @@ var kt = (e, t, n) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writ
|
|
3
3
|
var Ne = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
|
4
4
|
import { jsx as i, jsxs as p, Fragment as tt } from "react/jsx-runtime";
|
5
5
|
import * as M from "react";
|
6
|
-
import { useRef as nt, useState as ge, useCallback as je, useEffect as x, useContext as
|
6
|
+
import { useRef as nt, useState as ge, useCallback as je, useEffect as x, useContext as Ct, createContext as Pt, cloneElement as Nt, Fragment as rt, forwardRef as jt } from "react";
|
7
7
|
import { Tooltip as he, Link as at, Menu as pe, MenuList as ve, CaretUpIcon as Rt, UserIcon as ot, MenuItem as K, MenuDivider as it, Tag as At } from "@lokalise/louis";
|
8
8
|
import { z as r } from "zod";
|
9
9
|
import { sendByPayloadRoute as J, sendByGetRoute as W } from "@lokalise/frontend-http-client";
|
@@ -167,38 +167,38 @@ function mt() {
|
|
167
167
|
throw new TypeError(a);
|
168
168
|
d = n(d) || 0, e(l) && (k = !!l.leading, _ = "maxWait" in l, T = _ ? o(n(l.maxWait) || 0, d) : T, E = "trailing" in l ? !!l.trailing : E);
|
169
169
|
function v(f) {
|
170
|
-
var
|
171
|
-
return m = g = void 0, I = f, y = u.apply(q,
|
170
|
+
var C = m, q = g;
|
171
|
+
return m = g = void 0, I = f, y = u.apply(q, C), y;
|
172
172
|
}
|
173
173
|
function h(f) {
|
174
174
|
return I = f, b = setTimeout($, d), k ? v(f) : y;
|
175
175
|
}
|
176
176
|
function B(f) {
|
177
|
-
var
|
178
|
-
return _ ? s(
|
177
|
+
var C = f - w, q = f - I, Pe = d - C;
|
178
|
+
return _ ? s(Pe, T - q) : Pe;
|
179
179
|
}
|
180
180
|
function ke(f) {
|
181
|
-
var
|
182
|
-
return w === void 0 ||
|
181
|
+
var C = f - w, q = f - I;
|
182
|
+
return w === void 0 || C >= d || C < 0 || _ && q >= T;
|
183
183
|
}
|
184
184
|
function $() {
|
185
185
|
var f = t();
|
186
186
|
if (ke(f))
|
187
|
-
return
|
187
|
+
return Ce(f);
|
188
188
|
b = setTimeout($, B(f));
|
189
189
|
}
|
190
|
-
function
|
190
|
+
function Ce(f) {
|
191
191
|
return b = void 0, E && m ? v(f) : (m = g = void 0, y);
|
192
192
|
}
|
193
193
|
function St() {
|
194
194
|
b !== void 0 && clearTimeout(b), I = 0, m = w = g = b = void 0;
|
195
195
|
}
|
196
196
|
function It() {
|
197
|
-
return b === void 0 ? y :
|
197
|
+
return b === void 0 ? y : Ce(t());
|
198
198
|
}
|
199
199
|
function V() {
|
200
|
-
var f = t(),
|
201
|
-
if (m = arguments, g = this, w = f,
|
200
|
+
var f = t(), C = ke(f);
|
201
|
+
if (m = arguments, g = this, w = f, C) {
|
202
202
|
if (b === void 0)
|
203
203
|
return h(w);
|
204
204
|
if (_)
|
@@ -412,14 +412,14 @@ const cn = "_sidebarContainer_bmdti_1", ln = {
|
|
412
412
|
),
|
413
413
|
children: /* @__PURE__ */ i(Rt, {})
|
414
414
|
}
|
415
|
-
), yn = "_menuContainer_wbu3u_5", wn = "_profileButton_wbu3u_16", Sn = "_profileImage_wbu3u_29", In = "_profileImageHighlight_wbu3u_37", En = "_profileImageUpgradeIcon_wbu3u_41", kn = "_userIconWrapper_wbu3u_47",
|
415
|
+
), yn = "_menuContainer_wbu3u_5", wn = "_profileButton_wbu3u_16", Sn = "_profileImage_wbu3u_29", In = "_profileImageHighlight_wbu3u_37", En = "_profileImageUpgradeIcon_wbu3u_41", kn = "_userIconWrapper_wbu3u_47", P = {
|
416
416
|
menuContainer: yn,
|
417
417
|
profileButton: wn,
|
418
418
|
profileImage: Sn,
|
419
419
|
profileImageHighlight: In,
|
420
420
|
profileImageUpgradeIcon: En,
|
421
421
|
userIconWrapper: kn
|
422
|
-
}, bt =
|
422
|
+
}, bt = Pt({}), U = () => Ct(bt), Cn = ({ children: e }) => {
|
423
423
|
const {
|
424
424
|
currentTeam: t,
|
425
425
|
otherTeams: n,
|
@@ -435,28 +435,28 @@ const cn = "_sidebarContainer_bmdti_1", ln = {
|
|
435
435
|
return /* @__PURE__ */ i(
|
436
436
|
pe,
|
437
437
|
{
|
438
|
-
menuButton: () => /* @__PURE__ */ p("button", { className:
|
438
|
+
menuButton: () => /* @__PURE__ */ p("button", { className: P.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
439
439
|
t != null && t.logoUrl ? /* @__PURE__ */ i(
|
440
440
|
"img",
|
441
441
|
{
|
442
442
|
src: t.logoUrl,
|
443
|
-
className: j(
|
444
|
-
[
|
443
|
+
className: j(P.profileImage, {
|
444
|
+
[P.profileImageHighlight]: a
|
445
445
|
}),
|
446
446
|
alt: "Team Logo"
|
447
447
|
}
|
448
448
|
) : /* @__PURE__ */ i(
|
449
449
|
"div",
|
450
450
|
{
|
451
|
-
className: j(
|
452
|
-
[
|
451
|
+
className: j(P.userIconWrapper, "flex-row", "align-center", "items-center", {
|
452
|
+
[P.profileImageHighlight]: a
|
453
453
|
}),
|
454
454
|
children: /* @__PURE__ */ i(ot, { size: "25px" })
|
455
455
|
}
|
456
456
|
),
|
457
|
-
a && /* @__PURE__ */ i(_t, { className:
|
457
|
+
a && /* @__PURE__ */ i(_t, { className: P.profileImageUpgradeIcon })
|
458
458
|
] }),
|
459
|
-
children: /* @__PURE__ */ i(ve, { placement: "right-end", className:
|
459
|
+
children: /* @__PURE__ */ i(ve, { placement: "right-end", className: P.menuContainer, children: e({
|
460
460
|
allowTeamCreation: s,
|
461
461
|
otherTeams: n,
|
462
462
|
isLimitedView: c,
|
@@ -468,7 +468,7 @@ const cn = "_sidebarContainer_bmdti_1", ln = {
|
|
468
468
|
}) })
|
469
469
|
}
|
470
470
|
);
|
471
|
-
}, gt = 0,
|
471
|
+
}, gt = 0, Pn = 9999, Nn = [150, 151, 250, 251], jn = [152, 153, 252, 253], Rn = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], An = [156, 159, 160, 256, 259, 260], ht = 9998, ye = (e) => e === gt, pt = (e) => e === Pn, Xr = (e) => Nn.includes(e), ea = (e) => jn.includes(e), ta = (e) => Rn.includes(e), na = (e) => An.includes(e), ra = (e) => e > gt && e < ht, aa = (e) => e === ht, On = /\n/, We = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [Nt(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), Ln = (e, t, n) => typeof e == "string" ? We(e, t, n) : e.flatMap((a) => typeof a == "string" ? We(a, t, n) : a), oa = (e) => Ln(e, On, /* @__PURE__ */ i("br", {})), qn = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, Mn = (e) => e.match(qn) ?? [], Qe = (e, t, n) => {
|
472
472
|
const a = e.split(t);
|
473
473
|
if (a.length === 1)
|
474
474
|
return e;
|
@@ -501,7 +501,7 @@ const cn = "_sidebarContainer_bmdti_1", ln = {
|
|
501
501
|
allowTeamCreation: !s && !d
|
502
502
|
};
|
503
503
|
return /* @__PURE__ */ i(bt.Provider, { value: k, children: e });
|
504
|
-
}, Un = ({ config: e, children: t }) => /* @__PURE__ */ i(xn, { config: e, children: /* @__PURE__ */ i(
|
504
|
+
}, Un = ({ config: e, children: t }) => /* @__PURE__ */ i(xn, { config: e, children: /* @__PURE__ */ i(Cn, { children: t }) }), Bn = "_container_q5pot_1", $n = "_profileEmail_q5pot_5", Ve = {
|
505
505
|
container: Bn,
|
506
506
|
profileEmail: $n
|
507
507
|
}, Hn = ({
|
@@ -740,7 +740,8 @@ const ur = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
740
740
|
team: r.number(),
|
741
741
|
base_words: r.number(),
|
742
742
|
qa_issues_total: r.number(),
|
743
|
-
qa_issues: vr
|
743
|
+
qa_issues: vr,
|
744
|
+
languages: r.array(hr)
|
744
745
|
}), D = r.object({
|
745
746
|
project_id: r.string(),
|
746
747
|
uuid: r.string().uuid(),
|
@@ -755,8 +756,7 @@ const ur = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
755
756
|
base_language_id: r.number(),
|
756
757
|
base_language_iso: r.string(),
|
757
758
|
settings: pr,
|
758
|
-
statistics: Tr
|
759
|
-
languages: r.array(hr)
|
759
|
+
statistics: Tr
|
760
760
|
}), yr = r.object({
|
761
761
|
name: r.string(),
|
762
762
|
team_id: r.string(),
|
@@ -790,7 +790,7 @@ const ur = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
790
790
|
successResponseBodySchema: Ir
|
791
791
|
}), kr = r.object({
|
792
792
|
project_id: r.string()
|
793
|
-
}),
|
793
|
+
}), Cr = Q({
|
794
794
|
description: "Retrieve a project",
|
795
795
|
pathResolver: Se,
|
796
796
|
requestQuerySchema: kr,
|
@@ -800,7 +800,7 @@ const ur = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
800
800
|
r.literal("admin"),
|
801
801
|
r.literal("biller"),
|
802
802
|
r.literal("member")
|
803
|
-
]),
|
803
|
+
]), Pr = r.object({
|
804
804
|
user_id: r.number(),
|
805
805
|
email: r.string().email(),
|
806
806
|
fullname: r.string(),
|
@@ -809,7 +809,7 @@ const ur = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
809
809
|
role: Tt
|
810
810
|
}), Nr = r.object({
|
811
811
|
team_id: r.number(),
|
812
|
-
team_user:
|
812
|
+
team_user: Pr
|
813
813
|
}), jr = Q({
|
814
814
|
description: "Get the details of a team user",
|
815
815
|
requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
|
@@ -877,7 +877,7 @@ const Mr = {
|
|
877
877
|
function ga(e, t) {
|
878
878
|
return L({
|
879
879
|
...t,
|
880
|
-
queryFn: ({ queryKey: [n, a] }) => W(e,
|
880
|
+
queryFn: ({ queryKey: [n, a] }) => W(e, Cr, {
|
881
881
|
queryParams: { project_id: a }
|
882
882
|
})
|
883
883
|
});
|
@@ -970,6 +970,16 @@ async function Ta() {
|
|
970
970
|
const t = Y(e.accessToken);
|
971
971
|
return t ? { ...e, payload: t } : Promise.resolve(void 0);
|
972
972
|
}
|
973
|
+
function ya() {
|
974
|
+
return (e) => (t, n) => e(t, {
|
975
|
+
...n,
|
976
|
+
headers: {
|
977
|
+
...n.headers,
|
978
|
+
"x-lokalise-plugin": "true"
|
979
|
+
},
|
980
|
+
credentials: "omit"
|
981
|
+
});
|
982
|
+
}
|
973
983
|
function F(e) {
|
974
984
|
return { Authorization: `Bearer ${e}` };
|
975
985
|
}
|
@@ -1024,7 +1034,7 @@ function Hr(e, t) {
|
|
1024
1034
|
});
|
1025
1035
|
};
|
1026
1036
|
}
|
1027
|
-
const
|
1037
|
+
const wa = {
|
1028
1038
|
wretch: {
|
1029
1039
|
lokaliseAuth(e = {}) {
|
1030
1040
|
return this.addon($r).lokaliseAuth(et(e));
|
@@ -1054,14 +1064,14 @@ export {
|
|
1054
1064
|
gt as FREE_PLAN_ID,
|
1055
1065
|
Rr as JWT_TOKEN_SCHEMA,
|
1056
1066
|
$r as LokaliseAuthAddon,
|
1057
|
-
|
1067
|
+
wa as LokaliseAuthBrowserAddon,
|
1058
1068
|
z as NavigationPanel,
|
1059
1069
|
da as NavigationTabs,
|
1060
1070
|
Rn as PRO_PLAN_IDS,
|
1061
1071
|
Nn as START_PLAN_IDS,
|
1062
1072
|
S as Sidebar,
|
1063
|
-
|
1064
|
-
|
1073
|
+
Pr as TEAM_USER_SCHEMA,
|
1074
|
+
Pn as TRIAL_PLAN_ID,
|
1065
1075
|
oa as convertNewLineToBreakTag,
|
1066
1076
|
wr as createProject,
|
1067
1077
|
sa as formatDate,
|
@@ -1083,9 +1093,10 @@ export {
|
|
1083
1093
|
fa as listProjectsKey,
|
1084
1094
|
ia as makeUrlClickable,
|
1085
1095
|
Y as parseJwtTokenPayload,
|
1096
|
+
ya as publicApiHeadersMiddleware,
|
1086
1097
|
br as retrieveContributor,
|
1087
1098
|
Mr as retrieveContributorKeys,
|
1088
|
-
|
1099
|
+
Cr as retrieveProject,
|
1089
1100
|
ba as retrieveProjectQueryKey,
|
1090
1101
|
va as useAuthenticatedProjectContributor,
|
1091
1102
|
wt as useAuthenticatedSessionPayload,
|
@@ -7,6 +7,7 @@ export * from './frontend/hooks/useAuthenticatedUser';
|
|
7
7
|
export * from './frontend/hooks/useAuthenticatedProjectContributor';
|
8
8
|
export * from './bff/services/getAuthenticatedSessionDetailFromRequest';
|
9
9
|
export { parseJwtTokenPayload } from './core/jwtTokenPayload';
|
10
|
+
export { publicApiHeadersMiddleware } from './core/middleware/publicApiHeadersMiddleware';
|
10
11
|
export { LokaliseAuthAddon } from './core/lokaliseAuthAddon';
|
11
12
|
export { LokaliseAuthBrowserAddon } from './frontend/addon/lokaliseAuthBrowserAddon';
|
12
13
|
/**
|
@@ -6,12 +6,6 @@ export declare function useCreateProjectMutation<T>(api: Wretch<T>, overrides?:
|
|
6
6
|
name: string;
|
7
7
|
created_at: string;
|
8
8
|
created_at_timestamp: number;
|
9
|
-
languages: {
|
10
|
-
progress: number;
|
11
|
-
language_id: number;
|
12
|
-
language_iso: string;
|
13
|
-
words_to_do: number;
|
14
|
-
}[];
|
15
9
|
project_id: string;
|
16
10
|
description: string;
|
17
11
|
uuid: string;
|
@@ -35,6 +29,12 @@ export declare function useCreateProjectMutation<T>(api: Wretch<T>, overrides?:
|
|
35
29
|
};
|
36
30
|
statistics: {
|
37
31
|
team: number;
|
32
|
+
languages: {
|
33
|
+
progress: number;
|
34
|
+
language_id: number;
|
35
|
+
language_iso: string;
|
36
|
+
words_to_do: number;
|
37
|
+
}[];
|
38
38
|
progress_total: number;
|
39
39
|
keys_total: number;
|
40
40
|
base_words: number;
|
@@ -16,12 +16,6 @@ export declare function useListProjectsQuery<T>(api: Wretch<T>, overrides: ApiQu
|
|
16
16
|
name: string;
|
17
17
|
created_at: string;
|
18
18
|
created_at_timestamp: number;
|
19
|
-
languages: {
|
20
|
-
progress: number;
|
21
|
-
language_id: number;
|
22
|
-
language_iso: string;
|
23
|
-
words_to_do: number;
|
24
|
-
}[];
|
25
19
|
project_id: string;
|
26
20
|
description: string;
|
27
21
|
uuid: string;
|
@@ -46,6 +40,12 @@ export declare function useListProjectsQuery<T>(api: Wretch<T>, overrides: ApiQu
|
|
46
40
|
} | undefined;
|
47
41
|
statistics?: {
|
48
42
|
team: number;
|
43
|
+
languages: {
|
44
|
+
progress: number;
|
45
|
+
language_id: number;
|
46
|
+
language_iso: string;
|
47
|
+
words_to_do: number;
|
48
|
+
}[];
|
49
49
|
progress_total: number;
|
50
50
|
keys_total: number;
|
51
51
|
base_words: number;
|
@@ -8,12 +8,6 @@ export declare function useRetrieveProjectQuery<T>(api: Wretch<T>, overrides: Ap
|
|
8
8
|
name: string;
|
9
9
|
created_at: string;
|
10
10
|
created_at_timestamp: number;
|
11
|
-
languages: {
|
12
|
-
progress: number;
|
13
|
-
language_id: number;
|
14
|
-
language_iso: string;
|
15
|
-
words_to_do: number;
|
16
|
-
}[];
|
17
11
|
project_id: string;
|
18
12
|
description: string;
|
19
13
|
uuid: string;
|
@@ -37,6 +31,12 @@ export declare function useRetrieveProjectQuery<T>(api: Wretch<T>, overrides: Ap
|
|
37
31
|
};
|
38
32
|
statistics: {
|
39
33
|
team: number;
|
34
|
+
languages: {
|
35
|
+
progress: number;
|
36
|
+
language_id: number;
|
37
|
+
language_iso: string;
|
38
|
+
words_to_do: number;
|
39
|
+
}[];
|
40
40
|
progress_total: number;
|
41
41
|
keys_total: number;
|
42
42
|
base_words: number;
|
@@ -2,7 +2,7 @@ export * from './contributors';
|
|
2
2
|
export * from './projects';
|
3
3
|
export * from './teamUsers';
|
4
4
|
export * from './userToken';
|
5
|
-
export type {
|
5
|
+
export type { LanguageStatistics, LanguageIso } from './types/language';
|
6
6
|
export type { Project, ProjectQaIssues, ProjectType, ProjectSettings } from './types/project';
|
7
7
|
export type { TeamRole } from './types/teamRole';
|
8
8
|
export * from './hooks/useCreateProjectMutation';
|
@@ -178,8 +178,30 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
178
178
|
special_placeholder: number;
|
179
179
|
unbalanced_brackets: number;
|
180
180
|
}>;
|
181
|
+
languages: z.ZodArray<z.ZodObject<{
|
182
|
+
language_id: z.ZodNumber;
|
183
|
+
language_iso: z.ZodString;
|
184
|
+
progress: z.ZodNumber;
|
185
|
+
words_to_do: z.ZodNumber;
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
187
|
+
progress: number;
|
188
|
+
language_id: number;
|
189
|
+
language_iso: string;
|
190
|
+
words_to_do: number;
|
191
|
+
}, {
|
192
|
+
progress: number;
|
193
|
+
language_id: number;
|
194
|
+
language_iso: string;
|
195
|
+
words_to_do: number;
|
196
|
+
}>, "many">;
|
181
197
|
}, "strip", z.ZodTypeAny, {
|
182
198
|
team: number;
|
199
|
+
languages: {
|
200
|
+
progress: number;
|
201
|
+
language_id: number;
|
202
|
+
language_iso: string;
|
203
|
+
words_to_do: number;
|
204
|
+
}[];
|
183
205
|
progress_total: number;
|
184
206
|
keys_total: number;
|
185
207
|
base_words: number;
|
@@ -204,6 +226,12 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
204
226
|
};
|
205
227
|
}, {
|
206
228
|
team: number;
|
229
|
+
languages: {
|
230
|
+
progress: number;
|
231
|
+
language_id: number;
|
232
|
+
language_iso: string;
|
233
|
+
words_to_do: number;
|
234
|
+
}[];
|
207
235
|
progress_total: number;
|
208
236
|
keys_total: number;
|
209
237
|
base_words: number;
|
@@ -227,32 +255,10 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
227
255
|
unbalanced_brackets: number;
|
228
256
|
};
|
229
257
|
}>;
|
230
|
-
languages: z.ZodArray<z.ZodObject<{
|
231
|
-
language_id: z.ZodNumber;
|
232
|
-
language_iso: z.ZodString;
|
233
|
-
progress: z.ZodNumber;
|
234
|
-
words_to_do: z.ZodNumber;
|
235
|
-
}, "strip", z.ZodTypeAny, {
|
236
|
-
progress: number;
|
237
|
-
language_id: number;
|
238
|
-
language_iso: string;
|
239
|
-
words_to_do: number;
|
240
|
-
}, {
|
241
|
-
progress: number;
|
242
|
-
language_id: number;
|
243
|
-
language_iso: string;
|
244
|
-
words_to_do: number;
|
245
|
-
}>, "many">;
|
246
258
|
}, "strip", z.ZodTypeAny, {
|
247
259
|
name: string;
|
248
260
|
created_at: string;
|
249
261
|
created_at_timestamp: number;
|
250
|
-
languages: {
|
251
|
-
progress: number;
|
252
|
-
language_id: number;
|
253
|
-
language_iso: string;
|
254
|
-
words_to_do: number;
|
255
|
-
}[];
|
256
262
|
project_id: string;
|
257
263
|
description: string;
|
258
264
|
uuid: string;
|
@@ -276,6 +282,12 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
276
282
|
};
|
277
283
|
statistics: {
|
278
284
|
team: number;
|
285
|
+
languages: {
|
286
|
+
progress: number;
|
287
|
+
language_id: number;
|
288
|
+
language_iso: string;
|
289
|
+
words_to_do: number;
|
290
|
+
}[];
|
279
291
|
progress_total: number;
|
280
292
|
keys_total: number;
|
281
293
|
base_words: number;
|
@@ -303,12 +315,6 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
303
315
|
name: string;
|
304
316
|
created_at: string;
|
305
317
|
created_at_timestamp: number;
|
306
|
-
languages: {
|
307
|
-
progress: number;
|
308
|
-
language_id: number;
|
309
|
-
language_iso: string;
|
310
|
-
words_to_do: number;
|
311
|
-
}[];
|
312
318
|
project_id: string;
|
313
319
|
description: string;
|
314
320
|
uuid: string;
|
@@ -332,6 +338,12 @@ export declare const createProject: import('@lokalise/universal-ts-utils/node').
|
|
332
338
|
};
|
333
339
|
statistics: {
|
334
340
|
team: number;
|
341
|
+
languages: {
|
342
|
+
progress: number;
|
343
|
+
language_id: number;
|
344
|
+
language_iso: string;
|
345
|
+
words_to_do: number;
|
346
|
+
}[];
|
335
347
|
progress_total: number;
|
336
348
|
keys_total: number;
|
337
349
|
base_words: number;
|
@@ -487,8 +499,30 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
487
499
|
special_placeholder: number;
|
488
500
|
unbalanced_brackets: number;
|
489
501
|
}>;
|
502
|
+
languages: z.ZodArray<z.ZodObject<{
|
503
|
+
language_id: z.ZodNumber;
|
504
|
+
language_iso: z.ZodString;
|
505
|
+
progress: z.ZodNumber;
|
506
|
+
words_to_do: z.ZodNumber;
|
507
|
+
}, "strip", z.ZodTypeAny, {
|
508
|
+
progress: number;
|
509
|
+
language_id: number;
|
510
|
+
language_iso: string;
|
511
|
+
words_to_do: number;
|
512
|
+
}, {
|
513
|
+
progress: number;
|
514
|
+
language_id: number;
|
515
|
+
language_iso: string;
|
516
|
+
words_to_do: number;
|
517
|
+
}>, "many">;
|
490
518
|
}, "strip", z.ZodTypeAny, {
|
491
519
|
team: number;
|
520
|
+
languages: {
|
521
|
+
progress: number;
|
522
|
+
language_id: number;
|
523
|
+
language_iso: string;
|
524
|
+
words_to_do: number;
|
525
|
+
}[];
|
492
526
|
progress_total: number;
|
493
527
|
keys_total: number;
|
494
528
|
base_words: number;
|
@@ -513,6 +547,12 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
513
547
|
};
|
514
548
|
}, {
|
515
549
|
team: number;
|
550
|
+
languages: {
|
551
|
+
progress: number;
|
552
|
+
language_id: number;
|
553
|
+
language_iso: string;
|
554
|
+
words_to_do: number;
|
555
|
+
}[];
|
516
556
|
progress_total: number;
|
517
557
|
keys_total: number;
|
518
558
|
base_words: number;
|
@@ -536,32 +576,10 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
536
576
|
unbalanced_brackets: number;
|
537
577
|
};
|
538
578
|
}>;
|
539
|
-
languages: z.ZodArray<z.ZodObject<{
|
540
|
-
language_id: z.ZodNumber;
|
541
|
-
language_iso: z.ZodString;
|
542
|
-
progress: z.ZodNumber;
|
543
|
-
words_to_do: z.ZodNumber;
|
544
|
-
}, "strip", z.ZodTypeAny, {
|
545
|
-
progress: number;
|
546
|
-
language_id: number;
|
547
|
-
language_iso: string;
|
548
|
-
words_to_do: number;
|
549
|
-
}, {
|
550
|
-
progress: number;
|
551
|
-
language_id: number;
|
552
|
-
language_iso: string;
|
553
|
-
words_to_do: number;
|
554
|
-
}>, "many">;
|
555
579
|
}, "settings" | "statistics">, "strip", z.ZodTypeAny, {
|
556
580
|
name: string;
|
557
581
|
created_at: string;
|
558
582
|
created_at_timestamp: number;
|
559
|
-
languages: {
|
560
|
-
progress: number;
|
561
|
-
language_id: number;
|
562
|
-
language_iso: string;
|
563
|
-
words_to_do: number;
|
564
|
-
}[];
|
565
583
|
project_id: string;
|
566
584
|
description: string;
|
567
585
|
uuid: string;
|
@@ -575,12 +593,6 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
575
593
|
name: string;
|
576
594
|
created_at: string;
|
577
595
|
created_at_timestamp: number;
|
578
|
-
languages: {
|
579
|
-
progress: number;
|
580
|
-
language_id: number;
|
581
|
-
language_iso: string;
|
582
|
-
words_to_do: number;
|
583
|
-
}[];
|
584
596
|
project_id: string;
|
585
597
|
description: string;
|
586
598
|
uuid: string;
|
@@ -683,8 +695,30 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
683
695
|
special_placeholder: number;
|
684
696
|
unbalanced_brackets: number;
|
685
697
|
}>;
|
698
|
+
languages: z.ZodArray<z.ZodObject<{
|
699
|
+
language_id: z.ZodNumber;
|
700
|
+
language_iso: z.ZodString;
|
701
|
+
progress: z.ZodNumber;
|
702
|
+
words_to_do: z.ZodNumber;
|
703
|
+
}, "strip", z.ZodTypeAny, {
|
704
|
+
progress: number;
|
705
|
+
language_id: number;
|
706
|
+
language_iso: string;
|
707
|
+
words_to_do: number;
|
708
|
+
}, {
|
709
|
+
progress: number;
|
710
|
+
language_id: number;
|
711
|
+
language_iso: string;
|
712
|
+
words_to_do: number;
|
713
|
+
}>, "many">;
|
686
714
|
}, "strip", z.ZodTypeAny, {
|
687
715
|
team: number;
|
716
|
+
languages: {
|
717
|
+
progress: number;
|
718
|
+
language_id: number;
|
719
|
+
language_iso: string;
|
720
|
+
words_to_do: number;
|
721
|
+
}[];
|
688
722
|
progress_total: number;
|
689
723
|
keys_total: number;
|
690
724
|
base_words: number;
|
@@ -709,6 +743,12 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
709
743
|
};
|
710
744
|
}, {
|
711
745
|
team: number;
|
746
|
+
languages: {
|
747
|
+
progress: number;
|
748
|
+
language_id: number;
|
749
|
+
language_iso: string;
|
750
|
+
words_to_do: number;
|
751
|
+
}[];
|
712
752
|
progress_total: number;
|
713
753
|
keys_total: number;
|
714
754
|
base_words: number;
|
@@ -747,6 +787,12 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
747
787
|
} | undefined;
|
748
788
|
statistics?: {
|
749
789
|
team: number;
|
790
|
+
languages: {
|
791
|
+
progress: number;
|
792
|
+
language_id: number;
|
793
|
+
language_iso: string;
|
794
|
+
words_to_do: number;
|
795
|
+
}[];
|
750
796
|
progress_total: number;
|
751
797
|
keys_total: number;
|
752
798
|
base_words: number;
|
@@ -785,6 +831,12 @@ declare const LIST_PROJECTS_SUCCESS_RESPONSE_BODY: z.ZodArray<z.ZodUnion<[z.ZodO
|
|
785
831
|
} | undefined;
|
786
832
|
statistics?: {
|
787
833
|
team: number;
|
834
|
+
languages: {
|
835
|
+
progress: number;
|
836
|
+
language_id: number;
|
837
|
+
language_iso: string;
|
838
|
+
words_to_do: number;
|
839
|
+
}[];
|
788
840
|
progress_total: number;
|
789
841
|
keys_total: number;
|
790
842
|
base_words: number;
|
@@ -915,8 +967,30 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
915
967
|
special_placeholder: number;
|
916
968
|
unbalanced_brackets: number;
|
917
969
|
}>;
|
970
|
+
languages: z.ZodArray<z.ZodObject<{
|
971
|
+
language_id: z.ZodNumber;
|
972
|
+
language_iso: z.ZodString;
|
973
|
+
progress: z.ZodNumber;
|
974
|
+
words_to_do: z.ZodNumber;
|
975
|
+
}, "strip", z.ZodTypeAny, {
|
976
|
+
progress: number;
|
977
|
+
language_id: number;
|
978
|
+
language_iso: string;
|
979
|
+
words_to_do: number;
|
980
|
+
}, {
|
981
|
+
progress: number;
|
982
|
+
language_id: number;
|
983
|
+
language_iso: string;
|
984
|
+
words_to_do: number;
|
985
|
+
}>, "many">;
|
918
986
|
}, "strip", z.ZodTypeAny, {
|
919
987
|
team: number;
|
988
|
+
languages: {
|
989
|
+
progress: number;
|
990
|
+
language_id: number;
|
991
|
+
language_iso: string;
|
992
|
+
words_to_do: number;
|
993
|
+
}[];
|
920
994
|
progress_total: number;
|
921
995
|
keys_total: number;
|
922
996
|
base_words: number;
|
@@ -941,6 +1015,12 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
941
1015
|
};
|
942
1016
|
}, {
|
943
1017
|
team: number;
|
1018
|
+
languages: {
|
1019
|
+
progress: number;
|
1020
|
+
language_id: number;
|
1021
|
+
language_iso: string;
|
1022
|
+
words_to_do: number;
|
1023
|
+
}[];
|
944
1024
|
progress_total: number;
|
945
1025
|
keys_total: number;
|
946
1026
|
base_words: number;
|
@@ -964,32 +1044,10 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
964
1044
|
unbalanced_brackets: number;
|
965
1045
|
};
|
966
1046
|
}>;
|
967
|
-
languages: z.ZodArray<z.ZodObject<{
|
968
|
-
language_id: z.ZodNumber;
|
969
|
-
language_iso: z.ZodString;
|
970
|
-
progress: z.ZodNumber;
|
971
|
-
words_to_do: z.ZodNumber;
|
972
|
-
}, "strip", z.ZodTypeAny, {
|
973
|
-
progress: number;
|
974
|
-
language_id: number;
|
975
|
-
language_iso: string;
|
976
|
-
words_to_do: number;
|
977
|
-
}, {
|
978
|
-
progress: number;
|
979
|
-
language_id: number;
|
980
|
-
language_iso: string;
|
981
|
-
words_to_do: number;
|
982
|
-
}>, "many">;
|
983
1047
|
}, "settings" | "statistics">, "strip", z.ZodTypeAny, {
|
984
1048
|
name: string;
|
985
1049
|
created_at: string;
|
986
1050
|
created_at_timestamp: number;
|
987
|
-
languages: {
|
988
|
-
progress: number;
|
989
|
-
language_id: number;
|
990
|
-
language_iso: string;
|
991
|
-
words_to_do: number;
|
992
|
-
}[];
|
993
1051
|
project_id: string;
|
994
1052
|
description: string;
|
995
1053
|
uuid: string;
|
@@ -1003,12 +1061,6 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
1003
1061
|
name: string;
|
1004
1062
|
created_at: string;
|
1005
1063
|
created_at_timestamp: number;
|
1006
|
-
languages: {
|
1007
|
-
progress: number;
|
1008
|
-
language_id: number;
|
1009
|
-
language_iso: string;
|
1010
|
-
words_to_do: number;
|
1011
|
-
}[];
|
1012
1064
|
project_id: string;
|
1013
1065
|
description: string;
|
1014
1066
|
uuid: string;
|
@@ -1111,8 +1163,30 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
1111
1163
|
special_placeholder: number;
|
1112
1164
|
unbalanced_brackets: number;
|
1113
1165
|
}>;
|
1166
|
+
languages: z.ZodArray<z.ZodObject<{
|
1167
|
+
language_id: z.ZodNumber;
|
1168
|
+
language_iso: z.ZodString;
|
1169
|
+
progress: z.ZodNumber;
|
1170
|
+
words_to_do: z.ZodNumber;
|
1171
|
+
}, "strip", z.ZodTypeAny, {
|
1172
|
+
progress: number;
|
1173
|
+
language_id: number;
|
1174
|
+
language_iso: string;
|
1175
|
+
words_to_do: number;
|
1176
|
+
}, {
|
1177
|
+
progress: number;
|
1178
|
+
language_id: number;
|
1179
|
+
language_iso: string;
|
1180
|
+
words_to_do: number;
|
1181
|
+
}>, "many">;
|
1114
1182
|
}, "strip", z.ZodTypeAny, {
|
1115
1183
|
team: number;
|
1184
|
+
languages: {
|
1185
|
+
progress: number;
|
1186
|
+
language_id: number;
|
1187
|
+
language_iso: string;
|
1188
|
+
words_to_do: number;
|
1189
|
+
}[];
|
1116
1190
|
progress_total: number;
|
1117
1191
|
keys_total: number;
|
1118
1192
|
base_words: number;
|
@@ -1137,6 +1211,12 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
1137
1211
|
};
|
1138
1212
|
}, {
|
1139
1213
|
team: number;
|
1214
|
+
languages: {
|
1215
|
+
progress: number;
|
1216
|
+
language_id: number;
|
1217
|
+
language_iso: string;
|
1218
|
+
words_to_do: number;
|
1219
|
+
}[];
|
1140
1220
|
progress_total: number;
|
1141
1221
|
keys_total: number;
|
1142
1222
|
base_words: number;
|
@@ -1175,6 +1255,12 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
1175
1255
|
} | undefined;
|
1176
1256
|
statistics?: {
|
1177
1257
|
team: number;
|
1258
|
+
languages: {
|
1259
|
+
progress: number;
|
1260
|
+
language_id: number;
|
1261
|
+
language_iso: string;
|
1262
|
+
words_to_do: number;
|
1263
|
+
}[];
|
1178
1264
|
progress_total: number;
|
1179
1265
|
keys_total: number;
|
1180
1266
|
base_words: number;
|
@@ -1213,6 +1299,12 @@ export declare const listProjects: import('@lokalise/universal-ts-utils/node').G
|
|
1213
1299
|
} | undefined;
|
1214
1300
|
statistics?: {
|
1215
1301
|
team: number;
|
1302
|
+
languages: {
|
1303
|
+
progress: number;
|
1304
|
+
language_id: number;
|
1305
|
+
language_iso: string;
|
1306
|
+
words_to_do: number;
|
1307
|
+
}[];
|
1216
1308
|
progress_total: number;
|
1217
1309
|
keys_total: number;
|
1218
1310
|
base_words: number;
|
@@ -1366,8 +1458,30 @@ export declare const retrieveProject: import('@lokalise/universal-ts-utils/node'
|
|
1366
1458
|
special_placeholder: number;
|
1367
1459
|
unbalanced_brackets: number;
|
1368
1460
|
}>;
|
1461
|
+
languages: z.ZodArray<z.ZodObject<{
|
1462
|
+
language_id: z.ZodNumber;
|
1463
|
+
language_iso: z.ZodString;
|
1464
|
+
progress: z.ZodNumber;
|
1465
|
+
words_to_do: z.ZodNumber;
|
1466
|
+
}, "strip", z.ZodTypeAny, {
|
1467
|
+
progress: number;
|
1468
|
+
language_id: number;
|
1469
|
+
language_iso: string;
|
1470
|
+
words_to_do: number;
|
1471
|
+
}, {
|
1472
|
+
progress: number;
|
1473
|
+
language_id: number;
|
1474
|
+
language_iso: string;
|
1475
|
+
words_to_do: number;
|
1476
|
+
}>, "many">;
|
1369
1477
|
}, "strip", z.ZodTypeAny, {
|
1370
1478
|
team: number;
|
1479
|
+
languages: {
|
1480
|
+
progress: number;
|
1481
|
+
language_id: number;
|
1482
|
+
language_iso: string;
|
1483
|
+
words_to_do: number;
|
1484
|
+
}[];
|
1371
1485
|
progress_total: number;
|
1372
1486
|
keys_total: number;
|
1373
1487
|
base_words: number;
|
@@ -1392,6 +1506,12 @@ export declare const retrieveProject: import('@lokalise/universal-ts-utils/node'
|
|
1392
1506
|
};
|
1393
1507
|
}, {
|
1394
1508
|
team: number;
|
1509
|
+
languages: {
|
1510
|
+
progress: number;
|
1511
|
+
language_id: number;
|
1512
|
+
language_iso: string;
|
1513
|
+
words_to_do: number;
|
1514
|
+
}[];
|
1395
1515
|
progress_total: number;
|
1396
1516
|
keys_total: number;
|
1397
1517
|
base_words: number;
|
@@ -1415,32 +1535,10 @@ export declare const retrieveProject: import('@lokalise/universal-ts-utils/node'
|
|
1415
1535
|
unbalanced_brackets: number;
|
1416
1536
|
};
|
1417
1537
|
}>;
|
1418
|
-
languages: z.ZodArray<z.ZodObject<{
|
1419
|
-
language_id: z.ZodNumber;
|
1420
|
-
language_iso: z.ZodString;
|
1421
|
-
progress: z.ZodNumber;
|
1422
|
-
words_to_do: z.ZodNumber;
|
1423
|
-
}, "strip", z.ZodTypeAny, {
|
1424
|
-
progress: number;
|
1425
|
-
language_id: number;
|
1426
|
-
language_iso: string;
|
1427
|
-
words_to_do: number;
|
1428
|
-
}, {
|
1429
|
-
progress: number;
|
1430
|
-
language_id: number;
|
1431
|
-
language_iso: string;
|
1432
|
-
words_to_do: number;
|
1433
|
-
}>, "many">;
|
1434
1538
|
}, "strip", z.ZodTypeAny, {
|
1435
1539
|
name: string;
|
1436
1540
|
created_at: string;
|
1437
1541
|
created_at_timestamp: number;
|
1438
|
-
languages: {
|
1439
|
-
progress: number;
|
1440
|
-
language_id: number;
|
1441
|
-
language_iso: string;
|
1442
|
-
words_to_do: number;
|
1443
|
-
}[];
|
1444
1542
|
project_id: string;
|
1445
1543
|
description: string;
|
1446
1544
|
uuid: string;
|
@@ -1464,6 +1562,12 @@ export declare const retrieveProject: import('@lokalise/universal-ts-utils/node'
|
|
1464
1562
|
};
|
1465
1563
|
statistics: {
|
1466
1564
|
team: number;
|
1565
|
+
languages: {
|
1566
|
+
progress: number;
|
1567
|
+
language_id: number;
|
1568
|
+
language_iso: string;
|
1569
|
+
words_to_do: number;
|
1570
|
+
}[];
|
1467
1571
|
progress_total: number;
|
1468
1572
|
keys_total: number;
|
1469
1573
|
base_words: number;
|
@@ -1491,12 +1595,6 @@ export declare const retrieveProject: import('@lokalise/universal-ts-utils/node'
|
|
1491
1595
|
name: string;
|
1492
1596
|
created_at: string;
|
1493
1597
|
created_at_timestamp: number;
|
1494
|
-
languages: {
|
1495
|
-
progress: number;
|
1496
|
-
language_id: number;
|
1497
|
-
language_iso: string;
|
1498
|
-
words_to_do: number;
|
1499
|
-
}[];
|
1500
1598
|
project_id: string;
|
1501
1599
|
description: string;
|
1502
1600
|
uuid: string;
|
@@ -1520,6 +1618,12 @@ export declare const retrieveProject: import('@lokalise/universal-ts-utils/node'
|
|
1520
1618
|
};
|
1521
1619
|
statistics: {
|
1522
1620
|
team: number;
|
1621
|
+
languages: {
|
1622
|
+
progress: number;
|
1623
|
+
language_id: number;
|
1624
|
+
language_iso: string;
|
1625
|
+
words_to_do: number;
|
1626
|
+
}[];
|
1523
1627
|
progress_total: number;
|
1524
1628
|
keys_total: number;
|
1525
1629
|
base_words: number;
|
@@ -10,7 +10,7 @@ export declare const LANGUAGE_ISO_SCHEMA: z.ZodObject<{
|
|
10
10
|
custom_iso?: string | undefined;
|
11
11
|
}>;
|
12
12
|
export type LanguageIso = z.infer<typeof LANGUAGE_ISO_SCHEMA>;
|
13
|
-
export declare const
|
13
|
+
export declare const LANGUAGE_STATISTICS_SCHEMA: z.ZodObject<{
|
14
14
|
language_id: z.ZodNumber;
|
15
15
|
language_iso: z.ZodString;
|
16
16
|
progress: z.ZodNumber;
|
@@ -26,4 +26,4 @@ export declare const LANGUAGE_SCHEMA: z.ZodObject<{
|
|
26
26
|
language_iso: string;
|
27
27
|
words_to_do: number;
|
28
28
|
}>;
|
29
|
-
export type
|
29
|
+
export type LanguageStatistics = z.infer<typeof LANGUAGE_STATISTICS_SCHEMA>;
|
@@ -147,8 +147,30 @@ export declare const PROJECT_STATISTICS_SCHEMA: z.ZodObject<{
|
|
147
147
|
special_placeholder: number;
|
148
148
|
unbalanced_brackets: number;
|
149
149
|
}>;
|
150
|
+
languages: z.ZodArray<z.ZodObject<{
|
151
|
+
language_id: z.ZodNumber;
|
152
|
+
language_iso: z.ZodString;
|
153
|
+
progress: z.ZodNumber;
|
154
|
+
words_to_do: z.ZodNumber;
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
156
|
+
progress: number;
|
157
|
+
language_id: number;
|
158
|
+
language_iso: string;
|
159
|
+
words_to_do: number;
|
160
|
+
}, {
|
161
|
+
progress: number;
|
162
|
+
language_id: number;
|
163
|
+
language_iso: string;
|
164
|
+
words_to_do: number;
|
165
|
+
}>, "many">;
|
150
166
|
}, "strip", z.ZodTypeAny, {
|
151
167
|
team: number;
|
168
|
+
languages: {
|
169
|
+
progress: number;
|
170
|
+
language_id: number;
|
171
|
+
language_iso: string;
|
172
|
+
words_to_do: number;
|
173
|
+
}[];
|
152
174
|
progress_total: number;
|
153
175
|
keys_total: number;
|
154
176
|
base_words: number;
|
@@ -173,6 +195,12 @@ export declare const PROJECT_STATISTICS_SCHEMA: z.ZodObject<{
|
|
173
195
|
};
|
174
196
|
}, {
|
175
197
|
team: number;
|
198
|
+
languages: {
|
199
|
+
progress: number;
|
200
|
+
language_id: number;
|
201
|
+
language_iso: string;
|
202
|
+
words_to_do: number;
|
203
|
+
}[];
|
176
204
|
progress_total: number;
|
177
205
|
keys_total: number;
|
178
206
|
base_words: number;
|
@@ -301,8 +329,30 @@ export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
301
329
|
special_placeholder: number;
|
302
330
|
unbalanced_brackets: number;
|
303
331
|
}>;
|
332
|
+
languages: z.ZodArray<z.ZodObject<{
|
333
|
+
language_id: z.ZodNumber;
|
334
|
+
language_iso: z.ZodString;
|
335
|
+
progress: z.ZodNumber;
|
336
|
+
words_to_do: z.ZodNumber;
|
337
|
+
}, "strip", z.ZodTypeAny, {
|
338
|
+
progress: number;
|
339
|
+
language_id: number;
|
340
|
+
language_iso: string;
|
341
|
+
words_to_do: number;
|
342
|
+
}, {
|
343
|
+
progress: number;
|
344
|
+
language_id: number;
|
345
|
+
language_iso: string;
|
346
|
+
words_to_do: number;
|
347
|
+
}>, "many">;
|
304
348
|
}, "strip", z.ZodTypeAny, {
|
305
349
|
team: number;
|
350
|
+
languages: {
|
351
|
+
progress: number;
|
352
|
+
language_id: number;
|
353
|
+
language_iso: string;
|
354
|
+
words_to_do: number;
|
355
|
+
}[];
|
306
356
|
progress_total: number;
|
307
357
|
keys_total: number;
|
308
358
|
base_words: number;
|
@@ -327,6 +377,12 @@ export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
327
377
|
};
|
328
378
|
}, {
|
329
379
|
team: number;
|
380
|
+
languages: {
|
381
|
+
progress: number;
|
382
|
+
language_id: number;
|
383
|
+
language_iso: string;
|
384
|
+
words_to_do: number;
|
385
|
+
}[];
|
330
386
|
progress_total: number;
|
331
387
|
keys_total: number;
|
332
388
|
base_words: number;
|
@@ -350,32 +406,10 @@ export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
350
406
|
unbalanced_brackets: number;
|
351
407
|
};
|
352
408
|
}>;
|
353
|
-
languages: z.ZodArray<z.ZodObject<{
|
354
|
-
language_id: z.ZodNumber;
|
355
|
-
language_iso: z.ZodString;
|
356
|
-
progress: z.ZodNumber;
|
357
|
-
words_to_do: z.ZodNumber;
|
358
|
-
}, "strip", z.ZodTypeAny, {
|
359
|
-
progress: number;
|
360
|
-
language_id: number;
|
361
|
-
language_iso: string;
|
362
|
-
words_to_do: number;
|
363
|
-
}, {
|
364
|
-
progress: number;
|
365
|
-
language_id: number;
|
366
|
-
language_iso: string;
|
367
|
-
words_to_do: number;
|
368
|
-
}>, "many">;
|
369
409
|
}, "strip", z.ZodTypeAny, {
|
370
410
|
name: string;
|
371
411
|
created_at: string;
|
372
412
|
created_at_timestamp: number;
|
373
|
-
languages: {
|
374
|
-
progress: number;
|
375
|
-
language_id: number;
|
376
|
-
language_iso: string;
|
377
|
-
words_to_do: number;
|
378
|
-
}[];
|
379
413
|
project_id: string;
|
380
414
|
description: string;
|
381
415
|
uuid: string;
|
@@ -399,6 +433,12 @@ export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
399
433
|
};
|
400
434
|
statistics: {
|
401
435
|
team: number;
|
436
|
+
languages: {
|
437
|
+
progress: number;
|
438
|
+
language_id: number;
|
439
|
+
language_iso: string;
|
440
|
+
words_to_do: number;
|
441
|
+
}[];
|
402
442
|
progress_total: number;
|
403
443
|
keys_total: number;
|
404
444
|
base_words: number;
|
@@ -426,12 +466,6 @@ export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
426
466
|
name: string;
|
427
467
|
created_at: string;
|
428
468
|
created_at_timestamp: number;
|
429
|
-
languages: {
|
430
|
-
progress: number;
|
431
|
-
language_id: number;
|
432
|
-
language_iso: string;
|
433
|
-
words_to_do: number;
|
434
|
-
}[];
|
435
469
|
project_id: string;
|
436
470
|
description: string;
|
437
471
|
uuid: string;
|
@@ -455,6 +489,12 @@ export declare const PROJECT_SCHEMA: z.ZodObject<{
|
|
455
489
|
};
|
456
490
|
statistics: {
|
457
491
|
team: number;
|
492
|
+
languages: {
|
493
|
+
progress: number;
|
494
|
+
language_id: number;
|
495
|
+
language_iso: string;
|
496
|
+
words_to_do: number;
|
497
|
+
}[];
|
458
498
|
progress_total: number;
|
459
499
|
keys_total: number;
|
460
500
|
base_words: number;
|