Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/404.html b/404.html index d1d604fe..a458c952 100644 --- a/404.html +++ b/404.html @@ -2,12 +2,12 @@
- -We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
["'])(?.*?)\1/,p=/\{(? [\d,-]+)\}/,x={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},g={...x,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},b=Object.keys(x);function v(e,t){const n=e.map((e=>{const{start:n,end:s}=g[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function j(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:o,metastring:a}=t;if(a&&p.test(a)){const e=a.match(p).groups.range;if(0===o.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${a}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=o[0].className,s=h()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const c=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return v(["js","jsBlock"],t);case"jsx":case"tsx":return v(["js","jsBlock","jsx"],t);case"html":return v(["js","jsBlock","html"],t);case"python":case"py":case"bash":return v(["bash"],t);case"markdown":case"md":return v(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return v(["tex"],t);case"lua":case"haskell":case"sql":return v(["lua"],t);case"wasm":return v(["wasm"],t);case"vb":case"vba":case"visual-basic":return v(["vb","rem"],t);case"vbnet":return v(["vbnet","rem"],t);case"batch":return v(["rem"],t);case"basic":return v(["rem","f90"],t);case"fsharp":return v(["js","ml"],t);case"ocaml":case"sml":return v(["ml"],t);case"fortran":return v(["f90"],t);case"cobol":return v(["cobol"],t);default:return v(b,t)}}(s,o),i=n.split("\n"),r=Object.fromEntries(o.map((e=>[e.className,{start:0,range:""}]))),l=Object.fromEntries(o.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h void 0!==e));l[t]?r[l[t]].range+=`${h},`:d[t]?r[d[t]].start=h:u[t]&&(r[u[t]].range+=`${r[u[t]].start}-${h-1},`),i.splice(h,1)}n=i.join("\n");const m={};return Object.entries(r).forEach((e=>{let[t,{range:n}]=e;h()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const N={codeBlockContainer:"codeBlockContainer_Ckt0"};var y=n(4848);function A(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,o]=e;const a=t[s];a&&"string"==typeof o&&(n[a]=o)})),n}(d());return(0,y.jsx)(t,{...n,style:s,className:(0,i.A)(n.className,N.codeBlockContainer,u.G.common.codeBlock)})}const C={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function k(e){let{children:t,className:n}=e;return(0,y.jsx)(A,{as:"pre",tabIndex:0,className:(0,i.A)(C.codeBlockStandalone,"thin-scrollbar",n),children:(0,y.jsx)("code",{className:C.codeBlockLines,children:t})})}var B=n(9532);const w={attributes:!0,characterData:!0,childList:!0,subtree:!0};function L(e,t){const[n,o]=(0,s.useState)(),a=(0,s.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,s.useEffect)((()=>{a()}),[a]),function(e,t,n){void 0===n&&(n=w);const o=(0,B._q)(t),a=(0,B.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(o);return e&&t.observe(e,a),()=>t.disconnect()}),[e,o,a])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),a())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var E=n(1765);const T={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function H(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:o,getTokenProps:a}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const c=o({line:t,className:(0,i.A)(n,s&&T.codeLine)}),r=t.map(((e,t)=>(0,y.jsx)("span",{...a({token:e})},t)));return(0,y.jsxs)("span",{...c,children:[s?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("span",{className:T.codeLineNumber}),(0,y.jsx)("span",{className:T.codeLineContent,children:r})]}):r,(0,y.jsx)("br",{})]})}var _=n(1312);function S(e){return(0,y.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,y.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function I(e){return(0,y.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,y.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const M={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function U(e){let{code:t,className:n}=e;const[o,a]=(0,s.useState)(!1),c=(0,s.useRef)(void 0),r=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),o=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const a=document.getSelection(),c=a.rangeCount>0&&a.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let i=!1;try{i=document.execCommand("copy")}catch{}s.remove(),c&&(a.removeAllRanges(),a.addRange(c)),o&&o.focus()}(t),a(!0),c.current=window.setTimeout((()=>{a(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(c.current)),[]),(0,y.jsx)("button",{type:"button","aria-label":o?(0,_.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,_.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,_.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.A)("clean-btn",n,M.copyButton,o&&M.copyButtonCopied),onClick:r,children:(0,y.jsxs)("span",{className:M.copyButtonIcons,"aria-hidden":"true",children:[(0,y.jsx)(S,{className:M.copyButtonIcon}),(0,y.jsx)(I,{className:M.copyButtonSuccessIcon})]})})}function z(e){return(0,y.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,y.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const R={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function O(e){let{className:t,onClick:n,isEnabled:s}=e;const o=(0,_.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,y.jsx)("button",{type:"button",onClick:n,className:(0,i.A)("clean-btn",t,s&&R.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,y.jsx)(z,{className:R.wordWrapButtonIcon,"aria-hidden":"true"})})}function $(e){let{children:t,className:n="",metastring:o,title:a,showLineNumbers:c,language:r}=e;const{prism:{defaultLanguage:u,magicComments:m}}=(0,l.p)(),h=function(e){return e?.toLowerCase()}(r??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??u),p=d(),x=function(){const[e,t]=(0,s.useState)(!1),[n,o]=(0,s.useState)(!1),a=(0,s.useRef)(null),c=(0,s.useCallback)((()=>{const n=a.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[a,e]),i=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=a.current,n=e>t||a.current.querySelector("code").hasAttribute("style");o(n)}),[a]);return L(a,i),(0,s.useEffect)((()=>{i()}),[e,i]),(0,s.useEffect)((()=>(window.addEventListener("resize",i,{passive:!0}),()=>{window.removeEventListener("resize",i)})),[i]),{codeBlockRef:a,isEnabled:e,isCodeScrollable:n,toggle:c}}(),g=function(e){return e?.match(f)?.groups.title??""}(o)||a,{lineClassNames:b,code:v}=j(t,{metastring:o,language:h,magicComments:m}),N=c??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return(0,y.jsxs)(A,{as:"div",className:(0,i.A)(n,h&&!n.includes(`language-${h}`)&&`language-${h}`),children:[g&&(0,y.jsx)("div",{className:C.codeBlockTitle,children:g}),(0,y.jsxs)("div",{className:C.codeBlockContent,children:[(0,y.jsx)(E.f4,{theme:p,code:v,language:h??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:o,getTokenProps:a}=e;return(0,y.jsx)("pre",{tabIndex:0,ref:x.codeBlockRef,className:(0,i.A)(t,C.codeBlock,"thin-scrollbar"),style:n,children:(0,y.jsx)("code",{className:(0,i.A)(C.codeBlockLines,N&&C.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,y.jsx)(H,{line:e,getLineProps:o,getTokenProps:a,classNames:b[t],showLineNumbers:N},t)))})})}}),(0,y.jsxs)("div",{className:C.buttonGroup,children:[(x.isEnabled||x.isCodeScrollable)&&(0,y.jsx)(O,{className:C.codeButton,onClick:()=>x.toggle(),isEnabled:x.isEnabled}),(0,y.jsx)(U,{className:C.codeButton,code:v})]})]})]})}function V(e){let{children:t,...n}=e;const o=(0,c.A)(),a=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),i="string"==typeof a?$:k;return(0,y.jsx)(i,{...n,children:a},String(o))}function P(e){return(0,y.jsx)("code",{...e})}var W=n(8774);var D=n(3427),q=n(1422);const G={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function F(e){return!!e&&("SUMMARY"===e.tagName||F(e.parentElement))}function Z(e,t){return!!e&&(e===t||Z(e.parentElement,t))}function J(e){let{summary:t,children:n,...o}=e;(0,D.A)().collectAnchor(o.id);const a=(0,c.A)(),r=(0,s.useRef)(null),{collapsed:l,setCollapsed:d}=(0,q.u)({initialState:!o.open}),[u,m]=(0,s.useState)(o.open),h=s.isValidElement(t)?t:(0,y.jsx)("summary",{children:t??"Details"});return(0,y.jsxs)("details",{...o,ref:r,open:u,"data-collapsed":l,className:(0,i.A)(G.details,a&&G.isBrowser,o.className),onMouseDown:e=>{F(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;F(t)&&Z(t,r.current)&&(e.preventDefault(),l?(d(!1),m(!0)):d(!0))},children:[h,(0,y.jsx)(q.N,{lazy:!1,collapsed:l,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{d(e),m(!e)},children:(0,y.jsx)("div",{className:G.collapsibleContent,children:n})})]})}const Y={details:"details_b_Ee"},K="alert alert--info";function Q(e){let{...t}=e;return(0,y.jsx)(J,{...t,className:(0,i.A)(K,Y.details,t.className)})}function X(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),o=(0,y.jsx)(y.Fragment,{children:t.filter((e=>e!==n))});return(0,y.jsx)(Q,{...e,summary:n,children:o})}var ee=n(1107);function te(e){return(0,y.jsx)(ee.A,{...e})}const ne={containsTaskList:"containsTaskList_mC6p"};function se(e){if(void 0!==e)return(0,i.A)(e,e?.includes("contains-task-list")&&ne.containsTaskList)}const oe={img:"img_ev3q"};var ae=n(7293);const ce={Head:a.A,details:X,Details:X,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,y.jsx)(P,{...e}):(0,y.jsx)(V,{...e})},a:function(e){return(0,y.jsx)(W.A,{...e})},pre:function(e){return(0,y.jsx)(y.Fragment,{children:e.children})},ul:function(e){return(0,y.jsx)("ul",{...e,className:se(e.className)})},li:function(e){return(0,D.A)().collectAnchor(e.id),(0,y.jsx)("li",{...e})},img:function(e){return(0,y.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,i.A)(t,oe.img))});var t},h1:e=>(0,y.jsx)(te,{as:"h1",...e}),h2:e=>(0,y.jsx)(te,{as:"h2",...e}),h3:e=>(0,y.jsx)(te,{as:"h3",...e}),h4:e=>(0,y.jsx)(te,{as:"h4",...e}),h5:e=>(0,y.jsx)(te,{as:"h5",...e}),h6:e=>(0,y.jsx)(te,{as:"h6",...e}),admonition:ae.A,mermaid:()=>null};function ie(e){let{children:t}=e;return(0,y.jsx)(o.x,{components:ce,children:t})}},7763:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});n(6540);var s=n(4164),o=n(5195);const a={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"};var c=n(4848);const i="table-of-contents__link toc-highlight",r="table-of-contents__link--active";function l(e){let{className:t,...n}=e;return(0,c.jsx)("div",{className:(0,s.A)(a.tableOfContents,"thin-scrollbar",t),children:(0,c.jsx)(o.A,{...n,linkClassName:i,linkActiveClassName:r})})}},5195:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var s=n(6540),o=n(6342);function a(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...o}=e;n>=0?t[n].children.push(o):s.push(o)})),s}function c(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=c({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function i(e){const t=e.getBoundingClientRect();return t.top===t.bottom?i(e.parentNode):t}function r(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>i(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom {e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function d(e){const t=(0,s.useRef)(void 0),n=l();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:o,minHeadingLevel:a,maxHeadingLevel:c}=e;function i(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),i=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const s=[];for(let o=t;o<=n;o+=1)s.push(`h${o}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:a,maxHeadingLevel:c}),l=r(i,{anchorTopOffset:n.current}),d=e.find((e=>l&&l.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(o),e.classList.add(o),t.current=e):e.classList.remove(o)}(e,e===d)}))}return document.addEventListener("scroll",i),document.addEventListener("resize",i),i(),()=>{document.removeEventListener("scroll",i),document.removeEventListener("resize",i)}}),[e,n])}var u=n(8774),m=n(4848);function h(e){let{toc:t,className:n,linkClassName:s,isChild:o}=e;return t.length?(0,m.jsx)("ul",{className:o?void 0:n,children:t.map((e=>(0,m.jsxs)("li",{children:[(0,m.jsx)(u.A,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,m.jsx)(h,{isChild:!0,toc:e.children,className:n,linkClassName:s})]},e.id)))}):null}const f=s.memo(h);function p(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:i="table-of-contents__link",linkActiveClassName:r,minHeadingLevel:l,maxHeadingLevel:u,...h}=e;const p=(0,o.p)(),x=l??p.tableOfContents.minHeadingLevel,g=u??p.tableOfContents.maxHeadingLevel,b=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:o}=e;return(0,s.useMemo)((()=>c({toc:a(t),minHeadingLevel:n,maxHeadingLevel:o})),[t,n,o])}({toc:t,minHeadingLevel:x,maxHeadingLevel:g});return d((0,s.useMemo)((()=>{if(i&&r)return{linkClassName:i,linkActiveClassName:r,minHeadingLevel:x,maxHeadingLevel:g}}),[i,r,x,g])),(0,m.jsx)(f,{toc:b,className:n,linkClassName:i,...h})}},996:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});n(6540);var s=n(4164),o=n(1312),a=n(5260),c=n(4848);function i(){return(0,c.jsx)(o.A,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function r(){return(0,c.jsx)(o.A,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function l(){return(0,c.jsx)(a.A,{children:(0,c.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}var d=n(7559),u=n(7293);function m(e){let{className:t}=e;return(0,c.jsx)(u.A,{type:"caution",title:(0,c.jsx)(i,{}),className:(0,s.A)(t,d.G.common.unlistedBanner),children:(0,c.jsx)(r,{})})}function h(e){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l,{}),(0,c.jsx)(m,{...e})]})}},8426:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,o,a]=t;if(s&&a){s=parseInt(s),a=parseInt(a);const e=s{"use strict";n.d(t,{R:()=>c,x:()=>i});var s=n(6540);const o={},a=s.createContext(o);function c(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/26509314.2c775aa1.js b/assets/js/26509314.2c775aa1.js new file mode 100644 index 00000000..6ef68fb7 --- /dev/null +++ b/assets/js/26509314.2c775aa1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7251],{3015:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>u,frontMatter:()=>t,metadata:()=>l,toc:()=>d});var o=r(4848),i=r(8453);const t={title:"Troubleshooting"},s="Troubleshooting",l={type:"mdx",permalink:"/react-native-template-strong/troubleshooting",source:"@site/src/pages/troubleshooting.md",title:"Troubleshooting",description:"npm ERR! Could not resolve dependency",frontMatter:{title:"Troubleshooting"},unlisted:!1},a={},d=[{value:"npm ERR! Could not resolve dependency",id:"npm-err-could-not-resolve-dependency",level:2},{value:"Error: Command failed: yarn install",id:"error-command-failed-yarn-install",level:2},{value:"ESLint: Error: Cannot read config file: .../.eslintrc.js",id:"eslint-error-cannot-read-config-file-eslintrcjs",level:2},{value:"npm ERR! command failed npm ERR! command sh -c husky install",id:"npm-err-command-failed-npm-err-command-sh--c-husky-install",level:2},{value:"nvm is not compatible with the "PREFIX" variable: currently set to "/usr/local"",id:"nvm-is-not-compatible-with-the-prefix-variable-currently-set-to-usrlocal",level:2},{value:"Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8",id:"android-gradle-plugin-requires-java-11-to-run-you-are-currently-using-java-18",level:2},{value:"Can't find your issue?",id:"cant-find-your-issue",level:2}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,o.jsx)(n.h2,{id:"npm-err-could-not-resolve-dependency",children:"npm ERR! Could not resolve dependency"}),"\n",(0,o.jsxs)(n.p,{children:["Some dependencies might have incorrect peer versions of other dependencies and NPM throws the error, in order to ignore it run\n",(0,o.jsx)(n.code,{children:"npm install --force"})]}),"\n",(0,o.jsx)(n.h2,{id:"error-command-failed-yarn-install",children:"Error: Command failed: yarn install"}),"\n",(0,o.jsxs)(n.p,{children:["The project uses ",(0,o.jsx)(n.code,{children:"npm"})," as package manager, and you're trying to use ",(0,o.jsx)(n.code,{children:"Yarn"}),",\nIt is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files.\nSimply run ",(0,o.jsx)(n.code,{children:"npm install"})," and use ",(0,o.jsx)(n.code,{children:"npm"})," version >= 6.14.13."]}),"\n",(0,o.jsx)(n.h2,{id:"eslint-error-cannot-read-config-file-eslintrcjs",children:"ESLint: Error: Cannot read config file: .../.eslintrc.js"}),"\n",(0,o.jsxs)(n.p,{children:["Try to update ",(0,o.jsx)(n.code,{children:"ESLint"})," and ",(0,o.jsx)(n.code,{children:"npm"})," versions"]}),"\n",(0,o.jsx)(n.h2,{id:"npm-err-command-failed-npm-err-command-sh--c-husky-install",children:"npm ERR! command failed npm ERR! command sh -c husky install"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"https://github.com/typicode/husky",children:"Husky"})," tries to initialize itself using ",(0,o.jsx)(n.code,{children:"prepare"})," script from ",(0,o.jsx)(n.code,{children:"package.json"}),"\nand to do so it needs to have a git repository, check how to work with Husky or remove ",(0,o.jsx)(n.code,{children:"prepare"})," script if you're not going to use it\n(not recommended)"]}),"\n",(0,o.jsx)(n.h2,{id:"nvm-is-not-compatible-with-the-prefix-variable-currently-set-to-usrlocal",children:'nvm is not compatible with the "PREFIX" variable: currently set to "/usr/local"'}),"\n",(0,o.jsxs)(n.p,{children:["If you have ",(0,o.jsx)(n.code,{children:"NVM"})," installed then there's a minor conflict which can be solved next way:\n",(0,o.jsx)(n.code,{children:"nvm unalias default"})]}),"\n",(0,o.jsx)(n.h2,{id:"android-gradle-plugin-requires-java-11-to-run-you-are-currently-using-java-18",children:"Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8"}),"\n",(0,o.jsx)(n.p,{children:"Update your JDK version, run following command in terminal"}),"\n",(0,o.jsxs)(n.p,{children:["On macOS:\n",(0,o.jsx)(n.code,{children:"brew install --cask adoptopenjdk/openjdk/adoptopenjdk11"})]}),"\n",(0,o.jsxs)(n.p,{children:["On Windows:\n",(0,o.jsx)(n.code,{children:"choco install -y nodejs.install openjdk11"})]}),"\n",(0,o.jsx)(n.h2,{id:"cant-find-your-issue",children:"Can't find your issue?"}),"\n",(0,o.jsxs)(n.p,{children:["Can't find an answer to your issue? Feel free to ",(0,o.jsx)(n.a,{href:"https://github.com/svbutko/react-native-template-strong/issues/new/choose",children:"create an issue"})]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var o=r(6540);const i={},t=o.createContext(i);function s(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/26509314.bcbca1da.js b/assets/js/26509314.bcbca1da.js deleted file mode 100644 index e7f9fff2..00000000 --- a/assets/js/26509314.bcbca1da.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6235],{188:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>u,frontMatter:()=>t,metadata:()=>l,toc:()=>d});var o=r(5893),i=r(1151);const t={title:"Troubleshooting"},s="Troubleshooting",l={type:"mdx",permalink:"/react-native-template-strong/troubleshooting",source:"@site/src/pages/troubleshooting.md",title:"Troubleshooting",description:"npm ERR! Could not resolve dependency",frontMatter:{title:"Troubleshooting"},unlisted:!1},a={},d=[{value:"npm ERR! Could not resolve dependency",id:"npm-err-could-not-resolve-dependency",level:2},{value:"Error: Command failed: yarn install",id:"error-command-failed-yarn-install",level:2},{value:"ESLint: Error: Cannot read config file: .../.eslintrc.js",id:"eslint-error-cannot-read-config-file-eslintrcjs",level:2},{value:"npm ERR! command failed npm ERR! command sh -c husky install",id:"npm-err-command-failed-npm-err-command-sh--c-husky-install",level:2},{value:"nvm is not compatible with the "PREFIX" variable: currently set to "/usr/local"",id:"nvm-is-not-compatible-with-the-prefix-variable-currently-set-to-usrlocal",level:2},{value:"Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8",id:"android-gradle-plugin-requires-java-11-to-run-you-are-currently-using-java-18",level:2},{value:"Can't find your issue?",id:"cant-find-your-issue",level:2}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...(0,i.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,o.jsx)(n.h2,{id:"npm-err-could-not-resolve-dependency",children:"npm ERR! Could not resolve dependency"}),"\n",(0,o.jsxs)(n.p,{children:["Some dependencies might have incorrect peer versions of other dependencies and NPM throws the error, in order to ignore it run\n",(0,o.jsx)(n.code,{children:"npm install --force"})]}),"\n",(0,o.jsx)(n.h2,{id:"error-command-failed-yarn-install",children:"Error: Command failed: yarn install"}),"\n",(0,o.jsxs)(n.p,{children:["The project uses ",(0,o.jsx)(n.code,{children:"npm"})," as package manager, and you're trying to use ",(0,o.jsx)(n.code,{children:"Yarn"}),",\nIt is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files.\nSimply run ",(0,o.jsx)(n.code,{children:"npm install"})," and use ",(0,o.jsx)(n.code,{children:"npm"})," version >= 6.14.13."]}),"\n",(0,o.jsx)(n.h2,{id:"eslint-error-cannot-read-config-file-eslintrcjs",children:"ESLint: Error: Cannot read config file: .../.eslintrc.js"}),"\n",(0,o.jsxs)(n.p,{children:["Try to update ",(0,o.jsx)(n.code,{children:"ESLint"})," and ",(0,o.jsx)(n.code,{children:"npm"})," versions"]}),"\n",(0,o.jsx)(n.h2,{id:"npm-err-command-failed-npm-err-command-sh--c-husky-install",children:"npm ERR! command failed npm ERR! command sh -c husky install"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"https://github.com/typicode/husky",children:"Husky"})," tries to initialize itself using ",(0,o.jsx)(n.code,{children:"prepare"})," script from ",(0,o.jsx)(n.code,{children:"package.json"}),"\nand to do so it needs to have a git repository, check how to work with Husky or remove ",(0,o.jsx)(n.code,{children:"prepare"})," script if you're not going to use it\n(not recommended)"]}),"\n",(0,o.jsx)(n.h2,{id:"nvm-is-not-compatible-with-the-prefix-variable-currently-set-to-usrlocal",children:'nvm is not compatible with the "PREFIX" variable: currently set to "/usr/local"'}),"\n",(0,o.jsxs)(n.p,{children:["If you have ",(0,o.jsx)(n.code,{children:"NVM"})," installed then there's a minor conflict which can be solved next way:\n",(0,o.jsx)(n.code,{children:"nvm unalias default"})]}),"\n",(0,o.jsx)(n.h2,{id:"android-gradle-plugin-requires-java-11-to-run-you-are-currently-using-java-18",children:"Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8"}),"\n",(0,o.jsx)(n.p,{children:"Update your JDK version, run following command in terminal"}),"\n",(0,o.jsxs)(n.p,{children:["On macOS:\n",(0,o.jsx)(n.code,{children:"brew install --cask adoptopenjdk/openjdk/adoptopenjdk11"})]}),"\n",(0,o.jsxs)(n.p,{children:["On Windows:\n",(0,o.jsx)(n.code,{children:"choco install -y nodejs.install openjdk11"})]}),"\n",(0,o.jsx)(n.h2,{id:"cant-find-your-issue",children:"Can't find your issue?"}),"\n",(0,o.jsxs)(n.p,{children:["Can't find an answer to your issue? Feel free to ",(0,o.jsx)(n.a,{href:"https://github.com/svbutko/react-native-template-strong/issues/new/choose",children:"create an issue"})]})]})}function u(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},1151:(e,n,r)=>{r.d(n,{Z:()=>l,a:()=>s});var o=r(7294);const i={},t=o.createContext(i);function s(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2adfb7b8.7efd6fc3.js b/assets/js/2adfb7b8.7efd6fc3.js new file mode 100644 index 00000000..aa337d79 --- /dev/null +++ b/assets/js/2adfb7b8.7efd6fc3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6909],{6299:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var r=n(4848),o=n(8453);const s={sidebar_position:4,title:"Intl formatter"},i=void 0,a={id:"localisation/intl-formatter",title:"Intl formatter",description:"Content",source:"@site/docs/localisation/intl-formatter.md",sourceDirName:"localisation",slug:"/localisation/intl-formatter",permalink:"/react-native-template-strong/docs/localisation/intl-formatter",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/localisation/intl-formatter.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Intl formatter"},sidebar:"tutorialSidebar",previous:{title:"Date formatter",permalink:"/react-native-template-strong/docs/localisation/date-formatter"},next:{title:"Environments",permalink:"/react-native-template-strong/docs/environments"}},c={},l=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2},{value:"Check how it looks",id:"check-how-it-looks",level:2}];function d(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"intlFormatter"})," offers formatting options for numbers, prices, percentage and currencies depending on current language."]}),"\n",(0,r.jsx)(t.p,{children:"Next functions are available, and they format numbers based on current language\n(percentage sign or currency sign placement, dot or comma between decimals, how many fraction digits to show)"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"formatPercent"})," - formats percentage"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"formatCurrency"})," - formats prices (by default it uses ",(0,r.jsx)(t.code,{children:"USD"})," as currency)"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"formatDecimal"})," - formats decimals"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsx)(t.p,{children:"The following results are based on English locale"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"formatPercent"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:"formatPercent(25);\n//25%\n"})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"formatCurrency"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:'formatCurrency(10000);\n//$10,000\n\nformatCurrency(10000, "EUR");\n//\u20ac10,000\n'})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"formatDecimal"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:"formatDecimal(10000);\n//10,000\n"})}),"\n",(0,r.jsx)(t.h2,{id:"check-how-it-looks",children:"Check how it looks"}),"\n",(0,r.jsxs)(t.p,{children:["You can open StoryBook and open ",(0,r.jsx)(t.code,{children:"Format"})," -> ",(0,r.jsx)(t.code,{children:"Intl Formats"})," stories and see how they are being applied."]})]})}function m(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>a});var r=n(6540);const o={},s=r.createContext(o);function i(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2adfb7b8.a0be219a.js b/assets/js/2adfb7b8.a0be219a.js deleted file mode 100644 index fb0e67e9..00000000 --- a/assets/js/2adfb7b8.a0be219a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[915],{3219:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var r=n(5893),o=n(1151);const s={sidebar_position:4,title:"Intl formatter"},a=void 0,i={id:"localisation/intl-formatter",title:"Intl formatter",description:"Content",source:"@site/docs/localisation/intl-formatter.md",sourceDirName:"localisation",slug:"/localisation/intl-formatter",permalink:"/react-native-template-strong/docs/localisation/intl-formatter",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/localisation/intl-formatter.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Intl formatter"},sidebar:"tutorialSidebar",previous:{title:"Date formatter",permalink:"/react-native-template-strong/docs/localisation/date-formatter"},next:{title:"Environments",permalink:"/react-native-template-strong/docs/environments"}},c={},l=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2},{value:"Check how it looks",id:"check-how-it-looks",level:2}];function d(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"intlFormatter"})," offers formatting options for numbers, prices, percentage and currencies depending on current language."]}),"\n",(0,r.jsx)(t.p,{children:"Next functions are available, and they format numbers based on current language\n(percentage sign or currency sign placement, dot or comma between decimals, how many fraction digits to show)"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"formatPercent"})," - formats percentage"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"formatCurrency"})," - formats prices (by default it uses ",(0,r.jsx)(t.code,{children:"USD"})," as currency)"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"formatDecimal"})," - formats decimals"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsx)(t.p,{children:"The following results are based on English locale"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"formatPercent"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:"formatPercent(25);\n//25%\n"})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"formatCurrency"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:'formatCurrency(10000);\n//$10,000\n\nformatCurrency(10000, "EUR");\n//\u20ac10,000\n'})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"formatDecimal"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:"formatDecimal(10000);\n//10,000\n"})}),"\n",(0,r.jsx)(t.h2,{id:"check-how-it-looks",children:"Check how it looks"}),"\n",(0,r.jsxs)(t.p,{children:["You can open StoryBook and open ",(0,r.jsx)(t.code,{children:"Format"})," -> ",(0,r.jsx)(t.code,{children:"Intl Formats"})," stories and see how they are being applied."]})]})}function m(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>a});var r=n(7294);const o={},s=r.createContext(o);function a(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2b755825.221b1ef4.js b/assets/js/2b755825.221b1ef4.js new file mode 100644 index 00000000..7f989b07 --- /dev/null +++ b/assets/js/2b755825.221b1ef4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2111],{9046:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>l,toc:()=>r});var a=t(4848),o=t(8453);const s={sidebar_position:3,title:"Change language"},i=void 0,l={id:"localisation/change-language",title:"Change language",description:"There are two ways you can change language of your app.",source:"@site/docs/localisation/change-language.md",sourceDirName:"localisation",slug:"/localisation/change-language",permalink:"/react-native-template-strong/docs/localisation/change-language",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/localisation/change-language.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Change language"},sidebar:"tutorialSidebar",previous:{title:"Add language",permalink:"/react-native-template-strong/docs/localisation/add-language"},next:{title:"Date formatter",permalink:"/react-native-template-strong/docs/localisation/date-formatter"}},c={},r=[{value:"Recommended way",id:"recommended-way",level:2},{value:"Not recommended way",id:"not-recommended-way",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",p:"p",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"There are two ways you can change language of your app."}),"\n",(0,a.jsx)(n.h2,{id:"recommended-way",children:"Recommended way"}),"\n",(0,a.jsx)(n.p,{children:"If you correctly added languages for both Android and iOS, there will be an option in app's system settings to switch the language."}),"\n",(0,a.jsx)(n.p,{children:"Describe the process of changing language to user and create a button which will lead him to app's settings."}),"\n",(0,a.jsxs)(n.p,{children:["Use ",(0,a.jsx)(n.code,{children:"openSettings"})," method of ",(0,a.jsx)(n.a,{href:"https://reactnative.dev/docs/linking#opensettings",children:"Linking"})," to open settings."]}),"\n",(0,a.jsxs)(n.p,{children:["There will be ",(0,a.jsx)(n.code,{children:"PREFERRED LANGUAGE"}),", user can tap on it and switch to another available language."]}),"\n",(0,a.jsx)(n.h2,{id:"not-recommended-way",children:"Not recommended way"}),"\n",(0,a.jsxs)(n.p,{children:["You can change the language in app, using ",(0,a.jsx)(n.code,{children:"setLanguage"})," function from ",(0,a.jsx)(n.code,{children:"localization.ts"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["You can list available languages for and user to select and when selected, call ",(0,a.jsx)(n.code,{children:"setLanguage"})," with selected language."]}),"\n",(0,a.jsxs)(n.p,{children:["But with this way you also have to store the saved value in ",(0,a.jsx)(n.code,{children:"redux"})," store because for system your app still uses the previously selected language,\nand also apply it on app start every time."]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var a=t(6540);const o={},s=a.createContext(o);function i(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2b755825.f3702531.js b/assets/js/2b755825.f3702531.js deleted file mode 100644 index c42c5504..00000000 --- a/assets/js/2b755825.f3702531.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[962],{9376:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>c,toc:()=>r});var n=a(5893),o=a(1151);const s={sidebar_position:3,title:"Change language"},i=void 0,c={id:"localisation/change-language",title:"Change language",description:"There are two ways you can change language of your app.",source:"@site/docs/localisation/change-language.md",sourceDirName:"localisation",slug:"/localisation/change-language",permalink:"/react-native-template-strong/docs/localisation/change-language",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/localisation/change-language.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Change language"},sidebar:"tutorialSidebar",previous:{title:"Add language",permalink:"/react-native-template-strong/docs/localisation/add-language"},next:{title:"Date formatter",permalink:"/react-native-template-strong/docs/localisation/date-formatter"}},l={},r=[{value:"Recommended way",id:"recommended-way",level:2},{value:"Not recommended way",id:"not-recommended-way",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",p:"p",...(0,o.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"There are two ways you can change language of your app."}),"\n",(0,n.jsx)(t.h2,{id:"recommended-way",children:"Recommended way"}),"\n",(0,n.jsx)(t.p,{children:"If you correctly added languages for both Android and iOS, there will be an option in app's system settings to switch the language."}),"\n",(0,n.jsx)(t.p,{children:"Describe the process of changing language to user and create a button which will lead him to app's settings."}),"\n",(0,n.jsxs)(t.p,{children:["Use ",(0,n.jsx)(t.code,{children:"openSettings"})," method of ",(0,n.jsx)(t.a,{href:"https://reactnative.dev/docs/linking#opensettings",children:"Linking"})," to open settings."]}),"\n",(0,n.jsxs)(t.p,{children:["There will be ",(0,n.jsx)(t.code,{children:"PREFERRED LANGUAGE"}),", user can tap on it and switch to another available language."]}),"\n",(0,n.jsx)(t.h2,{id:"not-recommended-way",children:"Not recommended way"}),"\n",(0,n.jsxs)(t.p,{children:["You can change the language in app, using ",(0,n.jsx)(t.code,{children:"setLanguage"})," function from ",(0,n.jsx)(t.code,{children:"localization.ts"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["You can list available languages for and user to select and when selected, call ",(0,n.jsx)(t.code,{children:"setLanguage"})," with selected language."]}),"\n",(0,n.jsxs)(t.p,{children:["But with this way you also have to store the saved value in ",(0,n.jsx)(t.code,{children:"redux"})," store because for system your app still uses the previously selected language,\nand also apply it on app start every time."]})]})}function u(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},1151:(e,t,a)=>{a.d(t,{Z:()=>c,a:()=>i});var n=a(7294);const o={},s=n.createContext(o);function i(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2f2dc1d3.4d08c92d.js b/assets/js/2f2dc1d3.4d08c92d.js new file mode 100644 index 00000000..8f4432e0 --- /dev/null +++ b/assets/js/2f2dc1d3.4d08c92d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1490],{739:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>c,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var o=n(4848),i=n(8453);const s={sidebar_position:21,title:"App icon"},c=void 0,a={id:"app-icon",title:"App icon",description:"Content",source:"@site/docs/app-icon.md",sourceDirName:".",slug:"/app-icon",permalink:"/react-native-template-strong/docs/app-icon",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/app-icon.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:21,frontMatter:{sidebar_position:21,title:"App icon"},sidebar:"tutorialSidebar",previous:{title:"Patches",permalink:"/react-native-template-strong/docs/patches"},next:{title:"App release",permalink:"/react-native-template-strong/docs/app-release"}},r={},d=[{value:"Content",id:"content",level:2},{value:"Create icon assets",id:"create-icon-assets",level:2},{value:"iOS icons location",id:"ios-icons-location",level:3},{value:"Android icons location",id:"android-icons-location",level:3}];function l(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,o.jsx)(t.p,{children:"There are already created icons for both Android and iOS you just need to replace them with your own assets."}),"\n",(0,o.jsx)(t.h2,{id:"create-icon-assets",children:"Create icon assets"}),"\n",(0,o.jsxs)(t.p,{children:["To create your own assets you can use this ",(0,o.jsx)(t.a,{href:"https://www.figma.com/community/file/824894885635013369/App-Icon-Toolkit---iOS%2FmacOS%2FAndroid",children:"Figma icon template"})," made by ",(0,o.jsx)(t.a,{href:"https://www.figma.com/@ryanqyao",children:"Ryan Yao"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"And export icons and replace them in their own folders."}),"\n",(0,o.jsx)(t.h3,{id:"ios-icons-location",children:"iOS icons location"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.code,{children:"/ios/*NameOfYourProject*/Images.assets/AppIcon.appiconset/"})}),"\n",(0,o.jsx)(t.h3,{id:"android-icons-location",children:"Android icons location"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"/android/app/src/main/res/"})," - ",(0,o.jsx)(t.code,{children:"mipmap"})," folders"]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>c,x:()=>a});var o=n(6540);const i={},s=o.createContext(i);function c(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2f2dc1d3.bc9209ae.js b/assets/js/2f2dc1d3.bc9209ae.js deleted file mode 100644 index 5d4175bd..00000000 --- a/assets/js/2f2dc1d3.bc9209ae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[350],{7323:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var o=n(5893),i=n(1151);const s={sidebar_position:21,title:"App icon"},a=void 0,c={id:"app-icon",title:"App icon",description:"Content",source:"@site/docs/app-icon.md",sourceDirName:".",slug:"/app-icon",permalink:"/react-native-template-strong/docs/app-icon",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/app-icon.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:21,frontMatter:{sidebar_position:21,title:"App icon"},sidebar:"tutorialSidebar",previous:{title:"Patches",permalink:"/react-native-template-strong/docs/patches"},next:{title:"App release",permalink:"/react-native-template-strong/docs/app-release"}},r={},d=[{value:"Content",id:"content",level:2},{value:"Create icon assets",id:"create-icon-assets",level:2},{value:"iOS icons location",id:"ios-icons-location",level:3},{value:"Android icons location",id:"android-icons-location",level:3}];function l(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",...(0,i.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,o.jsx)(t.p,{children:"There are already created icons for both Android and iOS you just need to replace them with your own assets."}),"\n",(0,o.jsx)(t.h2,{id:"create-icon-assets",children:"Create icon assets"}),"\n",(0,o.jsxs)(t.p,{children:["To create your own assets you can use this ",(0,o.jsx)(t.a,{href:"https://www.figma.com/community/file/824894885635013369/App-Icon-Toolkit---iOS%2FmacOS%2FAndroid",children:"Figma icon template"})," made by ",(0,o.jsx)(t.a,{href:"https://www.figma.com/@ryanqyao",children:"Ryan Yao"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"And export icons and replace them in their own folders."}),"\n",(0,o.jsx)(t.h3,{id:"ios-icons-location",children:"iOS icons location"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.code,{children:"/ios/*NameOfYourProject*/Images.assets/AppIcon.appiconset/"})}),"\n",(0,o.jsx)(t.h3,{id:"android-icons-location",children:"Android icons location"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.code,{children:"/android/app/src/main/res/"})," - ",(0,o.jsx)(t.code,{children:"mipmap"})," folders"]})]})}function p(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>c,a:()=>a});var o=n(7294);const i={},s=o.createContext(i);function a(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/30b35490.c2370f71.js b/assets/js/30b35490.c2370f71.js new file mode 100644 index 00000000..e4e11d05 --- /dev/null +++ b/assets/js/30b35490.c2370f71.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2383],{7954:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>r,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var o=t(4848),i=t(8453);const s={sidebar_position:7,title:"Actions"},a=void 0,c={id:"navigation/actions",title:"Actions",description:"Content",source:"@site/docs/navigation/actions.md",sourceDirName:"navigation",slug:"/navigation/actions",permalink:"/react-native-template-strong/docs/navigation/actions",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/actions.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:7,frontMatter:{sidebar_position:7,title:"Actions"},sidebar:"tutorialSidebar",previous:{title:"Hooks",permalink:"/react-native-template-strong/docs/navigation/hooks"},next:{title:"Before starting",permalink:"/react-native-template-strong/docs/redux/before-starting"}},r={},d=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2}];function l(n){const e={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,o.jsx)(e.p,{children:"There are a couple basic actions which were added in addition to what React Native Navigation offers."}),"\n",(0,o.jsxs)(e.p,{children:["These actions are located in ",(0,o.jsx)(e.code,{children:"/src/navigation/helpers/navigationActions/ts"}),"."]}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.code,{children:"navigateToPage"})," - simple navigation to page using ",(0,o.jsx)(e.code,{children:"Pages"})]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.code,{children:"navigateWithoutTabs"})," - if you want to navigate to page without showing tabs."]}),"\n"]}),"\n",(0,o.jsxs)(e.p,{children:["Both of these actions require ",(0,o.jsx)(e.code,{children:"page"}),", ",(0,o.jsx)(e.code,{children:"componentId"}),"."]}),"\n",(0,o.jsxs)(e.p,{children:["Optionally you can provide your own ",(0,o.jsx)(e.code,{children:"passProps"})," and ",(0,o.jsx)(e.code,{children:"options"}),"."]}),"\n",(0,o.jsx)(e.h2,{id:"usage",children:"Usage"}),"\n",(0,o.jsx)(e.p,{children:"Simple case:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:" const onFaqPress = useCallback(() => {\n navigateWithoutTabs(Pages.faq, componentId);\n }, [componentId]);\n"})}),"\n",(0,o.jsxs)(e.p,{children:["With ",(0,o.jsx)(e.code,{children:"passProps"})," and ",(0,o.jsx)(e.code,{children:"options"}),":"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:" const onSuccess = useCallback(\n (confirmation: FirebaseAuthTypes.ConfirmationResult) => {\n navigateWithoutTabs (\n Pages.confirmation,\n componentId,\n {\n phone: phone,\n formattedPhone: formattedPhone,\n confirmation: confirmation,\n },\n {\n topBar: {\n title: {\n text: localization.pages.signIn,\n },\n },\n },\n );\n },\n [phone, formattedPhone, componentId],\n );\n"})})]})}function p(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(l,{...n})}):l(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>a,x:()=>c});var o=t(6540);const i={},s=o.createContext(i);function a(n){const e=o.useContext(s);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:a(n.components),o.createElement(s.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/30b35490.ca0f709c.js b/assets/js/30b35490.ca0f709c.js deleted file mode 100644 index f5805191..00000000 --- a/assets/js/30b35490.ca0f709c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7952],{3573:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>r,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var o=t(5893),i=t(1151);const s={sidebar_position:7,title:"Actions"},a=void 0,c={id:"navigation/actions",title:"Actions",description:"Content",source:"@site/docs/navigation/actions.md",sourceDirName:"navigation",slug:"/navigation/actions",permalink:"/react-native-template-strong/docs/navigation/actions",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/actions.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:7,frontMatter:{sidebar_position:7,title:"Actions"},sidebar:"tutorialSidebar",previous:{title:"Hooks",permalink:"/react-native-template-strong/docs/navigation/hooks"},next:{title:"Before starting",permalink:"/react-native-template-strong/docs/redux/before-starting"}},r={},d=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2}];function l(n){const e={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.a)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,o.jsx)(e.p,{children:"There are a couple basic actions which were added in addition to what React Native Navigation offers."}),"\n",(0,o.jsxs)(e.p,{children:["These actions are located in ",(0,o.jsx)(e.code,{children:"/src/navigation/helpers/navigationActions/ts"}),"."]}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.code,{children:"navigateToPage"})," - simple navigation to page using ",(0,o.jsx)(e.code,{children:"Pages"})]}),"\n",(0,o.jsxs)(e.li,{children:[(0,o.jsx)(e.code,{children:"navigateWithoutTabs"})," - if you want to navigate to page without showing tabs."]}),"\n"]}),"\n",(0,o.jsxs)(e.p,{children:["Both of these actions require ",(0,o.jsx)(e.code,{children:"page"}),", ",(0,o.jsx)(e.code,{children:"componentId"}),"."]}),"\n",(0,o.jsxs)(e.p,{children:["Optionally you can provide your own ",(0,o.jsx)(e.code,{children:"passProps"})," and ",(0,o.jsx)(e.code,{children:"options"}),"."]}),"\n",(0,o.jsx)(e.h2,{id:"usage",children:"Usage"}),"\n",(0,o.jsx)(e.p,{children:"Simple case:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:" const onFaqPress = useCallback(() => {\n navigateWithoutTabs(Pages.faq, componentId);\n }, [componentId]);\n"})}),"\n",(0,o.jsxs)(e.p,{children:["With ",(0,o.jsx)(e.code,{children:"passProps"})," and ",(0,o.jsx)(e.code,{children:"options"}),":"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:" const onSuccess = useCallback(\n (confirmation: FirebaseAuthTypes.ConfirmationResult) => {\n navigateWithoutTabs (\n Pages.confirmation,\n componentId,\n {\n phone: phone,\n formattedPhone: formattedPhone,\n confirmation: confirmation,\n },\n {\n topBar: {\n title: {\n text: localization.pages.signIn,\n },\n },\n },\n );\n },\n [phone, formattedPhone, componentId],\n );\n"})})]})}function p(n={}){const{wrapper:e}={...(0,i.a)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(l,{...n})}):l(n)}},1151:(n,e,t)=>{t.d(e,{Z:()=>c,a:()=>a});var o=t(7294);const i={},s=o.createContext(i);function a(n){const e=o.useContext(s);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:a(n.components),o.createElement(s.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/31630cdb.6aa85ab4.js b/assets/js/31630cdb.6aa85ab4.js deleted file mode 100644 index 1575d455..00000000 --- a/assets/js/31630cdb.6aa85ab4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3793],{3833:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>r,default:()=>a,frontMatter:()=>s,metadata:()=>d,toc:()=>o});var l=n(5893),i=n(1151);const s={sidebar_position:2,title:"PrimaryTextInput"},r=void 0,d={id:"components/primary-text-input",title:"PrimaryTextInput",description:"Content",source:"@site/docs/components/primary-text-input.md",sourceDirName:"components",slug:"/components/primary-text-input",permalink:"/react-native-template-strong/docs/components/primary-text-input",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/primary-text-input.md",tags:[],version:"current",lastUpdatedAt:1688636932,formattedLastUpdatedAt:"Jul 6, 2023",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"PrimaryTextInput"},sidebar:"tutorialSidebar",previous:{title:"PrimaryButton",permalink:"/react-native-template-strong/docs/components/primary-button"},next:{title:"Separator",permalink:"/react-native-template-strong/docs/components/separator"}},c={},o=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2}];function x(t){const e={code:"code",h2:"h2",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...t.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,l.jsx)(e.p,{children:"Primary text input component which should be used in project."}),"\n",(0,l.jsx)(e.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(e.p,{children:["Extends ",(0,l.jsx)(e.code,{children:"TextInputProps"})," and additionally adds next properties"]}),"\n",(0,l.jsxs)(e.table,{children:[(0,l.jsx)(e.thead,{children:(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(e.tbody,{children:[(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"nextInputFocusRef"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"MutableRefObject "})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsxs)(e.td,{style:{textAlign:"left"},children:["If provided then when ",(0,l.jsx)(e.code,{children:"onSubmitEditing"})," fires focuses on next input"]})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"inputRef"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"Ref "})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsxs)(e.td,{style:{textAlign:"left"},children:["Reference of ",(0,l.jsx)(e.code,{children:"TextInput"})]})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"containerStyle"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"ViewStyle"})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Style of container"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"label"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"string"})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Style of container"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"error"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"string or null"})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Error which will be shown under the input"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"hint"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"string"})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Hint which will be shown under the input"})]})]})]})]})}function a(t={}){const{wrapper:e}={...(0,i.a)(),...t.components};return e?(0,l.jsx)(e,{...t,children:(0,l.jsx)(x,{...t})}):x(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>d,a:()=>r});var l=n(7294);const i={},s=l.createContext(i);function r(t){const e=l.useContext(s);return l.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function d(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:r(t.components),l.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/31630cdb.99c91436.js b/assets/js/31630cdb.99c91436.js new file mode 100644 index 00000000..e900f3c5 --- /dev/null +++ b/assets/js/31630cdb.99c91436.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5427],{1832:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>r,default:()=>a,frontMatter:()=>s,metadata:()=>d,toc:()=>o});var l=n(4848),i=n(8453);const s={sidebar_position:2,title:"PrimaryTextInput"},r=void 0,d={id:"components/primary-text-input",title:"PrimaryTextInput",description:"Content",source:"@site/docs/components/primary-text-input.md",sourceDirName:"components",slug:"/components/primary-text-input",permalink:"/react-native-template-strong/docs/components/primary-text-input",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/primary-text-input.md",tags:[],version:"current",lastUpdatedAt:1688636932e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"PrimaryTextInput"},sidebar:"tutorialSidebar",previous:{title:"PrimaryButton",permalink:"/react-native-template-strong/docs/components/primary-button"},next:{title:"Separator",permalink:"/react-native-template-strong/docs/components/separator"}},c={},o=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2}];function x(t){const e={code:"code",h2:"h2",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...t.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,l.jsx)(e.p,{children:"Primary text input component which should be used in project."}),"\n",(0,l.jsx)(e.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(e.p,{children:["Extends ",(0,l.jsx)(e.code,{children:"TextInputProps"})," and additionally adds next properties"]}),"\n",(0,l.jsxs)(e.table,{children:[(0,l.jsx)(e.thead,{children:(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(e.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(e.tbody,{children:[(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"nextInputFocusRef"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"MutableRefObject "})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsxs)(e.td,{style:{textAlign:"left"},children:["If provided then when ",(0,l.jsx)(e.code,{children:"onSubmitEditing"})," fires focuses on next input"]})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"inputRef"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"Ref "})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsxs)(e.td,{style:{textAlign:"left"},children:["Reference of ",(0,l.jsx)(e.code,{children:"TextInput"})]})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"containerStyle"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"ViewStyle"})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Style of container"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"label"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"string"})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Style of container"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"error"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"string or null"})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Error which will be shown under the input"})]}),(0,l.jsxs)(e.tr,{children:[(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"hint"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:(0,l.jsx)(e.code,{children:"string"})}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(e.td,{style:{textAlign:"left"},children:"Hint which will be shown under the input"})]})]})]})]})}function a(t={}){const{wrapper:e}={...(0,i.R)(),...t.components};return e?(0,l.jsx)(e,{...t,children:(0,l.jsx)(x,{...t})}):x(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>r,x:()=>d});var l=n(6540);const i={},s=l.createContext(i);function r(t){const e=l.useContext(s);return l.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function d(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:r(t.components),l.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/3169c1c1.5be1a012.js b/assets/js/3169c1c1.5be1a012.js deleted file mode 100644 index 13c5d74c..00000000 --- a/assets/js/3169c1c1.5be1a012.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7831],{2973:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var r=o(5893),t=o(1151);const s={sidebar_position:2,title:"Native colors"},i=void 0,a={id:"themes/native-colors",title:"Native colors",description:"Content",source:"@site/docs/themes/native-colors.md",sourceDirName:"themes",slug:"/themes/native-colors",permalink:"/react-native-template-strong/docs/themes/native-colors",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/themes/native-colors.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Native colors"},sidebar:"tutorialSidebar",previous:{title:"Colors",permalink:"/react-native-template-strong/docs/themes/colors"},next:{title:"Component styles",permalink:"/react-native-template-strong/docs/styles/component-styles"}},l={},c=[{value:"Content",id:"content",level:2},{value:"Android",id:"android",level:2},{value:"Content",id:"content-1",level:3},{value:"Usage",id:"usage",level:3},{value:"Add colors",id:"add-colors",level:3},{value:"Native theme constants",id:"native-theme-constants",level:3},{value:"iOS",id:"ios",level:2},{value:"Content",id:"content-2",level:3},{value:"Usage",id:"usage-1",level:3},{value:"Add colors",id:"add-colors-1",level:3},{value:"Native theme constants",id:"native-theme-constants-1",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(n.p,{children:["Native colors are used to work with ",(0,r.jsx)(n.code,{children:"dark"})," and ",(0,r.jsx)(n.code,{children:"light"})," themes of your application."]}),"\n",(0,r.jsxs)(n.p,{children:["There are some predefined (Android) and built-in (iOS) color names which are listed as enums in ",(0,r.jsx)(n.code,{children:"src/core/theme/colors.ts"})]}),"\n",(0,r.jsxs)(n.p,{children:["It's highly recommended to use native colors opposed to JS defined ones to present better user experience with ",(0,r.jsx)(n.code,{children:"dark"})," and ",(0,r.jsx)(n.code,{children:"light"})," themes"]}),"\n",(0,r.jsx)(n.h2,{id:"android",children:"Android"}),"\n",(0,r.jsx)(n.h3,{id:"content-1",children:"Content"}),"\n",(0,r.jsx)(n.p,{children:"There are two sets of colors defined in native resources:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values/colors.xml"})," - for light theme"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values-night/colors.xml"})," - for dark theme"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"They look like this (light theme colors e.g.):"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-xml",children:'\n \n \n\n'})}),"\n",(0,r.jsx)(n.p,{children:"For both themes this colors share the same set of items (names) but can have different color values."}),"\n",(0,r.jsxs)(n.p,{children:["In React Native they are represented as ",(0,r.jsx)(n.code,{children:"PlatformColorsAndroid"})," enum in ",(0,r.jsx)(n.code,{children:"src/core/theme/colors.ts"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'export enum PlatformColorsAndroid {\n primary = "@color/primary",\n primaryDark = "@color/primaryDark",\n primaryLight = "@color/primaryLight",\n background = "@color/background",\n primaryText = "@color/primaryText",\n primaryTextOpacity = "@color/primaryTextOpacity",\n secondaryText = "@color/secondaryText",\n onPrimaryText = "@color/onPrimaryText",\n onPrimaryTextOpacity = "@color/onPrimaryTextOpacity",\n divider = "@color/divider",\n navigation = "@color/navigation",\n statusbar = "@color/statusbar",\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"usage",children:"Usage"}),"\n",(0,r.jsxs)(n.p,{children:["It's not enough to directly use this colors sam way as ones from ",(0,r.jsx)(n.code,{children:"Colors"})," enum."]}),"\n",(0,r.jsx)(n.p,{children:"You can use them in styles in multiple ways:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Using ",(0,r.jsx)(n.code,{children:"PlatformColor"})," in mix with ",(0,r.jsx)(n.code,{children:"Platform.select"})]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n ...Platform.select({\n android: {\n backgroundColor: PlatformColor(PlatformColorsAndroid.background),\n } as ViewStyle,\n }),\n } as ViewStyle,\n});\n"})}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsxs)(n.li,{children:["Using ",(0,r.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformNativeColor"})," or ",(0,r.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformMixedColor"}),":"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n backgroundColor: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.background),\n } as ViewStyle,\n});\n"})}),"\n",(0,r.jsxs)(n.ol,{start:"3",children:["\n",(0,r.jsx)(n.li,{children:"To assign native colors in navigation, assign them directly, not separately:"}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{title:"Incorrect",type:"danger",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: {\n light: PlatformColor(PlatformColorsAndroid.navigation),\n darK: PlatformColor(PlatformColorsAndroid.navigation),\n },\n },\n }\n"})})}),"\n",(0,r.jsx)(n.admonition,{title:"Correct",type:"tip",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.navigation),\n },\n }\n"})})}),"\n",(0,r.jsx)(n.h3,{id:"add-colors",children:"Add colors"}),"\n",(0,r.jsx)(n.p,{children:"To add more native colors:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Create ",(0,r.jsx)(n.code,{children:"item"})," in both ",(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values/colors.xml"})," and ",(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values-night/colors.xml"}),"\nwith the same name"]}),"\n",(0,r.jsxs)(n.li,{children:["Add your new color name in ",(0,r.jsx)(n.code,{children:"PlatformColorsAndroid"})]}),"\n",(0,r.jsx)(n.li,{children:"Rebuild your application"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"native-theme-constants",children:"Native theme constants"}),"\n",(0,r.jsxs)(n.p,{children:["There are some native theme constants which you can change.\nThese constants change things like ",(0,r.jsx)(n.code,{children:"tint"}),", ",(0,r.jsx)(n.code,{children:"status bar"})," colors on native side."]}),"\n",(0,r.jsx)(n.p,{children:"They are located in:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values/styles.xml"})," - for light theme"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values-night/styles.xml"})," - for dark theme"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"And look like this:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-xml",children:'\n\n- #61DAFB
\n- #2596BE
\n- #B3E5FC
\n- #FFFFFF
\n- #212121
\n- #CC212121
\n- #757575
\n- #FFFFFF
\n- #CCFFFFFF
\n- #BDBDBD
\n- #61DAFB
\n- #0288D1
\n\n \n\n \n \n'})}),"\n",(0,r.jsxs)(n.p,{children:["Our app's theme is defined within style ",(0,r.jsx)(n.code,{children:"AppTheme"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["You can see that there's a ",(0,r.jsx)(n.code,{children:"colorAccent"})," assigned to our ",(0,r.jsx)(n.code,{children:"@color/primary"}),", this change can be seen in dialogs, alerts and other components."]}),"\n",(0,r.jsxs)(n.p,{children:["Same goes with ",(0,r.jsx)(n.code,{children:"android:statusBarColor"})," which sets the color of ",(0,r.jsx)(n.code,{children:"status bar"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"To check other constant names you can adjust, check Android related resources regarding your components which you'd like to modify."}),"\n",(0,r.jsx)(n.h2,{id:"ios",children:"iOS"}),"\n",(0,r.jsx)(n.h3,{id:"content-2",children:"Content"}),"\n",(0,r.jsxs)(n.p,{children:["iOS already has some predefined colors for us, you can check how they look and change with ",(0,r.jsx)(n.code,{children:"dark"})," and ",(0,r.jsx)(n.code,{children:"light"})," theme in Storybook's colors page."]}),"\n",(0,r.jsx)(n.h3,{id:"usage-1",children:"Usage"}),"\n",(0,r.jsxs)(n.p,{children:["It's not enough to directly use this colors sam way as ones from ",(0,r.jsx)(n.code,{children:"Colors"})," enum."]}),"\n",(0,r.jsx)(n.p,{children:"You can use them in styles in multiple ways:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Using ",(0,r.jsx)(n.code,{children:"PlatformColor"})," in mix with ",(0,r.jsx)(n.code,{children:"Platform.select"})]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n ...Platform.select({\n iOS: {\n backgroundColor: PlatformColor(PlatformColorsIOS.systemBackground),\n } as ViewStyle,\n }),\n } as ViewStyle,\n});\n"})}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsxs)(n.li,{children:["Using ",(0,r.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformNativeColor"})," or ",(0,r.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformMixedColor"}),":"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n backgroundColor: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.background),\n } as ViewStyle,\n});\n"})}),"\n",(0,r.jsxs)(n.ol,{start:"3",children:["\n",(0,r.jsx)(n.li,{children:"To assign native colors in navigation, assign them directly, not separately:"}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{title:"Incorrect",type:"danger",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: {\n light: PlatformColor(PlatformColorsIOS.systemBackground),\n darK: PlatformColor(PlatformColorsIOS.systemBackground),\n },\n },\n }\n"})})}),"\n",(0,r.jsx)(n.admonition,{title:"Correct",type:"tip",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.navigation),\n },\n }\n"})})}),"\n",(0,r.jsx)(n.h3,{id:"add-colors-1",children:"Add colors"}),"\n",(0,r.jsxs)(n.p,{children:["At this moment you can't add your colors natively, but you can define your own colors in a separate enum and use ",(0,r.jsx)(n.a,{href:"https://reactnative.dev/docs/dynamiccolorios",children:"DynamicColorIOS"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"But it would be better to stick to built-in colors to provide better user experience for users."}),"\n",(0,r.jsx)(n.h3,{id:"native-theme-constants-1",children:"Native theme constants"}),"\n",(0,r.jsxs)(n.p,{children:["You can define ",(0,r.jsx)(n.code,{children:"AccentColor"})," of your application for both ",(0,r.jsx)(n.code,{children:"light"})," and ",(0,r.jsx)(n.code,{children:"dark"})," themes in XCode:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Open .xcworkspace file"}),"\n",(0,r.jsxs)(n.li,{children:["Navigate to Images.xcassets where you'll see your app and splash icons and ",(0,r.jsx)(n.code,{children:"AccentColor"})," which you can change"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},1151:(e,n,o)=>{o.d(n,{Z:()=>a,a:()=>i});var r=o(7294);const t={},s=r.createContext(t);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3169c1c1.7f30a7ac.js b/assets/js/3169c1c1.7f30a7ac.js new file mode 100644 index 00000000..255aaab2 --- /dev/null +++ b/assets/js/3169c1c1.7f30a7ac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5044],{3383:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var r=o(4848),t=o(8453);const s={sidebar_position:2,title:"Native colors"},i=void 0,l={id:"themes/native-colors",title:"Native colors",description:"Content",source:"@site/docs/themes/native-colors.md",sourceDirName:"themes",slug:"/themes/native-colors",permalink:"/react-native-template-strong/docs/themes/native-colors",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/themes/native-colors.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Native colors"},sidebar:"tutorialSidebar",previous:{title:"Colors",permalink:"/react-native-template-strong/docs/themes/colors"},next:{title:"Component styles",permalink:"/react-native-template-strong/docs/styles/component-styles"}},a={},c=[{value:"Content",id:"content",level:2},{value:"Android",id:"android",level:2},{value:"Content",id:"content-1",level:3},{value:"Usage",id:"usage",level:3},{value:"Add colors",id:"add-colors",level:3},{value:"Native theme constants",id:"native-theme-constants",level:3},{value:"iOS",id:"ios",level:2},{value:"Content",id:"content-2",level:3},{value:"Usage",id:"usage-1",level:3},{value:"Add colors",id:"add-colors-1",level:3},{value:"Native theme constants",id:"native-theme-constants-1",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(n.p,{children:["Native colors are used to work with ",(0,r.jsx)(n.code,{children:"dark"})," and ",(0,r.jsx)(n.code,{children:"light"})," themes of your application."]}),"\n",(0,r.jsxs)(n.p,{children:["There are some predefined (Android) and built-in (iOS) color names which are listed as enums in ",(0,r.jsx)(n.code,{children:"src/core/theme/colors.ts"})]}),"\n",(0,r.jsxs)(n.p,{children:["It's highly recommended to use native colors opposed to JS defined ones to present better user experience with ",(0,r.jsx)(n.code,{children:"dark"})," and ",(0,r.jsx)(n.code,{children:"light"})," themes"]}),"\n",(0,r.jsx)(n.h2,{id:"android",children:"Android"}),"\n",(0,r.jsx)(n.h3,{id:"content-1",children:"Content"}),"\n",(0,r.jsx)(n.p,{children:"There are two sets of colors defined in native resources:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values/colors.xml"})," - for light theme"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values-night/colors.xml"})," - for dark theme"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"They look like this (light theme colors e.g.):"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-xml",children:'\n\n \n\n'})}),"\n",(0,r.jsx)(n.p,{children:"For both themes this colors share the same set of items (names) but can have different color values."}),"\n",(0,r.jsxs)(n.p,{children:["In React Native they are represented as ",(0,r.jsx)(n.code,{children:"PlatformColorsAndroid"})," enum in ",(0,r.jsx)(n.code,{children:"src/core/theme/colors.ts"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'export enum PlatformColorsAndroid {\n primary = "@color/primary",\n primaryDark = "@color/primaryDark",\n primaryLight = "@color/primaryLight",\n background = "@color/background",\n primaryText = "@color/primaryText",\n primaryTextOpacity = "@color/primaryTextOpacity",\n secondaryText = "@color/secondaryText",\n onPrimaryText = "@color/onPrimaryText",\n onPrimaryTextOpacity = "@color/onPrimaryTextOpacity",\n divider = "@color/divider",\n navigation = "@color/navigation",\n statusbar = "@color/statusbar",\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"usage",children:"Usage"}),"\n",(0,r.jsxs)(n.p,{children:["It's not enough to directly use this colors sam way as ones from ",(0,r.jsx)(n.code,{children:"Colors"})," enum."]}),"\n",(0,r.jsx)(n.p,{children:"You can use them in styles in multiple ways:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Using ",(0,r.jsx)(n.code,{children:"PlatformColor"})," in mix with ",(0,r.jsx)(n.code,{children:"Platform.select"})]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n ...Platform.select({\n android: {\n backgroundColor: PlatformColor(PlatformColorsAndroid.background),\n } as ViewStyle,\n }),\n } as ViewStyle,\n});\n"})}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsxs)(n.li,{children:["Using ",(0,r.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformNativeColor"})," or ",(0,r.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformMixedColor"}),":"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n backgroundColor: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.background),\n } as ViewStyle,\n});\n"})}),"\n",(0,r.jsxs)(n.ol,{start:"3",children:["\n",(0,r.jsx)(n.li,{children:"To assign native colors in navigation, assign them directly, not separately:"}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{title:"Incorrect",type:"danger",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: {\n light: PlatformColor(PlatformColorsAndroid.navigation),\n darK: PlatformColor(PlatformColorsAndroid.navigation),\n },\n },\n }\n"})})}),"\n",(0,r.jsx)(n.admonition,{title:"Correct",type:"tip",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.navigation),\n },\n }\n"})})}),"\n",(0,r.jsx)(n.h3,{id:"add-colors",children:"Add colors"}),"\n",(0,r.jsx)(n.p,{children:"To add more native colors:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Create ",(0,r.jsx)(n.code,{children:"item"})," in both ",(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values/colors.xml"})," and ",(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values-night/colors.xml"}),"\nwith the same name"]}),"\n",(0,r.jsxs)(n.li,{children:["Add your new color name in ",(0,r.jsx)(n.code,{children:"PlatformColorsAndroid"})]}),"\n",(0,r.jsx)(n.li,{children:"Rebuild your application"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"native-theme-constants",children:"Native theme constants"}),"\n",(0,r.jsxs)(n.p,{children:["There are some native theme constants which you can change.\nThese constants change things like ",(0,r.jsx)(n.code,{children:"tint"}),", ",(0,r.jsx)(n.code,{children:"status bar"})," colors on native side."]}),"\n",(0,r.jsx)(n.p,{children:"They are located in:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values/styles.xml"})," - for light theme"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"/android/app/src/main/res/values-night/styles.xml"})," - for dark theme"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"And look like this:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-xml",children:'\n\n- #61DAFB
\n- #2596BE
\n- #B3E5FC
\n- #FFFFFF
\n- #212121
\n- #CC212121
\n- #757575
\n- #FFFFFF
\n- #CCFFFFFF
\n- #BDBDBD
\n- #61DAFB
\n- #0288D1
\n\n \n\n \n \n'})}),"\n",(0,r.jsxs)(n.p,{children:["Our app's theme is defined within style ",(0,r.jsx)(n.code,{children:"AppTheme"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["You can see that there's a ",(0,r.jsx)(n.code,{children:"colorAccent"})," assigned to our ",(0,r.jsx)(n.code,{children:"@color/primary"}),", this change can be seen in dialogs, alerts and other components."]}),"\n",(0,r.jsxs)(n.p,{children:["Same goes with ",(0,r.jsx)(n.code,{children:"android:statusBarColor"})," which sets the color of ",(0,r.jsx)(n.code,{children:"status bar"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"To check other constant names you can adjust, check Android related resources regarding your components which you'd like to modify."}),"\n",(0,r.jsx)(n.h2,{id:"ios",children:"iOS"}),"\n",(0,r.jsx)(n.h3,{id:"content-2",children:"Content"}),"\n",(0,r.jsxs)(n.p,{children:["iOS already has some predefined colors for us, you can check how they look and change with ",(0,r.jsx)(n.code,{children:"dark"})," and ",(0,r.jsx)(n.code,{children:"light"})," theme in Storybook's colors page."]}),"\n",(0,r.jsx)(n.h3,{id:"usage-1",children:"Usage"}),"\n",(0,r.jsxs)(n.p,{children:["It's not enough to directly use this colors sam way as ones from ",(0,r.jsx)(n.code,{children:"Colors"})," enum."]}),"\n",(0,r.jsx)(n.p,{children:"You can use them in styles in multiple ways:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Using ",(0,r.jsx)(n.code,{children:"PlatformColor"})," in mix with ",(0,r.jsx)(n.code,{children:"Platform.select"})]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n ...Platform.select({\n iOS: {\n backgroundColor: PlatformColor(PlatformColorsIOS.systemBackground),\n } as ViewStyle,\n }),\n } as ViewStyle,\n});\n"})}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsxs)(n.li,{children:["Using ",(0,r.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformNativeColor"})," or ",(0,r.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformMixedColor"}),":"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n backgroundColor: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.background),\n } as ViewStyle,\n});\n"})}),"\n",(0,r.jsxs)(n.ol,{start:"3",children:["\n",(0,r.jsx)(n.li,{children:"To assign native colors in navigation, assign them directly, not separately:"}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{title:"Incorrect",type:"danger",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: {\n light: PlatformColor(PlatformColorsIOS.systemBackground),\n darK: PlatformColor(PlatformColorsIOS.systemBackground),\n },\n },\n }\n"})})}),"\n",(0,r.jsx)(n.admonition,{title:"Correct",type:"tip",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.navigation),\n },\n }\n"})})}),"\n",(0,r.jsx)(n.h3,{id:"add-colors-1",children:"Add colors"}),"\n",(0,r.jsxs)(n.p,{children:["At this moment you can't add your colors natively, but you can define your own colors in a separate enum and use ",(0,r.jsx)(n.a,{href:"https://reactnative.dev/docs/dynamiccolorios",children:"DynamicColorIOS"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"But it would be better to stick to built-in colors to provide better user experience for users."}),"\n",(0,r.jsx)(n.h3,{id:"native-theme-constants-1",children:"Native theme constants"}),"\n",(0,r.jsxs)(n.p,{children:["You can define ",(0,r.jsx)(n.code,{children:"AccentColor"})," of your application for both ",(0,r.jsx)(n.code,{children:"light"})," and ",(0,r.jsx)(n.code,{children:"dark"})," themes in XCode:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Open .xcworkspace file"}),"\n",(0,r.jsxs)(n.li,{children:["Navigate to Images.xcassets where you'll see your app and splash icons and ",(0,r.jsx)(n.code,{children:"AccentColor"})," which you can change"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>l});var r=o(6540);const t={},s=r.createContext(t);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/328e254d.2b14dc19.js b/assets/js/328e254d.2b14dc19.js deleted file mode 100644 index 1bdb8a51..00000000 --- a/assets/js/328e254d.2b14dc19.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2918],{6139:(e,t,l)=>{l.r(t),l.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>x,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var r=l(5893),n=l(1151);const o={sidebar_position:2,title:"colorHelpers"},s=void 0,i={id:"helpers/color-helpers",title:"colorHelpers",description:"Content",source:"@site/docs/helpers/color-helpers.md",sourceDirName:"helpers",slug:"/helpers/color-helpers",permalink:"/react-native-template-strong/docs/helpers/color-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/color-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672,formattedLastUpdatedAt:"Oct 10, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"colorHelpers"},sidebar:"tutorialSidebar",previous:{title:"calculatePage",permalink:"/react-native-template-strong/docs/helpers/calculate-page"},next:{title:"defaultKeyIdExtractor",permalink:"/react-native-template-strong/docs/helpers/default-key-id-extractor"}},d={},c=[{value:"Content",id:"content",level:2},{value:"platformNativeColor",id:"platformnativecolor",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4},{value:"platformLocalColor",id:"platformlocalcolor",level:3},{value:"Params",id:"params-1",level:4},{value:"Usage example",id:"usage-example-1",level:4},{value:"platformMixedColor",id:"platformmixedcolor",level:3},{value:"Params",id:"params-2",level:4},{value:"Usage example",id:"usage-example-2",level:4}];function a(e){const t={code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsx)(t.p,{children:"Used to select color based on platform."}),"\n",(0,r.jsx)(t.h3,{id:"platformnativecolor",children:"platformNativeColor"}),"\n",(0,r.jsxs)(t.p,{children:["Selects color based on platform and if at least one is provided goes it through ",(0,r.jsx)(t.code,{children:"PlatformColor"})," otherwise returns ",(0,r.jsx)(t.code,{children:"undefined"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"iosColor"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["iOS color from ",(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"androidColor"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["Android color from ",(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})]})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const LoadingComponent = () => {\n return (\n\n \n );\n};\n"})}),"\n",(0,r.jsx)(t.h3,{id:"platformlocalcolor",children:"platformLocalColor"}),"\n",(0,r.jsxs)(t.p,{children:["Selects color based on platform and if at least one is provided returns it otherwise returns ",(0,r.jsx)(t.code,{children:"undefined"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"params-1",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"iosColor"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"Colors"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["iOS color from ",(0,r.jsx)(t.code,{children:"Colors"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"androidColor"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"Colors"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["Android color from ",(0,r.jsx)(t.code,{children:"Colors"})]})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"usage-example-1",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const LoadingComponent = () => {\n return (\n\n \n {localization.common.loading}\n \n\n \n );\n};\n"})}),"\n",(0,r.jsx)(t.h3,{id:"platformmixedcolor",children:"platformMixedColor"}),"\n",(0,r.jsxs)(t.p,{children:["Selects color based on platform and if at least one is provided returns it or goes it through ",(0,r.jsx)(t.code,{children:"PlatformColor"})," if it's type of ",(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})," or ",(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})," otherwise returns ",(0,r.jsx)(t.code,{children:"undefined"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"params-2",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"iosColor"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,r.jsx)(t.code,{children:"Colors"}),", ",(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})]}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["iOS color from ",(0,r.jsx)(t.code,{children:"Colors"})," or ",(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"androidColor"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,r.jsx)(t.code,{children:"Colors"}),", ",(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})]}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["Android color from ",(0,r.jsx)(t.code,{children:"Colors"})," or ",(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})]})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"usage-example-2",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const LoadingComponent = () => {\n return (\n\n \n {localization.common.loading}\n \n\n \n );\n};\n"})})]})}function x(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},1151:(e,t,l)=>{l.d(t,{Z:()=>i,a:()=>s});var r=l(7294);const n={},o=r.createContext(n);function s(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/328e254d.b18a4aaf.js b/assets/js/328e254d.b18a4aaf.js new file mode 100644 index 00000000..9ffec994 --- /dev/null +++ b/assets/js/328e254d.b18a4aaf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1322],{7967:(e,t,l)=>{l.r(t),l.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>x,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var r=l(4848),n=l(8453);const o={sidebar_position:2,title:"colorHelpers"},s=void 0,i={id:"helpers/color-helpers",title:"colorHelpers",description:"Content",source:"@site/docs/helpers/color-helpers.md",sourceDirName:"helpers",slug:"/helpers/color-helpers",permalink:"/react-native-template-strong/docs/helpers/color-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/color-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"colorHelpers"},sidebar:"tutorialSidebar",previous:{title:"calculatePage",permalink:"/react-native-template-strong/docs/helpers/calculate-page"},next:{title:"defaultKeyIdExtractor",permalink:"/react-native-template-strong/docs/helpers/default-key-id-extractor"}},d={},c=[{value:"Content",id:"content",level:2},{value:"platformNativeColor",id:"platformnativecolor",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4},{value:"platformLocalColor",id:"platformlocalcolor",level:3},{value:"Params",id:"params-1",level:4},{value:"Usage example",id:"usage-example-1",level:4},{value:"platformMixedColor",id:"platformmixedcolor",level:3},{value:"Params",id:"params-2",level:4},{value:"Usage example",id:"usage-example-2",level:4}];function a(e){const t={code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsx)(t.p,{children:"Used to select color based on platform."}),"\n",(0,r.jsx)(t.h3,{id:"platformnativecolor",children:"platformNativeColor"}),"\n",(0,r.jsxs)(t.p,{children:["Selects color based on platform and if at least one is provided goes it through ",(0,r.jsx)(t.code,{children:"PlatformColor"})," otherwise returns ",(0,r.jsx)(t.code,{children:"undefined"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"iosColor"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["iOS color from ",(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"androidColor"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["Android color from ",(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})]})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const LoadingComponent = () => {\n return (\n\n \n {localization.common.loading}\n \n\n \n );\n};\n"})}),"\n",(0,r.jsx)(t.h3,{id:"platformlocalcolor",children:"platformLocalColor"}),"\n",(0,r.jsxs)(t.p,{children:["Selects color based on platform and if at least one is provided returns it otherwise returns ",(0,r.jsx)(t.code,{children:"undefined"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"params-1",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"iosColor"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"Colors"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["iOS color from ",(0,r.jsx)(t.code,{children:"Colors"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"androidColor"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"Colors"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["Android color from ",(0,r.jsx)(t.code,{children:"Colors"})]})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"usage-example-1",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const LoadingComponent = () => {\n return (\n\n \n {localization.common.loading}\n \n\n \n );\n};\n"})}),"\n",(0,r.jsx)(t.h3,{id:"platformmixedcolor",children:"platformMixedColor"}),"\n",(0,r.jsxs)(t.p,{children:["Selects color based on platform and if at least one is provided returns it or goes it through ",(0,r.jsx)(t.code,{children:"PlatformColor"})," if it's type of ",(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})," or ",(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})," otherwise returns ",(0,r.jsx)(t.code,{children:"undefined"}),"."]}),"\n",(0,r.jsx)(t.h4,{id:"params-2",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"iosColor"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,r.jsx)(t.code,{children:"Colors"}),", ",(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})]}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["iOS color from ",(0,r.jsx)(t.code,{children:"Colors"})," or ",(0,r.jsx)(t.code,{children:"PlatformColorsIOS"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"androidColor"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,r.jsx)(t.code,{children:"Colors"}),", ",(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})]}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsxs)(t.td,{style:{textAlign:"left"},children:["Android color from ",(0,r.jsx)(t.code,{children:"Colors"})," or ",(0,r.jsx)(t.code,{children:"PlatformColorsAndroid"})]})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"usage-example-2",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const LoadingComponent = () => {\n return (\n\n \n {localization.common.loading}\n \n\n \n );\n};\n"})})]})}function x(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,t,l)=>{l.d(t,{R:()=>s,x:()=>i});var r=l(6540);const n={},o=r.createContext(n);function s(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/39654635.2b5d32a9.js b/assets/js/39654635.2b5d32a9.js deleted file mode 100644 index 2f4747be..00000000 --- a/assets/js/39654635.2b5d32a9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7705],{970:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>f,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var o=n(5893),i=n(1151);const s={sidebar_position:8,title:"Babel config"},r=void 0,a={id:"configs/babel-config",title:"Babel config",description:"Babel config utilizes metro-react-native-babel-preset",source:"@site/docs/configs/babel-config.md",sourceDirName:"configs",slug:"/configs/babel-config",permalink:"/react-native-template-strong/docs/configs/babel-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/babel-config.md",tags:[],version:"current",lastUpdatedAt:1633194349,formattedLastUpdatedAt:"Oct 2, 2021",sidebarPosition:8,frontMatter:{sidebar_position:8,title:"Babel config"},sidebar:"tutorialSidebar",previous:{title:"Detox config",permalink:"/react-native-template-strong/docs/configs/detox-config"},next:{title:"iOS internals",permalink:"/react-native-template-strong/docs/internals/ios"}},c={},l=[];function d(e){const t={a:"a",code:"code",p:"p",...(0,i.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["Babel config utilizes ",(0,o.jsx)(t.a,{href:"https://www.npmjs.com/package/metro-react-native-babel-preset",children:"metro-react-native-babel-preset"}),"\nby default."]}),"\n",(0,o.jsxs)(t.p,{children:["In production, it also removes ",(0,o.jsx)(t.code,{children:"console"})," by using ",(0,o.jsx)(t.a,{href:"https://github.com/babel/minify/tree/master/packages/babel-plugin-transform-remove-console",children:"transform-remove-console"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["There's also a transform of ",(0,o.jsx)(t.code,{children:"react-native-config"})," in test environment to ",(0,o.jsx)(t.a,{href:"https://github.com/luggit/react-native-config#testing",children:"mock it"}),"."]})]})}function f(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>r});var o=n(7294);const i={},s=o.createContext(i);function r(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/39654635.6567ae43.js b/assets/js/39654635.6567ae43.js new file mode 100644 index 00000000..bb7aa3c7 --- /dev/null +++ b/assets/js/39654635.6567ae43.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5106],{6653:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var o=n(4848),i=n(8453);const s={sidebar_position:8,title:"Babel config"},r=void 0,c={id:"configs/babel-config",title:"Babel config",description:"Babel config utilizes metro-react-native-babel-preset",source:"@site/docs/configs/babel-config.md",sourceDirName:"configs",slug:"/configs/babel-config",permalink:"/react-native-template-strong/docs/configs/babel-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/babel-config.md",tags:[],version:"current",lastUpdatedAt:1633194349e3,sidebarPosition:8,frontMatter:{sidebar_position:8,title:"Babel config"},sidebar:"tutorialSidebar",previous:{title:"Detox config",permalink:"/react-native-template-strong/docs/configs/detox-config"},next:{title:"iOS internals",permalink:"/react-native-template-strong/docs/internals/ios"}},a={},l=[];function f(e){const t={a:"a",code:"code",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["Babel config utilizes ",(0,o.jsx)(t.a,{href:"https://www.npmjs.com/package/metro-react-native-babel-preset",children:"metro-react-native-babel-preset"}),"\nby default."]}),"\n",(0,o.jsxs)(t.p,{children:["In production, it also removes ",(0,o.jsx)(t.code,{children:"console"})," by using ",(0,o.jsx)(t.a,{href:"https://github.com/babel/minify/tree/master/packages/babel-plugin-transform-remove-console",children:"transform-remove-console"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["There's also a transform of ",(0,o.jsx)(t.code,{children:"react-native-config"})," in test environment to ",(0,o.jsx)(t.a,{href:"https://github.com/luggit/react-native-config#testing",children:"mock it"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(f,{...e})}):f(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>c});var o=n(6540);const i={},s=o.createContext(i);function r(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3a8d2d9f.58143551.js b/assets/js/3a8d2d9f.58143551.js new file mode 100644 index 00000000..02dfa4c3 --- /dev/null +++ b/assets/js/3a8d2d9f.58143551.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1928],{5383:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>d,toc:()=>c});var i=t(4848),s=t(8453);const r={sidebar_position:3,title:"Detox"},o=void 0,d={id:"testing/detox",title:"Detox",description:"Content",source:"@site/docs/testing/detox.md",sourceDirName:"testing",slug:"/testing/detox",permalink:"/react-native-template-strong/docs/testing/detox",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/testing/detox.md",tags:[],version:"current",lastUpdatedAt:1633684154e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Detox"},sidebar:"tutorialSidebar",previous:{title:"Storybook",permalink:"/react-native-template-strong/docs/testing/storybook"},next:{title:"Types",permalink:"/react-native-template-strong/docs/types"}},a={},c=[{value:"Content",id:"content",level:2},{value:"Adding tests",id:"adding-tests",level:2},{value:"Running tests",id:"running-tests",level:2},{value:"iOS",id:"ios",level:3},{value:"Android",id:"android",level:3},{value:"Changing devices",id:"changing-devices",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,i.jsx)(n.p,{children:"Detox tests are e2e (end-to-end) tests which are testing your mobile app while running in a real device/simulator, interacting with it just like a real user."}),"\n",(0,i.jsxs)(n.p,{children:["To learn more about Detox, check ",(0,i.jsx)(n.a,{href:"https://github.com/wix/Detox",children:"this page"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["All the tests are located in ",(0,i.jsx)(n.code,{children:"e2e"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Each created test file should follow the next template: ",(0,i.jsx)(n.code,{children:"testName.e2e.ts"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"adding-tests",children:"Adding tests"}),"\n",(0,i.jsxs)(n.p,{children:["See how you can add tests ",(0,i.jsx)(n.a,{href:"https://github.com/wix/Detox/blob/master/docs/Introduction.WritingFirstTest.md#step-3-add-testids-to-your-app-to-assist-in-matching-elements",children:"here"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"There's already a simple test to check how well the initial running process works:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'import {expect} from "detox";\n\ndescribe("Startup", () => {\n beforeAll(async () => {\n await device.launchApp();\n });\n\n it("Is first run", async () => {\n await expect(element(by.id("OnboardingButtonID"))).toBeVisible();\n await element(by.id("OnboardingButtonID")).tap();\n });\n\n it("Should show tabs", async () => {\n await expect(element(by.id("MainPageID"))).toExist();\n });\n});\n\n'})}),"\n",(0,i.jsx)(n.h2,{id:"running-tests",children:"Running tests"}),"\n",(0,i.jsxs)(n.p,{children:["You can run your tests in ",(0,i.jsx)(n.code,{children:"debug"})," and ",(0,i.jsx)(n.code,{children:"release"})," environments."]}),"\n",(0,i.jsx)(n.p,{children:"Before running them you have to build them."}),"\n",(0,i.jsx)(n.p,{children:"To do so do run the following scripts:"}),"\n",(0,i.jsx)(n.h3,{id:"ios",children:"iOS"}),"\n",(0,i.jsxs)(n.p,{children:["For debug:\n",(0,i.jsx)(n.code,{children:"npm run e2e:ios-debug"})]}),"\n",(0,i.jsxs)(n.p,{children:["For release:\n",(0,i.jsx)(n.code,{children:"npm run e2e:build-ios-release"})]}),"\n",(0,i.jsx)(n.p,{children:"To run the tests:"}),"\n",(0,i.jsxs)(n.p,{children:["For debug:\n",(0,i.jsx)(n.code,{children:"npm run e2e:ios-debug"})]}),"\n",(0,i.jsxs)(n.p,{children:["For release:\n",(0,i.jsx)(n.code,{children:"npm run e2e:ios-release"})]}),"\n",(0,i.jsx)(n.h3,{id:"android",children:"Android"}),"\n",(0,i.jsxs)(n.p,{children:["For debug:\n",(0,i.jsx)(n.code,{children:"npm run e2e:build-android-debug"})]}),"\n",(0,i.jsxs)(n.p,{children:["For release:\n",(0,i.jsx)(n.code,{children:"npm run e2e:build-android-release"})]}),"\n",(0,i.jsx)(n.p,{children:"To run the tests:"}),"\n",(0,i.jsxs)(n.p,{children:["For debug:\n",(0,i.jsx)(n.code,{children:"npm run e2e:android-debug"})]}),"\n",(0,i.jsxs)(n.p,{children:["For release:\n",(0,i.jsx)(n.code,{children:"npm run e2e:android-release"})]}),"\n",(0,i.jsx)(n.h2,{id:"changing-devices",children:"Changing devices"}),"\n",(0,i.jsx)(n.p,{children:"Initially the config is using emulators to run the tests on both iOS and Android:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "devices": {\n "simulator": {\n "type": "ios.simulator",\n "device": {\n "type": "iPhone 12 Pro"\n }\n },\n "emulator": {\n "type": "android.emulator",\n "device": {\n "avdName": "Pixel_5_API_30"\n }\n }\n },\n "configurations": {\n "ios.emu.debug": {\n "device": "simulator",\n "app": "ios.debug"\n },\n "ios.emu.release": {\n "device": "simulator",\n "app": "ios.release"\n },\n "android.emu.debug": {\n "device": "emulator",\n "app": "android.debug"\n },\n "android.emu.release": {\n "device": "emulator",\n "app": "android.release"\n }\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"You can change it by adding your own emulators or real devices."}),"\n",(0,i.jsxs)(n.p,{children:["Check ",(0,i.jsx)(n.a,{href:"https://github.com/wix/Detox/blob/master/docs/APIRef.Configuration.md#device-configurations",children:"this page"})," to see how it can be done."]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>d});var i=t(6540);const s={},r=i.createContext(s);function o(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3a8d2d9f.fa1b2c61.js b/assets/js/3a8d2d9f.fa1b2c61.js deleted file mode 100644 index be72a959..00000000 --- a/assets/js/3a8d2d9f.fa1b2c61.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[945],{9503:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>d,toc:()=>c});var i=t(5893),s=t(1151);const r={sidebar_position:3,title:"Detox"},o=void 0,d={id:"testing/detox",title:"Detox",description:"Content",source:"@site/docs/testing/detox.md",sourceDirName:"testing",slug:"/testing/detox",permalink:"/react-native-template-strong/docs/testing/detox",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/testing/detox.md",tags:[],version:"current",lastUpdatedAt:1633684154,formattedLastUpdatedAt:"Oct 8, 2021",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Detox"},sidebar:"tutorialSidebar",previous:{title:"Storybook",permalink:"/react-native-template-strong/docs/testing/storybook"},next:{title:"Types",permalink:"/react-native-template-strong/docs/types"}},a={},c=[{value:"Content",id:"content",level:2},{value:"Adding tests",id:"adding-tests",level:2},{value:"Running tests",id:"running-tests",level:2},{value:"iOS",id:"ios",level:3},{value:"Android",id:"android",level:3},{value:"Changing devices",id:"changing-devices",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,i.jsx)(n.p,{children:"Detox tests are e2e (end-to-end) tests which are testing your mobile app while running in a real device/simulator, interacting with it just like a real user."}),"\n",(0,i.jsxs)(n.p,{children:["To learn more about Detox, check ",(0,i.jsx)(n.a,{href:"https://github.com/wix/Detox",children:"this page"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["All the tests are located in ",(0,i.jsx)(n.code,{children:"e2e"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Each created test file should follow the next template: ",(0,i.jsx)(n.code,{children:"testName.e2e.ts"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"adding-tests",children:"Adding tests"}),"\n",(0,i.jsxs)(n.p,{children:["See how you can add tests ",(0,i.jsx)(n.a,{href:"https://github.com/wix/Detox/blob/master/docs/Introduction.WritingFirstTest.md#step-3-add-testids-to-your-app-to-assist-in-matching-elements",children:"here"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"There's already a simple test to check how well the initial running process works:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'import {expect} from "detox";\n\ndescribe("Startup", () => {\n beforeAll(async () => {\n await device.launchApp();\n });\n\n it("Is first run", async () => {\n await expect(element(by.id("OnboardingButtonID"))).toBeVisible();\n await element(by.id("OnboardingButtonID")).tap();\n });\n\n it("Should show tabs", async () => {\n await expect(element(by.id("MainPageID"))).toExist();\n });\n});\n\n'})}),"\n",(0,i.jsx)(n.h2,{id:"running-tests",children:"Running tests"}),"\n",(0,i.jsxs)(n.p,{children:["You can run your tests in ",(0,i.jsx)(n.code,{children:"debug"})," and ",(0,i.jsx)(n.code,{children:"release"})," environments."]}),"\n",(0,i.jsx)(n.p,{children:"Before running them you have to build them."}),"\n",(0,i.jsx)(n.p,{children:"To do so do run the following scripts:"}),"\n",(0,i.jsx)(n.h3,{id:"ios",children:"iOS"}),"\n",(0,i.jsxs)(n.p,{children:["For debug:\n",(0,i.jsx)(n.code,{children:"npm run e2e:ios-debug"})]}),"\n",(0,i.jsxs)(n.p,{children:["For release:\n",(0,i.jsx)(n.code,{children:"npm run e2e:build-ios-release"})]}),"\n",(0,i.jsx)(n.p,{children:"To run the tests:"}),"\n",(0,i.jsxs)(n.p,{children:["For debug:\n",(0,i.jsx)(n.code,{children:"npm run e2e:ios-debug"})]}),"\n",(0,i.jsxs)(n.p,{children:["For release:\n",(0,i.jsx)(n.code,{children:"npm run e2e:ios-release"})]}),"\n",(0,i.jsx)(n.h3,{id:"android",children:"Android"}),"\n",(0,i.jsxs)(n.p,{children:["For debug:\n",(0,i.jsx)(n.code,{children:"npm run e2e:build-android-debug"})]}),"\n",(0,i.jsxs)(n.p,{children:["For release:\n",(0,i.jsx)(n.code,{children:"npm run e2e:build-android-release"})]}),"\n",(0,i.jsx)(n.p,{children:"To run the tests:"}),"\n",(0,i.jsxs)(n.p,{children:["For debug:\n",(0,i.jsx)(n.code,{children:"npm run e2e:android-debug"})]}),"\n",(0,i.jsxs)(n.p,{children:["For release:\n",(0,i.jsx)(n.code,{children:"npm run e2e:android-release"})]}),"\n",(0,i.jsx)(n.h2,{id:"changing-devices",children:"Changing devices"}),"\n",(0,i.jsx)(n.p,{children:"Initially the config is using emulators to run the tests on both iOS and Android:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "devices": {\n "simulator": {\n "type": "ios.simulator",\n "device": {\n "type": "iPhone 12 Pro"\n }\n },\n "emulator": {\n "type": "android.emulator",\n "device": {\n "avdName": "Pixel_5_API_30"\n }\n }\n },\n "configurations": {\n "ios.emu.debug": {\n "device": "simulator",\n "app": "ios.debug"\n },\n "ios.emu.release": {\n "device": "simulator",\n "app": "ios.release"\n },\n "android.emu.debug": {\n "device": "emulator",\n "app": "android.debug"\n },\n "android.emu.release": {\n "device": "emulator",\n "app": "android.release"\n }\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"You can change it by adding your own emulators or real devices."}),"\n",(0,i.jsxs)(n.p,{children:["Check ",(0,i.jsx)(n.a,{href:"https://github.com/wix/Detox/blob/master/docs/APIRef.Configuration.md#device-configurations",children:"this page"})," to see how it can be done."]})]})}function u(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>d,a:()=>o});var i=t(7294);const s={},r=i.createContext(s);function o(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3c45ece2.48cbf5e3.js b/assets/js/3c45ece2.48cbf5e3.js deleted file mode 100644 index ba7303a0..00000000 --- a/assets/js/3c45ece2.48cbf5e3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[447],{2925:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var n=o(5893),s=o(1151);const r={sidebar_position:2,title:"Storybook"},i=void 0,a={id:"testing/storybook",title:"Storybook",description:"Content",source:"@site/docs/testing/storybook.md",sourceDirName:"testing",slug:"/testing/storybook",permalink:"/react-native-template-strong/docs/testing/storybook",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/testing/storybook.md",tags:[],version:"current",lastUpdatedAt:1633684154,formattedLastUpdatedAt:"Oct 8, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Storybook"},sidebar:"tutorialSidebar",previous:{title:"Jest",permalink:"/react-native-template-strong/docs/testing/jest"},next:{title:"Detox",permalink:"/react-native-template-strong/docs/testing/detox"}},d={},l=[{value:"Content",id:"content",level:2},{value:"Opening Storybook",id:"opening-storybook",level:2},{value:"Adding stories",id:"adding-stories",level:2},{value:"Plugins",id:"plugins",level:2}];function c(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,n.jsx)(t.p,{children:"Storybook is a powerful frontend workshop environment tool that allows teams to design, build, and organize UI components (and even full screens!) without getting tripped up over business logic and plumbing."}),"\n",(0,n.jsxs)(t.p,{children:["To learn more about Storybook, check ",(0,n.jsx)(t.a,{href:"https://storybook.js.org/tutorials/intro-to-storybook/react-native/en/get-started/",children:"this page"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["All the stories are located in ",(0,n.jsx)(t.code,{children:"storybook"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Each created story file should follow the next template: ",(0,n.jsx)(t.code,{children:"testName.stories.tsx"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"opening-storybook",children:"Opening Storybook"}),"\n",(0,n.jsx)(t.p,{children:"To open Storybook in debug mode, shake your device to open dev. menu and at the very bottom you can see Storybook."}),"\n",(0,n.jsx)(t.p,{children:"The overlay will open where you can see individual stories."}),"\n",(0,n.jsx)(t.h2,{id:"adding-stories",children:"Adding stories"}),"\n",(0,n.jsxs)(t.p,{children:["If it's a component then you can add it to ",(0,n.jsx)(t.code,{children:"Components.stories.tsx"})," by following the same structure defined there."]}),"\n",(0,n.jsxs)(t.p,{children:["If you'd like to create a separate stories, then create a file in the ",(0,n.jsx)(t.code,{children:"storybook/stories"})," folder with proper naming."]}),"\n",(0,n.jsxs)(t.p,{children:["Create a stories' module (as example I will use ",(0,n.jsx)(t.code,{children:"Components"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'const ComponentsStories = storiesOf("Components", module);\n'})}),"\n",(0,n.jsx)(t.p,{children:"Add your stories into it:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'ComponentsStories.add("PrimaryButton", () =>\n \n {localization.common.loading}\n \n);\n\nComponentsStories.add("PrimaryTextInput", () => );\n\nComponentsStories.add("RadioButton", () => );\n'})}),"\n",(0,n.jsxs)(t.p,{children:["And don't forget to require it in ",(0,n.jsx)(t.code,{children:"storybook/stories.ts"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'if (__DEV__) {\n require("./stories/Theme.stories");\n require("./stories/Formatter.stories");\n require("./stories/Resources.stories");\n require("./stories/Components.stories");\n require("./stories/ModalsOverlays.stories");\n require("./stories/Alerts.stories");\n}\n\nexport {};\n'})}),"\n",(0,n.jsx)(t.h2,{id:"plugins",children:"Plugins"}),"\n",(0,n.jsx)(t.p,{children:"There two plugins installed at this moment in this template:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"@storybook/addon-ondevice-actions"})," - mock ",(0,n.jsx)(t.code,{children:"onPress"})," calls with actions that will log information in the actions tab"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"@storybook/addon-ondevice-knobs"})," - adjust your components props in realtime"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["You can check ",(0,n.jsx)(t.a,{href:"https://storybook.js.org/addons/@storybook/addon-ondevice-actions",children:"this page"})," about plugins usage."]})]})}function p(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,t,o)=>{o.d(t,{Z:()=>a,a:()=>i});var n=o(7294);const s={},r=n.createContext(s);function i(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3c45ece2.cefc677d.js b/assets/js/3c45ece2.cefc677d.js new file mode 100644 index 00000000..788f622c --- /dev/null +++ b/assets/js/3c45ece2.cefc677d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1273],{2969:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var n=o(4848),s=o(8453);const i={sidebar_position:2,title:"Storybook"},r=void 0,a={id:"testing/storybook",title:"Storybook",description:"Content",source:"@site/docs/testing/storybook.md",sourceDirName:"testing",slug:"/testing/storybook",permalink:"/react-native-template-strong/docs/testing/storybook",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/testing/storybook.md",tags:[],version:"current",lastUpdatedAt:1714909701e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Storybook"},sidebar:"tutorialSidebar",previous:{title:"Jest",permalink:"/react-native-template-strong/docs/testing/jest"},next:{title:"Detox",permalink:"/react-native-template-strong/docs/testing/detox"}},l={},d=[{value:"Content",id:"content",level:2},{value:"Opening Storybook",id:"opening-storybook",level:2},{value:"Adding stories",id:"adding-stories",level:2},{value:"Plugins",id:"plugins",level:2}];function c(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,n.jsx)(t.p,{children:"Storybook is a powerful frontend workshop environment tool that allows teams to design, build, and organize UI components (and even full screens!) without getting tripped up over business logic and plumbing."}),"\n",(0,n.jsxs)(t.p,{children:["To learn more about Storybook, check ",(0,n.jsx)(t.a,{href:"https://storybook.js.org/tutorials/intro-to-storybook/react-native/en/get-started/",children:"this page"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["All the stories are located in ",(0,n.jsx)(t.code,{children:"storybook"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Each created story file should follow the next template: ",(0,n.jsx)(t.code,{children:"testName.stories.tsx"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"opening-storybook",children:"Opening Storybook"}),"\n",(0,n.jsx)(t.p,{children:"To open Storybook in debug mode, shake your device to open dev. menu and at the very bottom you can see Storybook."}),"\n",(0,n.jsx)(t.p,{children:"The overlay will open where you can see individual stories."}),"\n",(0,n.jsx)(t.h2,{id:"adding-stories",children:"Adding stories"}),"\n",(0,n.jsxs)(t.p,{children:["If it's a component then you can add it to ",(0,n.jsx)(t.code,{children:"Components.stories.tsx"})," by following the same structure defined there."]}),"\n",(0,n.jsxs)(t.p,{children:["If you'd like to create a separate stories, then create a file in the ",(0,n.jsx)(t.code,{children:"storybook/stories"})," folder with proper naming."]}),"\n",(0,n.jsxs)(t.p,{children:["Create a stories' module (as example I will use ",(0,n.jsx)(t.code,{children:"Components"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"import {Meta} from '@storybook/react';\n\nconst meta = {\n component: ComponentStories,\n title: 'My own component sotry',\n} satisfies Meta ;\n\nexport default meta;\n"})}),"\n",(0,n.jsx)(t.h2,{id:"plugins",children:"Plugins"}),"\n",(0,n.jsx)(t.p,{children:"There two plugins installed at this moment in this template:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"@storybook/addon-ondevice-actions"})," - mock ",(0,n.jsx)(t.code,{children:"onPress"})," calls with actions that will log information in the actions tab"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"@storybook/addon-ondevice-knobs"})," - adjust your components props in realtime"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["You can check ",(0,n.jsx)(t.a,{href:"https://storybook.js.org/addons/@storybook/addon-ondevice-actions",children:"this page"})," about plugins usage."]})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>r,x:()=>a});var n=o(6540);const s={},i=n.createContext(s);function r(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3efb1320.c32f3380.js b/assets/js/3efb1320.c32f3380.js new file mode 100644 index 00000000..4f82738b --- /dev/null +++ b/assets/js/3efb1320.c32f3380.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6825],{4658:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>l,metadata:()=>o,toc:()=>d});var i=n(4848),s=n(8453);const l={sidebar_position:12,title:"EmptyView"},r=void 0,o={id:"components/empty-view",title:"EmptyView",description:"Content",source:"@site/docs/components/empty-view.md",sourceDirName:"components",slug:"/components/empty-view",permalink:"/react-native-template-strong/docs/components/empty-view",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/empty-view.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:12,frontMatter:{sidebar_position:12,title:"EmptyView"},sidebar:"tutorialSidebar",previous:{title:"RadioIcon",permalink:"/react-native-template-strong/docs/components/radio-icon"},next:{title:"PhotoTakingButton",permalink:"/react-native-template-strong/docs/components/photo-taking-button"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,i.jsxs)(t.p,{children:["Empty view with title and description. Used mostly in conjunction with ",(0,i.jsx)(t.code,{children:"FlatListWrapper"})," and ",(0,i.jsx)(t.code,{children:"SectionListWrapper"})," as ",(0,i.jsx)(t.code,{children:"ListEmptyComponent"})," (used as default property in both of them)."]}),"\n",(0,i.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"title"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Title message"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"description"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:(0,i.jsx)(t.code,{children:"string"})}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Description message"})]})]})]}),"\n",(0,i.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'return (\n \n);\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"FlatListWrapper.defaultProps = {\n keyExtractor: defaultKeyIdExtractor,\n ListEmptyComponent: ,\n onEndReachedThreshold: 1,\n};\n"})})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>o});var i=n(6540);const s={},l=i.createContext(s);function r(e){const t=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3efb1320.f38a847a.js b/assets/js/3efb1320.f38a847a.js deleted file mode 100644 index 261e895d..00000000 --- a/assets/js/3efb1320.f38a847a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4258],{7628:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>p,frontMatter:()=>l,metadata:()=>o,toc:()=>d});var s=n(5893),i=n(1151);const l={sidebar_position:12,title:"EmptyView"},r=void 0,o={id:"components/empty-view",title:"EmptyView",description:"Content",source:"@site/docs/components/empty-view.md",sourceDirName:"components",slug:"/components/empty-view",permalink:"/react-native-template-strong/docs/components/empty-view",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/empty-view.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:12,frontMatter:{sidebar_position:12,title:"EmptyView"},sidebar:"tutorialSidebar",previous:{title:"RadioIcon",permalink:"/react-native-template-strong/docs/components/radio-icon"},next:{title:"PhotoTakingButton",permalink:"/react-native-template-strong/docs/components/photo-taking-button"}},a={},d=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Empty view with title and description. Used mostly in conjunction with ",(0,s.jsx)(t.code,{children:"FlatListWrapper"})," and ",(0,s.jsx)(t.code,{children:"SectionListWrapper"})," as ",(0,s.jsx)(t.code,{children:"ListEmptyComponent"})," (used as default property in both of them)."]}),"\n",(0,s.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Title message"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"description"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Description message"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'return (\n \n);\n'})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"FlatListWrapper.defaultProps = {\n keyExtractor: defaultKeyIdExtractor,\n ListEmptyComponent: ,\n onEndReachedThreshold: 1,\n};\n"})})]})}function p(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>o,a:()=>r});var s=n(7294);const i={},l=s.createContext(i);function r(e){const t=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3fdaf820.c83e4a00.js b/assets/js/3fdaf820.c83e4a00.js new file mode 100644 index 00000000..9898c02a --- /dev/null +++ b/assets/js/3fdaf820.c83e4a00.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7221],{7567:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>r,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=t(4848),s=t(8453);const o={sidebar_position:1,title:"Translations"},i=void 0,l={id:"localisation/translations",title:"Translations",description:"Localisation is made possible by react-native-localization.",source:"@site/docs/localisation/translations.md",sourceDirName:"localisation",slug:"/localisation/translations",permalink:"/react-native-template-strong/docs/localisation/translations",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/localisation/translations.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Translations"},sidebar:"tutorialSidebar",previous:{title:"useWhyDidYouUpdate",permalink:"/react-native-template-strong/docs/hooks/use-why-did-you-update"},next:{title:"Add language",permalink:"/react-native-template-strong/docs/localisation/add-language"}},r={},c=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2},{value:"Translations structure",id:"translations-structure",level:2},{value:"Add translation",id:"add-translation",level:2},{value:"Default language",id:"default-language",level:2}];function d(n){const e={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...n.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(e.p,{children:["Localisation is made possible by ",(0,a.jsx)(e.a,{href:"https://github.com/stefalda/ReactNativeLocalization",children:"react-native-localization"}),"."]}),"\n",(0,a.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,a.jsxs)(e.p,{children:["Localization file are located at ",(0,a.jsx)(e.code,{children:"/src/common/localization/localization.ts"}),"."]}),"\n",(0,a.jsx)(e.p,{children:"It has translation methods and the constant object which holds all the translations:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-typescript",children:"export const localization = {\n common: new LocalizedStrings(commonLocalization),\n errors: new LocalizedStrings(errorsLocalization),\n empty: new LocalizedStrings(emptyLocalization),\n pages: new LocalizedStrings(pagesLocalization),\n onboarding: new LocalizedStrings(onboardingLocalization),\n};\n"})}),"\n",(0,a.jsxs)(e.p,{children:["Translations itself are located in ",(0,a.jsx)(e.code,{children:"/src/common/localization/translations"}),"."]}),"\n",(0,a.jsx)(e.p,{children:"Each translation file is represented by simple constant object which holds languages as properties which hold translations strings."}),"\n",(0,a.jsx)(e.p,{children:"Common localization:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-typescript",children:'export const commonLocalization = {\n en: {\n search: "Search",\n selectPhoto: "Select a photo",\n takePhoto: "Take a photo",\n chooseFromLibrary: "Choose from library",\n cancel: "Cancel",\n reject: "Reject",\n delete: "Delete",\n back: "Back",\n next: "Next",\n done: "Done",\n ok: "Ok",\n continue: "Continue",\n save: "Save",\n loading: "Loading",\n photo: "Photo",\n yes: "Yes",\n no: "No",\n areYouSure: "Are you sure?",\n warning: "Warning",\n success: "Success",\n select: "Select",\n dataSuccessfullyUpdated: "Data has been successfully updated",\n settings: "Settings",\n },\n};\n'})}),"\n",(0,a.jsx)(e.p,{children:"It can be string or function."}),"\n",(0,a.jsx)(e.p,{children:"Function example:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-typescript",children:' stops: (stopsCount: number) => {\n return stopsCount + (stopsCount > 1 ? " stops" : " stop");\n },\n km: (distance: string | number) => {\n return distance + " km";\n },\n'})}),"\n",(0,a.jsx)(e.h2,{id:"usage",children:"Usage"}),"\n",(0,a.jsx)(e.p,{children:"Import the localization constant and use needed translation string:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:" \n {localization.common.loading}\n \n"})}),"\n",(0,a.jsx)(e.h2,{id:"translations-structure",children:"Translations structure"}),"\n",(0,a.jsx)(e.p,{children:"The structure is pretty simple:"}),"\n",(0,a.jsxs)(e.ul,{children:["\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"commonLocalization.ts"})," - contains common strings like yes, no, loading etc."]}),"\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"emptyLocalization.ts"})," - contains strings for empty cases like No data, nothing was found etc."]}),"\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"errorsLocalization.ts"})," - contains error related strings"]}),"\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"pagesLocalization.ts"})," - contains pages, tabs, modals, overlays titles"]}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:"Then there are pages specific localization strings:"}),"\n",(0,a.jsxs)(e.ul,{children:["\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"onboardingLocalization.ts"})," - contains strings needed for Onboarding"]}),"\n"]}),"\n",(0,a.jsx)(e.h2,{id:"add-translation",children:"Add translation"}),"\n",(0,a.jsx)(e.p,{children:"Based on what your specific need is (page, common, error etc.) selected the translation file or create one if it's for a page."}),"\n",(0,a.jsxs)(e.p,{children:["If you created a file, don't forget to add it into ",(0,a.jsx)(e.code,{children:"localization"})," constant."]}),"\n",(0,a.jsx)(e.p,{children:"Then add a translation string to every language that you have."}),"\n",(0,a.jsx)(e.h2,{id:"default-language",children:"Default language"}),"\n",(0,a.jsx)(e.p,{children:"By default, there's only English language present in the template."}),"\n",(0,a.jsx)(e.p,{children:"The first language which goes in translation files is going to be the default one."})]})}function h(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,a.jsx)(e,{...n,children:(0,a.jsx)(d,{...n})}):d(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>i,x:()=>l});var a=t(6540);const s={},o=a.createContext(s);function i(n){const e=a.useContext(o);return a.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function l(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:i(n.components),a.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/3fdaf820.e3887165.js b/assets/js/3fdaf820.e3887165.js deleted file mode 100644 index 2dd67c9f..00000000 --- a/assets/js/3fdaf820.e3887165.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[759],{3570:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>r,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=t(5893),s=t(1151);const o={sidebar_position:1,title:"Translations"},i=void 0,l={id:"localisation/translations",title:"Translations",description:"Localisation is made possible by react-native-localization.",source:"@site/docs/localisation/translations.md",sourceDirName:"localisation",slug:"/localisation/translations",permalink:"/react-native-template-strong/docs/localisation/translations",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/localisation/translations.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Translations"},sidebar:"tutorialSidebar",previous:{title:"useWhyDidYouUpdate",permalink:"/react-native-template-strong/docs/hooks/use-why-did-you-update"},next:{title:"Add language",permalink:"/react-native-template-strong/docs/localisation/add-language"}},r={},c=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2},{value:"Translations structure",id:"translations-structure",level:2},{value:"Add translation",id:"add-translation",level:2},{value:"Default language",id:"default-language",level:2}];function d(n){const e={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.a)(),...n.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(e.p,{children:["Localisation is made possible by ",(0,a.jsx)(e.a,{href:"https://github.com/stefalda/ReactNativeLocalization",children:"react-native-localization"}),"."]}),"\n",(0,a.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,a.jsxs)(e.p,{children:["Localization file are located at ",(0,a.jsx)(e.code,{children:"/src/common/localization/localization.ts"}),"."]}),"\n",(0,a.jsx)(e.p,{children:"It has translation methods and the constant object which holds all the translations:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-typescript",children:"export const localization = {\n common: new LocalizedStrings(commonLocalization),\n errors: new LocalizedStrings(errorsLocalization),\n empty: new LocalizedStrings(emptyLocalization),\n pages: new LocalizedStrings(pagesLocalization),\n onboarding: new LocalizedStrings(onboardingLocalization),\n};\n"})}),"\n",(0,a.jsxs)(e.p,{children:["Translations itself are located in ",(0,a.jsx)(e.code,{children:"/src/common/localization/translations"}),"."]}),"\n",(0,a.jsx)(e.p,{children:"Each translation file is represented by simple constant object which holds languages as properties which hold translations strings."}),"\n",(0,a.jsx)(e.p,{children:"Common localization:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-typescript",children:'export const commonLocalization = {\n en: {\n search: "Search",\n selectPhoto: "Select a photo",\n takePhoto: "Take a photo",\n chooseFromLibrary: "Choose from library",\n cancel: "Cancel",\n reject: "Reject",\n delete: "Delete",\n back: "Back",\n next: "Next",\n done: "Done",\n ok: "Ok",\n continue: "Continue",\n save: "Save",\n loading: "Loading",\n photo: "Photo",\n yes: "Yes",\n no: "No",\n areYouSure: "Are you sure?",\n warning: "Warning",\n success: "Success",\n select: "Select",\n dataSuccessfullyUpdated: "Data has been successfully updated",\n settings: "Settings",\n },\n};\n'})}),"\n",(0,a.jsx)(e.p,{children:"It can be string or function."}),"\n",(0,a.jsx)(e.p,{children:"Function example:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-typescript",children:' stops: (stopsCount: number) => {\n return stopsCount + (stopsCount > 1 ? " stops" : " stop");\n },\n km: (distance: string | number) => {\n return distance + " km";\n },\n'})}),"\n",(0,a.jsx)(e.h2,{id:"usage",children:"Usage"}),"\n",(0,a.jsx)(e.p,{children:"Import the localization constant and use needed translation string:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:"\n {localization.common.loading}\n \n"})}),"\n",(0,a.jsx)(e.h2,{id:"translations-structure",children:"Translations structure"}),"\n",(0,a.jsx)(e.p,{children:"The structure is pretty simple:"}),"\n",(0,a.jsxs)(e.ul,{children:["\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"commonLocalization.ts"})," - contains common strings like yes, no, loading etc."]}),"\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"emptyLocalization.ts"})," - contains strings for empty cases like No data, nothing was found etc."]}),"\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"errorsLocalization.ts"})," - contains error related strings"]}),"\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"pagesLocalization.ts"})," - contains pages, tabs, modals, overlays titles"]}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:"Then there are pages specific localization strings:"}),"\n",(0,a.jsxs)(e.ul,{children:["\n",(0,a.jsxs)(e.li,{children:[(0,a.jsx)(e.code,{children:"onboardingLocalization.ts"})," - contains strings needed for Onboarding"]}),"\n"]}),"\n",(0,a.jsx)(e.h2,{id:"add-translation",children:"Add translation"}),"\n",(0,a.jsx)(e.p,{children:"Based on what your specific need is (page, common, error etc.) selected the translation file or create one if it's for a page."}),"\n",(0,a.jsxs)(e.p,{children:["If you created a file, don't forget to add it into ",(0,a.jsx)(e.code,{children:"localization"})," constant."]}),"\n",(0,a.jsx)(e.p,{children:"Then add a translation string to every language that you have."}),"\n",(0,a.jsx)(e.h2,{id:"default-language",children:"Default language"}),"\n",(0,a.jsx)(e.p,{children:"By default, there's only English language present in the template."}),"\n",(0,a.jsx)(e.p,{children:"The first language which goes in translation files is going to be the default one."})]})}function h(n={}){const{wrapper:e}={...(0,s.a)(),...n.components};return e?(0,a.jsx)(e,{...n,children:(0,a.jsx)(d,{...n})}):d(n)}},1151:(n,e,t)=>{t.d(e,{Z:()=>l,a:()=>i});var a=t(7294);const s={},o=a.createContext(s);function i(n){const e=a.useContext(o);return a.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function l(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:i(n.components),a.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/6945.8e8e2060.js b/assets/js/416.36a683d5.js similarity index 58% rename from assets/js/6945.8e8e2060.js rename to assets/js/416.36a683d5.js index 00e9ace2..ab8fcaac 100644 --- a/assets/js/6945.8e8e2060.js +++ b/assets/js/416.36a683d5.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6945],{6945:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[416],{416:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file diff --git a/assets/js/43bdb0b8.35035e38.js b/assets/js/43bdb0b8.35035e38.js deleted file mode 100644 index 607bdf5a..00000000 --- a/assets/js/43bdb0b8.35035e38.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6394],{5377:(e,t,l)=>{l.r(t),l.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>o});var s=l(5893),n=l(1151);const i={sidebar_position:4,title:"dialogsHelpers"},d=void 0,r={id:"helpers/dialogs-helpers",title:"dialogsHelpers",description:"Content",source:"@site/docs/helpers/dialogs-helpers.md",sourceDirName:"helpers",slug:"/helpers/dialogs-helpers",permalink:"/react-native-template-strong/docs/helpers/dialogs-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/dialogs-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672,formattedLastUpdatedAt:"Oct 10, 2021",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"dialogsHelpers"},sidebar:"tutorialSidebar",previous:{title:"defaultKeyIdExtractor",permalink:"/react-native-template-strong/docs/helpers/default-key-id-extractor"},next:{title:"imageHelpers",permalink:"/react-native-template-strong/docs/helpers/image-helpers"}},c={},o=[{value:"Content",id:"content",level:2},{value:"showActionSheet",id:"showactionsheet",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4},{value:"showAlert",id:"showalert",level:3},{value:"Params",id:"params-1",level:4},{value:"Usage example",id:"usage-example-1",level:4},{value:"showCommonDialog",id:"showcommondialog",level:3},{value:"Params",id:"params-2",level:4},{value:"Usage example",id:"usage-example-2",level:4}];function a(e){const t={code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Used to show dialogs, alerts and action sheets"}),"\n",(0,s.jsx)(t.h3,{id:"showactionsheet",children:"showActionSheet"}),"\n",(0,s.jsxs)(t.p,{children:["Shows action sheet on iOS with defined options, on Android it shows React Native's ",(0,s.jsx)(t.code,{children:"Alert"})," with title, message and buttons."]}),"\n",(0,s.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"options"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"ActionSheetIOSOptions"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["Options which will be used to show ",(0,s.jsx)(t.code,{children:"ActionSheetIOS"})," or ",(0,s.jsx)(t.code,{children:"Alert.alert"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"onOptionSelected"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"(optionIndex: number) => void"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Handler which receives selected index of button"})]})]})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:' const onShowActionSheetPress = useCallback(() => {\n showActionSheet(\n {\n title: "Action Sheet Title",\n options: ["Cancel", "Action 1", "Action 2"],\n cancelButtonIndex: 0,\n destructiveButtonIndex: 3,\n message: "Action Sheet Message",\n },\n (optionIndex) => {\n console.warn(`Option ${optionIndex} was pressed`);\n },\n );\n}, []);\n'})}),"\n",(0,s.jsx)(t.h3,{id:"showalert",children:"showAlert"}),"\n",(0,s.jsxs)(t.p,{children:["Shows React Native's ",(0,s.jsx)(t.code,{children:"Alert"})," with provided parameters."]}),"\n",(0,s.jsx)(t.h4,{id:"params-1",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"The dialog's title. Passing empty string will hide the title"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"message"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"An optional message that appears below the dialog's title"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"buttons"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"AlertButton[]"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"An optional array containing buttons configuration"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"options"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"AlertOptions"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"{cancelable: true}"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"An optional Alert configuration for the Android"})]})]})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example-1",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:' const onShowAlertPress = useCallback(() => {\n showAlert("Title", "Message", [\n {\n text: "Action 1",\n onPress: () => {\n console.warn("Action 1 was pressed");\n },\n style: "default",\n },\n {\n text: "Action 2",\n onPress: () => {\n console.warn("Action 2 was pressed");\n },\n style: "destructive",\n },\n ]);\n}, []);\n'})}),"\n",(0,s.jsx)(t.h3,{id:"showcommondialog",children:"showCommonDialog"}),"\n",(0,s.jsx)(t.p,{children:"Shows common yes-no dialog with title and message and on yes press callback."}),"\n",(0,s.jsx)(t.h4,{id:"params-2",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"The dialog's title. Passing empty string will hide the title"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"message"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"The message that appears below the dialog's title"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"onAcceptPress"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"() => void"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["The callback from ",(0,s.jsx)(t.code,{children:"Yes"})," pressed button"]})]})]})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example-2",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:' const onShowCommonDialogPress = useCallback(() => {\n showCommonDialog("Title", "Message", () => {\n console.warn("You pressed Yes");\n });\n}, []);\n'})})]})}function h(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1151:(e,t,l)=>{l.d(t,{Z:()=>r,a:()=>d});var s=l(7294);const n={},i=s.createContext(n);function d(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/43bdb0b8.8e4d0d0e.js b/assets/js/43bdb0b8.8e4d0d0e.js new file mode 100644 index 00000000..2442dc4a --- /dev/null +++ b/assets/js/43bdb0b8.8e4d0d0e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9274],{6685:(e,t,l)=>{l.r(t),l.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>o});var s=l(4848),n=l(8453);const i={sidebar_position:4,title:"dialogsHelpers"},d=void 0,r={id:"helpers/dialogs-helpers",title:"dialogsHelpers",description:"Content",source:"@site/docs/helpers/dialogs-helpers.md",sourceDirName:"helpers",slug:"/helpers/dialogs-helpers",permalink:"/react-native-template-strong/docs/helpers/dialogs-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/dialogs-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"dialogsHelpers"},sidebar:"tutorialSidebar",previous:{title:"defaultKeyIdExtractor",permalink:"/react-native-template-strong/docs/helpers/default-key-id-extractor"},next:{title:"imageHelpers",permalink:"/react-native-template-strong/docs/helpers/image-helpers"}},c={},o=[{value:"Content",id:"content",level:2},{value:"showActionSheet",id:"showactionsheet",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4},{value:"showAlert",id:"showalert",level:3},{value:"Params",id:"params-1",level:4},{value:"Usage example",id:"usage-example-1",level:4},{value:"showCommonDialog",id:"showcommondialog",level:3},{value:"Params",id:"params-2",level:4},{value:"Usage example",id:"usage-example-2",level:4}];function a(e){const t={code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Used to show dialogs, alerts and action sheets"}),"\n",(0,s.jsx)(t.h3,{id:"showactionsheet",children:"showActionSheet"}),"\n",(0,s.jsxs)(t.p,{children:["Shows action sheet on iOS with defined options, on Android it shows React Native's ",(0,s.jsx)(t.code,{children:"Alert"})," with title, message and buttons."]}),"\n",(0,s.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"options"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"ActionSheetIOSOptions"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["Options which will be used to show ",(0,s.jsx)(t.code,{children:"ActionSheetIOS"})," or ",(0,s.jsx)(t.code,{children:"Alert.alert"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"onOptionSelected"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"(optionIndex: number) => void"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Handler which receives selected index of button"})]})]})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:' const onShowActionSheetPress = useCallback(() => {\n showActionSheet(\n {\n title: "Action Sheet Title",\n options: ["Cancel", "Action 1", "Action 2"],\n cancelButtonIndex: 0,\n destructiveButtonIndex: 3,\n message: "Action Sheet Message",\n },\n (optionIndex) => {\n console.warn(`Option ${optionIndex} was pressed`);\n },\n );\n}, []);\n'})}),"\n",(0,s.jsx)(t.h3,{id:"showalert",children:"showAlert"}),"\n",(0,s.jsxs)(t.p,{children:["Shows React Native's ",(0,s.jsx)(t.code,{children:"Alert"})," with provided parameters."]}),"\n",(0,s.jsx)(t.h4,{id:"params-1",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"The dialog's title. Passing empty string will hide the title"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"message"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"An optional message that appears below the dialog's title"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"buttons"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"AlertButton[]"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"An optional array containing buttons configuration"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"options"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"AlertOptions"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"{cancelable: true}"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"An optional Alert configuration for the Android"})]})]})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example-1",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:' const onShowAlertPress = useCallback(() => {\n showAlert("Title", "Message", [\n {\n text: "Action 1",\n onPress: () => {\n console.warn("Action 1 was pressed");\n },\n style: "default",\n },\n {\n text: "Action 2",\n onPress: () => {\n console.warn("Action 2 was pressed");\n },\n style: "destructive",\n },\n ]);\n}, []);\n'})}),"\n",(0,s.jsx)(t.h3,{id:"showcommondialog",children:"showCommonDialog"}),"\n",(0,s.jsx)(t.p,{children:"Shows common yes-no dialog with title and message and on yes press callback."}),"\n",(0,s.jsx)(t.h4,{id:"params-2",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"title"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"The dialog's title. Passing empty string will hide the title"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"message"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"The message that appears below the dialog's title"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"onAcceptPress"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"() => void"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["The callback from ",(0,s.jsx)(t.code,{children:"Yes"})," pressed button"]})]})]})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example-2",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:' const onShowCommonDialogPress = useCallback(() => {\n showCommonDialog("Title", "Message", () => {\n console.warn("You pressed Yes");\n });\n}, []);\n'})})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,t,l)=>{l.d(t,{R:()=>d,x:()=>r});var s=l(6540);const n={},i=s.createContext(n);function d(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/449809ec.3e26d3c8.js b/assets/js/449809ec.3e26d3c8.js deleted file mode 100644 index 8fd87834..00000000 --- a/assets/js/449809ec.3e26d3c8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2544],{8949:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>u,frontMatter:()=>s,metadata:()=>i,toc:()=>d});var a=r(5893),n=r(1151);const s={sidebar_position:2,title:"listHandlers"},l=void 0,i={id:"utils/list-handlers",title:"listHandlers",description:"commonListFulfilledHandler",source:"@site/docs/utils/list-handlers.md",sourceDirName:"utils",slug:"/utils/list-handlers",permalink:"/react-native-template-strong/docs/utils/list-handlers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/utils/list-handlers.md",tags:[],version:"current",lastUpdatedAt:1633280321,formattedLastUpdatedAt:"Oct 3, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"listHandlers"},sidebar:"tutorialSidebar",previous:{title:"newState",permalink:"/react-native-template-strong/docs/utils/new-state"},next:{title:"URL openers",permalink:"/react-native-template-strong/docs/utils/url-openers"}},o={},d=[{value:"commonListFulfilledHandler",id:"commonlistfulfilledhandler",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,n.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"commonlistfulfilledhandler",children:"commonListFulfilledHandler"}),"\n",(0,a.jsxs)(t.p,{children:["Used primarily in redux slices' fulfilled functions to merge or replace the current list with new data based on ",(0,a.jsx)(t.code,{children:"LoadState"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["First parameter is ",(0,a.jsx)(t.code,{children:"LoadState"})," which comes as meta argument."]}),"\n",(0,a.jsx)(t.p,{children:"Second parameter is array of new items which comes as payload of API call or your changes."}),"\n",(0,a.jsx)(t.p,{children:"Third parameter is your current state data array."}),"\n",(0,a.jsxs)(t.p,{children:["As a result, it will produce merged or new array of data, will set ",(0,a.jsx)(t.code,{children:"error"})," to ",(0,a.jsx)(t.code,{children:"null"})," and will update ",(0,a.jsx)(t.code,{children:"LoadState"})," based on the payload array size."]}),"\n",(0,a.jsx)(t.p,{children:"Example of usage:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"function ordersFulfilledHandler(state: OrdersState, payloadAction: OrdersGetPayloadAction) {\n const {data, error, loadState} = commonListFulfilledHandler(payloadAction.meta.arg, payloadAction.payload.orders, state.data);\n\n return newState(state, {loadState, error, data});\n}\n"})})]})}function u(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},1151:(e,t,r)=>{r.d(t,{Z:()=>i,a:()=>l});var a=r(7294);const n={},s=a.createContext(n);function l(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/449809ec.780b2ced.js b/assets/js/449809ec.780b2ced.js new file mode 100644 index 00000000..8c9172ee --- /dev/null +++ b/assets/js/449809ec.780b2ced.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9413],{2550:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var n=r(4848),s=r(8453);const a={sidebar_position:2,title:"listHandlers"},l=void 0,i={id:"utils/list-handlers",title:"listHandlers",description:"commonListFulfilledHandler",source:"@site/docs/utils/list-handlers.md",sourceDirName:"utils",slug:"/utils/list-handlers",permalink:"/react-native-template-strong/docs/utils/list-handlers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/utils/list-handlers.md",tags:[],version:"current",lastUpdatedAt:1633280321e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"listHandlers"},sidebar:"tutorialSidebar",previous:{title:"newState",permalink:"/react-native-template-strong/docs/utils/new-state"},next:{title:"URL openers",permalink:"/react-native-template-strong/docs/utils/url-openers"}},o={},d=[{value:"commonListFulfilledHandler",id:"commonlistfulfilledhandler",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"commonlistfulfilledhandler",children:"commonListFulfilledHandler"}),"\n",(0,n.jsxs)(t.p,{children:["Used primarily in redux slices' fulfilled functions to merge or replace the current list with new data based on ",(0,n.jsx)(t.code,{children:"LoadState"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["First parameter is ",(0,n.jsx)(t.code,{children:"LoadState"})," which comes as meta argument."]}),"\n",(0,n.jsx)(t.p,{children:"Second parameter is array of new items which comes as payload of API call or your changes."}),"\n",(0,n.jsx)(t.p,{children:"Third parameter is your current state data array."}),"\n",(0,n.jsxs)(t.p,{children:["As a result, it will produce merged or new array of data, will set ",(0,n.jsx)(t.code,{children:"error"})," to ",(0,n.jsx)(t.code,{children:"null"})," and will update ",(0,n.jsx)(t.code,{children:"LoadState"})," based on the payload array size."]}),"\n",(0,n.jsx)(t.p,{children:"Example of usage:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",children:"function ordersFulfilledHandler(state: OrdersState, payloadAction: OrdersGetPayloadAction) {\n const {data, error, loadState} = commonListFulfilledHandler(payloadAction.meta.arg, payloadAction.payload.orders, state.data);\n\n return newState(state, {loadState, error, data});\n}\n"})})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>l,x:()=>i});var n=r(6540);const s={},a=n.createContext(s);function l(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4972ee25.d33960d7.js b/assets/js/4972ee25.d33960d7.js deleted file mode 100644 index eac9a1ee..00000000 --- a/assets/js/4972ee25.d33960d7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6638],{5202:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var s=r(5893),n=r(1151);const i={sidebar_position:3,title:"Store"},o=void 0,d={id:"redux/store",title:"Store",description:"Content",source:"@site/docs/redux/store.md",sourceDirName:"redux",slug:"/redux/store",permalink:"/react-native-template-strong/docs/redux/store",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/store.md",tags:[],version:"current",lastUpdatedAt:1689098240,formattedLastUpdatedAt:"Jul 11, 2023",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Store"},sidebar:"tutorialSidebar",previous:{title:"Core idea",permalink:"/react-native-template-strong/docs/redux/core-idea"},next:{title:"State",permalink:"/react-native-template-strong/docs/redux/state"}},a={},c=[{value:"Content",id:"content",level:2},{value:"Middlewares",id:"middlewares",level:2},{value:"Redux-persist",id:"redux-persist",level:3}];function l(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,n.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["The store is defined together with ",(0,s.jsx)(t.code,{children:"redux-persist"})," (read next about it) as ",(0,s.jsx)(t.code,{children:"reducer"})," and disables ",(0,s.jsx)(t.code,{children:"serializableCheck"})," of middlewares:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"const store = configureStore({\n reducer: persistedReducer,\n middleware: (getDefaultMiddleware) =>\n getDefaultMiddleware({\n serializableCheck: false,\n }),\n});\n"})}),"\n",(0,s.jsx)(t.h2,{id:"middlewares",children:"Middlewares"}),"\n",(0,s.jsxs)(t.p,{children:["This template utilizes middlewares what come together with the toolkit with addition of ",(0,s.jsx)(t.code,{children:"redux-persist"})," to have data stored for offline usage."]}),"\n",(0,s.jsx)(t.h3,{id:"redux-persist",children:"Redux-persist"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://github.com/rt2zz/redux-persist",children:"Check it out"})," how it works."]}),"\n",(0,s.jsxs)(t.p,{children:["It's defined in ",(0,s.jsx)(t.code,{children:"src/core/store.ts"})," near the store:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"const persistConfig: PersistConfig= {\n key: 'root',\n storage: AsyncStorage,\n version: 1,\n timeout: 1000,\n};\n"})}),"\n",(0,s.jsxs)(t.p,{children:["It uses ",(0,s.jsx)(t.code,{children:"AsyncStorage"})," as storage, if you don't like it you can change it to your own likings."]}),"\n",(0,s.jsxs)(t.p,{children:["It creates ",(0,s.jsx)(t.code,{children:"persistor"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"const persistor = persistStore(store);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Which is being used in ",(0,s.jsx)(t.code,{children:"PersistGate"})," of ",(0,s.jsx)(t.code,{children:"reduxProvider"})," wrapper:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const reduxProvider = (Component: any) => (props: any) => {\n return (\n \n \n );\n};\n"})})]})}function p(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,t,r)=>{r.d(t,{Z:()=>d,a:()=>o});var s=r(7294);const n={},i=s.createContext(n);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4972ee25.e5531cbd.js b/assets/js/4972ee25.e5531cbd.js new file mode 100644 index 00000000..bd12b2f2 --- /dev/null +++ b/assets/js/4972ee25.e5531cbd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4728],{9134:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var s=r(4848),n=r(8453);const i={sidebar_position:3,title:"Store"},o=void 0,d={id:"redux/store",title:"Store",description:"Content",source:"@site/docs/redux/store.md",sourceDirName:"redux",slug:"/redux/store",permalink:"/react-native-template-strong/docs/redux/store",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/store.md",tags:[],version:"current",lastUpdatedAt:1714909701e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Store"},sidebar:"tutorialSidebar",previous:{title:"Core idea",permalink:"/react-native-template-strong/docs/redux/core-idea"},next:{title:"State",permalink:"/react-native-template-strong/docs/redux/state"}},a={},c=[{value:"Content",id:"content",level:2},{value:"Middlewares",id:"middlewares",level:2},{value:"Redux-persist",id:"redux-persist",level:3}];function l(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["The store is defined together with ",(0,s.jsx)(t.code,{children:"redux-persist"})," (read next about it) as ",(0,s.jsx)(t.code,{children:"reducer"})," and disables ",(0,s.jsx)(t.code,{children:"serializableCheck"})," of middlewares:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"const store = configureStore({\n reducer: persistedReducer,\n middleware: (getDefaultMiddleware) =>\n getDefaultMiddleware({\n serializableCheck: false,\n }),\n});\n"})}),"\n",(0,s.jsx)(t.h2,{id:"middlewares",children:"Middlewares"}),"\n",(0,s.jsxs)(t.p,{children:["This template utilizes middlewares what come together with the toolkit with addition of ",(0,s.jsx)(t.code,{children:"redux-persist"})," to have data stored for offline usage."]}),"\n",(0,s.jsx)(t.h3,{id:"redux-persist",children:"Redux-persist"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://github.com/rt2zz/redux-persist",children:"Check it out"})," how it works."]}),"\n",(0,s.jsxs)(t.p,{children:["It's defined in ",(0,s.jsx)(t.code,{children:"src/core/store.ts"})," near the store:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"const persistConfig: PersistConfig\n \n\n = {\n key: 'root',\n storage: reduxStorage,\n version: 1,\n timeout: 1000,\n};\n"})}),"\n",(0,s.jsxs)(t.p,{children:["It uses ",(0,s.jsx)(t.code,{children:"react-native-mmkv"})," as storage, if you don't like it you can change it to your own likings."]}),"\n",(0,s.jsxs)(t.p,{children:["It creates ",(0,s.jsx)(t.code,{children:"persistor"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"const persistor = persistStore(store);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Which is being used in ",(0,s.jsx)(t.code,{children:"PersistGate"})," of ",(0,s.jsx)(t.code,{children:"reduxProvider"})," wrapper:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const reduxProvider = (Component: any) => (props: any) => {\n return (\n \n \n );\n};\n"})})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>o,x:()=>d});var s=r(6540);const n={},i=s.createContext(n);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4ff29f3f.13d4da7d.js b/assets/js/4ff29f3f.13d4da7d.js new file mode 100644 index 00000000..e1e01ce8 --- /dev/null +++ b/assets/js/4ff29f3f.13d4da7d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[647],{8419:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>x,frontMatter:()=>i,metadata:()=>a,toc:()=>o});var l=n(4848),s=n(8453);const i={sidebar_position:15,title:"DatePickerOverlay"},r=void 0,a={id:"components/date-picker-overlay",title:"DatePickerOverlay",description:"Content",source:"@site/docs/components/date-picker-overlay.md",sourceDirName:"components",slug:"/components/date-picker-overlay",permalink:"/react-native-template-strong/docs/components/date-picker-overlay",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/date-picker-overlay.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:15,frontMatter:{sidebar_position:15,title:"DatePickerOverlay"},sidebar:"tutorialSidebar",previous:{title:"ImageCropPickerButton",permalink:"/react-native-template-strong/docs/components/image-crop-picker-button"},next:{title:"ToastOverlay",permalink:"/react-native-template-strong/docs/components/toast-overlay"}},d={},o=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsx)(t.admonition,{title:"Do not use this component directly!",type:"danger",children:(0,l.jsxs)(t.p,{children:["Use ",(0,l.jsx)(t.code,{children:"showDatePicker"})," to present this component because it's linked to navigation."]})}),"\n",(0,l.jsxs)(t.p,{children:["Represents a date picker provided by ",(0,l.jsx)(t.a,{href:"https://github.com/react-native-datetimepicker/datetimepicker",children:"@react-native-community/datetimepicker"})," as modal on iOS and as overlay on Android."]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"value"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"Date"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Current selected date value"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"minDate"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"Date"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Minimum border of available dates for selection"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"maxDate"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"Date"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Maximum border of available dates for selection"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onDateChange"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"(date: Date) => void "})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Callback with selected date"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'const [selectedDate, setSelectedDate] = useState\n \n\n (new Date());\n\nconst onPress = useCallback(() => {\n return showDatePicker({\n value: selectedDate,\n onDateChange: setSelectedDate,\n });\n}, [selectedDate, setSelectedDate]);\n\nreturn (\n \n \n);\n'})})]})}function x(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var l=n(6540);const s={},i=l.createContext(s);function r(e){const t=l.useContext(i);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),l.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4ff29f3f.7a7c8b52.js b/assets/js/4ff29f3f.7a7c8b52.js deleted file mode 100644 index 4f14b227..00000000 --- a/assets/js/4ff29f3f.7a7c8b52.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3286],{1067:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>x,frontMatter:()=>i,metadata:()=>a,toc:()=>o});var l=n(5893),s=n(1151);const i={sidebar_position:15,title:"DatePickerOverlay"},r=void 0,a={id:"components/date-picker-overlay",title:"DatePickerOverlay",description:"Content",source:"@site/docs/components/date-picker-overlay.md",sourceDirName:"components",slug:"/components/date-picker-overlay",permalink:"/react-native-template-strong/docs/components/date-picker-overlay",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/date-picker-overlay.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:15,frontMatter:{sidebar_position:15,title:"DatePickerOverlay"},sidebar:"tutorialSidebar",previous:{title:"ImageCropPickerButton",permalink:"/react-native-template-strong/docs/components/image-crop-picker-button"},next:{title:"ToastOverlay",permalink:"/react-native-template-strong/docs/components/toast-overlay"}},d={},o=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsx)(t.admonition,{title:"Do not use this component directly!",type:"danger",children:(0,l.jsxs)(t.p,{children:["Use ",(0,l.jsx)(t.code,{children:"showDatePicker"})," to present this component because it's linked to navigation."]})}),"\n",(0,l.jsxs)(t.p,{children:["Represents a date picker provided by ",(0,l.jsx)(t.a,{href:"https://github.com/react-native-datetimepicker/datetimepicker",children:"@react-native-community/datetimepicker"})," as modal on iOS and as overlay on Android."]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"value"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"Date"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Current selected date value"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"minDate"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"Date"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Minimum border of available dates for selection"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"maxDate"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"Date"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Maximum border of available dates for selection"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onDateChange"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"(date: Date) => void "})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Callback with selected date"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'const [selectedDate, setSelectedDate] = useState\n {dateFromFormat(selectedDate, DateFormat.yearDateTime)} \n(new Date());\n\nconst onPress = useCallback(() => {\n return showDatePicker({\n value: selectedDate,\n onDateChange: setSelectedDate,\n });\n}, [selectedDate, setSelectedDate]);\n\nreturn (\n \n \n);\n'})})]})}function x(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(c,{...e})}):c(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>r});var l=n(7294);const s={},i=l.createContext(s);function r(e){const t=l.useContext(i);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),l.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/51dcefc3.6aa0ec64.js b/assets/js/51dcefc3.6aa0ec64.js new file mode 100644 index 00000000..e95452e9 --- /dev/null +++ b/assets/js/51dcefc3.6aa0ec64.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8293],{4354:(e,t,l)=>{l.r(t),l.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>x,frontMatter:()=>n,metadata:()=>a,toc:()=>c});var s=l(4848),i=l(8453);const n={sidebar_position:7,title:"stringHelpers"},r=void 0,a={id:"helpers/strings-helpers",title:"stringHelpers",description:"Content",source:"@site/docs/helpers/strings-helpers.md",sourceDirName:"helpers",slug:"/helpers/strings-helpers",permalink:"/react-native-template-strong/docs/helpers/strings-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/strings-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672e3,sidebarPosition:7,frontMatter:{sidebar_position:7,title:"stringHelpers"},sidebar:"tutorialSidebar",previous:{title:"orientationHelpers",permalink:"/react-native-template-strong/docs/helpers/orientation-helpers"},next:{title:"regexHelpers",permalink:"/react-native-template-strong/docs/helpers/regex-helpers"}},d={},c=[{value:"Content",id:"content",level:2},{value:"capitalizeFirstLetter",id:"capitalizefirstletter",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4},{value:"removeHtmlTags",id:"removehtmltags",level:3},{value:"Params",id:"params-1",level:4},{value:"Usage example",id:"usage-example-1",level:4},{value:"removeEmojis",id:"removeemojis",level:3},{value:"Params",id:"params-2",level:4},{value:"Usage example",id:"usage-example-2",level:4}];function h(e){const t={code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Set of string helpers"}),"\n",(0,s.jsx)(t.h3,{id:"capitalizefirstletter",children:"capitalizeFirstLetter"}),"\n",(0,s.jsx)(t.p,{children:"Capitalizes first letter of provided string. Returns a new string."}),"\n",(0,s.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"word"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"String which first letter will be capitalized"})]})})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'capitalizeFirstLetter("test");\n'})}),"\n",(0,s.jsx)(t.h3,{id:"removehtmltags",children:"removeHtmlTags"}),"\n",(0,s.jsx)(t.p,{children:"Removes HTML tags from provided string. Returns a new string."}),"\n",(0,s.jsx)(t.h4,{id:"params-1",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"text"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"String which contains HTML tags"})]})})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example-1",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'removeHtmlTags("some text");\n'})}),"\n",(0,s.jsx)(t.h3,{id:"removeemojis",children:"removeEmojis"}),"\n",(0,s.jsx)(t.p,{children:"Removes emojis from provided string. Returns a new string."}),"\n",(0,s.jsx)(t.h4,{id:"params-2",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"text"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"String which contains emojis"})]})})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example-2",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'removeEmojis("Test\ud83d\ude04");\n'})})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,t,l)=>{l.d(t,{R:()=>r,x:()=>a});var s=l(6540);const i={},n=s.createContext(i);function r(e){const t=s.useContext(n);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/51dcefc3.81d45bb5.js b/assets/js/51dcefc3.81d45bb5.js deleted file mode 100644 index b9c81617..00000000 --- a/assets/js/51dcefc3.81d45bb5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9969],{3452:(e,t,l)=>{l.r(t),l.d(t,{assets:()=>d,contentTitle:()=>n,default:()=>x,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var s=l(5893),i=l(1151);const r={sidebar_position:7,title:"stringHelpers"},n=void 0,a={id:"helpers/strings-helpers",title:"stringHelpers",description:"Content",source:"@site/docs/helpers/strings-helpers.md",sourceDirName:"helpers",slug:"/helpers/strings-helpers",permalink:"/react-native-template-strong/docs/helpers/strings-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/strings-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672,formattedLastUpdatedAt:"Oct 10, 2021",sidebarPosition:7,frontMatter:{sidebar_position:7,title:"stringHelpers"},sidebar:"tutorialSidebar",previous:{title:"orientationHelpers",permalink:"/react-native-template-strong/docs/helpers/orientation-helpers"},next:{title:"regexHelpers",permalink:"/react-native-template-strong/docs/helpers/regex-helpers"}},d={},c=[{value:"Content",id:"content",level:2},{value:"capitalizeFirstLetter",id:"capitalizefirstletter",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4},{value:"removeHtmlTags",id:"removehtmltags",level:3},{value:"Params",id:"params-1",level:4},{value:"Usage example",id:"usage-example-1",level:4},{value:"removeEmojis",id:"removeemojis",level:3},{value:"Params",id:"params-2",level:4},{value:"Usage example",id:"usage-example-2",level:4}];function h(e){const t={code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Set of string helpers"}),"\n",(0,s.jsx)(t.h3,{id:"capitalizefirstletter",children:"capitalizeFirstLetter"}),"\n",(0,s.jsx)(t.p,{children:"Capitalizes first letter of provided string. Returns a new string."}),"\n",(0,s.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"word"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"String which first letter will be capitalized"})]})})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'capitalizeFirstLetter("test");\n'})}),"\n",(0,s.jsx)(t.h3,{id:"removehtmltags",children:"removeHtmlTags"}),"\n",(0,s.jsx)(t.p,{children:"Removes HTML tags from provided string. Returns a new string."}),"\n",(0,s.jsx)(t.h4,{id:"params-1",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"text"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"String which contains HTML tags"})]})})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example-1",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'removeHtmlTags("some text");\n'})}),"\n",(0,s.jsx)(t.h3,{id:"removeemojis",children:"removeEmojis"}),"\n",(0,s.jsx)(t.p,{children:"Removes emojis from provided string. Returns a new string."}),"\n",(0,s.jsx)(t.h4,{id:"params-2",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"text"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"String which contains emojis"})]})})]}),"\n",(0,s.jsx)(t.h4,{id:"usage-example-2",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'removeEmojis("Test\ud83d\ude04");\n'})})]})}function x(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},1151:(e,t,l)=>{l.d(t,{Z:()=>a,a:()=>n});var s=l(7294);const i={},r=s.createContext(i);function n(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:n(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/527ccfd4.22449236.js b/assets/js/527ccfd4.22449236.js new file mode 100644 index 00000000..f45f4083 --- /dev/null +++ b/assets/js/527ccfd4.22449236.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4823],{8539:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var s=n(4848),i=n(8453);const o={sidebar_position:1,title:"Jest"},r=void 0,a={id:"testing/jest",title:"Jest",description:"Content",source:"@site/docs/testing/jest.md",sourceDirName:"testing",slug:"/testing/jest",permalink:"/react-native-template-strong/docs/testing/jest",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/testing/jest.md",tags:[],version:"current",lastUpdatedAt:1633684154e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Jest"},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/react-native-template-strong/docs/api"},next:{title:"Storybook",permalink:"/react-native-template-strong/docs/testing/storybook"}},c={},l=[{value:"Content",id:"content",level:2},{value:"Adding tests",id:"adding-tests",level:2},{value:"Running tests",id:"running-tests",level:2},{value:"Mocks",id:"mocks",level:2},{value:"Coverage",id:"coverage",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Jest tests are simple and target mostly API communication and methods and functions stability and correctness of execution."}),"\n",(0,s.jsxs)(t.p,{children:["To learn more about Jest, check ",(0,s.jsx)(t.a,{href:"https://jestjs.io",children:"this page"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["All the tests are located in ",(0,s.jsx)(t.code,{children:"__tests__"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Each created test file should follow the next template: ",(0,s.jsx)(t.code,{children:"testName.test.ts"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"adding-tests",children:"Adding tests"}),"\n",(0,s.jsx)(t.p,{children:"To add a test, create a file by following previously mentioned template."}),"\n",(0,s.jsx)(t.p,{children:"Describe your tests like so (I'll use localization as example):"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'describe("Localization", () => {\n\n});\n'})}),"\n",(0,s.jsx)(t.p,{children:"And add tests itself:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:' test("Current language: EN", () => {\n expect(getLanguage()).toBe("en");\n });\n\n test("Current interface language: EN", () => {\n expect(getInterfaceLanguage()).toBe("en");\n });\n\n test("Set empty language", () => {\n setLanguage();\n expect(getLanguage()).toBe("en");\n });\n\n test("Set language: EN", () => {\n setLanguage(Languages.en);\n expect(getLanguage()).toBe("en");\n });\n'})}),"\n",(0,s.jsx)(t.h2,{id:"running-tests",children:"Running tests"}),"\n",(0,s.jsxs)(t.p,{children:["You can run individual tests while debugging them in your IDE or if you want to run every single described test you can simply run:\n",(0,s.jsx)(t.code,{children:"npm run tests"}),". Which will show you ",(0,s.jsx)(t.code,{children:"PASSSED"})," and ",(0,s.jsx)(t.code,{children:"FAILED"})," tests."]}),"\n",(0,s.jsx)(t.h2,{id:"mocks",children:"Mocks"}),"\n",(0,s.jsx)(t.p,{children:"Some dependencies or environments require you to be mocked since tests are not running in React Native environment but NodeJS."}),"\n",(0,s.jsxs)(t.p,{children:["For these cases there is a folder called ",(0,s.jsx)(t.code,{children:"__mocks__"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["There's already a simple mock of ",(0,s.jsx)(t.code,{children:"Localization"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-js",children:'import LocalizedStringsCore from "react-localization";\n\nfunction getInterfaceLanguage() {\n return "en";\n}\n\nexport default class LocalizedStrings extends LocalizedStringsCore {\n constructor(props) {\n super(props, getInterfaceLanguage);\n }\n}\n'})}),"\n",(0,s.jsx)(t.p,{children:"It defines that default and used language will be English without trying to get it from the system."}),"\n",(0,s.jsxs)(t.p,{children:['Then this mock is "imported" or better to say "mocked" in ',(0,s.jsx)(t.code,{children:"__tests__/localization.test.ts"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'jest.mock("react-native-localization");\n'})}),"\n",(0,s.jsx)(t.h2,{id:"coverage",children:"Coverage"}),"\n",(0,s.jsx)(t.p,{children:"To check how well you covered files with test you can see it using coverage."}),"\n",(0,s.jsxs)(t.p,{children:["Run ",(0,s.jsx)(t.code,{children:"npm run tests:coverage"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"coverege"})," folder will appear which will give you HTML pages with detailed information, also there will be a print into terminal after the command will be executed."]})]})}function u(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var s=n(6540);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/527ccfd4.d1de7e13.js b/assets/js/527ccfd4.d1de7e13.js deleted file mode 100644 index d991fc2b..00000000 --- a/assets/js/527ccfd4.d1de7e13.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4469],{29:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var s=n(5893),i=n(1151);const o={sidebar_position:1,title:"Jest"},r=void 0,a={id:"testing/jest",title:"Jest",description:"Content",source:"@site/docs/testing/jest.md",sourceDirName:"testing",slug:"/testing/jest",permalink:"/react-native-template-strong/docs/testing/jest",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/testing/jest.md",tags:[],version:"current",lastUpdatedAt:1633684154,formattedLastUpdatedAt:"Oct 8, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Jest"},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/react-native-template-strong/docs/api"},next:{title:"Storybook",permalink:"/react-native-template-strong/docs/testing/storybook"}},c={},l=[{value:"Content",id:"content",level:2},{value:"Adding tests",id:"adding-tests",level:2},{value:"Running tests",id:"running-tests",level:2},{value:"Mocks",id:"mocks",level:2},{value:"Coverage",id:"coverage",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Jest tests are simple and target mostly API communication and methods and functions stability and correctness of execution."}),"\n",(0,s.jsxs)(t.p,{children:["To learn more about Jest, check ",(0,s.jsx)(t.a,{href:"https://jestjs.io",children:"this page"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["All the tests are located in ",(0,s.jsx)(t.code,{children:"__tests__"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Each created test file should follow the next template: ",(0,s.jsx)(t.code,{children:"testName.test.ts"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"adding-tests",children:"Adding tests"}),"\n",(0,s.jsx)(t.p,{children:"To add a test, create a file by following previously mentioned template."}),"\n",(0,s.jsx)(t.p,{children:"Describe your tests like so (I'll use localization as example):"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'describe("Localization", () => {\n\n});\n'})}),"\n",(0,s.jsx)(t.p,{children:"And add tests itself:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:' test("Current language: EN", () => {\n expect(getLanguage()).toBe("en");\n });\n\n test("Current interface language: EN", () => {\n expect(getInterfaceLanguage()).toBe("en");\n });\n\n test("Set empty language", () => {\n setLanguage();\n expect(getLanguage()).toBe("en");\n });\n\n test("Set language: EN", () => {\n setLanguage(Languages.en);\n expect(getLanguage()).toBe("en");\n });\n'})}),"\n",(0,s.jsx)(t.h2,{id:"running-tests",children:"Running tests"}),"\n",(0,s.jsxs)(t.p,{children:["You can run individual tests while debugging them in your IDE or if you want to run every single described test you can simply run:\n",(0,s.jsx)(t.code,{children:"npm run tests"}),". Which will show you ",(0,s.jsx)(t.code,{children:"PASSSED"})," and ",(0,s.jsx)(t.code,{children:"FAILED"})," tests."]}),"\n",(0,s.jsx)(t.h2,{id:"mocks",children:"Mocks"}),"\n",(0,s.jsx)(t.p,{children:"Some dependencies or environments require you to be mocked since tests are not running in React Native environment but NodeJS."}),"\n",(0,s.jsxs)(t.p,{children:["For these cases there is a folder called ",(0,s.jsx)(t.code,{children:"__mocks__"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["There's already a simple mock of ",(0,s.jsx)(t.code,{children:"Localization"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-js",children:'import LocalizedStringsCore from "react-localization";\n\nfunction getInterfaceLanguage() {\n return "en";\n}\n\nexport default class LocalizedStrings extends LocalizedStringsCore {\n constructor(props) {\n super(props, getInterfaceLanguage);\n }\n}\n'})}),"\n",(0,s.jsx)(t.p,{children:"It defines that default and used language will be English without trying to get it from the system."}),"\n",(0,s.jsxs)(t.p,{children:['Then this mock is "imported" or better to say "mocked" in ',(0,s.jsx)(t.code,{children:"__tests__/localization.test.ts"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'jest.mock("react-native-localization");\n'})}),"\n",(0,s.jsx)(t.h2,{id:"coverage",children:"Coverage"}),"\n",(0,s.jsx)(t.p,{children:"To check how well you covered files with test you can see it using coverage."}),"\n",(0,s.jsxs)(t.p,{children:["Run ",(0,s.jsx)(t.code,{children:"npm run tests:coverage"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"coverege"})," folder will appear which will give you HTML pages with detailed information, also there will be a print into terminal after the command will be executed."]})]})}function u(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>r});var s=n(7294);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/52fe9033.01ce713c.js b/assets/js/52fe9033.01ce713c.js deleted file mode 100644 index 3db4da34..00000000 --- a/assets/js/52fe9033.01ce713c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5967],{8183:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>i});var o=t(5893),r=t(1151);const s={sidebar_position:1,title:"Colors"},l=void 0,c={id:"themes/colors",title:"Colors",description:"Content",source:"@site/docs/themes/colors.md",sourceDirName:"themes",slug:"/themes/colors",permalink:"/react-native-template-strong/docs/themes/colors",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/themes/colors.md",tags:[],version:"current",lastUpdatedAt:1633614778,formattedLastUpdatedAt:"Oct 7, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Colors"},sidebar:"tutorialSidebar",previous:{title:"Vector icons",permalink:"/react-native-template-strong/docs/resources/vector-icons"},next:{title:"Native colors",permalink:"/react-native-template-strong/docs/themes/native-colors"}},a={},i=[{value:"Content",id:"content",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(n.p,{children:["All your colors are stored in ",(0,o.jsx)(n.code,{children:"/src/core/theme/colors.ts"})," as a simple enum:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'export enum Colors {\n black = "#000000",\n white = "#FFFFFF",\n gray = "#F1F1F1",\n darkGray = "#262626",\n blue = "#0A60FF",\n green = "#4DAD4A",\n red = "#CE3C3E",\n transparent = "transparent",\n}\n'})}),"\n",(0,o.jsxs)(n.p,{children:["You can add here simple colors shared by both platforms and which will look the same in ",(0,o.jsx)(n.code,{children:"dark"})," and ",(0,o.jsx)(n.code,{children:"light"})," themes of your application."]}),"\n",(0,o.jsx)(n.p,{children:"You can use this colors next way:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"In styles:"}),"\n"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n backgroundColor: Colors.transparent,\n } as ViewStyle,\n});\n"})}),"\n",(0,o.jsxs)(n.ol,{start:"2",children:["\n",(0,o.jsx)(n.li,{children:"In navigation:"}),"\n"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: Colors.black,\n },\n title: {\n color: Colors.white,\n },\n }\n"})}),"\n",(0,o.jsxs)(n.p,{children:["You can also assign different colors depending on platform using ",(0,o.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformLocalColor"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n backgroundColor: platformLocalColor(Colors.black, Colors.red),\n } as ViewStyle,\n});\n"})}),"\n",(0,o.jsxs)(n.p,{children:["In navigation, you can also set this colors to ",(0,o.jsx)(n.code,{children:"dark"})," and ",(0,o.jsx)(n.code,{children:"light"})," themes:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: {\n light: Colors.white,\n dark: Colors.black,\n },\n },\n title: {\n color: {\n light: Colors.black,\n dark: Colors.white,\n },\n },\n }\n"})}),"\n",(0,o.jsx)(n.p,{children:"But it's not preferred, continue reading next to understand why"}),"\n",(0,o.jsxs)(n.p,{children:["You probably noticed that there are two more enums in ",(0,o.jsx)(n.code,{children:"colors.ts"}),", these are native colors, they work with ",(0,o.jsx)(n.code,{children:"dark"})," and ",(0,o.jsx)(n.code,{children:"light"})," themes."]}),"\n",(0,o.jsx)(n.p,{children:"Follow to the next page to see how to use and add them."})]})}function h(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>c,a:()=>l});var o=t(7294);const r={},s=o.createContext(r);function l(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/52fe9033.927e83b7.js b/assets/js/52fe9033.927e83b7.js new file mode 100644 index 00000000..989d9224 --- /dev/null +++ b/assets/js/52fe9033.927e83b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7916],{6717:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>i});var o=t(4848),r=t(8453);const s={sidebar_position:1,title:"Colors"},l=void 0,c={id:"themes/colors",title:"Colors",description:"Content",source:"@site/docs/themes/colors.md",sourceDirName:"themes",slug:"/themes/colors",permalink:"/react-native-template-strong/docs/themes/colors",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/themes/colors.md",tags:[],version:"current",lastUpdatedAt:1633614778e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Colors"},sidebar:"tutorialSidebar",previous:{title:"Vector icons",permalink:"/react-native-template-strong/docs/resources/vector-icons"},next:{title:"Native colors",permalink:"/react-native-template-strong/docs/themes/native-colors"}},a={},i=[{value:"Content",id:"content",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(n.p,{children:["All your colors are stored in ",(0,o.jsx)(n.code,{children:"/src/core/theme/colors.ts"})," as a simple enum:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'export enum Colors {\n black = "#000000",\n white = "#FFFFFF",\n gray = "#F1F1F1",\n darkGray = "#262626",\n blue = "#0A60FF",\n green = "#4DAD4A",\n red = "#CE3C3E",\n transparent = "transparent",\n}\n'})}),"\n",(0,o.jsxs)(n.p,{children:["You can add here simple colors shared by both platforms and which will look the same in ",(0,o.jsx)(n.code,{children:"dark"})," and ",(0,o.jsx)(n.code,{children:"light"})," themes of your application."]}),"\n",(0,o.jsx)(n.p,{children:"You can use this colors next way:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"In styles:"}),"\n"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n backgroundColor: Colors.transparent,\n } as ViewStyle,\n});\n"})}),"\n",(0,o.jsxs)(n.ol,{start:"2",children:["\n",(0,o.jsx)(n.li,{children:"In navigation:"}),"\n"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: Colors.black,\n },\n title: {\n color: Colors.white,\n },\n }\n"})}),"\n",(0,o.jsxs)(n.p,{children:["You can also assign different colors depending on platform using ",(0,o.jsx)(n.a,{href:"/react-native-template-strong/docs/helpers/color-helpers",children:"platformLocalColor"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",children:"const styles = StyleSheet.create({\n container: {\n backgroundColor: platformLocalColor(Colors.black, Colors.red),\n } as ViewStyle,\n});\n"})}),"\n",(0,o.jsxs)(n.p,{children:["In navigation, you can also set this colors to ",(0,o.jsx)(n.code,{children:"dark"})," and ",(0,o.jsx)(n.code,{children:"light"})," themes:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",children:" topBar: {\n background: {\n color: {\n light: Colors.white,\n dark: Colors.black,\n },\n },\n title: {\n color: {\n light: Colors.black,\n dark: Colors.white,\n },\n },\n }\n"})}),"\n",(0,o.jsx)(n.p,{children:"But it's not preferred, continue reading next to understand why"}),"\n",(0,o.jsxs)(n.p,{children:["You probably noticed that there are two more enums in ",(0,o.jsx)(n.code,{children:"colors.ts"}),", these are native colors, they work with ",(0,o.jsx)(n.code,{children:"dark"})," and ",(0,o.jsx)(n.code,{children:"light"})," themes."]}),"\n",(0,o.jsx)(n.p,{children:"Follow to the next page to see how to use and add them."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>c});var o=t(6540);const r={},s=o.createContext(r);function l(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5b2ba987.1921fbfb.js b/assets/js/5b2ba987.1921fbfb.js new file mode 100644 index 00000000..79bfc2ae --- /dev/null +++ b/assets/js/5b2ba987.1921fbfb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2447],{5377:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>u});var s=o(4848),n=o(8453);const i={sidebar_position:6,title:"useWhyDidYouUpdate"},r=void 0,a={id:"hooks/use-why-did-you-update",title:"useWhyDidYouUpdate",description:"Content",source:"@site/docs/hooks/use-why-did-you-update.md",sourceDirName:"hooks",slug:"/hooks/use-why-did-you-update",permalink:"/react-native-template-strong/docs/hooks/use-why-did-you-update",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/hooks/use-why-did-you-update.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:6,frontMatter:{sidebar_position:6,title:"useWhyDidYouUpdate"},sidebar:"tutorialSidebar",previous:{title:"usePrevious",permalink:"/react-native-template-strong/docs/hooks/use-previous"},next:{title:"Translations",permalink:"/react-native-template-strong/docs/localisation/translations"}},d={},u=[{value:"Content",id:"content",level:2}];function c(e){const t={a:"a",h2:"h2",p:"p",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Description and usage are provided ",(0,s.jsx)(t.a,{href:"https://usehooks.com/useWhyDidYouUpdate/",children:"here"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>r,x:()=>a});var s=o(6540);const n={},i=s.createContext(n);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5b2ba987.404c77da.js b/assets/js/5b2ba987.404c77da.js deleted file mode 100644 index 1df794e3..00000000 --- a/assets/js/5b2ba987.404c77da.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4991],{8719:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>u});var s=o(5893),n=o(1151);const i={sidebar_position:6,title:"useWhyDidYouUpdate"},a=void 0,r={id:"hooks/use-why-did-you-update",title:"useWhyDidYouUpdate",description:"Content",source:"@site/docs/hooks/use-why-did-you-update.md",sourceDirName:"hooks",slug:"/hooks/use-why-did-you-update",permalink:"/react-native-template-strong/docs/hooks/use-why-did-you-update",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/hooks/use-why-did-you-update.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:6,frontMatter:{sidebar_position:6,title:"useWhyDidYouUpdate"},sidebar:"tutorialSidebar",previous:{title:"usePrevious",permalink:"/react-native-template-strong/docs/hooks/use-previous"},next:{title:"Translations",permalink:"/react-native-template-strong/docs/localisation/translations"}},d={},u=[{value:"Content",id:"content",level:2}];function c(t){const e={a:"a",h2:"h2",p:"p",...(0,n.a)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(e.p,{children:["Description and usage are provided ",(0,s.jsx)(e.a,{href:"https://usehooks.com/useWhyDidYouUpdate/",children:"here"}),"."]})]})}function p(t={}){const{wrapper:e}={...(0,n.a)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(c,{...t})}):c(t)}},1151:(t,e,o)=>{o.d(e,{Z:()=>r,a:()=>a});var s=o(7294);const n={},i=s.createContext(n);function a(t){const e=s.useContext(i);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(n):t.components||n:a(t.components),s.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d01a4f0.107584d1.js b/assets/js/5d01a4f0.107584d1.js deleted file mode 100644 index 44160921..00000000 --- a/assets/js/5d01a4f0.107584d1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5638],{8407:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>a,toc:()=>u});var o=n(5893),s=n(1151);const r={sidebar_position:2,title:"useDebounce"},i=void 0,a={id:"hooks/use-debounce",title:"useDebounce",description:"Content",source:"@site/docs/hooks/use-debounce.md",sourceDirName:"hooks",slug:"/hooks/use-debounce",permalink:"/react-native-template-strong/docs/hooks/use-debounce",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/hooks/use-debounce.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"useDebounce"},sidebar:"tutorialSidebar",previous:{title:"useFlatListActions",permalink:"/react-native-template-strong/docs/hooks/use-flat-list-actions"},next:{title:"useEventRegister",permalink:"/react-native-template-strong/docs/hooks/use-event-register"}},c={},u=[{value:"Content",id:"content",level:2}];function d(e){const t={a:"a",h2:"h2",p:"p",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(t.p,{children:["Description and usage are provided ",(0,o.jsx)(t.a,{href:"https://usehooks.com/useDebounce/",children:"here"}),"."]})]})}function l(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>i});var o=n(7294);const s={},r=o.createContext(s);function i(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d01a4f0.d1e2c266.js b/assets/js/5d01a4f0.d1e2c266.js new file mode 100644 index 00000000..08b123d3 --- /dev/null +++ b/assets/js/5d01a4f0.d1e2c266.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9988],{8032:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>c,toc:()=>u});var o=n(4848),s=n(8453);const r={sidebar_position:2,title:"useDebounce"},i=void 0,c={id:"hooks/use-debounce",title:"useDebounce",description:"Content",source:"@site/docs/hooks/use-debounce.md",sourceDirName:"hooks",slug:"/hooks/use-debounce",permalink:"/react-native-template-strong/docs/hooks/use-debounce",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/hooks/use-debounce.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"useDebounce"},sidebar:"tutorialSidebar",previous:{title:"useFlatListActions",permalink:"/react-native-template-strong/docs/hooks/use-flat-list-actions"},next:{title:"useEventRegister",permalink:"/react-native-template-strong/docs/hooks/use-event-register"}},a={},u=[{value:"Content",id:"content",level:2}];function d(e){const t={a:"a",h2:"h2",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(t.p,{children:["Description and usage are provided ",(0,o.jsx)(t.a,{href:"https://usehooks.com/useDebounce/",children:"here"}),"."]})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var o=n(6540);const s={},r=o.createContext(s);function i(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.9e2f3b72.js b/assets/js/5e95c892.9e2f3b72.js new file mode 100644 index 00000000..919b968c --- /dev/null +++ b/assets/js/5e95c892.9e2f3b72.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9647],{7121:(e,s,r)=>{r.r(s),r.d(s,{default:()=>l});r(6540);var t=r(4164),u=r(9024),a=r(7559),c=r(2831),n=r(9201),i=r(4848);function l(e){return(0,i.jsx)(u.e3,{className:(0,t.A)(a.G.wrapper.docsPages),children:(0,i.jsx)(n.A,{children:(0,c.v)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.b00730d7.js b/assets/js/5e95c892.b00730d7.js deleted file mode 100644 index 763248f8..00000000 --- a/assets/js/5e95c892.b00730d7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9661],{1892:(e,s,r)=>{r.r(s),r.d(s,{default:()=>l});r(7294);var t=r(512),u=r(833),a=r(5281),c=r(8790),n=r(7372),i=r(5893);function l(e){return(0,i.jsx)(u.FG,{className:(0,t.Z)(a.k.wrapper.docsPages),children:(0,i.jsx)(n.Z,{children:(0,c.H)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5ed5e9d2.dcf15ffa.js b/assets/js/5ed5e9d2.dcf15ffa.js new file mode 100644 index 00000000..fb78709c --- /dev/null +++ b/assets/js/5ed5e9d2.dcf15ffa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1972],{4058:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var i=n(4848),r=n(8453);const s={sidebar_position:6,title:"orientationHelpers"},l=void 0,a={id:"helpers/orientation-helpers",title:"orientationHelpers",description:"Content",source:"@site/docs/helpers/orientation-helpers.md",sourceDirName:"helpers",slug:"/helpers/orientation-helpers",permalink:"/react-native-template-strong/docs/helpers/orientation-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/orientation-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672e3,sidebarPosition:6,frontMatter:{sidebar_position:6,title:"orientationHelpers"},sidebar:"tutorialSidebar",previous:{title:"imageHelpers",permalink:"/react-native-template-strong/docs/helpers/image-helpers"},next:{title:"stringHelpers",permalink:"/react-native-template-strong/docs/helpers/strings-helpers"}},o={},c=[{value:"Content",id:"content",level:2},{value:"getCurrentOrientation",id:"getcurrentorientation",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4},{value:"setDefaultOrientation",id:"setdefaultorientation",level:3},{value:"Usage example",id:"usage-example-1",level:4}];function d(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,i.jsxs)(t.p,{children:["Sets and gets orientation of device. Made possible by ",(0,i.jsx)(t.a,{href:"https://github.com/wonday/react-native-orientation-locker",children:"react-native-orientation-locker"}),"\nand ",(0,i.jsx)(t.a,{href:"https://github.com/m0ngr31/react-native-device-detection",children:"react-native-device-detection"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"getcurrentorientation",children:"getCurrentOrientation"}),"\n",(0,i.jsxs)(t.p,{children:["Gets initial orientation of device. For smartphones (with ",(0,i.jsx)(t.code,{children:"forceOnPhone"})," equals ",(0,i.jsx)(t.code,{children:"true"}),") it will always return ",(0,i.jsx)(t.code,{children:"PORTRAIT"})]}),"\n",(0,i.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,i.jsx)(t.tbody,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"forceOnPhone"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:(0,i.jsx)(t.code,{children:"Boolean"})}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Returns initial device orientation for smartphones too"})]})})]}),"\n",(0,i.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"const [orientation, setOrientation] = useState\n {dateFromFormat(selectedDate, DateFormat.yearDateTime)} \n(() => getCurrentOrientation());\n\nuseOrientationChange((changedOrientation) => {\n if (isTablet) {\n setOrientation(changedOrientation);\n }\n});\n"})}),"\n",(0,i.jsx)(t.h3,{id:"setdefaultorientation",children:"setDefaultOrientation"}),"\n",(0,i.jsxs)(t.p,{children:["Locks orientation on smartphones to ",(0,i.jsx)(t.code,{children:"PORTRAIT"})," and unlocks it for other devices."]}),"\n",(0,i.jsx)(t.h4,{id:"usage-example-1",children:"Usage example"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export function initializeApp() {\n setDefaultOrientation();\n}\n"})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>a});var i=n(6540);const r={},s=i.createContext(r);function l(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5ed5e9d2.ef9b58ec.js b/assets/js/5ed5e9d2.ef9b58ec.js deleted file mode 100644 index a0c096fa..00000000 --- a/assets/js/5ed5e9d2.ef9b58ec.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1984],{2805:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var i=n(5893),r=n(1151);const s={sidebar_position:6,title:"orientationHelpers"},a=void 0,l={id:"helpers/orientation-helpers",title:"orientationHelpers",description:"Content",source:"@site/docs/helpers/orientation-helpers.md",sourceDirName:"helpers",slug:"/helpers/orientation-helpers",permalink:"/react-native-template-strong/docs/helpers/orientation-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/orientation-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672,formattedLastUpdatedAt:"Oct 10, 2021",sidebarPosition:6,frontMatter:{sidebar_position:6,title:"orientationHelpers"},sidebar:"tutorialSidebar",previous:{title:"imageHelpers",permalink:"/react-native-template-strong/docs/helpers/image-helpers"},next:{title:"stringHelpers",permalink:"/react-native-template-strong/docs/helpers/strings-helpers"}},o={},d=[{value:"Content",id:"content",level:2},{value:"getCurrentOrientation",id:"getcurrentorientation",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4},{value:"setDefaultOrientation",id:"setdefaultorientation",level:3},{value:"Usage example",id:"usage-example-1",level:4}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,i.jsxs)(t.p,{children:["Sets and gets orientation of device. Made possible by ",(0,i.jsx)(t.a,{href:"https://github.com/wonday/react-native-orientation-locker",children:"react-native-orientation-locker"}),"\nand ",(0,i.jsx)(t.a,{href:"https://github.com/m0ngr31/react-native-device-detection",children:"react-native-device-detection"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"getcurrentorientation",children:"getCurrentOrientation"}),"\n",(0,i.jsxs)(t.p,{children:["Gets initial orientation of device. For smartphones (with ",(0,i.jsx)(t.code,{children:"forceOnPhone"})," equals ",(0,i.jsx)(t.code,{children:"true"}),") it will always return ",(0,i.jsx)(t.code,{children:"PORTRAIT"})]}),"\n",(0,i.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,i.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,i.jsx)(t.tbody,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"forceOnPhone"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:(0,i.jsx)(t.code,{children:"Boolean"})}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,i.jsx)(t.td,{style:{textAlign:"left"},children:"Returns initial device orientation for smartphones too"})]})})]}),"\n",(0,i.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"const [orientation, setOrientation] = useState (() => getCurrentOrientation());\n\nuseOrientationChange((changedOrientation) => {\n if (isTablet) {\n setOrientation(changedOrientation);\n }\n});\n"})}),"\n",(0,i.jsx)(t.h3,{id:"setdefaultorientation",children:"setDefaultOrientation"}),"\n",(0,i.jsxs)(t.p,{children:["Locks orientation on smartphones to ",(0,i.jsx)(t.code,{children:"PORTRAIT"})," and unlocks it for other devices."]}),"\n",(0,i.jsx)(t.h4,{id:"usage-example-1",children:"Usage example"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export function initializeApp() {\n setDefaultOrientation();\n}\n"})})]})}function h(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>l,a:()=>a});var i=n(7294);const r={},s=i.createContext(r);function a(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5f847e85.53c1e41c.js b/assets/js/5f847e85.53c1e41c.js new file mode 100644 index 00000000..c395f2eb --- /dev/null +++ b/assets/js/5f847e85.53c1e41c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4363],{9180:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=t(4848),n=t(8453);const a={sidebar_position:2,title:"Images"},i=void 0,o={id:"resources/images",title:"Images",description:"Before adding images",source:"@site/docs/resources/images.md",sourceDirName:"resources",slug:"/resources/images",permalink:"/react-native-template-strong/docs/resources/images",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/resources/images.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Images"},sidebar:"tutorialSidebar",previous:{title:"Fonts",permalink:"/react-native-template-strong/docs/resources/fonts"},next:{title:"SF Symbols",permalink:"/react-native-template-strong/docs/resources/sf-symbols"}},c={},d=[{value:"Before adding images",id:"before-adding-images",level:2},{value:"Adding images",id:"adding-images",level:2},{value:"Accessing images",id:"accessing-images",level:2}];function l(e){const s={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h2,{id:"before-adding-images",children:"Before adding images"}),"\n",(0,r.jsxs)(s.p,{children:["There are ",(0,r.jsx)(s.a,{href:"/react-native-template-strong/docs/resources/sf-symbols",children:"SF Symbols"})," and ",(0,r.jsx)(s.a,{href:"/react-native-template-strong/docs/resources/vector-icons",children:"Material Vector Icons"})," included in this project,\nmaybe will suit your needs better rather than adding more resources."]}),"\n",(0,r.jsx)(s.h2,{id:"adding-images",children:"Adding images"}),"\n",(0,r.jsxs)(s.p,{children:["To add images, simply put your images into ",(0,r.jsx)(s.code,{children:"/resources/images"})," folder (you can add sub-folders inside there)"]}),"\n",(0,r.jsxs)(s.p,{children:["And thanks to ",(0,r.jsx)(s.a,{href:"https://github.com/svbutko/react-native-image-resource-generator",children:"react-native-image-resource-generator"}),",\nrun the following script from your ",(0,r.jsx)(s.code,{children:"package.json"}),":"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"npm run generate-image-resources\n"})}),"\n",(0,r.jsxs)(s.p,{children:["It will generate ",(0,r.jsx)(s.code,{children:"src/common/ImageResources.g.ts"}),", and also will fix some of your unacceptable names."]}),"\n",(0,r.jsx)(s.p,{children:"File content will look similar to this:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-typescript",children:'/* eslint-disable */\n/* tslint:disable */\nimport {ImageURISource} from "react-native";\n\n/**\n * This file is auto-generated by react-native-image-resource-generator\n * !!! DO NOT EDIT !!!\n * For more information check the documentation:\n * https://github.com/svbutko/react-native-image-resource-generator\n*/\n\nexport class ImageResources {\n static readonly camera: ImageURISource = require("../../resources/images/camera.png");\n}\n'})}),"\n",(0,r.jsx)(s.h2,{id:"accessing-images",children:"Accessing images"}),"\n",(0,r.jsx)(s.p,{children:"To access the images which you added, simply call them the next way:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-typescript",metastring:"jsx",children:" \n"})})]})}function m(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var r=t(6540);const n={},a=r.createContext(n);function i(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5f847e85.d027db0e.js b/assets/js/5f847e85.d027db0e.js deleted file mode 100644 index a5b8814e..00000000 --- a/assets/js/5f847e85.d027db0e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5601],{2250:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=t(5893),n=t(1151);const a={sidebar_position:2,title:"Images"},i=void 0,o={id:"resources/images",title:"Images",description:"Before adding images",source:"@site/docs/resources/images.md",sourceDirName:"resources",slug:"/resources/images",permalink:"/react-native-template-strong/docs/resources/images",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/resources/images.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Images"},sidebar:"tutorialSidebar",previous:{title:"Fonts",permalink:"/react-native-template-strong/docs/resources/fonts"},next:{title:"SF Symbols",permalink:"/react-native-template-strong/docs/resources/sf-symbols"}},c={},d=[{value:"Before adding images",id:"before-adding-images",level:2},{value:"Adding images",id:"adding-images",level:2},{value:"Accessing images",id:"accessing-images",level:2}];function l(e){const s={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,n.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h2,{id:"before-adding-images",children:"Before adding images"}),"\n",(0,r.jsxs)(s.p,{children:["There are ",(0,r.jsx)(s.a,{href:"/react-native-template-strong/docs/resources/sf-symbols",children:"SF Symbols"})," and ",(0,r.jsx)(s.a,{href:"/react-native-template-strong/docs/resources/vector-icons",children:"Material Vector Icons"})," included in this project,\nmaybe will suit your needs better rather than adding more resources."]}),"\n",(0,r.jsx)(s.h2,{id:"adding-images",children:"Adding images"}),"\n",(0,r.jsxs)(s.p,{children:["To add images, simply put your images into ",(0,r.jsx)(s.code,{children:"/resources/images"})," folder (you can add sub-folders inside there)"]}),"\n",(0,r.jsxs)(s.p,{children:["And thanks to ",(0,r.jsx)(s.a,{href:"https://github.com/svbutko/react-native-image-resource-generator",children:"react-native-image-resource-generator"}),",\nrun the following script from your ",(0,r.jsx)(s.code,{children:"package.json"}),":"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"npm run generate-image-resources\n"})}),"\n",(0,r.jsxs)(s.p,{children:["It will generate ",(0,r.jsx)(s.code,{children:"src/common/ImageResources.g.ts"}),", and also will fix some of your unacceptable names."]}),"\n",(0,r.jsx)(s.p,{children:"File content will look similar to this:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-typescript",children:'/* eslint-disable */\n/* tslint:disable */\nimport {ImageURISource} from "react-native";\n\n/**\n * This file is auto-generated by react-native-image-resource-generator\n * !!! DO NOT EDIT !!!\n * For more information check the documentation:\n * https://github.com/svbutko/react-native-image-resource-generator\n*/\n\nexport class ImageResources {\n static readonly camera: ImageURISource = require("../../resources/images/camera.png");\n}\n'})}),"\n",(0,r.jsx)(s.h2,{id:"accessing-images",children:"Accessing images"}),"\n",(0,r.jsx)(s.p,{children:"To access the images which you added, simply call them the next way:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-typescript",metastring:"jsx",children:" \n"})})]})}function m(e={}){const{wrapper:s}={...(0,n.a)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},1151:(e,s,t)=>{t.d(s,{Z:()=>o,a:()=>i});var r=t(7294);const n={},a=r.createContext(n);function i(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5f9cf606.44f2588e.js b/assets/js/5f9cf606.44f2588e.js deleted file mode 100644 index 9cabd35f..00000000 --- a/assets/js/5f9cf606.44f2588e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7062],{4545:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>c,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var s=n(5893),o=n(1151);const i={sidebar_position:6,title:"Jest config"},c=void 0,r={id:"configs/jest-config",title:"Jest config",description:"Jest utilizes eslint-config-react-strong",source:"@site/docs/configs/jest-config.md",sourceDirName:"configs",slug:"/configs/jest-config",permalink:"/react-native-template-strong/docs/configs/jest-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/jest-config.md",tags:[],version:"current",lastUpdatedAt:1633194349,formattedLastUpdatedAt:"Oct 2, 2021",sidebarPosition:6,frontMatter:{sidebar_position:6,title:"Jest config"},sidebar:"tutorialSidebar",previous:{title:"Metro config",permalink:"/react-native-template-strong/docs/configs/metro-config"},next:{title:"Detox config",permalink:"/react-native-template-strong/docs/configs/detox-config"}},a={},l=[];function f(t){const e={a:"a",p:"p",...(0,o.a)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(e.p,{children:["Jest utilizes ",(0,s.jsx)(e.a,{href:"https://github.com/svbutko/eslint-config-react-strong",children:"eslint-config-react-strong"}),"\nset of rules provided by ",(0,s.jsx)(e.a,{href:"https://github.com/jest-community/eslint-plugin-jest",children:"eslint-plugin-jest"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["It also includes ",(0,s.jsx)(e.a,{href:"https://github.com/kulshekhar/ts-jest",children:"ts-jest"})," to work with Detox."]})]})}function d(t={}){const{wrapper:e}={...(0,o.a)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(f,{...t})}):f(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>r,a:()=>c});var s=n(7294);const o={},i=s.createContext(o);function c(t){const e=s.useContext(i);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:c(t.components),s.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/5f9cf606.9f8ebc2f.js b/assets/js/5f9cf606.9f8ebc2f.js new file mode 100644 index 00000000..a90cd1df --- /dev/null +++ b/assets/js/5f9cf606.9f8ebc2f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5776],{2113:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var s=n(4848),o=n(8453);const i={sidebar_position:6,title:"Jest config"},c=void 0,r={id:"configs/jest-config",title:"Jest config",description:"Jest utilizes eslint-config-react-strong",source:"@site/docs/configs/jest-config.md",sourceDirName:"configs",slug:"/configs/jest-config",permalink:"/react-native-template-strong/docs/configs/jest-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/jest-config.md",tags:[],version:"current",lastUpdatedAt:1633194349e3,sidebarPosition:6,frontMatter:{sidebar_position:6,title:"Jest config"},sidebar:"tutorialSidebar",previous:{title:"Metro config",permalink:"/react-native-template-strong/docs/configs/metro-config"},next:{title:"Detox config",permalink:"/react-native-template-strong/docs/configs/detox-config"}},a={},l=[];function f(t){const e={a:"a",p:"p",...(0,o.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(e.p,{children:["Jest utilizes ",(0,s.jsx)(e.a,{href:"https://github.com/svbutko/eslint-config-react-strong",children:"eslint-config-react-strong"}),"\nset of rules provided by ",(0,s.jsx)(e.a,{href:"https://github.com/jest-community/eslint-plugin-jest",children:"eslint-plugin-jest"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["It also includes ",(0,s.jsx)(e.a,{href:"https://github.com/kulshekhar/ts-jest",children:"ts-jest"})," to work with Detox."]})]})}function u(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(f,{...t})}):f(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>c,x:()=>r});var s=n(6540);const o={},i=s.createContext(o);function c(t){const e=s.useContext(i);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:c(t.components),s.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/5fbc5cf1.e66a5f14.js b/assets/js/5fbc5cf1.e66a5f14.js new file mode 100644 index 00000000..c98ed352 --- /dev/null +++ b/assets/js/5fbc5cf1.e66a5f14.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7624],{8946:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=n(4848),o=n(8453);const r={sidebar_position:17,title:"API"},i=void 0,a={id:"api",title:"API",description:"Content",source:"@site/docs/api.md",sourceDirName:".",slug:"/api",permalink:"/react-native-template-strong/docs/api",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/api.md",tags:[],version:"current",lastUpdatedAt:1688636932e3,sidebarPosition:17,frontMatter:{sidebar_position:17,title:"API"},sidebar:"tutorialSidebar",previous:{title:"Environments",permalink:"/react-native-template-strong/docs/environments"},next:{title:"Jest",permalink:"/react-native-template-strong/docs/testing/jest"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Example",id:"example",level:2}];function l(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["This template was primarily made and tested with usage of ",(0,s.jsx)(t.code,{children:"fetch"})," to communicate with API."]}),"\n",(0,s.jsx)(t.p,{children:"But it's up to you to choose what to use."}),"\n",(0,s.jsxs)(t.p,{children:["The API folder is located in ",(0,s.jsx)(t.code,{children:"src/core/api"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["It contains ",(0,s.jsx)(t.code,{children:"dto"})," folder for your API interfaces."]}),"\n",(0,s.jsxs)(t.p,{children:["And ",(0,s.jsx)(t.code,{children:"requests"})," where your requests will be stored."]}),"\n",(0,s.jsx)(t.p,{children:"There is also a set of predefined server headers which can be used to fetch data:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"defaultHeaders"})," - connection ",(0,s.jsx)(t.code,{children:"keep-alive"})," and content type ",(0,s.jsx)(t.code,{children:"application/json"})]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["Additionally, there is ",(0,s.jsx)(t.code,{children:"handleFetchJsonResponse"})," a fetch result handler to properly handle errors."]}),"\n",(0,s.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"export const ItemApi = {\n async getData(): Promise {\n return await fetch(\n `${Config.API_URL}/api/getData`,\n {\n method: 'GET',\n headers: defaultHeaders,\n },\n ).then(handleFetchJsonResponse);\n },\n};\n"})})]})}function p(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>a});var s=n(6540);const o={},r=s.createContext(o);function i(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5fbc5cf1.f3daa5fe.js b/assets/js/5fbc5cf1.f3daa5fe.js deleted file mode 100644 index b9c22893..00000000 --- a/assets/js/5fbc5cf1.f3daa5fe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1207],{8594:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=n(5893),o=n(1151);const r={sidebar_position:17,title:"API"},i=void 0,a={id:"api",title:"API",description:"Content",source:"@site/docs/api.md",sourceDirName:".",slug:"/api",permalink:"/react-native-template-strong/docs/api",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/api.md",tags:[],version:"current",lastUpdatedAt:1688636932,formattedLastUpdatedAt:"Jul 6, 2023",sidebarPosition:17,frontMatter:{sidebar_position:17,title:"API"},sidebar:"tutorialSidebar",previous:{title:"Environments",permalink:"/react-native-template-strong/docs/environments"},next:{title:"Jest",permalink:"/react-native-template-strong/docs/testing/jest"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Example",id:"example",level:2}];function l(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["This template was primarily made and tested with usage of ",(0,s.jsx)(t.code,{children:"fetch"})," to communicate with API."]}),"\n",(0,s.jsx)(t.p,{children:"But it's up to you to choose what to use."}),"\n",(0,s.jsxs)(t.p,{children:["The API folder is located in ",(0,s.jsx)(t.code,{children:"src/core/api"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["It contains ",(0,s.jsx)(t.code,{children:"dto"})," folder for your API interfaces."]}),"\n",(0,s.jsxs)(t.p,{children:["And ",(0,s.jsx)(t.code,{children:"requests"})," where your requests will be stored."]}),"\n",(0,s.jsx)(t.p,{children:"There is also a set of predefined server headers which can be used to fetch data:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"defaultHeaders"})," - connection ",(0,s.jsx)(t.code,{children:"keep-alive"})," and content type ",(0,s.jsx)(t.code,{children:"application/json"})]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["Additionally, there is ",(0,s.jsx)(t.code,{children:"handleFetchJsonResponse"})," a fetch result handler to properly handle errors."]}),"\n",(0,s.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"export const ItemApi = {\n async getData(): Promise {\n return await fetch(\n `${Config.API_URL}/api/getData`,\n {\n method: 'GET',\n headers: defaultHeaders,\n },\n ).then(handleFetchJsonResponse);\n },\n};\n"})})]})}function p(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>i});var s=n(7294);const o={},r=s.createContext(o);function i(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6222aa5d.d734b542.js b/assets/js/6222aa5d.d734b542.js new file mode 100644 index 00000000..e02e982c --- /dev/null +++ b/assets/js/6222aa5d.d734b542.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1462],{248:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>l,toc:()=>c});var r=i(4848),s=i(8453);const t={sidebar_position:2,title:"Android internals"},d=void 0,l={id:"internals/android",title:"Android internals",description:"Hermes",source:"@site/docs/internals/android.md",sourceDirName:"internals",slug:"/internals/android",permalink:"/react-native-template-strong/docs/internals/android",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/internals/android.md",tags:[],version:"current",lastUpdatedAt:1714909701e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Android internals"},sidebar:"tutorialSidebar",previous:{title:"iOS internals",permalink:"/react-native-template-strong/docs/internals/ios"},next:{title:"Checking on updates",permalink:"/react-native-template-strong/docs/checking-updates"}},o={},c=[{value:"Hermes",id:"hermes",level:2},{value:"Proguard",id:"proguard",level:2},{value:"Versions",id:"versions",level:2},{value:"Gradle",id:"gradle",level:2},{value:"Network security config",id:"network-security-config",level:2},{value:"Large heap",id:"large-heap",level:2}];function a(e){const n={code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"hermes",children:"Hermes"}),"\n",(0,r.jsx)(n.p,{children:"Enabled"}),"\n",(0,r.jsx)(n.h2,{id:"proguard",children:"Proguard"}),"\n",(0,r.jsxs)(n.p,{children:["By default ",(0,r.jsx)(n.code,{children:"proguard"})," is disabled"]}),"\n",(0,r.jsx)(n.h2,{id:"versions",children:"Versions"}),"\n",(0,r.jsx)(n.p,{children:"Next versions are being used:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["kotlinVersion - ",(0,r.jsx)(n.code,{children:"1.9.22"})]}),"\n",(0,r.jsxs)(n.li,{children:["buildToolsVersion - ",(0,r.jsx)(n.code,{children:"34.0.0"})]}),"\n",(0,r.jsxs)(n.li,{children:["minSdkVersion - ",(0,r.jsx)(n.code,{children:"24"})]}),"\n",(0,r.jsxs)(n.li,{children:["compileSdkVersion - ",(0,r.jsx)(n.code,{children:"34"})]}),"\n",(0,r.jsxs)(n.li,{children:["targetSdkVersion - ",(0,r.jsx)(n.code,{children:"34"})]}),"\n",(0,r.jsxs)(n.li,{children:["ndkVersion - ",(0,r.jsx)(n.code,{children:"26.1.10909125"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"gradle",children:"Gradle"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Gradle version is set to ",(0,r.jsx)(n.code,{children:"8.6"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"network-security-config",children:"Network security config"}),"\n",(0,r.jsx)(n.p,{children:"There's a network security config which defines next addresses to be allowed:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"localhost"}),"\n",(0,r.jsx)(n.li,{children:"10.0.2.2 - Android Emulator"}),"\n",(0,r.jsx)(n.li,{children:"10.0.3.2 - Genymotion Emulator"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["If you have troubles connecting while in debug from physical device, try to add your IP address in ",(0,r.jsx)(n.code,{children:"network_security_config.xml"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"large-heap",children:"Large heap"}),"\n",(0,r.jsx)(n.p,{children:"Large heap is enabled by default, you can disable it but practice shows that in most of the cases you need to enable it."})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>d,x:()=>l});var r=i(6540);const s={},t=r.createContext(s);function d(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6222aa5d.fae77e55.js b/assets/js/6222aa5d.fae77e55.js deleted file mode 100644 index 40898071..00000000 --- a/assets/js/6222aa5d.fae77e55.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3772],{8321:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>l,toc:()=>a});var r=i(5893),s=i(1151);const t={sidebar_position:2,title:"Android internals"},d=void 0,l={id:"internals/android",title:"Android internals",description:"Hermes",source:"@site/docs/internals/android.md",sourceDirName:"internals",slug:"/internals/android",permalink:"/react-native-template-strong/docs/internals/android",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/internals/android.md",tags:[],version:"current",lastUpdatedAt:1704743195,formattedLastUpdatedAt:"Jan 8, 2024",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Android internals"},sidebar:"tutorialSidebar",previous:{title:"iOS internals",permalink:"/react-native-template-strong/docs/internals/ios"},next:{title:"Checking on updates",permalink:"/react-native-template-strong/docs/checking-updates"}},o={},a=[{value:"Hermes",id:"hermes",level:2},{value:"Proguard",id:"proguard",level:2},{value:"Versions",id:"versions",level:2},{value:"Gradle",id:"gradle",level:2},{value:"Network security config",id:"network-security-config",level:2},{value:"Large heap",id:"large-heap",level:2}];function c(e){const n={code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"hermes",children:"Hermes"}),"\n",(0,r.jsx)(n.p,{children:"Enabled"}),"\n",(0,r.jsx)(n.h2,{id:"proguard",children:"Proguard"}),"\n",(0,r.jsxs)(n.p,{children:["By default ",(0,r.jsx)(n.code,{children:"proguard"})," is disabled"]}),"\n",(0,r.jsx)(n.h2,{id:"versions",children:"Versions"}),"\n",(0,r.jsx)(n.p,{children:"Next versions are being used:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["kotlinVersion - ",(0,r.jsx)(n.code,{children:"1.8.0"})]}),"\n",(0,r.jsxs)(n.li,{children:["buildToolsVersion - ",(0,r.jsx)(n.code,{children:"34.0.0"})]}),"\n",(0,r.jsxs)(n.li,{children:["minSdkVersion - ",(0,r.jsx)(n.code,{children:"24"})]}),"\n",(0,r.jsxs)(n.li,{children:["compileSdkVersion - ",(0,r.jsx)(n.code,{children:"34"})]}),"\n",(0,r.jsxs)(n.li,{children:["targetSdkVersion - ",(0,r.jsx)(n.code,{children:"34"})]}),"\n",(0,r.jsxs)(n.li,{children:["ndkVersion - ",(0,r.jsx)(n.code,{children:"25.1.8937393"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"gradle",children:"Gradle"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Gradle version is set to ",(0,r.jsx)(n.code,{children:"8.3"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"network-security-config",children:"Network security config"}),"\n",(0,r.jsx)(n.p,{children:"There's a network security config which defines next addresses to be allowed:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"localhost"}),"\n",(0,r.jsx)(n.li,{children:"10.0.2.2 - Android Emulator"}),"\n",(0,r.jsx)(n.li,{children:"10.0.3.2 - Genymotion Emulator"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["If you have troubles connecting while in debug from physical device, try to add your IP address in ",(0,r.jsx)(n.code,{children:"network_security_config.xml"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"large-heap",children:"Large heap"}),"\n",(0,r.jsx)(n.p,{children:"Large heap is enabled by default, you can disable it but practice shows that in most of the cases you need to enable it."})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>l,a:()=>d});var r=i(7294);const s={},t=r.createContext(s);function d(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/62c33f29.0a26d829.js b/assets/js/62c33f29.0a26d829.js deleted file mode 100644 index 3a12d1ae..00000000 --- a/assets/js/62c33f29.0a26d829.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9102],{3976:(t,e,l)=>{l.r(e),l.d(e,{assets:()=>c,contentTitle:()=>d,default:()=>a,frontMatter:()=>i,metadata:()=>r,toc:()=>o});var n=l(5893),s=l(1151);const i={sidebar_position:1,title:"PrimaryButton"},d=void 0,r={id:"components/primary-button",title:"PrimaryButton",description:"Content",source:"@site/docs/components/primary-button.md",sourceDirName:"components",slug:"/components/primary-button",permalink:"/react-native-template-strong/docs/components/primary-button",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/primary-button.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"PrimaryButton"},sidebar:"tutorialSidebar",previous:{title:"Common constants",permalink:"/react-native-template-strong/docs/common-constants"},next:{title:"PrimaryTextInput",permalink:"/react-native-template-strong/docs/components/primary-text-input"}},c={},o=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function x(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,n.jsx)(e.p,{children:"Primary button of project which should be used as a button component. Provides several built-in type scenarios."}),"\n",(0,n.jsx)(e.h2,{id:"params",children:"Params"}),"\n",(0,n.jsxs)(e.p,{children:["Extends ",(0,n.jsx)(e.code,{children:"PressableProps"})," and additionally adds next properties"]}),"\n",(0,n.jsxs)(e.table,{children:[(0,n.jsx)(e.thead,{children:(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Required"}),(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Default value"}),(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(e.tbody,{children:[(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"label"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"string"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"True"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"-"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Label of button"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"type"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"ButtonType"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"True"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"-"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Button type based on which different styles will be shown"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"rounded"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"boolean"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Should the corners be rounded"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"label"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"string"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Style of container"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"icon"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"ImageURISource"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Custom icon"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"iconStyle"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"StyleProp "})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Custom icon's style"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"platformIconProps"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"IIconPlatformProps"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsxs)(e.td,{style:{textAlign:"left"},children:["Platform icon props which will be used if ",(0,n.jsx)(e.code,{children:"icon"})," is not provided"]})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"labelStyle"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"TextStyle"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Label's style"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"isLoading"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"boolean"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Shows activity indicator"})]})]})]}),"\n",(0,n.jsx)(e.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:' \n'})})]})}function a(t={}){const{wrapper:e}={...(0,s.a)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(x,{...t})}):x(t)}},1151:(t,e,l)=>{l.d(e,{Z:()=>r,a:()=>d});var n=l(7294);const s={},i=n.createContext(s);function d(t){const e=n.useContext(i);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:d(t.components),n.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/62c33f29.0d4feda3.js b/assets/js/62c33f29.0d4feda3.js new file mode 100644 index 00000000..01137a30 --- /dev/null +++ b/assets/js/62c33f29.0d4feda3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7597],{1950:(t,e,l)=>{l.r(e),l.d(e,{assets:()=>c,contentTitle:()=>d,default:()=>a,frontMatter:()=>i,metadata:()=>r,toc:()=>o});var n=l(4848),s=l(8453);const i={sidebar_position:1,title:"PrimaryButton"},d=void 0,r={id:"components/primary-button",title:"PrimaryButton",description:"Content",source:"@site/docs/components/primary-button.md",sourceDirName:"components",slug:"/components/primary-button",permalink:"/react-native-template-strong/docs/components/primary-button",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/primary-button.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"PrimaryButton"},sidebar:"tutorialSidebar",previous:{title:"Common constants",permalink:"/react-native-template-strong/docs/common-constants"},next:{title:"PrimaryTextInput",permalink:"/react-native-template-strong/docs/components/primary-text-input"}},c={},o=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function x(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,n.jsx)(e.p,{children:"Primary button of project which should be used as a button component. Provides several built-in type scenarios."}),"\n",(0,n.jsx)(e.h2,{id:"params",children:"Params"}),"\n",(0,n.jsxs)(e.p,{children:["Extends ",(0,n.jsx)(e.code,{children:"PressableProps"})," and additionally adds next properties"]}),"\n",(0,n.jsxs)(e.table,{children:[(0,n.jsx)(e.thead,{children:(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Required"}),(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Default value"}),(0,n.jsx)(e.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsxs)(e.tbody,{children:[(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"label"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"string"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"True"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"-"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Label of button"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"type"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"ButtonType"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"True"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"-"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Button type based on which different styles will be shown"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"rounded"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"boolean"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Should the corners be rounded"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"label"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"string"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Style of container"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"icon"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"ImageURISource"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Custom icon"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"iconStyle"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"StyleProp "})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Custom icon's style"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"platformIconProps"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"IIconPlatformProps"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsxs)(e.td,{style:{textAlign:"left"},children:["Platform icon props which will be used if ",(0,n.jsx)(e.code,{children:"icon"})," is not provided"]})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"labelStyle"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"TextStyle"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Label's style"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"isLoading"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:(0,n.jsx)(e.code,{children:"boolean"})}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,n.jsx)(e.td,{style:{textAlign:"left"},children:"Shows activity indicator"})]})]})]}),"\n",(0,n.jsx)(e.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:' \n'})})]})}function a(t={}){const{wrapper:e}={...(0,s.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(x,{...t})}):x(t)}},8453:(t,e,l)=>{l.d(e,{R:()=>d,x:()=>r});var n=l(6540);const s={},i=n.createContext(s);function d(t){const e=n.useContext(i);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:d(t.components),n.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/644e2e9e.a022b8ca.js b/assets/js/644e2e9e.a022b8ca.js new file mode 100644 index 00000000..a5b03bce --- /dev/null +++ b/assets/js/644e2e9e.a022b8ca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1577],{8350:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var a=t(4848),i=t(8453);const s={sidebar_position:13,title:"Validations"},r=void 0,o={id:"validations",title:"Validations",description:"Content",source:"@site/docs/validations.md",sourceDirName:".",slug:"/validations",permalink:"/react-native-template-strong/docs/validations",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/validations.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:13,frontMatter:{sidebar_position:13,title:"Validations"},sidebar:"tutorialSidebar",previous:{title:"shareHelpers",permalink:"/react-native-template-strong/docs/helpers/share-helpers"},next:{title:"newState",permalink:"/react-native-template-strong/docs/utils/new-state"}},l={},c=[{value:"Content",id:"content",level:2},{value:"Validations",id:"validations",level:2},{value:"emptyValidation",id:"emptyvalidation",level:3},{value:"datesValidation",id:"datesvalidation",level:3},{value:"phoneValidations",id:"phonevalidations",level:3},{value:"emailValidations",id:"emailvalidations",level:3},{value:"fullNameValidations",id:"fullnamevalidations",level:3},{value:"Validation constants",id:"validation-constants",level:2},{value:"Hooks",id:"hooks",level:2},{value:"useInputError",id:"useinputerror",level:3},{value:"Async thunk error handling",id:"async-thunk-error-handling",level:2},{value:"handlePromiseResult",id:"handlepromiseresult",level:3}];function d(e){const n={code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,a.jsx)(n.p,{children:"Primarily has validations for different use cases (e.g. min. password length, max. name characters etc.)."}),"\n",(0,a.jsxs)(n.p,{children:["Many of those validations can be used with ",(0,a.jsx)(n.code,{children:"PrimaryTextInput"})," to show errors while user types, when user finished typing (left input) or when user taps on a certain button."]}),"\n",(0,a.jsxs)(n.p,{children:["These validations are located in the ",(0,a.jsx)(n.code,{children:"src/common/validations"})," folder."]}),"\n",(0,a.jsx)(n.h2,{id:"validations",children:"Validations"}),"\n",(0,a.jsxs)(n.p,{children:["These validations operate with ",(0,a.jsx)(n.code,{children:"null | string"})," return type rather than throwing an error. So when a method returns ",(0,a.jsx)(n.code,{children:"null"})," then a value passed, otherwise it returns localized ",(0,a.jsx)(n.code,{children:"string"})," which can be shown to user as error."]}),"\n",(0,a.jsx)(n.h3,{id:"emptyvalidation",children:"emptyValidation"}),"\n",(0,a.jsxs)(n.p,{children:["Checks whether a string is empty (returns localization string) or not (returns ",(0,a.jsx)(n.code,{children:"null"}),")."]}),"\n",(0,a.jsx)(n.h3,{id:"datesvalidation",children:"datesValidation"}),"\n",(0,a.jsx)(n.p,{children:"Compares two dates between each other.\nIf dates are equal then returns localization string (dates can't be equal).\nThen based on which field is currently being filled checks the difference:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"from"})," can't be later than ",(0,a.jsx)(n.code,{children:"to"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"to"})," can't be earlier than ",(0,a.jsx)(n.code,{children:"from"})]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"phonevalidations",children:"phoneValidations"}),"\n",(0,a.jsx)(n.p,{children:"Checks whether a string is empty or not and checks minimal length of phone number."}),"\n",(0,a.jsx)(n.h3,{id:"emailvalidations",children:"emailValidations"}),"\n",(0,a.jsxs)(n.p,{children:["Checks whether a string is empty or not and checks the format of email by using ",(0,a.jsx)(n.code,{children:"isEmail"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"fullnamevalidations",children:"fullNameValidations"}),"\n",(0,a.jsx)(n.p,{children:"Checks whether a string is empty or not and checks minimal length of full name."}),"\n",(0,a.jsx)(n.h2,{id:"validation-constants",children:"Validation constants"}),"\n",(0,a.jsxs)(n.p,{children:["These constants can be used as min/max length props in text inputs or when checking certain values.\nThey are located in ",(0,a.jsx)(n.code,{children:"validationConstants.ts"})," and have some common values:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"export const validationConstants = {\n phone: {\n minLength: 8,\n maxLength: 18,\n },\n fullName: {\n minLength: 3,\n maxLength: 64,\n },\n comment: {\n maxLength: 280,\n },\n email: {\n maxLength: 254,\n },\n licensePlate: {\n minLength: 4,\n maxLength: 10,\n },\n};\n"})}),"\n",(0,a.jsx)(n.h2,{id:"hooks",children:"Hooks"}),"\n",(0,a.jsx)(n.p,{children:"There are a couple of hooks to use for error checking when user does certain actions. So rather than using 3rd party form dependency\n(forms are rare use case and for most of the time can be checked manually in React Native) it's more convenient to use this custom hooks"}),"\n",(0,a.jsx)(n.h3,{id:"useinputerror",children:"useInputError"}),"\n",(0,a.jsxs)(n.p,{children:["Checks string value which user inputs based on supplied validation and returns ",(0,a.jsx)(n.code,{children:"error"}),", ",(0,a.jsx)(n.code,{children:"setError"}),", ",(0,a.jsx)(n.code,{children:"recheck"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Used in conjunction with ",(0,a.jsx)(n.code,{children:"recheckAllValidations"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["To better demonstrate how it works, it's better to show a basic example with ",(0,a.jsx)(n.code,{children:"email"})," and ",(0,a.jsx)(n.code,{children:"name"})," text inputs:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'export const AuthPersonalData: NavigationFunctionComponent = () => {\n const dispatch = useAppDispatch();\n\n const [fullName, setFullName] = useState ("");\n const [email, setEmail] = useState ("");\n\n const {error: emailError, recheckValue: recheckEmail} = useInputError(email, emailValidations);\n const {error: nameError, recheckValue: recheckName} = useInputError(fullName, fullNameValidations);\n \n const submitData = useCallback(() => {\n if (recheckAllValidations([recheckName, recheckEmail])) {\n dispatch(createProfile({email, name: fullName.trim()}));\n }\n }, [recheckName, recheckEmail, dispatch, email, fullName]);\n\n return (\n \n \n );\n};\n'})}),"\n",(0,a.jsx)(n.p,{children:"You can see two simple inputs and a button. While user enters certain value he will be seeing an error if it won't fit to validation."}),"\n",(0,a.jsx)(n.p,{children:"And before dispatching profile creation, we might recheck all validations which we had if at least one of them fails the dispatch won't happen and errors will be set."}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"setError"})," parameter which is returned from ",(0,a.jsx)(n.code,{children:"useInputError"})," can be used in cases when we need to manually set error, for example when API returned error regarding this value (e.g. email is already taken)."]}),"\n",(0,a.jsx)(n.h2,{id:"async-thunk-error-handling",children:"Async thunk error handling"}),"\n",(0,a.jsx)(n.p,{children:"To check on async thunk errors and show a success message or show error as alert, toast or input's error prop there's a mechanism for it."}),"\n",(0,a.jsx)(n.h3,{id:"handlepromiseresult",children:"handlePromiseResult"}),"\n",(0,a.jsx)(n.p,{children:"Unwraps the result of promise and then if everything went without errors based on provided params shows success toast and executes success message."}),"\n",(0,a.jsxs)(n.p,{children:["If things went the wrong way it tries to process the error using ",(0,a.jsx)(n.code,{children:"handleErrorPostProcessing"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["To better demonstrate how it works we come back to our example with ",(0,a.jsx)(n.code,{children:"email"})," and ",(0,a.jsx)(n.code,{children:"name"})," but this time we will modify it show error and success message if everything went right."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:" const processError = useCallback((newError: Error) => {\n return {message: newError.message, visualRepresentation: ErrorRepresentationType.toast}\n }, []);\n\n const submitData = useCallback(() => {\n if (recheckAllValidations([recheckName, recheckEmail])) {\n handlePromiseResult(\n dispatch(createProfile({email, name: fullName.trim()}))\n localization.auth.profileHasBeenSuccessfullyCreated,\n setAuthorizedRoot,\n processError\n );\n }\n }, [recheckName, recheckEmail, dispatch, email, fullName]);\n"})}),"\n",(0,a.jsxs)(n.p,{children:["So now if everything goes right user will see a toast with ",(0,a.jsx)(n.code,{children:"localization.auth.profileHasBeenSuccessfullyCreated"})," and will be redirected to new root (",(0,a.jsx)(n.code,{children:"setAuthorizedRoot"}),").\nIf things go wrong way there will be shown a toast with error message from server."]}),"\n",(0,a.jsxs)(n.p,{children:["To better understand logic take a brief look at insides of ",(0,a.jsx)(n.code,{children:"handlePromiseResult"})," and ",(0,a.jsx)(n.code,{children:"handleErrorPostProcessing"})," they are simple but just need to be used once or twice to grasp how and why they do this."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var a=t(6540);const i={},s=a.createContext(i);function r(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/644e2e9e.fd30308e.js b/assets/js/644e2e9e.fd30308e.js deleted file mode 100644 index 88ae9e01..00000000 --- a/assets/js/644e2e9e.fd30308e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6759],{9816:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var a=t(5893),i=t(1151);const s={sidebar_position:13,title:"Validations"},r=void 0,o={id:"validations",title:"Validations",description:"Content",source:"@site/docs/validations.md",sourceDirName:".",slug:"/validations",permalink:"/react-native-template-strong/docs/validations",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/validations.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:13,frontMatter:{sidebar_position:13,title:"Validations"},sidebar:"tutorialSidebar",previous:{title:"shareHelpers",permalink:"/react-native-template-strong/docs/helpers/share-helpers"},next:{title:"newState",permalink:"/react-native-template-strong/docs/utils/new-state"}},l={},c=[{value:"Content",id:"content",level:2},{value:"Validations",id:"validations",level:2},{value:"emptyValidation",id:"emptyvalidation",level:3},{value:"datesValidation",id:"datesvalidation",level:3},{value:"phoneValidations",id:"phonevalidations",level:3},{value:"emailValidations",id:"emailvalidations",level:3},{value:"fullNameValidations",id:"fullnamevalidations",level:3},{value:"Validation constants",id:"validation-constants",level:2},{value:"Hooks",id:"hooks",level:2},{value:"useInputError",id:"useinputerror",level:3},{value:"Async thunk error handling",id:"async-thunk-error-handling",level:2},{value:"handlePromiseResult",id:"handlepromiseresult",level:3}];function d(e){const n={code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,a.jsx)(n.p,{children:"Primarily has validations for different use cases (e.g. min. password length, max. name characters etc.)."}),"\n",(0,a.jsxs)(n.p,{children:["Many of those validations can be used with ",(0,a.jsx)(n.code,{children:"PrimaryTextInput"})," to show errors while user types, when user finished typing (left input) or when user taps on a certain button."]}),"\n",(0,a.jsxs)(n.p,{children:["These validations are located in the ",(0,a.jsx)(n.code,{children:"src/common/validations"})," folder."]}),"\n",(0,a.jsx)(n.h2,{id:"validations",children:"Validations"}),"\n",(0,a.jsxs)(n.p,{children:["These validations operate with ",(0,a.jsx)(n.code,{children:"null | string"})," return type rather than throwing an error. So when a method returns ",(0,a.jsx)(n.code,{children:"null"})," then a value passed, otherwise it returns localized ",(0,a.jsx)(n.code,{children:"string"})," which can be shown to user as error."]}),"\n",(0,a.jsx)(n.h3,{id:"emptyvalidation",children:"emptyValidation"}),"\n",(0,a.jsxs)(n.p,{children:["Checks whether a string is empty (returns localization string) or not (returns ",(0,a.jsx)(n.code,{children:"null"}),")."]}),"\n",(0,a.jsx)(n.h3,{id:"datesvalidation",children:"datesValidation"}),"\n",(0,a.jsx)(n.p,{children:"Compares two dates between each other.\nIf dates are equal then returns localization string (dates can't be equal).\nThen based on which field is currently being filled checks the difference:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"from"})," can't be later than ",(0,a.jsx)(n.code,{children:"to"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"to"})," can't be earlier than ",(0,a.jsx)(n.code,{children:"from"})]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"phonevalidations",children:"phoneValidations"}),"\n",(0,a.jsx)(n.p,{children:"Checks whether a string is empty or not and checks minimal length of phone number."}),"\n",(0,a.jsx)(n.h3,{id:"emailvalidations",children:"emailValidations"}),"\n",(0,a.jsxs)(n.p,{children:["Checks whether a string is empty or not and checks the format of email by using ",(0,a.jsx)(n.code,{children:"isEmail"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"fullnamevalidations",children:"fullNameValidations"}),"\n",(0,a.jsx)(n.p,{children:"Checks whether a string is empty or not and checks minimal length of full name."}),"\n",(0,a.jsx)(n.h2,{id:"validation-constants",children:"Validation constants"}),"\n",(0,a.jsxs)(n.p,{children:["These constants can be used as min/max length props in text inputs or when checking certain values.\nThey are located in ",(0,a.jsx)(n.code,{children:"validationConstants.ts"})," and have some common values:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:"export const validationConstants = {\n phone: {\n minLength: 8,\n maxLength: 18,\n },\n fullName: {\n minLength: 3,\n maxLength: 64,\n },\n comment: {\n maxLength: 280,\n },\n email: {\n maxLength: 254,\n },\n licensePlate: {\n minLength: 4,\n maxLength: 10,\n },\n};\n"})}),"\n",(0,a.jsx)(n.h2,{id:"hooks",children:"Hooks"}),"\n",(0,a.jsx)(n.p,{children:"There are a couple of hooks to use for error checking when user does certain actions. So rather than using 3rd party form dependency\n(forms are rare use case and for most of the time can be checked manually in React Native) it's more convenient to use this custom hooks"}),"\n",(0,a.jsx)(n.h3,{id:"useinputerror",children:"useInputError"}),"\n",(0,a.jsxs)(n.p,{children:["Checks string value which user inputs based on supplied validation and returns ",(0,a.jsx)(n.code,{children:"error"}),", ",(0,a.jsx)(n.code,{children:"setError"}),", ",(0,a.jsx)(n.code,{children:"recheck"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Used in conjunction with ",(0,a.jsx)(n.code,{children:"recheckAllValidations"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["To better demonstrate how it works, it's better to show a basic example with ",(0,a.jsx)(n.code,{children:"email"})," and ",(0,a.jsx)(n.code,{children:"name"})," text inputs:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'export const AuthPersonalData: NavigationFunctionComponent = () => {\n const dispatch = useAppDispatch();\n\n const [fullName, setFullName] = useState\n \n \n ("");\n const [email, setEmail] = useState ("");\n\n const {error: emailError, recheckValue: recheckEmail} = useInputError(email, emailValidations);\n const {error: nameError, recheckValue: recheckName} = useInputError(fullName, fullNameValidations);\n \n const submitData = useCallback(() => {\n if (recheckAllValidations([recheckName, recheckEmail])) {\n dispatch(createProfile({email, name: fullName.trim()}));\n }\n }, [recheckName, recheckEmail, dispatch, email, fullName]);\n\n return (\n \n \n );\n};\n'})}),"\n",(0,a.jsx)(n.p,{children:"You can see two simple inputs and a button. While user enters certain value he will be seeing an error if it won't fit to validation."}),"\n",(0,a.jsx)(n.p,{children:"And before dispatching profile creation, we might recheck all validations which we had if at least one of them fails the dispatch won't happen and errors will be set."}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"setError"})," parameter which is returned from ",(0,a.jsx)(n.code,{children:"useInputError"})," can be used in cases when we need to manually set error, for example when API returned error regarding this value (e.g. email is already taken)."]}),"\n",(0,a.jsx)(n.h2,{id:"async-thunk-error-handling",children:"Async thunk error handling"}),"\n",(0,a.jsx)(n.p,{children:"To check on async thunk errors and show a success message or show error as alert, toast or input's error prop there's a mechanism for it."}),"\n",(0,a.jsx)(n.h3,{id:"handlepromiseresult",children:"handlePromiseResult"}),"\n",(0,a.jsx)(n.p,{children:"Unwraps the result of promise and then if everything went without errors based on provided params shows success toast and executes success message."}),"\n",(0,a.jsxs)(n.p,{children:["If things went the wrong way it tries to process the error using ",(0,a.jsx)(n.code,{children:"handleErrorPostProcessing"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["To better demonstrate how it works we come back to our example with ",(0,a.jsx)(n.code,{children:"email"})," and ",(0,a.jsx)(n.code,{children:"name"})," but this time we will modify it show error and success message if everything went right."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:" const processError = useCallback((newError: Error) => {\n return {message: newError.message, visualRepresentation: ErrorRepresentationType.toast}\n }, []);\n\n const submitData = useCallback(() => {\n if (recheckAllValidations([recheckName, recheckEmail])) {\n handlePromiseResult(\n dispatch(createProfile({email, name: fullName.trim()}))\n localization.auth.profileHasBeenSuccessfullyCreated,\n setAuthorizedRoot,\n processError\n );\n }\n }, [recheckName, recheckEmail, dispatch, email, fullName]);\n"})}),"\n",(0,a.jsxs)(n.p,{children:["So now if everything goes right user will see a toast with ",(0,a.jsx)(n.code,{children:"localization.auth.profileHasBeenSuccessfullyCreated"})," and will be redirected to new root (",(0,a.jsx)(n.code,{children:"setAuthorizedRoot"}),").\nIf things go wrong way there will be shown a toast with error message from server."]}),"\n",(0,a.jsxs)(n.p,{children:["To better understand logic take a brief look at insides of ",(0,a.jsx)(n.code,{children:"handlePromiseResult"})," and ",(0,a.jsx)(n.code,{children:"handleErrorPostProcessing"})," they are simple but just need to be used once or twice to grasp how and why they do this."]})]})}function h(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>o,a:()=>r});var a=t(7294);const i={},s=a.createContext(i);function r(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/692.7bdb5bbe.js b/assets/js/692.7bdb5bbe.js deleted file mode 100644 index 0f5bd0cc..00000000 --- a/assets/js/692.7bdb5bbe.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[692],{9047:(e,n,t)=>{"use strict";t.d(n,{Z:()=>H});var s=t(7294),o=t(5893);function c(e){const{mdxAdmonitionTitle:n,rest:t}=function(e){const n=s.Children.toArray(e),t=n.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),c=n.filter((e=>e!==t)),a=t?.props.children;return{mdxAdmonitionTitle:a,rest:c.length>0?(0,o.jsx)(o.Fragment,{children:c}):null}}(e.children),c=e.title??n;return{...e,...c&&{title:c},children:t}}var a=t(512),i=t(5999),r=t(5281);const l={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function d(e){let{type:n,className:t,children:s}=e;return(0,o.jsx)("div",{className:(0,a.Z)(r.k.common.admonition,r.k.common.admonitionType(n),l.admonition,t),children:s})}function u(e){let{icon:n,title:t}=e;return(0,o.jsxs)("div",{className:l.admonitionHeading,children:[(0,o.jsx)("span",{className:l.admonitionIcon,children:n}),t]})}function m(e){let{children:n}=e;return n?(0,o.jsx)("div",{className:l.admonitionContent,children:n}):null}function h(e){const{type:n,icon:t,title:s,children:c,className:a}=e;return(0,o.jsxs)(d,{type:n,className:a,children:[(0,o.jsx)(u,{title:s,icon:t}),(0,o.jsx)(m,{children:c})]})}function f(e){return(0,o.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const p={icon:(0,o.jsx)(f,{}),title:(0,o.jsx)(i.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function g(e){return(0,o.jsx)(h,{...p,...e,className:(0,a.Z)("alert alert--secondary",e.className),children:e.children})}function x(e){return(0,o.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const b={icon:(0,o.jsx)(x,{}),title:(0,o.jsx)(i.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function v(e){return(0,o.jsx)(h,{...b,...e,className:(0,a.Z)("alert alert--success",e.className),children:e.children})}function j(e){return(0,o.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const N={icon:(0,o.jsx)(j,{}),title:(0,o.jsx)(i.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function C(e){return(0,o.jsx)(h,{...N,...e,className:(0,a.Z)("alert alert--info",e.className),children:e.children})}function k(e){return(0,o.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const y={icon:(0,o.jsx)(k,{}),title:(0,o.jsx)(i.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function L(e){return(0,o.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const B={icon:(0,o.jsx)(L,{}),title:(0,o.jsx)(i.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const w={icon:(0,o.jsx)(k,{}),title:(0,o.jsx)(i.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const E={...{note:g,tip:v,info:C,warning:function(e){return(0,o.jsx)(h,{...y,...e,className:(0,a.Z)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,o.jsx)(h,{...B,...e,className:(0,a.Z)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,o.jsx)(g,{title:"secondary",...e}),important:e=>(0,o.jsx)(C,{title:"important",...e}),success:e=>(0,o.jsx)(v,{title:"success",...e}),caution:function(e){return(0,o.jsx)(h,{...w,...e,className:(0,a.Z)("alert alert--warning",e.className),children:e.children})}}};function H(e){const n=c(e),t=(s=n.type,E[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),E.info));var s;return(0,o.jsx)(t,{...n})}},9206:(e,n,t)=>{"use strict";t.d(n,{Z:()=>ae});var s=t(7294),o=t(1151),c=t(5742),a=t(2389),i=t(512),r=t(2949),l=t(6668);function d(){const{prism:e}=(0,l.L)(),{colorMode:n}=(0,r.I)(),t=e.theme,s=e.darkTheme||t;return"dark"===n?s:t}var u=t(5281),m=t(7594),h=t.n(m);const f=/title=(?\n \n \n ["'])(?.*?)\1/,p=/\{(? [\d,-]+)\}/,g={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},x={...g,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},b=Object.keys(g);function v(e,n){const t=e.map((e=>{const{start:t,end:s}=x[e];return`(?:${t}\\s*(${n.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${t})\\s*$`)}function j(e,n){let t=e.replace(/\n$/,"");const{language:s,magicComments:o,metastring:c}=n;if(c&&p.test(c)){const e=c.match(p).groups.range;if(0===o.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${c}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const n=o[0].className,s=h()(e).filter((e=>e>0)).map((e=>[e-1,[n]]));return{lineClassNames:Object.fromEntries(s),code:t}}if(void 0===s)return{lineClassNames:{},code:t};const a=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return v(["js","jsBlock"],n);case"jsx":case"tsx":return v(["js","jsBlock","jsx"],n);case"html":return v(["js","jsBlock","html"],n);case"python":case"py":case"bash":return v(["bash"],n);case"markdown":case"md":return v(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return v(["tex"],n);case"lua":case"haskell":case"sql":return v(["lua"],n);case"wasm":return v(["wasm"],n);case"vb":case"vbnet":case"vba":case"visual-basic":return v(["vb","rem"],n);case"batch":return v(["rem"],n);case"basic":return v(["rem","f90"],n);case"fsharp":return v(["js","ml"],n);case"ocaml":case"sml":return v(["ml"],n);case"fortran":return v(["f90"],n);case"cobol":return v(["cobol"],n);default:return v(b,n)}}(s,o),i=t.split("\n"),r=Object.fromEntries(o.map((e=>[e.className,{start:0,range:""}]))),l=Object.fromEntries(o.filter((e=>e.line)).map((e=>{let{className:n,line:t}=e;return[t,n]}))),d=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:n,block:t}=e;return[t.start,n]}))),u=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:n,block:t}=e;return[t.end,n]})));for(let h=0;h void 0!==e));l[n]?r[l[n]].range+=`${h},`:d[n]?r[d[n]].start=h:u[n]&&(r[u[n]].range+=`${r[u[n]].start}-${h-1},`),i.splice(h,1)}t=i.join("\n");const m={};return Object.entries(r).forEach((e=>{let[n,{range:t}]=e;h()(t).forEach((e=>{m[e]??=[],m[e].push(n)}))})),{lineClassNames:m,code:t}}const N={codeBlockContainer:"codeBlockContainer_Ckt0"};var C=t(5893);function k(e){let{as:n,...t}=e;const s=function(e){const n={color:"--prism-color",backgroundColor:"--prism-background-color"},t={};return Object.entries(e.plain).forEach((e=>{let[s,o]=e;const c=n[s];c&&"string"==typeof o&&(t[c]=o)})),t}(d());return(0,C.jsx)(n,{...t,style:s,className:(0,i.Z)(t.className,N.codeBlockContainer,u.k.common.codeBlock)})}const y={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function L(e){let{children:n,className:t}=e;return(0,C.jsx)(k,{as:"pre",tabIndex:0,className:(0,i.Z)(y.codeBlockStandalone,"thin-scrollbar",t),children:(0,C.jsx)("code",{className:y.codeBlockLines,children:n})})}var B=t(902);const w={attributes:!0,characterData:!0,childList:!0,subtree:!0};function E(e,n){const[t,o]=(0,s.useState)(),c=(0,s.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,s.useEffect)((()=>{c()}),[c]),function(e,n,t){void 0===t&&(t=w);const o=(0,B.zX)(n),c=(0,B.Ql)(t);(0,s.useEffect)((()=>{const n=new MutationObserver(o);return e&&n.observe(e,c),()=>n.disconnect()}),[e,o,c])}(t,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(n(),c())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var H=t(2573);const Z={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function _(e){let{line:n,classNames:t,showLineNumbers:s,getLineProps:o,getTokenProps:c}=e;1===n.length&&"\n"===n[0].content&&(n[0].content="");const a=o({line:n,className:(0,i.Z)(t,s&&Z.codeLine)}),r=n.map(((e,n)=>(0,C.jsx)("span",{...c({token:e,key:n})},n)));return(0,C.jsxs)("span",{...a,children:[s?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{className:Z.codeLineNumber}),(0,C.jsx)("span",{className:Z.codeLineContent,children:r})]}):r,(0,C.jsx)("br",{})]})}var T=t(5999);function I(e){return(0,C.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,C.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function A(e){return(0,C.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,C.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const S={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function M(e){let{code:n,className:t}=e;const[o,c]=(0,s.useState)(!1),a=(0,s.useRef)(void 0),r=(0,s.useCallback)((()=>{!function(e,n){let{target:t=document.body}=void 0===n?{}:n;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),o=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const c=document.getSelection(),a=c.rangeCount>0&&c.getRangeAt(0);t.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let i=!1;try{i=document.execCommand("copy")}catch{}s.remove(),a&&(c.removeAllRanges(),c.addRange(a)),o&&o.focus()}(n),c(!0),a.current=window.setTimeout((()=>{c(!1)}),1e3)}),[n]);return(0,s.useEffect)((()=>()=>window.clearTimeout(a.current)),[]),(0,C.jsx)("button",{type:"button","aria-label":o?(0,T.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,T.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,T.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.Z)("clean-btn",t,S.copyButton,o&&S.copyButtonCopied),onClick:r,children:(0,C.jsxs)("span",{className:S.copyButtonIcons,"aria-hidden":"true",children:[(0,C.jsx)(I,{className:S.copyButtonIcon}),(0,C.jsx)(A,{className:S.copyButtonSuccessIcon})]})})}function z(e){return(0,C.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,C.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const R={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function O(e){let{className:n,onClick:t,isEnabled:s}=e;const o=(0,T.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,C.jsx)("button",{type:"button",onClick:t,className:(0,i.Z)("clean-btn",n,s&&R.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,C.jsx)(z,{className:R.wordWrapButtonIcon,"aria-hidden":"true"})})}function $(e){let{children:n,className:t="",metastring:o,title:c,showLineNumbers:a,language:r}=e;const{prism:{defaultLanguage:u,magicComments:m}}=(0,l.L)(),h=function(e){return e?.toLowerCase()}(r??function(e){const n=e.split(" ").find((e=>e.startsWith("language-")));return n?.replace(/language-/,"")}(t)??u),p=d(),g=function(){const[e,n]=(0,s.useState)(!1),[t,o]=(0,s.useState)(!1),c=(0,s.useRef)(null),a=(0,s.useCallback)((()=>{const t=c.current.querySelector("code");e?t.removeAttribute("style"):(t.style.whiteSpace="pre-wrap",t.style.overflowWrap="anywhere"),n((e=>!e))}),[c,e]),i=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:n}=c.current,t=e>n||c.current.querySelector("code").hasAttribute("style");o(t)}),[c]);return E(c,i),(0,s.useEffect)((()=>{i()}),[e,i]),(0,s.useEffect)((()=>(window.addEventListener("resize",i,{passive:!0}),()=>{window.removeEventListener("resize",i)})),[i]),{codeBlockRef:c,isEnabled:e,isCodeScrollable:t,toggle:a}}(),x=function(e){return e?.match(f)?.groups.title??""}(o)||c,{lineClassNames:b,code:v}=j(n,{metastring:o,language:h,magicComments:m}),N=a??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return(0,C.jsxs)(k,{as:"div",className:(0,i.Z)(t,h&&!t.includes(`language-${h}`)&&`language-${h}`),children:[x&&(0,C.jsx)("div",{className:y.codeBlockTitle,children:x}),(0,C.jsxs)("div",{className:y.codeBlockContent,children:[(0,C.jsx)(H.y$,{theme:p,code:v,language:h??"text",children:e=>{let{className:n,style:t,tokens:s,getLineProps:o,getTokenProps:c}=e;return(0,C.jsx)("pre",{tabIndex:0,ref:g.codeBlockRef,className:(0,i.Z)(n,y.codeBlock,"thin-scrollbar"),style:t,children:(0,C.jsx)("code",{className:(0,i.Z)(y.codeBlockLines,N&&y.codeBlockLinesWithNumbering),children:s.map(((e,n)=>(0,C.jsx)(_,{line:e,getLineProps:o,getTokenProps:c,classNames:b[n],showLineNumbers:N},n)))})})}}),(0,C.jsxs)("div",{className:y.buttonGroup,children:[(g.isEnabled||g.isCodeScrollable)&&(0,C.jsx)(O,{className:y.codeButton,onClick:()=>g.toggle(),isEnabled:g.isEnabled}),(0,C.jsx)(M,{className:y.codeButton,code:v})]})]})]})}function V(e){let{children:n,...t}=e;const o=(0,a.Z)(),c=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(n),i="string"==typeof c?$:L;return(0,C.jsx)(i,{...t,children:c},String(o))}function W(e){return(0,C.jsx)("code",{...e})}var P=t(3692);var q=t(6043);const D={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function F(e){return!!e&&("SUMMARY"===e.tagName||F(e.parentElement))}function U(e,n){return!!e&&(e===n||U(e.parentElement,n))}function G(e){let{summary:n,children:t,...o}=e;const c=(0,a.Z)(),r=(0,s.useRef)(null),{collapsed:l,setCollapsed:d}=(0,q.u)({initialState:!o.open}),[u,m]=(0,s.useState)(o.open),h=s.isValidElement(n)?n:(0,C.jsx)("summary",{children:n??"Details"});return(0,C.jsxs)("details",{...o,ref:r,open:u,"data-collapsed":l,className:(0,i.Z)(D.details,c&&D.isBrowser,o.className),onMouseDown:e=>{F(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const n=e.target;F(n)&&U(n,r.current)&&(e.preventDefault(),l?(d(!1),m(!0)):d(!0))},children:[h,(0,C.jsx)(q.z,{lazy:!1,collapsed:l,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{d(e),m(!e)},children:(0,C.jsx)("div",{className:D.collapsibleContent,children:t})})]})}const J={details:"details_b_Ee"},Y="alert alert--info";function K(e){let{...n}=e;return(0,C.jsx)(G,{...n,className:(0,i.Z)(Y,J.details,n.className)})}function Q(e){const n=s.Children.toArray(e.children),t=n.find((e=>s.isValidElement(e)&&"summary"===e.type)),o=(0,C.jsx)(C.Fragment,{children:n.filter((e=>e!==t))});return(0,C.jsx)(K,{...e,summary:t,children:o})}var X=t(2503);function ee(e){return(0,C.jsx)(X.Z,{...e})}const ne={containsTaskList:"containsTaskList_mC6p"};function te(e){if(void 0!==e)return(0,i.Z)(e,e?.includes("contains-task-list")&&ne.containsTaskList)}const se={img:"img_ev3q"};var oe=t(9047);const ce={Head:c.Z,details:Q,Details:Q,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,C.jsx)(W,{...e}):(0,C.jsx)(V,{...e})},a:function(e){return(0,C.jsx)(P.Z,{...e})},pre:function(e){return(0,C.jsx)(C.Fragment,{children:e.children})},ul:function(e){return(0,C.jsx)("ul",{...e,className:te(e.className)})},img:function(e){return(0,C.jsx)("img",{loading:"lazy",...e,className:(n=e.className,(0,i.Z)(n,se.img))});var n},h1:e=>(0,C.jsx)(ee,{as:"h1",...e}),h2:e=>(0,C.jsx)(ee,{as:"h2",...e}),h3:e=>(0,C.jsx)(ee,{as:"h3",...e}),h4:e=>(0,C.jsx)(ee,{as:"h4",...e}),h5:e=>(0,C.jsx)(ee,{as:"h5",...e}),h6:e=>(0,C.jsx)(ee,{as:"h6",...e}),admonition:oe.Z,mermaid:()=>null};function ae(e){let{children:n}=e;return(0,C.jsx)(o.Z,{components:ce,children:n})}},9407:(e,n,t)=>{"use strict";t.d(n,{Z:()=>l});t(7294);var s=t(512),o=t(3743);const c={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"};var a=t(5893);const i="table-of-contents__link toc-highlight",r="table-of-contents__link--active";function l(e){let{className:n,...t}=e;return(0,a.jsx)("div",{className:(0,s.Z)(c.tableOfContents,"thin-scrollbar",n),children:(0,a.jsx)(o.Z,{...t,linkClassName:i,linkActiveClassName:r})})}},3743:(e,n,t)=>{"use strict";t.d(n,{Z:()=>p});var s=t(7294),o=t(6668);function c(e){const n=e.map((e=>({...e,parentIndex:-1,children:[]}))),t=Array(7).fill(-1);n.forEach(((e,n)=>{const s=t.slice(2,e.level);e.parentIndex=Math.max(...s),t[e.level]=n}));const s=[];return n.forEach((e=>{const{parentIndex:t,...o}=e;t>=0?n[t].children.push(o):s.push(o)})),s}function a(e){let{toc:n,minHeadingLevel:t,maxHeadingLevel:s}=e;return n.flatMap((e=>{const n=a({toc:e.children,minHeadingLevel:t,maxHeadingLevel:s});return function(e){return e.level>=t&&e.level<=s}(e)?[{...e,children:n}]:n}))}function i(e){const n=e.getBoundingClientRect();return n.top===n.bottom?i(e.parentNode):n}function r(e,n){let{anchorTopOffset:t}=n;const s=e.find((e=>i(e).top>=t));if(s){return function(e){return e.top>0&&e.bottom {e.current=n?0:document.querySelector(".navbar").clientHeight}),[n]),e}function d(e){const n=(0,s.useRef)(void 0),t=l();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:o,minHeadingLevel:c,maxHeadingLevel:a}=e;function i(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),i=function(e){let{minHeadingLevel:n,maxHeadingLevel:t}=e;const s=[];for(let o=n;o<=t;o+=1)s.push(`h${o}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:c,maxHeadingLevel:a}),l=r(i,{anchorTopOffset:t.current}),d=e.find((e=>l&&l.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,t){t?(n.current&&n.current!==e&&n.current.classList.remove(o),e.classList.add(o),n.current=e):e.classList.remove(o)}(e,e===d)}))}return document.addEventListener("scroll",i),document.addEventListener("resize",i),i(),()=>{document.removeEventListener("scroll",i),document.removeEventListener("resize",i)}}),[e,t])}var u=t(3692),m=t(5893);function h(e){let{toc:n,className:t,linkClassName:s,isChild:o}=e;return n.length?(0,m.jsx)("ul",{className:o?void 0:t,children:n.map((e=>(0,m.jsxs)("li",{children:[(0,m.jsx)(u.Z,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,m.jsx)(h,{isChild:!0,toc:e.children,className:t,linkClassName:s})]},e.id)))}):null}const f=s.memo(h);function p(e){let{toc:n,className:t="table-of-contents table-of-contents__left-border",linkClassName:i="table-of-contents__link",linkActiveClassName:r,minHeadingLevel:l,maxHeadingLevel:u,...h}=e;const p=(0,o.L)(),g=l??p.tableOfContents.minHeadingLevel,x=u??p.tableOfContents.maxHeadingLevel,b=function(e){let{toc:n,minHeadingLevel:t,maxHeadingLevel:o}=e;return(0,s.useMemo)((()=>a({toc:c(n),minHeadingLevel:t,maxHeadingLevel:o})),[n,t,o])}({toc:n,minHeadingLevel:g,maxHeadingLevel:x});return d((0,s.useMemo)((()=>{if(i&&r)return{linkClassName:i,linkActiveClassName:r,minHeadingLevel:g,maxHeadingLevel:x}}),[i,r,g,x])),(0,m.jsx)(f,{toc:b,className:t,linkClassName:i,...h})}},2212:(e,n,t)=>{"use strict";t.d(n,{Z:()=>h});t(7294);var s=t(512),o=t(5999),c=t(5742),a=t(5893);function i(){return(0,a.jsx)(o.Z,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function r(){return(0,a.jsx)(o.Z,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function l(){return(0,a.jsx)(c.Z,{children:(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}var d=t(5281),u=t(9047);function m(e){let{className:n}=e;return(0,a.jsx)(u.Z,{type:"caution",title:(0,a.jsx)(i,{}),className:(0,s.Z)(n,d.k.common.unlistedBanner),children:(0,a.jsx)(r,{})})}function h(e){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l,{}),(0,a.jsx)(m,{...e})]})}},7594:(e,n)=>{function t(e){let n,t=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))t.push(parseInt(s,10));else if(n=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,o,c]=n;if(s&&c){s=parseInt(s),c=parseInt(c);const e=s {"use strict";t.d(n,{Z:()=>i,a:()=>a});var s=t(7294);const o={},c=s.createContext(o);function a(e){const n=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/69e64926.2fbd7bc5.js b/assets/js/69e64926.2fbd7bc5.js new file mode 100644 index 00000000..4677e84c --- /dev/null +++ b/assets/js/69e64926.2fbd7bc5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4844],{215:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var s=n(4848),o=n(8453);const r={sidebar_position:1,title:"useFlatListActions"},a=void 0,i={id:"hooks/use-flat-list-actions",title:"useFlatListActions",description:"Content",source:"@site/docs/hooks/use-flat-list-actions.md",sourceDirName:"hooks",slug:"/hooks/use-flat-list-actions",permalink:"/react-native-template-strong/docs/hooks/use-flat-list-actions",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/hooks/use-flat-list-actions.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"useFlatListActions"},sidebar:"tutorialSidebar",previous:{title:"serializeQueryParams",permalink:"/react-native-template-strong/docs/utils/serialize-query-params"},next:{title:"useDebounce",permalink:"/react-native-template-strong/docs/hooks/use-debounce"}},c={},l=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Creates default ",(0,s.jsx)(t.code,{children:"loadMore"}),", ",(0,s.jsx)(t.code,{children:"tryAgain"})," and ",(0,s.jsx)(t.code,{children:"pullToRefresh"})," request dispatches based on provided ",(0,s.jsx)(t.code,{children:"LoadState"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Works in together with ",(0,s.jsx)(t.code,{children:"FlatlistWrapper"})," and ",(0,s.jsx)(t.code,{children:"SectionListWrapper"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" const {data, error, loadState} = useAppSelector(({offers}) => offers);\n const {loadMore, tryAgain, pullToRefresh} = useFlatListActions(getCompanyOffers, loadState);\n\n return (\n \n );\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Where ",(0,s.jsx)(t.code,{children:"getCompanyOffers"})," is ",(0,s.jsx)(t.code,{children:"AsyncThunk"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>i});var s=n(6540);const o={},r=s.createContext(o);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/69e64926.33ff0de6.js b/assets/js/69e64926.33ff0de6.js deleted file mode 100644 index 33766e20..00000000 --- a/assets/js/69e64926.33ff0de6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7444],{3671:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var n=s(5893),o=s(1151);const r={sidebar_position:1,title:"useFlatListActions"},a=void 0,i={id:"hooks/use-flat-list-actions",title:"useFlatListActions",description:"Content",source:"@site/docs/hooks/use-flat-list-actions.md",sourceDirName:"hooks",slug:"/hooks/use-flat-list-actions",permalink:"/react-native-template-strong/docs/hooks/use-flat-list-actions",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/hooks/use-flat-list-actions.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"useFlatListActions"},sidebar:"tutorialSidebar",previous:{title:"serializeQueryParams",permalink:"/react-native-template-strong/docs/utils/serialize-query-params"},next:{title:"useDebounce",permalink:"/react-native-template-strong/docs/hooks/use-debounce"}},c={},l=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,n.jsxs)(t.p,{children:["Creates default ",(0,n.jsx)(t.code,{children:"loadMore"}),", ",(0,n.jsx)(t.code,{children:"tryAgain"})," and ",(0,n.jsx)(t.code,{children:"pullToRefresh"})," request dispatches based on provided ",(0,n.jsx)(t.code,{children:"LoadState"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Works in together with ",(0,n.jsx)(t.code,{children:"FlatlistWrapper"})," and ",(0,n.jsx)(t.code,{children:"SectionListWrapper"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" const {data, error, loadState} = useAppSelector(({offers}) => offers);\n const {loadMore, tryAgain, pullToRefresh} = useFlatListActions(getCompanyOffers, loadState);\n\n return (\n \n );\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Where ",(0,n.jsx)(t.code,{children:"getCompanyOffers"})," is ",(0,n.jsx)(t.code,{children:"AsyncThunk"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>i,a:()=>a});var n=s(7294);const o={},r=n.createContext(o);function a(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e581f4b.816da9c9.js b/assets/js/6e581f4b.816da9c9.js new file mode 100644 index 00000000..52da3904 --- /dev/null +++ b/assets/js/6e581f4b.816da9c9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[176],{6091:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>d,frontMatter:()=>l,metadata:()=>o,toc:()=>m});var t=s(4848),a=s(8453);const l={sidebar_position:3,title:"Common sizes"},r=void 0,o={id:"styles/common-sizes",title:"Common sizes",description:"Content",source:"@site/docs/styles/common-sizes.md",sourceDirName:"styles",slug:"/styles/common-sizes",permalink:"/react-native-template-strong/docs/styles/common-sizes",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/styles/common-sizes.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Common sizes"},sidebar:"tutorialSidebar",previous:{title:"Common styles",permalink:"/react-native-template-strong/docs/styles/common-styles"},next:{title:"Common constants",permalink:"/react-native-template-strong/docs/common-constants"}},i={},m=[{value:"Content",id:"content",level:2}];function c(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,t.jsx)(n.p,{children:"There are many margins, paddings, font sizes, line heights and other parameters that hold some constant number."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"CommonSizes"})," was created to simplify and unify and fix some misleading or wrong constant numbers."]}),"\n",(0,t.jsxs)(n.p,{children:["They are located at ",(0,t.jsx)(n.code,{children:"/src/core/theme/commonSizes.ts"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:"export const CommonSizes = {\n font: {\n extraSmall: 11,\n extraSmallPlus: 12,\n small: 13,\n smallPlus: 15,\n medium: 17,\n mediumPlus: 20,\n large: 22,\n largePlus: 28,\n extraLarge: 34,\n extraLargePlus: 44,\n } as Readonly ,\n letterSpacing: {\n extraSmall: 0.07,\n extraSmallPlus: 0,\n small: -0.08,\n smallPlus: -0.24,\n medium: -0.41,\n mediumPlus: 0.38,\n large: 0.35,\n largePlus: 0.36,\n extraLarge: 0.37,\n extraLargePlus: 0.37,\n } as Readonly ,\n lineHeight: {\n extraSmall: 13,\n extraSmallPlus: 16,\n small: 18,\n smallPlus: 20,\n medium: 22,\n mediumPlus: 25,\n large: 28,\n largePlus: 34,\n extraLarge: 41,\n extraLargePlus: 52,\n } as Readonly ,\n spacing: {\n extraSmall: 8,\n extraSmallPlus: 10,\n small: 12,\n smallPlus: 13,\n medium: 16,\n mediumPlus: 24,\n large: 32,\n largePlus: 40,\n extraLarge: 48,\n extraLargePlus: 56,\n } as Readonly ,\n borderRadius: {\n extraSmall: 4,\n extraSmallPlus: 6,\n small: 8,\n smallPlus: 10,\n medium: 12,\n mediumPlus: 13,\n large: 14,\n largePlus: 16,\n extraLarge: 18,\n extraLargePlus: 20,\n } as Readonly ,\n};\n"})}),"\n",(0,t.jsx)(n.p,{children:"You can use, change, add or remove these constants according to your design."}),"\n",(0,t.jsx)(n.p,{children:"Try to use them as much as possible."})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>o});var t=s(6540);const a={},l=t.createContext(a);function r(e){const n=t.useContext(l);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e581f4b.96f0063e.js b/assets/js/6e581f4b.96f0063e.js deleted file mode 100644 index 42b36e1c..00000000 --- a/assets/js/6e581f4b.96f0063e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1721],{5010:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>d,frontMatter:()=>l,metadata:()=>o,toc:()=>m});var s=t(5893),a=t(1151);const l={sidebar_position:3,title:"Common sizes"},r=void 0,o={id:"styles/common-sizes",title:"Common sizes",description:"Content",source:"@site/docs/styles/common-sizes.md",sourceDirName:"styles",slug:"/styles/common-sizes",permalink:"/react-native-template-strong/docs/styles/common-sizes",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/styles/common-sizes.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Common sizes"},sidebar:"tutorialSidebar",previous:{title:"Common styles",permalink:"/react-native-template-strong/docs/styles/common-styles"},next:{title:"Common constants",permalink:"/react-native-template-strong/docs/common-constants"}},i={},m=[{value:"Content",id:"content",level:2}];function c(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(n.p,{children:"There are many margins, paddings, font sizes, line heights and other parameters that hold some constant number."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"CommonSizes"})," was created to simplify and unify and fix some misleading or wrong constant numbers."]}),"\n",(0,s.jsxs)(n.p,{children:["They are located at ",(0,s.jsx)(n.code,{children:"/src/core/theme/commonSizes.ts"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"export const CommonSizes = {\n font: {\n extraSmall: 11,\n extraSmallPlus: 12,\n small: 13,\n smallPlus: 15,\n medium: 17,\n mediumPlus: 20,\n large: 22,\n largePlus: 28,\n extraLarge: 34,\n extraLargePlus: 44,\n } as Readonly ,\n letterSpacing: {\n extraSmall: 0.07,\n extraSmallPlus: 0,\n small: -0.08,\n smallPlus: -0.24,\n medium: -0.41,\n mediumPlus: 0.38,\n large: 0.35,\n largePlus: 0.36,\n extraLarge: 0.37,\n extraLargePlus: 0.37,\n } as Readonly ,\n lineHeight: {\n extraSmall: 13,\n extraSmallPlus: 16,\n small: 18,\n smallPlus: 20,\n medium: 22,\n mediumPlus: 25,\n large: 28,\n largePlus: 34,\n extraLarge: 41,\n extraLargePlus: 52,\n } as Readonly ,\n spacing: {\n extraSmall: 8,\n extraSmallPlus: 10,\n small: 12,\n smallPlus: 13,\n medium: 16,\n mediumPlus: 24,\n large: 32,\n largePlus: 40,\n extraLarge: 48,\n extraLargePlus: 56,\n } as Readonly ,\n borderRadius: {\n extraSmall: 4,\n extraSmallPlus: 6,\n small: 8,\n smallPlus: 10,\n medium: 12,\n mediumPlus: 13,\n large: 14,\n largePlus: 16,\n extraLarge: 18,\n extraLargePlus: 20,\n } as Readonly ,\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can use, change, add or remove these constants according to your design."}),"\n",(0,s.jsx)(n.p,{children:"Try to use them as much as possible."})]})}function d(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>o,a:()=>r});var s=t(7294);const a={},l=s.createContext(a);function r(e){const n=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/78a19f83.37d604ec.js b/assets/js/78a19f83.37d604ec.js deleted file mode 100644 index 7264c198..00000000 --- a/assets/js/78a19f83.37d604ec.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5389],{569:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>a,contentTitle:()=>r,default:()=>m,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var o=n(5893),t=n(1151);const i={sidebar_position:3,title:"SF Symbols"},r=void 0,c={id:"resources/sf-symbols",title:"SF Symbols",description:"Content",source:"@site/docs/resources/sf-symbols.md",sourceDirName:"resources",slug:"/resources/sf-symbols",permalink:"/react-native-template-strong/docs/resources/sf-symbols",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/resources/sf-symbols.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"SF Symbols"},sidebar:"tutorialSidebar",previous:{title:"Images",permalink:"/react-native-template-strong/docs/resources/images"},next:{title:"Vector icons",permalink:"/react-native-template-strong/docs/resources/vector-icons"}},a={},l=[{value:"Content",id:"content",level:2},{value:"Browsing icons",id:"browsing-icons",level:2},{value:"Using icons in navigation",id:"using-icons-in-navigation",level:2},{value:"BottomTab",id:"bottomtab",level:3},{value:"BackButton",id:"backbutton",level:3},{value:"Using icons as components",id:"using-icons-as-components",level:2}];function d(e){const s={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,t.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(s.p,{children:["The preferable way to show icons on iOS is to use ",(0,o.jsx)(s.a,{href:"https://developer.apple.com/sf-symbols/",children:"SF Symbols"}),"."]}),"\n",(0,o.jsx)(s.h2,{id:"browsing-icons",children:"Browsing icons"}),"\n",(0,o.jsxs)(s.p,{children:["All icons are stored as enum with names in ",(0,o.jsx)(s.code,{children:"/resources/symbols/sfSymbols"}),". It contains mostly all the 3 100 icons."]}),"\n",(0,o.jsxs)(s.p,{children:["To take a look at them without using them you can open ",(0,o.jsx)(s.a,{href:"https://developer.apple.com/sf-symbols/",children:"SF Symbols App"})," on macOS."]}),"\n",(0,o.jsx)(s.h2,{id:"using-icons-in-navigation",children:"Using icons in navigation"}),"\n",(0,o.jsx)(s.h3,{id:"bottomtab",children:"BottomTab"}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.code,{children:"react-native-navigation"})," currently supports SF Symbols as icon in ",(0,o.jsx)(s.code,{children:"bottomTab"}),":"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-typescript",metastring:"jsx",children:'Main.options = {\n bottomTab: {\n sfSymbol: SFSymbols["app.gift"],\n sfSelectedSymbol: SFSymbols["app.gift.fill"],\n },\n};\n'})}),"\n",(0,o.jsxs)(s.p,{children:["It also applies same effect properties as ",(0,o.jsx)(s.code,{children:"Icon"})," ones, like ",(0,o.jsx)(s.code,{children:"selectedIconColor"})," or ",(0,o.jsx)(s.code,{children:"iconColor"}),", see more properties ",(0,o.jsx)(s.a,{href:"https://wix.github.io/react-native-navigation/api/options-bottomTab#iconwidth",children:"here"}),"."]}),"\n",(0,o.jsx)(s.h3,{id:"backbutton",children:"BackButton"}),"\n",(0,o.jsxs)(s.p,{children:["SF Symbol can also be applied directly as ",(0,o.jsx)(s.code,{children:"topBar"}),"'s ",(0,o.jsx)(s.code,{children:"backButton"})," like so:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-typescript",metastring:"jsx",children:'Main.options = {\n topBar: {\n backButton: {\n sfSymbol: SFSymbols["arrow.backward.circle"],\n },\n },\n};\n'})}),"\n",(0,o.jsx)(s.h2,{id:"using-icons-as-components",children:"Using icons as components"}),"\n",(0,o.jsxs)(s.p,{children:["Usage of SF Symbols as components made possible by ",(0,o.jsx)(s.a,{href:"https://github.com/birkir/react-native-sfsymbols",children:"react-native-sfsymbols"}),"."]}),"\n",(0,o.jsx)(s.p,{children:"You can use it directly like so:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-typescript",metastring:"jsx",children:' \n'})}),"\n",(0,o.jsx)(s.p,{children:"But it will be shown only on iOS, which is not desired."}),"\n",(0,o.jsxs)(s.p,{children:["To work with both iOS and Android, there's ",(0,o.jsx)(s.a,{href:"/react-native-template-strong/docs/components/icon-platform",children:"IconPlatform"})," component,\nwhich shows SF Symbols on iOS and Material Icons on Android, it works next way:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-typescript",metastring:"jsx",children:' \n'})})]})}function m(e={}){const{wrapper:s}={...(0,t.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,s,n)=>{n.d(s,{Z:()=>c,a:()=>r});var o=n(7294);const t={},i=o.createContext(t);function r(e){const s=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/78a19f83.f00402cd.js b/assets/js/78a19f83.f00402cd.js new file mode 100644 index 00000000..1968dfd4 --- /dev/null +++ b/assets/js/78a19f83.f00402cd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7678],{2067:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>m,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var o=s(4848),t=s(8453);const i={sidebar_position:3,title:"SF Symbols"},r=void 0,c={id:"resources/sf-symbols",title:"SF Symbols",description:"Content",source:"@site/docs/resources/sf-symbols.md",sourceDirName:"resources",slug:"/resources/sf-symbols",permalink:"/react-native-template-strong/docs/resources/sf-symbols",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/resources/sf-symbols.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"SF Symbols"},sidebar:"tutorialSidebar",previous:{title:"Images",permalink:"/react-native-template-strong/docs/resources/images"},next:{title:"Vector icons",permalink:"/react-native-template-strong/docs/resources/vector-icons"}},a={},l=[{value:"Content",id:"content",level:2},{value:"Browsing icons",id:"browsing-icons",level:2},{value:"Using icons in navigation",id:"using-icons-in-navigation",level:2},{value:"BottomTab",id:"bottomtab",level:3},{value:"BackButton",id:"backbutton",level:3},{value:"Using icons as components",id:"using-icons-as-components",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(n.p,{children:["The preferable way to show icons on iOS is to use ",(0,o.jsx)(n.a,{href:"https://developer.apple.com/sf-symbols/",children:"SF Symbols"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"browsing-icons",children:"Browsing icons"}),"\n",(0,o.jsxs)(n.p,{children:["All icons are stored as enum with names in ",(0,o.jsx)(n.code,{children:"/resources/symbols/sfSymbols"}),". It contains mostly all the 3 100 icons."]}),"\n",(0,o.jsxs)(n.p,{children:["To take a look at them without using them you can open ",(0,o.jsx)(n.a,{href:"https://developer.apple.com/sf-symbols/",children:"SF Symbols App"})," on macOS."]}),"\n",(0,o.jsx)(n.h2,{id:"using-icons-in-navigation",children:"Using icons in navigation"}),"\n",(0,o.jsx)(n.h3,{id:"bottomtab",children:"BottomTab"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"react-native-navigation"})," currently supports SF Symbols as icon in ",(0,o.jsx)(n.code,{children:"bottomTab"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'Main.options = {\n bottomTab: {\n sfSymbol: SFSymbols["app.gift"],\n sfSelectedSymbol: SFSymbols["app.gift.fill"],\n },\n};\n'})}),"\n",(0,o.jsxs)(n.p,{children:["It also applies same effect properties as ",(0,o.jsx)(n.code,{children:"Icon"})," ones, like ",(0,o.jsx)(n.code,{children:"selectedIconColor"})," or ",(0,o.jsx)(n.code,{children:"iconColor"}),", see more properties ",(0,o.jsx)(n.a,{href:"https://wix.github.io/react-native-navigation/api/options-bottomTab#iconwidth",children:"here"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"backbutton",children:"BackButton"}),"\n",(0,o.jsxs)(n.p,{children:["SF Symbol can also be applied directly as ",(0,o.jsx)(n.code,{children:"topBar"}),"'s ",(0,o.jsx)(n.code,{children:"backButton"})," like so:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'Main.options = {\n topBar: {\n backButton: {\n sfSymbol: SFSymbols["arrow.backward.circle"],\n },\n },\n};\n'})}),"\n",(0,o.jsx)(n.h2,{id:"using-icons-as-components",children:"Using icons as components"}),"\n",(0,o.jsxs)(n.p,{children:["Usage of SF Symbols as components made possible by ",(0,o.jsx)(n.a,{href:"https://github.com/birkir/react-native-sfsymbols",children:"react-native-sfsymbols"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"You can use it directly like so:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:' \n'})}),"\n",(0,o.jsx)(n.p,{children:"But it will be shown only on iOS, which is not desired."}),"\n",(0,o.jsxs)(n.p,{children:["To work with both iOS and Android, there's ",(0,o.jsx)(n.a,{href:"/react-native-template-strong/docs/components/icon-platform",children:"IconPlatform"})," component,\nwhich shows SF Symbols on iOS and Material Icons on Android, it works next way:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:' \n'})})]})}function m(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>c});var o=s(6540);const t={},i=o.createContext(t);function r(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7f85490b.8753bb0a.js b/assets/js/7f85490b.8753bb0a.js deleted file mode 100644 index c86f24e2..00000000 --- a/assets/js/7f85490b.8753bb0a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3427],{6091:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>d,metadata:()=>t,toc:()=>l});var s=n(5893),r=n(1151);const d={sidebar_position:3,title:"Dependencies and scripts"},c=void 0,t={id:"dependencies",title:"Dependencies and scripts",description:"Dependencies",source:"@site/docs/dependencies.md",sourceDirName:".",slug:"/dependencies",permalink:"/react-native-template-strong/docs/dependencies",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/dependencies.md",tags:[],version:"current",lastUpdatedAt:1704743195,formattedLastUpdatedAt:"Jan 8, 2024",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Dependencies and scripts"},sidebar:"tutorialSidebar",previous:{title:"Module",permalink:"/react-native-template-strong/docs/structure/module"},next:{title:"Before starting",permalink:"/react-native-template-strong/docs/navigation/before-starting"}},o={},l=[{value:"Dependencies",id:"dependencies",level:2},{value:"Scripts",id:"scripts",level:2},{value:"React Native specific",id:"react-native-specific",level:3},{value:"Project openers",id:"project-openers",level:3},{value:"Android specific",id:"android-specific",level:3},{value:"iOS specific",id:"ios-specific",level:3},{value:"Environment specific",id:"environment-specific",level:3},{value:"Version specific",id:"version-specific",level:3},{value:"Test specific",id:"test-specific",level:3},{value:"Utility specific",id:"utility-specific",level:3}];function a(e){const i={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,r.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.h2,{id:"dependencies",children:"Dependencies"}),"\n",(0,s.jsx)(i.p,{children:"This repository relies on dependencies which are needed in day-to-day development."}),"\n",(0,s.jsxs)(i.p,{children:["Every dependency is provided with types or in case if there are no types it implements in ",(0,s.jsx)(i.a,{href:"/react-native-template-strong/docs/types",children:"Types"}),"."]}),"\n",(0,s.jsx)(i.p,{children:"The versions are updating manually and regularly with new releases."}),"\n",(0,s.jsx)(i.p,{children:"Build primarily with"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://reactnative.dev",children:"React Native"})," ",(0,s.jsx)(i.code,{children:"0.73.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://wix.github.io/react-native-navigation/docs/before-you-start/",children:"React Native Navigation"})," ",(0,s.jsx)(i.code,{children:"7.37.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://redux-toolkit.js.org",children:"Redux Toolkit"})," ",(0,s.jsx)(i.code,{children:"2.0.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://www.typescriptlang.org",children:"TypeScript"})," ",(0,s.jsx)(i.code,{children:"5.3.3"})]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"Includes next components:"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/react-native-datetimepicker/datetimepicker",children:"Date time picker"})," ",(0,s.jsx)(i.code,{children:"7.6.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/stefalda/ReactNativeLocalization",children:"Localization"})," ",(0,s.jsx)(i.code,{children:"2.3.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/wonday/react-native-orientation-locker",children:"Orientation locker"})," ",(0,s.jsx)(i.code,{children:"1.6.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/zoontek/react-native-permissions",children:"Permissions"})," ",(0,s.jsx)(i.code,{children:"4.0.4"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/luggit/react-native-config",children:"Config"})," ",(0,s.jsx)(i.code,{children:"1.5.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/ivpusic/react-native-image-crop-picker",children:"Image crop picker"})," ",(0,s.jsx)(i.code,{children:"0.40.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/dohooo/react-native-reanimated-carousel",children:"Reanimated carousel"})," ",(0,s.jsx)(i.code,{children:"3.5.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/oblador/react-native-vector-icons",children:"Vector icons"})," ",(0,s.jsx)(i.code,{children:"10.0.3"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/birkir/react-native-sfsymbols",children:"SF Symbols"})," ",(0,s.jsx)(i.code,{children:"1.2.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/MinaSamir11/react-native-in-app-review",children:"In-app review"})," ",(0,s.jsx)(i.code,{children:"4.3.3"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/nirsky/react-native-size-matters",children:"Size matters"})," ",(0,s.jsx)(i.code,{children:"0.4.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/CaioQuirinoMedeiros/react-native-mask-input",children:"Mask input"})," ",(0,s.jsx)(i.code,{children:"1.2.3"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/iamkun/dayjs/",children:"DayJS"})," ",(0,s.jsx)(i.code,{children:"1.11.10"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/react-native-netinfo/react-native-netinfo",children:"Net info"})," ",(0,s.jsx)(i.code,{children:"11.2.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/react-native-share/react-native-share",children:"Share"})," ",(0,s.jsx)(i.code,{children:"10.0.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/software-mansion/react-native-reanimated",children:"Reanimated"})," ",(0,s.jsx)(i.code,{children:"3.6.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/react-native-menu/menu",children:"Menu"})," ",(0,s.jsx)(i.code,{children:"0.9.1"})]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"Testing made with:"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/facebook/jest",children:"Jest"})," ",(0,s.jsx)(i.code,{children:"29.7.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/wix/Detox",children:"Detox"})," ",(0,s.jsx)(i.code,{children:"20.14.8"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://storybook.js.org/tutorials/intro-to-storybook/react-native/en/get-started/",children:"Storybook"})," ",(0,s.jsx)(i.code,{children:"6.5.7"})]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"Code quality covered with:"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/eslint/eslint",children:"ESLint"})," ",(0,s.jsx)(i.code,{children:"8.56.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/svbutko/eslint-config-react-strong",children:"ESLint Config React Strong"})," ",(0,s.jsx)(i.code,{children:"2.2.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/typicode/husky",children:"Husky"})," ",(0,s.jsx)(i.code,{children:"8.0.3"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/prettier/prettier",children:"Prettier"})," ",(0,s.jsx)(i.code,{children:"3.1.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/okonet/lint-staged",children:"Lint staged"})," ",(0,s.jsx)(i.code,{children:"15.2.0"})]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"It also includes other small or utility components."}),"\n",(0,s.jsx)(i.h2,{id:"scripts",children:"Scripts"}),"\n",(0,s.jsx)(i.p,{children:"Most of the needed scripts are here to help with your development process without using terminal:"}),"\n",(0,s.jsx)(i.h3,{id:"react-native-specific",children:"React Native specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"start"})," - starts Metro bundler"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"start-reset-cache"})," - starts Metro bundler with resetting cache"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"project-openers",children:"Project openers"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"open:xcode"})," - opens Xcode with workspace project"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"open:android-studio"})," - opens Android Studio with Android project"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"android-specific",children:"Android specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:run"})," - compiles and runs your application on Android devices or emulators WITHOUT starting Metro"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:run+start"})," - compiles and runs your application on Android devices or emulators AND if successful starts Metro"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:build-release-bundle-nix"})," - builds Android release bundle on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:build-release-apk-nix"})," - builds Android release APK on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:clean-nix"})," - cleans Android builds on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:build-release-bundle-win"})," - builds Android release bundle on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:build-release-apk-win"})," - builds Android release APK on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:clean-win"})," - cleans Android builds on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:bundle"})," - builds Android bundle with sourcemaps to visualize its content"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:bundle-visualizer"})," - visualizes contents of Android bundle (total, components, packages size)"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"ios-specific",children:"iOS specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:run"})," - compiles and runs your application on iOS devices or emulators WITHOUT starting Metro"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-visualizer"})," - visualizes contents of iOS bundle (total, components, packages size)"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-install"})," - installs ",(0,s.jsx)(i.code,{children:"vendor"})," bundle"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-pod-install"})," - install pods"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-pod-install-repo-update"})," - install pods and updates repo"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-check-pods-updates"})," - checks outdated pods"]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"The rest of the actions are done in XCode by opening the project's workspace."}),"\n",(0,s.jsx)(i.h3,{id:"environment-specific",children:"Environment specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:development-nix"})," - sets development environment on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:test-nix"})," - sets test environment on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:staging-nix"})," - sets staging environment on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:production-nix"})," - sets production environment on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:development-win"})," - sets development environment on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:test-win"})," - sets test environment on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:staging-win"})," - sets staging environment on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:production-win"})," - sets production environment on Windows"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"version-specific",children:"Version specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"version:major"})," - updates major version of iOS, Android and package.json"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"version:minor"})," - updates minor version of iOS, Android and package.json"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"version:patch"})," - updates patch version of iOS, Android and package.json"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"test-specific",children:"Test specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ts"})," - checks TypeScript files for errors"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"tests"})," - runs Jest tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"tests:watch"})," - runs Jest tests with watcher enabled"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"tests:coverage"})," - creates HTML and console representation of Jest test coverage percentage"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:build-android-debug"})," - builds Android debug build for Detox tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:build-android-release"})," - builds Android release build for Detox tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:android-debug"})," - runs Detox tests on Android device or emulator of debug build"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:android-release"})," - runs Detox tests on Android device or emulator of release build"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:build-ios-debug"})," - builds iOS debug build for Detox tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:build-ios-release"})," - builds iOS release build for Detox tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:ios-debug"})," - runs Detox tests on iOS device or emulator of debug build"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:ios-release"})," - runs Detox tests on iOS device or emulator of release build"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"eslint:run"})," - runs ESLint on JSX, TSX and TS files to check for rules error and warnings"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"eslint:fix"})," - runs ESLint on JSX, TSX and TS files and tries to automatically fix errors and warnings"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"utility-specific",children:"Utility specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"postinstall"})," - uses ",(0,s.jsx)(i.code,{children:"patch-package"})," to apply changes made with ",(0,s.jsx)(i.code,{children:"patch-package"})," after ",(0,s.jsx)(i.code,{children:"npm install"}),", check ",(0,s.jsx)(i.a,{href:"/react-native-template-strong/docs/patches",children:"Patches"})," for more"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"postversion"}),"- utilizes ",(0,s.jsx)(i.code,{children:"react-native-version"})," to increment version of iOS, Android and package.json"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"check-dependencies-updates"})," - checks version updates of your dependencies so that you could manually check changes and update what's needed"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"check-pods-updates"})," - checks iOS pods updates"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"generate-image-resources"})," - generates image resources based on images from selected folder, check ",(0,s.jsx)(i.a,{href:"/react-native-template-strong/docs/resources/images",children:"Images"})," for more"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"prepare"})," - if you have a git repository then it prepares scripts ",(0,s.jsx)(i.code,{children:"pre-commit"})," and ",(0,s.jsx)(i.code,{children:"post-merge"})," from package.json"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"npm-install-force"})," - ",(0,s.jsx)(i.code,{children:"npm install"})," with ",(0,s.jsx)(i.code,{children:"force"})," to mitigate check issues with older dependencies"]}),"\n"]})]})}function h(e={}){const{wrapper:i}={...(0,r.a)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1151:(e,i,n)=>{n.d(i,{Z:()=>t,a:()=>c});var s=n(7294);const r={},d=s.createContext(r);function c(e){const i=s.useContext(d);return s.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function t(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),s.createElement(d.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7f85490b.9c10bfc4.js b/assets/js/7f85490b.9c10bfc4.js new file mode 100644 index 00000000..2bf05b90 --- /dev/null +++ b/assets/js/7f85490b.9c10bfc4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[114],{2109:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>d,metadata:()=>t,toc:()=>l});var s=n(4848),r=n(8453);const d={sidebar_position:3,title:"Dependencies and scripts"},c=void 0,t={id:"dependencies",title:"Dependencies and scripts",description:"Dependencies",source:"@site/docs/dependencies.md",sourceDirName:".",slug:"/dependencies",permalink:"/react-native-template-strong/docs/dependencies",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/dependencies.md",tags:[],version:"current",lastUpdatedAt:1714909701e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Dependencies and scripts"},sidebar:"tutorialSidebar",previous:{title:"Module",permalink:"/react-native-template-strong/docs/structure/module"},next:{title:"Before starting",permalink:"/react-native-template-strong/docs/navigation/before-starting"}},o={},l=[{value:"Dependencies",id:"dependencies",level:2},{value:"Scripts",id:"scripts",level:2},{value:"React Native specific",id:"react-native-specific",level:3},{value:"Project openers",id:"project-openers",level:3},{value:"Android specific",id:"android-specific",level:3},{value:"iOS specific",id:"ios-specific",level:3},{value:"Environment specific",id:"environment-specific",level:3},{value:"Version specific",id:"version-specific",level:3},{value:"Test specific",id:"test-specific",level:3},{value:"Utility specific",id:"utility-specific",level:3}];function a(e){const i={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.h2,{id:"dependencies",children:"Dependencies"}),"\n",(0,s.jsx)(i.p,{children:"This repository relies on dependencies which are needed in day-to-day development."}),"\n",(0,s.jsxs)(i.p,{children:["Every dependency is provided with types or in case if there are no types it implements in ",(0,s.jsx)(i.a,{href:"/react-native-template-strong/docs/types",children:"Types"}),"."]}),"\n",(0,s.jsx)(i.p,{children:"The versions are updating manually and regularly with new releases."}),"\n",(0,s.jsx)(i.p,{children:"Build primarily with"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://reactnative.dev",children:"React Native"})," ",(0,s.jsx)(i.code,{children:"0.74.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://wix.github.io/react-native-navigation/docs/before-you-start/",children:"React Native Navigation"})," ",(0,s.jsx)(i.code,{children:"7.39.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://redux-toolkit.js.org",children:"Redux Toolkit"})," ",(0,s.jsx)(i.code,{children:"2.2.3"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://www.typescriptlang.org",children:"TypeScript"})," ",(0,s.jsx)(i.code,{children:"5.4.5"})]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"Includes next components:"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/react-native-datetimepicker/datetimepicker",children:"Date time picker"})," ",(0,s.jsx)(i.code,{children:"8.0.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/stefalda/ReactNativeLocalization",children:"Localization"})," ",(0,s.jsx)(i.code,{children:"2.3.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/wonday/react-native-orientation-locker",children:"Orientation locker"})," ",(0,s.jsx)(i.code,{children:"1.7.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/zoontek/react-native-permissions",children:"Permissions"})," ",(0,s.jsx)(i.code,{children:"4.1.5"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/luggit/react-native-config",children:"Config"})," ",(0,s.jsx)(i.code,{children:"1.5.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/ivpusic/react-native-image-crop-picker",children:"Image crop picker"})," ",(0,s.jsx)(i.code,{children:"0.41.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/dohooo/react-native-reanimated-carousel",children:"Reanimated carousel"})," ",(0,s.jsx)(i.code,{children:"3.5.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/oblador/react-native-vector-icons",children:"Vector icons"})," ",(0,s.jsx)(i.code,{children:"10.1.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/birkir/react-native-sfsymbols",children:"SF Symbols"})," ",(0,s.jsx)(i.code,{children:"1.2.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/MinaSamir11/react-native-in-app-review",children:"In-app review"})," ",(0,s.jsx)(i.code,{children:"4.3.3"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/nirsky/react-native-size-matters",children:"Size matters"})," ",(0,s.jsx)(i.code,{children:"0.4.2"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/CaioQuirinoMedeiros/react-native-mask-input",children:"Mask input"})," ",(0,s.jsx)(i.code,{children:"1.2.3"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/iamkun/dayjs/",children:"DayJS"})," ",(0,s.jsx)(i.code,{children:"1.11.11"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/react-native-netinfo/react-native-netinfo",children:"Net info"})," ",(0,s.jsx)(i.code,{children:"11.3.1"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/react-native-share/react-native-share",children:"Share"})," ",(0,s.jsx)(i.code,{children:"10.2.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/software-mansion/react-native-reanimated",children:"Reanimated"})," ",(0,s.jsx)(i.code,{children:"3.10.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/react-native-menu/menu",children:"Menu"})," ",(0,s.jsx)(i.code,{children:"1.0.2"})]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"Testing made with:"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/facebook/jest",children:"Jest"})," ",(0,s.jsx)(i.code,{children:"29.7.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/wix/Detox",children:"Detox"})," ",(0,s.jsx)(i.code,{children:"20.20.3"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://storybook.js.org/tutorials/intro-to-storybook/react-native/en/get-started/",children:"Storybook"})," ",(0,s.jsx)(i.code,{children:"7.6.18"})]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"Code quality covered with:"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/eslint/eslint",children:"ESLint"})," ",(0,s.jsx)(i.code,{children:"8.57.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/svbutko/eslint-config-react-strong",children:"ESLint Config React Strong"})," ",(0,s.jsx)(i.code,{children:"2.4.0"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/typicode/husky",children:"Husky"})," ",(0,s.jsx)(i.code,{children:"9.0.11"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/prettier/prettier",children:"Prettier"})," ",(0,s.jsx)(i.code,{children:"3.2.5"})]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.a,{href:"https://github.com/okonet/lint-staged",children:"Lint staged"})," ",(0,s.jsx)(i.code,{children:"15.2.2"})]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"And many other day-to-day useful dependencies."}),"\n",(0,s.jsx)(i.h2,{id:"scripts",children:"Scripts"}),"\n",(0,s.jsx)(i.p,{children:"Most of the needed scripts are here to help with your development process without using terminal:"}),"\n",(0,s.jsx)(i.h3,{id:"react-native-specific",children:"React Native specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"start"})," - starts Metro bundler"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"start-reset-cache"})," - starts Metro bundler with resetting cache"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"project-openers",children:"Project openers"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"open:xcode"})," - opens Xcode with workspace project"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"open:android-studio"})," - opens Android Studio with Android project"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"android-specific",children:"Android specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:run"})," - compiles and runs your application on Android devices or emulators WITHOUT starting Metro"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:run+start"})," - compiles and runs your application on Android devices or emulators AND if successful starts Metro"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:build-release-bundle-nix"})," - builds Android release bundle on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:build-release-apk-nix"})," - builds Android release APK on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:clean-nix"})," - cleans Android builds on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:build-release-bundle-win"})," - builds Android release bundle on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:build-release-apk-win"})," - builds Android release APK on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:clean-win"})," - cleans Android builds on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:bundle"})," - builds Android bundle with sourcemaps to visualize its content"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"android:bundle-visualizer"})," - visualizes contents of Android bundle (total, components, packages size)"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"ios-specific",children:"iOS specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:run"})," - compiles and runs your application on iOS devices or emulators WITHOUT starting Metro"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-visualizer"})," - visualizes contents of iOS bundle (total, components, packages size)"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-install"})," - installs ",(0,s.jsx)(i.code,{children:"vendor"})," bundle"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-pod-install"})," - install pods"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-pod-install-repo-update"})," - install pods and updates repo"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ios:bundle-check-pods-updates"})," - checks outdated pods"]}),"\n"]}),"\n",(0,s.jsx)(i.p,{children:"The rest of the actions are done in XCode by opening the project's workspace."}),"\n",(0,s.jsx)(i.h3,{id:"environment-specific",children:"Environment specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:development-nix"})," - sets development environment on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:test-nix"})," - sets test environment on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:staging-nix"})," - sets staging environment on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:production-nix"})," - sets production environment on Linux/macOS"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:development-win"})," - sets development environment on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:test-win"})," - sets test environment on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:staging-win"})," - sets staging environment on Windows"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"environment:production-win"})," - sets production environment on Windows"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"version-specific",children:"Version specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"version:major"})," - updates major version of iOS, Android and package.json"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"version:minor"})," - updates minor version of iOS, Android and package.json"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"version:patch"})," - updates patch version of iOS, Android and package.json"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"test-specific",children:"Test specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"ts"})," - checks TypeScript files for errors"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"tests"})," - runs Jest tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"tests:watch"})," - runs Jest tests with watcher enabled"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"tests:coverage"})," - creates HTML and console representation of Jest test coverage percentage"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:build-android-debug"})," - builds Android debug build for Detox tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:build-android-release"})," - builds Android release build for Detox tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:android-debug"})," - runs Detox tests on Android device or emulator of debug build"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:android-release"})," - runs Detox tests on Android device or emulator of release build"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:build-ios-debug"})," - builds iOS debug build for Detox tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:build-ios-release"})," - builds iOS release build for Detox tests"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:ios-debug"})," - runs Detox tests on iOS device or emulator of debug build"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"e2e:ios-release"})," - runs Detox tests on iOS device or emulator of release build"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"eslint:run"})," - runs ESLint on JSX, TSX and TS files to check for rules error and warnings"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"eslint:fix"})," - runs ESLint on JSX, TSX and TS files and tries to automatically fix errors and warnings"]}),"\n"]}),"\n",(0,s.jsx)(i.h3,{id:"utility-specific",children:"Utility specific"}),"\n",(0,s.jsxs)(i.ul,{children:["\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"postinstall"})," - uses ",(0,s.jsx)(i.code,{children:"patch-package"})," to apply changes made with ",(0,s.jsx)(i.code,{children:"patch-package"})," after ",(0,s.jsx)(i.code,{children:"npm install"}),", check ",(0,s.jsx)(i.a,{href:"/react-native-template-strong/docs/patches",children:"Patches"})," for more"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"postversion"}),"- utilizes ",(0,s.jsx)(i.code,{children:"react-native-version"})," to increment version of iOS, Android and package.json"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"check-dependencies-updates"})," - checks version updates of your dependencies so that you could manually check changes and update what's needed"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"check-pods-updates"})," - checks iOS pods updates"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"generate-image-resources"})," - generates image resources based on images from selected folder, check ",(0,s.jsx)(i.a,{href:"/react-native-template-strong/docs/resources/images",children:"Images"})," for more"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"prepare"})," - if you have a git repository then it prepares scripts ",(0,s.jsx)(i.code,{children:"pre-commit"})," and ",(0,s.jsx)(i.code,{children:"post-merge"})," from package.json"]}),"\n",(0,s.jsxs)(i.li,{children:[(0,s.jsx)(i.code,{children:"npm-install-force"})," - ",(0,s.jsx)(i.code,{children:"npm install"})," with ",(0,s.jsx)(i.code,{children:"force"})," to mitigate check issues with older dependencies"]}),"\n"]})]})}function h(e={}){const{wrapper:i}={...(0,r.R)(),...e.components};return i?(0,s.jsx)(i,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,i,n)=>{n.d(i,{R:()=>c,x:()=>t});var s=n(6540);const r={},d=s.createContext(r);function c(e){const i=s.useContext(d);return s.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function t(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),s.createElement(d.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/82bbd999.3573f599.js b/assets/js/82bbd999.3573f599.js new file mode 100644 index 00000000..ff873605 --- /dev/null +++ b/assets/js/82bbd999.3573f599.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2858],{5642:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>a,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=n(4848),r=n(8453);const o={sidebar_position:2,title:"Module"},c=void 0,i={id:"structure/module",title:"Module",description:"Content",source:"@site/docs/structure/module.md",sourceDirName:"structure",slug:"/structure/module",permalink:"/react-native-template-strong/docs/structure/module",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/structure/module.md",tags:[],version:"current",lastUpdatedAt:1643013568e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Module"},sidebar:"tutorialSidebar",previous:{title:"Project",permalink:"/react-native-template-strong/docs/structure/project"},next:{title:"Dependencies and scripts",permalink:"/react-native-template-strong/docs/dependencies"}},l={},d=[{value:"Content",id:"content",level:2}];function u(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Module structure contains:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Screen or screens"}),"\n",(0,s.jsx)(t.li,{children:"Redux state"}),"\n",(0,s.jsx)(t.li,{children:"Redux slice"}),"\n",(0,s.jsx)(t.li,{children:"Components used only with this module"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"src\n\u2502\n\u2502\n\u2502\n\u2514\u2500\u2500\u2500modules\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500companyOffers\n\u2502 \u2502 CompanyOffers.tsx\n\u2502 \u2502 companyOffersSlice.ts\n\u2502 \u2502 companyOffersState.ts\n\u2502 \u2514\u2500\u2500\u2500components\n\u2502 \u2502 CompanyOfferItem.tsx\n\u2502 \u2502 CompanyOffersHeader.tsx\n\u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\n"})})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>c,x:()=>i});var s=n(6540);const r={},o=s.createContext(r);function c(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/82bbd999.6d0c58b6.js b/assets/js/82bbd999.6d0c58b6.js deleted file mode 100644 index 39219d7a..00000000 --- a/assets/js/82bbd999.6d0c58b6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9709],{8941:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>a});var s=n(5893),r=n(1151);const o={sidebar_position:2,title:"Module"},c=void 0,i={id:"structure/module",title:"Module",description:"Content",source:"@site/docs/structure/module.md",sourceDirName:"structure",slug:"/structure/module",permalink:"/react-native-template-strong/docs/structure/module",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/structure/module.md",tags:[],version:"current",lastUpdatedAt:1643013568,formattedLastUpdatedAt:"Jan 24, 2022",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Module"},sidebar:"tutorialSidebar",previous:{title:"Project",permalink:"/react-native-template-strong/docs/structure/project"},next:{title:"Dependencies and scripts",permalink:"/react-native-template-strong/docs/dependencies"}},d={},a=[{value:"Content",id:"content",level:2}];function l(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Module structure contains:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Screen or screens"}),"\n",(0,s.jsx)(t.li,{children:"Redux state"}),"\n",(0,s.jsx)(t.li,{children:"Redux slice"}),"\n",(0,s.jsx)(t.li,{children:"Components used only with this module"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"src\n\u2502\n\u2502\n\u2502\n\u2514\u2500\u2500\u2500modules\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500companyOffers\n\u2502 \u2502 CompanyOffers.tsx\n\u2502 \u2502 companyOffersSlice.ts\n\u2502 \u2502 companyOffersState.ts\n\u2502 \u2514\u2500\u2500\u2500components\n\u2502 \u2502 CompanyOfferItem.tsx\n\u2502 \u2502 CompanyOffersHeader.tsx\n\u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\n"})})]})}function u(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>c});var s=n(7294);const r={},o=s.createContext(r);function c(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/84080ef2.b7a9af1a.js b/assets/js/84080ef2.b7a9af1a.js new file mode 100644 index 00000000..5373890b --- /dev/null +++ b/assets/js/84080ef2.b7a9af1a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7846],{8476:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>d,toc:()=>a});var s=r(4848),n=r(8453);const l={sidebar_position:3,title:"defaultKeyIdExtractor"},i=void 0,d={id:"helpers/default-key-id-extractor",title:"defaultKeyIdExtractor",description:"Content",source:"@site/docs/helpers/default-key-id-extractor.md",sourceDirName:"helpers",slug:"/helpers/default-key-id-extractor",permalink:"/react-native-template-strong/docs/helpers/default-key-id-extractor",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/default-key-id-extractor.md",tags:[],version:"current",lastUpdatedAt:1704543933e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"defaultKeyIdExtractor"},sidebar:"tutorialSidebar",previous:{title:"colorHelpers",permalink:"/react-native-template-strong/docs/helpers/color-helpers"},next:{title:"dialogsHelpers",permalink:"/react-native-template-strong/docs/helpers/dialogs-helpers"}},o={},a=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Used to provide string value of ",(0,s.jsx)(t.code,{children:"id"})," from items as key for the ",(0,s.jsx)(t.code,{children:"keyExtractor"})," property of ",(0,s.jsx)(t.code,{children:"FlatList"})," or ",(0,s.jsx)(t.code,{children:"SectionList"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Used as default property in ",(0,s.jsx)(t.code,{children:"FlatListWrapper"})," and ",(0,s.jsx)(t.code,{children:"SectionListWrapper"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"FlatListWrapper.defaultProps = {\n keyExtractor: defaultKeyIdExtractor,\n};\n\nSectionListWrapper.defaultProps = {\n keyExtractor: defaultKeyIdExtractor,\n};\n"})}),"\n",(0,s.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"item"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"T extends {id: string or number}"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["Item which has ",(0,s.jsx)(t.code,{children:"id"})," and will be used as key"]})]})})]})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>i,x:()=>d});var s=r(6540);const n={},l=s.createContext(n);function i(e){const t=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),s.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/84080ef2.cf2b77e8.js b/assets/js/84080ef2.cf2b77e8.js deleted file mode 100644 index 8220b0c5..00000000 --- a/assets/js/84080ef2.cf2b77e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7816],{3545:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>d,toc:()=>o});var s=r(5893),n=r(1151);const l={sidebar_position:3,title:"defaultKeyIdExtractor"},i=void 0,d={id:"helpers/default-key-id-extractor",title:"defaultKeyIdExtractor",description:"Content",source:"@site/docs/helpers/default-key-id-extractor.md",sourceDirName:"helpers",slug:"/helpers/default-key-id-extractor",permalink:"/react-native-template-strong/docs/helpers/default-key-id-extractor",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/default-key-id-extractor.md",tags:[],version:"current",lastUpdatedAt:1704543933,formattedLastUpdatedAt:"Jan 6, 2024",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"defaultKeyIdExtractor"},sidebar:"tutorialSidebar",previous:{title:"colorHelpers",permalink:"/react-native-template-strong/docs/helpers/color-helpers"},next:{title:"dialogsHelpers",permalink:"/react-native-template-strong/docs/helpers/dialogs-helpers"}},a={},o=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Used to provide string value of ",(0,s.jsx)(t.code,{children:"id"})," from items as key for the ",(0,s.jsx)(t.code,{children:"keyExtractor"})," property of ",(0,s.jsx)(t.code,{children:"FlatList"})," or ",(0,s.jsx)(t.code,{children:"SectionList"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Used as default property in ",(0,s.jsx)(t.code,{children:"FlatListWrapper"})," and ",(0,s.jsx)(t.code,{children:"SectionListWrapper"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"FlatListWrapper.defaultProps = {\n keyExtractor: defaultKeyIdExtractor,\n};\n\nSectionListWrapper.defaultProps = {\n keyExtractor: defaultKeyIdExtractor,\n};\n"})}),"\n",(0,s.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"item"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"T extends {id: string or number}"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["Item which has ",(0,s.jsx)(t.code,{children:"id"})," and will be used as key"]})]})})]})]})}function p(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},1151:(e,t,r)=>{r.d(t,{Z:()=>d,a:()=>i});var s=r(7294);const n={},l=s.createContext(n);function i(e){const t=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),s.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8450a114.026a0590.js b/assets/js/8450a114.026a0590.js deleted file mode 100644 index fa1070c6..00000000 --- a/assets/js/8450a114.026a0590.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5116],{70:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>x,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var l=n(5893),s=n(1151);const o={sidebar_position:6,title:"IconPlatform"},r=void 0,i={id:"components/icon-platform",title:"IconPlatform",description:"Content",source:"@site/docs/components/icon-platform.md",sourceDirName:"components",slug:"/components/icon-platform",permalink:"/react-native-template-strong/docs/components/icon-platform",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/icon-platform.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:6,frontMatter:{sidebar_position:6,title:"IconPlatform"},sidebar:"tutorialSidebar",previous:{title:"SectionListWrapper",permalink:"/react-native-template-strong/docs/components/section-list-wrapper"},next:{title:"TouchablePlatform",permalink:"/react-native-template-strong/docs/components/touchable-platform"}},d={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsxs)(t.p,{children:["Shows provided SF Symbol for iOS or Material Icon for Android or if both aren't provided then returns ",(0,l.jsx)(t.code,{children:"null"}),"."]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.p,{children:["Extends ",(0,l.jsx)(t.code,{children:"IconProps"})," of ",(0,l.jsx)(t.code,{children:"react-native-vector-icons/Icon"})," and ",(0,l.jsx)(t.code,{children:"SFSymbolProps"})," of ",(0,l.jsx)(t.code,{children:"react-native-sfsymbols"})," and omits ",(0,l.jsx)(t.code,{children:"name"})," of both of them."]}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"iosName"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"SFSymbols"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"SF Symbol fron enum"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"androidName"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Name of Material Icon"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"color"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ColorValue"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Color of icon"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"style"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"TextStyle or ViewStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of icon"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:' \n'})})]})}function x(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>r});var l=n(7294);const s={},o=l.createContext(s);function r(e){const t=l.useContext(o);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),l.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8450a114.f09d019a.js b/assets/js/8450a114.f09d019a.js new file mode 100644 index 00000000..d8505169 --- /dev/null +++ b/assets/js/8450a114.f09d019a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5685],{3684:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>x,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var l=n(4848),s=n(8453);const o={sidebar_position:6,title:"IconPlatform"},r=void 0,i={id:"components/icon-platform",title:"IconPlatform",description:"Content",source:"@site/docs/components/icon-platform.md",sourceDirName:"components",slug:"/components/icon-platform",permalink:"/react-native-template-strong/docs/components/icon-platform",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/icon-platform.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:6,frontMatter:{sidebar_position:6,title:"IconPlatform"},sidebar:"tutorialSidebar",previous:{title:"SectionListWrapper",permalink:"/react-native-template-strong/docs/components/section-list-wrapper"},next:{title:"TouchablePlatform",permalink:"/react-native-template-strong/docs/components/touchable-platform"}},d={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsxs)(t.p,{children:["Shows provided SF Symbol for iOS or Material Icon for Android or if both aren't provided then returns ",(0,l.jsx)(t.code,{children:"null"}),"."]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.p,{children:["Extends ",(0,l.jsx)(t.code,{children:"IconProps"})," of ",(0,l.jsx)(t.code,{children:"react-native-vector-icons/Icon"})," and ",(0,l.jsx)(t.code,{children:"SFSymbolProps"})," of ",(0,l.jsx)(t.code,{children:"react-native-sfsymbols"})," and omits ",(0,l.jsx)(t.code,{children:"name"})," of both of them."]}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"iosName"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"SFSymbols"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"SF Symbol fron enum"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"androidName"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Name of Material Icon"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"color"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ColorValue"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Color of icon"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"style"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"TextStyle or ViewStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of icon"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:' \n'})})]})}function x(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var l=n(6540);const s={},o=l.createContext(s);function r(e){const t=l.useContext(o);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),l.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/88cbf0c6.60ae2bfe.js b/assets/js/88cbf0c6.60ae2bfe.js new file mode 100644 index 00000000..75002d13 --- /dev/null +++ b/assets/js/88cbf0c6.60ae2bfe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3561],{7294:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>i,contentTitle:()=>d,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var t=n(4848),a=n(8453);const s={sidebar_position:6,title:"AsyncThunk"},d=void 0,o={id:"redux/async-thunk",title:"AsyncThunk",description:"Content",source:"@site/docs/redux/async-thunk.md",sourceDirName:"redux",slug:"/redux/async-thunk",permalink:"/react-native-template-strong/docs/redux/async-thunk",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/async-thunk.md",tags:[],version:"current",lastUpdatedAt:168909824e4,sidebarPosition:6,frontMatter:{sidebar_position:6,title:"AsyncThunk"},sidebar:"tutorialSidebar",previous:{title:"Slice",permalink:"/react-native-template-strong/docs/redux/slice"},next:{title:"Hooks",permalink:"/react-native-template-strong/docs/redux/hooks"}},i={},c=[{value:"Content",id:"content",level:2},{value:"Creation",id:"creation",level:2},{value:"Slice handlers",id:"slice-handlers",level:2},{value:"Promise result handlers",id:"promise-result-handlers",level:2}];function l(e){const r={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h2,{id:"content",children:"Content"}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.code,{children:"AsyncThunks"})," as well as ",(0,t.jsx)(r.code,{children:"Slices"})," are stored together for better readability and remove need to have additional imports."]}),"\n",(0,t.jsxs)(r.p,{children:["To demonstrate how to create and use it, I will be using some ",(0,t.jsx)(r.code,{children:"Orders"})," state and ",(0,t.jsx)(r.code,{children:"ordersApi"})," as example."]}),"\n",(0,t.jsx)(r.h2,{id:"creation",children:"Creation"}),"\n",(0,t.jsxs)(r.p,{children:["Creation of ",(0,t.jsx)(r.code,{children:"AsyncThunk"})," is the same as in original documentation with usage of typed ",(0,t.jsx)(r.code,{children:"state"})," and ",(0,t.jsx)(r.code,{children:"dispatch"}),", with your API call do the following:"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-typescript",children:'export const takeOrder = createAppAsyncThunk("orders/take", async (id: string) => {\n return await ordersApi.takeOrder(id);\n});\n'})}),"\n",(0,t.jsxs)(r.p,{children:["Where ",(0,t.jsx)(r.code,{children:'"orders/take""'})," is name of your slice and name of your method."]}),"\n",(0,t.jsx)(r.h2,{id:"slice-handlers",children:"Slice handlers"}),"\n",(0,t.jsx)(r.p,{children:"You can handle the result inline or as I like with functions, all together it looks like this:"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-typescript",children:'export const takeOrder = createAppAsyncThunk("order/take", async (id: string) => {\n return await ordersApi.takeOrder(id);\n});\n\nfunction rehydrate(state: OrderState, rehydrateParams: RehydrateAppAction) {\n return newState(rehydrateParams.payload?.orders || state, {});\n}\n\nfunction orderActionPendingHandler(state: OrderState, params: ReturnType ) {\n return newState(state, {isLoading: true, error: null});\n}\n\nfunction takeOrderFulfilledHandler(state: OrderState, params: ReturnType ) {\n return newState(state, {isLoading: false, error: null, order: params.payload});\n}\n\nfunction orderActionRejectedHandler(state: OrderState, params: ReturnType ) {\n return newState(state, {isLoading: false, error: params.error.message});\n}\n\nexport const {reducer: OrderReducer} = createSlice({\n name: "order",\n initialState: OrdersInitialState,\n extraReducers: (builder) => {\n builder\n .addCase(REHYDRATE, rehydrate)\n .addCase(takeOrder.pending, orderActionPendingHandler)\n .addCase(takeOrder.fulfilled, takeOrderFulfilledHandler)\n .addCase(takeOrder.rejected, orderActionRejectedHandler);\n },\n});\n'})}),"\n",(0,t.jsx)(r.h2,{id:"promise-result-handlers",children:"Promise result handlers"}),"\n",(0,t.jsx)(r.p,{children:"To handle promise results in pages/components (i.e. show error toast, show error in input, show success toast etc.)\nwe can handle it the following way:"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-typescript",children:" const onTakeOrderPress = useCallback(() => {\n handlePromiseResult(dispatch(takeOrder(orderId)), localization.common.orderHasBeenSuccessfullyTaken);\n }, [dispatch, orderId]);\n"})}),"\n",(0,t.jsxs)(r.p,{children:["To check more about ",(0,t.jsx)(r.code,{children:"handlePromiseResult"})," read more ",(0,t.jsx)(r.a,{href:"/react-native-template-strong/docs/validations",children:"here"}),"."]})]})}function u(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>d,x:()=>o});var t=n(6540);const a={},s=t.createContext(a);function d(e){const r=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:d(e.components),t.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/88cbf0c6.be060995.js b/assets/js/88cbf0c6.be060995.js deleted file mode 100644 index 8daff317..00000000 --- a/assets/js/88cbf0c6.be060995.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1242],{1310:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>d,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var n=t(5893),a=t(1151);const s={sidebar_position:6,title:"AsyncThunk"},d=void 0,o={id:"redux/async-thunk",title:"AsyncThunk",description:"Content",source:"@site/docs/redux/async-thunk.md",sourceDirName:"redux",slug:"/redux/async-thunk",permalink:"/react-native-template-strong/docs/redux/async-thunk",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/async-thunk.md",tags:[],version:"current",lastUpdatedAt:1689098240,formattedLastUpdatedAt:"Jul 11, 2023",sidebarPosition:6,frontMatter:{sidebar_position:6,title:"AsyncThunk"},sidebar:"tutorialSidebar",previous:{title:"Slice",permalink:"/react-native-template-strong/docs/redux/slice"},next:{title:"Hooks",permalink:"/react-native-template-strong/docs/redux/hooks"}},i={},l=[{value:"Content",id:"content",level:2},{value:"Creation",id:"creation",level:2},{value:"Slice handlers",id:"slice-handlers",level:2},{value:"Promise result handlers",id:"promise-result-handlers",level:2}];function c(e){const r={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.h2,{id:"content",children:"Content"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"AsyncThunks"})," as well as ",(0,n.jsx)(r.code,{children:"Slices"})," are stored together for better readability and remove need to have additional imports."]}),"\n",(0,n.jsxs)(r.p,{children:["To demonstrate how to create and use it, I will be using some ",(0,n.jsx)(r.code,{children:"Orders"})," state and ",(0,n.jsx)(r.code,{children:"ordersApi"})," as example."]}),"\n",(0,n.jsx)(r.h2,{id:"creation",children:"Creation"}),"\n",(0,n.jsxs)(r.p,{children:["Creation of ",(0,n.jsx)(r.code,{children:"AsyncThunk"})," is the same as in original documentation with usage of typed ",(0,n.jsx)(r.code,{children:"state"})," and ",(0,n.jsx)(r.code,{children:"dispatch"}),", with your API call do the following:"]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-typescript",children:'export const takeOrder = createAppAsyncThunk("orders/take", async (id: string) => {\n return await ordersApi.takeOrder(id);\n});\n'})}),"\n",(0,n.jsxs)(r.p,{children:["Where ",(0,n.jsx)(r.code,{children:'"orders/take""'})," is name of your slice and name of your method."]}),"\n",(0,n.jsx)(r.h2,{id:"slice-handlers",children:"Slice handlers"}),"\n",(0,n.jsx)(r.p,{children:"You can handle the result inline or as I like with functions, all together it looks like this:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-typescript",children:'export const takeOrder = createAppAsyncThunk("order/take", async (id: string) => {\n return await ordersApi.takeOrder(id);\n});\n\nfunction rehydrate(state: OrderState, rehydrateParams: RehydrateAppAction) {\n return newState(rehydrateParams.payload?.orders || state, {});\n}\n\nfunction orderActionPendingHandler(state: OrderState, params: ReturnType ) {\n return newState(state, {isLoading: true, error: null});\n}\n\nfunction takeOrderFulfilledHandler(state: OrderState, params: ReturnType ) {\n return newState(state, {isLoading: false, error: null, order: params.payload});\n}\n\nfunction orderActionRejectedHandler(state: OrderState, params: ReturnType ) {\n return newState(state, {isLoading: false, error: params.error.message});\n}\n\nexport const {reducer: OrderReducer} = createSlice({\n name: "order",\n initialState: OrdersInitialState,\n extraReducers: (builder) => {\n builder\n .addCase(REHYDRATE, rehydrate)\n .addCase(takeOrder.pending, orderActionPendingHandler)\n .addCase(takeOrder.fulfilled, takeOrderFulfilledHandler)\n .addCase(takeOrder.rejected, orderActionRejectedHandler);\n },\n});\n'})}),"\n",(0,n.jsx)(r.h2,{id:"promise-result-handlers",children:"Promise result handlers"}),"\n",(0,n.jsx)(r.p,{children:"To handle promise results in pages/components (i.e. show error toast, show error in input, show success toast etc.)\nwe can handle it the following way:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-typescript",children:" const onTakeOrderPress = useCallback(() => {\n handlePromiseResult(dispatch(takeOrder(orderId)), localization.common.orderHasBeenSuccessfullyTaken);\n }, [dispatch, orderId]);\n"})}),"\n",(0,n.jsxs)(r.p,{children:["To check more about ",(0,n.jsx)(r.code,{children:"handlePromiseResult"})," read more ",(0,n.jsx)(r.a,{href:"/react-native-template-strong/docs/validations",children:"here"}),"."]})]})}function u(e={}){const{wrapper:r}={...(0,a.a)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},1151:(e,r,t)=>{t.d(r,{Z:()=>o,a:()=>d});var n=t(7294);const a={},s=n.createContext(a);function d(e){const r=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:d(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8894.46125374.js b/assets/js/8913.83bce4ad.js similarity index 58% rename from assets/js/8894.46125374.js rename to assets/js/8913.83bce4ad.js index ca08bc72..5820bb97 100644 --- a/assets/js/8894.46125374.js +++ b/assets/js/8913.83bce4ad.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8894],{8894:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8913],{8913:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file diff --git a/assets/js/8a6ff679.97520d5b.js b/assets/js/8a6ff679.97520d5b.js deleted file mode 100644 index ac35b9f0..00000000 --- a/assets/js/8a6ff679.97520d5b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6243],{3989:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>c});var s=n(5893),i=n(1151);const l={sidebar_position:11,title:"RadioIcon"},o=void 0,d={id:"components/radio-icon",title:"RadioIcon",description:"Content",source:"@site/docs/components/radio-icon.md",sourceDirName:"components",slug:"/components/radio-icon",permalink:"/react-native-template-strong/docs/components/radio-icon",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/radio-icon.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:11,frontMatter:{sidebar_position:11,title:"RadioIcon"},sidebar:"tutorialSidebar",previous:{title:"RadioButton",permalink:"/react-native-template-strong/docs/components/radio-button"},next:{title:"EmptyView",permalink:"/react-native-template-strong/docs/components/empty-view"}},r={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Simple icon component which will be used in ",(0,s.jsx)(t.code,{children:"RadioButton"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"isSelected"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"boolean"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Changes the rendering icon design based on selection"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"disabled"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"boolean"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"If disabled then not allows to select it and shows different design"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"RadioButton.defaultProps = {\n IconComponent: RadioIcon,\n};\n"})})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>d,a:()=>o});var s=n(7294);const i={},l=s.createContext(i);function o(e){const t=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8a6ff679.a96e5d4d.js b/assets/js/8a6ff679.a96e5d4d.js new file mode 100644 index 00000000..29cb4b34 --- /dev/null +++ b/assets/js/8a6ff679.a96e5d4d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2670],{4372:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>c});var s=n(4848),i=n(8453);const l={sidebar_position:11,title:"RadioIcon"},o=void 0,d={id:"components/radio-icon",title:"RadioIcon",description:"Content",source:"@site/docs/components/radio-icon.md",sourceDirName:"components",slug:"/components/radio-icon",permalink:"/react-native-template-strong/docs/components/radio-icon",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/radio-icon.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:11,frontMatter:{sidebar_position:11,title:"RadioIcon"},sidebar:"tutorialSidebar",previous:{title:"RadioButton",permalink:"/react-native-template-strong/docs/components/radio-button"},next:{title:"EmptyView",permalink:"/react-native-template-strong/docs/components/empty-view"}},r={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Simple icon component which will be used in ",(0,s.jsx)(t.code,{children:"RadioButton"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"isSelected"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"boolean"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Changes the rendering icon design based on selection"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"disabled"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"boolean"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"If disabled then not allows to select it and shows different design"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"RadioButton.defaultProps = {\n IconComponent: RadioIcon,\n};\n"})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>d});var s=n(6540);const i={},l=s.createContext(i);function o(e){const t=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8e392f8e.b8df486b.js b/assets/js/8e392f8e.b8df486b.js new file mode 100644 index 00000000..8dc6585c --- /dev/null +++ b/assets/js/8e392f8e.b8df486b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9539],{2389:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var s=n(4848),o=n(8453);const i={sidebar_position:1,title:"Component styles"},r=void 0,l={id:"styles/component-styles",title:"Component styles",description:"Content",source:"@site/docs/styles/component-styles.md",sourceDirName:"styles",slug:"/styles/component-styles",permalink:"/react-native-template-strong/docs/styles/component-styles",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/styles/component-styles.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Component styles"},sidebar:"tutorialSidebar",previous:{title:"Native colors",permalink:"/react-native-template-strong/docs/themes/native-colors"},next:{title:"Common styles",permalink:"/react-native-template-strong/docs/styles/common-styles"}},a={},c=[{value:"Content",id:"content",level:2},{value:"Creating",id:"creating",level:2},{value:"Merging",id:"merging",level:2},{value:"Usage",id:"usage",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Component styles are stored withing its own file at the very bottom of it"}),"\n",(0,s.jsxs)(t.p,{children:["The conventional method of creating styles for components is by using ",(0,s.jsx)(t.a,{href:"https://reactnative.dev/docs/stylesheet",children:"StyleSheet.create"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"creating",children:"Creating"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'const styles = StyleSheet.create({\n container: {\n padding: CommonSizes.spacing.medium,\n } as ViewStyle,\n title: {\n fontWeight: "600",\n textAlign: "center",\n marginBottom: CommonSizes.spacing.extraSmall,\n } as TextStyle,\n description: {\n textAlign: "center",\n } as TextStyle,\n});\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Every style has to be assigned to its proper interface (",(0,s.jsx)(t.code,{children:"ViewStyle"}),", ",(0,s.jsx)(t.code,{children:"TextStyle"}),", ",(0,s.jsx)(t.code,{children:"ImageStyle"})," etc.) to have proper types and validations by TypeScript."]}),"\n",(0,s.jsx)(t.h2,{id:"merging",children:"Merging"}),"\n",(0,s.jsx)(t.p,{children:"To merge styles simply use spread operator like so:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'const styles = StyleSheet.create({\n container: {\n ...CommonStyles.flexCenter,\n padding: CommonSizes.spacing.medium,\n } as ViewStyle,\n title: {\n ...CommonStyles.normalText,\n fontWeight: "600",\n textAlign: "center",\n marginBottom: CommonSizes.spacing.extraSmall,\n } as TextStyle,\n description: {\n ...CommonStyles.normalText,\n textAlign: "center",\n } as TextStyle,\n});\n'})}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(t.p,{children:"Use the styles constant and appropriate parameter like so:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" \n \n"})})]})}function p(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>l});var s=n(6540);const o={},i=s.createContext(o);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8e392f8e.c4e39364.js b/assets/js/8e392f8e.c4e39364.js deleted file mode 100644 index 126d51df..00000000 --- a/assets/js/8e392f8e.c4e39364.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[880],{8273:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var s=n(5893),o=n(1151);const i={sidebar_position:1,title:"Component styles"},r=void 0,l={id:"styles/component-styles",title:"Component styles",description:"Content",source:"@site/docs/styles/component-styles.md",sourceDirName:"styles",slug:"/styles/component-styles",permalink:"/react-native-template-strong/docs/styles/component-styles",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/styles/component-styles.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Component styles"},sidebar:"tutorialSidebar",previous:{title:"Native colors",permalink:"/react-native-template-strong/docs/themes/native-colors"},next:{title:"Common styles",permalink:"/react-native-template-strong/docs/styles/common-styles"}},a={},c=[{value:"Content",id:"content",level:2},{value:"Creating",id:"creating",level:2},{value:"Merging",id:"merging",level:2},{value:"Usage",id:"usage",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Component styles are stored withing its own file at the very bottom of it"}),"\n",(0,s.jsxs)(t.p,{children:["The conventional method of creating styles for components is by using ",(0,s.jsx)(t.a,{href:"https://reactnative.dev/docs/stylesheet",children:"StyleSheet.create"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"creating",children:"Creating"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'const styles = StyleSheet.create({\n container: {\n padding: CommonSizes.spacing.medium,\n } as ViewStyle,\n title: {\n fontWeight: "600",\n textAlign: "center",\n marginBottom: CommonSizes.spacing.extraSmall,\n } as TextStyle,\n description: {\n textAlign: "center",\n } as TextStyle,\n});\n'})}),"\n",(0,s.jsxs)(t.p,{children:["Every style has to be assigned to its proper interface (",(0,s.jsx)(t.code,{children:"ViewStyle"}),", ",(0,s.jsx)(t.code,{children:"TextStyle"}),", ",(0,s.jsx)(t.code,{children:"ImageStyle"})," etc.) to have proper types and validations by TypeScript."]}),"\n",(0,s.jsx)(t.h2,{id:"merging",children:"Merging"}),"\n",(0,s.jsx)(t.p,{children:"To merge styles simply use spread operator like so:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'const styles = StyleSheet.create({\n container: {\n ...CommonStyles.flexCenter,\n padding: CommonSizes.spacing.medium,\n } as ViewStyle,\n title: {\n ...CommonStyles.normalText,\n fontWeight: "600",\n textAlign: "center",\n marginBottom: CommonSizes.spacing.extraSmall,\n } as TextStyle,\n description: {\n ...CommonStyles.normalText,\n textAlign: "center",\n } as TextStyle,\n});\n'})}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(t.p,{children:"Use the styles constant and appropriate parameter like so:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"{title} \n{description} \n\n \n"})})]})}function p(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>l,a:()=>r});var s=n(7294);const o={},i=s.createContext(o);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/91cb04fa.5e48e87e.js b/assets/js/91cb04fa.5e48e87e.js deleted file mode 100644 index fc4b2fa2..00000000 --- a/assets/js/91cb04fa.5e48e87e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7290],{3291:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>s,default:()=>f,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var o=n(5893),i=n(1151);const r={sidebar_position:5,title:"Metro config"},s=void 0,c={id:"configs/metro-config",title:"Metro config",description:"Metro config doesn't use experimentalImportSupport and inlineRequires",source:"@site/docs/configs/metro-config.md",sourceDirName:"configs",slug:"/configs/metro-config",permalink:"/react-native-template-strong/docs/configs/metro-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/metro-config.md",tags:[],version:"current",lastUpdatedAt:1633194349,formattedLastUpdatedAt:"Oct 2, 2021",sidebarPosition:5,frontMatter:{sidebar_position:5,title:"Metro config"},sidebar:"tutorialSidebar",previous:{title:"Prettier config",permalink:"/react-native-template-strong/docs/configs/prettier-config"},next:{title:"Jest config",permalink:"/react-native-template-strong/docs/configs/jest-config"}},a={},d=[];function p(t){const e={code:"code",p:"p",...(0,i.a)(),...t.components};return(0,o.jsxs)(e.p,{children:["Metro config doesn't use ",(0,o.jsx)(e.code,{children:"experimentalImportSupport"})," and ",(0,o.jsx)(e.code,{children:"inlineRequires"})]})}function f(t={}){const{wrapper:e}={...(0,i.a)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(p,{...t})}):p(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>c,a:()=>s});var o=n(7294);const i={},r=o.createContext(i);function s(t){const e=o.useContext(r);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function c(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:s(t.components),o.createElement(r.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/91cb04fa.f29d5245.js b/assets/js/91cb04fa.f29d5245.js new file mode 100644 index 00000000..f65cc229 --- /dev/null +++ b/assets/js/91cb04fa.f29d5245.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3958],{4942:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>s,default:()=>f,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var o=n(4848),i=n(8453);const r={sidebar_position:5,title:"Metro config"},s=void 0,c={id:"configs/metro-config",title:"Metro config",description:"Metro config doesn't use experimentalImportSupport and inlineRequires",source:"@site/docs/configs/metro-config.md",sourceDirName:"configs",slug:"/configs/metro-config",permalink:"/react-native-template-strong/docs/configs/metro-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/metro-config.md",tags:[],version:"current",lastUpdatedAt:1633194349e3,sidebarPosition:5,frontMatter:{sidebar_position:5,title:"Metro config"},sidebar:"tutorialSidebar",previous:{title:"Prettier config",permalink:"/react-native-template-strong/docs/configs/prettier-config"},next:{title:"Jest config",permalink:"/react-native-template-strong/docs/configs/jest-config"}},a={},d=[];function p(e){const t={code:"code",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(t.p,{children:["Metro config doesn't use ",(0,o.jsx)(t.code,{children:"experimentalImportSupport"})," and ",(0,o.jsx)(t.code,{children:"inlineRequires"})]})}function f(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>c});var o=n(6540);const i={},r=o.createContext(i);function s(e){const t=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.221928ab.js b/assets/js/935f2afb.221928ab.js deleted file mode 100644 index 180691bd..00000000 --- a/assets/js/935f2afb.221928ab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Getting started","href":"/react-native-template-strong/docs/getting-started","docId":"getting-started","unlisted":false},{"type":"category","label":"Structure","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Project","href":"/react-native-template-strong/docs/structure/project","docId":"structure/project","unlisted":false},{"type":"link","label":"Module","href":"/react-native-template-strong/docs/structure/module","docId":"structure/module","unlisted":false}]},{"type":"link","label":"Dependencies and scripts","href":"/react-native-template-strong/docs/dependencies","docId":"dependencies","unlisted":false},{"type":"category","label":"Navigation","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Before starting","href":"/react-native-template-strong/docs/navigation/before-starting","docId":"navigation/before-starting","unlisted":false},{"type":"link","label":"Default options","href":"/react-native-template-strong/docs/navigation/default-options","docId":"navigation/default-options","unlisted":false},{"type":"link","label":"Pages","href":"/react-native-template-strong/docs/navigation/pages","docId":"navigation/pages","unlisted":false},{"type":"link","label":"Roots","href":"/react-native-template-strong/docs/navigation/roots","docId":"navigation/roots","unlisted":false},{"type":"link","label":"Overlays and modals","href":"/react-native-template-strong/docs/navigation/overlays-and-modals","docId":"navigation/overlays-and-modals","unlisted":false},{"type":"link","label":"Hooks","href":"/react-native-template-strong/docs/navigation/hooks","docId":"navigation/hooks","unlisted":false},{"type":"link","label":"Actions","href":"/react-native-template-strong/docs/navigation/actions","docId":"navigation/actions","unlisted":false}]},{"type":"category","label":"Redux","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Before starting","href":"/react-native-template-strong/docs/redux/before-starting","docId":"redux/before-starting","unlisted":false},{"type":"link","label":"Core idea","href":"/react-native-template-strong/docs/redux/core-idea","docId":"redux/core-idea","unlisted":false},{"type":"link","label":"Store","href":"/react-native-template-strong/docs/redux/store","docId":"redux/store","unlisted":false},{"type":"link","label":"State","href":"/react-native-template-strong/docs/redux/state","docId":"redux/state","unlisted":false},{"type":"link","label":"Slice","href":"/react-native-template-strong/docs/redux/slice","docId":"redux/slice","unlisted":false},{"type":"link","label":"AsyncThunk","href":"/react-native-template-strong/docs/redux/async-thunk","docId":"redux/async-thunk","unlisted":false},{"type":"link","label":"Hooks","href":"/react-native-template-strong/docs/redux/hooks","docId":"redux/hooks","unlisted":false}]},{"type":"category","label":"Resources","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Fonts","href":"/react-native-template-strong/docs/resources/fonts","docId":"resources/fonts","unlisted":false},{"type":"link","label":"Images","href":"/react-native-template-strong/docs/resources/images","docId":"resources/images","unlisted":false},{"type":"link","label":"SF Symbols","href":"/react-native-template-strong/docs/resources/sf-symbols","docId":"resources/sf-symbols","unlisted":false},{"type":"link","label":"Vector icons","href":"/react-native-template-strong/docs/resources/vector-icons","docId":"resources/vector-icons","unlisted":false}]},{"type":"category","label":"Themes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Colors","href":"/react-native-template-strong/docs/themes/colors","docId":"themes/colors","unlisted":false},{"type":"link","label":"Native colors","href":"/react-native-template-strong/docs/themes/native-colors","docId":"themes/native-colors","unlisted":false}]},{"type":"category","label":"Styles","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Component styles","href":"/react-native-template-strong/docs/styles/component-styles","docId":"styles/component-styles","unlisted":false},{"type":"link","label":"Common styles","href":"/react-native-template-strong/docs/styles/common-styles","docId":"styles/common-styles","unlisted":false},{"type":"link","label":"Common sizes","href":"/react-native-template-strong/docs/styles/common-sizes","docId":"styles/common-sizes","unlisted":false}]},{"type":"link","label":"Common constants","href":"/react-native-template-strong/docs/common-constants","docId":"common-constants","unlisted":false},{"type":"category","label":"Components","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"PrimaryButton","href":"/react-native-template-strong/docs/components/primary-button","docId":"components/primary-button","unlisted":false},{"type":"link","label":"PrimaryTextInput","href":"/react-native-template-strong/docs/components/primary-text-input","docId":"components/primary-text-input","unlisted":false},{"type":"link","label":"Separator","href":"/react-native-template-strong/docs/components/separator","docId":"components/separator","unlisted":false},{"type":"link","label":"FlatListWrapper","href":"/react-native-template-strong/docs/components/flat-list-wrapper","docId":"components/flat-list-wrapper","unlisted":false},{"type":"link","label":"SectionListWrapper","href":"/react-native-template-strong/docs/components/section-list-wrapper","docId":"components/section-list-wrapper","unlisted":false},{"type":"link","label":"IconPlatform","href":"/react-native-template-strong/docs/components/icon-platform","docId":"components/icon-platform","unlisted":false},{"type":"link","label":"TouchablePlatform","href":"/react-native-template-strong/docs/components/touchable-platform","docId":"components/touchable-platform","unlisted":false},{"type":"link","label":"LoadingComponent","href":"/react-native-template-strong/docs/components/loading-component","docId":"components/loading-component","unlisted":false},{"type":"link","label":"TryAgain","href":"/react-native-template-strong/docs/components/try-again","docId":"components/try-again","unlisted":false},{"type":"link","label":"RadioButton","href":"/react-native-template-strong/docs/components/radio-button","docId":"components/radio-button","unlisted":false},{"type":"link","label":"RadioIcon","href":"/react-native-template-strong/docs/components/radio-icon","docId":"components/radio-icon","unlisted":false},{"type":"link","label":"EmptyView","href":"/react-native-template-strong/docs/components/empty-view","docId":"components/empty-view","unlisted":false},{"type":"link","label":"PhotoTakingButton","href":"/react-native-template-strong/docs/components/photo-taking-button","docId":"components/photo-taking-button","unlisted":false},{"type":"link","label":"ImageCropPickerButton","href":"/react-native-template-strong/docs/components/image-crop-picker-button","docId":"components/image-crop-picker-button","unlisted":false},{"type":"link","label":"DatePickerOverlay","href":"/react-native-template-strong/docs/components/date-picker-overlay","docId":"components/date-picker-overlay","unlisted":false},{"type":"link","label":"ToastOverlay","href":"/react-native-template-strong/docs/components/toast-overlay","docId":"components/toast-overlay","unlisted":false}]},{"type":"category","label":"Pages","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Native splash","href":"/react-native-template-strong/docs/pages/native-splash","docId":"pages/native-splash","unlisted":false},{"type":"link","label":"Splash","href":"/react-native-template-strong/docs/pages/splash","docId":"pages/splash","unlisted":false},{"type":"link","label":"Onboarding","href":"/react-native-template-strong/docs/pages/onboarding","docId":"pages/onboarding","unlisted":false}]},{"type":"category","label":"Helpers","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"calculatePage","href":"/react-native-template-strong/docs/helpers/calculate-page","docId":"helpers/calculate-page","unlisted":false},{"type":"link","label":"colorHelpers","href":"/react-native-template-strong/docs/helpers/color-helpers","docId":"helpers/color-helpers","unlisted":false},{"type":"link","label":"defaultKeyIdExtractor","href":"/react-native-template-strong/docs/helpers/default-key-id-extractor","docId":"helpers/default-key-id-extractor","unlisted":false},{"type":"link","label":"dialogsHelpers","href":"/react-native-template-strong/docs/helpers/dialogs-helpers","docId":"helpers/dialogs-helpers","unlisted":false},{"type":"link","label":"imageHelpers","href":"/react-native-template-strong/docs/helpers/image-helpers","docId":"helpers/image-helpers","unlisted":false},{"type":"link","label":"orientationHelpers","href":"/react-native-template-strong/docs/helpers/orientation-helpers","docId":"helpers/orientation-helpers","unlisted":false},{"type":"link","label":"stringHelpers","href":"/react-native-template-strong/docs/helpers/strings-helpers","docId":"helpers/strings-helpers","unlisted":false},{"type":"link","label":"regexHelpers","href":"/react-native-template-strong/docs/helpers/regex-helpers","docId":"helpers/regex-helpers","unlisted":false},{"type":"link","label":"inAppReviewHelper","href":"/react-native-template-strong/docs/helpers/in-app-review-helper","docId":"helpers/in-app-review-helper","unlisted":false},{"type":"link","label":"netInfoHelpers","href":"/react-native-template-strong/docs/helpers/net-info-helpers","docId":"helpers/net-info-helpers","unlisted":false},{"type":"link","label":"shareHelpers","href":"/react-native-template-strong/docs/helpers/share-helpers","docId":"helpers/share-helpers","unlisted":false}]},{"type":"link","label":"Validations","href":"/react-native-template-strong/docs/validations","docId":"validations","unlisted":false},{"type":"category","label":"Utilities","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"newState","href":"/react-native-template-strong/docs/utils/new-state","docId":"utils/new-state","unlisted":false},{"type":"link","label":"listHandlers","href":"/react-native-template-strong/docs/utils/list-handlers","docId":"utils/list-handlers","unlisted":false},{"type":"link","label":"URL openers","href":"/react-native-template-strong/docs/utils/url-openers","docId":"utils/url-openers","unlisted":false},{"type":"link","label":"serializeQueryParams","href":"/react-native-template-strong/docs/utils/serialize-query-params","docId":"utils/serialize-query-params","unlisted":false}]},{"type":"category","label":"Hooks","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"useFlatListActions","href":"/react-native-template-strong/docs/hooks/use-flat-list-actions","docId":"hooks/use-flat-list-actions","unlisted":false},{"type":"link","label":"useDebounce","href":"/react-native-template-strong/docs/hooks/use-debounce","docId":"hooks/use-debounce","unlisted":false},{"type":"link","label":"useEventRegister","href":"/react-native-template-strong/docs/hooks/use-event-register","docId":"hooks/use-event-register","unlisted":false},{"type":"link","label":"useBackHandler","href":"/react-native-template-strong/docs/hooks/use-back-handler","docId":"hooks/use-back-handler","unlisted":false},{"type":"link","label":"usePrevious","href":"/react-native-template-strong/docs/hooks/use-previous","docId":"hooks/use-previous","unlisted":false},{"type":"link","label":"useWhyDidYouUpdate","href":"/react-native-template-strong/docs/hooks/use-why-did-you-update","docId":"hooks/use-why-did-you-update","unlisted":false}]},{"type":"category","label":"Localization","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Translations","href":"/react-native-template-strong/docs/localisation/translations","docId":"localisation/translations","unlisted":false},{"type":"link","label":"Add language","href":"/react-native-template-strong/docs/localisation/add-language","docId":"localisation/add-language","unlisted":false},{"type":"link","label":"Change language","href":"/react-native-template-strong/docs/localisation/change-language","docId":"localisation/change-language","unlisted":false},{"type":"link","label":"Date formatter","href":"/react-native-template-strong/docs/localisation/date-formatter","docId":"localisation/date-formatter","unlisted":false},{"type":"link","label":"Intl formatter","href":"/react-native-template-strong/docs/localisation/intl-formatter","docId":"localisation/intl-formatter","unlisted":false}]},{"type":"link","label":"Environments","href":"/react-native-template-strong/docs/environments","docId":"environments","unlisted":false},{"type":"link","label":"API","href":"/react-native-template-strong/docs/api","docId":"api","unlisted":false},{"type":"category","label":"Testing","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Jest","href":"/react-native-template-strong/docs/testing/jest","docId":"testing/jest","unlisted":false},{"type":"link","label":"Storybook","href":"/react-native-template-strong/docs/testing/storybook","docId":"testing/storybook","unlisted":false},{"type":"link","label":"Detox","href":"/react-native-template-strong/docs/testing/detox","docId":"testing/detox","unlisted":false}]},{"type":"link","label":"Types","href":"/react-native-template-strong/docs/types","docId":"types","unlisted":false},{"type":"link","label":"Patches","href":"/react-native-template-strong/docs/patches","docId":"patches","unlisted":false},{"type":"link","label":"App icon","href":"/react-native-template-strong/docs/app-icon","docId":"app-icon","unlisted":false},{"type":"link","label":"App release","href":"/react-native-template-strong/docs/app-release","docId":"app-release","unlisted":false},{"type":"category","label":"Configs","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"React Native config","href":"/react-native-template-strong/docs/configs/rn-config","docId":"configs/rn-config","unlisted":false},{"type":"link","label":"TypeScript config","href":"/react-native-template-strong/docs/configs/ts-config","docId":"configs/ts-config","unlisted":false},{"type":"link","label":"ESLint config","href":"/react-native-template-strong/docs/configs/eslint-config","docId":"configs/eslint-config","unlisted":false},{"type":"link","label":"Prettier config","href":"/react-native-template-strong/docs/configs/prettier-config","docId":"configs/prettier-config","unlisted":false},{"type":"link","label":"Metro config","href":"/react-native-template-strong/docs/configs/metro-config","docId":"configs/metro-config","unlisted":false},{"type":"link","label":"Jest config","href":"/react-native-template-strong/docs/configs/jest-config","docId":"configs/jest-config","unlisted":false},{"type":"link","label":"Detox config","href":"/react-native-template-strong/docs/configs/detox-config","docId":"configs/detox-config","unlisted":false},{"type":"link","label":"Babel config","href":"/react-native-template-strong/docs/configs/babel-config","docId":"configs/babel-config","unlisted":false}]},{"type":"category","label":"Internals","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"iOS internals","href":"/react-native-template-strong/docs/internals/ios","docId":"internals/ios","unlisted":false},{"type":"link","label":"Android internals","href":"/react-native-template-strong/docs/internals/android","docId":"internals/android","unlisted":false}]},{"type":"link","label":"Checking on updates","href":"/react-native-template-strong/docs/checking-updates","docId":"checking-updates","unlisted":false}]},"docs":{"api":{"id":"api","title":"API","description":"Content","sidebar":"tutorialSidebar"},"app-icon":{"id":"app-icon","title":"App icon","description":"Content","sidebar":"tutorialSidebar"},"app-release":{"id":"app-release","title":"App release","description":"Preparations","sidebar":"tutorialSidebar"},"checking-updates":{"id":"checking-updates","title":"Checking on updates","description":"React Native Template Strong","sidebar":"tutorialSidebar"},"common-constants":{"id":"common-constants","title":"Common constants","description":"Content","sidebar":"tutorialSidebar"},"components/date-picker-overlay":{"id":"components/date-picker-overlay","title":"DatePickerOverlay","description":"Content","sidebar":"tutorialSidebar"},"components/empty-view":{"id":"components/empty-view","title":"EmptyView","description":"Content","sidebar":"tutorialSidebar"},"components/flat-list-wrapper":{"id":"components/flat-list-wrapper","title":"FlatListWrapper","description":"Content","sidebar":"tutorialSidebar"},"components/icon-platform":{"id":"components/icon-platform","title":"IconPlatform","description":"Content","sidebar":"tutorialSidebar"},"components/image-crop-picker-button":{"id":"components/image-crop-picker-button","title":"ImageCropPickerButton","description":"Content","sidebar":"tutorialSidebar"},"components/loading-component":{"id":"components/loading-component","title":"LoadingComponent","description":"Content","sidebar":"tutorialSidebar"},"components/photo-taking-button":{"id":"components/photo-taking-button","title":"PhotoTakingButton","description":"Content","sidebar":"tutorialSidebar"},"components/primary-button":{"id":"components/primary-button","title":"PrimaryButton","description":"Content","sidebar":"tutorialSidebar"},"components/primary-text-input":{"id":"components/primary-text-input","title":"PrimaryTextInput","description":"Content","sidebar":"tutorialSidebar"},"components/radio-button":{"id":"components/radio-button","title":"RadioButton","description":"Content","sidebar":"tutorialSidebar"},"components/radio-icon":{"id":"components/radio-icon","title":"RadioIcon","description":"Content","sidebar":"tutorialSidebar"},"components/section-list-wrapper":{"id":"components/section-list-wrapper","title":"SectionListWrapper","description":"Content","sidebar":"tutorialSidebar"},"components/separator":{"id":"components/separator","title":"Separator","description":"Content","sidebar":"tutorialSidebar"},"components/toast-overlay":{"id":"components/toast-overlay","title":"ToastOverlay","description":"Content","sidebar":"tutorialSidebar"},"components/touchable-platform":{"id":"components/touchable-platform","title":"TouchablePlatform","description":"Content","sidebar":"tutorialSidebar"},"components/try-again":{"id":"components/try-again","title":"TryAgain","description":"Content","sidebar":"tutorialSidebar"},"configs/babel-config":{"id":"configs/babel-config","title":"Babel config","description":"Babel config utilizes metro-react-native-babel-preset","sidebar":"tutorialSidebar"},"configs/detox-config":{"id":"configs/detox-config","title":"Detox config","description":"Detox config is configured to work with TypeScript.","sidebar":"tutorialSidebar"},"configs/eslint-config":{"id":"configs/eslint-config","title":"ESLint config","description":"ESLint utilizes eslint-config-react-strong with its plugins and rules.","sidebar":"tutorialSidebar"},"configs/jest-config":{"id":"configs/jest-config","title":"Jest config","description":"Jest utilizes eslint-config-react-strong","sidebar":"tutorialSidebar"},"configs/metro-config":{"id":"configs/metro-config","title":"Metro config","description":"Metro config doesn\'t use experimentalImportSupport and inlineRequires","sidebar":"tutorialSidebar"},"configs/prettier-config":{"id":"configs/prettier-config","title":"Prettier config","description":"Prettier defines next obvious rules:","sidebar":"tutorialSidebar"},"configs/rn-config":{"id":"configs/rn-config","title":"React Native config","description":"React Native config only defines the assets folder \\"./resources/fonts\\" to properly link newly added fonts","sidebar":"tutorialSidebar"},"configs/ts-config":{"id":"configs/ts-config","title":"TypeScript config","description":"TypeScript config is strict as ESLint rules and relies on config from eslint-config-react-strong\'s TypeScript Config","sidebar":"tutorialSidebar"},"dependencies":{"id":"dependencies","title":"Dependencies and scripts","description":"Dependencies","sidebar":"tutorialSidebar"},"environments":{"id":"environments","title":"Environments","description":"Work with environments made possible by react-native-config.","sidebar":"tutorialSidebar"},"getting-started":{"id":"getting-started","title":"Getting started","description":"Before you start","sidebar":"tutorialSidebar"},"helpers/calculate-page":{"id":"helpers/calculate-page","title":"calculatePage","description":"Content","sidebar":"tutorialSidebar"},"helpers/color-helpers":{"id":"helpers/color-helpers","title":"colorHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/default-key-id-extractor":{"id":"helpers/default-key-id-extractor","title":"defaultKeyIdExtractor","description":"Content","sidebar":"tutorialSidebar"},"helpers/dialogs-helpers":{"id":"helpers/dialogs-helpers","title":"dialogsHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/image-helpers":{"id":"helpers/image-helpers","title":"imageHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/in-app-review-helper":{"id":"helpers/in-app-review-helper","title":"inAppReviewHelper","description":"Content","sidebar":"tutorialSidebar"},"helpers/net-info-helpers":{"id":"helpers/net-info-helpers","title":"netInfoHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/orientation-helpers":{"id":"helpers/orientation-helpers","title":"orientationHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/regex-helpers":{"id":"helpers/regex-helpers","title":"regexHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/share-helpers":{"id":"helpers/share-helpers","title":"shareHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/strings-helpers":{"id":"helpers/strings-helpers","title":"stringHelpers","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-back-handler":{"id":"hooks/use-back-handler","title":"useBackHandler","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-debounce":{"id":"hooks/use-debounce","title":"useDebounce","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-event-register":{"id":"hooks/use-event-register","title":"useEventRegister","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-flat-list-actions":{"id":"hooks/use-flat-list-actions","title":"useFlatListActions","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-previous":{"id":"hooks/use-previous","title":"usePrevious","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-why-did-you-update":{"id":"hooks/use-why-did-you-update","title":"useWhyDidYouUpdate","description":"Content","sidebar":"tutorialSidebar"},"internals/android":{"id":"internals/android","title":"Android internals","description":"Hermes","sidebar":"tutorialSidebar"},"internals/ios":{"id":"internals/ios","title":"iOS internals","description":"Hermes","sidebar":"tutorialSidebar"},"localisation/add-language":{"id":"localisation/add-language","title":"Add language","description":"Description","sidebar":"tutorialSidebar"},"localisation/change-language":{"id":"localisation/change-language","title":"Change language","description":"There are two ways you can change language of your app.","sidebar":"tutorialSidebar"},"localisation/date-formatter":{"id":"localisation/date-formatter","title":"Date formatter","description":"Content","sidebar":"tutorialSidebar"},"localisation/intl-formatter":{"id":"localisation/intl-formatter","title":"Intl formatter","description":"Content","sidebar":"tutorialSidebar"},"localisation/translations":{"id":"localisation/translations","title":"Translations","description":"Localisation is made possible by react-native-localization.","sidebar":"tutorialSidebar"},"navigation/actions":{"id":"navigation/actions","title":"Actions","description":"Content","sidebar":"tutorialSidebar"},"navigation/before-starting":{"id":"navigation/before-starting","title":"Before starting","description":"Content","sidebar":"tutorialSidebar"},"navigation/default-options":{"id":"navigation/default-options","title":"Default options","description":"Content","sidebar":"tutorialSidebar"},"navigation/hooks":{"id":"navigation/hooks","title":"Hooks","description":"Content","sidebar":"tutorialSidebar"},"navigation/overlays-and-modals":{"id":"navigation/overlays-and-modals","title":"Overlays and modals","description":"Content","sidebar":"tutorialSidebar"},"navigation/pages":{"id":"navigation/pages","title":"Pages","description":"Content","sidebar":"tutorialSidebar"},"navigation/roots":{"id":"navigation/roots","title":"Roots","description":"Content","sidebar":"tutorialSidebar"},"pages/native-splash":{"id":"pages/native-splash","title":"Native splash","description":"Content","sidebar":"tutorialSidebar"},"pages/onboarding":{"id":"pages/onboarding","title":"Onboarding","description":"Content","sidebar":"tutorialSidebar"},"pages/splash":{"id":"pages/splash","title":"Splash","description":"Content","sidebar":"tutorialSidebar"},"patches":{"id":"patches","title":"Patches","description":"Content","sidebar":"tutorialSidebar"},"redux/async-thunk":{"id":"redux/async-thunk","title":"AsyncThunk","description":"Content","sidebar":"tutorialSidebar"},"redux/before-starting":{"id":"redux/before-starting","title":"Before starting","description":"Content","sidebar":"tutorialSidebar"},"redux/core-idea":{"id":"redux/core-idea","title":"Core idea","description":"Content","sidebar":"tutorialSidebar"},"redux/hooks":{"id":"redux/hooks","title":"Hooks","description":"Content","sidebar":"tutorialSidebar"},"redux/slice":{"id":"redux/slice","title":"Slice","description":"Content","sidebar":"tutorialSidebar"},"redux/state":{"id":"redux/state","title":"State","description":"Content","sidebar":"tutorialSidebar"},"redux/store":{"id":"redux/store","title":"Store","description":"Content","sidebar":"tutorialSidebar"},"resources/fonts":{"id":"resources/fonts","title":"Fonts","description":"Content","sidebar":"tutorialSidebar"},"resources/images":{"id":"resources/images","title":"Images","description":"Before adding images","sidebar":"tutorialSidebar"},"resources/sf-symbols":{"id":"resources/sf-symbols","title":"SF Symbols","description":"Content","sidebar":"tutorialSidebar"},"resources/vector-icons":{"id":"resources/vector-icons","title":"Vector icons","description":"Content","sidebar":"tutorialSidebar"},"structure/module":{"id":"structure/module","title":"Module","description":"Content","sidebar":"tutorialSidebar"},"structure/project":{"id":"structure/project","title":"Project","description":"Content","sidebar":"tutorialSidebar"},"styles/common-sizes":{"id":"styles/common-sizes","title":"Common sizes","description":"Content","sidebar":"tutorialSidebar"},"styles/common-styles":{"id":"styles/common-styles","title":"Common styles","description":"Content","sidebar":"tutorialSidebar"},"styles/component-styles":{"id":"styles/component-styles","title":"Component styles","description":"Content","sidebar":"tutorialSidebar"},"testing/detox":{"id":"testing/detox","title":"Detox","description":"Content","sidebar":"tutorialSidebar"},"testing/jest":{"id":"testing/jest","title":"Jest","description":"Content","sidebar":"tutorialSidebar"},"testing/storybook":{"id":"testing/storybook","title":"Storybook","description":"Content","sidebar":"tutorialSidebar"},"themes/colors":{"id":"themes/colors","title":"Colors","description":"Content","sidebar":"tutorialSidebar"},"themes/native-colors":{"id":"themes/native-colors","title":"Native colors","description":"Content","sidebar":"tutorialSidebar"},"types":{"id":"types","title":"Types","description":"Own types, interfaces and enums","sidebar":"tutorialSidebar"},"utils/list-handlers":{"id":"utils/list-handlers","title":"listHandlers","description":"commonListFulfilledHandler","sidebar":"tutorialSidebar"},"utils/new-state":{"id":"utils/new-state","title":"newState","description":"Used primarily for merging redux state objects.","sidebar":"tutorialSidebar"},"utils/serialize-query-params":{"id":"utils/serialize-query-params","title":"serializeQueryParams","description":"","sidebar":"tutorialSidebar"},"utils/url-openers":{"id":"utils/url-openers","title":"URL openers","description":"PhoneUrl","sidebar":"tutorialSidebar"},"validations":{"id":"validations","title":"Validations","description":"Content","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/94173908.51a4d942.js b/assets/js/94173908.51a4d942.js deleted file mode 100644 index 9aa9861c..00000000 --- a/assets/js/94173908.51a4d942.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6765],{7781:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var s=t(5893),r=t(1151);const o={sidebar_position:1,title:"Before starting"},i=void 0,a={id:"redux/before-starting",title:"Before starting",description:"Content",source:"@site/docs/redux/before-starting.md",sourceDirName:"redux",slug:"/redux/before-starting",permalink:"/react-native-template-strong/docs/redux/before-starting",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/before-starting.md",tags:[],version:"current",lastUpdatedAt:1689098240,formattedLastUpdatedAt:"Jul 11, 2023",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Before starting"},sidebar:"tutorialSidebar",previous:{title:"Actions",permalink:"/react-native-template-strong/docs/navigation/actions"},next:{title:"Core idea",permalink:"/react-native-template-strong/docs/redux/core-idea"}},c={},d=[{value:"Content",id:"content",level:2},{value:"If you don't want to use Redux",id:"if-you-dont-want-to-use-redux",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(n.p,{children:["First read about ",(0,s.jsx)(n.a,{href:"https://redux.js.org/introduction/getting-started",children:"Redux"})," and ",(0,s.jsx)(n.a,{href:"https://redux-toolkit.js.org/introduction/getting-started",children:"Redux ToolKit"}),", about what it can do, what they offer and then come back here to move on."]}),"\n",(0,s.jsx)(n.p,{children:"It's important to know about them because they are core components of this template and knowing them can save your time\nand eliminate many questions."}),"\n",(0,s.jsx)(n.h2,{id:"if-you-dont-want-to-use-redux",children:"If you don't want to use Redux"}),"\n",(0,s.jsx)(n.p,{children:"You can simply remove it with next following steps:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Remove it from dependencies and devDependencies:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-shell",children:"npm uninstall @reduxjs/toolkit react-redux redux-persist @types/react-redux\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Delete the ",(0,s.jsx)(n.code,{children:"src/core/store"})," folder"]}),"\n",(0,s.jsxs)(n.li,{children:["Remove Redux usage from ",(0,s.jsx)(n.code,{children:"registerNavigationComponent"})]}),"\n",(0,s.jsxs)(n.li,{children:["Change ",(0,s.jsx)(n.code,{children:"Splash"})," screen navigation component initialization:"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"From:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:" registerNavigationComponent(Pages.splash, Splash, true);\n"})}),"\n",(0,s.jsx)(n.p,{children:"To:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:" registerNavigationComponent(Pages.splash, Splash);\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Remove usage of ",(0,s.jsx)(n.code,{children:"useAppSelector"})," in ",(0,s.jsx)(n.code,{children:"Splash"})," (but you have to manage now ",(0,s.jsx)(n.code,{children:"Onboarding"})," logic your way):"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"export const Splash: NavigationFunctionComponent = () => {\n useEffect(() => {\n setTabsRoot();\n }, []);\n\n return{title} \n{description} \n;\n};\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Remove unneeded interfaces from ",(0,s.jsx)(n.code,{children:"src/types/index.ts"}),":"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"export interface RehydrateAppAction extends RehydrateAction {\n payload?: RootState;\n}\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Remove unneeded ",(0,s.jsx)(n.code,{children:"handlePromiseResult"})," from ",(0,s.jsx)(n.code,{children:"src/common/validations/errorValidations.ts"}),":"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"export function handlePromiseResult(\n promiseAction: Promise ,\n successMessage?: string,\n successAction?: () => void,\n processError?: (error: Error) => IErrorResult,\n setError?: (errorMessage: string) => void,\n) {\n promiseAction\n .then(unwrapResult)\n .then(() => {\n successMessage && showToast({text: successMessage});\n successAction && successAction();\n })\n .catch((handledError: Error) => {\n processError && handleErrorPostProcessing(processError(handledError), setError);\n });\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["That's it, you successfully removed ",(0,s.jsx)(n.code,{children:"redux"})," from project."]})]})}function u(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>a,a:()=>i});var s=t(7294);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/94173908.5bf13525.js b/assets/js/94173908.5bf13525.js new file mode 100644 index 00000000..bcf6c03b --- /dev/null +++ b/assets/js/94173908.5bf13525.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8748],{5089:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var s=t(4848),r=t(8453);const o={sidebar_position:1,title:"Before starting"},i=void 0,a={id:"redux/before-starting",title:"Before starting",description:"Content",source:"@site/docs/redux/before-starting.md",sourceDirName:"redux",slug:"/redux/before-starting",permalink:"/react-native-template-strong/docs/redux/before-starting",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/before-starting.md",tags:[],version:"current",lastUpdatedAt:168909824e4,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Before starting"},sidebar:"tutorialSidebar",previous:{title:"Actions",permalink:"/react-native-template-strong/docs/navigation/actions"},next:{title:"Core idea",permalink:"/react-native-template-strong/docs/redux/core-idea"}},c={},d=[{value:"Content",id:"content",level:2},{value:"If you don't want to use Redux",id:"if-you-dont-want-to-use-redux",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(n.p,{children:["First read about ",(0,s.jsx)(n.a,{href:"https://redux.js.org/introduction/getting-started",children:"Redux"})," and ",(0,s.jsx)(n.a,{href:"https://redux-toolkit.js.org/introduction/getting-started",children:"Redux ToolKit"}),", about what it can do, what they offer and then come back here to move on."]}),"\n",(0,s.jsx)(n.p,{children:"It's important to know about them because they are core components of this template and knowing them can save your time\nand eliminate many questions."}),"\n",(0,s.jsx)(n.h2,{id:"if-you-dont-want-to-use-redux",children:"If you don't want to use Redux"}),"\n",(0,s.jsx)(n.p,{children:"You can simply remove it with next following steps:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Remove it from dependencies and devDependencies:"}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-shell",children:"npm uninstall @reduxjs/toolkit react-redux redux-persist @types/react-redux\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Delete the ",(0,s.jsx)(n.code,{children:"src/core/store"})," folder"]}),"\n",(0,s.jsxs)(n.li,{children:["Remove Redux usage from ",(0,s.jsx)(n.code,{children:"registerNavigationComponent"})]}),"\n",(0,s.jsxs)(n.li,{children:["Change ",(0,s.jsx)(n.code,{children:"Splash"})," screen navigation component initialization:"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"From:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:" registerNavigationComponent(Pages.splash, Splash, true);\n"})}),"\n",(0,s.jsx)(n.p,{children:"To:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:" registerNavigationComponent(Pages.splash, Splash);\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Remove usage of ",(0,s.jsx)(n.code,{children:"useAppSelector"})," in ",(0,s.jsx)(n.code,{children:"Splash"})," (but you have to manage now ",(0,s.jsx)(n.code,{children:"Onboarding"})," logic your way):"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"export const Splash: NavigationFunctionComponent = () => {\n useEffect(() => {\n setTabsRoot();\n }, []);\n\n return ;\n};\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Remove unneeded interfaces from ",(0,s.jsx)(n.code,{children:"src/types/index.ts"}),":"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"export interface RehydrateAppAction extends RehydrateAction {\n payload?: RootState;\n}\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Remove unneeded ",(0,s.jsx)(n.code,{children:"handlePromiseResult"})," from ",(0,s.jsx)(n.code,{children:"src/common/validations/errorValidations.ts"}),":"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"export function handlePromiseResult(\n promiseAction: Promise ,\n successMessage?: string,\n successAction?: () => void,\n processError?: (error: Error) => IErrorResult,\n setError?: (errorMessage: string) => void,\n) {\n promiseAction\n .then(unwrapResult)\n .then(() => {\n successMessage && showToast({text: successMessage});\n successAction && successAction();\n })\n .catch((handledError: Error) => {\n processError && handleErrorPostProcessing(processError(handledError), setError);\n });\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["That's it, you successfully removed ",(0,s.jsx)(n.code,{children:"redux"})," from project."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var s=t(6540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1426.9ae98cef.js b/assets/js/9462.b5f9db17.js similarity index 81% rename from assets/js/1426.9ae98cef.js rename to assets/js/9462.b5f9db17.js index 1c17fc15..46f87365 100644 --- a/assets/js/1426.9ae98cef.js +++ b/assets/js/9462.b5f9db17.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1426],{1426:(e,t,r)=>{function n(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;i pn});var a=function(){};function c(e){var t=e.item,r=e.items;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(s){u=!0,o=s}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r e.length)&&(t=e.length);for(var r=0,n=new Array(t);r =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t =3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(p(r),[{headers:a}]))}else e.apply(void 0,[t].concat(p(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&i("clickedObjectIDsAfterSearch",g(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&i("clickedObjectIDs",g(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n 0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&i("convertedObjectIDsAfterSearch",g(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&i("convertedObjectIDs",g(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n 0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&t.reduce((function(e,t){var r=t.items,n=d(t,f);return[].concat(p(e),p(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n 0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function S(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function j(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function E(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r 0&&C({onItemsChange:o,items:r,insights:f,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;s("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:f}}),r((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&l({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Selected"},c({item:t,items:m.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&u({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Active"},c({item:t,items:m.current}))]})}))},onStateChange:function(e){var t=e.state;p({state:t})},__autocomplete_pluginOptions:e}}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==_(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t,r){var n,o=t.initialState;return{getState:function(){return o},dispatch:function(n,i){var a=function(e){for(var t=1;t e.length)&&(t=e.length);for(var r=0,n=new Array(t);r 0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(V++),plugins:o,initialState:X({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(Q(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:a,onResolve:a};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=$($({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return L(e)})).then((function(e){return e.map((function(e){return X(X({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:X({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t e.length)&&(t=e.length);for(var r=0,n=new Array(t);r =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ie,De,Ae,ke=null,xe=(Ie=-1,De=-1,Ae=void 0,function(e){var t=++Ie;return Promise.resolve(e).then((function(e){return Ae&&t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Me=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}var Fe=["props","refresh","store"],Ue=["inputElement","formElement","panelElement"],Be=["inputElement"],Ve=["inputElement","maxLength"],Ke=["sourceIndex"],$e=["sourceIndex"],Je=["item","source","sourceIndex"];function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ge(e){var t=e.props,r=e.refresh,n=e.store,o=Ze(e,Fe),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return We({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},Ze(e,Ue))},getRootProps:function(e){return We({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return We({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},Ze(e,Be))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,Ke);return We({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function c(e){(t.openOnFocus||Boolean(n.getState().query))&&Ce(We({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var l=e||{},u=(l.inputElement,l.maxLength),s=void 0===u?512:u,f=Ze(l,Ve),m=ge(n.getState()),p=function(e){return Boolean(e&&e.match(Me))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),v=null!=m&&m.itemUrl&&!p?"go":"search";return We({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){Ce(We({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=Le(e,_e);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=ge(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,l=e.source;l.onActive(qe({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:l,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?Ce(qe({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=ge(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,m=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:u,state:o.getState()});Ce(qe({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(We({event:e,props:t,refresh:r,store:n},o))},onFocus:c,onBlur:a,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||c(r)}},f)},getPanelProps:function(e){return We({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,$e);return We({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,l=e.sourceIndex,u=Ze(e,Je);return We({id:"".concat(i(t.id,l),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=ge(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(We({event:e,item:i,itemInputValue:c,itemUrl:l,refresh:r,source:u,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():Ce(We({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(We({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},u)}}}var Xe=[{segment:"autocomplete-core",version:"1.9.3"}];function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t =r?null===n?null:0:o}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t e.length)&&(t=e.length);for(var r=0,n=new Array(t);r =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kt(e){var t=e.translations,r=void 0===t?{}:t,n=At(e,Pt),o=r.noResultsText,i=void 0===o?"No results for":o,a=r.suggestedQueryText,c=void 0===a?"Try searching for":a,l=r.reportMissingResultsText,u=void 0===l?"Believe this query should return results?":l,s=r.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,m=n.state.context.searchSuggestions;return yt.createElement("div",{className:"DocSearch-NoResults"},yt.createElement("div",{className:"DocSearch-Screen-Icon"},yt.createElement(Et,null)),yt.createElement("p",{className:"DocSearch-Title"},i,' "',yt.createElement("strong",null,n.state.query),'"'),m&&m.length>0&&yt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},yt.createElement("p",{className:"DocSearch-Help"},c,":"),yt.createElement("ul",null,m.slice(0,3).reduce((function(e,t){return[].concat(It(e),[yt.createElement("li",{key:t},yt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){n.setQuery(t.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},t))])}),[]))),n.getMissingResultsUrl&&yt.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),yt.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var xt=function(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ct(e){switch(e.type){case"lvl1":return yt.createElement(xt,null);case"content":return yt.createElement(_t,null);default:return yt.createElement(Nt,null)}}function Nt(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function _t(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Tt(){return yt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},yt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),yt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var qt=["hit","attribute","tagName"];function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ft(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Ut(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,i=Ht(e,qt);return(0,yt.createElement)(o,Lt(Lt({},i),{},{dangerouslySetInnerHTML:{__html:Ft(t,"_snippetResult.".concat(r,".value"))||Ft(t,r)}}))}function Bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r |<\/mark>)/g,Wt=RegExp(zt.source);function Qt(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((n.__docsearch_parent?null===(t=n.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(r=e._highlightResult)||void 0===r||null===(r=r.hierarchy)||void 0===r?void 0:r.lvl0)||{}).value;return o&&Wt.test(o)?o.replace(zt,""):o}function Zt(){return Zt=Object.assign||function(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function or(e){var t=e.translations,r=void 0===t?{}:t,n=nr(e,tr),o=r.recentSearchesTitle,i=void 0===o?"Recent":o,a=r.noRecentSearchesText,c=void 0===a?"No recent searches":a,l=r.saveRecentSearchButtonTitle,u=void 0===l?"Save this search":l,s=r.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,m=r.favoriteSearchesTitle,p=void 0===m?"Favorite":m,v=r.removeFavoriteSearchButtonTitle,d=void 0===v?"Remove this search from favorites":v;return"idle"===n.state.status&&!1===n.hasCollections?n.disableUserPersonalization?null:yt.createElement("div",{className:"DocSearch-StartScreen"},yt.createElement("p",{className:"DocSearch-Help"},c)):!1===n.hasCollections?null:yt.createElement("div",{className:"DocSearch-Dropdown-Container"},yt.createElement($t,rr({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Xt,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,o=e.runDeleteTransition;return yt.createElement(yt.Fragment,null,yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.add(t),n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(Yt,null))),yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(er,null))))}})),yt.createElement($t,rr({},n,{title:p,collection:n.state.collections[1],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Yt,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.remove(t),n.refresh()}))}},yt.createElement(er,null)))}})))}var ir=["translations"];function ar(){return ar=Object.assign||function(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var lr=yt.memo((function(e){var t=e.translations,r=void 0===t?{}:t,n=cr(e,ir);if("error"===n.state.status)return yt.createElement(wt,{translations:null==r?void 0:r.errorScreen});var o=n.state.collections.some((function(e){return e.items.length>0}));return n.state.query?!1===o?yt.createElement(kt,ar({},n,{translations:null==r?void 0:r.noResultsScreen})):yt.createElement(Gt,n):yt.createElement(or,ar({},n,{hasCollections:o,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function ur(){return yt.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},yt.createElement("g",{fill:"none",fillRule:"evenodd"},yt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},yt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),yt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},yt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var sr=r(830),fr=["translations"];function mr(){return mr=Object.assign||function(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vr(e){var t=e.translations,r=void 0===t?{}:t,n=pr(e,fr),o=r.resetButtonTitle,i=void 0===o?"Clear the query":o,a=r.resetButtonAriaLabel,c=void 0===a?"Clear the query":a,l=r.cancelButtonText,u=void 0===l?"Cancel":l,s=r.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,m=n.getFormProps({inputElement:n.inputRef.current}).onReset;return yt.useEffect((function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()}),[n.autoFocus,n.inputRef]),yt.useEffect((function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()}),[n.isFromSelection,n.inputRef]),yt.createElement(yt.Fragment,null,yt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:m},yt.createElement("label",mr({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),yt.createElement(sr.W,null)),yt.createElement("div",{className:"DocSearch-LoadingIndicator"},yt.createElement(ur,null)),yt.createElement("input",mr({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:ht}))),yt.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},yt.createElement(er,null))),yt.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:n.onClose},u))}var dr=["_highlightResult","_snippetResult"];function yr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function br(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=hr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,yr(t,dr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function gr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get:(t,r,n={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Or(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Or({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Or({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Or({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Or({caches:t}).clear()))}}function Sr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function jr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function wr(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Er(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Pr="4.22.0",Ir={WithinQueryParameters:0,WithinHeaders:1};function Dr(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ar={Read:1,Write:2,Any:3},kr={Up:1,Down:2,Timeouted:3},xr=12e4;function Cr(e,t=kr.Up){return{...e,status:t,lastUpdate:Date.now()}}function Nr(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ar.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ar.Any}}const _r={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function Tr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Cr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===kr.Up||Date.now()-e.lastUpdate>xr}(e))),n=e.filter((e=>function(e){return e.status===kr.Timeouted&&Date.now()-e.lastUpdate<=xr}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>Nr(e))):t}}))}const qr=(e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e);function Rr(e,t,r,n){const o=[],i=function(e,t){if(e.method===_r.Get||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,l=r.method!==_r.Get?{}:{...r.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let s=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Fr(o)};const p={data:i,headers:a,method:c,url:Mr(m,r.path,u),connectTimeout:l(s,e.timeouts.connect),responseTimeout:l(s,n.timeout)},v=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=v(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",Ur(n)),e.hostsCache.set(m,Cr(m,r.isTimedOut?kr.Timeouted:kr.Down))]).then((()=>f(t,l)))},onFail(e){throw v(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Fr(o))}};return e.requester.send(p).then((e=>qr(e,d)))};return Tr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Lr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Mr(e,t,r){const n=Hr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Hr(e){return Object.keys(e).map((t=>{return Er("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Fr(e){return e.map((e=>Ur(e)))}function Ur(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Br=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Ir.WithinHeaders?n:{},queryParameters:()=>e===Ir.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Ir.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:l,queryParameters:u,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:u,hosts:l.map((e=>Nr(e))),read(e,t){const r=Dr(t,f.timeouts.read),n=()=>Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Write))),e,Dr(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ar.Read},{url:`${t}.algolia.net`,accept:Ar.Write}].concat(jr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))};return wr(o,e.methods)},Vr=e=>(t,r)=>t.method===_r.Get?e.transporter.read(t,r):e.transporter.write(t,r),Kr=e=>(t,r={})=>wr({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),$r=e=>(t,r)=>{const n=t.map((e=>({...e,params:Hr(e.params||{})})));return e.transporter.read({method:_r.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},Jr=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return Kr(e)(t.indexName,{methods:{searchForFacetValues:Qr}}).searchForFacetValues(n,o,{...r,...i})}))),zr=e=>(t,r,n)=>e.transporter.read({method:_r.Post,path:Er("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Wr=e=>(t,r)=>e.transporter.read({method:_r.Post,path:Er("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),Qr=e=>(t,r,n)=>e.transporter.read({method:_r.Post,path:Er("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Zr={Debug:1,Info:2,Error:3};function Gr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=Zr.Error,{debug:(e,t)=>(Zr.Debug>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Zr.Info>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Sr(),requestsCache:Sr({serializable:!1}),hostsCache:Or({caches:[gr({key:`${Pr}-${e}`}),Sr()]}),userAgent:Lr(Pr).add({segment:"Browser",version:"lite"}),authMode:Ir.WithinQueryParameters};var o;return Br({...n,...r,methods:{search:$r,searchForFacetValues:Jr,multipleQueries:$r,multipleSearchForFacetValues:Jr,customRequest:Vr,initIndex:e=>t=>Kr(e)(t,{methods:{search:Wr,searchForFacetValues:Qr,findAnswers:zr}})}})}Gr.version=Pr;const Xr=Gr;var Yr="3.5.2";function en(){}function tn(e){return e}function rn(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function nn(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}var on=["footer","searchBox"];function an(){return an=Object.assign||function(e){for(var t=1;t e.length)&&(t=e.length);for(var r=0,n=new Array(t);r =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function pn(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,l=e.onClose,u=void 0===l?en:l,s=e.transformItems,f=void 0===s?tn:s,m=e.hitComponent,p=void 0===m?St:m,v=e.resultsFooterComponent,d=void 0===v?function(){return null}:v,y=e.navigator,h=e.initialScrollY,b=void 0===h?0:h,g=e.transformSearchClient,O=void 0===g?tn:g,S=e.disableUserPersonalization,j=void 0!==S&&S,w=e.initialQuery,E=void 0===w?"":w,P=e.translations,I=void 0===P?{}:P,D=e.getMissingResultsUrl,A=e.insights,k=void 0!==A&&A,x=I.footer,C=I.searchBox,N=mn(I,on),_=sn(yt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=_[0],q=_[1],R=yt.useRef(null),L=yt.useRef(null),M=yt.useRef(null),H=yt.useRef(null),F=yt.useRef(null),U=yt.useRef(10),B=yt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,ht):"").current,V=yt.useRef(E||B).current,K=function(e,t,r){return yt.useMemo((function(){var n=Xr(e,t);return n.addAlgoliaAgent("docsearch",Yr),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",Yr),r(n)}),[e,t,r])}(t,r,O),$=yt.useRef(br({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,J=yt.useRef(br({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:0===$.getAll().length?7:4})).current,z=yt.useCallback((function(e){if(!j){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===$.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&J.add(t)}}),[$,J,j]),W=yt.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[T.context.algoliaInsightsPlugin]),Q=yt.useMemo((function(){return dt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:k,navigator:y,onStateChange:function(e){q(e.state)},getSources:function(e){var o=e.query,i=e.state,l=e.setContext,s=e.setStatus;if(!o)return j?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return J.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return $.getAll()}}];var m=Boolean(k);return K.search([{query:o,indexName:n,params:ln({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(U.current),"hierarchy.lvl2:".concat(U.current),"hierarchy.lvl3:".concat(U.current),"hierarchy.lvl4:".concat(U.current),"hierarchy.lvl5:".concat(U.current),"hierarchy.lvl6:".concat(U.current),"content:".concat(U.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:m},a)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results[0],a=o.hits,s=o.nbHits,p=nn(a,(function(e){return Qt(e)}),c);i.context.searchSuggestions.length 0&&(X(),F.current&&F.current.focus())}),[V,X]),yt.useEffect((function(){function e(){if(L.current){var e=.01*window.innerHeight;L.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),yt.createElement("div",an({ref:R},G({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&u()}}),yt.createElement("div",{className:"DocSearch-Modal",ref:L},yt.createElement("header",{className:"DocSearch-SearchBar",ref:M},yt.createElement(vr,an({},Q,{state:T,autoFocus:0===V.length,inputRef:F,isFromSelection:Boolean(V)&&V===B,translations:C,onClose:u}))),yt.createElement("div",{className:"DocSearch-Dropdown",ref:H},yt.createElement(lr,an({},Q,{indexName:n,state:T,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:j,recentSearches:J,favoriteSearches:$,inputRef:F,translations:N,getMissingResultsUrl:D,onItemClick:function(e,t){W(e),z(e),rn(t)||u()}}))),yt.createElement("footer",{className:"DocSearch-Footer"},yt.createElement(Ot,{translations:x}))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9462],{9462:(e,t,r)=>{function n(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;i vn});var a=function(){};function c(e){var t=e.item,r=e.items;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(s){u=!0,o=s}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r e.length)&&(t=e.length);for(var r=0,n=new Array(t);r =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t =3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(p(r),[{headers:a}]))}else e.apply(void 0,[t].concat(p(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&i("clickedObjectIDsAfterSearch",g(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&i("clickedObjectIDs",g(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n 0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&i("convertedObjectIDsAfterSearch",g(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&i("convertedObjectIDs",g(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n 0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r 0&&t.reduce((function(e,t){var r=t.items,n=d(t,f);return[].concat(p(e),p(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n 0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function S(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function j(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function E(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r 0&&C({onItemsChange:o,items:r,insights:f,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;s("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:f}}),r((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&l({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Selected"},c({item:t,items:m.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&u({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Active"},c({item:t,items:m.current}))]})}))},onStateChange:function(e){var t=e.state;p({state:t})},__autocomplete_pluginOptions:e}}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==_(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t,r){var n,o=t.initialState;return{getState:function(){return o},dispatch:function(n,i){var a=function(e){for(var t=1;t e.length)&&(t=e.length);for(var r=0,n=new Array(t);r 0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(V++),plugins:o,initialState:X({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(Q(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:a,onResolve:a};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=$($({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return L(e)})).then((function(e){return e.map((function(e){return X(X({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:X({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t e.length)&&(t=e.length);for(var r=0,n=new Array(t);r =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ie,De,Ae,ke=null,xe=(Ie=-1,De=-1,Ae=void 0,function(e){var t=++Ie;return Promise.resolve(e).then((function(e){return Ae&&t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Me=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}var Fe=["props","refresh","store"],Ue=["inputElement","formElement","panelElement"],Be=["inputElement"],Ve=["inputElement","maxLength"],Ke=["sourceIndex"],$e=["sourceIndex"],Je=["item","source","sourceIndex"];function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ge(e){var t=e.props,r=e.refresh,n=e.store,o=Ze(e,Fe),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return We({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},Ze(e,Ue))},getRootProps:function(e){return We({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return We({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},Ze(e,Be))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,Ke);return We({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function c(e){(t.openOnFocus||Boolean(n.getState().query))&&Ce(We({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var l=e||{},u=(l.inputElement,l.maxLength),s=void 0===u?512:u,f=Ze(l,Ve),m=ge(n.getState()),p=function(e){return Boolean(e&&e.match(Me))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),v=null!=m&&m.itemUrl&&!p?"go":"search";return We({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){Ce(We({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=Le(e,_e);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=ge(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,l=e.source;l.onActive(qe({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:l,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?Ce(qe({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=ge(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,m=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:u,state:o.getState()});Ce(qe({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(We({event:e,props:t,refresh:r,store:n},o))},onFocus:c,onBlur:a,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||c(r)}},f)},getPanelProps:function(e){return We({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,$e);return We({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,l=e.sourceIndex,u=Ze(e,Je);return We({id:"".concat(i(t.id,l),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=ge(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(We({event:e,item:i,itemInputValue:c,itemUrl:l,refresh:r,source:u,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():Ce(We({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(We({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},u)}}}var Xe=[{segment:"autocomplete-core",version:"1.9.3"}];function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t =r?null===n?null:0:o}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t e.length)&&(t=e.length);for(var r=0,n=new Array(t);r =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kt(e){var t=e.translations,r=void 0===t?{}:t,n=At(e,Pt),o=r.noResultsText,i=void 0===o?"No results for":o,a=r.suggestedQueryText,c=void 0===a?"Try searching for":a,l=r.reportMissingResultsText,u=void 0===l?"Believe this query should return results?":l,s=r.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,m=n.state.context.searchSuggestions;return yt.createElement("div",{className:"DocSearch-NoResults"},yt.createElement("div",{className:"DocSearch-Screen-Icon"},yt.createElement(Et,null)),yt.createElement("p",{className:"DocSearch-Title"},i,' "',yt.createElement("strong",null,n.state.query),'"'),m&&m.length>0&&yt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},yt.createElement("p",{className:"DocSearch-Help"},c,":"),yt.createElement("ul",null,m.slice(0,3).reduce((function(e,t){return[].concat(It(e),[yt.createElement("li",{key:t},yt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){n.setQuery(t.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},t))])}),[]))),n.getMissingResultsUrl&&yt.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),yt.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var xt=function(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ct(e){switch(e.type){case"lvl1":return yt.createElement(xt,null);case"content":return yt.createElement(_t,null);default:return yt.createElement(Nt,null)}}function Nt(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function _t(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Tt(){return yt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},yt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),yt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var qt=["hit","attribute","tagName"];function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ft(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Ut(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,i=Ht(e,qt);return(0,yt.createElement)(o,Lt(Lt({},i),{},{dangerouslySetInnerHTML:{__html:Ft(t,"_snippetResult.".concat(r,".value"))||Ft(t,r)}}))}function Bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r |<\/mark>)/g,Wt=RegExp(zt.source);function Qt(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((n.__docsearch_parent?null===(t=n.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(r=e._highlightResult)||void 0===r||null===(r=r.hierarchy)||void 0===r?void 0:r.lvl0)||{}).value;return o&&Wt.test(o)?o.replace(zt,""):o}function Zt(){return Zt=Object.assign||function(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function or(e){var t=e.translations,r=void 0===t?{}:t,n=nr(e,tr),o=r.recentSearchesTitle,i=void 0===o?"Recent":o,a=r.noRecentSearchesText,c=void 0===a?"No recent searches":a,l=r.saveRecentSearchButtonTitle,u=void 0===l?"Save this search":l,s=r.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,m=r.favoriteSearchesTitle,p=void 0===m?"Favorite":m,v=r.removeFavoriteSearchButtonTitle,d=void 0===v?"Remove this search from favorites":v;return"idle"===n.state.status&&!1===n.hasCollections?n.disableUserPersonalization?null:yt.createElement("div",{className:"DocSearch-StartScreen"},yt.createElement("p",{className:"DocSearch-Help"},c)):!1===n.hasCollections?null:yt.createElement("div",{className:"DocSearch-Dropdown-Container"},yt.createElement($t,rr({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Xt,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,o=e.runDeleteTransition;return yt.createElement(yt.Fragment,null,yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.add(t),n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(Yt,null))),yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(er,null))))}})),yt.createElement($t,rr({},n,{title:p,collection:n.state.collections[1],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Yt,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.remove(t),n.refresh()}))}},yt.createElement(er,null)))}})))}var ir=["translations"];function ar(){return ar=Object.assign||function(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var lr=yt.memo((function(e){var t=e.translations,r=void 0===t?{}:t,n=cr(e,ir);if("error"===n.state.status)return yt.createElement(wt,{translations:null==r?void 0:r.errorScreen});var o=n.state.collections.some((function(e){return e.items.length>0}));return n.state.query?!1===o?yt.createElement(kt,ar({},n,{translations:null==r?void 0:r.noResultsScreen})):yt.createElement(Gt,n):yt.createElement(or,ar({},n,{hasCollections:o,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function ur(){return yt.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},yt.createElement("g",{fill:"none",fillRule:"evenodd"},yt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},yt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),yt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},yt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var sr=r(9188),fr=["translations"];function mr(){return mr=Object.assign||function(e){for(var t=1;t =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vr(e){var t=e.translations,r=void 0===t?{}:t,n=pr(e,fr),o=r.resetButtonTitle,i=void 0===o?"Clear the query":o,a=r.resetButtonAriaLabel,c=void 0===a?"Clear the query":a,l=r.cancelButtonText,u=void 0===l?"Cancel":l,s=r.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,m=r.searchInputLabel,p=void 0===m?"Search":m,v=n.getFormProps({inputElement:n.inputRef.current}).onReset;return yt.useEffect((function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()}),[n.autoFocus,n.inputRef]),yt.useEffect((function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()}),[n.isFromSelection,n.inputRef]),yt.createElement(yt.Fragment,null,yt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:v},yt.createElement("label",mr({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),yt.createElement(sr.W,null),yt.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},p)),yt.createElement("div",{className:"DocSearch-LoadingIndicator"},yt.createElement(ur,null)),yt.createElement("input",mr({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:ht}))),yt.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},yt.createElement(er,null))),yt.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:n.onClose},u))}var dr=["_highlightResult","_snippetResult"];function yr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function br(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=hr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,yr(t,dr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function gr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get:(t,r,n={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Or(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Or({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Or({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Or({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Or({caches:t}).clear()))}}function Sr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function jr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function wr(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Er(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Pr="4.23.3",Ir={WithinQueryParameters:0,WithinHeaders:1};function Dr(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ar={Read:1,Write:2,Any:3},kr={Up:1,Down:2,Timeouted:3},xr=12e4;function Cr(e,t=kr.Up){return{...e,status:t,lastUpdate:Date.now()}}function Nr(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ar.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ar.Any}}const _r={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function Tr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Cr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===kr.Up||Date.now()-e.lastUpdate>xr}(e))),n=e.filter((e=>function(e){return e.status===kr.Timeouted&&Date.now()-e.lastUpdate<=xr}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>Nr(e))):t}}))}const qr=(e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&!~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e);function Rr(e,t,r,n){const o=[],i=function(e,t){if(e.method===_r.Get||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,l=r.method!==_r.Get?{}:{...r.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let s=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Fr(o)};const p={data:i,headers:a,method:c,url:Mr(m,r.path,u),connectTimeout:l(s,e.timeouts.connect),responseTimeout:l(s,n.timeout)},v=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=v(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",Ur(n)),e.hostsCache.set(m,Cr(m,r.isTimedOut?kr.Timeouted:kr.Down))]).then((()=>f(t,l)))},onFail(e){throw v(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Fr(o))}};return e.requester.send(p).then((e=>qr(e,d)))};return Tr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Lr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Mr(e,t,r){const n=Hr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Hr(e){return Object.keys(e).map((t=>{return Er("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Fr(e){return e.map((e=>Ur(e)))}function Ur(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Br=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Ir.WithinHeaders?n:{},queryParameters:()=>e===Ir.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Ir.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:l,queryParameters:u,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:u,hosts:l.map((e=>Nr(e))),read(e,t){const r=Dr(t,f.timeouts.read),n=()=>Rr(f,f.hosts.filter((e=>!!(e.accept&Ar.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>Rr(f,f.hosts.filter((e=>!!(e.accept&Ar.Write))),e,Dr(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ar.Read},{url:`${t}.algolia.net`,accept:Ar.Write}].concat(jr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))};return wr(o,e.methods)},Vr=e=>(t,r)=>t.method===_r.Get?e.transporter.read(t,r):e.transporter.write(t,r),Kr=e=>(t,r={})=>wr({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),$r=e=>(t,r)=>{const n=t.map((e=>({...e,params:Hr(e.params||{})})));return e.transporter.read({method:_r.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},Jr=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return Kr(e)(t.indexName,{methods:{searchForFacetValues:Qr}}).searchForFacetValues(n,o,{...r,...i})}))),zr=e=>(t,r,n)=>e.transporter.read({method:_r.Post,path:Er("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Wr=e=>(t,r)=>e.transporter.read({method:_r.Post,path:Er("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),Qr=e=>(t,r,n)=>e.transporter.read({method:_r.Post,path:Er("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Zr={Debug:1,Info:2,Error:3};const Gr=e=>(t,r)=>{const n=t.map((e=>({...e,threshold:e.threshold||0})));return e.transporter.read({method:_r.Post,path:"1/indexes/*/recommendations",data:{requests:n},cacheable:!0},r)};function Xr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=Zr.Error,{debug:(e,t)=>(Zr.Debug>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Zr.Info>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Sr(),requestsCache:Sr({serializable:!1}),hostsCache:Or({caches:[gr({key:`${Pr}-${e}`}),Sr()]}),userAgent:Lr(Pr).add({segment:"Browser",version:"lite"}),authMode:Ir.WithinQueryParameters};var o;return Br({...n,...r,methods:{search:$r,searchForFacetValues:Jr,multipleQueries:$r,multipleSearchForFacetValues:Jr,customRequest:Vr,initIndex:e=>t=>Kr(e)(t,{methods:{search:Wr,searchForFacetValues:Qr,findAnswers:zr}}),getRecommendations:Gr}})}Xr.version=Pr;const Yr=Xr;var en="3.6.0";function tn(){}function rn(e){return e}function nn(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function on(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}var an=["footer","searchBox"];function cn(){return cn=Object.assign||function(e){for(var t=1;t e.length)&&(t=e.length);for(var r=0,n=new Array(t);r =0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vn(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,l=e.onClose,u=void 0===l?tn:l,s=e.transformItems,f=void 0===s?rn:s,m=e.hitComponent,p=void 0===m?St:m,v=e.resultsFooterComponent,d=void 0===v?function(){return null}:v,y=e.navigator,h=e.initialScrollY,b=void 0===h?0:h,g=e.transformSearchClient,O=void 0===g?rn:g,S=e.disableUserPersonalization,j=void 0!==S&&S,w=e.initialQuery,E=void 0===w?"":w,P=e.translations,I=void 0===P?{}:P,D=e.getMissingResultsUrl,A=e.insights,k=void 0!==A&&A,x=I.footer,C=I.searchBox,N=pn(I,an),_=fn(yt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=_[0],q=_[1],R=yt.useRef(null),L=yt.useRef(null),M=yt.useRef(null),H=yt.useRef(null),F=yt.useRef(null),U=yt.useRef(10),B=yt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,ht):"").current,V=yt.useRef(E||B).current,K=function(e,t,r){return yt.useMemo((function(){var n=Yr(e,t);return n.addAlgoliaAgent("docsearch",en),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",en),r(n)}),[e,t,r])}(t,r,O),$=yt.useRef(br({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,J=yt.useRef(br({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:0===$.getAll().length?7:4})).current,z=yt.useCallback((function(e){if(!j){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===$.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&J.add(t)}}),[$,J,j]),W=yt.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[T.context.algoliaInsightsPlugin]),Q=yt.useMemo((function(){return dt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:k,navigator:y,onStateChange:function(e){q(e.state)},getSources:function(e){var o=e.query,i=e.state,l=e.setContext,s=e.setStatus;if(!o)return j?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),nn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return J.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),nn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return $.getAll()}}];var m=Boolean(k);return K.search([{query:o,indexName:n,params:un({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(U.current),"hierarchy.lvl2:".concat(U.current),"hierarchy.lvl3:".concat(U.current),"hierarchy.lvl4:".concat(U.current),"hierarchy.lvl5:".concat(U.current),"hierarchy.lvl6:".concat(U.current),"content:".concat(U.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:m},a)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results[0],a=o.hits,s=o.nbHits,p=on(a,(function(e){return Qt(e)}),c);i.context.searchSuggestions.length 0&&(X(),F.current&&F.current.focus())}),[V,X]),yt.useEffect((function(){function e(){if(L.current){var e=.01*window.innerHeight;L.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),yt.createElement("div",cn({ref:R},G({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&u()}}),yt.createElement("div",{className:"DocSearch-Modal",ref:L},yt.createElement("header",{className:"DocSearch-SearchBar",ref:M},yt.createElement(vr,cn({},Q,{state:T,autoFocus:0===V.length,inputRef:F,isFromSelection:Boolean(V)&&V===B,translations:C,onClose:u}))),yt.createElement("div",{className:"DocSearch-Dropdown",ref:H},yt.createElement(lr,cn({},Q,{indexName:n,state:T,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:j,recentSearches:J,favoriteSearches:$,inputRef:F,translations:N,getMissingResultsUrl:D,onItemClick:function(e,t){W(e),z(e),nn(t)||u()}}))),yt.createElement("footer",{className:"DocSearch-Footer"},yt.createElement(Ot,{translations:x}))))}}}]); \ No newline at end of file diff --git a/assets/js/9a53555d.80b7004c.js b/assets/js/9a53555d.80b7004c.js deleted file mode 100644 index d9e8afcc..00000000 --- a/assets/js/9a53555d.80b7004c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3922],{1526:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var s=t(5893),o=t(1151);const i={sidebar_position:1,title:"Fonts"},r=void 0,c={id:"resources/fonts",title:"Fonts",description:"Content",source:"@site/docs/resources/fonts.md",sourceDirName:"resources",slug:"/resources/fonts",permalink:"/react-native-template-strong/docs/resources/fonts",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/resources/fonts.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Fonts"},sidebar:"tutorialSidebar",previous:{title:"Hooks",permalink:"/react-native-template-strong/docs/redux/hooks"},next:{title:"Images",permalink:"/react-native-template-strong/docs/resources/images"}},l={},d=[{value:"Content",id:"content",level:2},{value:"Accessing fonts",id:"accessing-fonts",level:2},{value:"Adding fonts",id:"adding-fonts",level:2}];function a(e){const n={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(n.p,{children:["Currently, there is only a single font which is used, and it's ",(0,s.jsx)(n.code,{children:"system"}),".\nIt's a system font which is used on device."]}),"\n",(0,s.jsx)(n.h2,{id:"accessing-fonts",children:"Accessing fonts"}),"\n",(0,s.jsxs)(n.p,{children:["To access a font in your code, you need to use ",(0,s.jsx)(n.code,{children:"fonts.ts"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:'export const Fonts = {\n system: "System",\n};\n'})}),"\n",(0,s.jsx)(n.p,{children:"To use it you simply can create a style and use it like this:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"const styles = StyleSheet.create({\n text: {\n fontFamily: Fonts.system\n } as TextStyle\n});\n"})}),"\n",(0,s.jsxs)(n.p,{children:["There's also a default combination of font styles which is stored in ",(0,s.jsx)(n.code,{children:"commonStyles"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"export const CommonStyles = StyleSheet.create({\n normalText: {\n fontFamily: Fonts.system,\n fontSize: CommonSizes.font.medium,\n lineHeight: CommonSizes.lineHeight.medium,\n color: platformNativeColor(PlatformColorsIOS.label, PlatformColorsAndroid.primaryText),\n } as TextStyle,\n});\n"})}),"\n",(0,s.jsx)(n.p,{children:"To use it you can simply call it like this:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:" \n {localization.common.loading}\n \n"})}),"\n",(0,s.jsx)(n.h2,{id:"adding-fonts",children:"Adding fonts"}),"\n",(0,s.jsx)(n.p,{children:"To add your custom fonts you need to do the following:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Place your ",(0,s.jsx)(n.code,{children:".ttf"})," or ",(0,s.jsx)(n.code,{children:".otf"})," font/s in ",(0,s.jsx)(n.code,{children:"resources/fonts"})," folder"]}),"\n",(0,s.jsxs)(n.li,{children:["Run ",(0,s.jsx)(n.code,{children:"react-native link"}),", it will add your fonts to native resources folders"]}),"\n",(0,s.jsxs)(n.li,{children:["Add your font inside ",(0,s.jsx)(n.code,{children:"Fonts"})]}),"\n",(0,s.jsx)(n.li,{children:"Rebuild your application"}),"\n",(0,s.jsx)(n.li,{children:"Use your newly added fonts"}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>c,a:()=>r});var s=t(7294);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9a53555d.d8d72c4e.js b/assets/js/9a53555d.d8d72c4e.js new file mode 100644 index 00000000..eca957a4 --- /dev/null +++ b/assets/js/9a53555d.d8d72c4e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6320],{1786:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var s=t(4848),o=t(8453);const i={sidebar_position:1,title:"Fonts"},r=void 0,c={id:"resources/fonts",title:"Fonts",description:"Content",source:"@site/docs/resources/fonts.md",sourceDirName:"resources",slug:"/resources/fonts",permalink:"/react-native-template-strong/docs/resources/fonts",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/resources/fonts.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Fonts"},sidebar:"tutorialSidebar",previous:{title:"Hooks",permalink:"/react-native-template-strong/docs/redux/hooks"},next:{title:"Images",permalink:"/react-native-template-strong/docs/resources/images"}},l={},d=[{value:"Content",id:"content",level:2},{value:"Accessing fonts",id:"accessing-fonts",level:2},{value:"Adding fonts",id:"adding-fonts",level:2}];function a(e){const n={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(n.p,{children:["Currently, there is only a single font which is used, and it's ",(0,s.jsx)(n.code,{children:"system"}),".\nIt's a system font which is used on device."]}),"\n",(0,s.jsx)(n.h2,{id:"accessing-fonts",children:"Accessing fonts"}),"\n",(0,s.jsxs)(n.p,{children:["To access a font in your code, you need to use ",(0,s.jsx)(n.code,{children:"fonts.ts"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:'export const Fonts = {\n system: "System",\n};\n'})}),"\n",(0,s.jsx)(n.p,{children:"To use it you simply can create a style and use it like this:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"const styles = StyleSheet.create({\n text: {\n fontFamily: Fonts.system\n } as TextStyle\n});\n"})}),"\n",(0,s.jsxs)(n.p,{children:["There's also a default combination of font styles which is stored in ",(0,s.jsx)(n.code,{children:"commonStyles"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"export const CommonStyles = StyleSheet.create({\n normalText: {\n fontFamily: Fonts.system,\n fontSize: CommonSizes.font.medium,\n lineHeight: CommonSizes.lineHeight.medium,\n color: platformNativeColor(PlatformColorsIOS.label, PlatformColorsAndroid.primaryText),\n } as TextStyle,\n});\n"})}),"\n",(0,s.jsx)(n.p,{children:"To use it you can simply call it like this:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"\n {localization.common.loading}\n \n"})}),"\n",(0,s.jsx)(n.h2,{id:"adding-fonts",children:"Adding fonts"}),"\n",(0,s.jsx)(n.p,{children:"To add your custom fonts you need to do the following:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Place your ",(0,s.jsx)(n.code,{children:".ttf"})," or ",(0,s.jsx)(n.code,{children:".otf"})," font/s in ",(0,s.jsx)(n.code,{children:"resources/fonts"})," folder"]}),"\n",(0,s.jsxs)(n.li,{children:["Run ",(0,s.jsx)(n.code,{children:"react-native link"}),", it will add your fonts to native resources folders"]}),"\n",(0,s.jsxs)(n.li,{children:["Add your font inside ",(0,s.jsx)(n.code,{children:"Fonts"})]}),"\n",(0,s.jsx)(n.li,{children:"Rebuild your application"}),"\n",(0,s.jsx)(n.li,{children:"Use your newly added fonts"}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var s=t(6540);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9bbfbce4.8001f90e.js b/assets/js/9bbfbce4.8001f90e.js deleted file mode 100644 index 7c823e3a..00000000 --- a/assets/js/9bbfbce4.8001f90e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3845],{1247:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>r,default:()=>x,frontMatter:()=>s,metadata:()=>d,toc:()=>c});var l=n(5893),i=n(1151);const s={sidebar_position:14,title:"ImageCropPickerButton"},r=void 0,d={id:"components/image-crop-picker-button",title:"ImageCropPickerButton",description:"Content",source:"@site/docs/components/image-crop-picker-button.md",sourceDirName:"components",slug:"/components/image-crop-picker-button",permalink:"/react-native-template-strong/docs/components/image-crop-picker-button",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/image-crop-picker-button.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:14,frontMatter:{sidebar_position:14,title:"ImageCropPickerButton"},sidebar:"tutorialSidebar",previous:{title:"PhotoTakingButton",permalink:"/react-native-template-strong/docs/components/photo-taking-button"},next:{title:"DatePickerOverlay",permalink:"/react-native-template-strong/docs/components/date-picker-overlay"}},o={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsx)(t.p,{children:"Image crop picker button which provides a dialog to user to photo selection or image taking or removing existing one and also showing the result to user."}),"\n",(0,l.jsx)(t.p,{children:"If image is not selected it will show a button with icon."}),"\n",(0,l.jsxs)(t.p,{children:["Uses ",(0,l.jsx)(t.code,{children:"PhotoTakingButton"})," as button component."]}),"\n",(0,l.jsxs)(t.p,{children:["Uses ",(0,l.jsx)(t.a,{href:"https://github.com/ivpusic/react-native-image-crop-picker",children:"react-native-image-crop-picker"})," for image picking."]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onImagePicked"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"(image: CropperImage) => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"On image picked callback"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onRemoveImage"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"() => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"On remove image callback"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onPickerError"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"(error: Error) => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Callback with error when something went wrong"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"image"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageURISource or null"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Selected image which will be shown and used"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"icon"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageURISource"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageResources.camera"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Icon which will be shown when image is not present and over the selected image"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"style"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ViewStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of button"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"iconStyle"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of icon"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"imageStyle"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of image"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"disabled"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Is button disabled"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" const [photo, setPhoto] = useState(null);\n\n const onRemoveImage = useCallback(() => {\n setPhoto(null);\n }, [setPhoto]);\n\n const onImagePicked = useCallback(\n (nextImage) => {\n setPhoto({uri: nextImage.path});\n },\n [setPhoto],\n );\n\n return (\n \n );\n"})})]})}function x(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>d,a:()=>r});var l=n(7294);const i={},s=l.createContext(i);function r(e){const t=l.useContext(s);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),l.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9bbfbce4.ea6eda22.js b/assets/js/9bbfbce4.ea6eda22.js new file mode 100644 index 00000000..2bf581df --- /dev/null +++ b/assets/js/9bbfbce4.ea6eda22.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3088],{9446:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>r,default:()=>x,frontMatter:()=>s,metadata:()=>d,toc:()=>c});var l=n(4848),i=n(8453);const s={sidebar_position:14,title:"ImageCropPickerButton"},r=void 0,d={id:"components/image-crop-picker-button",title:"ImageCropPickerButton",description:"Content",source:"@site/docs/components/image-crop-picker-button.md",sourceDirName:"components",slug:"/components/image-crop-picker-button",permalink:"/react-native-template-strong/docs/components/image-crop-picker-button",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/image-crop-picker-button.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:14,frontMatter:{sidebar_position:14,title:"ImageCropPickerButton"},sidebar:"tutorialSidebar",previous:{title:"PhotoTakingButton",permalink:"/react-native-template-strong/docs/components/photo-taking-button"},next:{title:"DatePickerOverlay",permalink:"/react-native-template-strong/docs/components/date-picker-overlay"}},o={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsx)(t.p,{children:"Image crop picker button which provides a dialog to user to photo selection or image taking or removing existing one and also showing the result to user."}),"\n",(0,l.jsx)(t.p,{children:"If image is not selected it will show a button with icon."}),"\n",(0,l.jsxs)(t.p,{children:["Uses ",(0,l.jsx)(t.code,{children:"PhotoTakingButton"})," as button component."]}),"\n",(0,l.jsxs)(t.p,{children:["Uses ",(0,l.jsx)(t.a,{href:"https://github.com/ivpusic/react-native-image-crop-picker",children:"react-native-image-crop-picker"})," for image picking."]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onImagePicked"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"(image: CropperImage) => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"On image picked callback"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onRemoveImage"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"() => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"On remove image callback"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onPickerError"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"(error: Error) => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Callback with error when something went wrong"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"image"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageURISource or null"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Selected image which will be shown and used"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"icon"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageURISource"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageResources.camera"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Icon which will be shown when image is not present and over the selected image"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"style"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ViewStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of button"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"iconStyle"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of icon"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"imageStyle"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of image"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"disabled"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Is button disabled"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" const [photo, setPhoto] = useState (null);\n\n const onRemoveImage = useCallback(() => {\n setPhoto(null);\n }, [setPhoto]);\n\n const onImagePicked = useCallback(\n (nextImage) => {\n setPhoto({uri: nextImage.path});\n },\n [setPhoto],\n );\n\n return (\n \n );\n"})})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>d});var l=n(6540);const i={},s=l.createContext(i);function r(e){const t=l.useContext(s);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),l.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9cf17553.21111104.js b/assets/js/9cf17553.21111104.js deleted file mode 100644 index 8c6aa932..00000000 --- a/assets/js/9cf17553.21111104.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2188],{4319:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var l=n(5893),s=n(1151);const o={sidebar_position:7,title:"TouchablePlatform"},r=void 0,i={id:"components/touchable-platform",title:"TouchablePlatform",description:"Content",source:"@site/docs/components/touchable-platform.md",sourceDirName:"components",slug:"/components/touchable-platform",permalink:"/react-native-template-strong/docs/components/touchable-platform",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/touchable-platform.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:7,frontMatter:{sidebar_position:7,title:"TouchablePlatform"},sidebar:"tutorialSidebar",previous:{title:"IconPlatform",permalink:"/react-native-template-strong/docs/components/icon-platform"},next:{title:"LoadingComponent",permalink:"/react-native-template-strong/docs/components/loading-component"}},a={},d=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsxs)(t.p,{children:["Platform-friendly touchable button which relies on ",(0,l.jsx)(t.code,{children:"Pressable"}),".\nUsed in ",(0,l.jsx)(t.code,{children:"PrimaryButton"})," and ",(0,l.jsx)(t.code,{children:"RadioButton"}),"."]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.p,{children:["Extends ",(0,l.jsx)(t.code,{children:"PressableProps"})," and additionally adds next properties"]}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"style"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ViewStyle or ViewStyle[]"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of button"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"highlightColor"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"string or OpaqueColorValue"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,l.jsx)(t.code,{children:"PlatformColorsIOS.quaternarySystemFill"})," on iOS and ",(0,l.jsx)(t.code,{children:"PlatformColorsAndroid.primaryLight"})," on Android"]}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Highlight color used as ripple color on Android and when pressed background color on iOS"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" \n \n"})})]})}function h(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(c,{...e})}):c(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>r});var l=n(7294);const s={},o=l.createContext(s);function r(e){const t=l.useContext(o);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),l.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9cf17553.ac47e1dc.js b/assets/js/9cf17553.ac47e1dc.js new file mode 100644 index 00000000..e326f86a --- /dev/null +++ b/assets/js/9cf17553.ac47e1dc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6708],{750:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var l=n(4848),s=n(8453);const o={sidebar_position:7,title:"TouchablePlatform"},r=void 0,i={id:"components/touchable-platform",title:"TouchablePlatform",description:"Content",source:"@site/docs/components/touchable-platform.md",sourceDirName:"components",slug:"/components/touchable-platform",permalink:"/react-native-template-strong/docs/components/touchable-platform",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/touchable-platform.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:7,frontMatter:{sidebar_position:7,title:"TouchablePlatform"},sidebar:"tutorialSidebar",previous:{title:"IconPlatform",permalink:"/react-native-template-strong/docs/components/icon-platform"},next:{title:"LoadingComponent",permalink:"/react-native-template-strong/docs/components/loading-component"}},a={},d=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsxs)(t.p,{children:["Platform-friendly touchable button which relies on ",(0,l.jsx)(t.code,{children:"Pressable"}),".\nUsed in ",(0,l.jsx)(t.code,{children:"PrimaryButton"})," and ",(0,l.jsx)(t.code,{children:"RadioButton"}),"."]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.p,{children:["Extends ",(0,l.jsx)(t.code,{children:"PressableProps"})," and additionally adds next properties"]}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"style"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ViewStyle or ViewStyle[]"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of button"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"highlightColor"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"string or OpaqueColorValue"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,l.jsx)(t.code,{children:"PlatformColorsIOS.quaternarySystemFill"})," on iOS and ",(0,l.jsx)(t.code,{children:"PlatformColorsAndroid.primaryLight"})," on Android"]}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Highlight color used as ripple color on Android and when pressed background color on iOS"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"\n {label}\n \n\n \n"})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var l=n(6540);const s={},o=l.createContext(s);function r(e){const t=l.useContext(o);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),l.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9dcf257f.96ef35f7.js b/assets/js/9dcf257f.96ef35f7.js new file mode 100644 index 00000000..514878e3 --- /dev/null +++ b/assets/js/9dcf257f.96ef35f7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5635],{1964:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var r=n(4848),s=n(8453);const a={sidebar_position:3,title:"Separator"},l=void 0,i={id:"components/separator",title:"Separator",description:"Content",source:"@site/docs/components/separator.md",sourceDirName:"components",slug:"/components/separator",permalink:"/react-native-template-strong/docs/components/separator",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/separator.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Separator"},sidebar:"tutorialSidebar",previous:{title:"PrimaryTextInput",permalink:"/react-native-template-strong/docs/components/primary-text-input"},next:{title:"FlatListWrapper",permalink:"/react-native-template-strong/docs/components/flat-list-wrapper"}},o={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(t.p,{children:["Simple separator component, primarily used with ",(0,r.jsx)(t.code,{children:"FlatListWrapper"})," and ",(0,r.jsx)(t.code,{children:"SectionListWrapper"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"isFull"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"boolean"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"true"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Should it take whole width or have horizontal margins"})]})})]}),"\n",(0,r.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"FlatListWrapper.defaultProps = {\n ItemSeparatorComponent: Separator,\n};\n"})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"\n {label}\n \n\n"})})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>i});var r=n(6540);const s={},a=r.createContext(s);function l(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9dcf257f.aa994b3a.js b/assets/js/9dcf257f.aa994b3a.js deleted file mode 100644 index a928f2f6..00000000 --- a/assets/js/9dcf257f.aa994b3a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8886],{4739:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var r=n(5893),s=n(1151);const a={sidebar_position:3,title:"Separator"},l=void 0,i={id:"components/separator",title:"Separator",description:"Content",source:"@site/docs/components/separator.md",sourceDirName:"components",slug:"/components/separator",permalink:"/react-native-template-strong/docs/components/separator",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/separator.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Separator"},sidebar:"tutorialSidebar",previous:{title:"PrimaryTextInput",permalink:"/react-native-template-strong/docs/components/primary-text-input"},next:{title:"FlatListWrapper",permalink:"/react-native-template-strong/docs/components/flat-list-wrapper"}},o={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(t.p,{children:["Simple separator component, primarily used with ",(0,r.jsx)(t.code,{children:"FlatListWrapper"})," and ",(0,r.jsx)(t.code,{children:"SectionListWrapper"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"isFull"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"boolean"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"true"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Should it take whole width or have horizontal margins"})]})})]}),"\n",(0,r.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"FlatListWrapper.defaultProps = {\n ItemSeparatorComponent: Separator,\n};\n"})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" \n"})})]})}function p(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>l});var r=n(7294);const s={},a=r.createContext(s);function l(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a09f8af8.ac4ffc9d.js b/assets/js/a09f8af8.ac4ffc9d.js new file mode 100644 index 00000000..a2f18741 --- /dev/null +++ b/assets/js/a09f8af8.ac4ffc9d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[794],{8325:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var s=t(4848),i=t(8453);const o={sidebar_position:1,title:"Project"},r=void 0,c={id:"structure/project",title:"Project",description:"Content",source:"@site/docs/structure/project.md",sourceDirName:"structure",slug:"/structure/project",permalink:"/react-native-template-strong/docs/structure/project",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/structure/project.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Project"},sidebar:"tutorialSidebar",previous:{title:"Getting started",permalink:"/react-native-template-strong/docs/getting-started"},next:{title:"Module",permalink:"/react-native-template-strong/docs/structure/module"}},l={},d=[{value:"Content",id:"content",level:2}];function a(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(n.p,{children:"Here you will see a brief description of each folder, to learn more about what a specific folder does continue reading documentation."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"mocks - module mocks for tests"}),"\n",(0,s.jsx)(n.li,{children:"tests - jest tests"}),"\n",(0,s.jsx)(n.li,{children:"e2e - detox tests"}),"\n",(0,s.jsxs)(n.li,{children:["patches - patches made with ",(0,s.jsx)(n.a,{href:"https://github.com/ds300/patch-package",children:"patch-package"})]}),"\n",(0,s.jsxs)(n.li,{children:["resources","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"images - images and icons"}),"\n",(0,s.jsxs)(n.li,{children:["fonts - fonts ",(0,s.jsx)(n.code,{children:".ttf"})," files"]}),"\n",(0,s.jsx)(n.li,{children:"symbols - SF symbols which can be used on iOS"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["src","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["common","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["components - common components (e.g. ",(0,s.jsx)(n.code,{children:"PrimaryButton.tsx"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["helpers - different common helpers (e.g. ",(0,s.jsx)(n.code,{children:"platformNativeColor"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["hooks - different common hooks (e.g. ",(0,s.jsx)(n.code,{children:"useDebounce"}),")"]}),"\n",(0,s.jsx)(n.li,{children:"localization - project localization"}),"\n",(0,s.jsx)(n.li,{children:"urls - URL openers/handlers"}),"\n",(0,s.jsxs)(n.li,{children:["utils - different utilities (e.g. ",(0,s.jsx)(n.code,{children:"newState"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["validations - validations, max and min length constants (e.g. ",(0,s.jsx)(n.code,{children:"phoneValidations"}),")"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["core","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"api - API related requests, DTOs"}),"\n",(0,s.jsxs)(n.li,{children:["store - ",(0,s.jsx)(n.code,{children:"redux"})," store, ",(0,s.jsx)(n.code,{children:"rootReducer"}),", ",(0,s.jsx)(n.code,{children:"systemSlice"})]}),"\n",(0,s.jsx)(n.li,{children:"theme - colors, common styles, sizes, font constants"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"modules"}),"\n",(0,s.jsxs)(n.li,{children:["navigation - pages, roots, tabs, default navigation options","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["helpers - navigation actions, different overlay and modals helpers (e.g. ",(0,s.jsx)(n.code,{children:"showDatePicker"}),")"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"types - common types and types of dependencies which are not present"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"storybook - contains storybook stories"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var s=t(6540);const i={},o=s.createContext(i);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a09f8af8.f5e6e3d1.js b/assets/js/a09f8af8.f5e6e3d1.js deleted file mode 100644 index 748aebcb..00000000 --- a/assets/js/a09f8af8.f5e6e3d1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1357],{3818:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var s=n(5893),i=n(1151);const o={sidebar_position:1,title:"Project"},r=void 0,c={id:"structure/project",title:"Project",description:"Content",source:"@site/docs/structure/project.md",sourceDirName:"structure",slug:"/structure/project",permalink:"/react-native-template-strong/docs/structure/project",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/structure/project.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Project"},sidebar:"tutorialSidebar",previous:{title:"Getting started",permalink:"/react-native-template-strong/docs/getting-started"},next:{title:"Module",permalink:"/react-native-template-strong/docs/structure/module"}},l={},d=[{value:"Content",id:"content",level:2}];function a(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Here you will see a brief description of each folder, to learn more about what a specific folder does continue reading documentation."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"mocks - module mocks for tests"}),"\n",(0,s.jsx)(t.li,{children:"tests - jest tests"}),"\n",(0,s.jsx)(t.li,{children:"e2e - detox tests"}),"\n",(0,s.jsxs)(t.li,{children:["patches - patches made with ",(0,s.jsx)(t.a,{href:"https://github.com/ds300/patch-package",children:"patch-package"})]}),"\n",(0,s.jsxs)(t.li,{children:["resources","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"images - images and icons"}),"\n",(0,s.jsxs)(t.li,{children:["fonts - fonts ",(0,s.jsx)(t.code,{children:".ttf"})," files"]}),"\n",(0,s.jsx)(t.li,{children:"symbols - SF symbols which can be used on iOS"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["src","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["common","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["components - common components (e.g. ",(0,s.jsx)(t.code,{children:"PrimaryButton.tsx"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:["helpers - different common helpers (e.g. ",(0,s.jsx)(t.code,{children:"platformNativeColor"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:["hooks - different common hooks (e.g. ",(0,s.jsx)(t.code,{children:"useDebounce"}),")"]}),"\n",(0,s.jsx)(t.li,{children:"localization - project localization"}),"\n",(0,s.jsx)(t.li,{children:"urls - URL openers/handlers"}),"\n",(0,s.jsxs)(t.li,{children:["utils - different utilities (e.g. ",(0,s.jsx)(t.code,{children:"newState"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:["validations - validations, max and min length constants (e.g. ",(0,s.jsx)(t.code,{children:"phoneValidations"}),")"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["core","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"api - API related requests, DTOs"}),"\n",(0,s.jsxs)(t.li,{children:["store - ",(0,s.jsx)(t.code,{children:"redux"})," store, ",(0,s.jsx)(t.code,{children:"rootReducer"}),", ",(0,s.jsx)(t.code,{children:"systemSlice"})]}),"\n",(0,s.jsx)(t.li,{children:"theme - colors, common styles, sizes, font constants"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.li,{children:"modules"}),"\n",(0,s.jsxs)(t.li,{children:["navigation - pages, roots, tabs, default navigation options","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["helpers - navigation actions, different overlay and modals helpers (e.g. ",(0,s.jsx)(t.code,{children:"showDatePicker"}),")"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.li,{children:"types - common types and types of dependencies which are not present"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.li,{children:"storybook - contains storybook stories"}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>c,a:()=>r});var s=n(7294);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0417d48.ced98287.js b/assets/js/a7456010.7b4b0a20.js similarity index 64% rename from assets/js/b0417d48.ced98287.js rename to assets/js/a7456010.7b4b0a20.js index b7e6be10..2e5cf6e2 100644 --- a/assets/js/b0417d48.ced98287.js +++ b/assets/js/a7456010.7b4b0a20.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1477],{5745:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1235],{8552:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/a775fdf9.3fa41d14.js b/assets/js/a775fdf9.3fa41d14.js new file mode 100644 index 00000000..5003ae8a --- /dev/null +++ b/assets/js/a775fdf9.3fa41d14.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8010],{6252:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>c,frontMatter:()=>l,metadata:()=>a,toc:()=>d});var t=r(4848),s=r(8453);const l={sidebar_position:3,title:"URL openers"},i=void 0,a={id:"utils/url-openers",title:"URL openers",description:"PhoneUrl",source:"@site/docs/utils/url-openers.md",sourceDirName:"utils",slug:"/utils/url-openers",permalink:"/react-native-template-strong/docs/utils/url-openers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/utils/url-openers.md",tags:[],version:"current",lastUpdatedAt:1633280321e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"URL openers"},sidebar:"tutorialSidebar",previous:{title:"listHandlers",permalink:"/react-native-template-strong/docs/utils/list-handlers"},next:{title:"serializeQueryParams",permalink:"/react-native-template-strong/docs/utils/serialize-query-params"}},o={},d=[{value:"PhoneUrl",id:"phoneurl",level:2},{value:"MapUrl",id:"mapurl",level:2},{value:"EmailUrl",id:"emailurl",level:2},{value:"HttpUrl",id:"httpurl",level:2},{value:"Create your own handlers",id:"create-your-own-handlers",level:2}];function p(e){const n={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"phoneurl",children:"PhoneUrl"}),"\n",(0,t.jsx)(n.p,{children:"Opens the system phone application with provided phone number."}),"\n",(0,t.jsx)(n.p,{children:"If the phone won't be provided it will return null."}),"\n",(0,t.jsx)(n.p,{children:"Example usage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'await new PhoneUrl("37322233444").open();\n'})}),"\n",(0,t.jsx)(n.h2,{id:"mapurl",children:"MapUrl"}),"\n",(0,t.jsx)(n.p,{children:"Opens a map application or browser with latitude, longitude and address."}),"\n",(0,t.jsx)(n.p,{children:"Example usage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'await new MapUrl(60.59735, 27.63646, "some address").open();\n'})}),"\n",(0,t.jsx)(n.h2,{id:"emailurl",children:"EmailUrl"}),"\n",(0,t.jsx)(n.p,{children:"Opens email application with a new email to provided address."}),"\n",(0,t.jsx)(n.p,{children:"Example usage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'await new EmailUrl("test@mail.com").open();\n'})}),"\n",(0,t.jsx)(n.h2,{id:"httpurl",children:"HttpUrl"}),"\n",(0,t.jsx)(n.p,{children:"Opens browser or application to handle provided web address."}),"\n",(0,t.jsxs)(n.p,{children:["If web address doesn't start with ",(0,t.jsx)(n.code,{children:"http"})," then ",(0,t.jsx)(n.code,{children:"https://"})," will be pasted before the address."]}),"\n",(0,t.jsx)(n.p,{children:"Example usage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'await new HttpUrl("google.com").open();\n'})}),"\n",(0,t.jsx)(n.h2,{id:"create-your-own-handlers",children:"Create your own handlers"}),"\n",(0,t.jsxs)(n.p,{children:["All the previously described openers extend abstract ",(0,t.jsx)(n.code,{children:"BaseUrlOpener"})," which uses ",(0,t.jsx)(n.a,{href:"https://reactnative.dev/docs/linking",children:"Linking.openURL"})," under the hood when trying to open your params."]}),"\n",(0,t.jsxs)(n.p,{children:["You can create your own class extend it from ",(0,t.jsx)(n.code,{children:"BaseUrlOpener"}),", set your own ",(0,t.jsx)(n.code,{children:"constructor"})," and ",(0,t.jsx)(n.code,{children:"generateUrl"}),", like so:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:'export class MyParamUrl extends BaseUrlOpener {\n //Define your parameters\n constructor(private myParam: string | null) {\n super();\n }\n\n protected generateUrl(): string | null {\n if (this.myParam == null) {\n return null;\n } else {\n //Do some action here\n return "do something";\n }\n }\n}\n'})})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>a});var t=r(6540);const s={},l=t.createContext(s);function i(e){const n=t.useContext(l);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a775fdf9.a062c406.js b/assets/js/a775fdf9.a062c406.js deleted file mode 100644 index cb088ab2..00000000 --- a/assets/js/a775fdf9.a062c406.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1902],{2825:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>c,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var t=r(5893),s=r(1151);const l={sidebar_position:3,title:"URL openers"},a=void 0,i={id:"utils/url-openers",title:"URL openers",description:"PhoneUrl",source:"@site/docs/utils/url-openers.md",sourceDirName:"utils",slug:"/utils/url-openers",permalink:"/react-native-template-strong/docs/utils/url-openers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/utils/url-openers.md",tags:[],version:"current",lastUpdatedAt:1633280321,formattedLastUpdatedAt:"Oct 3, 2021",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"URL openers"},sidebar:"tutorialSidebar",previous:{title:"listHandlers",permalink:"/react-native-template-strong/docs/utils/list-handlers"},next:{title:"serializeQueryParams",permalink:"/react-native-template-strong/docs/utils/serialize-query-params"}},o={},d=[{value:"PhoneUrl",id:"phoneurl",level:2},{value:"MapUrl",id:"mapurl",level:2},{value:"EmailUrl",id:"emailurl",level:2},{value:"HttpUrl",id:"httpurl",level:2},{value:"Create your own handlers",id:"create-your-own-handlers",level:2}];function p(e){const n={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"phoneurl",children:"PhoneUrl"}),"\n",(0,t.jsx)(n.p,{children:"Opens the system phone application with provided phone number."}),"\n",(0,t.jsx)(n.p,{children:"If the phone won't be provided it will return null."}),"\n",(0,t.jsx)(n.p,{children:"Example usage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'await new PhoneUrl("37322233444").open();\n'})}),"\n",(0,t.jsx)(n.h2,{id:"mapurl",children:"MapUrl"}),"\n",(0,t.jsx)(n.p,{children:"Opens a map application or browser with latitude, longitude and address."}),"\n",(0,t.jsx)(n.p,{children:"Example usage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'await new MapUrl(60.59735, 27.63646, "some address").open();\n'})}),"\n",(0,t.jsx)(n.h2,{id:"emailurl",children:"EmailUrl"}),"\n",(0,t.jsx)(n.p,{children:"Opens email application with a new email to provided address."}),"\n",(0,t.jsx)(n.p,{children:"Example usage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'await new EmailUrl("test@mail.com").open();\n'})}),"\n",(0,t.jsx)(n.h2,{id:"httpurl",children:"HttpUrl"}),"\n",(0,t.jsx)(n.p,{children:"Opens browser or application to handle provided web address."}),"\n",(0,t.jsxs)(n.p,{children:["If web address doesn't start with ",(0,t.jsx)(n.code,{children:"http"})," then ",(0,t.jsx)(n.code,{children:"https://"})," will be pasted before the address."]}),"\n",(0,t.jsx)(n.p,{children:"Example usage:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'await new HttpUrl("google.com").open();\n'})}),"\n",(0,t.jsx)(n.h2,{id:"create-your-own-handlers",children:"Create your own handlers"}),"\n",(0,t.jsxs)(n.p,{children:["All the previously described openers extend abstract ",(0,t.jsx)(n.code,{children:"BaseUrlOpener"})," which uses ",(0,t.jsx)(n.a,{href:"https://reactnative.dev/docs/linking",children:"Linking.openURL"})," under the hood when trying to open your params."]}),"\n",(0,t.jsxs)(n.p,{children:["You can create your own class extend it from ",(0,t.jsx)(n.code,{children:"BaseUrlOpener"}),", set your own ",(0,t.jsx)(n.code,{children:"constructor"})," and ",(0,t.jsx)(n.code,{children:"generateUrl"}),", like so:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",children:'export class MyParamUrl extends BaseUrlOpener {\n //Define your parameters\n constructor(private myParam: string | null) {\n super();\n }\n\n protected generateUrl(): string | null {\n if (this.myParam == null) {\n return null;\n } else {\n //Do some action here\n return "do something";\n }\n }\n}\n'})})]})}function c(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},1151:(e,n,r)=>{r.d(n,{Z:()=>i,a:()=>a});var t=r(7294);const s={},l=t.createContext(s);function a(e){const n=t.useContext(l);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.45274bc2.js b/assets/js/a7bd4aaa.45274bc2.js deleted file mode 100644 index ea2bd3e1..00000000 --- a/assets/js/a7bd4aaa.45274bc2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8518],{8564:(e,n,s)=>{s.r(n),s.d(n,{default:()=>d});s(7294);var r=s(833),o=s(3320),t=s(4477),i=s(8790),c=s(197),u=s(5893);function a(e){const{version:n}=e;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.Z,{version:n.version,tag:(0,o.os)(n.pluginId,n.version)}),(0,u.jsx)(r.d,{children:n.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(e){const{version:n,route:s}=e;return(0,u.jsx)(r.FG,{className:n.className,children:(0,u.jsx)(t.q,{version:n,children:(0,i.H)(s.routes)})})}function d(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...e}),(0,u.jsx)(l,{...e})]})}}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.dc097708.js b/assets/js/a7bd4aaa.dc097708.js new file mode 100644 index 00000000..2fba1b34 --- /dev/null +++ b/assets/js/a7bd4aaa.dc097708.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7098],{4532:(e,n,s)=>{s.r(n),s.d(n,{default:()=>x});s(6540);var r=s(9024),t=s(2967),o=s(2252),i=s(2831),c=s(1463),u=s(4848);function a(e){const{version:n}=e;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.A,{version:n.version,tag:(0,t.tU)(n.pluginId,n.version)}),(0,u.jsx)(r.be,{children:n.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(e){const{version:n,route:s}=e;return(0,u.jsx)(r.e3,{className:n.className,children:(0,u.jsx)(o.n,{version:n,children:(0,i.v)(s.routes)})})}function x(e){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...e}),(0,u.jsx)(l,{...e})]})}}}]); \ No newline at end of file diff --git a/assets/js/a7e83710.05b1cebe.js b/assets/js/a7e83710.05b1cebe.js deleted file mode 100644 index c1bb3093..00000000 --- a/assets/js/a7e83710.05b1cebe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8857],{7085:e=>{e.exports=JSON.parse('{"name":"docusaurus-theme-search-algolia","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/a88c1c0e.7dd4f8c7.js b/assets/js/a88c1c0e.7dd4f8c7.js new file mode 100644 index 00000000..b38a2e2e --- /dev/null +++ b/assets/js/a88c1c0e.7dd4f8c7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8298],{3830:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var s=o(4848),t=o(8453);const i={sidebar_position:4,title:"Vector icons"},c=void 0,r={id:"resources/vector-icons",title:"Vector icons",description:"Content",source:"@site/docs/resources/vector-icons.md",sourceDirName:"resources",slug:"/resources/vector-icons",permalink:"/react-native-template-strong/docs/resources/vector-icons",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/resources/vector-icons.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Vector icons"},sidebar:"tutorialSidebar",previous:{title:"SF Symbols",permalink:"/react-native-template-strong/docs/resources/sf-symbols"},next:{title:"Colors",permalink:"/react-native-template-strong/docs/themes/colors"}},a={},l=[{value:"Content",id:"content",level:2},{value:"Browsing icons",id:"browsing-icons",level:2},{value:"Using icons in navigation",id:"using-icons-in-navigation",level:2},{value:"Using icons as components",id:"using-icons-as-components",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(n.p,{children:["The preferable way to show icons on Android is to use ",(0,s.jsx)(n.a,{href:"https://fonts.google.com/icons",children:"Material Icons"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Usage of icons in the application is made possible by ",(0,s.jsx)(n.a,{href:"https://github.com/oblador/react-native-vector-icons",children:"react-native-vector-icons"})]}),"\n",(0,s.jsx)(n.h2,{id:"browsing-icons",children:"Browsing icons"}),"\n",(0,s.jsxs)(n.p,{children:["To take a look at them without using them you can open ",(0,s.jsx)(n.a,{href:"https://fonts.google.com/icons",children:"Material Icons"})," and browse through them."]}),"\n",(0,s.jsx)(n.p,{children:"Find an icon which suits your need and use its name."}),"\n",(0,s.jsx)(n.h2,{id:"using-icons-in-navigation",children:"Using icons in navigation"}),"\n",(0,s.jsx)(n.p,{children:"To access icons in navigation you need to get them as PNG image/source asset."}),"\n",(0,s.jsx)(n.p,{children:"It can be achieved next way:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'import Icon from "react-native-vector-icons/MaterialIcons";\n\nMain.options = {\n bottomTab: {\n icon: Icon.getImageSourceSync("person", 20),\n },\n};\n'})}),"\n",(0,s.jsxs)(n.p,{children:["To learn more check this ",(0,s.jsx)(n.a,{href:"https://github.com/oblador/react-native-vector-icons#usage-as-png-imagesource-object",children:"descriptions"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"using-icons-as-components",children:"Using icons as components"}),"\n",(0,s.jsx)(n.p,{children:"You can use it directly like so:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'import Icon from "react-native-vector-icons/MaterialIcons";\n\n \n'})}),"\n",(0,s.jsx)(n.p,{children:"But it will be shown only on Android, which is not desired."}),"\n",(0,s.jsxs)(n.p,{children:["To work with both iOS and Android, there's ",(0,s.jsx)(n.a,{href:"/react-native-template-strong/docs/components/icon-platform",children:"IconPlatform"})," component,\nwhich shows SF Symbols on iOS and Material Icons on Android, it works next way:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:' \n'})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>c,x:()=>r});var s=o(6540);const t={},i=s.createContext(t);function c(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a88c1c0e.e18aba6f.js b/assets/js/a88c1c0e.e18aba6f.js deleted file mode 100644 index 0634e03d..00000000 --- a/assets/js/a88c1c0e.e18aba6f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7748],{295:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var t=o(5893),s=o(1151);const i={sidebar_position:4,title:"Vector icons"},c=void 0,r={id:"resources/vector-icons",title:"Vector icons",description:"Content",source:"@site/docs/resources/vector-icons.md",sourceDirName:"resources",slug:"/resources/vector-icons",permalink:"/react-native-template-strong/docs/resources/vector-icons",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/resources/vector-icons.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Vector icons"},sidebar:"tutorialSidebar",previous:{title:"SF Symbols",permalink:"/react-native-template-strong/docs/resources/sf-symbols"},next:{title:"Colors",permalink:"/react-native-template-strong/docs/themes/colors"}},a={},l=[{value:"Content",id:"content",level:2},{value:"Browsing icons",id:"browsing-icons",level:2},{value:"Using icons in navigation",id:"using-icons-in-navigation",level:2},{value:"Using icons as components",id:"using-icons-as-components",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,t.jsxs)(n.p,{children:["The preferable way to show icons on Android is to use ",(0,t.jsx)(n.a,{href:"https://fonts.google.com/icons",children:"Material Icons"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Usage of icons in the application is made possible by ",(0,t.jsx)(n.a,{href:"https://github.com/oblador/react-native-vector-icons",children:"react-native-vector-icons"})]}),"\n",(0,t.jsx)(n.h2,{id:"browsing-icons",children:"Browsing icons"}),"\n",(0,t.jsxs)(n.p,{children:["To take a look at them without using them you can open ",(0,t.jsx)(n.a,{href:"https://fonts.google.com/icons",children:"Material Icons"})," and browse through them."]}),"\n",(0,t.jsx)(n.p,{children:"Find an icon which suits your need and use its name."}),"\n",(0,t.jsx)(n.h2,{id:"using-icons-in-navigation",children:"Using icons in navigation"}),"\n",(0,t.jsx)(n.p,{children:"To access icons in navigation you need to get them as PNG image/source asset."}),"\n",(0,t.jsx)(n.p,{children:"It can be achieved next way:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'import Icon from "react-native-vector-icons/MaterialIcons";\n\nMain.options = {\n bottomTab: {\n icon: Icon.getImageSourceSync("person", 20),\n },\n};\n'})}),"\n",(0,t.jsxs)(n.p,{children:["To learn more check this ",(0,t.jsx)(n.a,{href:"https://github.com/oblador/react-native-vector-icons#usage-as-png-imagesource-object",children:"descriptions"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"using-icons-as-components",children:"Using icons as components"}),"\n",(0,t.jsx)(n.p,{children:"You can use it directly like so:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'import Icon from "react-native-vector-icons/MaterialIcons";\n\n \n'})}),"\n",(0,t.jsx)(n.p,{children:"But it will be shown only on Android, which is not desired."}),"\n",(0,t.jsxs)(n.p,{children:["To work with both iOS and Android, there's ",(0,t.jsx)(n.a,{href:"/react-native-template-strong/docs/components/icon-platform",children:"IconPlatform"})," component,\nwhich shows SF Symbols on iOS and Material Icons on Android, it works next way:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:' \n'})})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},1151:(e,n,o)=>{o.d(n,{Z:()=>r,a:()=>c});var t=o(7294);const s={},i=t.createContext(s);function c(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.0ebbf8ff.js b/assets/js/a94703ab.0ebbf8ff.js new file mode 100644 index 00000000..6d28dd73 --- /dev/null +++ b/assets/js/a94703ab.0ebbf8ff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9048],{2559:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(6540),o=n(4164),i=n(9024),s=n(7559),l=n(1754),r=n(6588),c=n(1312),d=n(3104),u=n(5062);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(4848);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.gk)();return(0,d.Mq)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a {e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",s.G.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(3109),x=n(6347),j=n(4581),f=n(6342),v=n(3465);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const A={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function g(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",A.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:A.collapseSidebarButtonIcon})})}var k=n(5041),C=n(9532);const S=Symbol("EmptyContext"),T=a.createContext(S);function N(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(T.Provider,{value:i,children:t})}var I=n(1422),B=n(9169),y=n(8774),w=n(2303);function L(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.T)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.T)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function E(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:j}}}=(0,f.p)(),v=function(e){const t=(0,w.A)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.Nr)(e):void 0),[e,t])}(t),_=(0,l.w8)(t,i),A=(0,B.ys)(x,i),{collapsed:g,setCollapsed:k}=(0,I.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:N,setExpandedItem:E}=function(){const e=(0,a.useContext)(T);if(e===S)throw new C.dV("DocSidebarItemsExpandedStateProvider");return e}(),M=function(e){void 0===e&&(e=!g),E(e?null:c),k(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,C.ZC)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:g,updateCollapsed:M}),(0,a.useEffect)((()=>{h&&null!=N&&N!==c&&j&&k(!0)}),[h,N,c,k,j]),(0,b.jsxs)("li",{className:(0,o.A)(s.G.docs.docSidebarItemCategory,s.G.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":g},p),children:[(0,b.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":A}),children:[(0,b.jsx)(y.A,{className:(0,o.A)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?M(!1):(e.preventDefault(),M())}:()=>{n?.(t)},"aria-current":A?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!g:void 0,href:h?v??"#":v,...d,children:m}),x&&h&&(0,b.jsx)(L,{collapsed:g,categoryLabel:m,onClick:e=>{e.preventDefault(),M()}})]}),(0,b.jsx)(I.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:(0,b.jsx)(U,{items:u,tabIndex:g?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var M=n(6654),H=n(3186);const G={menuExternalLink:"menuExternalLink_NmtK"};function W(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l.w8)(t,a),x=(0,M.A)(d);return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(y.A,{className:(0,o.A)("menu__link",!x&&G.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(H.A,{})]})},u)}const P={menuHtmlItem:"menuHtmlItem_M9Kj"};function R(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(n),l&&[P.menuHtmlItem,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function D(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(E,{item:t,...n});case"html":return(0,b.jsx)(R,{item:t,...n});default:return(0,b.jsx)(W,{item:t,...n})}}function F(e){let{items:t,...n}=e;const a=(0,l.Y)(t,n.activePath);return(0,b.jsx)(N,{children:a.map(((e,t)=>(0,b.jsx)(D,{item:e,index:t,...n},t)))})}const U=(0,a.memo)(F),V={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function Y(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,k.Mj)(),[t,n]=(0,a.useState)(e);return(0,d.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",V.menu,l&&V.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(U,{items:n,activePath:t,level:1})})})}const K="sidebar_njMd",z="sidebarWithHideableNavbar_wUlq",q="sidebarHidden_VK0M",O="sidebarLogo_isFc";function J(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,f.p)();return(0,b.jsxs)("div",{className:(0,o.A)(K,s&&z,i&&q),children:[s&&(0,b.jsx)(v.A,{tabIndex:-1,className:O}),(0,b.jsx)(Y,{path:t,sidebar:n}),l&&(0,b.jsx)(g,{onClick:a})]})}const Q=a.memo(J);var X=n(5600),Z=n(2069);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,Z.M)();return(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(U,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(X.GX,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,j.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(Q,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,c.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function se(e){let{children:t}=e;const n=(0,r.t)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.zy)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.O)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.A)(s.G.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.A)(ie.sidebarViewport,r&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const re={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ce(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.t)();return(0,b.jsx)("main",{className:(0,o.A)(re.docMainContainer,(t||!a)&&re.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",re.docItemWrapper,t&&re.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function ue(e){let{children:t}=e;const n=(0,r.t)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ce,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(3363);function be(e){const t=(0,l.B5)(e);if(!t)return(0,b.jsx)(me.A,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.e3,{className:(0,o.A)(s.G.page.docsDocPage),children:(0,b.jsx)(r.V,{name:a,items:c,children:(0,b.jsx)(ue,{children:n})})})}},3363:(e,t,n)=>{n.d(t,{A:()=>l});n(6540);var a=n(4164),o=n(1312),i=n(1107),s=n(4848);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.5018fc8a.js b/assets/js/a94703ab.5018fc8a.js deleted file mode 100644 index f2f44961..00000000 --- a/assets/js/a94703ab.5018fc8a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4368],{2674:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(7294),o=n(512),i=n(833),s=n(5281),l=n(2802),r=n(1116),c=n(5999),d=n(2466),u=n(5936);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(5893);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.Ct)();return(0,d.RF)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a {e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.Z)("clean-btn",s.k.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(1442),x=n(6550),f=n(7524),j=n(6668),k=n(1327);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const v={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function g(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.Z)("button button--secondary button--outline",v.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:v.collapseSidebarButtonIcon})})}var C=n(9689),S=n(902);const I=Symbol("EmptyContext"),N=a.createContext(I);function T(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(N.Provider,{value:i,children:t})}var B=n(6043),Z=n(8596),A=n(3692),L=n(2389);function y(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.I)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.I)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),type:"button",className:"clean-btn menu__caret",onClick:a})}function w(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:f}}}=(0,j.L)(),k=function(e){const t=(0,L.Z)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.LM)(e):void 0),[e,t])}(t),_=(0,l._F)(t,i),v=(0,Z.Mg)(x,i),{collapsed:g,setCollapsed:C}=(0,B.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:T,setExpandedItem:w}=function(){const e=(0,a.useContext)(N);if(e===I)throw new S.i6("DocSidebarItemsExpandedStateProvider");return e}(),E=function(e){void 0===e&&(e=!g),w(e?null:c),C(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,S.D9)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:g,updateCollapsed:E}),(0,a.useEffect)((()=>{h&&null!=T&&T!==c&&f&&C(!0)}),[h,T,c,C,f]),(0,b.jsxs)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemCategory,s.k.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":g},p),children:[(0,b.jsxs)("div",{className:(0,o.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":v}),children:[(0,b.jsx)(A.Z,{className:(0,o.Z)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?E(!1):(e.preventDefault(),E())}:()=>{n?.(t)},"aria-current":v?"page":void 0,"aria-expanded":h?!g:void 0,href:h?k??"#":k,...d,children:m}),x&&h&&(0,b.jsx)(y,{collapsed:g,categoryLabel:m,onClick:e=>{e.preventDefault(),E()}})]}),(0,b.jsx)(B.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:(0,b.jsx)(V,{items:u,tabIndex:g?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var E=n(3919),H=n(9471);const M={menuExternalLink:"menuExternalLink_NmtK"};function R(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l._F)(t,a),x=(0,E.Z)(d);return(0,b.jsx)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemLink,s.k.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(A.Z,{className:(0,o.Z)("menu__link",!x&&M.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(H.Z,{})]})},u)}const W={menuHtmlItem:"menuHtmlItem_M9Kj"};function F(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.Z)(s.k.docs.docSidebarItemLink,s.k.docs.docSidebarItemLinkLevel(n),l&&[W.menuHtmlItem,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function P(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(w,{item:t,...n});case"html":return(0,b.jsx)(F,{item:t,...n});default:return(0,b.jsx)(R,{item:t,...n})}}function D(e){let{items:t,...n}=e;const a=(0,l.f)(t,n.activePath);return(0,b.jsx)(T,{children:a.map(((e,t)=>(0,b.jsx)(P,{item:e,index:t,...n},t)))})}const V=(0,a.memo)(D),U={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function K(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,C.nT)(),[t,n]=(0,a.useState)(e);return(0,d.RF)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.I)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.Z)("menu thin-scrollbar",U.menu,l&&U.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.Z)(s.k.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:n,activePath:t,level:1})})})}const Y="sidebar_njMd",z="sidebarWithHideableNavbar_wUlq",G="sidebarHidden_VK0M",O="sidebarLogo_isFc";function q(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,j.L)();return(0,b.jsxs)("div",{className:(0,o.Z)(Y,s&&z,i&&G),children:[s&&(0,b.jsx)(k.Z,{tabIndex:-1,className:O}),(0,b.jsx)(K,{path:t,sidebar:n}),l&&(0,b.jsx)(g,{onClick:a})]})}const J=a.memo(q);var Q=n(3102),X=n(3163);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,X.e)();return(0,b.jsx)("ul",{className:(0,o.Z)(s.k.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(V,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(Q.Zo,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,f.i)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(J,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,c.I)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.I)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function se(e){let{children:t}=e;const n=(0,r.V)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.TH)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.n)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.Z)(s.k.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.Z)(ie.sidebarViewport,r&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const re={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ce(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.V)();return(0,b.jsx)("main",{className:(0,o.Z)(re.docMainContainer,(t||!a)&&re.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.Z)("container padding-top--md padding-bottom--lg",re.docItemWrapper,t&&re.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function ue(e){let{children:t}=e;const n=(0,r.V)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ce,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(5658);function be(e){const t=(0,l.SN)(e);if(!t)return(0,b.jsx)(me.Z,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.FG,{className:(0,o.Z)(s.k.page.docsDocPage),children:(0,b.jsx)(r.b,{name:a,items:c,children:(0,b.jsx)(ue,{children:n})})})}},5658:(e,t,n)=>{n.d(t,{Z:()=>l});n(7294);var a=n(512),o=n(5999),i=n(2503),s=n(5893);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.Z)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.Z,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/aae46502.109142a6.js b/assets/js/aae46502.109142a6.js new file mode 100644 index 00000000..9c5909ac --- /dev/null +++ b/assets/js/aae46502.109142a6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1047],{6761:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=n(4848),r=n(8453);const o={sidebar_position:4,title:"useBackHandler"},a=void 0,i={id:"hooks/use-back-handler",title:"useBackHandler",description:"Content",source:"@site/docs/hooks/use-back-handler.md",sourceDirName:"hooks",slug:"/hooks/use-back-handler",permalink:"/react-native-template-strong/docs/hooks/use-back-handler",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/hooks/use-back-handler.md",tags:[],version:"current",lastUpdatedAt:1633405147e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"useBackHandler"},sidebar:"tutorialSidebar",previous:{title:"useEventRegister",permalink:"/react-native-template-strong/docs/hooks/use-event-register"},next:{title:"usePrevious",permalink:"/react-native-template-strong/docs/hooks/use-previous"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2}];function l(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Creates a simple ",(0,s.jsx)(t.code,{children:"hardwareBackPress"})," listener with provided ",(0,s.jsx)(t.code,{children:"handler"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" const backHandler = useCallback(() => {\n //Do something here\n return true;\n }, []);\n\n useBackHandler(backHandler);\n"})})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>i});var s=n(6540);const r={},o=s.createContext(r);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/aae46502.1f20f75a.js b/assets/js/aae46502.1f20f75a.js deleted file mode 100644 index 4cb14ec9..00000000 --- a/assets/js/aae46502.1f20f75a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5565],{2590:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var s=n(5893),r=n(1151);const a={sidebar_position:4,title:"useBackHandler"},o=void 0,i={id:"hooks/use-back-handler",title:"useBackHandler",description:"Content",source:"@site/docs/hooks/use-back-handler.md",sourceDirName:"hooks",slug:"/hooks/use-back-handler",permalink:"/react-native-template-strong/docs/hooks/use-back-handler",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/hooks/use-back-handler.md",tags:[],version:"current",lastUpdatedAt:1633405147,formattedLastUpdatedAt:"Oct 5, 2021",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"useBackHandler"},sidebar:"tutorialSidebar",previous:{title:"useEventRegister",permalink:"/react-native-template-strong/docs/hooks/use-event-register"},next:{title:"usePrevious",permalink:"/react-native-template-strong/docs/hooks/use-previous"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2}];function l(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Creates a simple ",(0,s.jsx)(t.code,{children:"hardwareBackPress"})," listener with provided ",(0,s.jsx)(t.code,{children:"handler"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" const backHandler = useCallback(() => {\n //Do something here\n return true;\n }, []);\n\n useBackHandler(backHandler);\n"})})]})}function u(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>o});var s=n(7294);const r={},a=s.createContext(r);function o(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/37742c1c.139248a1.js b/assets/js/aba21aa0.9ac6642b.js similarity index 63% rename from assets/js/37742c1c.139248a1.js rename to assets/js/aba21aa0.9ac6642b.js index 76bb4586..0c1598dd 100644 --- a/assets/js/37742c1c.139248a1.js +++ b/assets/js/aba21aa0.9ac6642b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5887],{3769:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5742],{7093:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/ae8ecedf.433c66a5.js b/assets/js/ae8ecedf.433c66a5.js deleted file mode 100644 index 879472e5..00000000 --- a/assets/js/ae8ecedf.433c66a5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4769],{4227:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>s,metadata:()=>r,toc:()=>f});var n=o(5893),i=o(1151);const s={sidebar_position:7,title:"Detox config"},c=void 0,r={id:"configs/detox-config",title:"Detox config",description:"Detox config is configured to work with TypeScript.",source:"@site/docs/configs/detox-config.md",sourceDirName:"configs",slug:"/configs/detox-config",permalink:"/react-native-template-strong/docs/configs/detox-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/detox-config.md",tags:[],version:"current",lastUpdatedAt:1633194349,formattedLastUpdatedAt:"Oct 2, 2021",sidebarPosition:7,frontMatter:{sidebar_position:7,title:"Detox config"},sidebar:"tutorialSidebar",previous:{title:"Jest config",permalink:"/react-native-template-strong/docs/configs/jest-config"},next:{title:"Babel config",permalink:"/react-native-template-strong/docs/configs/babel-config"}},a={},f=[];function d(t){const e={p:"p",...(0,i.a)(),...t.components};return(0,n.jsx)(e.p,{children:"Detox config is configured to work with TypeScript."})}function p(t={}){const{wrapper:e}={...(0,i.a)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(d,{...t})}):d(t)}},1151:(t,e,o)=>{o.d(e,{Z:()=>r,a:()=>c});var n=o(7294);const i={},s=n.createContext(i);function c(t){const e=n.useContext(s);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:c(t.components),n.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/ae8ecedf.72395bdf.js b/assets/js/ae8ecedf.72395bdf.js new file mode 100644 index 00000000..1eafeeff --- /dev/null +++ b/assets/js/ae8ecedf.72395bdf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1354],{4659:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>s,metadata:()=>r,toc:()=>f});var n=o(4848),i=o(8453);const s={sidebar_position:7,title:"Detox config"},c=void 0,r={id:"configs/detox-config",title:"Detox config",description:"Detox config is configured to work with TypeScript.",source:"@site/docs/configs/detox-config.md",sourceDirName:"configs",slug:"/configs/detox-config",permalink:"/react-native-template-strong/docs/configs/detox-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/detox-config.md",tags:[],version:"current",lastUpdatedAt:1633194349e3,sidebarPosition:7,frontMatter:{sidebar_position:7,title:"Detox config"},sidebar:"tutorialSidebar",previous:{title:"Jest config",permalink:"/react-native-template-strong/docs/configs/jest-config"},next:{title:"Babel config",permalink:"/react-native-template-strong/docs/configs/babel-config"}},a={},f=[];function d(t){const e={p:"p",...(0,i.R)(),...t.components};return(0,n.jsx)(e.p,{children:"Detox config is configured to work with TypeScript."})}function p(t={}){const{wrapper:e}={...(0,i.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(d,{...t})}):d(t)}},8453:(t,e,o)=>{o.d(e,{R:()=>c,x:()=>r});var n=o(6540);const i={},s=n.createContext(i);function c(t){const e=n.useContext(s);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:c(t.components),n.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/b1ef8e0a.4a06a167.js b/assets/js/b1ef8e0a.4a06a167.js deleted file mode 100644 index 508becba..00000000 --- a/assets/js/b1ef8e0a.4a06a167.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9702],{1297:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>g,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=t(5893),a=t(1151);const s={sidebar_position:3,title:"Pages"},o=void 0,r={id:"navigation/pages",title:"Pages",description:"Content",source:"@site/docs/navigation/pages.md",sourceDirName:"navigation",slug:"/navigation/pages",permalink:"/react-native-template-strong/docs/navigation/pages",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/pages.md",tags:[],version:"current",lastUpdatedAt:1688639826,formattedLastUpdatedAt:"Jul 6, 2023",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Pages"},sidebar:"tutorialSidebar",previous:{title:"Default options",permalink:"/react-native-template-strong/docs/navigation/default-options"},next:{title:"Roots",permalink:"/react-native-template-strong/docs/navigation/roots"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Adding pages",id:"adding-pages",level:2},{value:"Registering pages",id:"registering-pages",level:2},{value:"Using pages",id:"using-pages",level:2}];function l(e){const n={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,i.jsxs)(n.p,{children:["Pages constants are located in ",(0,i.jsx)(n.code,{children:"src/navigation/pages.ts"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'export const Pages = {\n storybook: {\n id: "STORYBOOK",\n name: "Storybook",\n },\n splash: {\n id: "SPLASH_SCREEN",\n name: "SplashScreen",\n },\n onboarding: {\n id: "ONBOARDING_SCREEN",\n name: "OnboardingScreen",\n },\n toast: {\n id: "TOAST",\n name: "ToastOverlay",\n },\n datePicker: {\n id: "DATE_PICKER",\n name: "DatePickerOverlay",\n },\n tabs: {\n id: "BOTTOM_TABS",\n name: "BottomTabs",\n },\n main: {\n id: "MAIN_SCREEN",\n name: "MainScreen",\n },\n search: {\n id: "SEARCH_SCREEN",\n name: "SearchScreen",\n },\n settings: {\n id: "SETTINGS_SCREEN",\n name: "SettingsScreen",\n },\n};\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Pages are defined as the object which contains page names as parameters which are objects with ",(0,i.jsx)(n.code,{children:"name"})," and ",(0,i.jsx)(n.code,{children:"id"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Here besides pages itself you add modals, overlays and other components which will be registered in navigation (i.e. ",(0,i.jsx)(n.code,{children:"registerNavigationComponent"}),")."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"registerNavigationComponent"})," - shorthand function to simplify registration of a page."]}),"\n",(0,i.jsxs)(n.p,{children:["Such examples are ",(0,i.jsx)(n.code,{children:"toast"})," and ",(0,i.jsx)(n.code,{children:"datePicker"})," properties of ",(0,i.jsx)(n.code,{children:"Pages"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"adding-pages",children:"Adding pages"}),"\n",(0,i.jsxs)(n.p,{children:["To add a page, simply add your own property in ",(0,i.jsx)(n.code,{children:"Pages"})," with ",(0,i.jsx)(n.code,{children:"id"})," and ",(0,i.jsx)(n.code,{children:"name"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"registering-pages",children:"Registering pages"}),"\n",(0,i.jsxs)(n.p,{children:["All the pages are being registered in ",(0,i.jsx)(n.code,{children:"src/navigation/navigation.ts"}),"'s ",(0,i.jsx)(n.code,{children:"registerComponents"})," function which is being called at initialization of application."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"export function registerComponents() {\n if (__DEV__) {\n registerNavigationComponent(Pages.storybook, StorybookUIRoot);\n }\n registerNavigationComponent(Pages.splash, Splash, true);\n registerNavigationComponent(Pages.onboarding, Onboarding);\n registerNavigationComponent(Pages.main, Main);\n registerNavigationComponent(Pages.search, Search);\n registerNavigationComponent(Pages.settings, Settings);\n registerNavigationComponent(Pages.toast, ToastOverlay);\n registerNavigationComponent(Pages.datePicker, DatePickerOverlay);\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["If your page or component is going to be a simple component which won't be communication with ",(0,i.jsx)(n.code,{children:"redux"})," then you can simply register it the next way:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:" registerNavigationComponent(Pages.yourPage, YourPage);\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Otherwise, add a third parameter with ",(0,i.jsx)(n.code,{children:"true"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:" registerNavigationComponent(Pages.yourPage, YourPage, true);\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The communication with ",(0,i.jsx)(n.code,{children:"redux"})," and usage will be explained later."]}),"\n",(0,i.jsx)(n.h2,{id:"using-pages",children:"Using pages"}),"\n",(0,i.jsx)(n.p,{children:"Create a simple function component like so and describe its options if needed:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'export const YourPage: NavigationFunctionComponent = (): JSX.Element => {\n return ;\n};\n\nYourPage.options = {\n topBar: {\n largeTitle: {\n visible: true,\n },\n searchBar: {\n visible: false,\n },\n title: {\n text: localization.pages.yourPage,\n },\n },\n};\n'})}),"\n",(0,i.jsx)(n.admonition,{title:"Tip",type:"tip",children:(0,i.jsxs)(n.p,{children:["Try to use ",(0,i.jsx)(n.code,{children:"ScrollView"})," as your parent component in order to have the best behavior on iOS."]})})]})}function g(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>r,a:()=>o});var i=t(7294);const a={},s=i.createContext(a);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b1ef8e0a.78d9bebe.js b/assets/js/b1ef8e0a.78d9bebe.js new file mode 100644 index 00000000..31110af5 --- /dev/null +++ b/assets/js/b1ef8e0a.78d9bebe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3521],{4497:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>g,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=t(4848),a=t(8453);const s={sidebar_position:3,title:"Pages"},o=void 0,r={id:"navigation/pages",title:"Pages",description:"Content",source:"@site/docs/navigation/pages.md",sourceDirName:"navigation",slug:"/navigation/pages",permalink:"/react-native-template-strong/docs/navigation/pages",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/pages.md",tags:[],version:"current",lastUpdatedAt:1688639826e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Pages"},sidebar:"tutorialSidebar",previous:{title:"Default options",permalink:"/react-native-template-strong/docs/navigation/default-options"},next:{title:"Roots",permalink:"/react-native-template-strong/docs/navigation/roots"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Adding pages",id:"adding-pages",level:2},{value:"Registering pages",id:"registering-pages",level:2},{value:"Using pages",id:"using-pages",level:2}];function l(e){const n={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,i.jsxs)(n.p,{children:["Pages constants are located in ",(0,i.jsx)(n.code,{children:"src/navigation/pages.ts"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'export const Pages = {\n storybook: {\n id: "STORYBOOK",\n name: "Storybook",\n },\n splash: {\n id: "SPLASH_SCREEN",\n name: "SplashScreen",\n },\n onboarding: {\n id: "ONBOARDING_SCREEN",\n name: "OnboardingScreen",\n },\n toast: {\n id: "TOAST",\n name: "ToastOverlay",\n },\n datePicker: {\n id: "DATE_PICKER",\n name: "DatePickerOverlay",\n },\n tabs: {\n id: "BOTTOM_TABS",\n name: "BottomTabs",\n },\n main: {\n id: "MAIN_SCREEN",\n name: "MainScreen",\n },\n search: {\n id: "SEARCH_SCREEN",\n name: "SearchScreen",\n },\n settings: {\n id: "SETTINGS_SCREEN",\n name: "SettingsScreen",\n },\n};\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Pages are defined as the object which contains page names as parameters which are objects with ",(0,i.jsx)(n.code,{children:"name"})," and ",(0,i.jsx)(n.code,{children:"id"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Here besides pages itself you add modals, overlays and other components which will be registered in navigation (i.e. ",(0,i.jsx)(n.code,{children:"registerNavigationComponent"}),")."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"registerNavigationComponent"})," - shorthand function to simplify registration of a page."]}),"\n",(0,i.jsxs)(n.p,{children:["Such examples are ",(0,i.jsx)(n.code,{children:"toast"})," and ",(0,i.jsx)(n.code,{children:"datePicker"})," properties of ",(0,i.jsx)(n.code,{children:"Pages"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"adding-pages",children:"Adding pages"}),"\n",(0,i.jsxs)(n.p,{children:["To add a page, simply add your own property in ",(0,i.jsx)(n.code,{children:"Pages"})," with ",(0,i.jsx)(n.code,{children:"id"})," and ",(0,i.jsx)(n.code,{children:"name"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"registering-pages",children:"Registering pages"}),"\n",(0,i.jsxs)(n.p,{children:["All the pages are being registered in ",(0,i.jsx)(n.code,{children:"src/navigation/navigation.ts"}),"'s ",(0,i.jsx)(n.code,{children:"registerComponents"})," function which is being called at initialization of application."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"export function registerComponents() {\n if (__DEV__) {\n registerNavigationComponent(Pages.storybook, StorybookUIRoot);\n }\n registerNavigationComponent(Pages.splash, Splash, true);\n registerNavigationComponent(Pages.onboarding, Onboarding);\n registerNavigationComponent(Pages.main, Main);\n registerNavigationComponent(Pages.search, Search);\n registerNavigationComponent(Pages.settings, Settings);\n registerNavigationComponent(Pages.toast, ToastOverlay);\n registerNavigationComponent(Pages.datePicker, DatePickerOverlay);\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["If your page or component is going to be a simple component which won't be communication with ",(0,i.jsx)(n.code,{children:"redux"})," then you can simply register it the next way:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:" registerNavigationComponent(Pages.yourPage, YourPage);\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Otherwise, add a third parameter with ",(0,i.jsx)(n.code,{children:"true"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:" registerNavigationComponent(Pages.yourPage, YourPage, true);\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The communication with ",(0,i.jsx)(n.code,{children:"redux"})," and usage will be explained later."]}),"\n",(0,i.jsx)(n.h2,{id:"using-pages",children:"Using pages"}),"\n",(0,i.jsx)(n.p,{children:"Create a simple function component like so and describe its options if needed:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:'export const YourPage: NavigationFunctionComponent = (): JSX.Element => {\n return ;\n};\n\nYourPage.options = {\n topBar: {\n largeTitle: {\n visible: true,\n },\n searchBar: {\n visible: false,\n },\n title: {\n text: localization.pages.yourPage,\n },\n },\n};\n'})}),"\n",(0,i.jsx)(n.admonition,{title:"Tip",type:"tip",children:(0,i.jsxs)(n.p,{children:["Try to use ",(0,i.jsx)(n.code,{children:"ScrollView"})," as your parent component in order to have the best behavior on iOS."]})})]})}function g(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var i=t(6540);const a={},s=i.createContext(a);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b4a96655.5160f3d0.js b/assets/js/b4a96655.5160f3d0.js new file mode 100644 index 00000000..a42eb6aa --- /dev/null +++ b/assets/js/b4a96655.5160f3d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5149],{4622:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>u,contentTitle:()=>n,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=s(4848),i=s(8453);const a={sidebar_position:4,title:"serializeQueryParams"},n=void 0,o={id:"utils/serialize-query-params",title:"serializeQueryParams",description:"",source:"@site/docs/utils/serialize-query-params.md",sourceDirName:"utils",slug:"/utils/serialize-query-params",permalink:"/react-native-template-strong/docs/utils/serialize-query-params",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/utils/serialize-query-params.md",tags:[],version:"current",lastUpdatedAt:1633107579e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"serializeQueryParams"},sidebar:"tutorialSidebar",previous:{title:"URL openers",permalink:"/react-native-template-strong/docs/utils/url-openers"},next:{title:"useFlatListActions",permalink:"/react-native-template-strong/docs/hooks/use-flat-list-actions"}},u={},l=[];function c(e){return(0,r.jsx)(r.Fragment,{})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c()}},8453:(e,t,s)=>{s.d(t,{R:()=>n,x:()=>o});var r=s(6540);const i={},a=r.createContext(i);function n(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:n(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b4a96655.ab0ff656.js b/assets/js/b4a96655.ab0ff656.js deleted file mode 100644 index 39e5e4f9..00000000 --- a/assets/js/b4a96655.ab0ff656.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5277],{8044:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>u,contentTitle:()=>n,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=s(5893),i=s(1151);const a={sidebar_position:4,title:"serializeQueryParams"},n=void 0,o={id:"utils/serialize-query-params",title:"serializeQueryParams",description:"",source:"@site/docs/utils/serialize-query-params.md",sourceDirName:"utils",slug:"/utils/serialize-query-params",permalink:"/react-native-template-strong/docs/utils/serialize-query-params",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/utils/serialize-query-params.md",tags:[],version:"current",lastUpdatedAt:1633107579,formattedLastUpdatedAt:"Oct 1, 2021",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"serializeQueryParams"},sidebar:"tutorialSidebar",previous:{title:"URL openers",permalink:"/react-native-template-strong/docs/utils/url-openers"},next:{title:"useFlatListActions",permalink:"/react-native-template-strong/docs/hooks/use-flat-list-actions"}},u={},l=[];function c(e){return(0,r.jsx)(r.Fragment,{})}function p(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c()}},1151:(e,t,s)=>{s.d(t,{Z:()=>o,a:()=>n});var r=s(7294);const i={},a=r.createContext(i);function n(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:n(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b5ee907e.02d34e9f.js b/assets/js/b5ee907e.02d34e9f.js new file mode 100644 index 00000000..888002b8 --- /dev/null +++ b/assets/js/b5ee907e.02d34e9f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7381],{3853:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var r=i(4848),t=i(8453);const s={sidebar_position:22,title:"App release"},o=void 0,l={id:"app-release",title:"App release",description:"Preparations",source:"@site/docs/app-release.md",sourceDirName:".",slug:"/app-release",permalink:"/react-native-template-strong/docs/app-release",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/app-release.md",tags:[],version:"current",lastUpdatedAt:1633614778e3,sidebarPosition:22,frontMatter:{sidebar_position:22,title:"App release"},sidebar:"tutorialSidebar",previous:{title:"App icon",permalink:"/react-native-template-strong/docs/app-icon"},next:{title:"React Native config",permalink:"/react-native-template-strong/docs/configs/rn-config"}},a={},d=[{value:"Preparations",id:"preparations",level:2},{value:"Common start",id:"common-start",level:2},{value:"Android",id:"android",level:2},{value:"iOS",id:"ios",level:2},{value:"After all",id:"after-all",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"preparations",children:"Preparations"}),"\n",(0,r.jsx)(n.p,{children:"Make sure that"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"ESLint and TypeScript have no errors and warnings"}),"\n",(0,r.jsx)(n.li,{children:"All tests are running and not failing"}),"\n",(0,r.jsx)(n.li,{children:"API is reachable and working"}),"\n",(0,r.jsx)(n.li,{children:"Components and pages are rendering correctly on different devices (smartphones, tablets), different screen sizes (iPhone X, iPhone SE, iPad, Pixel 5, Android Tablet), both platforms (iOS, Android)"}),"\n",(0,r.jsx)(n.li,{children:"App icons and splash screen are set up"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"common-start",children:"Common start"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Select production environment (",(0,r.jsx)(n.code,{children:"npm run environment:production-nix"})," on macOS/Linux or ",(0,r.jsx)(n.code,{children:"npm run environment:production-win"})," on Windows)"]}),"\n",(0,r.jsxs)(n.li,{children:["Bump the update version (e.g. ",(0,r.jsx)(n.code,{children:"npm run version:major"})," for major bump)"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"android",children:"Android"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Build the release bundle (",(0,r.jsx)(n.code,{children:"npm android:build-release-bundle-nix"})," on macOS/Linux or ",(0,r.jsx)(n.code,{children:"npm run android:build-release-bundle-win"})," on Windows)"]}),"\n",(0,r.jsx)(n.li,{children:"Test that it works on one of your devices"}),"\n",(0,r.jsxs)(n.li,{children:["If everything is fine, then create an update in ",(0,r.jsx)(n.a,{href:"https://play.google.com/console/",children:"Google Play Market Developer Console"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"ios",children:"iOS"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Open ",(0,r.jsx)(n.code,{children:".xcworkspace"})," file in XCode"]}),"\n",(0,r.jsxs)(n.li,{children:["Select ",(0,r.jsx)(n.code,{children:"Any iOS device (arm64)"})," in devices"]}),"\n",(0,r.jsxs)(n.li,{children:["Select ",(0,r.jsx)(n.code,{children:"Product"})," -> ",(0,r.jsx)(n.code,{children:"Archive"})]}),"\n",(0,r.jsx)(n.li,{children:"Follow the instructions after the archive task will be completed"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"after-all",children:"After all"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Commit updated changes of iOS, Android and package.json versions"}),"\n",(0,r.jsx)(n.li,{children:"Create a tag at this commit with version name, so it would be easier to rollback."}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>l});var r=i(6540);const t={},s=r.createContext(t);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b5ee907e.07edc557.js b/assets/js/b5ee907e.07edc557.js deleted file mode 100644 index 9375c052..00000000 --- a/assets/js/b5ee907e.07edc557.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3800],{1095:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var r=i(5893),t=i(1151);const s={sidebar_position:22,title:"App release"},o=void 0,l={id:"app-release",title:"App release",description:"Preparations",source:"@site/docs/app-release.md",sourceDirName:".",slug:"/app-release",permalink:"/react-native-template-strong/docs/app-release",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/app-release.md",tags:[],version:"current",lastUpdatedAt:1633614778,formattedLastUpdatedAt:"Oct 7, 2021",sidebarPosition:22,frontMatter:{sidebar_position:22,title:"App release"},sidebar:"tutorialSidebar",previous:{title:"App icon",permalink:"/react-native-template-strong/docs/app-icon"},next:{title:"React Native config",permalink:"/react-native-template-strong/docs/configs/rn-config"}},a={},d=[{value:"Preparations",id:"preparations",level:2},{value:"Common start",id:"common-start",level:2},{value:"Android",id:"android",level:2},{value:"iOS",id:"ios",level:2},{value:"After all",id:"after-all",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,t.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"preparations",children:"Preparations"}),"\n",(0,r.jsx)(n.p,{children:"Make sure that"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"ESLint and TypeScript have no errors and warnings"}),"\n",(0,r.jsx)(n.li,{children:"All tests are running and not failing"}),"\n",(0,r.jsx)(n.li,{children:"API is reachable and working"}),"\n",(0,r.jsx)(n.li,{children:"Components and pages are rendering correctly on different devices (smartphones, tablets), different screen sizes (iPhone X, iPhone SE, iPad, Pixel 5, Android Tablet), both platforms (iOS, Android)"}),"\n",(0,r.jsx)(n.li,{children:"App icons and splash screen are set up"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"common-start",children:"Common start"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Select production environment (",(0,r.jsx)(n.code,{children:"npm run environment:production-nix"})," on macOS/Linux or ",(0,r.jsx)(n.code,{children:"npm run environment:production-win"})," on Windows)"]}),"\n",(0,r.jsxs)(n.li,{children:["Bump the update version (e.g. ",(0,r.jsx)(n.code,{children:"npm run version:major"})," for major bump)"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"android",children:"Android"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Build the release bundle (",(0,r.jsx)(n.code,{children:"npm android:build-release-bundle-nix"})," on macOS/Linux or ",(0,r.jsx)(n.code,{children:"npm run android:build-release-bundle-win"})," on Windows)"]}),"\n",(0,r.jsx)(n.li,{children:"Test that it works on one of your devices"}),"\n",(0,r.jsxs)(n.li,{children:["If everything is fine, then create an update in ",(0,r.jsx)(n.a,{href:"https://play.google.com/console/",children:"Google Play Market Developer Console"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"ios",children:"iOS"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Open ",(0,r.jsx)(n.code,{children:".xcworkspace"})," file in XCode"]}),"\n",(0,r.jsxs)(n.li,{children:["Select ",(0,r.jsx)(n.code,{children:"Any iOS device (arm64)"})," in devices"]}),"\n",(0,r.jsxs)(n.li,{children:["Select ",(0,r.jsx)(n.code,{children:"Product"})," -> ",(0,r.jsx)(n.code,{children:"Archive"})]}),"\n",(0,r.jsx)(n.li,{children:"Follow the instructions after the archive task will be completed"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"after-all",children:"After all"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Commit updated changes of iOS, Android and package.json versions"}),"\n",(0,r.jsx)(n.li,{children:"Create a tag at this commit with version name, so it would be easier to rollback."}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>l,a:()=>o});var r=i(7294);const t={},s=r.createContext(t);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b669beb2.86b73957.js b/assets/js/b669beb2.86b73957.js deleted file mode 100644 index 7e6a9b4b..00000000 --- a/assets/js/b669beb2.86b73957.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3118],{5132:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>i,metadata:()=>r,toc:()=>p});var s=n(5893),o=n(1151);const i={sidebar_position:2,title:"Splash"},a=void 0,r={id:"pages/splash",title:"Splash",description:"Content",source:"@site/docs/pages/splash.md",sourceDirName:"pages",slug:"/pages/splash",permalink:"/react-native-template-strong/docs/pages/splash",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/pages/splash.md",tags:[],version:"current",lastUpdatedAt:1633686498,formattedLastUpdatedAt:"Oct 8, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Splash"},sidebar:"tutorialSidebar",previous:{title:"Native splash",permalink:"/react-native-template-strong/docs/pages/native-splash"},next:{title:"Onboarding",permalink:"/react-native-template-strong/docs/pages/onboarding"}},c={},p=[{value:"Content",id:"content",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["It's React Native navigation page which at this moment shows ",(0,s.jsx)(t.code,{children:"LoadingComponent"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"You can try to adjust it to show replicate the native splash, or add some animation here."}),"\n",(0,s.jsx)(t.p,{children:"This page is primarily used to implement initial navigation root setting by checking different parameters."}),"\n",(0,s.jsxs)(t.p,{children:["For example, now it checks whether user opens this app first time or not in order to show him ",(0,s.jsx)(t.code,{children:"Onboarding"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const Splash: NavigationFunctionComponent = () => {\n const isOnboardingVisited = useAppSelector((state) => state.system.isOnboardingVisited);\n\n useEffect(() => {\n if (isOnboardingVisited) {\n setTabsRoot();\n } else if (isIos) {\n setTabsRoot(showOnboarding);\n } else {\n setOnboardingRoot();\n }\n }, [isOnboardingVisited]);\n\n return ;\n};\n"})}),"\n",(0,s.jsx)(t.p,{children:"You can also implement your checks here (e.g. is logged in or not)."})]})}function l(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>r,a:()=>a});var s=n(7294);const o={},i=s.createContext(o);function a(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b669beb2.ac5d5d71.js b/assets/js/b669beb2.ac5d5d71.js new file mode 100644 index 00000000..5e40a7fd --- /dev/null +++ b/assets/js/b669beb2.ac5d5d71.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[759],{8562:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>o,metadata:()=>r,toc:()=>p});var s=n(4848),i=n(8453);const o={sidebar_position:2,title:"Splash"},a=void 0,r={id:"pages/splash",title:"Splash",description:"Content",source:"@site/docs/pages/splash.md",sourceDirName:"pages",slug:"/pages/splash",permalink:"/react-native-template-strong/docs/pages/splash",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/pages/splash.md",tags:[],version:"current",lastUpdatedAt:1633686498e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Splash"},sidebar:"tutorialSidebar",previous:{title:"Native splash",permalink:"/react-native-template-strong/docs/pages/native-splash"},next:{title:"Onboarding",permalink:"/react-native-template-strong/docs/pages/onboarding"}},c={},p=[{value:"Content",id:"content",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["It's React Native navigation page which at this moment shows ",(0,s.jsx)(t.code,{children:"LoadingComponent"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"You can try to adjust it to show replicate the native splash, or add some animation here."}),"\n",(0,s.jsx)(t.p,{children:"This page is primarily used to implement initial navigation root setting by checking different parameters."}),"\n",(0,s.jsxs)(t.p,{children:["For example, now it checks whether user opens this app first time or not in order to show him ",(0,s.jsx)(t.code,{children:"Onboarding"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:"export const Splash: NavigationFunctionComponent = () => {\n const isOnboardingVisited = useAppSelector((state) => state.system.isOnboardingVisited);\n\n useEffect(() => {\n if (isOnboardingVisited) {\n setTabsRoot();\n } else if (isIos) {\n setTabsRoot(showOnboarding);\n } else {\n setOnboardingRoot();\n }\n }, [isOnboardingVisited]);\n\n return ;\n};\n"})}),"\n",(0,s.jsx)(t.p,{children:"You can also implement your checks here (e.g. is logged in or not)."})]})}function l(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var s=n(6540);const i={},o=s.createContext(i);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b801cfc7.4a2cc3ec.js b/assets/js/b801cfc7.4a2cc3ec.js new file mode 100644 index 00000000..4bbbaefa --- /dev/null +++ b/assets/js/b801cfc7.4a2cc3ec.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2265],{9866:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>a});var i=n(4848),r=n(8453);const o={sidebar_position:4,title:"Prettier config"},s=void 0,c={id:"configs/prettier-config",title:"Prettier config",description:"Prettier defines next obvious rules:",source:"@site/docs/configs/prettier-config.md",sourceDirName:"configs",slug:"/configs/prettier-config",permalink:"/react-native-template-strong/docs/configs/prettier-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/prettier-config.md",tags:[],version:"current",lastUpdatedAt:1688636932e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Prettier config"},sidebar:"tutorialSidebar",previous:{title:"ESLint config",permalink:"/react-native-template-strong/docs/configs/eslint-config"},next:{title:"Metro config",permalink:"/react-native-template-strong/docs/configs/metro-config"}},l={},a=[];function d(e){const t={li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"Prettier defines next obvious rules:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Tab width - 2"}),"\n",(0,i.jsx)(t.li,{children:"Print width - 80"}),"\n",(0,i.jsx)(t.li,{children:"Only single quotes"}),"\n",(0,i.jsx)(t.li,{children:"Trailing coma"}),"\n",(0,i.jsx)(t.li,{children:"No bracket spacing"}),"\n",(0,i.jsx)(t.li,{children:"JSX bracket shouldn't be on the same line"}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>c});var i=n(6540);const r={},o=i.createContext(r);function s(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b801cfc7.eeda6d62.js b/assets/js/b801cfc7.eeda6d62.js deleted file mode 100644 index 4e961c48..00000000 --- a/assets/js/b801cfc7.eeda6d62.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8622],{1744:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var i=n(5893),r=n(1151);const o={sidebar_position:4,title:"Prettier config"},s=void 0,c={id:"configs/prettier-config",title:"Prettier config",description:"Prettier defines next obvious rules:",source:"@site/docs/configs/prettier-config.md",sourceDirName:"configs",slug:"/configs/prettier-config",permalink:"/react-native-template-strong/docs/configs/prettier-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/prettier-config.md",tags:[],version:"current",lastUpdatedAt:1688636932,formattedLastUpdatedAt:"Jul 6, 2023",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Prettier config"},sidebar:"tutorialSidebar",previous:{title:"ESLint config",permalink:"/react-native-template-strong/docs/configs/eslint-config"},next:{title:"Metro config",permalink:"/react-native-template-strong/docs/configs/metro-config"}},a={},l=[];function d(t){const e={li:"li",p:"p",ul:"ul",...(0,r.a)(),...t.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Prettier defines next obvious rules:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Tab width - 2"}),"\n",(0,i.jsx)(e.li,{children:"Print width - 80"}),"\n",(0,i.jsx)(e.li,{children:"Only single quotes"}),"\n",(0,i.jsx)(e.li,{children:"Trailing coma"}),"\n",(0,i.jsx)(e.li,{children:"No bracket spacing"}),"\n",(0,i.jsx)(e.li,{children:"JSX bracket shouldn't be on the same line"}),"\n"]})]})}function u(t={}){const{wrapper:e}={...(0,r.a)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(d,{...t})}):d(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>c,a:()=>s});var i=n(7294);const r={},o=i.createContext(r);function s(t){const e=i.useContext(o);return i.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function c(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:s(t.components),i.createElement(o.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf3f5c43.045e65bc.js b/assets/js/bf3f5c43.045e65bc.js deleted file mode 100644 index ac003b8b..00000000 --- a/assets/js/bf3f5c43.045e65bc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2627],{919:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var s=n(5893),r=n(1151);const a={sidebar_position:1,title:"newState"},i=void 0,o={id:"utils/new-state",title:"newState",description:"Used primarily for merging redux state objects.",source:"@site/docs/utils/new-state.md",sourceDirName:"utils",slug:"/utils/new-state",permalink:"/react-native-template-strong/docs/utils/new-state",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/utils/new-state.md",tags:[],version:"current",lastUpdatedAt:1633280321,formattedLastUpdatedAt:"Oct 3, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"newState"},sidebar:"tutorialSidebar",previous:{title:"Validations",permalink:"/react-native-template-strong/docs/validations"},next:{title:"listHandlers",permalink:"/react-native-template-strong/docs/utils/list-handlers"}},d={},c=[];function l(t){const e={code:"code",p:"p",pre:"pre",...(0,r.a)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.p,{children:"Used primarily for merging redux state objects."}),"\n",(0,s.jsx)(e.p,{children:"First parameter is your current or initial state, and second is your changes to this state."}),"\n",(0,s.jsx)(e.p,{children:"Result will be new merged object."}),"\n",(0,s.jsxs)(e.p,{children:["Example usage from ",(0,s.jsx)(e.code,{children:"systemSlice.ts"}),":"]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-typescript",children:"function rehydrate(state: SystemState, rehydrateParams: RehydrateAppAction) {\n return newState(rehydrateParams.payload?.system || state, {isOnboardingVisited: rehydrateParams.payload != null});\n}\n\nfunction onboardingHandler(state: SystemState) {\n return newState(state, {isOnboardingVisited: true});\n}\n"})})]})}function u(t={}){const{wrapper:e}={...(0,r.a)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(l,{...t})}):l(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>o,a:()=>i});var s=n(7294);const r={},a=s.createContext(r);function i(t){const e=s.useContext(a);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function o(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:i(t.components),s.createElement(a.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf3f5c43.67226232.js b/assets/js/bf3f5c43.67226232.js new file mode 100644 index 00000000..f97d8b71 --- /dev/null +++ b/assets/js/bf3f5c43.67226232.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4355],{7538:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var s=n(4848),r=n(8453);const a={sidebar_position:1,title:"newState"},i=void 0,o={id:"utils/new-state",title:"newState",description:"Used primarily for merging redux state objects.",source:"@site/docs/utils/new-state.md",sourceDirName:"utils",slug:"/utils/new-state",permalink:"/react-native-template-strong/docs/utils/new-state",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/utils/new-state.md",tags:[],version:"current",lastUpdatedAt:1633280321e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"newState"},sidebar:"tutorialSidebar",previous:{title:"Validations",permalink:"/react-native-template-strong/docs/validations"},next:{title:"listHandlers",permalink:"/react-native-template-strong/docs/utils/list-handlers"}},c={},d=[];function l(t){const e={code:"code",p:"p",pre:"pre",...(0,r.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.p,{children:"Used primarily for merging redux state objects."}),"\n",(0,s.jsx)(e.p,{children:"First parameter is your current or initial state, and second is your changes to this state."}),"\n",(0,s.jsx)(e.p,{children:"Result will be new merged object."}),"\n",(0,s.jsxs)(e.p,{children:["Example usage from ",(0,s.jsx)(e.code,{children:"systemSlice.ts"}),":"]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-typescript",children:"function rehydrate(state: SystemState, rehydrateParams: RehydrateAppAction) {\n return newState(rehydrateParams.payload?.system || state, {isOnboardingVisited: rehydrateParams.payload != null});\n}\n\nfunction onboardingHandler(state: SystemState) {\n return newState(state, {isOnboardingVisited: true});\n}\n"})})]})}function u(t={}){const{wrapper:e}={...(0,r.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(l,{...t})}):l(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>i,x:()=>o});var s=n(6540);const r={},a=s.createContext(r);function i(t){const e=s.useContext(a);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function o(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:i(t.components),s.createElement(a.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf787174.7139aa01.js b/assets/js/bf787174.7139aa01.js new file mode 100644 index 00000000..8a45a66a --- /dev/null +++ b/assets/js/bf787174.7139aa01.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[47],{7796:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var o=n(4848),s=n(8453);const i={sidebar_position:4,title:"Roots"},r=void 0,a={id:"navigation/roots",title:"Roots",description:"Content",source:"@site/docs/navigation/roots.md",sourceDirName:"navigation",slug:"/navigation/roots",permalink:"/react-native-template-strong/docs/navigation/roots",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/roots.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Roots"},sidebar:"tutorialSidebar",previous:{title:"Pages",permalink:"/react-native-template-strong/docs/navigation/pages"},next:{title:"Overlays and modals",permalink:"/react-native-template-strong/docs/navigation/overlays-and-modals"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Starting root",id:"starting-root",level:2},{value:"Switching roots",id:"switching-roots",level:2}];function l(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,o.jsx)(e.p,{children:"The root is where the application layout structure is defined. It is typically the first UI element a user interacts with."}),"\n",(0,o.jsx)(e.p,{children:"The root can be changed multiple times during the lifespan of the application."}),"\n",(0,o.jsx)(e.p,{children:"For example, if an app requires users to login, it's common to use a stack-based root and transition to either tabs- or SideMenu-based root if login is successful."}),"\n",(0,o.jsxs)(e.p,{children:["Roots are located in ",(0,o.jsx)(e.code,{children:"src/navigation/roots.ts"}),"."]}),"\n",(0,o.jsx)(e.p,{children:"Each root is being exported separately."}),"\n",(0,o.jsx)(e.h2,{id:"starting-root",children:"Starting root"}),"\n",(0,o.jsxs)(e.p,{children:["The starting root is ",(0,o.jsx)(e.code,{children:"setInitialRoot"})," which shows ",(0,o.jsx)(e.code,{children:"Splash"}),"."]}),"\n",(0,o.jsx)(e.h2,{id:"switching-roots",children:"Switching roots"}),"\n",(0,o.jsxs)(e.p,{children:["As shown in ",(0,o.jsx)(e.code,{children:"Splash"})," based on whether user opened application first time or second time it switches the root to ",(0,o.jsx)(e.code,{children:"tabs"})," or ",(0,o.jsx)(e.code,{children:"onboarding"}),":"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:"export const Splash: NavigationFunctionComponent = () => {\n const isOnboardingVisited = useAppSelector((state) => state.system.isOnboardingVisited);\n\n useEffect(() => {\n if (isOnboardingVisited) {\n setTabsRoot();\n } else if (isIos) {\n setTabsRoot(showOnboarding);\n } else {\n setOnboardingRoot();\n }\n }, [isOnboardingVisited]);\n\n return ;\n};\n"})})]})}function p(t={}){const{wrapper:e}={...(0,s.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(l,{...t})}):l(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>r,x:()=>a});var o=n(6540);const s={},i=o.createContext(s);function r(t){const e=o.useContext(i);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function a(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:r(t.components),o.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf787174.c382d408.js b/assets/js/bf787174.c382d408.js deleted file mode 100644 index 051d0eba..00000000 --- a/assets/js/bf787174.c382d408.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9721],{7122:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var o=n(5893),s=n(1151);const i={sidebar_position:4,title:"Roots"},r=void 0,a={id:"navigation/roots",title:"Roots",description:"Content",source:"@site/docs/navigation/roots.md",sourceDirName:"navigation",slug:"/navigation/roots",permalink:"/react-native-template-strong/docs/navigation/roots",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/roots.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Roots"},sidebar:"tutorialSidebar",previous:{title:"Pages",permalink:"/react-native-template-strong/docs/navigation/pages"},next:{title:"Overlays and modals",permalink:"/react-native-template-strong/docs/navigation/overlays-and-modals"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Starting root",id:"starting-root",level:2},{value:"Switching roots",id:"switching-roots",level:2}];function l(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.a)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,o.jsx)(e.p,{children:"The root is where the application layout structure is defined. It is typically the first UI element a user interacts with."}),"\n",(0,o.jsx)(e.p,{children:"The root can be changed multiple times during the lifespan of the application."}),"\n",(0,o.jsx)(e.p,{children:"For example, if an app requires users to login, it's common to use a stack-based root and transition to either tabs- or SideMenu-based root if login is successful."}),"\n",(0,o.jsxs)(e.p,{children:["Roots are located in ",(0,o.jsx)(e.code,{children:"src/navigation/roots.ts"}),"."]}),"\n",(0,o.jsx)(e.p,{children:"Each root is being exported separately."}),"\n",(0,o.jsx)(e.h2,{id:"starting-root",children:"Starting root"}),"\n",(0,o.jsxs)(e.p,{children:["The starting root is ",(0,o.jsx)(e.code,{children:"setInitialRoot"})," which shows ",(0,o.jsx)(e.code,{children:"Splash"}),"."]}),"\n",(0,o.jsx)(e.h2,{id:"switching-roots",children:"Switching roots"}),"\n",(0,o.jsxs)(e.p,{children:["As shown in ",(0,o.jsx)(e.code,{children:"Splash"})," based on whether user opened application first time or second time it switches the root to ",(0,o.jsx)(e.code,{children:"tabs"})," or ",(0,o.jsx)(e.code,{children:"onboarding"}),":"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:"export const Splash: NavigationFunctionComponent = () => {\n const isOnboardingVisited = useAppSelector((state) => state.system.isOnboardingVisited);\n\n useEffect(() => {\n if (isOnboardingVisited) {\n setTabsRoot();\n } else if (isIos) {\n setTabsRoot(showOnboarding);\n } else {\n setOnboardingRoot();\n }\n }, [isOnboardingVisited]);\n\n return ;\n};\n"})})]})}function p(t={}){const{wrapper:e}={...(0,s.a)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(l,{...t})}):l(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>a,a:()=>r});var o=n(7294);const s={},i=o.createContext(s);function r(t){const e=o.useContext(i);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function a(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:r(t.components),o.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/c141421f.94fe8bc5.js b/assets/js/c141421f.94fe8bc5.js new file mode 100644 index 00000000..285e5c81 --- /dev/null +++ b/assets/js/c141421f.94fe8bc5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[957],{936:e=>{e.exports=JSON.parse('{"name":"docusaurus-theme-search-algolia","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/c2066304.41fdb863.js b/assets/js/c2066304.41fdb863.js new file mode 100644 index 00000000..23df7d82 --- /dev/null +++ b/assets/js/c2066304.41fdb863.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[539],{5643:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>x,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var r=n(4848),s=n(8453);const i={sidebar_position:9,title:"TryAgain"},l=void 0,o={id:"components/try-again",title:"TryAgain",description:"Content",source:"@site/docs/components/try-again.md",sourceDirName:"components",slug:"/components/try-again",permalink:"/react-native-template-strong/docs/components/try-again",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/try-again.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:9,frontMatter:{sidebar_position:9,title:"TryAgain"},sidebar:"tutorialSidebar",previous:{title:"LoadingComponent",permalink:"/react-native-template-strong/docs/components/loading-component"},next:{title:"RadioButton",permalink:"/react-native-template-strong/docs/components/radio-button"}},a={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(t.p,{children:["Simple try again screen-like message with the try again button. Used primarily in ",(0,r.jsx)(t.code,{children:"FlatListWrapper"})," and ",(0,r.jsx)(t.code,{children:"SectionListWrapper"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"onPress"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"() => void"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"On try again press callback"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"errorText"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"string"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"localization.errors.unknownErrorHasOccurred"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Error text"})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" \n"})})]})}function x(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>o});var r=n(6540);const s={},i=r.createContext(s);function l(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c2066304.5836462d.js b/assets/js/c2066304.5836462d.js deleted file mode 100644 index 2c7ebf78..00000000 --- a/assets/js/c2066304.5836462d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3122],{4658:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>x,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var r=n(5893),s=n(1151);const i={sidebar_position:9,title:"TryAgain"},l=void 0,a={id:"components/try-again",title:"TryAgain",description:"Content",source:"@site/docs/components/try-again.md",sourceDirName:"components",slug:"/components/try-again",permalink:"/react-native-template-strong/docs/components/try-again",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/try-again.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:9,frontMatter:{sidebar_position:9,title:"TryAgain"},sidebar:"tutorialSidebar",previous:{title:"LoadingComponent",permalink:"/react-native-template-strong/docs/components/loading-component"},next:{title:"RadioButton",permalink:"/react-native-template-strong/docs/components/radio-button"}},o={},d=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(t.p,{children:["Simple try again screen-like message with the try again button. Used primarily in ",(0,r.jsx)(t.code,{children:"FlatListWrapper"})," and ",(0,r.jsx)(t.code,{children:"SectionListWrapper"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,r.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"onPress"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"() => void"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"On try again press callback"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"errorText"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"string"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:(0,r.jsx)(t.code,{children:"localization.errors.unknownErrorHasOccurred"})}),(0,r.jsx)(t.td,{style:{textAlign:"left"},children:"Error text"})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" \n"})})]})}function x(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>l});var r=n(7294);const s={},i=r.createContext(s);function l(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c27df6d1.d47c52be.js b/assets/js/c27df6d1.d47c52be.js new file mode 100644 index 00000000..9973a7d0 --- /dev/null +++ b/assets/js/c27df6d1.d47c52be.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[172],{9757:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>d,metadata:()=>i,toc:()=>o});var r=n(4848),s=n(8453);const d={sidebar_position:5,title:"Slice"},a=void 0,i={id:"redux/slice",title:"Slice",description:"Content",source:"@site/docs/redux/slice.md",sourceDirName:"redux",slug:"/redux/slice",permalink:"/react-native-template-strong/docs/redux/slice",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/slice.md",tags:[],version:"current",lastUpdatedAt:1633614778e3,sidebarPosition:5,frontMatter:{sidebar_position:5,title:"Slice"},sidebar:"tutorialSidebar",previous:{title:"State",permalink:"/react-native-template-strong/docs/redux/state"},next:{title:"AsyncThunk",permalink:"/react-native-template-strong/docs/redux/async-thunk"}},c={},o=[{value:"Content",id:"content",level:2},{value:"Creation",id:"creation",level:2},{value:"Adding reducer to RootReducer",id:"adding-reducer-to-rootreducer",level:2},{value:"Case handlers",id:"case-handlers",level:2},{value:"Return newState",id:"return-newstate",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"Slices"})," as well as ",(0,r.jsx)(t.code,{children:"AsyncThunks"})," are stored together for better readability and remove need to have additional imports."]}),"\n",(0,r.jsx)(t.h2,{id:"creation",children:"Creation"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"Slices"})," are created the same way as described in documentation."]}),"\n",(0,r.jsxs)(t.p,{children:["E.g. ",(0,r.jsx)(t.code,{children:"systemSlice.ts"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:'export const {reducer: SystemReducer} = createSlice({\n name: "system",\n initialState: SystemInitialState,\n reducers: {\n setOnboarding: onboardingHandler,\n },\n extraReducers: (builder) => {\n builder.addCase(REHYDRATE, rehydrate);\n },\n});\n'})}),"\n",(0,r.jsxs)(t.p,{children:["In ",(0,r.jsx)(t.code,{children:"extraReducers"})," don't forget to add the ",(0,r.jsx)(t.code,{children:"REHYDRATE"})," case to set properly store after rehydration:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:"function rehydrate(state: SystemState, rehydrateParams: RehydrateAppAction) {\n return newState(rehydrateParams.payload?.system || state, {isOnboardingVisited: rehydrateParams.payload != null});\n}\n"})}),"\n",(0,r.jsx)(t.h2,{id:"adding-reducer-to-rootreducer",children:"Adding reducer to RootReducer"}),"\n",(0,r.jsxs)(t.p,{children:["To see and use our reducer, first it has to be added into ",(0,r.jsx)(t.code,{children:"RootReducer"}),", which is constructed using ",(0,r.jsx)(t.code,{children:"combineReducers"}),"\nand can be found in ",(0,r.jsx)(t.code,{children:"src/core/store/rootReducer.ts"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["E.g. of adding ",(0,r.jsx)(t.code,{children:"SystemReducer"})," into ",(0,r.jsx)(t.code,{children:"RootReducer"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:"export const rootReducer = combineReducers({\n system: SystemReducer,\n});\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Parameter should be the same as ",(0,r.jsx)(t.code,{children:"name"})," which was used in ",(0,r.jsx)(t.code,{children:"createSlice"})]}),"\n",(0,r.jsx)(t.h2,{id:"case-handlers",children:"Case handlers"}),"\n",(0,r.jsxs)(t.p,{children:["Case handlers as you could see in example of the ",(0,r.jsx)(t.code,{children:"rehydrate"})," case should be handled as a separate function for better readability."]}),"\n",(0,r.jsx)(t.h2,{id:"return-newstate",children:"Return newState"}),"\n",(0,r.jsxs)(t.p,{children:["Even though ",(0,r.jsx)(t.code,{children:"Immer"})," is used under the hood of the toolkit, it's still better to return ",(0,r.jsx)(t.a,{href:"/react-native-template-strong/docs/utils/new-state",children:"newState"}),"\nrather than change properties directly without returning anything."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:"function rehydrate(state: SystemState, rehydrateParams: RehydrateAppAction) {\n return newState(rehydrateParams.payload?.system || state, {isOnboardingVisited: rehydrateParams.payload != null});\n}\n"})})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>i});var r=n(6540);const s={},d=r.createContext(s);function a(e){const t=r.useContext(d);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(d.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c27df6d1.d879a41e.js b/assets/js/c27df6d1.d879a41e.js deleted file mode 100644 index 47fbb14d..00000000 --- a/assets/js/c27df6d1.d879a41e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9117],{8585:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>d,metadata:()=>i,toc:()=>o});var n=r(5893),s=r(1151);const d={sidebar_position:5,title:"Slice"},a=void 0,i={id:"redux/slice",title:"Slice",description:"Content",source:"@site/docs/redux/slice.md",sourceDirName:"redux",slug:"/redux/slice",permalink:"/react-native-template-strong/docs/redux/slice",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/slice.md",tags:[],version:"current",lastUpdatedAt:1633614778,formattedLastUpdatedAt:"Oct 7, 2021",sidebarPosition:5,frontMatter:{sidebar_position:5,title:"Slice"},sidebar:"tutorialSidebar",previous:{title:"State",permalink:"/react-native-template-strong/docs/redux/state"},next:{title:"AsyncThunk",permalink:"/react-native-template-strong/docs/redux/async-thunk"}},c={},o=[{value:"Content",id:"content",level:2},{value:"Creation",id:"creation",level:2},{value:"Adding reducer to RootReducer",id:"adding-reducer-to-rootreducer",level:2},{value:"Case handlers",id:"case-handlers",level:2},{value:"Return newState",id:"return-newstate",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"Slices"})," as well as ",(0,n.jsx)(t.code,{children:"AsyncThunks"})," are stored together for better readability and remove need to have additional imports."]}),"\n",(0,n.jsx)(t.h2,{id:"creation",children:"Creation"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"Slices"})," are created the same way as described in documentation."]}),"\n",(0,n.jsxs)(t.p,{children:["E.g. ",(0,n.jsx)(t.code,{children:"systemSlice.ts"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",children:'export const {reducer: SystemReducer} = createSlice({\n name: "system",\n initialState: SystemInitialState,\n reducers: {\n setOnboarding: onboardingHandler,\n },\n extraReducers: (builder) => {\n builder.addCase(REHYDRATE, rehydrate);\n },\n});\n'})}),"\n",(0,n.jsxs)(t.p,{children:["In ",(0,n.jsx)(t.code,{children:"extraReducers"})," don't forget to add the ",(0,n.jsx)(t.code,{children:"REHYDRATE"})," case to set properly store after rehydration:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",children:"function rehydrate(state: SystemState, rehydrateParams: RehydrateAppAction) {\n return newState(rehydrateParams.payload?.system || state, {isOnboardingVisited: rehydrateParams.payload != null});\n}\n"})}),"\n",(0,n.jsx)(t.h2,{id:"adding-reducer-to-rootreducer",children:"Adding reducer to RootReducer"}),"\n",(0,n.jsxs)(t.p,{children:["To see and use our reducer, first it has to be added into ",(0,n.jsx)(t.code,{children:"RootReducer"}),", which is constructed using ",(0,n.jsx)(t.code,{children:"combineReducers"}),"\nand can be found in ",(0,n.jsx)(t.code,{children:"src/core/store/rootReducer.ts"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["E.g. of adding ",(0,n.jsx)(t.code,{children:"SystemReducer"})," into ",(0,n.jsx)(t.code,{children:"RootReducer"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",children:"export const rootReducer = combineReducers({\n system: SystemReducer,\n});\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Parameter should be the same as ",(0,n.jsx)(t.code,{children:"name"})," which was used in ",(0,n.jsx)(t.code,{children:"createSlice"})]}),"\n",(0,n.jsx)(t.h2,{id:"case-handlers",children:"Case handlers"}),"\n",(0,n.jsxs)(t.p,{children:["Case handlers as you could see in example of the ",(0,n.jsx)(t.code,{children:"rehydrate"})," case should be handled as a separate function for better readability."]}),"\n",(0,n.jsx)(t.h2,{id:"return-newstate",children:"Return newState"}),"\n",(0,n.jsxs)(t.p,{children:["Even though ",(0,n.jsx)(t.code,{children:"Immer"})," is used under the hood of the toolkit, it's still better to return ",(0,n.jsx)(t.a,{href:"/react-native-template-strong/docs/utils/new-state",children:"newState"}),"\nrather than change properties directly without returning anything."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",children:"function rehydrate(state: SystemState, rehydrateParams: RehydrateAppAction) {\n return newState(rehydrateParams.payload?.system || state, {isOnboardingVisited: rehydrateParams.payload != null});\n}\n"})})]})}function u(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},1151:(e,t,r)=>{r.d(t,{Z:()=>i,a:()=>a});var n=r(7294);const s={},d=n.createContext(s);function a(e){const t=n.useContext(d);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(d.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c5ed97f1.49105c91.js b/assets/js/c5ed97f1.49105c91.js deleted file mode 100644 index bc43de92..00000000 --- a/assets/js/c5ed97f1.49105c91.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[186],{1090:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var i=t(5893),o=t(1151);const s={title:"Mission"},r="Mission",a={type:"mdx",permalink:"/react-native-template-strong/mission",source:"@site/src/pages/mission.md",title:"Mission",description:"The idea behind creation of this repository is to have next core features when creating a new project:",frontMatter:{title:"Mission"},unlisted:!1},c={},l=[];function p(e){const n={h1:"h1",li:"li",p:"p",ul:"ul",...(0,o.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"mission",children:"Mission"}),"\n",(0,i.jsx)(n.p,{children:"The idea behind creation of this repository is to have next core features when creating a new project:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Dependencies on which almost every application relies (orientation, localization, navigation, environments .etc)"}),"\n",(0,i.jsx)(n.li,{children:"Configured TypeScript"}),"\n",(0,i.jsx)(n.li,{children:"Configured ESLint with strict set of rules and plugins"}),"\n",(0,i.jsx)(n.li,{children:"Configured testing environment (Storybook, Jest, Detox)"}),"\n",(0,i.jsx)(n.li,{children:"Set of styles, components and helpers"}),"\n",(0,i.jsx)(n.li,{children:"Predefined popular scenarios of user behavior (including pages)"}),"\n",(0,i.jsx)(n.li,{children:"Documentation of before mentioned"}),"\n",(0,i.jsx)(n.li,{children:"Unification of application/component/style development within teams"}),"\n",(0,i.jsx)(n.li,{children:"A single code structure"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Additionally, to before mentioned concepts, goes documentation of development processes of the way how I and community see it.\nIt has to be a single source of information in many aspects (e.g. app publishing, splash screen creation, navigation .etc)."}),"\n",(0,i.jsx)(n.p,{children:"I strive to make this as easy as possible using the KISS (keep it simple, stupid) approach whenever possible,\nand when there's a case it can't be applied I'll try to document it as good as I can."}),"\n",(0,i.jsx)(n.p,{children:"There's a lot of \"I\" in this section, but I'm eager to listen to community and open to new ideas and approaches."}),"\n",(0,i.jsx)(n.p,{children:"I hope this template will help people with application development."})]})}function d(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>a,a:()=>r});var i=t(7294);const o={},s=i.createContext(o);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c5ed97f1.7aa7d96c.js b/assets/js/c5ed97f1.7aa7d96c.js new file mode 100644 index 00000000..eb6b084a --- /dev/null +++ b/assets/js/c5ed97f1.7aa7d96c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4419],{3103:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var i=t(4848),o=t(8453);const s={title:"Mission"},r="Mission",a={type:"mdx",permalink:"/react-native-template-strong/mission",source:"@site/src/pages/mission.md",title:"Mission",description:"The idea behind creation of this repository is to have next core features when creating a new project:",frontMatter:{title:"Mission"},unlisted:!1},c={},l=[];function p(e){const n={h1:"h1",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"mission",children:"Mission"}),"\n",(0,i.jsx)(n.p,{children:"The idea behind creation of this repository is to have next core features when creating a new project:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Dependencies on which almost every application relies (orientation, localization, navigation, environments .etc)"}),"\n",(0,i.jsx)(n.li,{children:"Configured TypeScript"}),"\n",(0,i.jsx)(n.li,{children:"Configured ESLint with strict set of rules and plugins"}),"\n",(0,i.jsx)(n.li,{children:"Configured testing environment (Storybook, Jest, Detox)"}),"\n",(0,i.jsx)(n.li,{children:"Set of styles, components and helpers"}),"\n",(0,i.jsx)(n.li,{children:"Predefined popular scenarios of user behavior (including pages)"}),"\n",(0,i.jsx)(n.li,{children:"Documentation of before mentioned"}),"\n",(0,i.jsx)(n.li,{children:"Unification of application/component/style development within teams"}),"\n",(0,i.jsx)(n.li,{children:"A single code structure"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Additionally, to before mentioned concepts, goes documentation of development processes of the way how I and community see it.\nIt has to be a single source of information in many aspects (e.g. app publishing, splash screen creation, navigation .etc)."}),"\n",(0,i.jsx)(n.p,{children:"I strive to make this as easy as possible using the KISS (keep it simple, stupid) approach whenever possible,\nand when there's a case it can't be applied I'll try to document it as good as I can."}),"\n",(0,i.jsx)(n.p,{children:"There's a lot of \"I\" in this section, but I'm eager to listen to community and open to new ideas and approaches."}),"\n",(0,i.jsx)(n.p,{children:"I hope this template will help people with application development."})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(6540);const o={},s=i.createContext(o);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cf5243f0.8c89464e.js b/assets/js/cf5243f0.8c89464e.js new file mode 100644 index 00000000..32546f5d --- /dev/null +++ b/assets/js/cf5243f0.8c89464e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1892],{9813:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>d,default:()=>x,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var l=n(4848),s=n(8453);const i={sidebar_position:13,title:"PhotoTakingButton"},d=void 0,r={id:"components/photo-taking-button",title:"PhotoTakingButton",description:"Content",source:"@site/docs/components/photo-taking-button.md",sourceDirName:"components",slug:"/components/photo-taking-button",permalink:"/react-native-template-strong/docs/components/photo-taking-button",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/photo-taking-button.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:13,frontMatter:{sidebar_position:13,title:"PhotoTakingButton"},sidebar:"tutorialSidebar",previous:{title:"EmptyView",permalink:"/react-native-template-strong/docs/components/empty-view"},next:{title:"ImageCropPickerButton",permalink:"/react-native-template-strong/docs/components/image-crop-picker-button"}},o={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsxs)(t.p,{children:["Button which is used as primary component of ",(0,l.jsx)(t.code,{children:"ImageCropPickerButton"})]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onPress"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"() => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"On press callback"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"backgroundImage"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageURISource or null or CropperImage"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Selected image which will be shown and used"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"icon"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageURISource"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageResources.camera"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Icon which will be shown when image is not present and over the selected image"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"style"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ViewStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of button"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"iconStyle"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of icon"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"imageStyle"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of image"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"disabled"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Is button disabled"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" return (\n \n );\n"})})]})}function x(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>r});var l=n(6540);const s={},i=l.createContext(s);function d(e){const t=l.useContext(i);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),l.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cf5243f0.97604f6e.js b/assets/js/cf5243f0.97604f6e.js deleted file mode 100644 index d1f93782..00000000 --- a/assets/js/cf5243f0.97604f6e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8136],{9688:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>d,default:()=>x,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var l=n(5893),s=n(1151);const i={sidebar_position:13,title:"PhotoTakingButton"},d=void 0,r={id:"components/photo-taking-button",title:"PhotoTakingButton",description:"Content",source:"@site/docs/components/photo-taking-button.md",sourceDirName:"components",slug:"/components/photo-taking-button",permalink:"/react-native-template-strong/docs/components/photo-taking-button",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/photo-taking-button.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:13,frontMatter:{sidebar_position:13,title:"PhotoTakingButton"},sidebar:"tutorialSidebar",previous:{title:"EmptyView",permalink:"/react-native-template-strong/docs/components/empty-view"},next:{title:"ImageCropPickerButton",permalink:"/react-native-template-strong/docs/components/image-crop-picker-button"}},o={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsxs)(t.p,{children:["Button which is used as primary component of ",(0,l.jsx)(t.code,{children:"ImageCropPickerButton"})]}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onPress"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"() => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"On press callback"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"backgroundImage"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageURISource or null or CropperImage"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Selected image which will be shown and used"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"icon"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageURISource"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageResources.camera"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Icon which will be shown when image is not present and over the selected image"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"style"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ViewStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of button"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"iconStyle"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of icon"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"imageStyle"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"ImageStyle"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Style of image"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"disabled"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Is button disabled"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" return (\n \n );\n"})})]})}function x(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>r,a:()=>d});var l=n(7294);const s={},i=l.createContext(s);function d(e){const t=l.useContext(i);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),l.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d1e36d14.60043086.js b/assets/js/d1e36d14.60043086.js new file mode 100644 index 00000000..cb80c8c8 --- /dev/null +++ b/assets/js/d1e36d14.60043086.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[595],{7155:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>d});var o=n(4848),i=n(8453);const a={sidebar_position:1,title:"Before starting"},s=void 0,r={id:"navigation/before-starting",title:"Before starting",description:"Content",source:"@site/docs/navigation/before-starting.md",sourceDirName:"navigation",slug:"/navigation/before-starting",permalink:"/react-native-template-strong/docs/navigation/before-starting",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/before-starting.md",tags:[],version:"current",lastUpdatedAt:1633614778e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Before starting"},sidebar:"tutorialSidebar",previous:{title:"Dependencies and scripts",permalink:"/react-native-template-strong/docs/dependencies"},next:{title:"Default options",permalink:"/react-native-template-strong/docs/navigation/default-options"}},c={},d=[{value:"Content",id:"content",level:2}];function u(t){const e={a:"a",h2:"h2",p:"p",...(0,i.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(e.p,{children:["First read about ",(0,o.jsx)(e.a,{href:"https://wix.github.io/react-native-navigation/docs/before-you-start/",children:"React Native Navigation"}),", about what it can do, what it offers and then come back here to move on."]}),"\n",(0,o.jsx)(e.p,{children:"It's important to know about it because it's one of a core components of this template and knowing it can save your time\nand eliminate many questions."})]})}function l(t={}){const{wrapper:e}={...(0,i.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(u,{...t})}):u(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>s,x:()=>r});var o=n(6540);const i={},a=o.createContext(i);function s(t){const e=o.useContext(a);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:s(t.components),o.createElement(a.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/d1e36d14.80e44583.js b/assets/js/d1e36d14.80e44583.js deleted file mode 100644 index 37f3fb59..00000000 --- a/assets/js/d1e36d14.80e44583.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[729],{8277:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>u,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var o=n(5893),a=n(1151);const i={sidebar_position:1,title:"Before starting"},s=void 0,r={id:"navigation/before-starting",title:"Before starting",description:"Content",source:"@site/docs/navigation/before-starting.md",sourceDirName:"navigation",slug:"/navigation/before-starting",permalink:"/react-native-template-strong/docs/navigation/before-starting",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/before-starting.md",tags:[],version:"current",lastUpdatedAt:1633614778,formattedLastUpdatedAt:"Oct 7, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Before starting"},sidebar:"tutorialSidebar",previous:{title:"Dependencies and scripts",permalink:"/react-native-template-strong/docs/dependencies"},next:{title:"Default options",permalink:"/react-native-template-strong/docs/navigation/default-options"}},c={},d=[{value:"Content",id:"content",level:2}];function p(t){const e={a:"a",h2:"h2",p:"p",...(0,a.a)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(e.p,{children:["First read about ",(0,o.jsx)(e.a,{href:"https://wix.github.io/react-native-navigation/docs/before-you-start/",children:"React Native Navigation"}),", about what it can do, what it offers and then come back here to move on."]}),"\n",(0,o.jsx)(e.p,{children:"It's important to know about it because it's one of a core components of this template and knowing it can save your time\nand eliminate many questions."})]})}function u(t={}){const{wrapper:e}={...(0,a.a)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(p,{...t})}):p(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>r,a:()=>s});var o=n(7294);const a={},i=o.createContext(a);function s(t){const e=o.useContext(i);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(a):t.components||a:s(t.components),o.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/d3dae466.d585368b.js b/assets/js/d3dae466.d585368b.js new file mode 100644 index 00000000..2af2522b --- /dev/null +++ b/assets/js/d3dae466.d585368b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5014],{1572:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Getting started","href":"/react-native-template-strong/docs/getting-started","docId":"getting-started","unlisted":false},{"type":"category","label":"Structure","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Project","href":"/react-native-template-strong/docs/structure/project","docId":"structure/project","unlisted":false},{"type":"link","label":"Module","href":"/react-native-template-strong/docs/structure/module","docId":"structure/module","unlisted":false}]},{"type":"link","label":"Dependencies and scripts","href":"/react-native-template-strong/docs/dependencies","docId":"dependencies","unlisted":false},{"type":"category","label":"Navigation","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Before starting","href":"/react-native-template-strong/docs/navigation/before-starting","docId":"navigation/before-starting","unlisted":false},{"type":"link","label":"Default options","href":"/react-native-template-strong/docs/navigation/default-options","docId":"navigation/default-options","unlisted":false},{"type":"link","label":"Pages","href":"/react-native-template-strong/docs/navigation/pages","docId":"navigation/pages","unlisted":false},{"type":"link","label":"Roots","href":"/react-native-template-strong/docs/navigation/roots","docId":"navigation/roots","unlisted":false},{"type":"link","label":"Overlays and modals","href":"/react-native-template-strong/docs/navigation/overlays-and-modals","docId":"navigation/overlays-and-modals","unlisted":false},{"type":"link","label":"Hooks","href":"/react-native-template-strong/docs/navigation/hooks","docId":"navigation/hooks","unlisted":false},{"type":"link","label":"Actions","href":"/react-native-template-strong/docs/navigation/actions","docId":"navigation/actions","unlisted":false}]},{"type":"category","label":"Redux","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Before starting","href":"/react-native-template-strong/docs/redux/before-starting","docId":"redux/before-starting","unlisted":false},{"type":"link","label":"Core idea","href":"/react-native-template-strong/docs/redux/core-idea","docId":"redux/core-idea","unlisted":false},{"type":"link","label":"Store","href":"/react-native-template-strong/docs/redux/store","docId":"redux/store","unlisted":false},{"type":"link","label":"State","href":"/react-native-template-strong/docs/redux/state","docId":"redux/state","unlisted":false},{"type":"link","label":"Slice","href":"/react-native-template-strong/docs/redux/slice","docId":"redux/slice","unlisted":false},{"type":"link","label":"AsyncThunk","href":"/react-native-template-strong/docs/redux/async-thunk","docId":"redux/async-thunk","unlisted":false},{"type":"link","label":"Hooks","href":"/react-native-template-strong/docs/redux/hooks","docId":"redux/hooks","unlisted":false}]},{"type":"category","label":"Resources","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Fonts","href":"/react-native-template-strong/docs/resources/fonts","docId":"resources/fonts","unlisted":false},{"type":"link","label":"Images","href":"/react-native-template-strong/docs/resources/images","docId":"resources/images","unlisted":false},{"type":"link","label":"SF Symbols","href":"/react-native-template-strong/docs/resources/sf-symbols","docId":"resources/sf-symbols","unlisted":false},{"type":"link","label":"Vector icons","href":"/react-native-template-strong/docs/resources/vector-icons","docId":"resources/vector-icons","unlisted":false}]},{"type":"category","label":"Themes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Colors","href":"/react-native-template-strong/docs/themes/colors","docId":"themes/colors","unlisted":false},{"type":"link","label":"Native colors","href":"/react-native-template-strong/docs/themes/native-colors","docId":"themes/native-colors","unlisted":false}]},{"type":"category","label":"Styles","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Component styles","href":"/react-native-template-strong/docs/styles/component-styles","docId":"styles/component-styles","unlisted":false},{"type":"link","label":"Common styles","href":"/react-native-template-strong/docs/styles/common-styles","docId":"styles/common-styles","unlisted":false},{"type":"link","label":"Common sizes","href":"/react-native-template-strong/docs/styles/common-sizes","docId":"styles/common-sizes","unlisted":false}]},{"type":"link","label":"Common constants","href":"/react-native-template-strong/docs/common-constants","docId":"common-constants","unlisted":false},{"type":"category","label":"Components","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"PrimaryButton","href":"/react-native-template-strong/docs/components/primary-button","docId":"components/primary-button","unlisted":false},{"type":"link","label":"PrimaryTextInput","href":"/react-native-template-strong/docs/components/primary-text-input","docId":"components/primary-text-input","unlisted":false},{"type":"link","label":"Separator","href":"/react-native-template-strong/docs/components/separator","docId":"components/separator","unlisted":false},{"type":"link","label":"FlatListWrapper","href":"/react-native-template-strong/docs/components/flat-list-wrapper","docId":"components/flat-list-wrapper","unlisted":false},{"type":"link","label":"SectionListWrapper","href":"/react-native-template-strong/docs/components/section-list-wrapper","docId":"components/section-list-wrapper","unlisted":false},{"type":"link","label":"IconPlatform","href":"/react-native-template-strong/docs/components/icon-platform","docId":"components/icon-platform","unlisted":false},{"type":"link","label":"TouchablePlatform","href":"/react-native-template-strong/docs/components/touchable-platform","docId":"components/touchable-platform","unlisted":false},{"type":"link","label":"LoadingComponent","href":"/react-native-template-strong/docs/components/loading-component","docId":"components/loading-component","unlisted":false},{"type":"link","label":"TryAgain","href":"/react-native-template-strong/docs/components/try-again","docId":"components/try-again","unlisted":false},{"type":"link","label":"RadioButton","href":"/react-native-template-strong/docs/components/radio-button","docId":"components/radio-button","unlisted":false},{"type":"link","label":"RadioIcon","href":"/react-native-template-strong/docs/components/radio-icon","docId":"components/radio-icon","unlisted":false},{"type":"link","label":"EmptyView","href":"/react-native-template-strong/docs/components/empty-view","docId":"components/empty-view","unlisted":false},{"type":"link","label":"PhotoTakingButton","href":"/react-native-template-strong/docs/components/photo-taking-button","docId":"components/photo-taking-button","unlisted":false},{"type":"link","label":"ImageCropPickerButton","href":"/react-native-template-strong/docs/components/image-crop-picker-button","docId":"components/image-crop-picker-button","unlisted":false},{"type":"link","label":"DatePickerOverlay","href":"/react-native-template-strong/docs/components/date-picker-overlay","docId":"components/date-picker-overlay","unlisted":false},{"type":"link","label":"ToastOverlay","href":"/react-native-template-strong/docs/components/toast-overlay","docId":"components/toast-overlay","unlisted":false}]},{"type":"category","label":"Pages","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Native splash","href":"/react-native-template-strong/docs/pages/native-splash","docId":"pages/native-splash","unlisted":false},{"type":"link","label":"Splash","href":"/react-native-template-strong/docs/pages/splash","docId":"pages/splash","unlisted":false},{"type":"link","label":"Onboarding","href":"/react-native-template-strong/docs/pages/onboarding","docId":"pages/onboarding","unlisted":false}]},{"type":"category","label":"Helpers","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"calculatePage","href":"/react-native-template-strong/docs/helpers/calculate-page","docId":"helpers/calculate-page","unlisted":false},{"type":"link","label":"colorHelpers","href":"/react-native-template-strong/docs/helpers/color-helpers","docId":"helpers/color-helpers","unlisted":false},{"type":"link","label":"defaultKeyIdExtractor","href":"/react-native-template-strong/docs/helpers/default-key-id-extractor","docId":"helpers/default-key-id-extractor","unlisted":false},{"type":"link","label":"dialogsHelpers","href":"/react-native-template-strong/docs/helpers/dialogs-helpers","docId":"helpers/dialogs-helpers","unlisted":false},{"type":"link","label":"imageHelpers","href":"/react-native-template-strong/docs/helpers/image-helpers","docId":"helpers/image-helpers","unlisted":false},{"type":"link","label":"orientationHelpers","href":"/react-native-template-strong/docs/helpers/orientation-helpers","docId":"helpers/orientation-helpers","unlisted":false},{"type":"link","label":"stringHelpers","href":"/react-native-template-strong/docs/helpers/strings-helpers","docId":"helpers/strings-helpers","unlisted":false},{"type":"link","label":"regexHelpers","href":"/react-native-template-strong/docs/helpers/regex-helpers","docId":"helpers/regex-helpers","unlisted":false},{"type":"link","label":"inAppReviewHelper","href":"/react-native-template-strong/docs/helpers/in-app-review-helper","docId":"helpers/in-app-review-helper","unlisted":false},{"type":"link","label":"netInfoHelpers","href":"/react-native-template-strong/docs/helpers/net-info-helpers","docId":"helpers/net-info-helpers","unlisted":false},{"type":"link","label":"shareHelpers","href":"/react-native-template-strong/docs/helpers/share-helpers","docId":"helpers/share-helpers","unlisted":false}]},{"type":"link","label":"Validations","href":"/react-native-template-strong/docs/validations","docId":"validations","unlisted":false},{"type":"category","label":"Utilities","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"newState","href":"/react-native-template-strong/docs/utils/new-state","docId":"utils/new-state","unlisted":false},{"type":"link","label":"listHandlers","href":"/react-native-template-strong/docs/utils/list-handlers","docId":"utils/list-handlers","unlisted":false},{"type":"link","label":"URL openers","href":"/react-native-template-strong/docs/utils/url-openers","docId":"utils/url-openers","unlisted":false},{"type":"link","label":"serializeQueryParams","href":"/react-native-template-strong/docs/utils/serialize-query-params","docId":"utils/serialize-query-params","unlisted":false}]},{"type":"category","label":"Hooks","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"useFlatListActions","href":"/react-native-template-strong/docs/hooks/use-flat-list-actions","docId":"hooks/use-flat-list-actions","unlisted":false},{"type":"link","label":"useDebounce","href":"/react-native-template-strong/docs/hooks/use-debounce","docId":"hooks/use-debounce","unlisted":false},{"type":"link","label":"useEventRegister","href":"/react-native-template-strong/docs/hooks/use-event-register","docId":"hooks/use-event-register","unlisted":false},{"type":"link","label":"useBackHandler","href":"/react-native-template-strong/docs/hooks/use-back-handler","docId":"hooks/use-back-handler","unlisted":false},{"type":"link","label":"usePrevious","href":"/react-native-template-strong/docs/hooks/use-previous","docId":"hooks/use-previous","unlisted":false},{"type":"link","label":"useWhyDidYouUpdate","href":"/react-native-template-strong/docs/hooks/use-why-did-you-update","docId":"hooks/use-why-did-you-update","unlisted":false}]},{"type":"category","label":"Localization","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Translations","href":"/react-native-template-strong/docs/localisation/translations","docId":"localisation/translations","unlisted":false},{"type":"link","label":"Add language","href":"/react-native-template-strong/docs/localisation/add-language","docId":"localisation/add-language","unlisted":false},{"type":"link","label":"Change language","href":"/react-native-template-strong/docs/localisation/change-language","docId":"localisation/change-language","unlisted":false},{"type":"link","label":"Date formatter","href":"/react-native-template-strong/docs/localisation/date-formatter","docId":"localisation/date-formatter","unlisted":false},{"type":"link","label":"Intl formatter","href":"/react-native-template-strong/docs/localisation/intl-formatter","docId":"localisation/intl-formatter","unlisted":false}]},{"type":"link","label":"Environments","href":"/react-native-template-strong/docs/environments","docId":"environments","unlisted":false},{"type":"link","label":"API","href":"/react-native-template-strong/docs/api","docId":"api","unlisted":false},{"type":"category","label":"Testing","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Jest","href":"/react-native-template-strong/docs/testing/jest","docId":"testing/jest","unlisted":false},{"type":"link","label":"Storybook","href":"/react-native-template-strong/docs/testing/storybook","docId":"testing/storybook","unlisted":false},{"type":"link","label":"Detox","href":"/react-native-template-strong/docs/testing/detox","docId":"testing/detox","unlisted":false}]},{"type":"link","label":"Types","href":"/react-native-template-strong/docs/types","docId":"types","unlisted":false},{"type":"link","label":"Patches","href":"/react-native-template-strong/docs/patches","docId":"patches","unlisted":false},{"type":"link","label":"App icon","href":"/react-native-template-strong/docs/app-icon","docId":"app-icon","unlisted":false},{"type":"link","label":"App release","href":"/react-native-template-strong/docs/app-release","docId":"app-release","unlisted":false},{"type":"category","label":"Configs","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"React Native config","href":"/react-native-template-strong/docs/configs/rn-config","docId":"configs/rn-config","unlisted":false},{"type":"link","label":"TypeScript config","href":"/react-native-template-strong/docs/configs/ts-config","docId":"configs/ts-config","unlisted":false},{"type":"link","label":"ESLint config","href":"/react-native-template-strong/docs/configs/eslint-config","docId":"configs/eslint-config","unlisted":false},{"type":"link","label":"Prettier config","href":"/react-native-template-strong/docs/configs/prettier-config","docId":"configs/prettier-config","unlisted":false},{"type":"link","label":"Metro config","href":"/react-native-template-strong/docs/configs/metro-config","docId":"configs/metro-config","unlisted":false},{"type":"link","label":"Jest config","href":"/react-native-template-strong/docs/configs/jest-config","docId":"configs/jest-config","unlisted":false},{"type":"link","label":"Detox config","href":"/react-native-template-strong/docs/configs/detox-config","docId":"configs/detox-config","unlisted":false},{"type":"link","label":"Babel config","href":"/react-native-template-strong/docs/configs/babel-config","docId":"configs/babel-config","unlisted":false}]},{"type":"category","label":"Internals","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"iOS internals","href":"/react-native-template-strong/docs/internals/ios","docId":"internals/ios","unlisted":false},{"type":"link","label":"Android internals","href":"/react-native-template-strong/docs/internals/android","docId":"internals/android","unlisted":false}]},{"type":"link","label":"Checking on updates","href":"/react-native-template-strong/docs/checking-updates","docId":"checking-updates","unlisted":false}]},"docs":{"api":{"id":"api","title":"API","description":"Content","sidebar":"tutorialSidebar"},"app-icon":{"id":"app-icon","title":"App icon","description":"Content","sidebar":"tutorialSidebar"},"app-release":{"id":"app-release","title":"App release","description":"Preparations","sidebar":"tutorialSidebar"},"checking-updates":{"id":"checking-updates","title":"Checking on updates","description":"React Native Template Strong","sidebar":"tutorialSidebar"},"common-constants":{"id":"common-constants","title":"Common constants","description":"Content","sidebar":"tutorialSidebar"},"components/date-picker-overlay":{"id":"components/date-picker-overlay","title":"DatePickerOverlay","description":"Content","sidebar":"tutorialSidebar"},"components/empty-view":{"id":"components/empty-view","title":"EmptyView","description":"Content","sidebar":"tutorialSidebar"},"components/flat-list-wrapper":{"id":"components/flat-list-wrapper","title":"FlatListWrapper","description":"Content","sidebar":"tutorialSidebar"},"components/icon-platform":{"id":"components/icon-platform","title":"IconPlatform","description":"Content","sidebar":"tutorialSidebar"},"components/image-crop-picker-button":{"id":"components/image-crop-picker-button","title":"ImageCropPickerButton","description":"Content","sidebar":"tutorialSidebar"},"components/loading-component":{"id":"components/loading-component","title":"LoadingComponent","description":"Content","sidebar":"tutorialSidebar"},"components/photo-taking-button":{"id":"components/photo-taking-button","title":"PhotoTakingButton","description":"Content","sidebar":"tutorialSidebar"},"components/primary-button":{"id":"components/primary-button","title":"PrimaryButton","description":"Content","sidebar":"tutorialSidebar"},"components/primary-text-input":{"id":"components/primary-text-input","title":"PrimaryTextInput","description":"Content","sidebar":"tutorialSidebar"},"components/radio-button":{"id":"components/radio-button","title":"RadioButton","description":"Content","sidebar":"tutorialSidebar"},"components/radio-icon":{"id":"components/radio-icon","title":"RadioIcon","description":"Content","sidebar":"tutorialSidebar"},"components/section-list-wrapper":{"id":"components/section-list-wrapper","title":"SectionListWrapper","description":"Content","sidebar":"tutorialSidebar"},"components/separator":{"id":"components/separator","title":"Separator","description":"Content","sidebar":"tutorialSidebar"},"components/toast-overlay":{"id":"components/toast-overlay","title":"ToastOverlay","description":"Content","sidebar":"tutorialSidebar"},"components/touchable-platform":{"id":"components/touchable-platform","title":"TouchablePlatform","description":"Content","sidebar":"tutorialSidebar"},"components/try-again":{"id":"components/try-again","title":"TryAgain","description":"Content","sidebar":"tutorialSidebar"},"configs/babel-config":{"id":"configs/babel-config","title":"Babel config","description":"Babel config utilizes metro-react-native-babel-preset","sidebar":"tutorialSidebar"},"configs/detox-config":{"id":"configs/detox-config","title":"Detox config","description":"Detox config is configured to work with TypeScript.","sidebar":"tutorialSidebar"},"configs/eslint-config":{"id":"configs/eslint-config","title":"ESLint config","description":"ESLint utilizes eslint-config-react-strong with its plugins and rules.","sidebar":"tutorialSidebar"},"configs/jest-config":{"id":"configs/jest-config","title":"Jest config","description":"Jest utilizes eslint-config-react-strong","sidebar":"tutorialSidebar"},"configs/metro-config":{"id":"configs/metro-config","title":"Metro config","description":"Metro config doesn\'t use experimentalImportSupport and inlineRequires","sidebar":"tutorialSidebar"},"configs/prettier-config":{"id":"configs/prettier-config","title":"Prettier config","description":"Prettier defines next obvious rules:","sidebar":"tutorialSidebar"},"configs/rn-config":{"id":"configs/rn-config","title":"React Native config","description":"React Native config only defines the assets folder \\"./resources/fonts\\" to properly link newly added fonts","sidebar":"tutorialSidebar"},"configs/ts-config":{"id":"configs/ts-config","title":"TypeScript config","description":"TypeScript config is strict as ESLint rules and relies on config from eslint-config-react-strong\'s TypeScript Config","sidebar":"tutorialSidebar"},"dependencies":{"id":"dependencies","title":"Dependencies and scripts","description":"Dependencies","sidebar":"tutorialSidebar"},"environments":{"id":"environments","title":"Environments","description":"Work with environments made possible by react-native-config.","sidebar":"tutorialSidebar"},"getting-started":{"id":"getting-started","title":"Getting started","description":"Before you start","sidebar":"tutorialSidebar"},"helpers/calculate-page":{"id":"helpers/calculate-page","title":"calculatePage","description":"Content","sidebar":"tutorialSidebar"},"helpers/color-helpers":{"id":"helpers/color-helpers","title":"colorHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/default-key-id-extractor":{"id":"helpers/default-key-id-extractor","title":"defaultKeyIdExtractor","description":"Content","sidebar":"tutorialSidebar"},"helpers/dialogs-helpers":{"id":"helpers/dialogs-helpers","title":"dialogsHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/image-helpers":{"id":"helpers/image-helpers","title":"imageHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/in-app-review-helper":{"id":"helpers/in-app-review-helper","title":"inAppReviewHelper","description":"Content","sidebar":"tutorialSidebar"},"helpers/net-info-helpers":{"id":"helpers/net-info-helpers","title":"netInfoHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/orientation-helpers":{"id":"helpers/orientation-helpers","title":"orientationHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/regex-helpers":{"id":"helpers/regex-helpers","title":"regexHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/share-helpers":{"id":"helpers/share-helpers","title":"shareHelpers","description":"Content","sidebar":"tutorialSidebar"},"helpers/strings-helpers":{"id":"helpers/strings-helpers","title":"stringHelpers","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-back-handler":{"id":"hooks/use-back-handler","title":"useBackHandler","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-debounce":{"id":"hooks/use-debounce","title":"useDebounce","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-event-register":{"id":"hooks/use-event-register","title":"useEventRegister","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-flat-list-actions":{"id":"hooks/use-flat-list-actions","title":"useFlatListActions","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-previous":{"id":"hooks/use-previous","title":"usePrevious","description":"Content","sidebar":"tutorialSidebar"},"hooks/use-why-did-you-update":{"id":"hooks/use-why-did-you-update","title":"useWhyDidYouUpdate","description":"Content","sidebar":"tutorialSidebar"},"internals/android":{"id":"internals/android","title":"Android internals","description":"Hermes","sidebar":"tutorialSidebar"},"internals/ios":{"id":"internals/ios","title":"iOS internals","description":"Hermes","sidebar":"tutorialSidebar"},"localisation/add-language":{"id":"localisation/add-language","title":"Add language","description":"Description","sidebar":"tutorialSidebar"},"localisation/change-language":{"id":"localisation/change-language","title":"Change language","description":"There are two ways you can change language of your app.","sidebar":"tutorialSidebar"},"localisation/date-formatter":{"id":"localisation/date-formatter","title":"Date formatter","description":"Content","sidebar":"tutorialSidebar"},"localisation/intl-formatter":{"id":"localisation/intl-formatter","title":"Intl formatter","description":"Content","sidebar":"tutorialSidebar"},"localisation/translations":{"id":"localisation/translations","title":"Translations","description":"Localisation is made possible by react-native-localization.","sidebar":"tutorialSidebar"},"navigation/actions":{"id":"navigation/actions","title":"Actions","description":"Content","sidebar":"tutorialSidebar"},"navigation/before-starting":{"id":"navigation/before-starting","title":"Before starting","description":"Content","sidebar":"tutorialSidebar"},"navigation/default-options":{"id":"navigation/default-options","title":"Default options","description":"Content","sidebar":"tutorialSidebar"},"navigation/hooks":{"id":"navigation/hooks","title":"Hooks","description":"Content","sidebar":"tutorialSidebar"},"navigation/overlays-and-modals":{"id":"navigation/overlays-and-modals","title":"Overlays and modals","description":"Content","sidebar":"tutorialSidebar"},"navigation/pages":{"id":"navigation/pages","title":"Pages","description":"Content","sidebar":"tutorialSidebar"},"navigation/roots":{"id":"navigation/roots","title":"Roots","description":"Content","sidebar":"tutorialSidebar"},"pages/native-splash":{"id":"pages/native-splash","title":"Native splash","description":"Content","sidebar":"tutorialSidebar"},"pages/onboarding":{"id":"pages/onboarding","title":"Onboarding","description":"Content","sidebar":"tutorialSidebar"},"pages/splash":{"id":"pages/splash","title":"Splash","description":"Content","sidebar":"tutorialSidebar"},"patches":{"id":"patches","title":"Patches","description":"Content","sidebar":"tutorialSidebar"},"redux/async-thunk":{"id":"redux/async-thunk","title":"AsyncThunk","description":"Content","sidebar":"tutorialSidebar"},"redux/before-starting":{"id":"redux/before-starting","title":"Before starting","description":"Content","sidebar":"tutorialSidebar"},"redux/core-idea":{"id":"redux/core-idea","title":"Core idea","description":"Content","sidebar":"tutorialSidebar"},"redux/hooks":{"id":"redux/hooks","title":"Hooks","description":"Content","sidebar":"tutorialSidebar"},"redux/slice":{"id":"redux/slice","title":"Slice","description":"Content","sidebar":"tutorialSidebar"},"redux/state":{"id":"redux/state","title":"State","description":"Content","sidebar":"tutorialSidebar"},"redux/store":{"id":"redux/store","title":"Store","description":"Content","sidebar":"tutorialSidebar"},"resources/fonts":{"id":"resources/fonts","title":"Fonts","description":"Content","sidebar":"tutorialSidebar"},"resources/images":{"id":"resources/images","title":"Images","description":"Before adding images","sidebar":"tutorialSidebar"},"resources/sf-symbols":{"id":"resources/sf-symbols","title":"SF Symbols","description":"Content","sidebar":"tutorialSidebar"},"resources/vector-icons":{"id":"resources/vector-icons","title":"Vector icons","description":"Content","sidebar":"tutorialSidebar"},"structure/module":{"id":"structure/module","title":"Module","description":"Content","sidebar":"tutorialSidebar"},"structure/project":{"id":"structure/project","title":"Project","description":"Content","sidebar":"tutorialSidebar"},"styles/common-sizes":{"id":"styles/common-sizes","title":"Common sizes","description":"Content","sidebar":"tutorialSidebar"},"styles/common-styles":{"id":"styles/common-styles","title":"Common styles","description":"Content","sidebar":"tutorialSidebar"},"styles/component-styles":{"id":"styles/component-styles","title":"Component styles","description":"Content","sidebar":"tutorialSidebar"},"testing/detox":{"id":"testing/detox","title":"Detox","description":"Content","sidebar":"tutorialSidebar"},"testing/jest":{"id":"testing/jest","title":"Jest","description":"Content","sidebar":"tutorialSidebar"},"testing/storybook":{"id":"testing/storybook","title":"Storybook","description":"Content","sidebar":"tutorialSidebar"},"themes/colors":{"id":"themes/colors","title":"Colors","description":"Content","sidebar":"tutorialSidebar"},"themes/native-colors":{"id":"themes/native-colors","title":"Native colors","description":"Content","sidebar":"tutorialSidebar"},"types":{"id":"types","title":"Types","description":"Own types, interfaces and enums","sidebar":"tutorialSidebar"},"utils/list-handlers":{"id":"utils/list-handlers","title":"listHandlers","description":"commonListFulfilledHandler","sidebar":"tutorialSidebar"},"utils/new-state":{"id":"utils/new-state","title":"newState","description":"Used primarily for merging redux state objects.","sidebar":"tutorialSidebar"},"utils/serialize-query-params":{"id":"utils/serialize-query-params","title":"serializeQueryParams","description":"","sidebar":"tutorialSidebar"},"utils/url-openers":{"id":"utils/url-openers","title":"URL openers","description":"PhoneUrl","sidebar":"tutorialSidebar"},"validations":{"id":"validations","title":"Validations","description":"Content","sidebar":"tutorialSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/d589d3a7.7490123a.js b/assets/js/d589d3a7.7490123a.js deleted file mode 100644 index 2df55fec..00000000 --- a/assets/js/d589d3a7.7490123a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7162],{6443:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var s=n(5893),r=n(1151);const i={sidebar_position:1,title:"Getting started"},a=void 0,o={id:"getting-started",title:"Getting started",description:"Before you start",source:"@site/docs/getting-started.md",sourceDirName:".",slug:"/getting-started",permalink:"/react-native-template-strong/docs/getting-started",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/getting-started.md",tags:[],version:"current",lastUpdatedAt:1704743195,formattedLastUpdatedAt:"Jan 8, 2024",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Getting started"},sidebar:"tutorialSidebar",next:{title:"Project",permalink:"/react-native-template-strong/docs/structure/project"}},d={},c=[{value:"Before you start",id:"before-you-start",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Usage",id:"usage",level:2},{value:"After usage",id:"after-usage",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"before-you-start",children:"Before you start"}),"\n",(0,s.jsxs)(t.p,{children:["If you are new to React Native, it would be better to learn a bit about it first by\n",(0,s.jsx)(t.a,{href:"https://reactnative.dev/docs/getting-started",children:"checking its website"})," and then come back here."]}),"\n",(0,s.jsxs)(t.p,{children:["To work with this template you have to install everything what's needed in order to work with React Native,\nmake sure you have ",(0,s.jsx)(t.a,{href:"https://reactnative.dev/docs/environment-setup",children:"environment ready to work with"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsx)(t.p,{children:"These are the versions of tools on which this template was created and tested (higher versions should be also supported):"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://developer.android.com/studio",children:"Android Studio Hedgehog | 2023.1.1 Patch 1"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Gradle 8.3"}),"\n",(0,s.jsx)(t.li,{children:"JDK 17 (Zulu 17)"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://apps.apple.com/us/app/xcode/id497799835?mt=12",children:"XCode 15.0"})}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://nodejs.org/",children:"Node 20.7.0"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"npm 10.1.0"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"npx --force react-native init MyApp --template react-native-template-strong --npm\n"})}),"\n",(0,s.jsx)(t.h2,{id:"after-usage",children:"After usage"}),"\n",(0,s.jsx)(t.p,{children:"I strongly advise you to be patient, and check documentation to know about all available features."}),"\n",(0,s.jsxs)(t.p,{children:["If you have any questions regarding any particular decision check ",(0,s.jsx)(t.a,{href:"../faq",children:"FAQ"}),"\nor ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/issues/new/choose",children:"ask a question"}),"\nor ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/discussions",children:"create a discussion"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["If you have any questions you can check the ",(0,s.jsx)(t.a,{href:"../troubleshooting",children:"troubleshooting"})," section."]})]})}function h(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>o,a:()=>a});var s=n(7294);const r={},i=s.createContext(r);function a(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d589d3a7.bea6f018.js b/assets/js/d589d3a7.bea6f018.js new file mode 100644 index 00000000..3d0166ae --- /dev/null +++ b/assets/js/d589d3a7.bea6f018.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7924],{8578:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var s=n(4848),r=n(8453);const i={sidebar_position:1,title:"Getting started"},a=void 0,o={id:"getting-started",title:"Getting started",description:"Before you start",source:"@site/docs/getting-started.md",sourceDirName:".",slug:"/getting-started",permalink:"/react-native-template-strong/docs/getting-started",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/getting-started.md",tags:[],version:"current",lastUpdatedAt:1714909701e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Getting started"},sidebar:"tutorialSidebar",next:{title:"Project",permalink:"/react-native-template-strong/docs/structure/project"}},c={},d=[{value:"Before you start",id:"before-you-start",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Usage",id:"usage",level:2},{value:"After usage",id:"after-usage",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"before-you-start",children:"Before you start"}),"\n",(0,s.jsxs)(t.p,{children:["If you are new to React Native, it would be better to learn a bit about it first by\n",(0,s.jsx)(t.a,{href:"https://reactnative.dev/docs/getting-started",children:"checking its website"})," and then come back here."]}),"\n",(0,s.jsxs)(t.p,{children:["To work with this template you have to install everything what's needed in order to work with React Native,\nmake sure you have ",(0,s.jsx)(t.a,{href:"https://reactnative.dev/docs/environment-setup",children:"environment ready to work with"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsx)(t.p,{children:"These are the versions of tools on which this template was created and tested (higher versions should be also supported):"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://developer.android.com/studio",children:"Android Studio Jellyfish | 2023.3.1"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Gradle 8.6"}),"\n",(0,s.jsx)(t.li,{children:"JDK 17 (Zulu 17)"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://apps.apple.com/us/app/xcode/id497799835?mt=12",children:"XCode 15.0"})}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://nodejs.org/",children:"Node 21.6.1"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"npm 10.2.4"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"npx --force react-native init MyApp --template react-native-template-strong --npm\n"})}),"\n",(0,s.jsx)(t.h2,{id:"after-usage",children:"After usage"}),"\n",(0,s.jsx)(t.p,{children:"I strongly advise you to be patient, and check documentation to know about all available features."}),"\n",(0,s.jsxs)(t.p,{children:["If you have any questions regarding any particular decision check ",(0,s.jsx)(t.a,{href:"../faq",children:"FAQ"}),"\nor ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/issues/new/choose",children:"ask a question"}),"\nor ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/discussions",children:"create a discussion"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["If you have any questions you can check the ",(0,s.jsx)(t.a,{href:"../troubleshooting",children:"troubleshooting"})," section."]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>o});var s=n(6540);const r={},i=s.createContext(r);function a(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d95e32bd.2240e801.js b/assets/js/d95e32bd.2240e801.js deleted file mode 100644 index 48a7531f..00000000 --- a/assets/js/d95e32bd.2240e801.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1390],{3589:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var s=t(5893),i=t(1151);const o={sidebar_position:11,title:"netInfoHelpers"},r=void 0,a={id:"helpers/net-info-helpers",title:"netInfoHelpers",description:"Content",source:"@site/docs/helpers/net-info-helpers.md",sourceDirName:"helpers",slug:"/helpers/net-info-helpers",permalink:"/react-native-template-strong/docs/helpers/net-info-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/net-info-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672,formattedLastUpdatedAt:"Oct 10, 2021",sidebarPosition:11,frontMatter:{sidebar_position:11,title:"netInfoHelpers"},sidebar:"tutorialSidebar",previous:{title:"inAppReviewHelper",permalink:"/react-native-template-strong/docs/helpers/in-app-review-helper"},next:{title:"shareHelpers",permalink:"/react-native-template-strong/docs/helpers/share-helpers"}},l={},c=[{value:"Content",id:"content",level:2},{value:"startListeningToNetInfo",id:"startlisteningtonetinfo",level:3},{value:"Usage example",id:"usage-example",level:4},{value:"unsubscribeFromNetInfo",id:"unsubscribefromnetinfo",level:3}];function p(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(n.p,{children:["Checks Internet connection. Made possible by ",(0,s.jsx)(n.a,{href:"https://github.com/react-native-netinfo/react-native-netinfo",children:"react-native-netinfo"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"startlisteningtonetinfo",children:"startListeningToNetInfo"}),"\n",(0,s.jsxs)(n.p,{children:["Starts listening to net-info changes, and if ",(0,s.jsx)(n.code,{children:"isInternetReachable"})," is equal to ",(0,s.jsx)(n.code,{children:"false"})," then shows ",(0,s.jsx)(n.code,{children:"alert"})," that states that there are no Internet connection and gives user a choice to open settings."]}),"\n",(0,s.jsxs)(n.p,{children:["Won't work if you provide ",(0,s.jsx)(n.code,{children:"IGNORE_NET_INFO"})," as ",(0,s.jsx)(n.code,{children:"true"})," in your environment variables."]}),"\n",(0,s.jsx)(n.p,{children:"Shows only once."}),"\n",(0,s.jsx)(n.p,{children:"Don't forget to unsubscribe."}),"\n",(0,s.jsx)(n.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"export function setInitialRoot() {\n Navigation.setRoot({\n root: {\n component: {\n name: Pages.splash.name,\n id: Pages.splash.id,\n options: {\n topBar: {\n visible: false,\n },\n },\n },\n },\n }).then(startListeningToNetInfo);\n}\n"})}),"\n",(0,s.jsx)(n.h3,{id:"unsubscribefromnetinfo",children:"unsubscribeFromNetInfo"}),"\n",(0,s.jsx)(n.p,{children:"Unsubscribe from listening to net-info changes."})]})}function d(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>a,a:()=>r});var s=t(7294);const i={},o=s.createContext(i);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d95e32bd.2fed79d0.js b/assets/js/d95e32bd.2fed79d0.js new file mode 100644 index 00000000..5c6a78fb --- /dev/null +++ b/assets/js/d95e32bd.2fed79d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[769],{1048:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var s=t(4848),i=t(8453);const o={sidebar_position:11,title:"netInfoHelpers"},r=void 0,a={id:"helpers/net-info-helpers",title:"netInfoHelpers",description:"Content",source:"@site/docs/helpers/net-info-helpers.md",sourceDirName:"helpers",slug:"/helpers/net-info-helpers",permalink:"/react-native-template-strong/docs/helpers/net-info-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/net-info-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672e3,sidebarPosition:11,frontMatter:{sidebar_position:11,title:"netInfoHelpers"},sidebar:"tutorialSidebar",previous:{title:"inAppReviewHelper",permalink:"/react-native-template-strong/docs/helpers/in-app-review-helper"},next:{title:"shareHelpers",permalink:"/react-native-template-strong/docs/helpers/share-helpers"}},l={},c=[{value:"Content",id:"content",level:2},{value:"startListeningToNetInfo",id:"startlisteningtonetinfo",level:3},{value:"Usage example",id:"usage-example",level:4},{value:"unsubscribeFromNetInfo",id:"unsubscribefromnetinfo",level:3}];function p(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(n.p,{children:["Checks Internet connection. Made possible by ",(0,s.jsx)(n.a,{href:"https://github.com/react-native-netinfo/react-native-netinfo",children:"react-native-netinfo"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"startlisteningtonetinfo",children:"startListeningToNetInfo"}),"\n",(0,s.jsxs)(n.p,{children:["Starts listening to net-info changes, and if ",(0,s.jsx)(n.code,{children:"isInternetReachable"})," is equal to ",(0,s.jsx)(n.code,{children:"false"})," then shows ",(0,s.jsx)(n.code,{children:"alert"})," that states that there are no Internet connection and gives user a choice to open settings."]}),"\n",(0,s.jsxs)(n.p,{children:["Won't work if you provide ",(0,s.jsx)(n.code,{children:"IGNORE_NET_INFO"})," as ",(0,s.jsx)(n.code,{children:"true"})," in your environment variables."]}),"\n",(0,s.jsx)(n.p,{children:"Shows only once."}),"\n",(0,s.jsx)(n.p,{children:"Don't forget to unsubscribe."}),"\n",(0,s.jsx)(n.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:"jsx",children:"export function setInitialRoot() {\n Navigation.setRoot({\n root: {\n component: {\n name: Pages.splash.name,\n id: Pages.splash.id,\n options: {\n topBar: {\n visible: false,\n },\n },\n },\n },\n }).then(startListeningToNetInfo);\n}\n"})}),"\n",(0,s.jsx)(n.h3,{id:"unsubscribefromnetinfo",children:"unsubscribeFromNetInfo"}),"\n",(0,s.jsx)(n.p,{children:"Unsubscribe from listening to net-info changes."})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var s=t(6540);const i={},o=s.createContext(i);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/da80d167.6725179b.js b/assets/js/da80d167.6725179b.js deleted file mode 100644 index 810cf3e0..00000000 --- a/assets/js/da80d167.6725179b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5048],{1389:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>d});var o=t(5893),r=t(1151);const a={sidebar_position:2,title:"Default options"},i=void 0,s={id:"navigation/default-options",title:"Default options",description:"Content",source:"@site/docs/navigation/default-options.md",sourceDirName:"navigation",slug:"/navigation/default-options",permalink:"/react-native-template-strong/docs/navigation/default-options",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/default-options.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Default options"},sidebar:"tutorialSidebar",previous:{title:"Before starting",permalink:"/react-native-template-strong/docs/navigation/before-starting"},next:{title:"Pages",permalink:"/react-native-template-strong/docs/navigation/pages"}},l={},d=[{value:"Content",id:"content",level:2},{value:"Options",id:"options",level:2},{value:"iOS",id:"ios",level:3},{value:"Android",id:"android",level:3}];function c(n){const e={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,r.a)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.a,{href:"https://wix.github.io/react-native-navigation/api/options-api#setdefaultoptions",children:"Default options"})," are being set in ",(0,o.jsx)(e.code,{children:"src/navigation/navigation.ts"}),":"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",children:'export function setDefaultOptions() {\n Navigation.setDefaultOptions({\n animations: {\n setRoot: {\n waitForRender: true,\n },\n setStackRoot: {\n waitForRender: true,\n },\n },\n layout: {\n componentBackgroundColor: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.background),\n },\n topBar: {\n animate: true,\n drawBehind: !isAndroid,\n background: {\n translucent: true,\n color: platformNativeColor(undefined, PlatformColorsAndroid.navigation),\n },\n title: {\n color: platformNativeColor(undefined, PlatformColorsAndroid.onPrimaryText),\n },\n largeTitle: {\n visible: false,\n },\n scrollEdgeAppearance: {\n active: true,\n noBorder: true,\n },\n searchBar: {\n visible: false,\n hideOnScroll: true,\n hideTopBarOnFocus: true,\n obscuresBackgroundDuringPresentation: true,\n },\n hideNavBarOnFocusSearchBar: true,\n searchBarHiddenWhenScrolling: true,\n searchBarPlaceholder: localization.common.search,\n noBorder: false,\n },\n bottomTabs: {\n animate: true,\n hideShadow: false,\n translucent: true,\n animateTabSelection: true,\n preferLargeIcons: false,\n tabsAttachMode: "together",\n backgroundColor: platformNativeColor(undefined, PlatformColorsAndroid.navigation),\n ...Platform.select({\n android: {\n translucent: false,\n borderWidth: 1,\n borderColor: platformNativeColor(undefined, PlatformColorsAndroid.divider),\n },\n }),\n },\n bottomTab: {\n selectedTextColor: platformNativeColor(PlatformColorsIOS.secondaryLabel, PlatformColorsAndroid.onPrimaryText),\n selectedIconColor: platformNativeColor(PlatformColorsIOS.systemBlue, PlatformColorsAndroid.onPrimaryText),\n textColor: platformNativeColor(PlatformColorsIOS.secondaryLabel, PlatformColorsAndroid.onPrimaryTextOpacity),\n iconColor: platformNativeColor(PlatformColorsIOS.secondaryLabel, PlatformColorsAndroid.onPrimaryTextOpacity),\n },\n statusBar: {\n backgroundColor: platformNativeColor(undefined, PlatformColorsAndroid.statusbar),\n visible: true,\n },\n });\n}\n'})}),"\n",(0,o.jsx)(e.p,{children:"Here we are setting default options which will be applied to every navigation component which will be created in application."}),"\n",(0,o.jsx)(e.p,{children:"So rather than changing lots of different options in pages, modals, overlays, tabs, it's more convenient to do it once\nand then apply needed changes to certain navigation components."}),"\n",(0,o.jsx)(e.p,{children:"These options are being applied ad the application's initialization:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:"export function initializeApp() {\n ...\n setDefaultOptions();\n ...\n}\n"})}),"\n",(0,o.jsx)(e.h2,{id:"options",children:"Options"}),"\n",(0,o.jsx)(e.p,{children:"The options which are provided with template are very close to the stock iOS and Android applications."}),"\n",(0,o.jsx)(e.h3,{id:"ios",children:"iOS"}),"\n",(0,o.jsxs)(e.p,{children:["Bars are translucent, in stacks the large title is present and tint color is ",(0,o.jsx)(e.code,{children:"systemBlue"}),"."]}),"\n",(0,o.jsx)(e.h3,{id:"android",children:"Android"}),"\n",(0,o.jsxs)(e.p,{children:["Bars' background is set to follow the Material's primary color while ",(0,o.jsx)(e.code,{children:"light"})," theme is on, and they are dark when ",(0,o.jsx)(e.code,{children:"dark"})," theme is on."]}),"\n",(0,o.jsx)(e.p,{children:"Bottom bar animation is present."}),"\n",(0,o.jsx)(e.p,{children:"Status bar changes its color accordingly to theme."})]})}function p(n={}){const{wrapper:e}={...(0,r.a)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(c,{...n})}):c(n)}},1151:(n,e,t)=>{t.d(e,{Z:()=>s,a:()=>i});var o=t(7294);const r={},a=o.createContext(r);function i(n){const e=o.useContext(a);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:i(n.components),o.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/da80d167.8cf6ebd3.js b/assets/js/da80d167.8cf6ebd3.js new file mode 100644 index 00000000..b06fcaad --- /dev/null +++ b/assets/js/da80d167.8cf6ebd3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1238],{139:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>d});var o=t(4848),r=t(8453);const a={sidebar_position:2,title:"Default options"},i=void 0,s={id:"navigation/default-options",title:"Default options",description:"Content",source:"@site/docs/navigation/default-options.md",sourceDirName:"navigation",slug:"/navigation/default-options",permalink:"/react-native-template-strong/docs/navigation/default-options",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/navigation/default-options.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Default options"},sidebar:"tutorialSidebar",previous:{title:"Before starting",permalink:"/react-native-template-strong/docs/navigation/before-starting"},next:{title:"Pages",permalink:"/react-native-template-strong/docs/navigation/pages"}},l={},d=[{value:"Content",id:"content",level:2},{value:"Options",id:"options",level:2},{value:"iOS",id:"ios",level:3},{value:"Android",id:"android",level:3}];function c(n){const e={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,r.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.a,{href:"https://wix.github.io/react-native-navigation/api/options-api#setdefaultoptions",children:"Default options"})," are being set in ",(0,o.jsx)(e.code,{children:"src/navigation/navigation.ts"}),":"]}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",children:'export function setDefaultOptions() {\n Navigation.setDefaultOptions({\n animations: {\n setRoot: {\n waitForRender: true,\n },\n setStackRoot: {\n waitForRender: true,\n },\n },\n layout: {\n componentBackgroundColor: platformNativeColor(PlatformColorsIOS.systemBackground, PlatformColorsAndroid.background),\n },\n topBar: {\n animate: true,\n drawBehind: !isAndroid,\n background: {\n translucent: true,\n color: platformNativeColor(undefined, PlatformColorsAndroid.navigation),\n },\n title: {\n color: platformNativeColor(undefined, PlatformColorsAndroid.onPrimaryText),\n },\n largeTitle: {\n visible: false,\n },\n scrollEdgeAppearance: {\n active: true,\n noBorder: true,\n },\n searchBar: {\n visible: false,\n hideOnScroll: true,\n hideTopBarOnFocus: true,\n obscuresBackgroundDuringPresentation: true,\n },\n hideNavBarOnFocusSearchBar: true,\n searchBarHiddenWhenScrolling: true,\n searchBarPlaceholder: localization.common.search,\n noBorder: false,\n },\n bottomTabs: {\n animate: true,\n hideShadow: false,\n translucent: true,\n animateTabSelection: true,\n preferLargeIcons: false,\n tabsAttachMode: "together",\n backgroundColor: platformNativeColor(undefined, PlatformColorsAndroid.navigation),\n ...Platform.select({\n android: {\n translucent: false,\n borderWidth: 1,\n borderColor: platformNativeColor(undefined, PlatformColorsAndroid.divider),\n },\n }),\n },\n bottomTab: {\n selectedTextColor: platformNativeColor(PlatformColorsIOS.secondaryLabel, PlatformColorsAndroid.onPrimaryText),\n selectedIconColor: platformNativeColor(PlatformColorsIOS.systemBlue, PlatformColorsAndroid.onPrimaryText),\n textColor: platformNativeColor(PlatformColorsIOS.secondaryLabel, PlatformColorsAndroid.onPrimaryTextOpacity),\n iconColor: platformNativeColor(PlatformColorsIOS.secondaryLabel, PlatformColorsAndroid.onPrimaryTextOpacity),\n },\n statusBar: {\n backgroundColor: platformNativeColor(undefined, PlatformColorsAndroid.statusbar),\n visible: true,\n },\n });\n}\n'})}),"\n",(0,o.jsx)(e.p,{children:"Here we are setting default options which will be applied to every navigation component which will be created in application."}),"\n",(0,o.jsx)(e.p,{children:"So rather than changing lots of different options in pages, modals, overlays, tabs, it's more convenient to do it once\nand then apply needed changes to certain navigation components."}),"\n",(0,o.jsx)(e.p,{children:"These options are being applied ad the application's initialization:"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:"export function initializeApp() {\n ...\n setDefaultOptions();\n ...\n}\n"})}),"\n",(0,o.jsx)(e.h2,{id:"options",children:"Options"}),"\n",(0,o.jsx)(e.p,{children:"The options which are provided with template are very close to the stock iOS and Android applications."}),"\n",(0,o.jsx)(e.h3,{id:"ios",children:"iOS"}),"\n",(0,o.jsxs)(e.p,{children:["Bars are translucent, in stacks the large title is present and tint color is ",(0,o.jsx)(e.code,{children:"systemBlue"}),"."]}),"\n",(0,o.jsx)(e.h3,{id:"android",children:"Android"}),"\n",(0,o.jsxs)(e.p,{children:["Bars' background is set to follow the Material's primary color while ",(0,o.jsx)(e.code,{children:"light"})," theme is on, and they are dark when ",(0,o.jsx)(e.code,{children:"dark"})," theme is on."]}),"\n",(0,o.jsx)(e.p,{children:"Bottom bar animation is present."}),"\n",(0,o.jsx)(e.p,{children:"Status bar changes its color accordingly to theme."})]})}function p(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(c,{...n})}):c(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>i,x:()=>s});var o=t(6540);const r={},a=o.createContext(r);function i(n){const e=o.useContext(a);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:i(n.components),o.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/e1df6725.43681cc0.js b/assets/js/e1df6725.43681cc0.js new file mode 100644 index 00000000..cb05a021 --- /dev/null +++ b/assets/js/e1df6725.43681cc0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4281],{7963:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>p,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var s=n(4848),o=n(8453);const c={sidebar_position:7,title:"Hooks"},r=void 0,i={id:"redux/hooks",title:"Hooks",description:"Content",source:"@site/docs/redux/hooks.md",sourceDirName:"redux",slug:"/redux/hooks",permalink:"/react-native-template-strong/docs/redux/hooks",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/hooks.md",tags:[],version:"current",lastUpdatedAt:168909824e4,sidebarPosition:7,frontMatter:{sidebar_position:7,title:"Hooks"},sidebar:"tutorialSidebar",previous:{title:"AsyncThunk",permalink:"/react-native-template-strong/docs/redux/async-thunk"},next:{title:"Fonts",permalink:"/react-native-template-strong/docs/resources/fonts"}},a={},d=[{value:"Content",id:"content",level:2}];function l(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Some hooks which are present in ",(0,s.jsx)(t.code,{children:"react-redux"})," have been modified to utilize local store configuration."]}),"\n",(0,s.jsx)(t.p,{children:"These are the changes that were made:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"useDispatch"})," becomes ",(0,s.jsx)(t.code,{children:"useAppDispatch"}),":"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"export const useAppDispatch = () => useDispatch ();\n"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"useSelector"})," becomes ",(0,s.jsx)(t.code,{children:"useAppSelector"}),":"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"export const useAppSelector: TypedUseSelectorHook = useSelector;\n"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"createAsyncThunk"})," becomes ",(0,s.jsx)(t.code,{children:"createAppAsyncThunk"}),":"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"export const createAppAsyncThunk = createAsyncThunk.withTypes<{\n state: RootState;\n dispatch: AppDispatch;\n}>();\n"})})]})}function p(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var s=n(6540);const o={},c=s.createContext(o);function r(e){const t=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e1df6725.9a0719f9.js b/assets/js/e1df6725.9a0719f9.js deleted file mode 100644 index 5f0a8c92..00000000 --- a/assets/js/e1df6725.9a0719f9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1314],{8578:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>p,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var s=n(5893),o=n(1151);const c={sidebar_position:7,title:"Hooks"},r=void 0,i={id:"redux/hooks",title:"Hooks",description:"Content",source:"@site/docs/redux/hooks.md",sourceDirName:"redux",slug:"/redux/hooks",permalink:"/react-native-template-strong/docs/redux/hooks",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/hooks.md",tags:[],version:"current",lastUpdatedAt:1689098240,formattedLastUpdatedAt:"Jul 11, 2023",sidebarPosition:7,frontMatter:{sidebar_position:7,title:"Hooks"},sidebar:"tutorialSidebar",previous:{title:"AsyncThunk",permalink:"/react-native-template-strong/docs/redux/async-thunk"},next:{title:"Fonts",permalink:"/react-native-template-strong/docs/resources/fonts"}},a={},d=[{value:"Content",id:"content",level:2}];function l(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Some hooks which are present in ",(0,s.jsx)(t.code,{children:"react-redux"})," have been modified to utilize local store configuration."]}),"\n",(0,s.jsx)(t.p,{children:"These are the changes that were made:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"useDispatch"})," becomes ",(0,s.jsx)(t.code,{children:"useAppDispatch"}),":"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"export const useAppDispatch = () => useDispatch ();\n"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"useSelector"})," becomes ",(0,s.jsx)(t.code,{children:"useAppSelector"}),":"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"export const useAppSelector: TypedUseSelectorHook = useSelector;\n"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"createAsyncThunk"})," becomes ",(0,s.jsx)(t.code,{children:"createAppAsyncThunk"}),":"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:"export const createAppAsyncThunk = createAsyncThunk.withTypes<{\n state: RootState;\n dispatch: AppDispatch;\n}>();\n"})})]})}function p(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>r});var s=n(7294);const o={},c=s.createContext(o);function r(e){const t=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e2ad1f17.c74488c3.js b/assets/js/e2ad1f17.c74488c3.js deleted file mode 100644 index 56413868..00000000 --- a/assets/js/e2ad1f17.c74488c3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9264],{4173:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>c,default:()=>g,frontMatter:()=>s,metadata:()=>r,toc:()=>f});var i=n(5893),o=n(1151);const s={sidebar_position:2,title:"TypeScript config"},c=void 0,r={id:"configs/ts-config",title:"TypeScript config",description:"TypeScript config is strict as ESLint rules and relies on config from eslint-config-react-strong's TypeScript Config",source:"@site/docs/configs/ts-config.md",sourceDirName:"configs",slug:"/configs/ts-config",permalink:"/react-native-template-strong/docs/configs/ts-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/ts-config.md",tags:[],version:"current",lastUpdatedAt:1633194349,formattedLastUpdatedAt:"Oct 2, 2021",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"TypeScript config"},sidebar:"tutorialSidebar",previous:{title:"React Native config",permalink:"/react-native-template-strong/docs/configs/rn-config"},next:{title:"ESLint config",permalink:"/react-native-template-strong/docs/configs/eslint-config"}},a={},f=[];function p(t){const e={a:"a",p:"p",...(0,o.a)(),...t.components};return(0,i.jsxs)(e.p,{children:["TypeScript config is strict as ESLint rules and relies on config from ",(0,i.jsx)(e.a,{href:"https://github.com/svbutko/eslint-config-react-strong/blob/master/configs/tsconfig.md",children:"eslint-config-react-strong's TypeScript Config"})]})}function g(t={}){const{wrapper:e}={...(0,o.a)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(p,{...t})}):p(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>r,a:()=>c});var i=n(7294);const o={},s=i.createContext(o);function c(t){const e=i.useContext(s);return i.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:c(t.components),i.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/e2ad1f17.eb61c126.js b/assets/js/e2ad1f17.eb61c126.js new file mode 100644 index 00000000..e50bf1de --- /dev/null +++ b/assets/js/e2ad1f17.eb61c126.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[644],{7720:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>c,default:()=>g,frontMatter:()=>s,metadata:()=>r,toc:()=>f});var i=n(4848),o=n(8453);const s={sidebar_position:2,title:"TypeScript config"},c=void 0,r={id:"configs/ts-config",title:"TypeScript config",description:"TypeScript config is strict as ESLint rules and relies on config from eslint-config-react-strong's TypeScript Config",source:"@site/docs/configs/ts-config.md",sourceDirName:"configs",slug:"/configs/ts-config",permalink:"/react-native-template-strong/docs/configs/ts-config",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/configs/ts-config.md",tags:[],version:"current",lastUpdatedAt:1633194349e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"TypeScript config"},sidebar:"tutorialSidebar",previous:{title:"React Native config",permalink:"/react-native-template-strong/docs/configs/rn-config"},next:{title:"ESLint config",permalink:"/react-native-template-strong/docs/configs/eslint-config"}},a={},f=[];function p(t){const e={a:"a",p:"p",...(0,o.R)(),...t.components};return(0,i.jsxs)(e.p,{children:["TypeScript config is strict as ESLint rules and relies on config from ",(0,i.jsx)(e.a,{href:"https://github.com/svbutko/eslint-config-react-strong/blob/master/configs/tsconfig.md",children:"eslint-config-react-strong's TypeScript Config"})]})}function g(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(p,{...t})}):p(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>c,x:()=>r});var i=n(6540);const o={},s=i.createContext(o);function c(t){const e=i.useContext(s);return i.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:c(t.components),i.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/e690c9e7.543bfc19.js b/assets/js/e690c9e7.543bfc19.js new file mode 100644 index 00000000..b7004cc2 --- /dev/null +++ b/assets/js/e690c9e7.543bfc19.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[21],{8299:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>d,metadata:()=>i,toc:()=>a});var o=t(4848),s=t(8453);const d={sidebar_position:25,title:"Checking on updates"},r=void 0,i={id:"checking-updates",title:"Checking on updates",description:"React Native Template Strong",source:"@site/docs/checking-updates.md",sourceDirName:".",slug:"/checking-updates",permalink:"/react-native-template-strong/docs/checking-updates",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/checking-updates.md",tags:[],version:"current",lastUpdatedAt:1633614778e3,sidebarPosition:25,frontMatter:{sidebar_position:25,title:"Checking on updates"},sidebar:"tutorialSidebar",previous:{title:"Android internals",permalink:"/react-native-template-strong/docs/internals/android"}},c={},a=[{value:"React Native Template Strong",id:"react-native-template-strong",level:2},{value:"Node",id:"node",level:2},{value:"Brew",id:"brew",level:2},{value:"Node modules",id:"node-modules",level:2},{value:"IDEs and Tools",id:"ides-and-tools",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"react-native-template-strong",children:"React Native Template Strong"}),"\n",(0,o.jsxs)(n.p,{children:["You can compare the difference between your version of ",(0,o.jsx)(n.code,{children:"react-native-template-strong"}),"\nand the current one using ",(0,o.jsx)(n.code,{children:"compare"})," in the ",(0,o.jsx)(n.a,{href:"https://github.com/svbutko/react-native-template-strong/releases",children:"GitHub repository releases"})]}),"\n",(0,o.jsxs)(n.p,{children:["To know on what version of template your app was initially created open ",(0,o.jsx)(n.code,{children:"README"})," file in your local repository, and you'll see ",(0,o.jsx)(n.code,{children:"Version"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["When new version of ",(0,o.jsx)(n.code,{children:"react-native"})," or ",(0,o.jsx)(n.code,{children:"react-native-navigation"})," or ",(0,o.jsx)(n.code,{children:"typescript"})," comes, this template will probably follow this and will be updated too as soon as possible."]}),"\n",(0,o.jsx)(n.h2,{id:"node",children:"Node"}),"\n",(0,o.jsxs)(n.p,{children:["Check on ",(0,o.jsx)(n.code,{children:"node"})," and ",(0,o.jsx)(n.code,{children:"npm"})," updates on ",(0,o.jsx)(n.a,{href:"https://nodejs.org/en/",children:"nodejs.org"})," and install current (latest features) version."]}),"\n",(0,o.jsx)(n.h2,{id:"brew",children:"Brew"}),"\n",(0,o.jsxs)(n.p,{children:["Run ",(0,o.jsx)(n.code,{children:"brew update"})," to update ",(0,o.jsx)(n.a,{href:"https://brew.sh",children:"Homebrew"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["After run ",(0,o.jsx)(n.code,{children:"brew outdated"})," to see outdated list of dependencies and if there are some then run ",(0,o.jsx)(n.code,{children:"brew upgrade"})," to keep the latest versions of depedencies like ",(0,o.jsx)(n.code,{children:"watchman"}),", ",(0,o.jsx)(n.code,{children:"adoptopenjdk11"}),", ",(0,o.jsx)(n.code,{children:"node"}),", ",(0,o.jsx)(n.code,{children:"fastlane"})," and many others."]}),"\n",(0,o.jsx)(n.h2,{id:"node-modules",children:"Node modules"}),"\n",(0,o.jsxs)(n.p,{children:["Check on updates of ",(0,o.jsx)(n.code,{children:"node_modules"})," of your own project to keep up with the latest releases by running ",(0,o.jsx)(n.code,{children:"npm run check-dependencies-updates"}),".\nCheck what's new and update if needed."]}),"\n",(0,o.jsx)(n.h2,{id:"ides-and-tools",children:"IDEs and Tools"}),"\n",(0,o.jsxs)(n.p,{children:["Try to keep your primary IDEs like ",(0,o.jsx)(n.code,{children:"Android Studio"}),", ",(0,o.jsx)(n.code,{children:"XCode"}),", ",(0,o.jsx)(n.code,{children:"VSCode"}),", ",(0,o.jsx)(n.code,{children:"WebStorm"})," and tools like ",(0,o.jsx)(n.code,{children:"Flipper"}),", ",(0,o.jsx)(n.code,{children:"Postman"})," updated too."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>i});var o=t(6540);const s={},d=o.createContext(s);function r(e){const n=o.useContext(d);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e690c9e7.a8a7b878.js b/assets/js/e690c9e7.a8a7b878.js deleted file mode 100644 index 2a7ccffb..00000000 --- a/assets/js/e690c9e7.a8a7b878.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7686],{4408:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>d,metadata:()=>i,toc:()=>c});var o=n(5893),s=n(1151);const d={sidebar_position:25,title:"Checking on updates"},r=void 0,i={id:"checking-updates",title:"Checking on updates",description:"React Native Template Strong",source:"@site/docs/checking-updates.md",sourceDirName:".",slug:"/checking-updates",permalink:"/react-native-template-strong/docs/checking-updates",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/checking-updates.md",tags:[],version:"current",lastUpdatedAt:1633614778,formattedLastUpdatedAt:"Oct 7, 2021",sidebarPosition:25,frontMatter:{sidebar_position:25,title:"Checking on updates"},sidebar:"tutorialSidebar",previous:{title:"Android internals",permalink:"/react-native-template-strong/docs/internals/android"}},a={},c=[{value:"React Native Template Strong",id:"react-native-template-strong",level:2},{value:"Node",id:"node",level:2},{value:"Brew",id:"brew",level:2},{value:"Node modules",id:"node-modules",level:2},{value:"IDEs and Tools",id:"ides-and-tools",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",p:"p",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"react-native-template-strong",children:"React Native Template Strong"}),"\n",(0,o.jsxs)(t.p,{children:["You can compare the difference between your version of ",(0,o.jsx)(t.code,{children:"react-native-template-strong"}),"\nand the current one using ",(0,o.jsx)(t.code,{children:"compare"})," in the ",(0,o.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/releases",children:"GitHub repository releases"})]}),"\n",(0,o.jsxs)(t.p,{children:["To know on what version of template your app was initially created open ",(0,o.jsx)(t.code,{children:"README"})," file in your local repository, and you'll see ",(0,o.jsx)(t.code,{children:"Version"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["When new version of ",(0,o.jsx)(t.code,{children:"react-native"})," or ",(0,o.jsx)(t.code,{children:"react-native-navigation"})," or ",(0,o.jsx)(t.code,{children:"typescript"})," comes, this template will probably follow this and will be updated too as soon as possible."]}),"\n",(0,o.jsx)(t.h2,{id:"node",children:"Node"}),"\n",(0,o.jsxs)(t.p,{children:["Check on ",(0,o.jsx)(t.code,{children:"node"})," and ",(0,o.jsx)(t.code,{children:"npm"})," updates on ",(0,o.jsx)(t.a,{href:"https://nodejs.org/en/",children:"nodejs.org"})," and install current (latest features) version."]}),"\n",(0,o.jsx)(t.h2,{id:"brew",children:"Brew"}),"\n",(0,o.jsxs)(t.p,{children:["Run ",(0,o.jsx)(t.code,{children:"brew update"})," to update ",(0,o.jsx)(t.a,{href:"https://brew.sh",children:"Homebrew"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["After run ",(0,o.jsx)(t.code,{children:"brew outdated"})," to see outdated list of dependencies and if there are some then run ",(0,o.jsx)(t.code,{children:"brew upgrade"})," to keep the latest versions of depedencies like ",(0,o.jsx)(t.code,{children:"watchman"}),", ",(0,o.jsx)(t.code,{children:"adoptopenjdk11"}),", ",(0,o.jsx)(t.code,{children:"node"}),", ",(0,o.jsx)(t.code,{children:"fastlane"})," and many others."]}),"\n",(0,o.jsx)(t.h2,{id:"node-modules",children:"Node modules"}),"\n",(0,o.jsxs)(t.p,{children:["Check on updates of ",(0,o.jsx)(t.code,{children:"node_modules"})," of your own project to keep up with the latest releases by running ",(0,o.jsx)(t.code,{children:"npm run check-dependencies-updates"}),".\nCheck what's new and update if needed."]}),"\n",(0,o.jsx)(t.h2,{id:"ides-and-tools",children:"IDEs and Tools"}),"\n",(0,o.jsxs)(t.p,{children:["Try to keep your primary IDEs like ",(0,o.jsx)(t.code,{children:"Android Studio"}),", ",(0,o.jsx)(t.code,{children:"XCode"}),", ",(0,o.jsx)(t.code,{children:"VSCode"}),", ",(0,o.jsx)(t.code,{children:"WebStorm"})," and tools like ",(0,o.jsx)(t.code,{children:"Flipper"}),", ",(0,o.jsx)(t.code,{children:"Postman"})," updated too."]})]})}function h(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>r});var o=n(7294);const s={},d=o.createContext(s);function r(e){const t=o.useContext(d);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(d.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e7a9e65a.0490afce.js b/assets/js/e7a9e65a.0490afce.js deleted file mode 100644 index dd7f811e..00000000 --- a/assets/js/e7a9e65a.0490afce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3518],{8969:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>r,contentTitle:()=>i,default:()=>x,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var s=n(5893),l=n(1151);const o={sidebar_position:16,title:"ToastOverlay"},i=void 0,a={id:"components/toast-overlay",title:"ToastOverlay",description:"Content",source:"@site/docs/components/toast-overlay.md",sourceDirName:"components",slug:"/components/toast-overlay",permalink:"/react-native-template-strong/docs/components/toast-overlay",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/toast-overlay.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:16,frontMatter:{sidebar_position:16,title:"ToastOverlay"},sidebar:"tutorialSidebar",previous:{title:"DatePickerOverlay",permalink:"/react-native-template-strong/docs/components/date-picker-overlay"},next:{title:"Native splash",permalink:"/react-native-template-strong/docs/pages/native-splash"}},r={},d=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function c(t){const e={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.a)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(e.admonition,{title:"Do not use this component directly!",type:"danger",children:(0,s.jsxs)(e.p,{children:["Use ",(0,s.jsx)(e.code,{children:"showToast"})," to present this component because it's linked to navigation."]})}),"\n",(0,s.jsx)(e.p,{children:"Represents a simple toast overlay which animatedly appears for 3 seconds with presented text and the animatedly disappears."}),"\n",(0,s.jsx)(e.h2,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"text"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"string"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Text which will be shown"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"textStyle"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"TextStyle"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Style of text"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"icon"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"ImageURISource"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Icon which will be shown on the lft side from message"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"iconStyle"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"ImageStyle"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Icon style"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"loading"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"boolean"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Shows activity indicator"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"location"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"bottom or top"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsxs)(e.td,{style:{textAlign:"left"},children:[(0,s.jsx)(e.code,{children:"top"})," on iOS, ",(0,s.jsx)(e.code,{children:"bottom"})," on Android"]}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Location of toast"})]})]})]}),"\n",(0,s.jsx)(e.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:' const showTopToast = useCallback(() => {\n showToast({\n text: "Toast message text",\n location: "top",\n });\n}, []);\n\nconst showBottomToast = useCallback(() => {\n showToast({\n text: "Toast message text",\n location: "bottom",\n });\n}, []);\n\nconst showBottomToastLoading = useCallback(() => {\n showToast({\n text: "Loading message",\n location: "bottom",\n loading: true,\n });\n}, []);\n\nconst showBottomToastIcon = useCallback(() => {\n showToast({\n text: "Message with icon",\n location: "bottom",\n icon: ImageResources.camera,\n iconStyle: {tintColor: Colors.red},\n });\n}, []);\n\nreturn (\n \n \n);\n'})})]})}function x(t={}){const{wrapper:e}={...(0,l.a)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(c,{...t})}):c(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>a,a:()=>i});var s=n(7294);const l={},o=s.createContext(l);function i(t){const e=s.useContext(o);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function a(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(l):t.components||l:i(t.components),s.createElement(o.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/e7a9e65a.22664468.js b/assets/js/e7a9e65a.22664468.js new file mode 100644 index 00000000..61680e16 --- /dev/null +++ b/assets/js/e7a9e65a.22664468.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1910],{5669:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>i,default:()=>x,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=n(4848),l=n(8453);const o={sidebar_position:16,title:"ToastOverlay"},i=void 0,r={id:"components/toast-overlay",title:"ToastOverlay",description:"Content",source:"@site/docs/components/toast-overlay.md",sourceDirName:"components",slug:"/components/toast-overlay",permalink:"/react-native-template-strong/docs/components/toast-overlay",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/toast-overlay.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:16,frontMatter:{sidebar_position:16,title:"ToastOverlay"},sidebar:"tutorialSidebar",previous:{title:"DatePickerOverlay",permalink:"/react-native-template-strong/docs/components/date-picker-overlay"},next:{title:"Native splash",permalink:"/react-native-template-strong/docs/pages/native-splash"}},a={},d=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function c(t){const e={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(e.admonition,{title:"Do not use this component directly!",type:"danger",children:(0,s.jsxs)(e.p,{children:["Use ",(0,s.jsx)(e.code,{children:"showToast"})," to present this component because it's linked to navigation."]})}),"\n",(0,s.jsx)(e.p,{children:"Represents a simple toast overlay which animatedly appears for 3 seconds with presented text and the animatedly disappears."}),"\n",(0,s.jsx)(e.h2,{id:"params",children:"Params"}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Name"}),(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Default value"}),(0,s.jsx)(e.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"text"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"string"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"True"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"-"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Text which will be shown"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"textStyle"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"TextStyle"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Style of text"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"icon"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"ImageURISource"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Icon which will be shown on the lft side from message"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"iconStyle"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"ImageStyle"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Icon style"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"loading"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"boolean"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Undefined"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Shows activity indicator"})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"location"}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:(0,s.jsx)(e.code,{children:"bottom or top"})}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"False"}),(0,s.jsxs)(e.td,{style:{textAlign:"left"},children:[(0,s.jsx)(e.code,{children:"top"})," on iOS, ",(0,s.jsx)(e.code,{children:"bottom"})," on Android"]}),(0,s.jsx)(e.td,{style:{textAlign:"left"},children:"Location of toast"})]})]})]}),"\n",(0,s.jsx)(e.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-typescript",metastring:"jsx",children:' const showTopToast = useCallback(() => {\n showToast({\n text: "Toast message text",\n location: "top",\n });\n}, []);\n\nconst showBottomToast = useCallback(() => {\n showToast({\n text: "Toast message text",\n location: "bottom",\n });\n}, []);\n\nconst showBottomToastLoading = useCallback(() => {\n showToast({\n text: "Loading message",\n location: "bottom",\n loading: true,\n });\n}, []);\n\nconst showBottomToastIcon = useCallback(() => {\n showToast({\n text: "Message with icon",\n location: "bottom",\n icon: ImageResources.camera,\n iconStyle: {tintColor: Colors.red},\n });\n}, []);\n\nreturn (\n\n \n \n \n \n \n);\n'})})]})}function x(t={}){const{wrapper:e}={...(0,l.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(c,{...t})}):c(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>i,x:()=>r});var s=n(6540);const l={},o=s.createContext(l);function i(t){const e=s.useContext(o);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(l):t.components||l:i(t.components),s.createElement(o.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/eb838824.a40aa30b.js b/assets/js/eb838824.a40aa30b.js new file mode 100644 index 00000000..c89e7f67 --- /dev/null +++ b/assets/js/eb838824.a40aa30b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[367],{3868:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=n(4848),a=n(8453);const o={sidebar_position:20,title:"Patches"},c=void 0,r={id:"patches",title:"Patches",description:"Content",source:"@site/docs/patches.md",sourceDirName:".",slug:"/patches",permalink:"/react-native-template-strong/docs/patches",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/patches.md",tags:[],version:"current",lastUpdatedAt:1633518181e3,sidebarPosition:20,frontMatter:{sidebar_position:20,title:"Patches"},sidebar:"tutorialSidebar",previous:{title:"Types",permalink:"/react-native-template-strong/docs/types"},next:{title:"App icon",permalink:"/react-native-template-strong/docs/app-icon"}},i={},d=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2}];function p(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Work with patches made possible by ",(0,s.jsx)(t.a,{href:"https://github.com/ds300/patch-package",children:"patch-package"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Sometimes it's needed to make changes in packages from ",(0,s.jsx)(t.code,{children:"node_modules"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"There might be an error, mistake, or you need to adjust module to your needs."}),"\n",(0,s.jsx)(t.p,{children:"The best possible way to do so is to make a fork and propose your changes.\nBut this might take some time to accept your changes, or maintainer refuses to accept them,\nor even worse, dependency is not maintained anymore."}),"\n",(0,s.jsx)(t.p,{children:"To handle this situation the best possible way is to make a local patch."}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsxs)(t.p,{children:["First make changes to the files of a particular package in your ",(0,s.jsx)(t.code,{children:"node_modules"})," folder, then run"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-shell",children:"npx patch-package package-name\n"})}),"\n",(0,s.jsxs)(t.p,{children:["where ",(0,s.jsx)(t.code,{children:"package-name"})," matches the name of the package you made changes to."]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>c,x:()=>r});var s=n(6540);const a={},o=s.createContext(a);function c(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eb838824.dd21056d.js b/assets/js/eb838824.dd21056d.js deleted file mode 100644 index 147ade43..00000000 --- a/assets/js/eb838824.dd21056d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4697],{5759:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=n(5893),a=n(1151);const o={sidebar_position:20,title:"Patches"},c=void 0,r={id:"patches",title:"Patches",description:"Content",source:"@site/docs/patches.md",sourceDirName:".",slug:"/patches",permalink:"/react-native-template-strong/docs/patches",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/patches.md",tags:[],version:"current",lastUpdatedAt:1633518181,formattedLastUpdatedAt:"Oct 6, 2021",sidebarPosition:20,frontMatter:{sidebar_position:20,title:"Patches"},sidebar:"tutorialSidebar",previous:{title:"Types",permalink:"/react-native-template-strong/docs/types"},next:{title:"App icon",permalink:"/react-native-template-strong/docs/app-icon"}},i={},d=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2}];function p(e){const t={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsxs)(t.p,{children:["Work with patches made possible by ",(0,s.jsx)(t.a,{href:"https://github.com/ds300/patch-package",children:"patch-package"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Sometimes it's needed to make changes in packages from ",(0,s.jsx)(t.code,{children:"node_modules"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"There might be an error, mistake, or you need to adjust module to your needs."}),"\n",(0,s.jsx)(t.p,{children:"The best possible way to do so is to make a fork and propose your changes.\nBut this might take some time to accept your changes, or maintainer refuses to accept them,\nor even worse, dependency is not maintained anymore."}),"\n",(0,s.jsx)(t.p,{children:"To handle this situation the best possible way is to make a local patch."}),"\n",(0,s.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsxs)(t.p,{children:["First make changes to the files of a particular package in your ",(0,s.jsx)(t.code,{children:"node_modules"})," folder, then run"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-shell",children:"npx patch-package package-name\n"})}),"\n",(0,s.jsxs)(t.p,{children:["where ",(0,s.jsx)(t.code,{children:"package-name"})," matches the name of the package you made changes to."]})]})}function h(e={}){const{wrapper:t}={...(0,a.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>r,a:()=>c});var s=n(7294);const a={},o=s.createContext(a);function c(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec7be5cc.0e067126.js b/assets/js/ec7be5cc.0e067126.js deleted file mode 100644 index b273bcec..00000000 --- a/assets/js/ec7be5cc.0e067126.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8471],{7719:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var a=n(5893),r=n(1151);const s={sidebar_position:4,title:"Date formatter"},o=void 0,i={id:"localisation/date-formatter",title:"Date formatter",description:"Content",source:"@site/docs/localisation/date-formatter.md",sourceDirName:"localisation",slug:"/localisation/date-formatter",permalink:"/react-native-template-strong/docs/localisation/date-formatter",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/localisation/date-formatter.md",tags:[],version:"current",lastUpdatedAt:1634101010,formattedLastUpdatedAt:"Oct 13, 2021",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Date formatter"},sidebar:"tutorialSidebar",previous:{title:"Change language",permalink:"/react-native-template-strong/docs/localisation/change-language"},next:{title:"Intl formatter",permalink:"/react-native-template-strong/docs/localisation/intl-formatter"}},d={},c=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2},{value:"Check how it looks",id:"check-how-it-looks",level:2}];function l(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,a.jsx)(t.p,{children:"Contains date converters and date formatters based on current language."}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"DateFormat"})," - enum of possible formats you can use (you can add you own)"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"dateFromString"})," - tries to convert string represented as date to ",(0,a.jsx)(t.code,{children:"Date"})]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"dateFromUnknown"})," - tries to convert any type possibly represented as date to ",(0,a.jsx)(t.code,{children:"Date"})]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"dateFromFormat"})," - takes date and format and returns the formatted string"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"calendarDate"})," - takes date and formats it to calendar (tomorrow, yesterday, today etc.) date and returns the formatted string"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"getUnixDate"})," - returns given date as ",(0,a.jsx)(t.code,{children:"unix"})," number"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"getInitialDate"})," - takes the date if it exists and returns it otherwise if the date is equal to null returns ",(0,a.jsx)(t.code,{children:"defaultDate"})," or current date"]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"dateFromString"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:'dateFromString("2021-10-01");\n//2021-10-01T00:00:00.000Z as Date\n'})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"dateFromUnknown"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"dateFromUnknown(1234567891011);\n//2009-02-13T23:31:31.011Z as Date\n"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"dateFromFormat"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"dateFromFormat(new Date(), DateFormat.yearDateTime);\n//2021.10.04 12:13\n\ndateFromFormat(new Date(), DateFormat.shortMonthYear);\n//Oct 2021\n"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"calendarDate"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"calendarDate(new Date());\n//Today at 12:14 PM\n\ncalendarDate(new Date(), true)\n//Today\n"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"getUnixDate"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"getUnixDate(new Date());\n//1633338938000\n"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"getInitialDate"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:'getInitialDate(new Date());\n// 2021-10-04T09:16:17.565Z\n\ngetInitialDate(null, new Date("2012-10-01"));\n//2012-10-01T00:00:00.000Z\n'})}),"\n",(0,a.jsx)(t.h2,{id:"check-how-it-looks",children:"Check how it looks"}),"\n",(0,a.jsxs)(t.p,{children:["You can open StoryBook and open ",(0,a.jsx)(t.code,{children:"Format"})," -> ",(0,a.jsx)(t.code,{children:"Date Formats"})," and ",(0,a.jsx)(t.code,{children:"Date Formats Enum"})," stories and see how they are being applied."]})]})}function h(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>o});var a=n(7294);const r={},s=a.createContext(r);function o(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec7be5cc.90a7ff57.js b/assets/js/ec7be5cc.90a7ff57.js new file mode 100644 index 00000000..b9234892 --- /dev/null +++ b/assets/js/ec7be5cc.90a7ff57.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2940],{2924:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var a=n(4848),r=n(8453);const s={sidebar_position:4,title:"Date formatter"},o=void 0,i={id:"localisation/date-formatter",title:"Date formatter",description:"Content",source:"@site/docs/localisation/date-formatter.md",sourceDirName:"localisation",slug:"/localisation/date-formatter",permalink:"/react-native-template-strong/docs/localisation/date-formatter",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/localisation/date-formatter.md",tags:[],version:"current",lastUpdatedAt:163410101e4,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Date formatter"},sidebar:"tutorialSidebar",previous:{title:"Change language",permalink:"/react-native-template-strong/docs/localisation/change-language"},next:{title:"Intl formatter",permalink:"/react-native-template-strong/docs/localisation/intl-formatter"}},d={},c=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2},{value:"Check how it looks",id:"check-how-it-looks",level:2}];function l(e){const t={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,a.jsx)(t.p,{children:"Contains date converters and date formatters based on current language."}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"DateFormat"})," - enum of possible formats you can use (you can add you own)"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"dateFromString"})," - tries to convert string represented as date to ",(0,a.jsx)(t.code,{children:"Date"})]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"dateFromUnknown"})," - tries to convert any type possibly represented as date to ",(0,a.jsx)(t.code,{children:"Date"})]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"dateFromFormat"})," - takes date and format and returns the formatted string"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"calendarDate"})," - takes date and formats it to calendar (tomorrow, yesterday, today etc.) date and returns the formatted string"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"getUnixDate"})," - returns given date as ",(0,a.jsx)(t.code,{children:"unix"})," number"]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"getInitialDate"})," - takes the date if it exists and returns it otherwise if the date is equal to null returns ",(0,a.jsx)(t.code,{children:"defaultDate"})," or current date"]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"dateFromString"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:'dateFromString("2021-10-01");\n//2021-10-01T00:00:00.000Z as Date\n'})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"dateFromUnknown"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"dateFromUnknown(1234567891011);\n//2009-02-13T23:31:31.011Z as Date\n"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"dateFromFormat"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"dateFromFormat(new Date(), DateFormat.yearDateTime);\n//2021.10.04 12:13\n\ndateFromFormat(new Date(), DateFormat.shortMonthYear);\n//Oct 2021\n"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"calendarDate"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"calendarDate(new Date());\n//Today at 12:14 PM\n\ncalendarDate(new Date(), true)\n//Today\n"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"getUnixDate"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"getUnixDate(new Date());\n//1633338938000\n"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"getInitialDate"}),":"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:'getInitialDate(new Date());\n// 2021-10-04T09:16:17.565Z\n\ngetInitialDate(null, new Date("2012-10-01"));\n//2012-10-01T00:00:00.000Z\n'})}),"\n",(0,a.jsx)(t.h2,{id:"check-how-it-looks",children:"Check how it looks"}),"\n",(0,a.jsxs)(t.p,{children:["You can open StoryBook and open ",(0,a.jsx)(t.code,{children:"Format"})," -> ",(0,a.jsx)(t.code,{children:"Date Formats"})," and ",(0,a.jsx)(t.code,{children:"Date Formats Enum"})," stories and see how they are being applied."]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>i});var a=n(6540);const r={},s=a.createContext(r);function o(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/edb259cb.61de9487.js b/assets/js/edb259cb.61de9487.js new file mode 100644 index 00000000..f7d5b72d --- /dev/null +++ b/assets/js/edb259cb.61de9487.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2321],{6489:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>a,toc:()=>c});var n=r(4848),s=r(8453);const l={sidebar_position:5,title:"imageHelpers"},i=void 0,a={id:"helpers/image-helpers",title:"imageHelpers",description:"Content",source:"@site/docs/helpers/image-helpers.md",sourceDirName:"helpers",slug:"/helpers/image-helpers",permalink:"/react-native-template-strong/docs/helpers/image-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/image-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672e3,sidebarPosition:5,frontMatter:{sidebar_position:5,title:"imageHelpers"},sidebar:"tutorialSidebar",previous:{title:"dialogsHelpers",permalink:"/react-native-template-strong/docs/helpers/dialogs-helpers"},next:{title:"orientationHelpers",permalink:"/react-native-template-strong/docs/helpers/orientation-helpers"}},o={},c=[{value:"Content",id:"content",level:2},{value:"convertCropperImageToBase64",id:"convertcropperimagetobase64",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4}];function d(e){const t={code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,n.jsx)(t.p,{children:"Used to convert and apply different changes to images"}),"\n",(0,n.jsx)(t.h3,{id:"convertcropperimagetobase64",children:"convertCropperImageToBase64"}),"\n",(0,n.jsxs)(t.p,{children:["Converts ",(0,n.jsx)(t.code,{children:"CropperImage"})," from ",(0,n.jsx)(t.code,{children:"react-native-image-crop-picker"})," to base64 string using ",(0,n.jsx)(t.code,{children:"mime"})," and ",(0,n.jsx)(t.code,{children:"data"}),"."]}),"\n",(0,n.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"image"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"CropperImage"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,n.jsxs)(t.td,{style:{textAlign:"left"},children:["Picked image as result from ",(0,n.jsx)(t.code,{children:"react-native-image-crop-picker"})]})]})})]}),"\n",(0,n.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" const onImagePicked = useCallback((nextImage) => {\n convertCropperImageToBase64(nextImage);\n}, []);\n"})})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>i,x:()=>a});var n=r(6540);const s={},l=n.createContext(s);function i(e){const t=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/edb259cb.b9d7e83a.js b/assets/js/edb259cb.b9d7e83a.js deleted file mode 100644 index 1556802a..00000000 --- a/assets/js/edb259cb.b9d7e83a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1889],{2625:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>a,toc:()=>c});var n=r(5893),s=r(1151);const l={sidebar_position:5,title:"imageHelpers"},i=void 0,a={id:"helpers/image-helpers",title:"imageHelpers",description:"Content",source:"@site/docs/helpers/image-helpers.md",sourceDirName:"helpers",slug:"/helpers/image-helpers",permalink:"/react-native-template-strong/docs/helpers/image-helpers",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/helpers/image-helpers.md",tags:[],version:"current",lastUpdatedAt:1633852672,formattedLastUpdatedAt:"Oct 10, 2021",sidebarPosition:5,frontMatter:{sidebar_position:5,title:"imageHelpers"},sidebar:"tutorialSidebar",previous:{title:"dialogsHelpers",permalink:"/react-native-template-strong/docs/helpers/dialogs-helpers"},next:{title:"orientationHelpers",permalink:"/react-native-template-strong/docs/helpers/orientation-helpers"}},o={},c=[{value:"Content",id:"content",level:2},{value:"convertCropperImageToBase64",id:"convertcropperimagetobase64",level:3},{value:"Params",id:"params",level:4},{value:"Usage example",id:"usage-example",level:4}];function d(e){const t={code:"code",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,n.jsx)(t.p,{children:"Used to convert and apply different changes to images"}),"\n",(0,n.jsx)(t.h3,{id:"convertcropperimagetobase64",children:"convertCropperImageToBase64"}),"\n",(0,n.jsxs)(t.p,{children:["Converts ",(0,n.jsx)(t.code,{children:"CropperImage"})," from ",(0,n.jsx)(t.code,{children:"react-native-image-crop-picker"})," to base64 string using ",(0,n.jsx)(t.code,{children:"mime"})," and ",(0,n.jsx)(t.code,{children:"data"}),"."]}),"\n",(0,n.jsx)(t.h4,{id:"params",children:"Params"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"image"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"CropperImage"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,n.jsxs)(t.td,{style:{textAlign:"left"},children:["Picked image as result from ",(0,n.jsx)(t.code,{children:"react-native-image-crop-picker"})]})]})})]}),"\n",(0,n.jsx)(t.h4,{id:"usage-example",children:"Usage example"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" const onImagePicked = useCallback((nextImage) => {\n convertCropperImageToBase64(nextImage);\n}, []);\n"})})]})}function p(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},1151:(e,t,r)=>{r.d(t,{Z:()=>a,a:()=>i});var n=r(7294);const s={},l=n.createContext(s);function i(e){const t=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ede50c9e.1818c4e1.js b/assets/js/ede50c9e.1818c4e1.js deleted file mode 100644 index 9593787e..00000000 --- a/assets/js/ede50c9e.1818c4e1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[665],{8409:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var s=n(5893),a=n(1151);const r={sidebar_position:4,title:"State"},i=void 0,o={id:"redux/state",title:"State",description:"Content",source:"@site/docs/redux/state.md",sourceDirName:"redux",slug:"/redux/state",permalink:"/react-native-template-strong/docs/redux/state",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/state.md",tags:[],version:"current",lastUpdatedAt:1633614778,formattedLastUpdatedAt:"Oct 7, 2021",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"State"},sidebar:"tutorialSidebar",previous:{title:"Store",permalink:"/react-native-template-strong/docs/redux/store"},next:{title:"Slice",permalink:"/react-native-template-strong/docs/redux/slice"}},c={},d=[{value:"Content",id:"content",level:2}];function l(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.a)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(e.p,{children:"State is defined by an interface and a constant with its initial values in a separated file."}),"\n",(0,s.jsxs)(e.p,{children:["E.g. ",(0,s.jsx)(e.code,{children:"systemState.ts"}),":"]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-typescript",children:"export interface SystemState {\n isOnboardingVisited: boolean;\n}\n\nexport const SystemInitialState: SystemState = {\n isOnboardingVisited: false,\n};\n"})})]})}function u(t={}){const{wrapper:e}={...(0,a.a)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(l,{...t})}):l(t)}},1151:(t,e,n)=>{n.d(e,{Z:()=>o,a:()=>i});var s=n(7294);const a={},r=s.createContext(a);function i(t){const e=s.useContext(r);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function o(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(a):t.components||a:i(t.components),s.createElement(r.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/ede50c9e.d8774161.js b/assets/js/ede50c9e.d8774161.js new file mode 100644 index 00000000..ac69f50c --- /dev/null +++ b/assets/js/ede50c9e.d8774161.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1671],{9722:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var s=n(4848),i=n(8453);const r={sidebar_position:4,title:"State"},a=void 0,o={id:"redux/state",title:"State",description:"Content",source:"@site/docs/redux/state.md",sourceDirName:"redux",slug:"/redux/state",permalink:"/react-native-template-strong/docs/redux/state",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/redux/state.md",tags:[],version:"current",lastUpdatedAt:1633614778e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"State"},sidebar:"tutorialSidebar",previous:{title:"Store",permalink:"/react-native-template-strong/docs/redux/store"},next:{title:"Slice",permalink:"/react-native-template-strong/docs/redux/slice"}},c={},d=[{value:"Content",id:"content",level:2}];function l(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(e.p,{children:"State is defined by an interface and a constant with its initial values in a separated file."}),"\n",(0,s.jsxs)(e.p,{children:["E.g. ",(0,s.jsx)(e.code,{children:"systemState.ts"}),":"]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-typescript",children:"export interface SystemState {\n isOnboardingVisited: boolean;\n}\n\nexport const SystemInitialState: SystemState = {\n isOnboardingVisited: false,\n};\n"})})]})}function u(t={}){const{wrapper:e}={...(0,i.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(l,{...t})}):l(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>a,x:()=>o});var s=n(6540);const i={},r=s.createContext(i);function a(t){const e=s.useContext(r);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function o(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:a(t.components),s.createElement(r.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2beb3a0.3e2ae2a9.js b/assets/js/f2beb3a0.3e2ae2a9.js deleted file mode 100644 index 956619ee..00000000 --- a/assets/js/f2beb3a0.3e2ae2a9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1486],{236:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var i=t(5893),r=t(1151);const s={sidebar_position:16,title:"Environments"},o=void 0,a={id:"environments",title:"Environments",description:"Work with environments made possible by react-native-config.",source:"@site/docs/environments.md",sourceDirName:".",slug:"/environments",permalink:"/react-native-template-strong/docs/environments",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/environments.md",tags:[],version:"current",lastUpdatedAt:1687357876,formattedLastUpdatedAt:"Jun 21, 2023",sidebarPosition:16,frontMatter:{sidebar_position:16,title:"Environments"},sidebar:"tutorialSidebar",previous:{title:"Intl formatter",permalink:"/react-native-template-strong/docs/localisation/intl-formatter"},next:{title:"API",permalink:"/react-native-template-strong/docs/api"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2},{value:"Change environment",id:"change-environment",level:2},{value:"Add more parameters",id:"add-more-parameters",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Work with environments made possible by ",(0,i.jsx)(n.a,{href:"https://github.com/luggit/react-native-config",children:"react-native-config"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,i.jsx)(n.p,{children:"The application has 4 primitive environments:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env"})," - Common"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env.dev"})," - Development"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env.test"})," - Test"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env.staging"})," - Staging"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env.production"})," - Production"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Each has a set of predefined values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"API_URL"})," - URL of you API"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ENVIRONMENT"})," - current selected environment"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"IGNORE_NET_INFO"})," - ignore ",(0,i.jsx)(n.code,{children:"NetInfo"})," or not (useful while in development)"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsxs)(n.p,{children:["To use environment variables you simply need to import ",(0,i.jsx)(n.code,{children:"Config"})," and use your parameters, like so:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'import Config from "react-native-config";\n\nConfig.ENVIRONMENT;\n'})}),"\n",(0,i.jsx)(n.h2,{id:"change-environment",children:"Change environment"}),"\n",(0,i.jsxs)(n.p,{children:["By default, ",(0,i.jsx)(n.code,{children:".env"})," (development) is selected environment,\nto change that you need to run one of the ",(0,i.jsx)(n.a,{href:"../docs/dependencies#environment-specific",children:"scripts"})," from ",(0,i.jsx)(n.code,{children:"package.json"}),"\nand rebuild your app."]}),"\n",(0,i.jsx)(n.h2,{id:"add-more-parameters",children:"Add more parameters"}),"\n",(0,i.jsx)(n.p,{children:"To add more parameters, first you have to add them in types:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Open ",(0,i.jsx)(n.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/types/react-native-config.d.ts",children:"react-native-config.d.ts"})]}),"\n",(0,i.jsxs)(n.li,{children:["Define your parameter with type inside ",(0,i.jsx)(n.code,{children:"EnvironmentVariables"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["After that add your parameters with values into each ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsx)(n.p,{children:"To see it into action you need to rebuild the application."})]})}function h(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>a,a:()=>o});var i=t(7294);const r={},s=i.createContext(r);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2beb3a0.ccca8106.js b/assets/js/f2beb3a0.ccca8106.js new file mode 100644 index 00000000..6dc3a711 --- /dev/null +++ b/assets/js/f2beb3a0.ccca8106.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8486],{5614:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var i=t(4848),r=t(8453);const s={sidebar_position:16,title:"Environments"},o=void 0,c={id:"environments",title:"Environments",description:"Work with environments made possible by react-native-config.",source:"@site/docs/environments.md",sourceDirName:".",slug:"/environments",permalink:"/react-native-template-strong/docs/environments",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/environments.md",tags:[],version:"current",lastUpdatedAt:1687357876e3,sidebarPosition:16,frontMatter:{sidebar_position:16,title:"Environments"},sidebar:"tutorialSidebar",previous:{title:"Intl formatter",permalink:"/react-native-template-strong/docs/localisation/intl-formatter"},next:{title:"API",permalink:"/react-native-template-strong/docs/api"}},a={},d=[{value:"Content",id:"content",level:2},{value:"Usage",id:"usage",level:2},{value:"Change environment",id:"change-environment",level:2},{value:"Add more parameters",id:"add-more-parameters",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Work with environments made possible by ",(0,i.jsx)(n.a,{href:"https://github.com/luggit/react-native-config",children:"react-native-config"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,i.jsx)(n.p,{children:"The application has 4 primitive environments:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env"})," - Common"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env.dev"})," - Development"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env.test"})," - Test"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env.staging"})," - Staging"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".env.production"})," - Production"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Each has a set of predefined values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"API_URL"})," - URL of you API"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ENVIRONMENT"})," - current selected environment"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"IGNORE_NET_INFO"})," - ignore ",(0,i.jsx)(n.code,{children:"NetInfo"})," or not (useful while in development)"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsxs)(n.p,{children:["To use environment variables you simply need to import ",(0,i.jsx)(n.code,{children:"Config"})," and use your parameters, like so:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'import Config from "react-native-config";\n\nConfig.ENVIRONMENT;\n'})}),"\n",(0,i.jsx)(n.h2,{id:"change-environment",children:"Change environment"}),"\n",(0,i.jsxs)(n.p,{children:["By default, ",(0,i.jsx)(n.code,{children:".env"})," (development) is selected environment,\nto change that you need to run one of the ",(0,i.jsx)(n.a,{href:"../docs/dependencies#environment-specific",children:"scripts"})," from ",(0,i.jsx)(n.code,{children:"package.json"}),"\nand rebuild your app."]}),"\n",(0,i.jsx)(n.h2,{id:"add-more-parameters",children:"Add more parameters"}),"\n",(0,i.jsx)(n.p,{children:"To add more parameters, first you have to add them in types:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Open ",(0,i.jsx)(n.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/types/react-native-config.d.ts",children:"react-native-config.d.ts"})]}),"\n",(0,i.jsxs)(n.li,{children:["Define your parameter with type inside ",(0,i.jsx)(n.code,{children:"EnvironmentVariables"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["After that add your parameters with values into each ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsx)(n.p,{children:"To see it into action you need to rebuild the application."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var i=t(6540);const r={},s=i.createContext(r);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2f008bc.2cbfe496.js b/assets/js/f2f008bc.2cbfe496.js deleted file mode 100644 index cd518a1c..00000000 --- a/assets/js/f2f008bc.2cbfe496.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3220],{8926:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=n(5893),i=n(1151);const o={sidebar_position:1,title:"Native splash"},a=void 0,r={id:"pages/native-splash",title:"Native splash",description:"Content",source:"@site/docs/pages/native-splash.md",sourceDirName:"pages",slug:"/pages/native-splash",permalink:"/react-native-template-strong/docs/pages/native-splash",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/pages/native-splash.md",tags:[],version:"current",lastUpdatedAt:1633686498,formattedLastUpdatedAt:"Oct 8, 2021",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Native splash"},sidebar:"tutorialSidebar",previous:{title:"ToastOverlay",permalink:"/react-native-template-strong/docs/components/toast-overlay"},next:{title:"Splash",permalink:"/react-native-template-strong/docs/pages/splash"}},l={},d=[{value:"Content",id:"content",level:2},{value:"Changing logos",id:"changing-logos",level:2},{value:"iOS",id:"ios",level:3},{value:"Android",id:"android",level:3}];function c(e){const t={admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"Native splash at this moment shows the most common pattern for this kind of screens:"}),"\n",(0,s.jsx)(t.p,{children:"It shows a logo in the middle of the screen with theme background on iOS and gradient on Android."}),"\n",(0,s.jsx)(t.h2,{id:"changing-logos",children:"Changing logos"}),"\n",(0,s.jsx)(t.p,{children:"To change the logo you have to do the following:"}),"\n",(0,s.jsx)(t.h3,{id:"ios",children:"iOS"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Create your icons with appropriate sizes (1x, 2x, 3x)"}),"\n",(0,s.jsxs)(t.li,{children:["Replace them in ",(0,s.jsx)(t.code,{children:"ios/YourProjectName/images.xcassets"})," with the same name (",(0,s.jsx)(t.code,{children:"splash.png"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:["Check the result in XCode by opening ",(0,s.jsx)(t.code,{children:"LaunchScreen"})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"android",children:"Android"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Create your icon with appropriate size (xxhdpi)"}),"\n",(0,s.jsxs)(t.li,{children:["Replace it in ",(0,s.jsx)(t.code,{children:"android/app/src/main/res/drawable-xxhdpi"})," with the same name (",(0,s.jsx)(t.code,{children:"splash.png"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:["Your gradient and splash files are located in ",(0,s.jsx)(t.code,{children:"android/app/src/main/res/drawable"}),", you can also change them if needed"]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{title:"Tip",type:"tip",children:(0,s.jsx)(t.p,{children:"Don't use text on your logos on both platforms, try to place just logos."})})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>r,a:()=>a});var s=n(7294);const i={},o=s.createContext(i);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2f008bc.61f7436d.js b/assets/js/f2f008bc.61f7436d.js new file mode 100644 index 00000000..db84f1e0 --- /dev/null +++ b/assets/js/f2f008bc.61f7436d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[9204],{3219:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=t(4848),i=t(8453);const o={sidebar_position:1,title:"Native splash"},a=void 0,r={id:"pages/native-splash",title:"Native splash",description:"Content",source:"@site/docs/pages/native-splash.md",sourceDirName:"pages",slug:"/pages/native-splash",permalink:"/react-native-template-strong/docs/pages/native-splash",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/pages/native-splash.md",tags:[],version:"current",lastUpdatedAt:1633686498e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Native splash"},sidebar:"tutorialSidebar",previous:{title:"ToastOverlay",permalink:"/react-native-template-strong/docs/components/toast-overlay"},next:{title:"Splash",permalink:"/react-native-template-strong/docs/pages/splash"}},l={},d=[{value:"Content",id:"content",level:2},{value:"Changing logos",id:"changing-logos",level:2},{value:"iOS",id:"ios",level:3},{value:"Android",id:"android",level:3}];function c(e){const n={admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(n.p,{children:"Native splash at this moment shows the most common pattern for this kind of screens:"}),"\n",(0,s.jsx)(n.p,{children:"It shows a logo in the middle of the screen with theme background on iOS and gradient on Android."}),"\n",(0,s.jsx)(n.h2,{id:"changing-logos",children:"Changing logos"}),"\n",(0,s.jsx)(n.p,{children:"To change the logo you have to do the following:"}),"\n",(0,s.jsx)(n.h3,{id:"ios",children:"iOS"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Create your icons with appropriate sizes (1x, 2x, 3x)"}),"\n",(0,s.jsxs)(n.li,{children:["Replace them in ",(0,s.jsx)(n.code,{children:"ios/YourProjectName/images.xcassets"})," with the same name (",(0,s.jsx)(n.code,{children:"splash.png"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["Check the result in XCode by opening ",(0,s.jsx)(n.code,{children:"LaunchScreen"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"android",children:"Android"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Create your icon with appropriate size (xxhdpi)"}),"\n",(0,s.jsxs)(n.li,{children:["Replace it in ",(0,s.jsx)(n.code,{children:"android/app/src/main/res/drawable-xxhdpi"})," with the same name (",(0,s.jsx)(n.code,{children:"splash.png"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["Your gradient and splash files are located in ",(0,s.jsx)(n.code,{children:"android/app/src/main/res/drawable"}),", you can also change them if needed"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Tip",type:"tip",children:(0,s.jsx)(n.p,{children:"Don't use text on your logos on both platforms, try to place just logos."})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var s=t(6540);const i={},o=s.createContext(i);function a(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f49fe340.2de25dd3.js b/assets/js/f49fe340.2de25dd3.js new file mode 100644 index 00000000..8e49bdca --- /dev/null +++ b/assets/js/f49fe340.2de25dd3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7196],{2112:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>l,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var s=n(4848),o=n(8453);const a={sidebar_position:3,title:"Onboarding"},r=void 0,i={id:"pages/onboarding",title:"Onboarding",description:"Content",source:"@site/docs/pages/onboarding.md",sourceDirName:"pages",slug:"/pages/onboarding",permalink:"/react-native-template-strong/docs/pages/onboarding",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/pages/onboarding.md",tags:[],version:"current",lastUpdatedAt:1633686498e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Onboarding"},sidebar:"tutorialSidebar",previous:{title:"Splash",permalink:"/react-native-template-strong/docs/pages/splash"},next:{title:"calculatePage",permalink:"/react-native-template-strong/docs/helpers/calculate-page"}},d={},c=[{value:"Content",id:"content",level:2}];function p(e){const t={h2:"h2",p:"p",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"This screen is used in order to demonstrate users your app's features."}),"\n",(0,s.jsx)(t.p,{children:"The onboarding process is a user\u2019s first impression of your app, and when designed correctly, increases the likelihood of successful adoption."}),"\n",(0,s.jsx)(t.p,{children:"At this moment there are some information regarding the template, you have to replace it."}),"\n",(0,s.jsx)(t.p,{children:"On iOS it imitates the Apple's onboardings and presented as modal on both iPhone and iPad."}),"\n",(0,s.jsx)(t.p,{children:"On Android it imitates Material Design's onboarding and presented as a separated root with snap carousel (it look different on smartphones and tablets)."})]})}function l(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var s=n(6540);const o={},a=s.createContext(o);function r(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f49fe340.4f3a16a3.js b/assets/js/f49fe340.4f3a16a3.js deleted file mode 100644 index f85b8829..00000000 --- a/assets/js/f49fe340.4f3a16a3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3888],{3486:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>l,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var s=n(5893),o=n(1151);const a={sidebar_position:3,title:"Onboarding"},r=void 0,i={id:"pages/onboarding",title:"Onboarding",description:"Content",source:"@site/docs/pages/onboarding.md",sourceDirName:"pages",slug:"/pages/onboarding",permalink:"/react-native-template-strong/docs/pages/onboarding",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/pages/onboarding.md",tags:[],version:"current",lastUpdatedAt:1633686498,formattedLastUpdatedAt:"Oct 8, 2021",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Onboarding"},sidebar:"tutorialSidebar",previous:{title:"Splash",permalink:"/react-native-template-strong/docs/pages/splash"},next:{title:"calculatePage",permalink:"/react-native-template-strong/docs/helpers/calculate-page"}},d={},c=[{value:"Content",id:"content",level:2}];function p(e){const t={h2:"h2",p:"p",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,s.jsx)(t.p,{children:"This screen is used in order to demonstrate users your app's features."}),"\n",(0,s.jsx)(t.p,{children:"The onboarding process is a user\u2019s first impression of your app, and when designed correctly, increases the likelihood of successful adoption."}),"\n",(0,s.jsx)(t.p,{children:"At this moment there are some information regarding the template, you have to replace it."}),"\n",(0,s.jsx)(t.p,{children:"On iOS it imitates the Apple's onboardings and presented as modal on both iPhone and iPad."}),"\n",(0,s.jsx)(t.p,{children:"On Android it imitates Material Design's onboarding and presented as a separated root with snap carousel (it look different on smartphones and tablets)."})]})}function l(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>r});var s=n(7294);const o={},a=s.createContext(o);function r(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fa6c2e8e.481b28cf.js b/assets/js/fa6c2e8e.481b28cf.js new file mode 100644 index 00000000..26c08d54 --- /dev/null +++ b/assets/js/fa6c2e8e.481b28cf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[731],{8267:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var s=n(4848),i=n(8453);const r={sidebar_position:19,title:"Types"},o=void 0,c={id:"types",title:"Types",description:"Own types, interfaces and enums",source:"@site/docs/types.md",sourceDirName:".",slug:"/types",permalink:"/react-native-template-strong/docs/types",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/types.md",tags:[],version:"current",lastUpdatedAt:1633614778e3,sidebarPosition:19,frontMatter:{sidebar_position:19,title:"Types"},sidebar:"tutorialSidebar",previous:{title:"Detox",permalink:"/react-native-template-strong/docs/testing/detox"},next:{title:"Patches",permalink:"/react-native-template-strong/docs/patches"}},a={},d=[{value:"Own types, interfaces and enums",id:"own-types-interfaces-and-enums",level:2},{value:"Dependency types",id:"dependency-types",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"own-types-interfaces-and-enums",children:"Own types, interfaces and enums"}),"\n",(0,s.jsxs)(t.p,{children:["There are many types, interfaces and enums which are being used in this template, they are all included in ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/types/index.ts",children:"types/index.ts"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"If you have some interface, type or enum which you are going to use in different places and it's sort of global then add it in this file."}),"\n",(0,s.jsx)(t.p,{children:"To briefly describe what each currently existed interface/type/enum does:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"AppEnvironment"})," - enum of your environments"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"INavigationPage"})," - minimal needed description of your navigation pages"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"IOnboardingData"})," - interface of each of the carousel/case item from ",(0,s.jsx)(t.code,{children:"Onboarding"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LoadState"})," - important enum which is responsible to setting current state of your lists stored in redux, and visual representation of items based on it"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"TouchablePlatformProps"})," - copy of ",(0,s.jsx)(t.code,{children:"PressableProps"})," with slight changes of ",(0,s.jsx)(t.code,{children:"style"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ButtonType"})," - enum of ",(0,s.jsx)(t.a,{href:"/react-native-template-strong/docs/components/primary-button",children:"PrimaryButton"})," type representation;"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ISize"})," - enum of possible sizes for your style constants ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/core/theme/commonSizes.ts",children:"commonSizes"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"IListState"})," - simple interface to store necessary list data, mostly used with ",(0,s.jsx)(t.a,{href:"/react-native-template-strong/docs/components/flat-list-wrapper",children:"FlatListWrapper"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ISection"})," - same as ",(0,s.jsx)(t.code,{children:"IListState"})," but for ",(0,s.jsx)(t.a,{href:"/react-native-template-strong/docs/components/section-list-wrapper",children:"SectionListWrapper"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"RehydrateAppAction"})," - interface for rehydrated params (our redux root state) which comes when ",(0,s.jsx)(t.code,{children:"rehydrate"})," occurs"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ErrorRepresentationType"})," - enum of possible errors which will be shown to user when using API requests or text input validations"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"IErrorResult"})," - result of error representation"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ITextInputMask"})," - interface which is used for creation of input masks"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"dependency-types",children:"Dependency types"}),"\n",(0,s.jsxs)(t.p,{children:["If you'd like to change or add types for dependencies from ",(0,s.jsx)(t.code,{children:"node_modules"}),"\nthen you can check the already existing ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/types/react-native-config.d.ts",children:"react-native-config.d.ts"}),"\ntype and create your own by following next steps:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Create a file in ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/tree/main/template/src/types",children:"types"})," with name of your dependency like so e.g. ",(0,s.jsx)(t.code,{children:"react-native-config.d.ts"})]}),"\n",(0,s.jsx)(t.li,{children:"Declare a module"}),"\n",(0,s.jsx)(t.li,{children:"Add needed types and interfaces"}),"\n",(0,s.jsx)(t.li,{children:"Create proper (default or not) exports"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["TypeScript uses ",(0,s.jsx)(t.code,{children:"types"})," folder to check for additional types so after making your changes they will be seen in action immediately."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var s=n(6540);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fa6c2e8e.7184605f.js b/assets/js/fa6c2e8e.7184605f.js deleted file mode 100644 index c90c42d4..00000000 --- a/assets/js/fa6c2e8e.7184605f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8460],{1153:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var s=n(5893),i=n(1151);const r={sidebar_position:19,title:"Types"},o=void 0,c={id:"types",title:"Types",description:"Own types, interfaces and enums",source:"@site/docs/types.md",sourceDirName:".",slug:"/types",permalink:"/react-native-template-strong/docs/types",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/types.md",tags:[],version:"current",lastUpdatedAt:1633614778,formattedLastUpdatedAt:"Oct 7, 2021",sidebarPosition:19,frontMatter:{sidebar_position:19,title:"Types"},sidebar:"tutorialSidebar",previous:{title:"Detox",permalink:"/react-native-template-strong/docs/testing/detox"},next:{title:"Patches",permalink:"/react-native-template-strong/docs/patches"}},a={},d=[{value:"Own types, interfaces and enums",id:"own-types-interfaces-and-enums",level:2},{value:"Dependency types",id:"dependency-types",level:2}];function l(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"own-types-interfaces-and-enums",children:"Own types, interfaces and enums"}),"\n",(0,s.jsxs)(t.p,{children:["There are many types, interfaces and enums which are being used in this template, they are all included in ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/types/index.ts",children:"types/index.ts"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"If you have some interface, type or enum which you are going to use in different places and it's sort of global then add it in this file."}),"\n",(0,s.jsx)(t.p,{children:"To briefly describe what each currently existed interface/type/enum does:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"AppEnvironment"})," - enum of your environments"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"INavigationPage"})," - minimal needed description of your navigation pages"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"IOnboardingData"})," - interface of each of the carousel/case item from ",(0,s.jsx)(t.code,{children:"Onboarding"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LoadState"})," - important enum which is responsible to setting current state of your lists stored in redux, and visual representation of items based on it"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"TouchablePlatformProps"})," - copy of ",(0,s.jsx)(t.code,{children:"PressableProps"})," with slight changes of ",(0,s.jsx)(t.code,{children:"style"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ButtonType"})," - enum of ",(0,s.jsx)(t.a,{href:"/react-native-template-strong/docs/components/primary-button",children:"PrimaryButton"})," type representation;"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ISize"})," - enum of possible sizes for your style constants ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/core/theme/commonSizes.ts",children:"commonSizes"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"IListState"})," - simple interface to store necessary list data, mostly used with ",(0,s.jsx)(t.a,{href:"/react-native-template-strong/docs/components/flat-list-wrapper",children:"FlatListWrapper"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ISection"})," - same as ",(0,s.jsx)(t.code,{children:"IListState"})," but for ",(0,s.jsx)(t.a,{href:"/react-native-template-strong/docs/components/section-list-wrapper",children:"SectionListWrapper"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"RehydrateAppAction"})," - interface for rehydrated params (our redux root state) which comes when ",(0,s.jsx)(t.code,{children:"rehydrate"})," occurs"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ErrorRepresentationType"})," - enum of possible errors which will be shown to user when using API requests or text input validations"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"IErrorResult"})," - result of error representation"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ITextInputMask"})," - interface which is used for creation of input masks"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"dependency-types",children:"Dependency types"}),"\n",(0,s.jsxs)(t.p,{children:["If you'd like to change or add types for dependencies from ",(0,s.jsx)(t.code,{children:"node_modules"}),"\nthen you can check the already existing ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/types/react-native-config.d.ts",children:"react-native-config.d.ts"}),"\ntype and create your own by following next steps:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Create a file in ",(0,s.jsx)(t.a,{href:"https://github.com/svbutko/react-native-template-strong/tree/main/template/src/types",children:"types"})," with name of your dependency like so e.g. ",(0,s.jsx)(t.code,{children:"react-native-config.d.ts"})]}),"\n",(0,s.jsx)(t.li,{children:"Declare a module"}),"\n",(0,s.jsx)(t.li,{children:"Add needed types and interfaces"}),"\n",(0,s.jsx)(t.li,{children:"Create proper (default or not) exports"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["TypeScript uses ",(0,s.jsx)(t.code,{children:"types"})," folder to check for additional types so after making your changes they will be seen in action immediately."]})]})}function p(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>c,a:()=>o});var s=n(7294);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fab06093.8330be70.js b/assets/js/fab06093.8330be70.js new file mode 100644 index 00000000..6bcbd90b --- /dev/null +++ b/assets/js/fab06093.8330be70.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1356],{5993:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>r,toc:()=>l});var o=n(4848),i=n(8453);const s={sidebar_position:8,title:"LoadingComponent"},a=void 0,r={id:"components/loading-component",title:"LoadingComponent",description:"Content",source:"@site/docs/components/loading-component.md",sourceDirName:"components",slug:"/components/loading-component",permalink:"/react-native-template-strong/docs/components/loading-component",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/loading-component.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:8,frontMatter:{sidebar_position:8,title:"LoadingComponent"},sidebar:"tutorialSidebar",previous:{title:"TouchablePlatform",permalink:"/react-native-template-strong/docs/components/touchable-platform"},next:{title:"TryAgain",permalink:"/react-native-template-strong/docs/components/try-again"}},c={},l=[{value:"Content",id:"content",level:2},{value:"Usage example",id:"usage-example",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,o.jsx)(t.p,{children:"Simple view with activity indicator and loading text in the middle"}),"\n",(0,o.jsxs)(t.p,{children:["Used mostly in ",(0,o.jsx)(t.code,{children:"Splash"}),", ",(0,o.jsx)(t.code,{children:"FlatListWrapper"}),", ",(0,o.jsx)(t.code,{children:"SectionListWrapper"})]}),"\n",(0,o.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" return\n \n \n \n ;\n"})})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var o=n(6540);const i={},s=o.createContext(i);function a(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fab06093.f3769e20.js b/assets/js/fab06093.f3769e20.js deleted file mode 100644 index d89eb922..00000000 --- a/assets/js/fab06093.f3769e20.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6257],{9070:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var o=n(5893),i=n(1151);const s={sidebar_position:8,title:"LoadingComponent"},a=void 0,r={id:"components/loading-component",title:"LoadingComponent",description:"Content",source:"@site/docs/components/loading-component.md",sourceDirName:"components",slug:"/components/loading-component",permalink:"/react-native-template-strong/docs/components/loading-component",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/loading-component.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:8,frontMatter:{sidebar_position:8,title:"LoadingComponent"},sidebar:"tutorialSidebar",previous:{title:"TouchablePlatform",permalink:"/react-native-template-strong/docs/components/touchable-platform"},next:{title:"TryAgain",permalink:"/react-native-template-strong/docs/components/try-again"}},c={},d=[{value:"Content",id:"content",level:2},{value:"Usage example",id:"usage-example",level:2}];function l(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,o.jsx)(t.p,{children:"Simple view with activity indicator and loading text in the middle"}),"\n",(0,o.jsxs)(t.p,{children:["Used mostly in ",(0,o.jsx)(t.code,{children:"Splash"}),", ",(0,o.jsx)(t.code,{children:"FlatListWrapper"}),", ",(0,o.jsx)(t.code,{children:"SectionListWrapper"})]}),"\n",(0,o.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:" return ;\n"})})]})}function p(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>r,a:()=>a});var o=n(7294);const i={},s=o.createContext(i);function a(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fcca6dac.03772928.js b/assets/js/fcca6dac.03772928.js deleted file mode 100644 index 850916a7..00000000 --- a/assets/js/fcca6dac.03772928.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2239],{8689:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var i=n(5893),s=n(1151);const r={sidebar_position:1,title:"iOS internals"},o=void 0,a={id:"internals/ios",title:"iOS internals",description:"Hermes",source:"@site/docs/internals/ios.md",sourceDirName:"internals",slug:"/internals/ios",permalink:"/react-native-template-strong/docs/internals/ios",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/internals/ios.md",tags:[],version:"current",lastUpdatedAt:1704743195,formattedLastUpdatedAt:"Jan 8, 2024",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"iOS internals"},sidebar:"tutorialSidebar",previous:{title:"Babel config",permalink:"/react-native-template-strong/docs/configs/babel-config"},next:{title:"Android internals",permalink:"/react-native-template-strong/docs/internals/android"}},l={},d=[{value:"Hermes",id:"hermes",level:2},{value:"Versions",id:"versions",level:2},{value:"Devices",id:"devices",level:2},{value:"Orientations",id:"orientations",level:2},{value:"Flipper",id:"flipper",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"hermes",children:"Hermes"}),"\n",(0,i.jsx)(t.p,{children:"Enabled"}),"\n",(0,i.jsx)(t.h2,{id:"versions",children:"Versions"}),"\n",(0,i.jsxs)(t.p,{children:["Deployment target is set to ",(0,i.jsx)(t.code,{children:"13.4"})]}),"\n",(0,i.jsx)(t.h2,{id:"devices",children:"Devices"}),"\n",(0,i.jsx)(t.p,{children:"iPhones and iPads are both supported"}),"\n",(0,i.jsx)(t.h2,{id:"orientations",children:"Orientations"}),"\n",(0,i.jsx)(t.p,{children:"All orientations are unlocked (locked in React Native by device type)"}),"\n",(0,i.jsx)(t.h2,{id:"flipper",children:"Flipper"}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.code,{children:"Flipper"})," is disabled in ",(0,i.jsx)(t.code,{children:"podfile"})," due to the fact that it increases app size and goes in production as a pod too,\nyou can enable it while testing but don't forget to comment it back."]})]})}function p(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>o});var i=n(7294);const s={},r=i.createContext(s);function o(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fcca6dac.5464bacd.js b/assets/js/fcca6dac.5464bacd.js new file mode 100644 index 00000000..c792e20d --- /dev/null +++ b/assets/js/fcca6dac.5464bacd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7576],{9350:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var i=n(4848),s=n(8453);const r={sidebar_position:1,title:"iOS internals"},o=void 0,a={id:"internals/ios",title:"iOS internals",description:"Hermes",source:"@site/docs/internals/ios.md",sourceDirName:"internals",slug:"/internals/ios",permalink:"/react-native-template-strong/docs/internals/ios",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/internals/ios.md",tags:[],version:"current",lastUpdatedAt:1714909701e3,sidebarPosition:1,frontMatter:{sidebar_position:1,title:"iOS internals"},sidebar:"tutorialSidebar",previous:{title:"Babel config",permalink:"/react-native-template-strong/docs/configs/babel-config"},next:{title:"Android internals",permalink:"/react-native-template-strong/docs/internals/android"}},l={},c=[{value:"Hermes",id:"hermes",level:2},{value:"Versions",id:"versions",level:2},{value:"Devices",id:"devices",level:2},{value:"Orientations",id:"orientations",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"hermes",children:"Hermes"}),"\n",(0,i.jsx)(t.p,{children:"Enabled"}),"\n",(0,i.jsx)(t.h2,{id:"versions",children:"Versions"}),"\n",(0,i.jsxs)(t.p,{children:["Deployment target is set to ",(0,i.jsx)(t.code,{children:"13.4"})]}),"\n",(0,i.jsx)(t.h2,{id:"devices",children:"Devices"}),"\n",(0,i.jsx)(t.p,{children:"iPhones and iPads are both supported"}),"\n",(0,i.jsx)(t.h2,{id:"orientations",children:"Orientations"}),"\n",(0,i.jsx)(t.p,{children:"All orientations are unlocked (locked in React Native by device type)"})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var i=n(6540);const s={},r=i.createContext(s);function o(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fcde09bc.79e747c1.js b/assets/js/fcde09bc.79e747c1.js new file mode 100644 index 00000000..273ecea0 --- /dev/null +++ b/assets/js/fcde09bc.79e747c1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1999],{9665:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var i=t(4848),s=t(8453);const o={sidebar_position:9,title:"Common constants"},r=void 0,c={id:"common-constants",title:"Common constants",description:"Content",source:"@site/docs/common-constants.md",sourceDirName:".",slug:"/common-constants",permalink:"/react-native-template-strong/docs/common-constants",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/common-constants.md",tags:[],version:"current",lastUpdatedAt:1688636932e3,sidebarPosition:9,frontMatter:{sidebar_position:9,title:"Common constants"},sidebar:"tutorialSidebar",previous:{title:"Common sizes",permalink:"/react-native-template-strong/docs/styles/common-sizes"},next:{title:"PrimaryButton",permalink:"/react-native-template-strong/docs/components/primary-button"}},d={},l=[{value:"Content",id:"content",level:2},{value:"Platform dependant",id:"platform-dependant",level:2},{value:"Dimensions dependant",id:"dimensions-dependant",level:2},{value:"Hit slops",id:"hit-slops",level:2},{value:"Time dependant",id:"time-dependant",level:2},{value:"Other",id:"other",level:2}];function a(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,i.jsxs)(n.p,{children:["This is a set of constants which are useful throughout the development process, rather than creating them every time,\nthey are being created once and stored and exported from ",(0,i.jsx)(n.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/core/theme/commonConsts.ts",children:"commonConstants.ts"})]}),"\n",(0,i.jsx)(n.h2,{id:"platform-dependant",children:"Platform dependant"}),"\n",(0,i.jsxs)(n.p,{children:["Rather than always importing ",(0,i.jsx)(n.code,{children:"Device"})," or ",(0,i.jsx)(n.code,{children:"Platform"})," and checking whether it's iOS or Android or some versions,\nit's easier to have this checks"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isIos"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isIphoneX"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isIpad"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isTablet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isAndroid"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isAndroidLollipop"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isAndroid11AndHigher"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"hasNotch"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"hasDynamicIsland"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"dimensions-dependant",children:"Dimensions dependant"}),"\n",(0,i.jsx)(n.p,{children:"Most of the time the apps are made for smartphones and orientation is almost always locked to portrait,\nso instead of checking dimensions all the time it's easier to use next constants:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"windowWidth"})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"windowHeight"})," - on Android it also subtracts ",(0,i.jsx)(n.code,{children:"StatusBar.currentHeight"})," from height"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"In cases when it comes to tablets where all the orientations are unlocked or in other cases where orientation is not locked,\nthere are next two constants:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"maxWindowDimension"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"minWindowDimension"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["They basically compare (max/min) ",(0,i.jsx)(n.code,{children:"windowHeight"})," and ",(0,i.jsx)(n.code,{children:"windowWidth"})," on start so that you could use them rather than always calling ",(0,i.jsx)(n.code,{children:"Dimensions"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"hit-slops",children:"Hit slops"}),"\n",(0,i.jsx)(n.p,{children:"Some basic predefined hit slops, you can change them for your needs:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"hitSlop"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"hitSlopBig"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"time-dependant",children:"Time dependant"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"minimalLegalAge"})," - subtracts 16 years from current time"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"maximalAge"})," - subtracts 100 years from current time"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"other",children:"Other"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hairlineWidth"})," - contains the result of ",(0,i.jsx)(n.code,{children:"StyleSheet.hairlineWidth"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"pixelRatio"})," - contains the result of ",(0,i.jsx)(n.code,{children:"PixelRatio.get()"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"perfectSize"})," - pixel perfect size calculation across devices (",(0,i.jsx)(n.code,{children:"e.g. perfectSize(10)"}),")"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var i=t(6540);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fcde09bc.a9ee9d0b.js b/assets/js/fcde09bc.a9ee9d0b.js deleted file mode 100644 index 4fd30600..00000000 --- a/assets/js/fcde09bc.a9ee9d0b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2023],{9833:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>d,toc:()=>l});var i=t(5893),s=t(1151);const o={sidebar_position:9,title:"Common constants"},r=void 0,d={id:"common-constants",title:"Common constants",description:"Content",source:"@site/docs/common-constants.md",sourceDirName:".",slug:"/common-constants",permalink:"/react-native-template-strong/docs/common-constants",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/common-constants.md",tags:[],version:"current",lastUpdatedAt:1688636932,formattedLastUpdatedAt:"Jul 6, 2023",sidebarPosition:9,frontMatter:{sidebar_position:9,title:"Common constants"},sidebar:"tutorialSidebar",previous:{title:"Common sizes",permalink:"/react-native-template-strong/docs/styles/common-sizes"},next:{title:"PrimaryButton",permalink:"/react-native-template-strong/docs/components/primary-button"}},c={},l=[{value:"Content",id:"content",level:2},{value:"Platform dependant",id:"platform-dependant",level:2},{value:"Dimensions dependant",id:"dimensions-dependant",level:2},{value:"Hit slops",id:"hit-slops",level:2},{value:"Time dependant",id:"time-dependant",level:2},{value:"Other",id:"other",level:2}];function a(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"content",children:"Content"}),"\n",(0,i.jsxs)(n.p,{children:["This is a set of constants which are useful throughout the development process, rather than creating them every time,\nthey are being created once and stored and exported from ",(0,i.jsx)(n.a,{href:"https://github.com/svbutko/react-native-template-strong/blob/main/template/src/core/theme/commonConsts.ts",children:"commonConstants.ts"})]}),"\n",(0,i.jsx)(n.h2,{id:"platform-dependant",children:"Platform dependant"}),"\n",(0,i.jsxs)(n.p,{children:["Rather than always importing ",(0,i.jsx)(n.code,{children:"Device"})," or ",(0,i.jsx)(n.code,{children:"Platform"})," and checking whether it's iOS or Android or some versions,\nit's easier to have this checks"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isIos"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isIphoneX"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isIpad"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isTablet"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isAndroid"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isAndroidLollipop"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"isAndroid11AndHigher"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"hasNotch"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"hasDynamicIsland"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"dimensions-dependant",children:"Dimensions dependant"}),"\n",(0,i.jsx)(n.p,{children:"Most of the time the apps are made for smartphones and orientation is almost always locked to portrait,\nso instead of checking dimensions all the time it's easier to use next constants:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"windowWidth"})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"windowHeight"})," - on Android it also subtracts ",(0,i.jsx)(n.code,{children:"StatusBar.currentHeight"})," from height"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"In cases when it comes to tablets where all the orientations are unlocked or in other cases where orientation is not locked,\nthere are next two constants:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"maxWindowDimension"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"minWindowDimension"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["They basically compare (max/min) ",(0,i.jsx)(n.code,{children:"windowHeight"})," and ",(0,i.jsx)(n.code,{children:"windowWidth"})," on start so that you could use them rather than always calling ",(0,i.jsx)(n.code,{children:"Dimensions"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"hit-slops",children:"Hit slops"}),"\n",(0,i.jsx)(n.p,{children:"Some basic predefined hit slops, you can change them for your needs:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"hitSlop"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"hitSlopBig"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"time-dependant",children:"Time dependant"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"minimalLegalAge"})," - subtracts 16 years from current time"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"maximalAge"})," - subtracts 100 years from current time"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"other",children:"Other"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hairlineWidth"})," - contains the result of ",(0,i.jsx)(n.code,{children:"StyleSheet.hairlineWidth"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"pixelRatio"})," - contains the result of ",(0,i.jsx)(n.code,{children:"PixelRatio.get()"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"perfectSize"})," - pixel perfect size calculation across devices (",(0,i.jsx)(n.code,{children:"e.g. perfectSize(10)"}),")"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>d,a:()=>r});var i=t(7294);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ff6d8346.00519bea.js b/assets/js/ff6d8346.00519bea.js new file mode 100644 index 00000000..f1efc547 --- /dev/null +++ b/assets/js/ff6d8346.00519bea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1732],{3333:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>d,default:()=>x,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var l=n(4848),s=n(8453);const i={sidebar_position:10,title:"RadioButton"},d=void 0,o={id:"components/radio-button",title:"RadioButton",description:"Content",source:"@site/docs/components/radio-button.md",sourceDirName:"components",slug:"/components/radio-button",permalink:"/react-native-template-strong/docs/components/radio-button",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/radio-button.md",tags:[],version:"current",lastUpdatedAt:1634026274e3,sidebarPosition:10,frontMatter:{sidebar_position:10,title:"RadioButton"},sidebar:"tutorialSidebar",previous:{title:"TryAgain",permalink:"/react-native-template-strong/docs/components/try-again"},next:{title:"RadioIcon",permalink:"/react-native-template-strong/docs/components/radio-icon"}},r={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsx)(t.p,{children:"Radio button component."}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"isSelected"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Changes the design based on selection"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"id"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"ID of radio button item"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"label"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Label of radio button"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onPress"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"(id: string, nextValue: boolean) => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"On item press callback"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"disabled"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"If disabled then not allows to select it and shows different design"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"IconComponent"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"FunctionComponent "})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"RadioIcon"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Radio icon component"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'const [isSelected, setSelected] = useState (false);\n\nconst onPress = useCallback((id, nextSelection) => {\n setSelected(nextSelection);\n}, []);\n\nreturn (\n \n \n);\n'})})]})}function x(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>o});var l=n(6540);const s={},i=l.createContext(s);function d(e){const t=l.useContext(i);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),l.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ff6d8346.7b8a532e.js b/assets/js/ff6d8346.7b8a532e.js deleted file mode 100644 index 1a5598c0..00000000 --- a/assets/js/ff6d8346.7b8a532e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2529],{353:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>d,default:()=>x,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var l=n(5893),s=n(1151);const i={sidebar_position:10,title:"RadioButton"},d=void 0,o={id:"components/radio-button",title:"RadioButton",description:"Content",source:"@site/docs/components/radio-button.md",sourceDirName:"components",slug:"/components/radio-button",permalink:"/react-native-template-strong/docs/components/radio-button",draft:!1,unlisted:!1,editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/docs/components/radio-button.md",tags:[],version:"current",lastUpdatedAt:1634026274,formattedLastUpdatedAt:"Oct 12, 2021",sidebarPosition:10,frontMatter:{sidebar_position:10,title:"RadioButton"},sidebar:"tutorialSidebar",previous:{title:"TryAgain",permalink:"/react-native-template-strong/docs/components/try-again"},next:{title:"RadioIcon",permalink:"/react-native-template-strong/docs/components/radio-icon"}},r={},c=[{value:"Content",id:"content",level:2},{value:"Params",id:"params",level:2},{value:"Usage example",id:"usage-example",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.h2,{id:"content",children:"Content"}),"\n",(0,l.jsx)(t.p,{children:"Radio button component."}),"\n",(0,l.jsx)(t.h2,{id:"params",children:"Params"}),"\n",(0,l.jsxs)(t.table,{children:[(0,l.jsx)(t.thead,{children:(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Name"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Default value"}),(0,l.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,l.jsxs)(t.tbody,{children:[(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"isSelected"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Changes the design based on selection"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"id"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"ID of radio button item"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"label"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"string"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Label of radio button"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"onPress"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"(id: string, nextValue: boolean) => void"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"True"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"-"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"On item press callback"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"disabled"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"boolean"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Undefined"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"If disabled then not allows to select it and shows different design"})]}),(0,l.jsxs)(t.tr,{children:[(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"IconComponent"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"FunctionComponent\n "})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"False"}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:(0,l.jsx)(t.code,{children:"RadioIcon"})}),(0,l.jsx)(t.td,{style:{textAlign:"left"},children:"Radio icon component"})]})]})]}),"\n",(0,l.jsx)(t.h2,{id:"usage-example",children:"Usage example"}),"\n",(0,l.jsx)(t.pre,{children:(0,l.jsx)(t.code,{className:"language-typescript",metastring:"jsx",children:'const [isSelected, setSelected] = useState (false);\n\nconst onPress = useCallback((id, nextSelection) => {\n setSelected(nextSelection);\n}, []);\n\nreturn (\n \n \n);\n'})})]})}function x(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,l.jsx)(t,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}},1151:(e,t,n)=>{n.d(t,{Z:()=>o,a:()=>d});var l=n(7294);const s={},i=l.createContext(s);function d(e){const t=l.useContext(i);return l.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),l.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.47c9f7f0.js b/assets/js/main.47c9f7f0.js deleted file mode 100644 index 11a1c0f5..00000000 --- a/assets/js/main.47c9f7f0.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.47c9f7f0.js.LICENSE.txt */ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[179],{830:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var r=n(7294);function a(){return r.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},r.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}},723:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});n(7294);var r=n(8356),a=n.n(r),o=n(6887);const i={"0106a0c1":[()=>n.e(5165).then(n.bind(n,7478)),"@site/docs/helpers/share-helpers.md",7478],"041eb33b":[()=>n.e(4715).then(n.bind(n,1239)),"@site/docs/configs/rn-config.md",1239],"07727b20":[()=>n.e(817).then(n.bind(n,7984)),"@site/docs/helpers/regex-helpers.md",7984],"08fac725":[()=>n.e(4027).then(n.bind(n,1369)),"@site/docs/configs/eslint-config.md",1369],"09318855":[()=>n.e(8906).then(n.bind(n,1605)),"@site/docs/helpers/in-app-review-helper.md",1605],"0a3d3edc":[()=>n.e(7102).then(n.bind(n,6561)),"@site/docs/helpers/calculate-page.md",6561],"11e380a5":[()=>n.e(2370).then(n.bind(n,1778)),"@site/docs/hooks/use-previous.md",1778],"14f2708c":[()=>n.e(9908).then(n.bind(n,548)),"@site/docs/localisation/add-language.md",548],17896441:[()=>Promise.all([n.e(532),n.e(692),n.e(7918)]).then(n.bind(n,903)),"@theme/DocItem",903],"19829c28":[()=>n.e(8608).then(n.bind(n,8129)),"@site/docs/components/section-list-wrapper.md",8129],"1a4e3797":[()=>Promise.all([n.e(532),n.e(7920)]).then(n.bind(n,6675)),"@theme/SearchPage",6675],"1a8cd603":[()=>n.e(4522).then(n.bind(n,5876)),"@site/docs/navigation/hooks.md",5876],"1df93b7f":[()=>Promise.all([n.e(532),n.e(3237)]).then(n.bind(n,8368)),"@site/src/pages/index.tsx",8368],"1e5d5012":[()=>n.e(4942).then(n.bind(n,0)),"@site/docs/components/flat-list-wrapper.md",0],"1f05955d":[()=>n.e(9301).then(n.bind(n,5413)),"@site/docs/styles/common-styles.md",5413],"1f391b9e":[()=>Promise.all([n.e(532),n.e(692),n.e(3085)]).then(n.bind(n,4247)),"@theme/MDXPage",4247],"1fd605f7":[()=>n.e(5803).then(n.bind(n,244)),"@site/src/pages/faq.md",244],"201c1feb":[()=>n.e(1186).then(n.bind(n,7210)),"@site/docs/redux/core-idea.md",7210],"2040cfe4":[()=>n.e(4012).then(n.bind(n,7111)),"@site/docs/navigation/overlays-and-modals.md",7111],"2190081c":[()=>n.e(8842).then(n.bind(n,4077)),"@site/docs/hooks/use-event-register.md",4077],26509314:[()=>n.e(6235).then(n.bind(n,188)),"@site/src/pages/troubleshooting.md",188],"2adfb7b8":[()=>n.e(915).then(n.bind(n,3219)),"@site/docs/localisation/intl-formatter.md",3219],"2b755825":[()=>n.e(962).then(n.bind(n,9376)),"@site/docs/localisation/change-language.md",9376],"2f2dc1d3":[()=>n.e(350).then(n.bind(n,7323)),"@site/docs/app-icon.md",7323],"30b35490":[()=>n.e(7952).then(n.bind(n,3573)),"@site/docs/navigation/actions.md",3573],"31630cdb":[()=>n.e(3793).then(n.bind(n,3833)),"@site/docs/components/primary-text-input.md",3833],"3169c1c1":[()=>n.e(7831).then(n.bind(n,2973)),"@site/docs/themes/native-colors.md",2973],"328e254d":[()=>n.e(2918).then(n.bind(n,6139)),"@site/docs/helpers/color-helpers.md",6139],"37742c1c":[()=>n.e(5887).then(n.t.bind(n,3769,19)),"/Users/sergeibutko/Projects/React-Native/react-native-template-oneup/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],39654635:[()=>n.e(7705).then(n.bind(n,970)),"@site/docs/configs/babel-config.md",970],"3a8d2d9f":[()=>n.e(945).then(n.bind(n,9503)),"@site/docs/testing/detox.md",9503],"3c45ece2":[()=>n.e(447).then(n.bind(n,2925)),"@site/docs/testing/storybook.md",2925],"3efb1320":[()=>n.e(4258).then(n.bind(n,7628)),"@site/docs/components/empty-view.md",7628],"3fdaf820":[()=>n.e(759).then(n.bind(n,3570)),"@site/docs/localisation/translations.md",3570],"43bdb0b8":[()=>n.e(6394).then(n.bind(n,5377)),"@site/docs/helpers/dialogs-helpers.md",5377],"449809ec":[()=>n.e(2544).then(n.bind(n,8949)),"@site/docs/utils/list-handlers.md",8949],"4972ee25":[()=>n.e(6638).then(n.bind(n,5202)),"@site/docs/redux/store.md",5202],"4ff29f3f":[()=>n.e(3286).then(n.bind(n,1067)),"@site/docs/components/date-picker-overlay.md",1067],"51dcefc3":[()=>n.e(9969).then(n.bind(n,3452)),"@site/docs/helpers/strings-helpers.md",3452],"527ccfd4":[()=>n.e(4469).then(n.bind(n,29)),"@site/docs/testing/jest.md",29],"52fe9033":[()=>n.e(5967).then(n.bind(n,8183)),"@site/docs/themes/colors.md",8183],"5b2ba987":[()=>n.e(4991).then(n.bind(n,8719)),"@site/docs/hooks/use-why-did-you-update.md",8719],"5d01a4f0":[()=>n.e(5638).then(n.bind(n,8407)),"@site/docs/hooks/use-debounce.md",8407],"5e95c892":[()=>n.e(9661).then(n.bind(n,1892)),"@theme/DocsRoot",1892],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,6809)),"@generated/docusaurus.config",6809],"5ed5e9d2":[()=>n.e(1984).then(n.bind(n,2805)),"@site/docs/helpers/orientation-helpers.md",2805],"5f847e85":[()=>n.e(5601).then(n.bind(n,2250)),"@site/docs/resources/images.md",2250],"5f9cf606":[()=>n.e(7062).then(n.bind(n,4545)),"@site/docs/configs/jest-config.md",4545],"5fbc5cf1":[()=>n.e(1207).then(n.bind(n,8594)),"@site/docs/api.md",8594],"6222aa5d":[()=>n.e(3772).then(n.bind(n,8321)),"@site/docs/internals/android.md",8321],"62c33f29":[()=>n.e(9102).then(n.bind(n,3976)),"@site/docs/components/primary-button.md",3976],"644e2e9e":[()=>n.e(6759).then(n.bind(n,9816)),"@site/docs/validations.md",9816],"69e64926":[()=>n.e(7444).then(n.bind(n,3671)),"@site/docs/hooks/use-flat-list-actions.md",3671],"6e581f4b":[()=>n.e(1721).then(n.bind(n,5010)),"@site/docs/styles/common-sizes.md",5010],"78a19f83":[()=>n.e(5389).then(n.bind(n,569)),"@site/docs/resources/sf-symbols.md",569],"7f85490b":[()=>n.e(3427).then(n.bind(n,6091)),"@site/docs/dependencies.md",6091],"82bbd999":[()=>n.e(9709).then(n.bind(n,8941)),"@site/docs/structure/module.md",8941],"84080ef2":[()=>n.e(7816).then(n.bind(n,3545)),"@site/docs/helpers/default-key-id-extractor.md",3545],"8450a114":[()=>n.e(5116).then(n.bind(n,70)),"@site/docs/components/icon-platform.md",70],"88cbf0c6":[()=>n.e(1242).then(n.bind(n,1310)),"@site/docs/redux/async-thunk.md",1310],"8a6ff679":[()=>n.e(6243).then(n.bind(n,3989)),"@site/docs/components/radio-icon.md",3989],"8e392f8e":[()=>n.e(880).then(n.bind(n,8273)),"@site/docs/styles/component-styles.md",8273],"91cb04fa":[()=>n.e(7290).then(n.bind(n,3291)),"@site/docs/configs/metro-config.md",3291],"935f2afb":[()=>n.e(53).then(n.t.bind(n,1109,19)),"~docs/default/version-current-metadata-prop-751.json",1109],94173908:[()=>n.e(6765).then(n.bind(n,7781)),"@site/docs/redux/before-starting.md",7781],"9a53555d":[()=>n.e(3922).then(n.bind(n,1526)),"@site/docs/resources/fonts.md",1526],"9bbfbce4":[()=>n.e(3845).then(n.bind(n,1247)),"@site/docs/components/image-crop-picker-button.md",1247],"9cf17553":[()=>n.e(2188).then(n.bind(n,4319)),"@site/docs/components/touchable-platform.md",4319],"9dcf257f":[()=>n.e(8886).then(n.bind(n,4739)),"@site/docs/components/separator.md",4739],a09f8af8:[()=>n.e(1357).then(n.bind(n,3818)),"@site/docs/structure/project.md",3818],a775fdf9:[()=>n.e(1902).then(n.bind(n,2825)),"@site/docs/utils/url-openers.md",2825],a7bd4aaa:[()=>n.e(8518).then(n.bind(n,8564)),"@theme/DocVersionRoot",8564],a7e83710:[()=>n.e(8857).then(n.t.bind(n,7085,19)),"/Users/sergeibutko/Projects/React-Native/react-native-template-oneup/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json",7085],a88c1c0e:[()=>n.e(7748).then(n.bind(n,295)),"@site/docs/resources/vector-icons.md",295],a94703ab:[()=>Promise.all([n.e(532),n.e(4368)]).then(n.bind(n,2674)),"@theme/DocRoot",2674],aae46502:[()=>n.e(5565).then(n.bind(n,2590)),"@site/docs/hooks/use-back-handler.md",2590],ae8ecedf:[()=>n.e(4769).then(n.bind(n,4227)),"@site/docs/configs/detox-config.md",4227],b0417d48:[()=>n.e(1477).then(n.t.bind(n,5745,19)),"/Users/sergeibutko/Projects/React-Native/react-native-template-oneup/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],b1ef8e0a:[()=>n.e(9702).then(n.bind(n,1297)),"@site/docs/navigation/pages.md",1297],b4a96655:[()=>n.e(5277).then(n.bind(n,8044)),"@site/docs/utils/serialize-query-params.md",8044],b5ee907e:[()=>n.e(3800).then(n.bind(n,1095)),"@site/docs/app-release.md",1095],b669beb2:[()=>n.e(3118).then(n.bind(n,5132)),"@site/docs/pages/splash.md",5132],b801cfc7:[()=>n.e(8622).then(n.bind(n,1744)),"@site/docs/configs/prettier-config.md",1744],bf3f5c43:[()=>n.e(2627).then(n.bind(n,919)),"@site/docs/utils/new-state.md",919],bf787174:[()=>n.e(9721).then(n.bind(n,7122)),"@site/docs/navigation/roots.md",7122],c2066304:[()=>n.e(3122).then(n.bind(n,4658)),"@site/docs/components/try-again.md",4658],c27df6d1:[()=>n.e(9117).then(n.bind(n,8585)),"@site/docs/redux/slice.md",8585],c5ed97f1:[()=>n.e(186).then(n.bind(n,1090)),"@site/src/pages/mission.md",1090],cf5243f0:[()=>n.e(8136).then(n.bind(n,9688)),"@site/docs/components/photo-taking-button.md",9688],d1e36d14:[()=>n.e(729).then(n.bind(n,8277)),"@site/docs/navigation/before-starting.md",8277],d589d3a7:[()=>n.e(7162).then(n.bind(n,6443)),"@site/docs/getting-started.md",6443],d95e32bd:[()=>n.e(1390).then(n.bind(n,3589)),"@site/docs/helpers/net-info-helpers.md",3589],da80d167:[()=>n.e(5048).then(n.bind(n,1389)),"@site/docs/navigation/default-options.md",1389],e1df6725:[()=>n.e(1314).then(n.bind(n,8578)),"@site/docs/redux/hooks.md",8578],e2ad1f17:[()=>n.e(9264).then(n.bind(n,4173)),"@site/docs/configs/ts-config.md",4173],e690c9e7:[()=>n.e(7686).then(n.bind(n,4408)),"@site/docs/checking-updates.md",4408],e7a9e65a:[()=>n.e(3518).then(n.bind(n,8969)),"@site/docs/components/toast-overlay.md",8969],eb838824:[()=>n.e(4697).then(n.bind(n,5759)),"@site/docs/patches.md",5759],ec7be5cc:[()=>n.e(8471).then(n.bind(n,7719)),"@site/docs/localisation/date-formatter.md",7719],edb259cb:[()=>n.e(1889).then(n.bind(n,2625)),"@site/docs/helpers/image-helpers.md",2625],ede50c9e:[()=>n.e(665).then(n.bind(n,8409)),"@site/docs/redux/state.md",8409],f2beb3a0:[()=>n.e(1486).then(n.bind(n,236)),"@site/docs/environments.md",236],f2f008bc:[()=>n.e(3220).then(n.bind(n,8926)),"@site/docs/pages/native-splash.md",8926],f49fe340:[()=>n.e(3888).then(n.bind(n,3486)),"@site/docs/pages/onboarding.md",3486],fa6c2e8e:[()=>n.e(8460).then(n.bind(n,1153)),"@site/docs/types.md",1153],fab06093:[()=>n.e(6257).then(n.bind(n,9070)),"@site/docs/components/loading-component.md",9070],fcca6dac:[()=>n.e(2239).then(n.bind(n,8689)),"@site/docs/internals/ios.md",8689],fcde09bc:[()=>n.e(2023).then(n.bind(n,9833)),"@site/docs/common-constants.md",9833],ff6d8346:[()=>n.e(2529).then(n.bind(n,353)),"@site/docs/components/radio-button.md",353]};var s=n(5893);function l(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(9670),u=n(226);function d(e,t){if("*"===e)return a()({loading:l,loader:()=>n.e(1772).then(n.bind(n,1772)),modules:["@theme/NotFound"],webpack:()=>[1772],render(e,t){const n=e.default;return(0,s.jsx)(u.z,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,{...t})})}});const r=o[`${e}-${t}`],d={},p=[],f=[],m=(0,c.Z)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),a().Map({loading:l,loader:d,modules:p,webpack:()=>f,render(t,n){const a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const o=r.default;if(!o)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{o[e]=r[e]}));let i=a;const s=n.split(".");s.slice(0,-1).forEach((e=>{i=i[e]})),i[s[s.length-1]]=o}));const o=a.__comp;delete a.__comp;const i=a.__context;return delete a.__context,(0,s.jsx)(u.z,{value:i,children:(0,s.jsx)(o,{...a,...n})})}})}const p=[{path:"/react-native-template-strong/faq",component:d("/react-native-template-strong/faq","c36"),exact:!0},{path:"/react-native-template-strong/mission",component:d("/react-native-template-strong/mission","cc1"),exact:!0},{path:"/react-native-template-strong/search",component:d("/react-native-template-strong/search","2ff"),exact:!0},{path:"/react-native-template-strong/troubleshooting",component:d("/react-native-template-strong/troubleshooting","c71"),exact:!0},{path:"/react-native-template-strong/docs",component:d("/react-native-template-strong/docs","d0f"),routes:[{path:"/react-native-template-strong/docs",component:d("/react-native-template-strong/docs","c29"),routes:[{path:"/react-native-template-strong/docs",component:d("/react-native-template-strong/docs","1a9"),routes:[{path:"/react-native-template-strong/docs/api",component:d("/react-native-template-strong/docs/api","274"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/app-icon",component:d("/react-native-template-strong/docs/app-icon","ae1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/app-release",component:d("/react-native-template-strong/docs/app-release","f60"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/checking-updates",component:d("/react-native-template-strong/docs/checking-updates","815"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/common-constants",component:d("/react-native-template-strong/docs/common-constants","ed0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/date-picker-overlay",component:d("/react-native-template-strong/docs/components/date-picker-overlay","261"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/empty-view",component:d("/react-native-template-strong/docs/components/empty-view","a05"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/flat-list-wrapper",component:d("/react-native-template-strong/docs/components/flat-list-wrapper","770"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/icon-platform",component:d("/react-native-template-strong/docs/components/icon-platform","1dc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/image-crop-picker-button",component:d("/react-native-template-strong/docs/components/image-crop-picker-button","27c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/loading-component",component:d("/react-native-template-strong/docs/components/loading-component","6f6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/photo-taking-button",component:d("/react-native-template-strong/docs/components/photo-taking-button","f01"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/primary-button",component:d("/react-native-template-strong/docs/components/primary-button","bf6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/primary-text-input",component:d("/react-native-template-strong/docs/components/primary-text-input","1fd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/radio-button",component:d("/react-native-template-strong/docs/components/radio-button","6f7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/radio-icon",component:d("/react-native-template-strong/docs/components/radio-icon","c7e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/section-list-wrapper",component:d("/react-native-template-strong/docs/components/section-list-wrapper","b26"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/separator",component:d("/react-native-template-strong/docs/components/separator","e7f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/toast-overlay",component:d("/react-native-template-strong/docs/components/toast-overlay","c46"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/touchable-platform",component:d("/react-native-template-strong/docs/components/touchable-platform","4c0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/components/try-again",component:d("/react-native-template-strong/docs/components/try-again","6f5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/configs/babel-config",component:d("/react-native-template-strong/docs/configs/babel-config","8a3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/configs/detox-config",component:d("/react-native-template-strong/docs/configs/detox-config","a1e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/configs/eslint-config",component:d("/react-native-template-strong/docs/configs/eslint-config","6f4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/configs/jest-config",component:d("/react-native-template-strong/docs/configs/jest-config","260"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/configs/metro-config",component:d("/react-native-template-strong/docs/configs/metro-config","1bf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/configs/prettier-config",component:d("/react-native-template-strong/docs/configs/prettier-config","2bc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/configs/rn-config",component:d("/react-native-template-strong/docs/configs/rn-config","442"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/configs/ts-config",component:d("/react-native-template-strong/docs/configs/ts-config","c65"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/dependencies",component:d("/react-native-template-strong/docs/dependencies","68f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/environments",component:d("/react-native-template-strong/docs/environments","d41"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/getting-started",component:d("/react-native-template-strong/docs/getting-started","828"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/calculate-page",component:d("/react-native-template-strong/docs/helpers/calculate-page","5f0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/color-helpers",component:d("/react-native-template-strong/docs/helpers/color-helpers","770"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/default-key-id-extractor",component:d("/react-native-template-strong/docs/helpers/default-key-id-extractor","088"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/dialogs-helpers",component:d("/react-native-template-strong/docs/helpers/dialogs-helpers","c9e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/image-helpers",component:d("/react-native-template-strong/docs/helpers/image-helpers","112"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/in-app-review-helper",component:d("/react-native-template-strong/docs/helpers/in-app-review-helper","768"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/net-info-helpers",component:d("/react-native-template-strong/docs/helpers/net-info-helpers","fed"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/orientation-helpers",component:d("/react-native-template-strong/docs/helpers/orientation-helpers","18d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/regex-helpers",component:d("/react-native-template-strong/docs/helpers/regex-helpers","72c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/share-helpers",component:d("/react-native-template-strong/docs/helpers/share-helpers","653"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/helpers/strings-helpers",component:d("/react-native-template-strong/docs/helpers/strings-helpers","600"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/hooks/use-back-handler",component:d("/react-native-template-strong/docs/hooks/use-back-handler","6c7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/hooks/use-debounce",component:d("/react-native-template-strong/docs/hooks/use-debounce","d71"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/hooks/use-event-register",component:d("/react-native-template-strong/docs/hooks/use-event-register","153"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/hooks/use-flat-list-actions",component:d("/react-native-template-strong/docs/hooks/use-flat-list-actions","f06"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/hooks/use-previous",component:d("/react-native-template-strong/docs/hooks/use-previous","768"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/hooks/use-why-did-you-update",component:d("/react-native-template-strong/docs/hooks/use-why-did-you-update","60b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/internals/android",component:d("/react-native-template-strong/docs/internals/android","859"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/internals/ios",component:d("/react-native-template-strong/docs/internals/ios","feb"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/localisation/add-language",component:d("/react-native-template-strong/docs/localisation/add-language","758"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/localisation/change-language",component:d("/react-native-template-strong/docs/localisation/change-language","b0b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/localisation/date-formatter",component:d("/react-native-template-strong/docs/localisation/date-formatter","a03"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/localisation/intl-formatter",component:d("/react-native-template-strong/docs/localisation/intl-formatter","0bd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/localisation/translations",component:d("/react-native-template-strong/docs/localisation/translations","353"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/navigation/actions",component:d("/react-native-template-strong/docs/navigation/actions","295"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/navigation/before-starting",component:d("/react-native-template-strong/docs/navigation/before-starting","9c0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/navigation/default-options",component:d("/react-native-template-strong/docs/navigation/default-options","f98"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/navigation/hooks",component:d("/react-native-template-strong/docs/navigation/hooks","cb5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/navigation/overlays-and-modals",component:d("/react-native-template-strong/docs/navigation/overlays-and-modals","347"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/navigation/pages",component:d("/react-native-template-strong/docs/navigation/pages","828"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/navigation/roots",component:d("/react-native-template-strong/docs/navigation/roots","8fc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/pages/native-splash",component:d("/react-native-template-strong/docs/pages/native-splash","88d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/pages/onboarding",component:d("/react-native-template-strong/docs/pages/onboarding","452"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/pages/splash",component:d("/react-native-template-strong/docs/pages/splash","472"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/patches",component:d("/react-native-template-strong/docs/patches","863"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/redux/async-thunk",component:d("/react-native-template-strong/docs/redux/async-thunk","fa5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/redux/before-starting",component:d("/react-native-template-strong/docs/redux/before-starting","f70"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/redux/core-idea",component:d("/react-native-template-strong/docs/redux/core-idea","309"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/redux/hooks",component:d("/react-native-template-strong/docs/redux/hooks","385"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/redux/slice",component:d("/react-native-template-strong/docs/redux/slice","1bd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/redux/state",component:d("/react-native-template-strong/docs/redux/state","5a5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/redux/store",component:d("/react-native-template-strong/docs/redux/store","78c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/resources/fonts",component:d("/react-native-template-strong/docs/resources/fonts","c35"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/resources/images",component:d("/react-native-template-strong/docs/resources/images","efe"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/resources/sf-symbols",component:d("/react-native-template-strong/docs/resources/sf-symbols","b6e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/resources/vector-icons",component:d("/react-native-template-strong/docs/resources/vector-icons","685"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/structure/module",component:d("/react-native-template-strong/docs/structure/module","240"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/structure/project",component:d("/react-native-template-strong/docs/structure/project","2a9"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/styles/common-sizes",component:d("/react-native-template-strong/docs/styles/common-sizes","78d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/styles/common-styles",component:d("/react-native-template-strong/docs/styles/common-styles","e28"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/styles/component-styles",component:d("/react-native-template-strong/docs/styles/component-styles","6b5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/testing/detox",component:d("/react-native-template-strong/docs/testing/detox","55c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/testing/jest",component:d("/react-native-template-strong/docs/testing/jest","a1d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/testing/storybook",component:d("/react-native-template-strong/docs/testing/storybook","eb6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/themes/colors",component:d("/react-native-template-strong/docs/themes/colors","a7f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/themes/native-colors",component:d("/react-native-template-strong/docs/themes/native-colors","ed6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/types",component:d("/react-native-template-strong/docs/types","b19"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/utils/list-handlers",component:d("/react-native-template-strong/docs/utils/list-handlers","b74"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/utils/new-state",component:d("/react-native-template-strong/docs/utils/new-state","494"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/utils/serialize-query-params",component:d("/react-native-template-strong/docs/utils/serialize-query-params","f5d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/utils/url-openers",component:d("/react-native-template-strong/docs/utils/url-openers","2cc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-template-strong/docs/validations",component:d("/react-native-template-strong/docs/validations","982"),exact:!0,sidebar:"tutorialSidebar"}]}]}]},{path:"/react-native-template-strong/",component:d("/react-native-template-strong/","da3"),exact:!0},{path:"*",component:d("*")}]},8934:(e,t,n)=>{"use strict";n.d(t,{_:()=>o,t:()=>i});var r=n(7294),a=n(5893);const o=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,a.jsx)(o.Provider,{value:n,children:t})}},7221:(e,t,n)=>{"use strict";var r=n(7294),a=n(745),o=n(3727),i=n(405),s=n(412);const l=[n(2497),n(3310),n(8320),n(2295)];var c=n(723),u=n(6550),d=n(8790),p=n(5893);function f(e){let{children:t}=e;return(0,p.jsx)(p.Fragment,{children:t})}var m=n(5742),g=n(2263),h=n(4996),b=n(6668),v=n(833),y=n(4711),w=n(9727),k=n(3320),x=n(8780),S=n(197);function E(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,g.Z)(),r=(0,y.l)(),a=n[e].htmlLang,o=e=>e.replace("-","_");return(0,p.jsxs)(m.Z,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:o(a)}),Object.values(n).filter((e=>a!==e.htmlLang)).map((e=>(0,p.jsx)("meta",{property:"og:locale:alternate",content:o(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function _(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.Z)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,g.Z)(),{pathname:r}=(0,u.TH)();return e+(0,x.applyTrailingSlash)((0,h.Z)(r),{trailingSlash:n,baseUrl:t})}(),a=t?`${n}${t}`:r;return(0,p.jsxs)(m.Z,{children:[(0,p.jsx)("meta",{property:"og:url",content:a}),(0,p.jsx)("link",{rel:"canonical",href:a})]})}function C(){const{i18n:{currentLocale:e}}=(0,g.Z)(),{metadata:t,image:n}=(0,b.L)();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{className:w.h})]}),n&&(0,p.jsx)(v.d,{image:n}),(0,p.jsx)(_,{}),(0,p.jsx)(E,{}),(0,p.jsx)(S.Z,{tag:k.HX,locale:e}),(0,p.jsx)(m.Z,{children:t.map(((e,t)=>(0,p.jsx)("meta",{...e},t)))})]})}const T=new Map;function j(e){if(T.has(e.pathname))return{...e,pathname:T.get(e.pathname)};if((0,d.f)(c.Z,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return T.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return T.set(e.pathname,t),{...e,pathname:t}}var A=n(8934),L=n(8940),R=n(469);function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n {const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const P=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,R.Z)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,a=t.hash===n.hash,o=t.search===n.search;if(r&&a&&!o)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),N("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function O(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.f)(c.Z,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class I extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.Z.canUseDOM?N("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=N("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),O(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,p.jsx)(P,{previousLocation:this.previousLocation,location:t,children:(0,p.jsx)(u.AW,{location:t,render:()=>e})})}}const D=I,M="__docusaurus-base-url-issue-banner-container",F="__docusaurus-base-url-issue-banner",z="__docusaurus-base-url-issue-banner-suggestion-container";function B(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${M}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n \n\n`}(e)).replace(/{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var K=n(9670);const Y=new Set,X=new Set,J=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch(e){if(!(e=>!J()&&!X.has(e)&&!Y.has(e))(e))return!1;Y.add(e);const t=(0,d.f)(c.Z,e).flatMap((e=>{return t=e.route.path,Object.entries(W).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,K.Z)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Q(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!J()&&!X.has(e))(e)&&(X.add(e),O(e))},te=Object.freeze(ee),ne=Boolean(!0);if(s.Z.canUseDOM){window.docusaurus=te;const e=document.getElementById("__docusaurus"),t=(0,p.jsx)(i.B6,{children:(0,p.jsx)(o.VK,{children:(0,p.jsx)(V,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},s=()=>{if(ne)r.startTransition((()=>{a.hydrateRoot(e,t,{onRecoverableError:n})}));else{const o=a.createRoot(e,{onRecoverableError:n});r.startTransition((()=>{o.render(t)}))}};O(window.location.pathname).then(s)}},8940:(e,t,n)=>{"use strict";n.d(t,{_:()=>d,M:()=>p});var r=n(7294),a=n(6809);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/react-native-template-strong/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/react-native-template-strong/docs","mainDocId":"getting-started","docs":[{"id":"api","path":"/react-native-template-strong/docs/api","sidebar":"tutorialSidebar"},{"id":"app-icon","path":"/react-native-template-strong/docs/app-icon","sidebar":"tutorialSidebar"},{"id":"app-release","path":"/react-native-template-strong/docs/app-release","sidebar":"tutorialSidebar"},{"id":"checking-updates","path":"/react-native-template-strong/docs/checking-updates","sidebar":"tutorialSidebar"},{"id":"common-constants","path":"/react-native-template-strong/docs/common-constants","sidebar":"tutorialSidebar"},{"id":"components/date-picker-overlay","path":"/react-native-template-strong/docs/components/date-picker-overlay","sidebar":"tutorialSidebar"},{"id":"components/empty-view","path":"/react-native-template-strong/docs/components/empty-view","sidebar":"tutorialSidebar"},{"id":"components/flat-list-wrapper","path":"/react-native-template-strong/docs/components/flat-list-wrapper","sidebar":"tutorialSidebar"},{"id":"components/icon-platform","path":"/react-native-template-strong/docs/components/icon-platform","sidebar":"tutorialSidebar"},{"id":"components/image-crop-picker-button","path":"/react-native-template-strong/docs/components/image-crop-picker-button","sidebar":"tutorialSidebar"},{"id":"components/loading-component","path":"/react-native-template-strong/docs/components/loading-component","sidebar":"tutorialSidebar"},{"id":"components/photo-taking-button","path":"/react-native-template-strong/docs/components/photo-taking-button","sidebar":"tutorialSidebar"},{"id":"components/primary-button","path":"/react-native-template-strong/docs/components/primary-button","sidebar":"tutorialSidebar"},{"id":"components/primary-text-input","path":"/react-native-template-strong/docs/components/primary-text-input","sidebar":"tutorialSidebar"},{"id":"components/radio-button","path":"/react-native-template-strong/docs/components/radio-button","sidebar":"tutorialSidebar"},{"id":"components/radio-icon","path":"/react-native-template-strong/docs/components/radio-icon","sidebar":"tutorialSidebar"},{"id":"components/section-list-wrapper","path":"/react-native-template-strong/docs/components/section-list-wrapper","sidebar":"tutorialSidebar"},{"id":"components/separator","path":"/react-native-template-strong/docs/components/separator","sidebar":"tutorialSidebar"},{"id":"components/toast-overlay","path":"/react-native-template-strong/docs/components/toast-overlay","sidebar":"tutorialSidebar"},{"id":"components/touchable-platform","path":"/react-native-template-strong/docs/components/touchable-platform","sidebar":"tutorialSidebar"},{"id":"components/try-again","path":"/react-native-template-strong/docs/components/try-again","sidebar":"tutorialSidebar"},{"id":"configs/babel-config","path":"/react-native-template-strong/docs/configs/babel-config","sidebar":"tutorialSidebar"},{"id":"configs/detox-config","path":"/react-native-template-strong/docs/configs/detox-config","sidebar":"tutorialSidebar"},{"id":"configs/eslint-config","path":"/react-native-template-strong/docs/configs/eslint-config","sidebar":"tutorialSidebar"},{"id":"configs/jest-config","path":"/react-native-template-strong/docs/configs/jest-config","sidebar":"tutorialSidebar"},{"id":"configs/metro-config","path":"/react-native-template-strong/docs/configs/metro-config","sidebar":"tutorialSidebar"},{"id":"configs/prettier-config","path":"/react-native-template-strong/docs/configs/prettier-config","sidebar":"tutorialSidebar"},{"id":"configs/rn-config","path":"/react-native-template-strong/docs/configs/rn-config","sidebar":"tutorialSidebar"},{"id":"configs/ts-config","path":"/react-native-template-strong/docs/configs/ts-config","sidebar":"tutorialSidebar"},{"id":"dependencies","path":"/react-native-template-strong/docs/dependencies","sidebar":"tutorialSidebar"},{"id":"environments","path":"/react-native-template-strong/docs/environments","sidebar":"tutorialSidebar"},{"id":"getting-started","path":"/react-native-template-strong/docs/getting-started","sidebar":"tutorialSidebar"},{"id":"helpers/calculate-page","path":"/react-native-template-strong/docs/helpers/calculate-page","sidebar":"tutorialSidebar"},{"id":"helpers/color-helpers","path":"/react-native-template-strong/docs/helpers/color-helpers","sidebar":"tutorialSidebar"},{"id":"helpers/default-key-id-extractor","path":"/react-native-template-strong/docs/helpers/default-key-id-extractor","sidebar":"tutorialSidebar"},{"id":"helpers/dialogs-helpers","path":"/react-native-template-strong/docs/helpers/dialogs-helpers","sidebar":"tutorialSidebar"},{"id":"helpers/image-helpers","path":"/react-native-template-strong/docs/helpers/image-helpers","sidebar":"tutorialSidebar"},{"id":"helpers/in-app-review-helper","path":"/react-native-template-strong/docs/helpers/in-app-review-helper","sidebar":"tutorialSidebar"},{"id":"helpers/net-info-helpers","path":"/react-native-template-strong/docs/helpers/net-info-helpers","sidebar":"tutorialSidebar"},{"id":"helpers/orientation-helpers","path":"/react-native-template-strong/docs/helpers/orientation-helpers","sidebar":"tutorialSidebar"},{"id":"helpers/regex-helpers","path":"/react-native-template-strong/docs/helpers/regex-helpers","sidebar":"tutorialSidebar"},{"id":"helpers/share-helpers","path":"/react-native-template-strong/docs/helpers/share-helpers","sidebar":"tutorialSidebar"},{"id":"helpers/strings-helpers","path":"/react-native-template-strong/docs/helpers/strings-helpers","sidebar":"tutorialSidebar"},{"id":"hooks/use-back-handler","path":"/react-native-template-strong/docs/hooks/use-back-handler","sidebar":"tutorialSidebar"},{"id":"hooks/use-debounce","path":"/react-native-template-strong/docs/hooks/use-debounce","sidebar":"tutorialSidebar"},{"id":"hooks/use-event-register","path":"/react-native-template-strong/docs/hooks/use-event-register","sidebar":"tutorialSidebar"},{"id":"hooks/use-flat-list-actions","path":"/react-native-template-strong/docs/hooks/use-flat-list-actions","sidebar":"tutorialSidebar"},{"id":"hooks/use-previous","path":"/react-native-template-strong/docs/hooks/use-previous","sidebar":"tutorialSidebar"},{"id":"hooks/use-why-did-you-update","path":"/react-native-template-strong/docs/hooks/use-why-did-you-update","sidebar":"tutorialSidebar"},{"id":"internals/android","path":"/react-native-template-strong/docs/internals/android","sidebar":"tutorialSidebar"},{"id":"internals/ios","path":"/react-native-template-strong/docs/internals/ios","sidebar":"tutorialSidebar"},{"id":"localisation/add-language","path":"/react-native-template-strong/docs/localisation/add-language","sidebar":"tutorialSidebar"},{"id":"localisation/change-language","path":"/react-native-template-strong/docs/localisation/change-language","sidebar":"tutorialSidebar"},{"id":"localisation/date-formatter","path":"/react-native-template-strong/docs/localisation/date-formatter","sidebar":"tutorialSidebar"},{"id":"localisation/intl-formatter","path":"/react-native-template-strong/docs/localisation/intl-formatter","sidebar":"tutorialSidebar"},{"id":"localisation/translations","path":"/react-native-template-strong/docs/localisation/translations","sidebar":"tutorialSidebar"},{"id":"navigation/actions","path":"/react-native-template-strong/docs/navigation/actions","sidebar":"tutorialSidebar"},{"id":"navigation/before-starting","path":"/react-native-template-strong/docs/navigation/before-starting","sidebar":"tutorialSidebar"},{"id":"navigation/default-options","path":"/react-native-template-strong/docs/navigation/default-options","sidebar":"tutorialSidebar"},{"id":"navigation/hooks","path":"/react-native-template-strong/docs/navigation/hooks","sidebar":"tutorialSidebar"},{"id":"navigation/overlays-and-modals","path":"/react-native-template-strong/docs/navigation/overlays-and-modals","sidebar":"tutorialSidebar"},{"id":"navigation/pages","path":"/react-native-template-strong/docs/navigation/pages","sidebar":"tutorialSidebar"},{"id":"navigation/roots","path":"/react-native-template-strong/docs/navigation/roots","sidebar":"tutorialSidebar"},{"id":"pages/native-splash","path":"/react-native-template-strong/docs/pages/native-splash","sidebar":"tutorialSidebar"},{"id":"pages/onboarding","path":"/react-native-template-strong/docs/pages/onboarding","sidebar":"tutorialSidebar"},{"id":"pages/splash","path":"/react-native-template-strong/docs/pages/splash","sidebar":"tutorialSidebar"},{"id":"patches","path":"/react-native-template-strong/docs/patches","sidebar":"tutorialSidebar"},{"id":"redux/async-thunk","path":"/react-native-template-strong/docs/redux/async-thunk","sidebar":"tutorialSidebar"},{"id":"redux/before-starting","path":"/react-native-template-strong/docs/redux/before-starting","sidebar":"tutorialSidebar"},{"id":"redux/core-idea","path":"/react-native-template-strong/docs/redux/core-idea","sidebar":"tutorialSidebar"},{"id":"redux/hooks","path":"/react-native-template-strong/docs/redux/hooks","sidebar":"tutorialSidebar"},{"id":"redux/slice","path":"/react-native-template-strong/docs/redux/slice","sidebar":"tutorialSidebar"},{"id":"redux/state","path":"/react-native-template-strong/docs/redux/state","sidebar":"tutorialSidebar"},{"id":"redux/store","path":"/react-native-template-strong/docs/redux/store","sidebar":"tutorialSidebar"},{"id":"resources/fonts","path":"/react-native-template-strong/docs/resources/fonts","sidebar":"tutorialSidebar"},{"id":"resources/images","path":"/react-native-template-strong/docs/resources/images","sidebar":"tutorialSidebar"},{"id":"resources/sf-symbols","path":"/react-native-template-strong/docs/resources/sf-symbols","sidebar":"tutorialSidebar"},{"id":"resources/vector-icons","path":"/react-native-template-strong/docs/resources/vector-icons","sidebar":"tutorialSidebar"},{"id":"structure/module","path":"/react-native-template-strong/docs/structure/module","sidebar":"tutorialSidebar"},{"id":"structure/project","path":"/react-native-template-strong/docs/structure/project","sidebar":"tutorialSidebar"},{"id":"styles/common-sizes","path":"/react-native-template-strong/docs/styles/common-sizes","sidebar":"tutorialSidebar"},{"id":"styles/common-styles","path":"/react-native-template-strong/docs/styles/common-styles","sidebar":"tutorialSidebar"},{"id":"styles/component-styles","path":"/react-native-template-strong/docs/styles/component-styles","sidebar":"tutorialSidebar"},{"id":"testing/detox","path":"/react-native-template-strong/docs/testing/detox","sidebar":"tutorialSidebar"},{"id":"testing/jest","path":"/react-native-template-strong/docs/testing/jest","sidebar":"tutorialSidebar"},{"id":"testing/storybook","path":"/react-native-template-strong/docs/testing/storybook","sidebar":"tutorialSidebar"},{"id":"themes/colors","path":"/react-native-template-strong/docs/themes/colors","sidebar":"tutorialSidebar"},{"id":"themes/native-colors","path":"/react-native-template-strong/docs/themes/native-colors","sidebar":"tutorialSidebar"},{"id":"types","path":"/react-native-template-strong/docs/types","sidebar":"tutorialSidebar"},{"id":"utils/list-handlers","path":"/react-native-template-strong/docs/utils/list-handlers","sidebar":"tutorialSidebar"},{"id":"utils/new-state","path":"/react-native-template-strong/docs/utils/new-state","sidebar":"tutorialSidebar"},{"id":"utils/serialize-query-params","path":"/react-native-template-strong/docs/utils/serialize-query-params","sidebar":"tutorialSidebar"},{"id":"utils/url-openers","path":"/react-native-template-strong/docs/utils/url-openers","sidebar":"tutorialSidebar"},{"id":"validations","path":"/react-native-template-strong/docs/validations","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/react-native-template-strong/docs/getting-started","label":"getting-started"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(7529);const l=JSON.parse('{"docusaurusVersion":"3.1.0","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.1.0"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.1.0"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.1.0"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.1.0"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.1.0"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.1.0"}}}');var c=n(5893);const u={siteConfig:a.default,siteMetadata:l,globalData:o,i18n:i,codeTranslations:s},d=r.createContext(u);function p(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},4763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(7294),a=n(412),o=n(5742),i=n(8780),s=n(7372),l=n(5893);function c(e){let{error:t,tryAgain:n}=e;return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,l.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,l.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,l.jsx)(u,{error:t})]})}function u(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,l.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function d(e){let{error:t,tryAgain:n}=e;return(0,l.jsxs)(f,{fallback:()=>(0,l.jsx)(c,{error:t,tryAgain:n}),children:[(0,l.jsx)(o.Z,{children:(0,l.jsx)("title",{children:"Page Error"})}),(0,l.jsx)(s.Z,{children:(0,l.jsx)(c,{error:t,tryAgain:n})})]})}const p=e=>(0,l.jsx)(d,{...e});class f extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.Z.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??p)(e)}return e??null}}},412:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});n(7294);var r=n(405),a=n(5893);function o(e){return(0,a.jsx)(r.ql,{...e})}},3692:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(7294),a=n(3727),o=n(8780),i=n(2263),s=n(3919),l=n(412),c=n(8138),u=n(4996),d=n(5893);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:m,isActive:g,"data-noBrokenLinkCheck":h,autoAddBaseUrl:b=!0,...v}=e;const{siteConfig:{trailingSlash:y,baseUrl:w}}=(0,i.Z)(),{withBaseUrl:k}=(0,u.C)(),x=(0,c.Z)(),S=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>S.current));const E=p||f;const _=(0,s.Z)(E),C=E?.replace("pathname://","");let T=void 0!==C?(j=C,b&&(e=>e.startsWith("/"))(j)?k(j):j):void 0;var j;T&&_&&(T=(0,o.applyTrailingSlash)(T,{trailingSlash:y,baseUrl:w}));const A=(0,r.useRef)(!1),L=n?a.OL:a.rU,R=l.Z.canUseIntersectionObserver,N=(0,r.useRef)(),P=()=>{A.current||null==T||(window.docusaurus.preload(T),A.current=!0)};(0,r.useEffect)((()=>(!R&&_&&null!=T&&window.docusaurus.prefetch(T),()=>{R&&N.current&&N.current.disconnect()})),[N,T,R,_]);const O=T?.startsWith("#")??!1,I=!T||!_||O;return I||h||x.collectLink(T),I?(0,d.jsx)("a",{ref:S,href:T,...E&&!_&&{target:"_blank",rel:"noopener noreferrer"},...v}):(0,d.jsx)(L,{...v,onMouseEnter:P,onTouchStart:P,innerRef:e=>{S.current=e,R&&e&&_&&(N.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(N.current.unobserve(e),N.current.disconnect(),null!=T&&window.docusaurus.prefetch(T))}))})),N.current.observe(e))},to:T,...n&&{isActive:g,activeClassName:m}})}const f=r.forwardRef(p)},5999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c,I:()=>l});var r=n(7294),a=n(5893);function o(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(7529);function s(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return o(s({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("IllegalYour Docusaurus site did not load properly.
\nA very common reason is a wrong site baseUrl configuration.
\nCurrent configured baseUrl = ${e} ${"/"===e?" (default value)":""}
\nWe suggest trying baseUrl =
\nchildren",t),new Error("The Docusaurus component only accept simple string values");const i=s({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},9935:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});const r="default"},3919:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>a,b:()=>r})},4996:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,Z:()=>s});var r=n(7294),a=n(2263),o=n(3919);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,a.Z)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:a=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,o.b)(n))return n;if(a)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const s=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+s:s}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},8138:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7294);n(5893);const a=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),o=()=>(0,r.useContext)(a);function i(){return o()}},2263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(8940);function o(){return(0,r.useContext)(a._)}},2389:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(8934);function o(){return(0,r.useContext)(a._)}},469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294);const a=n(412).Z.canUseDOM?r.useLayoutEffect:r.useEffect},9670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const s=a?`${a}.${o}`:o;r(i)?e(i,s):t[s]=i}))}(e),t}},226:(e,t,n)=>{"use strict";n.d(t,{_:()=>o,z:()=>i});var r=n(7294),a=n(5893);const o=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(o),s=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,a.jsx)(o.Provider,{value:s,children:t})}},143:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>b,gA:()=>f,WS:()=>m,_r:()=>d,Jo:()=>v,zh:()=>p,yW:()=>h,gB:()=>g});var r=n(6550),a=n(2263),o=n(9935);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,a.Z)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const s=e=>e.versions.find((e=>e.isLast));function l(e,t){const n=s(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}function c(e,t){const n=l(e,t),a=n?.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const u={},d=()=>i("docusaurus-plugin-content-docs")??u,p=e=>function(e,t,n){void 0===t&&(t=o.m),void 0===n&&(n={});const r=i(e),a=r?.[t];if(!a&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return a}("docusaurus-plugin-content-docs",e,{failfast:!0});function f(e){void 0===e&&(e={});const t=d(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function m(e){void 0===e&&(e={});const t=f(e),{pathname:n}=(0,r.TH)();if(!t)return;return{activePlugin:t,activeVersion:l(t.pluginData,n)}}function g(e){return p(e).versions}function h(e){const t=p(e);return s(t)}function b(e){const t=p(e),{pathname:n}=(0,r.TH)();return c(t,n)}function v(e){const t=p(e),{pathname:n}=(0,r.TH)();return function(e,t){const n=s(e);return{latestDocSuggestion:c(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},8320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4865),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},3310:(e,t,n)=>{"use strict";n.r(t);var r=n(2573),a=n(6809);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(6854),n(6726)(`./prism-${e}`)})),delete globalThis.Prism}(r.p1)},2503:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});n(7294);var r=n(512),a=n(5999),o=n(6668),i=n(3692),s=n(8138);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(5893);function u(e){let{as:t,id:n,...u}=e;const d=(0,s.Z)(),{navbar:{hideOnScroll:p}}=(0,o.L)();if("h1"===t||!n)return(0,c.jsx)(t,{...u,id:void 0});d.collectAnchor(n);const f=(0,a.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return(0,c.jsxs)(t,{...u,className:(0,r.Z)("anchor",p?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,u.className),id:n,children:[u.children,(0,c.jsx)(i.Z,{className:"hash-link",to:`#${n}`,"aria-label":f,title:f,children:"\u200b"})]})}},9471:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});n(7294);const r={iconExternalLink:"iconExternalLink_nPIU"};var a=n(5893);function o(e){let{width:t=13.5,height:n=13.5}=e;return(0,a.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},7372:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Nt});var r=n(7294),a=n(512),o=n(4763),i=n(833),s=n(6550),l=n(5999),c=n(5936),u=n(5893);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,s.k6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,c.S)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const m=(0,l.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){const t=e.children??m,{containerRef:n,onClick:r}=f();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var h=n(5281),b=n(9727);const v={skipToContent:"skipToContent_fXgn"};function y(){return(0,u.jsx)(g,{className:v.skipToContent})}var w=n(6668),k=n(9689);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:a=1.2,className:o,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:a,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const S={closeButton:"closeButton_CVFx"};function E(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,a.Z)("clean-btn close",S.closeButton,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const _={content:"content_knG7"};function C(e){const{announcementBar:t}=(0,w.L)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,a.Z)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const T={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function j(){const{announcementBar:e}=(0,w.L)(),{isActive:t,close:n}=(0,k.nT)();if(!t)return null;const{backgroundColor:r,textColor:a,isCloseable:o}=e;return(0,u.jsxs)("div",{className:T.announcementBar,style:{backgroundColor:r,color:a},role:"banner",children:[o&&(0,u.jsx)("div",{className:T.announcementBarPlaceholder}),(0,u.jsx)(C,{className:T.announcementBarContent}),o&&(0,u.jsx)(E,{onClick:n,className:T.announcementBarClose})]})}var A=n(3163),L=n(2466);var R=n(902),N=n(3102);const P=r.createContext(null);function O(e){let{children:t}=e;const n=function(){const e=(0,A.e)(),t=(0,N.HY)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,R.D9)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return(0,u.jsx)(P.Provider,{value:n,children:t})}function I(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function D(){const e=(0,r.useContext)(P);if(!e)throw new R.i6("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,N.HY)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:I(o)})),[a,o,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:o}=D();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var F=n(2949),z=n(2389);function B(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function U(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const $={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){let{className:t,buttonClassName:n,value:r,onChange:o}=e;const i=(0,z.Z)(),s=(0,l.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,a.Z)($.toggle,t),children:(0,u.jsxs)("button",{className:(0,a.Z)("clean-btn",$.toggleButton,!i&&$.toggleButtonDisabled,n),type:"button",onClick:()=>o("dark"===r?"light":"dark"),disabled:!i,title:s,"aria-label":s,"aria-live":"polite",children:[(0,u.jsx)(B,{className:(0,a.Z)($.toggleIcon,$.lightToggleIcon)}),(0,u.jsx)(U,{className:(0,a.Z)($.toggleIcon,$.darkToggleIcon)})]})})}const H=r.memo(q),Z={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){let{className:t}=e;const n=(0,w.L)().navbar.style,r=(0,w.L)().colorMode.disableSwitch,{colorMode:a,setColorMode:o}=(0,F.I)();return r?null:(0,u.jsx)(H,{className:t,buttonClassName:"dark"===n?Z.darkNavbarColorModeToggle:void 0,value:a,onChange:o})}var V=n(1327);function W(){return(0,u.jsx)(V.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Q(){const e=(0,A.e)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function K(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(W,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(Q,{})]})}var Y=n(3692),X=n(4996),J=n(3919),ee=n(8022),te=n(9471);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:a,label:o,html:i,isDropdownLink:s,prependBaseUrlToHref:l,...c}=e;const d=(0,X.Z)(r),p=(0,X.Z)(t),f=(0,X.Z)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,J.Z)(a),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[o,m&&(0,u.jsx)(te.Z,{...s&&{width:12,height:12}})]})};return a?(0,u.jsx)(Y.Z,{href:l?f:a,...c,...g}):(0,u.jsx)(Y.Z,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?(0,ee.F)(n,t.pathname):t.pathname.startsWith(p)},...c,...g})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const o=(0,u.jsx)(ne,{className:(0,a.Z)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:o}):o}function ae(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,a.Z)("menu__link",t),...r})})}function oe(e){let{mobile:t=!1,position:n,...r}=e;const a=t?ae:re;return(0,u.jsx)(a,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(6043),se=n(8596),le=n(2263);const ce={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ue(e,t){return e.some((e=>function(e,t){return!!(0,se.Mg)(e.to,t)||!!(0,ee.F)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:o,onClick:i,...s}=e;const l=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,u.jsxs)("div",{ref:l,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:s.to?void 0:"#",className:(0,a.Z)("navbar__link",o),...s,onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:s.children??s.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(He,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function pe(e){let{items:t,className:n,position:o,onClick:i,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,le.Z)(),{pathname:t}=(0,s.TH)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:p,toggleCollapsed:f,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),(0,u.jsxs)("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,u.jsx)(ne,{role:"button",className:(0,a.Z)(ce.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...l,onClick:e=>{e.preventDefault(),f()},children:l.children??l.label}),(0,u.jsx)(ie.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:t.map(((e,t)=>(0,r.createElement)(He,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function fe(e){let{mobile:t=!1,...n}=e;const r=t?pe:de;return(0,u.jsx)(r,{...n})}var me=n(4711);function ge(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const he="iconLanguage_nlXk";var be=n(3935);function ve(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var ye=n(830),we=["translations"];function ke(){return ke=Object.assign||function(e){for(var t=1;t e.length)&&(t=e.length);for(var n=0,r=new Array(t);n =0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r =0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var _e="Ctrl";var Ce=r.forwardRef((function(e,t){var n=e.translations,a=void 0===n?{}:n,o=Ee(e,we),i=a.buttonText,s=void 0===i?"Search":i,l=a.buttonAriaLabel,c=void 0===l?"Search":l,u=xe((0,r.useState)(null),2),d=u[0],p=u[1];return(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("\u2318"):p(_e))}),[]),r.createElement("button",ke({type:"button",className:"DocSearch DocSearch-Button","aria-label":c},o,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(ye.W,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},s)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&r.createElement(r.Fragment,null,r.createElement("kbd",{className:"DocSearch-Button-Key"},d===_e?r.createElement(ve,null):d),r.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),Te=n(5742),je=n(6177),Ae=n(239),Le=n(3320);const Re={button:{buttonText:(0,l.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,l.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,l.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,l.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,l.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,l.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,l.I)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,l.I)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,l.I)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,l.I)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,l.I)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,l.I)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,l.I)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,l.I)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,l.I)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,l.I)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,l.I)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,l.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,l.I)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};let Ne=null;function Pe(e){let{hit:t,children:n}=e;return(0,u.jsx)(Y.Z,{to:t.url,children:n})}function Oe(e){let{state:t,onClose:n}=e;const r=(0,je.M)();return(0,u.jsx)(Y.Z,{to:r(t.query),onClick:n,children:(0,u.jsx)(l.Z,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits},children:"See all {count} results"})})}function Ie(e){let{contextualSearch:t,externalUrlRegex:a,...o}=e;const{siteMetadata:i}=(0,le.Z)(),l=(0,Ae.l)(),c=function(){const{locale:e,tags:t}=(0,Le._q)();return[`language:${e}`,t.map((e=>`docusaurus_tag:${e}`))]}(),d=o.searchParameters?.facetFilters??[],p=t?function(e,t){const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}(c,d):d,f={...o.searchParameters,facetFilters:p},m=(0,s.k6)(),g=(0,r.useRef)(null),h=(0,r.useRef)(null),[b,v]=(0,r.useState)(!1),[y,w]=(0,r.useState)(void 0),k=(0,r.useCallback)((()=>Ne?Promise.resolve():Promise.all([n.e(1426).then(n.bind(n,1426)),Promise.all([n.e(532),n.e(6945)]).then(n.bind(n,6945)),Promise.all([n.e(532),n.e(8894)]).then(n.bind(n,8894))]).then((e=>{let[{DocSearchModal:t}]=e;Ne=t}))),[]),x=(0,r.useCallback)((()=>{k().then((()=>{g.current=document.createElement("div"),document.body.insertBefore(g.current,document.body.firstChild),v(!0)}))}),[k,v]),S=(0,r.useCallback)((()=>{v(!1),g.current?.remove()}),[v]),E=(0,r.useCallback)((e=>{k().then((()=>{v(!0),w(e.key)}))}),[k,v,w]),_=(0,r.useRef)({navigate(e){let{itemUrl:t}=e;(0,ee.F)(a,t)?window.location.href=t:m.push(t)}}).current,C=(0,r.useRef)((e=>o.transformItems?o.transformItems(e):e.map((e=>({...e,url:l(e.url)}))))).current,T=(0,r.useMemo)((()=>e=>(0,u.jsx)(Oe,{...e,onClose:S})),[S]),j=(0,r.useCallback)((e=>(e.addAlgoliaAgent("docusaurus",i.docusaurusVersion),e)),[i.docusaurusVersion]);return function(e){var t=e.isOpen,n=e.onOpen,a=e.onClose,o=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;(27===e.keyCode&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?a():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,a,o,i])}({isOpen:b,onOpen:x,onClose:S,onInput:E,searchButtonRef:h}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Te.Z,{children:(0,u.jsx)("link",{rel:"preconnect",href:`https://${o.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})}),(0,u.jsx)(Ce,{onTouchStart:k,onFocus:k,onMouseOver:k,onClick:x,ref:h,translations:Re.button}),b&&Ne&&g.current&&(0,be.createPortal)((0,u.jsx)(Ne,{onClose:S,initialScrollY:window.scrollY,initialQuery:y,navigator:_,transformItems:C,hitComponent:Pe,transformSearchClient:j,...o.searchPagePath&&{resultsFooterComponent:T},...o,searchParameters:f,placeholder:Re.placeholder,translations:Re.modal}),g.current)]})}function De(){const{siteConfig:e}=(0,le.Z)();return(0,u.jsx)(Ie,{...e.themeConfig.algolia})}const Me={navbarSearchContainer:"navbarSearchContainer_Bca1"};function Fe(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,a.Z)(n,Me.navbarSearchContainer),children:t})}var ze=n(143),Be=n(2802);var Ue=n(373);const $e=e=>e.docs.find((t=>t.id===e.mainDocId));const qe={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:a="",...o}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,le.Z)(),p=(0,me.l)(),{search:f,hash:m}=(0,s.TH)(),g=[...n,...c.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${m}${a}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],h=t?(0,l.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(fe,{...o,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ge,{className:he}),h]}),items:g})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(Fe,{className:n,children:(0,u.jsx)(De,{})})},dropdown:fe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:o=!1}=e;const i=o?"li":"div";return(0,u.jsx)(i,{className:(0,a.Z)({navbar__item:!r&&!o,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,ze.Iw)(r),i=(0,Be.vY)(t,r),s=o?.path===i?.path;return null===i||i.unlisted&&!s?null:(0,u.jsx)(oe,{exact:!0,...a,isActive:()=>s||!!o?.sidebar&&o.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,ze.Iw)(r),i=(0,Be.oz)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(oe,{exact:!0,...a,isActive:()=>o?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...a}=e;const o=(0,Be.lO)(r)[0],i=t??o.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(o).path;return(0,u.jsx)(oe,{...a,label:i,to:s})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:a,dropdownItemsAfter:o,...i}=e;const{search:c,hash:d}=(0,s.TH)(),p=(0,ze.Iw)(n),f=(0,ze.gB)(n),{savePreferredVersionName:m}=(0,Ue.J)(n),g=[...a,...f.map((e=>{const t=p.alternateDocVersions[e.name]??$e(e);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>m(e.name)}})),...o],h=(0,Be.lO)(n)[0],b=t&&g.length>1?(0,l.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,v=t&&g.length>1?void 0:$e(h).path;return g.length<=1?(0,u.jsx)(oe,{...i,mobile:t,label:b,to:v,isActive:r?()=>!1:void 0}):(0,u.jsx)(fe,{...i,mobile:t,label:b,to:v,items:g,isActive:r?()=>!1:void 0})}};function He(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=qe[r];if(!a)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(a,{...n})}function Ze(){const e=(0,A.e)(),t=(0,w.L)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(He,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Ge(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Ve(){const e=0===(0,w.L)().navbar.items.length,t=D();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Ge,{onClick:()=>t.hide()}),t.content]})}function We(){const e=(0,A.e)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(M,{header:(0,u.jsx)(K,{}),primaryMenu:(0,u.jsx)(Ze,{}),secondaryMenu:(0,u.jsx)(Ve,{})}):null}const Qe={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Ke(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,a.Z)("navbar-sidebar__backdrop",e.className)})}function Ye(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,w.L)(),i=(0,A.e)(),{navbarRef:s,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,L.RF)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i =s?n(!1):i+c {if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return a.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:s,"aria-label":(0,l.I)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,a.Z)("navbar","navbar--fixed-top",n&&[Qe.navbarHideable,!d&&Qe.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(Ke,{onClick:i.toggle}),(0,u.jsx)(We,{})]})}var Xe=n(8780);const Je={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function et(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(l.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function tt(e){let{error:t}=e;const n=(0,Xe.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:Je.errorBoundaryError,children:n})}class nt extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const rt="right";function at(e){let{width:t=30,height:n=30,className:r,...a}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...a,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function ot(){const{toggle:e,shown:t}=(0,A.e)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,l.I)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(at,{})})}const it={colorModeToggle:"colorModeToggle_DEke"};function st(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(nt,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(He,{...e})},t)))})}function lt(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function ct(){const e=(0,A.e)(),t=(0,w.L)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??rt)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),a=t.find((e=>"search"===e.type));return(0,u.jsx)(lt,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(ot,{}),(0,u.jsx)(W,{}),(0,u.jsx)(st,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(st,{items:r}),(0,u.jsx)(G,{className:it.colorModeToggle}),!a&&(0,u.jsx)(Fe,{children:(0,u.jsx)(De,{})})]})})}function ut(){return(0,u.jsx)(Ye,{children:(0,u.jsx)(ct,{})})}function dt(e){let{item:t}=e;const{to:n,href:r,label:a,prependBaseUrlToHref:o,...i}=t,s=(0,X.Z)(n),l=(0,X.Z)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(Y.Z,{className:"footer__link-item",...r?{href:o?l:r}:{to:s},...i,children:[a,r&&!(0,J.Z)(r)&&(0,u.jsx)(te.Z,{})]})}function pt(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(dt,{item:t})},t.href??t.to)}function ft(e){let{column:t}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(pt,{item:e},t)))})]})}function mt(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(ft,{column:e},t)))})}function gt(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function ht(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(dt,{item:t})}function bt(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(ht,{item:e}),t.length!==n+1&&(0,u.jsx)(gt,{})]},n)))})})}function vt(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(mt,{columns:t}):(0,u.jsx)(bt,{links:t})}var yt=n(9965);const wt={footerLogoLink:"footerLogoLink_BH7S"};function kt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.C)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(yt.Z,{className:(0,a.Z)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function xt(e){let{logo:t}=e;return t.href?(0,u.jsx)(Y.Z,{href:t.href,className:wt.footerLogoLink,target:t.target,children:(0,u.jsx)(kt,{logo:t})}):(0,u.jsx)(kt,{logo:t})}function St(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function Et(e){let{style:t,links:n,logo:r,copyright:o}=e;return(0,u.jsx)("footer",{className:(0,a.Z)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||o)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),o]})]})})}function _t(){const{footer:e}=(0,w.L)();if(!e)return null;const{copyright:t,links:n,logo:r,style:a}=e;return(0,u.jsx)(Et,{style:a,links:n&&n.length>0&&(0,u.jsx)(vt,{links:n}),logo:r&&(0,u.jsx)(xt,{logo:r}),copyright:t&&(0,u.jsx)(St,{copyright:t})})}const Ct=r.memo(_t),Tt=(0,R.Qc)([F.S,k.pl,L.OC,Ue.L5,i.VC,function(e){let{children:t}=e;return(0,u.jsx)(N.n2,{children:(0,u.jsx)(A.M,{children:(0,u.jsx)(O,{children:t})})})}]);function jt(e){let{children:t}=e;return(0,u.jsx)(Tt,{children:t})}var At=n(2503);function Lt(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(At.Z,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(et,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(tt,{error:t})})]})})})}const Rt={mainWrapper:"mainWrapper_z2l0"};function Nt(e){const{children:t,noFooter:n,wrapperClassName:r,title:s,description:l}=e;return(0,b.t)(),(0,u.jsxs)(jt,{children:[(0,u.jsx)(i.d,{title:s,description:l}),(0,u.jsx)(y,{}),(0,u.jsx)(j,{}),(0,u.jsx)(ut,{}),(0,u.jsx)("div",{id:d,className:(0,a.Z)(h.k.wrapper.main,Rt.mainWrapper,r),children:(0,u.jsx)(o.Z,{fallback:e=>(0,u.jsx)(Lt,{...e}),children:t})}),!n&&(0,u.jsx)(Ct,{})]})}},1327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});n(7294);var r=n(3692),a=n(4996),o=n(2263),i=n(6668),s=n(9965),l=n(5893);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,a.Z)(t.src),dark:(0,a.Z)(t.srcDark||t.src)},i=(0,l.jsx)(s.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,l.jsx)("div",{className:r,children:i}):i}function u(e){const{siteConfig:{title:t}}=(0,o.Z)(),{navbar:{title:n,logo:s}}=(0,i.L)(),{imageClassName:u,titleClassName:d,...p}=e,f=(0,a.Z)(s?.href||"/"),m=n?"":t,g=s?.alt??m;return(0,l.jsxs)(r.Z,{to:f,...p,...s?.target&&{target:s.target},children:[s&&(0,l.jsx)(c,{logo:s,alt:g,imageClassName:u}),null!=n&&(0,l.jsx)("b",{className:d,children:n})]})}},197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});n(7294);var r=n(5742),a=n(5893);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return(0,a.jsxs)(r.Z,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},9965:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7294),a=n(512),o=n(2389),i=n(2949);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=n(5893);function c(e){let{className:t,children:n}=e;const c=(0,o.Z)(),{colorMode:u}=(0,i.I)();return(0,l.jsx)(l.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const o=n({theme:e,className:(0,a.Z)(t,s.themedComponent,s[`themedComponent--${e}`])});return(0,l.jsx)(r.Fragment,{children:o},e)}))})}function u(e){const{sources:t,className:n,alt:r,...a}=e;return(0,l.jsx)(c,{className:n,children:e=>{let{theme:n,className:o}=e;return(0,l.jsx)("img",{src:t[n],alt:r,className:o,...a})}})}},6043:(e,t,n)=>{"use strict";n.d(t,{u:()=>c,z:()=>b});var r=n(7294),a=n(412),o=n(469),i=n(1442),s=n(5893);const l="ease-in-out";function c(e){let{initialState:t}=e;const[n,a]=(0,r.useState)(t??!1),o=(0,r.useCallback)((()=>{a((e=>!e))}),[]);return{collapsed:n,setCollapsed:a,toggleCollapsed:o}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:a}=e;const o=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=a?.duration??function(e){if((0,i.n)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${a?.easing??l}`,height:`${t}px`}}function s(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return p(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,a])}function m(e){if(!a.Z.canUseDOM)return e?u:d}function g(e){let{as:t="div",collapsed:n,children:a,animation:o,onCollapseTransitionEnd:i,className:l,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return f({collapsibleRef:u,collapsed:n,animation:o}),(0,s.jsx)(t,{ref:u,style:c?void 0:m(n),onTransitionEnd:e=>{"height"===e.propertyName&&(p(u.current,n),i?.(n))},className:l,children:a})}function h(e){let{collapsed:t,...n}=e;const[a,i]=(0,r.useState)(!t),[l,c]=(0,r.useState)(t);return(0,o.Z)((()=>{t||i(!0)}),[t]),(0,o.Z)((()=>{a&&c(t)}),[a,t]),a?(0,s.jsx)(g,{...n,collapsed:l}):null}function b(e){let{lazy:t,...n}=e;const r=t?h:g;return(0,s.jsx)(r,{...n})}},9689:(e,t,n)=>{"use strict";n.d(t,{nT:()=>g,pl:()=>m});var r=n(7294),a=n(2389),o=n(12),i=n(902),s=n(6668),l=n(5893);const c=(0,o.WA)("docusaurus.announcement.dismiss"),u=(0,o.WA)("docusaurus.announcement.id"),d=()=>"true"===c.get(),p=e=>c.set(String(e)),f=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.L)(),t=(0,a.Z)(),[n,o]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{o(d())}),[]);const i=(0,r.useCallback)((()=>{p(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&p(!1),!r&&d()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,l.jsx)(f.Provider,{value:n,children:t})}function g(){const e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:(e,t,n)=>{"use strict";n.d(t,{I:()=>b,S:()=>h});var r=n(7294),a=n(412),o=n(902),i=n(12),s=n(6668),l=n(5893);const c=r.createContext(void 0),u="theme",d=(0,i.WA)(u),p={light:"light",dark:"dark"},f=e=>e===p.dark?p.dark:p.light,m=e=>a.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),g=e=>{d.set(f(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.L)(),[a,o]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&g(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===p.dark},setLightTheme(){i(p.light)},setDarkTheme(){i(p.dark)}})),[a,i])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function b(){const e=(0,r.useContext)(c);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:(e,t,n)=>{"use strict";n.d(t,{J:()=>y,L5:()=>b,Oh:()=>w});var r=n(7294),a=n(143),o=n(9935),i=n(6668),s=n(2802),l=n(902),c=n(12),u=n(5893);const d=e=>`docs-preferred-version-${e}`,p={save:(e,t,n)=>{(0,c.WA)(d(e),{persistence:t}).set(n)},read:(e,t)=>(0,c.WA)(d(e),{persistence:t}).get(),clear:(e,t)=>{(0,c.WA)(d(e),{persistence:t}).del()}},f=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const m=r.createContext(null);function g(){const e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,s]=(0,r.useState)((()=>f(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=p.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(p.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){p.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=g();return(0,u.jsx)(m.Provider,{value:n,children:t})}function b(e){let{children:t}=e;return s.cE?(0,u.jsx)(h,{children:t}):(0,u.jsx)(u.Fragment,{children:t})}function v(){const e=(0,r.useContext)(m);if(!e)throw new l.i6("DocsPreferredVersionContextProvider");return e}function y(e){void 0===e&&(e=o.m);const t=(0,a.zh)(e),[n,i]=v(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function w(){const e=(0,a._r)(),[t]=v();function n(n){const r=e[n],{preferredVersionName:a}=t[n];return r.versions.find((e=>e.name===a))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},1116:(e,t,n)=>{"use strict";n.d(t,{V:()=>c,b:()=>l});var r=n(7294),a=n(902),o=n(5893);const i=Symbol("EmptyContext"),s=r.createContext(i);function l(e){let{children:t,name:n,items:a}=e;const i=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return(0,o.jsx)(s.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(s);if(e===i)throw new a.i6("DocsSidebarProvider");return e}},4477:(e,t,n)=>{"use strict";n.d(t,{E:()=>l,q:()=>s});var r=n(7294),a=n(902),o=n(5893);const i=r.createContext(null);function s(e){let{children:t,version:n}=e;return(0,o.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(null===e)throw new a.i6("DocsVersionProvider");return e}},3163:(e,t,n)=>{"use strict";n.d(t,{M:()=>p,e:()=>f});var r=n(7294),a=n(3102),o=n(7524),i=n(1980),s=n(6668),l=n(902),c=n(5893);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,a.HY)(),{items:t}=(0,s.L)().navbar;return 0===t.length&&!e.component}(),t=(0,o.i)(),n=!e&&"mobile"===t,[l,c]=(0,r.useState)(!1);(0,i.Rb)((()=>{if(l)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&c(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:l})),[e,n,u,l])}function p(e){let{children:t}=e;const n=d();return(0,c.jsx)(u.Provider,{value:n,children:t})}function f(){const e=r.useContext(u);if(void 0===e)throw new l.i6("NavbarMobileSidebarProvider");return e}},3102:(e,t,n)=>{"use strict";n.d(t,{HY:()=>l,Zo:()=>c,n2:()=>s});var r=n(7294),a=n(902),o=n(5893);const i=r.createContext(null);function s(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const o=(0,r.useContext)(i);if(!o)throw new a.i6("NavbarSecondaryMenuContentProvider");const[,s]=o,l=(0,a.Ql)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},9727:(e,t,n)=>{"use strict";n.d(t,{h:()=>a,t:()=>o});var r=n(7294);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},6177:(e,t,n)=>{"use strict";n.d(t,{K:()=>s,M:()=>l});var r=n(7294),a=n(2263),o=n(1980);const i="q";function s(){return(0,o.Nc)(i)}function l(){const{siteConfig:{baseUrl:e,themeConfig:t}}=(0,a.Z)(),{algolia:{searchPagePath:n}}=t;return(0,r.useCallback)((t=>`${e}${n}?${i}=${encodeURIComponent(t)}`),[e,n])}},7524:(e,t,n)=>{"use strict";n.d(t,{i:()=>s});var r=n(7294),a=n(412);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,s]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){s(function(e){if(!a.Z.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o.desktop:o.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},5281:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},1442:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:()=>r})},2802:(e,t,n)=>{"use strict";n.d(t,{LM:()=>f,_F:()=>h,cE:()=>p,SN:()=>E,lO:()=>k,vY:()=>S,oz:()=>x,s1:()=>w,f:()=>v});var r=n(7294),a=n(6550),o=n(8790),i=n(143),s=n(373),l=n(4477),c=n(1116);function u(e){return Array.from(new Set(e))}var d=n(8596);const p=!!i._r;function f(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=f(t);if(e)return e}}(e):void 0:e.href}const m=(e,t)=>void 0!==e&&(0,d.Mg)(e,t),g=(e,t)=>e.some((e=>h(e,t)));function h(e,t){return"link"===e.type?m(e.href,t):"category"===e.type&&(m(e.href,t)||g(e.items,t))}function b(e,t){switch(e.type){case"category":return h(e,t)||e.items.some((e=>b(e,t)));case"link":return!e.unlisted||h(e,t);default:return!0}}function v(e,t){return(0,r.useMemo)((()=>e.filter((e=>b(e,t)))),[e,t])}function y(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,d.Mg)(o.href,n)||e(o.items))||"link"===o.type&&(0,d.Mg)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function w(){const e=(0,c.V)(),{pathname:t}=(0,a.TH)(),n=(0,i.gA)()?.pluginData.breadcrumbs;return!1!==n&&e?y({sidebarItems:e.items,pathname:t}):null}function k(e){const{activeVersion:t}=(0,i.Iw)(e),{preferredVersion:n}=(0,s.J)(e),a=(0,i.yW)(e);return(0,r.useMemo)((()=>u([t,n,a].filter(Boolean))),[t,n,a])}function x(e,t){const n=k(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function S(e,t){const n=k(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${u(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function E(e){let{route:t}=e;const n=(0,a.TH)(),r=(0,l.E)(),i=t.routes,s=i.find((e=>(0,a.LX)(n.pathname,e)));if(!s)return null;const c=s.sidebar,u=c?r.docsSidebars[c]:void 0;return{docElement:(0,o.H)(i),sidebarName:c,sidebarItems:u}}},2128:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(2263);function a(e){const{siteConfig:t}=(0,r.Z)(),{title:n,titleDelimiter:a}=t;return e?.trim().length?`${e.trim()} ${a} ${n}`:n}},1980:(e,t,n)=>{"use strict";n.d(t,{Nc:()=>l,Rb:()=>i});var r=n(7294),a=n(6550),o=n(902);function i(e){!function(e){const t=(0,a.k6)(),n=(0,o.zX)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function s(e){return function(e){const t=(0,a.k6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}function l(e){const t=s(e)??"",n=function(){const e=(0,a.k6)();return(0,r.useCallback)(((t,n,r)=>{const a=new URLSearchParams(e.location.search);n?a.set(t,n):a.delete(t),(r?.push?e.push:e.replace)({search:a.toString()})}),[e])}();return[t,(0,r.useCallback)(((t,r)=>{n(e,t,r)}),[n,e])]}},833:(e,t,n)=>{"use strict";n.d(t,{FG:()=>f,d:()=>d,VC:()=>m});var r=n(7294),a=n(512),o=n(5742),i=n(226);function s(){const e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(4996),c=n(2128),u=n(5893);function d(e){let{title:t,description:n,keywords:r,image:a,children:i}=e;const s=(0,c.p)(t),{withBaseUrl:d}=(0,l.C)(),p=a?d(a,{absolute:!0}):void 0;return(0,u.jsxs)(o.Z,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),i]})}const p=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(p),s=(0,a.Z)(i,t);return(0,u.jsxs)(p.Provider,{value:s,children:[(0,u.jsx)(o.Z,{children:(0,u.jsx)("html",{className:s})}),n]})}function m(e){let{children:t}=e;const n=s(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const o=`plugin-id-${n.plugin.id}`;return(0,u.jsx)(f,{className:(0,a.Z)(r,o),children:t})}},902:(e,t,n)=>{"use strict";n.d(t,{D9:()=>s,Qc:()=>u,Ql:()=>c,i6:()=>l,zX:()=>i});var r=n(7294),a=n(469),o=n(5893);function i(e){const t=(0,r.useRef)(e);return(0,a.Z)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function s(e){const t=(0,r.useRef)();return(0,a.Z)((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(? \w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,o.jsx)(o.Fragment,{children:e.reduceRight(((e,t)=>(0,o.jsx)(t,{children:e})),n)})}}},8022:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{F:()=>r})},8596:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>s});var r=n(7294),a=n(723),o=n(2263);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,o.Z)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.Z,baseUrl:e})),[e])}},2466:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>c,RF:()=>p});var r=n(7294),a=n(412),o=n(2389),i=(n(469),n(902)),s=n(5893);const l=r.createContext(void 0);function c(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,s.jsx)(l.Provider,{value:n,children:t})}function u(){const e=(0,r.useContext)(l);if(null==e)throw new i.i6("ScrollControllerProvider");return e}const d=()=>a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function p(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=u(),a=(0,r.useRef)(d()),o=(0,i.zX)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=d();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function f(){const e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&a t&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},3320:(e,t,n)=>{"use strict";n.d(t,{HX:()=>i,_q:()=>l,os:()=>s});var r=n(143),a=n(2263),o=n(373);const i="default";function s(e,t){return`docs-${e}-${t}`}function l(){const{i18n:e}=(0,a.Z)(),t=(0,r._r)(),n=(0,r.WS)(),l=(0,o.Oh)();const c=[i,...Object.keys(t).map((function(e){const r=n?.activePlugin.pluginId===e?n.activeVersion:void 0,a=l[e],o=t[e].versions.find((e=>e.isLast));return s(e,(r??a??o).name)}))];return{locale:e.currentLocale,tags:c}}},12:(e,t,n)=>{"use strict";n.d(t,{WA:()=>l});n(7294);const r="localStorage";function a(e){let{key:t,oldValue:n,newValue:r,storage:a}=e;if(n===r)return;const o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}function o(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,i||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),i=!0),null}var t}let i=!1;const s={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function l(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=o(t?.persistence);return null===n?s:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),a({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),a({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}},4711:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});var r=n(2263),a=n(6550),o=n(8780);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:s}}=(0,r.Z)(),{pathname:l}=(0,a.TH)(),c=(0,o.applyTrailingSlash)(l,{trailingSlash:n,baseUrl:e}),u=s===i?e:e.replace(`/${s}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},5936:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(7294),a=n(6550),o=n(902);function i(e){const t=(0,a.TH)(),n=(0,o.D9)(t),i=(0,o.zX)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6668:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(2263);function a(){return(0,r.Z)().siteConfig.themeConfig}},6278:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(2263);function a(){const{siteConfig:{themeConfig:e}}=(0,r.Z)();return e}},239:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(7294),a=n(8022),o=n(4996),i=n(6278);function s(){const{withBaseUrl:e}=(0,o.C)(),{algolia:{externalUrlRegex:t,replaceSearchResultPathname:n}}=(0,i.L)();return(0,r.useCallback)((r=>{const o=new URL(r);if((0,a.F)(t,o.href))return r;const i=`${o.pathname+o.hash}`;return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(i,n))}),[e,t,n])}},8802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},4143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},8780:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(8802);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}});var o=n(4143);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return o.getErrorCausalChain}})},9318:(e,t,n)=>{"use strict";n.d(t,{lX:()=>w,q_:()=>C,ob:()=>f,PP:()=>j,Ep:()=>p});var r=n(7462);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(8776);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function f(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r t?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,g(),w.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t {"use strict";var r=n(9864),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),g=l(n),h=0;h {"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},5826:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2497:(e,t,n)=>{"use strict";n.r(t)},2295:(e,t,n)=>{"use strict";n.r(t)},4865:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:' '};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),c=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){l(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},4779:(e,t,n)=>{var r=n(5826);e.exports=f,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=p;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,s="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],p=n[1],f=n.index;if(s+=e.slice(i,f),i=f+d.length,p)s+=p[1];else{var m=e[i],g=n[2],h=n[3],b=n[4],v=n[5],y=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=g&&null!=m&&m!==g,x="+"===y||"*"===y,S="?"===y||"*"===y,E=n[2]||u,_=b||v;r.push({name:h||o++,prefix:g||"",delimiter:E,optional:S,repeat:x,partial:k,asterisk:!!w,pattern:_?c(_):w?".*":"[^"+l(E)+"]+?"})}}return i {e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes ( .comment
can become.namespace--comment
) or replace them with your defined ones (like.editor__comment
). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements thehighlightAll
andhighlightAllUnder
methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},2885:(e,t,n)=>{const r=n(9901),a=n(9642),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(6500).resolve(t)],delete Prism.languages[e],n(6500)(t),o.add(e)}))}i.silent=!1,e.exports=i},6854:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var l=0;l=o.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[a],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++a;var g=p.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(m+f.length),v=[];g&&v.push.apply(v,i([g])),v.push(h),b&&v.push.apply(v,i([b])),"string"==typeof c?s.splice.apply(s,[l,1].concat(v)):c.content=v}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(Prism)},6726:(e,t,n)=>{var r={"./":2885};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=6726},6500:(e,t,n)=>{var r={"./":2885};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=6500},9642:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var s={},l=e[r];if(l){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in s))for(var i in a(t,o),s[t]=!0,n[t])s[i]=!0}t(l.require,c),t(l.optional,c),t(l.modify,c)}n[r]=s,o.pop()}}return function(e){var t=n[e];return t||(a(e,r),t=n[e]),t}}function a(e){for(var t in e)return!0;return!1}return function(o,i,s){var l=function(e){var t={};for(var n in e){var r=e[n];for(var a in r)if("meta"!=a){var o=r[a];t[a]="string"==typeof o?{title:o}:o}}return t}(o),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var a in n={},e){var o=e[a];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+a+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+a+" because it is a component.");n[t]=a}))}return n[r]||r}}(l);i=i.map(c),s=(s||[]).map(c);var u=n(i),d=n(s);i.forEach((function e(n){var r=l[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var p,f=r(l),m=u;a(m);){for(var g in p={},m){var h=l[g];t(h&&h.modify,(function(e){e in d&&(p[e]=!0)}))}for(var b in d)if(!(b in u))for(var v in f(b))if(v in u){p[b]=!0;break}for(var y in m=p)u[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,a){var o=a?a.series:void 0,i=a?a.parallel:e,s={},l={};function c(e){if(e in s)return s[e];l[e]=!0;var a,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)a=r(e);else{var p=i(u.map((function(e){var t=c(e);return delete l[e],t})));o?a=o(p,(function(){return r(e)})):r(e)}return s[e]=a}for(var u in n)c(u);var d=[];for(var p in l)d.push(s[p]);return i(d)}(f,u,t,n)}};return w}}();e.exports=t},2703:(e,t,n)=>{"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:(e,t,n)=>{"use strict";var r=n(7294),a=n(3840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!d.call(m,e)||!d.call(f,e)&&(p.test(e)?m[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,v);h[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,v);h[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,v);h[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){h[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),h.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){h[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),T=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var D,M=Object.assign;function F(e){if(void 0===D)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var z=!1;function B(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var a=c.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,s=o.length-1;1<=i&&0<=s&&a[i]!==o[s];)s--;for(;1<=i&&0<=s;i--,s--)if(a[i]!==o[s]){if(1!==i||1!==s)do{if(i--,0>--s||a[i]!==o[s]){var l="\n"+a[i].replace(" at new "," at ");return e.displayName&&l.includes(" ")&&(l=l.replace(" ",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function U(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function $(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case x:return"Portal";case _:return"Profiler";case E:return"StrictMode";case A:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case j:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:$(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return $(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $(t);case 8:return t===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=Z(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function V(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Z(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function W(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return M({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function X(e,t){Y(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&W(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a "+t.valueOf().toString()+"",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function he(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(fe).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var be=M({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(be[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Se=null,Ee=null;function _e(e){if(e=ya(e)){if("function"!=typeof xe)throw Error(o(280));var t=e.stateNode;t&&(t=ka(t),xe(e.stateNode,e.type,t))}}function Ce(e){Se?Ee?Ee.push(e):Ee=[e]:Se=e}function Te(){if(Se){var e=Se,t=Ee;if(Ee=Se=null,_e(e),t)for(e=0;e >>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~a;0!==s?r=dt(s):0!==(o&=i)&&(r=dt(o))}else 0!==(i=n&~a)?r=dt(i):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&a)&&((a=r&-r)>=(o=t&-t)||16===a&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0 n;n++)t.push(e);return t}function bt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),a=1< =In),Fn=String.fromCharCode(32),zn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var $n=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Zn(e,t,n,r){Ce(r),0<(t=Gr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,Vn=null;function Wn(e){Fr(e,0)}function Qn(e){if(V(wa(e)))return e}function Kn(e,t){if("change"===e)return t}var Yn=!1;if(u){var Xn;if(u){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Xn=Jn}else Xn=!1;Yn=Xn&&(!document.documentMode||9 =t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=W();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=W((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=void 0===r.end?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=ur(n,o);var i=ur(n,r);a&&i&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n =document.documentMode,hr=null,br=null,vr=null,yr=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==hr||hr!==W(r)||("selectionStart"in(r=hr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&lr(vr,r)||(vr=r,0<(r=Gr(br,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hr)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:kr("Animation","AnimationEnd"),animationiteration:kr("Animation","AnimationIteration"),animationstart:kr("Animation","AnimationStart"),transitionend:kr("Transition","TransitionEnd")},Sr={},Er={};function _r(e){if(Sr[e])return Sr[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Er)return Sr[e]=n[t];return e}u&&(Er=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Cr=_r("animationend"),Tr=_r("animationiteration"),jr=_r("animationstart"),Ar=_r("transitionend"),Lr=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(e,t){Lr.set(e,t),l(t,[e])}for(var Pr=0;Pr Sa||(e.current=xa[Sa],xa[Sa]=null,Sa--)}function Ca(e,t){Sa++,xa[Sa]=e.current,e.current=t}var Ta={},ja=Ea(Ta),Aa=Ea(!1),La=Ta;function Ra(e,t){var n=e.type.contextTypes;if(!n)return Ta;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Na(e){return null!=(e=e.childContextTypes)}function Pa(){_a(Aa),_a(ja)}function Oa(e,t,n){if(ja.current!==Ta)throw Error(o(168));Ca(ja,t),Ca(Aa,n)}function Ia(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in t))throw Error(o(108,q(e)||"Unknown",a));return M({},n,r)}function Da(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ta,La=ja.current,Ca(ja,e),Ca(Aa,Aa.current),!0}function Ma(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ia(e,t,La),r.__reactInternalMemoizedMergedChildContext=e,_a(Aa),_a(ja),Ca(ja,e)):_a(Aa),Ca(Aa,n)}var Fa=null,za=!1,Ba=!1;function Ua(e){null===Fa?Fa=[e]:Fa.push(e)}function $a(){if(!Ba&&null!==Fa){Ba=!0;var e=0,t=yt;try{var n=Fa;for(yt=1;e >=i,a-=i,Ka=1<<32-it(t)+a|n<g?(h=d,d=null):h=d.sibling;var b=f(a,d,s[g],l);if(null===b){null===d&&(d=h);break}e&&d&&null===b.alternate&&t(a,d),o=i(b,o,g),null===u?c=b:u.sibling=b,u=b,d=h}if(g===s.length)return n(a,d),ao&&Xa(a,g),c;if(null===d){for(;g h?(b=g,g=null):b=g.sibling;var y=f(a,g,v.value,c);if(null===y){null===g&&(g=b);break}e&&g&&null===y.alternate&&t(a,g),s=i(y,s,h),null===d?u=y:d.sibling=y,d=y,g=b}if(v.done)return n(a,g),ao&&Xa(a,h),u;if(null===g){for(;!v.done;h++,v=l.next())null!==(v=p(a,v.value,c))&&(s=i(v,s,h),null===d?u=v:d.sibling=v,d=v);return ao&&Xa(a,h),u}for(g=r(a,g);!v.done;h++,v=l.next())null!==(v=m(g,a,h,v.value,c))&&(e&&null!==v.alternate&&g.delete(null===v.key?h:v.key),s=i(v,s,h),null===d?u=v:d.sibling=v,d=v);return e&&g.forEach((function(e){return t(a,e)})),ao&&Xa(a,h),u}return function e(r,o,i,l){if("object"==typeof i&&null!==i&&i.type===S&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case k:e:{for(var c=i.key,u=o;null!==u;){if(u.key===c){if((c=i.type)===S){if(7===u.tag){n(r,u.sibling),(o=a(u,i.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===N&&Qo(c)===u.type){n(r,u.sibling),(o=a(u,i.props)).ref=Vo(r,u,i),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}i.type===S?((o=Dc(i.props.children,r.mode,l,i.key)).return=r,r=o):((l=Ic(i.type,i.key,i.props,null,r.mode,l)).ref=Vo(r,o,i),l.return=r,r=l)}return s(r);case x:e:{for(u=i.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===i.containerInfo&&o.stateNode.implementation===i.implementation){n(r,o.sibling),(o=a(o,i.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=zc(i,r.mode,l)).return=r,r=o}return s(r);case N:return e(r,o,(u=i._init)(i._payload),l)}if(te(i))return g(r,o,i,l);if(I(i))return h(r,o,i,l);Wo(r,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==o&&6===o.tag?(n(r,o.sibling),(o=a(o,i)).return=r,r=o):(n(r,o),(o=Fc(i,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var Yo=Ko(!0),Xo=Ko(!1),Jo={},ei=Ea(Jo),ti=Ea(Jo),ni=Ea(Jo);function ri(e){if(e===Jo)throw Error(o(174));return e}function ai(e,t){switch(Ca(ni,t),Ca(ti,e),Ca(ei,Jo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}_a(ei),Ca(ei,t)}function oi(){_a(ei),_a(ti),_a(ni)}function ii(e){ri(ni.current);var t=ri(ei.current),n=le(t,e.type);t!==n&&(Ca(ti,e),Ca(ei,n))}function si(e){ti.current===e&&(_a(ei),_a(ti))}var li=Ea(0);function ci(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ui=[];function di(){for(var e=0;e n?n:4,e(!0);var r=fi.transition;fi.transition={};try{e(!1),t()}finally{yt=n,fi.transition=r}}function es(){return Ti().memoizedState}function ts(e,t,n){var r=nc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e))as(t,n);else if(null!==(n=Ao(e,t,n,r))){rc(n,e,r,tc()),os(n,t,r)}}function ns(e,t,n){var r=nc(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))as(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=o(i,n);if(a.hasEagerState=!0,a.eagerState=s,sr(s,i)){var l=t.interleaved;return null===l?(a.next=a,jo(t)):(a.next=l.next,l.next=a),void(t.interleaved=a)}}catch(c){}null!==(n=Ao(e,t,a,r))&&(rc(n,e,r,a=tc()),os(n,t,r))}}function rs(e){var t=e.alternate;return e===gi||null!==t&&t===gi}function as(e,t){yi=vi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function os(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var is={readContext:Co,useCallback:xi,useContext:xi,useEffect:xi,useImperativeHandle:xi,useInsertionEffect:xi,useLayoutEffect:xi,useMemo:xi,useReducer:xi,useRef:xi,useState:xi,useDebugValue:xi,useDeferredValue:xi,useTransition:xi,useMutableSource:xi,useSyncExternalStore:xi,useId:xi,unstable_isNewReconciler:!1},ss={readContext:Co,useCallback:function(e,t){return Ci().memoizedState=[e,void 0===t?null:t],e},useContext:Co,useEffect:qi,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ui(4194308,4,Vi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ui(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ui(4,2,e,t)},useMemo:function(e,t){var n=Ci();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ci();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,gi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ci().memoizedState=e},useState:Fi,useDebugValue:Qi,useDeferredValue:function(e){return Ci().memoizedState=e},useTransition:function(){var e=Fi(!1),t=e[0];return e=Ji.bind(null,e[1]),Ci().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=gi,a=Ci();if(ao){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Ll)throw Error(o(349));0!=(30&mi)||Pi(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,qi(Ii.bind(null,r,i,e),[e]),r.flags|=2048,zi(9,Oi.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ci(),t=Ll.identifierPrefix;if(ao){var n=Ya;t=":"+t+"R"+(n=(Ka&~(1<<32-it(Ka)-1)).toString(32)+n),0<(n=wi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ki++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ls={readContext:Co,useCallback:Ki,useContext:Co,useEffect:Hi,useImperativeHandle:Wi,useInsertionEffect:Zi,useLayoutEffect:Gi,useMemo:Yi,useReducer:Ai,useRef:Bi,useState:function(){return Ai(ji)},useDebugValue:Qi,useDeferredValue:function(e){return Xi(Ti(),hi.memoizedState,e)},useTransition:function(){return[Ai(ji)[0],Ti().memoizedState]},useMutableSource:Ri,useSyncExternalStore:Ni,useId:es,unstable_isNewReconciler:!1},cs={readContext:Co,useCallback:Ki,useContext:Co,useEffect:Hi,useImperativeHandle:Wi,useInsertionEffect:Zi,useLayoutEffect:Gi,useMemo:Yi,useReducer:Li,useRef:Bi,useState:function(){return Li(ji)},useDebugValue:Qi,useDeferredValue:function(e){var t=Ti();return null===hi?t.memoizedState=e:Xi(t,hi.memoizedState,e)},useTransition:function(){return[Li(ji)[0],Ti().memoizedState]},useMutableSource:Ri,useSyncExternalStore:Ni,useId:es,unstable_isNewReconciler:!1};function us(e,t){try{var n="",r=t;do{n+=U(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ps(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var fs="function"==typeof WeakMap?WeakMap:Map;function ms(e,t,n){(n=Oo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zl||(Zl=!0,Gl=r),ps(0,t)},n}function gs(e,t,n){(n=Oo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){ps(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ps(0,t),"function"!=typeof r&&(null===Vl?Vl=new Set([this]):Vl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function hs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fs;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=Cc.bind(null,e,t,n),t.then(e,e))}function bs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,a){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Oo(-1,1)).tag=2,Io(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var ys=w.ReactCurrentOwner,ws=!1;function ks(e,t,n,r){t.child=null===e?Xo(t,null,n,r):Yo(t,e.child,n,r)}function xs(e,t,n,r,a){n=n.render;var o=t.ref;return _o(t,a),r=Ei(e,t,n,r,o,a),n=_i(),null===e||ws?(ao&&n&&eo(t),t.flags|=1,ks(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Zs(e,t,a))}function Ss(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||Pc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ic(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Es(e,t,o,r,a))}if(o=e.child,0==(e.lanes&a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(i,r)&&e.ref===t.ref)return Zs(e,t,a)}return t.flags|=1,(e=Oc(o,r)).ref=t.ref,e.return=t,t.child=e}function Es(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(ws=!1,t.pendingProps=r=o,0==(e.lanes&a))return t.lanes=e.lanes,Zs(e,t,a);0!=(131072&e.flags)&&(ws=!0)}}return Ts(e,t,n,r,a)}function _s(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ca(Ol,Pl),Pl|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ca(Ol,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ca(Ol,Pl),Pl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ca(Ol,Pl),Pl|=r;return ks(e,t,a,n),t.child}function Cs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ts(e,t,n,r,a){var o=Na(n)?La:ja.current;return o=Ra(t,o),_o(t,a),n=Ei(e,t,n,r,o,a),r=_i(),null===e||ws?(ao&&r&&eo(t),t.flags|=1,ks(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Zs(e,t,a))}function js(e,t,n,r,a){if(Na(n)){var o=!0;Da(t)}else o=!1;if(_o(t,a),null===t.stateNode)Hs(e,t),Ho(t,n,r),Go(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=Co(c):c=Ra(t,c=Na(n)?La:ja.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==c)&&Zo(t,i,r,c),Ro=!1;var p=t.memoizedState;i.state=p,Fo(t,r,i,a),l=t.memoizedState,s!==r||p!==l||Aa.current||Ro?("function"==typeof u&&(Uo(t,n,u,r),l=t.memoizedState),(s=Ro||qo(t,n,s,r,p,l,c))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Po(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:bo(t.type,s),i.props=c,d=t.pendingProps,p=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=Co(l):l=Ra(t,l=Na(n)?La:ja.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||p!==l)&&Zo(t,i,r,l),Ro=!1,p=t.memoizedState,i.state=p,Fo(t,r,i,a);var m=t.memoizedState;s!==d||p!==m||Aa.current||Ro?("function"==typeof f&&(Uo(t,n,f,r),m=t.memoizedState),(c=Ro||qo(t,n,c,r,p,m,l)||!1)?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,m,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,m,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=l,r=c):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return As(e,t,n,r,o,a)}function As(e,t,n,r,a,o){Cs(e,t);var i=0!=(128&t.flags);if(!r&&!i)return a&&Ma(t,n,!1),Zs(e,t,o);r=t.stateNode,ys.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=Yo(t,e.child,null,o),t.child=Yo(t,null,s,o)):ks(e,t,s,o),t.memoizedState=r.state,a&&Ma(t,n,!0),t.child}function Ls(e){var t=e.stateNode;t.pendingContext?Oa(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Oa(0,t.context,!1),ai(e,t.containerInfo)}function Rs(e,t,n,r,a){return mo(),go(a),t.flags|=256,ks(e,t,n,r),t.child}var Ns,Ps,Os,Is,Ds={dehydrated:null,treeContext:null,retryLane:0};function Ms(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fs(e,t,n){var r,a=t.pendingProps,i=li.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Ca(li,1&i),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=a.children,e=a.fallback,s?(a=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&a)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Mc(l,a,0,null),e=Dc(e,a,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ms(n),t.memoizedState=Ds,e):zs(t,l));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,a,i,s){if(n)return 256&t.flags?(t.flags&=-257,Bs(e,t,s,r=ds(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=Mc({mode:"visible",children:r.children},a,0,null),(i=Dc(i,a,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!=(1&t.mode)&&Yo(t,e.child,null,s),t.child.memoizedState=Ms(s),t.memoizedState=Ds,i);if(0==(1&t.mode))return Bs(e,t,s,null);if("$!"===a.data){if(r=a.nextSibling&&a.nextSibling.dataset)var l=r.dgst;return r=l,Bs(e,t,s,r=ds(i=Error(o(419)),r,void 0))}if(l=0!=(s&e.childLanes),ws||l){if(null!==(r=Ll)){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(a=0!=(a&(r.suspendedLanes|s))?0:a)&&a!==i.retryLane&&(i.retryLane=a,Lo(e,a),rc(r,e,a,-1))}return hc(),Bs(e,t,s,r=ds(Error(o(421))))}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=jc.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,ro=ca(a.nextSibling),no=t,ao=!0,oo=null,null!==e&&(Va[Wa++]=Ka,Va[Wa++]=Ya,Va[Wa++]=Qa,Ka=e.id,Ya=e.overflow,Qa=t),t=zs(t,r.children),t.flags|=4096,t)}(e,t,l,a,r,i,n);if(s){s=a.fallback,l=t.mode,r=(i=e.child).sibling;var c={mode:"hidden",children:a.children};return 0==(1&l)&&t.child!==i?((a=t.child).childLanes=0,a.pendingProps=c,t.deletions=null):(a=Oc(i,c)).subtreeFlags=14680064&i.subtreeFlags,null!==r?s=Oc(r,s):(s=Dc(s,l,n,null)).flags|=2,s.return=t,a.return=t,a.sibling=s,t.child=a,a=s,s=t.child,l=null===(l=e.child.memoizedState)?Ms(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ds,a}return e=(s=e.child).sibling,a=Oc(s,{mode:"visible",children:a.children}),0==(1&t.mode)&&(a.lanes=n),a.return=t,a.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function zs(e,t){return(t=Mc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bs(e,t,n,r){return null!==r&&go(r),Yo(t,e.child,null,n),(e=zs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Us(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Eo(e.return,t,n)}function $s(e,t,n,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function qs(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(ks(e,t,r.children,n),0!=(2&(r=li.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Us(e,n,t);else if(19===e.tag)Us(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ca(li,r),0==(1&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===ci(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),$s(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===ci(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}$s(t,!0,n,null,o);break;case"together":$s(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Zs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ml|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Oc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Oc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Gs(e,t){if(!ao)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Vs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ws(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vs(t),null;case 1:case 17:return Na(t.type)&&Pa(),Vs(t),null;case 3:return r=t.stateNode,oi(),_a(Aa),_a(ja),di(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(po(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==oo&&(sc(oo),oo=null))),Ps(e,t),Vs(t),null;case 5:si(t);var a=ri(ni.current);if(n=t.type,null!==e&&null!=t.stateNode)Os(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Vs(t),null}if(e=ri(ei.current),po(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[pa]=t,r[fa]=i,e=0!=(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(a=0;a <\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[pa]=t,e[fa]=r,Ns(e,t,!1,!1),t.stateNode=e;e:{switch(l=ye(n,r),n){case"dialog":zr("cancel",e),zr("close",e),a=r;break;case"iframe":case"object":case"embed":zr("load",e),a=r;break;case"video":case"audio":for(a=0;a ql&&(t.flags|=128,r=!0,Gs(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ci(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Gs(i,!0),null===i.tail&&"hidden"===i.tailMode&&!l.alternate&&!ao)return Vs(t),null}else 2*Ye()-i.renderingStartTime>ql&&1073741824!==n&&(t.flags|=128,r=!0,Gs(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=i.last)?n.sibling=l:t.child=l,i.last=l)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ye(),t.sibling=null,n=li.current,Ca(li,r?1&n|2:1&n),t):(Vs(t),null);case 22:case 23:return pc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Pl)&&(Vs(t),6&t.subtreeFlags&&(t.flags|=8192)):Vs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Qs(e,t){switch(to(t),t.tag){case 1:return Na(t.type)&&Pa(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return oi(),_a(Aa),_a(ja),di(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return si(t),null;case 13:if(_a(li),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));mo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return _a(li),null;case 4:return oi(),null;case 10:return So(t.type._context),null;case 22:case 23:return pc(),null;default:return null}}Ns=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ps=function(){},Os=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,ri(ei.current);var o,i=null;switch(n){case"input":a=Q(e,a),r=Q(e,r),i=[];break;case"select":a=M({},a,{value:void 0}),r=M({},r,{value:void 0}),i=[];break;case"textarea":a=re(e,a),r=re(e,r),i=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(u in ve(n,r),n=null,a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&null!=a[u])if("style"===u){var l=a[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=a?a[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(i=i||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(i=i||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&zr("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},Is=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ks=!1,Ys=!1,Xs="function"==typeof WeakSet?WeakSet:Set,Js=null;function el(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){_c(e,t,r)}else n.current=null}function tl(e,t,n){try{n()}catch(r){_c(e,t,r)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,void 0!==o&&tl(t,n,o)}a=a.next}while(a!==r)}}function al(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[pa],delete t[fa],delete t[ga],delete t[ha],delete t[ba])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var dl=null,pl=!1;function fl(e,t,n){for(n=n.child;null!==n;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(at,n)}catch(s){}switch(n.tag){case 5:Ys||el(n,t);case 6:var r=dl,a=pl;dl=null,fl(e,t,n),pl=a,null!==(dl=r)&&(pl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(pl?(e=dl,n=n.stateNode,8===e.nodeType?la(e.parentNode,n):1===e.nodeType&&la(e,n),$t(e)):la(dl,n.stateNode));break;case 4:r=dl,a=pl,dl=n.stateNode.containerInfo,pl=!0,fl(e,t,n),dl=r,pl=a;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,void 0!==i&&(0!=(2&o)||0!=(4&o))&&tl(n,t,i),a=a.next}while(a!==r)}fl(e,t,n);break;case 1:if(!Ys&&(el(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){_c(n,t,s)}fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,fl(e,t,n),Ys=r):fl(e,t,n);break;default:fl(e,t,n)}}function gl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xs),t.forEach((function(t){var r=Ac.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function hl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r a&&(a=s),r&=~i}if(r=a,10<(r=(120>(r=Ye()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_l(r/1960))-r)){e.timeoutHandle=ra(xc.bind(null,e,Ul,Hl),r);break}xc(e,Ul,Hl);break;default:throw Error(o(329))}}}return ac(e,Ye()),e.callbackNode===n?oc.bind(null,e):null}function ic(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(fc(e,t).flags|=256),2!==(e=bc(e,t))&&(t=Ul,Ul=n,null!==t&&sc(t)),e}function sc(e){null===Ul?Ul=e:Ul.push.apply(Ul,e)}function lc(e,t){for(t&=~zl,t&=~Fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 e?16:e,null===Ql)var r=!1;else{if(e=Ql,Ql=null,Kl=0,0!=(6&Al))throw Error(o(331));var a=Al;for(Al|=4,Js=e.current;null!==Js;){var i=Js,s=i.child;if(0!=(16&Js.flags)){var l=i.deletions;if(null!==l){for(var c=0;c Ye()-$l?fc(e,0):zl|=n),ac(e,t)}function Tc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=tc();null!==(e=Lo(e,t))&&(bt(e,t,n),ac(e,n))}function jc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Tc(e,n)}function Ac(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Tc(e,n)}function Lc(e,t){return Ve(e,t)}function Rc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nc(e,t,n,r){return new Rc(e,t,n,r)}function Pc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Oc(e,t){var n=e.alternate;return null===n?((n=Nc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ic(e,t,n,r,a,i){var s=2;if(r=e,"function"==typeof e)Pc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case S:return Dc(n.children,a,i,t);case E:s=8,a|=8;break;case _:return(e=Nc(12,n,t,2|a)).elementType=_,e.lanes=i,e;case A:return(e=Nc(13,n,t,a)).elementType=A,e.lanes=i,e;case L:return(e=Nc(19,n,t,a)).elementType=L,e.lanes=i,e;case P:return Mc(n,a,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case T:s=9;break e;case j:s=11;break e;case R:s=14;break e;case N:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Nc(s,n,t,a)).elementType=e,t.type=r,t.lanes=i,t}function Dc(e,t,n,r){return(e=Nc(7,e,r,t)).lanes=n,e}function Mc(e,t,n,r){return(e=Nc(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Fc(e,t,n){return(e=Nc(6,e,null,t)).lanes=n,e}function zc(e,t,n){return(t=Nc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ht(0),this.expirationTimes=ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Uc(e,t,n,r,a,o,i,s,l){return e=new Bc(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Nc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},No(o),e}function $c(e){if(!e)return Ta;e:{if($e(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Na(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Na(n))return Ia(e,n,t)}return t}function qc(e,t,n,r,a,o,i,s,l){return(e=Uc(n,r,!0,e,0,o,0,s,l)).context=$c(null),n=e.current,(o=Oo(r=tc(),a=nc(n))).callback=null!=t?t:null,Io(n,o,a),e.current.lanes=a,bt(e,a,r),ac(e,r),e}function Hc(e,t,n,r){var a=t.current,o=tc(),i=nc(a);return n=$c(n),null===t.context?t.context=n:t.pendingContext=n,(t=Oo(o,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Io(a,t,i))&&(rc(e,a,i,o),Do(e,a,i)),i}function Zc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Gc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n {"use strict";var r=n(3935);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},3935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4448)},9590:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var s,l,c,u;if(Array.isArray(e)){if((s=e.length)!=i.length)return!1;for(l=s;0!=l--;)if(!o(e[l],i[l]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!i.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!o(l.value[1],i.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!i.has(l.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((s=e.length)!=i.length)return!1;for(l=s;0!=l--;)if(e[l]!==i[l])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof i.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof i.toString)return e.toString()===i.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(i,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!o(e[c[l]],i[c[l]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},405:(e,t,n)=>{"use strict";n.d(t,{B6:()=>Z,ql:()=>J});var r=n(7294),a=n(5697),o=n.n(a),i=n(9590),s=n.n(i),l=n(1143),c=n.n(l),u=n(6774),d=n.n(u);function p(){return p=Object.assign||function(e){for(var t=1;t =0||(a[n]=e[n]);return a}var h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},b={rel:["amphtml","canonical","alternate"]},v={type:["application/ld+json"]},y={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(h).map((function(e){return h[e]})),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(k).reduce((function(e,t){return e[k[t]]=t,e}),{}),S=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},E=function(e){var t=S(e,h.TITLE),n=S(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(function(){return t}));var r=S(e,"defaultTitle");return t||r||void 0},_=function(e){return S(e,"onChangeClientState")||function(){}},C=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return p({},e,t)}),{})},T=function(e,t){return t.filter((function(e){return void 0!==e[h.BASE]})).map((function(e){return e[h.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a /g,">").replace(/"/g,""").replace(/'/g,"'")},I=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},D=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,n){return t[k[n]||n]=e[n],t}),t)},M=function(e,t){return t.map((function(t,n){var a,o=((a={key:n})["data-rh"]=!0,a);return Object.keys(t).forEach((function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]})),r.createElement(e,o)}))},F=function(e,t,n){switch(e){case h.TITLE:return{toComponent:function(){return n=t.titleAttributes,(a={key:e=t.title})["data-rh"]=!0,o=D(n,a),[r.createElement(h.TITLE,o,e)];var e,n,a,o},toString:function(){return function(e,t,n,r){var a=I(n),o=L(t);return a?"<"+e+' data-rh="true" '+a+">"+O(o,r)+""+e+">":"<"+e+' data-rh="true">'+O(o,r)+""+e+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return D(t)},toString:function(){return I(t)}};default:return{toComponent:function(){return M(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+O(r[t],n)+'"';return e?e+" "+a:a}),""),o=r.innerHTML||r.cssText||"",i=-1===P.indexOf(e);return t+"<"+e+' data-rh="true" '+a+(i?"/>":">"+o+""+e+">")}),"")}(e,t,n)}}}},z=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.noscriptTags,i=e.styleTags,s=e.title,l=void 0===s?"":s,c=e.titleAttributes,u=e.linkTags,d=e.metaTags,p=e.scriptTags,f={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,a=R(e.metaTags,y),o=R(t,b),i=R(n,v);return{priorityMethods:{toComponent:function(){return[].concat(M(h.META,a.priority),M(h.LINK,o.priority),M(h.SCRIPT,i.priority))},toString:function(){return F(h.META,a.priority,r)+" "+F(h.LINK,o.priority,r)+" "+F(h.SCRIPT,i.priority,r)}},metaTags:a.default,linkTags:o.default,scriptTags:i.default}}(e);f=m.priorityMethods,u=m.linkTags,d=m.metaTags,p=m.scriptTags}return{priority:f,base:F(h.BASE,t,r),bodyAttributes:F("bodyAttributes",n,r),htmlAttributes:F("htmlAttributes",a,r),link:F(h.LINK,u,r),meta:F(h.META,d,r),noscript:F(h.NOSCRIPT,o,r),script:F(h.SCRIPT,p,r),style:F(h.STYLE,i,r),title:F(h.TITLE,{title:l,titleAttributes:c},r)}},B=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?B:n.instances},add:function(e){(n.canUseDOM?B:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?B:n.instances).indexOf(e);(n.canUseDOM?B:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=z({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),q=o().shape({setHelmet:o().func,helmetInstances:o().shape({get:o().func,add:o().func,remove:o().func})}),H="undefined"!=typeof document,Z=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return f(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);Z.canUseDOM=H,Z.propTypes={context:o().shape({helmet:o().shape()}),children:o().node.isRequired},Z.defaultProps={context:{}},Z.displayName="HelmetProvider";var G=function(e,t){var n,r=document.head||document.querySelector(h.HEAD),a=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(a),i=[];return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?r.innerHTML=t.innerHTML:"cssText"===a?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(a,void 0===t[a]?"":t[a]));r.setAttribute("data-rh","true"),o.some((function(e,t){return n=t,r.isEqualNode(e)}))?o.splice(n,1):i.push(r)})),o.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return r.appendChild(e)})),{oldTags:o,newTags:i}},V=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),s=0;s =0;d-=1)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},W=function(e,t){var n=e.baseTag,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,i=e.noscriptTags,s=e.onChangeClientState,l=e.scriptTags,c=e.styleTags,u=e.title,d=e.titleAttributes;V(h.BODY,e.bodyAttributes),V(h.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=L(e)),V(h.TITLE,t)}(u,d);var p={baseTag:G(h.BASE,n),linkTags:G(h.LINK,a),metaTags:G(h.META,o),noscriptTags:G(h.NOSCRIPT,i),scriptTags:G(h.SCRIPT,l),styleTags:G(h.STYLE,c)},f={},m={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(f[e]=n),r.length&&(m[e]=p[e].oldTags)})),t&&t(),s(e,f,m)},Q=null,K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return p({},r,((t={})[n.type]=[].concat(r[n.type]||[],[p({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case h.TITLE:return p({},a,((t={})[r.type]=i,t.titleAttributes=p({},o),t));case h.BODY:return p({},a,{bodyAttributes:p({},o)});case h.HTML:return p({},a,{htmlAttributes:p({},o)});default:return p({},a,((n={})[r.type]=p({},o),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=p({},t);return Object.keys(e).forEach((function(t){var r;n=p({},n,((r={})[t]=e[t],r))})),n},n.warnOnInvalidChildren=function(e,t){return c()(w.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),c()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}"+e.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,a={};return r.Children.forEach(e,(function(e){if(e&&e.props){var r=e.props,o=r.children,i=g(r,Y),s=Object.keys(i).reduce((function(e,t){return e[x[t]||t]=i[t],e}),{}),l=e.type;switch("symbol"==typeof l?l=l.toString():n.warnOnInvalidChildren(e,o),l){case h.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:a=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:a,newChildProps:s,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}})),this.mapArrayTypeChildrenToProps(a,t)},n.render=function(){var e=this.props,t=e.children,n=g(e,X),a=p({},n),o=n.helmetData;return t&&(a=this.mapChildrenToProps(t,a)),!o||o instanceof U||(o=new U(o.context,o.instances)),o?r.createElement(K,p({},a,{context:o.value,helmetData:void 0})):r.createElement($.Consumer,null,(function(e){return r.createElement(K,p({},a,{context:e}))}))},t}(r.Component);J.propTypes={base:o().object,bodyAttributes:o().object,children:o().oneOfType([o().arrayOf(o().node),o().node]),defaultTitle:o().string,defer:o().bool,encodeSpecialCharacters:o().bool,htmlAttributes:o().object,link:o().arrayOf(o().object),meta:o().arrayOf(o().object),noscript:o().arrayOf(o().object),onChangeClientState:o().func,script:o().arrayOf(o().object),style:o().arrayOf(o().object),title:o().string,titleAttributes:o().object,titleTemplate:o().string,prioritizeSeoTags:o().bool,helmetData:o().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},9921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case h:case g:case l:return e;default:return t}}case a:return t}}}function x(e){return k(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=h,t.Memo=g,t.Portal=a,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||k(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===h},t.isMemo=function(e){return k(e)===g},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=k},9864:(e,t,n)=>{"use strict";e.exports=n(9921)},8356:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t {"use strict";n.d(t,{H:()=>s,f:()=>i});var r=n(6550),a=n(7462),o=n(7294);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?(0,r.LX)(t,e):n.length?n[n.length-1].match:r.F0.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a})),n}function s(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.rs,n,e.map((function(e,n){return o.createElement(r.AW,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.Z)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.Z)({},n,t,{route:e}))}})}))):null}},3727:(e,t,n)=>{"use strict";n.d(t,{OL:()=>y,VK:()=>u,rU:()=>h});var r=n(6550),a=n(5068),o=n(7294),i=n(9318),s=n(7462),l=n(3366),c=n(8776),u=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a {"use strict";n.d(t,{AW:()=>E,F0:()=>y,LX:()=>S,TH:()=>P,k6:()=>N,rs:()=>L,s6:()=>v});var r=n(5068),a=n(7294),o=n(5697),i=n.n(o),s=n(9318),l=n(8776),c=n(7462),u=n(4779),d=n.n(u),p=(n(9864),n(3366)),f=(n(8679),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var g=a.createContext||function(e,t){var n,o,s="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",l=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i{"use strict";var r=n(7294),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:c,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},2408:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,h={};function b(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}function v(){}function y(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=b.prototype;var w=y.prototype=new v;w.constructor=y,g(w,b.prototype),w.isPureReactComponent=!0;var k=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var a,o={},i=null,s=null;if(null!=t)for(a in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)x.call(t,a)&&!E.hasOwnProperty(a)&&(o[a]=t[a]);var l=arguments.length-2;if(1===l)o.children=r;else if(1 {"use strict";e.exports=n(2408)},5893:(e,t,n)=>{"use strict";e.exports=n(5251)},53:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0 >>1,a=e[r];if(!(0 >>1;ro(l,n))co(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(co(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,p=null,f=3,m=!1,g=!1,h=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)a(u);else{if(!(t.startTime<=e))break;a(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function k(e){if(h=!1,w(e),!g)if(null!==r(c))g=!0,P(x);else{var t=r(u);null!==t&&O(k,t.startTime-e)}}function x(e,n){g=!1,h&&(h=!1,v(C),C=-1),m=!0;var o=f;try{for(w(n),p=r(c);null!==p&&(!(p.expirationTime>n)||e&&!A());){var i=p.callback;if("function"==typeof i){p.callback=null,f=p.priorityLevel;var s=i(p.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?p.callback=s:p===r(c)&&a(c),w(n)}else a(c);p=r(c)}if(null!==p)var l=!0;else{var d=r(u);null!==d&&O(k,d.startTime-n),l=!1}return l}finally{p=null,f=o,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,E=!1,_=null,C=-1,T=5,j=-1;function A(){return!(t.unstable_now()-j e||125 i?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(h?(v(C),C=-1):h=!0,O(k,o-i))):(e.sortIndex=s,n(c,e),g||m||(g=!0,P(x))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},3840:(e,t,n)=>{"use strict";e.exports=n(53)},6774:e=>{e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l {"use strict";n.r(t),n.d(t,{default:()=>r});const r={title:"React Native Template Strong",tagline:"Quick, opinionated, documented and strong beginning for your next project",favicon:"img/favicon.ico",url:"https://svbutko.github.io",baseUrl:"/react-native-template-strong/",organizationName:"svbutko",projectName:"react-native-template-strong",onBrokenLinks:"throw",onBrokenMarkdownLinks:"warn",i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},presets:[["classic",{docs:{showLastUpdateTime:!0,sidebarPath:"./sidebars.ts",editUrl:"https://github.com/svbutko/react-native-template-strong/master/website/"},theme:{customCss:"./src/css/custom.css"}}]],themeConfig:{algolia:{appId:"XO9GJZJMTW",apiKey:"d9b09790edab8cc6a9a4a727c0e5c059",indexName:"react-native-template-strong",contextualSearch:!0,searchParameters:{},searchPagePath:"search"},navbar:{title:"React Native Template Strong",logo:{alt:"strong-logo",src:"img/logo.svg"},items:[{type:"doc",docId:"getting-started",position:"right",label:"Docs"},{to:"mission",position:"right",label:"Mission"},{to:"troubleshooting",position:"right",label:"Troubleshooting"},{to:"faq",position:"right",label:"FAQ"},{href:"https://github.com/svbutko/react-native-template-strong",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",links:[{title:"Docs",items:[{label:"Getting started",to:"/docs/getting-started"},{label:"Troubleshooting",to:"troubleshooting"},{label:"FAQ",to:"faq"}]},{title:"Community",items:[{label:"Discussions",href:"https://github.com/svbutko/react-native-template-strong/discussions"},{label:"Issues",href:"https://github.com/svbutko/react-native-template-strong/issues"}]},{title:"More",items:[{label:"Project Github",href:"https://github.com/svbutko/react-native-template-strong"},{label:"My Github",href:"https://github.com/svbutko"},{label:"My Twitter",href:"https://twitter.com/svbutko"}]}],copyright:"Copyright \xa9 2024 Sergei Butko (@svbutko). Built with Docusaurus."},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:[],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},baseUrlIssueBanner:!0,onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},plugins:[],themes:[],scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1,markdown:{format:"mdx",mermaid:!1,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0}}}},7462:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t r})},5068:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>a})},3366:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r =0||(a[n]=e[n]);return a}n.d(t,{Z:()=>r})},512:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t a});const a=function(){for(var e,t,n=0,a="",o=arguments.length;n {"use strict";n.d(t,{p1:()=>T,y$:()=>ee});var r,a,o,i,s,l,c,u=n(7294),d=n(512),p=Object.create,f=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertyNames,v=Object.getOwnPropertySymbols,y=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))w.call(t,n)&&x(e,n,t[n]);if(v)for(var n of v(t))k.call(t,n)&&x(e,n,t[n]);return e},E=(e,t)=>m(e,h(t)),_=(e,t)=>{var n={};for(var r in e)w.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&v)for(var r of v(e))t.indexOf(r)<0&&k.call(e,r)&&(n[r]=e[r]);return n},C=(r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=x.value.length,x=x.next){var E=x.value;if(t.length>e.length)return;if(!(E instanceof a)){var _,C=1;if(v){if(!(_=o(k,S,e,b))||_.index>=e.length)break;var T=_.index,j=_.index+_[0].length,A=S;for(A+=x.value.length;T>=A;)A+=(x=x.next).value.length;if(S=A-=x.value.length,x.value instanceof a)continue;for(var L=x;L!==t.tail&&(A d.reach&&(d.reach=O);var I=x.prev;if(N&&(I=l(t,I,N),S+=N.length),c(t,I,C),x=l(t,I,new a(p,h?r.tokenize(R,h):R,y,R)),P&&l(t,x,P),C>1){var D={cause:p+","+m,reach:O};i(e,t,n,x.prev,S,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a "+o.content+""+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return a||(0,r[b(r)[0]])((a={exports:{}}).exports,a),a.exports}),T=((e,t,n)=>(n=null!=e?p(y(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of b(t))w.call(e,a)||a===n||f(e,a,{get:()=>t[a],enumerable:!(r=g(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?n:f(n,"default",{value:e,enumerable:!0}),e)))(C());T.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]},T.languages.markup.tag.inside["attr-value"].inside.entity=T.languages.markup.entity,T.languages.markup.doctype.inside["internal-subset"].inside=T.languages.markup,T.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(T.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:T.languages[t]},n.cdata=/^$/i,{"included-cdata":{pattern://i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:T.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},T.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(T.languages.markup.tag,"addAttribute",{value:function(e,t){T.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:T.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),T.languages.html=T.languages.markup,T.languages.mathml=T.languages.markup,T.languages.svg=T.languages.markup,T.languages.xml=T.languages.extend("markup",{}),T.languages.ssml=T.languages.xml,T.languages.atom=T.languages.xml,T.languages.rss=T.languages.xml,o=T,i={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},l="(?:[^\\\\-]|"+(s=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",l=RegExp(l+"-"+l),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},o.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:s,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":i,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:s}},"special-escape":i,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:s,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":c}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},T.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},T.languages.javascript=T.languages.extend("clike",{"class-name":[T.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),T.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,T.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:T.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:T.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:T.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:T.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:T.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),T.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:T.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),T.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),T.languages.markup&&(T.languages.markup.tag.addInlined("script","javascript"),T.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),T.languages.js=T.languages.javascript,T.languages.actionscript=T.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<|>>?>?|[!=]=?)=?|[~?@]/}),T.languages.actionscript["class-name"].alias="function",delete T.languages.actionscript.parameter,delete T.languages.actionscript["literal-property"],T.languages.markup&&T.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:T.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(T),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s |\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(T),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-] )(?:[ \t]*(?:(?![#:]) |: ))*/.source.replace(/ /g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s< >[ \t]+)?)(?:< >)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/< >/g,(function(){return r})).replace(/< >/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s< >[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/< >/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:< >[ \t]+)?)< >(?=\s*:\s)/.source.replace(/< >/g,(function(){return r})).replace(/< >/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(T),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/ /g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_) |_(?:(?!_) )+_)+__\b|\*\*(?:(?!\*)