diff --git a/404.html b/404.html index 1aca7a9..d4f41b0 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,4 @@ -404: This page could not be found
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
logo
github_iconnpm_iconVersion: 5.0.0-beta.2

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/_next/static/SD5JsY_1WdXT6X6jJnCPk/_buildManifest.js b/_next/static/SD5JsY_1WdXT6X6jJnCPk/_buildManifest.js new file mode 100644 index 0000000..ea2d0b6 --- /dev/null +++ b/_next/static/SD5JsY_1WdXT6X6jJnCPk/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(e,s,a){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/pages/index-f317df4b72fcbcfd.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/advanced/focus-to-error-after-submit":["static/chunks/pages/advanced/focus-to-error-after-submit-1706721d93e9d7ee.js"],"/advanced/focus-to-error-on-list-after-submit":["static/chunks/pages/advanced/focus-to-error-on-list-after-submit-00383ae58c8b319c.js"],"/advanced/hide-before-submit":["static/chunks/pages/advanced/hide-before-submit-1e6ecf76d97b64f2.js"],"/advanced/show-after-blur":["static/chunks/pages/advanced/show-after-blur-9fd918f657e0bc35.js"],"/advanced/validate-complex-forms":["static/chunks/pages/advanced/validate-complex-forms-fd5c212ac13507e0.js"],"/advanced/validate-list-of-objects":["static/chunks/pages/advanced/validate-list-of-objects-4a615b6a25699599.js"],"/advanced/validate-lists":["static/chunks/pages/advanced/validate-lists-bb9baf22ec7ed8a3.js"],"/customizations/apply-to-nulls":[s,"static/chunks/pages/customizations/apply-to-nulls-2862166cb2fed735.js"],"/customizations/conditional-rules":["static/chunks/pages/customizations/conditional-rules-f46d7626e480b60b.js"],"/customizations/custom-element-focus-handler":["static/chunks/pages/customizations/custom-element-focus-handler-6940de1fd56f0825.js"],"/customizations/custom-message":["static/chunks/pages/customizations/custom-message-4f9d8d63d0623f67.js"],"/customizations/translations":["static/chunks/pages/customizations/translations-727cba09c7a84744.js"],"/examples/antd":["static/chunks/2202-0a3f6f077265c0d1.js","static/chunks/pages/examples/antd-ef04e1505a7b5a05.js"],"/examples/form-data":["static/chunks/pages/examples/form-data-3e459fc7df60ba6c.js"],"/examples/is-path-valid":[a,"static/chunks/pages/examples/is-path-valid-778d1acd143d0634.js"],"/examples/mui":["static/chunks/pages/examples/mui-ee5d31bc8b679ba6.js"],"/examples/prime-react":["static/chunks/4792-18a768ae8d4b38f3.js","static/chunks/pages/examples/prime-react-2fb62372cbbf7909.js"],"/examples/pure":["static/chunks/pages/examples/pure-f893601747cc7b1c.js"],"/examples/react-bootstrap":[a,"static/chunks/pages/examples/react-bootstrap-06b33c9767eac6c8.js"],"/examples/react-native":["static/chunks/pages/examples/react-native-82631b863ca0106d.js"],"/examples/set-form-data":[e,"static/chunks/pages/examples/set-form-data-dedcc94327f9fcc9.js"],"/examples/set-form-data-and-rules":["static/chunks/pages/examples/set-form-data-and-rules-daed4a7442046636.js"],"/examples/set-path-value":[e,"static/chunks/pages/examples/set-path-value-e9d304466e05622c.js"],"/examples/set-rules":["static/chunks/pages/examples/set-rules-8b15f2980cbcacd3.js"],"/examples/unset-path-is-blurred":[e,"static/chunks/pages/examples/unset-path-is-blurred-3544afd018d9cf9f.js"],"/examples/unset-path-value":[e,"static/chunks/pages/examples/unset-path-value-c3bf0be60f445d92.js"],"/examples/validation-error":["static/chunks/pages/examples/validation-error-b64cfcb89a73cd80.js"],"/examples/validation-error-original-result":["static/chunks/pages/examples/validation-error-original-result-d90c99954ae00f3f.js"],"/getting-started/home":["static/chunks/pages/getting-started/home-86ef754240d34b8d.js"],"/getting-started/installation":["static/chunks/pages/getting-started/installation-d1d1132fd20dd7a8.js"],"/getting-started/usage":["static/chunks/pages/getting-started/usage-9aa0d6d45ea2172b.js"],"/library-api/path":["static/chunks/pages/library-api/path-fcb03235b6db2ac2.js"],"/library-api/react-validatable-form-provider":["static/chunks/pages/library-api/react-validatable-form-provider-2b8fd7e3a13b0759.js"],"/library-api/rule":["static/chunks/pages/library-api/rule-b6136d4cd84bdf06.js"],"/library-api/rules":["static/chunks/pages/library-api/rules-c6d397233f063cf8.js"],"/library-api/use-validatable-form":["static/chunks/pages/library-api/use-validatable-form-22a4e31cf3740308.js"],"/rules/custom-on-hook":["static/chunks/pages/rules/custom-on-hook-6da0105d173baea7.js"],"/rules/custom-on-provider":["static/chunks/pages/rules/custom-on-provider-0f08d7ee9969f533.js"],"/rules/date":[s,"static/chunks/7918-6100828040f7d812.js","static/chunks/pages/rules/date-bf706e4ac839dd3c.js"],"/rules/email":["static/chunks/pages/rules/email-6f0a4b70d15c4a5b.js"],"/rules/equality":["static/chunks/pages/rules/equality-76d521ccd438bf92.js"],"/rules/iban":["static/chunks/pages/rules/iban-9a542038549900de.js"],"/rules/includes":["static/chunks/pages/rules/includes-04639b065368d43a.js"],"/rules/length":["static/chunks/pages/rules/length-bbca03a8e0aea7bf.js"],"/rules/list-size":["static/chunks/pages/rules/list-size-fcf3535da6b4f2ba.js"],"/rules/number":["static/chunks/pages/rules/number-fed8ac6dfc4992da.js"],"/rules/regex":["static/chunks/pages/rules/regex-847925e7b39f59cf.js"],"/rules/required":["static/chunks/pages/rules/required-a7aacacbc3af7957.js"],"/rules/unique":["static/chunks/pages/rules/unique-da94991c55c20344.js"],"/rules/url":["static/chunks/pages/rules/url-eeb71535eb62076b.js"],sortedPages:["/","/_app","/_error","/advanced/focus-to-error-after-submit","/advanced/focus-to-error-on-list-after-submit","/advanced/hide-before-submit","/advanced/show-after-blur","/advanced/validate-complex-forms","/advanced/validate-list-of-objects","/advanced/validate-lists","/customizations/apply-to-nulls","/customizations/conditional-rules","/customizations/custom-element-focus-handler","/customizations/custom-message","/customizations/translations","/examples/antd","/examples/form-data","/examples/is-path-valid","/examples/mui","/examples/prime-react","/examples/pure","/examples/react-bootstrap","/examples/react-native","/examples/set-form-data","/examples/set-form-data-and-rules","/examples/set-path-value","/examples/set-rules","/examples/unset-path-is-blurred","/examples/unset-path-value","/examples/validation-error","/examples/validation-error-original-result","/getting-started/home","/getting-started/installation","/getting-started/usage","/library-api/path","/library-api/react-validatable-form-provider","/library-api/rule","/library-api/rules","/library-api/use-validatable-form","/rules/custom-on-hook","/rules/custom-on-provider","/rules/date","/rules/email","/rules/equality","/rules/iban","/rules/includes","/rules/length","/rules/list-size","/rules/number","/rules/regex","/rules/required","/rules/unique","/rules/url"]}}("static/chunks/4041-2e33a43480042390.js","static/chunks/2601-6e247d7859f6949d.js","static/chunks/4057-83f7d471d8239d76.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/xjFZl_scbcV6PZovP0Q5g/_ssgManifest.js b/_next/static/SD5JsY_1WdXT6X6jJnCPk/_ssgManifest.js similarity index 100% rename from _next/static/xjFZl_scbcV6PZovP0Q5g/_ssgManifest.js rename to _next/static/SD5JsY_1WdXT6X6jJnCPk/_ssgManifest.js diff --git a/_next/static/chunks/pages/_app-7ca49aeeb34ec41d.js b/_next/static/chunks/pages/_app-e06cc10d0f496405.js similarity index 99% rename from _next/static/chunks/pages/_app-7ca49aeeb34ec41d.js rename to _next/static/chunks/pages/_app-e06cc10d0f496405.js index ecdab97..186ce8d 100644 --- a/_next/static/chunks/pages/_app-7ca49aeeb34ec41d.js +++ b/_next/static/chunks/pages/_app-e06cc10d0f496405.js @@ -75,7 +75,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */ function b(e,t){let r=y(e,t);return r}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){y[e]=y(e)});let v=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},95408:function(e,t,r){"use strict";r.d(t,{L7:function(){return l},P$:function(){return u},VO:function(){return n},W8:function(){return a},k9:function(){return i}});let n={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${n[e]}px)`};function i(e,t,r){let i=e.theme||{};if(Array.isArray(t)){let a=i.breakpoints||o;return t.reduce((e,n,o)=>(e[a.up(a.keys[o])]=r(t[o]),e),{})}if("object"==typeof t){let l=i.breakpoints||o;return Object.keys(t).reduce((e,o)=>{if(-1!==Object.keys(l.values||n).indexOf(o)){let i=l.up(o);e[i]=r(t[o],o)}else e[o]=t[o];return e},{})}let u=r(t);return u}function a(e={}){var t;let r=null==(t=e.keys)?void 0:t.reduce((t,r)=>{let n=e.up(r);return t[n]={},t},{});return r||{}}function l(e,t){return e.reduce((e,t)=>{let r=e[t],n=!r||0===Object.keys(r).length;return n&&delete e[t],e},t)}function u({values:e,breakpoints:t,base:r}){let n;let o=r||function(e,t){if("object"!=typeof e)return{};let r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((t,n)=>{n{null!=e[t]&&(r[t]=!0)}),r}(e,t),i=Object.keys(o);return 0===i.length?e:i.reduce((t,r,o)=>(Array.isArray(e)?(t[r]=null!=e[o]?e[o]:e[n],n=o):"object"==typeof e?(t[r]=null!=e[r]?e[r]:e[n],n=r):t[r]=e,t),{})}},41796:function(e,t,r){"use strict";r.d(t,{$n:function(){return d},Fq:function(){return s},_j:function(){return c},mi:function(){return u}});var n=r(71387);function o(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function i(e){let t;if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map(e=>e+e)),r?`rgb${4===r.length?"a":""}(${r.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let r=e.indexOf("("),o=e.substring(0,r);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(o))throw Error((0,n.Z)(9,e));let a=e.substring(r+1,e.length-1);if("color"===o){if(t=(a=a.split(" ")).shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(t))throw Error((0,n.Z)(10,t))}else a=a.split(",");return a=a.map(e=>parseFloat(e)),{type:o,values:a,colorSpace:t}}function a(e){let{type:t,colorSpace:r}=e,{values:n}=e;return -1!==t.indexOf("rgb")?n=n.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),`${t}(${n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`})`}function l(e){let t="hsl"===(e=i(e)).type||"hsla"===e.type?i(function(e){e=i(e);let{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,l=n*Math.min(o,1-o),u=(e,t=(e+r/30)%12)=>o-l*Math.max(Math.min(t-3,9-t,1),-1),s="rgb",c=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),a({type:s,values:c})}(e)).values:e.values;return Number((.2126*(t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)))[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){let r=l(e),n=l(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function s(e,t){return e=i(e),t=o(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,a(e)}function c(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return a(e)}function d(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return a(e)}},66500:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(54695),o=r(60916),i=r(59766);let a=["values","unit","step"],l=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,n.Z)({},e,{[t.key]:t.val}),{})};var u={borderRadius:4},s=r(98700);let c=["breakpoints","palette","spacing","shape"];var d=function(e={},...t){let{breakpoints:r={},palette:d={},spacing:f,shape:p={}}=e,h=(0,o.Z)(e,c),m=function(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:i=5}=e,u=(0,o.Z)(e,a),s=l(t),c=Object.keys(s);function d(e){let n="number"==typeof t[e]?t[e]:e;return`@media (min-width:${n}${r})`}function f(e){let n="number"==typeof t[e]?t[e]:e;return`@media (max-width:${n-i/100}${r})`}function p(e,n){let o=c.indexOf(n);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==o&&"number"==typeof t[c[o]]?t[c[o]]:n)-i/100}${r})`}return(0,n.Z)({keys:c,values:s,up:d,down:f,between:p,only:function(e){return c.indexOf(e)+1{let r=0===e.length?[1]:e;return r.map(e=>{let r=t(e);return"number"==typeof r?`${r}px`:r}).join(" ")};return r.mui=!0,r}(f),b=(0,i.Z)({breakpoints:m,direction:"ltr",components:{},palette:(0,n.Z)({mode:"light"},d),spacing:y,shape:(0,n.Z)({},u,p)},h);return t.reduce((e,t)=>(0,i.Z)(e,t),b)}},85578:function(e,t,r){"use strict";r.d(t,{Gc:function(){return e_},G$:function(){return e$}});var n=r(54844),o=r(47730),i=function(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(r=>{e[r]=t}),e),{}),r=e=>Object.keys(e).reduce((r,n)=>t[n]?(0,o.Z)(r,t[n](e)):r,{});return r.propTypes={},r.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),r},a=r(98700),l=r(95408);function u(e){return"number"!=typeof e?e:`${e}px solid`}let s=(0,n.Z)({prop:"border",themeKey:"borders",transform:u}),c=(0,n.Z)({prop:"borderTop",themeKey:"borders",transform:u}),d=(0,n.Z)({prop:"borderRight",themeKey:"borders",transform:u}),f=(0,n.Z)({prop:"borderBottom",themeKey:"borders",transform:u}),p=(0,n.Z)({prop:"borderLeft",themeKey:"borders",transform:u}),h=(0,n.Z)({prop:"borderColor",themeKey:"palette"}),m=(0,n.Z)({prop:"borderTopColor",themeKey:"palette"}),y=(0,n.Z)({prop:"borderRightColor",themeKey:"palette"}),b=(0,n.Z)({prop:"borderBottomColor",themeKey:"palette"}),v=(0,n.Z)({prop:"borderLeftColor",themeKey:"palette"}),g=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){let t=(0,a.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:(0,a.NA)(t,e)});return(0,l.k9)(e,e.borderRadius,r)}return null};g.propTypes={},g.filterProps=["borderRadius"];let x=i(s,c,d,f,p,h,m,y,b,v,g),w=(0,n.Z)({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),Z=(0,n.Z)({prop:"display"}),S=(0,n.Z)({prop:"overflow"}),k=(0,n.Z)({prop:"textOverflow"}),O=(0,n.Z)({prop:"visibility"}),T=(0,n.Z)({prop:"whiteSpace"});var P=i(w,Z,S,k,O,T);let C=(0,n.Z)({prop:"flexBasis"}),R=(0,n.Z)({prop:"flexDirection"}),E=(0,n.Z)({prop:"flexWrap"}),j=(0,n.Z)({prop:"justifyContent"}),M=(0,n.Z)({prop:"alignItems"}),$=(0,n.Z)({prop:"alignContent"}),_=(0,n.Z)({prop:"order"}),I=(0,n.Z)({prop:"flex"}),A=(0,n.Z)({prop:"flexGrow"}),D=(0,n.Z)({prop:"flexShrink"}),N=(0,n.Z)({prop:"alignSelf"}),F=(0,n.Z)({prop:"justifyItems"}),B=(0,n.Z)({prop:"justifySelf"}),L=i(C,R,E,j,M,$,_,I,A,D,N,F,B),z=e=>{if(void 0!==e.gap&&null!==e.gap){let t=(0,a.eI)(e.theme,"spacing",8,"gap"),r=e=>({gap:(0,a.NA)(t,e)});return(0,l.k9)(e,e.gap,r)}return null};z.propTypes={},z.filterProps=["gap"];let V=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){let t=(0,a.eI)(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:(0,a.NA)(t,e)});return(0,l.k9)(e,e.columnGap,r)}return null};V.propTypes={},V.filterProps=["columnGap"];let W=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){let t=(0,a.eI)(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:(0,a.NA)(t,e)});return(0,l.k9)(e,e.rowGap,r)}return null};W.propTypes={},W.filterProps=["rowGap"];let q=(0,n.Z)({prop:"gridColumn"}),H=(0,n.Z)({prop:"gridRow"}),U=(0,n.Z)({prop:"gridAutoFlow"}),Y=(0,n.Z)({prop:"gridAutoColumns"}),G=(0,n.Z)({prop:"gridAutoRows"}),K=(0,n.Z)({prop:"gridTemplateColumns"}),X=(0,n.Z)({prop:"gridTemplateRows"}),Q=(0,n.Z)({prop:"gridTemplateAreas"}),J=(0,n.Z)({prop:"gridArea"}),ee=i(z,V,W,q,H,U,Y,G,K,X,Q,J),et=(0,n.Z)({prop:"position"}),er=(0,n.Z)({prop:"zIndex",themeKey:"zIndex"}),en=(0,n.Z)({prop:"top"}),eo=(0,n.Z)({prop:"right"}),ei=(0,n.Z)({prop:"bottom"}),ea=(0,n.Z)({prop:"left"});var el=i(et,er,en,eo,ei,ea);let eu=(0,n.Z)({prop:"color",themeKey:"palette"}),es=(0,n.Z)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),ec=(0,n.Z)({prop:"backgroundColor",themeKey:"palette"}),ed=i(eu,es,ec),ef=(0,n.Z)({prop:"boxShadow",themeKey:"shadows"});function ep(e){return e<=1&&0!==e?`${100*e}%`:e}let eh=(0,n.Z)({prop:"width",transform:ep}),em=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){let t=t=>{var r,n,o;let i=(null==(r=e.theme)?void 0:null==(n=r.breakpoints)?void 0:null==(o=n.values)?void 0:o[t])||l.VO[t];return{maxWidth:i||ep(t)}};return(0,l.k9)(e,e.maxWidth,t)}return null};em.filterProps=["maxWidth"];let ey=(0,n.Z)({prop:"minWidth",transform:ep}),eb=(0,n.Z)({prop:"height",transform:ep}),ev=(0,n.Z)({prop:"maxHeight",transform:ep}),eg=(0,n.Z)({prop:"minHeight",transform:ep});(0,n.Z)({prop:"size",cssProperty:"width",transform:ep}),(0,n.Z)({prop:"size",cssProperty:"height",transform:ep});let ex=(0,n.Z)({prop:"boxSizing"}),ew=i(eh,em,ey,eb,ev,eg,ex),eZ=(0,n.Z)({prop:"fontFamily",themeKey:"typography"}),eS=(0,n.Z)({prop:"fontSize",themeKey:"typography"}),ek=(0,n.Z)({prop:"fontStyle",themeKey:"typography"}),eO=(0,n.Z)({prop:"fontWeight",themeKey:"typography"}),eT=(0,n.Z)({prop:"letterSpacing"}),eP=(0,n.Z)({prop:"textTransform"}),eC=(0,n.Z)({prop:"lineHeight"}),eR=(0,n.Z)({prop:"textAlign"}),eE=(0,n.Z)({prop:"typography",cssProperty:!1,themeKey:"typography"}),ej=i(eE,eZ,eS,ek,eO,eT,eC,eR,eP),eM={borders:x.filterProps,display:P.filterProps,flexbox:L.filterProps,grid:ee.filterProps,positions:el.filterProps,palette:ed.filterProps,shadows:ef.filterProps,sizing:ew.filterProps,spacing:a.ZP.filterProps,typography:ej.filterProps},e$={borders:x,display:P,flexbox:L,grid:ee,positions:el,palette:ed,shadows:ef,sizing:ew,spacing:a.ZP,typography:ej},e_=Object.keys(eM).reduce((e,t)=>(eM[t].forEach(r=>{e[r]=e$[t]}),e),{})},47730:function(e,t,r){"use strict";var n=r(59766);t.Z=function(e,t){return t?(0,n.Z)(e,t,{clone:!1}):e}},98700:function(e,t,r){"use strict";r.d(t,{hB:function(){return h},eI:function(){return p},ZP:function(){return x},NA:function(){return m}});var n=r(95408),o=r(54844),i=r(47730);let a={m:"margin",p:"padding"},l={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},u={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},s=function(e){let t={};return r=>(void 0===t[r]&&(t[r]=e(r)),t[r])}(e=>{if(e.length>2){if(!u[e])return[e];e=u[e]}let[t,r]=e.split(""),n=a[t],o=l[r]||"";return Array.isArray(o)?o.map(e=>n+e):[n+o]}),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],f=[...c,...d];function p(e,t,r,n){var i;let a=null!=(i=(0,o.D)(e,t,!1))?i:r;return"number"==typeof a?e=>"string"==typeof e?e:a*e:Array.isArray(a)?e=>"string"==typeof e?e:a[e]:"function"==typeof a?a:()=>void 0}function h(e){return p(e,"spacing",8,"spacing")}function m(e,t){if("string"==typeof t||null==t)return t;let r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function y(e,t){let r=h(e.theme);return Object.keys(e).map(o=>(function(e,t,r,o){if(-1===t.indexOf(r))return null;let i=s(r),a=e=>i.reduce((t,r)=>(t[r]=m(o,e),t),{}),l=e[r];return(0,n.k9)(e,l,a)})(e,t,o,r)).reduce(i.Z,{})}function b(e){return y(e,c)}function v(e){return y(e,d)}function g(e){return y(e,f)}b.propTypes={},b.filterProps=c,v.propTypes={},v.filterProps=d,g.propTypes={},g.filterProps=f;var x=g},54844:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(28320),o=r(95408);function i(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){let n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:i(e,r)||n,t&&(o=t(o)),o}t.Z=function(e){let{prop:t,cssProperty:r=e.prop,themeKey:l,transform:u}=e,s=e=>{if(null==e[t])return null;let s=e[t],c=e.theme,d=i(c,l)||{},f=e=>{let o=a(d,u,e);return(e===o&&"string"==typeof e&&(o=a(d,u,`${t}${"default"===e?"":(0,n.Z)(e)}`,e)),!1===r)?o:{[r]:o}};return(0,o.k9)(e,s,f)};return s.propTypes={},s.filterProps=[t],s}},39707:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(54695),o=r(60916),i=r(59766),a=r(85578);let l=["sx"],u=e=>{let t={systemProps:{},otherProps:{}};return Object.keys(e).forEach(r=>{a.Gc[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function s(e){let t;let{sx:r}=e,a=(0,o.Z)(e,l),{systemProps:s,otherProps:c}=u(a);return t=Array.isArray(r)?[s,...r]:"function"==typeof r?(...e)=>{let t=r(...e);return(0,i.P)(t)?(0,n.Z)({},s,t):s}:(0,n.Z)({},s,r),(0,n.Z)({},c,{sx:t})}},86523:function(e,t,r){"use strict";var n=r(47730),o=r(85578),i=r(95408);let a=function(e=o.G$){let t=Object.keys(e).reduce((t,r)=>(e[r].filterProps.forEach(n=>{t[n]=e[r]}),t),{});function r(e,r,n){let o=t[e];return o?o({[e]:r,theme:n}):{[e]:r}}return function e(o){let{sx:a,theme:l={}}=o||{};if(!a)return null;function u(o){let a=o;if("function"==typeof o)a=o(l);else if("object"!=typeof o)return o;if(!a)return null;let u=(0,i.W8)(l.breakpoints),s=Object.keys(u),c=u;return Object.keys(a).forEach(o=>{var u;let s="function"==typeof(u=a[o])?u(l):u;if(null!=s){if("object"==typeof s){if(t[o])c=(0,n.Z)(c,r(o,s,l));else{let d=(0,i.k9)({theme:l},s,e=>({[o]:e}));(function(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),r=new Set(t);return e.every(e=>r.size===Object.keys(e).length)})(d,s)?c[o]=e({sx:s,theme:l}):c=(0,n.Z)(c,d)}}else c=(0,n.Z)(c,r(o,s,l))}}),(0,i.L7)(s,c)}return Array.isArray(a)?a.map(u):u(a)}}();a.filterProps=["sx"],t.Z=a},96682:function(e,t,r){"use strict";var n=r(66500),o=r(10433);let i=(0,n.Z)();t.Z=function(e=i){return(0,o.Z)(e)}},20539:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(47925);function o(e){let{theme:t,name:r,props:o}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,n.Z)(t.components[r].defaultProps,o):o}},10433:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(67294);let o=n.createContext(null);var i=function(e=null){let t=function(){let e=n.useContext(o);return e}();return t&&0!==Object.keys(t).length?t:e}},37078:function(e,t){"use strict";let r;let n=e=>e,o=(r=n,{configure(e){r=e},generate:e=>r(e),reset(){r=n}});t.Z=o},28320:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(71387);function o(e){if("string"!=typeof e)throw Error((0,n.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},94780:function(e,t,r){"use strict";function n(e,t,r){let n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((e,n)=>(n&&(e.push(t(n)),r&&r[n]&&e.push(r[n])),e),[]).join(" ")}),n}r.d(t,{Z:function(){return n}})},49064:function(e,t,r){"use strict";function n(...e){return e.reduce((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)},()=>{})}r.d(t,{Z:function(){return n}})},87596:function(e,t,r){"use strict";function n(e,t=166){let r;function n(...n){let o=()=>{e.apply(this,n)};clearTimeout(r),r=setTimeout(o,t)}return n.clear=()=>{clearTimeout(r)},n}r.d(t,{Z:function(){return n}})},59766:function(e,t,r){"use strict";r.d(t,{P:function(){return o},Z:function(){return function e(t,r,i={clone:!0}){let a=i.clone?(0,n.Z)({},t):t;return o(t)&&o(r)&&Object.keys(r).forEach(n=>{"__proto__"!==n&&(o(r[n])&&n in t&&o(t[n])?a[n]=e(t[n],r[n],i):a[n]=r[n])}),a}}});var n=r(71860);function o(e){return null!==e&&"object"==typeof e&&e.constructor===Object}},71387:function(e,t,r){"use strict";function n(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r{o[t]=(0,n.Z)(e,t,r)}),o}},95806:function(e,t,r){"use strict";function n(e){let t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}r.d(t,{Z:function(){return n}})},57094:function(e,t,r){"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{Z:function(){return n}})},58290:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(57094);function o(e){let t=(0,n.Z)(e);return t.defaultView||window}},47925:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(71860);function o(e,t){let r=(0,n.Z)({},t);return Object.keys(e).forEach(t=>{void 0===r[t]&&(r[t]=e[t])}),r}},7960:function(e,t,r){"use strict";function n(e,t){"function"==typeof e?e(t):e&&(e.current=t)}r.d(t,{Z:function(){return n}})},8925:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(67294);function o({controlled:e,default:t,name:r,state:o="value"}){let{current:i}=n.useRef(void 0!==e),[a,l]=n.useState(t),u=n.useCallback(e=>{i||l(e)},[]);return[i?e:a,u]}},16600:function(e,t,r){"use strict";var n=r(67294);let o="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;t.Z=o},73633:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(67294),o=r(16600);function i(e){let t=n.useRef(e);return(0,o.Z)(()=>{t.current=e}),n.useCallback((...e)=>(0,t.current)(...e),[])}},30067:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(67294),o=r(7960);function i(...e){return n.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{(0,o.Z)(e,t)})},e)}},57579:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n,o=r(67294);let i=0,a=(n||(n=r.t(o,2))).useId;function l(e){if(void 0!==a){let t=a();return null!=e?e:t}return function(e){let[t,r]=o.useState(e);return o.useEffect(()=>{null==t&&r(`mui-${i+=1}`)},[t]),e||t}(e)}},52359:function(e,t,r){"use strict";r.d(t,{_:function(){return s},y:function(){return u}});var n=r(87462),o=r(67294),i=r(6446);let a={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",inputModeToggleButtonAriaLabel:(e,t)=>e?`text input view is open, go to ${t} view`:`${t} view is open, go to text input view`,start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerDefaultToolbarTitle:"Select date",dateTimePickerDefaultToolbarTitle:"Select date & time",timePickerDefaultToolbarTitle:"Select time",dateRangePickerDefaultToolbarTitle:"Select date range",clockLabelText:(e,t,r)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${r.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,openDatePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?`Choose date, selected date is ${t.format(t.date(e),"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?`Choose time, selected time is ${t.format(t.date(e),"fullTime")}`:"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date"};(0,n.Z)({},a);var l=r(85893);let u=o.createContext(null);function s(e){let t=(0,i.Z)({props:e,name:"MuiLocalizationProvider"}),{children:r,dateAdapter:s,dateFormats:c,dateLibInstance:d,locale:f,adapterLocale:p,localeText:h}=t,m=o.useMemo(()=>new s({locale:null!=p?p:f,formats:c,instance:d}),[s,f,p,c,d]),y=o.useMemo(()=>({minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}),[m]),b=o.useMemo(()=>({utils:m,defaultDates:y,localeText:(0,n.Z)({},a,null!=h?h:{})}),[y,m,h]);return(0,l.jsx)(u.Provider,{value:b,children:r})}},86010:function(e,t,r){"use strict";t.Z=function(){for(var e,t,r=0,n="";r0;t&&r&&t(r)})},e),elements:o},u.push(r),l.set(r,t),t}({root:null==t?void 0:t.current,rootMargin:r})).id,o=e.observer,(c=e.elements).set(h,function(e){return e&&f(e)}),o.observe(h),function(){if(c.delete(h),o.unobserve(h),0===c.size){o.disconnect(),l.delete(n);var e=u.findIndex(function(e){return e.root===n.root&&e.margin===n.margin});e>-1&&u.splice(e,1)}}}}else if(!d){var p=i.requestIdleCallback(function(){return f(!0)});return function(){return i.cancelIdleCallback(p)}}},[h,s,r,t,d]),[m,d,o.useCallback(function(){f(!1)},[])]};var o=r(67294),i=r(44686),a="function"==typeof IntersectionObserver,l=new Map,u=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},34095:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return aw}});var n,o=r(41799),i=r(69396),a=r(828),l=r(36305),u=r(85893);r(37070),r(91811),r(13230),r(20048),r(87475),r(3213),r(58694),r(9058),r(71419),r(43496),r(65343),r(66289),r(39052),r(46393),r(52585),r(75042),r(34557),r(88980),r(27177);var s=r(9008),c=r.n(s),d=r(4298),f=r.n(d),p=r(41664),h=r.n(p),m=r(61225),y=r(30612),b=r(69873),v=r(22841),g=r(31362),x=r(61953),w=r(1048),Z=r(32793),S=r(67294),k=r(86010),O=r(94780),T=r(67074),P=r(6446),C=r(36622),R=r(70918),E=r(34867),j=r(1588);function M(e){return(0,E.Z)("MuiAppBar",e)}(0,j.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);let $=["className","color","enableColorOnDark","position"],_=e=>{let{color:t,position:r,classes:n}=e,o={root:["root",`color${(0,C.Z)(t)}`,`position${(0,C.Z)(r)}`]};return(0,O.Z)(o,M,n)},I=(e,t)=>`${null==e?void 0:e.replace(")","")}, ${t})`,A=(0,T.ZP)(R.Z,{name:"MuiAppBar",slot:"Root",overridesResolver(e,t){let{ownerState:r}=e;return[t.root,t[`position${(0,C.Z)(r.position)}`],t[`color${(0,C.Z)(r.color)}`]]}})(({theme:e,ownerState:t})=>{let r="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return(0,Z.Z)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===t.position&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===t.position&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===t.position&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"static"===t.position&&{position:"static"},"relative"===t.position&&{position:"relative"},!e.vars&&(0,Z.Z)({},"default"===t.color&&{backgroundColor:r,color:e.palette.getContrastText(r)},t.color&&"default"!==t.color&&"inherit"!==t.color&&"transparent"!==t.color&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},"inherit"===t.color&&{color:"inherit"},"dark"===e.palette.mode&&!t.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===t.color&&(0,Z.Z)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&(0,Z.Z)({},"default"===t.color&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:I(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:I(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:I(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:I(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===t.color?"inherit":"var(--AppBar-color)"},"transparent"===t.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),D=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiAppBar"}),{className:n,color:o="primary",enableColorOnDark:i=!1,position:a="fixed"}=r,l=(0,w.Z)(r,$),s=(0,Z.Z)({},r,{color:o,position:a,enableColorOnDark:i}),c=_(s);return(0,u.jsx)(A,(0,Z.Z)({square:!0,component:"header",ownerState:s,elevation:4,className:(0,k.Z)(c.root,n,"fixed"===a&&"mui-fixed"),ref:t},l))});function N(e){return(0,E.Z)("MuiToolbar",e)}(0,j.Z)("MuiToolbar",["root","gutters","regular","dense"]);let F=["className","component","disableGutters","variant"],B=e=>{let{classes:t,disableGutters:r,variant:n}=e;return(0,O.Z)({root:["root",!r&&"gutters",n]},N,t)},L=(0,T.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver(e,t){let{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})(({theme:e,ownerState:t})=>(0,Z.Z)({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48}),({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar),z=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiToolbar"}),{className:n,component:o="div",disableGutters:i=!1,variant:a="regular"}=r,l=(0,w.Z)(r,F),s=(0,Z.Z)({},r,{component:o,disableGutters:i,variant:a}),c=B(s);return(0,u.jsx)(L,(0,Z.Z)({as:o,className:(0,k.Z)(c.root,n),ref:t,ownerState:s},l))});var V=r(80562),W=r(29620),q=r(77745),H=r(326),U=r(64459);function Y(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function G(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e){G(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===K(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}function Q(e,t){G(2,arguments);var r=X(e),n=Y(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function J(e,t){G(2,arguments);var r=X(e).getTime(),n=Y(t);return new Date(r+n)}function ee(e,t){G(2,arguments);var r=X(e),n=Y(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var o=r.getDate(),i=new Date(r.getTime());return(i.setMonth(r.getMonth()+n+1,0),o>=i.getDate())?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function et(e,t){return G(2,arguments),ee(e,12*Y(t))}function er(e,t){G(2,arguments);var r=X(e),n=X(t),o=r.getTime()-n.getTime();return o<0?-1:o>0?1:o}function en(e){G(1,arguments);var t=X(e);return t.setHours(23,59,59,999),t}function eo(e){G(1,arguments);var t=X(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function ei(e,t){G(2,arguments);var r,n=X(e),o=X(t),i=er(n,o),a=Math.abs(function(e,t){G(2,arguments);var r=X(e),n=X(t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(n,o));if(a<1)r=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*a);var l=er(n,o)===-i;(function(e){G(1,arguments);var t=X(e);return en(t).getTime()===eo(t).getTime()})(X(e))&&1===a&&1===er(e,o)&&(l=!1),r=i*(a-Number(l))}return 0===r?0:r}var ea={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function el(e){return e?ea[e]:ea.trunc}function eu(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function es(e){G(1,arguments);var t=X(e);return t.setHours(0,0,0,0),t}function ec(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function ed(e,t){G(2,arguments);var r=X(e),n=X(t),o=ec(r,n),i=Math.abs(function(e,t){G(2,arguments);var r=es(e),n=es(t);return Math.round((r.getTime()-eu(r)-(n.getTime()-eu(n)))/864e5)}(r,n));r.setDate(r.getDate()-o*i);var a=Number(ec(r,n)===-o),l=o*(i-a);return 0===l?0:l}function ef(e,t){return G(2,arguments),X(e).getTime()-X(t).getTime()}var ep={};function eh(e,t){G(1,arguments);var r,n,o,i,a,l,u,s,c=Y(null!==(r=null!==(n=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:ep.weekStartsOn)&&void 0!==n?n:null===(u=ep.locale)||void 0===u?void 0:null===(s=u.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==r?r:0);if(!(c>=0&&c<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=X(e),f=d.getDay();return d.setDate(d.getDate()+((f=o.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function ew(e){G(1,arguments);var t=X(e);return Math.round((eg(t).getTime()-(function(e){G(1,arguments);var t=ex(e),r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),eg(r)})(t).getTime())/6048e5)+1}function eZ(e,t){G(1,arguments);var r,n,o,i,a,l,u,s,c=Y(null!==(r=null!==(n=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:ep.weekStartsOn)&&void 0!==n?n:null===(u=ep.locale)||void 0===u?void 0:null===(s=u.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==r?r:0);if(!(c>=0&&c<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=X(e),f=d.getUTCDay();return d.setUTCDate(d.getUTCDate()-((f=1&&f<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var h=eZ(p,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var y=eZ(m,t);return c.getTime()>=h.getTime()?d+1:c.getTime()>=y.getTime()?d:d-1}function ek(e,t){G(1,arguments);var r=X(e);return Math.round((eZ(r,t).getTime()-(function(e,t){G(1,arguments);var r,n,o,i,a,l,u,s,c=Y(null!==(r=null!==(n=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:ep.firstWeekContainsDate)&&void 0!==n?n:null===(u=ep.locale)||void 0===u?void 0:null===(s=u.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==r?r:1),d=eS(e,t),f=new Date(0);return f.setUTCFullYear(d,0,c),f.setUTCHours(0,0,0,0),eZ(f,t)})(r,t).getTime())/6048e5)+1}function eO(e,t){for(var r=Math.abs(e).toString();r.length0?r:1-r;return eO("yy"===t?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):eO(r+1,2)},d:function(e,t){return eO(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:function(e,t){return eO(e.getUTCHours()%12||12,t.length)},H:function(e,t){return eO(e.getUTCHours(),t.length)},m:function(e,t){return eO(e.getUTCMinutes(),t.length)},s:function(e,t){return eO(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length;return eO(Math.floor(e.getUTCMilliseconds()*Math.pow(10,r-3)),t.length)}},eP={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};function eC(e,t){var r=e>0?"-":"+",n=Math.abs(e),o=Math.floor(n/60),i=n%60;return 0===i?r+String(o):r+String(o)+(t||"")+eO(i,2)}function eR(e,t){return e%60==0?(e>0?"-":"+")+eO(Math.abs(e)/60,2):eE(e,t)}function eE(e,t){var r=Math.abs(e);return(e>0?"-":"+")+eO(Math.floor(r/60),2)+(t||"")+eO(r%60,2)}var ej={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){var n=e.getUTCFullYear();return r.ordinalNumber(n>0?n:1-n,{unit:"year"})}return eT.y(e,t)},Y:function(e,t,r,n){var o=eS(e,n),i=o>0?o:1-o;return"YY"===t?eO(i%100,2):"Yo"===t?r.ordinalNumber(i,{unit:"year"}):eO(i,t.length)},R:function(e,t){return eO(ex(e),t.length)},u:function(e,t){return eO(e.getUTCFullYear(),t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return eO(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return eO(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return eT.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return eO(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var o=ek(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):eO(o,t.length)},I:function(e,t,r){var n=ew(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):eO(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):eT.d(e,t)},D:function(e,t,r){var n=function(e){G(1,arguments);var t=X(e),r=t.getTime();return t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),Math.floor((r-t.getTime())/864e5)+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):eO(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var o=e.getUTCDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return eO(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var o=e.getUTCDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return eO(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return eO(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,o=e.getUTCHours();switch(n=12===o?eP.noon:0===o?eP.midnight:o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,o=e.getUTCHours();switch(n=o>=17?eP.evening:o>=12?eP.afternoon:o>=4?eP.morning:eP.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return eT.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):eT.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):eO(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):eO(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):eT.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):eT.s(e,t)},S:function(e,t){return eT.S(e,t)},X:function(e,t,r,n){var o=(n._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return eR(o);case"XXXX":case"XX":return eE(o);default:return eE(o,":")}},x:function(e,t,r,n){var o=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return eR(o);case"xxxx":case"xx":return eE(o);default:return eE(o,":")}},O:function(e,t,r,n){var o=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eC(o,":");default:return"GMT"+eE(o,":")}},z:function(e,t,r,n){var o=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eC(o,":");default:return"GMT"+eE(o,":")}},t:function(e,t,r,n){return eO(Math.floor((n._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,r,n){return eO((n._originalDate||e).getTime(),t.length)}},eM=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},e$=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},e_={p:e$,P:function(e,t){var r,n=e.match(/(P+)(p+)?/)||[],o=n[1],i=n[2];if(!i)return eM(e,t);switch(o){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",eM(o,t)).replace("{{time}}",e$(i,t))}},eI=["D","DD"],eA=["YY","YYYY"];function eD(e){return -1!==eI.indexOf(e)}function eN(e){return -1!==eA.indexOf(e)}function eF(e,t,r){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var eB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eL(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var ez={date:eL({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eL({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eL({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eV={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function eW(e){return function(t,r){var n;if("formatting"===(null!=r&&r.context?String(r.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=r&&r.width?String(r.width):o;n=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!=r&&r.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[a]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function eq(e){return function(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],u=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?function(e,t){for(var r=0;r0?"in "+n:n+" ago":n},formatLong:ez,formatRelative:function(e,t,r,n){return eV[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:eW({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:eW({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:eW({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:eW({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:eW({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(n={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(n.matchPattern);if(!r)return null;var o=r[0],i=e.match(n.parsePattern);if(!i)return null;var a=n.valueCallback?n.valueCallback(i[0]):i[0];return{value:a=t.valueCallback?t.valueCallback(a):a,rest:e.slice(o.length)}}),era:eq({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:eq({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:eq({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:eq({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:eq({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},eU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eG=/^'([^]*?)'?$/,eK=/''/g,eX=/[a-zA-Z]/;function eQ(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getTime()>n.getTime()}function eJ(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getTime()0,o=n?t:1-t;if(o<=50)r=e||100;else{var i=o+50;r=e+100*Math.floor(i/100)-(e>=i%100?100:0)}return n?r:1-r}function tS(e){return e%400==0||e%4==0&&e%100!=0}function tk(e){return(tk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tO(e,t){for(var r=0;r0}},{key:"set",value:function(e,t,r){var n=e.getUTCFullYear();if(r.isTwoDigitYear){var o=tZ(r.year,n);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&1!==t.era?1-r.year:r.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}]),r&&tO(o,r),o}(ti);function tj(e){return(tj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tM(e,t){for(var r=0;r0}},{key:"set",value:function(e,t,r,n){var o=eS(e,n);if(r.isTwoDigitYear){var i=tZ(r.year,o);return e.setUTCFullYear(i,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),eZ(e,n)}var a="era"in t&&1!==t.era?1-r.year:r.year;return e.setUTCFullYear(a,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),eZ(e,n)}}]),r&&tM(o,r),o}(ti);function tN(e){return(tN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tF(e,t){for(var r=0;r=1&&t<=4}},{key:"set",value:function(e,t,r){return e.setUTCMonth((r-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),r&&tJ(o,r),o}(ti);function t6(e){return(t6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t3(e,t){for(var r=0;r=1&&t<=4}},{key:"set",value:function(e,t,r){return e.setUTCMonth((r-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),r&&t3(o,r),o}(ti);function rr(e){return(rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rn(e,t){for(var r=0;r=0&&t<=11}},{key:"set",value:function(e,t,r){return e.setUTCMonth(r,1),e.setUTCHours(0,0,0,0),e}}]),r&&rn(o,r),o}(ti);function rs(e){return(rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rc(e,t){for(var r=0;r=0&&t<=11}},{key:"set",value:function(e,t,r){return e.setUTCMonth(r,1),e.setUTCHours(0,0,0,0),e}}]),r&&rc(o,r),o}(ti);function ry(e){return(ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rb(e,t){for(var r=0;r=1&&t<=53}},{key:"set",value:function(e,t,r,n){return eZ(function(e,t,r){G(2,arguments);var n=X(e),o=Y(t),i=ek(n,r)-o;return n.setUTCDate(n.getUTCDate()-7*i),n}(e,r,n),n)}}]),r&&rb(o,r),o}(ti);function rS(e){return(rS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rk(e,t){for(var r=0;r=1&&t<=53}},{key:"set",value:function(e,t,r){return eg(function(e,t){G(2,arguments);var r=X(e),n=Y(t),o=ew(r)-n;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,r))}}]),r&&rk(o,r),o}(ti);function rE(e){return(rE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rj(e,t){for(var r=0;r=1&&t<=rD[n]:t>=1&&t<=rA[n]}},{key:"set",value:function(e,t,r){return e.setUTCDate(r),e.setUTCHours(0,0,0,0),e}}]),r&&rj(o,r),o}(ti);function rF(e){return(rF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rB(e,t){for(var r=0;r=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,r){return e.setUTCMonth(0,r),e.setUTCHours(0,0,0,0),e}}]),r&&rB(o,r),o}(ti);function rH(e,t,r){G(2,arguments);var n,o,i,a,l,u,s,c,d=Y(null!==(n=null!==(o=null!==(i=null!==(a=null==r?void 0:r.weekStartsOn)&&void 0!==a?a:null==r?void 0:null===(l=r.locale)||void 0===l?void 0:null===(u=l.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:ep.weekStartsOn)&&void 0!==o?o:null===(s=ep.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=X(e),p=Y(t),h=f.getUTCDay();return f.setUTCDate(f.getUTCDate()+(((p%7+7)%7=0&&t<=6}},{key:"set",value:function(e,t,r,n){return(e=rH(e,r,n)).setUTCHours(0,0,0,0),e}}],rY(i.prototype,r),n&&rY(i,n),i}(ti);function r0(e){return(r0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r1(e,t){for(var r=0;r=0&&t<=6}},{key:"set",value:function(e,t,r,n){return(e=rH(e,r,n)).setUTCHours(0,0,0,0),e}}],r1(i.prototype,r),n&&r1(i,n),i}(ti);function r7(e){return(r7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r9(e,t){for(var r=0;r=0&&t<=6}},{key:"set",value:function(e,t,r,n){return(e=rH(e,r,n)).setUTCHours(0,0,0,0),e}}],r9(i.prototype,r),n&&r9(i,n),i}(ti);function no(e){return(no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ni(e,t){for(var r=0;r=1&&t<=7}},{key:"set",value:function(e,t,r){return(e=function(e,t){G(2,arguments);var r=Y(t);r%7==0&&(r-=7);var n=X(e),o=((r%7+7)%7<1?7:0)+r-n.getUTCDay();return n.setUTCDate(n.getUTCDate()+o),n}(e,r)).setUTCHours(0,0,0,0),e}}],ni(i.prototype,r),n&&ni(i,n),i}(ti);function nd(e){return(nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nf(e,t){for(var r=0;r=1&&t<=12}},{key:"set",value:function(e,t,r){var n=e.getUTCHours()>=12;return n&&r<12?e.setUTCHours(r+12,0,0,0):n||12!==r?e.setUTCHours(r,0,0,0):e.setUTCHours(0,0,0,0),e}}]),r&&n$(o,r),o}(ti);function nF(e){return(nF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nB(e,t){for(var r=0;r=0&&t<=23}},{key:"set",value:function(e,t,r){return e.setUTCHours(r,0,0,0),e}}]),r&&nB(o,r),o}(ti);function nH(e){return(nH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nU(e,t){for(var r=0;r=0&&t<=11}},{key:"set",value:function(e,t,r){return e.getUTCHours()>=12&&r<12?e.setUTCHours(r+12,0,0,0):e.setUTCHours(r,0,0,0),e}}]),r&&nU(o,r),o}(ti);function nJ(e){return(nJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n0(e,t){for(var r=0;r=1&&t<=24}},{key:"set",value:function(e,t,r){return e.setUTCHours(r<=24?r%24:r,0,0,0),e}}]),r&&n0(o,r),o}(ti);function n3(e){return(n3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n7(e,t){for(var r=0;r=0&&t<=59}},{key:"set",value:function(e,t,r){return e.setUTCMinutes(r,0,0),e}}]),r&&n7(o,r),o}(ti);function on(e){return(on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oo(e,t){for(var r=0;r=0&&t<=59}},{key:"set",value:function(e,t,r){return e.setUTCSeconds(r,0),e}}]),r&&oo(o,r),o}(ti);function oc(e){return(oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function od(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i,a=!0,l=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==o.return||o.return()}finally{if(l)throw i}}}}function oY(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0&&c<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=X(e),f=d.getDay();return d.setDate(d.getDate()-((f2)return r;if(/:/.test(n[0])?t=n[0]:(r.date=n[0],t=n[1],o6.timeZoneDelimiter.test(r.date)&&(r.date=e.split(o6.timeZoneDelimiter)[0],t=e.substr(r.date.length,e.length))),t){var o=o6.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}(e);if(a.date){var l=function(e,t){var r=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var o=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:null===i?o:100*i,restDateString:e.slice((n[1]||n[2]).length)}}(a.date,i);n=function(e,t){if(null===t)return new Date(NaN);var r,n,o=e.match(o3);if(!o)return new Date(NaN);var i=!!o[4],a=o8(o[1]),l=o8(o[2])-1,u=o8(o[3]),s=o8(o[4]),c=o8(o[5])-1;if(i)return s>=1&&s<=53&&c>=0&&c<=6?((r=new Date(0)).setUTCFullYear(t,0,4),n=r.getUTCDay()||7,r.setUTCDate(r.getUTCDate()+((s-1)*7+c+1-n)),r):new Date(NaN);var d=new Date(0);return l>=0&&l<=11&&u>=1&&u<=(it[l]||(ir(t)?29:28))&&a>=1&&a<=(ir(t)?366:365)?(d.setUTCFullYear(t,l,Math.max(a,u)),d):new Date(NaN)}(l.restDateString,l.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);var u=n.getTime(),s=0;if(a.time&&isNaN(s=function(e){var t=e.match(o7);if(!t)return NaN;var r=ie(t[1]),n=ie(t[2]),o=ie(t[3]);return(24===r?0===n&&0===o:o>=0&&o<60&&n>=0&&n<60&&r>=0&&r<25)?36e5*r+6e4*n+1e3*o:NaN}(a.time)))return new Date(NaN);if(a.timezone){if(isNaN(o=function(e){if("Z"===e)return 0;var t=e.match(o9);if(!t)return 0;var r="+"===t[1]?-1:1,n=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return o>=0&&o<=59?r*(36e5*n+6e4*o):NaN}(a.timezone)))return new Date(NaN)}else{var c=new Date(u+s),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return new Date(u+s+o)}(e)},this.toISO=function(e){return function(e,t){G(1,arguments);var r,n,o=X(e);if(isNaN(o.getTime()))throw RangeError("Invalid time value");var i=String(null!==(r=null==t?void 0:t.format)&&void 0!==r?r:"extended"),a=String(null!==(n=null==t?void 0:t.representation)&&void 0!==n?n:"complete");if("extended"!==i&&"basic"!==i)throw RangeError("format must be 'extended' or 'basic'");if("date"!==a&&"time"!==a&&"complete"!==a)throw RangeError("representation must be 'date', 'time', or 'complete'");var l="",u="",s="extended"===i?"-":"";if("time"!==a){var c=eO(o.getDate(),2),d=eO(o.getMonth()+1,2),f=eO(o.getFullYear(),4);l="".concat(f).concat(s).concat(d).concat(s).concat(c)}if("date"!==a){var p=o.getTimezoneOffset();if(0!==p){var h=Math.abs(p),m=eO(Math.floor(h/60),2),y=eO(h%60,2);u="".concat(p<0?"+":"-").concat(m,":").concat(y)}else u="Z";var b=eO(o.getHours(),2),v=eO(o.getMinutes(),2),g=eO(o.getSeconds(),2),x=""===l?"":"T",w=[b,v,g].join("extended"===i?":":"");l="".concat(l).concat(x).concat(w).concat(u)}return l}(e,{format:"extended"})},this.getCurrentLocaleCode=function(){var e;return(null===(e=t.locale)||void 0===e?void 0:e.code)||"en-US"},this.addSeconds=function(e,t){return function(e,t){return G(2,arguments),J(e,1e3*Y(t))}(e,t)},this.addMinutes=function(e,t){return function(e,t){return G(2,arguments),J(e,6e4*Y(t))}(e,t)},this.addHours=function(e,t){return function(e,t){return G(2,arguments),J(e,36e5*Y(t))}(e,t)},this.addDays=function(e,t){return Q(e,t)},this.addWeeks=function(e,t){return function(e,t){return G(2,arguments),Q(e,7*Y(t))}(e,t)},this.addMonths=function(e,t){return ee(e,t)},this.addYears=function(e,t){return et(e,t)},this.isValid=function(e){return eb(t.date(e))},this.getDiff=function(e,r,n){switch(n){case"years":return function(e,t){G(2,arguments);var r=X(e),n=X(t),o=er(r,n),i=Math.abs(function(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getFullYear()-n.getFullYear()}(r,n));r.setFullYear(1584),n.setFullYear(1584);var a=er(r,n)===-o,l=o*(i-Number(a));return 0===l?0:l}(e,t.date(r));case"quarters":return function(e,t,r){G(2,arguments);var n=ei(e,t)/3;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));case"months":return ei(e,t.date(r));case"weeks":return function(e,t,r){G(2,arguments);var n=ed(e,t)/7;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));case"days":return ed(e,t.date(r));case"hours":return function(e,t,r){G(2,arguments);var n=ef(e,t)/36e5;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));case"minutes":return function(e,t,r){G(2,arguments);var n=ef(e,t)/6e4;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));case"seconds":return function(e,t,r){G(2,arguments);var n=ef(e,t)/1e3;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));default:return ef(e,t.date(r))}},this.isAfter=function(e,t){return eQ(e,t)},this.isBefore=function(e,t){return eJ(e,t)},this.startOfDay=function(e){return es(e)},this.endOfDay=function(e){return en(e)},this.getHours=function(e){return function(e){return G(1,arguments),X(e).getHours()}(e)},this.setHours=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t);return r.setHours(n),r}(e,t)},this.setMinutes=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t);return r.setMinutes(n),r}(e,t)},this.getSeconds=function(e){return function(e){return G(1,arguments),X(e).getSeconds()}(e)},this.setSeconds=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t);return r.setSeconds(n),r}(e,t)},this.isSameDay=function(e,t){return function(e,t){G(2,arguments);var r=es(e),n=es(t);return r.getTime()===n.getTime()}(e,t)},this.isSameMonth=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t)},this.isSameYear=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getFullYear()===n.getFullYear()}(e,t)},this.isSameHour=function(e,t){return function(e,t){G(2,arguments);var r=e0(e),n=e0(t);return r.getTime()===n.getTime()}(e,t)},this.startOfYear=function(e){return o5(e)},this.endOfYear=function(e){return em(e)},this.startOfMonth=function(e){return o2(e)},this.endOfMonth=function(e){return eo(e)},this.startOfWeek=function(e){return o4(e,{locale:t.locale})},this.endOfWeek=function(e){return eh(e,{locale:t.locale})},this.getYear=function(e){return function(e){return G(1,arguments),X(e).getFullYear()}(e)},this.setYear=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}(e,t)},this.date=function(e){return void 0===e?new Date:null===e?null:new Date(e)},this.toJsDate=function(e){return e},this.parse=function(e,r){return""===e?null:function(e,t,r,n){G(3,arguments);var o=String(e),i=String(t),a=null!==(s=null!==(c=null==n?void 0:n.locale)&&void 0!==c?c:ep.locale)&&void 0!==s?s:eH;if(!a.match)throw RangeError("locale must contain match property");var l=Y(null!==(d=null!==(f=null!==(p=null!==(h=null==n?void 0:n.firstWeekContainsDate)&&void 0!==h?h:null==n?void 0:null===(m=n.locale)||void 0===m?void 0:null===(y=m.options)||void 0===y?void 0:y.firstWeekContainsDate)&&void 0!==p?p:ep.firstWeekContainsDate)&&void 0!==f?f:null===(b=ep.locale)||void 0===b?void 0:null===(v=b.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==d?d:1);if(!(l>=1&&l<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=Y(null!==(g=null!==(x=null!==(w=null!==(Z=null==n?void 0:n.weekStartsOn)&&void 0!==Z?Z:null==n?void 0:null===(S=n.locale)||void 0===S?void 0:null===(k=S.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:ep.weekStartsOn)&&void 0!==x?x:null===(O=ep.locale)||void 0===O?void 0:null===(T=O.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==g?g:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===i)return""===o?X(r):new Date(NaN);var s,c,d,f,p,h,m,y,b,v,g,x,w,Z,S,k,O,T,P,C={firstWeekContainsDate:l,weekStartsOn:u,locale:a},R=[new tn],E=i.match(oK).map(function(e){var t=e[0];return t in e_?(0,e_[t])(e,a.formatLong):e}).join("").match(oG),j=[],M=oU(E);try{for(M.s();!(P=M.n()).done;){var $=function(){var t=P.value;!(null!=n&&n.useAdditionalWeekYearTokens)&&eN(t)&&eF(t,i,e),!(null!=n&&n.useAdditionalDayOfYearTokens)&&eD(t)&&eF(t,i,e);var r=t[0],l=oq[r];if(l){var u=l.incompatibleTokens;if(Array.isArray(u)){var s=j.find(function(e){return u.includes(e.token)||e.token===r});if(s)throw RangeError("The format string mustn't contain `".concat(s.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===l.incompatibleTokens&&j.length>0)throw RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));j.push({token:r,fullToken:t});var c=l.run(o,t,a.match,C);if(!c)return{v:new Date(NaN)};R.push(c.setter),o=c.rest}else{if(r.match(o0))throw RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");if("''"===t?t="'":"'"===r&&(t=t.match(oX)[1].replace(oQ,"'")),0!==o.indexOf(t))return{v:new Date(NaN)};o=o.slice(t.length)}}();if("object"===oH($))return $.v}}catch(_){M.e(_)}finally{M.f()}if(o.length>0&&oJ.test(o))return new Date(NaN);var I=R.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,r){return r.indexOf(e)===t}).map(function(e){return R.filter(function(t){return t.priority===e}).sort(function(e,t){return t.subPriority-e.subPriority})}).map(function(e){return e[0]}),A=X(r);if(isNaN(A.getTime()))return new Date(NaN);var D,N=ev(A,eu(A)),F={},B=oU(I);try{for(B.s();!(D=B.n()).done;){var L=D.value;if(!L.validate(N,C))return new Date(NaN);var z=L.set(N,F,C);Array.isArray(z)?(N=z[0],function(e,t){if(null==e)throw TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}(F,z[1])):N=z}}catch(V){B.e(V)}finally{B.f()}return N}(e,r,new Date,{locale:t.locale})},this.format=function(e,r){return t.formatByString(e,t.formats[r])},this.formatByString=function(e,r){return function(e,t,r){G(2,arguments);var n,o,i,a,l,u,s,c,d,f,p,h,m,y,b,v,g,x,w=String(t),Z=null!==(n=null!==(o=null==r?void 0:r.locale)&&void 0!==o?o:ep.locale)&&void 0!==n?n:eH,S=Y(null!==(i=null!==(a=null!==(l=null!==(u=null==r?void 0:r.firstWeekContainsDate)&&void 0!==u?u:null==r?void 0:null===(s=r.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==l?l:ep.firstWeekContainsDate)&&void 0!==a?a:null===(d=ep.locale)||void 0===d?void 0:null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(S>=1&&S<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=Y(null!==(p=null!==(h=null!==(m=null!==(y=null==r?void 0:r.weekStartsOn)&&void 0!==y?y:null==r?void 0:null===(b=r.locale)||void 0===b?void 0:null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:ep.weekStartsOn)&&void 0!==h?h:null===(g=ep.locale)||void 0===g?void 0:null===(x=g.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==p?p:0);if(!(k>=0&&k<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Z.localize)throw RangeError("locale must contain localize property");if(!Z.formatLong)throw RangeError("locale must contain formatLong property");var O=X(e);if(!eb(O))throw RangeError("Invalid time value");var T=eu(O),P=ev(O,T),C={firstWeekContainsDate:S,weekStartsOn:k,locale:Z,_originalDate:O};return w.match(eY).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,e_[t])(e,Z.formatLong):e}).join("").match(eU).map(function(n){if("''"===n)return"'";var o,i=n[0];if("'"===i)return(o=n.match(eG))?o[1].replace(eK,"'"):n;var a=ej[i];if(a)return!(null!=r&&r.useAdditionalWeekYearTokens)&&eN(n)&&eF(n,t,String(e)),!(null!=r&&r.useAdditionalDayOfYearTokens)&&eD(n)&&eF(n,t,String(e)),a(P,n,Z.localize,C);if(i.match(eX))throw RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n}).join("")}(e,r,{locale:t.locale})},this.isEqual=function(e,t){return null===e&&null===t||function(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getTime()===n.getTime()}(e,t)},this.isNull=function(e){return null===e},this.isAfterDay=function(e,t){return eQ(e,en(t))},this.isBeforeDay=function(e,t){return eJ(e,es(t))},this.isBeforeYear=function(e,t){return eJ(e,o5(t))},this.isAfterYear=function(e,t){return eQ(e,em(t))},this.isWithinRange=function(e,t){return function(e,t){G(2,arguments);var r=X(e).getTime(),n=X(t.start).getTime(),o=X(t.end).getTime();if(!(n<=o))throw RangeError("Invalid interval");return r>=n&&r<=o}(e,{start:t[0],end:t[1]})},this.formatNumber=function(e){return e},this.getMinutes=function(e){return e.getMinutes()},this.getMonth=function(e){return e.getMonth()},this.getDaysInMonth=function(e){return o1(e)},this.setMonth=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t),o=r.getFullYear(),i=r.getDate(),a=new Date(0);a.setFullYear(o,n,15),a.setHours(0,0,0,0);var l=o1(a);return r.setMonth(n,Math.min(i,l)),r}(e,t)},this.getMeridiemText=function(e){return"am"===e?"AM":"PM"},this.getNextMonth=function(e){return ee(e,1)},this.getPreviousMonth=function(e){return ee(e,-1)},this.getMonthArray=function(e){for(var r=[o5(e)];r.length<12;){var n=r[r.length-1];r.push(t.getNextMonth(n))}return r},this.mergeDateAndTime=function(e,r){return t.setSeconds(t.setMinutes(t.setHours(e,t.getHours(r)),t.getMinutes(r)),t.getSeconds(r))},this.getWeekdays=function(){var e=new Date;return(function(e,t){G(1,arguments);var r,n=e||{},o=X(n.start),i=X(n.end).getTime();if(!(o.getTime()<=i))throw RangeError("Invalid interval");var a=[];o.setHours(0,0,0,0);var l=Number(null!==(r=null==t?void 0:t.step)&&void 0!==r?r:1);if(l<1||isNaN(l))throw RangeError("`options.step` must be a number greater than 1");for(;o.getTime()<=i;)a.push(X(o)),o.setDate(o.getDate()+l),o.setHours(0,0,0,0);return a})({start:o4(e,{locale:t.locale}),end:eh(e,{locale:t.locale})}).map(function(e){return t.formatByString(e,"EEEEEE")})},this.getWeekArray=function(e){for(var r=o4(o2(e),{locale:t.locale}),n=eh(eo(e),{locale:t.locale}),o=0,i=r,a=[],l=null;eJ(i,n);){var u=Math.floor(o/7);a[u]=a[u]||[];var s=function(e){return G(1,arguments),X(e).getDay()}(i);l!==s&&(l=s,a[u].push(i),o+=1),i=Q(i,1)}return a},this.getYearRange=function(e,t){for(var r=o5(e),n=em(t),o=[],i=r;eJ(i,n);)o.push(i),i=et(i,1);return o},this.locale=n,this.formats=Object.assign({},ia,o)};let iu={y:"year",yy:"year",yyy:"year",yyyy:"year",MMMM:"month",MM:"month",DD:"day",d:"day",dd:"day",H:"hour",HH:"hour",h:"hour",hh:"hour",mm:"minute",ss:"second",a:"am-pm",aa:"am-pm",aaa:"am-pm"};class is extends il{constructor(...e){super(...e),this.formatTokenMap=iu,this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];if("p"===t||"P"===t){let r=ii()[t],n=this.locale||eH;return r(e,n.formatLong,{})}return e}).join(""),this.getFormatHelperText=e=>this.expandFormat(e).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase()}}var ic=r(52359),id=r(75084),ip=r(72389),ih=r(58175),im=(0,ih.Z)((0,u.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined"),iy=r(365),ib=function(e){var t=e.openSettingsDialog;return(0,u.jsxs)("div",{className:"settings-div",children:[(0,u.jsx)("span",{className:"settingsTitle",children:(0,u.jsx)(id.Z,{variant:"contained",className:"topButton",onClick:function(){return t()},children:(0,u.jsx)(im,{})})}),(0,u.jsx)(ip.Z,{placement:"bottom",title:"View on GitHub",children:(0,u.jsx)("span",{className:"githubIcon",children:(0,u.jsx)("a",{href:"https://github.com/obss/react-validatable-form",target:"_blank",rel:"noreferrer",children:(0,u.jsx)("img",{src:"".concat(iy.O,"/github.png"),width:"100%",height:"100%",alt:"github_icon"})})})}),(0,u.jsx)(ip.Z,{placement:"bottom",title:"View on npmjs",children:(0,u.jsx)("span",{className:"npmIcon",children:(0,u.jsx)("a",{href:"https://www.npmjs.com/package/react-validatable-form",target:"_blank",rel:"noreferrer",children:(0,u.jsx)("img",{src:"".concat(iy.O,"/npm.png"),width:"100%",height:"100%",alt:"npm_icon"})})})}),(0,u.jsx)(ip.Z,{placement:"bottom",title:"Current Version",children:(0,u.jsx)("span",{className:"versionInfo",children:(0,u.jsx)("a",{href:"https://www.npmjs.com/package/react-validatable-form",target:"_blank",rel:"noreferrer",children:"Version: ".concat("5.0.0-beta.1")})})})]})},iv=r(92096),ig=r(98885),ix=r(75400),iw=r(84771),iZ=r(62097),iS=r(53566),ik=r(57577);let iO=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function iT(e,t,r){let n="function"==typeof r?r():r,o=function(e,t,r){let n;let o=t.getBoundingClientRect(),i=r&&r.getBoundingClientRect(),a=(0,ik.Z)(t);if(t.fakeTransform)n=t.fakeTransform;else{let l=a.getComputedStyle(t);n=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("transform")}let u=0,s=0;if(n&&"none"!==n&&"string"==typeof n){let c=n.split("(")[1].split(")")[0].split(",");u=parseInt(c[4],10),s=parseInt(c[5],10)}return"left"===e?i?`translateX(${i.right+u-o.left}px)`:`translateX(${a.innerWidth+u-o.left}px)`:"right"===e?i?`translateX(-${o.right-i.left-u}px)`:`translateX(-${o.left+o.width-u}px)`:"up"===e?i?`translateY(${i.bottom+s-o.top}px)`:`translateY(${a.innerHeight+s-o.top}px)`:i?`translateY(-${o.top-i.top+o.height-s}px)`:`translateY(-${o.top+o.height-s}px)`}(e,t,n);o&&(t.style.webkitTransform=o,t.style.transform=o)}let iP=S.forwardRef(function(e,t){let r=(0,iZ.Z)(),n={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,container:s,direction:c="down",easing:d=n,in:f,onEnter:p,onEntered:h,onEntering:m,onExit:y,onExited:b,onExiting:v,style:g,timeout:x=o,TransitionComponent:k=ig.ZP}=e,O=(0,w.Z)(e,iO),T=S.useRef(null),P=(0,iw.Z)(l.ref,T,t),C=e=>t=>{e&&(void 0===t?e(T.current):e(T.current,t))},R=C((e,t)=>{iT(c,e,s),(0,iS.n)(e),p&&p(e,t)}),E=C((e,t)=>{let n=(0,iS.C)({timeout:x,style:g,easing:d},{mode:"enter"});e.style.webkitTransition=r.transitions.create("-webkit-transform",(0,Z.Z)({},n)),e.style.transition=r.transitions.create("transform",(0,Z.Z)({},n)),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)}),j=C(h),M=C(v),$=C(e=>{let t=(0,iS.C)({timeout:x,style:g,easing:d},{mode:"exit"});e.style.webkitTransition=r.transitions.create("-webkit-transform",t),e.style.transition=r.transitions.create("transform",t),iT(c,e,s),y&&y(e)}),_=C(e=>{e.style.webkitTransition="",e.style.transition="",b&&b(e)}),I=e=>{i&&i(T.current,e)},A=S.useCallback(()=>{T.current&&iT(c,T.current,s)},[c,s]);return S.useEffect(()=>{if(f||"down"===c||"right"===c)return;let e=(0,ix.Z)(()=>{T.current&&iT(c,T.current,s)}),t=(0,ik.Z)(T.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[c,f,s]),S.useEffect(()=>{f||A()},[f,A]),(0,u.jsx)(k,(0,Z.Z)({nodeRef:T,onEnter:R,onEntered:j,onEntering:E,onExit:$,onExited:_,onExiting:M,addEndListener:I,appear:a,in:f,timeout:x},O,{children:(e,t)=>S.cloneElement(l,(0,Z.Z)({ref:P,style:(0,Z.Z)({visibility:"exited"!==e||f?void 0:"hidden"},g,l.props.style)},t))}))});function iC(e){return(0,E.Z)("MuiDrawer",e)}(0,j.Z)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);let iR=["BackdropProps"],iE=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],ij=(e,t)=>{let{ownerState:r}=e;return[t.root,("permanent"===r.variant||"persistent"===r.variant)&&t.docked,t.modal]},iM=e=>{let{classes:t,anchor:r,variant:n}=e,o={root:["root"],docked:[("permanent"===n||"persistent"===n)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,C.Z)(r)}`,"temporary"!==n&&`paperAnchorDocked${(0,C.Z)(r)}`]};return(0,O.Z)(o,iC,t)},i$=(0,T.ZP)(iv.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:ij})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),i_=(0,T.ZP)("div",{shouldForwardProp:T.FO,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ij})({flex:"0 0 auto"}),iI=(0,T.ZP)(R.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver(e,t){let{ownerState:r}=e;return[t.paper,t[`paperAnchor${(0,C.Z)(r.anchor)}`],"temporary"!==r.variant&&t[`paperAnchorDocked${(0,C.Z)(r.anchor)}`]]}})(({theme:e,ownerState:t})=>(0,Z.Z)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===t.anchor&&{left:0},"top"===t.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===t.anchor&&{right:0},"bottom"===t.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===t.anchor&&"temporary"!==t.variant&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},"top"===t.anchor&&"temporary"!==t.variant&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},"right"===t.anchor&&"temporary"!==t.variant&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"bottom"===t.anchor&&"temporary"!==t.variant&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),iA={left:"right",right:"left",top:"down",bottom:"up"},iD=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiDrawer"}),n=(0,iZ.Z)(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{anchor:i="left",BackdropProps:a,children:l,className:s,elevation:c=16,hideBackdrop:d=!1,ModalProps:{BackdropProps:f}={},onClose:p,open:h=!1,PaperProps:m={},SlideProps:y,TransitionComponent:b=iP,transitionDuration:v=o,variant:g="temporary"}=r,x=(0,w.Z)(r.ModalProps,iR),O=(0,w.Z)(r,iE),T=S.useRef(!1);S.useEffect(()=>{T.current=!0},[]);let C="rtl"===n.direction&&-1!==["left","right"].indexOf(i)?iA[i]:i,R=(0,Z.Z)({},r,{anchor:i,elevation:c,open:h,variant:g},O),E=iM(R),j=(0,u.jsx)(iI,(0,Z.Z)({elevation:"temporary"===g?c:0,square:!0},m,{className:(0,k.Z)(E.paper,m.className),ownerState:R,children:l}));if("permanent"===g)return(0,u.jsx)(i_,(0,Z.Z)({className:(0,k.Z)(E.root,E.docked,s),ownerState:R,ref:t},O,{children:j}));let M=(0,u.jsx)(b,(0,Z.Z)({in:h,direction:iA[C],timeout:v,appear:T.current},y,{children:j}));return"persistent"===g?(0,u.jsx)(i_,(0,Z.Z)({className:(0,k.Z)(E.root,E.docked,s),ownerState:R,ref:t},O,{children:M})):(0,u.jsx)(i$,(0,Z.Z)({BackdropProps:(0,Z.Z)({},a,f,{transitionDuration:v}),className:(0,k.Z)(E.root,E.modal,s),open:h,ownerState:R,onClose:p,hideBackdrop:d,ref:t},O,x,{children:M}))});var iN=r(11163);r(69496);var iF=r(74065),iB=r(29618),iL=r(29630),iz=r(47028),iV=r(85214),iW=r(28442),iq=r(41796),iH=r(50522),iU=r(7335),iY=r(63289),iG=r(57742);function iK(e){return(0,E.Z)("MuiListItem",e)}let iX=(0,j.Z)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),iQ=(0,j.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function iJ(e){return(0,E.Z)("MuiListItemSecondaryAction",e)}(0,j.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);let i0=["className"],i1=e=>{let{disableGutters:t,classes:r}=e;return(0,O.Z)({root:["root",t&&"disableGutters"]},iJ,r)},i2=(0,T.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver(e,t){let{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})(({ownerState:e})=>(0,Z.Z)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),i4=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiListItemSecondaryAction"}),{className:n}=r,o=(0,w.Z)(r,i0),i=S.useContext(iG.Z),a=(0,Z.Z)({},r,{disableGutters:i.disableGutters}),l=i1(a);return(0,u.jsx)(i2,(0,Z.Z)({className:(0,k.Z)(l.root,n),ownerState:a,ref:t},o))});i4.muiName="ListItemSecondaryAction";let i5=["className"],i6=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected"],i3=(e,t)=>{let{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.button&&t.button,r.hasSecondaryAction&&t.secondaryAction]},i7=e=>{let{alignItems:t,button:r,classes:n,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:u,hasSecondaryAction:s,selected:c}=e;return(0,O.Z)({root:["root",o&&"dense",!a&&"gutters",!l&&"padding",u&&"divider",i&&"disabled",r&&"button","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction",c&&"selected"],container:["container"]},iK,n)},i9=(0,T.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:i3})(({theme:e,ownerState:t})=>(0,Z.Z)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&(0,Z.Z)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${iQ.root}`]:{paddingRight:48}},{[`&.${iX.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${iX.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,iq.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${iX.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,iq.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${iX.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${iX.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,iq.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,iq.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),i8=(0,T.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),ae=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiListItem"}),{alignItems:n="center",autoFocus:o=!1,button:i=!1,children:a,className:l,component:s,components:c={},componentsProps:d={},ContainerComponent:f="li",ContainerProps:{className:p}={},dense:h=!1,disabled:m=!1,disableGutters:y=!1,disablePadding:b=!1,divider:v=!1,focusVisibleClassName:g,secondaryAction:x,selected:O=!1}=r,T=(0,w.Z)(r.ContainerProps,i5),C=(0,w.Z)(r,i6),R=S.useContext(iG.Z),E={dense:h||R.dense||!1,alignItems:n,disableGutters:y},j=S.useRef(null);(0,iY.Z)(()=>{o&&j.current&&j.current.focus()},[o]);let M=S.Children.toArray(a),$=M.length&&(0,iU.Z)(M[M.length-1],["ListItemSecondaryAction"]),_=(0,Z.Z)({},r,{alignItems:n,autoFocus:o,button:i,dense:E.dense,disabled:m,disableGutters:y,disablePadding:b,divider:v,hasSecondaryAction:$,selected:O}),I=i7(_),A=(0,iw.Z)(j,t),D=c.Root||i9,N=d.root||{},F=(0,Z.Z)({className:(0,k.Z)(I.root,N.className,l),disabled:m},C),B=s||"li";return(i&&(F.component=s||"div",F.focusVisibleClassName=(0,k.Z)(iX.focusVisible,g),B=iH.Z),$)?(B=F.component||s?B:"div","li"===f&&("li"===B?B="div":"li"===F.component&&(F.component="div")),(0,u.jsx)(iG.Z.Provider,{value:E,children:(0,u.jsxs)(i8,(0,Z.Z)({as:f,className:(0,k.Z)(I.container,p),ref:A,ownerState:_},T,{children:[(0,u.jsx)(D,(0,Z.Z)({},N,!(0,iW.Z)(D)&&{as:B,ownerState:(0,Z.Z)({},_,N.ownerState)},F,{children:M})),M.pop()]}))})):(0,u.jsx)(iG.Z.Provider,{value:E,children:(0,u.jsxs)(D,(0,Z.Z)({},N,{as:B,ref:A,ownerState:_},!(0,iW.Z)(D)&&{ownerState:(0,Z.Z)({},_,N.ownerState)},F,{children:[M,x&&(0,u.jsx)(i4,{children:x})]}))})});function at(e){return(0,E.Z)("MuiListItemText",e)}let ar=(0,j.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),an=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],ao=e=>{let{classes:t,inset:r,primary:n,secondary:o,dense:i}=e;return(0,O.Z)({root:["root",r&&"inset",i&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},at,t)},ai=(0,T.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver(e,t){let{ownerState:r}=e;return[{[`& .${ar.primary}`]:t.primary},{[`& .${ar.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>(0,Z.Z)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),aa=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiListItemText"}),{children:n,className:o,disableTypography:i=!1,inset:a=!1,primary:l,primaryTypographyProps:s,secondary:c,secondaryTypographyProps:d}=r,f=(0,w.Z)(r,an),{dense:p}=S.useContext(iG.Z),h=null!=l?l:n,m=c,y=(0,Z.Z)({},r,{disableTypography:i,inset:a,primary:!!h,secondary:!!m,dense:p}),b=ao(y);return null==h||h.type===iL.Z||i||(h=(0,u.jsx)(iL.Z,(0,Z.Z)({variant:p?"body2":"body1",className:b.primary,component:null!=s&&s.variant?void 0:"span",display:"block"},s,{children:h}))),null==m||m.type===iL.Z||i||(m=(0,u.jsx)(iL.Z,(0,Z.Z)({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:m}))),(0,u.jsxs)(ai,(0,Z.Z)({className:(0,k.Z)(b.root,o),ownerState:y,ref:t},f,{children:[h,m]}))});var al=r(9041),au=(0,ih.Z)((0,u.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),as=(0,ih.Z)((0,u.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),ac=[{title:"Getting Started",itemId:"group1",subNav:[{title:"Home",itemId:"/getting-started/home",keywords:["home","npm","yarn"]},{title:"Installation",itemId:"/getting-started/installation",keywords:["npm","yarn"]},{title:"Usage",itemId:"/getting-started/usage",keywords:["ReactValidatableFormProvider","useValidatableForm"]}]},{title:"Rules",itemId:"group2",subNav:[{title:"required",itemId:"/rules/required"},{title:"number",itemId:"/rules/number",keywords:["onlyIntegers"]},{title:"length",itemId:"/rules/length"},{title:"listSize",itemId:"/rules/list-size"},{title:"date",itemId:"/rules/date",keywords:["time","withTime"]},{title:"email",itemId:"/rules/email"},{title:"url",itemId:"/rules/url"},{title:"iban",itemId:"/rules/iban"},{title:"equality",itemId:"/rules/equality",keywords:["equalTo","isOneOf"]},{title:"includes",itemId:"/rules/includes"},{title:"regex",itemId:"/rules/regex"},{title:"unique",itemId:"/rules/unique"},{title:"custom on hook",itemId:"/rules/custom-on-hook"},{title:"custom on provider",itemId:"/rules/custom-on-provider"}]},{title:"Advanced Settings",itemId:"group3",subNav:[{title:"Validate Lists",itemId:"/advanced/validate-lists"},{title:"Hide Before Submit",itemId:"/advanced/hide-before-submit",keywords:["resetForm"]},{title:"Show After Blur",itemId:"/advanced/show-after-blur",keywords:["resetForm"]},{title:"Focus to Error After Submit",itemId:"/advanced/focus-to-error-after-submit"},{title:"Focus to Error on List After Submit",itemId:"/advanced/focus-to-error-on-list-after-submit"},{title:"Validate List of Objects",itemId:"/advanced/validate-list-of-objects"},{title:"Validate Complex Forms",itemId:"/advanced/validate-complex-forms"}]},{title:"Customizations",itemId:"group4",subNav:[{title:"Custom Message",itemId:"/customizations/custom-message"},{title:"Custom Translations",itemId:"/customizations/translations"},{title:"Conditional Rules",itemId:"/customizations/conditional-rules",keywords:["disableIf","enableIf"]},{title:"Apply to Nulls",itemId:"/customizations/apply-to-nulls"},{title:"Element Focus Handler",itemId:"/customizations/custom-element-focus-handler"}]},{title:"Example Usages",itemId:"group5",subNav:[{title:"Pure React Components",itemId:"/examples/pure"},{title:"MUI Components",itemId:"/examples/mui",keywords:["materialui","material-ui"]},{title:"Ant Design Components",itemId:"/examples/antd"},{title:"PrimeReact Components",itemId:"/examples/prime-react"},{title:"React-Bootstrap Components",itemId:"/examples/react-bootstrap"},{title:"React Native Usage",itemId:"/examples/react-native"},{title:"setFormData",itemId:"/examples/set-form-data"},{title:"setPathValue",itemId:"/examples/set-path-value"},{title:"unsetPathValue",itemId:"/examples/unset-path-value"},{title:"setRules",itemId:"/examples/set-rules"},{title:"setFormDataAndRules",itemId:"/examples/set-form-data-and-rules"},{title:"formData",itemId:"/examples/form-data"},{title:"validationError",itemId:"/examples/validation-error"},{title:"validationErrorOriginalResult",itemId:"/examples/validation-error-original-result"},{title:"unsetPathIsBlurred",itemId:"/examples/unset-path-is-blurred"},{title:"isPathValid",itemId:"/examples/is-path-valid"}]},{title:"API",itemId:"group6",subNav:[{title:"ReactValidatableFormProvider",itemId:"/library-api/react-validatable-form-provider",keywords:["lang","customRules","translations","dateFormatterFunction","dateWithTimeFormatterFunction","hideBeforeSubmit","showAfterBlur","focusToErrorAfterSubmit","elementFocusHandler"]},{title:"useValidatableForm",itemId:"/library-api/use-validatable-form",keywords:["rules","initialFormData","hideBeforeSubmit","showAfterBlur","focusToErrorAfterSubmit","elementFocusHandler","isValid","validationError","validationErrorOriginalResult","formData","formIsSubmitted","blurredPathList","setPathValue","unsetPathValue","setFormIsSubmitted","setPathIsBlurred","unsetPathIsBlurred","setFormData","setRules","setFormDataAndRules","resetForm","isPathValid","getValue","getError","forceRunAllValidations"]},{title:"rules",itemId:"/library-api/rules",keywords:["path","listPath","ruleSet","elementId","listElementId","dependantPaths","disableFocusAfterSubmit","subRules"]},{title:"Rule",itemId:"/library-api/rule",keywords:["equalTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo","onlyIntegers","withTime","applyToNulls","disableIf","enableIf","customMessage"]},{title:"path & listPath",itemId:"/library-api/path",keywords:["lodash","path","listPath"]}]}],ad=function(e){var t=e.menuIsHidden,r=e.toggleDrawer,n=(0,iN.useRouter)(),o=(0,a.Z)((0,S.useState)(""),2),i=o[0],l=o[1],s=(0,a.Z)((0,S.useState)(""),2),c=s[0],d=s[1];(0,S.useEffect)(function(){l(""),n.pathname.includes("/getting-started/")?d("group1"):n.pathname.includes("/rules/")?d("group2"):n.pathname.includes("/advanced/")?d("group3"):n.pathname.includes("/customizations/")?d("group4"):n.pathname.includes("/examples/")?d("group5"):n.pathname.includes("/library-api/")&&d("group6")},[n]);var f=function(e){e===c?d(""):d(e)},p=function(){r(!1)},m=JSON.parse(JSON.stringify(ac));i&&(m=m.filter(function(e){var t=!1,r=i.toUpperCase();if(e.subNav&&e.subNav.length>0){var n=[],o=!0,a=!1,l=void 0;try{for(var u,s=e.subNav[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,d=c.keywords||[];(c.title.toUpperCase().includes(r)||c.title.replaceAll(/\s/g,"").toUpperCase().includes(r)||d.filter(function(e){return e.toUpperCase().includes(r)}).length>0)&&(n.push(c),t=!0)}}catch(f){a=!0,l=f}finally{try{o||null==s.return||s.return()}finally{if(a)throw l}}n&&n.length>0&&(e.subNav=n)}return t}));var y=m.map(function(e){return(0,u.jsxs)(iF.Z,{expanded:c===e.itemId||"open"===c,onChange:function(){return f(e.itemId)},children:[(0,u.jsx)(iB.Z,{"aria-controls":"panel1a-content",expandIcon:(0,u.jsx)(au,{}),children:(0,u.jsxs)(iL.Z,{children:[" ",e.title," "]})}),(0,u.jsx)(iz.Z,{children:(0,u.jsx)(iV.Z,{disablePadding:!0,children:e.subNav.map(function(e){return(0,u.jsx)("div",{className:n.pathname===e.itemId?"selectedSideItem":null,onClick:p,children:(0,u.jsx)(h(),{href:e.itemId,legacyBehavior:!0,children:(0,u.jsx)(ae,{button:!0,children:(0,u.jsx)(aa,{primary:e.title})})})},e.itemId)})})})]},e.itemId)});return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{className:"".concat(t?"sideMenuHidden":"sideMenuOpen"," mysidemenu inset-y-0 left-0 z-30 overflow-y-auto transition duration-300 ease-out transform translate-x-0 bg-white border-r-2 lg:translate-x-0 lg:static lg:inset-0 ","ease-build translate-x-0"),children:(0,u.jsxs)("div",{className:"navbar-area",children:[(0,u.jsx)(b.Z,{className:"menu-search-input",label:"Search",InputProps:{endAdornment:(0,u.jsx)(al.Z,{position:"end",children:(0,u.jsx)(as,{})})},value:i,onChange:function(e){l(e.target.value),""!==e.target.value?d("open"):d("")}}),(0,u.jsx)(x.Z,{pt:1,children:y})]})})})},af=function(e){var t=e.open,r=e.toggleDrawer;return(0,u.jsx)(iD,{ModalProps:{keepMounted:!0},anchor:"left",open:t,onClose:function(){return r(!1)},children:(0,u.jsx)(ad,{toggleDrawer:r})})},ap=r(2386),ah={myCustomRule:function(e){var t=e.value;return t?!t.includes("a")&&t.length<5?"text ".concat(t," should either include letter 'a' or its length should be greater than 4"):null:"this field is a required field"},myCustomRule2:function(e){var t=e.value;return t?!t.includes("a")&&t.length<5?{value:t}:null:{}},myCustomRule3:function(e){var t=e.value;return t?!t.includes("a")&&t.length<10?(0,u.jsxs)("span",{children:["text ",(0,u.jsxs)("b",{children:[" ",t," "]})," should either include letter ",(0,u.jsx)("i",{children:" a "})," or its length should be greater than 9"]}):null:(0,u.jsx)("span",{children:"this field is a required field"})}},am={lang:"en",translationsEnabled:!1,customDateFormatterFunctionEnabled:!1,customDateWithTimeFormatterFunctionEnabled:!1,hideBeforeSubmit:!1,showAfterBlur:!1,focusToErrorAfterSubmit:!1,customElementFocusHandlerEnabled:!1},ay={en:{myCustomRule2:"This is myCustomRule2. This field should have letter 'a' or its length should be greater than 4"},tr:{myCustomRule2:"Bu kural myCustomRule2. Bu alan 'a' harfi i\xe7ermeli veya uzunluğu 4'den b\xfcy\xfck olmalı"}},ab={en:{required:"This field is really required","length.greaterThan":"Believe me, this field should really have greater than ${comparisonValue} characters","length.equalTo":"You should be careful because this field should have ${comparisonValue} characters",myCustomRule2:"Believe me, this field should have letter 'a' or its length should be greater than 4",email:(0,u.jsxs)("span",{children:["Do you think this is an ",(0,u.jsx)("b",{children:" email "}),"?"]})},de:{required:"Dieses Feld wird ben\xf6tigt",myCustomRule2:"Dieses Feld sollte den Buchstaben „a“ haben oder l\xe4nger als 4 sein"}},av=function(e){var t=e.getDate();return""+(t<=9?"0"+t:t)+"-"+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]+"-"+e.getFullYear()},ag=function(e){var t=e.getDate();return""+(t<=9?"0"+t:t)+"-"+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]+"-"+e.getFullYear()+" "+e.getHours()+":"+e.getMinutes()},ax=["en","tr"],aw=function(e){var t=e.Component,r=e.pageProps,n=(0,m.Z)("(max-width:1024px)"),s=(0,a.Z)((0,S.useState)(am),2),d=s[0],p=s[1],w=(0,a.Z)((0,S.useState)(!1),2),Z=w[0],k=w[1],O=(0,a.Z)((0,S.useState)(!1),2),T=O[0],P=O[1],C=(0,a.Z)((0,S.useState)(!1),2),R=C[0],E=C[1];(0,S.useEffect)(function(){P(n)},[n]);var j=function(e,t){var r=(0,o.Z)({},d);r[e]=t,"translationsEnabled"!==e||t||"de"!==d.lang||(r.lang="en"),p(r)},M=null;M=d.translationsEnabled?ab:ay;var $=null;d.customDateFormatterFunctionEnabled&&($=av);var _=null;d.customDateWithTimeFormatterFunctionEnabled&&(_=ag);var I=(0,l.Z)(ax);d.translationsEnabled&&I.push("de");var A=null;d.customElementFocusHandlerEnabled&&(A=function(e){var t=document.getElementById(e);t?(console.log("I'm currently focusing Dom element with id ".concat(e)),t.focus()):console.warn("useValidatableForm warning. Dom element with id ".concat(e," is not found to be focused"))});var N=(0,u.jsxs)("div",{className:"providerDialogContent",children:[(0,u.jsx)(y.Z,{value:d.lang,onChange:function(e,t){j("lang",t),console.log(t)},options:I,renderInput:function(e){return(0,u.jsx)(b.Z,(0,i.Z)((0,o.Z)({},e),{label:"lang"}))},style:{width:200}}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.translationsEnabled,onChange:function(e){return j("translationsEnabled",e.target.checked)}}),label:"custom translations"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.customDateFormatterFunctionEnabled,onChange:function(e){return j("customDateFormatterFunctionEnabled",e.target.checked)}}),label:"custom dateFormatterFunction"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.customDateWithTimeFormatterFunctionEnabled,onChange:function(e){return j("customDateWithTimeFormatterFunctionEnabled",e.target.checked)}}),label:"custom dateWithTimeFormatterFunction"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.hideBeforeSubmit,onChange:function(e){return j("hideBeforeSubmit",e.target.checked)}}),label:"hideBeforeSubmit"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.showAfterBlur,onChange:function(e){return j("showAfterBlur",e.target.checked)}}),label:"showAfterBlur"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.focusToErrorAfterSubmit,onChange:function(e){return j("focusToErrorAfterSubmit",e.target.checked)}}),label:"focusToErrorAfterSubmit"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.customElementFocusHandlerEnabled,onChange:function(e){return j("customElementFocusHandlerEnabled",e.target.checked)}}),label:"custom elementFocusHandler"})]}),F=function(e){E(e)};return(0,u.jsxs)("div",{children:[(0,u.jsx)(c(),{children:(0,u.jsx)("link",{rel:"shortcut icon",href:"".concat(iy.O,"/favicon.png")})}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(f(),{src:"https://www.googletagmanager.com/gtag/js?id=GTM-T94RSQN",strategy:"afterInteractive"}),(0,u.jsx)(f(),{id:"google-analytics",strategy:"afterInteractive",children:"\n window.dataLayer = window.dataLayer || [];\n function gtag(){window.dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', 'GTM-T94RSQN');\n "})]}),(0,u.jsx)("div",{className:"obssTriangle",children:(0,u.jsx)("a",{className:"triangleIcon",href:"https://obss.tech/",target:"_blank",rel:"noreferrer",children:(0,u.jsx)("img",{src:"".concat(iy.O,"/obss.png"),width:"50px",height:"50px",alt:"obss"})})}),(0,u.jsx)(x.Z,{flexGrow:1,children:(0,u.jsx)(D,{color:"transparent",position:"relative",children:(0,u.jsxs)(z,{children:[(0,u.jsx)(V.Z,{onClick:function(){n?F(!R):P(!T)},className:"menuButton",children:(0,u.jsx)(H.Z,{})}),(0,u.jsx)(h(),{href:"/",children:(0,u.jsx)("img",{src:"".concat(iy.O,"/logo.png"),alt:"logo",width:"48px",height:"48px"})}),(0,u.jsx)(h(),{href:"/",className:"bannerText",children:(0,u.jsx)("div",{className:"bannerLink",children:"react-validatable-form"})}),(0,u.jsx)(x.Z,{flexGrow:1}),(0,u.jsx)(ib,{openSettingsDialog:function(){k(!0)}})]})})}),(0,u.jsx)(af,{anchor:R,open:R,toggleDrawer:F}),(0,u.jsxs)(W.Z,{open:Z,onClose:function(){return k(!1)},children:[(0,u.jsx)(q.Z,{children:(0,u.jsx)(ap.Z,{header:"Edit ReactValidatableFormProvider Props",codeUrl:"pages/_app.js",wrapperClassName:"modalHeaderWrapper"})}),N]}),(0,u.jsxs)("div",{style:{display:"flex"},children:[(0,u.jsx)("div",{className:"navbarDiv",children:(0,u.jsx)(ad,{toggleDrawer:F,menuIsHidden:T})}),(0,u.jsx)("div",{className:"generalDiv",children:(0,u.jsx)(ic._,{dateAdapter:is,children:(0,u.jsx)(U.T,{lang:d.lang,customRules:ah,translations:M,dateFormatterFunction:$,dateWithTimeFormatterFunction:_,hideBeforeSubmit:d.hideBeforeSubmit,showAfterBlur:d.showAfterBlur,focusToErrorAfterSubmit:d.focusToErrorAfterSubmit,elementFocusHandler:A,children:(0,u.jsx)(t,(0,o.Z)({},r))})})})]})]})}},365:function(e,t,r){"use strict";r.d(t,{O:function(){return n}});var n="/react-validatable-form-demo"},37070:function(){},91811:function(){},69496:function(){},9058:function(){},58694:function(){},71419:function(){},65343:function(){},27177:function(){},66289:function(){},39052:function(){},75042:function(){},46393:function(){},34557:function(){},43496:function(){},20048:function(){},3213:function(){},88980:function(){},52585:function(){},13230:function(){},87475:function(){},9008:function(e,t,r){e.exports=r(83121)},41664:function(e,t,r){e.exports=r(31551)},11163:function(e,t,r){e.exports=r(80880)},4298:function(e,t,r){e.exports=r(63573)},69921:function(e,t){"use strict";/** @license React v16.13.1 + */ function b(e,t){let r=y(e,t);return r}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){y[e]=y(e)});let v=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},95408:function(e,t,r){"use strict";r.d(t,{L7:function(){return l},P$:function(){return u},VO:function(){return n},W8:function(){return a},k9:function(){return i}});let n={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${n[e]}px)`};function i(e,t,r){let i=e.theme||{};if(Array.isArray(t)){let a=i.breakpoints||o;return t.reduce((e,n,o)=>(e[a.up(a.keys[o])]=r(t[o]),e),{})}if("object"==typeof t){let l=i.breakpoints||o;return Object.keys(t).reduce((e,o)=>{if(-1!==Object.keys(l.values||n).indexOf(o)){let i=l.up(o);e[i]=r(t[o],o)}else e[o]=t[o];return e},{})}let u=r(t);return u}function a(e={}){var t;let r=null==(t=e.keys)?void 0:t.reduce((t,r)=>{let n=e.up(r);return t[n]={},t},{});return r||{}}function l(e,t){return e.reduce((e,t)=>{let r=e[t],n=!r||0===Object.keys(r).length;return n&&delete e[t],e},t)}function u({values:e,breakpoints:t,base:r}){let n;let o=r||function(e,t){if("object"!=typeof e)return{};let r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((t,n)=>{n{null!=e[t]&&(r[t]=!0)}),r}(e,t),i=Object.keys(o);return 0===i.length?e:i.reduce((t,r,o)=>(Array.isArray(e)?(t[r]=null!=e[o]?e[o]:e[n],n=o):"object"==typeof e?(t[r]=null!=e[r]?e[r]:e[n],n=r):t[r]=e,t),{})}},41796:function(e,t,r){"use strict";r.d(t,{$n:function(){return d},Fq:function(){return s},_j:function(){return c},mi:function(){return u}});var n=r(71387);function o(e,t=0,r=1){return Math.min(Math.max(t,e),r)}function i(e){let t;if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map(e=>e+e)),r?`rgb${4===r.length?"a":""}(${r.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let r=e.indexOf("("),o=e.substring(0,r);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(o))throw Error((0,n.Z)(9,e));let a=e.substring(r+1,e.length-1);if("color"===o){if(t=(a=a.split(" ")).shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(t))throw Error((0,n.Z)(10,t))}else a=a.split(",");return a=a.map(e=>parseFloat(e)),{type:o,values:a,colorSpace:t}}function a(e){let{type:t,colorSpace:r}=e,{values:n}=e;return -1!==t.indexOf("rgb")?n=n.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),`${t}(${n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`})`}function l(e){let t="hsl"===(e=i(e)).type||"hsla"===e.type?i(function(e){e=i(e);let{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,l=n*Math.min(o,1-o),u=(e,t=(e+r/30)%12)=>o-l*Math.max(Math.min(t-3,9-t,1),-1),s="rgb",c=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),a({type:s,values:c})}(e)).values:e.values;return Number((.2126*(t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)))[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){let r=l(e),n=l(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function s(e,t){return e=i(e),t=o(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,a(e)}function c(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return a(e)}function d(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return a(e)}},66500:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(54695),o=r(60916),i=r(59766);let a=["values","unit","step"],l=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,n.Z)({},e,{[t.key]:t.val}),{})};var u={borderRadius:4},s=r(98700);let c=["breakpoints","palette","spacing","shape"];var d=function(e={},...t){let{breakpoints:r={},palette:d={},spacing:f,shape:p={}}=e,h=(0,o.Z)(e,c),m=function(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:i=5}=e,u=(0,o.Z)(e,a),s=l(t),c=Object.keys(s);function d(e){let n="number"==typeof t[e]?t[e]:e;return`@media (min-width:${n}${r})`}function f(e){let n="number"==typeof t[e]?t[e]:e;return`@media (max-width:${n-i/100}${r})`}function p(e,n){let o=c.indexOf(n);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==o&&"number"==typeof t[c[o]]?t[c[o]]:n)-i/100}${r})`}return(0,n.Z)({keys:c,values:s,up:d,down:f,between:p,only:function(e){return c.indexOf(e)+1{let r=0===e.length?[1]:e;return r.map(e=>{let r=t(e);return"number"==typeof r?`${r}px`:r}).join(" ")};return r.mui=!0,r}(f),b=(0,i.Z)({breakpoints:m,direction:"ltr",components:{},palette:(0,n.Z)({mode:"light"},d),spacing:y,shape:(0,n.Z)({},u,p)},h);return t.reduce((e,t)=>(0,i.Z)(e,t),b)}},85578:function(e,t,r){"use strict";r.d(t,{Gc:function(){return e_},G$:function(){return e$}});var n=r(54844),o=r(47730),i=function(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(r=>{e[r]=t}),e),{}),r=e=>Object.keys(e).reduce((r,n)=>t[n]?(0,o.Z)(r,t[n](e)):r,{});return r.propTypes={},r.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),r},a=r(98700),l=r(95408);function u(e){return"number"!=typeof e?e:`${e}px solid`}let s=(0,n.Z)({prop:"border",themeKey:"borders",transform:u}),c=(0,n.Z)({prop:"borderTop",themeKey:"borders",transform:u}),d=(0,n.Z)({prop:"borderRight",themeKey:"borders",transform:u}),f=(0,n.Z)({prop:"borderBottom",themeKey:"borders",transform:u}),p=(0,n.Z)({prop:"borderLeft",themeKey:"borders",transform:u}),h=(0,n.Z)({prop:"borderColor",themeKey:"palette"}),m=(0,n.Z)({prop:"borderTopColor",themeKey:"palette"}),y=(0,n.Z)({prop:"borderRightColor",themeKey:"palette"}),b=(0,n.Z)({prop:"borderBottomColor",themeKey:"palette"}),v=(0,n.Z)({prop:"borderLeftColor",themeKey:"palette"}),g=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){let t=(0,a.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:(0,a.NA)(t,e)});return(0,l.k9)(e,e.borderRadius,r)}return null};g.propTypes={},g.filterProps=["borderRadius"];let x=i(s,c,d,f,p,h,m,y,b,v,g),w=(0,n.Z)({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),Z=(0,n.Z)({prop:"display"}),S=(0,n.Z)({prop:"overflow"}),k=(0,n.Z)({prop:"textOverflow"}),O=(0,n.Z)({prop:"visibility"}),T=(0,n.Z)({prop:"whiteSpace"});var P=i(w,Z,S,k,O,T);let C=(0,n.Z)({prop:"flexBasis"}),R=(0,n.Z)({prop:"flexDirection"}),E=(0,n.Z)({prop:"flexWrap"}),j=(0,n.Z)({prop:"justifyContent"}),M=(0,n.Z)({prop:"alignItems"}),$=(0,n.Z)({prop:"alignContent"}),_=(0,n.Z)({prop:"order"}),I=(0,n.Z)({prop:"flex"}),A=(0,n.Z)({prop:"flexGrow"}),D=(0,n.Z)({prop:"flexShrink"}),N=(0,n.Z)({prop:"alignSelf"}),F=(0,n.Z)({prop:"justifyItems"}),B=(0,n.Z)({prop:"justifySelf"}),L=i(C,R,E,j,M,$,_,I,A,D,N,F,B),z=e=>{if(void 0!==e.gap&&null!==e.gap){let t=(0,a.eI)(e.theme,"spacing",8,"gap"),r=e=>({gap:(0,a.NA)(t,e)});return(0,l.k9)(e,e.gap,r)}return null};z.propTypes={},z.filterProps=["gap"];let V=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){let t=(0,a.eI)(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:(0,a.NA)(t,e)});return(0,l.k9)(e,e.columnGap,r)}return null};V.propTypes={},V.filterProps=["columnGap"];let W=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){let t=(0,a.eI)(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:(0,a.NA)(t,e)});return(0,l.k9)(e,e.rowGap,r)}return null};W.propTypes={},W.filterProps=["rowGap"];let q=(0,n.Z)({prop:"gridColumn"}),H=(0,n.Z)({prop:"gridRow"}),U=(0,n.Z)({prop:"gridAutoFlow"}),Y=(0,n.Z)({prop:"gridAutoColumns"}),G=(0,n.Z)({prop:"gridAutoRows"}),K=(0,n.Z)({prop:"gridTemplateColumns"}),X=(0,n.Z)({prop:"gridTemplateRows"}),Q=(0,n.Z)({prop:"gridTemplateAreas"}),J=(0,n.Z)({prop:"gridArea"}),ee=i(z,V,W,q,H,U,Y,G,K,X,Q,J),et=(0,n.Z)({prop:"position"}),er=(0,n.Z)({prop:"zIndex",themeKey:"zIndex"}),en=(0,n.Z)({prop:"top"}),eo=(0,n.Z)({prop:"right"}),ei=(0,n.Z)({prop:"bottom"}),ea=(0,n.Z)({prop:"left"});var el=i(et,er,en,eo,ei,ea);let eu=(0,n.Z)({prop:"color",themeKey:"palette"}),es=(0,n.Z)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),ec=(0,n.Z)({prop:"backgroundColor",themeKey:"palette"}),ed=i(eu,es,ec),ef=(0,n.Z)({prop:"boxShadow",themeKey:"shadows"});function ep(e){return e<=1&&0!==e?`${100*e}%`:e}let eh=(0,n.Z)({prop:"width",transform:ep}),em=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){let t=t=>{var r,n,o;let i=(null==(r=e.theme)?void 0:null==(n=r.breakpoints)?void 0:null==(o=n.values)?void 0:o[t])||l.VO[t];return{maxWidth:i||ep(t)}};return(0,l.k9)(e,e.maxWidth,t)}return null};em.filterProps=["maxWidth"];let ey=(0,n.Z)({prop:"minWidth",transform:ep}),eb=(0,n.Z)({prop:"height",transform:ep}),ev=(0,n.Z)({prop:"maxHeight",transform:ep}),eg=(0,n.Z)({prop:"minHeight",transform:ep});(0,n.Z)({prop:"size",cssProperty:"width",transform:ep}),(0,n.Z)({prop:"size",cssProperty:"height",transform:ep});let ex=(0,n.Z)({prop:"boxSizing"}),ew=i(eh,em,ey,eb,ev,eg,ex),eZ=(0,n.Z)({prop:"fontFamily",themeKey:"typography"}),eS=(0,n.Z)({prop:"fontSize",themeKey:"typography"}),ek=(0,n.Z)({prop:"fontStyle",themeKey:"typography"}),eO=(0,n.Z)({prop:"fontWeight",themeKey:"typography"}),eT=(0,n.Z)({prop:"letterSpacing"}),eP=(0,n.Z)({prop:"textTransform"}),eC=(0,n.Z)({prop:"lineHeight"}),eR=(0,n.Z)({prop:"textAlign"}),eE=(0,n.Z)({prop:"typography",cssProperty:!1,themeKey:"typography"}),ej=i(eE,eZ,eS,ek,eO,eT,eC,eR,eP),eM={borders:x.filterProps,display:P.filterProps,flexbox:L.filterProps,grid:ee.filterProps,positions:el.filterProps,palette:ed.filterProps,shadows:ef.filterProps,sizing:ew.filterProps,spacing:a.ZP.filterProps,typography:ej.filterProps},e$={borders:x,display:P,flexbox:L,grid:ee,positions:el,palette:ed,shadows:ef,sizing:ew,spacing:a.ZP,typography:ej},e_=Object.keys(eM).reduce((e,t)=>(eM[t].forEach(r=>{e[r]=e$[t]}),e),{})},47730:function(e,t,r){"use strict";var n=r(59766);t.Z=function(e,t){return t?(0,n.Z)(e,t,{clone:!1}):e}},98700:function(e,t,r){"use strict";r.d(t,{hB:function(){return h},eI:function(){return p},ZP:function(){return x},NA:function(){return m}});var n=r(95408),o=r(54844),i=r(47730);let a={m:"margin",p:"padding"},l={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},u={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},s=function(e){let t={};return r=>(void 0===t[r]&&(t[r]=e(r)),t[r])}(e=>{if(e.length>2){if(!u[e])return[e];e=u[e]}let[t,r]=e.split(""),n=a[t],o=l[r]||"";return Array.isArray(o)?o.map(e=>n+e):[n+o]}),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],f=[...c,...d];function p(e,t,r,n){var i;let a=null!=(i=(0,o.D)(e,t,!1))?i:r;return"number"==typeof a?e=>"string"==typeof e?e:a*e:Array.isArray(a)?e=>"string"==typeof e?e:a[e]:"function"==typeof a?a:()=>void 0}function h(e){return p(e,"spacing",8,"spacing")}function m(e,t){if("string"==typeof t||null==t)return t;let r=e(Math.abs(t));return t>=0?r:"number"==typeof r?-r:`-${r}`}function y(e,t){let r=h(e.theme);return Object.keys(e).map(o=>(function(e,t,r,o){if(-1===t.indexOf(r))return null;let i=s(r),a=e=>i.reduce((t,r)=>(t[r]=m(o,e),t),{}),l=e[r];return(0,n.k9)(e,l,a)})(e,t,o,r)).reduce(i.Z,{})}function b(e){return y(e,c)}function v(e){return y(e,d)}function g(e){return y(e,f)}b.propTypes={},b.filterProps=c,v.propTypes={},v.filterProps=d,g.propTypes={},g.filterProps=f;var x=g},54844:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(28320),o=r(95408);function i(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){let n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:i(e,r)||n,t&&(o=t(o)),o}t.Z=function(e){let{prop:t,cssProperty:r=e.prop,themeKey:l,transform:u}=e,s=e=>{if(null==e[t])return null;let s=e[t],c=e.theme,d=i(c,l)||{},f=e=>{let o=a(d,u,e);return(e===o&&"string"==typeof e&&(o=a(d,u,`${t}${"default"===e?"":(0,n.Z)(e)}`,e)),!1===r)?o:{[r]:o}};return(0,o.k9)(e,s,f)};return s.propTypes={},s.filterProps=[t],s}},39707:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(54695),o=r(60916),i=r(59766),a=r(85578);let l=["sx"],u=e=>{let t={systemProps:{},otherProps:{}};return Object.keys(e).forEach(r=>{a.Gc[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function s(e){let t;let{sx:r}=e,a=(0,o.Z)(e,l),{systemProps:s,otherProps:c}=u(a);return t=Array.isArray(r)?[s,...r]:"function"==typeof r?(...e)=>{let t=r(...e);return(0,i.P)(t)?(0,n.Z)({},s,t):s}:(0,n.Z)({},s,r),(0,n.Z)({},c,{sx:t})}},86523:function(e,t,r){"use strict";var n=r(47730),o=r(85578),i=r(95408);let a=function(e=o.G$){let t=Object.keys(e).reduce((t,r)=>(e[r].filterProps.forEach(n=>{t[n]=e[r]}),t),{});function r(e,r,n){let o=t[e];return o?o({[e]:r,theme:n}):{[e]:r}}return function e(o){let{sx:a,theme:l={}}=o||{};if(!a)return null;function u(o){let a=o;if("function"==typeof o)a=o(l);else if("object"!=typeof o)return o;if(!a)return null;let u=(0,i.W8)(l.breakpoints),s=Object.keys(u),c=u;return Object.keys(a).forEach(o=>{var u;let s="function"==typeof(u=a[o])?u(l):u;if(null!=s){if("object"==typeof s){if(t[o])c=(0,n.Z)(c,r(o,s,l));else{let d=(0,i.k9)({theme:l},s,e=>({[o]:e}));(function(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),r=new Set(t);return e.every(e=>r.size===Object.keys(e).length)})(d,s)?c[o]=e({sx:s,theme:l}):c=(0,n.Z)(c,d)}}else c=(0,n.Z)(c,r(o,s,l))}}),(0,i.L7)(s,c)}return Array.isArray(a)?a.map(u):u(a)}}();a.filterProps=["sx"],t.Z=a},96682:function(e,t,r){"use strict";var n=r(66500),o=r(10433);let i=(0,n.Z)();t.Z=function(e=i){return(0,o.Z)(e)}},20539:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(47925);function o(e){let{theme:t,name:r,props:o}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,n.Z)(t.components[r].defaultProps,o):o}},10433:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(67294);let o=n.createContext(null);var i=function(e=null){let t=function(){let e=n.useContext(o);return e}();return t&&0!==Object.keys(t).length?t:e}},37078:function(e,t){"use strict";let r;let n=e=>e,o=(r=n,{configure(e){r=e},generate:e=>r(e),reset(){r=n}});t.Z=o},28320:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(71387);function o(e){if("string"!=typeof e)throw Error((0,n.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},94780:function(e,t,r){"use strict";function n(e,t,r){let n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((e,n)=>(n&&(e.push(t(n)),r&&r[n]&&e.push(r[n])),e),[]).join(" ")}),n}r.d(t,{Z:function(){return n}})},49064:function(e,t,r){"use strict";function n(...e){return e.reduce((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)},()=>{})}r.d(t,{Z:function(){return n}})},87596:function(e,t,r){"use strict";function n(e,t=166){let r;function n(...n){let o=()=>{e.apply(this,n)};clearTimeout(r),r=setTimeout(o,t)}return n.clear=()=>{clearTimeout(r)},n}r.d(t,{Z:function(){return n}})},59766:function(e,t,r){"use strict";r.d(t,{P:function(){return o},Z:function(){return function e(t,r,i={clone:!0}){let a=i.clone?(0,n.Z)({},t):t;return o(t)&&o(r)&&Object.keys(r).forEach(n=>{"__proto__"!==n&&(o(r[n])&&n in t&&o(t[n])?a[n]=e(t[n],r[n],i):a[n]=r[n])}),a}}});var n=r(71860);function o(e){return null!==e&&"object"==typeof e&&e.constructor===Object}},71387:function(e,t,r){"use strict";function n(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r{o[t]=(0,n.Z)(e,t,r)}),o}},95806:function(e,t,r){"use strict";function n(e){let t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}r.d(t,{Z:function(){return n}})},57094:function(e,t,r){"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{Z:function(){return n}})},58290:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(57094);function o(e){let t=(0,n.Z)(e);return t.defaultView||window}},47925:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(71860);function o(e,t){let r=(0,n.Z)({},t);return Object.keys(e).forEach(t=>{void 0===r[t]&&(r[t]=e[t])}),r}},7960:function(e,t,r){"use strict";function n(e,t){"function"==typeof e?e(t):e&&(e.current=t)}r.d(t,{Z:function(){return n}})},8925:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(67294);function o({controlled:e,default:t,name:r,state:o="value"}){let{current:i}=n.useRef(void 0!==e),[a,l]=n.useState(t),u=n.useCallback(e=>{i||l(e)},[]);return[i?e:a,u]}},16600:function(e,t,r){"use strict";var n=r(67294);let o="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;t.Z=o},73633:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(67294),o=r(16600);function i(e){let t=n.useRef(e);return(0,o.Z)(()=>{t.current=e}),n.useCallback((...e)=>(0,t.current)(...e),[])}},30067:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(67294),o=r(7960);function i(...e){return n.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{(0,o.Z)(e,t)})},e)}},57579:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n,o=r(67294);let i=0,a=(n||(n=r.t(o,2))).useId;function l(e){if(void 0!==a){let t=a();return null!=e?e:t}return function(e){let[t,r]=o.useState(e);return o.useEffect(()=>{null==t&&r(`mui-${i+=1}`)},[t]),e||t}(e)}},52359:function(e,t,r){"use strict";r.d(t,{_:function(){return s},y:function(){return u}});var n=r(87462),o=r(67294),i=r(6446);let a={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",inputModeToggleButtonAriaLabel:(e,t)=>e?`text input view is open, go to ${t} view`:`${t} view is open, go to text input view`,start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerDefaultToolbarTitle:"Select date",dateTimePickerDefaultToolbarTitle:"Select date & time",timePickerDefaultToolbarTitle:"Select time",dateRangePickerDefaultToolbarTitle:"Select date range",clockLabelText:(e,t,r)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${r.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,openDatePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?`Choose date, selected date is ${t.format(t.date(e),"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?`Choose time, selected time is ${t.format(t.date(e),"fullTime")}`:"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date"};(0,n.Z)({},a);var l=r(85893);let u=o.createContext(null);function s(e){let t=(0,i.Z)({props:e,name:"MuiLocalizationProvider"}),{children:r,dateAdapter:s,dateFormats:c,dateLibInstance:d,locale:f,adapterLocale:p,localeText:h}=t,m=o.useMemo(()=>new s({locale:null!=p?p:f,formats:c,instance:d}),[s,f,p,c,d]),y=o.useMemo(()=>({minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}),[m]),b=o.useMemo(()=>({utils:m,defaultDates:y,localeText:(0,n.Z)({},a,null!=h?h:{})}),[y,m,h]);return(0,l.jsx)(u.Provider,{value:b,children:r})}},86010:function(e,t,r){"use strict";t.Z=function(){for(var e,t,r=0,n="";r0;t&&r&&t(r)})},e),elements:o},u.push(r),l.set(r,t),t}({root:null==t?void 0:t.current,rootMargin:r})).id,o=e.observer,(c=e.elements).set(h,function(e){return e&&f(e)}),o.observe(h),function(){if(c.delete(h),o.unobserve(h),0===c.size){o.disconnect(),l.delete(n);var e=u.findIndex(function(e){return e.root===n.root&&e.margin===n.margin});e>-1&&u.splice(e,1)}}}}else if(!d){var p=i.requestIdleCallback(function(){return f(!0)});return function(){return i.cancelIdleCallback(p)}}},[h,s,r,t,d]),[m,d,o.useCallback(function(){f(!1)},[])]};var o=r(67294),i=r(44686),a="function"==typeof IntersectionObserver,l=new Map,u=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},34095:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return aw}});var n,o=r(41799),i=r(69396),a=r(828),l=r(36305),u=r(85893);r(37070),r(91811),r(13230),r(20048),r(87475),r(3213),r(58694),r(9058),r(71419),r(43496),r(65343),r(66289),r(39052),r(46393),r(52585),r(75042),r(34557),r(88980),r(27177);var s=r(9008),c=r.n(s),d=r(4298),f=r.n(d),p=r(41664),h=r.n(p),m=r(61225),y=r(30612),b=r(69873),v=r(22841),g=r(31362),x=r(61953),w=r(1048),Z=r(32793),S=r(67294),k=r(86010),O=r(94780),T=r(67074),P=r(6446),C=r(36622),R=r(70918),E=r(34867),j=r(1588);function M(e){return(0,E.Z)("MuiAppBar",e)}(0,j.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);let $=["className","color","enableColorOnDark","position"],_=e=>{let{color:t,position:r,classes:n}=e,o={root:["root",`color${(0,C.Z)(t)}`,`position${(0,C.Z)(r)}`]};return(0,O.Z)(o,M,n)},I=(e,t)=>`${null==e?void 0:e.replace(")","")}, ${t})`,A=(0,T.ZP)(R.Z,{name:"MuiAppBar",slot:"Root",overridesResolver(e,t){let{ownerState:r}=e;return[t.root,t[`position${(0,C.Z)(r.position)}`],t[`color${(0,C.Z)(r.color)}`]]}})(({theme:e,ownerState:t})=>{let r="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return(0,Z.Z)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===t.position&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===t.position&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===t.position&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"static"===t.position&&{position:"static"},"relative"===t.position&&{position:"relative"},!e.vars&&(0,Z.Z)({},"default"===t.color&&{backgroundColor:r,color:e.palette.getContrastText(r)},t.color&&"default"!==t.color&&"inherit"!==t.color&&"transparent"!==t.color&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},"inherit"===t.color&&{color:"inherit"},"dark"===e.palette.mode&&!t.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===t.color&&(0,Z.Z)({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&(0,Z.Z)({},"default"===t.color&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:I(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:I(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:I(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:I(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===t.color?"inherit":"var(--AppBar-color)"},"transparent"===t.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),D=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiAppBar"}),{className:n,color:o="primary",enableColorOnDark:i=!1,position:a="fixed"}=r,l=(0,w.Z)(r,$),s=(0,Z.Z)({},r,{color:o,position:a,enableColorOnDark:i}),c=_(s);return(0,u.jsx)(A,(0,Z.Z)({square:!0,component:"header",ownerState:s,elevation:4,className:(0,k.Z)(c.root,n,"fixed"===a&&"mui-fixed"),ref:t},l))});function N(e){return(0,E.Z)("MuiToolbar",e)}(0,j.Z)("MuiToolbar",["root","gutters","regular","dense"]);let F=["className","component","disableGutters","variant"],B=e=>{let{classes:t,disableGutters:r,variant:n}=e;return(0,O.Z)({root:["root",!r&&"gutters",n]},N,t)},L=(0,T.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver(e,t){let{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})(({theme:e,ownerState:t})=>(0,Z.Z)({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48}),({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar),z=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiToolbar"}),{className:n,component:o="div",disableGutters:i=!1,variant:a="regular"}=r,l=(0,w.Z)(r,F),s=(0,Z.Z)({},r,{component:o,disableGutters:i,variant:a}),c=B(s);return(0,u.jsx)(L,(0,Z.Z)({as:o,className:(0,k.Z)(c.root,n),ref:t,ownerState:s},l))});var V=r(80562),W=r(29620),q=r(77745),H=r(326),U=r(64459);function Y(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function G(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e){G(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===K(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}function Q(e,t){G(2,arguments);var r=X(e),n=Y(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function J(e,t){G(2,arguments);var r=X(e).getTime(),n=Y(t);return new Date(r+n)}function ee(e,t){G(2,arguments);var r=X(e),n=Y(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var o=r.getDate(),i=new Date(r.getTime());return(i.setMonth(r.getMonth()+n+1,0),o>=i.getDate())?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function et(e,t){return G(2,arguments),ee(e,12*Y(t))}function er(e,t){G(2,arguments);var r=X(e),n=X(t),o=r.getTime()-n.getTime();return o<0?-1:o>0?1:o}function en(e){G(1,arguments);var t=X(e);return t.setHours(23,59,59,999),t}function eo(e){G(1,arguments);var t=X(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function ei(e,t){G(2,arguments);var r,n=X(e),o=X(t),i=er(n,o),a=Math.abs(function(e,t){G(2,arguments);var r=X(e),n=X(t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(n,o));if(a<1)r=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*a);var l=er(n,o)===-i;(function(e){G(1,arguments);var t=X(e);return en(t).getTime()===eo(t).getTime()})(X(e))&&1===a&&1===er(e,o)&&(l=!1),r=i*(a-Number(l))}return 0===r?0:r}var ea={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function el(e){return e?ea[e]:ea.trunc}function eu(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function es(e){G(1,arguments);var t=X(e);return t.setHours(0,0,0,0),t}function ec(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function ed(e,t){G(2,arguments);var r=X(e),n=X(t),o=ec(r,n),i=Math.abs(function(e,t){G(2,arguments);var r=es(e),n=es(t);return Math.round((r.getTime()-eu(r)-(n.getTime()-eu(n)))/864e5)}(r,n));r.setDate(r.getDate()-o*i);var a=Number(ec(r,n)===-o),l=o*(i-a);return 0===l?0:l}function ef(e,t){return G(2,arguments),X(e).getTime()-X(t).getTime()}var ep={};function eh(e,t){G(1,arguments);var r,n,o,i,a,l,u,s,c=Y(null!==(r=null!==(n=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:ep.weekStartsOn)&&void 0!==n?n:null===(u=ep.locale)||void 0===u?void 0:null===(s=u.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==r?r:0);if(!(c>=0&&c<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=X(e),f=d.getDay();return d.setDate(d.getDate()+((f=o.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function ew(e){G(1,arguments);var t=X(e);return Math.round((eg(t).getTime()-(function(e){G(1,arguments);var t=ex(e),r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),eg(r)})(t).getTime())/6048e5)+1}function eZ(e,t){G(1,arguments);var r,n,o,i,a,l,u,s,c=Y(null!==(r=null!==(n=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:ep.weekStartsOn)&&void 0!==n?n:null===(u=ep.locale)||void 0===u?void 0:null===(s=u.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==r?r:0);if(!(c>=0&&c<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=X(e),f=d.getUTCDay();return d.setUTCDate(d.getUTCDate()-((f=1&&f<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var h=eZ(p,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var y=eZ(m,t);return c.getTime()>=h.getTime()?d+1:c.getTime()>=y.getTime()?d:d-1}function ek(e,t){G(1,arguments);var r=X(e);return Math.round((eZ(r,t).getTime()-(function(e,t){G(1,arguments);var r,n,o,i,a,l,u,s,c=Y(null!==(r=null!==(n=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:ep.firstWeekContainsDate)&&void 0!==n?n:null===(u=ep.locale)||void 0===u?void 0:null===(s=u.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==r?r:1),d=eS(e,t),f=new Date(0);return f.setUTCFullYear(d,0,c),f.setUTCHours(0,0,0,0),eZ(f,t)})(r,t).getTime())/6048e5)+1}function eO(e,t){for(var r=Math.abs(e).toString();r.length0?r:1-r;return eO("yy"===t?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):eO(r+1,2)},d:function(e,t){return eO(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:function(e,t){return eO(e.getUTCHours()%12||12,t.length)},H:function(e,t){return eO(e.getUTCHours(),t.length)},m:function(e,t){return eO(e.getUTCMinutes(),t.length)},s:function(e,t){return eO(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length;return eO(Math.floor(e.getUTCMilliseconds()*Math.pow(10,r-3)),t.length)}},eP={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};function eC(e,t){var r=e>0?"-":"+",n=Math.abs(e),o=Math.floor(n/60),i=n%60;return 0===i?r+String(o):r+String(o)+(t||"")+eO(i,2)}function eR(e,t){return e%60==0?(e>0?"-":"+")+eO(Math.abs(e)/60,2):eE(e,t)}function eE(e,t){var r=Math.abs(e);return(e>0?"-":"+")+eO(Math.floor(r/60),2)+(t||"")+eO(r%60,2)}var ej={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){var n=e.getUTCFullYear();return r.ordinalNumber(n>0?n:1-n,{unit:"year"})}return eT.y(e,t)},Y:function(e,t,r,n){var o=eS(e,n),i=o>0?o:1-o;return"YY"===t?eO(i%100,2):"Yo"===t?r.ordinalNumber(i,{unit:"year"}):eO(i,t.length)},R:function(e,t){return eO(ex(e),t.length)},u:function(e,t){return eO(e.getUTCFullYear(),t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return eO(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return eO(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return eT.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return eO(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var o=ek(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):eO(o,t.length)},I:function(e,t,r){var n=ew(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):eO(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):eT.d(e,t)},D:function(e,t,r){var n=function(e){G(1,arguments);var t=X(e),r=t.getTime();return t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),Math.floor((r-t.getTime())/864e5)+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):eO(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var o=e.getUTCDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return eO(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var o=e.getUTCDay(),i=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return eO(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return eO(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,o=e.getUTCHours();switch(n=12===o?eP.noon:0===o?eP.midnight:o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,o=e.getUTCHours();switch(n=o>=17?eP.evening:o>=12?eP.afternoon:o>=4?eP.morning:eP.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return eT.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):eT.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):eO(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):eO(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):eT.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):eT.s(e,t)},S:function(e,t){return eT.S(e,t)},X:function(e,t,r,n){var o=(n._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return eR(o);case"XXXX":case"XX":return eE(o);default:return eE(o,":")}},x:function(e,t,r,n){var o=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return eR(o);case"xxxx":case"xx":return eE(o);default:return eE(o,":")}},O:function(e,t,r,n){var o=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eC(o,":");default:return"GMT"+eE(o,":")}},z:function(e,t,r,n){var o=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eC(o,":");default:return"GMT"+eE(o,":")}},t:function(e,t,r,n){return eO(Math.floor((n._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,r,n){return eO((n._originalDate||e).getTime(),t.length)}},eM=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},e$=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},e_={p:e$,P:function(e,t){var r,n=e.match(/(P+)(p+)?/)||[],o=n[1],i=n[2];if(!i)return eM(e,t);switch(o){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",eM(o,t)).replace("{{time}}",e$(i,t))}},eI=["D","DD"],eA=["YY","YYYY"];function eD(e){return -1!==eI.indexOf(e)}function eN(e){return -1!==eA.indexOf(e)}function eF(e,t,r){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var eB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eL(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var ez={date:eL({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eL({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eL({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eV={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function eW(e){return function(t,r){var n;if("formatting"===(null!=r&&r.context?String(r.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=r&&r.width?String(r.width):o;n=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!=r&&r.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[a]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function eq(e){return function(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],u=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?function(e,t){for(var r=0;r0?"in "+n:n+" ago":n},formatLong:ez,formatRelative:function(e,t,r,n){return eV[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:eW({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:eW({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:eW({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:eW({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:eW({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(n={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(n.matchPattern);if(!r)return null;var o=r[0],i=e.match(n.parsePattern);if(!i)return null;var a=n.valueCallback?n.valueCallback(i[0]):i[0];return{value:a=t.valueCallback?t.valueCallback(a):a,rest:e.slice(o.length)}}),era:eq({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:eq({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:eq({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:eq({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:eq({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},eU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eG=/^'([^]*?)'?$/,eK=/''/g,eX=/[a-zA-Z]/;function eQ(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getTime()>n.getTime()}function eJ(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getTime()0,o=n?t:1-t;if(o<=50)r=e||100;else{var i=o+50;r=e+100*Math.floor(i/100)-(e>=i%100?100:0)}return n?r:1-r}function tS(e){return e%400==0||e%4==0&&e%100!=0}function tk(e){return(tk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tO(e,t){for(var r=0;r0}},{key:"set",value:function(e,t,r){var n=e.getUTCFullYear();if(r.isTwoDigitYear){var o=tZ(r.year,n);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&1!==t.era?1-r.year:r.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}]),r&&tO(o,r),o}(ti);function tj(e){return(tj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tM(e,t){for(var r=0;r0}},{key:"set",value:function(e,t,r,n){var o=eS(e,n);if(r.isTwoDigitYear){var i=tZ(r.year,o);return e.setUTCFullYear(i,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),eZ(e,n)}var a="era"in t&&1!==t.era?1-r.year:r.year;return e.setUTCFullYear(a,0,n.firstWeekContainsDate),e.setUTCHours(0,0,0,0),eZ(e,n)}}]),r&&tM(o,r),o}(ti);function tN(e){return(tN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tF(e,t){for(var r=0;r=1&&t<=4}},{key:"set",value:function(e,t,r){return e.setUTCMonth((r-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),r&&tJ(o,r),o}(ti);function t6(e){return(t6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t3(e,t){for(var r=0;r=1&&t<=4}},{key:"set",value:function(e,t,r){return e.setUTCMonth((r-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),r&&t3(o,r),o}(ti);function rr(e){return(rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rn(e,t){for(var r=0;r=0&&t<=11}},{key:"set",value:function(e,t,r){return e.setUTCMonth(r,1),e.setUTCHours(0,0,0,0),e}}]),r&&rn(o,r),o}(ti);function rs(e){return(rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rc(e,t){for(var r=0;r=0&&t<=11}},{key:"set",value:function(e,t,r){return e.setUTCMonth(r,1),e.setUTCHours(0,0,0,0),e}}]),r&&rc(o,r),o}(ti);function ry(e){return(ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rb(e,t){for(var r=0;r=1&&t<=53}},{key:"set",value:function(e,t,r,n){return eZ(function(e,t,r){G(2,arguments);var n=X(e),o=Y(t),i=ek(n,r)-o;return n.setUTCDate(n.getUTCDate()-7*i),n}(e,r,n),n)}}]),r&&rb(o,r),o}(ti);function rS(e){return(rS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rk(e,t){for(var r=0;r=1&&t<=53}},{key:"set",value:function(e,t,r){return eg(function(e,t){G(2,arguments);var r=X(e),n=Y(t),o=ew(r)-n;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,r))}}]),r&&rk(o,r),o}(ti);function rE(e){return(rE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rj(e,t){for(var r=0;r=1&&t<=rD[n]:t>=1&&t<=rA[n]}},{key:"set",value:function(e,t,r){return e.setUTCDate(r),e.setUTCHours(0,0,0,0),e}}]),r&&rj(o,r),o}(ti);function rF(e){return(rF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rB(e,t){for(var r=0;r=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,r){return e.setUTCMonth(0,r),e.setUTCHours(0,0,0,0),e}}]),r&&rB(o,r),o}(ti);function rH(e,t,r){G(2,arguments);var n,o,i,a,l,u,s,c,d=Y(null!==(n=null!==(o=null!==(i=null!==(a=null==r?void 0:r.weekStartsOn)&&void 0!==a?a:null==r?void 0:null===(l=r.locale)||void 0===l?void 0:null===(u=l.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:ep.weekStartsOn)&&void 0!==o?o:null===(s=ep.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=X(e),p=Y(t),h=f.getUTCDay();return f.setUTCDate(f.getUTCDate()+(((p%7+7)%7=0&&t<=6}},{key:"set",value:function(e,t,r,n){return(e=rH(e,r,n)).setUTCHours(0,0,0,0),e}}],rY(i.prototype,r),n&&rY(i,n),i}(ti);function r0(e){return(r0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r1(e,t){for(var r=0;r=0&&t<=6}},{key:"set",value:function(e,t,r,n){return(e=rH(e,r,n)).setUTCHours(0,0,0,0),e}}],r1(i.prototype,r),n&&r1(i,n),i}(ti);function r7(e){return(r7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r9(e,t){for(var r=0;r=0&&t<=6}},{key:"set",value:function(e,t,r,n){return(e=rH(e,r,n)).setUTCHours(0,0,0,0),e}}],r9(i.prototype,r),n&&r9(i,n),i}(ti);function no(e){return(no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ni(e,t){for(var r=0;r=1&&t<=7}},{key:"set",value:function(e,t,r){return(e=function(e,t){G(2,arguments);var r=Y(t);r%7==0&&(r-=7);var n=X(e),o=((r%7+7)%7<1?7:0)+r-n.getUTCDay();return n.setUTCDate(n.getUTCDate()+o),n}(e,r)).setUTCHours(0,0,0,0),e}}],ni(i.prototype,r),n&&ni(i,n),i}(ti);function nd(e){return(nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nf(e,t){for(var r=0;r=1&&t<=12}},{key:"set",value:function(e,t,r){var n=e.getUTCHours()>=12;return n&&r<12?e.setUTCHours(r+12,0,0,0):n||12!==r?e.setUTCHours(r,0,0,0):e.setUTCHours(0,0,0,0),e}}]),r&&n$(o,r),o}(ti);function nF(e){return(nF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nB(e,t){for(var r=0;r=0&&t<=23}},{key:"set",value:function(e,t,r){return e.setUTCHours(r,0,0,0),e}}]),r&&nB(o,r),o}(ti);function nH(e){return(nH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nU(e,t){for(var r=0;r=0&&t<=11}},{key:"set",value:function(e,t,r){return e.getUTCHours()>=12&&r<12?e.setUTCHours(r+12,0,0,0):e.setUTCHours(r,0,0,0),e}}]),r&&nU(o,r),o}(ti);function nJ(e){return(nJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n0(e,t){for(var r=0;r=1&&t<=24}},{key:"set",value:function(e,t,r){return e.setUTCHours(r<=24?r%24:r,0,0,0),e}}]),r&&n0(o,r),o}(ti);function n3(e){return(n3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n7(e,t){for(var r=0;r=0&&t<=59}},{key:"set",value:function(e,t,r){return e.setUTCMinutes(r,0,0),e}}]),r&&n7(o,r),o}(ti);function on(e){return(on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oo(e,t){for(var r=0;r=0&&t<=59}},{key:"set",value:function(e,t,r){return e.setUTCSeconds(r,0),e}}]),r&&oo(o,r),o}(ti);function oc(e){return(oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function od(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i,a=!0,l=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==o.return||o.return()}finally{if(l)throw i}}}}function oY(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0&&c<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=X(e),f=d.getDay();return d.setDate(d.getDate()-((f2)return r;if(/:/.test(n[0])?t=n[0]:(r.date=n[0],t=n[1],o6.timeZoneDelimiter.test(r.date)&&(r.date=e.split(o6.timeZoneDelimiter)[0],t=e.substr(r.date.length,e.length))),t){var o=o6.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}(e);if(a.date){var l=function(e,t){var r=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var o=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:null===i?o:100*i,restDateString:e.slice((n[1]||n[2]).length)}}(a.date,i);n=function(e,t){if(null===t)return new Date(NaN);var r,n,o=e.match(o3);if(!o)return new Date(NaN);var i=!!o[4],a=o8(o[1]),l=o8(o[2])-1,u=o8(o[3]),s=o8(o[4]),c=o8(o[5])-1;if(i)return s>=1&&s<=53&&c>=0&&c<=6?((r=new Date(0)).setUTCFullYear(t,0,4),n=r.getUTCDay()||7,r.setUTCDate(r.getUTCDate()+((s-1)*7+c+1-n)),r):new Date(NaN);var d=new Date(0);return l>=0&&l<=11&&u>=1&&u<=(it[l]||(ir(t)?29:28))&&a>=1&&a<=(ir(t)?366:365)?(d.setUTCFullYear(t,l,Math.max(a,u)),d):new Date(NaN)}(l.restDateString,l.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);var u=n.getTime(),s=0;if(a.time&&isNaN(s=function(e){var t=e.match(o7);if(!t)return NaN;var r=ie(t[1]),n=ie(t[2]),o=ie(t[3]);return(24===r?0===n&&0===o:o>=0&&o<60&&n>=0&&n<60&&r>=0&&r<25)?36e5*r+6e4*n+1e3*o:NaN}(a.time)))return new Date(NaN);if(a.timezone){if(isNaN(o=function(e){if("Z"===e)return 0;var t=e.match(o9);if(!t)return 0;var r="+"===t[1]?-1:1,n=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return o>=0&&o<=59?r*(36e5*n+6e4*o):NaN}(a.timezone)))return new Date(NaN)}else{var c=new Date(u+s),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return new Date(u+s+o)}(e)},this.toISO=function(e){return function(e,t){G(1,arguments);var r,n,o=X(e);if(isNaN(o.getTime()))throw RangeError("Invalid time value");var i=String(null!==(r=null==t?void 0:t.format)&&void 0!==r?r:"extended"),a=String(null!==(n=null==t?void 0:t.representation)&&void 0!==n?n:"complete");if("extended"!==i&&"basic"!==i)throw RangeError("format must be 'extended' or 'basic'");if("date"!==a&&"time"!==a&&"complete"!==a)throw RangeError("representation must be 'date', 'time', or 'complete'");var l="",u="",s="extended"===i?"-":"";if("time"!==a){var c=eO(o.getDate(),2),d=eO(o.getMonth()+1,2),f=eO(o.getFullYear(),4);l="".concat(f).concat(s).concat(d).concat(s).concat(c)}if("date"!==a){var p=o.getTimezoneOffset();if(0!==p){var h=Math.abs(p),m=eO(Math.floor(h/60),2),y=eO(h%60,2);u="".concat(p<0?"+":"-").concat(m,":").concat(y)}else u="Z";var b=eO(o.getHours(),2),v=eO(o.getMinutes(),2),g=eO(o.getSeconds(),2),x=""===l?"":"T",w=[b,v,g].join("extended"===i?":":"");l="".concat(l).concat(x).concat(w).concat(u)}return l}(e,{format:"extended"})},this.getCurrentLocaleCode=function(){var e;return(null===(e=t.locale)||void 0===e?void 0:e.code)||"en-US"},this.addSeconds=function(e,t){return function(e,t){return G(2,arguments),J(e,1e3*Y(t))}(e,t)},this.addMinutes=function(e,t){return function(e,t){return G(2,arguments),J(e,6e4*Y(t))}(e,t)},this.addHours=function(e,t){return function(e,t){return G(2,arguments),J(e,36e5*Y(t))}(e,t)},this.addDays=function(e,t){return Q(e,t)},this.addWeeks=function(e,t){return function(e,t){return G(2,arguments),Q(e,7*Y(t))}(e,t)},this.addMonths=function(e,t){return ee(e,t)},this.addYears=function(e,t){return et(e,t)},this.isValid=function(e){return eb(t.date(e))},this.getDiff=function(e,r,n){switch(n){case"years":return function(e,t){G(2,arguments);var r=X(e),n=X(t),o=er(r,n),i=Math.abs(function(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getFullYear()-n.getFullYear()}(r,n));r.setFullYear(1584),n.setFullYear(1584);var a=er(r,n)===-o,l=o*(i-Number(a));return 0===l?0:l}(e,t.date(r));case"quarters":return function(e,t,r){G(2,arguments);var n=ei(e,t)/3;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));case"months":return ei(e,t.date(r));case"weeks":return function(e,t,r){G(2,arguments);var n=ed(e,t)/7;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));case"days":return ed(e,t.date(r));case"hours":return function(e,t,r){G(2,arguments);var n=ef(e,t)/36e5;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));case"minutes":return function(e,t,r){G(2,arguments);var n=ef(e,t)/6e4;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));case"seconds":return function(e,t,r){G(2,arguments);var n=ef(e,t)/1e3;return el(null==r?void 0:r.roundingMethod)(n)}(e,t.date(r));default:return ef(e,t.date(r))}},this.isAfter=function(e,t){return eQ(e,t)},this.isBefore=function(e,t){return eJ(e,t)},this.startOfDay=function(e){return es(e)},this.endOfDay=function(e){return en(e)},this.getHours=function(e){return function(e){return G(1,arguments),X(e).getHours()}(e)},this.setHours=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t);return r.setHours(n),r}(e,t)},this.setMinutes=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t);return r.setMinutes(n),r}(e,t)},this.getSeconds=function(e){return function(e){return G(1,arguments),X(e).getSeconds()}(e)},this.setSeconds=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t);return r.setSeconds(n),r}(e,t)},this.isSameDay=function(e,t){return function(e,t){G(2,arguments);var r=es(e),n=es(t);return r.getTime()===n.getTime()}(e,t)},this.isSameMonth=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}(e,t)},this.isSameYear=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getFullYear()===n.getFullYear()}(e,t)},this.isSameHour=function(e,t){return function(e,t){G(2,arguments);var r=e0(e),n=e0(t);return r.getTime()===n.getTime()}(e,t)},this.startOfYear=function(e){return o5(e)},this.endOfYear=function(e){return em(e)},this.startOfMonth=function(e){return o2(e)},this.endOfMonth=function(e){return eo(e)},this.startOfWeek=function(e){return o4(e,{locale:t.locale})},this.endOfWeek=function(e){return eh(e,{locale:t.locale})},this.getYear=function(e){return function(e){return G(1,arguments),X(e).getFullYear()}(e)},this.setYear=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}(e,t)},this.date=function(e){return void 0===e?new Date:null===e?null:new Date(e)},this.toJsDate=function(e){return e},this.parse=function(e,r){return""===e?null:function(e,t,r,n){G(3,arguments);var o=String(e),i=String(t),a=null!==(s=null!==(c=null==n?void 0:n.locale)&&void 0!==c?c:ep.locale)&&void 0!==s?s:eH;if(!a.match)throw RangeError("locale must contain match property");var l=Y(null!==(d=null!==(f=null!==(p=null!==(h=null==n?void 0:n.firstWeekContainsDate)&&void 0!==h?h:null==n?void 0:null===(m=n.locale)||void 0===m?void 0:null===(y=m.options)||void 0===y?void 0:y.firstWeekContainsDate)&&void 0!==p?p:ep.firstWeekContainsDate)&&void 0!==f?f:null===(b=ep.locale)||void 0===b?void 0:null===(v=b.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==d?d:1);if(!(l>=1&&l<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=Y(null!==(g=null!==(x=null!==(w=null!==(Z=null==n?void 0:n.weekStartsOn)&&void 0!==Z?Z:null==n?void 0:null===(S=n.locale)||void 0===S?void 0:null===(k=S.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:ep.weekStartsOn)&&void 0!==x?x:null===(O=ep.locale)||void 0===O?void 0:null===(T=O.options)||void 0===T?void 0:T.weekStartsOn)&&void 0!==g?g:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===i)return""===o?X(r):new Date(NaN);var s,c,d,f,p,h,m,y,b,v,g,x,w,Z,S,k,O,T,P,C={firstWeekContainsDate:l,weekStartsOn:u,locale:a},R=[new tn],E=i.match(oK).map(function(e){var t=e[0];return t in e_?(0,e_[t])(e,a.formatLong):e}).join("").match(oG),j=[],M=oU(E);try{for(M.s();!(P=M.n()).done;){var $=function(){var t=P.value;!(null!=n&&n.useAdditionalWeekYearTokens)&&eN(t)&&eF(t,i,e),!(null!=n&&n.useAdditionalDayOfYearTokens)&&eD(t)&&eF(t,i,e);var r=t[0],l=oq[r];if(l){var u=l.incompatibleTokens;if(Array.isArray(u)){var s=j.find(function(e){return u.includes(e.token)||e.token===r});if(s)throw RangeError("The format string mustn't contain `".concat(s.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===l.incompatibleTokens&&j.length>0)throw RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));j.push({token:r,fullToken:t});var c=l.run(o,t,a.match,C);if(!c)return{v:new Date(NaN)};R.push(c.setter),o=c.rest}else{if(r.match(o0))throw RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");if("''"===t?t="'":"'"===r&&(t=t.match(oX)[1].replace(oQ,"'")),0!==o.indexOf(t))return{v:new Date(NaN)};o=o.slice(t.length)}}();if("object"===oH($))return $.v}}catch(_){M.e(_)}finally{M.f()}if(o.length>0&&oJ.test(o))return new Date(NaN);var I=R.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,r){return r.indexOf(e)===t}).map(function(e){return R.filter(function(t){return t.priority===e}).sort(function(e,t){return t.subPriority-e.subPriority})}).map(function(e){return e[0]}),A=X(r);if(isNaN(A.getTime()))return new Date(NaN);var D,N=ev(A,eu(A)),F={},B=oU(I);try{for(B.s();!(D=B.n()).done;){var L=D.value;if(!L.validate(N,C))return new Date(NaN);var z=L.set(N,F,C);Array.isArray(z)?(N=z[0],function(e,t){if(null==e)throw TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}(F,z[1])):N=z}}catch(V){B.e(V)}finally{B.f()}return N}(e,r,new Date,{locale:t.locale})},this.format=function(e,r){return t.formatByString(e,t.formats[r])},this.formatByString=function(e,r){return function(e,t,r){G(2,arguments);var n,o,i,a,l,u,s,c,d,f,p,h,m,y,b,v,g,x,w=String(t),Z=null!==(n=null!==(o=null==r?void 0:r.locale)&&void 0!==o?o:ep.locale)&&void 0!==n?n:eH,S=Y(null!==(i=null!==(a=null!==(l=null!==(u=null==r?void 0:r.firstWeekContainsDate)&&void 0!==u?u:null==r?void 0:null===(s=r.locale)||void 0===s?void 0:null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==l?l:ep.firstWeekContainsDate)&&void 0!==a?a:null===(d=ep.locale)||void 0===d?void 0:null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(S>=1&&S<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=Y(null!==(p=null!==(h=null!==(m=null!==(y=null==r?void 0:r.weekStartsOn)&&void 0!==y?y:null==r?void 0:null===(b=r.locale)||void 0===b?void 0:null===(v=b.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:ep.weekStartsOn)&&void 0!==h?h:null===(g=ep.locale)||void 0===g?void 0:null===(x=g.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==p?p:0);if(!(k>=0&&k<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Z.localize)throw RangeError("locale must contain localize property");if(!Z.formatLong)throw RangeError("locale must contain formatLong property");var O=X(e);if(!eb(O))throw RangeError("Invalid time value");var T=eu(O),P=ev(O,T),C={firstWeekContainsDate:S,weekStartsOn:k,locale:Z,_originalDate:O};return w.match(eY).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,e_[t])(e,Z.formatLong):e}).join("").match(eU).map(function(n){if("''"===n)return"'";var o,i=n[0];if("'"===i)return(o=n.match(eG))?o[1].replace(eK,"'"):n;var a=ej[i];if(a)return!(null!=r&&r.useAdditionalWeekYearTokens)&&eN(n)&&eF(n,t,String(e)),!(null!=r&&r.useAdditionalDayOfYearTokens)&&eD(n)&&eF(n,t,String(e)),a(P,n,Z.localize,C);if(i.match(eX))throw RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n}).join("")}(e,r,{locale:t.locale})},this.isEqual=function(e,t){return null===e&&null===t||function(e,t){G(2,arguments);var r=X(e),n=X(t);return r.getTime()===n.getTime()}(e,t)},this.isNull=function(e){return null===e},this.isAfterDay=function(e,t){return eQ(e,en(t))},this.isBeforeDay=function(e,t){return eJ(e,es(t))},this.isBeforeYear=function(e,t){return eJ(e,o5(t))},this.isAfterYear=function(e,t){return eQ(e,em(t))},this.isWithinRange=function(e,t){return function(e,t){G(2,arguments);var r=X(e).getTime(),n=X(t.start).getTime(),o=X(t.end).getTime();if(!(n<=o))throw RangeError("Invalid interval");return r>=n&&r<=o}(e,{start:t[0],end:t[1]})},this.formatNumber=function(e){return e},this.getMinutes=function(e){return e.getMinutes()},this.getMonth=function(e){return e.getMonth()},this.getDaysInMonth=function(e){return o1(e)},this.setMonth=function(e,t){return function(e,t){G(2,arguments);var r=X(e),n=Y(t),o=r.getFullYear(),i=r.getDate(),a=new Date(0);a.setFullYear(o,n,15),a.setHours(0,0,0,0);var l=o1(a);return r.setMonth(n,Math.min(i,l)),r}(e,t)},this.getMeridiemText=function(e){return"am"===e?"AM":"PM"},this.getNextMonth=function(e){return ee(e,1)},this.getPreviousMonth=function(e){return ee(e,-1)},this.getMonthArray=function(e){for(var r=[o5(e)];r.length<12;){var n=r[r.length-1];r.push(t.getNextMonth(n))}return r},this.mergeDateAndTime=function(e,r){return t.setSeconds(t.setMinutes(t.setHours(e,t.getHours(r)),t.getMinutes(r)),t.getSeconds(r))},this.getWeekdays=function(){var e=new Date;return(function(e,t){G(1,arguments);var r,n=e||{},o=X(n.start),i=X(n.end).getTime();if(!(o.getTime()<=i))throw RangeError("Invalid interval");var a=[];o.setHours(0,0,0,0);var l=Number(null!==(r=null==t?void 0:t.step)&&void 0!==r?r:1);if(l<1||isNaN(l))throw RangeError("`options.step` must be a number greater than 1");for(;o.getTime()<=i;)a.push(X(o)),o.setDate(o.getDate()+l),o.setHours(0,0,0,0);return a})({start:o4(e,{locale:t.locale}),end:eh(e,{locale:t.locale})}).map(function(e){return t.formatByString(e,"EEEEEE")})},this.getWeekArray=function(e){for(var r=o4(o2(e),{locale:t.locale}),n=eh(eo(e),{locale:t.locale}),o=0,i=r,a=[],l=null;eJ(i,n);){var u=Math.floor(o/7);a[u]=a[u]||[];var s=function(e){return G(1,arguments),X(e).getDay()}(i);l!==s&&(l=s,a[u].push(i),o+=1),i=Q(i,1)}return a},this.getYearRange=function(e,t){for(var r=o5(e),n=em(t),o=[],i=r;eJ(i,n);)o.push(i),i=et(i,1);return o},this.locale=n,this.formats=Object.assign({},ia,o)};let iu={y:"year",yy:"year",yyy:"year",yyyy:"year",MMMM:"month",MM:"month",DD:"day",d:"day",dd:"day",H:"hour",HH:"hour",h:"hour",hh:"hour",mm:"minute",ss:"second",a:"am-pm",aa:"am-pm",aaa:"am-pm"};class is extends il{constructor(...e){super(...e),this.formatTokenMap=iu,this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];if("p"===t||"P"===t){let r=ii()[t],n=this.locale||eH;return r(e,n.formatLong,{})}return e}).join(""),this.getFormatHelperText=e=>this.expandFormat(e).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase()}}var ic=r(52359),id=r(75084),ip=r(72389),ih=r(58175),im=(0,ih.Z)((0,u.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined"),iy=r(365),ib=function(e){var t=e.openSettingsDialog;return(0,u.jsxs)("div",{className:"settings-div",children:[(0,u.jsx)("span",{className:"settingsTitle",children:(0,u.jsx)(id.Z,{variant:"contained",className:"topButton",onClick:function(){return t()},children:(0,u.jsx)(im,{})})}),(0,u.jsx)(ip.Z,{placement:"bottom",title:"View on GitHub",children:(0,u.jsx)("span",{className:"githubIcon",children:(0,u.jsx)("a",{href:"https://github.com/obss/react-validatable-form",target:"_blank",rel:"noreferrer",children:(0,u.jsx)("img",{src:"".concat(iy.O,"/github.png"),width:"100%",height:"100%",alt:"github_icon"})})})}),(0,u.jsx)(ip.Z,{placement:"bottom",title:"View on npmjs",children:(0,u.jsx)("span",{className:"npmIcon",children:(0,u.jsx)("a",{href:"https://www.npmjs.com/package/react-validatable-form",target:"_blank",rel:"noreferrer",children:(0,u.jsx)("img",{src:"".concat(iy.O,"/npm.png"),width:"100%",height:"100%",alt:"npm_icon"})})})}),(0,u.jsx)(ip.Z,{placement:"bottom",title:"Current Version",children:(0,u.jsx)("span",{className:"versionInfo",children:(0,u.jsx)("a",{href:"https://www.npmjs.com/package/react-validatable-form",target:"_blank",rel:"noreferrer",children:"Version: ".concat("5.0.0-beta.2")})})})]})},iv=r(92096),ig=r(98885),ix=r(75400),iw=r(84771),iZ=r(62097),iS=r(53566),ik=r(57577);let iO=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function iT(e,t,r){let n="function"==typeof r?r():r,o=function(e,t,r){let n;let o=t.getBoundingClientRect(),i=r&&r.getBoundingClientRect(),a=(0,ik.Z)(t);if(t.fakeTransform)n=t.fakeTransform;else{let l=a.getComputedStyle(t);n=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("transform")}let u=0,s=0;if(n&&"none"!==n&&"string"==typeof n){let c=n.split("(")[1].split(")")[0].split(",");u=parseInt(c[4],10),s=parseInt(c[5],10)}return"left"===e?i?`translateX(${i.right+u-o.left}px)`:`translateX(${a.innerWidth+u-o.left}px)`:"right"===e?i?`translateX(-${o.right-i.left-u}px)`:`translateX(-${o.left+o.width-u}px)`:"up"===e?i?`translateY(${i.bottom+s-o.top}px)`:`translateY(${a.innerHeight+s-o.top}px)`:i?`translateY(-${o.top-i.top+o.height-s}px)`:`translateY(-${o.top+o.height-s}px)`}(e,t,n);o&&(t.style.webkitTransform=o,t.style.transform=o)}let iP=S.forwardRef(function(e,t){let r=(0,iZ.Z)(),n={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,container:s,direction:c="down",easing:d=n,in:f,onEnter:p,onEntered:h,onEntering:m,onExit:y,onExited:b,onExiting:v,style:g,timeout:x=o,TransitionComponent:k=ig.ZP}=e,O=(0,w.Z)(e,iO),T=S.useRef(null),P=(0,iw.Z)(l.ref,T,t),C=e=>t=>{e&&(void 0===t?e(T.current):e(T.current,t))},R=C((e,t)=>{iT(c,e,s),(0,iS.n)(e),p&&p(e,t)}),E=C((e,t)=>{let n=(0,iS.C)({timeout:x,style:g,easing:d},{mode:"enter"});e.style.webkitTransition=r.transitions.create("-webkit-transform",(0,Z.Z)({},n)),e.style.transition=r.transitions.create("transform",(0,Z.Z)({},n)),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)}),j=C(h),M=C(v),$=C(e=>{let t=(0,iS.C)({timeout:x,style:g,easing:d},{mode:"exit"});e.style.webkitTransition=r.transitions.create("-webkit-transform",t),e.style.transition=r.transitions.create("transform",t),iT(c,e,s),y&&y(e)}),_=C(e=>{e.style.webkitTransition="",e.style.transition="",b&&b(e)}),I=e=>{i&&i(T.current,e)},A=S.useCallback(()=>{T.current&&iT(c,T.current,s)},[c,s]);return S.useEffect(()=>{if(f||"down"===c||"right"===c)return;let e=(0,ix.Z)(()=>{T.current&&iT(c,T.current,s)}),t=(0,ik.Z)(T.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[c,f,s]),S.useEffect(()=>{f||A()},[f,A]),(0,u.jsx)(k,(0,Z.Z)({nodeRef:T,onEnter:R,onEntered:j,onEntering:E,onExit:$,onExited:_,onExiting:M,addEndListener:I,appear:a,in:f,timeout:x},O,{children:(e,t)=>S.cloneElement(l,(0,Z.Z)({ref:P,style:(0,Z.Z)({visibility:"exited"!==e||f?void 0:"hidden"},g,l.props.style)},t))}))});function iC(e){return(0,E.Z)("MuiDrawer",e)}(0,j.Z)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);let iR=["BackdropProps"],iE=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],ij=(e,t)=>{let{ownerState:r}=e;return[t.root,("permanent"===r.variant||"persistent"===r.variant)&&t.docked,t.modal]},iM=e=>{let{classes:t,anchor:r,variant:n}=e,o={root:["root"],docked:[("permanent"===n||"persistent"===n)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,C.Z)(r)}`,"temporary"!==n&&`paperAnchorDocked${(0,C.Z)(r)}`]};return(0,O.Z)(o,iC,t)},i$=(0,T.ZP)(iv.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:ij})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),i_=(0,T.ZP)("div",{shouldForwardProp:T.FO,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ij})({flex:"0 0 auto"}),iI=(0,T.ZP)(R.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver(e,t){let{ownerState:r}=e;return[t.paper,t[`paperAnchor${(0,C.Z)(r.anchor)}`],"temporary"!==r.variant&&t[`paperAnchorDocked${(0,C.Z)(r.anchor)}`]]}})(({theme:e,ownerState:t})=>(0,Z.Z)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===t.anchor&&{left:0},"top"===t.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===t.anchor&&{right:0},"bottom"===t.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===t.anchor&&"temporary"!==t.variant&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},"top"===t.anchor&&"temporary"!==t.variant&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},"right"===t.anchor&&"temporary"!==t.variant&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"bottom"===t.anchor&&"temporary"!==t.variant&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),iA={left:"right",right:"left",top:"down",bottom:"up"},iD=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiDrawer"}),n=(0,iZ.Z)(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{anchor:i="left",BackdropProps:a,children:l,className:s,elevation:c=16,hideBackdrop:d=!1,ModalProps:{BackdropProps:f}={},onClose:p,open:h=!1,PaperProps:m={},SlideProps:y,TransitionComponent:b=iP,transitionDuration:v=o,variant:g="temporary"}=r,x=(0,w.Z)(r.ModalProps,iR),O=(0,w.Z)(r,iE),T=S.useRef(!1);S.useEffect(()=>{T.current=!0},[]);let C="rtl"===n.direction&&-1!==["left","right"].indexOf(i)?iA[i]:i,R=(0,Z.Z)({},r,{anchor:i,elevation:c,open:h,variant:g},O),E=iM(R),j=(0,u.jsx)(iI,(0,Z.Z)({elevation:"temporary"===g?c:0,square:!0},m,{className:(0,k.Z)(E.paper,m.className),ownerState:R,children:l}));if("permanent"===g)return(0,u.jsx)(i_,(0,Z.Z)({className:(0,k.Z)(E.root,E.docked,s),ownerState:R,ref:t},O,{children:j}));let M=(0,u.jsx)(b,(0,Z.Z)({in:h,direction:iA[C],timeout:v,appear:T.current},y,{children:j}));return"persistent"===g?(0,u.jsx)(i_,(0,Z.Z)({className:(0,k.Z)(E.root,E.docked,s),ownerState:R,ref:t},O,{children:M})):(0,u.jsx)(i$,(0,Z.Z)({BackdropProps:(0,Z.Z)({},a,f,{transitionDuration:v}),className:(0,k.Z)(E.root,E.modal,s),open:h,ownerState:R,onClose:p,hideBackdrop:d,ref:t},O,x,{children:M}))});var iN=r(11163);r(69496);var iF=r(74065),iB=r(29618),iL=r(29630),iz=r(47028),iV=r(85214),iW=r(28442),iq=r(41796),iH=r(50522),iU=r(7335),iY=r(63289),iG=r(57742);function iK(e){return(0,E.Z)("MuiListItem",e)}let iX=(0,j.Z)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),iQ=(0,j.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function iJ(e){return(0,E.Z)("MuiListItemSecondaryAction",e)}(0,j.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);let i0=["className"],i1=e=>{let{disableGutters:t,classes:r}=e;return(0,O.Z)({root:["root",t&&"disableGutters"]},iJ,r)},i2=(0,T.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver(e,t){let{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})(({ownerState:e})=>(0,Z.Z)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),i4=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiListItemSecondaryAction"}),{className:n}=r,o=(0,w.Z)(r,i0),i=S.useContext(iG.Z),a=(0,Z.Z)({},r,{disableGutters:i.disableGutters}),l=i1(a);return(0,u.jsx)(i2,(0,Z.Z)({className:(0,k.Z)(l.root,n),ownerState:a,ref:t},o))});i4.muiName="ListItemSecondaryAction";let i5=["className"],i6=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected"],i3=(e,t)=>{let{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.button&&t.button,r.hasSecondaryAction&&t.secondaryAction]},i7=e=>{let{alignItems:t,button:r,classes:n,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:u,hasSecondaryAction:s,selected:c}=e;return(0,O.Z)({root:["root",o&&"dense",!a&&"gutters",!l&&"padding",u&&"divider",i&&"disabled",r&&"button","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction",c&&"selected"],container:["container"]},iK,n)},i9=(0,T.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:i3})(({theme:e,ownerState:t})=>(0,Z.Z)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&(0,Z.Z)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${iQ.root}`]:{paddingRight:48}},{[`&.${iX.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${iX.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,iq.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${iX.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,iq.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${iX.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${iX.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,iq.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,iq.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),i8=(0,T.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),ae=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiListItem"}),{alignItems:n="center",autoFocus:o=!1,button:i=!1,children:a,className:l,component:s,components:c={},componentsProps:d={},ContainerComponent:f="li",ContainerProps:{className:p}={},dense:h=!1,disabled:m=!1,disableGutters:y=!1,disablePadding:b=!1,divider:v=!1,focusVisibleClassName:g,secondaryAction:x,selected:O=!1}=r,T=(0,w.Z)(r.ContainerProps,i5),C=(0,w.Z)(r,i6),R=S.useContext(iG.Z),E={dense:h||R.dense||!1,alignItems:n,disableGutters:y},j=S.useRef(null);(0,iY.Z)(()=>{o&&j.current&&j.current.focus()},[o]);let M=S.Children.toArray(a),$=M.length&&(0,iU.Z)(M[M.length-1],["ListItemSecondaryAction"]),_=(0,Z.Z)({},r,{alignItems:n,autoFocus:o,button:i,dense:E.dense,disabled:m,disableGutters:y,disablePadding:b,divider:v,hasSecondaryAction:$,selected:O}),I=i7(_),A=(0,iw.Z)(j,t),D=c.Root||i9,N=d.root||{},F=(0,Z.Z)({className:(0,k.Z)(I.root,N.className,l),disabled:m},C),B=s||"li";return(i&&(F.component=s||"div",F.focusVisibleClassName=(0,k.Z)(iX.focusVisible,g),B=iH.Z),$)?(B=F.component||s?B:"div","li"===f&&("li"===B?B="div":"li"===F.component&&(F.component="div")),(0,u.jsx)(iG.Z.Provider,{value:E,children:(0,u.jsxs)(i8,(0,Z.Z)({as:f,className:(0,k.Z)(I.container,p),ref:A,ownerState:_},T,{children:[(0,u.jsx)(D,(0,Z.Z)({},N,!(0,iW.Z)(D)&&{as:B,ownerState:(0,Z.Z)({},_,N.ownerState)},F,{children:M})),M.pop()]}))})):(0,u.jsx)(iG.Z.Provider,{value:E,children:(0,u.jsxs)(D,(0,Z.Z)({},N,{as:B,ref:A,ownerState:_},!(0,iW.Z)(D)&&{ownerState:(0,Z.Z)({},_,N.ownerState)},F,{children:[M,x&&(0,u.jsx)(i4,{children:x})]}))})});function at(e){return(0,E.Z)("MuiListItemText",e)}let ar=(0,j.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),an=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],ao=e=>{let{classes:t,inset:r,primary:n,secondary:o,dense:i}=e;return(0,O.Z)({root:["root",r&&"inset",i&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},at,t)},ai=(0,T.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver(e,t){let{ownerState:r}=e;return[{[`& .${ar.primary}`]:t.primary},{[`& .${ar.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>(0,Z.Z)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),aa=S.forwardRef(function(e,t){let r=(0,P.Z)({props:e,name:"MuiListItemText"}),{children:n,className:o,disableTypography:i=!1,inset:a=!1,primary:l,primaryTypographyProps:s,secondary:c,secondaryTypographyProps:d}=r,f=(0,w.Z)(r,an),{dense:p}=S.useContext(iG.Z),h=null!=l?l:n,m=c,y=(0,Z.Z)({},r,{disableTypography:i,inset:a,primary:!!h,secondary:!!m,dense:p}),b=ao(y);return null==h||h.type===iL.Z||i||(h=(0,u.jsx)(iL.Z,(0,Z.Z)({variant:p?"body2":"body1",className:b.primary,component:null!=s&&s.variant?void 0:"span",display:"block"},s,{children:h}))),null==m||m.type===iL.Z||i||(m=(0,u.jsx)(iL.Z,(0,Z.Z)({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:m}))),(0,u.jsxs)(ai,(0,Z.Z)({className:(0,k.Z)(b.root,o),ownerState:y,ref:t},f,{children:[h,m]}))});var al=r(9041),au=(0,ih.Z)((0,u.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),as=(0,ih.Z)((0,u.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),ac=[{title:"Getting Started",itemId:"group1",subNav:[{title:"Home",itemId:"/getting-started/home",keywords:["home","npm","yarn"]},{title:"Installation",itemId:"/getting-started/installation",keywords:["npm","yarn"]},{title:"Usage",itemId:"/getting-started/usage",keywords:["ReactValidatableFormProvider","useValidatableForm"]}]},{title:"Rules",itemId:"group2",subNav:[{title:"required",itemId:"/rules/required"},{title:"number",itemId:"/rules/number",keywords:["onlyIntegers"]},{title:"length",itemId:"/rules/length"},{title:"listSize",itemId:"/rules/list-size"},{title:"date",itemId:"/rules/date",keywords:["time","withTime"]},{title:"email",itemId:"/rules/email"},{title:"url",itemId:"/rules/url"},{title:"iban",itemId:"/rules/iban"},{title:"equality",itemId:"/rules/equality",keywords:["equalTo","isOneOf"]},{title:"includes",itemId:"/rules/includes"},{title:"regex",itemId:"/rules/regex"},{title:"unique",itemId:"/rules/unique"},{title:"custom on hook",itemId:"/rules/custom-on-hook"},{title:"custom on provider",itemId:"/rules/custom-on-provider"}]},{title:"Advanced Settings",itemId:"group3",subNav:[{title:"Validate Lists",itemId:"/advanced/validate-lists"},{title:"Hide Before Submit",itemId:"/advanced/hide-before-submit",keywords:["resetForm"]},{title:"Show After Blur",itemId:"/advanced/show-after-blur",keywords:["resetForm"]},{title:"Focus to Error After Submit",itemId:"/advanced/focus-to-error-after-submit"},{title:"Focus to Error on List After Submit",itemId:"/advanced/focus-to-error-on-list-after-submit"},{title:"Validate List of Objects",itemId:"/advanced/validate-list-of-objects"},{title:"Validate Complex Forms",itemId:"/advanced/validate-complex-forms"}]},{title:"Customizations",itemId:"group4",subNav:[{title:"Custom Message",itemId:"/customizations/custom-message"},{title:"Custom Translations",itemId:"/customizations/translations"},{title:"Conditional Rules",itemId:"/customizations/conditional-rules",keywords:["disableIf","enableIf"]},{title:"Apply to Nulls",itemId:"/customizations/apply-to-nulls"},{title:"Element Focus Handler",itemId:"/customizations/custom-element-focus-handler"}]},{title:"Example Usages",itemId:"group5",subNav:[{title:"Pure React Components",itemId:"/examples/pure"},{title:"MUI Components",itemId:"/examples/mui",keywords:["materialui","material-ui"]},{title:"Ant Design Components",itemId:"/examples/antd"},{title:"PrimeReact Components",itemId:"/examples/prime-react"},{title:"React-Bootstrap Components",itemId:"/examples/react-bootstrap"},{title:"React Native Usage",itemId:"/examples/react-native"},{title:"setFormData",itemId:"/examples/set-form-data"},{title:"setPathValue",itemId:"/examples/set-path-value"},{title:"unsetPathValue",itemId:"/examples/unset-path-value"},{title:"setRules",itemId:"/examples/set-rules"},{title:"setFormDataAndRules",itemId:"/examples/set-form-data-and-rules"},{title:"formData",itemId:"/examples/form-data"},{title:"validationError",itemId:"/examples/validation-error"},{title:"validationErrorOriginalResult",itemId:"/examples/validation-error-original-result"},{title:"unsetPathIsBlurred",itemId:"/examples/unset-path-is-blurred"},{title:"isPathValid",itemId:"/examples/is-path-valid"}]},{title:"API",itemId:"group6",subNav:[{title:"ReactValidatableFormProvider",itemId:"/library-api/react-validatable-form-provider",keywords:["lang","customRules","translations","dateFormatterFunction","dateWithTimeFormatterFunction","hideBeforeSubmit","showAfterBlur","focusToErrorAfterSubmit","elementFocusHandler"]},{title:"useValidatableForm",itemId:"/library-api/use-validatable-form",keywords:["rules","initialFormData","hideBeforeSubmit","showAfterBlur","focusToErrorAfterSubmit","elementFocusHandler","isValid","validationError","validationErrorOriginalResult","formData","formIsSubmitted","blurredPathList","setPathValue","unsetPathValue","setFormIsSubmitted","setPathIsBlurred","unsetPathIsBlurred","setFormData","setRules","setFormDataAndRules","resetForm","isPathValid","getValue","getError","forceRunAllValidations"]},{title:"rules",itemId:"/library-api/rules",keywords:["path","listPath","ruleSet","elementId","listElementId","dependantPaths","disableFocusAfterSubmit","subRules"]},{title:"Rule",itemId:"/library-api/rule",keywords:["equalTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo","onlyIntegers","withTime","applyToNulls","disableIf","enableIf","customMessage"]},{title:"path & listPath",itemId:"/library-api/path",keywords:["lodash","path","listPath"]}]}],ad=function(e){var t=e.menuIsHidden,r=e.toggleDrawer,n=(0,iN.useRouter)(),o=(0,a.Z)((0,S.useState)(""),2),i=o[0],l=o[1],s=(0,a.Z)((0,S.useState)(""),2),c=s[0],d=s[1];(0,S.useEffect)(function(){l(""),n.pathname.includes("/getting-started/")?d("group1"):n.pathname.includes("/rules/")?d("group2"):n.pathname.includes("/advanced/")?d("group3"):n.pathname.includes("/customizations/")?d("group4"):n.pathname.includes("/examples/")?d("group5"):n.pathname.includes("/library-api/")&&d("group6")},[n]);var f=function(e){e===c?d(""):d(e)},p=function(){r(!1)},m=JSON.parse(JSON.stringify(ac));i&&(m=m.filter(function(e){var t=!1,r=i.toUpperCase();if(e.subNav&&e.subNav.length>0){var n=[],o=!0,a=!1,l=void 0;try{for(var u,s=e.subNav[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,d=c.keywords||[];(c.title.toUpperCase().includes(r)||c.title.replaceAll(/\s/g,"").toUpperCase().includes(r)||d.filter(function(e){return e.toUpperCase().includes(r)}).length>0)&&(n.push(c),t=!0)}}catch(f){a=!0,l=f}finally{try{o||null==s.return||s.return()}finally{if(a)throw l}}n&&n.length>0&&(e.subNav=n)}return t}));var y=m.map(function(e){return(0,u.jsxs)(iF.Z,{expanded:c===e.itemId||"open"===c,onChange:function(){return f(e.itemId)},children:[(0,u.jsx)(iB.Z,{"aria-controls":"panel1a-content",expandIcon:(0,u.jsx)(au,{}),children:(0,u.jsxs)(iL.Z,{children:[" ",e.title," "]})}),(0,u.jsx)(iz.Z,{children:(0,u.jsx)(iV.Z,{disablePadding:!0,children:e.subNav.map(function(e){return(0,u.jsx)("div",{className:n.pathname===e.itemId?"selectedSideItem":null,onClick:p,children:(0,u.jsx)(h(),{href:e.itemId,legacyBehavior:!0,children:(0,u.jsx)(ae,{button:!0,children:(0,u.jsx)(aa,{primary:e.title})})})},e.itemId)})})})]},e.itemId)});return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{className:"".concat(t?"sideMenuHidden":"sideMenuOpen"," mysidemenu inset-y-0 left-0 z-30 overflow-y-auto transition duration-300 ease-out transform translate-x-0 bg-white border-r-2 lg:translate-x-0 lg:static lg:inset-0 ","ease-build translate-x-0"),children:(0,u.jsxs)("div",{className:"navbar-area",children:[(0,u.jsx)(b.Z,{className:"menu-search-input",label:"Search",InputProps:{endAdornment:(0,u.jsx)(al.Z,{position:"end",children:(0,u.jsx)(as,{})})},value:i,onChange:function(e){l(e.target.value),""!==e.target.value?d("open"):d("")}}),(0,u.jsx)(x.Z,{pt:1,children:y})]})})})},af=function(e){var t=e.open,r=e.toggleDrawer;return(0,u.jsx)(iD,{ModalProps:{keepMounted:!0},anchor:"left",open:t,onClose:function(){return r(!1)},children:(0,u.jsx)(ad,{toggleDrawer:r})})},ap=r(2386),ah={myCustomRule:function(e){var t=e.value;return t?!t.includes("a")&&t.length<5?"text ".concat(t," should either include letter 'a' or its length should be greater than 4"):null:"this field is a required field"},myCustomRule2:function(e){var t=e.value;return t?!t.includes("a")&&t.length<5?{value:t}:null:{}},myCustomRule3:function(e){var t=e.value;return t?!t.includes("a")&&t.length<10?(0,u.jsxs)("span",{children:["text ",(0,u.jsxs)("b",{children:[" ",t," "]})," should either include letter ",(0,u.jsx)("i",{children:" a "})," or its length should be greater than 9"]}):null:(0,u.jsx)("span",{children:"this field is a required field"})}},am={lang:"en",translationsEnabled:!1,customDateFormatterFunctionEnabled:!1,customDateWithTimeFormatterFunctionEnabled:!1,hideBeforeSubmit:!1,showAfterBlur:!1,focusToErrorAfterSubmit:!1,customElementFocusHandlerEnabled:!1},ay={en:{myCustomRule2:"This is myCustomRule2. This field should have letter 'a' or its length should be greater than 4"},tr:{myCustomRule2:"Bu kural myCustomRule2. Bu alan 'a' harfi i\xe7ermeli veya uzunluğu 4'den b\xfcy\xfck olmalı"}},ab={en:{required:"This field is really required","length.greaterThan":"Believe me, this field should really have greater than ${comparisonValue} characters","length.equalTo":"You should be careful because this field should have ${comparisonValue} characters",myCustomRule2:"Believe me, this field should have letter 'a' or its length should be greater than 4",email:(0,u.jsxs)("span",{children:["Do you think this is an ",(0,u.jsx)("b",{children:" email "}),"?"]})},de:{required:"Dieses Feld wird ben\xf6tigt",myCustomRule2:"Dieses Feld sollte den Buchstaben „a“ haben oder l\xe4nger als 4 sein"}},av=function(e){var t=e.getDate();return""+(t<=9?"0"+t:t)+"-"+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]+"-"+e.getFullYear()},ag=function(e){var t=e.getDate();return""+(t<=9?"0"+t:t)+"-"+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]+"-"+e.getFullYear()+" "+e.getHours()+":"+e.getMinutes()},ax=["en","tr"],aw=function(e){var t=e.Component,r=e.pageProps,n=(0,m.Z)("(max-width:1024px)"),s=(0,a.Z)((0,S.useState)(am),2),d=s[0],p=s[1],w=(0,a.Z)((0,S.useState)(!1),2),Z=w[0],k=w[1],O=(0,a.Z)((0,S.useState)(!1),2),T=O[0],P=O[1],C=(0,a.Z)((0,S.useState)(!1),2),R=C[0],E=C[1];(0,S.useEffect)(function(){P(n)},[n]);var j=function(e,t){var r=(0,o.Z)({},d);r[e]=t,"translationsEnabled"!==e||t||"de"!==d.lang||(r.lang="en"),p(r)},M=null;M=d.translationsEnabled?ab:ay;var $=null;d.customDateFormatterFunctionEnabled&&($=av);var _=null;d.customDateWithTimeFormatterFunctionEnabled&&(_=ag);var I=(0,l.Z)(ax);d.translationsEnabled&&I.push("de");var A=null;d.customElementFocusHandlerEnabled&&(A=function(e){var t=document.getElementById(e);t?(console.log("I'm currently focusing Dom element with id ".concat(e)),t.focus()):console.warn("useValidatableForm warning. Dom element with id ".concat(e," is not found to be focused"))});var N=(0,u.jsxs)("div",{className:"providerDialogContent",children:[(0,u.jsx)(y.Z,{value:d.lang,onChange:function(e,t){j("lang",t),console.log(t)},options:I,renderInput:function(e){return(0,u.jsx)(b.Z,(0,i.Z)((0,o.Z)({},e),{label:"lang"}))},style:{width:200}}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.translationsEnabled,onChange:function(e){return j("translationsEnabled",e.target.checked)}}),label:"custom translations"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.customDateFormatterFunctionEnabled,onChange:function(e){return j("customDateFormatterFunctionEnabled",e.target.checked)}}),label:"custom dateFormatterFunction"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.customDateWithTimeFormatterFunctionEnabled,onChange:function(e){return j("customDateWithTimeFormatterFunctionEnabled",e.target.checked)}}),label:"custom dateWithTimeFormatterFunction"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.hideBeforeSubmit,onChange:function(e){return j("hideBeforeSubmit",e.target.checked)}}),label:"hideBeforeSubmit"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.showAfterBlur,onChange:function(e){return j("showAfterBlur",e.target.checked)}}),label:"showAfterBlur"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.focusToErrorAfterSubmit,onChange:function(e){return j("focusToErrorAfterSubmit",e.target.checked)}}),label:"focusToErrorAfterSubmit"}),(0,u.jsx)(v.Z,{control:(0,u.jsx)(g.Z,{checked:d.customElementFocusHandlerEnabled,onChange:function(e){return j("customElementFocusHandlerEnabled",e.target.checked)}}),label:"custom elementFocusHandler"})]}),F=function(e){E(e)};return(0,u.jsxs)("div",{children:[(0,u.jsx)(c(),{children:(0,u.jsx)("link",{rel:"shortcut icon",href:"".concat(iy.O,"/favicon.png")})}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(f(),{src:"https://www.googletagmanager.com/gtag/js?id=GTM-T94RSQN",strategy:"afterInteractive"}),(0,u.jsx)(f(),{id:"google-analytics",strategy:"afterInteractive",children:"\n window.dataLayer = window.dataLayer || [];\n function gtag(){window.dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', 'GTM-T94RSQN');\n "})]}),(0,u.jsx)("div",{className:"obssTriangle",children:(0,u.jsx)("a",{className:"triangleIcon",href:"https://obss.tech/",target:"_blank",rel:"noreferrer",children:(0,u.jsx)("img",{src:"".concat(iy.O,"/obss.png"),width:"50px",height:"50px",alt:"obss"})})}),(0,u.jsx)(x.Z,{flexGrow:1,children:(0,u.jsx)(D,{color:"transparent",position:"relative",children:(0,u.jsxs)(z,{children:[(0,u.jsx)(V.Z,{onClick:function(){n?F(!R):P(!T)},className:"menuButton",children:(0,u.jsx)(H.Z,{})}),(0,u.jsx)(h(),{href:"/",children:(0,u.jsx)("img",{src:"".concat(iy.O,"/logo.png"),alt:"logo",width:"48px",height:"48px"})}),(0,u.jsx)(h(),{href:"/",className:"bannerText",children:(0,u.jsx)("div",{className:"bannerLink",children:"react-validatable-form"})}),(0,u.jsx)(x.Z,{flexGrow:1}),(0,u.jsx)(ib,{openSettingsDialog:function(){k(!0)}})]})})}),(0,u.jsx)(af,{anchor:R,open:R,toggleDrawer:F}),(0,u.jsxs)(W.Z,{open:Z,onClose:function(){return k(!1)},children:[(0,u.jsx)(q.Z,{children:(0,u.jsx)(ap.Z,{header:"Edit ReactValidatableFormProvider Props",codeUrl:"pages/_app.js",wrapperClassName:"modalHeaderWrapper"})}),N]}),(0,u.jsxs)("div",{style:{display:"flex"},children:[(0,u.jsx)("div",{className:"navbarDiv",children:(0,u.jsx)(ad,{toggleDrawer:F,menuIsHidden:T})}),(0,u.jsx)("div",{className:"generalDiv",children:(0,u.jsx)(ic._,{dateAdapter:is,children:(0,u.jsx)(U.T,{lang:d.lang,customRules:ah,translations:M,dateFormatterFunction:$,dateWithTimeFormatterFunction:_,hideBeforeSubmit:d.hideBeforeSubmit,showAfterBlur:d.showAfterBlur,focusToErrorAfterSubmit:d.focusToErrorAfterSubmit,elementFocusHandler:A,children:(0,u.jsx)(t,(0,o.Z)({},r))})})})]})]})}},365:function(e,t,r){"use strict";r.d(t,{O:function(){return n}});var n="/react-validatable-form-demo"},37070:function(){},91811:function(){},69496:function(){},9058:function(){},58694:function(){},71419:function(){},65343:function(){},27177:function(){},66289:function(){},39052:function(){},75042:function(){},46393:function(){},34557:function(){},43496:function(){},20048:function(){},3213:function(){},88980:function(){},52585:function(){},13230:function(){},87475:function(){},9008:function(e,t,r){e.exports=r(83121)},41664:function(e,t,r){e.exports=r(31551)},11163:function(e,t,r){e.exports=r(80880)},4298:function(e,t,r){e.exports=r(63573)},69921:function(e,t){"use strict";/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. diff --git a/_next/static/chunks/pages/advanced/focus-to-error-after-submit-1706721d93e9d7ee.js b/_next/static/chunks/pages/advanced/focus-to-error-after-submit-1706721d93e9d7ee.js new file mode 100644 index 0000000..b09301c --- /dev/null +++ b/_next/static/chunks/pages/advanced/focus-to-error-after-submit-1706721d93e9d7ee.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6753],{23508:function(e,t,r){"use strict";var n=r(91941);t.Z=void 0;var a=n(r(64938)),l=r(85893),i=(0,a.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=i},46948:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/focus-to-error-after-submit",function(){return r(27608)}])},49072:function(e,t,r){"use strict";var n=r(85893),a=r(74065),l=r(29618),i=r(47028),u=r(23508),s=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n instanceof RegExp?(r.push("/"+n.source+"/"),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{expandIcon:(0,n.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(i.Z,{children:(0,n.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,r){"use strict";var n=r(85893),a=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.formData;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,r){"use strict";var n=r(85893),a=r(365);t.Z=function(e){var t,r=e.isValid,l="";return r?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},27608:function(e,t,r){"use strict";r.r(t);var n=r(41799),a=r(69396),l=r(828),i=r(85893),u=r(67294),s=r(64459),o=r(69873),c=r(30612),d=r(75084),f=r(29620),h=r(77745),x=r(75017),v=r(73952),p=r(49072),m=r(2386),j=r(6630),V={textVal1:"",textVal2:"",val3:[],textVal4:"",checkVal:!1},g=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:7}]},{path:"val3",ruleSet:[{rule:"required"},{rule:"listSize",equalTo:2}]},{path:"textVal4",ruleSet:[{rule:"required"},{rule:"url"}]}];t.default=function(){var e=(0,s.c)({rules:g,initialFormData:V,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,r=e.formData,_=e.setPathValue,Z=e.setFormIsSubmitted,b=e.setPathIsBlurred,S=e.getValue,E=e.getError,N=(0,l.Z)((0,u.useState)(!1),2),D=N[0],R=N[1];return(0,i.jsxs)(m.Z,{header:"focusToErrorAfterSubmit",codeUrl:"pages/advanced/focus-to-error-after-submit.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"focusToErrorAfterSubmit"})," parameter is used to automatically focus to the first element with a validation error. In order to find the element on DOM, ",(0,i.jsx)("b",{children:"path"})," value should be equal to the HTML element ID. If DOM element ID is different than ",(0,i.jsx)("b",{children:"path"})," value, then the DOM element ID should be passed as ",(0,i.jsx)("b",{children:"elementId"})," param to the rule definition."]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"formField",children:[(0,i.jsx)(o.Z,{error:!!E("textVal1"),helperText:E("textVal1")||" ",label:"requiredField",type:"text",value:S("textVal1"),onChange:function(e){return _("textVal1",e.target.value)},onBlur:function(){return b("textVal1")},id:"textVal1"}),(0,i.jsx)(o.Z,{error:!!E("textVal2"),helperText:E("textVal2")||" ",label:"requiredAndLengthField",type:"text",value:S("textVal2"),onChange:function(e){return _("textVal2",e.target.value)},onBlur:function(){return b("textVal2")},id:"textVal2"}),(0,i.jsx)(c.Z,{multiple:!0,value:S("val3"),onChange:function(e,t){_("val3",t)},onBlur:function(){return b("val3")},options:x.Y,renderInput:function(e){return(0,i.jsx)(o.Z,(0,a.Z)((0,n.Z)({},e),{error:!!E("val3"),helperText:E("val3")||" ",label:"requiredAndListSize"}))},id:"val3"}),(0,i.jsx)(o.Z,{error:!!E("textVal4"),helperText:E("textVal4")||" ",label:"requiredAndUrl",type:"text",value:S("textVal4"),onChange:function(e){return _("textVal4",e.target.value)},onBlur:function(){return b("textVal4")},id:"textVal4"})]}),(0,i.jsx)("div",{children:(0,i.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){Z()&&R(!0)},children:"Submit Form"})}),(0,i.jsx)(v.Z,{isValid:t}),(0,i.jsx)(p.Z,{currentRules:g})]}),(0,i.jsxs)(f.Z,{open:D,onClose:function(){return R(!1)},children:[(0,i.jsx)(h.Z,{children:"Form Data Submitted"}),(0,i.jsx)(j.Z,{formData:r})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=46948)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/focus-to-error-after-submit-516e87e5e5f04390.js b/_next/static/chunks/pages/advanced/focus-to-error-after-submit-516e87e5e5f04390.js deleted file mode 100644 index 9bf7aaa..0000000 --- a/_next/static/chunks/pages/advanced/focus-to-error-after-submit-516e87e5e5f04390.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6753],{23508:function(e,t,r){"use strict";var n=r(91941);t.Z=void 0;var a=n(r(64938)),l=r(85893),i=(0,a.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=i},46948:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/focus-to-error-after-submit",function(){return r(27608)}])},49072:function(e,t,r){"use strict";var n=r(85893),a=r(74065),l=r(29618),i=r(47028),u=r(23508),s=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n instanceof RegExp?(r.push("/"+n.source+"/"),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{expandIcon:(0,n.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(i.Z,{children:(0,n.jsx)("span",{className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,r){"use strict";var n=r(85893),a=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.formData;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,r){"use strict";var n=r(85893),a=r(365);t.Z=function(e){var t,r=e.isValid,l="";return r?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},27608:function(e,t,r){"use strict";r.r(t);var n=r(41799),a=r(69396),l=r(828),i=r(85893),u=r(67294),s=r(64459),o=r(69873),c=r(30612),d=r(75084),f=r(29620),h=r(77745),x=r(75017),v=r(73952),p=r(49072),m=r(2386),j=r(6630),V={textVal1:"",textVal2:"",val3:[],textVal4:"",checkVal:!1},_=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:7}]},{path:"val3",ruleSet:[{rule:"required"},{rule:"listSize",equalTo:2}]},{path:"textVal4",ruleSet:[{rule:"required"},{rule:"url"}]}];t.default=function(){var e=(0,s.c)({rules:_,initialFormData:V,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,r=e.formData,g=e.setPathValue,Z=e.setFormIsSubmitted,b=e.setPathIsBlurred,S=e.getValue,E=e.getError,N=(0,l.Z)((0,u.useState)(!1),2),D=N[0],R=N[1];return(0,i.jsxs)(m.Z,{header:"focusToErrorAfterSubmit",codeUrl:"pages/advanced/focus-to-error-after-submit.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"focusToErrorAfterSubmit"})," parameter is used to automatically focus to the first element with a validation error. In order to find the element on DOM, ",(0,i.jsx)("b",{children:"path"})," value should be equal to the HTML element ID. If DOM element ID is different than ",(0,i.jsx)("b",{children:"path"})," value, then the DOM element ID should be passed as ",(0,i.jsx)("b",{children:"elementId"})," param to the rule definition."]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"formField",children:[(0,i.jsx)(o.Z,{error:!!E("textVal1"),helperText:E("textVal1")||" ",label:"requiredField",type:"text",value:S("textVal1"),onChange:function(e){return g("textVal1",e.target.value)},onBlur:function(){return b("textVal1")},id:"textVal1"}),(0,i.jsx)(o.Z,{error:!!E("textVal2"),helperText:E("textVal2")||" ",label:"requiredAndLengthField",type:"text",value:S("textVal2"),onChange:function(e){return g("textVal2",e.target.value)},onBlur:function(){return b("textVal2")},id:"textVal2"}),(0,i.jsx)(c.Z,{multiple:!0,value:S("val3"),onChange:function(e,t){g("val3",t)},onBlur:function(){return b("val3")},options:x.Y,renderInput:function(e){return(0,i.jsx)(o.Z,(0,a.Z)((0,n.Z)({},e),{error:!!E("val3"),helperText:E("val3")||" ",label:"requiredAndListSize"}))},id:"val3"}),(0,i.jsx)(o.Z,{error:!!E("textVal4"),helperText:E("textVal4")||" ",label:"requiredAndUrl",type:"text",value:S("textVal4"),onChange:function(e){return g("textVal4",e.target.value)},onBlur:function(){return b("textVal4")},id:"textVal4"})]}),(0,i.jsx)("div",{children:(0,i.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){Z()&&R(!0)},children:"Submit Form"})}),(0,i.jsx)(v.Z,{isValid:t}),(0,i.jsx)(p.Z,{currentRules:_})]}),(0,i.jsxs)(f.Z,{open:D,onClose:function(){return R(!1)},children:[(0,i.jsx)(h.Z,{children:"Form Data Submitted"}),(0,i.jsx)(j.Z,{formData:r})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=46948)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/focus-to-error-on-list-after-submit-00383ae58c8b319c.js b/_next/static/chunks/pages/advanced/focus-to-error-on-list-after-submit-00383ae58c8b319c.js new file mode 100644 index 0000000..d8cda8b --- /dev/null +++ b/_next/static/chunks/pages/advanced/focus-to-error-on-list-after-submit-00383ae58c8b319c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8294],{96540:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var r=i(n(64938)),s=n(85893),l=(0,r.default)((0,s.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=l},41733:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var r=i(n(64938)),s=n(85893),l=(0,r.default)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=l},23508:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var r=i(n(64938)),s=n(85893),l=(0,r.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=l},41441:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/focus-to-error-on-list-after-submit",function(){return n(17179)}])},49072:function(e,t,n){"use strict";var i=n(85893),r=n(74065),s=n(29618),l=n(47028),a=n(23508),c=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(n.push(i),t):i instanceof RegExp?(n.push("/"+i.source+"/"),t):i},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(r.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(a.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,i.jsx)(l.Z,{children:(0,i.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:c(t)})})]})})}},6630:function(e,t,n){"use strict";var i=n(85893),r=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(n.push(i),t):i},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,i.jsx)("div",{children:(0,i.jsx)("span",{className:"formDataString",children:r(t)})})}},73952:function(e,t,n){"use strict";var i=n(85893),r=n(365);t.Z=function(e){var t,n=e.isValid,s="";return n?(t="".concat(r.O,"/valid.png"),s="valid"):(t="".concat(r.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},17179:function(e,t,n){"use strict";n.r(t);var i=n(828),r=n(36305),s=n(85893),l=n(67294),a=n(64459),c=n(69873),o=n(75084),u=n(96540),d=n(41733),h=n(29620),f=n(77745),m=n(73952),v=n(49072),x=n(2386),p=n(6630),j=[{listPath:"listChild",ruleSet:["required",{rule:"length",greaterThan:3}]},{path:"listChild",ruleSet:["required",{rule:"listSize",greaterThan:2}],elementId:"listErrorFocusElement"}];t.default=function(){var e=(0,a.c)({rules:j,initialFormData:{listChild:[""]},hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,_=e.setPathValue,C=e.setFormIsSubmitted,Z=e.setPathIsBlurred,b=e.getValue,g=e.getError,N=(0,i.Z)((0,l.useState)(!1),2),E=N[0],S=N[1],D=null,I=function(){var e=(0,r.Z)(n.listChild);e.push(""),_("listChild",e)},R=function(e){_("listChild",n.listChild.filter(function(t,n){return n!==e}))};return n.listChild&&n.listChild.length>0&&(D=n.listChild.map(function(e,t){return(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Z,{error:!!g("listChild{".concat(t,"}")),helperText:g("listChild{".concat(t,"}"))||" ",label:"lengthGreaterThan3",type:"text",value:b("listChild[".concat(t,"]"))||"",onChange:function(e){return _("listChild[".concat(t,"]"),e.target.value)},onBlur:function(){return Z("listChild{".concat(t,"}"))},id:"listChild{".concat(t,"}")}),(0,s.jsxs)(o.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return R(t)},children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,s.jsx)(d.Z,{className:"myShinkableButtonIcon"})]})]},t)})),(0,s.jsxs)(x.Z,{header:"focusToErrorAfterSubmit on Lists",codeUrl:"pages/advanced/focus-to-error-on-list-after-submit.js",children:[(0,s.jsxs)("p",{className:"infoParagraph",children:[(0,s.jsx)("b",{children:"focusToErrorAfterSubmit"})," parameter is used to automatically focus to the first element of list with validation errors. In order to find the element on DOM, ",(0,s.jsx)("b",{children:"listPath"})," value and index of the list should be equal to the HTML element ID in a format ",(0,s.jsx)("b",{children:"listPath{index}"}),". If DOM list element ID prefix is different than ",(0,s.jsx)("b",{children:"listPath"})," value, then the DOM element ID prefix should be passed as"," ",(0,s.jsx)("b",{children:"listElementId"})," param to the rule definition."]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{children:(0,s.jsxs)(o.Z,{className:"myAddButton",variant:"contained",onClick:function(){return I()},id:"listErrorFocusElement",children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,s.jsx)(u.Z,{className:"myShinkableButtonIcon"})]})}),(0,s.jsx)("div",{className:"formListField",children:D}),(0,s.jsx)("div",{className:"errorInfoText",children:g("listChild")}),(0,s.jsx)("div",{children:(0,s.jsx)(o.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){C()&&S(!0)},children:"Submit Form"})}),(0,s.jsx)(m.Z,{isValid:t}),(0,s.jsx)(v.Z,{currentRules:j})]}),(0,s.jsxs)(h.Z,{open:E,onClose:function(){return S(!1)},children:[(0,s.jsx)(f.Z,{children:"Form Data Submitted"}),(0,s.jsx)(p.Z,{formData:n})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=41441)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/focus-to-error-on-list-after-submit-921b21f319b3fa7f.js b/_next/static/chunks/pages/advanced/focus-to-error-on-list-after-submit-921b21f319b3fa7f.js deleted file mode 100644 index 4933cb1..0000000 --- a/_next/static/chunks/pages/advanced/focus-to-error-on-list-after-submit-921b21f319b3fa7f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8294],{96540:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var r=i(n(64938)),s=n(85893),l=(0,r.default)((0,s.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=l},41733:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var r=i(n(64938)),s=n(85893),l=(0,r.default)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=l},23508:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var r=i(n(64938)),s=n(85893),l=(0,r.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=l},41441:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/focus-to-error-on-list-after-submit",function(){return n(17179)}])},49072:function(e,t,n){"use strict";var i=n(85893),r=n(74065),s=n(29618),l=n(47028),a=n(23508),c=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(n.push(i),t):i instanceof RegExp?(n.push("/"+i.source+"/"),t):i},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(r.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(a.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,i.jsx)(l.Z,{children:(0,i.jsx)("span",{className:"currentRuleString",children:c(t)})})]})})}},6630:function(e,t,n){"use strict";var i=n(85893),r=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(n.push(i),t):i},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,i.jsx)("div",{children:(0,i.jsx)("span",{className:"formDataString",children:r(t)})})}},73952:function(e,t,n){"use strict";var i=n(85893),r=n(365);t.Z=function(e){var t,n=e.isValid,s="";return n?(t="".concat(r.O,"/valid.png"),s="valid"):(t="".concat(r.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},17179:function(e,t,n){"use strict";n.r(t);var i=n(828),r=n(36305),s=n(85893),l=n(67294),a=n(64459),c=n(69873),o=n(75084),u=n(96540),d=n(41733),h=n(29620),f=n(77745),m=n(73952),v=n(49072),x=n(2386),p=n(6630),j=[{listPath:"listChild",ruleSet:["required",{rule:"length",greaterThan:3}]},{path:"listChild",ruleSet:["required",{rule:"listSize",greaterThan:2}],elementId:"listErrorFocusElement"}];t.default=function(){var e=(0,a.c)({rules:j,initialFormData:{listChild:[""]},hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,_=e.setPathValue,C=e.setFormIsSubmitted,Z=e.setPathIsBlurred,b=e.getValue,N=e.getError,g=(0,i.Z)((0,l.useState)(!1),2),E=g[0],S=g[1],D=null,I=function(){var e=(0,r.Z)(n.listChild);e.push(""),_("listChild",e)},R=function(e){_("listChild",n.listChild.filter(function(t,n){return n!==e}))};return n.listChild&&n.listChild.length>0&&(D=n.listChild.map(function(e,t){return(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Z,{error:!!N("listChild{".concat(t,"}")),helperText:N("listChild{".concat(t,"}"))||" ",label:"lengthGreaterThan3",type:"text",value:b("listChild[".concat(t,"]"))||"",onChange:function(e){return _("listChild[".concat(t,"]"),e.target.value)},onBlur:function(){return Z("listChild{".concat(t,"}"))},id:"listChild{".concat(t,"}")}),(0,s.jsxs)(o.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return R(t)},children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,s.jsx)(d.Z,{className:"myShinkableButtonIcon"})]})]},t)})),(0,s.jsxs)(x.Z,{header:"focusToErrorAfterSubmit on Lists",codeUrl:"pages/advanced/focus-to-error-on-list-after-submit.js",children:[(0,s.jsxs)("p",{className:"infoParagraph",children:[(0,s.jsx)("b",{children:"focusToErrorAfterSubmit"})," parameter is used to automatically focus to the first element of list with validation errors. In order to find the element on DOM, ",(0,s.jsx)("b",{children:"listPath"})," value and index of the list should be equal to the HTML element ID in a format ",(0,s.jsx)("b",{children:"listPath{index}"}),". If DOM list element ID prefix is different than ",(0,s.jsx)("b",{children:"listPath"})," value, then the DOM element ID prefix should be passed as"," ",(0,s.jsx)("b",{children:"listElementId"})," param to the rule definition."]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{children:(0,s.jsxs)(o.Z,{className:"myAddButton",variant:"contained",onClick:function(){return I()},id:"listErrorFocusElement",children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,s.jsx)(u.Z,{className:"myShinkableButtonIcon"})]})}),(0,s.jsx)("div",{className:"formListField",children:D}),(0,s.jsx)("div",{className:"errorInfoText",children:N("listChild")}),(0,s.jsx)("div",{children:(0,s.jsx)(o.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){C()&&S(!0)},children:"Submit Form"})}),(0,s.jsx)(m.Z,{isValid:t}),(0,s.jsx)(v.Z,{currentRules:j})]}),(0,s.jsxs)(h.Z,{open:E,onClose:function(){return S(!1)},children:[(0,s.jsx)(f.Z,{children:"Form Data Submitted"}),(0,s.jsx)(p.Z,{formData:n})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=41441)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/hide-before-submit-1e6ecf76d97b64f2.js b/_next/static/chunks/pages/advanced/hide-before-submit-1e6ecf76d97b64f2.js new file mode 100644 index 0000000..f6e13e1 --- /dev/null +++ b/_next/static/chunks/pages/advanced/hide-before-submit-1e6ecf76d97b64f2.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5102],{23508:function(e,t,r){"use strict";var n=r(91941);t.Z=void 0;var a=n(r(64938)),i=r(85893),l=(0,a.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=l},72358:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/hide-before-submit",function(){return r(82213)}])},49072:function(e,t,r){"use strict";var n=r(85893),a=r(74065),i=r(29618),l=r(47028),s=r(23508),u=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n instanceof RegExp?(r.push("/"+n.source+"/"),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(i.Z,{expandIcon:(0,n.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,r){"use strict";var n=r(85893),a=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.formData;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,r){"use strict";var n=r(85893),a=r(365);t.Z=function(e){var t,r=e.isValid,i="";return r?(t="".concat(a.O,"/valid.png"),i="valid"):(t="".concat(a.O,"/invalid.png"),i="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:i})]})}},75017:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},82213:function(e,t,r){"use strict";r.r(t);var n=r(41799),a=r(69396),i=r(828),l=r(85893),s=r(67294),u=r(64459),c=r(69873),o=r(30612),d=r(75084),h=r(29620),x=r(77745),f=r(75017),v=r(73952),p=r(49072),m=r(2386),j=r(6630),g={textVal1:"",textVal2:"",val3:[],textVal4:"",checkVal:!1},_=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:7}]},{path:"val3",ruleSet:[{rule:"required"},{rule:"listSize",equalTo:2}]},{path:"textVal4",ruleSet:[{rule:"required"},{rule:"url"}]}];t.default=function(){var e=(0,u.c)({rules:_,initialFormData:g,hideBeforeSubmit:!0}),t=e.isValid,r=e.formData,b=e.setPathValue,V=e.setFormIsSubmitted,Z=e.resetForm,S=e.getValue,N=e.getError,R=(0,i.Z)((0,s.useState)(!1),2),E=R[0],C=R[1];return(0,l.jsxs)(m.Z,{header:"hideBeforeSubmit",codeUrl:"pages/advanced/hide-before-submit.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:"hideBeforeSubmit"})," parameter is used to hide validation errors before ",(0,l.jsx)("b",{children:"setFormIsSubmitted()"})," ","function is called. Later, validation errors can also be hidden by calling ",(0,l.jsx)("b",{children:"resetForm()"})," function."]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"formField",children:[(0,l.jsx)(c.Z,{error:!!N("textVal1"),helperText:N("textVal1")||" ",label:"requiredField",type:"text",value:S("textVal1"),onChange:function(e){return b("textVal1",e.target.value)}}),(0,l.jsx)(c.Z,{error:!!N("textVal2"),helperText:N("textVal2")||" ",label:"requiredAndLengthField",type:"text",value:S("textVal2"),onChange:function(e){return b("textVal2",e.target.value)}}),(0,l.jsx)(o.Z,{multiple:!0,value:S("val3"),onChange:function(e,t){b("val3",t)},options:f.Y,renderInput:function(e){return(0,l.jsx)(c.Z,(0,a.Z)((0,n.Z)({},e),{error:!!N("val3"),helperText:N("val3")||" ",label:"requiredAndListSize"}))}}),(0,l.jsx)(c.Z,{error:!!N("textVal4"),helperText:N("textVal4")||" ",label:"requiredAndUrl",type:"text",value:S("textVal4"),onChange:function(e){return b("textVal4",e.target.value)}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){V()&&C(!0)},children:"Submit Form"}),(0,l.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:Z,children:"Reset Form"})]}),(0,l.jsx)(v.Z,{isValid:t}),(0,l.jsx)(p.Z,{currentRules:_})]}),(0,l.jsxs)(h.Z,{open:E,onClose:function(){return C(!1)},children:[(0,l.jsx)(x.Z,{children:"Form Data Submitted"}),(0,l.jsx)(j.Z,{formData:r})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=72358)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/hide-before-submit-60aa3ace5b48cd68.js b/_next/static/chunks/pages/advanced/hide-before-submit-60aa3ace5b48cd68.js deleted file mode 100644 index 3fbf70e..0000000 --- a/_next/static/chunks/pages/advanced/hide-before-submit-60aa3ace5b48cd68.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5102],{23508:function(e,t,r){"use strict";var n=r(91941);t.Z=void 0;var a=n(r(64938)),i=r(85893),l=(0,a.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=l},72358:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/hide-before-submit",function(){return r(82213)}])},49072:function(e,t,r){"use strict";var n=r(85893),a=r(74065),i=r(29618),l=r(47028),s=r(23508),u=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n instanceof RegExp?(r.push("/"+n.source+"/"),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(i.Z,{expandIcon:(0,n.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)("span",{className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,r){"use strict";var n=r(85893),a=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.formData;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,r){"use strict";var n=r(85893),a=r(365);t.Z=function(e){var t,r=e.isValid,i="";return r?(t="".concat(a.O,"/valid.png"),i="valid"):(t="".concat(a.O,"/invalid.png"),i="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:i})]})}},75017:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},82213:function(e,t,r){"use strict";r.r(t);var n=r(41799),a=r(69396),i=r(828),l=r(85893),s=r(67294),u=r(64459),c=r(69873),o=r(30612),d=r(75084),h=r(29620),x=r(77745),f=r(75017),v=r(73952),p=r(49072),m=r(2386),j=r(6630),g={textVal1:"",textVal2:"",val3:[],textVal4:"",checkVal:!1},_=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:7}]},{path:"val3",ruleSet:[{rule:"required"},{rule:"listSize",equalTo:2}]},{path:"textVal4",ruleSet:[{rule:"required"},{rule:"url"}]}];t.default=function(){var e=(0,u.c)({rules:_,initialFormData:g,hideBeforeSubmit:!0}),t=e.isValid,r=e.formData,b=e.setPathValue,V=e.setFormIsSubmitted,Z=e.resetForm,S=e.getValue,N=e.getError,R=(0,i.Z)((0,s.useState)(!1),2),E=R[0],C=R[1];return(0,l.jsxs)(m.Z,{header:"hideBeforeSubmit",codeUrl:"pages/advanced/hide-before-submit.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:"hideBeforeSubmit"})," parameter is used to hide validation errors before ",(0,l.jsx)("b",{children:"setFormIsSubmitted()"})," ","function is called. Later, validation errors can also be hidden by calling ",(0,l.jsx)("b",{children:"resetForm()"})," function."]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"formField",children:[(0,l.jsx)(c.Z,{error:!!N("textVal1"),helperText:N("textVal1")||" ",label:"requiredField",type:"text",value:S("textVal1"),onChange:function(e){return b("textVal1",e.target.value)}}),(0,l.jsx)(c.Z,{error:!!N("textVal2"),helperText:N("textVal2")||" ",label:"requiredAndLengthField",type:"text",value:S("textVal2"),onChange:function(e){return b("textVal2",e.target.value)}}),(0,l.jsx)(o.Z,{multiple:!0,value:S("val3"),onChange:function(e,t){b("val3",t)},options:f.Y,renderInput:function(e){return(0,l.jsx)(c.Z,(0,a.Z)((0,n.Z)({},e),{error:!!N("val3"),helperText:N("val3")||" ",label:"requiredAndListSize"}))}}),(0,l.jsx)(c.Z,{error:!!N("textVal4"),helperText:N("textVal4")||" ",label:"requiredAndUrl",type:"text",value:S("textVal4"),onChange:function(e){return b("textVal4",e.target.value)}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){V()&&C(!0)},children:"Submit Form"}),(0,l.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:Z,children:"Reset Form"})]}),(0,l.jsx)(v.Z,{isValid:t}),(0,l.jsx)(p.Z,{currentRules:_})]}),(0,l.jsxs)(h.Z,{open:E,onClose:function(){return C(!1)},children:[(0,l.jsx)(x.Z,{children:"Form Data Submitted"}),(0,l.jsx)(j.Z,{formData:r})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=72358)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/show-after-blur-4b5ab9767fc2befd.js b/_next/static/chunks/pages/advanced/show-after-blur-4b5ab9767fc2befd.js deleted file mode 100644 index 6655fac..0000000 --- a/_next/static/chunks/pages/advanced/show-after-blur-4b5ab9767fc2befd.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3331],{23508:function(e,t,r){"use strict";var n=r(91941);t.Z=void 0;var a=n(r(64938)),i=r(85893),l=(0,a.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=l},1907:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/show-after-blur",function(){return r(78561)}])},49072:function(e,t,r){"use strict";var n=r(85893),a=r(74065),i=r(29618),l=r(47028),u=r(23508),s=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n instanceof RegExp?(r.push("/"+n.source+"/"),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(i.Z,{expandIcon:(0,n.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)("span",{className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,r){"use strict";var n=r(85893),a=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.formData;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,r){"use strict";var n=r(85893),a=r(365);t.Z=function(e){var t,r=e.isValid,i="";return r?(t="".concat(a.O,"/valid.png"),i="valid"):(t="".concat(a.O,"/invalid.png"),i="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:i})]})}},75017:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},78561:function(e,t,r){"use strict";r.r(t);var n=r(41799),a=r(69396),i=r(828),l=r(85893),u=r(67294),s=r(64459),o=r(69873),c=r(30612),d=r(75084),h=r(29620),x=r(77745),f=r(75017),v=r(73952),p=r(49072),m=r(2386),j=r(6630),g={},_=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:7}]},{path:"val3",ruleSet:[{rule:"required"},{rule:"listSize",equalTo:2}]},{path:"textVal4",ruleSet:[{rule:"required"},{rule:"url"}]}];t.default=function(){var e=(0,s.c)({rules:_,initialFormData:g,hideBeforeSubmit:!0,showAfterBlur:!0}),t=e.isValid,r=e.formData,V=e.setPathValue,Z=e.setFormIsSubmitted,b=e.setPathIsBlurred,N=e.resetForm,S=e.getValue,R=e.getError,E=(0,i.Z)((0,u.useState)(!1),2),A=E[0],w=E[1];return(0,l.jsxs)(m.Z,{header:"showAfterBlur",codeUrl:"pages/advanced/show-after-blur.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:"showAfterBlur"})," parameter is used to show validation error of a path after"," ",(0,l.jsx)("b",{children:"setPathIsBlurred(path)"})," function is called. Later, validation errors can also be hidden by calling"," ",(0,l.jsx)("b",{children:"resetForm()"})," function."]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"formField",children:[(0,l.jsx)(o.Z,{id:"textVal1",error:!!R("textVal1"),helperText:R("textVal1")||" ",label:"requiredField",type:"text",value:S("textVal1")||"",onChange:function(e){return V("textVal1",e.target.value)},onBlur:function(){return b("textVal1")}}),(0,l.jsx)(o.Z,{id:"textVal2",error:!!R("textVal2"),helperText:R("textVal2")||" ",label:"requiredAndLengthField",type:"text",value:S("textVal2")||"",onChange:function(e){return V("textVal2",e.target.value)},onBlur:function(){return b("textVal2")}}),(0,l.jsx)(c.Z,{id:"val3",multiple:!0,value:S("val3")||[],onChange:function(e,t){V("val3",t)},onBlur:function(){return b("val3")},options:f.Y,renderInput:function(e){return(0,l.jsx)(o.Z,(0,a.Z)((0,n.Z)({},e),{error:!!R("val3"),helperText:R("val3")||" ",label:"requiredAndListSize"}))}}),(0,l.jsx)(o.Z,{id:"textVal4",error:!!R("textVal4"),helperText:R("textVal4")||" ",label:"requiredAndUrl",type:"text",value:S("textVal4")||"",onChange:function(e){return V("textVal4",e.target.value)},onBlur:function(){return b("textVal4")}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){Z()&&w(!0)},children:"Submit Form"}),(0,l.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:N,children:"Reset Form"})]}),(0,l.jsx)(v.Z,{isValid:t}),(0,l.jsx)(p.Z,{currentRules:_})]}),(0,l.jsxs)(h.Z,{open:A,onClose:function(){return w(!1)},children:[(0,l.jsx)(x.Z,{children:"Form Data Submitted"}),(0,l.jsx)(j.Z,{formData:r})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=1907)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/show-after-blur-9fd918f657e0bc35.js b/_next/static/chunks/pages/advanced/show-after-blur-9fd918f657e0bc35.js new file mode 100644 index 0000000..2f9b900 --- /dev/null +++ b/_next/static/chunks/pages/advanced/show-after-blur-9fd918f657e0bc35.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3331],{23508:function(e,t,r){"use strict";var n=r(91941);t.Z=void 0;var a=n(r(64938)),i=r(85893),l=(0,a.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=l},1907:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/show-after-blur",function(){return r(78561)}])},49072:function(e,t,r){"use strict";var n=r(85893),a=r(74065),i=r(29618),l=r(47028),u=r(23508),s=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n instanceof RegExp?(r.push("/"+n.source+"/"),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(i.Z,{expandIcon:(0,n.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(l.Z,{children:(0,n.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,r){"use strict";var n=r(85893),a=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.formData;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,r){"use strict";var n=r(85893),a=r(365);t.Z=function(e){var t,r=e.isValid,i="";return r?(t="".concat(a.O,"/valid.png"),i="valid"):(t="".concat(a.O,"/invalid.png"),i="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:i})]})}},75017:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},78561:function(e,t,r){"use strict";r.r(t);var n=r(41799),a=r(69396),i=r(828),l=r(85893),u=r(67294),s=r(64459),o=r(69873),c=r(30612),d=r(75084),h=r(29620),x=r(77745),f=r(75017),v=r(73952),p=r(49072),m=r(2386),j=r(6630),g={},_=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:7}]},{path:"val3",ruleSet:[{rule:"required"},{rule:"listSize",equalTo:2}]},{path:"textVal4",ruleSet:[{rule:"required"},{rule:"url"}]}];t.default=function(){var e=(0,s.c)({rules:_,initialFormData:g,hideBeforeSubmit:!0,showAfterBlur:!0}),t=e.isValid,r=e.formData,V=e.setPathValue,Z=e.setFormIsSubmitted,b=e.setPathIsBlurred,N=e.resetForm,S=e.getValue,R=e.getError,E=(0,i.Z)((0,u.useState)(!1),2),A=E[0],w=E[1];return(0,l.jsxs)(m.Z,{header:"showAfterBlur",codeUrl:"pages/advanced/show-after-blur.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:"showAfterBlur"})," parameter is used to show validation error of a path after"," ",(0,l.jsx)("b",{children:"setPathIsBlurred(path)"})," function is called. Later, validation errors can also be hidden by calling"," ",(0,l.jsx)("b",{children:"resetForm()"})," function."]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"formField",children:[(0,l.jsx)(o.Z,{id:"textVal1",error:!!R("textVal1"),helperText:R("textVal1")||" ",label:"requiredField",type:"text",value:S("textVal1")||"",onChange:function(e){return V("textVal1",e.target.value)},onBlur:function(){return b("textVal1")}}),(0,l.jsx)(o.Z,{id:"textVal2",error:!!R("textVal2"),helperText:R("textVal2")||" ",label:"requiredAndLengthField",type:"text",value:S("textVal2")||"",onChange:function(e){return V("textVal2",e.target.value)},onBlur:function(){return b("textVal2")}}),(0,l.jsx)(c.Z,{id:"val3",multiple:!0,value:S("val3")||[],onChange:function(e,t){V("val3",t)},onBlur:function(){return b("val3")},options:f.Y,renderInput:function(e){return(0,l.jsx)(o.Z,(0,a.Z)((0,n.Z)({},e),{error:!!R("val3"),helperText:R("val3")||" ",label:"requiredAndListSize"}))}}),(0,l.jsx)(o.Z,{id:"textVal4",error:!!R("textVal4"),helperText:R("textVal4")||" ",label:"requiredAndUrl",type:"text",value:S("textVal4")||"",onChange:function(e){return V("textVal4",e.target.value)},onBlur:function(){return b("textVal4")}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){Z()&&w(!0)},children:"Submit Form"}),(0,l.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:N,children:"Reset Form"})]}),(0,l.jsx)(v.Z,{isValid:t}),(0,l.jsx)(p.Z,{currentRules:_})]}),(0,l.jsxs)(h.Z,{open:A,onClose:function(){return w(!1)},children:[(0,l.jsx)(x.Z,{children:"Form Data Submitted"}),(0,l.jsx)(j.Z,{formData:r})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=1907)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/validate-complex-forms-3bc4d73787068bad.js b/_next/static/chunks/pages/advanced/validate-complex-forms-3bc4d73787068bad.js deleted file mode 100644 index 0caa50d..0000000 --- a/_next/static/chunks/pages/advanced/validate-complex-forms-3bc4d73787068bad.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1879],{96540:function(e,t,n){"use strict";var l=n(91941);t.Z=void 0;var r=l(n(64938)),u=n(85893),i=(0,r.default)((0,u.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=i},41733:function(e,t,n){"use strict";var l=n(91941);t.Z=void 0;var r=l(n(64938)),u=n(85893),i=(0,r.default)((0,u.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=i},23508:function(e,t,n){"use strict";var l=n(91941);t.Z=void 0;var r=l(n(64938)),u=n(85893),i=(0,r.default)((0,u.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=i},56295:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/validate-complex-forms",function(){return n(25249)}])},49072:function(e,t,n){"use strict";var l=n(85893),r=n(74065),u=n(29618),i=n(47028),o=n(23508),a=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,l){return"function"==typeof l?(n.push(l),t):l instanceof RegExp?(n.push("/"+l.source+"/"),t):l},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,l.jsx)("div",{className:"currentRuleInfoDiv",children:(0,l.jsxs)(r.Z,{children:[(0,l.jsx)(u.Z,{expandIcon:(0,l.jsx)(o.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,l.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,l.jsx)(i.Z,{children:(0,l.jsx)("span",{className:"currentRuleString",children:a(t)})})]})})}},6630:function(e,t,n){"use strict";var l=n(85893),r=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,l){return"function"==typeof l?(n.push(l),t):l},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,l.jsx)("div",{children:(0,l.jsx)("span",{className:"formDataString",children:r(t)})})}},73952:function(e,t,n){"use strict";var l=n(85893),r=n(365);t.Z=function(e){var t,n=e.isValid,u="";return n?(t="".concat(r.O,"/valid.png"),u="valid"):(t="".concat(r.O,"/invalid.png"),u="invalid"),(0,l.jsxs)("div",{className:"validationResultDiv",children:[(0,l.jsx)("span",{children:"Validation Result: "}),(0,l.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,l.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:u})]})}},25249:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var l=n(41799),r=n(828),u=n(36305),i=n(85893),o=n(67294),a=n(64459),s=n(31362),d=n(69873),c=n(75084),h=n(96540),m=n(41733),b=n(29620),f=n(77745),p=n(73952),x=n(49072),v=n(2386),C=n(6630),g=function(e){var t=e.setPathValue,n=e.setPathIsBlurred,l=e.getValue,r=e.getError;return(0,i.jsx)("div",{children:(0,i.jsxs)("div",{className:"formField",children:[(0,i.jsx)(d.Z,{error:!!r("subComponentElement1"),helperText:r("subComponentElement1")||" ",label:"subComponentElement1",type:"text",value:l("subComponentElement1")||"",onChange:function(e){return t("subComponentElement1",e.target.value)},onBlur:function(){return n("subComponentElement1")},id:"subComponentElement1"}),(0,i.jsx)(d.Z,{error:!!r("subComponentElement2"),helperText:r("subComponentElement2")||" ",label:"subComponentElement2",type:"text",value:l("subComponentElement2")||"",onChange:function(e){return t("subComponentElement2",e.target.value)},onBlur:function(){return n("subComponentElement2")},id:"subComponentElement2"})]})})},j=[{path:"autonomousChild1",ruleSet:["required"]},{path:"autonomousChild2",ruleSet:["required"]}],E=(0,o.forwardRef)(function(e,t){var n=e.handleAutonomousFormDataIsChanged,l=e.handleAutonomousIsValidChanged,r=(0,a.c)({rules:j,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),u=r.isValid,s=r.formData,c=r.setFormIsSubmitted,h=r.setPathValue,m=r.setPathIsBlurred,b=r.getValue,f=r.getError;return(0,o.useEffect)(function(){n(s)},[s]),(0,o.useEffect)(function(){l(u)},[u]),(0,o.useImperativeHandle)(t,function(){return{handleSetFormIsSubmitted:function(){c()}}}),(0,i.jsx)("div",{children:(0,i.jsxs)("div",{className:"formField",children:[(0,i.jsx)(d.Z,{error:!!f("autonomousChild1"),helperText:f("autonomousChild1")||" ",label:"autonomousChild1",type:"text",value:b("autonomousChild1")||"",onChange:function(e){return h("autonomousChild1",e.target.value)},onBlur:function(){return m("autonomousChild1")},id:"autonomousChild1"}),(0,i.jsx)(d.Z,{error:!!f("autonomousChild2"),helperText:f("autonomousChild2")||" ",label:"autonomousChild2",type:"text",value:b("autonomousChild2")||"",onChange:function(e){return h("autonomousChild2",e.target.value)},onBlur:function(){return m("autonomousChild2")},id:"autonomousChild2"})]})})}),S=function(e,t){return e.disableAllSubkey2Rule||e.listChild[t].disableSubkey2Rule},y=[{path:"child1",ruleSet:["required"]},{path:"child2",ruleSet:["required"]},{path:"child3.subchild1",ruleSet:["required"]},{path:"child3.subchild2",ruleSet:["required"]},{listPath:"listChild",subRules:[{path:"subkey1",ruleSet:["required",{rule:"length",greaterThan:3}]},{path:"subkey2",ruleSet:[{rule:"required",disableIf:S},{rule:"number",greaterThan:5,disableIf:S}]}],dependantPaths:["disableAllSubkey2Rule"]},{path:"listChild",ruleSet:[{rule:"required",customMessage:"This list should not be empty"},{rule:"listSize",greaterThan:2}],elementId:"listErrorFocusElement"},{path:"bottomElement1",ruleSet:["required"]},{path:"bottomElement2",ruleSet:[{rule:"length",greaterThan:3,applyToNulls:!0}]},{path:"subComponentElement1",ruleSet:["required"]},{path:"subComponentElement2",ruleSet:["required"]}],Z=function(){var e=(0,a.c)({rules:y,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,j=e.setPathValue,S=e.setFormIsSubmitted,Z=e.setPathIsBlurred,k=e.getValue,N=e.getError,_=(0,r.Z)((0,o.useState)(1),2),B=_[0],R=_[1],T=(0,r.Z)((0,o.useState)(!1),2),I=T[0],A=T[1],V=(0,r.Z)((0,o.useState)({}),2),F=V[0],D=V[1],P=(0,r.Z)((0,o.useState)(!1),2),q=P[0],w=P[1],L=(0,o.useRef)(),O=function(e){j("listChild",n.listChild.filter(function(t){return t.id!==e}))},H=null;return n.listChild&&n.listChild.length>0&&(H=n.listChild.map(function(e,t){return(0,i.jsxs)("div",{className:"formListItem",children:[(0,i.jsx)(d.Z,{error:!!N("listChild{".concat(t,"}.subkey1")),helperText:N("listChild{".concat(t,"}.subkey1"))||" ",label:"lengthGreaterThan3",type:"text",value:k("listChild[".concat(t,"].subkey1"))||"",onChange:function(e){return j("listChild[".concat(t,"].subkey1"),e.target.value)},onBlur:function(){return Z("listChild{".concat(t,"}.subkey1"))},id:"listChild{".concat(t,"}.subkey1")}),(0,i.jsx)(d.Z,{error:!!N("listChild{".concat(t,"}.subkey2")),helperText:N("listChild{".concat(t,"}.subkey2"))||" ",label:"numberGreaterThan5",type:"number",value:k("listChild[".concat(t,"].subkey2"))||"",onChange:function(e){return j("listChild[".concat(t,"].subkey2"),e.target.value)},onBlur:function(){return Z("listChild{".concat(t,"}.subkey2"))},id:"listChild{".concat(t,"}.subkey2")}),"disable",(0,i.jsx)(s.Z,{checked:k("listChild[".concat(t,"].disableSubkey2Rule"))||!1,onChange:function(e){return j("listChild[".concat(t,"].disableSubkey2Rule"),e.target.checked)}}),(0,i.jsxs)(c.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return O(e.id)},children:[(0,i.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,i.jsx)(m.Z,{className:"myShinkableButtonIcon"})]})]},e.id)})),(0,i.jsxs)(v.Z,{header:"Validate Complex Forms",codeUrl:["pages/advanced/validate-complex-forms.js","components/SubComponent.js","components/AdvancedSubAutonomousComponent.js"],children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"react-validatable-form"})," can handle validation of complex forms. The form can have multiple paths, listPaths and subcomponents."]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(E,{ref:L,handleAutonomousFormDataIsChanged:function(e){D(e)},handleAutonomousIsValidChanged:function(e){w(e)}}),(0,i.jsxs)("div",{className:"formField",children:[(0,i.jsx)(d.Z,{error:!!N("child1"),helperText:N("child1")||" ",label:"child1",type:"text",value:k("child1")||"",onChange:function(e){return j("child1",e.target.value)},onBlur:function(){return Z("child1")},id:"child1"}),(0,i.jsx)(d.Z,{error:!!N("child2"),helperText:N("child2")||" ",label:"child2",type:"text",value:k("child2")||"",onChange:function(e){return j("child2",e.target.value)},onBlur:function(){return Z("child2")},id:"child2"}),(0,i.jsx)(d.Z,{error:!!N("child3.subchild1"),helperText:N("child3.subchild1")||" ",label:"child3.subchild1",type:"text",value:k("child3.subchild1")||"",onChange:function(e){return j("child3.subchild1",e.target.value)},onBlur:function(){return Z("child3.subchild1")},id:"child3.subchild1"}),(0,i.jsx)(d.Z,{error:!!N("child3.subchild2"),helperText:N("child3.subchild2")||" ",label:"child3.subchild2",type:"text",value:k("child3.subchild2")||"",onChange:function(e){return j("child3.subchild2",e.target.value)},onBlur:function(){return Z("child3.subchild2")},id:"child3.subchild2"})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)(c.Z,{className:"myAddButton",variant:"contained",onClick:function(){var e=n.listChild?(0,u.Z)(n.listChild):[];e.push({id:B}),R(B+1),j("listChild",e)},id:"listErrorFocusElement",children:[(0,i.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,i.jsx)(h.Z,{className:"myShinkableButtonIcon"})]}),(0,i.jsx)("span",{style:{marginLeft:10},children:"disable all subkey2 rows"}),(0,i.jsx)(s.Z,{checked:k("disableAllSubkey2Rule")||!1,onChange:function(e){return j("disableAllSubkey2Rule",e.target.checked)}})]}),(0,i.jsx)("div",{className:"complexFormListField",children:H}),(0,i.jsx)("div",{className:"errorInfoText",children:N("listChild")}),(0,i.jsxs)("div",{className:"formField",children:[(0,i.jsx)(d.Z,{error:!!N("bottomElement1"),helperText:N("bottomElement1")||" ",label:"bottomElement1",type:"text",value:k("bottomElement1")||"",onChange:function(e){return j("bottomElement1",e.target.value)},onBlur:function(){return Z("bottomElement1")},id:"bottomElement1"}),(0,i.jsx)(d.Z,{error:!!N("bottomElement2"),helperText:N("bottomElement2")||" ",label:"bottomElement2",type:"text",value:k("bottomElement2")||"",onChange:function(e){return j("bottomElement2",e.target.value)},onBlur:function(){return Z("bottomElement2")},id:"bottomElement2"})]}),(0,i.jsx)(g,{getValue:k,getError:N,formData:n,setPathValue:j,setPathIsBlurred:Z}),(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){var e=S();L.current.handleSetFormIsSubmitted(),e&&q&&A(!0)},children:"Submit Form"})}),(0,i.jsx)(p.Z,{isValid:t}),(0,i.jsx)(x.Z,{currentRules:y})]}),(0,i.jsxs)(b.Z,{open:I,onClose:function(){return A(!1)},children:[(0,i.jsx)(f.Z,{children:"Form Data Submitted"}),(0,i.jsx)(C.Z,{formData:(0,l.Z)({},n,F)})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=56295)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/validate-complex-forms-fd5c212ac13507e0.js b/_next/static/chunks/pages/advanced/validate-complex-forms-fd5c212ac13507e0.js new file mode 100644 index 0000000..3539227 --- /dev/null +++ b/_next/static/chunks/pages/advanced/validate-complex-forms-fd5c212ac13507e0.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1879],{96540:function(e,t,n){"use strict";var l=n(91941);t.Z=void 0;var r=l(n(64938)),i=n(85893),u=(0,r.default)((0,i.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=u},41733:function(e,t,n){"use strict";var l=n(91941);t.Z=void 0;var r=l(n(64938)),i=n(85893),u=(0,r.default)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=u},23508:function(e,t,n){"use strict";var l=n(91941);t.Z=void 0;var r=l(n(64938)),i=n(85893),u=(0,r.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=u},56295:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/validate-complex-forms",function(){return n(25249)}])},49072:function(e,t,n){"use strict";var l=n(85893),r=n(74065),i=n(29618),u=n(47028),o=n(23508),a=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,l){return"function"==typeof l?(n.push(l),t):l instanceof RegExp?(n.push("/"+l.source+"/"),t):l},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,l.jsx)("div",{className:"currentRuleInfoDiv",children:(0,l.jsxs)(r.Z,{children:[(0,l.jsx)(i.Z,{expandIcon:(0,l.jsx)(o.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,l.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,l.jsx)(u.Z,{children:(0,l.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:a(t)})})]})})}},6630:function(e,t,n){"use strict";var l=n(85893),r=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,l){return"function"==typeof l?(n.push(l),t):l},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,l.jsx)("div",{children:(0,l.jsx)("span",{className:"formDataString",children:r(t)})})}},73952:function(e,t,n){"use strict";var l=n(85893),r=n(365);t.Z=function(e){var t,n=e.isValid,i="";return n?(t="".concat(r.O,"/valid.png"),i="valid"):(t="".concat(r.O,"/invalid.png"),i="invalid"),(0,l.jsxs)("div",{className:"validationResultDiv",children:[(0,l.jsx)("span",{children:"Validation Result: "}),(0,l.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,l.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:i})]})}},25249:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Z}});var l=n(41799),r=n(828),i=n(36305),u=n(85893),o=n(67294),a=n(64459),s=n(31362),d=n(69873),c=n(75084),h=n(96540),m=n(41733),b=n(29620),f=n(77745),p=n(73952),x=n(49072),v=n(2386),C=n(6630),g=function(e){var t=e.setPathValue,n=e.setPathIsBlurred,l=e.getValue,r=e.getError;return(0,u.jsx)("div",{children:(0,u.jsxs)("div",{className:"formField",children:[(0,u.jsx)(d.Z,{error:!!r("subComponentElement1"),helperText:r("subComponentElement1")||" ",label:"subComponentElement1",type:"text",value:l("subComponentElement1")||"",onChange:function(e){return t("subComponentElement1",e.target.value)},onBlur:function(){return n("subComponentElement1")},id:"subComponentElement1"}),(0,u.jsx)(d.Z,{error:!!r("subComponentElement2"),helperText:r("subComponentElement2")||" ",label:"subComponentElement2",type:"text",value:l("subComponentElement2")||"",onChange:function(e){return t("subComponentElement2",e.target.value)},onBlur:function(){return n("subComponentElement2")},id:"subComponentElement2"})]})})},j=[{path:"autonomousChild1",ruleSet:["required"]},{path:"autonomousChild2",ruleSet:["required"]}],E=(0,o.forwardRef)(function(e,t){var n=e.handleAutonomousFormDataIsChanged,l=e.handleAutonomousIsValidChanged,r=(0,a.c)({rules:j,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),i=r.isValid,s=r.formData,c=r.setFormIsSubmitted,h=r.setPathValue,m=r.setPathIsBlurred,b=r.getValue,f=r.getError;return(0,o.useEffect)(function(){n(s)},[s]),(0,o.useEffect)(function(){l(i)},[i]),(0,o.useImperativeHandle)(t,function(){return{handleSetFormIsSubmitted:function(){c()}}}),(0,u.jsx)("div",{children:(0,u.jsxs)("div",{className:"formField",children:[(0,u.jsx)(d.Z,{error:!!f("autonomousChild1"),helperText:f("autonomousChild1")||" ",label:"autonomousChild1",type:"text",value:b("autonomousChild1")||"",onChange:function(e){return h("autonomousChild1",e.target.value)},onBlur:function(){return m("autonomousChild1")},id:"autonomousChild1"}),(0,u.jsx)(d.Z,{error:!!f("autonomousChild2"),helperText:f("autonomousChild2")||" ",label:"autonomousChild2",type:"text",value:b("autonomousChild2")||"",onChange:function(e){return h("autonomousChild2",e.target.value)},onBlur:function(){return m("autonomousChild2")},id:"autonomousChild2"})]})})}),S=function(e,t){return e.disableAllSubkey2Rule||e.listChild[t].disableSubkey2Rule},y=[{path:"child1",ruleSet:["required"]},{path:"child2",ruleSet:["required"]},{path:"child3.subchild1",ruleSet:["required"]},{path:"child3.subchild2",ruleSet:["required"]},{listPath:"listChild",subRules:[{path:"subkey1",ruleSet:["required",{rule:"length",greaterThan:3}]},{path:"subkey2",ruleSet:[{rule:"required",disableIf:S},{rule:"number",greaterThan:5,disableIf:S}]}],dependantPaths:["disableAllSubkey2Rule"]},{path:"listChild",ruleSet:[{rule:"required",customMessage:"This list should not be empty"},{rule:"listSize",greaterThan:2}],elementId:"listErrorFocusElement"},{path:"bottomElement1",ruleSet:["required"]},{path:"bottomElement2",ruleSet:[{rule:"length",greaterThan:3,applyToNulls:!0}]},{path:"subComponentElement1",ruleSet:["required"]},{path:"subComponentElement2",ruleSet:["required"]}],Z=function(){var e=(0,a.c)({rules:y,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,j=e.setPathValue,S=e.setFormIsSubmitted,Z=e.setPathIsBlurred,k=e.getValue,N=e.getError,_=(0,r.Z)((0,o.useState)(1),2),B=_[0],R=_[1],T=(0,r.Z)((0,o.useState)(!1),2),I=T[0],A=T[1],V=(0,r.Z)((0,o.useState)({}),2),F=V[0],D=V[1],P=(0,r.Z)((0,o.useState)(!1),2),q=P[0],w=P[1],L=(0,o.useRef)(),O=function(e){j("listChild",n.listChild.filter(function(t){return t.id!==e}))},H=null;return n.listChild&&n.listChild.length>0&&(H=n.listChild.map(function(e,t){return(0,u.jsxs)("div",{className:"formListItem",children:[(0,u.jsx)(d.Z,{error:!!N("listChild{".concat(t,"}.subkey1")),helperText:N("listChild{".concat(t,"}.subkey1"))||" ",label:"lengthGreaterThan3",type:"text",value:k("listChild[".concat(t,"].subkey1"))||"",onChange:function(e){return j("listChild[".concat(t,"].subkey1"),e.target.value)},onBlur:function(){return Z("listChild{".concat(t,"}.subkey1"))},id:"listChild{".concat(t,"}.subkey1")}),(0,u.jsx)(d.Z,{error:!!N("listChild{".concat(t,"}.subkey2")),helperText:N("listChild{".concat(t,"}.subkey2"))||" ",label:"numberGreaterThan5",type:"number",value:k("listChild[".concat(t,"].subkey2"))||"",onChange:function(e){return j("listChild[".concat(t,"].subkey2"),e.target.value)},onBlur:function(){return Z("listChild{".concat(t,"}.subkey2"))},id:"listChild{".concat(t,"}.subkey2")}),"disable",(0,u.jsx)(s.Z,{checked:k("listChild[".concat(t,"].disableSubkey2Rule"))||!1,onChange:function(e){return j("listChild[".concat(t,"].disableSubkey2Rule"),e.target.checked)}}),(0,u.jsxs)(c.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return O(e.id)},children:[(0,u.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,u.jsx)(m.Z,{className:"myShinkableButtonIcon"})]})]},e.id)})),(0,u.jsxs)(v.Z,{header:"Validate Complex Forms",codeUrl:["pages/advanced/validate-complex-forms.js","components/SubComponent.js","components/AdvancedSubAutonomousComponent.js"],children:[(0,u.jsxs)("p",{className:"infoParagraph",children:[(0,u.jsx)("b",{children:"react-validatable-form"})," can handle validation of complex forms. The form can have multiple paths, listPaths and subcomponents."]}),(0,u.jsxs)("div",{children:[(0,u.jsx)(E,{ref:L,handleAutonomousFormDataIsChanged:function(e){D(e)},handleAutonomousIsValidChanged:function(e){w(e)}}),(0,u.jsxs)("div",{className:"formField",children:[(0,u.jsx)(d.Z,{error:!!N("child1"),helperText:N("child1")||" ",label:"child1",type:"text",value:k("child1")||"",onChange:function(e){return j("child1",e.target.value)},onBlur:function(){return Z("child1")},id:"child1"}),(0,u.jsx)(d.Z,{error:!!N("child2"),helperText:N("child2")||" ",label:"child2",type:"text",value:k("child2")||"",onChange:function(e){return j("child2",e.target.value)},onBlur:function(){return Z("child2")},id:"child2"}),(0,u.jsx)(d.Z,{error:!!N("child3.subchild1"),helperText:N("child3.subchild1")||" ",label:"child3.subchild1",type:"text",value:k("child3.subchild1")||"",onChange:function(e){return j("child3.subchild1",e.target.value)},onBlur:function(){return Z("child3.subchild1")},id:"child3.subchild1"}),(0,u.jsx)(d.Z,{error:!!N("child3.subchild2"),helperText:N("child3.subchild2")||" ",label:"child3.subchild2",type:"text",value:k("child3.subchild2")||"",onChange:function(e){return j("child3.subchild2",e.target.value)},onBlur:function(){return Z("child3.subchild2")},id:"child3.subchild2"})]}),(0,u.jsxs)("div",{children:[(0,u.jsxs)(c.Z,{className:"myAddButton",variant:"contained",onClick:function(){var e=n.listChild?(0,i.Z)(n.listChild):[];e.push({id:B}),R(B+1),j("listChild",e)},id:"listErrorFocusElement",children:[(0,u.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,u.jsx)(h.Z,{className:"myShinkableButtonIcon"})]}),(0,u.jsx)("span",{style:{marginLeft:10},children:"disable all subkey2 rows"}),(0,u.jsx)(s.Z,{checked:k("disableAllSubkey2Rule")||!1,onChange:function(e){return j("disableAllSubkey2Rule",e.target.checked)}})]}),(0,u.jsx)("div",{className:"complexFormListField",children:H}),(0,u.jsx)("div",{className:"errorInfoText",children:N("listChild")}),(0,u.jsxs)("div",{className:"formField",children:[(0,u.jsx)(d.Z,{error:!!N("bottomElement1"),helperText:N("bottomElement1")||" ",label:"bottomElement1",type:"text",value:k("bottomElement1")||"",onChange:function(e){return j("bottomElement1",e.target.value)},onBlur:function(){return Z("bottomElement1")},id:"bottomElement1"}),(0,u.jsx)(d.Z,{error:!!N("bottomElement2"),helperText:N("bottomElement2")||" ",label:"bottomElement2",type:"text",value:k("bottomElement2")||"",onChange:function(e){return j("bottomElement2",e.target.value)},onBlur:function(){return Z("bottomElement2")},id:"bottomElement2"})]}),(0,u.jsx)(g,{getValue:k,getError:N,formData:n,setPathValue:j,setPathIsBlurred:Z}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){var e=S();L.current.handleSetFormIsSubmitted(),e&&q&&A(!0)},children:"Submit Form"})}),(0,u.jsx)(p.Z,{isValid:t}),(0,u.jsx)(x.Z,{currentRules:y})]}),(0,u.jsxs)(b.Z,{open:I,onClose:function(){return A(!1)},children:[(0,u.jsx)(f.Z,{children:"Form Data Submitted"}),(0,u.jsx)(C.Z,{formData:(0,l.Z)({},n,F)})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=56295)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/validate-list-of-objects-1d5d2e6f693041e9.js b/_next/static/chunks/pages/advanced/validate-list-of-objects-1d5d2e6f693041e9.js deleted file mode 100644 index 3dad5be..0000000 --- a/_next/static/chunks/pages/advanced/validate-list-of-objects-1d5d2e6f693041e9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7682],{96540:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var l=i(n(64938)),s=n(85893),a=(0,l.default)((0,s.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=a},41733:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var l=i(n(64938)),s=n(85893),a=(0,l.default)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=a},23508:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var l=i(n(64938)),s=n(85893),a=(0,l.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=a},6409:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/validate-list-of-objects",function(){return n(67616)}])},49072:function(e,t,n){"use strict";var i=n(85893),l=n(74065),s=n(29618),a=n(47028),r=n(23508),u=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(n.push(i),t):i instanceof RegExp?(n.push("/"+i.source+"/"),t):i},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(r.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,i.jsx)(a.Z,{children:(0,i.jsx)("span",{className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,n){"use strict";var i=n(85893),l=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(n.push(i),t):i},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,i.jsx)("div",{children:(0,i.jsx)("span",{className:"formDataString",children:l(t)})})}},73952:function(e,t,n){"use strict";var i=n(85893),l=n(365);t.Z=function(e){var t,n=e.isValid,s="";return n?(t="".concat(l.O,"/valid.png"),s="valid"):(t="".concat(l.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},67616:function(e,t,n){"use strict";n.r(t);var i=n(828),l=n(36305),s=n(85893),a=n(67294),r=n(64459),u=n(41664),c=n.n(u),d=n(31362),o=n(69873),h=n(75084),f=n(96540),b=n(41733),v=n(29620),m=n(77745),x=n(73952),y=n(49072),p=n(2386),j=n(6630),k=function(e,t){return e.disableAllSubkey2Rule||e.listChild[t].disableSubkey2Rule},C=[{listPath:"listChild",subRules:[{path:"subkey1",ruleSet:["required",{rule:"length",greaterThan:3}]},{path:"subkey2",ruleSet:[{rule:"required",disableIf:k},{rule:"number",greaterThan:5,disableIf:k}]},{path:"subkey3",ruleSet:["required"],elementId:"subkey3ElementId"}],dependantPaths:["disableAllSubkey2Rule"]},{path:"listChild",ruleSet:["required",{rule:"listSize",greaterThan:2}],elementId:"listErrorFocusElement"}];t.default=function(){var e=(0,r.c)({rules:C,initialFormData:{listChild:[{id:1}]},hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,u=e.setPathValue,k=e.setFormIsSubmitted,g=e.setPathIsBlurred,Z=e.getValue,S=e.getError,_=(0,i.Z)((0,a.useState)(2),2),N=_[0],R=_[1],E=(0,i.Z)((0,a.useState)(!1),2),I=E[0],w=E[1],B=null,D=function(){var e=(0,l.Z)(n.listChild);e.push({id:N}),R(N+1),u("listChild",e)},A=function(e){u("listChild",n.listChild.filter(function(t){return t.id!==e}))};return n.listChild&&n.listChild.length>0&&(B=n.listChild.map(function(e,t){return(0,s.jsxs)("div",{className:"formListItem",children:[(0,s.jsx)(o.Z,{style:{width:200},error:!!S("listChild{".concat(t,"}.subkey1")),helperText:S("listChild{".concat(t,"}.subkey1"))||" ",label:"lengthGreaterThan3",type:"text",value:Z("listChild[".concat(t,"].subkey1"))||"",onChange:function(e){return u("listChild[".concat(t,"].subkey1"),e.target.value)},onBlur:function(){return g("listChild{".concat(t,"}.subkey1"))},id:"listChild{".concat(t,"}.subkey1")}),(0,s.jsx)(o.Z,{style:{width:200},error:!!S("listChild{".concat(t,"}.subkey2")),helperText:S("listChild{".concat(t,"}.subkey2"))||" ",label:"numberGreaterThan5",type:"number",value:Z("listChild[".concat(t,"].subkey2"))||"",onChange:function(e){return u("listChild[".concat(t,"].subkey2"),e.target.value)},onBlur:function(){return g("listChild{".concat(t,"}.subkey2"))},id:"listChild{".concat(t,"}.subkey2")}),"disable",(0,s.jsx)(d.Z,{checked:Z("listChild[".concat(t,"].disableSubkey2Rule"))||!1,onChange:function(e){return u("listChild[".concat(t,"].disableSubkey2Rule"),e.target.checked)}}),(0,s.jsx)(o.Z,{style:{width:200},error:!!S("listChild{".concat(t,"}.subkey3")),helperText:S("listChild{".concat(t,"}.subkey3"))||" ",label:"required",type:"text",value:Z("listChild[".concat(t,"].subkey3"))||"",onChange:function(e){return u("listChild[".concat(t,"].subkey3"),e.target.value)},onBlur:function(){return g("listChild{".concat(t,"}.subkey3"))},id:"listChild{".concat(t,"}.subkey3ElementId")}),(0,s.jsxs)(h.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return A(e.id)},children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,s.jsx)(b.Z,{className:"myShinkableButtonIcon"})]})]},e.id)})),(0,s.jsxs)(p.Z,{header:"Validate List of Objects",codeUrl:"pages/advanced/validate-list-of-objects.js",children:[(0,s.jsxs)("p",{className:"infoParagraph",children:["An array of objects with more than one subkeys can be validated using"," ",(0,s.jsx)(c(),{className:"inner-link",href:"/library-api/path",children:"listPath"})," ","and each subkey can have different rules which should be defined in ",(0,s.jsx)("b",{children:"subRules"})," key."]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(h.Z,{className:"myAddButton",variant:"contained",onClick:function(){return D()},id:"listErrorFocusElement",children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,s.jsx)(f.Z,{className:"myShinkableButtonIcon"})]}),(0,s.jsx)("span",{style:{marginLeft:10},children:"disable all subkey2 rows"}),(0,s.jsx)(d.Z,{checked:Z("disableAllSubkey2Rule")||!1,onChange:function(e){return u("disableAllSubkey2Rule",e.target.checked)}})]}),(0,s.jsx)("div",{className:"formListField",children:B}),(0,s.jsx)("div",{className:"errorInfoText",children:S("listChild")}),(0,s.jsx)("div",{children:(0,s.jsx)(h.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){k()&&w(!0)},children:"Submit Form"})}),(0,s.jsx)(x.Z,{isValid:t}),(0,s.jsx)(y.Z,{currentRules:C})]}),(0,s.jsxs)(v.Z,{open:I,onClose:function(){return w(!1)},children:[(0,s.jsx)(m.Z,{children:"Form Data Submitted"}),(0,s.jsx)(j.Z,{formData:n})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=6409)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/validate-list-of-objects-4a615b6a25699599.js b/_next/static/chunks/pages/advanced/validate-list-of-objects-4a615b6a25699599.js new file mode 100644 index 0000000..d82aac9 --- /dev/null +++ b/_next/static/chunks/pages/advanced/validate-list-of-objects-4a615b6a25699599.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7682],{96540:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var l=i(n(64938)),s=n(85893),a=(0,l.default)((0,s.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=a},41733:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var l=i(n(64938)),s=n(85893),a=(0,l.default)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=a},23508:function(e,t,n){"use strict";var i=n(91941);t.Z=void 0;var l=i(n(64938)),s=n(85893),a=(0,l.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=a},6409:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/validate-list-of-objects",function(){return n(67616)}])},49072:function(e,t,n){"use strict";var i=n(85893),l=n(74065),s=n(29618),a=n(47028),r=n(23508),u=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(n.push(i),t):i instanceof RegExp?(n.push("/"+i.source+"/"),t):i},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(r.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,i.jsx)(a.Z,{children:(0,i.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,n){"use strict";var i=n(85893),l=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(n.push(i),t):i},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,i.jsx)("div",{children:(0,i.jsx)("span",{className:"formDataString",children:l(t)})})}},73952:function(e,t,n){"use strict";var i=n(85893),l=n(365);t.Z=function(e){var t,n=e.isValid,s="";return n?(t="".concat(l.O,"/valid.png"),s="valid"):(t="".concat(l.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},67616:function(e,t,n){"use strict";n.r(t);var i=n(828),l=n(36305),s=n(85893),a=n(67294),r=n(64459),u=n(41664),c=n.n(u),d=n(31362),o=n(69873),h=n(75084),f=n(96540),b=n(41733),v=n(29620),m=n(77745),x=n(73952),p=n(49072),y=n(2386),j=n(6630),k=function(e,t){return e.disableAllSubkey2Rule||e.listChild[t].disableSubkey2Rule},C=[{listPath:"listChild",subRules:[{path:"subkey1",ruleSet:["required",{rule:"length",greaterThan:3}]},{path:"subkey2",ruleSet:[{rule:"required",disableIf:k},{rule:"number",greaterThan:5,disableIf:k}]},{path:"subkey3",ruleSet:["required"],elementId:"subkey3ElementId"}],dependantPaths:["disableAllSubkey2Rule"]},{path:"listChild",ruleSet:["required",{rule:"listSize",greaterThan:2}],elementId:"listErrorFocusElement"}];t.default=function(){var e=(0,r.c)({rules:C,initialFormData:{listChild:[{id:1}]},hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,u=e.setPathValue,k=e.setFormIsSubmitted,g=e.setPathIsBlurred,Z=e.getValue,S=e.getError,_=(0,i.Z)((0,a.useState)(2),2),N=_[0],R=_[1],E=(0,i.Z)((0,a.useState)(!1),2),I=E[0],w=E[1],B=null,D=function(){var e=(0,l.Z)(n.listChild);e.push({id:N}),R(N+1),u("listChild",e)},A=function(e){u("listChild",n.listChild.filter(function(t){return t.id!==e}))};return n.listChild&&n.listChild.length>0&&(B=n.listChild.map(function(e,t){return(0,s.jsxs)("div",{className:"formListItem",children:[(0,s.jsx)(o.Z,{style:{width:200},error:!!S("listChild{".concat(t,"}.subkey1")),helperText:S("listChild{".concat(t,"}.subkey1"))||" ",label:"lengthGreaterThan3",type:"text",value:Z("listChild[".concat(t,"].subkey1"))||"",onChange:function(e){return u("listChild[".concat(t,"].subkey1"),e.target.value)},onBlur:function(){return g("listChild{".concat(t,"}.subkey1"))},id:"listChild{".concat(t,"}.subkey1")}),(0,s.jsx)(o.Z,{style:{width:200},error:!!S("listChild{".concat(t,"}.subkey2")),helperText:S("listChild{".concat(t,"}.subkey2"))||" ",label:"numberGreaterThan5",type:"number",value:Z("listChild[".concat(t,"].subkey2"))||"",onChange:function(e){return u("listChild[".concat(t,"].subkey2"),e.target.value)},onBlur:function(){return g("listChild{".concat(t,"}.subkey2"))},id:"listChild{".concat(t,"}.subkey2")}),"disable",(0,s.jsx)(d.Z,{checked:Z("listChild[".concat(t,"].disableSubkey2Rule"))||!1,onChange:function(e){return u("listChild[".concat(t,"].disableSubkey2Rule"),e.target.checked)}}),(0,s.jsx)(o.Z,{style:{width:200},error:!!S("listChild{".concat(t,"}.subkey3")),helperText:S("listChild{".concat(t,"}.subkey3"))||" ",label:"required",type:"text",value:Z("listChild[".concat(t,"].subkey3"))||"",onChange:function(e){return u("listChild[".concat(t,"].subkey3"),e.target.value)},onBlur:function(){return g("listChild{".concat(t,"}.subkey3"))},id:"listChild{".concat(t,"}.subkey3ElementId")}),(0,s.jsxs)(h.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return A(e.id)},children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,s.jsx)(b.Z,{className:"myShinkableButtonIcon"})]})]},e.id)})),(0,s.jsxs)(y.Z,{header:"Validate List of Objects",codeUrl:"pages/advanced/validate-list-of-objects.js",children:[(0,s.jsxs)("p",{className:"infoParagraph",children:["An array of objects with more than one subkeys can be validated using"," ",(0,s.jsx)(c(),{className:"inner-link",href:"/library-api/path",children:"listPath"})," ","and each subkey can have different rules which should be defined in ",(0,s.jsx)("b",{children:"subRules"})," key."]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(h.Z,{className:"myAddButton",variant:"contained",onClick:function(){return D()},id:"listErrorFocusElement",children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,s.jsx)(f.Z,{className:"myShinkableButtonIcon"})]}),(0,s.jsx)("span",{style:{marginLeft:10},children:"disable all subkey2 rows"}),(0,s.jsx)(d.Z,{checked:Z("disableAllSubkey2Rule")||!1,onChange:function(e){return u("disableAllSubkey2Rule",e.target.checked)}})]}),(0,s.jsx)("div",{className:"formListField",children:B}),(0,s.jsx)("div",{className:"errorInfoText",children:S("listChild")}),(0,s.jsx)("div",{children:(0,s.jsx)(h.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){k()&&w(!0)},children:"Submit Form"})}),(0,s.jsx)(x.Z,{isValid:t}),(0,s.jsx)(p.Z,{currentRules:C})]}),(0,s.jsxs)(v.Z,{open:I,onClose:function(){return w(!1)},children:[(0,s.jsx)(m.Z,{children:"Form Data Submitted"}),(0,s.jsx)(j.Z,{formData:n})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=6409)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/validate-lists-b6b69660e88a8546.js b/_next/static/chunks/pages/advanced/validate-lists-b6b69660e88a8546.js deleted file mode 100644 index 16c2706..0000000 --- a/_next/static/chunks/pages/advanced/validate-lists-b6b69660e88a8546.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4239],{96540:function(n,e,t){"use strict";var i=t(91941);e.Z=void 0;var a=i(t(64938)),s=t(85893),r=(0,a.default)((0,s.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");e.Z=r},41733:function(n,e,t){"use strict";var i=t(91941);e.Z=void 0;var a=i(t(64938)),s=t(85893),r=(0,a.default)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");e.Z=r},23508:function(n,e,t){"use strict";var i=t(91941);e.Z=void 0;var a=i(t(64938)),s=t(85893),r=(0,a.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");e.Z=r},3278:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/validate-lists",function(){return t(45494)}])},49072:function(n,e,t){"use strict";var i=t(85893),a=t(74065),s=t(29618),r=t(47028),l=t(23508),c=function(n){var e="____PLACEHOLDER____",t=[];return JSON.stringify(n,function(n,i){return"function"==typeof i?(t.push(i),e):i instanceof RegExp?(t.push("/"+i.source+"/"),e):i},2).replace(RegExp('"'+e+'"',"g"),function(){return t.shift()})};e.Z=function(n){var e=n.currentRules,t=n.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(a.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(l.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===t?"Current Rules":t})}),(0,i.jsx)(r.Z,{children:(0,i.jsx)("span",{className:"currentRuleString",children:c(e)})})]})})}},6630:function(n,e,t){"use strict";var i=t(85893),a=function(n){var e="____PLACEHOLDER____",t=[];return JSON.stringify(n,function(n,i){return"function"==typeof i?(t.push(i),e):i},2).replace(RegExp('"'+e+'"',"g"),function(){return t.shift()})};e.Z=function(n){var e=n.formData;return(0,i.jsx)("div",{children:(0,i.jsx)("span",{className:"formDataString",children:a(e)})})}},73952:function(n,e,t){"use strict";var i=t(85893),a=t(365);e.Z=function(n){var e,t=n.isValid,s="";return t?(e="".concat(a.O,"/valid.png"),s="valid"):(e="".concat(a.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:e,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:t?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},45494:function(n,e,t){"use strict";t.r(e);var i=t(828),a=t(36305),s=t(85893),r=t(67294),l=t(64459),c=t(41664),u=t.n(c),d=t(69873),o=t(75084),h=t(96540),f=t(41733),v=t(29620),x=t(77745),p=t(73952),m=t(49072),j=t(2386),_=t(6630),Z=[{path:"listChild",ruleSet:["required",{rule:"listSize",greaterThan:2}]},{listPath:"listChild",ruleSet:["required",{rule:"length",greaterThan:3}]}];e.default=function(){var n=(0,l.c)({rules:Z,initialFormData:{listChild:[""]}}),e=n.isValid,t=n.formData,c=n.setPathValue,N=n.setFormIsSubmitted,g=n.getValue,C=n.getError,S=(0,i.Z)((0,r.useState)(!1),2),E=S[0],R=S[1],y=function(){N()&&R(!0)},b=null,k=function(){var n=(0,a.Z)(t.listChild);n.push(""),c("listChild",n)},D=function(n){c("listChild",t.listChild.filter(function(e,t){return t!==n}))};return t.listChild&&t.listChild.length>0&&(b=t.listChild.map(function(n,e){return(0,s.jsxs)("div",{children:[(0,s.jsx)(d.Z,{error:!!C("listChild{".concat(e,"}")),helperText:C("listChild{".concat(e,"}"))||" ",label:"lengthGreaterThan3",type:"text",value:g("listChild[".concat(e,"]"))||"",onChange:function(n){return c("listChild[".concat(e,"]"),n.target.value)}}),(0,s.jsxs)(o.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return D(e)},children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,s.jsx)(f.Z,{className:"myShinkableButtonIcon"})]})]},e)})),(0,s.jsxs)(j.Z,{header:"Validate Lists",codeUrl:"pages/advanced/validate-lists.js",children:[(0,s.jsxs)("p",{className:"infoParagraph",children:["An array of values can be validated using"," ",(0,s.jsx)(u(),{className:"inner-link",href:"/library-api/path",children:"listPath"})," ","key."]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{children:(0,s.jsxs)(o.Z,{className:"myAddButton",variant:"contained",onClick:function(){return k()},children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,s.jsx)(h.Z,{className:"myShinkableButtonIcon"})]})}),(0,s.jsx)("div",{className:"formListField",children:b}),(0,s.jsx)("div",{className:"errorInfoText",children:C("listChild")}),(0,s.jsx)("div",{children:(0,s.jsx)(o.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){return y()},children:"Submit Form"})}),(0,s.jsx)(p.Z,{isValid:e}),(0,s.jsx)(m.Z,{currentRules:Z})]}),(0,s.jsxs)(v.Z,{open:E,onClose:function(){return R(!1)},children:[(0,s.jsx)(x.Z,{children:"Form Data Submitted"}),(0,s.jsx)(_.Z,{formData:t})]})]})}}},function(n){n.O(0,[9774,2888,179],function(){return n(n.s=3278)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/advanced/validate-lists-bb9baf22ec7ed8a3.js b/_next/static/chunks/pages/advanced/validate-lists-bb9baf22ec7ed8a3.js new file mode 100644 index 0000000..8e0d628 --- /dev/null +++ b/_next/static/chunks/pages/advanced/validate-lists-bb9baf22ec7ed8a3.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4239],{96540:function(n,e,t){"use strict";var i=t(91941);e.Z=void 0;var a=i(t(64938)),s=t(85893),r=(0,a.default)((0,s.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");e.Z=r},41733:function(n,e,t){"use strict";var i=t(91941);e.Z=void 0;var a=i(t(64938)),s=t(85893),r=(0,a.default)((0,s.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");e.Z=r},23508:function(n,e,t){"use strict";var i=t(91941);e.Z=void 0;var a=i(t(64938)),s=t(85893),r=(0,a.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");e.Z=r},3278:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/validate-lists",function(){return t(45494)}])},49072:function(n,e,t){"use strict";var i=t(85893),a=t(74065),s=t(29618),r=t(47028),l=t(23508),c=function(n){var e="____PLACEHOLDER____",t=[];return JSON.stringify(n,function(n,i){return"function"==typeof i?(t.push(i),e):i instanceof RegExp?(t.push("/"+i.source+"/"),e):i},2).replace(RegExp('"'+e+'"',"g"),function(){return t.shift()})};e.Z=function(n){var e=n.currentRules,t=n.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(a.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(l.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===t?"Current Rules":t})}),(0,i.jsx)(r.Z,{children:(0,i.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:c(e)})})]})})}},6630:function(n,e,t){"use strict";var i=t(85893),a=function(n){var e="____PLACEHOLDER____",t=[];return JSON.stringify(n,function(n,i){return"function"==typeof i?(t.push(i),e):i},2).replace(RegExp('"'+e+'"',"g"),function(){return t.shift()})};e.Z=function(n){var e=n.formData;return(0,i.jsx)("div",{children:(0,i.jsx)("span",{className:"formDataString",children:a(e)})})}},73952:function(n,e,t){"use strict";var i=t(85893),a=t(365);e.Z=function(n){var e,t=n.isValid,s="";return t?(e="".concat(a.O,"/valid.png"),s="valid"):(e="".concat(a.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:e,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:t?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},45494:function(n,e,t){"use strict";t.r(e);var i=t(828),a=t(36305),s=t(85893),r=t(67294),l=t(64459),c=t(41664),u=t.n(c),d=t(69873),o=t(75084),h=t(96540),f=t(41733),v=t(29620),x=t(77745),p=t(73952),m=t(49072),j=t(2386),_=t(6630),Z=[{path:"listChild",ruleSet:["required",{rule:"listSize",greaterThan:2}]},{listPath:"listChild",ruleSet:["required",{rule:"length",greaterThan:3}]}];e.default=function(){var n=(0,l.c)({rules:Z,initialFormData:{listChild:[""]}}),e=n.isValid,t=n.formData,c=n.setPathValue,g=n.setFormIsSubmitted,N=n.getValue,C=n.getError,S=(0,i.Z)((0,r.useState)(!1),2),y=S[0],E=S[1],R=function(){g()&&E(!0)},b=null,k=function(){var n=(0,a.Z)(t.listChild);n.push(""),c("listChild",n)},D=function(n){c("listChild",t.listChild.filter(function(e,t){return t!==n}))};return t.listChild&&t.listChild.length>0&&(b=t.listChild.map(function(n,e){return(0,s.jsxs)("div",{children:[(0,s.jsx)(d.Z,{error:!!C("listChild{".concat(e,"}")),helperText:C("listChild{".concat(e,"}"))||" ",label:"lengthGreaterThan3",type:"text",value:N("listChild[".concat(e,"]"))||"",onChange:function(n){return c("listChild[".concat(e,"]"),n.target.value)}}),(0,s.jsxs)(o.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return D(e)},children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,s.jsx)(f.Z,{className:"myShinkableButtonIcon"})]})]},e)})),(0,s.jsxs)(j.Z,{header:"Validate Lists",codeUrl:"pages/advanced/validate-lists.js",children:[(0,s.jsxs)("p",{className:"infoParagraph",children:["An array of values can be validated using"," ",(0,s.jsx)(u(),{className:"inner-link",href:"/library-api/path",children:"listPath"})," ","key."]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{children:(0,s.jsxs)(o.Z,{className:"myAddButton",variant:"contained",onClick:function(){return k()},children:[(0,s.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,s.jsx)(h.Z,{className:"myShinkableButtonIcon"})]})}),(0,s.jsx)("div",{className:"formListField",children:b}),(0,s.jsx)("div",{className:"errorInfoText",children:C("listChild")}),(0,s.jsx)("div",{children:(0,s.jsx)(o.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){return R()},children:"Submit Form"})}),(0,s.jsx)(p.Z,{isValid:e}),(0,s.jsx)(m.Z,{currentRules:Z})]}),(0,s.jsxs)(v.Z,{open:y,onClose:function(){return E(!1)},children:[(0,s.jsx)(x.Z,{children:"Form Data Submitted"}),(0,s.jsx)(_.Z,{formData:t})]})]})}}},function(n){n.O(0,[9774,2888,179],function(){return n(n.s=3278)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/apply-to-nulls-2862166cb2fed735.js b/_next/static/chunks/pages/customizations/apply-to-nulls-2862166cb2fed735.js new file mode 100644 index 0000000..b8a8cc4 --- /dev/null +++ b/_next/static/chunks/pages/customizations/apply-to-nulls-2862166cb2fed735.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{96540:function(l,e,a){"use strict";var t=a(91941);e.Z=void 0;var n=t(a(64938)),r=a(85893),i=(0,n.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");e.Z=i},41733:function(l,e,a){"use strict";var t=a(91941);e.Z=void 0;var n=t(a(64938)),r=a(85893),i=(0,n.default)((0,r.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");e.Z=i},84147:function(l,e,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/apply-to-nulls",function(){return a(95367)}])},49072:function(l,e,a){"use strict";var t=a(85893),n=a(74065),r=a(29618),i=a(47028),u=a(23508),s=function(l){var e="____PLACEHOLDER____",a=[];return JSON.stringify(l,function(l,t){return"function"==typeof t?(a.push(t),e):t instanceof RegExp?(a.push("/"+t.source+"/"),e):t},2).replace(RegExp('"'+e+'"',"g"),function(){return a.shift()})};e.Z=function(l){var e=l.currentRules,a=l.header;return(0,t.jsx)("div",{className:"currentRuleInfoDiv",children:(0,t.jsxs)(n.Z,{children:[(0,t.jsx)(r.Z,{expandIcon:(0,t.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,t.jsx)("span",{className:"currentRuleLabel",children:void 0===a?"Current Rules":a})}),(0,t.jsx)(i.Z,{children:(0,t.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:s(e)})})]})})}},73952:function(l,e,a){"use strict";var t=a(85893),n=a(365);e.Z=function(l){var e,a=l.isValid,r="";return a?(e="".concat(n.O,"/valid.png"),r="valid"):(e="".concat(n.O,"/invalid.png"),r="invalid"),(0,t.jsxs)("div",{className:"validationResultDiv",children:[(0,t.jsx)("span",{children:"Validation Result: "}),(0,t.jsx)("img",{src:e,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,t.jsx)("span",{className:a?"validationResultInfoSuccess":"validationResultInfoFail",children:r})]})}},75017:function(l,e,a){"use strict";a.d(e,{Y:function(){return t}});var t=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},95367:function(l,e,a){"use strict";a.r(e);var t=a(41799),n=a(69396),r=a(36305),i=a(85893),u=a(64459),s=a(69873),o=a(75084),c=a(30612),v=a(81712),p=a(96540),d=a(41733),h=a(75017),x=a(73952),f=a(49072),j=a(2386),y={listChild:["",""]},N=[{path:"val1",ruleSet:[{rule:"required",applyToNulls:!0}]},{path:"val2",ruleSet:[{rule:"number",equalTo:3,applyToNulls:!0}]},{path:"val3",ruleSet:[{rule:"length",equalTo:3,applyToNulls:!0}]},{path:"val4",ruleSet:[{rule:"listSize",equalTo:3,applyToNulls:!0}]},{path:"val5",ruleSet:[{rule:"date",applyToNulls:!0}]},{path:"val6",ruleSet:[{rule:"email",applyToNulls:!0}]},{path:"val7",ruleSet:[{rule:"url",applyToNulls:!0}]},{path:"val8",ruleSet:[{rule:"iban",applyToNulls:!0}]},{path:"val9",ruleSet:[{rule:"equality",equalTo:"aaa",applyToNulls:!0}]},{path:"val10",ruleSet:[{rule:"regex",regex:/a/,applyToNulls:!0}]},{listPath:"listChild",ruleSet:[{rule:"unique",applyToNulls:!0}]}];e.default=function(){var l=(0,u.c)({rules:N,initialFormData:y}),e=l.isValid,a=l.formData,m=l.setPathValue,g=l.getValue,T=l.getError,Z=null,b=function(l){m("listChild",a.listChild.filter(function(e,a){return a!==l}))};return a.listChild&&a.listChild.length>0&&(Z=a.listChild.map(function(l,e){return(0,i.jsxs)("div",{children:[(0,i.jsx)(s.Z,{error:!!T("listChild{".concat(e,"}")),helperText:T("listChild{".concat(e,"}"))||" ",label:"unique",type:"text",value:g("listChild[".concat(e,"]"))||"",onChange:function(l){return m("listChild[".concat(e,"]"),l.target.value)}}),(0,i.jsxs)(o.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return b(e)},children:[(0,i.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,i.jsx)(d.Z,{className:"myShinkableButtonIcon"})]})]},e)})),(0,i.jsxs)(j.Z,{header:"applyToNulls",codeUrl:"pages/customizations/apply-to-nulls.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:["By default ",(0,i.jsx)("b",{children:"react-validatable-form"})," interprets ",(0,i.jsx)("b",{children:"undefined"}),", ",(0,i.jsx)("b",{children:"null"}),", ",(0,i.jsx)("b",{children:"empty string"})," ","or ",(0,i.jsx)("b",{children:"empty array"})," values as valid values. If you want any rule to be applied to these values,"," ",(0,i.jsx)("b",{children:"applyToNulls"})," parameter should be used."]}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!T("val1"),helperText:T("val1")||" ",label:"requiredApplyToNulls",type:"text",value:g("val1")||"",onChange:function(l){return m("val1",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!T("val2"),helperText:T("val2")||" ",label:"numberApplyToNulls",type:"number",value:g("val2")||"",onChange:function(l){return m("val2",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!T("val3"),helperText:T("val3")||" ",label:"lengthApplyToNulls",type:"text",value:g("val3")||"",onChange:function(l){return m("val3",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,{multiple:!0,value:g("val4")||[],onChange:function(l,e){m("val4",e)},options:h.Y,renderInput:function(l){return(0,i.jsx)(s.Z,(0,n.Z)((0,t.Z)({},l),{error:!!T("val4"),helperText:T("val4")||" ",label:"listSizeApplyToNulls"}))}})}),(0,i.jsx)("div",{children:(0,i.jsx)(v.$,{label:"dateApplyToNulls",inputFormat:"MM/dd/yyyy",value:g("val5")||null,onChange:function(l){return m("val5",l)},renderInput:function(l){return(0,i.jsx)(s.Z,(0,n.Z)((0,t.Z)({},l),{error:!!T("val5"),helperText:T("val5")||" "}))}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!T("val6"),helperText:T("val6")||" ",label:"emailApplyToNulls",type:"text",value:g("val6")||"",onChange:function(l){return m("val6",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!T("val7"),helperText:T("val7")||" ",label:"urlApplyToNulls",type:"text",value:g("val7")||"",onChange:function(l){return m("val7",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!T("val8"),helperText:T("val8")||" ",label:"ibanApplyToNulls",type:"text",value:g("val8")||"",onChange:function(l){return m("val8",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!T("val9"),helperText:T("val9")||" ",label:"equalityApplyToNulls",type:"text",value:g("val9")||"",onChange:function(l){return m("val9",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!T("val10"),helperText:T("val10")||" ",label:"regexApplyToNulls",type:"text",value:g("val10")||"",onChange:function(l){return m("val10",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsxs)(o.Z,{className:"myAddButton",variant:"contained",onClick:function(){var l=a.listChild?(0,r.Z)(a.listChild):[];l.push(""),m("listChild",l)},children:[(0,i.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,i.jsx)(p.Z,{className:"myShinkableButtonIcon"})]})}),(0,i.jsx)("div",{className:"formListField",children:Z}),(0,i.jsx)("div",{className:"errorInfoText",children:T("listChild")}),(0,i.jsx)(x.Z,{isValid:e}),(0,i.jsx)(f.Z,{currentRules:N})]})}}},function(l){l.O(0,[2601,9774,2888,179],function(){return l(l.s=84147)}),_N_E=l.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/apply-to-nulls-59c7aa5861081007.js b/_next/static/chunks/pages/customizations/apply-to-nulls-59c7aa5861081007.js deleted file mode 100644 index f2f5ae2..0000000 --- a/_next/static/chunks/pages/customizations/apply-to-nulls-59c7aa5861081007.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{96540:function(l,e,a){"use strict";var t=a(91941);e.Z=void 0;var n=t(a(64938)),r=a(85893),i=(0,n.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");e.Z=i},41733:function(l,e,a){"use strict";var t=a(91941);e.Z=void 0;var n=t(a(64938)),r=a(85893),i=(0,n.default)((0,r.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");e.Z=i},84147:function(l,e,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/apply-to-nulls",function(){return a(95367)}])},49072:function(l,e,a){"use strict";var t=a(85893),n=a(74065),r=a(29618),i=a(47028),u=a(23508),s=function(l){var e="____PLACEHOLDER____",a=[];return JSON.stringify(l,function(l,t){return"function"==typeof t?(a.push(t),e):t instanceof RegExp?(a.push("/"+t.source+"/"),e):t},2).replace(RegExp('"'+e+'"',"g"),function(){return a.shift()})};e.Z=function(l){var e=l.currentRules,a=l.header;return(0,t.jsx)("div",{className:"currentRuleInfoDiv",children:(0,t.jsxs)(n.Z,{children:[(0,t.jsx)(r.Z,{expandIcon:(0,t.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,t.jsx)("span",{className:"currentRuleLabel",children:void 0===a?"Current Rules":a})}),(0,t.jsx)(i.Z,{children:(0,t.jsx)("span",{className:"currentRuleString",children:s(e)})})]})})}},73952:function(l,e,a){"use strict";var t=a(85893),n=a(365);e.Z=function(l){var e,a=l.isValid,r="";return a?(e="".concat(n.O,"/valid.png"),r="valid"):(e="".concat(n.O,"/invalid.png"),r="invalid"),(0,t.jsxs)("div",{className:"validationResultDiv",children:[(0,t.jsx)("span",{children:"Validation Result: "}),(0,t.jsx)("img",{src:e,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,t.jsx)("span",{className:a?"validationResultInfoSuccess":"validationResultInfoFail",children:r})]})}},75017:function(l,e,a){"use strict";a.d(e,{Y:function(){return t}});var t=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},95367:function(l,e,a){"use strict";a.r(e);var t=a(41799),n=a(69396),r=a(36305),i=a(85893),u=a(64459),s=a(69873),o=a(75084),c=a(30612),v=a(81712),d=a(96540),p=a(41733),h=a(75017),x=a(73952),f=a(49072),j=a(2386),y={listChild:["",""]},N=[{path:"val1",ruleSet:[{rule:"required",applyToNulls:!0}]},{path:"val2",ruleSet:[{rule:"number",equalTo:3,applyToNulls:!0}]},{path:"val3",ruleSet:[{rule:"length",equalTo:3,applyToNulls:!0}]},{path:"val4",ruleSet:[{rule:"listSize",equalTo:3,applyToNulls:!0}]},{path:"val5",ruleSet:[{rule:"date",applyToNulls:!0}]},{path:"val6",ruleSet:[{rule:"email",applyToNulls:!0}]},{path:"val7",ruleSet:[{rule:"url",applyToNulls:!0}]},{path:"val8",ruleSet:[{rule:"iban",applyToNulls:!0}]},{path:"val9",ruleSet:[{rule:"equality",equalTo:"aaa",applyToNulls:!0}]},{path:"val10",ruleSet:[{rule:"regex",regex:/a/,applyToNulls:!0}]},{listPath:"listChild",ruleSet:[{rule:"unique",applyToNulls:!0}]}];e.default=function(){var l=(0,u.c)({rules:N,initialFormData:y}),e=l.isValid,a=l.formData,m=l.setPathValue,T=l.getValue,g=l.getError,Z=null,b=function(l){m("listChild",a.listChild.filter(function(e,a){return a!==l}))};return a.listChild&&a.listChild.length>0&&(Z=a.listChild.map(function(l,e){return(0,i.jsxs)("div",{children:[(0,i.jsx)(s.Z,{error:!!g("listChild{".concat(e,"}")),helperText:g("listChild{".concat(e,"}"))||" ",label:"unique",type:"text",value:T("listChild[".concat(e,"]"))||"",onChange:function(l){return m("listChild[".concat(e,"]"),l.target.value)}}),(0,i.jsxs)(o.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return b(e)},children:[(0,i.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,i.jsx)(p.Z,{className:"myShinkableButtonIcon"})]})]},e)})),(0,i.jsxs)(j.Z,{header:"applyToNulls",codeUrl:"pages/customizations/apply-to-nulls.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:["By default ",(0,i.jsx)("b",{children:"react-validatable-form"})," interprets ",(0,i.jsx)("b",{children:"undefined"}),", ",(0,i.jsx)("b",{children:"null"}),", ",(0,i.jsx)("b",{children:"empty string"})," ","or ",(0,i.jsx)("b",{children:"empty array"})," values as valid values. If you want any rule to be applied to these values,"," ",(0,i.jsx)("b",{children:"applyToNulls"})," parameter should be used."]}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!g("val1"),helperText:g("val1")||" ",label:"requiredApplyToNulls",type:"text",value:T("val1")||"",onChange:function(l){return m("val1",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!g("val2"),helperText:g("val2")||" ",label:"numberApplyToNulls",type:"number",value:T("val2")||"",onChange:function(l){return m("val2",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!g("val3"),helperText:g("val3")||" ",label:"lengthApplyToNulls",type:"text",value:T("val3")||"",onChange:function(l){return m("val3",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,{multiple:!0,value:T("val4")||[],onChange:function(l,e){m("val4",e)},options:h.Y,renderInput:function(l){return(0,i.jsx)(s.Z,(0,n.Z)((0,t.Z)({},l),{error:!!g("val4"),helperText:g("val4")||" ",label:"listSizeApplyToNulls"}))}})}),(0,i.jsx)("div",{children:(0,i.jsx)(v.$,{label:"dateApplyToNulls",inputFormat:"MM/dd/yyyy",value:T("val5")||null,onChange:function(l){return m("val5",l)},renderInput:function(l){return(0,i.jsx)(s.Z,(0,n.Z)((0,t.Z)({},l),{error:!!g("val5"),helperText:g("val5")||" "}))}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!g("val6"),helperText:g("val6")||" ",label:"emailApplyToNulls",type:"text",value:T("val6")||"",onChange:function(l){return m("val6",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!g("val7"),helperText:g("val7")||" ",label:"urlApplyToNulls",type:"text",value:T("val7")||"",onChange:function(l){return m("val7",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!g("val8"),helperText:g("val8")||" ",label:"ibanApplyToNulls",type:"text",value:T("val8")||"",onChange:function(l){return m("val8",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!g("val9"),helperText:g("val9")||" ",label:"equalityApplyToNulls",type:"text",value:T("val9")||"",onChange:function(l){return m("val9",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsx)(s.Z,{error:!!g("val10"),helperText:g("val10")||" ",label:"regexApplyToNulls",type:"text",value:T("val10")||"",onChange:function(l){return m("val10",l.target.value)}})}),(0,i.jsx)("div",{children:(0,i.jsxs)(o.Z,{className:"myAddButton",variant:"contained",onClick:function(){var l=a.listChild?(0,r.Z)(a.listChild):[];l.push(""),m("listChild",l)},children:[(0,i.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,i.jsx)(d.Z,{className:"myShinkableButtonIcon"})]})}),(0,i.jsx)("div",{className:"formListField",children:Z}),(0,i.jsx)("div",{className:"errorInfoText",children:g("listChild")}),(0,i.jsx)(x.Z,{isValid:e}),(0,i.jsx)(f.Z,{currentRules:N})]})}}},function(l){l.O(0,[2601,9774,2888,179],function(){return l(l.s=84147)}),_N_E=l.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/conditional-rules-2f8181b4c394c352.js b/_next/static/chunks/pages/customizations/conditional-rules-2f8181b4c394c352.js deleted file mode 100644 index 644ab32..0000000 --- a/_next/static/chunks/pages/customizations/conditional-rules-2f8181b4c394c352.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3472],{23508:function(e,n,r){"use strict";var a=r(91941);n.Z=void 0;var l=a(r(64938)),t=r(85893),i=(0,l.default)((0,t.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=i},22416:function(e,n,r){"use strict";r.d(n,{Z:function(){return j}});var a=r(1048),l=r(32793),t=r(67294),i=r(86010),s=r(94780),o=r(67074),u=r(6446),c=r(34867);function d(e){return(0,c.Z)("MuiFormGroup",e)}(0,r(1588).Z)("MuiFormGroup",["root","row","error"]);var f=r(59711),h=r(56594),v=r(85893);let x=["className","row"],p=e=>{let{classes:n,row:r,error:a}=e;return(0,s.Z)({root:["root",r&&"row",a&&"error"]},d,n)},b=(0,o.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,n){let{ownerState:r}=e;return[n.root,r.row&&n.row]}})(({ownerState:e})=>(0,l.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),Z=t.forwardRef(function(e,n){let r=(0,u.Z)({props:e,name:"MuiFormGroup"}),{className:t,row:s=!1}=r,o=(0,a.Z)(r,x),c=(0,f.Z)(),d=(0,h.Z)({props:r,muiFormControl:c,states:["error"]}),Z=(0,l.Z)({},r,{row:s,error:d.error}),j=p(Z);return(0,v.jsx)(b,(0,l.Z)({className:(0,i.Z)(j.root,t),ownerState:Z,ref:n},o))});var j=Z},55988:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/conditional-rules",function(){return r(79934)}])},49072:function(e,n,r){"use strict";var a=r(85893),l=r(74065),t=r(29618),i=r(47028),s=r(23508),o=function(e){var n="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(r.push(a),n):a instanceof RegExp?(r.push("/"+a.source+"/"),n):a},2).replace(RegExp('"'+n+'"',"g"),function(){return r.shift()})};n.Z=function(e){var n=e.currentRules,r=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(t.Z,{expandIcon:(0,a.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,a.jsx)(i.Z,{children:(0,a.jsx)("span",{className:"currentRuleString",children:o(n)})})]})})}},73952:function(e,n,r){"use strict";var a=r(85893),l=r(365);n.Z=function(e){var n,r=e.isValid,t="";return r?(n="".concat(l.O,"/valid.png"),t="valid"):(n="".concat(l.O,"/invalid.png"),t="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:t})]})}},79934:function(e,n,r){"use strict";r.r(n);var a=r(85893),l=r(64459),t=r(22416),i=r(22841),s=r(31362),o=r(69873),u=r(73952),c=r(49072),d=r(2386),f={},h=[{path:"val1",ruleSet:[{rule:"required",disableIf:function(e){return e.disableVal1Rule}}],dependantPaths:["disableVal1Rule"]},{path:"val2",ruleSet:[{rule:"required",enableIf:function(e){return e.enableVal2Rule}}],dependantPaths:["enableVal2Rule"]}];n.default=function(){var e=(0,l.c)({rules:h,initialFormData:f}),n=e.isValid,r=e.setPathValue,v=e.getValue,x=e.getError;return(0,a.jsxs)(d.Z,{header:"disableIf & enableIf",codeUrl:"pages/customizations/conditional-rules.js",children:[(0,a.jsxs)("p",{className:"infoParagraph",children:["Any validation rule can be disabled if the defined ",(0,a.jsx)("b",{children:"disableIf"})," function returns true. Any validation rule can only be enabled if the defined ",(0,a.jsx)("b",{children:"enableIf"})," function returns true."]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"textAndCheckboxDiv",children:[(0,a.jsx)(o.Z,{error:!!x("val1"),helperText:x("val1")||" ",label:"val1",type:"text",value:v("val1")||"",onChange:function(e){return r("val1",e.target.value)}}),(0,a.jsx)(t.Z,{className:"checkboxOnRight",children:(0,a.jsx)(i.Z,{control:(0,a.jsx)(s.Z,{checked:v("disableVal1Rule")||!1,onChange:function(e){return r("disableVal1Rule",e.target.checked)}}),label:"Disable val1 Rule"})})]}),(0,a.jsxs)("div",{className:"textAndCheckboxDiv",children:[(0,a.jsx)(o.Z,{error:!!x("val2"),helperText:x("val2")||" ",label:"val2",type:"text",value:v("val2")||"",onChange:function(e){return r("val2",e.target.value)}}),(0,a.jsx)(t.Z,{className:"checkboxOnRight",children:(0,a.jsx)(i.Z,{control:(0,a.jsx)(s.Z,{checked:v("enableVal2Rule")||!1,onChange:function(e){return r("enableVal2Rule",e.target.checked)}}),label:"Enable val2 Rule"})})]}),(0,a.jsx)(u.Z,{isValid:n}),(0,a.jsx)(c.Z,{currentRules:h})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=55988)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/conditional-rules-f46d7626e480b60b.js b/_next/static/chunks/pages/customizations/conditional-rules-f46d7626e480b60b.js new file mode 100644 index 0000000..9624c1a --- /dev/null +++ b/_next/static/chunks/pages/customizations/conditional-rules-f46d7626e480b60b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3472],{23508:function(e,n,r){"use strict";var a=r(91941);n.Z=void 0;var l=a(r(64938)),t=r(85893),i=(0,l.default)((0,t.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=i},22416:function(e,n,r){"use strict";r.d(n,{Z:function(){return j}});var a=r(1048),l=r(32793),t=r(67294),i=r(86010),s=r(94780),o=r(67074),u=r(6446),c=r(34867);function d(e){return(0,c.Z)("MuiFormGroup",e)}(0,r(1588).Z)("MuiFormGroup",["root","row","error"]);var f=r(59711),h=r(56594),v=r(85893);let x=["className","row"],p=e=>{let{classes:n,row:r,error:a}=e;return(0,s.Z)({root:["root",r&&"row",a&&"error"]},d,n)},b=(0,o.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,n){let{ownerState:r}=e;return[n.root,r.row&&n.row]}})(({ownerState:e})=>(0,l.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),Z=t.forwardRef(function(e,n){let r=(0,u.Z)({props:e,name:"MuiFormGroup"}),{className:t,row:s=!1}=r,o=(0,a.Z)(r,x),c=(0,f.Z)(),d=(0,h.Z)({props:r,muiFormControl:c,states:["error"]}),Z=(0,l.Z)({},r,{row:s,error:d.error}),j=p(Z);return(0,v.jsx)(b,(0,l.Z)({className:(0,i.Z)(j.root,t),ownerState:Z,ref:n},o))});var j=Z},55988:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/conditional-rules",function(){return r(79934)}])},49072:function(e,n,r){"use strict";var a=r(85893),l=r(74065),t=r(29618),i=r(47028),s=r(23508),o=function(e){var n="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(r.push(a),n):a instanceof RegExp?(r.push("/"+a.source+"/"),n):a},2).replace(RegExp('"'+n+'"',"g"),function(){return r.shift()})};n.Z=function(e){var n=e.currentRules,r=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(t.Z,{expandIcon:(0,a.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,a.jsx)(i.Z,{children:(0,a.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:o(n)})})]})})}},73952:function(e,n,r){"use strict";var a=r(85893),l=r(365);n.Z=function(e){var n,r=e.isValid,t="";return r?(n="".concat(l.O,"/valid.png"),t="valid"):(n="".concat(l.O,"/invalid.png"),t="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:t})]})}},79934:function(e,n,r){"use strict";r.r(n);var a=r(85893),l=r(64459),t=r(22416),i=r(22841),s=r(31362),o=r(69873),u=r(73952),c=r(49072),d=r(2386),f={},h=[{path:"val1",ruleSet:[{rule:"required",disableIf:function(e){return e.disableVal1Rule}}],dependantPaths:["disableVal1Rule"]},{path:"val2",ruleSet:[{rule:"required",enableIf:function(e){return e.enableVal2Rule}}],dependantPaths:["enableVal2Rule"]}];n.default=function(){var e=(0,l.c)({rules:h,initialFormData:f}),n=e.isValid,r=e.setPathValue,v=e.getValue,x=e.getError;return(0,a.jsxs)(d.Z,{header:"disableIf & enableIf",codeUrl:"pages/customizations/conditional-rules.js",children:[(0,a.jsxs)("p",{className:"infoParagraph",children:["Any validation rule can be disabled if the defined ",(0,a.jsx)("b",{children:"disableIf"})," function returns true. Any validation rule can only be enabled if the defined ",(0,a.jsx)("b",{children:"enableIf"})," function returns true."]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"textAndCheckboxDiv",children:[(0,a.jsx)(o.Z,{error:!!x("val1"),helperText:x("val1")||" ",label:"val1",type:"text",value:v("val1")||"",onChange:function(e){return r("val1",e.target.value)}}),(0,a.jsx)(t.Z,{className:"checkboxOnRight",children:(0,a.jsx)(i.Z,{control:(0,a.jsx)(s.Z,{checked:v("disableVal1Rule")||!1,onChange:function(e){return r("disableVal1Rule",e.target.checked)}}),label:"Disable val1 Rule"})})]}),(0,a.jsxs)("div",{className:"textAndCheckboxDiv",children:[(0,a.jsx)(o.Z,{error:!!x("val2"),helperText:x("val2")||" ",label:"val2",type:"text",value:v("val2")||"",onChange:function(e){return r("val2",e.target.value)}}),(0,a.jsx)(t.Z,{className:"checkboxOnRight",children:(0,a.jsx)(i.Z,{control:(0,a.jsx)(s.Z,{checked:v("enableVal2Rule")||!1,onChange:function(e){return r("enableVal2Rule",e.target.checked)}}),label:"Enable val2 Rule"})})]}),(0,a.jsx)(u.Z,{isValid:n}),(0,a.jsx)(c.Z,{currentRules:h})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=55988)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/custom-element-focus-handler-6940de1fd56f0825.js b/_next/static/chunks/pages/customizations/custom-element-focus-handler-6940de1fd56f0825.js new file mode 100644 index 0000000..ffde275 --- /dev/null +++ b/_next/static/chunks/pages/customizations/custom-element-focus-handler-6940de1fd56f0825.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23508:function(e,t,n){"use strict";var r=n(91941);t.Z=void 0;var a=r(n(64938)),l=n(85893),i=(0,a.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=i},42851:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/custom-element-focus-handler",function(){return n(54038)}])},49072:function(e,t,n){"use strict";var r=n(85893),a=n(74065),l=n(29618),i=n(47028),u=n(23508),s=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r instanceof RegExp?(n.push("/"+r.source+"/"),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(l.Z,{expandIcon:(0,r.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,r.jsx)(i.Z,{children:(0,r.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,n){"use strict";var r=n(85893),a=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,r.jsx)("div",{children:(0,r.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,n){"use strict";var r=n(85893),a=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var r=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},54038:function(e,t,n){"use strict";n.r(t);var r=n(41799),a=n(69396),l=n(828),i=n(85893),u=n(67294),s=n(64459),o=n(69873),c=n(30612),d=n(75084),f=n(29620),h=n(77745),x=n(75017),m=n(73952),v=n(49072),p=n(2386),g=n(6630),j=function(e){var t=document.getElementById(e);if(t){var n=t.parentElement.parentElement;n.classList.add("element-shaking"),t.focus(),setTimeout(function(){n.classList.remove("element-shaking")},600)}else console.warn("Dom element with id ".concat(e," could not be found"))},_=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:7}]},{path:"val3",ruleSet:[{rule:"required"},{rule:"listSize",equalTo:2}]},{path:"textVal4",ruleSet:[{rule:"required"},{rule:"url"}]}];t.default=function(){var e=(0,s.c)({rules:_,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0,elementFocusHandler:j}),t=e.isValid,n=e.formData,V=e.setPathValue,Z=e.setFormIsSubmitted,E=e.setPathIsBlurred,S=e.getValue,N=e.getError,R=(0,l.Z)((0,u.useState)(!1),2),b=R[0],A=R[1];return(0,i.jsxs)(p.Z,{header:"elementFocusHandler",codeUrl:"pages/customizations/custom-element-focus-handler.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"elementFocusHandler"})," parameter is used to manually handle focusing to the first element with a validation error."]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"formField",children:[(0,i.jsx)(o.Z,{error:!!N("textVal1"),helperText:N("textVal1")||" ",label:"requiredField",type:"text",value:S("textVal1")||"",onChange:function(e){return V("textVal1",e.target.value)},onBlur:function(){return E("textVal1")},id:"textVal1"}),(0,i.jsx)(o.Z,{error:!!N("textVal2"),helperText:N("textVal2")||" ",label:"requiredAndLengthField",type:"text",value:S("textVal2")||"",onChange:function(e){return V("textVal2",e.target.value)},onBlur:function(){return E("textVal2")},id:"textVal2"}),(0,i.jsx)(c.Z,{multiple:!0,value:S("val3")||[],onChange:function(e,t){V("val3",t)},onBlur:function(){return E("val3")},options:x.Y,renderInput:function(e){return(0,i.jsx)(o.Z,(0,a.Z)((0,r.Z)({},e),{error:!!N("val3"),helperText:N("val3")||" ",label:"requiredAndListSize"}))},id:"val3"}),(0,i.jsx)(o.Z,{error:!!N("textVal4"),helperText:N("textVal4")||" ",label:"requiredAndUrl",type:"text",value:S("textVal4")||"",onChange:function(e){return V("textVal4",e.target.value)},onBlur:function(){return E("textVal4")},id:"textVal4"})]}),(0,i.jsx)("div",{children:(0,i.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){Z()&&A(!0)},children:"Submit Form"})}),(0,i.jsx)(m.Z,{isValid:t}),(0,i.jsx)(v.Z,{currentRules:_})]}),(0,i.jsxs)(f.Z,{open:b,onClose:function(){return A(!1)},children:[(0,i.jsx)(h.Z,{children:"Form Data Submitted"}),(0,i.jsx)(g.Z,{formData:n})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=42851)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/custom-element-focus-handler-de5c5b2bed393f71.js b/_next/static/chunks/pages/customizations/custom-element-focus-handler-de5c5b2bed393f71.js deleted file mode 100644 index 75a2135..0000000 --- a/_next/static/chunks/pages/customizations/custom-element-focus-handler-de5c5b2bed393f71.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23508:function(e,t,n){"use strict";var r=n(91941);t.Z=void 0;var a=r(n(64938)),l=n(85893),i=(0,a.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=i},42851:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/custom-element-focus-handler",function(){return n(54038)}])},49072:function(e,t,n){"use strict";var r=n(85893),a=n(74065),l=n(29618),i=n(47028),u=n(23508),s=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r instanceof RegExp?(n.push("/"+r.source+"/"),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(l.Z,{expandIcon:(0,r.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,r.jsx)(i.Z,{children:(0,r.jsx)("span",{className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,n){"use strict";var r=n(85893),a=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,r.jsx)("div",{children:(0,r.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,n){"use strict";var r=n(85893),a=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var r=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},54038:function(e,t,n){"use strict";n.r(t);var r=n(41799),a=n(69396),l=n(828),i=n(85893),u=n(67294),s=n(64459),o=n(69873),c=n(30612),d=n(75084),f=n(29620),h=n(77745),x=n(75017),m=n(73952),v=n(49072),p=n(2386),j=n(6630),g=function(e){var t=document.getElementById(e);if(t){var n=t.parentElement.parentElement;n.classList.add("element-shaking"),t.focus(),setTimeout(function(){n.classList.remove("element-shaking")},600)}else console.warn("Dom element with id ".concat(e," could not be found"))},_=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:7}]},{path:"val3",ruleSet:[{rule:"required"},{rule:"listSize",equalTo:2}]},{path:"textVal4",ruleSet:[{rule:"required"},{rule:"url"}]}];t.default=function(){var e=(0,s.c)({rules:_,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0,elementFocusHandler:g}),t=e.isValid,n=e.formData,V=e.setPathValue,Z=e.setFormIsSubmitted,E=e.setPathIsBlurred,S=e.getValue,N=e.getError,R=(0,l.Z)((0,u.useState)(!1),2),b=R[0],A=R[1];return(0,i.jsxs)(p.Z,{header:"elementFocusHandler",codeUrl:"pages/customizations/custom-element-focus-handler.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"elementFocusHandler"})," parameter is used to manually handle focusing to the first element with a validation error."]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"formField",children:[(0,i.jsx)(o.Z,{error:!!N("textVal1"),helperText:N("textVal1")||" ",label:"requiredField",type:"text",value:S("textVal1")||"",onChange:function(e){return V("textVal1",e.target.value)},onBlur:function(){return E("textVal1")},id:"textVal1"}),(0,i.jsx)(o.Z,{error:!!N("textVal2"),helperText:N("textVal2")||" ",label:"requiredAndLengthField",type:"text",value:S("textVal2")||"",onChange:function(e){return V("textVal2",e.target.value)},onBlur:function(){return E("textVal2")},id:"textVal2"}),(0,i.jsx)(c.Z,{multiple:!0,value:S("val3")||[],onChange:function(e,t){V("val3",t)},onBlur:function(){return E("val3")},options:x.Y,renderInput:function(e){return(0,i.jsx)(o.Z,(0,a.Z)((0,r.Z)({},e),{error:!!N("val3"),helperText:N("val3")||" ",label:"requiredAndListSize"}))},id:"val3"}),(0,i.jsx)(o.Z,{error:!!N("textVal4"),helperText:N("textVal4")||" ",label:"requiredAndUrl",type:"text",value:S("textVal4")||"",onChange:function(e){return V("textVal4",e.target.value)},onBlur:function(){return E("textVal4")},id:"textVal4"})]}),(0,i.jsx)("div",{children:(0,i.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){Z()&&A(!0)},children:"Submit Form"})}),(0,i.jsx)(m.Z,{isValid:t}),(0,i.jsx)(v.Z,{currentRules:_})]}),(0,i.jsxs)(f.Z,{open:b,onClose:function(){return A(!1)},children:[(0,i.jsx)(h.Z,{children:"Form Data Submitted"}),(0,i.jsx)(j.Z,{formData:n})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=42851)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/custom-message-14e0b0102df13680.js b/_next/static/chunks/pages/customizations/custom-message-14e0b0102df13680.js deleted file mode 100644 index 82c2f2d..0000000 --- a/_next/static/chunks/pages/customizations/custom-message-14e0b0102df13680.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9210],{23508:function(e,a,s){"use strict";var l=s(91941);a.Z=void 0;var t=l(s(64938)),n=s(85893),r=(0,t.default)((0,n.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");a.Z=r},21443:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/custom-message",function(){return s(77212)}])},49072:function(e,a,s){"use strict";var l=s(85893),t=s(74065),n=s(29618),r=s(47028),i=s(23508),u=function(e){var a="____PLACEHOLDER____",s=[];return JSON.stringify(e,function(e,l){return"function"==typeof l?(s.push(l),a):l instanceof RegExp?(s.push("/"+l.source+"/"),a):l},2).replace(RegExp('"'+a+'"',"g"),function(){return s.shift()})};a.Z=function(e){var a=e.currentRules,s=e.header;return(0,l.jsx)("div",{className:"currentRuleInfoDiv",children:(0,l.jsxs)(t.Z,{children:[(0,l.jsx)(n.Z,{expandIcon:(0,l.jsx)(i.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,l.jsx)("span",{className:"currentRuleLabel",children:void 0===s?"Current Rules":s})}),(0,l.jsx)(r.Z,{children:(0,l.jsx)("span",{className:"currentRuleString",children:u(a)})})]})})}},73952:function(e,a,s){"use strict";var l=s(85893),t=s(365);a.Z=function(e){var a,s=e.isValid,n="";return s?(a="".concat(t.O,"/valid.png"),n="valid"):(a="".concat(t.O,"/invalid.png"),n="invalid"),(0,l.jsxs)("div",{className:"validationResultDiv",children:[(0,l.jsx)("span",{children:"Validation Result: "}),(0,l.jsx)("img",{src:a,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,l.jsx)("span",{className:s?"validationResultInfoSuccess":"validationResultInfoFail",children:n})]})}},77212:function(e,a,s){"use strict";s.r(a);var l=s(85893),t=s(64459),n=s(69873),r=s(73952),i=s(49072),u=s(2386);s(67294);var o={val1:"a",val2:"a",val3:"s",val4:"sdd",checkVal:!1},c=[{path:"val1",ruleSet:["required",{rule:"length",greaterThan:8,customMessage:"This field's length is ${value}, however it should be greater than ${comparisonValue}"}]},{path:"val2",ruleSet:["required",{rule:"length",equalTo:5,customMessage:function(e){return e.value>e.comparisonValue?"This field's length should be ".concat(e.comparisonValue,", your input's (").concat(e.value,") is greater than this value"):"This field's length should be ".concat(e.comparisonValue,", your input's (").concat(e.value,") is less than this value")}}]},{path:"val3",ruleSet:["required",{rule:"myCustomRule2",customMessage:"Hello, this is myCustomRule2 customMessage. This field is not valid, because text ${value} should either include letter 'a' or its length should be greater than 4"}]},{path:"val4",ruleSet:[{rule:"required",customMessage:(0,l.jsxs)("span",{children:["This field is ",(0,l.jsx)("b",{children:" required "})]})},{rule:"length",equalTo:6,customMessage:function(e){return(0,l.jsxs)("span",{children:["This field","'","s length should be ",(0,l.jsxs)("b",{children:[e.comparisonValue," "]}),", your input length is"," ",(0,l.jsxs)("b",{children:[" ",e.value," "]})]})}}]}];a.default=function(){var e=(0,t.c)({rules:c,initialFormData:o}),a=e.isValid,s=e.setPathValue,h=e.getValue,d=e.getError;return(0,l.jsxs)(u.Z,{header:"customMessage",codeUrl:"pages/customizations/custom-message.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:["Validation error message of a rule can be customized by passing ",(0,l.jsx)("b",{children:"customMessage"})," param to the rule."]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)(n.Z,{error:!!d("val1"),helperText:d("val1")||" ",label:"val1 (customMessage as string)",type:"text",value:h("val1")||"",onChange:function(e){return s("val1",e.target.value)}})}),(0,l.jsx)("div",{children:(0,l.jsx)(n.Z,{error:!!d("val2"),helperText:d("val2")||" ",label:"val2 (customMessage as function)",type:"text",value:h("val2")||"",onChange:function(e){return s("val2",e.target.value)}})}),(0,l.jsx)("div",{children:(0,l.jsx)(n.Z,{error:!!d("val3"),helperText:d("val3")||" ",label:"val3 (customMessage for custom rule)",type:"text",value:h("val3")||"",onChange:function(e){return s("val3",e.target.value)}})}),(0,l.jsx)("div",{children:(0,l.jsx)(n.Z,{error:!!d("val4"),helperText:d("val4")||" ",label:"val4 (customMessage for jsx)",type:"text",value:h("val4")||"",onChange:function(e){return s("val4",e.target.value)}})}),(0,l.jsx)(r.Z,{isValid:a}),(0,l.jsx)(i.Z,{currentRules:c})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=21443)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/custom-message-4f9d8d63d0623f67.js b/_next/static/chunks/pages/customizations/custom-message-4f9d8d63d0623f67.js new file mode 100644 index 0000000..4bddb88 --- /dev/null +++ b/_next/static/chunks/pages/customizations/custom-message-4f9d8d63d0623f67.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9210],{23508:function(e,a,s){"use strict";var t=s(91941);a.Z=void 0;var l=t(s(64938)),n=s(85893),r=(0,l.default)((0,n.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");a.Z=r},21443:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/custom-message",function(){return s(77212)}])},49072:function(e,a,s){"use strict";var t=s(85893),l=s(74065),n=s(29618),r=s(47028),i=s(23508),u=function(e){var a="____PLACEHOLDER____",s=[];return JSON.stringify(e,function(e,t){return"function"==typeof t?(s.push(t),a):t instanceof RegExp?(s.push("/"+t.source+"/"),a):t},2).replace(RegExp('"'+a+'"',"g"),function(){return s.shift()})};a.Z=function(e){var a=e.currentRules,s=e.header;return(0,t.jsx)("div",{className:"currentRuleInfoDiv",children:(0,t.jsxs)(l.Z,{children:[(0,t.jsx)(n.Z,{expandIcon:(0,t.jsx)(i.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,t.jsx)("span",{className:"currentRuleLabel",children:void 0===s?"Current Rules":s})}),(0,t.jsx)(r.Z,{children:(0,t.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(a)})})]})})}},73952:function(e,a,s){"use strict";var t=s(85893),l=s(365);a.Z=function(e){var a,s=e.isValid,n="";return s?(a="".concat(l.O,"/valid.png"),n="valid"):(a="".concat(l.O,"/invalid.png"),n="invalid"),(0,t.jsxs)("div",{className:"validationResultDiv",children:[(0,t.jsx)("span",{children:"Validation Result: "}),(0,t.jsx)("img",{src:a,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,t.jsx)("span",{className:s?"validationResultInfoSuccess":"validationResultInfoFail",children:n})]})}},77212:function(e,a,s){"use strict";s.r(a);var t=s(85893),l=s(64459),n=s(69873),r=s(73952),i=s(49072),u=s(2386);s(67294);var o={val1:"a",val2:"a",val3:"s",val4:"sdd",checkVal:!1},c=[{path:"val1",ruleSet:["required",{rule:"length",greaterThan:8,customMessage:"This field's length is ${value}, however it should be greater than ${comparisonValue}"}]},{path:"val2",ruleSet:["required",{rule:"length",equalTo:5,customMessage:function(e){return e.value>e.comparisonValue?"This field's length should be ".concat(e.comparisonValue,", your input's (").concat(e.value,") is greater than this value"):"This field's length should be ".concat(e.comparisonValue,", your input's (").concat(e.value,") is less than this value")}}]},{path:"val3",ruleSet:["required",{rule:"myCustomRule2",customMessage:"Hello, this is myCustomRule2 customMessage. This field is not valid, because text ${value} should either include letter 'a' or its length should be greater than 4"}]},{path:"val4",ruleSet:[{rule:"required",customMessage:(0,t.jsxs)("span",{children:["This field is ",(0,t.jsx)("b",{children:" required "})]})},{rule:"length",equalTo:6,customMessage:function(e){return(0,t.jsxs)("span",{children:["This field","'","s length should be ",(0,t.jsxs)("b",{children:[e.comparisonValue," "]}),", your input length is"," ",(0,t.jsxs)("b",{children:[" ",e.value," "]})]})}}]}];a.default=function(){var e=(0,l.c)({rules:c,initialFormData:o}),a=e.isValid,s=e.setPathValue,h=e.getValue,d=e.getError;return(0,t.jsxs)(u.Z,{header:"customMessage",codeUrl:"pages/customizations/custom-message.js",children:[(0,t.jsxs)("p",{className:"infoParagraph",children:["Validation error message of a rule can be customized by passing ",(0,t.jsx)("b",{children:"customMessage"})," param to the rule."]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:(0,t.jsx)(n.Z,{error:!!d("val1"),helperText:d("val1")||" ",label:"val1 (customMessage as string)",type:"text",value:h("val1")||"",onChange:function(e){return s("val1",e.target.value)}})}),(0,t.jsx)("div",{children:(0,t.jsx)(n.Z,{error:!!d("val2"),helperText:d("val2")||" ",label:"val2 (customMessage as function)",type:"text",value:h("val2")||"",onChange:function(e){return s("val2",e.target.value)}})}),(0,t.jsx)("div",{children:(0,t.jsx)(n.Z,{error:!!d("val3"),helperText:d("val3")||" ",label:"val3 (customMessage for custom rule)",type:"text",value:h("val3")||"",onChange:function(e){return s("val3",e.target.value)}})}),(0,t.jsx)("div",{children:(0,t.jsx)(n.Z,{error:!!d("val4"),helperText:d("val4")||" ",label:"val4 (customMessage for jsx)",type:"text",value:h("val4")||"",onChange:function(e){return s("val4",e.target.value)}})}),(0,t.jsx)(r.Z,{isValid:a}),(0,t.jsx)(i.Z,{currentRules:c})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=21443)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/translations-727cba09c7a84744.js b/_next/static/chunks/pages/customizations/translations-727cba09c7a84744.js new file mode 100644 index 0000000..b977853 --- /dev/null +++ b/_next/static/chunks/pages/customizations/translations-727cba09c7a84744.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6288],{23508:function(e,a,n){"use strict";var r=n(91941);a.Z=void 0;var l=r(n(64938)),t=n(85893),i=(0,l.default)((0,t.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");a.Z=i},45822:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/translations",function(){return n(97547)}])},49072:function(e,a,n){"use strict";var r=n(85893),l=n(74065),t=n(29618),i=n(47028),s=n(23508),u=function(e){var a="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),a):r instanceof RegExp?(n.push("/"+r.source+"/"),a):r},2).replace(RegExp('"'+a+'"',"g"),function(){return n.shift()})};a.Z=function(e){var a=e.currentRules,n=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(l.Z,{children:[(0,r.jsx)(t.Z,{expandIcon:(0,r.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,r.jsx)(i.Z,{children:(0,r.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(a)})})]})})}},73952:function(e,a,n){"use strict";var r=n(85893),l=n(365);a.Z=function(e){var a,n=e.isValid,t="";return n?(a="".concat(l.O,"/valid.png"),t="valid"):(a="".concat(l.O,"/invalid.png"),t="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:a,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:t})]})}},97547:function(e,a,n){"use strict";n.r(a);var r=n(85893),l=n(64459),t=n(41664),i=n.n(t),s=n(69873),u=n(73952),c=n(49072),o=n(2386),d={val1:"",val2:"",val3:"not email",checkVal:!1},v=[{path:"val1",ruleSet:["required",{rule:"length",greaterThan:8}]},{path:"val2",ruleSet:["required",{rule:"length",equalTo:5}]},{path:"val3",ruleSet:["required","email"]}];a.default=function(){var e=(0,l.c)({rules:v,initialFormData:d}),a=e.isValid,n=e.setPathValue,t=e.getValue,h=e.getError;return(0,r.jsxs)(o.Z,{header:"translations",codeUrl:["pages/customizations/translations.js","pages/_app.js"],children:[(0,r.jsxs)("p",{className:"infoParagraph",children:["Validation error messages of any rules can be customized in app by passing ",(0,r.jsx)("b",{children:"translations"})," param to"," ",(0,r.jsx)(i(),{className:"inner-link",href:"/library-api/react-validatable-form-provider",children:"ReactValidatableFormProvider"}),"."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{error:!!h("val1"),helperText:h("val1")||" ",label:"val1 (requiredAndLengthGreaterThan)",type:"text",value:t("val1"),onChange:function(e){return n("val1",e.target.value)}})}),(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{error:!!h("val2"),helperText:h("val2")||" ",label:"val2 (requiredAndLengthEqualTo)",type:"text",value:t("val2"),onChange:function(e){return n("val2",e.target.value)}})}),(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{error:!!h("val3"),helperText:h("val3")||" ",label:"val3 (email)",type:"text",value:t("val3"),onChange:function(e){return n("val3",e.target.value)}})}),(0,r.jsx)(u.Z,{isValid:a}),(0,r.jsx)(c.Z,{currentRules:v})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=45822)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/customizations/translations-b416ffd3ef01c6c2.js b/_next/static/chunks/pages/customizations/translations-b416ffd3ef01c6c2.js deleted file mode 100644 index 8b71924..0000000 --- a/_next/static/chunks/pages/customizations/translations-b416ffd3ef01c6c2.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6288],{23508:function(e,a,n){"use strict";var r=n(91941);a.Z=void 0;var l=r(n(64938)),t=n(85893),i=(0,l.default)((0,t.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");a.Z=i},45822:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/customizations/translations",function(){return n(97547)}])},49072:function(e,a,n){"use strict";var r=n(85893),l=n(74065),t=n(29618),i=n(47028),s=n(23508),u=function(e){var a="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),a):r instanceof RegExp?(n.push("/"+r.source+"/"),a):r},2).replace(RegExp('"'+a+'"',"g"),function(){return n.shift()})};a.Z=function(e){var a=e.currentRules,n=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(l.Z,{children:[(0,r.jsx)(t.Z,{expandIcon:(0,r.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,r.jsx)(i.Z,{children:(0,r.jsx)("span",{className:"currentRuleString",children:u(a)})})]})})}},73952:function(e,a,n){"use strict";var r=n(85893),l=n(365);a.Z=function(e){var a,n=e.isValid,t="";return n?(a="".concat(l.O,"/valid.png"),t="valid"):(a="".concat(l.O,"/invalid.png"),t="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:a,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:t})]})}},97547:function(e,a,n){"use strict";n.r(a);var r=n(85893),l=n(64459),t=n(41664),i=n.n(t),s=n(69873),u=n(73952),c=n(49072),o=n(2386),d={val1:"",val2:"",val3:"not email",checkVal:!1},v=[{path:"val1",ruleSet:["required",{rule:"length",greaterThan:8}]},{path:"val2",ruleSet:["required",{rule:"length",equalTo:5}]},{path:"val3",ruleSet:["required","email"]}];a.default=function(){var e=(0,l.c)({rules:v,initialFormData:d}),a=e.isValid,n=e.setPathValue,t=e.getValue,h=e.getError;return(0,r.jsxs)(o.Z,{header:"translations",codeUrl:["pages/customizations/translations.js","pages/_app.js"],children:[(0,r.jsxs)("p",{className:"infoParagraph",children:["Validation error messages of any rules can be customized in app by passing ",(0,r.jsx)("b",{children:"translations"})," param to"," ",(0,r.jsx)(i(),{className:"inner-link",href:"/library-api/react-validatable-form-provider",children:"ReactValidatableFormProvider"}),"."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{error:!!h("val1"),helperText:h("val1")||" ",label:"val1 (requiredAndLengthGreaterThan)",type:"text",value:t("val1"),onChange:function(e){return n("val1",e.target.value)}})}),(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{error:!!h("val2"),helperText:h("val2")||" ",label:"val2 (requiredAndLengthEqualTo)",type:"text",value:t("val2"),onChange:function(e){return n("val2",e.target.value)}})}),(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{error:!!h("val3"),helperText:h("val3")||" ",label:"val3 (email)",type:"text",value:t("val3"),onChange:function(e){return n("val3",e.target.value)}})}),(0,r.jsx)(u.Z,{isValid:a}),(0,r.jsx)(c.Z,{currentRules:v})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=45822)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/antd-a3bf2e1680579fb2.js b/_next/static/chunks/pages/examples/antd-a3bf2e1680579fb2.js deleted file mode 100644 index 7920136..0000000 --- a/_next/static/chunks/pages/examples/antd-a3bf2e1680579fb2.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9127],{93584:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/antd",function(){return n(21293)}])},49072:function(e,t,n){"use strict";var r=n(85893),a=n(74065),l=n(29618),i=n(47028),s=n(23508),u=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r instanceof RegExp?(n.push("/"+r.source+"/"),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(l.Z,{expandIcon:(0,r.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,r.jsx)(i.Z,{children:(0,r.jsx)("span",{className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,n){"use strict";var r=n(85893),a=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,r.jsx)("div",{children:(0,r.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,n){"use strict";var r=n(85893),a=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var r=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},21293:function(e,t,n){"use strict";n.r(t);var r=n(828),a=n(85893),l=n(64459),i=n(67294),s=n(64509),u=n(68863),c=n(93601),o=n(71577),d=n(27548),x=n(73952),h=n(49072),f=n(2386),p=n(6630),m=n(75017),v=s.Z.Option,j=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}];t.default=function(){var e=(0,l.c)({rules:j,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,V=e.setPathValue,g=e.setFormIsSubmitted,_=e.setPathIsBlurred,y=e.getValue,Z=e.getError,N=(0,r.Z)((0,i.useState)(!1),2),b=N[0],S=N[1];return(0,a.jsxs)(f.Z,{header:"Example Usage with Ant Design Components",codeUrl:"pages/examples/antd.js",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(u.Z,{"aria-label":"Text1",type:"text",status:Z("textVal1")?"error":null,size:"large",placeholder:"Text1",value:y("textVal1")||"",onChange:function(e){return V("textVal1",e.target.value)},onBlur:function(){return _("textVal1")},id:"textVal1"}),Z("textVal1")?(0,a.jsxs)(c.Z.Text,{type:"danger",children:[" ",Z("textVal1")," "]}):(0,a.jsx)("div",{className:"my-antd-empty-feedback"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(u.Z,{type:"text",status:Z("textVal2")?"error":null,size:"large",placeholder:"Text2",value:y("textVal2")||"",onChange:function(e){return V("textVal2",e.target.value)},onBlur:function(){return _("textVal2")},id:"textVal2"}),Z("textVal2")?(0,a.jsxs)(c.Z.Text,{type:"danger",children:[" ",Z("textVal2")," "]}):(0,a.jsx)("div",{className:"my-antd-empty-feedback"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(u.Z,{type:"number",status:Z("numVal")?"error":null,size:"large",placeholder:"Num Val",value:y("numVal")||"",onChange:function(e){return V("numVal",e.target.value)},onBlur:function(){return _("numVal")},id:"numVal"}),Z("numVal")?(0,a.jsxs)(c.Z.Text,{type:"danger",children:[" ",Z("numVal")," "]}):(0,a.jsx)("div",{className:"my-antd-empty-feedback"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(s.Z,{id:"selectVal",mode:"multiple",size:"large",style:{width:"100%"},status:Z("selectVal")?"error":null,placeholder:"Select Val",onChange:function(e){V("selectVal",e)},optionLabelProp:"label",onBlur:function(){return _("selectVal")},children:m.Y.map(function(e){return(0,a.jsx)(v,{value:e,children:(0,a.jsx)("div",{children:e})},e)})}),Z("selectVal")?(0,a.jsxs)(c.Z.Text,{type:"danger",children:[" ",Z("selectVal")," "]}):(0,a.jsx)("div",{className:"my-antd-empty-feedback"})]}),(0,a.jsx)("div",{children:(0,a.jsx)(o.Z,{className:"mySubmitButton",onClick:function(){g()&&S(!0)},type:"primary",children:"Submit Form"})}),(0,a.jsx)(x.Z,{isValid:t}),(0,a.jsx)(h.Z,{currentRules:j})]}),(0,a.jsx)(d.Z,{title:"Form Data Submitted",visible:b,footer:null,onCancel:function(){return S(!1)},children:(0,a.jsx)(p.Z,{formData:n})})]})}}},function(e){e.O(0,[2202,9774,2888,179],function(){return e(e.s=93584)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/antd-ef04e1505a7b5a05.js b/_next/static/chunks/pages/examples/antd-ef04e1505a7b5a05.js new file mode 100644 index 0000000..4d46f49 --- /dev/null +++ b/_next/static/chunks/pages/examples/antd-ef04e1505a7b5a05.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9127],{93584:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/antd",function(){return n(21293)}])},49072:function(e,t,n){"use strict";var r=n(85893),a=n(74065),l=n(29618),i=n(47028),s=n(23508),u=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r instanceof RegExp?(n.push("/"+r.source+"/"),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(l.Z,{expandIcon:(0,r.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,r.jsx)(i.Z,{children:(0,r.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,n){"use strict";var r=n(85893),a=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,r.jsx)("div",{children:(0,r.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,n){"use strict";var r=n(85893),a=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var r=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},21293:function(e,t,n){"use strict";n.r(t);var r=n(828),a=n(85893),l=n(64459),i=n(67294),s=n(64509),u=n(68863),c=n(93601),o=n(71577),d=n(27548),x=n(73952),h=n(49072),f=n(2386),p=n(6630),m=n(75017),v=s.Z.Option,j=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}];t.default=function(){var e=(0,l.c)({rules:j,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,V=e.setPathValue,g=e.setFormIsSubmitted,_=e.setPathIsBlurred,y=e.getValue,Z=e.getError,N=(0,r.Z)((0,i.useState)(!1),2),b=N[0],S=N[1];return(0,a.jsxs)(f.Z,{header:"Example Usage with Ant Design Components",codeUrl:"pages/examples/antd.js",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(u.Z,{"aria-label":"Text1",type:"text",status:Z("textVal1")?"error":null,size:"large",placeholder:"Text1",value:y("textVal1")||"",onChange:function(e){return V("textVal1",e.target.value)},onBlur:function(){return _("textVal1")},id:"textVal1"}),Z("textVal1")?(0,a.jsxs)(c.Z.Text,{type:"danger",children:[" ",Z("textVal1")," "]}):(0,a.jsx)("div",{className:"my-antd-empty-feedback"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(u.Z,{type:"text",status:Z("textVal2")?"error":null,size:"large",placeholder:"Text2",value:y("textVal2")||"",onChange:function(e){return V("textVal2",e.target.value)},onBlur:function(){return _("textVal2")},id:"textVal2"}),Z("textVal2")?(0,a.jsxs)(c.Z.Text,{type:"danger",children:[" ",Z("textVal2")," "]}):(0,a.jsx)("div",{className:"my-antd-empty-feedback"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(u.Z,{type:"number",status:Z("numVal")?"error":null,size:"large",placeholder:"Num Val",value:y("numVal")||"",onChange:function(e){return V("numVal",e.target.value)},onBlur:function(){return _("numVal")},id:"numVal"}),Z("numVal")?(0,a.jsxs)(c.Z.Text,{type:"danger",children:[" ",Z("numVal")," "]}):(0,a.jsx)("div",{className:"my-antd-empty-feedback"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(s.Z,{id:"selectVal",mode:"multiple",size:"large",style:{width:"100%"},status:Z("selectVal")?"error":null,placeholder:"Select Val",onChange:function(e){V("selectVal",e)},optionLabelProp:"label",onBlur:function(){return _("selectVal")},children:m.Y.map(function(e){return(0,a.jsx)(v,{value:e,children:(0,a.jsx)("div",{children:e})},e)})}),Z("selectVal")?(0,a.jsxs)(c.Z.Text,{type:"danger",children:[" ",Z("selectVal")," "]}):(0,a.jsx)("div",{className:"my-antd-empty-feedback"})]}),(0,a.jsx)("div",{children:(0,a.jsx)(o.Z,{className:"mySubmitButton",onClick:function(){g()&&S(!0)},type:"primary",children:"Submit Form"})}),(0,a.jsx)(x.Z,{isValid:t}),(0,a.jsx)(h.Z,{currentRules:j})]}),(0,a.jsx)(d.Z,{title:"Form Data Submitted",visible:b,footer:null,onCancel:function(){return S(!1)},children:(0,a.jsx)(p.Z,{formData:n})})]})}}},function(e){e.O(0,[2202,9774,2888,179],function(){return e(e.s=93584)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/form-data-367827eed3249f70.js b/_next/static/chunks/pages/examples/form-data-367827eed3249f70.js deleted file mode 100644 index ac6eafe..0000000 --- a/_next/static/chunks/pages/examples/form-data-367827eed3249f70.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2181],{23508:function(e,t,r){"use strict";var n=r(91941);t.Z=void 0;var a=n(r(64938)),l=r(85893),u=(0,a.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=u},97702:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/form-data",function(){return r(33684)}])},49072:function(e,t,r){"use strict";var n=r(85893),a=r(74065),l=r(29618),u=r(47028),i=r(23508),s=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n instanceof RegExp?(r.push("/"+n.source+"/"),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{expandIcon:(0,n.jsx)(i.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(u.Z,{children:(0,n.jsx)("span",{className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,r){"use strict";var n=r(85893),a=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.formData;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,r){"use strict";var n=r(85893),a=r(365);t.Z=function(e){var t,r=e.isValid,l="";return r?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},33684:function(e,t,r){"use strict";r.r(t);var n=r(41799),a=r(69396),l=r(828),u=r(85893),i=r(67294),s=r(64459),c=r(69873),o=r(30612),d=r(75084),h=r(29620),f=r(77745),x=r(75017),p=r(73952),V=r(49072),m=r(2386),v=r(6630),j=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}],g=[{path:"textVal1",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:10}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:15}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}],S=[{path:"textVal1",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:13}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:25}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}];t.default=function(){var e=(0,s.c)({rules:j,focusToErrorAfterSubmit:!0}),t=e.isValid,r=e.formData,_=e.setPathValue,Z=e.setFormDataAndRules,E=e.setFormIsSubmitted,T=e.setPathIsBlurred,R=e.getValue,b=e.getError,N=(0,l.Z)((0,i.useState)(!1),2),q=N[0],C=N[1],D=(0,l.Z)((0,i.useState)(j),2),O=D[0],A=D[1],w=(0,l.Z)((0,i.useState)(0),2),y=w[0],I=w[1];(0,i.useEffect)(function(){setTimeout(function(){Z({textVal1:"aa",textVal2:"bb",numVal:5,selectVal:["Europe","South America"]},g),I(1),A(g)},2e3)},[]),(0,i.useEffect)(function(){setTimeout(function(){Z({textVal1:"aa",numVal:8,selectVal:["Europe"]},S),I(2),A(S)},4e3)},[]);var P=function(){E()&&C(!0)};return(0,u.jsxs)(m.Z,{header:"formData",codeUrl:"pages/examples/form-data.js",children:[(0,u.jsxs)("div",{children:[0===y?"Please wait for 2 seconds...":1===y?"Wait for another 2 seconds...":"Thanks for waiting 4 seconds",(0,u.jsx)("br",{}),(0,u.jsx)("br",{}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!b("textVal1"),helperText:b("textVal1")||" ",label:"Text1",type:"text",value:R("textVal1")||"",onChange:function(e){return _("textVal1",e.target.value)},onBlur:function(){return T("textVal1")},id:"textVal1"})}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!b("textVal2"),helperText:b("textVal2")||" ",label:"Text2",type:"text",value:R("textVal2")||"",onChange:function(e){return _("textVal2",e.target.value)},onBlur:function(){return T("textVal2")},id:"textVal2"})}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!b("numVal"),helperText:b("numVal")||" ",label:"Num Val",type:"number",value:R("numVal")||"",onChange:function(e){return _("numVal",e.target.value)},onBlur:function(){return T("numVal")},id:"numVal"})}),(0,u.jsx)("div",{children:(0,u.jsx)(o.Z,{id:"selectVal",onBlur:function(){return T("selectVal")},multiple:!0,value:R("selectVal")||[],onChange:function(e,t){_("selectVal",t)},options:x.Y,renderInput:function(e){return(0,u.jsx)(c.Z,(0,a.Z)((0,n.Z)({},e),{error:!!b("selectVal"),helperText:b("selectVal")||" ",label:"Select Val"}))}})}),(0,u.jsx)("div",{children:(0,u.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){return P()},children:"Submit Form"})}),(0,u.jsx)(p.Z,{isValid:t}),(0,u.jsx)(V.Z,{currentRules:r,header:"Current formData"}),(0,u.jsx)(V.Z,{currentRules:O})]}),(0,u.jsxs)(h.Z,{open:q,onClose:function(){return C(!1)},children:[(0,u.jsx)(f.Z,{children:"Form Data Submitted"}),(0,u.jsx)(v.Z,{formData:r})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=97702)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/form-data-3e459fc7df60ba6c.js b/_next/static/chunks/pages/examples/form-data-3e459fc7df60ba6c.js new file mode 100644 index 0000000..2afda76 --- /dev/null +++ b/_next/static/chunks/pages/examples/form-data-3e459fc7df60ba6c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2181],{23508:function(e,t,r){"use strict";var n=r(91941);t.Z=void 0;var a=n(r(64938)),l=r(85893),u=(0,a.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=u},97702:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/form-data",function(){return r(33684)}])},49072:function(e,t,r){"use strict";var n=r(85893),a=r(74065),l=r(29618),u=r(47028),i=r(23508),s=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n instanceof RegExp?(r.push("/"+n.source+"/"),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{expandIcon:(0,n.jsx)(i.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(u.Z,{children:(0,n.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,r){"use strict";var n=r(85893),a=function(e){var t="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),t):n},2).replace(RegExp('"'+t+'"',"g"),function(){return r.shift()})};t.Z=function(e){var t=e.formData;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,r){"use strict";var n=r(85893),a=r(365);t.Z=function(e){var t,r=e.isValid,l="";return r?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,r){"use strict";r.d(t,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},33684:function(e,t,r){"use strict";r.r(t);var n=r(41799),a=r(69396),l=r(828),u=r(85893),i=r(67294),s=r(64459),c=r(69873),o=r(30612),d=r(75084),h=r(29620),f=r(77745),x=r(75017),p=r(73952),V=r(49072),m=r(2386),v=r(6630),j=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}],g=[{path:"textVal1",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:10}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:15}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}],S=[{path:"textVal1",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:13}]},{path:"textVal2",ruleSet:[{rule:"required"},{rule:"length",greaterThanOrEqualTo:25}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}];t.default=function(){var e=(0,s.c)({rules:j,focusToErrorAfterSubmit:!0}),t=e.isValid,r=e.formData,_=e.setPathValue,Z=e.setFormDataAndRules,E=e.setFormIsSubmitted,T=e.setPathIsBlurred,R=e.getValue,b=e.getError,N=(0,l.Z)((0,i.useState)(!1),2),q=N[0],C=N[1],D=(0,l.Z)((0,i.useState)(j),2),O=D[0],A=D[1],w=(0,l.Z)((0,i.useState)(0),2),y=w[0],I=w[1];(0,i.useEffect)(function(){setTimeout(function(){Z({textVal1:"aa",textVal2:"bb",numVal:5,selectVal:["Europe","South America"]},g),I(1),A(g)},2e3)},[]),(0,i.useEffect)(function(){setTimeout(function(){Z({textVal1:"aa",numVal:8,selectVal:["Europe"]},S),I(2),A(S)},4e3)},[]);var P=function(){E()&&C(!0)};return(0,u.jsxs)(m.Z,{header:"formData",codeUrl:"pages/examples/form-data.js",children:[(0,u.jsxs)("div",{children:[0===y?"Please wait for 2 seconds...":1===y?"Wait for another 2 seconds...":"Thanks for waiting 4 seconds",(0,u.jsx)("br",{}),(0,u.jsx)("br",{}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!b("textVal1"),helperText:b("textVal1")||" ",label:"Text1",type:"text",value:R("textVal1")||"",onChange:function(e){return _("textVal1",e.target.value)},onBlur:function(){return T("textVal1")},id:"textVal1"})}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!b("textVal2"),helperText:b("textVal2")||" ",label:"Text2",type:"text",value:R("textVal2")||"",onChange:function(e){return _("textVal2",e.target.value)},onBlur:function(){return T("textVal2")},id:"textVal2"})}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!b("numVal"),helperText:b("numVal")||" ",label:"Num Val",type:"number",value:R("numVal")||"",onChange:function(e){return _("numVal",e.target.value)},onBlur:function(){return T("numVal")},id:"numVal"})}),(0,u.jsx)("div",{children:(0,u.jsx)(o.Z,{id:"selectVal",onBlur:function(){return T("selectVal")},multiple:!0,value:R("selectVal")||[],onChange:function(e,t){_("selectVal",t)},options:x.Y,renderInput:function(e){return(0,u.jsx)(c.Z,(0,a.Z)((0,n.Z)({},e),{error:!!b("selectVal"),helperText:b("selectVal")||" ",label:"Select Val"}))}})}),(0,u.jsx)("div",{children:(0,u.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){return P()},children:"Submit Form"})}),(0,u.jsx)(p.Z,{isValid:t}),(0,u.jsx)(V.Z,{currentRules:r,header:"Current formData"}),(0,u.jsx)(V.Z,{currentRules:O})]}),(0,u.jsxs)(h.Z,{open:q,onClose:function(){return C(!1)},children:[(0,u.jsx)(f.Z,{children:"Form Data Submitted"}),(0,u.jsx)(v.Z,{formData:r})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=97702)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/is-path-valid-44dbb74a63d84b8c.js b/_next/static/chunks/pages/examples/is-path-valid-44dbb74a63d84b8c.js deleted file mode 100644 index 5aabd68..0000000 --- a/_next/static/chunks/pages/examples/is-path-valid-44dbb74a63d84b8c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2877],{94219:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/is-path-valid",function(){return n(67314)}])},49072:function(e,t,n){"use strict";var a=n(85893),r=n(74065),l=n(29618),i=n(47028),s=n(23508),u=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(n.push(a),t):a instanceof RegExp?(n.push("/"+a.source+"/"),t):a},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(r.Z,{children:[(0,a.jsx)(l.Z,{expandIcon:(0,a.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,a.jsx)(i.Z,{children:(0,a.jsx)("span",{className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,n){"use strict";var a=n(85893),r=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(n.push(a),t):a},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"formDataString",children:r(t)})})}},73952:function(e,t,n){"use strict";var a=n(85893),r=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(r.O,"/valid.png"),l="valid"):(t="".concat(r.O,"/invalid.png"),l="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});var a=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},67314:function(e,t,n){"use strict";n.r(t);var a=n(828),r=n(85893),l=n(67294),i=n(64459),s=n(65447),u=n(93680),c=n(29620),o=n(77745),d=n(75017),x=n(73952),h=n(49072),f=n(2386),p=n(6630),m=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}];t.default=function(){var e=(0,i.c)({rules:m,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,v=e.setPathValue,V=e.setFormIsSubmitted,j=e.setPathIsBlurred,Z=e.getValue,_=e.getError,b=e.isPathValid,g=(0,a.Z)((0,l.useState)(!1),2),N=g[0],y=g[1],S=function(){V()&&y(!0)};return(0,r.jsxs)(f.Z,{header:"isPathValid",codeUrl:"pages/examples/is-path-valid.js",children:[(0,r.jsxs)(s.Z,{className:"my-bootstrap-form",children:[(0,r.jsxs)(s.Z.Group,{controlId:"textVal1",children:[(0,r.jsx)(s.Z.Label,{children:"Text1"}),(0,r.jsx)(s.Z.Control,{placeholder:"Text1",value:Z("textVal1")||"",onBlur:function(){return j("textVal1")},onChange:function(e){return v("textVal1",e.target.value)},isInvalid:!!_("textVal1"),isValid:b("textVal1")}),_("textVal1")?(0,r.jsx)(s.Z.Control.Feedback,{type:"invalid",children:_("textVal1")||" "}):(0,r.jsx)("div",{className:"my-bootstrap-empty-feedback"})]}),(0,r.jsxs)(s.Z.Group,{controlId:"textVal2",children:[(0,r.jsx)(s.Z.Label,{children:"Text2"}),(0,r.jsx)(s.Z.Control,{placeholder:"Text2",value:Z("textVal2")||"",onBlur:function(){return j("textVal2")},onChange:function(e){return v("textVal2",e.target.value)},isInvalid:!!_("textVal2"),isValid:b("textVal2")}),_("textVal2")?(0,r.jsx)(s.Z.Control.Feedback,{type:"invalid",children:_("textVal2")||" "}):(0,r.jsx)("div",{className:"my-bootstrap-empty-feedback"})]}),(0,r.jsxs)(s.Z.Group,{controlId:"numVal",children:[(0,r.jsx)(s.Z.Label,{children:"Num Val"}),(0,r.jsx)(s.Z.Control,{type:"number",placeholder:"Num Val",value:Z("numVal")||"",onBlur:function(){return j("numVal")},onChange:function(e){return v("numVal",e.target.value)},isInvalid:!!_("numVal"),isValid:b("numVal")}),_("numVal")?(0,r.jsx)(s.Z.Control.Feedback,{type:"invalid",children:_("numVal")||" "}):(0,r.jsx)("div",{className:"my-bootstrap-empty-feedback"})]}),(0,r.jsxs)(s.Z.Group,{controlId:"selectVal",children:[(0,r.jsx)(s.Z.Label,{children:"Select Val"}),(0,r.jsxs)(s.Z.Select,{value:Z("selectVal")||"",onBlur:function(){return j("selectVal")},onChange:function(e){return v("selectVal",e.target.value)},isInvalid:!!_("selectVal"),isValid:b("selectVal"),children:[(0,r.jsx)("option",{value:"",children:""},"empty"),d.Y.map(function(e){return(0,r.jsx)("option",{value:e,children:e},e)})]}),_("selectVal")?(0,r.jsx)(s.Z.Control.Feedback,{type:"invalid",children:_("selectVal")||" "}):(0,r.jsx)("div",{className:"my-bootstrap-empty-feedback"})]}),(0,r.jsx)(u.Z,{className:"mySubmitButton",variant:"primary",onClick:function(){return S()},children:"Submit"}),(0,r.jsx)(x.Z,{isValid:t}),(0,r.jsx)(h.Z,{currentRules:m})]}),(0,r.jsxs)(c.Z,{open:N,onClose:function(){return y(!1)},children:[(0,r.jsx)(o.Z,{children:"Form Data Submitted"}),(0,r.jsx)(p.Z,{formData:n})]})]})}}},function(e){e.O(0,[4057,9774,2888,179],function(){return e(e.s=94219)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/is-path-valid-778d1acd143d0634.js b/_next/static/chunks/pages/examples/is-path-valid-778d1acd143d0634.js new file mode 100644 index 0000000..3800eb5 --- /dev/null +++ b/_next/static/chunks/pages/examples/is-path-valid-778d1acd143d0634.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2877],{94219:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/is-path-valid",function(){return n(67314)}])},49072:function(e,t,n){"use strict";var a=n(85893),r=n(74065),l=n(29618),i=n(47028),s=n(23508),u=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(n.push(a),t):a instanceof RegExp?(n.push("/"+a.source+"/"),t):a},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(r.Z,{children:[(0,a.jsx)(l.Z,{expandIcon:(0,a.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,a.jsx)(i.Z,{children:(0,a.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,n){"use strict";var a=n(85893),r=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(n.push(a),t):a},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"formDataString",children:r(t)})})}},73952:function(e,t,n){"use strict";var a=n(85893),r=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(r.O,"/valid.png"),l="valid"):(t="".concat(r.O,"/invalid.png"),l="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});var a=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},67314:function(e,t,n){"use strict";n.r(t);var a=n(828),r=n(85893),l=n(67294),i=n(64459),s=n(65447),u=n(93680),c=n(29620),o=n(77745),d=n(75017),x=n(73952),h=n(49072),p=n(2386),f=n(6630),m=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}];t.default=function(){var e=(0,i.c)({rules:m,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,v=e.setPathValue,V=e.setFormIsSubmitted,j=e.setPathIsBlurred,Z=e.getValue,_=e.getError,b=e.isPathValid,g=(0,a.Z)((0,l.useState)(!1),2),N=g[0],y=g[1],S=function(){V()&&y(!0)};return(0,r.jsxs)(p.Z,{header:"isPathValid",codeUrl:"pages/examples/is-path-valid.js",children:[(0,r.jsxs)(s.Z,{className:"my-bootstrap-form",children:[(0,r.jsxs)(s.Z.Group,{controlId:"textVal1",children:[(0,r.jsx)(s.Z.Label,{children:"Text1"}),(0,r.jsx)(s.Z.Control,{placeholder:"Text1",value:Z("textVal1")||"",onBlur:function(){return j("textVal1")},onChange:function(e){return v("textVal1",e.target.value)},isInvalid:!!_("textVal1"),isValid:b("textVal1")}),_("textVal1")?(0,r.jsx)(s.Z.Control.Feedback,{type:"invalid",children:_("textVal1")||" "}):(0,r.jsx)("div",{className:"my-bootstrap-empty-feedback"})]}),(0,r.jsxs)(s.Z.Group,{controlId:"textVal2",children:[(0,r.jsx)(s.Z.Label,{children:"Text2"}),(0,r.jsx)(s.Z.Control,{placeholder:"Text2",value:Z("textVal2")||"",onBlur:function(){return j("textVal2")},onChange:function(e){return v("textVal2",e.target.value)},isInvalid:!!_("textVal2"),isValid:b("textVal2")}),_("textVal2")?(0,r.jsx)(s.Z.Control.Feedback,{type:"invalid",children:_("textVal2")||" "}):(0,r.jsx)("div",{className:"my-bootstrap-empty-feedback"})]}),(0,r.jsxs)(s.Z.Group,{controlId:"numVal",children:[(0,r.jsx)(s.Z.Label,{children:"Num Val"}),(0,r.jsx)(s.Z.Control,{type:"number",placeholder:"Num Val",value:Z("numVal")||"",onBlur:function(){return j("numVal")},onChange:function(e){return v("numVal",e.target.value)},isInvalid:!!_("numVal"),isValid:b("numVal")}),_("numVal")?(0,r.jsx)(s.Z.Control.Feedback,{type:"invalid",children:_("numVal")||" "}):(0,r.jsx)("div",{className:"my-bootstrap-empty-feedback"})]}),(0,r.jsxs)(s.Z.Group,{controlId:"selectVal",children:[(0,r.jsx)(s.Z.Label,{children:"Select Val"}),(0,r.jsxs)(s.Z.Select,{value:Z("selectVal")||"",onBlur:function(){return j("selectVal")},onChange:function(e){return v("selectVal",e.target.value)},isInvalid:!!_("selectVal"),isValid:b("selectVal"),children:[(0,r.jsx)("option",{value:"",children:""},"empty"),d.Y.map(function(e){return(0,r.jsx)("option",{value:e,children:e},e)})]}),_("selectVal")?(0,r.jsx)(s.Z.Control.Feedback,{type:"invalid",children:_("selectVal")||" "}):(0,r.jsx)("div",{className:"my-bootstrap-empty-feedback"})]}),(0,r.jsx)(u.Z,{className:"mySubmitButton",variant:"primary",onClick:function(){return S()},children:"Submit"}),(0,r.jsx)(x.Z,{isValid:t}),(0,r.jsx)(h.Z,{currentRules:m})]}),(0,r.jsxs)(c.Z,{open:N,onClose:function(){return y(!1)},children:[(0,r.jsx)(o.Z,{children:"Form Data Submitted"}),(0,r.jsx)(f.Z,{formData:n})]})]})}}},function(e){e.O(0,[4057,9774,2888,179],function(){return e(e.s=94219)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/mui-b2fbc642326820d7.js b/_next/static/chunks/pages/examples/mui-b2fbc642326820d7.js deleted file mode 100644 index 83123d9..0000000 --- a/_next/static/chunks/pages/examples/mui-b2fbc642326820d7.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5471],{23508:function(e,t,n){"use strict";var r=n(91941);t.Z=void 0;var a=r(n(64938)),l=n(85893),u=(0,a.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=u},82675:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/mui",function(){return n(26845)}])},49072:function(e,t,n){"use strict";var r=n(85893),a=n(74065),l=n(29618),u=n(47028),i=n(23508),s=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r instanceof RegExp?(n.push("/"+r.source+"/"),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(l.Z,{expandIcon:(0,r.jsx)(i.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,r.jsx)(u.Z,{children:(0,r.jsx)("span",{className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,n){"use strict";var r=n(85893),a=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,r.jsx)("div",{children:(0,r.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,n){"use strict";var r=n(85893),a=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var r=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},26845:function(e,t,n){"use strict";n.r(t);var r=n(41799),a=n(69396),l=n(828),u=n(85893),i=n(67294),s=n(64459),c=n(69873),o=n(30612),d=n(75084),x=n(29620),f=n(77745),h=n(75017),p=n(73952),v=n(49072),m=n(2386),V=n(6630),j=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}];t.default=function(){var e=(0,s.c)({rules:j,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,_=e.setPathValue,g=e.setFormIsSubmitted,Z=e.setPathIsBlurred,S=e.getValue,E=e.getError,N=(0,l.Z)((0,i.useState)(!1),2),R=N[0],b=N[1],C=function(){g()&&b(!0)};return(0,u.jsxs)(m.Z,{header:"Example Usage with MUI Components",codeUrl:"pages/examples/mui.js",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!E("textVal1"),helperText:E("textVal1")||" ",label:"Text1",type:"text",value:S("textVal1")||"",onChange:function(e){return _("textVal1",e.target.value)},onBlur:function(){return Z("textVal1")},id:"textVal1"})}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!E("textVal2"),helperText:E("textVal2")||" ",label:"Text2",type:"text",value:S("textVal2")||"",onChange:function(e){return _("textVal2",e.target.value)},onBlur:function(){return Z("textVal2")},id:"textVal2"})}),(0,u.jsx)("div",{children:(0,u.jsx)(c.Z,{error:!!E("numVal"),helperText:E("numVal")||" ",label:"Num Val",type:"number",value:S("numVal")||"",onChange:function(e){return _("numVal",e.target.value)},onBlur:function(){return Z("numVal")},id:"numVal"})}),(0,u.jsx)("div",{children:(0,u.jsx)(o.Z,{id:"selectVal",onBlur:function(){return Z("selectVal")},multiple:!0,value:S("selectVal")||[],onChange:function(e,t){_("selectVal",t)},options:h.Y,renderInput:function(e){return(0,u.jsx)(c.Z,(0,a.Z)((0,r.Z)({},e),{error:!!E("selectVal"),helperText:E("selectVal")||" ",label:"Select Val"}))}})}),(0,u.jsx)("div",{children:(0,u.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){return C()},children:"Submit Form"})}),(0,u.jsx)(p.Z,{isValid:t}),(0,u.jsx)(v.Z,{currentRules:j})]}),(0,u.jsxs)(x.Z,{open:R,onClose:function(){return b(!1)},children:[(0,u.jsx)(f.Z,{children:"Form Data Submitted"}),(0,u.jsx)(V.Z,{formData:n})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=82675)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/mui-ee5d31bc8b679ba6.js b/_next/static/chunks/pages/examples/mui-ee5d31bc8b679ba6.js new file mode 100644 index 0000000..fe68771 --- /dev/null +++ b/_next/static/chunks/pages/examples/mui-ee5d31bc8b679ba6.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5471],{23508:function(e,t,n){"use strict";var r=n(91941);t.Z=void 0;var a=r(n(64938)),l=n(85893),i=(0,a.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=i},82675:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/mui",function(){return n(26845)}])},49072:function(e,t,n){"use strict";var r=n(85893),a=n(74065),l=n(29618),i=n(47028),u=n(23508),s=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r instanceof RegExp?(n.push("/"+r.source+"/"),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(l.Z,{expandIcon:(0,r.jsx)(u.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,r.jsx)(i.Z,{children:(0,r.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:s(t)})})]})})}},6630:function(e,t,n){"use strict";var r=n(85893),a=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(n.push(r),t):r},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,r.jsx)("div",{children:(0,r.jsx)("span",{className:"formDataString",children:a(t)})})}},73952:function(e,t,n){"use strict";var r=n(85893),a=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(a.O,"/valid.png"),l="valid"):(t="".concat(a.O,"/invalid.png"),l="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var r=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},26845:function(e,t,n){"use strict";n.r(t);var r=n(41799),a=n(69396),l=n(828),i=n(85893),u=n(67294),s=n(64459),c=n(69873),o=n(30612),d=n(75084),x=n(29620),f=n(77745),h=n(75017),p=n(73952),v=n(49072),m=n(2386),V=n(6630),j=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}];t.default=function(){var e=(0,s.c)({rules:j,hideBeforeSubmit:!0,showAfterBlur:!0,focusToErrorAfterSubmit:!0}),t=e.isValid,n=e.formData,_=e.setPathValue,g=e.setFormIsSubmitted,Z=e.setPathIsBlurred,S=e.getValue,E=e.getError,N=(0,l.Z)((0,u.useState)(!1),2),R=N[0],b=N[1],C=function(){g()&&b(!0)};return(0,i.jsxs)(m.Z,{header:"Example Usage with MUI Components",codeUrl:"pages/examples/mui.js",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,{error:!!E("textVal1"),helperText:E("textVal1")||" ",label:"Text1",type:"text",value:S("textVal1")||"",onChange:function(e){return _("textVal1",e.target.value)},onBlur:function(){return Z("textVal1")},id:"textVal1"})}),(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,{error:!!E("textVal2"),helperText:E("textVal2")||" ",label:"Text2",type:"text",value:S("textVal2")||"",onChange:function(e){return _("textVal2",e.target.value)},onBlur:function(){return Z("textVal2")},id:"textVal2"})}),(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,{error:!!E("numVal"),helperText:E("numVal")||" ",label:"Num Val",type:"number",value:S("numVal")||"",onChange:function(e){return _("numVal",e.target.value)},onBlur:function(){return Z("numVal")},id:"numVal"})}),(0,i.jsx)("div",{children:(0,i.jsx)(o.Z,{id:"selectVal",onBlur:function(){return Z("selectVal")},multiple:!0,value:S("selectVal")||[],onChange:function(e,t){_("selectVal",t)},options:h.Y,renderInput:function(e){return(0,i.jsx)(c.Z,(0,a.Z)((0,r.Z)({},e),{error:!!E("selectVal"),helperText:E("selectVal")||" ",label:"Select Val"}))}})}),(0,i.jsx)("div",{children:(0,i.jsx)(d.Z,{className:"mySubmitButton",variant:"contained",onClick:function(){return C()},children:"Submit Form"})}),(0,i.jsx)(p.Z,{isValid:t}),(0,i.jsx)(v.Z,{currentRules:j})]}),(0,i.jsxs)(x.Z,{open:R,onClose:function(){return b(!1)},children:[(0,i.jsx)(f.Z,{children:"Form Data Submitted"}),(0,i.jsx)(V.Z,{formData:n})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=82675)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/examples/prime-react-2fb62372cbbf7909.js b/_next/static/chunks/pages/examples/prime-react-2fb62372cbbf7909.js new file mode 100644 index 0000000..3ad35f7 --- /dev/null +++ b/_next/static/chunks/pages/examples/prime-react-2fb62372cbbf7909.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[835],{54729:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/examples/prime-react",function(){return n(89398)}])},49072:function(e,t,n){"use strict";var a=n(85893),r=n(74065),l=n(29618),i=n(47028),s=n(23508),u=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(n.push(a),t):a instanceof RegExp?(n.push("/"+a.source+"/"),t):a},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.currentRules,n=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(r.Z,{children:[(0,a.jsx)(l.Z,{expandIcon:(0,a.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,a.jsx)(i.Z,{children:(0,a.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(t)})})]})})}},6630:function(e,t,n){"use strict";var a=n(85893),r=function(e){var t="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(n.push(a),t):a},2).replace(RegExp('"'+t+'"',"g"),function(){return n.shift()})};t.Z=function(e){var t=e.formData;return(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"formDataString",children:r(t)})})}},73952:function(e,t,n){"use strict";var a=n(85893),r=n(365);t.Z=function(e){var t,n=e.isValid,l="";return n?(t="".concat(r.O,"/valid.png"),l="valid"):(t="".concat(r.O,"/invalid.png"),l="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:t,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},75017:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});var a=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},89398:function(e,t,n){"use strict";n.r(t);var a=n(828),r=n(85893),l=n(67294),i=n(64459),s=n(25600),u=n(91176),c=n(99403),o=n(97465),d=n(63861),m=n(75017),h=n(73952),f=n(49072),x=n(2386),p=n(6630),v=[{path:"textVal1",ruleSet:[{rule:"required"}]},{path:"textVal2",ruleSet:[{rule:"required"}]},{path:"numVal",ruleSet:[{rule:"required"}]},{path:"selectVal",ruleSet:[{rule:"required"}]}],V=function(e){var t=document.getElementById(e);if(t){if("INPUT"===t.tagName.toUpperCase())t.focus();else for(var n=t.getElementsByTagName("INPUT"),a=0;a{let{classes:a,row:r,error:n}=e;return(0,s.Z)({root:["root",r&&"row",n&&"error"]},f,a)},m=(0,u.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,a){let{ownerState:r}=e;return[a.root,r.row&&a.row]}})(({ownerState:e})=>(0,l.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),x=o.forwardRef(function(e,a){let r=(0,i.Z)({props:e,name:"MuiFormGroup"}),{className:o,row:s=!1}=r,u=(0,n.Z)(r,O),c=(0,p.Z)(),f=(0,v.Z)({props:r,muiFormControl:c,states:["error"]}),x=(0,l.Z)({},r,{row:s,error:f.error}),N=h(x);return(0,d.jsx)(m,(0,l.Z)({className:(0,t.Z)(N.root,o),ownerState:x,ref:a},u))});var N=x},25369:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/equality",function(){return r(22314)}])},49072:function(e,a,r){"use strict";var n=r(85893),l=r(74065),o=r(29618),t=r(47028),s=r(23508),u=function(e){var a="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),a):n instanceof RegExp?(r.push("/"+n.source+"/"),a):n},2).replace(RegExp('"'+a+'"',"g"),function(){return r.shift()})};a.Z=function(e){var a=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(l.Z,{children:[(0,n.jsx)(o.Z,{expandIcon:(0,n.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(t.Z,{children:(0,n.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(a)})})]})})}},73952:function(e,a,r){"use strict";var n=r(85893),l=r(365);a.Z=function(e){var a,r=e.isValid,o="";return r?(a="".concat(l.O,"/valid.png"),o="valid"):(a="".concat(l.O,"/invalid.png"),o="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:a,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:o})]})}},75017:function(e,a,r){"use strict";r.d(a,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},22314:function(e,a,r){"use strict";r.r(a);var n=r(41799),l=r(69396),o=r(85893),t=r(64459),s=r(2386),u=r(69873),i=r(73952),c=r(49072),f=r(22416),p=r(55343),v=r(22841),d=r(31362),O=r(32631),h=r(30612),m=r(75017),x={val:!1,val2:"aa",val3:"bb",comparisonValueEqualTo:"aba",comparisonValueNotEqualTo:"aba",valIsOneOf1:"Asia",valIsOneOf2:"Asia",valIsOneOf3:"Asia",valIsOneOf4:"Asia",comparisonValueIsOneOf:["North America","Africa","Europe"],comparisonValueIsNoneOf:["North America","Africa","Europe"]},N=[{path:"val",ruleSet:[{rule:"required"},{rule:"equality",equalTo:!0}]},{path:"val2",ruleSet:[{rule:"required"},{rule:"equality",equalTo:function(e){return e.comparisonValueEqualTo}}],dependantPaths:["comparisonValueEqualTo"]},{path:"val3",ruleSet:[{rule:"required"},{rule:"equality",notEqualTo:function(e){return e.comparisonValueNotEqualTo}}],dependantPaths:["comparisonValueNotEqualTo"]},{path:"valIsOneOf1",ruleSet:[{rule:"required"},{rule:"equality",isOneOf:["North America","Africa","Europe"]}]},{path:"valIsOneOf2",ruleSet:[{rule:"required"},{rule:"equality",isOneOf:function(e){return e.comparisonValueIsOneOf}}],dependantPaths:["comparisonValueIsOneOf"]},{path:"valIsOneOf3",ruleSet:[{rule:"required"},{rule:"equality",isNoneOf:["North America","Africa","Europe"]}],dependantPaths:["comparisonValueIsNoneOf"]},{path:"valIsOneOf4",ruleSet:[{rule:"required"},{rule:"equality",isNoneOf:function(e){return e.comparisonValueIsNoneOf}}],dependantPaths:["comparisonValueIsNoneOf"]}];a.default=function(){var e=(0,t.c)({rules:N,initialFormData:x}),a=e.isValid,r=e.setPathValue,Z=e.getValue,I=e.getError;return(0,o.jsxs)(s.Z,{header:"equality",codeUrl:"pages/rules/equality.js",children:[(0,o.jsxs)("p",{className:"infoParagraph",children:[(0,o.jsx)("b",{children:"equality"})," rule checks if the given value is equal to comparison value."]}),(0,o.jsx)("div",{children:(0,o.jsx)(f.Z,{className:"checkboxOnRight",children:(0,o.jsx)(p.Z,{error:!!I("val"),children:(0,o.jsx)(v.Z,{control:(0,o.jsx)(d.Z,{checked:Z("val")||!1,onChange:function(e){return r("val",e.target.checked)}}),label:(0,o.jsx)(O.Z,{children:I("val")||" "})})})})}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("val2"),helperText:I("val2")||" ",label:"equalTo",type:"text",value:Z("val2")||"",onChange:function(e){return r("val2",e.target.value)}}),(0,o.jsx)(u.Z,{className:"comparisonComponent",label:"comparisonValueEqualTo",type:"text",value:Z("comparisonValueEqualTo"),onChange:function(e){return r("comparisonValueEqualTo",e.target.value)}})]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("val3"),helperText:I("val3")||" ",label:"notEqualTo",type:"text",value:Z("val3")||"",onChange:function(e){return r("val3",e.target.value)}}),(0,o.jsx)(u.Z,{className:"comparisonComponent",label:"comparisonValueNotEqualTo",type:"text",value:Z("comparisonValueNotEqualTo"),onChange:function(e){return r("comparisonValueNotEqualTo",e.target.value)}})]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("valIsOneOf1"),helperText:I("valIsOneOf1")||" ",label:"isOneOf",type:"text",value:Z("valIsOneOf1")||"",onChange:function(e){return r("valIsOneOf1",e.target.value)}}),"['North America', 'Africa', 'Europe']"]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("valIsOneOf2"),helperText:I("valIsOneOf2")||" ",label:"isOneOf",type:"text",value:Z("valIsOneOf2")||"",onChange:function(e){return r("valIsOneOf2",e.target.value)}}),(0,o.jsx)(h.Z,{multiple:!0,value:Z("comparisonValueIsOneOf"),onChange:function(e,a){r("comparisonValueIsOneOf",a)},options:m.Y,renderInput:function(e){return(0,o.jsx)(u.Z,(0,l.Z)((0,n.Z)({},e),{label:"comparisonValueIsOneOf"}))}})]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("valIsOneOf3"),helperText:I("valIsOneOf3")||" ",label:"isNoneOf",type:"text",value:Z("valIsOneOf3")||"",onChange:function(e){return r("valIsOneOf3",e.target.value)}}),"['North America', 'Africa', 'Europe']"]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("valIsOneOf4"),helperText:I("valIsOneOf4")||" ",label:"isNoneOf",type:"text",value:Z("valIsOneOf4")||"",onChange:function(e){return r("valIsOneOf4",e.target.value)}}),(0,o.jsx)(h.Z,{multiple:!0,value:Z("comparisonValueIsNoneOf"),onChange:function(e,a){r("comparisonValueIsNoneOf",a)},options:m.Y,renderInput:function(e){return(0,o.jsx)(u.Z,(0,l.Z)((0,n.Z)({},e),{label:"comparisonValueIsNoneOf"}))}})]}),(0,o.jsx)(i.Z,{isValid:a}),(0,o.jsx)(c.Z,{currentRules:N})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=25369)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/equality-bab54b40785c2d7c.js b/_next/static/chunks/pages/rules/equality-bab54b40785c2d7c.js deleted file mode 100644 index 6fe2661..0000000 --- a/_next/static/chunks/pages/rules/equality-bab54b40785c2d7c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[629],{23508:function(e,a,r){"use strict";var n=r(91941);a.Z=void 0;var l=n(r(64938)),o=r(85893),t=(0,l.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");a.Z=t},22416:function(e,a,r){"use strict";r.d(a,{Z:function(){return N}});var n=r(1048),l=r(32793),o=r(67294),t=r(86010),s=r(94780),u=r(67074),i=r(6446),c=r(34867);function f(e){return(0,c.Z)("MuiFormGroup",e)}(0,r(1588).Z)("MuiFormGroup",["root","row","error"]);var p=r(59711),v=r(56594),d=r(85893);let O=["className","row"],h=e=>{let{classes:a,row:r,error:n}=e;return(0,s.Z)({root:["root",r&&"row",n&&"error"]},f,a)},m=(0,u.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,a){let{ownerState:r}=e;return[a.root,r.row&&a.row]}})(({ownerState:e})=>(0,l.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),x=o.forwardRef(function(e,a){let r=(0,i.Z)({props:e,name:"MuiFormGroup"}),{className:o,row:s=!1}=r,u=(0,n.Z)(r,O),c=(0,p.Z)(),f=(0,v.Z)({props:r,muiFormControl:c,states:["error"]}),x=(0,l.Z)({},r,{row:s,error:f.error}),N=h(x);return(0,d.jsx)(m,(0,l.Z)({className:(0,t.Z)(N.root,o),ownerState:x,ref:a},u))});var N=x},25369:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/equality",function(){return r(22314)}])},49072:function(e,a,r){"use strict";var n=r(85893),l=r(74065),o=r(29618),t=r(47028),s=r(23508),u=function(e){var a="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(r.push(n),a):n instanceof RegExp?(r.push("/"+n.source+"/"),a):n},2).replace(RegExp('"'+a+'"',"g"),function(){return r.shift()})};a.Z=function(e){var a=e.currentRules,r=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(l.Z,{children:[(0,n.jsx)(o.Z,{expandIcon:(0,n.jsx)(s.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,n.jsx)(t.Z,{children:(0,n.jsx)("span",{className:"currentRuleString",children:u(a)})})]})})}},73952:function(e,a,r){"use strict";var n=r(85893),l=r(365);a.Z=function(e){var a,r=e.isValid,o="";return r?(a="".concat(l.O,"/valid.png"),o="valid"):(a="".concat(l.O,"/invalid.png"),o="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:a,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:o})]})}},75017:function(e,a,r){"use strict";r.d(a,{Y:function(){return n}});var n=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},22314:function(e,a,r){"use strict";r.r(a);var n=r(41799),l=r(69396),o=r(85893),t=r(64459),s=r(2386),u=r(69873),i=r(73952),c=r(49072),f=r(22416),p=r(55343),v=r(22841),d=r(31362),O=r(32631),h=r(30612),m=r(75017),x={val:!1,val2:"aa",val3:"bb",comparisonValueEqualTo:"aba",comparisonValueNotEqualTo:"aba",valIsOneOf1:"Asia",valIsOneOf2:"Asia",valIsOneOf3:"Asia",valIsOneOf4:"Asia",comparisonValueIsOneOf:["North America","Africa","Europe"],comparisonValueIsNoneOf:["North America","Africa","Europe"]},N=[{path:"val",ruleSet:[{rule:"required"},{rule:"equality",equalTo:!0}]},{path:"val2",ruleSet:[{rule:"required"},{rule:"equality",equalTo:function(e){return e.comparisonValueEqualTo}}],dependantPaths:["comparisonValueEqualTo"]},{path:"val3",ruleSet:[{rule:"required"},{rule:"equality",notEqualTo:function(e){return e.comparisonValueNotEqualTo}}],dependantPaths:["comparisonValueNotEqualTo"]},{path:"valIsOneOf1",ruleSet:[{rule:"required"},{rule:"equality",isOneOf:["North America","Africa","Europe"]}]},{path:"valIsOneOf2",ruleSet:[{rule:"required"},{rule:"equality",isOneOf:function(e){return e.comparisonValueIsOneOf}}],dependantPaths:["comparisonValueIsOneOf"]},{path:"valIsOneOf3",ruleSet:[{rule:"required"},{rule:"equality",isNoneOf:["North America","Africa","Europe"]}],dependantPaths:["comparisonValueIsNoneOf"]},{path:"valIsOneOf4",ruleSet:[{rule:"required"},{rule:"equality",isNoneOf:function(e){return e.comparisonValueIsNoneOf}}],dependantPaths:["comparisonValueIsNoneOf"]}];a.default=function(){var e=(0,t.c)({rules:N,initialFormData:x}),a=e.isValid,r=e.setPathValue,Z=e.getValue,I=e.getError;return(0,o.jsxs)(s.Z,{header:"equality",codeUrl:"pages/rules/equality.js",children:[(0,o.jsxs)("p",{className:"infoParagraph",children:[(0,o.jsx)("b",{children:"equality"})," rule checks if the given value is equal to comparison value."]}),(0,o.jsx)("div",{children:(0,o.jsx)(f.Z,{className:"checkboxOnRight",children:(0,o.jsx)(p.Z,{error:!!I("val"),children:(0,o.jsx)(v.Z,{control:(0,o.jsx)(d.Z,{checked:Z("val")||!1,onChange:function(e){return r("val",e.target.checked)}}),label:(0,o.jsx)(O.Z,{children:I("val")||" "})})})})}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("val2"),helperText:I("val2")||" ",label:"equalTo",type:"text",value:Z("val2")||"",onChange:function(e){return r("val2",e.target.value)}}),(0,o.jsx)(u.Z,{className:"comparisonComponent",label:"comparisonValueEqualTo",type:"text",value:Z("comparisonValueEqualTo"),onChange:function(e){return r("comparisonValueEqualTo",e.target.value)}})]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("val3"),helperText:I("val3")||" ",label:"notEqualTo",type:"text",value:Z("val3")||"",onChange:function(e){return r("val3",e.target.value)}}),(0,o.jsx)(u.Z,{className:"comparisonComponent",label:"comparisonValueNotEqualTo",type:"text",value:Z("comparisonValueNotEqualTo"),onChange:function(e){return r("comparisonValueNotEqualTo",e.target.value)}})]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("valIsOneOf1"),helperText:I("valIsOneOf1")||" ",label:"isOneOf",type:"text",value:Z("valIsOneOf1")||"",onChange:function(e){return r("valIsOneOf1",e.target.value)}}),"['North America', 'Africa', 'Europe']"]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("valIsOneOf2"),helperText:I("valIsOneOf2")||" ",label:"isOneOf",type:"text",value:Z("valIsOneOf2")||"",onChange:function(e){return r("valIsOneOf2",e.target.value)}}),(0,o.jsx)(h.Z,{multiple:!0,value:Z("comparisonValueIsOneOf"),onChange:function(e,a){r("comparisonValueIsOneOf",a)},options:m.Y,renderInput:function(e){return(0,o.jsx)(u.Z,(0,l.Z)((0,n.Z)({},e),{label:"comparisonValueIsOneOf"}))}})]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("valIsOneOf3"),helperText:I("valIsOneOf3")||" ",label:"isNoneOf",type:"text",value:Z("valIsOneOf3")||"",onChange:function(e){return r("valIsOneOf3",e.target.value)}}),"['North America', 'Africa', 'Europe']"]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(u.Z,{error:!!I("valIsOneOf4"),helperText:I("valIsOneOf4")||" ",label:"isNoneOf",type:"text",value:Z("valIsOneOf4")||"",onChange:function(e){return r("valIsOneOf4",e.target.value)}}),(0,o.jsx)(h.Z,{multiple:!0,value:Z("comparisonValueIsNoneOf"),onChange:function(e,a){r("comparisonValueIsNoneOf",a)},options:m.Y,renderInput:function(e){return(0,o.jsx)(u.Z,(0,l.Z)((0,n.Z)({},e),{label:"comparisonValueIsNoneOf"}))}})]}),(0,o.jsx)(i.Z,{isValid:a}),(0,o.jsx)(c.Z,{currentRules:N})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=25369)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/iban-19e1df702bcfebe4.js b/_next/static/chunks/pages/rules/iban-19e1df702bcfebe4.js deleted file mode 100644 index 2eada08..0000000 --- a/_next/static/chunks/pages/rules/iban-19e1df702bcfebe4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4789],{23508:function(e,n,a){"use strict";var i=a(91941);n.Z=void 0;var r=i(a(64938)),s=a(85893),l=(0,r.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=l},59169:function(e,n,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/iban",function(){return a(76066)}])},49072:function(e,n,a){"use strict";var i=a(85893),r=a(74065),s=a(29618),l=a(47028),t=a(23508),u=function(e){var n="____PLACEHOLDER____",a=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(a.push(i),n):i instanceof RegExp?(a.push("/"+i.source+"/"),n):i},2).replace(RegExp('"'+n+'"',"g"),function(){return a.shift()})};n.Z=function(e){var n=e.currentRules,a=e.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(r.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(t.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===a?"Current Rules":a})}),(0,i.jsx)(l.Z,{children:(0,i.jsx)("span",{className:"currentRuleString",children:u(n)})})]})})}},73952:function(e,n,a){"use strict";var i=a(85893),r=a(365);n.Z=function(e){var n,a=e.isValid,s="";return a?(n="".concat(r.O,"/valid.png"),s="valid"):(n="".concat(r.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:a?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},76066:function(e,n,a){"use strict";a.r(n);var i=a(85893),r=a(64459),s=a(2386),l=a(69873),t=a(73952),u=a(49072),c={val:"aa"},d=[{path:"val",ruleSet:[{rule:"required"},{rule:"iban"}]}];n.default=function(){var e=(0,r.c)({rules:d,initialFormData:c}),n=e.isValid,a=e.setPathValue,o=e.getValue,v=e.getError;return(0,i.jsxs)(s.Z,{header:"iban",codeUrl:"pages/rules/iban.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"iban"})," rule checks if the given value is a valid IBAN."]}),(0,i.jsx)("div",{children:(0,i.jsx)(l.Z,{error:!!v("val"),helperText:v("val")||" ",label:"val",type:"text",value:o("val")||"",onChange:function(e){return a("val",e.target.value)}})}),(0,i.jsx)(t.Z,{isValid:n}),(0,i.jsx)(u.Z,{currentRules:d})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=59169)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/iban-9a542038549900de.js b/_next/static/chunks/pages/rules/iban-9a542038549900de.js new file mode 100644 index 0000000..2a2b8fa --- /dev/null +++ b/_next/static/chunks/pages/rules/iban-9a542038549900de.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4789],{23508:function(e,n,a){"use strict";var i=a(91941);n.Z=void 0;var r=i(a(64938)),s=a(85893),t=(0,r.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=t},59169:function(e,n,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/iban",function(){return a(76066)}])},49072:function(e,n,a){"use strict";var i=a(85893),r=a(74065),s=a(29618),t=a(47028),l=a(23508),u=function(e){var n="____PLACEHOLDER____",a=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(a.push(i),n):i instanceof RegExp?(a.push("/"+i.source+"/"),n):i},2).replace(RegExp('"'+n+'"',"g"),function(){return a.shift()})};n.Z=function(e){var n=e.currentRules,a=e.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(r.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(l.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===a?"Current Rules":a})}),(0,i.jsx)(t.Z,{children:(0,i.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(n)})})]})})}},73952:function(e,n,a){"use strict";var i=a(85893),r=a(365);n.Z=function(e){var n,a=e.isValid,s="";return a?(n="".concat(r.O,"/valid.png"),s="valid"):(n="".concat(r.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:a?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},76066:function(e,n,a){"use strict";a.r(n);var i=a(85893),r=a(64459),s=a(2386),t=a(69873),l=a(73952),u=a(49072),c={val:"aa"},d=[{path:"val",ruleSet:[{rule:"required"},{rule:"iban"}]}];n.default=function(){var e=(0,r.c)({rules:d,initialFormData:c}),n=e.isValid,a=e.setPathValue,o=e.getValue,v=e.getError;return(0,i.jsxs)(s.Z,{header:"iban",codeUrl:"pages/rules/iban.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"iban"})," rule checks if the given value is a valid IBAN."]}),(0,i.jsx)("div",{children:(0,i.jsx)(t.Z,{error:!!v("val"),helperText:v("val")||" ",label:"val",type:"text",value:o("val")||"",onChange:function(e){return a("val",e.target.value)}})}),(0,i.jsx)(l.Z,{isValid:n}),(0,i.jsx)(u.Z,{currentRules:d})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=59169)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/includes-04639b065368d43a.js b/_next/static/chunks/pages/rules/includes-04639b065368d43a.js new file mode 100644 index 0000000..20ebc84 --- /dev/null +++ b/_next/static/chunks/pages/rules/includes-04639b065368d43a.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1],{23508:function(e,a,n){"use strict";var l=n(91941);a.Z=void 0;var r=l(n(64938)),s=n(85893),i=(0,r.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");a.Z=i},54164:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/includes",function(){return n(69813)}])},49072:function(e,a,n){"use strict";var l=n(85893),r=n(74065),s=n(29618),i=n(47028),t=n(23508),u=function(e){var a="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,l){return"function"==typeof l?(n.push(l),a):l instanceof RegExp?(n.push("/"+l.source+"/"),a):l},2).replace(RegExp('"'+a+'"',"g"),function(){return n.shift()})};a.Z=function(e){var a=e.currentRules,n=e.header;return(0,l.jsx)("div",{className:"currentRuleInfoDiv",children:(0,l.jsxs)(r.Z,{children:[(0,l.jsx)(s.Z,{expandIcon:(0,l.jsx)(t.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,l.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,l.jsx)(i.Z,{children:(0,l.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(a)})})]})})}},73952:function(e,a,n){"use strict";var l=n(85893),r=n(365);a.Z=function(e){var a,n=e.isValid,s="";return n?(a="".concat(r.O,"/valid.png"),s="valid"):(a="".concat(r.O,"/invalid.png"),s="invalid"),(0,l.jsxs)("div",{className:"validationResultDiv",children:[(0,l.jsx)("span",{children:"Validation Result: "}),(0,l.jsx)("img",{src:a,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,l.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},69813:function(e,a,n){"use strict";n.r(a);var l=n(85893),r=n(2386),s=n(69873),i=n(73952),t=n(49072),u=n(64459),c={val:"example",val2:"abc",comparisonValue:"bcc"},o=[{path:"val",ruleSet:[{rule:"required"},{rule:"includes",includes:"exe"}],dependantPaths:["comparisonValue"]},{path:"val2",ruleSet:[{rule:"required"},{rule:"includes",includes:function(e){return e.comparisonValue}}],dependantPaths:["comparisonValue"]}];a.default=function(){var e=(0,u.c)({rules:o,initialFormData:c}),a=e.isValid,n=e.setPathValue,d=e.getValue,v=e.getError;return(0,l.jsxs)(r.Z,{header:"includes",codeUrl:"pages/rules/includes.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:" includes "})," rule checks if the given value includes comparison value."]}),(0,l.jsx)("div",{className:"comparisonDiv",children:(0,l.jsx)(s.Z,{error:!!v("val"),helperText:v("val")||" ",label:"val",type:"text",value:d("val"),onChange:function(e){return n("val",e.target.value)}})}),(0,l.jsxs)("div",{className:"comparisonDiv",children:[(0,l.jsx)(s.Z,{error:!!v("val2"),helperText:v("val2")||" ",label:"val2",type:"text",value:d("val2"),onChange:function(e){return n("val2",e.target.value)}}),(0,l.jsx)(s.Z,{className:"comparisonComponent",label:"comparisonValue",type:"text",value:d("comparisonValue"),onChange:function(e){return n("comparisonValue",e.target.value)}})]}),(0,l.jsx)(i.Z,{isValid:a}),(0,l.jsx)(t.Z,{currentRules:o})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=54164)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/includes-a2eb0a0e0a2f4afb.js b/_next/static/chunks/pages/rules/includes-a2eb0a0e0a2f4afb.js deleted file mode 100644 index f917bda..0000000 --- a/_next/static/chunks/pages/rules/includes-a2eb0a0e0a2f4afb.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1],{23508:function(e,a,n){"use strict";var l=n(91941);a.Z=void 0;var r=l(n(64938)),s=n(85893),i=(0,r.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");a.Z=i},54164:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/includes",function(){return n(69813)}])},49072:function(e,a,n){"use strict";var l=n(85893),r=n(74065),s=n(29618),i=n(47028),t=n(23508),u=function(e){var a="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,l){return"function"==typeof l?(n.push(l),a):l instanceof RegExp?(n.push("/"+l.source+"/"),a):l},2).replace(RegExp('"'+a+'"',"g"),function(){return n.shift()})};a.Z=function(e){var a=e.currentRules,n=e.header;return(0,l.jsx)("div",{className:"currentRuleInfoDiv",children:(0,l.jsxs)(r.Z,{children:[(0,l.jsx)(s.Z,{expandIcon:(0,l.jsx)(t.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,l.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,l.jsx)(i.Z,{children:(0,l.jsx)("span",{className:"currentRuleString",children:u(a)})})]})})}},73952:function(e,a,n){"use strict";var l=n(85893),r=n(365);a.Z=function(e){var a,n=e.isValid,s="";return n?(a="".concat(r.O,"/valid.png"),s="valid"):(a="".concat(r.O,"/invalid.png"),s="invalid"),(0,l.jsxs)("div",{className:"validationResultDiv",children:[(0,l.jsx)("span",{children:"Validation Result: "}),(0,l.jsx)("img",{src:a,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,l.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},69813:function(e,a,n){"use strict";n.r(a);var l=n(85893),r=n(2386),s=n(69873),i=n(73952),t=n(49072),u=n(64459),c={val:"example",val2:"abc",comparisonValue:"bcc"},o=[{path:"val",ruleSet:[{rule:"required"},{rule:"includes",includes:"exe"}],dependantPaths:["comparisonValue"]},{path:"val2",ruleSet:[{rule:"required"},{rule:"includes",includes:function(e){return e.comparisonValue}}],dependantPaths:["comparisonValue"]}];a.default=function(){var e=(0,u.c)({rules:o,initialFormData:c}),a=e.isValid,n=e.setPathValue,d=e.getValue,v=e.getError;return(0,l.jsxs)(r.Z,{header:"includes",codeUrl:"pages/rules/includes.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:" includes "})," rule checks if the given value includes comparison value."]}),(0,l.jsx)("div",{className:"comparisonDiv",children:(0,l.jsx)(s.Z,{error:!!v("val"),helperText:v("val")||" ",label:"val",type:"text",value:d("val"),onChange:function(e){return n("val",e.target.value)}})}),(0,l.jsxs)("div",{className:"comparisonDiv",children:[(0,l.jsx)(s.Z,{error:!!v("val2"),helperText:v("val2")||" ",label:"val2",type:"text",value:d("val2"),onChange:function(e){return n("val2",e.target.value)}}),(0,l.jsx)(s.Z,{className:"comparisonComponent",label:"comparisonValue",type:"text",value:d("comparisonValue"),onChange:function(e){return n("comparisonValue",e.target.value)}})]}),(0,l.jsx)(i.Z,{isValid:a}),(0,l.jsx)(t.Z,{currentRules:o})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=54164)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/length-673b1ced6f4e3999.js b/_next/static/chunks/pages/rules/length-673b1ced6f4e3999.js deleted file mode 100644 index daf34d6..0000000 --- a/_next/static/chunks/pages/rules/length-673b1ced6f4e3999.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5499],{23508:function(e,n,r){"use strict";var a=r(91941);n.Z=void 0;var t=a(r(64938)),o=r(85893),s=(0,t.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=s},22416:function(e,n,r){"use strict";r.d(n,{Z:function(){return g}});var a=r(1048),t=r(32793),o=r(67294),s=r(86010),l=r(94780),i=r(67074),u=r(6446),c=r(34867);function d(e){return(0,c.Z)("MuiFormGroup",e)}(0,r(1588).Z)("MuiFormGroup",["root","row","error"]);var p=r(59711),h=r(56594),f=r(85893);let v=["className","row"],m=e=>{let{classes:n,row:r,error:a}=e;return(0,l.Z)({root:["root",r&&"row",a&&"error"]},d,n)},x=(0,i.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,n){let{ownerState:r}=e;return[n.root,r.row&&n.row]}})(({ownerState:e})=>(0,t.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),Z=o.forwardRef(function(e,n){let r=(0,u.Z)({props:e,name:"MuiFormGroup"}),{className:o,row:l=!1}=r,i=(0,a.Z)(r,v),c=(0,p.Z)(),d=(0,h.Z)({props:r,muiFormControl:c,states:["error"]}),Z=(0,t.Z)({},r,{row:l,error:d.error}),g=m(Z);return(0,f.jsx)(x,(0,t.Z)({className:(0,s.Z)(g.root,o),ownerState:Z,ref:n},i))});var g=Z},65104:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/length",function(){return r(12972)}])},49072:function(e,n,r){"use strict";var a=r(85893),t=r(74065),o=r(29618),s=r(47028),l=r(23508),i=function(e){var n="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(r.push(a),n):a instanceof RegExp?(r.push("/"+a.source+"/"),n):a},2).replace(RegExp('"'+n+'"',"g"),function(){return r.shift()})};n.Z=function(e){var n=e.currentRules,r=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(t.Z,{children:[(0,a.jsx)(o.Z,{expandIcon:(0,a.jsx)(l.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,a.jsx)(s.Z,{children:(0,a.jsx)("span",{className:"currentRuleString",children:i(n)})})]})})}},73952:function(e,n,r){"use strict";var a=r(85893),t=r(365);n.Z=function(e){var n,r=e.isValid,o="";return r?(n="".concat(t.O,"/valid.png"),o="valid"):(n="".concat(t.O,"/invalid.png"),o="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:o})]})}},39564:function(e,n,r){"use strict";r.d(n,{q:function(){return a}});var a=["equalTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo"]},12972:function(e,n,r){"use strict";r.r(n);var a=r(41799),t=r(69396),o=r(828),s=r(36305),l=r(85893),i=r(67294),u=r(64459),c=r(22416),d=r(22841),p=r(31362),h=r(39564),f=r(2386),v=r(69873),m=r(30612),x=r(73952),Z=r(49072),g={rule:"length"};g[h.q[0]]=5;var j=[{path:"val",ruleSet:["required",g],dependantPaths:["comparisonValue"]}],N={val:"aa",ruleOption:h.q[0],comparisonValue:5};n.default=function(){var e=(0,u.c)({rules:j,initialFormData:N}),n=e.isValid,r=e.setPathValue,g=e.setRules,_=e.getValue,R=e.getError,w=(0,o.Z)((0,i.useState)(j),2),b=w[0],E=w[1],O=(0,o.Z)((0,i.useState)(h.q[0]),2),C=O[0],V=O[1],S=(0,o.Z)((0,i.useState)(!1),2),q=S[0],T=S[1],k=function(e,n){var r=JSON.parse(JSON.stringify(j)),a=(0,s.Z)(r[0].ruleSet),t={rule:"length"};e?t[n]=function(e){return e.comparisonValue}:t[n]=5,a.splice(1,1,t),r[0].ruleSet=a,E(r),g(r)},y=function(e){k(e,C),T(e)},D=function(e){k(q,e),V(e)};return(0,l.jsxs)(f.Z,{header:"length",codeUrl:"pages/rules/length.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:"length"})," rule checks the length of a string. ",(0,l.jsx)("b",{children:h.q.join(", ")})," parameters are used to make comparisons with given comparison values."]}),(0,l.jsxs)("div",{className:"comparisonDiv",children:[(0,l.jsx)(v.Z,{error:!!R("val"),helperText:R("val")||" ",label:"val",type:"text",value:_("val"),onChange:function(e){return r("val",e.target.value)}}),(0,l.jsx)(m.Z,{className:"ruleOptionComponent",value:C,onChange:function(e,n){D(n)},options:h.q,disableClearable:!0,renderInput:function(e){return(0,l.jsx)(v.Z,(0,t.Z)((0,a.Z)({},e),{label:"ruleOption"}))}}),q?(0,l.jsx)(v.Z,{className:"comparisonComponent",label:"comparisonValue",type:"number",value:_("comparisonValue"),onChange:function(e){return r("comparisonValue",e.target.value)}}):(0,l.jsx)(v.Z,{disabled:!0,className:"comparisonComponent",label:"comparisonValue",type:"number",value:5,onChange:function(){}}),(0,l.jsx)(c.Z,{className:"checkboxOnRight",children:(0,l.jsx)(d.Z,{control:(0,l.jsx)(p.Z,{checked:q,onChange:function(e){return y(e.target.checked)}}),label:"as Function"})})]}),(0,l.jsx)(x.Z,{isValid:n}),(0,l.jsx)(Z.Z,{currentRules:b})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=65104)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/length-bbca03a8e0aea7bf.js b/_next/static/chunks/pages/rules/length-bbca03a8e0aea7bf.js new file mode 100644 index 0000000..f2b2721 --- /dev/null +++ b/_next/static/chunks/pages/rules/length-bbca03a8e0aea7bf.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5499],{23508:function(e,n,r){"use strict";var a=r(91941);n.Z=void 0;var t=a(r(64938)),s=r(85893),o=(0,t.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=o},22416:function(e,n,r){"use strict";r.d(n,{Z:function(){return g}});var a=r(1048),t=r(32793),s=r(67294),o=r(86010),l=r(94780),i=r(67074),u=r(6446),c=r(34867);function p(e){return(0,c.Z)("MuiFormGroup",e)}(0,r(1588).Z)("MuiFormGroup",["root","row","error"]);var d=r(59711),h=r(56594),f=r(85893);let v=["className","row"],m=e=>{let{classes:n,row:r,error:a}=e;return(0,l.Z)({root:["root",r&&"row",a&&"error"]},p,n)},x=(0,i.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,n){let{ownerState:r}=e;return[n.root,r.row&&n.row]}})(({ownerState:e})=>(0,t.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),Z=s.forwardRef(function(e,n){let r=(0,u.Z)({props:e,name:"MuiFormGroup"}),{className:s,row:l=!1}=r,i=(0,a.Z)(r,v),c=(0,d.Z)(),p=(0,h.Z)({props:r,muiFormControl:c,states:["error"]}),Z=(0,t.Z)({},r,{row:l,error:p.error}),g=m(Z);return(0,f.jsx)(x,(0,t.Z)({className:(0,o.Z)(g.root,s),ownerState:Z,ref:n},i))});var g=Z},65104:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/length",function(){return r(12972)}])},49072:function(e,n,r){"use strict";var a=r(85893),t=r(74065),s=r(29618),o=r(47028),l=r(23508),i=function(e){var n="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(r.push(a),n):a instanceof RegExp?(r.push("/"+a.source+"/"),n):a},2).replace(RegExp('"'+n+'"',"g"),function(){return r.shift()})};n.Z=function(e){var n=e.currentRules,r=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(t.Z,{children:[(0,a.jsx)(s.Z,{expandIcon:(0,a.jsx)(l.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,a.jsx)(o.Z,{children:(0,a.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:i(n)})})]})})}},73952:function(e,n,r){"use strict";var a=r(85893),t=r(365);n.Z=function(e){var n,r=e.isValid,s="";return r?(n="".concat(t.O,"/valid.png"),s="valid"):(n="".concat(t.O,"/invalid.png"),s="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},39564:function(e,n,r){"use strict";r.d(n,{q:function(){return a}});var a=["equalTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo"]},12972:function(e,n,r){"use strict";r.r(n);var a=r(41799),t=r(69396),s=r(828),o=r(36305),l=r(85893),i=r(67294),u=r(64459),c=r(22416),p=r(22841),d=r(31362),h=r(39564),f=r(2386),v=r(69873),m=r(30612),x=r(73952),Z=r(49072),g={rule:"length"};g[h.q[0]]=5;var j=[{path:"val",ruleSet:["required",g],dependantPaths:["comparisonValue"]}],N={val:"aa",ruleOption:h.q[0],comparisonValue:5};n.default=function(){var e=(0,u.c)({rules:j,initialFormData:N}),n=e.isValid,r=e.setPathValue,g=e.setRules,_=e.getValue,R=e.getError,w=(0,s.Z)((0,i.useState)(j),2),b=w[0],E=w[1],O=(0,s.Z)((0,i.useState)(h.q[0]),2),C=O[0],V=O[1],S=(0,s.Z)((0,i.useState)(!1),2),q=S[0],T=S[1],k=function(e,n){var r=JSON.parse(JSON.stringify(j)),a=(0,o.Z)(r[0].ruleSet),t={rule:"length"};e?t[n]=function(e){return e.comparisonValue}:t[n]=5,a.splice(1,1,t),r[0].ruleSet=a,E(r),g(r)},y=function(e){k(e,C),T(e)},D=function(e){k(q,e),V(e)};return(0,l.jsxs)(f.Z,{header:"length",codeUrl:"pages/rules/length.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:"length"})," rule checks the length of a string. ",(0,l.jsx)("b",{children:h.q.join(", ")})," parameters are used to make comparisons with given comparison values."]}),(0,l.jsxs)("div",{className:"comparisonDiv",children:[(0,l.jsx)(v.Z,{error:!!R("val"),helperText:R("val")||" ",label:"val",type:"text",value:_("val"),onChange:function(e){return r("val",e.target.value)}}),(0,l.jsx)(m.Z,{className:"ruleOptionComponent",value:C,onChange:function(e,n){D(n)},options:h.q,disableClearable:!0,renderInput:function(e){return(0,l.jsx)(v.Z,(0,t.Z)((0,a.Z)({},e),{label:"ruleOption"}))}}),q?(0,l.jsx)(v.Z,{className:"comparisonComponent",label:"comparisonValue",type:"number",value:_("comparisonValue"),onChange:function(e){return r("comparisonValue",e.target.value)}}):(0,l.jsx)(v.Z,{disabled:!0,className:"comparisonComponent",label:"comparisonValue",type:"number",value:5,onChange:function(){}}),(0,l.jsx)(c.Z,{className:"checkboxOnRight",children:(0,l.jsx)(p.Z,{control:(0,l.jsx)(d.Z,{checked:q,onChange:function(e){return y(e.target.checked)}}),label:"as Function"})})]}),(0,l.jsx)(x.Z,{isValid:n}),(0,l.jsx)(Z.Z,{currentRules:b})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=65104)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/list-size-0fc0b7414626f0c8.js b/_next/static/chunks/pages/rules/list-size-0fc0b7414626f0c8.js deleted file mode 100644 index 8cbebd0..0000000 --- a/_next/static/chunks/pages/rules/list-size-0fc0b7414626f0c8.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7425],{23508:function(e,r,n){"use strict";var a=n(91941);r.Z=void 0;var t=a(n(64938)),s=n(85893),i=(0,t.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");r.Z=i},22416:function(e,r,n){"use strict";n.d(r,{Z:function(){return j}});var a=n(1048),t=n(32793),s=n(67294),i=n(86010),o=n(94780),l=n(67074),u=n(6446),c=n(34867);function p(e){return(0,c.Z)("MuiFormGroup",e)}(0,n(1588).Z)("MuiFormGroup",["root","row","error"]);var d=n(59711),f=n(56594),h=n(85893);let v=["className","row"],m=e=>{let{classes:r,row:n,error:a}=e;return(0,o.Z)({root:["root",n&&"row",a&&"error"]},p,r)},Z=(0,l.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,r){let{ownerState:n}=e;return[r.root,n.row&&r.row]}})(({ownerState:e})=>(0,t.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),x=s.forwardRef(function(e,r){let n=(0,u.Z)({props:e,name:"MuiFormGroup"}),{className:s,row:o=!1}=n,l=(0,a.Z)(n,v),c=(0,d.Z)(),p=(0,f.Z)({props:n,muiFormControl:c,states:["error"]}),x=(0,t.Z)({},n,{row:o,error:p.error}),j=m(x);return(0,h.jsx)(Z,(0,t.Z)({className:(0,i.Z)(j.root,s),ownerState:x,ref:r},l))});var j=x},64689:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/list-size",function(){return n(78221)}])},49072:function(e,r,n){"use strict";var a=n(85893),t=n(74065),s=n(29618),i=n(47028),o=n(23508),l=function(e){var r="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(n.push(a),r):a instanceof RegExp?(n.push("/"+a.source+"/"),r):a},2).replace(RegExp('"'+r+'"',"g"),function(){return n.shift()})};r.Z=function(e){var r=e.currentRules,n=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(t.Z,{children:[(0,a.jsx)(s.Z,{expandIcon:(0,a.jsx)(o.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,a.jsx)(i.Z,{children:(0,a.jsx)("span",{className:"currentRuleString",children:l(r)})})]})})}},73952:function(e,r,n){"use strict";var a=n(85893),t=n(365);r.Z=function(e){var r,n=e.isValid,s="";return n?(r="".concat(t.O,"/valid.png"),s="valid"):(r="".concat(t.O,"/invalid.png"),s="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:r,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},39564:function(e,r,n){"use strict";n.d(r,{q:function(){return a}});var a=["equalTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo"]},75017:function(e,r,n){"use strict";n.d(r,{Y:function(){return a}});var a=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},78221:function(e,r,n){"use strict";n.r(r);var a=n(41799),t=n(69396),s=n(828),i=n(36305),o=n(85893),l=n(67294),u=n(64459),c=n(22416),p=n(22841),d=n(31362),f=n(39564),h=n(2386),v=n(69873),m=n(30612),Z=n(73952),x=n(49072),j=n(75017),g={rule:"listSize"};g[f.q[0]]=3;var N=[{path:"val",ruleSet:["required",g],dependantPaths:["comparisonValue"]}],_={val:(0,i.Z)(j.Y).slice(0,2),ruleOption:f.q[0],comparisonValue:3};r.default=function(){var e=(0,u.c)({rules:N,initialFormData:_}),r=e.isValid,n=e.setPathValue,g=e.setRules,R=e.getValue,w=e.getError,S=(0,s.Z)((0,l.useState)(N),2),b=S[0],E=S[1],O=(0,s.Z)((0,l.useState)(f.q[0]),2),C=O[0],V=O[1],q=(0,s.Z)((0,l.useState)(!1),2),T=q[0],k=q[1],y=function(e,r){var n=JSON.parse(JSON.stringify(N)),a=(0,i.Z)(n[0].ruleSet),t={rule:"listSize"};e?t[r]=function(e){return e.comparisonValue}:t[r]=3,a.splice(1,1,t),n[0].ruleSet=a,E(n),g(n)},z=function(e){y(e,C),k(e)},A=function(e){y(T,e),V(e)};return(0,o.jsxs)(h.Z,{header:"listSize",codeUrl:"pages/rules/list-size.js",children:[(0,o.jsxs)("p",{className:"infoParagraph",children:[(0,o.jsx)("b",{children:"listSize"})," rule checks the length of an array. ",(0,o.jsx)("b",{children:f.q.join(", ")})," parameters are used to make comparisons with given comparison values."]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(m.Z,{multiple:!0,value:R("val"),onChange:function(e,r){n("val",r)},options:j.Y,renderInput:function(e){return(0,o.jsx)(v.Z,(0,t.Z)((0,a.Z)({},e),{error:!!w("val"),helperText:w("val")||" ",label:"equalTo"}))}}),(0,o.jsx)(m.Z,{className:"ruleOptionComponent",value:C,onChange:function(e,r){A(r)},options:f.q,disableClearable:!0,renderInput:function(e){return(0,o.jsx)(v.Z,(0,t.Z)((0,a.Z)({},e),{label:"ruleOption"}))}}),T?(0,o.jsx)(v.Z,{className:"comparisonComponent",label:"comparisonValue",type:"number",value:R("comparisonValue"),onChange:function(e){return n("comparisonValue",e.target.value)}}):(0,o.jsx)(v.Z,{disabled:!0,className:"comparisonComponent",label:"comparisonValue",type:"number",value:3,onChange:function(){}}),(0,o.jsx)(c.Z,{className:"checkboxOnRight",children:(0,o.jsx)(p.Z,{control:(0,o.jsx)(d.Z,{checked:T,onChange:function(e){return z(e.target.checked)}}),label:"as Function"})})]}),(0,o.jsx)(Z.Z,{isValid:r}),(0,o.jsx)(x.Z,{currentRules:b})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=64689)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/list-size-fcf3535da6b4f2ba.js b/_next/static/chunks/pages/rules/list-size-fcf3535da6b4f2ba.js new file mode 100644 index 0000000..612f97b --- /dev/null +++ b/_next/static/chunks/pages/rules/list-size-fcf3535da6b4f2ba.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7425],{23508:function(e,r,n){"use strict";var a=n(91941);r.Z=void 0;var t=a(n(64938)),s=n(85893),i=(0,t.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");r.Z=i},22416:function(e,r,n){"use strict";n.d(r,{Z:function(){return j}});var a=n(1048),t=n(32793),s=n(67294),i=n(86010),o=n(94780),l=n(67074),u=n(6446),c=n(34867);function p(e){return(0,c.Z)("MuiFormGroup",e)}(0,n(1588).Z)("MuiFormGroup",["root","row","error"]);var d=n(59711),f=n(56594),h=n(85893);let v=["className","row"],m=e=>{let{classes:r,row:n,error:a}=e;return(0,o.Z)({root:["root",n&&"row",a&&"error"]},p,r)},Z=(0,l.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,r){let{ownerState:n}=e;return[r.root,n.row&&r.row]}})(({ownerState:e})=>(0,t.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),x=s.forwardRef(function(e,r){let n=(0,u.Z)({props:e,name:"MuiFormGroup"}),{className:s,row:o=!1}=n,l=(0,a.Z)(n,v),c=(0,d.Z)(),p=(0,f.Z)({props:n,muiFormControl:c,states:["error"]}),x=(0,t.Z)({},n,{row:o,error:p.error}),j=m(x);return(0,h.jsx)(Z,(0,t.Z)({className:(0,i.Z)(j.root,s),ownerState:x,ref:r},l))});var j=x},64689:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/list-size",function(){return n(78221)}])},49072:function(e,r,n){"use strict";var a=n(85893),t=n(74065),s=n(29618),i=n(47028),o=n(23508),l=function(e){var r="____PLACEHOLDER____",n=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(n.push(a),r):a instanceof RegExp?(n.push("/"+a.source+"/"),r):a},2).replace(RegExp('"'+r+'"',"g"),function(){return n.shift()})};r.Z=function(e){var r=e.currentRules,n=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(t.Z,{children:[(0,a.jsx)(s.Z,{expandIcon:(0,a.jsx)(o.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===n?"Current Rules":n})}),(0,a.jsx)(i.Z,{children:(0,a.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:l(r)})})]})})}},73952:function(e,r,n){"use strict";var a=n(85893),t=n(365);r.Z=function(e){var r,n=e.isValid,s="";return n?(r="".concat(t.O,"/valid.png"),s="valid"):(r="".concat(t.O,"/invalid.png"),s="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:r,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:n?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},39564:function(e,r,n){"use strict";n.d(r,{q:function(){return a}});var a=["equalTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo"]},75017:function(e,r,n){"use strict";n.d(r,{Y:function(){return a}});var a=["Asia","Europe","North America","South America","Africa","Australia","Antarctica"]},78221:function(e,r,n){"use strict";n.r(r);var a=n(41799),t=n(69396),s=n(828),i=n(36305),o=n(85893),l=n(67294),u=n(64459),c=n(22416),p=n(22841),d=n(31362),f=n(39564),h=n(2386),v=n(69873),m=n(30612),Z=n(73952),x=n(49072),j=n(75017),g={rule:"listSize"};g[f.q[0]]=3;var N=[{path:"val",ruleSet:["required",g],dependantPaths:["comparisonValue"]}],_={val:(0,i.Z)(j.Y).slice(0,2),ruleOption:f.q[0],comparisonValue:3};r.default=function(){var e=(0,u.c)({rules:N,initialFormData:_}),r=e.isValid,n=e.setPathValue,g=e.setRules,R=e.getValue,w=e.getError,S=(0,s.Z)((0,l.useState)(N),2),b=S[0],E=S[1],O=(0,s.Z)((0,l.useState)(f.q[0]),2),C=O[0],V=O[1],q=(0,s.Z)((0,l.useState)(!1),2),T=q[0],k=q[1],y=function(e,r){var n=JSON.parse(JSON.stringify(N)),a=(0,i.Z)(n[0].ruleSet),t={rule:"listSize"};e?t[r]=function(e){return e.comparisonValue}:t[r]=3,a.splice(1,1,t),n[0].ruleSet=a,E(n),g(n)},z=function(e){y(e,C),k(e)},A=function(e){y(T,e),V(e)};return(0,o.jsxs)(h.Z,{header:"listSize",codeUrl:"pages/rules/list-size.js",children:[(0,o.jsxs)("p",{className:"infoParagraph",children:[(0,o.jsx)("b",{children:"listSize"})," rule checks the length of an array. ",(0,o.jsx)("b",{children:f.q.join(", ")})," parameters are used to make comparisons with given comparison values."]}),(0,o.jsxs)("div",{className:"comparisonDiv",children:[(0,o.jsx)(m.Z,{multiple:!0,value:R("val"),onChange:function(e,r){n("val",r)},options:j.Y,renderInput:function(e){return(0,o.jsx)(v.Z,(0,t.Z)((0,a.Z)({},e),{error:!!w("val"),helperText:w("val")||" ",label:"equalTo"}))}}),(0,o.jsx)(m.Z,{className:"ruleOptionComponent",value:C,onChange:function(e,r){A(r)},options:f.q,disableClearable:!0,renderInput:function(e){return(0,o.jsx)(v.Z,(0,t.Z)((0,a.Z)({},e),{label:"ruleOption"}))}}),T?(0,o.jsx)(v.Z,{className:"comparisonComponent",label:"comparisonValue",type:"number",value:R("comparisonValue"),onChange:function(e){return n("comparisonValue",e.target.value)}}):(0,o.jsx)(v.Z,{disabled:!0,className:"comparisonComponent",label:"comparisonValue",type:"number",value:3,onChange:function(){}}),(0,o.jsx)(c.Z,{className:"checkboxOnRight",children:(0,o.jsx)(p.Z,{control:(0,o.jsx)(d.Z,{checked:T,onChange:function(e){return z(e.target.checked)}}),label:"as Function"})})]}),(0,o.jsx)(Z.Z,{isValid:r}),(0,o.jsx)(x.Z,{currentRules:b})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=64689)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/number-43cb7dcb3cd9c974.js b/_next/static/chunks/pages/rules/number-43cb7dcb3cd9c974.js deleted file mode 100644 index b183351..0000000 --- a/_next/static/chunks/pages/rules/number-43cb7dcb3cd9c974.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3454],{23508:function(e,n,r){"use strict";var a=r(91941);n.Z=void 0;var t=a(r(64938)),s=r(85893),o=(0,t.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=o},22416:function(e,n,r){"use strict";r.d(n,{Z:function(){return g}});var a=r(1048),t=r(32793),s=r(67294),o=r(86010),i=r(94780),l=r(67074),u=r(6446),c=r(34867);function d(e){return(0,c.Z)("MuiFormGroup",e)}(0,r(1588).Z)("MuiFormGroup",["root","row","error"]);var p=r(59711),h=r(56594),v=r(85893);let f=["className","row"],m=e=>{let{classes:n,row:r,error:a}=e;return(0,i.Z)({root:["root",r&&"row",a&&"error"]},d,n)},x=(0,l.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,n){let{ownerState:r}=e;return[n.root,r.row&&n.row]}})(({ownerState:e})=>(0,t.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),Z=s.forwardRef(function(e,n){let r=(0,u.Z)({props:e,name:"MuiFormGroup"}),{className:s,row:i=!1}=r,l=(0,a.Z)(r,f),c=(0,p.Z)(),d=(0,h.Z)({props:r,muiFormControl:c,states:["error"]}),Z=(0,t.Z)({},r,{row:i,error:d.error}),g=m(Z);return(0,v.jsx)(x,(0,t.Z)({className:(0,o.Z)(g.root,s),ownerState:Z,ref:n},l))});var g=Z},77545:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/number",function(){return r(33147)}])},49072:function(e,n,r){"use strict";var a=r(85893),t=r(74065),s=r(29618),o=r(47028),i=r(23508),l=function(e){var n="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(r.push(a),n):a instanceof RegExp?(r.push("/"+a.source+"/"),n):a},2).replace(RegExp('"'+n+'"',"g"),function(){return r.shift()})};n.Z=function(e){var n=e.currentRules,r=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(t.Z,{children:[(0,a.jsx)(s.Z,{expandIcon:(0,a.jsx)(i.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,a.jsx)(o.Z,{children:(0,a.jsx)("span",{className:"currentRuleString",children:l(n)})})]})})}},73952:function(e,n,r){"use strict";var a=r(85893),t=r(365);n.Z=function(e){var n,r=e.isValid,s="";return r?(n="".concat(t.O,"/valid.png"),s="valid"):(n="".concat(t.O,"/invalid.png"),s="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},39564:function(e,n,r){"use strict";r.d(n,{q:function(){return a}});var a=["equalTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo"]},33147:function(e,n,r){"use strict";r.r(n);var a=r(41799),t=r(69396),s=r(828),o=r(36305),i=r(85893),l=r(67294),u=r(64459),c=r(22416),d=r(22841),p=r(31362),h=r(39564),v=r(2386),f=r(69873),m=r(30612),x=r(73952),Z=r(49072),g={rule:"number"};g[h.q[0]]=5;var j=[{path:"val",ruleSet:["required",g],dependantPaths:["comparisonValue"]}],b={val:3,ruleOption:h.q[0],comparisonValue:5};n.default=function(){var e=(0,u.c)({rules:j,initialFormData:b}),n=e.isValid,r=e.setPathValue,g=e.setRules,N=e.getValue,R=e.getError,_=(0,s.Z)((0,l.useState)(j),2),w=_[0],O=_[1],C=(0,s.Z)((0,l.useState)(h.q[0]),2),E=C[0],k=C[1],S=(0,s.Z)((0,l.useState)(!1),2),V=S[0],q=S[1],T=(0,s.Z)((0,l.useState)(!1),2),y=T[0],I=T[1],D=function(e,n,r){var a=JSON.parse(JSON.stringify(j)),t=(0,o.Z)(a[0].ruleSet),s={rule:"number"};n&&(e?s[n]=function(e){return e.comparisonValue}:s[n]=5),r&&(s.onlyIntegers=!0),t.splice(1,1,s),a[0].ruleSet=t,O(a),g(a)},F=function(e){D(e,E,y),q(e)},P=function(e){D(V,e,y),k(e)},M=function(e){D(V,E,e),I(e)};return(0,i.jsxs)(v.Z,{header:"number",codeUrl:"pages/rules/number.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"number"})," rule checks if the given value is a valid number. If ",(0,i.jsx)("b",{children:"onlyIntegers"})," parameter is set, it also checks if given value is an integer. ",(0,i.jsx)("b",{children:h.q.join(", ")})," parameters are used to make comparisons with given comparison values."]}),(0,i.jsxs)("div",{className:"comparisonDiv",children:[(0,i.jsx)(f.Z,{error:!!R("val"),helperText:R("val")||" ",label:"val",type:"number",value:N("val"),onChange:function(e){return r("val",e.target.value)}}),(0,i.jsx)(m.Z,{className:"ruleOptionComponent",value:E,onChange:function(e,n){P(n)},options:h.q,disableClearable:!1,renderInput:function(e){return(0,i.jsx)(f.Z,(0,t.Z)((0,a.Z)({},e),{label:"ruleOption"}))}}),V?(0,i.jsx)(f.Z,{className:"comparisonComponent",label:"comparisonValue",type:"number",value:N("comparisonValue"),onChange:function(e){return r("comparisonValue",e.target.value)}}):(0,i.jsx)(f.Z,{disabled:!0,className:"comparisonComponent",label:"comparisonValue",type:"number",value:5,onChange:function(){}}),(0,i.jsx)(c.Z,{className:"checkboxOnRight",children:(0,i.jsx)(d.Z,{control:(0,i.jsx)(p.Z,{checked:V,onChange:function(e){return F(e.target.checked)}}),label:"as Function"})})]}),(0,i.jsx)("div",{className:"comparisonDiv",children:(0,i.jsx)(c.Z,{className:"checkboxOnRight",children:(0,i.jsx)(d.Z,{control:(0,i.jsx)(p.Z,{checked:y,onChange:function(e){return M(e.target.checked)}}),label:"onlyIntegers"})})}),(0,i.jsx)(x.Z,{isValid:n}),(0,i.jsx)(Z.Z,{currentRules:w})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=77545)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/number-fed8ac6dfc4992da.js b/_next/static/chunks/pages/rules/number-fed8ac6dfc4992da.js new file mode 100644 index 0000000..3c9fa9d --- /dev/null +++ b/_next/static/chunks/pages/rules/number-fed8ac6dfc4992da.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3454],{23508:function(e,n,r){"use strict";var a=r(91941);n.Z=void 0;var t=a(r(64938)),s=r(85893),o=(0,t.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=o},22416:function(e,n,r){"use strict";r.d(n,{Z:function(){return g}});var a=r(1048),t=r(32793),s=r(67294),o=r(86010),i=r(94780),l=r(67074),u=r(6446),c=r(34867);function d(e){return(0,c.Z)("MuiFormGroup",e)}(0,r(1588).Z)("MuiFormGroup",["root","row","error"]);var p=r(59711),h=r(56594),v=r(85893);let f=["className","row"],m=e=>{let{classes:n,row:r,error:a}=e;return(0,i.Z)({root:["root",r&&"row",a&&"error"]},d,n)},x=(0,l.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver(e,n){let{ownerState:r}=e;return[n.root,r.row&&n.row]}})(({ownerState:e})=>(0,t.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),Z=s.forwardRef(function(e,n){let r=(0,u.Z)({props:e,name:"MuiFormGroup"}),{className:s,row:i=!1}=r,l=(0,a.Z)(r,f),c=(0,p.Z)(),d=(0,h.Z)({props:r,muiFormControl:c,states:["error"]}),Z=(0,t.Z)({},r,{row:i,error:d.error}),g=m(Z);return(0,v.jsx)(x,(0,t.Z)({className:(0,o.Z)(g.root,s),ownerState:Z,ref:n},l))});var g=Z},77545:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/number",function(){return r(33147)}])},49072:function(e,n,r){"use strict";var a=r(85893),t=r(74065),s=r(29618),o=r(47028),i=r(23508),l=function(e){var n="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,a){return"function"==typeof a?(r.push(a),n):a instanceof RegExp?(r.push("/"+a.source+"/"),n):a},2).replace(RegExp('"'+n+'"',"g"),function(){return r.shift()})};n.Z=function(e){var n=e.currentRules,r=e.header;return(0,a.jsx)("div",{className:"currentRuleInfoDiv",children:(0,a.jsxs)(t.Z,{children:[(0,a.jsx)(s.Z,{expandIcon:(0,a.jsx)(i.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,a.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,a.jsx)(o.Z,{children:(0,a.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:l(n)})})]})})}},73952:function(e,n,r){"use strict";var a=r(85893),t=r(365);n.Z=function(e){var n,r=e.isValid,s="";return r?(n="".concat(t.O,"/valid.png"),s="valid"):(n="".concat(t.O,"/invalid.png"),s="invalid"),(0,a.jsxs)("div",{className:"validationResultDiv",children:[(0,a.jsx)("span",{children:"Validation Result: "}),(0,a.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,a.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},39564:function(e,n,r){"use strict";r.d(n,{q:function(){return a}});var a=["equalTo","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","notEqualTo"]},33147:function(e,n,r){"use strict";r.r(n);var a=r(41799),t=r(69396),s=r(828),o=r(36305),i=r(85893),l=r(67294),u=r(64459),c=r(22416),d=r(22841),p=r(31362),h=r(39564),v=r(2386),f=r(69873),m=r(30612),x=r(73952),Z=r(49072),g={rule:"number"};g[h.q[0]]=5;var j=[{path:"val",ruleSet:["required",g],dependantPaths:["comparisonValue"]}],b={val:3,ruleOption:h.q[0],comparisonValue:5};n.default=function(){var e=(0,u.c)({rules:j,initialFormData:b}),n=e.isValid,r=e.setPathValue,g=e.setRules,N=e.getValue,R=e.getError,_=(0,s.Z)((0,l.useState)(j),2),w=_[0],O=_[1],C=(0,s.Z)((0,l.useState)(h.q[0]),2),E=C[0],k=C[1],S=(0,s.Z)((0,l.useState)(!1),2),V=S[0],q=S[1],y=(0,s.Z)((0,l.useState)(!1),2),T=y[0],I=y[1],D=function(e,n,r){var a=JSON.parse(JSON.stringify(j)),t=(0,o.Z)(a[0].ruleSet),s={rule:"number"};n&&(e?s[n]=function(e){return e.comparisonValue}:s[n]=5),r&&(s.onlyIntegers=!0),t.splice(1,1,s),a[0].ruleSet=t,O(a),g(a)},F=function(e){D(e,E,T),q(e)},P=function(e){D(V,e,T),k(e)},M=function(e){D(V,E,e),I(e)};return(0,i.jsxs)(v.Z,{header:"number",codeUrl:"pages/rules/number.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"number"})," rule checks if the given value is a valid number. If ",(0,i.jsx)("b",{children:"onlyIntegers"})," parameter is set, it also checks if given value is an integer. ",(0,i.jsx)("b",{children:h.q.join(", ")})," parameters are used to make comparisons with given comparison values."]}),(0,i.jsxs)("div",{className:"comparisonDiv",children:[(0,i.jsx)(f.Z,{error:!!R("val"),helperText:R("val")||" ",label:"val",type:"number",value:N("val"),onChange:function(e){return r("val",e.target.value)}}),(0,i.jsx)(m.Z,{className:"ruleOptionComponent",value:E,onChange:function(e,n){P(n)},options:h.q,disableClearable:!1,renderInput:function(e){return(0,i.jsx)(f.Z,(0,t.Z)((0,a.Z)({},e),{label:"ruleOption"}))}}),V?(0,i.jsx)(f.Z,{className:"comparisonComponent",label:"comparisonValue",type:"number",value:N("comparisonValue"),onChange:function(e){return r("comparisonValue",e.target.value)}}):(0,i.jsx)(f.Z,{disabled:!0,className:"comparisonComponent",label:"comparisonValue",type:"number",value:5,onChange:function(){}}),(0,i.jsx)(c.Z,{className:"checkboxOnRight",children:(0,i.jsx)(d.Z,{control:(0,i.jsx)(p.Z,{checked:V,onChange:function(e){return F(e.target.checked)}}),label:"as Function"})})]}),(0,i.jsx)("div",{className:"comparisonDiv",children:(0,i.jsx)(c.Z,{className:"checkboxOnRight",children:(0,i.jsx)(d.Z,{control:(0,i.jsx)(p.Z,{checked:T,onChange:function(e){return M(e.target.checked)}}),label:"onlyIntegers"})})}),(0,i.jsx)(x.Z,{isValid:n}),(0,i.jsx)(Z.Z,{currentRules:w})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=77545)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/regex-847925e7b39f59cf.js b/_next/static/chunks/pages/rules/regex-847925e7b39f59cf.js new file mode 100644 index 0000000..f19ecc5 --- /dev/null +++ b/_next/static/chunks/pages/rules/regex-847925e7b39f59cf.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7843],{23508:function(e,r,a){"use strict";var n=a(91941);r.Z=void 0;var l=n(a(64938)),s=a(85893),i=(0,l.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");r.Z=i},92300:function(e,r,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/regex",function(){return a(12121)}])},49072:function(e,r,a){"use strict";var n=a(85893),l=a(74065),s=a(29618),i=a(47028),t=a(23508),u=function(e){var r="____PLACEHOLDER____",a=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(a.push(n),r):n instanceof RegExp?(a.push("/"+n.source+"/"),r):n},2).replace(RegExp('"'+r+'"',"g"),function(){return a.shift()})};r.Z=function(e){var r=e.currentRules,a=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(l.Z,{children:[(0,n.jsx)(s.Z,{expandIcon:(0,n.jsx)(t.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===a?"Current Rules":a})}),(0,n.jsx)(i.Z,{children:(0,n.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(r)})})]})})}},73952:function(e,r,a){"use strict";var n=a(85893),l=a(365);r.Z=function(e){var r,a=e.isValid,s="";return a?(r="".concat(l.O,"/valid.png"),s="valid"):(r="".concat(l.O,"/invalid.png"),s="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:r,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:a?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},12121:function(e,r,a){"use strict";a.r(r);var n=a(85893),l=a(64459),s=a(2386),i=a(69873),t=a(73952),u=a(49072),c={val:"ab",val2:"a1"},o=[{path:"val",ruleSet:[{rule:"required"},{rule:"regex",regex:/ab+c/}]},{path:"val2",ruleSet:[{rule:"required"},{rule:"regex",regex:/\D\d\D/}]}];r.default=function(){var e=(0,l.c)({rules:o,initialFormData:c}),r=e.isValid,a=e.setPathValue,d=e.getValue,v=e.getError;return(0,n.jsxs)(s.Z,{header:"regex",codeUrl:"pages/rules/regex.js",children:[(0,n.jsxs)("p",{className:"infoParagraph",children:[(0,n.jsx)("b",{children:"regex"})," rule checks if the given value is a valid string according to given"," ",(0,n.jsx)("a",{className:"outsideUrlSpan",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions",target:"_blank",rel:"noreferrer",children:"regex"}),"."]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(i.Z,{error:!!v("val"),helperText:v("val")||" ",label:"val",type:"text",value:d("val")||"",onChange:function(e){return a("val",e.target.value)}}),(0,n.jsx)("span",{className:"regexInfo",children:"regex: /ab+c/"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(i.Z,{error:!!v("val2"),helperText:v("val2")||" ",label:"val2",type:"text",value:d("val2")||"",onChange:function(e){return a("val2",e.target.value)}}),(0,n.jsx)("span",{className:"regexInfo",children:"regex: /\\D\\d\\D/"})]}),(0,n.jsx)(t.Z,{isValid:r}),(0,n.jsx)(u.Z,{currentRules:o})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=92300)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/regex-f069da6a0bfe312e.js b/_next/static/chunks/pages/rules/regex-f069da6a0bfe312e.js deleted file mode 100644 index b8f272a..0000000 --- a/_next/static/chunks/pages/rules/regex-f069da6a0bfe312e.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7843],{23508:function(e,r,a){"use strict";var n=a(91941);r.Z=void 0;var l=n(a(64938)),s=a(85893),i=(0,l.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");r.Z=i},92300:function(e,r,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/regex",function(){return a(12121)}])},49072:function(e,r,a){"use strict";var n=a(85893),l=a(74065),s=a(29618),i=a(47028),t=a(23508),u=function(e){var r="____PLACEHOLDER____",a=[];return JSON.stringify(e,function(e,n){return"function"==typeof n?(a.push(n),r):n instanceof RegExp?(a.push("/"+n.source+"/"),r):n},2).replace(RegExp('"'+r+'"',"g"),function(){return a.shift()})};r.Z=function(e){var r=e.currentRules,a=e.header;return(0,n.jsx)("div",{className:"currentRuleInfoDiv",children:(0,n.jsxs)(l.Z,{children:[(0,n.jsx)(s.Z,{expandIcon:(0,n.jsx)(t.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)("span",{className:"currentRuleLabel",children:void 0===a?"Current Rules":a})}),(0,n.jsx)(i.Z,{children:(0,n.jsx)("span",{className:"currentRuleString",children:u(r)})})]})})}},73952:function(e,r,a){"use strict";var n=a(85893),l=a(365);r.Z=function(e){var r,a=e.isValid,s="";return a?(r="".concat(l.O,"/valid.png"),s="valid"):(r="".concat(l.O,"/invalid.png"),s="invalid"),(0,n.jsxs)("div",{className:"validationResultDiv",children:[(0,n.jsx)("span",{children:"Validation Result: "}),(0,n.jsx)("img",{src:r,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,n.jsx)("span",{className:a?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},12121:function(e,r,a){"use strict";a.r(r);var n=a(85893),l=a(64459),s=a(2386),i=a(69873),t=a(73952),u=a(49072),c={val:"ab",val2:"a1"},o=[{path:"val",ruleSet:[{rule:"required"},{rule:"regex",regex:/ab+c/}]},{path:"val2",ruleSet:[{rule:"required"},{rule:"regex",regex:/\D\d\D/}]}];r.default=function(){var e=(0,l.c)({rules:o,initialFormData:c}),r=e.isValid,a=e.setPathValue,d=e.getValue,v=e.getError;return(0,n.jsxs)(s.Z,{header:"regex",codeUrl:"pages/rules/regex.js",children:[(0,n.jsxs)("p",{className:"infoParagraph",children:[(0,n.jsx)("b",{children:"regex"})," rule checks if the given value is a valid string according to given"," ",(0,n.jsx)("a",{className:"outsideUrlSpan",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions",target:"_blank",rel:"noreferrer",children:"regex"}),"."]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(i.Z,{error:!!v("val"),helperText:v("val")||" ",label:"val",type:"text",value:d("val")||"",onChange:function(e){return a("val",e.target.value)}}),(0,n.jsx)("span",{className:"regexInfo",children:"regex: /ab+c/"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(i.Z,{error:!!v("val2"),helperText:v("val2")||" ",label:"val2",type:"text",value:d("val2")||"",onChange:function(e){return a("val2",e.target.value)}}),(0,n.jsx)("span",{className:"regexInfo",children:"regex: /\\D\\d\\D/"})]}),(0,n.jsx)(t.Z,{isValid:r}),(0,n.jsx)(u.Z,{currentRules:o})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=92300)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/required-4eca508680d528f9.js b/_next/static/chunks/pages/rules/required-4eca508680d528f9.js deleted file mode 100644 index 9ab5fd8..0000000 --- a/_next/static/chunks/pages/rules/required-4eca508680d528f9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5829],{23508:function(e,n,r){"use strict";var i=r(91941);n.Z=void 0;var a=i(r(64938)),s=r(85893),l=(0,a.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=l},94099:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/required",function(){return r(79876)}])},49072:function(e,n,r){"use strict";var i=r(85893),a=r(74065),s=r(29618),l=r(47028),t=r(23508),u=function(e){var n="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(r.push(i),n):i instanceof RegExp?(r.push("/"+i.source+"/"),n):i},2).replace(RegExp('"'+n+'"',"g"),function(){return r.shift()})};n.Z=function(e){var n=e.currentRules,r=e.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(a.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(t.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,i.jsx)(l.Z,{children:(0,i.jsx)("span",{className:"currentRuleString",children:u(n)})})]})})}},73952:function(e,n,r){"use strict";var i=r(85893),a=r(365);n.Z=function(e){var n,r=e.isValid,s="";return r?(n="".concat(a.O,"/valid.png"),s="valid"):(n="".concat(a.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},79876:function(e,n,r){"use strict";r.r(n);var i=r(85893),a=r(64459),s=r(2386),l=r(69873),t=r(73952),u=r(49072),c={},d=[{path:"val",ruleSet:[{rule:"required"}]}];n.default=function(){var e=(0,a.c)({rules:d,initialFormData:c}),n=e.isValid,r=e.setPathValue,o=e.getValue,h=e.getError;return(0,i.jsxs)(s.Z,{header:"required",codeUrl:"pages/rules/required.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"required"})," rule checks if the given value is ",(0,i.jsx)("b",{children:"undefined"}),", ",(0,i.jsx)("b",{children:"null"}),", ",(0,i.jsx)("b",{children:"empty string"})," or"," ",(0,i.jsx)("b",{children:"empty array"}),"."]}),(0,i.jsx)("div",{children:(0,i.jsx)(l.Z,{error:!!h("val"),helperText:h("val")||" ",label:"val",type:"text",value:o("val")||"",onChange:function(e){return r("val",e.target.value)}})}),(0,i.jsx)(t.Z,{isValid:n}),(0,i.jsx)(u.Z,{currentRules:d})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=94099)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/required-a7aacacbc3af7957.js b/_next/static/chunks/pages/rules/required-a7aacacbc3af7957.js new file mode 100644 index 0000000..2159c8c --- /dev/null +++ b/_next/static/chunks/pages/rules/required-a7aacacbc3af7957.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5829],{23508:function(e,n,r){"use strict";var i=r(91941);n.Z=void 0;var a=i(r(64938)),s=r(85893),t=(0,a.default)((0,s.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=t},94099:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/required",function(){return r(79876)}])},49072:function(e,n,r){"use strict";var i=r(85893),a=r(74065),s=r(29618),t=r(47028),l=r(23508),u=function(e){var n="____PLACEHOLDER____",r=[];return JSON.stringify(e,function(e,i){return"function"==typeof i?(r.push(i),n):i instanceof RegExp?(r.push("/"+i.source+"/"),n):i},2).replace(RegExp('"'+n+'"',"g"),function(){return r.shift()})};n.Z=function(e){var n=e.currentRules,r=e.header;return(0,i.jsx)("div",{className:"currentRuleInfoDiv",children:(0,i.jsxs)(a.Z,{children:[(0,i.jsx)(s.Z,{expandIcon:(0,i.jsx)(l.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,i.jsx)("span",{className:"currentRuleLabel",children:void 0===r?"Current Rules":r})}),(0,i.jsx)(t.Z,{children:(0,i.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(n)})})]})})}},73952:function(e,n,r){"use strict";var i=r(85893),a=r(365);n.Z=function(e){var n,r=e.isValid,s="";return r?(n="".concat(a.O,"/valid.png"),s="valid"):(n="".concat(a.O,"/invalid.png"),s="invalid"),(0,i.jsxs)("div",{className:"validationResultDiv",children:[(0,i.jsx)("span",{children:"Validation Result: "}),(0,i.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,i.jsx)("span",{className:r?"validationResultInfoSuccess":"validationResultInfoFail",children:s})]})}},79876:function(e,n,r){"use strict";r.r(n);var i=r(85893),a=r(64459),s=r(2386),t=r(69873),l=r(73952),u=r(49072),c={},d=[{path:"val",ruleSet:[{rule:"required"}]}];n.default=function(){var e=(0,a.c)({rules:d,initialFormData:c}),n=e.isValid,r=e.setPathValue,o=e.getValue,h=e.getError;return(0,i.jsxs)(s.Z,{header:"required",codeUrl:"pages/rules/required.js",children:[(0,i.jsxs)("p",{className:"infoParagraph",children:[(0,i.jsx)("b",{children:"required"})," rule checks if the given value is ",(0,i.jsx)("b",{children:"undefined"}),", ",(0,i.jsx)("b",{children:"null"}),", ",(0,i.jsx)("b",{children:"empty string"})," or"," ",(0,i.jsx)("b",{children:"empty array"}),"."]}),(0,i.jsx)("div",{children:(0,i.jsx)(t.Z,{error:!!h("val"),helperText:h("val")||" ",label:"val",type:"text",value:o("val")||"",onChange:function(e){return r("val",e.target.value)}})}),(0,i.jsx)(l.Z,{isValid:n}),(0,i.jsx)(u.Z,{currentRules:d})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=94099)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/unique-6ca0d5556a80ca69.js b/_next/static/chunks/pages/rules/unique-6ca0d5556a80ca69.js deleted file mode 100644 index b41a482..0000000 --- a/_next/static/chunks/pages/rules/unique-6ca0d5556a80ca69.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9639],{96540:function(e,n,i){"use strict";var t=i(91941);n.Z=void 0;var s=t(i(64938)),l=i(85893),a=(0,s.default)((0,l.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");n.Z=a},41733:function(e,n,i){"use strict";var t=i(91941);n.Z=void 0;var s=t(i(64938)),l=i(85893),a=(0,s.default)((0,l.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");n.Z=a},23508:function(e,n,i){"use strict";var t=i(91941);n.Z=void 0;var s=t(i(64938)),l=i(85893),a=(0,s.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=a},97048:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/unique",function(){return i(36978)}])},49072:function(e,n,i){"use strict";var t=i(85893),s=i(74065),l=i(29618),a=i(47028),c=i(23508),r=function(e){var n="____PLACEHOLDER____",i=[];return JSON.stringify(e,function(e,t){return"function"==typeof t?(i.push(t),n):t instanceof RegExp?(i.push("/"+t.source+"/"),n):t},2).replace(RegExp('"'+n+'"',"g"),function(){return i.shift()})};n.Z=function(e){var n=e.currentRules,i=e.header;return(0,t.jsx)("div",{className:"currentRuleInfoDiv",children:(0,t.jsxs)(s.Z,{children:[(0,t.jsx)(l.Z,{expandIcon:(0,t.jsx)(c.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,t.jsx)("span",{className:"currentRuleLabel",children:void 0===i?"Current Rules":i})}),(0,t.jsx)(a.Z,{children:(0,t.jsx)("span",{className:"currentRuleString",children:r(n)})})]})})}},73952:function(e,n,i){"use strict";var t=i(85893),s=i(365);n.Z=function(e){var n,i=e.isValid,l="";return i?(n="".concat(s.O,"/valid.png"),l="valid"):(n="".concat(s.O,"/invalid.png"),l="invalid"),(0,t.jsxs)("div",{className:"validationResultDiv",children:[(0,t.jsx)("span",{children:"Validation Result: "}),(0,t.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,t.jsx)("span",{className:i?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},36978:function(e,n,i){"use strict";i.r(n);var t=i(828),s=i(36305),l=i(85893),a=i(64459),c=i(2386),r=i(69873),u=i(75084),d=i(96540),h=i(41664),o=i.n(h),f=i(41733),j=i(73952),v=i(49072),x=i(67294),m=[{listPath:"listChild",ruleSet:["required",{rule:"unique"}]},{listPath:"listOfObjectsChild",subRules:[{path:"subkey1",ruleSet:["required",{rule:"unique"}]}]}];n.default=function(){var e=(0,a.c)({rules:m,initialFormData:{listChild:["a","a"],listOfObjectsChild:[{id:1,subkey1:"b"},{id:2,subkey1:"b"}]}}),n=e.isValid,i=e.formData,h=e.setPathValue,p=e.getValue,b=e.getError,C=(0,t.Z)((0,x.useState)(3),2),O=C[0],N=C[1],Z=null,k=function(e){h("listChild",i.listChild.filter(function(n,i){return i!==e}))};i.listChild&&i.listChild.length>0&&(Z=i.listChild.map(function(e,n){return(0,l.jsxs)("div",{children:[(0,l.jsx)(r.Z,{error:!!b("listChild{".concat(n,"}")),helperText:b("listChild{".concat(n,"}"))||" ",label:"unique",type:"text",value:p("listChild[".concat(n,"]"))||"",onChange:function(e){return h("listChild[".concat(n,"]"),e.target.value)}}),(0,l.jsxs)(u.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return k(n)},children:[(0,l.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,l.jsx)(f.Z,{className:"myShinkableButtonIcon"})]})]},n)}));var y=function(e){h("listOfObjectsChild",i.listOfObjectsChild.filter(function(n){return n.id!==e}))},_=null;return i.listOfObjectsChild&&i.listOfObjectsChild.length>0&&(_=i.listOfObjectsChild.map(function(e,n){return(0,l.jsxs)("div",{children:[(0,l.jsx)(r.Z,{error:!!b("listOfObjectsChild{".concat(n,"}.subkey1")),helperText:b("listOfObjectsChild{".concat(n,"}.subkey1"))||" ",label:"unique subkey",type:"text",value:p("listOfObjectsChild[".concat(n,"].subkey1"))||"",onChange:function(e){return h("listOfObjectsChild[".concat(n,"].subkey1"),e.target.value)},id:"listOfObjectsChild{".concat(n,"}.subkey1")}),(0,l.jsxs)(u.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return y(e.id)},children:[(0,l.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,l.jsx)(f.Z,{className:"myShinkableButtonIcon"})]})]},e.id)})),(0,l.jsxs)(c.Z,{header:"Unique",codeUrl:"pages/rules/unique.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:"unique"})," rule checks if non-unique values exist on a"," ",(0,l.jsx)(o(),{className:"inner-link",href:"/library-api/path",children:"listPath"}),"."]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsxs)(u.Z,{className:"myAddButton",variant:"contained",onClick:function(){var e=(0,s.Z)(i.listChild);e.push(""),h("listChild",e)},children:[(0,l.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,l.jsx)(d.Z,{className:"myShinkableButtonIcon"})]})}),(0,l.jsx)("div",{className:"formListField",children:Z}),(0,l.jsx)("div",{className:"errorInfoText",children:b("listChild")}),(0,l.jsx)("div",{children:(0,l.jsxs)(u.Z,{className:"myAddButton",variant:"contained",onClick:function(){var e=(0,s.Z)(i.listOfObjectsChild);e.push({id:O}),N(O+1),h("listOfObjectsChild",e)},children:[(0,l.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,l.jsx)(d.Z,{className:"myShinkableButtonIcon"})]})}),(0,l.jsx)("div",{className:"formListField",children:_}),(0,l.jsx)("div",{className:"errorInfoText",children:b("listOfObjectsChild")}),(0,l.jsx)(j.Z,{isValid:n}),(0,l.jsx)(v.Z,{currentRules:m})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=97048)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/unique-da94991c55c20344.js b/_next/static/chunks/pages/rules/unique-da94991c55c20344.js new file mode 100644 index 0000000..95352eb --- /dev/null +++ b/_next/static/chunks/pages/rules/unique-da94991c55c20344.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9639],{96540:function(e,n,i){"use strict";var t=i(91941);n.Z=void 0;var s=t(i(64938)),l=i(85893),a=(0,s.default)((0,l.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");n.Z=a},41733:function(e,n,i){"use strict";var t=i(91941);n.Z=void 0;var s=t(i(64938)),l=i(85893),a=(0,s.default)((0,l.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");n.Z=a},23508:function(e,n,i){"use strict";var t=i(91941);n.Z=void 0;var s=t(i(64938)),l=i(85893),a=(0,s.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=a},97048:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/unique",function(){return i(36978)}])},49072:function(e,n,i){"use strict";var t=i(85893),s=i(74065),l=i(29618),a=i(47028),c=i(23508),r=function(e){var n="____PLACEHOLDER____",i=[];return JSON.stringify(e,function(e,t){return"function"==typeof t?(i.push(t),n):t instanceof RegExp?(i.push("/"+t.source+"/"),n):t},2).replace(RegExp('"'+n+'"',"g"),function(){return i.shift()})};n.Z=function(e){var n=e.currentRules,i=e.header;return(0,t.jsx)("div",{className:"currentRuleInfoDiv",children:(0,t.jsxs)(s.Z,{children:[(0,t.jsx)(l.Z,{expandIcon:(0,t.jsx)(c.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,t.jsx)("span",{className:"currentRuleLabel",children:void 0===i?"Current Rules":i})}),(0,t.jsx)(a.Z,{children:(0,t.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:r(n)})})]})})}},73952:function(e,n,i){"use strict";var t=i(85893),s=i(365);n.Z=function(e){var n,i=e.isValid,l="";return i?(n="".concat(s.O,"/valid.png"),l="valid"):(n="".concat(s.O,"/invalid.png"),l="invalid"),(0,t.jsxs)("div",{className:"validationResultDiv",children:[(0,t.jsx)("span",{children:"Validation Result: "}),(0,t.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,t.jsx)("span",{className:i?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},36978:function(e,n,i){"use strict";i.r(n);var t=i(828),s=i(36305),l=i(85893),a=i(64459),c=i(2386),r=i(69873),u=i(75084),d=i(96540),h=i(41664),o=i.n(h),f=i(41733),j=i(73952),v=i(49072),x=i(67294),m=[{listPath:"listChild",ruleSet:["required",{rule:"unique"}]},{listPath:"listOfObjectsChild",subRules:[{path:"subkey1",ruleSet:["required",{rule:"unique"}]}]}];n.default=function(){var e=(0,a.c)({rules:m,initialFormData:{listChild:["a","a"],listOfObjectsChild:[{id:1,subkey1:"b"},{id:2,subkey1:"b"}]}}),n=e.isValid,i=e.formData,h=e.setPathValue,p=e.getValue,b=e.getError,C=(0,t.Z)((0,x.useState)(3),2),O=C[0],N=C[1],Z=null,k=function(e){h("listChild",i.listChild.filter(function(n,i){return i!==e}))};i.listChild&&i.listChild.length>0&&(Z=i.listChild.map(function(e,n){return(0,l.jsxs)("div",{children:[(0,l.jsx)(r.Z,{error:!!b("listChild{".concat(n,"}")),helperText:b("listChild{".concat(n,"}"))||" ",label:"unique",type:"text",value:p("listChild[".concat(n,"]"))||"",onChange:function(e){return h("listChild[".concat(n,"]"),e.target.value)}}),(0,l.jsxs)(u.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return k(n)},children:[(0,l.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,l.jsx)(f.Z,{className:"myShinkableButtonIcon"})]})]},n)}));var y=function(e){h("listOfObjectsChild",i.listOfObjectsChild.filter(function(n){return n.id!==e}))},g=null;return i.listOfObjectsChild&&i.listOfObjectsChild.length>0&&(g=i.listOfObjectsChild.map(function(e,n){return(0,l.jsxs)("div",{children:[(0,l.jsx)(r.Z,{error:!!b("listOfObjectsChild{".concat(n,"}.subkey1")),helperText:b("listOfObjectsChild{".concat(n,"}.subkey1"))||" ",label:"unique subkey",type:"text",value:p("listOfObjectsChild[".concat(n,"].subkey1"))||"",onChange:function(e){return h("listOfObjectsChild[".concat(n,"].subkey1"),e.target.value)},id:"listOfObjectsChild{".concat(n,"}.subkey1")}),(0,l.jsxs)(u.Z,{className:"myDeleteButton",variant:"contained",onClick:function(){return y(e.id)},children:[(0,l.jsx)("span",{className:"myShinkableButtonSpan",children:"Delete Element"}),(0,l.jsx)(f.Z,{className:"myShinkableButtonIcon"})]})]},e.id)})),(0,l.jsxs)(c.Z,{header:"Unique",codeUrl:"pages/rules/unique.js",children:[(0,l.jsxs)("p",{className:"infoParagraph",children:[(0,l.jsx)("b",{children:"unique"})," rule checks if non-unique values exist on a"," ",(0,l.jsx)(o(),{className:"inner-link",href:"/library-api/path",children:"listPath"}),"."]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsxs)(u.Z,{className:"myAddButton",variant:"contained",onClick:function(){var e=(0,s.Z)(i.listChild);e.push(""),h("listChild",e)},children:[(0,l.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,l.jsx)(d.Z,{className:"myShinkableButtonIcon"})]})}),(0,l.jsx)("div",{className:"formListField",children:Z}),(0,l.jsx)("div",{className:"errorInfoText",children:b("listChild")}),(0,l.jsx)("div",{children:(0,l.jsxs)(u.Z,{className:"myAddButton",variant:"contained",onClick:function(){var e=(0,s.Z)(i.listOfObjectsChild);e.push({id:O}),N(O+1),h("listOfObjectsChild",e)},children:[(0,l.jsx)("span",{className:"myShinkableButtonSpan",children:"Add New Element"}),(0,l.jsx)(d.Z,{className:"myShinkableButtonIcon"})]})}),(0,l.jsx)("div",{className:"formListField",children:g}),(0,l.jsx)("div",{className:"errorInfoText",children:b("listOfObjectsChild")}),(0,l.jsx)(j.Z,{isValid:n}),(0,l.jsx)(v.Z,{currentRules:m})]})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=97048)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/url-15c7c0854862f458.js b/_next/static/chunks/pages/rules/url-15c7c0854862f458.js deleted file mode 100644 index 1d35d65..0000000 --- a/_next/static/chunks/pages/rules/url-15c7c0854862f458.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4],{23508:function(e,n,a){"use strict";var r=a(91941);n.Z=void 0;var l=r(a(64938)),i=a(85893),s=(0,l.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=s},76232:function(e,n,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/url",function(){return a(15645)}])},49072:function(e,n,a){"use strict";var r=a(85893),l=a(74065),i=a(29618),s=a(47028),t=a(23508),u=function(e){var n="____PLACEHOLDER____",a=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(a.push(r),n):r instanceof RegExp?(a.push("/"+r.source+"/"),n):r},2).replace(RegExp('"'+n+'"',"g"),function(){return a.shift()})};n.Z=function(e){var n=e.currentRules,a=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(l.Z,{children:[(0,r.jsx)(i.Z,{expandIcon:(0,r.jsx)(t.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===a?"Current Rules":a})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)("span",{className:"currentRuleString",children:u(n)})})]})})}},73952:function(e,n,a){"use strict";var r=a(85893),l=a(365);n.Z=function(e){var n,a=e.isValid,i="";return a?(n="".concat(l.O,"/valid.png"),i="valid"):(n="".concat(l.O,"/invalid.png"),i="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:a?"validationResultInfoSuccess":"validationResultInfoFail",children:i})]})}},15645:function(e,n,a){"use strict";a.r(n);var r=a(85893),l=a(64459),i=a(2386),s=a(69873),t=a(73952),u=a(49072),c={val:"aa"},d=[{path:"val",ruleSet:[{rule:"required"},{rule:"url"}]}];n.default=function(){var e=(0,l.c)({rules:d,initialFormData:c}),n=e.isValid,a=e.setPathValue,o=e.getValue,v=e.getError;return(0,r.jsxs)(i.Z,{header:"url",codeUrl:"pages/rules/url.js",children:[(0,r.jsxs)("p",{className:"infoParagraph",children:[(0,r.jsx)("b",{children:"url"})," rule checks if the given value is a valid url."]}),(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{error:!!v("val"),helperText:v("val")||" ",label:"val",type:"text",value:o("val")||"",onChange:function(e){return a("val",e.target.value)}})}),(0,r.jsx)(t.Z,{isValid:n}),(0,r.jsx)(u.Z,{currentRules:d})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=76232)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/rules/url-eeb71535eb62076b.js b/_next/static/chunks/pages/rules/url-eeb71535eb62076b.js new file mode 100644 index 0000000..8650766 --- /dev/null +++ b/_next/static/chunks/pages/rules/url-eeb71535eb62076b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4],{23508:function(e,n,a){"use strict";var r=a(91941);n.Z=void 0;var i=r(a(64938)),l=a(85893),s=(0,i.default)((0,l.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");n.Z=s},76232:function(e,n,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rules/url",function(){return a(15645)}])},49072:function(e,n,a){"use strict";var r=a(85893),i=a(74065),l=a(29618),s=a(47028),t=a(23508),u=function(e){var n="____PLACEHOLDER____",a=[];return JSON.stringify(e,function(e,r){return"function"==typeof r?(a.push(r),n):r instanceof RegExp?(a.push("/"+r.source+"/"),n):r},2).replace(RegExp('"'+n+'"',"g"),function(){return a.shift()})};n.Z=function(e){var n=e.currentRules,a=e.header;return(0,r.jsx)("div",{className:"currentRuleInfoDiv",children:(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(l.Z,{expandIcon:(0,r.jsx)(t.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,r.jsx)("span",{className:"currentRuleLabel",children:void 0===a?"Current Rules":a})}),(0,r.jsx)(s.Z,{children:(0,r.jsx)("span",{suppressHydrationWarning:!0,className:"currentRuleString",children:u(n)})})]})})}},73952:function(e,n,a){"use strict";var r=a(85893),i=a(365);n.Z=function(e){var n,a=e.isValid,l="";return a?(n="".concat(i.O,"/valid.png"),l="valid"):(n="".concat(i.O,"/invalid.png"),l="invalid"),(0,r.jsxs)("div",{className:"validationResultDiv",children:[(0,r.jsx)("span",{children:"Validation Result: "}),(0,r.jsx)("img",{src:n,alt:"validationresult",width:24,height:24,className:"validationResultIcon"}),(0,r.jsx)("span",{className:a?"validationResultInfoSuccess":"validationResultInfoFail",children:l})]})}},15645:function(e,n,a){"use strict";a.r(n);var r=a(85893),i=a(64459),l=a(2386),s=a(69873),t=a(73952),u=a(49072),c={val:"aa"},d=[{path:"val",ruleSet:[{rule:"required"},{rule:"url"}]}];n.default=function(){var e=(0,i.c)({rules:d,initialFormData:c}),n=e.isValid,a=e.setPathValue,o=e.getValue,v=e.getError;return(0,r.jsxs)(l.Z,{header:"url",codeUrl:"pages/rules/url.js",children:[(0,r.jsxs)("p",{className:"infoParagraph",children:[(0,r.jsx)("b",{children:"url"})," rule checks if the given value is a valid url."]}),(0,r.jsx)("div",{children:(0,r.jsx)(s.Z,{error:!!v("val"),helperText:v("val")||" ",label:"val",type:"text",value:o("val")||"",onChange:function(e){return a("val",e.target.value)}})}),(0,r.jsx)(t.Z,{isValid:n}),(0,r.jsx)(u.Z,{currentRules:d})]})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=76232)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/xjFZl_scbcV6PZovP0Q5g/_buildManifest.js b/_next/static/xjFZl_scbcV6PZovP0Q5g/_buildManifest.js deleted file mode 100644 index 869a110..0000000 --- a/_next/static/xjFZl_scbcV6PZovP0Q5g/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(s,e,a){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/pages/index-f317df4b72fcbcfd.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/advanced/focus-to-error-after-submit":["static/chunks/pages/advanced/focus-to-error-after-submit-516e87e5e5f04390.js"],"/advanced/focus-to-error-on-list-after-submit":["static/chunks/pages/advanced/focus-to-error-on-list-after-submit-921b21f319b3fa7f.js"],"/advanced/hide-before-submit":["static/chunks/pages/advanced/hide-before-submit-60aa3ace5b48cd68.js"],"/advanced/show-after-blur":["static/chunks/pages/advanced/show-after-blur-4b5ab9767fc2befd.js"],"/advanced/validate-complex-forms":["static/chunks/pages/advanced/validate-complex-forms-3bc4d73787068bad.js"],"/advanced/validate-list-of-objects":["static/chunks/pages/advanced/validate-list-of-objects-1d5d2e6f693041e9.js"],"/advanced/validate-lists":["static/chunks/pages/advanced/validate-lists-b6b69660e88a8546.js"],"/customizations/apply-to-nulls":[e,"static/chunks/pages/customizations/apply-to-nulls-59c7aa5861081007.js"],"/customizations/conditional-rules":["static/chunks/pages/customizations/conditional-rules-2f8181b4c394c352.js"],"/customizations/custom-element-focus-handler":["static/chunks/pages/customizations/custom-element-focus-handler-de5c5b2bed393f71.js"],"/customizations/custom-message":["static/chunks/pages/customizations/custom-message-14e0b0102df13680.js"],"/customizations/translations":["static/chunks/pages/customizations/translations-b416ffd3ef01c6c2.js"],"/examples/antd":["static/chunks/2202-0a3f6f077265c0d1.js","static/chunks/pages/examples/antd-a3bf2e1680579fb2.js"],"/examples/form-data":["static/chunks/pages/examples/form-data-367827eed3249f70.js"],"/examples/is-path-valid":[a,"static/chunks/pages/examples/is-path-valid-44dbb74a63d84b8c.js"],"/examples/mui":["static/chunks/pages/examples/mui-b2fbc642326820d7.js"],"/examples/prime-react":["static/chunks/4792-18a768ae8d4b38f3.js","static/chunks/pages/examples/prime-react-c817363e937dc438.js"],"/examples/pure":["static/chunks/pages/examples/pure-f0deef54e2f7dcc8.js"],"/examples/react-bootstrap":[a,"static/chunks/pages/examples/react-bootstrap-4ca33caa8c75839b.js"],"/examples/react-native":["static/chunks/pages/examples/react-native-82631b863ca0106d.js"],"/examples/set-form-data":[s,"static/chunks/pages/examples/set-form-data-bc413f7c82090d1b.js"],"/examples/set-form-data-and-rules":["static/chunks/pages/examples/set-form-data-and-rules-48f220728fb25b60.js"],"/examples/set-path-value":[s,"static/chunks/pages/examples/set-path-value-f135f1ae36e9b7ec.js"],"/examples/set-rules":["static/chunks/pages/examples/set-rules-91443b61f362c9f9.js"],"/examples/unset-path-is-blurred":[s,"static/chunks/pages/examples/unset-path-is-blurred-ee358830cf5b5cf2.js"],"/examples/unset-path-value":[s,"static/chunks/pages/examples/unset-path-value-393d59c4b4438197.js"],"/examples/validation-error":["static/chunks/pages/examples/validation-error-46e800e8c1bafe72.js"],"/examples/validation-error-original-result":["static/chunks/pages/examples/validation-error-original-result-852f8e29789368d5.js"],"/getting-started/home":["static/chunks/pages/getting-started/home-86ef754240d34b8d.js"],"/getting-started/installation":["static/chunks/pages/getting-started/installation-d1d1132fd20dd7a8.js"],"/getting-started/usage":["static/chunks/pages/getting-started/usage-9aa0d6d45ea2172b.js"],"/library-api/path":["static/chunks/pages/library-api/path-fcb03235b6db2ac2.js"],"/library-api/react-validatable-form-provider":["static/chunks/pages/library-api/react-validatable-form-provider-2b8fd7e3a13b0759.js"],"/library-api/rule":["static/chunks/pages/library-api/rule-b6136d4cd84bdf06.js"],"/library-api/rules":["static/chunks/pages/library-api/rules-c6d397233f063cf8.js"],"/library-api/use-validatable-form":["static/chunks/pages/library-api/use-validatable-form-22a4e31cf3740308.js"],"/rules/custom-on-hook":["static/chunks/pages/rules/custom-on-hook-0dc31e976123b512.js"],"/rules/custom-on-provider":["static/chunks/pages/rules/custom-on-provider-f98f4dc9098b83e7.js"],"/rules/date":[e,"static/chunks/7918-6100828040f7d812.js","static/chunks/pages/rules/date-dd0b9285a9788361.js"],"/rules/email":["static/chunks/pages/rules/email-53b495a45046dc05.js"],"/rules/equality":["static/chunks/pages/rules/equality-bab54b40785c2d7c.js"],"/rules/iban":["static/chunks/pages/rules/iban-19e1df702bcfebe4.js"],"/rules/includes":["static/chunks/pages/rules/includes-a2eb0a0e0a2f4afb.js"],"/rules/length":["static/chunks/pages/rules/length-673b1ced6f4e3999.js"],"/rules/list-size":["static/chunks/pages/rules/list-size-0fc0b7414626f0c8.js"],"/rules/number":["static/chunks/pages/rules/number-43cb7dcb3cd9c974.js"],"/rules/regex":["static/chunks/pages/rules/regex-f069da6a0bfe312e.js"],"/rules/required":["static/chunks/pages/rules/required-4eca508680d528f9.js"],"/rules/unique":["static/chunks/pages/rules/unique-6ca0d5556a80ca69.js"],"/rules/url":["static/chunks/pages/rules/url-15c7c0854862f458.js"],sortedPages:["/","/_app","/_error","/advanced/focus-to-error-after-submit","/advanced/focus-to-error-on-list-after-submit","/advanced/hide-before-submit","/advanced/show-after-blur","/advanced/validate-complex-forms","/advanced/validate-list-of-objects","/advanced/validate-lists","/customizations/apply-to-nulls","/customizations/conditional-rules","/customizations/custom-element-focus-handler","/customizations/custom-message","/customizations/translations","/examples/antd","/examples/form-data","/examples/is-path-valid","/examples/mui","/examples/prime-react","/examples/pure","/examples/react-bootstrap","/examples/react-native","/examples/set-form-data","/examples/set-form-data-and-rules","/examples/set-path-value","/examples/set-rules","/examples/unset-path-is-blurred","/examples/unset-path-value","/examples/validation-error","/examples/validation-error-original-result","/getting-started/home","/getting-started/installation","/getting-started/usage","/library-api/path","/library-api/react-validatable-form-provider","/library-api/rule","/library-api/rules","/library-api/use-validatable-form","/rules/custom-on-hook","/rules/custom-on-provider","/rules/date","/rules/email","/rules/equality","/rules/iban","/rules/includes","/rules/length","/rules/list-size","/rules/number","/rules/regex","/rules/required","/rules/unique","/rules/url"]}}("static/chunks/4041-2e33a43480042390.js","static/chunks/2601-6e247d7859f6949d.js","static/chunks/4057-83f7d471d8239d76.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/advanced/focus-to-error-after-submit.html b/advanced/focus-to-error-after-submit.html index 606d096..830760c 100644 --- a/advanced/focus-to-error-after-submit.html +++ b/advanced/focus-to-error-after-submit.html @@ -1,4 +1,4 @@ -focusToErrorAfterSubmit
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
focusToErrorAfterSubmitView on GitHub

focusToErrorAfterSubmit parameter is used to automatically focus to the first element with a validation error. In order to find the element on DOM, path value should be equal to the HTML element ID. If DOM element ID is different than path value, then the DOM element ID should be passed as elementId param to the rule definition.

Validation Result: validationresultvalid
[ +focusToErrorAfterSubmit
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
focusToErrorAfterSubmitView on GitHub

focusToErrorAfterSubmit parameter is used to automatically focus to the first element with a validation error. In order to find the element on DOM, path value should be equal to the HTML element ID. If DOM element ID is different than path value, then the DOM element ID should be passed as elementId param to the rule definition.

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -42,4 +42,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/advanced/focus-to-error-on-list-after-submit.html b/advanced/focus-to-error-on-list-after-submit.html index b6715da..c7fb907 100644 --- a/advanced/focus-to-error-on-list-after-submit.html +++ b/advanced/focus-to-error-on-list-after-submit.html @@ -1,4 +1,4 @@ -focusToErrorAfterSubmit on Lists
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
focusToErrorAfterSubmit on ListsView on GitHub

focusToErrorAfterSubmit parameter is used to automatically focus to the first element of list with validation errors. In order to find the element on DOM, listPath value and index of the list should be equal to the HTML element ID in a format listPath{index}. If DOM list element ID prefix is different than listPath value, then the DOM element ID prefix should be passed as listElementId param to the rule definition.

Validation Result: validationresultvalid
[ +focusToErrorAfterSubmit on Lists
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
focusToErrorAfterSubmit on ListsView on GitHub

focusToErrorAfterSubmit parameter is used to automatically focus to the first element of list with validation errors. In order to find the element on DOM, listPath value and index of the list should be equal to the HTML element ID in a format listPath{index}. If DOM list element ID prefix is different than listPath value, then the DOM element ID prefix should be passed as listElementId param to the rule definition.

Validation Result: validationresultvalid
[ { "listPath": "listChild", "ruleSet": [ @@ -20,4 +20,4 @@ ], "elementId": "listErrorFocusElement" } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/advanced/hide-before-submit.html b/advanced/hide-before-submit.html index 78f0f79..7a39598 100644 --- a/advanced/hide-before-submit.html +++ b/advanced/hide-before-submit.html @@ -1,4 +1,4 @@ -hideBeforeSubmit
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
hideBeforeSubmitView on GitHub

hideBeforeSubmit parameter is used to hide validation errors before setFormIsSubmitted() function is called. Later, validation errors can also be hidden by calling resetForm() function.

Validation Result: validationresultvalid
[ +hideBeforeSubmit
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
hideBeforeSubmitView on GitHub

hideBeforeSubmit parameter is used to hide validation errors before setFormIsSubmitted() function is called. Later, validation errors can also be hidden by calling resetForm() function.

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -42,4 +42,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/advanced/show-after-blur.html b/advanced/show-after-blur.html index 588309e..58e8142 100644 --- a/advanced/show-after-blur.html +++ b/advanced/show-after-blur.html @@ -1,4 +1,4 @@ -showAfterBlur
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
showAfterBlurView on GitHub

showAfterBlur parameter is used to show validation error of a path after setPathIsBlurred(path) function is called. Later, validation errors can also be hidden by calling resetForm() function.

Validation Result: validationresultvalid
[ +showAfterBlur
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
showAfterBlurView on GitHub

showAfterBlur parameter is used to show validation error of a path after setPathIsBlurred(path) function is called. Later, validation errors can also be hidden by calling resetForm() function.

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -42,4 +42,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/advanced/validate-complex-forms.html b/advanced/validate-complex-forms.html index acc51f5..45ea18e 100644 --- a/advanced/validate-complex-forms.html +++ b/advanced/validate-complex-forms.html @@ -1,4 +1,4 @@ -Validate Complex Forms
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Validate Complex FormsView on GitHubView on GitHubView on GitHub

react-validatable-form can handle validation of complex forms. The form can have multiple paths, listPaths and subcomponents.

disable all subkey2 rows

Validation Result: validationresultvalid
[ +Validate Complex Forms
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Validate Complex FormsView on GitHubView on GitHubView on GitHub

react-validatable-form can handle validation of complex forms. The form can have multiple paths, listPaths and subcomponents.

disable all subkey2 rows

Validation Result: validationresultvalid
[ { "path": "child1", "ruleSet": [ @@ -101,4 +101,4 @@ "required" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/advanced/validate-list-of-objects.html b/advanced/validate-list-of-objects.html index 477c31b..1a32706 100644 --- a/advanced/validate-list-of-objects.html +++ b/advanced/validate-list-of-objects.html @@ -1,4 +1,4 @@ -Validate List of Objects
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Validate List of ObjectsView on GitHub

An array of objects with more than one subkeys can be validated using listPath and each subkey can have different rules which should be defined in subRules key.

disable all subkey2 rows

disable

Validation Result: validationresultvalid
[ +Validate List of Objects
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Validate List of ObjectsView on GitHub

An array of objects with more than one subkeys can be validated using listPath and each subkey can have different rules which should be defined in subRules key.

disable all subkey2 rows

disable

Validation Result: validationresultvalid
[ { "listPath": "listChild", "subRules": [ @@ -53,4 +53,4 @@ ], "elementId": "listErrorFocusElement" } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/advanced/validate-lists.html b/advanced/validate-lists.html index 6a52506..bd393fa 100644 --- a/advanced/validate-lists.html +++ b/advanced/validate-lists.html @@ -1,4 +1,4 @@ -Validate Lists
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Validate ListsView on GitHub

An array of values can be validated using listPath key.

Validation Result: validationresultvalid
[ +Validate Lists
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Validate ListsView on GitHub

An array of values can be validated using listPath key.

Validation Result: validationresultvalid
[ { "path": "listChild", "ruleSet": [ @@ -19,4 +19,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/customizations/apply-to-nulls.html b/customizations/apply-to-nulls.html index 5ee47d4..4a94894 100644 --- a/customizations/apply-to-nulls.html +++ b/customizations/apply-to-nulls.html @@ -1,4 +1,4 @@ -applyToNulls
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
applyToNullsView on GitHub

By default react-validatable-form interprets undefined, null, empty string or empty array values as valid values. If you want any rule to be applied to these values, applyToNulls parameter should be used.

Validation Result: validationresultvalid
[ +applyToNulls
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
applyToNullsView on GitHub

By default react-validatable-form interprets undefined, null, empty string or empty array values as valid values. If you want any rule to be applied to these values, applyToNulls parameter should be used.

Validation Result: validationresultvalid
[ { "path": "val1", "ruleSet": [ @@ -103,4 +103,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/customizations/conditional-rules.html b/customizations/conditional-rules.html index dbdebbb..c7d553e 100644 --- a/customizations/conditional-rules.html +++ b/customizations/conditional-rules.html @@ -1,4 +1,4 @@ -disableIf & enableIf
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
disableIf & enableIfView on GitHub

Any validation rule can be disabled if the defined disableIf function returns true. Any validation rule can only be enabled if the defined enableIf function returns true.

Validation Result: validationresultvalid
[ +disableIf & enableIf
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
disableIf & enableIfView on GitHub

Any validation rule can be disabled if the defined disableIf function returns true. Any validation rule can only be enabled if the defined enableIf function returns true.

Validation Result: validationresultvalid
[ { "path": "val1", "ruleSet": [ @@ -23,4 +23,4 @@ "enableVal2Rule" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/customizations/custom-element-focus-handler.html b/customizations/custom-element-focus-handler.html index fb02d53..8b639d5 100644 --- a/customizations/custom-element-focus-handler.html +++ b/customizations/custom-element-focus-handler.html @@ -1,4 +1,4 @@ -elementFocusHandler
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
elementFocusHandlerView on GitHub

elementFocusHandler parameter is used to manually handle focusing to the first element with a validation error.

Validation Result: validationresultvalid
[ +elementFocusHandler
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
elementFocusHandlerView on GitHub

elementFocusHandler parameter is used to manually handle focusing to the first element with a validation error.

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -42,4 +42,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/customizations/custom-message.html b/customizations/custom-message.html index 149bcfd..46393d1 100644 --- a/customizations/custom-message.html +++ b/customizations/custom-message.html @@ -1,4 +1,4 @@ -customMessage
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
customMessageView on GitHub

Validation error message of a rule can be customized by passing customMessage param to the rule.

Validation Result: validationresultvalid
[ +customMessage
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
customMessageView on GitHub

Validation error message of a rule can be customized by passing customMessage param to the rule.

Validation Result: validationresultvalid
[ { "path": "val1", "ruleSet": [ @@ -92,4 +92,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/customizations/translations.html b/customizations/translations.html index de8bbf2..83693b7 100644 --- a/customizations/translations.html +++ b/customizations/translations.html @@ -1,4 +1,4 @@ -translations
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
translationsView on GitHubView on GitHub

Validation error messages of any rules can be customized in app by passing translations param to ReactValidatableFormProvider.

Validation Result: validationresultvalid
[ +translations
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
translationsView on GitHubView on GitHub

Validation error messages of any rules can be customized in app by passing translations param to ReactValidatableFormProvider.

Validation Result: validationresultvalid
[ { "path": "val1", "ruleSet": [ @@ -26,4 +26,4 @@ "email" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/antd.html b/examples/antd.html index d0c671b..830ef67 100644 --- a/examples/antd.html +++ b/examples/antd.html @@ -1,4 +1,4 @@ -Example Usage with Ant Design Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Example Usage with Ant Design ComponentsView on GitHub
Validation Result: validationresultvalid
[ +Example Usage with Ant Design Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Example Usage with Ant Design ComponentsView on GitHub
Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/form-data.html b/examples/form-data.html index 71cfe8f..8ee3ea0 100644 --- a/examples/form-data.html +++ b/examples/form-data.html @@ -1,4 +1,4 @@ -formData
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
formDataView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
[ +formData
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
formDataView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/is-path-valid.html b/examples/is-path-valid.html index becb081..a5a429f 100644 --- a/examples/is-path-valid.html +++ b/examples/is-path-valid.html @@ -1,4 +1,4 @@ -isPathValid
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
isPathValidView on GitHub
Validation Result: validationresultvalid
[ +isPathValid
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
isPathValidView on GitHub
Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/mui.html b/examples/mui.html index 30cc012..6a5083f 100644 --- a/examples/mui.html +++ b/examples/mui.html @@ -1,4 +1,4 @@ -Example Usage with MUI Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Example Usage with MUI ComponentsView on GitHub

Validation Result: validationresultvalid
[ +Example Usage with MUI Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Example Usage with MUI ComponentsView on GitHub

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/prime-react.html b/examples/prime-react.html index c9178fb..30f34c5 100644 --- a/examples/prime-react.html +++ b/examples/prime-react.html @@ -1,4 +1,4 @@ -Example Usage with PrimeReact Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Example Usage with PrimeReact ComponentsView on GitHub
empty
Validation Result: validationresultvalid
[ +Example Usage with PrimeReact Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Example Usage with PrimeReact ComponentsView on GitHub
empty
Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/pure.html b/examples/pure.html index 85e379c..6a488af 100644 --- a/examples/pure.html +++ b/examples/pure.html @@ -1,4 +1,4 @@ -Example Usage with Pure React Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Example Usage with Pure React ComponentsView on GitHub
Validation Result: validationresultvalid
[ +Example Usage with Pure React Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Example Usage with Pure React ComponentsView on GitHub
Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/react-bootstrap.html b/examples/react-bootstrap.html index cd89ddf..014d89d 100644 --- a/examples/react-bootstrap.html +++ b/examples/react-bootstrap.html @@ -1,4 +1,4 @@ -Example Usage with React-Bootstrap Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Example Usage with React-Bootstrap ComponentsView on GitHub
Validation Result: validationresultvalid
[ +Example Usage with React-Bootstrap Components
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Example Usage with React-Bootstrap ComponentsView on GitHub
Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/react-native.html b/examples/react-native.html index 21f95be..8a920fa 100644 --- a/examples/react-native.html +++ b/examples/react-native.html @@ -1 +1 @@ -Example Usage with React Native
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Example Usage with React NativeView on GitHub
\ No newline at end of file +Example Usage with React Native
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Example Usage with React NativeView on GitHub
\ No newline at end of file diff --git a/examples/set-form-data-and-rules.html b/examples/set-form-data-and-rules.html index 61ce26b..25cdd64 100644 --- a/examples/set-form-data-and-rules.html +++ b/examples/set-form-data-and-rules.html @@ -1,4 +1,4 @@ -setFormDataAndRules
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
setFormDataAndRulesView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
[ +setFormDataAndRules
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
setFormDataAndRulesView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/set-form-data.html b/examples/set-form-data.html index 7976235..6b89fcf 100644 --- a/examples/set-form-data.html +++ b/examples/set-form-data.html @@ -1,4 +1,4 @@ -setFormData
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
setFormDataView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
[ +setFormData
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
setFormDataView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/set-path-value.html b/examples/set-path-value.html index cbf5325..7b9bd5a 100644 --- a/examples/set-path-value.html +++ b/examples/set-path-value.html @@ -1,4 +1,4 @@ -setPathValue
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
setPathValueView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
[ +setPathValue
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
setPathValueView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/set-rules.html b/examples/set-rules.html index b39440b..6e5e983 100644 --- a/examples/set-rules.html +++ b/examples/set-rules.html @@ -1,4 +1,4 @@ -setRules
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
setRulesView on GitHub
Click "Change Rule" button to set new rules

Europe

Validation Result: validationresultvalid
[ +setRules
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
setRulesView on GitHub
Click "Change Rule" button to set new rules

Europe

Validation Result: validationresultvalid
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/unset-path-is-blurred.html b/examples/unset-path-is-blurred.html index 20d98cc..d5b0482 100644 --- a/examples/unset-path-is-blurred.html +++ b/examples/unset-path-is-blurred.html @@ -1,4 +1,4 @@ -unsetPathIsBlurred
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
unsetPathIsBlurredView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
[ +unsetPathIsBlurred
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
unsetPathIsBlurredView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/unset-path-value.html b/examples/unset-path-value.html index a40f635..da15313 100644 --- a/examples/unset-path-value.html +++ b/examples/unset-path-value.html @@ -1,4 +1,4 @@ -unsetPathValue
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
unsetPathValueView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
[ +unsetPathValue
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
unsetPathValueView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/validation-error-original-result.html b/examples/validation-error-original-result.html index d207c54..388ad0b 100644 --- a/examples/validation-error-original-result.html +++ b/examples/validation-error-original-result.html @@ -1,4 +1,4 @@ -validationErrorOriginalResult
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
validationErrorOriginalResultView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
{}
[ +validationErrorOriginalResult
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
validationErrorOriginalResultView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
{}
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/examples/validation-error.html b/examples/validation-error.html index 664935b..749efde 100644 --- a/examples/validation-error.html +++ b/examples/validation-error.html @@ -1,4 +1,4 @@ -validationError
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
validationErrorView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
[ +validationError
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
validationErrorView on GitHub
Please wait for 2 seconds...

Validation Result: validationresultvalid
{}
[ { "path": "textVal1", "ruleSet": [ @@ -31,4 +31,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/getting-started/home.html b/getting-started/home.html index e937692..e052d1c 100644 --- a/getting-started/home.html +++ b/getting-started/home.html @@ -1 +1 @@ -react-validatable-form
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
logo

react-validatable-form

react-validatable-form is a React hook that is used to create dynamic client side validations on React forms.
npmlicensegithubissuevulnerabilitiesdownloadsize
GitHubContact Us
\ No newline at end of file +react-validatable-form
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
logo

react-validatable-form

react-validatable-form is a React hook that is used to create dynamic client side validations on React forms.
npmlicensegithubissuevulnerabilitiesdownloadsize
GitHubContact Us
\ No newline at end of file diff --git a/getting-started/installation.html b/getting-started/installation.html index 01f8029..298e719 100644 --- a/getting-started/installation.html +++ b/getting-started/installation.html @@ -1 +1 @@ -Installation
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Installation

react-validatable-form is a React hook that is used to create dynamic client side validations on React forms.

\ No newline at end of file +Installation
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Installation

react-validatable-form is a React hook that is used to create dynamic client side validations on React forms.

\ No newline at end of file diff --git a/getting-started/usage.html b/getting-started/usage.html index c9c1f9c..85ff238 100644 --- a/getting-started/usage.html +++ b/getting-started/usage.html @@ -1,4 +1,4 @@ -Usage
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Usage
react-validatable-form is based on Context. useValidatableForm hook should be used inside ReactValidatableFormProvider. Wrap your App inside ReactValidatableFormProvider and pass the app-scoped props. Example usage of ReactValidatableFormProvider: See API
import { ReactValidatableFormProvider } from 'react-validatable-form'; +Usage
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Usage
react-validatable-form is based on Context. useValidatableForm hook should be used inside ReactValidatableFormProvider. Wrap your App inside ReactValidatableFormProvider and pass the app-scoped props. Example usage of ReactValidatableFormProvider: See API
import { ReactValidatableFormProvider } from 'react-validatable-form'; //.... return <ReactValidatableFormProvider> @@ -28,4 +28,4 @@ value={getValue('val') || ''} onChange={(e) => setPathValue('val', e.target.value)} />; -
\ No newline at end of file +
\ No newline at end of file diff --git a/index.html b/index.html index 7054027..9bb3a9a 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Redirecting Homepage...
\ No newline at end of file +
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Redirecting Homepage...
\ No newline at end of file diff --git a/library-api/path.html b/library-api/path.html index 692d945..0742e45 100644 --- a/library-api/path.html +++ b/library-api/path.html @@ -1,4 +1,4 @@ -Path
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Path

Path is a string value that is used to access any value on the formData using lodash get method.

This table shows how to use path and listPath keys for the following code.

Path TypeUsage Example
Update value of first level childsetPathValue('child1', newValue)
Update value of second level childsetPathValue('child3.subchild1', newValue)
Update value of list's element at 0th indexsetPathValue('listChild[0]', newValue)
Update value of list of object's element at 0th index with key subkey1setPathValue('listChild[0].subkey1', newValue)
Get value of first level childgetValue('child1')
Get value of second level childgetValue('child3.subchild1')
Get value of list's element at 0th indexgetValue('listChild[0]')
Get value of list of object's element at 0th index with key subkey1getValue('listChild[0].subkey1')
Get error of first level childgetError('child1')
Get error of second level childgetError('child3.subchild1')
Get error of list's element at 0th indexgetError('listChild{0}')
Get error of list of object's element at 0th index with key subkey1getError('listChild{0}.subkey1')
Unset value and key of first level childunsetPathValue('child1')
Unset value and key of second level childunsetPathValue('child3.subchild1')
Unset value and key of list's element at 0th indexunsetPathValue('listChild[0]')
Unset value and key of list of object's element at 0th index with key subkey1unsetPathValue('listChild[0].subkey1')
+Path
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Path

Path is a string value that is used to access any value on the formData using lodash get method.

This table shows how to use path and listPath keys for the following code.

Path TypeUsage Example
Update value of first level childsetPathValue('child1', newValue)
Update value of second level childsetPathValue('child3.subchild1', newValue)
Update value of list's element at 0th indexsetPathValue('listChild[0]', newValue)
Update value of list of object's element at 0th index with key subkey1setPathValue('listChild[0].subkey1', newValue)
Get value of first level childgetValue('child1')
Get value of second level childgetValue('child3.subchild1')
Get value of list's element at 0th indexgetValue('listChild[0]')
Get value of list of object's element at 0th index with key subkey1getValue('listChild[0].subkey1')
Get error of first level childgetError('child1')
Get error of second level childgetError('child3.subchild1')
Get error of list's element at 0th indexgetError('listChild{0}')
Get error of list of object's element at 0th index with key subkey1getError('listChild{0}.subkey1')
Unset value and key of first level childunsetPathValue('child1')
Unset value and key of second level childunsetPathValue('child3.subchild1')
Unset value and key of list's element at 0th indexunsetPathValue('listChild[0]')
Unset value and key of list of object's element at 0th index with key subkey1unsetPathValue('listChild[0].subkey1')
////////////-- example rules --/////////// const rules = [ { path: 'child1', ruleSet: ['required'] }, @@ -48,4 +48,4 @@ "listChild{1}.subkey2": "This field is required", // list of object's child } -
\ No newline at end of file +
\ No newline at end of file diff --git a/library-api/react-validatable-form-provider.html b/library-api/react-validatable-form-provider.html index 416c4ad..08ea2d4 100644 --- a/library-api/react-validatable-form-provider.html +++ b/library-api/react-validatable-form-provider.html @@ -1,4 +1,4 @@ -ReactValidatableFormProvider
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
ReactValidatableFormProvider
<ReactValidatableFormProvider +ReactValidatableFormProvider
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
ReactValidatableFormProvider
<ReactValidatableFormProvider lang={lang} customRules={customRules} translations={translations} @@ -10,4 +10,4 @@ elementFocusHandler={elementFocusHandler} > <App /> -</ReactValidatableFormProvider>
Provider Parameters
See Example Usages
lang (string)
Selected language to show validation errors.
customRules (object)
Custom rules that are specific to app and that can used at any component wrapped by the provider.
translations (object)
Custom translation objects to override default error messages or to add a new language for error messages.
dateFormatterFunction (function)
Function that is used to format dates used in date rule without withTime option.
dateWithTimeFormatterFunction (function)
Function that is used to format dates used in date rule with withTime option.
hideBeforeSubmit (boolean)
Flag to hide validation errors before setFormIsSubmitted function is called.
showAfterBlur (boolean)
Flag to hide validation errors before setPathIsBlurred function is called for any path.
focusToErrorAfterSubmit (boolean)
Flag to automatically focus to first HTML element with validation error after setFormIsSubmitted function is called.
elementFocusHandler (function)
Function that accepts the first "elementId" of current validation errors as parameter that is used to customly manage DOM after submit.
\ No newline at end of file +</ReactValidatableFormProvider>
Provider Parameters
See Example Usages
lang (string)
Selected language to show validation errors.
customRules (object)
Custom rules that are specific to app and that can used at any component wrapped by the provider.
translations (object)
Custom translation objects to override default error messages or to add a new language for error messages.
dateFormatterFunction (function)
Function that is used to format dates used in date rule without withTime option.
dateWithTimeFormatterFunction (function)
Function that is used to format dates used in date rule with withTime option.
hideBeforeSubmit (boolean)
Flag to hide validation errors before setFormIsSubmitted function is called.
showAfterBlur (boolean)
Flag to hide validation errors before setPathIsBlurred function is called for any path.
focusToErrorAfterSubmit (boolean)
Flag to automatically focus to first HTML element with validation error after setFormIsSubmitted function is called.
elementFocusHandler (function)
Function that accepts the first "elementId" of current validation errors as parameter that is used to customly manage DOM after submit.
\ No newline at end of file diff --git a/library-api/rule.html b/library-api/rule.html index 3348d06..acb6e4c 100644 --- a/library-api/rule.html +++ b/library-api/rule.html @@ -1,4 +1,4 @@ -Rule
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
Rule
ruleSet: [ +Rule
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
Rule
ruleSet: [ { rule: 'required', customMessage: 'This list should not be empty' }, { rule: 'listSize', greaterThan: 2 }, -],
Rule Definition Parameters
rule (string || func)
Identifier (name) of the rule to be run. (Can also be a custom function)
equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo (any || function)
Comparison identifier that can be used only by number, length, listSize and date rules.
equalTo See Example
The equality identifier that can be used with the equality rule.
isOneOf See Example
Checking that it is included in the list available with the equality rule
onlyIntegers (boolean)
Decides whether only integer are allowed that can be used only by number rule.
withTime (boolean)
Decides whether hours and minutes are taken into account that can be used only by date rule.
applyToNulls (boolean) See Example
Decides whether the rule should also be run on null values.
disableIf (func) See Example
Disables running the rule if the return value of the function is truthy.
enableIf (func) See Example
Enables running the rule if the return value of the function is truthy.
customMessage (string || func) See Example
Function to override default error message for the rule.
\ No newline at end of file +],
Rule Definition Parameters
rule (string || func)
Identifier (name) of the rule to be run. (Can also be a custom function)
equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo (any || function)
Comparison identifier that can be used only by number, length, listSize and date rules.
equalTo See Example
The equality identifier that can be used with the equality rule.
isOneOf See Example
Checking that it is included in the list available with the equality rule
onlyIntegers (boolean)
Decides whether only integer are allowed that can be used only by number rule.
withTime (boolean)
Decides whether hours and minutes are taken into account that can be used only by date rule.
applyToNulls (boolean) See Example
Decides whether the rule should also be run on null values.
disableIf (func) See Example
Disables running the rule if the return value of the function is truthy.
enableIf (func) See Example
Enables running the rule if the return value of the function is truthy.
customMessage (string || func) See Example
Function to override default error message for the rule.
\ No newline at end of file diff --git a/library-api/rules.html b/library-api/rules.html index b2b6371..c2a8f4b 100644 --- a/library-api/rules.html +++ b/library-api/rules.html @@ -1,4 +1,4 @@ -rules
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
rules
const rules = [ +rules
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
rules
const rules = [ { listPath: 'listChild', subRules: [ @@ -41,4 +41,4 @@ { path: 'bottomElement2', ruleSet: [{ rule: 'length', greaterThan: 3, applyToNulls: true }] }, { path: 'subComponentElement1', ruleSet: ['required'] }, { path: 'subComponentElement2', ruleSet: ['required'] }, -];
Rules Array Parameters
path (string) See Path API
Path of the value on formData to run the rule.
listPath (string) See Path API
Path of the values of a list on formData to run the rules on each elements of the list.
ruleSet (array) See Rule API
Rules to be applied to the value on path (Can be string or rule object).
elementId (string)
Custom elementId to focus after submit (path is used if empty).
listElementId (string)
Custom listElementId prefix to focus to elements with validation errors after submit (listPath is used if empty).
dependantPaths (array)
Array of paths that should trigger running the validation when there is a change on those paths.
disableFocusAfterSubmit (boolean)
Disable searching for element with given path to focus after submit if there is a validation error.
subRules (array)
Rules to be applied to the subpaths of the given list (can only be used with listPath).
\ No newline at end of file +];
Rules Array Parameters
path (string) See Path API
Path of the value on formData to run the rule.
listPath (string) See Path API
Path of the values of a list on formData to run the rules on each elements of the list.
ruleSet (array) See Rule API
Rules to be applied to the value on path (Can be string or rule object).
elementId (string)
Custom elementId to focus after submit (path is used if empty).
listElementId (string)
Custom listElementId prefix to focus to elements with validation errors after submit (listPath is used if empty).
dependantPaths (array)
Array of paths that should trigger running the validation when there is a change on those paths.
disableFocusAfterSubmit (boolean)
Disable searching for element with given path to focus after submit if there is a validation error.
subRules (array)
Rules to be applied to the subpaths of the given list (can only be used with listPath).
\ No newline at end of file diff --git a/library-api/use-validatable-form.html b/library-api/use-validatable-form.html index ffd3803..9740719 100644 --- a/library-api/use-validatable-form.html +++ b/library-api/use-validatable-form.html @@ -1,4 +1,4 @@ -useValidatableForm
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
useValidatableForm
const {isValid, validationError, validationErrorOriginalResult, formData, setPathValue, +useValidatableForm
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
useValidatableForm
const {isValid, validationError, validationErrorOriginalResult, formData, setPathValue, unsetPathValue, setFormIsSubmitted, setPathIsBlurred, unsetPathIsBlurred, setFormData, setRules, setFormDataAndRules, resetForm, getValue, getError, forceRunAllValidations } = useValidatableForm({ @@ -7,4 +7,4 @@ hideBeforeSubmit, showAfterBlur, focusToErrorAfterSubmit, -});
Hook Parameters
rules (array) See rules API
Array of validation rules to be run on current form.
initialFormData (object)
Initial form data to set default values of current form.
hideBeforeSubmit (boolean) See Example
Flag to hide validation errors before setFormIsSubmitted function is called.
showAfterBlur (boolean) See Example
Flag to hide validation errors before setPathIsBlurred function is called for any path.
focusToErrorAfterSubmit (boolean) See Example
Flag to automatically focus to first HTML element with validation error after setFormIsSubmitted function is called.
elementFocusHandler (function) See Example
Function that accepts the first "elementId" of current validation errors as parameter that is used to customly manage DOM after submit.
Return Values
isValid (boolean)
Always returns the form's combined validation result according to current formData and rules.
validationError (object) See Example
Returns the validation result info of each rule with each path according to current formData and rules. Some validation results can be hide before submit or before blur.
validationErrorOriginalResult (object) See Example
Returns the validation result info of each rule with each path according to current formData and rules. (is not hidden before submit or before blur).
formData (object) See Example
Returns current formData.
formIsSubmitted (boolean) See Example
Returns current formIsSubmitted info.
blurredPathList (array) See Example
Returns current blurredPathList info.
setPathValue(path, value) See Path API - See Example
Function to update given path of formData with given value.
unsetPathValue(path, value) See Path API - See Example
Function to remove value and key for given path of formData.
setFormIsSubmitted() See Example
Function to set form is submitted info true and show all current validation results if hideBeforeSubmit parameter is set true.
setPathIsBlurred(path) See Path API
Function to set element of path is blurred info true and unhide its current validation result if showAfterBlur parameter is set true.
unsetPathIsBlurred(path) See Path API - See Example
Function to unset element of path is blurred info and hide its current validation result if showAfterBlur parameter is set true.
setFormData(newFormData, pathToBeRun) See Example
Function to update whole formData and run validation rules of given pathToBeRun array.
setRules(newRules) See Example
Function to update rules and run all validations according to these rules.
setFormDataAndRules(newFormData, newRules) See Example
Function to update whole formData and rules simultaneously and run all validations according to these formData and rules.
resetForm() See Example
Function to reset form submitted info and elements blurred info.
isPathValid(path) See Example
Function to get if path can be interpreted as valid.
getValue(path)
Function to get value of given path on formData object.
getError(path)
Function to get validation error of given path on validationError object.
forceRunAllValidations()
Function to run all validations according to current rules.
\ No newline at end of file +});
Hook Parameters
rules (array) See rules API
Array of validation rules to be run on current form.
initialFormData (object)
Initial form data to set default values of current form.
hideBeforeSubmit (boolean) See Example
Flag to hide validation errors before setFormIsSubmitted function is called.
showAfterBlur (boolean) See Example
Flag to hide validation errors before setPathIsBlurred function is called for any path.
focusToErrorAfterSubmit (boolean) See Example
Flag to automatically focus to first HTML element with validation error after setFormIsSubmitted function is called.
elementFocusHandler (function) See Example
Function that accepts the first "elementId" of current validation errors as parameter that is used to customly manage DOM after submit.
Return Values
isValid (boolean)
Always returns the form's combined validation result according to current formData and rules.
validationError (object) See Example
Returns the validation result info of each rule with each path according to current formData and rules. Some validation results can be hide before submit or before blur.
validationErrorOriginalResult (object) See Example
Returns the validation result info of each rule with each path according to current formData and rules. (is not hidden before submit or before blur).
formData (object) See Example
Returns current formData.
formIsSubmitted (boolean) See Example
Returns current formIsSubmitted info.
blurredPathList (array) See Example
Returns current blurredPathList info.
setPathValue(path, value) See Path API - See Example
Function to update given path of formData with given value.
unsetPathValue(path, value) See Path API - See Example
Function to remove value and key for given path of formData.
setFormIsSubmitted() See Example
Function to set form is submitted info true and show all current validation results if hideBeforeSubmit parameter is set true.
setPathIsBlurred(path) See Path API
Function to set element of path is blurred info true and unhide its current validation result if showAfterBlur parameter is set true.
unsetPathIsBlurred(path) See Path API - See Example
Function to unset element of path is blurred info and hide its current validation result if showAfterBlur parameter is set true.
setFormData(newFormData, pathToBeRun) See Example
Function to update whole formData and run validation rules of given pathToBeRun array.
setRules(newRules) See Example
Function to update rules and run all validations according to these rules.
setFormDataAndRules(newFormData, newRules) See Example
Function to update whole formData and rules simultaneously and run all validations according to these formData and rules.
resetForm() See Example
Function to reset form submitted info and elements blurred info.
isPathValid(path) See Example
Function to get if path can be interpreted as valid.
getValue(path)
Function to get value of given path on formData object.
getError(path)
Function to get validation error of given path on validationError object.
forceRunAllValidations()
Function to run all validations according to current rules.
\ No newline at end of file diff --git a/rules/custom-on-hook.html b/rules/custom-on-hook.html index 09b444f..d8b037a 100644 --- a/rules/custom-on-hook.html +++ b/rules/custom-on-hook.html @@ -1,4 +1,4 @@ -customly defined on hook
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
customly defined on hookView on GitHub

Custom rules can be defined as a function and given as a rule definition.

Validation Result: validationresultvalid
[ +customly defined on hook
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
customly defined on hookView on GitHub

Custom rules can be defined as a function and given as a rule definition.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -14,4 +14,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/custom-on-provider.html b/rules/custom-on-provider.html index 1f59b46..c280c18 100644 --- a/rules/custom-on-provider.html +++ b/rules/custom-on-provider.html @@ -1,4 +1,4 @@ -custom on provider
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
custom on providerView on GitHubView on GitHub

Custom rules can be defined as a function and passed to ReactValidatableFormProvider with a unique name and can be used anywhere in the app.

Validation Result: validationresultvalid
[ +custom on provider
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
custom on providerView on GitHubView on GitHub

Custom rules can be defined as a function and passed to ReactValidatableFormProvider with a unique name and can be used anywhere in the app.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -32,4 +32,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/date.html b/rules/date.html index 628a3c2..3530add 100644 --- a/rules/date.html +++ b/rules/date.html @@ -1,15 +1,15 @@ -date
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
dateView on GitHub

date rule checks if the given value is a valid date. If withTime parameter is set, it compares hours and minutes, too. equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo parameters are used to make comparisons with given comparison values.

Validation Result: validationresultvalid
[ +date
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
dateView on GitHub

date rule checks if the given value is a valid date. If withTime parameter is set, it compares hours and minutes, too. equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo parameters are used to make comparisons with given comparison values.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ "required", { "rule": "date", - "equalTo": "2023-11-01T11:06:55.486Z" + "equalTo": "2023-11-01T15:46:32.163Z" } ], "dependantPaths": [ "comparisonValue" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/email.html b/rules/email.html index 98c6cf0..aa2f9c9 100644 --- a/rules/email.html +++ b/rules/email.html @@ -1,4 +1,4 @@ -email
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
emailView on GitHub

email rule checks if the given value is a valid email.

Validation Result: validationresultvalid
[ +email
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
emailView on GitHub

email rule checks if the given value is a valid email.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -10,4 +10,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/equality.html b/rules/equality.html index 85bfcd6..c59cbe5 100644 --- a/rules/equality.html +++ b/rules/equality.html @@ -1,4 +1,4 @@ -equality
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
equalityView on GitHub

equality rule checks if the given value is equal to comparison value.

['North America', 'Africa', 'Europe']

North America
Africa
Europe

['North America', 'Africa', 'Europe']

North America
Africa
Europe
Validation Result: validationresultvalid
[ +equality
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
equalityView on GitHub

equality rule checks if the given value is equal to comparison value.

['North America', 'Africa', 'Europe']

North America
Africa
Europe

['North America', 'Africa', 'Europe']

North America
Africa
Europe
Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -106,4 +106,4 @@ "comparisonValueIsNoneOf" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/iban.html b/rules/iban.html index 11fe72e..a35d503 100644 --- a/rules/iban.html +++ b/rules/iban.html @@ -1,4 +1,4 @@ -iban
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
ibanView on GitHub

iban rule checks if the given value is a valid IBAN.

Validation Result: validationresultvalid
[ +iban
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
ibanView on GitHub

iban rule checks if the given value is a valid IBAN.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -10,4 +10,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/includes.html b/rules/includes.html index aaf930a..ad3b9da 100644 --- a/rules/includes.html +++ b/rules/includes.html @@ -1,4 +1,4 @@ -includes
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
includesView on GitHub

includes rule checks if the given value includes comparison value.

Validation Result: validationresultvalid
[ +includes
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
includesView on GitHub

includes rule checks if the given value includes comparison value.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -29,4 +29,4 @@ "comparisonValue" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/length.html b/rules/length.html index 7a3fcc4..5e6b173 100644 --- a/rules/length.html +++ b/rules/length.html @@ -1,4 +1,4 @@ -length
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
lengthView on GitHub

length rule checks the length of a string. equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo parameters are used to make comparisons with given comparison values.

Validation Result: validationresultvalid
[ +length
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
lengthView on GitHub

length rule checks the length of a string. equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo parameters are used to make comparisons with given comparison values.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -12,4 +12,4 @@ "comparisonValue" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/list-size.html b/rules/list-size.html index f63c16d..b2655c3 100644 --- a/rules/list-size.html +++ b/rules/list-size.html @@ -1,4 +1,4 @@ -listSize
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
listSizeView on GitHub

listSize rule checks the length of an array. equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo parameters are used to make comparisons with given comparison values.

Asia
Europe

Validation Result: validationresultvalid
[ +listSize
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
listSizeView on GitHub

listSize rule checks the length of an array. equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo parameters are used to make comparisons with given comparison values.

Asia
Europe

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -12,4 +12,4 @@ "comparisonValue" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/number.html b/rules/number.html index c94bf2d..93c5d60 100644 --- a/rules/number.html +++ b/rules/number.html @@ -1,4 +1,4 @@ -number
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
numberView on GitHub

number rule checks if the given value is a valid number. If onlyIntegers parameter is set, it also checks if given value is an integer. equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo parameters are used to make comparisons with given comparison values.

Validation Result: validationresultvalid
[ +number
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
numberView on GitHub

number rule checks if the given value is a valid number. If onlyIntegers parameter is set, it also checks if given value is an integer. equalTo, lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, notEqualTo parameters are used to make comparisons with given comparison values.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -12,4 +12,4 @@ "comparisonValue" ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/regex.html b/rules/regex.html index 848f3ea..3e6f1ae 100644 --- a/rules/regex.html +++ b/rules/regex.html @@ -1,4 +1,4 @@ -regex
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
regexView on GitHub

regex rule checks if the given value is a valid string according to given regex.

regex: /ab+c/

regex: /\D\d\D/
Validation Result: validationresultvalid
[ +regex
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
regexView on GitHub

regex rule checks if the given value is a valid string according to given regex.

regex: /ab+c/

regex: /\D\d\D/
Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -23,4 +23,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/required.html b/rules/required.html index 7d99d67..96a9f1f 100644 --- a/rules/required.html +++ b/rules/required.html @@ -1,4 +1,4 @@ -required
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
requiredView on GitHub

required rule checks if the given value is undefined, null, empty string or empty array.

Validation Result: validationresultvalid
[ +required
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
requiredView on GitHub

required rule checks if the given value is undefined, null, empty string or empty array.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -7,4 +7,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/unique.html b/rules/unique.html index b3b5f57..cfcb544 100644 --- a/rules/unique.html +++ b/rules/unique.html @@ -1,4 +1,4 @@ -Unique
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
UniqueView on GitHub

unique rule checks if non-unique values exist on a listPath.

Validation Result: validationresultvalid
[ +Unique
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
UniqueView on GitHub

unique rule checks if non-unique values exist on a listPath.

Validation Result: validationresultvalid
[ { "listPath": "listChild", "ruleSet": [ @@ -22,4 +22,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file diff --git a/rules/url.html b/rules/url.html index bb66ffb..75c210c 100644 --- a/rules/url.html +++ b/rules/url.html @@ -1,4 +1,4 @@ -url
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.1
urlView on GitHub

url rule checks if the given value is a valid url.

Validation Result: validationresultvalid
[ +url
obss
logo
github_iconnpm_iconVersion: 5.0.0-beta.2
urlView on GitHub

url rule checks if the given value is a valid url.

Validation Result: validationresultvalid
[ { "path": "val", "ruleSet": [ @@ -10,4 +10,4 @@ } ] } -]
\ No newline at end of file +]
\ No newline at end of file