cemtrik-dependencies 1.0.66 → 1.0.67
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/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(z,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(z=typeof globalThis<"u"?globalThis:z||self,a(z.MyApp={},z.React,z.ReactDOM))})(this,function(z,a,un){"use strict";function yr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const E=yr(a),Ct=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const i=Array.isArray(o)?[]:{};for(const l in o)o.hasOwnProperty(l)&&!n&&(i[l]=t(o[l]));return i}return e.map(o=>t(o))},cn=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function F(...e){return e.filter(Boolean).join(" ")}const Er=e=>{const n=e.split(" ");let t=e.slice(0,2);return n.length>1&&(t=`${e.at(0)}${n[n.length-1].slice(0,1)}`),t},Sr=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,Cr="The user aborted a request.",Tr="signal is aborted without reason",Or=({id:e,close:n,isPathsTest:t=!1,isTest:r=!1})=>{const o=a.useCallback(i=>{i.some(s=>s.getAttribute===void 0?!1:s.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const i=l=>{const s=l.composedPath();s===void 0||t||(r&&(s[0].getAttribute=()=>e),o(s))};return window.addEventListener("click",i),()=>{window.removeEventListener("click",i)}},[o,t,r,e])},jr=()=>{const[e,n]=a.useState({}),[t,r]=a.useState({}),[o,i]=a.useState([]),l=h=>b=>{b.preventDefault(),b.stopPropagation(),h(e)},s=(h,b,p)=>{const{checked:v,value:g,name:x,type:C,id:y}=h.target,T={radio:y,checkbox:v};n({...e,[x]:T[C]??g}),b({...p,[x]:T[C]??g})},u=a.useCallback((h,b)=>{n(p=>({...p,[h]:b}))},[]),c=a.useCallback((h,b)=>{const p=b.filter(v=>h[v]===""||h[v]===void 0);return p.forEach(v=>r(g=>({...g,[v]:"Este campo es requerido"}))),i(p),p.length>0},[]);return{handleSubmit:l,handleChange:s,setValuesDefault:u,validateFields:c,errors:o,model:e,handleError:(h,b)=>{b.forEach(p=>r(v=>({...v,[p]:h}))),i(b)},messageError:t,setModel:n}},Ir=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),i=a.useCallback((l,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[c]=u;s=Math.min(window.innerWidth,window.outerWidth);const m=l?s>=Number(c):s<=Number(c);o(m)},[e]);return a.useEffect(()=>{const l=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!l&&!s&&t(!1),!l&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);i(l,u)},[e,i]),a.useEffect(()=>{if(!n)return;const l=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);i(u,l)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,i]),r},Tt=()=>{const[e,n]=a.useState({width:0,height:0}),[t,r]=a.useState(0);return a.useEffect(()=>{const o=()=>{const i=Math.min(window.innerWidth,window.outerWidth),l=Math.min(window.innerHeight,window.outerHeight);n({width:i,height:l})};return requestAnimationFrame(()=>o()),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),useLayoutEffect(()=>{const o=new ResizeObserver(()=>r(document.body.offsetHeight));return o.observe(document.body),()=>o.disconnect()},[]),{...e,heightBody:t}};function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ot={exports:{}},Ve={};/**
|
|
1
|
+
(function(z,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(z=typeof globalThis<"u"?globalThis:z||self,a(z.MyApp={},z.React,z.ReactDOM))})(this,function(z,a,un){"use strict";function yr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const E=yr(a),Ct=(e,n=!1)=>{function t(o){if(typeof o!="object"||o===null)return o;const i=Array.isArray(o)?[]:{};for(const l in o)o.hasOwnProperty(l)&&!n&&(i[l]=t(o[l]));return i}return e.map(o=>t(o))},cn=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function F(...e){return e.filter(Boolean).join(" ")}const Er=e=>{const n=e.split(" ");let t=e.slice(0,2);return n.length>1&&(t=`${e.at(0)}${n[n.length-1].slice(0,1)}`),t},Sr=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,Cr="The user aborted a request.",Tr="signal is aborted without reason",Or=({id:e,close:n,isPathsTest:t=!1,isTest:r=!1})=>{const o=a.useCallback(i=>{i.some(s=>s.getAttribute===void 0?!1:s.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const i=l=>{const s=l.composedPath();s===void 0||t||(r&&(s[0].getAttribute=()=>e),o(s))};return window.addEventListener("click",i),()=>{window.removeEventListener("click",i)}},[o,t,r,e])},jr=()=>{const[e,n]=a.useState({}),[t,r]=a.useState({}),[o,i]=a.useState([]),l=h=>b=>{b.preventDefault(),b.stopPropagation(),h(e)},s=(h,b,p)=>{const{checked:v,value:g,name:x,type:C,id:y}=h.target,T={radio:y,checkbox:v};n({...e,[x]:T[C]??g}),b({...p,[x]:T[C]??g})},u=a.useCallback((h,b)=>{n(p=>({...p,[h]:b}))},[]),c=a.useCallback((h,b)=>{const p=b.filter(v=>h[v]===""||h[v]===void 0);return p.forEach(v=>r(g=>({...g,[v]:"Este campo es requerido"}))),i(p),p.length>0},[]);return{handleSubmit:l,handleChange:s,setValuesDefault:u,validateFields:c,errors:o,model:e,handleError:(h,b)=>{b.forEach(p=>r(v=>({...v,[p]:h}))),i(b)},messageError:t,setModel:n}},Ir=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),i=a.useCallback((l,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[c]=u;s=Math.min(window.innerWidth,window.outerWidth);const m=l?s>=Number(c):s<=Number(c);o(m)},[e]);return a.useEffect(()=>{const l=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!l&&!s&&t(!1),!l&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);i(l,u)},[e,i]),a.useEffect(()=>{if(!n)return;const l=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);i(u,l)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,i]),r},Tt=()=>{const[e,n]=a.useState({width:0,height:0}),[t,r]=a.useState(0);return a.useEffect(()=>{const o=()=>{const i=Math.min(window.innerWidth,window.outerWidth),l=Math.min(window.innerHeight,window.outerHeight);n({width:i,height:l})};return requestAnimationFrame(()=>o()),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),a.useLayoutEffect(()=>{const o=new ResizeObserver(()=>r(document.body.offsetHeight));return o.observe(document.body),()=>o.disconnect()},[]),{...e,heightBody:t}};function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ot={exports:{}},Ve={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|