@mi-avalon/libs 0.0.15 → 0.0.16
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.umd.js +10 -10
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(d,
|
|
1
|
+
(function(d,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("antd")):typeof define=="function"&&define.amd?define(["exports","react","antd"],_):(d=typeof globalThis<"u"?globalThis:d||self,_(d.MiAvalonLibs={},d.React,d.antd))})(this,function(d,_,S){"use strict";var yr=Object.defineProperty;var Or=(d,_,S)=>_ in d?yr(d,_,{enumerable:!0,configurable:!0,writable:!0,value:S}):d[_]=S;var f=(d,_,S)=>(Or(d,typeof _!="symbol"?_+"":_,S),S);const ae=(h=>h&&h.__esModule?h:{default:h})(_);var J={exports:{}},P={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ie;function ke(){if(ie)return P;ie=1;var h=ae.default,y=Symbol.for("react.element"),w=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,z=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,L={key:!0,ref:!0,__self:!0,__source:!0};function F(D,p,A){var b,O={},T=null,H=null;A!==void 0&&(T=""+A),p.key!==void 0&&(T=""+p.key),p.ref!==void 0&&(H=p.ref);for(b in p)C.call(p,b)&&!L.hasOwnProperty(b)&&(O[b]=p[b]);if(D&&D.defaultProps)for(b in p=D.defaultProps,p)O[b]===void 0&&(O[b]=p[b]);return{$$typeof:y,type:D,key:T,ref:H,props:O,_owner:z.current}}return P.Fragment=w,P.jsx=F,P.jsxs=F,P}var M={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+G+e}}var K=!1,V;{var
|
|
17
|
+
*/var oe;function $e(){return oe||(oe=1,process.env.NODE_ENV!=="production"&&function(){var h=ae.default,y=Symbol.for("react.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),D=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),H=Symbol.for("react.offscreen"),se=Symbol.iterator,We="@@iterator";function Ne(e){if(e===null||typeof e!="object")return null;var r=se&&e[se]||e[We];return typeof r=="function"?r:null}var x=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ze("error",e,t)}}function ze(e,r,t){{var n=x.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Le=!1,He=!1,Ue=!1,Ve=!1,Ze=!1,fe;fe=Symbol.for("react.module.reference");function Be(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===L||Ze||e===z||e===A||e===b||Ve||e===H||Le||He||Ue||typeof e=="object"&&e!==null&&(e.$$typeof===T||e.$$typeof===O||e.$$typeof===F||e.$$typeof===D||e.$$typeof===p||e.$$typeof===fe||e.getModuleId!==void 0))}function Je(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ce(e){return e.displayName||"Context"}function R(e){if(e==null)return null;if(typeof e.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case w:return"Portal";case L:return"Profiler";case z:return"StrictMode";case A:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case D:var r=e;return ce(r)+".Consumer";case F:var t=e;return ce(t._context)+".Provider";case p:return Je(e,e.render,"ForwardRef");case O:var n=e.displayName||null;return n!==null?n:R(e.type)||"Memo";case T:{var o=e,u=o._payload,i=o._init;try{return R(i(u))}catch{return null}}}return null}var j=Object.assign,I=0,le,de,ve,pe,ge,me,_e;function he(){}he.__reactDisabledLog=!0;function qe(){{if(I===0){le=console.log,de=console.info,ve=console.warn,pe=console.error,ge=console.group,me=console.groupCollapsed,_e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}}function Ge(){{if(I--,I===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},e,{value:le}),info:j({},e,{value:de}),warn:j({},e,{value:ve}),error:j({},e,{value:pe}),group:j({},e,{value:ge}),groupCollapsed:j({},e,{value:me}),groupEnd:j({},e,{value:_e})})}I<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=x.ReactCurrentDispatcher,G;function U(e,r,t){{if(G===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);G=n&&n[1]||""}return`
|
|
18
|
+
`+G+e}}var K=!1,V;{var Ke=typeof WeakMap=="function"?WeakMap:Map;V=new Ke}function be(e,r){if(!e||K)return"";{var t=V.get(e);if(t!==void 0)return t}var n;K=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,qe();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(m){n=m}Reflect.construct(e,[],i)}else{try{i.call()}catch(m){n=m}e.call(i.prototype)}}else{try{throw Error()}catch(m){n=m}e()}}catch(m){if(m&&n&&typeof m.stack=="string"){for(var a=m.stack.split(`
|
|
19
19
|
`),g=n.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+a[
|
|
20
|
+
`),c=a.length-1,l=g.length-1;c>=1&&l>=0&&a[c]!==g[l];)l--;for(;c>=1&&l>=0;c--,l--)if(a[c]!==g[l]){if(c!==1||l!==1)do if(c--,l--,l<0||a[c]!==g[l]){var E=`
|
|
21
|
+
`+a[c].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,E),E}while(c>=1&&l>=0);break}}}finally{K=!1,q.current=u,Ge(),Error.prepareStackTrace=o}var $=e?e.displayName||e.name:"",Y=$?U($):"";return typeof e=="function"&&V.set(e,Y),Y}function Xe(e,r,t){return be(e,!1)}function Qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Z(e,r,t){if(e==null)return"";if(typeof e=="function")return be(e,Qe(e));if(typeof e=="string")return U(e);switch(e){case A:return U("Suspense");case b:return U("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return Xe(e.render);case O:return Z(e.type,r,t);case T:{var n=e,o=n._payload,u=n._init;try{return Z(u(o),r,t)}catch{}}}return""}var W=Object.prototype.hasOwnProperty,Ee={},Re=x.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=Z(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}function er(e,r,t,n,o){{var u=Function.call.bind(W);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var g=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}a&&!(a instanceof Error)&&(B(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),B(null)),a instanceof Error&&!(a.message in Ee)&&(Ee[a.message]=!0,B(o),v("Failed %s type: %s",t,a.message),B(null))}}}var rr=Array.isArray;function X(e){return rr(e)}function tr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function Oe(e){if(nr(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(e)),ye(e)}var N=x.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},Se,Ce,Q;Q={};function ir(e){if(W.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(W.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ur(e,r){if(typeof e.ref=="string"&&N.current&&r&&N.current.stateNode!==r){var t=R(N.current.type);Q[t]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(N.current.type),e.ref),Q[t]=!0)}}function sr(e,r){{var t=function(){Se||(Se=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function fr(e,r){{var t=function(){Ce||(Ce=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var cr=function(e,r,t,n,o,u,i){var a={$$typeof:y,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function lr(e,r,t,n,o){{var u,i={},a=null,g=null;t!==void 0&&(Oe(t),a=""+t),or(r)&&(Oe(r.key),a=""+r.key),ir(r)&&(g=r.ref,ur(r,o));for(u in r)W.call(r,u)&&!ar.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var c=e.defaultProps;for(u in c)i[u]===void 0&&(i[u]=c[u])}if(a||g){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&sr(i,l),g&&fr(i,l)}return cr(e,a,g,o,n,N.current,i)}}var ee=x.ReactCurrentOwner,we=x.ReactDebugCurrentFrame;function k(e){if(e){var r=e._owner,t=Z(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function De(){{if(ee.current){var e=R(ee.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function dr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+r+":"+t+"."}return""}}var Te={};function
|
|
25
|
+
Check your code at `+r+":"+t+"."}return""}}var Te={};function vr(e){{var r=De();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+R(e._owner.type)+"."),k(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),k(null)}}function Ye(e,r){{if(typeof e!="object")return;if(X(e))for(var t=0;t<e.length;t++){var n=e[t];te(n)&&je(n,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var o=Ne(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)te(i.value)&&je(i.value,r)}}}function pr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===O))t=r.propTypes;else return;if(t){var n=R(r);er(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var o=R(r);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){k(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),k(null);break}}e.ref!==null&&(k(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),k(null))}}var Ae={};function xe(e,r,t,n,o,u){{var i=Be(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var g=dr(o);g?a+=g:a+=De();var c;e===null?c="null":X(e)?c="array":e!==void 0&&e.$$typeof===y?(c="<"+(R(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,a)}var l=lr(e,r,t,o,u);if(l==null)return l;if(i){var E=r.children;if(E!==void 0)if(n)if(X(E)){for(var $=0;$<E.length;$++)Ye(E[$],e);Object.freeze&&Object.freeze(E)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ye(E,e)}if(W.call(r,"key")){var Y=R(e),m=Object.keys(r).filter(function(Rr){return Rr!=="key"}),ne=m.length>0?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}";if(!Ae[Y+ne]){var Er=m.length>0?"{"+m.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
|
|
28
28
|
let props = %s;
|
|
29
29
|
<%s {...props} />
|
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
|
31
31
|
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,ne,Y,
|
|
32
|
+
<%s key={someKey} {...props} />`,ne,Y,Er,Y),Ae[Y+ne]=!0}}return e===C?gr(l):pr(l),l}}function mr(e,r,t){return xe(e,r,t,!0)}function _r(e,r,t){return xe(e,r,t,!1)}var hr=_r,br=mr;M.Fragment=C,M.jsx=hr,M.jsxs=br}()),M}process.env.NODE_ENV==="production"?J.exports=ke():J.exports=$e();var ue=J.exports;const Cr="",Pe=({type:h="primary",children:y,onClick:w,custom:C})=>ue.jsx(S.Button,{type:h,onClick:w,className:"my-button",children:C||y}),wr="",Me=({value:h,placeholder:y,onChange:w})=>ue.jsx(S.Input,{value:h,placeholder:y,onChange:w,className:"my-input"}),Fe={YMD_Hms:"YYYY-MM-DD HH:mm:ss",YMD:"YYYY-MM-DD",YMD2:"YYYYMMDD",YMD_POINT:"YYYY.M.DD",Hms:"HH:mm:ss",Hm:"HH:mm",YMD_000:"YYYY-MM-DD 00:00:00",YMD_end:"YYYY-MM-DD 23:59:59",YMD_Hm:"YYYYMMDD HHmm"},Ie=10;class s{}f(s,"integerRegex",/^-?\d+$/),f(s,"positiveIntegerRegex",/^[1-9]\d*$/),f(s,"negativeIntegerRegex",/^-[1-9]\d*$/),f(s,"floatRegex",/^-?\d+(\.\d+)?$/),f(s,"letter",/^[a-zA-Z]+$/),f(s,"chinese",/^[\u4e00-\u9fa5]+$/),f(s,"number",/^[0-9]*$/),f(s,"username",/^[a-zA-Z]\w{3,15}$/),f(s,"strongUsername",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/),f(s,"password",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/),f(s,"strongPassword",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/),f(s,"phone",/^1[3-9]\d{9}$/),f(s,"phoneWithAreaCode",/^\+?\d{2,3}-?\d{8,11}$/),f(s,"email",/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/),f(s,"idCard",/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/),f(s,"bankCard",/^[1-9]\d{3,30}$/),f(s,"zipCode",/^[1-9]\d{5}$/),f(s,"ip",/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/),f(s,"url",/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/),f(s,"carNumber",/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/),f(s,"time",/^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/),f(s,"date",/^(\d{4})-(\d{2})-(\d{2})$/),d.DATE_FORMAT=Fe,d.MyButton=Pe,d.MyInput=Me,d.PAGE_SIZE=Ie,d.PatternType=s,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|