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/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..dfa7252 --- /dev/null +++ b/404.html @@ -0,0 +1,21 @@ + + +
+ + +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/,f=/\{(? [\d,-]+)\}/,y={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function g(e,t){const n=e.map((e=>{const{start:n,end:o}=y[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${o})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function h(e,t){let n=e.replace(/\n$/,"");const{language:o,magicComments:r,metastring:c}=t;if(c&&f.test(c)){const e=c.match(f).groups.range;if(0===r.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 t=r[0].className,o=m()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(o),code:n}}if(void 0===o)return{lineClassNames:{},code:n};const a=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return g(["js","jsBlock"],t);case"jsx":case"tsx":return g(["js","jsBlock","jsx"],t);case"html":return g(["js","jsBlock","html"],t);case"python":case"py":case"bash":return g(["bash"],t);case"markdown":case"md":return g(["html","jsx","bash"],t);default:return g(Object.keys(y),t)}}(o,r),s=n.split("\n"),l=Object.fromEntries(r.map((e=>[e.className,{start:0,range:""}]))),i=Object.fromEntries(r.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),u=Object.fromEntries(r.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),p=Object.fromEntries(r.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let m=0;m void 0!==e));i[t]?l[i[t]].range+=`${m},`:u[t]?l[u[t]].start=m:p[t]&&(l[p[t]].range+=`${l[p[t]].start}-${m-1},`),s.splice(m,1)}n=s.join("\n");const d={};return Object.entries(l).forEach((e=>{let[t,{range:n}]=e;m()(n).forEach((e=>{d[e]??=[],d[e].push(t)}))})),{lineClassNames:d,code:n}}const b="codeBlockContainer_Ckt0";function v(e){let{as:t,...n}=e;const c=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[o,r]=e;const c=t[o];c&&"string"==typeof r&&(n[c]=r)})),n}(i());return r.createElement(t,(0,o.A)({},n,{style:c,className:(0,a.A)(n.className,b,u.G.common.codeBlock)}))}const k={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function E(e){let{children:t,className:n}=e;return r.createElement(v,{as:"pre",tabIndex:0,className:(0,a.A)(k.codeBlockStandalone,"thin-scrollbar",n)},r.createElement("code",{className:k.codeBlockLines},t))}var N=n(9532);const B={attributes:!0,characterData:!0,childList:!0,subtree:!0};function j(e,t){const[n,o]=(0,r.useState)(),c=(0,r.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,r.useEffect)((()=>{c()}),[c]),function(e,t,n){void 0===n&&(n=B);const o=(0,N._q)(t),c=(0,N.Be)(n);(0,r.useEffect)((()=>{const t=new MutationObserver(o);return e&&t.observe(e,c),()=>t.disconnect()}),[e,o,c])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),c())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const w={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var C={Prism:n(1258).A,theme:w};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 T(){return T=Object.assign||function(e){for(var t=1;t 0&&e[n-1]===t?e:e.concat(t)},P=function(e,t){var n=e.plain,o=Object.create(null),r=e.styles.reduce((function(e,n){var o=n.languages,r=n.style;return o&&!o.includes(t)||n.types.forEach((function(t){var n=T({},e[t],r);e[t]=n})),e}),o);return r.root=n,r.plain=T({},n,{backgroundColor:null}),r};function S(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===t.indexOf(o)&&(n[o]=e[o]);return n}const _=function(e){function t(){for(var t=this,n=[],o=arguments.length;o--;)n[o]=arguments[o];e.apply(this,n),O(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?P(e.theme,e.language):void 0;return t.themeDict=n})),O(this,"getLineProps",(function(e){var n=e.key,o=e.className,r=e.style,c=T({},S(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),a=t.getThemeDict(t.props);return void 0!==a&&(c.style=a.plain),void 0!==r&&(c.style=void 0!==c.style?T({},c.style,r):r),void 0!==n&&(c.key=n),o&&(c.className+=" "+o),c})),O(this,"getStyleForToken",(function(e){var n=e.types,o=e.empty,r=n.length,c=t.getThemeDict(t.props);if(void 0!==c){if(1===r&&"plain"===n[0])return o?{display:"inline-block"}:void 0;if(1===r&&!o)return c[n[0]];var a=o?{display:"inline-block"}:{},s=n.map((function(e){return c[e]}));return Object.assign.apply(Object,[a].concat(s))}})),O(this,"getTokenProps",(function(e){var n=e.key,o=e.className,r=e.style,c=e.token,a=T({},S(e,["key","className","style","token"]),{className:"token "+c.types.join(" "),children:c.content,style:t.getStyleForToken(c),key:void 0});return void 0!==r&&(a.style=void 0!==a.style?T({},a.style,r):r),void 0!==n&&(a.key=n),o&&(a.className+=" "+o),a})),O(this,"tokenize",(function(e,t,n,o){var r={code:t,grammar:n,language:o,tokens:[]};e.hooks.run("before-tokenize",r);var c=r.tokens=e.tokenize(r.code,r.grammar,r.language);return e.hooks.run("after-tokenize",r),c}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,o=e.code,r=e.children,c=this.getThemeDict(this.props),a=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],o=[0],r=[e.length],c=0,a=0,s=[],l=[s];a>-1;){for(;(c=o[a]++) 0?u:["plain"],i=p):(u=x(u,p.type),p.alias&&(u=x(u,p.alias)),i=p.content),"string"==typeof i){var m=i.split(L),d=m.length;s.push({types:u,content:m[0]});for(var f=1;f r.createElement("span",(0,o.A)({key:t},l({token:e,key:t})))));return r.createElement("span",i,c?r.createElement(r.Fragment,null,r.createElement("span",{className:I}),r.createElement("span",{className:$},u)):u,r.createElement("br",null))}var M=n(1312);const z={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function V(e){let{code:t,className:n}=e;const[o,c]=(0,r.useState)(!1),s=(0,r.useRef)(void 0),l=(0,r.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;const o=document.createElement("textarea"),r=document.activeElement;o.value=e,o.setAttribute("readonly",""),o.style.contain="strict",o.style.position="absolute",o.style.left="-9999px",o.style.fontSize="12pt";const c=document.getSelection();let a=!1;c.rangeCount>0&&(a=c.getRangeAt(0)),n.append(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;let s=!1;try{s=document.execCommand("copy")}catch{}o.remove(),a&&(c.removeAllRanges(),c.addRange(a)),r&&r.focus()}(t),c(!0),s.current=window.setTimeout((()=>{c(!1)}),1e3)}),[t]);return(0,r.useEffect)((()=>()=>window.clearTimeout(s.current)),[]),r.createElement("button",{type:"button","aria-label":o?(0,M.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,M.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,M.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,a.A)("clean-btn",n,z.copyButton,o&&z.copyButtonCopied),onClick:l},r.createElement("span",{className:z.copyButtonIcons,"aria-hidden":"true"},r.createElement("svg",{className:z.copyButtonIcon,viewBox:"0 0 24 24"},r.createElement("path",{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"})),r.createElement("svg",{className:z.copyButtonSuccessIcon,viewBox:"0 0 24 24"},r.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))))}const W="wordWrapButtonIcon_Bwma",R="wordWrapButtonEnabled_EoeP";function F(e){let{className:t,onClick:n,isEnabled:o}=e;const c=(0,M.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return r.createElement("button",{type:"button",onClick:n,className:(0,a.A)("clean-btn",t,o&&R),"aria-label":c,title:c},r.createElement("svg",{className:W,viewBox:"0 0 24 24","aria-hidden":"true"},r.createElement("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"})))}function G(e){let{children:t,className:n="",metastring:c,title:s,showLineNumbers:u,language:p}=e;const{prism:{defaultLanguage:m,magicComments:f}}=(0,l.p)(),y=p??n.split(" ").find((e=>e.startsWith("language-")))?.replace(/language-/,"")??m;const g=i(),b=function(){const[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1),c=(0,r.useRef)(null),a=(0,r.useCallback)((()=>{const n=c.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[c,e]),s=(0,r.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=c.current,n=e>t||c.current.querySelector("code").hasAttribute("style");o(n)}),[c]);return j(c,s),(0,r.useEffect)((()=>{s()}),[e,s]),(0,r.useEffect)((()=>(window.addEventListener("resize",s,{passive:!0}),()=>{window.removeEventListener("resize",s)})),[s]),{codeBlockRef:c,isEnabled:e,isCodeScrollable:n,toggle:a}}(),E=function(e){return e?.match(d)?.groups.title??""}(c)||s,{lineClassNames:N,code:B}=h(t,{metastring:c,language:y,magicComments:f}),w=u??function(e){return Boolean(e?.includes("showLineNumbers"))}(c);return r.createElement(v,{as:"div",className:(0,a.A)(n,y&&!n.includes(`language-${y}`)&&`language-${y}`)},E&&r.createElement("div",{className:k.codeBlockTitle},E),r.createElement("div",{className:k.codeBlockContent},r.createElement(_,(0,o.A)({},C,{theme:g,code:B,language:y??"text"}),(e=>{let{className:t,tokens:n,getLineProps:o,getTokenProps:c}=e;return r.createElement("pre",{tabIndex:0,ref:b.codeBlockRef,className:(0,a.A)(t,k.codeBlock,"thin-scrollbar")},r.createElement("code",{className:(0,a.A)(k.codeBlockLines,w&&k.codeBlockLinesWithNumbering)},n.map(((e,t)=>r.createElement(H,{key:t,line:e,getLineProps:o,getTokenProps:c,classNames:N[t],showLineNumbers:w})))))})),r.createElement("div",{className:k.buttonGroup},(b.isEnabled||b.isCodeScrollable)&&r.createElement(F,{className:k.codeButton,onClick:()=>b.toggle(),isEnabled:b.isEnabled}),r.createElement(V,{className:k.codeButton,code:B}))))}function q(e){let{children:t,...n}=e;const a=(0,c.A)(),s=function(e){return r.Children.toArray(e).some((e=>(0,r.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof s?G:E;return r.createElement(l,(0,o.A)({key:String(a)},n),s)}},8426:(e,t)=>{function n(e){let t,n=[];for(let o of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(o))n.push(parseInt(o,10));else if(t=o.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,o,r,c]=t;if(o&&c){o=parseInt(o),c=parseInt(c);const e=o {n.r(t),n.d(t,{default:()=>c});var a=n(6540),l=n(1312),o=n(9024),r=n(5933);function c(){return a.createElement(a.Fragment,null,a.createElement(o.be,{title:(0,l.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.A,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"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/17896441.26d09fce.js b/assets/js/17896441.26d09fce.js new file mode 100644 index 0000000..f07dde4 --- /dev/null +++ b/assets/js/17896441.26d09fce.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[8401],{7211:(e,t,n)=>{n.d(t,{A:()=>f});var a=n(9668),l=n(6540),r=n(53),s=n(7559),o=n(4142),c=n(9169),i=n(5489),d=n(6025),m=n(1312);function u(e){return l.createElement("svg",(0,a.A)({viewBox:"0 0 24 24"},e),l.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const v={breadcrumbsContainer:"breadcrumbsContainer_Z_bl",breadcrumbHomeIcon:"breadcrumbHomeIcon_OVgt"};function b(e){let{children:t,href:n,isLast:a}=e;const r="breadcrumbs__link";return a?l.createElement("span",{className:r,itemProp:"name"},t):n?l.createElement(i.A,{className:r,href:n,itemProp:"item"},l.createElement("span",{itemProp:"name"},t)):l.createElement("span",{className:r},t)}function h(e){let{children:t,active:n,index:s,addMicrodata:o}=e;return l.createElement("li",(0,a.A)({},o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,r.A)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,l.createElement("meta",{itemProp:"position",content:String(s+1)}))}function p(){const e=(0,d.A)("/");return l.createElement("li",{className:"breadcrumbs__item"},l.createElement(i.A,{"aria-label":(0,m.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:(0,r.A)("breadcrumbs__link",v.breadcrumbsItemLink),href:e},l.createElement(u,{className:v.breadcrumbHomeIcon})))}function f(){const e=(0,o.OF)(),t=(0,c.Dt)();return e?l.createElement("nav",{className:(0,r.A)(s.G.docs.docBreadcrumbs,v.breadcrumbsContainer),"aria-label":(0,m.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},l.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&l.createElement(p,null),e.map(((t,n)=>{const a=n===e.length-1;return l.createElement(h,{key:n,active:a,index:n,addMicrodata:!!t.href},l.createElement(b,{href:t.href,isLast:a},t.label))})))):null}},4799:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Z});var a=n(6540),l=n(9024),r=n(9532);const s=a.createContext(null);function o(e){let{children:t,content:n}=e;const l=function(e){return(0,a.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return a.createElement(s.Provider,{value:l},t)}function c(){const e=(0,a.useContext)(s);if(null===e)throw new r.dV("DocProvider");return e}function i(){const{metadata:e,frontMatter:t,assets:n}=c();return a.createElement(l.be,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var d=n(53),m=n(4581),u=n(7719);function v(){const{metadata:e}=c();return a.createElement(u.A,{previous:e.previous,next:e.next})}var b=n(1878),h=n(4267),p=n(7559),f=n(1312);function E(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n}=e;return a.createElement(f.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:a.createElement("b",null,a.createElement("time",{dateTime:new Date(1e3*t).toISOString()},n))}}," on {date}")}function g(e){let{lastUpdatedBy:t}=e;return a.createElement(f.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:a.createElement("b",null,t)}}," by {user}")}function A(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n,lastUpdatedBy:l}=e;return a.createElement("span",{className:p.G.common.lastUpdated},a.createElement(f.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&n?a.createElement(E,{lastUpdatedAt:t,formattedLastUpdatedAt:n}):"",byUser:l?a.createElement(g,{lastUpdatedBy:l}):""}},"Last updated{atDate}{byUser}"),!1)}var L=n(1943),N=n(2053);const _="lastUpdated_vwxv";function C(e){return a.createElement("div",{className:(0,d.A)(p.G.docs.docFooterTagsRow,"row margin-bottom--sm")},a.createElement("div",{className:"col"},a.createElement(N.A,e)))}function T(e){let{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:l,formattedLastUpdatedAt:r}=e;return a.createElement("div",{className:(0,d.A)(p.G.docs.docFooterEditMetaRow,"row")},a.createElement("div",{className:"col"},t&&a.createElement(L.A,{editUrl:t})),a.createElement("div",{className:(0,d.A)("col",_)},(n||l)&&a.createElement(A,{lastUpdatedAt:n,formattedLastUpdatedAt:r,lastUpdatedBy:l})))}function k(){const{metadata:e}=c(),{editUrl:t,lastUpdatedAt:n,formattedLastUpdatedAt:l,lastUpdatedBy:r,tags:s}=e,o=s.length>0,i=!!(t||n||r);return o||i?a.createElement("footer",{className:(0,d.A)(p.G.docs.docFooter,"docusaurus-mt-lg")},o&&a.createElement(C,{tags:s}),i&&a.createElement(T,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:r,formattedLastUpdatedAt:l})):null}var H=n(1422),x=n(5195),U=n(9668);const y="tocCollapsibleButton_TO0P",w="tocCollapsibleButtonExpanded_MG3E";function M(e){let{collapsed:t,...n}=e;return a.createElement("button",(0,U.A)({type:"button"},n,{className:(0,d.A)("clean-btn",y,!t&&w,n.className)}),a.createElement(f.A,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}const B="tocCollapsible_ETCw",I="tocCollapsibleContent_vkbj",O="tocCollapsibleExpanded_sAul";function V(e){let{toc:t,className:n,minHeadingLevel:l,maxHeadingLevel:r}=e;const{collapsed:s,toggleCollapsed:o}=(0,H.u)({initialState:!0});return a.createElement("div",{className:(0,d.A)(B,!s&&O,n)},a.createElement(M,{collapsed:s,onClick:o}),a.createElement(H.N,{lazy:!0,className:I,collapsed:s},a.createElement(x.A,{toc:t,minHeadingLevel:l,maxHeadingLevel:r})))}const S="tocMobile_ITEo";function D(){const{toc:e,frontMatter:t}=c();return a.createElement(V,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,d.A)(p.G.docs.docTocMobile,S)})}var G=n(7763);function P(){const{toc:e,frontMatter:t}=c();return a.createElement(G.A,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:p.G.docs.docTocDesktop})}var R=n(1107),F=n(6886);function z(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=c();return t.hide_title||void 0!==n?null:e.title}();return a.createElement("div",{className:(0,d.A)(p.G.docs.docMarkdown,"markdown")},n&&a.createElement("header",null,a.createElement(R.A,{as:"h1"},n)),a.createElement(F.A,null,t))}var j=n(7211);const q="docItemContainer_Djhp",$="docItemCol_VOVn";function W(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=c(),n=(0,m.l)(),l=e.hide_table_of_contents,r=!l&&t.length>0;return{hidden:l,mobile:r?a.createElement(D,null):void 0,desktop:!r||"desktop"!==n&&"ssr"!==n?void 0:a.createElement(P,null)}}();return a.createElement("div",{className:"row"},a.createElement("div",{className:(0,d.A)("col",!n.hidden&&$)},a.createElement(b.A,null),a.createElement("div",{className:q},a.createElement("article",null,a.createElement(j.A,null),a.createElement(h.A,null),n.mobile,a.createElement(z,null,t),a.createElement(k,null)),a.createElement(v,null))),n.desktop&&a.createElement("div",{className:"col col--3"},n.desktop))}function Z(e){const t=`docs-doc-id-${e.content.metadata.unversionedId}`,n=e.content;return a.createElement(o,{content:e.content},a.createElement(l.e3,{className:t},a.createElement(i,null),a.createElement(W,null,a.createElement(n,null))))}},7719:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(9668),l=n(6540),r=n(1312),s=n(9022);function o(e){const{previous:t,next:n}=e;return l.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,r.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages navigation",description:"The ARIA label for the docs pagination"})},t&&l.createElement(s.A,(0,a.A)({},t,{subLabel:l.createElement(r.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&l.createElement(s.A,(0,a.A)({},n,{subLabel:l.createElement(r.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}},4267:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(6540),l=n(53),r=n(1312),s=n(7559),o=n(2252);function c(e){let{className:t}=e;const n=(0,o.r)();return n.badge?a.createElement("span",{className:(0,l.A)(t,s.G.docs.docVersionBadge,"badge badge--secondary")},a.createElement(r.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label}},"Version: {versionLabel}")):null}},1878:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(6540),l=n(53),r=n(4586),s=n(5489),o=n(1312),c=n(4070),i=n(7559),d=n(5597),m=n(2252);const u={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(o.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(o.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function v(e){const t=u[e.versionMetadata.banner];return a.createElement(t,e)}function b(e){let{versionLabel:t,to:n,onClick:l}=e;return a.createElement(o.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(s.A,{to:n,onClick:l},a.createElement(o.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function h(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:s}}=(0,r.A)(),{pluginId:o}=(0,c.vT)({failfast:!0}),{savePreferredVersionName:m}=(0,d.g1)(o),{latestDocSuggestion:u,latestVersionSuggestion:h}=(0,c.HW)(o),p=u??(f=h).docs.find((e=>e.id===f.mainDocId));var f;return a.createElement("div",{className:(0,l.A)(t,i.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},a.createElement("div",null,a.createElement(v,{siteTitle:s,versionMetadata:n})),a.createElement("div",{className:"margin-top--md"},a.createElement(b,{versionLabel:h.label,to:p.path,onClick:()=>m(h.name)})))}function p(e){let{className:t}=e;const n=(0,m.r)();return n.banner?a.createElement(h,{className:t,versionMetadata:n}):null}},7763:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(9668),l=n(6540),r=n(53),s=n(5195);const o="tableOfContents_bqdL";function c(e){let{className:t,...n}=e;return l.createElement("div",{className:(0,r.A)(o,"thin-scrollbar",t)},l.createElement(s.A,(0,a.A)({},n,{linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"})))}},5195:(e,t,n)=>{n.d(t,{A:()=>b});var a=n(9668),l=n(6540),r=n(6342);function s(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const a=n.slice(2,e.level);e.parentIndex=Math.max(...a),n[e.level]=t}));const a=[];return t.forEach((e=>{const{parentIndex:n,...l}=e;n>=0?t[n].children.push(l):a.push(l)})),a}function o(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return t.flatMap((e=>{const t=o({toc:e.children,minHeadingLevel:n,maxHeadingLevel:a});return function(e){return e.level>=n&&e.level<=a}(e)?[{...e,children:t}]:t}))}function c(e){const t=e.getBoundingClientRect();return t.top===t.bottom?c(e.parentNode):t}function i(e,t){let{anchorTopOffset:n}=t;const a=e.find((e=>c(e).top>=n));if(a){return function(e){return e.top>0&&e.bottom {e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function m(e){const t=(0,l.useRef)(void 0),n=d();(0,l.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:a,linkActiveClassName:l,minHeadingLevel:r,maxHeadingLevel:s}=e;function o(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(a),o=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const a=[];for(let l=t;l<=n;l+=1)a.push(`h${l}.anchor`);return Array.from(document.querySelectorAll(a.join()))}({minHeadingLevel:r,maxHeadingLevel:s}),c=i(o,{anchorTopOffset:n.current}),d=e.find((e=>c&&c.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(l),e.classList.add(l),t.current=e):e.classList.remove(l)}(e,e===d)}))}return document.addEventListener("scroll",o),document.addEventListener("resize",o),o(),()=>{document.removeEventListener("scroll",o),document.removeEventListener("resize",o)}}),[e,n])}function u(e){let{toc:t,className:n,linkClassName:a,isChild:r}=e;return t.length?l.createElement("ul",{className:r?void 0:n},t.map((e=>l.createElement("li",{key:e.id},l.createElement("a",{href:`#${e.id}`,className:a??void 0,dangerouslySetInnerHTML:{__html:e.value}}),l.createElement(u,{isChild:!0,toc:e.children,className:n,linkClassName:a}))))):null}const v=l.memo(u);function b(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:c="table-of-contents__link",linkActiveClassName:i,minHeadingLevel:d,maxHeadingLevel:u,...b}=e;const h=(0,r.p)(),p=d??h.tableOfContents.minHeadingLevel,f=u??h.tableOfContents.maxHeadingLevel,E=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return(0,l.useMemo)((()=>o({toc:s(t),minHeadingLevel:n,maxHeadingLevel:a})),[t,n,a])}({toc:t,minHeadingLevel:p,maxHeadingLevel:f});return m((0,l.useMemo)((()=>{if(c&&i)return{linkClassName:c,linkActiveClassName:i,minHeadingLevel:p,maxHeadingLevel:f}}),[c,i,p,f])),l.createElement(v,(0,a.A)({toc:E,className:n,linkClassName:c},b))}}}]); \ No newline at end of file diff --git a/assets/js/19152fe9.7b304325.js b/assets/js/19152fe9.7b304325.js new file mode 100644 index 0000000..2692d5d --- /dev/null +++ b/assets/js/19152fe9.7b304325.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[4797],{5680:(e,n,t)=>{t.d(n,{xA:()=>l,yg:()=>y});var r=t(6540);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n =0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r =0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var p=r.createContext({}),s=function(e){var n=r.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):c(c({},n),e)),t},l=function(e){var n=s(e.components);return r.createElement(p.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,l=a(e,["components","mdxType","originalType","parentName"]),u=s(t),f=o,y=u["".concat(p,".").concat(f)]||u[f]||m[f]||i;return t?r.createElement(y,c(c({ref:n},l),{},{components:t})):r.createElement(y,c({ref:n},l))}));function y(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,c=new Array(i);c[0]=f;var a={};for(var p in n)hasOwnProperty.call(n,p)&&(a[p]=n[p]);a.originalType=e,a[u]="string"==typeof e?e:o,c[1]=a;for(var s=2;s{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>a,toc:()=>s});var r=t(9668),o=(t(6540),t(5680));const i={sidebar_position:1},c="Intro",a={unversionedId:"combine/intro",id:"combine/intro",title:"Intro",description:"With rnhc you can combine your components or screens in a specific path.",source:"@site/docs/combine/intro.md",sourceDirName:"combine",slug:"/combine/intro",permalink:"/react-native-help-create/docs/combine/intro",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Combine",permalink:"/react-native-help-create/docs/category/combine"},next:{title:"Combine Components",permalink:"/react-native-help-create/docs/combine/combine-components"}},p={},s=[],l={toc:s};function u(e){let{components:n,...t}=e;return(0,o.yg)("wrapper",(0,r.A)({},l,t,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"intro"},"Intro"),(0,o.yg)("p",null,"With ",(0,o.yg)("inlineCode",{parentName:"p"},"rnhc")," you can combine your components or screens in a specific path."),(0,o.yg)("p",null,"The following points shows how to user the ",(0,o.yg)("inlineCode",{parentName:"p"},"combine")," command."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.b8777e2f.js b/assets/js/1a4e3797.b8777e2f.js new file mode 100644 index 0000000..fb2d196 --- /dev/null +++ b/assets/js/1a4e3797.b8777e2f.js @@ -0,0 +1,2 @@ +/*! For license information please see 1a4e3797.b8777e2f.js.LICENSE.txt */ +(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[2138],{2733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u 0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},4103:(e,t,r)=>{"use strict";var n=r(6571),i=r(3371),a=r(7691);function s(e,t,r){return new n(e,t,r)}s.version=r(6938),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},6732:(e,t,r)=>{"use strict";var n=r(2733);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(3014)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},1673:(e,t,r)=>{"use strict";var n=r(9110),i=r(1383),a=r(317),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return a(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},3371:(e,t,r)=>{"use strict";var n=r(4728),i=r(9110),a=r(4843),s=r(849),c=r(7507),u=r(1383),o=r(317),h=r(2208),f=r(1673);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return n({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&o(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=c(r);if(this.isNumericRefined(e,t,i))return this;var a=n({},this.numericRefinements);return a[e]=n({},a[e]),a[e][t]?(a[e][t]=a[e][t].slice(),a[e][t].push(i)):a[e][t]=[i],this.setQueryParameters({numericRefinements:a})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,i){return i===e&&n.op===t&&l(n.val,c(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,a,u=c(r),o=void 0!==(i=this.numericRefinements[e][t],a=u,s(i,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return s(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},6673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var s=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[s.name]&&e.hierarchicalFacetsRefinements[s.name][0]||"",h=e._getHierarchicalFacetSeparator(s),f=e._getHierarchicalRootPath(s),l=e._getHierarchicalShowParentLevel(s),m=a(e._getHierarchicalFacetSortBy(s)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,a,s){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m{"use strict";var n=r(4728),i=r(9110),a=r(8601),s=r(8965),c=r(849),u=r(3917),o=r(7577),h=r(2909),f=h.escapeFacetValue,l=h.unescapeFacetValue,m=r(6673);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var a=t[0];this._rawResults=t;var o=this;Object.keys(a).forEach((function(e){o[e]=a[e]})),Object.keys(r||{}).forEach((function(e){o[e]=r[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var h=e.getRefinedDisjunctiveFacets(),f=d(e.facets),v=d(e.disjunctiveFacets),g=1,y=a.facets||{};Object.keys(y).forEach((function(t){var r,n,i=y[t],s=(r=e.hierarchicalFacets,n=t,c(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(s){var h=s.attributes.indexOf(t),l=u(e.hierarchicalFacets,(function(e){return e.name===s.name}));o.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=v[t],o.disjunctiveFacets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.disjunctiveFacets[m],a.facets_stats,t)),g&&(m=f[t],o.facets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.facets[m],a.facets_stats,t))}})),this.hierarchicalFacets=s(this.hierarchicalFacets),h.forEach((function(r){var s=t[g],c=s&&s.facets?s.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(c).forEach((function(t){var r,f=c[t];if(h){r=u(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=u(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=n({},o.hierarchicalFacets[r][m].data,f)}else{r=v[t];var d=a.facets&&a.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:s.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],s.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var c=r[t],h=u(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=u(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0){var m=s[0].split(a)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,c,o.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];o.facets[n]={name:t,data:a.facets[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=s(this.facets),this.disjunctiveFacets=s(this.disjunctiveFacets),this._state=e}function g(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return g(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function y(e,t){var r=c(e,(function(e){return e.name===t}));return r&&r.stats}function R(e,t,r,n,i){var a=c(i,(function(e){return e.name===r})),s=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:u}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=c(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=c(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t))return c(e.hierarchicalFacets,r)}(this,e);if(r){var n,s=i({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),u=this;if(Array.isArray(r))n=[e];else n=u._state.getHierarchicalFacetByName(r.name).attributes;return g((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(u,t);if(Boolean(r))return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var s,c=t.sortRemainingBy;return"hidden"===c?r:(s="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(a(n,s[0],s[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,v.DEFAULT_SORT);return a(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?y(this.facets,e):this._state.isDisjunctiveFacet(e)?y(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(R(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(R(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(R(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=r.split(a),u=c(n,(function(e){return e.name===t})),o=s.reduce((function(e,t){var r=e&&c(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},6571:(e,t,r)=>{"use strict";var n=r(3371),i=r(7691),a=r(6732),s=r(9228),c=r(2733),u=r(3014),o=r(317),h=r(1383),f=r(4728),l=r(6938),m=r(2909).escapeFacetValue;function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(e);var i=r||{};i.index=t,this.state=n.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function p(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}u(d,c),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return s._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=s._getQueries(r.index,r),a=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),{content:new i(r,e.results),state:r,_originalResponse:e}}),(function(e){throw a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(null,new i(r,e.results),r)})).catch((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=f({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:h(s._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var c=this.client.initIndex(n.index);if("function"!=typeof c.findAnswers)throw new Error(a);return c.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=s.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:o}]):a?h=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=m(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=p,d.prototype.setPage=p,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:n.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new n(e),this},d.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=v,d.prototype.getPage=v,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=s._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=s._getQueries(n.index,n);return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),c=this._queryId++;this._currentNbQueries++;try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(u){this.emit("error",{error:u})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t 0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new a(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},8965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},9110:e=>{"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r {"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r {"use strict";var n=r(849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},3014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},4728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},1383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n =0||(i[r]=e[r]);return i}},8601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e =n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},7507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},9228:(e,t,r)=>{"use strict";var n=r(4728);function i(e){return Object.keys(e).sort((function(e,t){return e.localeCompare(t)})).reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[s-1];c.facetFilters=s>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).forEach((function(e){(a[e]||[]).forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},2208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},6938:e=>{"use strict";e.exports="3.11.1"},3643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,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 r(r){for(var n=1;n =0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t 2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n 0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:w(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},p={onSuccess:function(e){return 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:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",O(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:v))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,w(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%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 w(e){return e.map((function(e){return O(e)}))}function O(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var A=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},N=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:k}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},k=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,q=2,I=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=I,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return q>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.13.1","-").concat(e)}),u()]}),userAgent:_("4.13.1").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return A(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:N,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:k,findAnswers:Q}})}}}}))}return V.version="4.13.1",V}()},5846:(e,t,r)=>{"use strict";r.d(t,{W:()=>o});var n=r(6540),i=r(4586);const a=["zero","one","two","few","many","other"];function s(e){return a.filter((t=>e.includes(t)))}const c={locale:"en",pluralForms:s(["one","other"]),select:e=>1===e?"one":"other"};function u(){const{i18n:{currentLocale:e}}=(0,i.A)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:s(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),c}}),[e])}function o(){const e=u();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}},4604:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>q});var n=r(6540),i=r(53),a=r(3643),s=r.n(a),c=r(4103),u=r.n(c),o=r(5260),h=r(5489),f=r(8193),l=r(5846),m=r(1252),d=r(9532),p=r(9024),v=r(4255),g=r(481),y=r(4586),R=r(4070),F=r(1312),b=r(5933);const P="searchQueryInput_u2C7",j="searchVersionInput_m0Ui",_="searchResultsColumn_JPFH",E="algoliaLogo_rT1R",x="algoliaLogoPathFill_WdUC",w="searchResultItem_Tv2o",O="searchResultItemHeading_KbCB",A="searchResultItemPath_lhe1",N="searchResultItemSummary_AEaO",H="searchQueryColumn_RTkw",S="searchVersionColumn_ypXd",T="searchLogoColumn_rJIA",Q="loadingSpinner_XVxU",C="loader_vvXV";function k(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return n.createElement("div",{className:(0,i.A)("col","col--3","padding-left--none",S)},r.map((e=>{let[i,a]=e;const s=r.length>1?`${i}: `:"";return n.createElement("select",{key:i,onChange:e=>t.setSearchVersion(i,e.target.value),defaultValue:t.searchVersions[i],className:j},a.versions.map(((e,t)=>n.createElement("option",{key:t,label:`${s}${e.label}`,value:e.name}))))})))}function D(){const{siteConfig:{themeConfig:e},i18n:{currentLocale:t}}=(0,y.A)(),{algolia:{appId:r,apiKey:a,indexName:c,externalUrlRegex:p}}=e,j=function(){const{selectMessage:e}=(0,l.W)();return t=>e(t,(0,F.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),S=function(){const e=(0,R.Gy)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),{searchQuery:D,setSearchQuery:q}=(0,v.n)(),I={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[V,L]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return I;case"loading":return{...e,loading:!0};case"update":return D!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),I),B=s()(r,a),z=u()(B,c,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});z.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:a}}=e;if(""===t||!Array.isArray(r))return void L({type:"reset"});const s=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),c=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=new URL(t),a=Object.keys(r).map((e=>s(r[e].value)));return{title:a.pop(),url:(0,m.G)(p,i.href)?i.href:i.pathname+i.hash,summary:n.content?`${s(n.content.value)}...`:"",breadcrumbs:a}}));L({type:"update",value:{items:c,query:t,totalResults:i,totalPages:a,lastPage:n,hasMore:a>n+1,loading:!1}})}));const[M,J]=(0,n.useState)(null),W=(0,n.useRef)(0),U=(0,n.useRef)(f.A.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&W.current>r&&L({type:"advance"}),W.current=r}),{threshold:1})),$=()=>D?(0,F.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:D}):(0,F.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),K=(0,d._q)((function(e){void 0===e&&(e=0),z.addDisjunctiveFacetRefinement("docusaurus_tag","default"),z.addDisjunctiveFacetRefinement("language",t),Object.entries(S.searchVersions).forEach((e=>{let[t,r]=e;z.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)})),z.setQuery(D).setPage(e).search()}));return(0,n.useEffect)((()=>{if(!M)return;const e=U.current;return e?(e.observe(M),()=>e.unobserve(M)):()=>!0}),[M]),(0,n.useEffect)((()=>{L({type:"reset"}),D&&(L({type:"loading"}),setTimeout((()=>{K()}),300))}),[D,S.searchVersions,K]),(0,n.useEffect)((()=>{V.lastPage&&0!==V.lastPage&&K(V.lastPage)}),[K,V.lastPage]),n.createElement(b.A,null,n.createElement(o.A,null,n.createElement("title",null,(0,g.s)($())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,$()),n.createElement("form",{className:"row",onSubmit:e=>e.preventDefault()},n.createElement("div",{className:(0,i.A)("col",H,{"col--9":S.versioningEnabled,"col--12":!S.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:P,placeholder:(0,F.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,F.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>q(e.target.value),value:D,autoComplete:"off",autoFocus:!0})),S.versioningEnabled&&n.createElement(k,{docsSearchVersionsHelpers:S})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.A)("col","col--8",_)},!!V.totalResults&&j(V.totalResults)),n.createElement("div",{className:(0,i.A)("col","col--4","text--right",T)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,F.T)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:E},n.createElement("g",{fill:"none"},n.createElement("path",{className:x,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),V.items.length>0?n.createElement("main",null,V.items.map(((e,t)=>{let{title:r,url:a,summary:s,breadcrumbs:c}=e;return n.createElement("article",{key:t,className:w},n.createElement("h2",{className:O},n.createElement(h.A,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.A)("breadcrumbs",A)},c.map(((e,t)=>n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}}))))),s&&n.createElement("p",{className:N,dangerouslySetInnerHTML:{__html:s}}))}))):[D&&!V.loading&&n.createElement("p",{key:"no-results"},n.createElement(F.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!V.loading&&n.createElement("div",{key:"spinner",className:Q})],V.hasMore&&n.createElement("div",{className:C,ref:J},n.createElement(F.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function q(){return n.createElement(p.e3,{className:"search-page-wrapper"},n.createElement(D,null))}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.b8777e2f.js.LICENSE.txt b/assets/js/1a4e3797.b8777e2f.js.LICENSE.txt new file mode 100644 index 0000000..3016b5c --- /dev/null +++ b/assets/js/1a4e3797.b8777e2f.js.LICENSE.txt @@ -0,0 +1 @@ +/*! algoliasearch-lite.umd.js | 4.13.1 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ diff --git a/assets/js/1be78505.d7cfe686.js b/assets/js/1be78505.d7cfe686.js new file mode 100644 index 0000000..81528fe --- /dev/null +++ b/assets/js/1be78505.d7cfe686.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[1774,8714],{10:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ke});var a=n(6540),l=n(53),o=n(9024),r=n(7559),c=n(2967),i=n(4142),s=n(2252),d=n(6588),m=n(5933),u=n(1312),b=n(3104),p=n(5062);const h="backToTopButton_sjWU",E="backToTopButtonShow_xfvO";function f(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,l]=(0,a.useState)(!1),o=(0,a.useRef)(!1),{startScroll:r,cancelScroll:c}=(0,b.gk)();return(0,b.Mq)(((e,n)=>{let{scrollY:a}=e;const r=n?.scrollY;r&&(o.current?o.current=!1:a>=r?(c(),l(!1)):a {e.location.hash&&(o.current=!0,l(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,l.A)("clean-btn",r.G.common.backToTopButton,h,e&&E),type:"button",onClick:t})}var g=n(2681),_=n(4581),v=n(6342),A=n(3465),C=n(9668);function k(e){return a.createElement("svg",(0,C.A)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("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"}),a.createElement("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 N="collapseSidebarButton_PEFL",S="collapseSidebarButtonIcon_kv0_";function I(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,l.A)("button button--secondary button--outline",N),onClick:t},a.createElement(k,{className:S}))}var T=n(5041),y=n(9532);const x=Symbol("EmptyContext"),w=a.createContext(x);function M(e){let{children:t}=e;const[n,l]=(0,a.useState)(null),o=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:l})),[n]);return a.createElement(w.Provider,{value:o},t)}var L=n(1422),B=n(9169),G=n(5489),F=n(2303);function P(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.T)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function H(e){let{item:t,onItemClick:n,activePath:o,level:c,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,v.p)(),f=function(e){const t=(0,F.A)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,i._o)(e):void 0),[e,t])}(t),g=(0,i.w8)(t,o),_=(0,B.ys)(h,o),{collapsed:A,setCollapsed:k}=(0,L.u)({initialState:()=>!!b&&(!g&&t.collapsed)}),{expandedItem:N,setExpandedItem:S}=function(){const e=(0,a.useContext)(w);if(e===x)throw new y.dV("DocSidebarItemsExpandedStateProvider");return e}(),I=function(e){void 0===e&&(e=!A),S(e?null:s),k(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:l}=e;const o=(0,y.ZC)(t);(0,a.useEffect)((()=>{t&&!o&&n&&l(!1)}),[t,o,n,l])}({isActive:g,collapsed:A,updateCollapsed:I}),(0,a.useEffect)((()=>{b&&null!=N&&N!==s&&E&&k(!0)}),[b,N,s,k,E]),a.createElement("li",{className:(0,l.A)(r.G.docs.docSidebarItemCategory,r.G.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":A},p)},a.createElement("div",{className:(0,l.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":_})},a.createElement(G.A,(0,C.A)({className:(0,l.A)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":g}),onClick:b?e=>{n?.(t),h?I(!1):(e.preventDefault(),I())}:()=>{n?.(t)},"aria-current":_?"page":void 0,"aria-expanded":b?!A:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(P,{categoryLabel:u,onClick:e=>{e.preventDefault(),I()}})),a.createElement(L.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:A},a.createElement(V,{items:m,tabIndex:A?-1:0,onItemClick:n,activePath:o,level:c+1})))}var W=n(6654),D=n(3186);const z="menuExternalLink_NmtK";function U(e){let{item:t,onItemClick:n,activePath:o,level:c,index:s,...d}=e;const{href:m,label:u,className:b,autoAddBaseUrl:p}=t,h=(0,i.w8)(t,o),E=(0,W.A)(m);return a.createElement("li",{className:(0,l.A)(r.G.docs.docSidebarItemLink,r.G.docs.docSidebarItemLinkLevel(c),"menu__list-item",b),key:u},a.createElement(G.A,(0,C.A)({className:(0,l.A)("menu__link",!E&&z,{"menu__link--active":h}),autoAddBaseUrl:p,"aria-current":h?"page":void 0,to:m},E&&{onClick:n?()=>n(t):void 0},d),u,!E&&a.createElement(D.A,null)))}const R="menuHtmlItem_M9Kj";function j(e){let{item:t,level:n,index:o}=e;const{value:c,defaultStyle:i,className:s}=t;return a.createElement("li",{className:(0,l.A)(r.G.docs.docSidebarItemLink,r.G.docs.docSidebarItemLinkLevel(n),i&&[R,"menu__list-item"],s),key:o,dangerouslySetInnerHTML:{__html:c}})}function K(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(H,(0,C.A)({item:t},n));case"html":return a.createElement(j,(0,C.A)({item:t},n));default:return a.createElement(U,(0,C.A)({item:t},n))}}function q(e){let{items:t,...n}=e;return a.createElement(M,null,t.map(((e,t)=>a.createElement(K,(0,C.A)({key:t,item:e,index:t},n)))))}const V=(0,a.memo)(q),Y="menu_SIkG",O="menuWithAnnouncementBar_GW3s";function X(e){let{path:t,sidebar:n,className:o}=e;const c=function(){const{isActive:e}=(0,T.Mj)(),[t,n]=(0,a.useState)(e);return(0,b.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{className:(0,l.A)("menu thin-scrollbar",Y,c&&O,o)},a.createElement("ul",{className:(0,l.A)(r.G.docs.docSidebarMenu,"menu__list")},a.createElement(V,{items:n,activePath:t,level:1})))}const Z="sidebar_njMd",$="sidebarWithHideableNavbar_wUlq",J="sidebarHidden_VK0M",Q="sidebarLogo_isFc";function ee(e){let{path:t,sidebar:n,onCollapse:o,isHidden:r}=e;const{navbar:{hideOnScroll:c},docs:{sidebar:{hideable:i}}}=(0,v.p)();return a.createElement("div",{className:(0,l.A)(Z,c&&$,r&&J)},c&&a.createElement(A.A,{tabIndex:-1,className:Q}),a.createElement(X,{path:t,sidebar:n}),i&&a.createElement(I,{onClick:o}))}const te=a.memo(ee);var ne=n(5600),ae=n(9876);const le=e=>{let{sidebar:t,path:n}=e;const o=(0,ae.M)();return a.createElement("ul",{className:(0,l.A)(r.G.docs.docSidebarMenu,"menu__list")},a.createElement(V,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&o.toggle(),"link"===e.type&&o.toggle()},level:1}))};function oe(e){return a.createElement(ne.GX,{component:le,props:e})}const re=a.memo(oe);function ce(e){const t=(0,_.l)(),n="desktop"===t||"ssr"===t,l="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement(te,e),l&&a.createElement(re,e))}const ie="expandButton_m80_",se="expandButtonIcon_BlDH";function de(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:ie,title:(0,u.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,u.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},a.createElement(k,{className:se}))}const me="docSidebarContainer_b6E3",ue="docSidebarContainerHidden_b3ry";function be(e){let{children:t}=e;const n=(0,d.t)();return a.createElement(a.Fragment,{key:n?.name??"noSidebar"},t)}function pe(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:o}=e;const{pathname:c}=(0,g.zy)(),[i,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{i&&s(!1),o((e=>!e))}),[o,i]);return a.createElement("aside",{className:(0,l.A)(r.G.docs.docSidebarContainer,me,n&&ue),onTransitionEnd:e=>{e.currentTarget.classList.contains(me)&&n&&s(!0)}},a.createElement(be,null,a.createElement(ce,{sidebar:t,path:c,onCollapse:d,isHidden:i})),i&&a.createElement(de,{toggleSidebar:d}))}const he={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"};function Ee(e){let{hiddenSidebarContainer:t,children:n}=e;const o=(0,d.t)();return a.createElement("main",{className:(0,l.A)(he.docMainContainer,(t||!o)&&he.docMainContainerEnhanced)},a.createElement("div",{className:(0,l.A)("container padding-top--md padding-bottom--lg",he.docItemWrapper,t&&he.docItemWrapperEnhanced)},n))}const fe="docPage__5DB",ge="docsWrapper_BCFX";function _e(e){let{children:t}=e;const n=(0,d.t)(),[l,o]=(0,a.useState)(!1);return a.createElement(m.A,{wrapperClassName:ge},a.createElement(f,null),a.createElement("div",{className:fe},n&&a.createElement(pe,{sidebar:n.items,hiddenSidebarContainer:l,setHiddenSidebarContainer:o}),a.createElement(Ee,{hiddenSidebarContainer:l},t)))}var ve=n(1774),Ae=n(1463);function Ce(e){const{versionMetadata:t}=e;return a.createElement(a.Fragment,null,a.createElement(Ae.A,{version:t.version,tag:(0,c.tU)(t.pluginId,t.version)}),a.createElement(o.be,null,t.noIndex&&a.createElement("meta",{name:"robots",content:"noindex, nofollow"})))}function ke(e){const{versionMetadata:t}=e,n=(0,i.mz)(e);if(!n)return a.createElement(ve.default,null);const{docElement:c,sidebarName:m,sidebarItems:u}=n;return a.createElement(a.Fragment,null,a.createElement(Ce,e),a.createElement(o.e3,{className:(0,l.A)(r.G.wrapper.docsPages,r.G.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.n,{version:t},a.createElement(d.V,{name:m,items:u},a.createElement(_e,null,c)))))}},1774:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(6540),l=n(1312),o=n(9024),r=n(5933);function c(){return a.createElement(a.Fragment,null,a.createElement(o.be,{title:(0,l.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.A,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"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/1dc6b685.1bd2feeb.js b/assets/js/1dc6b685.1bd2feeb.js new file mode 100644 index 0000000..3af16e1 --- /dev/null +++ b/assets/js/1dc6b685.1bd2feeb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[3414],{5680:(e,n,t)=>{t.d(n,{xA:()=>p,yg:()=>m});var r=t(6540);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n =0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r =0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=r.createContext({}),l=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=l(e.components);return r.createElement(c.Provider,{value:n},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},y=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(t),y=a,m=d["".concat(c,".").concat(y)]||d[y]||u[y]||o;return t?r.createElement(m,i(i({ref:n},p),{},{components:t})):r.createElement(m,i({ref:n},p))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=y;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[d]="string"==typeof e?e:a,i[1]=s;for(var l=2;l {t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var r=t(9668),a=(t(6540),t(5680));const o={sidebar_position:1},i="Summary",s={unversionedId:"intro",id:"version-2.5.1/intro",title:"Summary",description:"This command line help you create your React Native project in a easy and useful structure by creating components and screens in separate folders in order to distinguish between them. It also make it easier to create navigations for your screens without writing a single line of code.",source:"@site/versioned_docs/version-2.5.1/intro.md",sourceDirName:".",slug:"/intro",permalink:"/react-native-help-create/docs/2.5.1/intro",draft:!1,tags:[],version:"2.5.1",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Getting Started",permalink:"/react-native-help-create/docs/2.5.1/getting-started"}},c={},l=[],p={toc:l};function d(e){let{components:n,...t}=e;return(0,a.yg)("wrapper",(0,r.A)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"summary"},"Summary"),(0,a.yg)("p",null,"This command line help you create your React Native project in a easy and useful structure by creating components and screens in separate folders in order to distinguish between them. It also make it easier to create navigations for your screens without writing a single line of code."),(0,a.yg)("p",null,"The following project structure is used by this command:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre"},"src/\n\u251c\u2500\u2500 components\n\u2502\xa0\xa0 \u251c\u2500\u2500 comp-one\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 __tests__\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.tsx\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 index.tsx\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 styles.ts\n\u2502\xa0\xa0 \u251c\u2500\u2500 comp-two\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 __tests__\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.tsx\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 index.tsx\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 styles.ts\n\u2502\xa0\xa0 \u2514\u2500\u2500 folder\n\u2502\xa0\xa0 \u2514\u2500\u2500 comp-three\n\u2502\xa0\xa0 \u251c\u2500\u2500 __tests__\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.tsx\n\u2502\xa0\xa0 \u251c\u2500\u2500 index.tsx\n\u2502\xa0\xa0 \u2514\u2500\u2500 styles.ts\n\u251c\u2500\u2500 redux\n\u2502\xa0\xa0 \u251c\u2500\u2500 actions\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 general\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.ts\n\u2502\xa0\xa0 \u251c\u2500\u2500 index.ts\n\u2502\xa0\xa0 \u2514\u2500\u2500 reducers\n\u2502\xa0\xa0 \u251c\u2500\u2500 general\n\u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.ts\n\u2502\xa0\xa0 \u2514\u2500\u2500 index.ts\n\u2514\u2500\u2500 screens\n \u251c\u2500\u2500 folder\n \u2502\xa0\xa0 \u251c\u2500\u2500 navigation.tsx\n \u2502\xa0\xa0 \u251c\u2500\u2500 screen-four\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 __tests__\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.tsx\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u251c\u2500\u2500 index.tsx\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 styles.ts\n \u2502\xa0\xa0 \u2514\u2500\u2500 screen-three\n \u2502\xa0\xa0 \u251c\u2500\u2500 __tests__\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.tsx\n \u2502\xa0\xa0 \u251c\u2500\u2500 index.tsx\n \u2502\xa0\xa0 \u2514\u2500\u2500 styles.ts\n \u251c\u2500\u2500 navigation.tsx\n \u251c\u2500\u2500 screen-one\n \u2502\xa0\xa0 \u251c\u2500\u2500 __tests__\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.tsx\n \u2502\xa0\xa0 \u251c\u2500\u2500 index.tsx\n \u2502\xa0\xa0 \u2514\u2500\u2500 styles.ts\n \u2514\u2500\u2500 screen-two\n \u251c\u2500\u2500 __tests__\n \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.tsx\n \u251c\u2500\u2500 index.tsx\n \u2514\u2500\u2500 styles.ts\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"As you can see above, the ",(0,a.yg)("inlineCode",{parentName:"p"},"src")," folder is the folder that resides at the root of your React Native project and under this folder, you will find the ",(0,a.yg)("inlineCode",{parentName:"p"},"components")," folder which contains all the shared components that are used through out the screen. The ",(0,a.yg)("inlineCode",{parentName:"p"},"screens")," folder contains the app's screens that can uses some of the shared components above it.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"In each component you will find ",(0,a.yg)("inlineCode",{parentName:"p"},"index.tsx")," that contains the components ",(0,a.yg)("inlineCode",{parentName:"p"},"JSX.Element")," syntaxes, and ",(0,a.yg)("inlineCode",{parentName:"p"},"styles.ts")," that contains the styles for that component.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"In each screen you will find ",(0,a.yg)("inlineCode",{parentName:"p"},"index.tsx")," that contains the ",(0,a.yg)("inlineCode",{parentName:"p"},"JSX.Element")," syntaxes, and ",(0,a.yg)("inlineCode",{parentName:"p"},"styles.ts")," that contains the screen's styles and ",(0,a.yg)("inlineCode",{parentName:"p"},"functions")," folder which will contain the screen's specific functions.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"Each screen can use one of the shared components that are defined in ",(0,a.yg)("inlineCode",{parentName:"p"},"components")," folder, and you can pass the functions to those components hence there is not ",(0,a.yg)("inlineCode",{parentName:"p"},"functions")," folder under a component subfolder.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"For the ",(0,a.yg)("inlineCode",{parentName:"p"},"screens")," part you can find ",(0,a.yg)("inlineCode",{parentName:"p"},"navigation.tsx")," files that shows the relation between the screens that resides in the same folder. For example, the ",(0,a.yg)("inlineCode",{parentName:"p"},"navigation.tsx")," under the ",(0,a.yg)("inlineCode",{parentName:"p"},"screens")," folder represent a stack navigation between ",(0,a.yg)("inlineCode",{parentName:"p"},"folder")," and ",(0,a.yg)("inlineCode",{parentName:"p"},"screen-one")," and ",(0,a.yg)("inlineCode",{parentName:"p"},"screen-two"),". As for the ",(0,a.yg)("inlineCode",{parentName:"p"},"navigation.tsx")," file under the ",(0,a.yg)("inlineCode",{parentName:"p"},"folder")," folder is represent a drawer navigation between ",(0,a.yg)("inlineCode",{parentName:"p"},"screen-three")," and ",(0,a.yg)("inlineCode",{parentName:"p"},"screen-four"),".")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"In both the ",(0,a.yg)("inlineCode",{parentName:"p"},"components")," and ",(0,a.yg)("inlineCode",{parentName:"p"},"screens")," folders, you can find ",(0,a.yg)("inlineCode",{parentName:"p"},"__tests__")," folder that contains the tests for the component or screen.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"As for the ",(0,a.yg)("inlineCode",{parentName:"p"},"redux")," folder you can see there is ",(0,a.yg)("inlineCode",{parentName:"p"},"index.ts")," which contain the redux store, and ",(0,a.yg)("inlineCode",{parentName:"p"},"actions")," and ",(0,a.yg)("inlineCode",{parentName:"p"},"reducers")," folders are next to it so you can find only things that are related to redux in one single place.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"This command line can write code in both JavaScript and TypeScript. By default it will use the used language for your React Native project and of course you can override the used language using one of its options.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"You can override the usage of the default behavior of this command line by modifying the ",(0,a.yg)("inlineCode",{parentName:"p"},"rnhc.config.json")," file (more details can be found ",(0,a.yg)("a",{parentName:"p",href:"./create/using-configuration"},"here"),")."))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1df93b7f.f4070723.js b/assets/js/1df93b7f.f4070723.js new file mode 100644 index 0000000..acfefef --- /dev/null +++ b/assets/js/1df93b7f.f4070723.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[4583],{5579:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var a=n(5260),r=n(9668),c=n(6540),l=n(53);const o="features_t9lD",m=[{title:"Easy to Use",description:c.createElement(c.Fragment,null,c.createElement("code",null,"rnhc")," was designed to make your development process easier for your react native project.")},{title:"Focus on What Matters",description:c.createElement(c.Fragment,null,c.createElement("code",null,"rnhc")," lets you focus on your code more than on the project structure itself.")},{title:"Easy to Learn",description:c.createElement(c.Fragment,null,c.createElement("code",null,"rnhc")," is easy to learn and you can learn it in a few minutes.")}];function i(e){let{title:t,description:n}=e;return c.createElement("div",{className:(0,l.A)("col col--4")},c.createElement("div",{className:"text--center"}),c.createElement("div",{className:"text--center padding-horiz--md"},c.createElement("h3",null,t),c.createElement("p",null,n)))}function s(){return c.createElement("section",{className:o},c.createElement("div",{className:"container"},c.createElement("div",{className:"row"},m.map(((e,t)=>c.createElement(i,(0,r.A)({key:t},e)))))))}var u=n(5933),d=n(5489);const E="heroBanner_qdFl",h="buttons_AeoN",p="logo_Ukns";var g=n(4586);function f(){const{siteConfig:e}=(0,g.A)();return c.createElement("header",{className:(0,l.A)("hero hero--primary",E)},c.createElement("div",{className:"container"},c.createElement("h1",{className:"hero__title"},e.title),c.createElement("p",{className:"hero__subtitle"},e.tagline),c.createElement("div",{className:h},c.createElement(d.A,{className:"button button--secondary button--lg",to:"/docs/intro"},"Go to rnhc tutorial \u2192"))))}function v(){const{siteConfig:e}=(0,g.A)();return c.createElement(u.A,{title:`${e.title} docs`,description:"Documentation for rnhc, a command line to help you create components, screens, navigations and even redux implementation for your react native project"},c.createElement(a.A,null,c.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),c.createElement("meta",{name:"og:site_name",content:e.title}),c.createElement("meta",{name:"og:title",content:e.title}),c.createElement("meta",{name:"description",content:"Documentation for rnhc, a command line to help you create components, screens, navigations and even redux implementation for your react native project"}),c.createElement("meta",{name:"og:image",content:`${e.baseUrl}img/rnhc-logo.png`}),c.createElement("link",{rel:"icon",href:`${e.baseUrl}img/favicon.ico`})),c.createElement(f,null),c.createElement("main",null,c.createElement("img",{className:p,src:`${e.baseUrl}img/rnhc-logo.png`,alt:"rnhc logo",width:"27%"}),c.createElement(s,null)))}}}]); \ No newline at end of file diff --git a/assets/js/1f05f735.c677a78f.js b/assets/js/1f05f735.c677a78f.js new file mode 100644 index 0000000..f19dd11 --- /dev/null +++ b/assets/js/1f05f735.c677a78f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[6550],{5680:(e,t,n)=>{n.d(t,{xA:()=>d,yg:()=>f});var r=n(6540);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t =0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r =0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=s(n),g=i,f=p["".concat(c,".").concat(g)]||p[g]||u[g]||a;return n?r.createElement(f,l(l({ref:t},d),{},{components:n})):r.createElement(f,l({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,l=new Array(a);l[0]=g;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[p]="string"==typeof e?e:i,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>s});var r=n(9668),i=(n(6540),n(5680));const a={sidebar_position:4},l="Delete Navigations",o={unversionedId:"delete/delete-navigations",id:"version-2.3.4/delete/delete-navigations",title:"Delete Navigations",description:"Delete the root Navigation",source:"@site/versioned_docs/version-2.3.4/delete/delete-navigations.md",sourceDirName:"delete",slug:"/delete/delete-navigations",permalink:"/react-native-help-create/docs/2.3.4/delete/delete-navigations",draft:!1,tags:[],version:"2.3.4",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"Delete Screens",permalink:"/react-native-help-create/docs/2.3.4/delete/delete-screens"},next:{title:"Delete Redux",permalink:"/react-native-help-create/docs/2.3.4/delete/delete-redux"}},c={},s=[{value:"Delete the root Navigation",id:"delete-the-root-navigation",level:2},{value:"Delete a Navigation in a Specific Folder",id:"delete-a-navigation-in-a-specific-folder",level:2}],d={toc:s};function p(e){let{components:t,...n}=e;return(0,i.yg)("wrapper",(0,r.A)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"delete-navigations"},"Delete Navigations"),(0,i.yg)("h2",{id:"delete-the-root-navigation"},"Delete the root Navigation"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"To delete a navigation file that resides in ",(0,i.yg)("inlineCode",{parentName:"li"},"src/screens/")," folder simply run:")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc delete -n\n")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"This will delete the navigation file if it exists, if not ",(0,i.yg)("inlineCode",{parentName:"li"},"rnhc")," will prompt the following:")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"It seems there is no navigation file in src/screens/\n")),(0,i.yg)("h2",{id:"delete-a-navigation-in-a-specific-folder"},"Delete a Navigation in a Specific Folder"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"To delete a navigation file that resides in a specific path that resides under ",(0,i.yg)("inlineCode",{parentName:"li"},"src/screens/")," folder you can run:")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc delete -n -f \n")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"This will delete the navigation file if it does exist under the ",(0,i.yg)("inlineCode",{parentName:"li"},"src/screens/ /")," folder.")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1f391b9e.caa9fae6.js b/assets/js/1f391b9e.caa9fae6.js new file mode 100644 index 0000000..efa9804 --- /dev/null +++ b/assets/js/1f391b9e.caa9fae6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[6061],{1107:(e,n,t)=>{t.d(n,{A:()=>m});var a=t(9668),l=t(6540),i=t(53),r=t(1312),o=t(6342);const c="anchorWithStickyNavbar_LWe7",s="anchorWithHideOnScrollNavbar_WYt5";function m(e){let{as:n,id:t,...m}=e;const{navbar:{hideOnScroll:d}}=(0,o.p)();return"h1"!==n&&t?l.createElement(n,(0,a.A)({},m,{className:(0,i.A)("anchor",d?s:c),id:t}),m.children,l.createElement("a",{className:"hash-link",href:`#${t}`,title:(0,r.T)({id:"theme.common.headingLinkTitle",message:"Direct link to heading",description:"Title for link to heading"})},"\u200b")):l.createElement(n,(0,a.A)({},m,{id:void 0}))}},6886:(e,n,t)=>{t.d(n,{A:()=>R});var a=t(6540),l=t(5680),i=t(9668),r=t(5260);var o=t(7964);var c=t(5489);var s=t(53),m=t(2303),d=t(1422);const u="details_lb9f",f="isBrowser_bmU9",h="collapsibleContent_i85q";function p(e){return!!e&&("SUMMARY"===e.tagName||p(e.parentElement))}function v(e,n){return!!e&&(e===n||v(e.parentElement,n))}function E(e){let{summary:n,children:t,...l}=e;const r=(0,m.A)(),o=(0,a.useRef)(null),{collapsed:c,setCollapsed:E}=(0,d.u)({initialState:!l.open}),[g,A]=(0,a.useState)(l.open);return a.createElement("details",(0,i.A)({},l,{ref:o,open:g,"data-collapsed":c,className:(0,s.A)(u,r&&f,l.className),onMouseDown:e=>{p(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const n=e.target;p(n)&&v(n,o.current)&&(e.preventDefault(),c?(E(!1),A(!0)):E(!0))}}),n??a.createElement("summary",null,"Details"),a.createElement(d.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{E(e),A(!e)}},a.createElement("div",{className:h},t)))}const g="details_b_Ee";function A(e){let{...n}=e;return a.createElement(E,(0,i.A)({},n,{className:(0,s.A)("alert alert--info",g,n.className)}))}var N=t(1107);function b(e){return a.createElement(N.A,e)}const C="containsTaskList_mC6p";const L="img_ev3q";var y=t(7559),x=t(1312);const H="admonition_LlT9",_="admonitionHeading_tbUL",k="admonitionIcon_kALy",T="admonitionContent_S0QG";const z={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("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"}))},label:a.createElement(x.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("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"}))},label:a.createElement(x.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("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"}))},label:a.createElement(x.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("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"}))},label:a.createElement(x.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("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"}))},label:a.createElement(x.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},M={secondary:"note",important:"info",success:"tip",warning:"danger"};function w(e){const{mdxAdmonitionTitle:n,rest:t}=function(e){const n=a.Children.toArray(e),t=n.find((e=>a.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),l=a.createElement(a.Fragment,null,n.filter((e=>e!==t)));return{mdxAdmonitionTitle:t,rest:l}}(e.children);return{...e,title:e.title??n,children:t}}const S={head:function(e){const n=a.Children.map(e.children,(e=>a.isValidElement(e)?function(e){if(e.props?.mdxType&&e.props.originalType){const{mdxType:n,originalType:t,...l}=e.props;return a.createElement(e.props.originalType,l)}return e}(e):e));return a.createElement(r.A,e,n)},code:function(e){const n=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return a.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&n.includes(e.props?.mdxType)))?a.createElement("code",e):a.createElement(o.A,e)},a:function(e){return a.createElement(c.A,e)},pre:function(e){return a.createElement(o.A,(0,a.isValidElement)(e.children)&&"code"===e.children.props?.originalType?e.children.props:{...e})},details:function(e){const n=a.Children.toArray(e.children),t=n.find((e=>a.isValidElement(e)&&"summary"===e.props?.mdxType)),l=a.createElement(a.Fragment,null,n.filter((e=>e!==t)));return a.createElement(A,(0,i.A)({},e,{summary:t}),l)},ul:function(e){return a.createElement("ul",(0,i.A)({},e,{className:(n=e.className,(0,s.A)(n,n?.includes("contains-task-list")&&C))}));var n},img:function(e){return a.createElement("img",(0,i.A)({loading:"lazy"},e,{className:(n=e.className,(0,s.A)(n,L))}));var n},h1:e=>a.createElement(b,(0,i.A)({as:"h1"},e)),h2:e=>a.createElement(b,(0,i.A)({as:"h2"},e)),h3:e=>a.createElement(b,(0,i.A)({as:"h3"},e)),h4:e=>a.createElement(b,(0,i.A)({as:"h4"},e)),h5:e=>a.createElement(b,(0,i.A)({as:"h5"},e)),h6:e=>a.createElement(b,(0,i.A)({as:"h6"},e)),admonition:function(e){const{children:n,type:t,title:l,icon:i}=w(e),r=function(e){const n=M[e]??e,t=z[n];return t||(console.warn(`No admonition config found for admonition type "${n}". Using Info as fallback.`),z.info)}(t),o=l??r.label,{iconComponent:c}=r,m=i??a.createElement(c,null);return a.createElement("div",{className:(0,s.A)(y.G.common.admonition,y.G.common.admonitionType(e.type),"alert",`alert--${r.infimaClassName}`,H)},a.createElement("div",{className:_},a.createElement("span",{className:k},m),o),a.createElement("div",{className:T},n))},mermaid:()=>null};function R(e){let{children:n}=e;return a.createElement(l.xA,{components:S},n)}},7973:(e,n,t)=>{t.r(n),t.d(n,{default:()=>d});var a=t(6540),l=t(53),i=t(9024),r=t(7559),o=t(5933),c=t(6886),s=t(7763);const m="mdxPageWrapper_j9I6";function d(e){const{content:n}=e,{metadata:{title:t,description:d,frontMatter:u}}=n,{wrapperClassName:f,hide_table_of_contents:h}=u;return a.createElement(i.e3,{className:(0,l.A)(f??r.G.wrapper.mdxPages,r.G.page.mdxPage)},a.createElement(i.be,{title:t,description:d}),a.createElement(o.A,null,a.createElement("main",{className:"container container--fluid margin-vert--lg"},a.createElement("div",{className:(0,l.A)("row",m)},a.createElement("div",{className:(0,l.A)("col",!h&&"col--8")},a.createElement("article",null,a.createElement(c.A,null,a.createElement(n,null)))),!h&&n.toc.length>0&&a.createElement("div",{className:"col col--2"},a.createElement(s.A,{toc:n.toc,minHeadingLevel:u.toc_min_heading_level,maxHeadingLevel:u.toc_max_heading_level}))))))}},7763:(e,n,t)=>{t.d(n,{A:()=>c});var a=t(9668),l=t(6540),i=t(53),r=t(5195);const o="tableOfContents_bqdL";function c(e){let{className:n,...t}=e;return l.createElement("div",{className:(0,i.A)(o,"thin-scrollbar",n)},l.createElement(r.A,(0,a.A)({},t,{linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"})))}},5195:(e,n,t)=>{t.d(n,{A:()=>h});var a=t(9668),l=t(6540),i=t(6342);function r(e){const n=e.map((e=>({...e,parentIndex:-1,children:[]}))),t=Array(7).fill(-1);n.forEach(((e,n)=>{const a=t.slice(2,e.level);e.parentIndex=Math.max(...a),t[e.level]=n}));const a=[];return n.forEach((e=>{const{parentIndex:t,...l}=e;t>=0?n[t].children.push(l):a.push(l)})),a}function o(e){let{toc:n,minHeadingLevel:t,maxHeadingLevel:a}=e;return n.flatMap((e=>{const n=o({toc:e.children,minHeadingLevel:t,maxHeadingLevel:a});return function(e){return e.level>=t&&e.level<=a}(e)?[{...e,children:n}]:n}))}function c(e){const n=e.getBoundingClientRect();return n.top===n.bottom?c(e.parentNode):n}function s(e,n){let{anchorTopOffset:t}=n;const a=e.find((e=>c(e).top>=t));if(a){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,l.useRef)(void 0),t=m();(0,l.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:a,linkActiveClassName:l,minHeadingLevel:i,maxHeadingLevel:r}=e;function o(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(a),o=function(e){let{minHeadingLevel:n,maxHeadingLevel:t}=e;const a=[];for(let l=n;l<=t;l+=1)a.push(`h${l}.anchor`);return Array.from(document.querySelectorAll(a.join()))}({minHeadingLevel:i,maxHeadingLevel:r}),c=s(o,{anchorTopOffset:t.current}),m=e.find((e=>c&&c.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(l),e.classList.add(l),n.current=e):e.classList.remove(l)}(e,e===m)}))}return document.addEventListener("scroll",o),document.addEventListener("resize",o),o(),()=>{document.removeEventListener("scroll",o),document.removeEventListener("resize",o)}}),[e,t])}function u(e){let{toc:n,className:t,linkClassName:a,isChild:i}=e;return n.length?l.createElement("ul",{className:i?void 0:t},n.map((e=>l.createElement("li",{key:e.id},l.createElement("a",{href:`#${e.id}`,className:a??void 0,dangerouslySetInnerHTML:{__html:e.value}}),l.createElement(u,{isChild:!0,toc:e.children,className:t,linkClassName:a}))))):null}const f=l.memo(u);function h(e){let{toc:n,className:t="table-of-contents table-of-contents__left-border",linkClassName:c="table-of-contents__link",linkActiveClassName:s,minHeadingLevel:m,maxHeadingLevel:u,...h}=e;const p=(0,i.p)(),v=m??p.tableOfContents.minHeadingLevel,E=u??p.tableOfContents.maxHeadingLevel,g=function(e){let{toc:n,minHeadingLevel:t,maxHeadingLevel:a}=e;return(0,l.useMemo)((()=>o({toc:r(n),minHeadingLevel:t,maxHeadingLevel:a})),[n,t,a])}({toc:n,minHeadingLevel:v,maxHeadingLevel:E});return d((0,l.useMemo)((()=>{if(c&&s)return{linkClassName:c,linkActiveClassName:s,minHeadingLevel:v,maxHeadingLevel:E}}),[c,s,v,E])),l.createElement(f,(0,a.A)({toc:g,className:t,linkClassName:c},h))}}}]); \ No newline at end of file diff --git a/assets/js/1fa58c83.6df8fa16.js b/assets/js/1fa58c83.6df8fa16.js new file mode 100644 index 0000000..c8decfe --- /dev/null +++ b/assets/js/1fa58c83.6df8fa16.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[832],{5680:(e,n,t)=>{t.d(n,{xA:()=>p,yg:()=>y});var r=t(6540);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n =0||(l[t]=e[t]);return l}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r =0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}var c=r.createContext({}),o=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=o(e.components);return r.createElement(c.Provider,{value:n},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,l=e.mdxType,a=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=o(t),m=l,y=d["".concat(c,".").concat(m)]||d[m]||u[m]||a;return t?r.createElement(y,i(i({ref:n},p),{},{components:t})):r.createElement(y,i({ref:n},p))}));function y(e,n){var t=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var a=t.length,i=new Array(a);i[0]=m;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[d]="string"==typeof e?e:l,i[1]=s;for(var o=2;o{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>o});var r=t(9668),l=(t(6540),t(5680));const a={sidebar_position:3},i="Delete Screens",s={unversionedId:"delete/delete-screens",id:"version-2.3.4/delete/delete-screens",title:"Delete Screens",description:"Delete a Screen",source:"@site/versioned_docs/version-2.3.4/delete/delete-screens.md",sourceDirName:"delete",slug:"/delete/delete-screens",permalink:"/react-native-help-create/docs/2.3.4/delete/delete-screens",draft:!1,tags:[],version:"2.3.4",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Delete Components",permalink:"/react-native-help-create/docs/2.3.4/delete/delete-components"},next:{title:"Delete Navigations",permalink:"/react-native-help-create/docs/2.3.4/delete/delete-navigations"}},c={},o=[{value:"Delete a Screen",id:"delete-a-screen",level:2},{value:"Delete multiple Screens",id:"delete-multiple-screens",level:2},{value:"Delete a Screens in a Specific Folder",id:"delete-a-screens-in-a-specific-folder",level:2}],p={toc:o};function d(e){let{components:n,...t}=e;return(0,l.yg)("wrapper",(0,r.A)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,l.yg)("h1",{id:"delete-screens"},"Delete Screens"),(0,l.yg)("h2",{id:"delete-a-screen"},"Delete a Screen"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},"To delete a screen simply run:")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc delete -s \n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},"This will delete the screen with the given name ",(0,l.yg)("inlineCode",{parentName:"p"}," ")," under the ",(0,l.yg)("inlineCode",{parentName:"p"},"src/screens/")," folder.")),(0,l.yg)("li",{parentName:"ul"},(0,l.yg)("p",{parentName:"li"},"If the screen does not exist, ",(0,l.yg)("inlineCode",{parentName:"p"},"rnhc")," will prompt the following:"))),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-sh"},"src/screens/ / does not exist\n")),(0,l.yg)("h2",{id:"delete-multiple-screens"},"Delete multiple Screens"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},"To delete multiple screens run:")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc delete -s ...\n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},"This will delete only the existed screens with the given inputs that resides under the ",(0,l.yg)("inlineCode",{parentName:"li"},"src/screens/")," folder.")),(0,l.yg)("h2",{id:"delete-a-screens-in-a-specific-folder"},"Delete a Screens in a Specific Folder"),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},"To delete one or multiple screens that resides in a specific path under the ",(0,l.yg)("inlineCode",{parentName:"li"},"src/screens/")," folder, you can run:")),(0,l.yg)("pre",null,(0,l.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc delete -s ... -f \n")),(0,l.yg)("ul",null,(0,l.yg)("li",{parentName:"ul"},"This will delete only the existed screens with the given inputs that resides under the ",(0,l.yg)("inlineCode",{parentName:"li"},"src/screens/ /")," folder.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/21584035.6d674915.js b/assets/js/21584035.6d674915.js new file mode 100644 index 0000000..cdc8291 --- /dev/null +++ b/assets/js/21584035.6d674915.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[2223],{9365:(e,n,t)=>{t.d(n,{A:()=>i});var a=t(6540),r=t(53);const l="tabItem_Ymn6";function i(e){let{children:n,hidden:t,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.A)(l,i),hidden:t},n)}},4865:(e,n,t)=>{t.d(n,{A:()=>m});var a=t(9668),r=t(6540),l=t(53),i=t(2303),o=t(1682),u=t(6976),c=t(3104);const s="tabList__CuJ",d="tabItem_LNqP";function p(e){const{lazy:n,block:t,defaultValue:i,values:p,groupId:m,className:g}=e,y=r.Children.map(e.children,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})),h=p??y.map((e=>{let{props:{value:n,label:t,attributes:a}}=e;return{value:n,label:t,attributes:a}})),x=(0,o.X)(h,((e,n)=>e.value===n.value));if(x.length>0)throw new Error(`Docusaurus error: Duplicate values "${x.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`);const T=null===i?i:i??y.find((e=>e.props.default))?.props.value??y[0].props.value;if(null!==T&&!h.some((e=>e.value===T)))throw new Error(`Docusaurus error: The has a defaultValue "${T}" but none of its children has the corresponding value. Available values are: ${h.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);const{tabGroupChoices:f,setTabGroupChoices:A}=(0,u.x)(),[N,b]=(0,r.useState)(T),v=[],{blockElementScrollPositionUntilNextRender:C}=(0,c.a_)();if(null!=m){const e=f[m];null!=e&&e!==N&&h.some((n=>n.value===e))&&b(e)}const w=e=>{const n=e.currentTarget,t=v.indexOf(n),a=h[t].value;a!==N&&(C(n),b(a),null!=m&&A(m,String(a)))},k=e=>{let n=null;switch(e.key){case"Enter":w(e);break;case"ArrowRight":{const t=v.indexOf(e.currentTarget)+1;n=v[t]??v[0];break}case"ArrowLeft":{const t=v.indexOf(e.currentTarget)-1;n=v[t]??v[v.length-1];break}}n?.focus()};return r.createElement("div",{className:(0,l.A)("tabs-container",s)},r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.A)("tabs",{"tabs--block":t},g)},h.map((e=>{let{value:n,label:t,attributes:i}=e;return r.createElement("li",(0,a.A)({role:"tab",tabIndex:N===n?0:-1,"aria-selected":N===n,key:n,ref:e=>v.push(e),onKeyDown:k,onClick:w},i,{className:(0,l.A)("tabs__item",d,i?.className,{"tabs__item--active":N===n})}),t??n)}))),n?(0,r.cloneElement)(y.filter((e=>e.props.value===N))[0],{className:"margin-top--md"}):r.createElement("div",{className:"margin-top--md"},y.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==N})))))}function m(e){const n=(0,i.A)();return r.createElement(p,(0,a.A)({key:String(n)},e))}},413:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>g,frontMatter:()=>u,metadata:()=>s,toc:()=>p});var a=t(9668),r=(t(6540),t(5680)),l=t(4865),i=t(9365),o=t(7964);const u={sidebar_position:6},c="Create Redux",s={unversionedId:"create/create-redux",id:"create/create-redux",title:"Create Redux",description:"To create a redux implementation run:",source:"@site/docs/create/create-redux.mdx",sourceDirName:"create",slug:"/create/create-redux",permalink:"/react-native-help-create/docs/create/create-redux",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"Using Templates",permalink:"/react-native-help-create/docs/create/using-templates"},next:{title:"Using Configuration",permalink:"/react-native-help-create/docs/create/using-configuration"}},d={},p=[{value:"Create a reducer",id:"create-a-reducer",level:2},{value:"Example",id:"example",level:3},{value:"Create multiple reducers",id:"create-multiple-reducers",level:2},{value:"Create an action",id:"create-an-action",level:2},{value:"Example",id:"example-1",level:3},{value:"Create multiple actions",id:"create-multiple-actions",level:2}],m={toc:p};function g(e){let{components:n,...t}=e;return(0,r.yg)("wrapper",(0,a.A)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"create-redux"},"Create Redux"),(0,r.yg)("p",null,"To create a redux implementation run:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -r\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"This will create a ",(0,r.yg)("inlineCode",{parentName:"li"},"redux")," folder under the ",(0,r.yg)("inlineCode",{parentName:"li"},"src/")," folder containing the following:")),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{mdxType:"CodeBlock"},"src/\n\u2514\u2500\u2500 redux\n \u251c\u2500\u2500 actions\n \u2502 \u2514\u2500\u2500 general\n \u2502 \u2514\u2500\u2500 index.js\n \u251c\u2500\u2500 index.js\n \u2514\u2500\u2500 reducers\n \u251c\u2500\u2500 general\n \u2502 \u2514\u2500\u2500 index.js\n \u2514\u2500\u2500 index.js")),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{mdxType:"CodeBlock"},"src/\n\u2514\u2500\u2500 redux\n \u251c\u2500\u2500 actions\n \u2502 \u2514\u2500\u2500 general\n \u2502 \u2514\u2500\u2500 index.ts\n \u251c\u2500\u2500 index.ts\n \u2514\u2500\u2500 reducers\n \u251c\u2500\u2500 general\n \u2502 \u2514\u2500\u2500 index.ts\n \u2514\u2500\u2500 index.ts"))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"Where ",(0,r.yg)("inlineCode",{parentName:"li"},"index.*")," under the ",(0,r.yg)("inlineCode",{parentName:"li"},"redux")," folder contains the redux store definition:")),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{language:"js",mdxType:"CodeBlock"},'import { applyMiddleware, compose, createStore } from "redux";\n\nimport { mainReducer } from "./reducers";\nimport thunk from "redux-thunk";\n\n/**\n * the main redux state, with all the reducers\n */\nexport const mainStore = createStore(\n mainReducer,\n compose(applyMiddleware(thunk))\n);\n\n/**\n * Creates a new redux state each time this function is called, this is used only for unit tests, to ensure that we have fresh state on each individual test\n */\nexport const createMainStore = () => {\n return createStore(mainReducer, compose(applyMiddleware(thunk)));\n};\n')),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{language:"ts",mdxType:"CodeBlock"},'import { applyMiddleware, compose, createStore } from "redux";\nimport thunk, { ThunkAction, ThunkDispatch } from "redux-thunk";\n\nimport { mainReducer } from "./reducers";\n\n/**\n * the main redux state, with all the reducers\n */\nexport const mainStore = createStore(\n mainReducer,\n compose(applyMiddleware(thunk))\n);\n\n/**\n * Creates a new redux state each time this function is called, this is used only for unit tests, to ensure that we have fresh state on each individual test\n */\nexport const createMainStore = () => {\n return createStore(mainReducer, compose(applyMiddleware(thunk)));\n};\n\nexport type StateInterface = ReturnType ;\n\n/**\n * list of action types\n */\nexport type ActionType = "UPDATE_GENERAL";\n\nexport interface Action {\n type: ActionType;\n payload: Partial ;\n}\nexport type ThunkResult<\n A = Record ,\n E = Record \n> = ThunkAction >;\n\nexport type Dispatch = ThunkDispatch<\n StateInterface,\n Record ,\n Action\n>;\n'))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"And ",(0,r.yg)("inlineCode",{parentName:"p"},"actions")," folder contains the action for each reducer, as for a example, at first ",(0,r.yg)("inlineCode",{parentName:"p"},"rnhc")," will create a sample reducer and action which is called ",(0,r.yg)("inlineCode",{parentName:"p"},"general"),".")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"The ",(0,r.yg)("inlineCode",{parentName:"p"},"general")," action's ",(0,r.yg)("inlineCode",{parentName:"p"},"index.*")," contains:"))),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{language:"js",mdxType:"CodeBlock"},'// write your general actions here\n\n// this is an example for an action\nexport const initAction = () => async (dispatch, getState) => {\n dispatch({ type: "UPDATE_GENERAL", payload: { message: "init created!" } })\n};\n')),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{language:"ts",mdxType:"CodeBlock"},'import { GeneralState } from "../../reducers/general";\nimport { ThunkResult } from "../..";\n\n// write your general actions here\n\n// this is an example for an action\nexport const initAction =\n (): ThunkResult => async (dispatch, getState) => {\n dispatch({ type: "UPDATE_GENERAL", payload: { message: "init created!" } });\n };\n'))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"And the ",(0,r.yg)("inlineCode",{parentName:"li"},"general")," reducer's ",(0,r.yg)("inlineCode",{parentName:"li"},"index.*")," contains:")),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{language:"js",mdxType:"CodeBlock"},'const initialState = { message: "" };\n\nexport const general = (\n state = initialState,\n action,\n) => {\n switch (action.type) {\n case "UPDATE_GENERAL":\n return { ...state, ...action.payload };\n default:\n return state;\n }\n};\n')),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{language:"ts",mdxType:"CodeBlock"},'import { Action } from "../..";\n\nexport interface GeneralState {\n message: string;\n}\n\nexport const general = (\n state: GeneralState = {\n message: "",\n },\n action: Action \n) => {\n switch (action.type) {\n case "UPDATE_GENERAL":\n return { ...state, ...action.payload };\n default:\n return state;\n }\n};\n'))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"And the ",(0,r.yg)("inlineCode",{parentName:"li"},"index.*")," file under the ",(0,r.yg)("inlineCode",{parentName:"li"},"reducers")," folder contains the following:")),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{language:"js",mdxType:"CodeBlock"},'import { combineReducers } from "redux";\nimport { general } from "./general";\n\nexport const mainReducer = combineReducers({\n general,\n});\n')),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{language:"ts",mdxType:"CodeBlock"},'import { combineReducers } from "redux";\nimport { general } from "./general";\n\nexport const mainReducer = combineReducers({\n general,\n});\n'))),(0,r.yg)("h1",{id:"reducers"},"Reducers"),(0,r.yg)("h2",{id:"create-a-reducer"},"Create a reducer"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create a reducer, you must have a redux implementation then run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --reducer \n")),(0,r.yg)("h3",{id:"example"},"Example"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --reducer auth\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"This will create a ",(0,r.yg)("inlineCode",{parentName:"li"},"auth")," reducer under the ",(0,r.yg)("inlineCode",{parentName:"li"},"src/redux/reducers/")," folder and the ",(0,r.yg)("inlineCode",{parentName:"li"},"index.*")," for this reducer will contain the same code written in the template.")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/reducers/auth/index.*")),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{language:"js",mdxType:"CodeBlock"},"const initialState = { };\n\nexport const auth = (\n state = initialState,\n action,\n) => {\n switch (action.type) {\n default:\n return state;\n }\n};\n")),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{language:"ts",mdxType:"CodeBlock"},'import { Action } from "../..";\n\nexport interface AuthState { }\n\nexport const auth = (\n state: AuthState = { },\n action: Action ,\n) => {\n switch (action.type) {\n default:\n return state;\n }\n};\n'))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"It will also add the reducer to the ",(0,r.yg)("inlineCode",{parentName:"li"},"index.*")," file under the ",(0,r.yg)("inlineCode",{parentName:"li"},"reducers")," folder to use it in the ",(0,r.yg)("inlineCode",{parentName:"li"},"combineReducers")," function.")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/reducers/index.*")),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{language:"js",mdxType:"CodeBlock"},'import { combineReducers } from "redux";\nimport { auth } from "./auth";\nimport { general } from "./general";\n\nexport const mainReducer = combineReducers({\n auth,\n general,\n});\n')),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{language:"ts",mdxType:"CodeBlock"},'import { combineReducers } from "redux";\nimport { auth } from "./auth";\nimport { general } from "./general";\n\nexport const mainReducer = combineReducers({\n auth,\n general,\n});\n'))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"If you don't have a redux implementation create using ",(0,r.yg)("inlineCode",{parentName:"li"},"rnhc create -r"),", this command will prompt:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"Redux implementation does not exist\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"You can also overwrite the reducer by running:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --reducer -o\n")),(0,r.yg)("h2",{id:"create-multiple-reducers"},"Create multiple reducers"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create multiple reducers, you must have a redux implementation then run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --reducer ...\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"This will also update your ",(0,r.yg)("inlineCode",{parentName:"li"},"index.*")," file under the ",(0,r.yg)("inlineCode",{parentName:"li"},"reducers")," folder to use the reducers you created.")),(0,r.yg)("h1",{id:"actions"},"Actions"),(0,r.yg)("h2",{id:"create-an-action"},"Create an action"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create an action, you must have a redux implementation as wee as the reducer you want to add an action for it, then run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --action \n")),(0,r.yg)("h3",{id:"example-1"},"Example"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"In this example we are going to create an action for the ",(0,r.yg)("inlineCode",{parentName:"li"},"auth")," reducer, so we will run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --action auth login\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"This will create a ",(0,r.yg)("inlineCode",{parentName:"li"},"login")," action under the ",(0,r.yg)("inlineCode",{parentName:"li"},"src/redux/actions/auth/")," folder and the ",(0,r.yg)("inlineCode",{parentName:"li"},"login.*")," for this action will contain the same code written in the template.")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/actions/auth/login.*")),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{language:"js",mdxType:"CodeBlock"},'export const loginAction = () => async (dispatch, getState) => {\n dispatch({ type: "AUTH_LOGIN", payload: { } })\n}\n')),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{language:"ts",mdxType:"CodeBlock"},'import { AuthState } from "../../reducers/auth";\nimport { ThunkResult } from "../..";\n\nexport const loginAction = (): ThunkResult => async (dispatch, getState) => {\n dispatch({ type: "AUTH_LOGIN", payload: { } })\n}\n'))),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"And it will update the ",(0,r.yg)("inlineCode",{parentName:"li"},"index.*")," file under ",(0,r.yg)("inlineCode",{parentName:"li"},"src/redux/actions/auth/")," to export the action.")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/actions/auth/index.*")),(0,r.yg)(l.A,{groupId:"language",mdxType:"Tabs"},(0,r.yg)(i.A,{value:"js",label:"JavaScript",default:!0,mdxType:"TabItem"},(0,r.yg)(o.A,{language:"js",mdxType:"CodeBlock"},'export { loginAction } from "./login";\n')),(0,r.yg)(i.A,{value:"ts",label:"TypeScript",mdxType:"TabItem"},(0,r.yg)(o.A,{language:"ts",mdxType:"CodeBlock"},'export { loginAction } from "./login";\n'))),(0,r.yg)("h2",{id:"create-multiple-actions"},"Create multiple actions"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create multiple actions, you must have a redux implementation and existed reducer, then run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --action ...\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"If the reducer doesn't exist, you will get an error like this:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"./src/redux/reducers/x does not exist\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"Keep in mind that this also works for TypeScript projects. Even better when creating an action for a reducer in TypeScript, you will get TypeScript support as well as updating the ",(0,r.yg)("inlineCode",{parentName:"li"},"ActionType")," in the ",(0,r.yg)("inlineCode",{parentName:"li"},"src/redux/index.ts")," file. For example if you create an action for the ",(0,r.yg)("inlineCode",{parentName:"li"},"auth")," reducer, you will get the following:")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/index.ts")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-ts"},'import { applyMiddleware, compose, createStore } from "redux";\nimport thunk, { ThunkAction, ThunkDispatch } from "redux-thunk";\n\nimport { mainReducer } from "./reducers";\n\n/**\n * the main redux state, with all the reducers\n */\nexport const mainStore = createStore(\n mainReducer,\n compose(applyMiddleware(thunk))\n);\n\n/**\n * Creates a new redux state each time this function is called, this is used only for unit tests, to ensure that we have fresh state on each individual test\n */\nexport const createMainStore = () => {\n return createStore(mainReducer, compose(applyMiddleware(thunk)));\n};\n\nexport type StateInterface = ReturnType ;\n\n/**\n * list of action types\n */\nexport type ActionType = "AUTH_LOGIN" | "UPDATE_GENERAL";\n\nexport interface Action {\n type: ActionType;\n payload: Partial ;\n}\nexport type ThunkResult<\n A = Record ,\n E = Record \n> = ThunkAction >;\n\nexport type Dispatch = ThunkDispatch<\n StateInterface,\n Record ,\n Action\n>;\n')),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"It will also update the necessary files that imports and exports modules in order to use the action in the reducer.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"Also another note, if you prefer not using ",(0,r.yg)("inlineCode",{parentName:"p"},"redux-thunk")," you can set that in ",(0,r.yg)("inlineCode",{parentName:"p"},"rnhc.config.json")," file, this will let you create your store and actions without applying the ",(0,r.yg)("inlineCode",{parentName:"p"},"redux-thunk")," middleware (For more details check ",(0,r.yg)("a",{parentName:"p",href:"./using-configuration"},"configuration section"),")."))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/25116770.4e87a44c.js b/assets/js/25116770.4e87a44c.js new file mode 100644 index 0000000..482439d --- /dev/null +++ b/assets/js/25116770.4e87a44c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[2294],{5680:(e,t,r)=>{r.d(t,{xA:()=>u,yg:()=>d});var n=r(6540);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(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 i(e){for(var t=1;t =0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),p=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(c.Provider,{value:t},e.children)},s="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=p(r),g=a,d=s["".concat(c,".").concat(g)]||s[g]||y[g]||o;return r?n.createElement(d,i(i({ref:t},u),{},{components:r})):n.createElement(d,i({ref:t},u))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[s]="string"==typeof e?e:a,i[1]=l;for(var p=2;p {r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>s,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(9668),a=(r(6540),r(5680));const o={sidebar_position:2},i="Getting Started",l={unversionedId:"getting-started",id:"version-2.3.4/getting-started",title:"Getting Started",description:"- To install it globally in your system run:",source:"@site/versioned_docs/version-2.3.4/getting-started.md",sourceDirName:".",slug:"/getting-started",permalink:"/react-native-help-create/docs/2.3.4/getting-started",draft:!1,tags:[],version:"2.3.4",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Summary",permalink:"/react-native-help-create/docs/2.3.4/intro"},next:{title:"Create",permalink:"/react-native-help-create/docs/2.3.4/category/create"}},c={},p=[],u={toc:p};function s(e){let{components:t,...r}=e;return(0,a.yg)("wrapper",(0,n.A)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"getting-started"},"Getting Started"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"To install it globally in your system run:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre"},"npm i react-native-help-create -g\n")),(0,a.yg)("p",null,"Or"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre"},"yarn global add react-native-help-create\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"To install it as a dev dependency in your react native project run:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre"},"npm i react-native-help-create --save-dev\n")),(0,a.yg)("p",null,"Or"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre"},"yarn add react-native-help-create --dev\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"If you want to use it without installing it (using npm cache) run:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"npx react-native-help-create --help\n")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2e8452ff.d3bfe71e.js b/assets/js/2e8452ff.d3bfe71e.js new file mode 100644 index 0000000..512a460 --- /dev/null +++ b/assets/js/2e8452ff.d3bfe71e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[7537],{5680:(e,n,r)=>{r.d(n,{xA:()=>p,yg:()=>f});var t=r(6540);function o(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function c(e){for(var n=1;n =0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=t.createContext({}),l=function(e){var n=t.useContext(i),r=n;return e&&(r="function"==typeof e?e(n):c(c({},n),e)),r},p=function(e){var n=l(e.components);return t.createElement(i.Provider,{value:n},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},d=t.forwardRef((function(e,n){var r=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=l(r),d=o,f=m["".concat(i,".").concat(d)]||m[d]||u[d]||a;return r?t.createElement(f,c(c({ref:n},p),{},{components:r})):t.createElement(f,c({ref:n},p))}));function f(e,n){var r=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=d;var s={};for(var i in n)hasOwnProperty.call(n,i)&&(s[i]=n[i]);s.originalType=e,s[m]="string"==typeof e?e:o,c[1]=s;for(var l=2;l{r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>c,default:()=>m,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var t=r(9668),o=(r(6540),r(5680));const a={sidebar_position:3},c="Combine Screens",s={unversionedId:"combine/combine-screens",id:"version-2.6.0/combine/combine-screens",title:"Combine Screens",description:"To combine screens that resides in src/screens/ folder to a specific path that resides under that same folder you can run:",source:"@site/versioned_docs/version-2.6.0/combine/combine-screens.md",sourceDirName:"combine",slug:"/combine/combine-screens",permalink:"/react-native-help-create/docs/2.6.0/combine/combine-screens",draft:!1,tags:[],version:"2.6.0",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Combine Components",permalink:"/react-native-help-create/docs/2.6.0/combine/combine-components"},next:{title:"Notes",permalink:"/react-native-help-create/docs/2.6.0/notes"}},i={},l=[{value:"Example",id:"example",level:2}],p={toc:l};function m(e){let{components:n,...r}=e;return(0,o.yg)("wrapper",(0,t.A)({},p,r,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"combine-screens"},"Combine Screens"),(0,o.yg)("p",null,"To combine screens that resides in ",(0,o.yg)("inlineCode",{parentName:"p"},"src/screens/")," folder to a specific path that resides under that same folder you can run:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc combine -s ... -f \n")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"This will move the existed screens for the given inputs to ",(0,o.yg)("inlineCode",{parentName:"p"},"src/screens/ /")," folder.")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"If somehome one of the given screens does not exist, ",(0,o.yg)("inlineCode",{parentName:"p"},"rnhc")," will prompt:"))),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"Check if all of these screens exist\n")),(0,o.yg)("h2",{id:"example"},"Example"),(0,o.yg)("p",null,"In this example, we have ",(0,o.yg)("inlineCode",{parentName:"p"},"screen-1")," and ",(0,o.yg)("inlineCode",{parentName:"p"},"screen-2")," that exists under ",(0,o.yg)("inlineCode",{parentName:"p"},"src/screens/")," folder, and we want to move them to ",(0,o.yg)("inlineCode",{parentName:"p"},"src/screens/foo/bar/")," folder:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc combine -s screen-1 screen-2 -f foo/bar\n")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"The command will outputs the following:")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"screen-1 screen moved to src/screens/foo/bar/\nscreen-2 screen moved to src/screens/foo/bar/\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/300bd883.88f616ce.js b/assets/js/300bd883.88f616ce.js new file mode 100644 index 0000000..f041c6c --- /dev/null +++ b/assets/js/300bd883.88f616ce.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[9847],{5680:(e,t,n)=>{n.d(t,{xA:()=>u,yg:()=>g});var r=n(6540);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 a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t =0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r =0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=p(n),f=o,g=s["".concat(c,".").concat(f)]||s[f]||d[f]||a;return n?r.createElement(g,i(i({ref:t},u),{},{components:n})):r.createElement(g,i({ref:t},u))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[s]="string"==typeof e?e:o,i[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>s,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(9668),o=(n(6540),n(5680));const a={sidebar_position:6},i="Delete Configuration",l={unversionedId:"delete/delete-configuration",id:"version-2.3.4/delete/delete-configuration",title:"Delete Configuration",description:"- To delete a configuration file run:",source:"@site/versioned_docs/version-2.3.4/delete/delete-configuration.md",sourceDirName:"delete",slug:"/delete/delete-configuration",permalink:"/react-native-help-create/docs/2.3.4/delete/delete-configuration",draft:!1,tags:[],version:"2.3.4",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"Delete Redux",permalink:"/react-native-help-create/docs/2.3.4/delete/delete-redux"},next:{title:"Combine",permalink:"/react-native-help-create/docs/2.3.4/category/combine"}},c={},p=[],u={toc:p};function s(e){let{components:t,...n}=e;return(0,o.yg)("wrapper",(0,r.A)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"delete-configuration"},"Delete Configuration"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"To delete a configuration file run:")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc delete --config\n")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"This will delete the ",(0,o.yg)("inlineCode",{parentName:"p"},"rnhc.config.json")," file at the root of the project.")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"If ",(0,o.yg)("inlineCode",{parentName:"p"},"rnhc.config.json")," does not exist, ",(0,o.yg)("inlineCode",{parentName:"p"},"rnhc")," will prompt:"))),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc.config.json does not exist\n")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3021cf83.68cdba8e.js b/assets/js/3021cf83.68cdba8e.js new file mode 100644 index 0000000..0cc8ae0 --- /dev/null +++ b/assets/js/3021cf83.68cdba8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[2857],{9365:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(6540),r=a(53);const l="tabItem_Ymn6";function o(e){let{children:t,hidden:a,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.A)(l,o),hidden:a},t)}},4865:(e,t,a)=>{a.d(t,{A:()=>m});var n=a(9668),r=a(6540),l=a(53),o=a(2303),s=a(1682),i=a(6976),u=a(3104);const c="tabList__CuJ",d="tabItem_LNqP";function p(e){const{lazy:t,block:a,defaultValue:o,values:p,groupId:m,className:g}=e,y=r.Children.map(e.children,(e=>{if((0,r.isValidElement)(e)&&"value"in e.props)return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})),b=p??y.map((e=>{let{props:{value:t,label:a,attributes:n}}=e;return{value:t,label:a,attributes:n}})),v=(0,s.X)(b,((e,t)=>e.value===t.value));if(v.length>0)throw new Error(`Docusaurus error: Duplicate values "${v.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`);const h=null===o?o:o??y.find((e=>e.props.default))?.props.value??y[0].props.value;if(null!==h&&!b.some((e=>e.value===h)))throw new Error(`Docusaurus error: The has a defaultValue "${h}" but none of its children has the corresponding value. Available values are: ${b.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);const{tabGroupChoices:f,setTabGroupChoices:T}=(0,i.x)(),[k,A]=(0,r.useState)(h),x=[],{blockElementScrollPositionUntilNextRender:w}=(0,u.a_)();if(null!=m){const e=f[m];null!=e&&e!==k&&b.some((t=>t.value===e))&&A(e)}const E=e=>{const t=e.currentTarget,a=x.indexOf(t),n=b[a].value;n!==k&&(w(t),A(n),null!=m&&T(m,String(n)))},I=e=>{let t=null;switch(e.key){case"Enter":E(e);break;case"ArrowRight":{const a=x.indexOf(e.currentTarget)+1;t=x[a]??x[0];break}case"ArrowLeft":{const a=x.indexOf(e.currentTarget)-1;t=x[a]??x[x.length-1];break}}t?.focus()};return r.createElement("div",{className:(0,l.A)("tabs-container",c)},r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.A)("tabs",{"tabs--block":a},g)},b.map((e=>{let{value:t,label:a,attributes:o}=e;return r.createElement("li",(0,n.A)({role:"tab",tabIndex:k===t?0:-1,"aria-selected":k===t,key:t,ref:e=>x.push(e),onKeyDown:I,onClick:E},o,{className:(0,l.A)("tabs__item",d,o?.className,{"tabs__item--active":k===t})}),a??t)}))),t?(0,r.cloneElement)(y.filter((e=>e.props.value===k))[0],{className:"margin-top--md"}):r.createElement("div",{className:"margin-top--md"},y.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==k})))))}function m(e){const t=(0,o.A)();return r.createElement(p,(0,n.A)({key:String(t)},e))}},3418:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>u,default:()=>g,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=a(9668),r=(a(6540),a(5680)),l=a(4865),o=a(9365),s=a(7964);const i={sidebar_position:2},u="Getting Started",c={unversionedId:"getting-started",id:"getting-started",title:"Getting Started",description:"- To install it globally in your system run:",source:"@site/docs/getting-started.mdx",sourceDirName:".",slug:"/getting-started",permalink:"/react-native-help-create/docs/getting-started",draft:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Summary",permalink:"/react-native-help-create/docs/intro"},next:{title:"Create",permalink:"/react-native-help-create/docs/category/create"}},d={},p=[],m={toc:p};function g(e){let{components:t,...a}=e;return(0,r.yg)("wrapper",(0,n.A)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"getting-started"},"Getting Started"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To install it globally in your system run:")),(0,r.yg)(l.A,{groupId:"package-manager",mdxType:"Tabs"},(0,r.yg)(o.A,{value:"npm",label:"npm",default:!0,mdxType:"TabItem"},(0,r.yg)(s.A,{mdxType:"CodeBlock"},"npm i react-native-help-create -g")),(0,r.yg)(o.A,{value:"yarn",label:"yarn",mdxType:"TabItem"},(0,r.yg)(s.A,{mdxType:"CodeBlock"},"yarn global add react-native-help-create"))),(0,r.yg)("p",null,"Or"),(0,r.yg)("p",null,"To install it as a dev dependency in your react native project run:"),(0,r.yg)(l.A,{groupId:"package-manager",mdxType:"Tabs"},(0,r.yg)(o.A,{value:"npm",label:"npm",default:!0,mdxType:"TabItem"},(0,r.yg)(s.A,{mdxType:"CodeBlock"},"npm i react-native-help-create --save-dev")),(0,r.yg)(o.A,{value:"yarn",label:"yarn",mdxType:"TabItem"},(0,r.yg)(s.A,{mdxType:"CodeBlock"},"yarn add react-native-help-create --dev"))),(0,r.yg)("p",null,"If you want to use it without installing it (using npm cache) run:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"npx react-native-help-create --help\n")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/30c671dd.5c7f1c24.js b/assets/js/30c671dd.5c7f1c24.js new file mode 100644 index 0000000..cc9ccd3 --- /dev/null +++ b/assets/js/30c671dd.5c7f1c24.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[7485],{5680:(e,n,t)=>{t.d(n,{xA:()=>u,yg:()=>g});var r=t(6540);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n =0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r =0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),s=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=s(e.components);return r.createElement(c.Provider,{value:n},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(t),d=o,g=p["".concat(c,".").concat(d)]||p[d]||f[d]||i;return t?r.createElement(g,a(a({ref:n},u),{},{components:t})):r.createElement(g,a({ref:n},u))}));function g(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=d;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[p]="string"==typeof e?e:o,a[1]=l;for(var s=2;s{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=t(9668),o=(t(6540),t(5680));const i={sidebar_position:7},a="Using Configuration",l={unversionedId:"create/using-configuration",id:"version-2.3.4/create/using-configuration",title:"Using Configuration",description:"With the above steps, you can now create a configuration file which will be used by rnhc to create your files with your custom config.",source:"@site/versioned_docs/version-2.3.4/create/using-configuration.md",sourceDirName:"create",slug:"/create/using-configuration",permalink:"/react-native-help-create/docs/2.3.4/create/using-configuration",draft:!1,tags:[],version:"2.3.4",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"Create Redux",permalink:"/react-native-help-create/docs/2.3.4/create/create-redux"},next:{title:"Delete",permalink:"/react-native-help-create/docs/2.3.4/category/delete"}},c={},s=[],u={toc:s};function p(e){let{components:n,...t}=e;return(0,o.yg)("wrapper",(0,r.A)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"using-configuration"},"Using Configuration"),(0,o.yg)("p",null,"With the above steps, you can now create a configuration file which will be used by ",(0,o.yg)("inlineCode",{parentName:"p"},"rnhc")," to create your files with your custom config."),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"To create a default configuration file run:")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --config\n")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"This will create a ",(0,o.yg)("inlineCode",{parentName:"li"},"rnhc.config.json")," file at the root of your project. The file will contain the following:")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-json"},'{\n "withStyles": true,\n "withFunctions": true,\n "withProps": true,\n "defaultExports": true,\n "componentsRoot": "./src/components",\n "screensRoot": "./src/screens",\n "reduxRoot": "./src/redux",\n "applyReduxThunk": true\n}\n')),(0,o.yg)("ol",null,(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"withStyles"),": if true, create ",(0,o.yg)("inlineCode",{parentName:"li"},"styles.js")," (or ",(0,o.yg)("inlineCode",{parentName:"li"},"styles.ts"),") file for components and pages, if false, don't create ",(0,o.yg)("inlineCode",{parentName:"li"},"styles.js")," (or ",(0,o.yg)("inlineCode",{parentName:"li"},"styles.ts"),") file, default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"withFunctions"),": if true, create ",(0,o.yg)("inlineCode",{parentName:"li"},"functions")," folder for pages, if false, don't create ",(0,o.yg)("inlineCode",{parentName:"li"},"functions")," folder, default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"withProps"),": if true, create props ",(0,o.yg)("inlineCode",{parentName:"li"},"interface")," for components and pages (in TS only), if false, don't create props ",(0,o.yg)("inlineCode",{parentName:"li"},"interface"),", default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"defaultExports"),": if true, create default export for components and pages, if false, create named export for components and pages, default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"componentsRoot"),": the root folder for components, default is ",(0,o.yg)("inlineCode",{parentName:"li"},"./src/components"),"."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"screensRoot"),": the root folder for screens, default is ",(0,o.yg)("inlineCode",{parentName:"li"},"./src/screens"),"."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"reduxRoot"),": the root folder for redux, default is ",(0,o.yg)("inlineCode",{parentName:"li"},"./src/redux"),"."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"applyReduxThunk"),": if true, apply ",(0,o.yg)("inlineCode",{parentName:"li"},"redux-thunk")," middleware to the store, if false, don't apply ",(0,o.yg)("inlineCode",{parentName:"li"},"redux-thunk")," middleware, default is true.")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"If no configuration file is found or you don't specify some of the configuration, the default configuration will be used.")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3355fecc.c4ddca2c.js b/assets/js/3355fecc.c4ddca2c.js new file mode 100644 index 0000000..f750c39 --- /dev/null +++ b/assets/js/3355fecc.c4ddca2c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[6774],{5680:(e,n,t)=>{t.d(n,{xA:()=>p,yg:()=>m});var a=t(6540);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var n=1;n =0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a =0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=a.createContext({}),u=function(e){var n=a.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},p=function(e){var n=u(e.components);return a.createElement(c.Provider,{value:n},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},g=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),s=u(t),g=r,m=s["".concat(c,".").concat(g)]||s[g]||d[g]||i;return t?a.createElement(m,l(l({ref:n},p),{},{components:t})):a.createElement(m,l({ref:n},p))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=g;var o={};for(var c in n)hasOwnProperty.call(n,c)&&(o[c]=n[c]);o.originalType=e,o[s]="string"==typeof e?e:r,l[1]=o;for(var u=2;u{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>s,frontMatter:()=>i,metadata:()=>o,toc:()=>u});var a=t(9668),r=(t(6540),t(5680));const i={sidebar_position:6},l="Create Redux",o={unversionedId:"create/create-redux",id:"version-2.3.4/create/create-redux",title:"Create Redux",description:"- To create a redux implementation run:",source:"@site/versioned_docs/version-2.3.4/create/create-redux.md",sourceDirName:"create",slug:"/create/create-redux",permalink:"/react-native-help-create/docs/2.3.4/create/create-redux",draft:!1,tags:[],version:"2.3.4",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"Using Templates",permalink:"/react-native-help-create/docs/2.3.4/create/using-templates"},next:{title:"Using Configuration",permalink:"/react-native-help-create/docs/2.3.4/create/using-configuration"}},c={},u=[{value:"Create a reducer",id:"create-a-reducer",level:2},{value:"Example",id:"example",level:3},{value:"Create multiple reducers",id:"create-multiple-reducers",level:2},{value:"Create an action",id:"create-an-action",level:2},{value:"Example",id:"example-1",level:3},{value:"Create multiple actions",id:"create-multiple-actions",level:2}],p={toc:u};function s(e){let{components:n,...t}=e;return(0,r.yg)("wrapper",(0,a.A)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"create-redux"},"Create Redux"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create a redux implementation run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -r\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"This will create a ",(0,r.yg)("inlineCode",{parentName:"li"},"redux")," folder under the ",(0,r.yg)("inlineCode",{parentName:"li"},"src/")," folder containing the following:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"src\n\u2514\u2500\u2500\u2500redux\n \u2502 index.js\n \u2502\n \u251c\u2500\u2500\u2500actions\n \u2502 \u2514\u2500\u2500\u2500general\n \u2502 index.js\n \u2502\n \u2514\u2500\u2500\u2500reducers\n \u2502 index.js\n \u2502\n \u2514\u2500\u2500\u2500general\n index.js\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"Where ",(0,r.yg)("inlineCode",{parentName:"li"},"index.js")," under the ",(0,r.yg)("inlineCode",{parentName:"li"},"redux")," folder contains the redux store definition:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},'import { applyMiddleware, compose, createStore } from "redux";\nimport { mainReducer } from "./reducers";\n\n/**\n * the main redux state, with all the reducers\n */\nexport const mainStore = createStore(\n mainReducer,\n compose(applyMiddleware(thunk))\n);\n\n/**\n * Creates a new redux state each time this function is called, this is used only for unit tests, to ensure that we have fresh state on each individual test\n */\nexport const createMainStore = () => {\n return createStore(mainReducer, compose(applyMiddleware(thunk)));\n};\n')),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"And ",(0,r.yg)("inlineCode",{parentName:"p"},"actions")," folder contains the action for each reducer, as for a example, at first ",(0,r.yg)("inlineCode",{parentName:"p"},"rnhc")," will create a sample reducer and action which is called ",(0,r.yg)("inlineCode",{parentName:"p"},"general"),".")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"The ",(0,r.yg)("inlineCode",{parentName:"p"},"general")," action's ",(0,r.yg)("inlineCode",{parentName:"p"},"index.js")," contains:"))),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},'// write your general actions here\n\n// this is an example for an action\nexport const init = () => async (dispatch, getState) => {\n dispatch({ type: "UPDATE_GENERAL", payload: { message: "init created!" } });\n};\n')),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"And the ",(0,r.yg)("inlineCode",{parentName:"li"},"general")," reducer's ",(0,r.yg)("inlineCode",{parentName:"li"},"index.js")," contains:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},'const initialState = { message: "" };\n\nexport const general = (state = initialState, action) => {\n switch (action.type) {\n case "UPDATE_GENERAL":\n return { ...state, ...action.payload };\n default:\n return state;\n }\n};\n')),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"And the ",(0,r.yg)("inlineCode",{parentName:"li"},"index.js")," file under the ",(0,r.yg)("inlineCode",{parentName:"li"},"reducers")," folder contains the following:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},'import { combineReducers } from "redux";\nimport { general } from "./general";\n\nexport const mainReducer = combineReducers({\n general,\n});\n')),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"In TypeScript, the files will be written as the following:")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"redux/index.ts")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-ts"},'import { applyMiddleware, compose, createStore } from "redux";\nimport { mainReducer } from "./reducers";\n\n/**\n * the main redux state, with all the reducers\n */\nexport const mainStore = createStore(\n mainReducer,\n compose(applyMiddleware(thunk))\n);\n\nexport type StateInterface = ReturnType ;\n\n/**\n * list of action types\n */\nexport type ActionType = "UPDATE_GENERAL";\n\nexport interface Action {\n type: ActionType;\n payload: Partial ;\n}\n\nexport type ThunkResult<\n A = Record ,\n E = Record \n> = ThunkAction >;\n\nexport type Dispatch = ThunkDispatch<\n StateInterface,\n Record ,\n Action\n>;\n')),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"redux/actions/general/index.ts")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-ts"},'import { GeneralState } from "../../reducers/general";\nimport { ThunkResult } from "../..";\n\n// write your general actions here\n\n// this is an example for an action\nexport const init =\n (): ThunkResult => async (dispatch, getState) => {\n dispatch({ type: "UPDATE_GENERAL", payload: { message: "init created!" } });\n };\n')),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"redux/reducers/general/index.ts")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-ts"},'import { Action } from "../..";\n\nexport interface GeneralState {\n message: string;\n}\n\nexport const general = (\n state: GeneralState = {\n message: "",\n },\n action: Action \n) => {\n switch (action.type) {\n case "UPDATE_GENERAL":\n return { ...state, ...action.payload };\n default:\n return state;\n }\n};\n')),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"redux/reducers/index.ts")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-ts"},'import { combineReducers } from "redux";\nimport { general } from "./general";\n\nexport const mainReducer = combineReducers({\n general,\n});\n')),(0,r.yg)("h1",{id:"reducers"},"Reducers"),(0,r.yg)("h2",{id:"create-a-reducer"},"Create a reducer"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create a reducer, you must have a redux implementation then run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --reducer \n")),(0,r.yg)("h3",{id:"example"},"Example"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --reducer auth\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"This will create a ",(0,r.yg)("inlineCode",{parentName:"li"},"auth")," reducer under the ",(0,r.yg)("inlineCode",{parentName:"li"},"src/redux/reducers/")," folder and the ",(0,r.yg)("inlineCode",{parentName:"li"},"index.js")," for this reducer will contain the same code written in the template.")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/reducers/auth/index.js")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},"const initialState = {};\n\nexport const auth = (state = initialState, action) => {\n switch (action.type) {\n default:\n return state;\n }\n};\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"It will also add the reducer to the ",(0,r.yg)("inlineCode",{parentName:"li"},"index.js")," file under the ",(0,r.yg)("inlineCode",{parentName:"li"},"reducers")," folder to use it in the ",(0,r.yg)("inlineCode",{parentName:"li"},"combineReducers")," function.")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/reducers/index.js")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},'import { combineReducers } from "redux";\nimport { auth } from "./auth";\nimport { general } from "./general";\n\nexport const mainReducer = combineReducers({\n auth,\n general,\n});\n')),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"If you don't have a redux implementation create using ",(0,r.yg)("inlineCode",{parentName:"li"},"rnhc create -r"),", this command will prompt:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"Redux implementation does not exist\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"You can also overwrite the reducer by running:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --reducer -o\n")),(0,r.yg)("h2",{id:"create-multiple-reducers"},"Create multiple reducers"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create multiple reducers, you must have a redux implementation then run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --reducer ...\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"This will also update your ",(0,r.yg)("inlineCode",{parentName:"li"},"index.js")," file under the ",(0,r.yg)("inlineCode",{parentName:"li"},"reducers")," folder to use the reducers you created.")),(0,r.yg)("h1",{id:"actions"},"Actions"),(0,r.yg)("h2",{id:"create-an-action"},"Create an action"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create an action, you must have a redux implementation as wee as the reducer you want to add an action for it, then run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --action \n")),(0,r.yg)("h3",{id:"example-1"},"Example"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"In this example we are going to create an action for the ",(0,r.yg)("inlineCode",{parentName:"li"},"auth")," reducer, so we will run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --action auth login\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"This will create a ",(0,r.yg)("inlineCode",{parentName:"li"},"login")," action under the ",(0,r.yg)("inlineCode",{parentName:"li"},"src/redux/actions/auth/")," folder and the ",(0,r.yg)("inlineCode",{parentName:"li"},"login.js")," for this action will contain the same code written in the template.")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/actions/auth/login.js")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},'export const loginAction = () => async (dispatch, getState) => {\n dispatch({ type: "AUTH_LOGIN", payload: {} });\n};\n')),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"And it will update the ",(0,r.yg)("inlineCode",{parentName:"li"},"index.js")," file under ",(0,r.yg)("inlineCode",{parentName:"li"},"src/redux/actions/auth/")," to export the action.")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/actions/auth/index.js")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},'export { loginAction } from "./login";\n')),(0,r.yg)("h2",{id:"create-multiple-actions"},"Create multiple actions"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"To create multiple actions, you must have a redux implementation and existed reducer, then run:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --action ...\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"If the reducer doesn't exist, you will get an error like this:")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"./src/redux/reducers/x does not exist\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"Keep in mind that this also works for TypeScript projects. Even better when creating an action for a reducer in TypeScript, you will get TypeScript support as well as updating the ",(0,r.yg)("inlineCode",{parentName:"li"},"ActionType")," in the ",(0,r.yg)("inlineCode",{parentName:"li"},"src/redux/index.ts")," file. For example if you create an action for the ",(0,r.yg)("inlineCode",{parentName:"li"},"auth")," reducer, you will get the following:")),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"src/redux/index.ts")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-ts"},'import { applyMiddleware, compose, createStore } from "redux";\nimport thunk, { ThunkAction, ThunkDispatch } from "redux-thunk";\n\nimport { mainReducer } from "./reducers";\n\n/**\n * the main redux state, with all the reducers\n */\nexport const mainStore = createStore(\n mainReducer,\n compose(applyMiddleware(thunk))\n);\n\n/**\n * Creates a new redux state each time this function is called, this is used only for unit tests, to ensure that we have fresh state on each individual test\n */\nexport const createMainStore = () => {\n return createStore(mainReducer, compose(applyMiddleware(thunk)));\n};\n\nexport type StateInterface = ReturnType ;\n\n/**\n * list of action types\n */\nexport type ActionType = "AUTH_LOGIN" | "UPDATE_GENERAL";\n\nexport interface Action {\n type: ActionType;\n payload: Partial ;\n}\nexport type ThunkResult<\n A = Record ,\n E = Record \n> = ThunkAction >;\n\nexport type Dispatch = ThunkDispatch<\n StateInterface,\n Record ,\n Action\n>;\n')),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"It will also update the necessary files that imports and exports modules in order to use the action in the reducer.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"Also another note, if you prefer not using ",(0,r.yg)("inlineCode",{parentName:"p"},"redux-thunk")," you can set that in ",(0,r.yg)("inlineCode",{parentName:"p"},"rnhc.config.json")," file, this will let you create your store and actions without applying the ",(0,r.yg)("inlineCode",{parentName:"p"},"redux-thunk")," middleware (For more details check ",(0,r.yg)("a",{parentName:"p",href:"./using-configuration"},"configuration section"),")."))))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3607ff89.de9ca03a.js b/assets/js/3607ff89.de9ca03a.js new file mode 100644 index 0000000..da4ecc1 --- /dev/null +++ b/assets/js/3607ff89.de9ca03a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[3458],{5680:(e,t,n)=>{n.d(t,{xA:()=>s,yg:()=>d});var r=n(6540);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t =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 p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),m=c(n),y=a,d=m["".concat(p,".").concat(y)]||m[y]||u[y]||o;return n?r.createElement(d,i(i({ref:t},s),{},{components:n})):r.createElement(d,i({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=y;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var c=2;c {n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var r=n(9668),a=(n(6540),n(5680));const o={sidebar_position:5},i="Using Templates",l={unversionedId:"create/using-templates",id:"version-2.6.0/create/using-templates",title:"Using Templates",description:"You can create your screens and components with your defined templates by following these steps:",source:"@site/versioned_docs/version-2.6.0/create/using-templates.md",sourceDirName:"create",slug:"/create/using-templates",permalink:"/react-native-help-create/docs/2.6.0/create/using-templates",draft:!1,tags:[],version:"2.6.0",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Create Navigations",permalink:"/react-native-help-create/docs/2.6.0/create/create-navigations"},next:{title:"Create Redux",permalink:"/react-native-help-create/docs/2.6.0/create/create-redux"}},p={},c=[{value:"Example",id:"example",level:3}],s={toc:c};function m(e){let{components:t,...n}=e;return(0,a.yg)("wrapper",(0,r.A)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"using-templates"},"Using Templates"),(0,a.yg)("p",null,"You can create your screens and components with your defined templates by following these steps:"),(0,a.yg)("ol",null,(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("p",{parentName:"li"},"First thing to do is to create a ",(0,a.yg)("inlineCode",{parentName:"p"},".template")," folder at the root of your react project.")),(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("p",{parentName:"li"},"Inside the ",(0,a.yg)("inlineCode",{parentName:"p"},".template")," folder you can add your template, for example ",(0,a.yg)("inlineCode",{parentName:"p"},"componentWithUseEffect.tsx")," (the file extension doesn't matter so it could be ",(0,a.yg)("inlineCode",{parentName:"p"},"*.jsx"),", ",(0,a.yg)("inlineCode",{parentName:"p"},"*.js")," or ",(0,a.yg)("inlineCode",{parentName:"p"},"*.tsx"),"):"))),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-jsx"},'import React, { useEffect } from "react";\nimport { View, Text } from "react-native";\n\nexport default function __COMPONENT__() {\n useEffect(() => {}, []);\n\n return (\n \n \n );\n}\n')),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"There is a restriction in naming these templates which is you should not put dots (",(0,a.yg)("inlineCode",{parentName:"p"},"."),") between the name, like this (",(0,a.yg)("inlineCode",{parentName:"p"},"component.WithUseEffect.jsx"),"). It should only contain one dot that makes the extension file like we're doing above.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"You should type ",(0,a.yg)("inlineCode",{parentName:"p"},"__COMPONENT__")," in the template file and it will be replaced with the component name you want to create."))),(0,a.yg)("ol",{start:3},(0,a.yg)("li",{parentName:"ol"},"After creating your template you can use them to create components or screens as the following:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -cHello, World! \n-t \n")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -s -t \n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"And of course, you can create multiple components or screens with the same template.")),(0,a.yg)("h3",{id:"example"},"Example"),(0,a.yg)("p",null,"As for our example it can be used like this for the above template:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -c comp -t componentWithUseEffect\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"This will create ",(0,a.yg)("inlineCode",{parentName:"p"},"comp")," component under ",(0,a.yg)("inlineCode",{parentName:"p"},"src/components/")," folder and the ",(0,a.yg)("inlineCode",{parentName:"p"},"index.jsx")," for this component will contain the same code written in the template.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"For the screen case, the ",(0,a.yg)("inlineCode",{parentName:"p"},"index.jsx")," for that screen will contain the code written in the template."))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/36ebbe5d.4cb64b16.js b/assets/js/36ebbe5d.4cb64b16.js new file mode 100644 index 0000000..cadeee6 --- /dev/null +++ b/assets/js/36ebbe5d.4cb64b16.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[1057],{5680:(e,n,r)=>{r.d(n,{xA:()=>p,yg:()=>g});var t=r(6540);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function l(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function s(e){for(var n=1;n =0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=t.createContext({}),o=function(e){var n=t.useContext(i),r=n;return e&&(r="function"==typeof e?e(n):s(s({},n),e)),r},p=function(e){var n=o(e.components);return t.createElement(i.Provider,{value:n},e.children)},u="mdxType",y={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},m=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=o(r),m=a,g=u["".concat(i,".").concat(m)]||u[m]||y[m]||l;return r?t.createElement(g,s(s({ref:n},p),{},{components:r})):t.createElement(g,s({ref:n},p))}));function g(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=r.length,s=new Array(l);s[0]=m;var c={};for(var i in n)hasOwnProperty.call(n,i)&&(c[i]=n[i]);c.originalType=e,c[u]="string"==typeof e?e:a,s[1]=c;for(var o=2;o {r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>s,default:()=>u,frontMatter:()=>l,metadata:()=>c,toc:()=>o});var t=r(9668),a=(r(6540),r(5680));const l={sidebar_position:3},s="Create Screens",c={unversionedId:"create/create-screens",id:"version-2.6.0/create/create-screens",title:"Create Screens",description:"Create a Screen",source:"@site/versioned_docs/version-2.6.0/create/create-screens.md",sourceDirName:"create",slug:"/create/create-screens",permalink:"/react-native-help-create/docs/2.6.0/create/create-screens",draft:!1,tags:[],version:"2.6.0",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Create Components",permalink:"/react-native-help-create/docs/2.6.0/create/create-components"},next:{title:"Create Navigations",permalink:"/react-native-help-create/docs/2.6.0/create/create-navigations"}},i={},o=[{value:"Create a Screen",id:"create-a-screen",level:2},{value:"Example",id:"example",level:3},{value:"Create multiple Screens",id:"create-multiple-screens",level:2},{value:"Example",id:"example-1",level:3},{value:"Create Screens in a Specific Folder",id:"create-screens-in-a-specific-folder",level:2},{value:"Example",id:"example-2",level:3}],p={toc:o};function u(e){let{components:n,...r}=e;return(0,a.yg)("wrapper",(0,t.A)({},p,r,{components:n,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"create-screens"},"Create Screens"),(0,a.yg)("h2",{id:"create-a-screen"},"Create a Screen"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"To create your screen simply run:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -s \n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"This will create a screen after the given name ",(0,a.yg)("inlineCode",{parentName:"li"},"screen-name")," under the ",(0,a.yg)("inlineCode",{parentName:"li"},"src/screens/")," folder.")),(0,a.yg)("h3",{id:"example"},"Example"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -s testScreen\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"This will create the following:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"src/\n\u2514\u2500\u2500 screens\n \u2514\u2500\u2500 test-screen\n \u251c\u2500\u2500 __tests__\n \u2502 \u2514\u2500\u2500 index.spec.jsx\n \u251c\u2500\u2500 functions\n \u2502 \u2514\u2500\u2500 index.js\n \u251c\u2500\u2500 index.jsx\n \u2514\u2500\u2500 styles.js\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"Where ",(0,a.yg)("inlineCode",{parentName:"li"},"index.jsx")," represent the screen which is nothing but a React FC component that contains the following:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-jsx"},'import { Text, View } from "react-native";\nimport {} from "./functions";\nimport { TestScreenStyles } from "./styles";\n\nconst TestScreenScreen = () => {\n return (\n \n \n );\n};\nexport default TestScreenScreen;\n')),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"As for ",(0,a.yg)("inlineCode",{parentName:"li"},"styles.js")," you will find:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-js"},'import { StyleSheet } from "react-native";\n\nexport const TestScreenStyles = StyleSheet.create({});\n')),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"And under the ",(0,a.yg)("inlineCode",{parentName:"li"},"functions")," folder you should write your screen's functions and export them in ",(0,a.yg)("inlineCode",{parentName:"li"},"function/index.js")," file, which by default it will contain the following:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-js"},"// write your TestScreen screen functions here\n")),(0,a.yg)("h2",{id:"create-multiple-screens"},"Create multiple Screens"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"To create multiple screens simply run:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -sTestScreen screen created! \n...\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"This will create multiple screens under the ",(0,a.yg)("inlineCode",{parentName:"li"},"src/screens/")," folder.")),(0,a.yg)("h3",{id:"example-1"},"Example"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -s screen-1 screen-2\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"This will create the following:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"src/\n\u2514\u2500\u2500 screens\n \u251c\u2500\u2500 screen-1\n \u2502\xa0\xa0 \u251c\u2500\u2500 __tests__\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.jsx\n \u2502\xa0\xa0 \u251c\u2500\u2500 functions\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.js\n \u2502\xa0\xa0 \u251c\u2500\u2500 index.jsx\n \u2502\xa0\xa0 \u2514\u2500\u2500 styles.js\n \u2514\u2500\u2500 screen-2\n \u251c\u2500\u2500 __tests__\n \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.jsx\n \u251c\u2500\u2500 functions\n \u2502\xa0\xa0 \u2514\u2500\u2500 index.js\n \u251c\u2500\u2500 index.jsx\n \u2514\u2500\u2500 styles.js\n")),(0,a.yg)("h2",{id:"create-screens-in-a-specific-folder"},"Create Screens in a Specific Folder"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"To create one or multiple screens in a specific path that resides under ",(0,a.yg)("inlineCode",{parentName:"li"},"src/screens/")," folder, simply run:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -s ... -f \n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"This will create your screens under the ",(0,a.yg)("inlineCode",{parentName:"li"},"src/screens/ ")," folder.")),(0,a.yg)("h3",{id:"example-2"},"Example"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create -s screen-1 screen-2 -f foo/bar\n")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"This will create the following:")),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-sh"},"src/\n\u2514\u2500\u2500 screens\n \u2514\u2500\u2500 foo\n \u2514\u2500\u2500 bar\n \u251c\u2500\u2500 screen-1\n \u2502\xa0\xa0 \u251c\u2500\u2500 __tests__\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.jsx\n \u2502\xa0\xa0 \u251c\u2500\u2500 functions\n \u2502\xa0\xa0 \u2502\xa0\xa0 \u2514\u2500\u2500 index.js\n \u2502\xa0\xa0 \u251c\u2500\u2500 index.jsx\n \u2502\xa0\xa0 \u2514\u2500\u2500 styles.js\n \u2514\u2500\u2500 screen-2\n \u251c\u2500\u2500 __tests__\n \u2502\xa0\xa0 \u2514\u2500\u2500 index.spec.jsx\n \u251c\u2500\u2500 functions\n \u2502\xa0\xa0 \u2514\u2500\u2500 index.js\n \u251c\u2500\u2500 index.jsx\n \u2514\u2500\u2500 styles.js\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/374bac64.42e5ac73.js b/assets/js/374bac64.42e5ac73.js new file mode 100644 index 0000000..9858dda --- /dev/null +++ b/assets/js/374bac64.42e5ac73.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[3785],{9413:e=>{e.exports=JSON.parse('{"title":"Delete","description":"How to delete files in the project?","slug":"/category/delete","permalink":"/react-native-help-create/docs/category/delete","navigation":{"previous":{"title":"Using Configuration","permalink":"/react-native-help-create/docs/create/using-configuration"},"next":{"title":"Intro","permalink":"/react-native-help-create/docs/delete/intro"}}}')}}]); \ No newline at end of file diff --git a/assets/js/39362015.ef9617ab.js b/assets/js/39362015.ef9617ab.js new file mode 100644 index 0000000..4577d37 --- /dev/null +++ b/assets/js/39362015.ef9617ab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[2860],{5680:(e,n,t)=>{t.d(n,{xA:()=>u,yg:()=>y});var r=t(6540);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n =0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r =0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),s=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=s(e.components);return r.createElement(c.Provider,{value:n},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(t),d=o,y=p["".concat(c,".").concat(d)]||p[d]||f[d]||i;return t?r.createElement(y,a(a({ref:n},u),{},{components:t})):r.createElement(y,a({ref:n},u))}));function y(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=d;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[p]="string"==typeof e?e:o,a[1]=l;for(var s=2;s{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=t(9668),o=(t(6540),t(5680));const i={sidebar_position:7},a="Using Configuration",l={unversionedId:"create/using-configuration",id:"create/using-configuration",title:"Using Configuration",description:"With the above steps, you can now create a configuration file which will be used by rnhc to create your files with your custom config.",source:"@site/docs/create/using-configuration.md",sourceDirName:"create",slug:"/create/using-configuration",permalink:"/react-native-help-create/docs/create/using-configuration",draft:!1,tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"Create Redux",permalink:"/react-native-help-create/docs/create/create-redux"},next:{title:"Delete",permalink:"/react-native-help-create/docs/category/delete"}},c={},s=[],u={toc:s};function p(e){let{components:n,...t}=e;return(0,o.yg)("wrapper",(0,r.A)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"using-configuration"},"Using Configuration"),(0,o.yg)("p",null,"With the above steps, you can now create a configuration file which will be used by ",(0,o.yg)("inlineCode",{parentName:"p"},"rnhc")," to create your files with your custom config."),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"To create a default configuration file run:")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"rnhc create --config\n")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"This will create a ",(0,o.yg)("inlineCode",{parentName:"li"},"rnhc.config.json")," file at the root of your project. The file will contain the following:")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-json"},'{\n "withStyles": true,\n "withFunctions": true,\n "withProps": true,\n "withTests": true,\n "defaultExports": true,\n "componentsRoot": "./src/components",\n "screensRoot": "./src/screens",\n "reduxRoot": "./src/redux",\n "applyReduxThunk": true\n}\n')),(0,o.yg)("ol",null,(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"withStyles"),": if true, create ",(0,o.yg)("inlineCode",{parentName:"li"},"styles.js")," (or ",(0,o.yg)("inlineCode",{parentName:"li"},"styles.ts"),") file for components and screens, if false, don't create ",(0,o.yg)("inlineCode",{parentName:"li"},"styles.js")," (or ",(0,o.yg)("inlineCode",{parentName:"li"},"styles.ts"),") file, default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"withFunctions"),": if true, create ",(0,o.yg)("inlineCode",{parentName:"li"},"functions")," folder for screens, if false, don't create ",(0,o.yg)("inlineCode",{parentName:"li"},"functions")," folder, default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"withProps"),": if true, create props ",(0,o.yg)("inlineCode",{parentName:"li"},"interface")," for components and screens (in TS only), if false, don't create props ",(0,o.yg)("inlineCode",{parentName:"li"},"interface"),", default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"withTests"),": if true, create ",(0,o.yg)("inlineCode",{parentName:"li"},"__tests__")," folder for components and screens, if false, don't create ",(0,o.yg)("inlineCode",{parentName:"li"},"__tests__")," folder, default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"defaultExports"),": if true, create default export for components and pages, if false, create named export for components and pages, default is true."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"componentsRoot"),": the root folder for components, default is ",(0,o.yg)("inlineCode",{parentName:"li"},"./src/components"),"."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"screensRoot"),": the root folder for screens, default is ",(0,o.yg)("inlineCode",{parentName:"li"},"./src/screens"),"."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"reduxRoot"),": the root folder for redux, default is ",(0,o.yg)("inlineCode",{parentName:"li"},"./src/redux"),"."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("inlineCode",{parentName:"li"},"applyReduxThunk"),": if true, apply ",(0,o.yg)("inlineCode",{parentName:"li"},"redux-thunk")," middleware to the store, if false, don't apply ",(0,o.yg)("inlineCode",{parentName:"li"},"redux-thunk")," middleware, default is true.")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"If no configuration file is found or you don't specify some of the configuration, the default configuration will be used.")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/393be207.b9c88e5a.js b/assets/js/393be207.b9c88e5a.js new file mode 100644 index 0000000..e0df133 --- /dev/null +++ b/assets/js/393be207.b9c88e5a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrnhc_docs=self.webpackChunkrnhc_docs||[]).push([[4134],{5680:(e,t,r)=>{r.d(t,{xA:()=>u,yg:()=>d});var n=r(6540);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(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 p(e){for(var t=1;t =0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n