infinity-forge 3.5.6 → 3.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/infinity-forge.css +0 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.js +4 -4
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.js.map +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/styles.js +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/styles.js.map +1 -1
- package/dist/ui/components/form/handler/form-handler/index.js +8 -33
- package/dist/ui/components/form/handler/form-handler/index.js.map +1 -1
- package/dist/ui/components/form/handler/form-handler/use-handle-errors.d.ts +8 -0
- package/dist/ui/components/form/handler/form-handler/use-handle-errors.js +59 -0
- package/dist/ui/components/form/handler/form-handler/use-handle-errors.js.map +1 -0
- package/dist/ui/components/form/handler/interfaces.d.ts +7 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/integrations/google/index.d.ts +1 -0
- package/dist/ui/integrations/google/index.js +18 -0
- package/dist/ui/integrations/google/index.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha-provider.d.ts +35 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha-provider.js +102 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha-provider.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.d.ts +6 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.js +78 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/hoist-non-react-statics.d.ts +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/hoist-non-react-statics.js +92 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/hoist-non-react-statics.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/index.d.ts +4 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/index.js +21 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/index.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.d.ts +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.js +8 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/use-google-recaptcha.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/utils.d.ts +52 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/utils.js +147 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/utils.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.d.ts +6 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.js +28 -0
- package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/with-google-recaptcha.js.map +1 -0
- package/dist/ui/integrations/google/recaptcha-v3/index.d.ts +4 -0
- package/dist/ui/integrations/google/recaptcha-v3/index.js +80 -0
- package/dist/ui/integrations/google/recaptcha-v3/index.js.map +1 -0
- package/dist/ui/integrations/index.d.ts +1 -0
- package/dist/ui/integrations/index.js +18 -0
- package/dist/ui/integrations/index.js.map +1 -0
- package/dist/ui/integrations/message-provider/index.d.ts +0 -0
- package/dist/ui/integrations/message-provider/index.js +1 -0
- package/dist/ui/integrations/message-provider/index.js.map +1 -0
- package/dist/ui/integrations/message-provider/send-message.d.ts +1 -0
- package/dist/ui/integrations/message-provider/send-message.js +54 -0
- package/dist/ui/integrations/message-provider/send-message.js.map +1 -0
- package/package.json +2 -1
package/dist/infinity-forge.css
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
a{text-decoration:unset}html{font-size:10px!important}a,address,b,h1,h2,h3,h4,h5,i,label,li,p,span,strong,td,time{margin-bottom:0;text-rendering:optimizeLegibility!important}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}[class*=-bold]{font-weight:700}[class*=-semibold]{font-weight:600}[class*=-medium]{font-weight:500}[class*=-regular]{font-weight:400}[class*=-light]{font-weight:300}[class*=font-80]{font-size:8rem}[class*=font-72]{font-size:7.2rem}[class*=font-70]{font-size:7rem}[class*=font-64]{font-size:6.4rem}[class*=font-50]{font-size:5rem}[class*=font-48]{font-size:4.8rem}[class*=font-40]{font-size:4rem}[class*=font-36]{font-size:3.6rem}[class*=font-32]{font-size:3.2rem}[class*=font-24]{font-size:2.4rem}[class*=font-20]{font-size:2rem}[class*=font-18]{font-size:1.8rem}[class*=font-16]{font-size:1.6rem}[class*=font-15]{font-size:1.5rem}[class*=font-14]{font-size:1.4rem}[class*=font-13]{font-size:1.3rem}[class*=font-12]{font-size:1.2rem}@media only screen and (max-width:1600px){[class*=font-80]{font-size:6rem}[class*=font-72]{font-size:5.8rem}[class*=font-70]{font-size:5.5rem}[class*=font-64]{font-size:6rem}[class*=font-50]{font-size:4.8rem}[class*=font-48]{font-size:4.4rem}[class*=font-40]{font-size:3.8rem}[class*=font-32]{font-size:3rem}[class*=font-24]{font-size:2.3rem}[class*=font-20]{font-size:1.9rem}[class*=font-18]{font-size:1.7rem}[class*=font-16]{font-size:1.55rem}}@media only screen and (max-width:1400px){[class*=font-80]{font-size:5.4rem}[class*=font-72]{font-size:5.2rem}[class*=font-70]{font-size:4.9rem}[class*=font-64]{font-size:5.6rem}[class*=font-50]{font-size:4.6rem}[class*=font-48]{font-size:4.2rem}[class*=font-40]{font-size:3.6rem}[class*=font-32]{font-size:2.8rem}[class*=font-24]{font-size:2rem}[class*=font-20]{font-size:1.8rem}[class*=font-18]{font-size:1.65rem}[class*=font-16]{font-size:1.5rem}[class*=font-13]{font-size:1.25rem}}@media only screen and (max-width:1200px){[class*=font-80]{font-size:5.5rem}[class*=font-72]{font-size:4.8rem}[class*=font-70]{font-size:4.6rem}[class*=font-64]{font-size:5.2rem}[class*=font-50]{font-size:4.2rem}[class*=font-48]{font-size:4rem}[class*=font-40]{font-size:3.2rem}[class*=font-32]{font-size:2.4rem}[class*=font-24]{font-size:1.9rem}[class*=font-20]{font-size:1.75rem}[class*=font-18]{font-size:1.6rem}[class*=font-16]{font-size:1.45rem}[class*=font-13]{font-size:1.2rem}}@media only screen and (max-width:1024px){[class*=font-80]{font-size:5.2rem}[class*=font-72]{font-size:4.5rem}[class*=font-70]{font-size:4.3rem}[class*=font-64]{font-size:4.4rem}[class*=font-50]{font-size:4rem}[class*=font-48]{font-size:3.8rem}[class*=font-40]{font-size:3rem}[class*=font-32]{font-size:2.2rem}[class*=font-24]{font-size:1.8rem}[class*=font-20]{font-size:1.7rem}[class*=font-18]{font-size:1.55rem}[class*=font-16]{font-size:1.35rem}[class*=font-14]{font-size:1.3rem}}@media only screen and (max-width:900px){[class*=font-80]{font-size:5rem}[class*=font-72]{font-size:3.8rem}[class*=font-70]{font-size:3.6rem}[class*=font-64]{font-size:3.8rem}[class*=font-48]{font-size:3.6rem}[class*=font-40]{font-size:2.8rem}[class*=font-32]{font-size:2rem}}@media only screen and (max-width:768px){[class*=font-80]{font-size:4.5rem}[class*=font-72]{font-size:3.5rem}[class*=font-70]{font-size:3rem}[class*=font-64]{font-size:3.4rem}[class*=font-50]{font-size:3.8rem}[class*=font-48]{font-size:3.4rem}[class*=font-40]{font-size:2.6rem}[class*=font-32]{font-size:1.9rem}[class*=font-24]{font-size:1.7rem}[class*=font-20]{font-size:1.65rem}[class*=font-18]{font-size:1.5rem}[class*=font-16]{font-size:1.35rem}[class*=font-13]{font-size:1.15rem}}@media only screen and (max-width:650px){[class*=font-80]{font-size:4rem}[class*=font-64]{font-size:3.2rem}[class*=font-50]{font-size:3.5rem}[class*=font-48]{font-size:3.2rem}[class*=font-40]{font-size:2.5rem}[class*=font-32]{font-size:1.8rem}[class*=font-24]{font-size:1.65rem}[class*=font-18]{font-size:1.4rem}[class*=font-16]{font-size:1.3rem}}@media only screen and (max-width:500px){[class*=font-80]{font-size:3.5rem}[class*=font-64]{font-size:2.8rem}[class*=font-50]{font-size:3rem}[class*=font-48]{font-size:2.8rem}[class*=font-40]{font-size:2.3rem}[class*=font-24]{font-size:1.6rem}[class*=font-18]{font-size:1.25rem}[class*=font-16]{font-size:1.2rem}[class*=font-14]{font-size:1.2rem}}@media only screen and (max-width:390px){[class*=font-80]{font-size:3rem}[class*=font-72]{font-size:3rem}[class*=font-64]{font-size:2.6rem}[class*=font-50]{font-size:2.8rem}[class*=font-48]{font-size:2.6rem}[class*=font-40]{font-size:2.1rem}[class*=font-32]{font-size:1.7rem}[class*=font-24]{font-size:1.4rem}[class*=font-18]{font-size:1.2rem}}*,:after,:before{box-sizing:border-box}html{font-family:Roboto,sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{background-color:#fff;color:#212529;font-family:Roboto,sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:400;line-height:1.5;margin:0;text-align:left}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;margin-top:0}p{margin-bottom:1rem;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{background-color:transparent;color:#007bff;text-decoration:none;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-bottom:1rem;margin-top:0;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{border-style:none;vertical-align:middle}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;color:#868e96;padding-bottom:.75rem;padding-top:.75rem;text-align:left}th{text-align:inherit}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5rem;line-height:inherit;margin-bottom:.5rem;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}ul,ul li{list-style-type:none;padding-left:0}@keyframes placeHolderShimmer{0%{background-position:0 0}to{background-position:100vw 0}}
|
|
2
|
-
a{text-decoration:unset}html{font-size:10px!important}a,address,b,h1,h2,h3,h4,h5,i,label,li,p,span,strong,td,time{margin-bottom:0;text-rendering:optimizeLegibility!important}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}[class*=-bold]{font-weight:700}[class*=-semibold]{font-weight:600}[class*=-medium]{font-weight:500}[class*=-regular]{font-weight:400}[class*=-light]{font-weight:300}[class*=font-80]{font-size:8rem}[class*=font-72]{font-size:7.2rem}[class*=font-70]{font-size:7rem}[class*=font-64]{font-size:6.4rem}[class*=font-50]{font-size:5rem}[class*=font-48]{font-size:4.8rem}[class*=font-40]{font-size:4rem}[class*=font-36]{font-size:3.6rem}[class*=font-32]{font-size:3.2rem}[class*=font-24]{font-size:2.4rem}[class*=font-20]{font-size:2rem}[class*=font-18]{font-size:1.8rem}[class*=font-16]{font-size:1.6rem}[class*=font-15]{font-size:1.5rem}[class*=font-14]{font-size:1.4rem}[class*=font-13]{font-size:1.3rem}[class*=font-12]{font-size:1.2rem}@media only screen and (max-width:1600px){[class*=font-80]{font-size:6rem}[class*=font-72]{font-size:5.8rem}[class*=font-70]{font-size:5.5rem}[class*=font-64]{font-size:6rem}[class*=font-50]{font-size:4.8rem}[class*=font-48]{font-size:4.4rem}[class*=font-40]{font-size:3.8rem}[class*=font-32]{font-size:3rem}[class*=font-24]{font-size:2.3rem}[class*=font-20]{font-size:1.9rem}[class*=font-18]{font-size:1.7rem}[class*=font-16]{font-size:1.55rem}}@media only screen and (max-width:1400px){[class*=font-80]{font-size:5.4rem}[class*=font-72]{font-size:5.2rem}[class*=font-70]{font-size:4.9rem}[class*=font-64]{font-size:5.6rem}[class*=font-50]{font-size:4.6rem}[class*=font-48]{font-size:4.2rem}[class*=font-40]{font-size:3.6rem}[class*=font-32]{font-size:2.8rem}[class*=font-24]{font-size:2rem}[class*=font-20]{font-size:1.8rem}[class*=font-18]{font-size:1.65rem}[class*=font-16]{font-size:1.5rem}[class*=font-13]{font-size:1.25rem}}@media only screen and (max-width:1200px){[class*=font-80]{font-size:5.5rem}[class*=font-72]{font-size:4.8rem}[class*=font-70]{font-size:4.6rem}[class*=font-64]{font-size:5.2rem}[class*=font-50]{font-size:4.2rem}[class*=font-48]{font-size:4rem}[class*=font-40]{font-size:3.2rem}[class*=font-32]{font-size:2.4rem}[class*=font-24]{font-size:1.9rem}[class*=font-20]{font-size:1.75rem}[class*=font-18]{font-size:1.6rem}[class*=font-16]{font-size:1.45rem}[class*=font-13]{font-size:1.2rem}}@media only screen and (max-width:1024px){[class*=font-80]{font-size:5.2rem}[class*=font-72]{font-size:4.5rem}[class*=font-70]{font-size:4.3rem}[class*=font-64]{font-size:4.4rem}[class*=font-50]{font-size:4rem}[class*=font-48]{font-size:3.8rem}[class*=font-40]{font-size:3rem}[class*=font-32]{font-size:2.2rem}[class*=font-24]{font-size:1.8rem}[class*=font-20]{font-size:1.7rem}[class*=font-18]{font-size:1.55rem}[class*=font-16]{font-size:1.35rem}[class*=font-14]{font-size:1.3rem}}@media only screen and (max-width:900px){[class*=font-80]{font-size:5rem}[class*=font-72]{font-size:3.8rem}[class*=font-70]{font-size:3.6rem}[class*=font-64]{font-size:3.8rem}[class*=font-48]{font-size:3.6rem}[class*=font-40]{font-size:2.8rem}[class*=font-32]{font-size:2rem}}@media only screen and (max-width:768px){[class*=font-80]{font-size:4.5rem}[class*=font-72]{font-size:3.5rem}[class*=font-70]{font-size:3rem}[class*=font-64]{font-size:3.4rem}[class*=font-50]{font-size:3.8rem}[class*=font-48]{font-size:3.4rem}[class*=font-40]{font-size:2.6rem}[class*=font-32]{font-size:1.9rem}[class*=font-24]{font-size:1.7rem}[class*=font-20]{font-size:1.65rem}[class*=font-18]{font-size:1.5rem}[class*=font-16]{font-size:1.35rem}[class*=font-13]{font-size:1.15rem}}@media only screen and (max-width:650px){[class*=font-80]{font-size:4rem}[class*=font-64]{font-size:3.2rem}[class*=font-50]{font-size:3.5rem}[class*=font-48]{font-size:3.2rem}[class*=font-40]{font-size:2.5rem}[class*=font-32]{font-size:1.8rem}[class*=font-24]{font-size:1.65rem}[class*=font-18]{font-size:1.4rem}[class*=font-16]{font-size:1.3rem}}@media only screen and (max-width:500px){[class*=font-80]{font-size:3.5rem}[class*=font-64]{font-size:2.8rem}[class*=font-50]{font-size:3rem}[class*=font-48]{font-size:2.8rem}[class*=font-40]{font-size:2.3rem}[class*=font-24]{font-size:1.6rem}[class*=font-18]{font-size:1.25rem}[class*=font-16]{font-size:1.2rem}[class*=font-14]{font-size:1.2rem}}@media only screen and (max-width:390px){[class*=font-80]{font-size:3rem}[class*=font-72]{font-size:3rem}[class*=font-64]{font-size:2.6rem}[class*=font-50]{font-size:2.8rem}[class*=font-48]{font-size:2.6rem}[class*=font-40]{font-size:2.1rem}[class*=font-32]{font-size:1.7rem}[class*=font-24]{font-size:1.4rem}[class*=font-18]{font-size:1.2rem}}*,:after,:before{box-sizing:border-box}html{font-family:Roboto,sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{background-color:#fff;color:#212529;font-family:Roboto,sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:400;line-height:1.5;margin:0;text-align:left}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;margin-top:0}p{margin-bottom:1rem;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{background-color:transparent;color:#007bff;text-decoration:none;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-bottom:1rem;margin-top:0;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{border-style:none;vertical-align:middle}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;color:#868e96;padding-bottom:.75rem;padding-top:.75rem;text-align:left}th{text-align:inherit}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5rem;line-height:inherit;margin-bottom:.5rem;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}ul,ul li{list-style-type:none;padding-left:0}@keyframes placeHolderShimmer{0%{background-position:0 0}to{background-position:100vw 0}}
|
|
3
|
-
*,:after,:before{box-sizing:border-box}a,button{cursor:pointer;outline:unset!important}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}.row{display:flex;gap:15px}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{background-color:#fff;color:#212529;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:400;line-height:1.5;margin:0;text-align:left}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;margin-top:0}p{margin-bottom:1rem;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{background-color:transparent;color:#007bff;text-decoration:none;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-bottom:1rem;margin-top:0;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{border-style:none;vertical-align:middle}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;color:#868e96;padding-bottom:.75rem;padding-top:.75rem;text-align:left}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5rem;line-height:inherit;margin-bottom:.5rem;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}ul,ul li{list-style-type:none;padding-left:0}@keyframes placeHolderShimmer{0%{background-position:0 0}to{background-position:100vw 0}}.infinity_forge_modal{position:relative;z-index:10000000000}#__next{position:relative;z-index:1}
|
|
4
|
-
|
|
5
2
|
*,:after,:before{box-sizing:border-box}a,button{cursor:pointer;outline:unset!important}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}.row{display:flex;gap:15px}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{background-color:#fff;color:#212529;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:400;line-height:1.5;margin:0;text-align:left}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;margin-top:0}p{margin-bottom:1rem;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{background-color:transparent;color:#007bff;text-decoration:none;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-bottom:1rem;margin-top:0;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{border-style:none;vertical-align:middle}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;color:#868e96;padding-bottom:.75rem;padding-top:.75rem;text-align:left}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5rem;line-height:inherit;margin-bottom:.5rem;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}ul,ul li{list-style-type:none;padding-left:0}@keyframes placeHolderShimmer{0%{background-position:0 0}to{background-position:100vw 0}}.infinity_forge_modal{position:relative;z-index:10000000000}#__next{position:relative;z-index:1}
|
|
@@ -135,13 +135,13 @@ function FiltersForm(_a) {
|
|
|
135
135
|
return __generator(this, function (_a) {
|
|
136
136
|
if (configs.disableRoutingUpdateFilters) {
|
|
137
137
|
params = filters.reduce(function (reducer, filter) {
|
|
138
|
-
var _a;
|
|
138
|
+
var _a, _b;
|
|
139
139
|
if (!data[filter.name]) {
|
|
140
|
-
return reducer;
|
|
140
|
+
return __assign(__assign({}, reducer), (_a = {}, _a[filter.name] = "", _a));
|
|
141
141
|
}
|
|
142
142
|
var value = data[filter.name];
|
|
143
143
|
var verifiedValue = value instanceof Date ? (0, moment_1.default)(value).toString() : value;
|
|
144
|
-
return __assign(__assign({}, reducer), (
|
|
144
|
+
return __assign(__assign({}, reducer), (_b = {}, _b[filter.name] = verifiedValue, _b));
|
|
145
145
|
}, {});
|
|
146
146
|
(0, ui_1.updateRoute)({
|
|
147
147
|
params: params,
|
|
@@ -150,7 +150,7 @@ function FiltersForm(_a) {
|
|
|
150
150
|
}
|
|
151
151
|
return [2 /*return*/];
|
|
152
152
|
});
|
|
153
|
-
}); }, button: configs.disableRoutingUpdateFilters ? { text: '
|
|
153
|
+
}); }, button: configs.disableRoutingUpdateFilters ? { text: '', svg: "LupaIcon" } : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: 'filters', children: [filters === null || filters === void 0 ? void 0 : filters.map(function (filter) {
|
|
154
154
|
var Element = Inputs[filter.InputComponent];
|
|
155
155
|
if (!Element) {
|
|
156
156
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/hooks/ui/use-table/components/table/filters/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAuC;AAEvC,mCAA8C;AAC9C,2BAUa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4BAAuB,EAAC,KAAK,CAAC;YAClD,CAAC,CAAC,IAAA,iCAA4B,EAAC,KAAK,EAAE,MAAM,CAAC;YAC7C,CAAC,CAAE,KAA6C,CAAA;QAElD,6BAAY,OAAO,gBAAG,IAAI,IAAG,aAAa,OAAE;IAC9C,CAAC,EAAE,EAA4B,CAAC,CAAA;IAEhC,IAAM,mBAAmB,yBACpB,WAAW,GACX,eAAe,CACnB,CAAA;IAED,OAAO,CACL,uBAAC,gBAAW,IACV,mBAAmB,EAAE,KAAK,EAC1B,yBAAyB,QACzB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,UAAO,IAAI;;;gBACnB,IAAI,OAAO,CAAC,2BAA2B,EAAE,CAAC;oBAClC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,UAAC,OAAO,EAAE,MAAM;;wBAC5C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;4BACvB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/hooks/ui/use-table/components/table/filters/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAuC;AAEvC,mCAA8C;AAC9C,2BAUa;AAIb,2DAA8C;AAE9C,0CAA6B;AAC7B,kDAA2B;AAE3B,SAAgB,OAAO,CAAI,KAAqB;;IAC9C,IAAM,aAAa,GAAG,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAC,aAAa,KAAI,EAAE,CAAA;IACxD,IAAM,UAAU,GAAG,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,0CAAE,OAAO,KAAI,EAAE,CAAA;IAE1D,IAAM,OAAO,mCAAO,UAAU,SAAK,aAAa,OAAC,CAAA;IAEjD,IAAM,MAAM,GAAG,IAAA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AC,CAAC,cAAc,CAAC,CAAC,CAAA;wBACjC,CAAC;oBACH,CAAC;oBAED,OAAO,2BAAC,OAAO,eAAK,MAAM,IAAE,GAAG,EAAE,MAAM,CAAC,IAAc,EAAE,aAAa,EAAE,aAAa,IAAI,CAAA;gBAC1F,CAAC,CAAC,EAED,OAAO,CAAC,MAAM,IAAI,CACjB,uBAAC,oBAAW,IAAC,QAAQ,EAAE,UAAC,KAAK,IAAK,OAAA,IAAA,gBAAW,EAAC,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,EAA3D,CAA2D,GAAI,CAClG,IACG,GACM,CACf,CAAA;AACH,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Filters = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.Filters = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n --inputHeight: 42px;\n --borderRadius: 5px;\n\n display: flex;\n align-items: center;\n gap: 15px;\n position: relative;\n z-index: 99;\n color: ", ";\n\n .filters-accordion {\n display: none !important;\n width: 100%;\n\n > div {\n box-shadow: unset;\n padding: 0;\n background-color: transparent;\n\n > button {\n margin-left: auto;\n height: 40px;\n width: 40px;\n\n border: 1px solid currentColor;\n border-radius: 5px;\n\n color: #fff;\n background: ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n\n .actions {\n display: flex;\n }\n\n svg {\n fill: currentColor;\n width: 15px;\n height: auto;\n }\n\n &:hover {\n transition: all 0.1s;\n background: #fff;\n color: #000000;\n border: 1px solid currentColor;\n }\n }\n\n .content {\n width: 100%;\n\n .filters {\n width: 100%;\n grid-template-columns: repeat(1, 1fr);\n\n > div {\n width: 100%;\n }\n\n > div:last-child {\n .input-wrapper {\n width: 100%;\n display: flex;\n }\n }\n }\n }\n }\n }\n\n form {\n
|
|
12
|
+
exports.Filters = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n --inputHeight: 42px;\n --borderRadius: 5px;\n\n display: flex;\n align-items: center;\n gap: 15px;\n position: relative;\n z-index: 99;\n color: ", ";\n width: 100% !important;\n\n form {\n width: 100%;\n\n > div {\n display: flex;\n align-items: flex-end;\n border: 1px solid #00000038;\n padding: 15px;\n width: 100%;\n border-radius: 5px;\n justify-content: space-between;\n }\n\n .form-button {\n button {\n height: 35px;\n width: 35px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n\n .button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n height: 15px;\n width: auto;\n fill: #fff;\n }\n }\n }\n }\n }\n\n .filters-accordion {\n display: none !important;\n width: 100%;\n\n > div {\n box-shadow: unset;\n padding: 0;\n background-color: transparent;\n\n > button {\n margin-left: auto;\n height: 40px;\n width: 40px;\n\n border: 1px solid currentColor;\n border-radius: 5px;\n\n color: #fff;\n background: ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n\n .actions {\n display: flex;\n }\n\n svg {\n fill: currentColor;\n width: 15px;\n height: auto;\n }\n\n &:hover {\n transition: all 0.1s;\n background: #fff;\n color: #000000;\n border: 1px solid currentColor;\n }\n }\n\n .content {\n width: 100%;\n\n .filters {\n width: 100%;\n grid-template-columns: repeat(1, 1fr);\n\n > div {\n width: 100%;\n }\n\n > div:last-child {\n .input-wrapper {\n width: 100%;\n display: flex;\n }\n }\n }\n }\n }\n }\n\n form {\n .filters {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(", ", 1fr);\n row-gap: 0;\n gap: 10px;\n\n * {\n margin-bottom: 0;\n }\n\n > div {\n display: flex;\n align-items: flex-end;\n }\n }\n }\n\n @media only screen and (max-width: 1685px) {\n grid-template-columns: repeat(2, 1fr);\n }\n\n @media only screen and (max-width: 768px) {\n > form {\n display: none;\n }\n\n .filters-accordion {\n display: flex !important;\n }\n }\n"], ["\n --inputHeight: 42px;\n --borderRadius: 5px;\n\n display: flex;\n align-items: center;\n gap: 15px;\n position: relative;\n z-index: 99;\n color: ", ";\n width: 100% !important;\n\n form {\n width: 100%;\n\n > div {\n display: flex;\n align-items: flex-end;\n border: 1px solid #00000038;\n padding: 15px;\n width: 100%;\n border-radius: 5px;\n justify-content: space-between;\n }\n\n .form-button {\n button {\n height: 35px;\n width: 35px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 100%;\n\n .button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n height: 15px;\n width: auto;\n fill: #fff;\n }\n }\n }\n }\n }\n\n .filters-accordion {\n display: none !important;\n width: 100%;\n\n > div {\n box-shadow: unset;\n padding: 0;\n background-color: transparent;\n\n > button {\n margin-left: auto;\n height: 40px;\n width: 40px;\n\n border: 1px solid currentColor;\n border-radius: 5px;\n\n color: #fff;\n background: ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n cursor: pointer;\n\n .actions {\n display: flex;\n }\n\n svg {\n fill: currentColor;\n width: 15px;\n height: auto;\n }\n\n &:hover {\n transition: all 0.1s;\n background: #fff;\n color: #000000;\n border: 1px solid currentColor;\n }\n }\n\n .content {\n width: 100%;\n\n .filters {\n width: 100%;\n grid-template-columns: repeat(1, 1fr);\n\n > div {\n width: 100%;\n }\n\n > div:last-child {\n .input-wrapper {\n width: 100%;\n display: flex;\n }\n }\n }\n }\n }\n }\n\n form {\n .filters {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(", ", 1fr);\n row-gap: 0;\n gap: 10px;\n\n * {\n margin-bottom: 0;\n }\n\n > div {\n display: flex;\n align-items: flex-end;\n }\n }\n }\n\n @media only screen and (max-width: 1685px) {\n grid-template-columns: repeat(2, 1fr);\n }\n\n @media only screen and (max-width: 768px) {\n > form {\n display: none;\n }\n\n .filters-accordion {\n display: flex !important;\n }\n }\n"])), function (props) { return props.theme.darkColor; }, function (props) { return props.theme.darkColor; }, function (_a) {
|
|
13
13
|
var $gridColumns = _a.$gridColumns;
|
|
14
14
|
return $gridColumns;
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/hooks/ui/use-table/components/table/filters/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,OAAO,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/hooks/ui/use-table/components/table/filters/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,OAAO,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,ssFAA0B,8JASnD,EAAgC,qmCA0DrB,EAAgC,m7BAoDhB,EAAkC,ucA4BvE,KA1IU,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAArB,CAAqB,EA0DrB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAArB,CAAqB,EAoDhB,UAAC,EAAgB;QAAd,YAAY,kBAAA;IAAO,OAAA,YAAY;AAAZ,CAAY,EA4BvE"}
|
|
@@ -84,26 +84,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
84
84
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
85
85
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
86
86
|
var react_1 = require("react");
|
|
87
|
-
var yup = __importStar(require("yup"));
|
|
88
87
|
var lodash_1 = __importDefault(require("lodash"));
|
|
89
|
-
var react_google_recaptcha_1 = __importDefault(require("react-google-recaptcha"));
|
|
90
88
|
var formik_1 = require("formik");
|
|
91
89
|
var ui_1 = require("../../../../../ui/index.js");
|
|
92
90
|
var system_1 = require("../../../../../system/index.js");
|
|
93
91
|
var use_schemas_1 = require("./use-schemas.js");
|
|
94
92
|
var use_send_file_1 = require("./use-send-file.js");
|
|
93
|
+
var use_handle_errors_1 = require("./use-handle-errors.js");
|
|
95
94
|
var custom_submit_1 = require("../custom-submit/index.js");
|
|
96
95
|
var S = __importStar(require("../styles.js"));
|
|
97
96
|
function FormElement(_a) {
|
|
98
97
|
var i18n = _a.i18n, button = _a.button, schema = _a.schema, children = _a.children, onFinish = _a.onFinish, onSucess = _a.onSucess, recaptcha = _a.recaptcha, debugMode = _a.debugMode, fileFields = _a.fileFields, autoComplete = _a.autoComplete, customSubmit = _a.customSubmit, onChangeForm = _a.onChangeForm, customAction = _a.customAction, decimalFields = _a.decimalFields, defaultSchemas = _a.defaultSchemas, isStickyButtons = _a.isStickyButtons, _b = _a.cleanFieldsOnSubmit, cleanFieldsOnSubmit = _b === void 0 ? true : _b, _c = _a.disableEnterKeySubmitForm, disableEnterKeySubmitForm = _c === void 0 ? false : _c;
|
|
99
|
-
var _d = (0, react_1.useState)(
|
|
98
|
+
var _d = (0, react_1.useState)(''), recaptchaToken = _d[0], setRecaptchaToken = _d[1];
|
|
100
99
|
var _e = (0, react_1.useState)({ state: '', message: '' }), stateForm = _e[0], setStateForm = _e[1];
|
|
101
100
|
var sendFiles = (0, use_send_file_1.useSendFile)({ fileFields: fileFields, debugMode: debugMode });
|
|
102
101
|
var validateSchemas = (0, use_schemas_1.useSchemas)({ schema: schema, defaultSchemas: defaultSchemas, i18n: i18n });
|
|
103
102
|
var _f = (0, formik_1.useFormikContext)(), values = _f.values, initialValues = _f.initialValues, setErrors = _f.setErrors, setFieldError = _f.setFieldError, setFieldValue = _f.setFieldValue;
|
|
104
103
|
function onSubmit(action) {
|
|
105
104
|
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
-
var payload_1, hasFileFields, response, err_1
|
|
105
|
+
var payload_1, hasFileFields, response, err_1;
|
|
107
106
|
var _a;
|
|
108
107
|
return __generator(this, function (_b) {
|
|
109
108
|
switch (_b.label) {
|
|
@@ -112,8 +111,8 @@ function FormElement(_a) {
|
|
|
112
111
|
if (debugMode) {
|
|
113
112
|
console.log('values', values);
|
|
114
113
|
}
|
|
115
|
-
if (recaptcha && !
|
|
116
|
-
|
|
114
|
+
if (recaptcha && !recaptchaToken) {
|
|
115
|
+
throw new system_1.BadRequestError({ code: '400', message: 'Erro ao validar o recaptcha' });
|
|
117
116
|
}
|
|
118
117
|
setErrors({});
|
|
119
118
|
setStateForm({ state: 'loading', message: '' });
|
|
@@ -177,32 +176,7 @@ function FormElement(_a) {
|
|
|
177
176
|
console.log('error', err_1);
|
|
178
177
|
console.log('instanceoferror', typeof err_1);
|
|
179
178
|
}
|
|
180
|
-
|
|
181
|
-
errors_1 = err_1.inner.reduce(function (reducer, error) {
|
|
182
|
-
if (reducer && Object.keys(reducer).find(function (r) { return r === error.path; })) {
|
|
183
|
-
return reducer;
|
|
184
|
-
}
|
|
185
|
-
reducer[error.path] = error.message;
|
|
186
|
-
return reducer;
|
|
187
|
-
}, {});
|
|
188
|
-
Object.keys(errors_1).forEach(function (key) {
|
|
189
|
-
console.log(errors_1, key, errors_1[key]);
|
|
190
|
-
setFieldError(key, errors_1[key]);
|
|
191
|
-
});
|
|
192
|
-
setStateForm({ state: 'default', message: '' });
|
|
193
|
-
return [2 /*return*/];
|
|
194
|
-
}
|
|
195
|
-
if (err_1 instanceof system_1.BadRequestError || err_1 instanceof system_1.ConflictError) {
|
|
196
|
-
setStateForm({ state: 'error', message: err_1.error.message });
|
|
197
|
-
return [2 /*return*/];
|
|
198
|
-
}
|
|
199
|
-
if (err_1 instanceof system_1.ValidationError) {
|
|
200
|
-
setStateForm({ state: 'default', message: '' });
|
|
201
|
-
validationErrors_1 = err_1.errors;
|
|
202
|
-
Object.keys(validationErrors_1).forEach(function (key) {
|
|
203
|
-
setFieldError(key, validationErrors_1[key].errors[0]);
|
|
204
|
-
});
|
|
205
|
-
}
|
|
179
|
+
(0, use_handle_errors_1.handleErrorsFormHandler)({ err: err_1, setFieldError: setFieldError, setStateForm: setStateForm });
|
|
206
180
|
return [3 /*break*/, 9];
|
|
207
181
|
case 8:
|
|
208
182
|
setStateForm(function (state) {
|
|
@@ -238,7 +212,8 @@ function FormElement(_a) {
|
|
|
238
212
|
(0, react_1.useEffect)(function () {
|
|
239
213
|
onChangeForm && onChangeForm.callbackResult(values);
|
|
240
214
|
}, __spreadArray([values], ((onChangeForm === null || onChangeForm === void 0 ? void 0 : onChangeForm.additionalDependencies) || []), true));
|
|
241
|
-
|
|
215
|
+
var recaptchaKey = typeof recaptcha === 'string' ? recaptcha : process.env.recaptcha;
|
|
216
|
+
return ((0, jsx_runtime_1.jsx)(formik_1.Form, { autoComplete: autoComplete, children: (0, jsx_runtime_1.jsxs)(S.FormHandler, { onKeyDown: handleKeyDown, children: [stateForm.state === 'error' && (0, jsx_runtime_1.jsx)("span", { className: 'error-form', children: stateForm.message }), (0, jsx_runtime_1.jsx)("div", { className: 'conntent_form_infinity_forge', children: children }), (0, jsx_runtime_1.jsxs)("div", { className: "form-button ".concat(isStickyButtons ? 'sticky' : ''), children: [process.env.recaptcha && recaptcha && ((0, jsx_runtime_1.jsx)(ui_1.RecaptchaV3, { reCaptchaKey: recaptchaKey, onVerify: setRecaptchaToken })), customAction && (0, jsx_runtime_1.jsx)(customAction.Component, __assign({}, (customAction.props || {}), { setFieldValue: setFieldValue })), button && ((0, jsx_runtime_1.jsx)(ui_1.Button, __assign({}, button, { disabled: recaptchaKey ? !!recaptchaToken : false, type: 'button', onClick: function () { return handleSubmit(); }, loading: stateForm.state === 'loading' }))), customSubmit &&
|
|
242
217
|
customSubmit.length > 0 &&
|
|
243
218
|
customSubmit.map(function (custom, index) { return ((0, jsx_runtime_1.jsx)(custom_submit_1.CustomSubmitButton, __assign({}, custom, { stateForm: stateForm, onSubmit: handleSubmit }), index)); })] })] }) }));
|
|
244
219
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/handler/form-handler/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA2C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/handler/form-handler/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA2C;AAG3C,kDAA2B;AAC3B,iCAA+C;AAE/C,2BAA0C;AAC1C,mCAA0E;AAE1E,6CAA0C;AAC1C,iDAA6C;AAC7C,yDAA6D;AAC7D,kDAAyE;AAIzE,2CAA8B;AAE9B,SAAwB,WAAW,CAAC,EAmBrB;QAlBb,IAAI,UAAA,EACJ,MAAM,YAAA,EACN,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,YAAY,kBAAA,EACZ,YAAY,kBAAA,EACZ,YAAY,kBAAA,EACZ,aAAa,mBAAA,EACb,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,EAC1B,iCAAiC,EAAjC,yBAAyB,mBAAG,KAAK,KAAA;IAE3B,IAAA,KAAsC,IAAA,gBAAQ,EAAC,EAAE,CAAC,EAAjD,cAAc,QAAA,EAAE,iBAAiB,QAAgB,CAAA;IAClD,IAAA,KAA4B,IAAA,gBAAQ,EAAuB,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,EAArF,SAAS,QAAA,EAAE,YAAY,QAA8D,CAAA;IAE5F,IAAM,SAAS,GAAG,IA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AAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,EACjD,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,cAAM,OAAA,YAAY,EAAE,EAAd,CAAc,EAC7B,OAAO,EAAE,SAAS,CAAC,KAAK,KAAK,SAAS,IACtC,CACH,EAEA,YAAY;4BACX,YAAY,CAAC,MAAM,GAAG,CAAC;4BACvB,YAAY,CAAC,GAAG,CAAC,UAAC,MAAM,EAAE,KAAK,IAAK,OAAA,CAClC,uBAAC,kCAAkB,eAAiB,MAAM,IAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,KAA/D,KAAK,CAA8D,CAC7F,EAFmC,CAEnC,CAAC,IACA,IACQ,GACX,CACR,CAAA;AACH,CAAC;AAtKD,8BAsKC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { FormikContextType } from "formik";
|
|
3
|
+
import { StateFormFormHandler } from "../interfaces.js";
|
|
4
|
+
export declare function handleErrorsFormHandler({ err, setStateForm, setFieldError }: {
|
|
5
|
+
err: any;
|
|
6
|
+
setStateForm: Dispatch<SetStateAction<StateFormFormHandler>>;
|
|
7
|
+
setFieldError: FormikContextType<any>["setFieldError"];
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.handleErrorsFormHandler = void 0;
|
|
27
|
+
var yup_1 = __importStar(require("yup"));
|
|
28
|
+
var system_1 = require("../../../../../system/index.js");
|
|
29
|
+
function handleErrorsFormHandler(_a) {
|
|
30
|
+
var err = _a.err, setStateForm = _a.setStateForm, setFieldError = _a.setFieldError;
|
|
31
|
+
if (err instanceof yup_1.default.ValidationError) {
|
|
32
|
+
var errors_1 = err.inner.reduce(function (reducer, error) {
|
|
33
|
+
if (reducer && Object.keys(reducer).find(function (r) { return r === error.path; })) {
|
|
34
|
+
return reducer;
|
|
35
|
+
}
|
|
36
|
+
reducer[error.path] = error.message;
|
|
37
|
+
return reducer;
|
|
38
|
+
}, {});
|
|
39
|
+
Object.keys(errors_1).forEach(function (key) {
|
|
40
|
+
console.log(errors_1, key, errors_1[key]);
|
|
41
|
+
setFieldError(key, errors_1[key]);
|
|
42
|
+
});
|
|
43
|
+
setStateForm({ state: 'default', message: '' });
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (err instanceof system_1.BadRequestError || err instanceof system_1.ConflictError) {
|
|
47
|
+
setStateForm({ state: 'error', message: err.error.message });
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (err instanceof yup_1.ValidationError) {
|
|
51
|
+
setStateForm({ state: 'default', message: '' });
|
|
52
|
+
var validationErrors_1 = err.errors;
|
|
53
|
+
Object.keys(validationErrors_1).forEach(function (key) {
|
|
54
|
+
setFieldError(key, validationErrors_1[key].errors[0]);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.handleErrorsFormHandler = handleErrorsFormHandler;
|
|
59
|
+
//# sourceMappingURL=use-handle-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-handle-errors.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/handler/form-handler/use-handle-errors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAA0C;AAG1C,mCAAyD;AAIzD,SAAgB,uBAAuB,CAAC,EAAsK;QAArK,GAAG,SAAA,EAAE,YAAY,kBAAA,EAAE,aAAa,mBAAA;IACvE,IAAI,GAAG,YAAY,aAAG,CAAC,eAAe,EAAE,CAAC;QACvC,IAAM,QAAM,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,UAAC,OAAY,EAAE,KAAU;YACvD,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,KAAK,KAAK,CAAC,IAAI,EAAhB,CAAgB,CAAC,EAAE,CAAC;gBAClE,OAAO,OAAO,CAAA;YAChB,CAAC;YAED,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAA;YAEnC,OAAO,OAAO,CAAA;QAChB,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,MAAM,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC,OAAO,CAAC,UAAC,GAAG;YAC9B,OAAO,CAAC,GAAG,CAAC,QAAM,EAAE,GAAG,EAAE,QAAM,CAAC,GAAG,CAAC,CAAC,CAAA;YACrC,aAAa,CAAC,GAAG,EAAE,QAAM,CAAC,GAAG,CAAC,CAAC,CAAA;QACjC,CAAC,CAAC,CAAA;QAEF,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAA;QAE/C,OAAM;IACR,CAAC;IAED,IAAI,GAAG,YAAY,wBAAe,IAAI,GAAG,YAAY,sBAAa,EAAE,CAAC;QACnE,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;QAE5D,OAAM;IACR,CAAC;IAED,IAAI,GAAG,YAAY,qBAAe,EAAE,CAAC;QACnC,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAA;QAE/C,IAAM,kBAAgB,GAAG,GAAG,CAAC,MAAM,CAAA;QAEnC,MAAM,CAAC,IAAI,CAAC,kBAAgB,CAAC,CAAC,OAAO,CAAC,UAAC,GAAG;YACxC,aAAa,CAAC,GAAG,EAAE,kBAAgB,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QACrD,CAAC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC;AArCD,0DAqCC"}
|
|
@@ -4,10 +4,17 @@ import { ButtonProps } from '../../../../ui/index.js';
|
|
|
4
4
|
import { Language } from '../../../../system/index.js';
|
|
5
5
|
import { ICustomSubmitProps } from './custom-submit/index.js';
|
|
6
6
|
import { IDefaultSchemas } from './form-handler/generate-schemas.js';
|
|
7
|
+
export type StateFormFormHandler = {
|
|
8
|
+
state: string;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
7
11
|
export interface IFormHandler {
|
|
8
12
|
ref?: any;
|
|
9
13
|
recaptcha?: boolean;
|
|
10
14
|
decimalFields?: string[];
|
|
15
|
+
messageProvider?: {
|
|
16
|
+
messageProviderKey?: string;
|
|
17
|
+
};
|
|
11
18
|
onFinish?: (data: any, initialValues: any) => void;
|
|
12
19
|
fileFields?: {
|
|
13
20
|
ref: string;
|
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./hooks/index.js"), exports);
|
|
|
19
19
|
__exportStar(require("./utils/index.js"), exports);
|
|
20
20
|
__exportStar(require("./contexts/index.js"), exports);
|
|
21
21
|
__exportStar(require("./components/index.js"), exports);
|
|
22
|
+
__exportStar(require("./integrations/index.js"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,0CAAuB;AACvB,0CAAuB;AACvB,6CAA0B;AAC1B,+CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,0CAAuB;AACvB,0CAAuB;AACvB,6CAA0B;AAC1B,+CAA4B;AAC5B,iDAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./recaptcha-v3/index.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./recaptcha-v3/index.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/integrations/google/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface IGoogleReCaptchaProviderProps {
|
|
3
|
+
reCaptchaKey: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
useRecaptchaNet?: boolean;
|
|
6
|
+
useEnterprise?: boolean;
|
|
7
|
+
scriptProps?: {
|
|
8
|
+
nonce?: string;
|
|
9
|
+
defer?: boolean;
|
|
10
|
+
async?: boolean;
|
|
11
|
+
appendTo?: 'head' | 'body';
|
|
12
|
+
id?: string;
|
|
13
|
+
onLoadCallbackName?: string;
|
|
14
|
+
};
|
|
15
|
+
container?: {
|
|
16
|
+
element?: string | HTMLElement;
|
|
17
|
+
parameters: {
|
|
18
|
+
badge?: 'inline' | 'bottomleft' | 'bottomright';
|
|
19
|
+
theme?: 'dark' | 'light';
|
|
20
|
+
tabindex?: number;
|
|
21
|
+
callback?: () => void;
|
|
22
|
+
expiredCallback?: () => void;
|
|
23
|
+
errorCallback?: () => void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export interface IGoogleReCaptchaConsumerProps {
|
|
29
|
+
executeRecaptcha?: (action?: string) => Promise<string>;
|
|
30
|
+
container?: string | HTMLElement;
|
|
31
|
+
}
|
|
32
|
+
declare const GoogleReCaptchaContext: React.Context<IGoogleReCaptchaConsumerProps>;
|
|
33
|
+
declare const GoogleReCaptchaConsumer: React.Consumer<IGoogleReCaptchaConsumerProps>;
|
|
34
|
+
export declare function GoogleReCaptchaProvider({ reCaptchaKey, useEnterprise, useRecaptchaNet, scriptProps, language, container, children }: IGoogleReCaptchaProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export { GoogleReCaptchaConsumer, GoogleReCaptchaContext };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.GoogleReCaptchaContext = exports.GoogleReCaptchaConsumer = exports.GoogleReCaptchaProvider = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var react_1 = require("react");
|
|
17
|
+
var utils_1 = require("./utils.js");
|
|
18
|
+
var GoogleRecaptchaError;
|
|
19
|
+
(function (GoogleRecaptchaError) {
|
|
20
|
+
GoogleRecaptchaError["SCRIPT_NOT_AVAILABLE"] = "Recaptcha script is not available";
|
|
21
|
+
})(GoogleRecaptchaError || (GoogleRecaptchaError = {}));
|
|
22
|
+
var GoogleReCaptchaContext = (0, react_1.createContext)({
|
|
23
|
+
executeRecaptcha: function () {
|
|
24
|
+
// This default context function is not supposed to be called
|
|
25
|
+
throw Error('GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider');
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
exports.GoogleReCaptchaContext = GoogleReCaptchaContext;
|
|
29
|
+
var GoogleReCaptchaConsumer = GoogleReCaptchaContext.Consumer;
|
|
30
|
+
exports.GoogleReCaptchaConsumer = GoogleReCaptchaConsumer;
|
|
31
|
+
function GoogleReCaptchaProvider(_a) {
|
|
32
|
+
var reCaptchaKey = _a.reCaptchaKey, _b = _a.useEnterprise, useEnterprise = _b === void 0 ? false : _b, _c = _a.useRecaptchaNet, useRecaptchaNet = _c === void 0 ? false : _c, scriptProps = _a.scriptProps, language = _a.language, container = _a.container, children = _a.children;
|
|
33
|
+
var _d = (0, react_1.useState)(null), greCaptchaInstance = _d[0], setGreCaptchaInstance = _d[1];
|
|
34
|
+
var clientId = (0, react_1.useRef)(reCaptchaKey);
|
|
35
|
+
var scriptPropsJson = JSON.stringify(scriptProps);
|
|
36
|
+
var parametersJson = JSON.stringify(container === null || container === void 0 ? void 0 : container.parameters);
|
|
37
|
+
(0, react_1.useEffect)(function () {
|
|
38
|
+
if (!reCaptchaKey) {
|
|
39
|
+
(0, utils_1.logWarningMessage)('<GoogleReCaptchaProvider /> recaptcha key not provided');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
var scriptId = (scriptProps === null || scriptProps === void 0 ? void 0 : scriptProps.id) || 'google-recaptcha-v3';
|
|
43
|
+
var onLoadCallbackName = (scriptProps === null || scriptProps === void 0 ? void 0 : scriptProps.onLoadCallbackName) || 'onRecaptchaLoadCallback';
|
|
44
|
+
window[onLoadCallbackName] = function () {
|
|
45
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
46
|
+
var grecaptcha = useEnterprise
|
|
47
|
+
? window.grecaptcha.enterprise
|
|
48
|
+
: window.grecaptcha;
|
|
49
|
+
var params = __assign({ badge: 'inline', size: 'invisible', sitekey: reCaptchaKey }, ((container === null || container === void 0 ? void 0 : container.parameters) || {}));
|
|
50
|
+
clientId.current = grecaptcha.render(container === null || container === void 0 ? void 0 : container.element, params);
|
|
51
|
+
};
|
|
52
|
+
var onLoad = function () {
|
|
53
|
+
if (!window || !window.grecaptcha) {
|
|
54
|
+
(0, utils_1.logWarningMessage)("<GoogleRecaptchaProvider /> ".concat(GoogleRecaptchaError.SCRIPT_NOT_AVAILABLE));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
var grecaptcha = useEnterprise
|
|
58
|
+
? window.grecaptcha.enterprise
|
|
59
|
+
: window.grecaptcha;
|
|
60
|
+
grecaptcha.ready(function () {
|
|
61
|
+
setGreCaptchaInstance(grecaptcha);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
var onError = function () {
|
|
65
|
+
(0, utils_1.logWarningMessage)('Error loading google recaptcha script');
|
|
66
|
+
};
|
|
67
|
+
(0, utils_1.injectGoogleReCaptchaScript)({
|
|
68
|
+
render: (container === null || container === void 0 ? void 0 : container.element) ? 'explicit' : reCaptchaKey,
|
|
69
|
+
onLoadCallbackName: onLoadCallbackName,
|
|
70
|
+
useEnterprise: useEnterprise,
|
|
71
|
+
useRecaptchaNet: useRecaptchaNet,
|
|
72
|
+
scriptProps: scriptProps,
|
|
73
|
+
language: language,
|
|
74
|
+
onLoad: onLoad,
|
|
75
|
+
onError: onError
|
|
76
|
+
});
|
|
77
|
+
return function () {
|
|
78
|
+
(0, utils_1.cleanGoogleRecaptcha)(scriptId, container === null || container === void 0 ? void 0 : container.element);
|
|
79
|
+
};
|
|
80
|
+
}, [
|
|
81
|
+
useEnterprise,
|
|
82
|
+
useRecaptchaNet,
|
|
83
|
+
scriptPropsJson,
|
|
84
|
+
parametersJson,
|
|
85
|
+
language,
|
|
86
|
+
reCaptchaKey,
|
|
87
|
+
container === null || container === void 0 ? void 0 : container.element,
|
|
88
|
+
]);
|
|
89
|
+
var executeRecaptcha = (0, react_1.useCallback)(function (action) {
|
|
90
|
+
if (!greCaptchaInstance || !greCaptchaInstance.execute) {
|
|
91
|
+
throw new Error('<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded');
|
|
92
|
+
}
|
|
93
|
+
return greCaptchaInstance.execute(clientId.current, { action: action });
|
|
94
|
+
}, [greCaptchaInstance, clientId]);
|
|
95
|
+
var googleReCaptchaContextValue = (0, react_1.useMemo)(function () { return ({
|
|
96
|
+
executeRecaptcha: greCaptchaInstance ? executeRecaptcha : undefined,
|
|
97
|
+
container: container === null || container === void 0 ? void 0 : container.element,
|
|
98
|
+
}); }, [executeRecaptcha, greCaptchaInstance, container === null || container === void 0 ? void 0 : container.element]);
|
|
99
|
+
return ((0, jsx_runtime_1.jsx)(GoogleReCaptchaContext.Provider, { value: googleReCaptchaContextValue, children: children }));
|
|
100
|
+
}
|
|
101
|
+
exports.GoogleReCaptchaProvider = GoogleReCaptchaProvider;
|
|
102
|
+
//# sourceMappingURL=google-recaptcha-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-recaptcha-provider.js","sourceRoot":"","sources":["../../../../../../src/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha-provider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAQe;AACf,iCAIiB;AAEjB,IAAK,oBAEJ;AAFD,WAAK,oBAAoB;IACvB,kFAA0D,CAAA;AAC5D,CAAC,EAFI,oBAAoB,KAApB,oBAAoB,QAExB;AAkCD,IAAM,sBAAsB,GAAG,IAAA,qBAAa,EAAgC;IAC1E,gBAAgB,EAAE;QAChB,6DAA6D;QAC7D,MAAM,KAAK,CACT,kLAAkL,CACnL,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AA0H+B,wDAAsB;AAxHhD,IAAU,uBAAuB,GAAK,sBAAsB,SAA3B,CAA4B;AAwH5D,0DAAuB;AAtHhC,SAAgB,uBAAuB,CAAC,EAQR;QAP9B,YAAY,kBAAA,EACZ,qBAAqB,EAArB,aAAa,mBAAG,KAAK,KAAA,EACrB,uBAAuB,EAAvB,eAAe,mB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I,KAAK,CACb,kEAAkE,CACnE,CAAC;QACJ,CAAC;QAED,OAAO,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IAClE,CAAC,EACD,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAC/B,CAAC;IAEF,IAAM,2BAA2B,GAAG,IAAA,eAAO,EACzC,cAAM,OAAA,CAAC;QACL,gBAAgB,EAAE,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;QACnE,SAAS,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO;KAC9B,CAAC,EAHI,CAGJ,EACF,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,CAAC,CAC3D,CAAC;IAEF,OAAO,CACL,uBAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,2BAA2B,YAChE,QAAQ,GACuB,CACnC,CAAC;AACJ,CAAC;AApHD,0DAoHC"}
|
package/dist/ui/integrations/google/recaptcha-v3/google-recaptcha-v3-lib/google-recaptcha.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface IGoogleRecaptchaProps {
|
|
2
|
+
onVerify: (token: string) => void | Promise<void>;
|
|
3
|
+
action?: string;
|
|
4
|
+
refreshReCaptcha?: boolean | string | number | null;
|
|
5
|
+
}
|
|
6
|
+
export declare function GoogleReCaptcha({ action, onVerify, refreshReCaptcha, }: IGoogleRecaptchaProps): import("react/jsx-runtime").JSX.Element;
|