xph-crud 0.0.1
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/README.md +64 -0
- package/dist/index.js +3246 -0
- package/dist/index.umd.cjs +25 -0
- package/dist/style.css +1 -0
- package/dist/types/common/index.d.ts +3 -0
- package/dist/types/common/src/componnets/actions/actions.d.ts +4 -0
- package/dist/types/common/src/componnets/actions/components/button.d.ts +4 -0
- package/dist/types/common/src/componnets/actions/components/dropdown.d.ts +4 -0
- package/dist/types/common/src/componnets/actions/components/index.d.ts +5 -0
- package/dist/types/common/src/componnets/actions/components/more.d.ts +7 -0
- package/dist/types/common/src/componnets/actions/hooks/index.d.ts +8 -0
- package/dist/types/common/src/componnets/actions/hooks/useActionItems.d.ts +6 -0
- package/dist/types/common/src/componnets/actions/hooks/useActionsProps.d.ts +5 -0
- package/dist/types/common/src/componnets/actions/hooks/useExtendActions.d.ts +5 -0
- package/dist/types/common/src/componnets/actions/hooks/useRenderContent.d.ts +6 -0
- package/dist/types/common/src/componnets/actions/types/actionItem.d.ts +67 -0
- package/dist/types/common/src/componnets/actions/types/actions.d.ts +15 -0
- package/dist/types/common/src/componnets/actions/types/index.d.ts +2 -0
- package/dist/types/common/src/componnets/dialog/dialog.d.ts +2 -0
- package/dist/types/common/src/componnets/dialog/types/dialog.d.ts +9 -0
- package/dist/types/common/src/componnets/index.d.ts +5 -0
- package/dist/types/common/src/hooks/index.d.ts +3 -0
- package/dist/types/common/src/hooks/useExtendCompProps.d.ts +45 -0
- package/dist/types/common/src/utils/index.d.ts +1 -0
- package/dist/types/form/index.d.ts +5 -0
- package/dist/types/form/src/components/ActionGroup/index.d.ts +6 -0
- package/dist/types/form/src/components/ApiAutoComplete/index.d.ts +15 -0
- package/dist/types/form/src/components/ApiSelect/index.d.ts +15 -0
- package/dist/types/form/src/components/ApiTransfer/index.d.ts +13 -0
- package/dist/types/form/src/components/ApiTreeSelect/index.d.ts +15 -0
- package/dist/types/form/src/components/AutoUpload/index.d.ts +28 -0
- package/dist/types/form/src/components/Collapse/index.d.ts +7 -0
- package/dist/types/form/src/components/FormItem/index.d.ts +11 -0
- package/dist/types/form/src/components/index.d.ts +5 -0
- package/dist/types/form/src/form.d.ts +8 -0
- package/dist/types/form/src/helper.d.ts +14 -0
- package/dist/types/form/src/hooks/index.d.ts +16 -0
- package/dist/types/form/src/hooks/useApiComonentCache.d.ts +24 -0
- package/dist/types/form/src/hooks/useExtendForm.d.ts +5 -0
- package/dist/types/form/src/hooks/useForm.d.ts +20 -0
- package/dist/types/form/src/hooks/useFormAction.d.ts +12 -0
- package/dist/types/form/src/hooks/useFormCollapse.d.ts +11 -0
- package/dist/types/form/src/hooks/useFormItem.d.ts +40 -0
- package/dist/types/form/src/hooks/useFormProps.d.ts +6 -0
- package/dist/types/form/src/hooks/useFormValues.d.ts +11 -0
- package/dist/types/form/src/types/component.d.ts +35 -0
- package/dist/types/form/src/types/form.d.ts +86 -0
- package/dist/types/form/src/types/formItem.d.ts +54 -0
- package/dist/types/form/src/types/index.d.ts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/table/index.d.ts +4 -0
- package/dist/types/table/src/components/searchForm/components/cacheForm/index.d.ts +6 -0
- package/dist/types/table/src/components/searchForm/index.d.ts +9 -0
- package/dist/types/table/src/components/table/components/cellFunc/cellFunc.d.ts +5 -0
- package/dist/types/table/src/components/table/components/cellFunc/components/actions.d.ts +5 -0
- package/dist/types/table/src/components/table/components/cellFunc/components/index.d.ts +12 -0
- package/dist/types/table/src/components/table/components/cellFunc/components/link.d.ts +5 -0
- package/dist/types/table/src/components/table/components/cellFunc/types/cellFunc.d.ts +43 -0
- package/dist/types/table/src/components/table/components/cellFunc/types/index.d.ts +1 -0
- package/dist/types/table/src/components/table/index.d.ts +9 -0
- package/dist/types/table/src/hooks/index.d.ts +18 -0
- package/dist/types/table/src/hooks/useExtendTable.d.ts +7 -0
- package/dist/types/table/src/hooks/usePagination.d.ts +18 -0
- package/dist/types/table/src/hooks/useRowSelection.d.ts +9 -0
- package/dist/types/table/src/hooks/useSearchForm.d.ts +6 -0
- package/dist/types/table/src/hooks/useTable.d.ts +24 -0
- package/dist/types/table/src/hooks/useTableColumns.d.ts +6 -0
- package/dist/types/table/src/hooks/useTableProps.d.ts +6 -0
- package/dist/types/table/src/hooks/useTableScroll.d.ts +10 -0
- package/dist/types/table/src/hooks/useTopToolbar.d.ts +7 -0
- package/dist/types/table/src/table.d.ts +8 -0
- package/dist/types/table/src/types/apiTable.d.ts +35 -0
- package/dist/types/table/src/types/column.d.ts +32 -0
- package/dist/types/table/src/types/crudForm.d.ts +3 -0
- package/dist/types/table/src/types/index.d.ts +5 -0
- package/dist/types/table/src/types/searchForm.d.ts +9 -0
- package/dist/types/table/src/types/table.d.ts +25 -0
- package/package.json +63 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(function(V,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("antd"),require("@ant-design/icons")):typeof define=="function"&&define.amd?define(["exports","react","antd","@ant-design/icons"],y):(V=typeof globalThis<"u"?globalThis:V||self,y(V["xph-crud"]={},V.React,V.Antd,V.AntDesignIcons))})(this,function(V,y,E,Ee){"use strict";const at=[];for(let e=0;e<=15;e++)at[e]=e.toString(16);function st(){let e="";for(let t=1;t<=36;t++)t===9||t===14||t===19||t===24?e+="-":t===15?e+=4:t===20?e+=at[Math.random()*4|8]:e+=at[Math.random()*16|0];return e.replace(/-/g,"")}var Jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var it={exports:{}},Re={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Dt;function Qr(){if(Dt)return Re;Dt=1;var e=y,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(u,c,l){var d,h={},p=null,S=null;l!==void 0&&(p=""+l),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(S=c.ref);for(d in c)n.call(c,d)&&!s.hasOwnProperty(d)&&(h[d]=c[d]);if(u&&u.defaultProps)for(d in c=u.defaultProps,c)h[d]===void 0&&(h[d]=c[d]);return{$$typeof:t,type:u,key:p,ref:S,props:h,_owner:a.current}}return Re.Fragment=r,Re.jsx=i,Re.jsxs=i,Re}var Ie={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Rt;function en(){return Rt||(Rt=1,process.env.NODE_ENV!=="production"&&function(){var e=y,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),g=Symbol.iterator,$="@@iterator";function j(o){if(o===null||typeof o!="object")return null;var f=g&&o[g]||o[$];return typeof f=="function"?f:null}var L=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(o){{for(var f=arguments.length,b=new Array(f>1?f-1:0),F=1;F<f;F++)b[F-1]=arguments[F];K("error",o,b)}}function K(o,f,b){{var F=L.ReactDebugCurrentFrame,B=F.getStackAddendum();B!==""&&(f+="%s",b=b.concat([B]));var H=b.map(function(U){return String(U)});H.unshift("Warning: "+f),Function.prototype.apply.call(console[o],console,H)}}var J=!1,X=!1,re=!1,I=!1,T=!1,A;A=Symbol.for("react.module.reference");function P(o){return!!(typeof o=="string"||typeof o=="function"||o===n||o===s||T||o===a||o===l||o===d||I||o===S||J||X||re||typeof o=="object"&&o!==null&&(o.$$typeof===p||o.$$typeof===h||o.$$typeof===i||o.$$typeof===u||o.$$typeof===c||o.$$typeof===A||o.getModuleId!==void 0))}function x(o,f,b){var F=o.displayName;if(F)return F;var B=f.displayName||f.name||"";return B!==""?b+"("+B+")":b}function N(o){return o.displayName||"Context"}function z(o){if(o==null)return null;if(typeof o.tag=="number"&&M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case a:return"StrictMode";case l:return"Suspense";case d:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case u:var f=o;return N(f)+".Consumer";case i:var b=o;return N(b._context)+".Provider";case c:return x(o,o.render,"ForwardRef");case h:var F=o.displayName||null;return F!==null?F:z(o.type)||"Memo";case p:{var B=o,H=B._payload,U=B._init;try{return z(U(H))}catch{return null}}}return null}var C=Object.assign,m=0,v,O,_,D,R,W,q;function Z(){}Z.__reactDisabledLog=!0;function ne(){{if(m===0){v=console.log,O=console.info,_=console.warn,D=console.error,R=console.group,W=console.groupCollapsed,q=console.groupEnd;var o={configurable:!0,enumerable:!0,value:Z,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}m++}}function se(){{if(m--,m===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},o,{value:v}),info:C({},o,{value:O}),warn:C({},o,{value:_}),error:C({},o,{value:D}),group:C({},o,{value:R}),groupCollapsed:C({},o,{value:W}),groupEnd:C({},o,{value:q})})}m<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ge=L.ReactCurrentDispatcher,fe;function me(o,f,b){{if(fe===void 0)try{throw Error()}catch(B){var F=B.stack.trim().match(/\n( *(at )?)/);fe=F&&F[1]||""}return`
|
|
18
|
+
`+fe+o}}var de=!1,te;{var ve=typeof WeakMap=="function"?WeakMap:Map;te=new ve}function Pe(o,f){if(!o||de)return"";{var b=te.get(o);if(b!==void 0)return b}var F;de=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var H;H=ge.current,ge.current=null,ne();try{if(f){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(Te){F=Te}Reflect.construct(o,[],U)}else{try{U.call()}catch(Te){F=Te}o.call(U.prototype)}}else{try{throw Error()}catch(Te){F=Te}o()}}catch(Te){if(Te&&F&&typeof Te.stack=="string"){for(var k=Te.stack.split(`
|
|
19
|
+
`),ae=F.stack.split(`
|
|
20
|
+
`),Q=k.length-1,ee=ae.length-1;Q>=1&&ee>=0&&k[Q]!==ae[ee];)ee--;for(;Q>=1&&ee>=0;Q--,ee--)if(k[Q]!==ae[ee]){if(Q!==1||ee!==1)do if(Q--,ee--,ee<0||k[Q]!==ae[ee]){var ce=`
|
|
21
|
+
`+k[Q].replace(" at new "," at ");return o.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",o.displayName)),typeof o=="function"&&te.set(o,ce),ce}while(Q>=1&&ee>=0);break}}}finally{de=!1,ge.current=H,se(),Error.prepareStackTrace=B}var De=o?o.displayName||o.name:"",Xr=De?me(De):"";return typeof o=="function"&&te.set(o,Xr),Xr}function je(o,f,b){return Pe(o,!1)}function Qi(o){var f=o.prototype;return!!(f&&f.isReactComponent)}function rt(o,f,b){if(o==null)return"";if(typeof o=="function")return Pe(o,Qi(o));if(typeof o=="string")return me(o);switch(o){case l:return me("Suspense");case d:return me("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case c:return je(o.render);case h:return rt(o.type,f,b);case p:{var F=o,B=F._payload,H=F._init;try{return rt(H(B),f,b)}catch{}}}return""}var nt=Object.prototype.hasOwnProperty,Lr={},Nr=L.ReactDebugCurrentFrame;function ot(o){if(o){var f=o._owner,b=rt(o.type,o._source,f?f.type:null);Nr.setExtraStackFrame(b)}else Nr.setExtraStackFrame(null)}function eu(o,f,b,F,B){{var H=Function.call.bind(nt);for(var U in o)if(H(o,U)){var k=void 0;try{if(typeof o[U]!="function"){var ae=Error((F||"React class")+": "+b+" type `"+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[U]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}k=o[U](f,U,F,b,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Q){k=Q}k&&!(k instanceof Error)&&(ot(B),M("%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).",F||"React class",b,U,typeof k),ot(null)),k instanceof Error&&!(k.message in Lr)&&(Lr[k.message]=!0,ot(B),M("Failed %s type: %s",b,k.message),ot(null))}}}var tu=Array.isArray;function $t(o){return tu(o)}function ru(o){{var f=typeof Symbol=="function"&&Symbol.toStringTag,b=f&&o[Symbol.toStringTag]||o.constructor.name||"Object";return b}}function nu(o){try{return Ur(o),!1}catch{return!0}}function Ur(o){return""+o}function Br(o){if(nu(o))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ru(o)),Ur(o)}var Be=L.ReactCurrentOwner,ou={key:!0,ref:!0,__self:!0,__source:!0},Wr,Vr,Et;Et={};function au(o){if(nt.call(o,"ref")){var f=Object.getOwnPropertyDescriptor(o,"ref").get;if(f&&f.isReactWarning)return!1}return o.ref!==void 0}function su(o){if(nt.call(o,"key")){var f=Object.getOwnPropertyDescriptor(o,"key").get;if(f&&f.isReactWarning)return!1}return o.key!==void 0}function iu(o,f){if(typeof o.ref=="string"&&Be.current&&f&&Be.current.stateNode!==f){var b=z(Be.current.type);Et[b]||(M('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',z(Be.current.type),o.ref),Et[b]=!0)}}function uu(o,f){{var b=function(){Wr||(Wr=!0,M("%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)",f))};b.isReactWarning=!0,Object.defineProperty(o,"key",{get:b,configurable:!0})}}function cu(o,f){{var b=function(){Vr||(Vr=!0,M("%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)",f))};b.isReactWarning=!0,Object.defineProperty(o,"ref",{get:b,configurable:!0})}}var lu=function(o,f,b,F,B,H,U){var k={$$typeof:t,type:o,key:f,ref:b,props:U,_owner:H};return k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(k,"_self",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.defineProperty(k,"_source",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k};function fu(o,f,b,F,B){{var H,U={},k=null,ae=null;b!==void 0&&(Br(b),k=""+b),su(f)&&(Br(f.key),k=""+f.key),au(f)&&(ae=f.ref,iu(f,B));for(H in f)nt.call(f,H)&&!ou.hasOwnProperty(H)&&(U[H]=f[H]);if(o&&o.defaultProps){var Q=o.defaultProps;for(H in Q)U[H]===void 0&&(U[H]=Q[H])}if(k||ae){var ee=typeof o=="function"?o.displayName||o.name||"Unknown":o;k&&uu(U,ee),ae&&cu(U,ee)}return lu(o,k,ae,B,F,Be.current,U)}}var At=L.ReactCurrentOwner,Yr=L.ReactDebugCurrentFrame;function Fe(o){if(o){var f=o._owner,b=rt(o.type,o._source,f?f.type:null);Yr.setExtraStackFrame(b)}else Yr.setExtraStackFrame(null)}var jt;jt=!1;function Ft(o){return typeof o=="object"&&o!==null&&o.$$typeof===t}function zr(){{if(At.current){var o=z(At.current.type);if(o)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+o+"`."}return""}}function du(o){return""}var Hr={};function pu(o){{var f=zr();if(!f){var b=typeof o=="string"?o:o.displayName||o.name;b&&(f=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+b+">.")}return f}}function Gr(o,f){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var b=pu(f);if(Hr[b])return;Hr[b]=!0;var F="";o&&o._owner&&o._owner!==At.current&&(F=" It was passed a child from "+z(o._owner.type)+"."),Fe(o),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b,F),Fe(null)}}function qr(o,f){{if(typeof o!="object")return;if($t(o))for(var b=0;b<o.length;b++){var F=o[b];Ft(F)&&Gr(F,f)}else if(Ft(o))o._store&&(o._store.validated=!0);else if(o){var B=j(o);if(typeof B=="function"&&B!==o.entries)for(var H=B.call(o),U;!(U=H.next()).done;)Ft(U.value)&&Gr(U.value,f)}}}function hu(o){{var f=o.type;if(f==null||typeof f=="string")return;var b;if(typeof f=="function")b=f.propTypes;else if(typeof f=="object"&&(f.$$typeof===c||f.$$typeof===h))b=f.propTypes;else return;if(b){var F=z(f);eu(b,o.props,"prop",F,o)}else if(f.PropTypes!==void 0&&!jt){jt=!0;var B=z(f);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B||"Unknown")}typeof f.getDefaultProps=="function"&&!f.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gu(o){{for(var f=Object.keys(o.props),b=0;b<f.length;b++){var F=f[b];if(F!=="children"&&F!=="key"){Fe(o),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",F),Fe(null);break}}o.ref!==null&&(Fe(o),M("Invalid attribute `ref` supplied to `React.Fragment`."),Fe(null))}}function Kr(o,f,b,F,B,H){{var U=P(o);if(!U){var k="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(k+=" 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 ae=du();ae?k+=ae:k+=zr();var Q;o===null?Q="null":$t(o)?Q="array":o!==void 0&&o.$$typeof===t?(Q="<"+(z(o.type)||"Unknown")+" />",k=" Did you accidentally export a JSX literal instead of a component?"):Q=typeof o,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Q,k)}var ee=fu(o,f,b,B,H);if(ee==null)return ee;if(U){var ce=f.children;if(ce!==void 0)if(F)if($t(ce)){for(var De=0;De<ce.length;De++)qr(ce[De],o);Object.freeze&&Object.freeze(ce)}else M("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 qr(ce,o)}return o===n?gu(ee):hu(ee),ee}}function mu(o,f,b){return Kr(o,f,b,!0)}function vu(o,f,b){return Kr(o,f,b,!1)}var bu=vu,yu=mu;Ie.Fragment=n,Ie.jsx=bu,Ie.jsxs=yu}()),Ie}process.env.NODE_ENV==="production"?it.exports=Qr():it.exports=en();var w=it.exports,It=typeof global=="object"&&global&&global.Object===Object&&global,tn=typeof self=="object"&&self&&self.Object===Object&&self,pe=It||tn||Function("return this")(),Ce=pe.Symbol,Mt=Object.prototype,rn=Mt.hasOwnProperty,nn=Mt.toString,Me=Ce?Ce.toStringTag:void 0;function on(e){var t=rn.call(e,Me),r=e[Me];try{e[Me]=void 0;var n=!0}catch{}var a=nn.call(e);return n&&(t?e[Me]=r:delete e[Me]),a}var an=Object.prototype,sn=an.toString;function un(e){return sn.call(e)}var cn="[object Null]",ln="[object Undefined]",kt=Ce?Ce.toStringTag:void 0;function he(e){return e==null?e===void 0?ln:cn:kt&&kt in Object(e)?on(e):un(e)}function le(e){return e!=null&&typeof e=="object"}var fn="[object Symbol]";function ut(e){return typeof e=="symbol"||le(e)&&he(e)==fn}function dn(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var ie=Array.isArray,pn=1/0,Lt=Ce?Ce.prototype:void 0,Nt=Lt?Lt.toString:void 0;function Ut(e){if(typeof e=="string")return e;if(ie(e))return dn(e,Ut)+"";if(ut(e))return Nt?Nt.call(e):"";var t=e+"";return t=="0"&&1/e==-pn?"-0":t}function ue(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Bt(e){return e}var hn="[object AsyncFunction]",gn="[object Function]",mn="[object GeneratorFunction]",vn="[object Proxy]";function oe(e){if(!ue(e))return!1;var t=he(e);return t==gn||t==mn||t==hn||t==vn}var ct=pe["__core-js_shared__"],Wt=function(){var e=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bn(e){return!!Wt&&Wt in e}var yn=Function.prototype,_n=yn.toString;function xe(e){if(e!=null){try{return _n.call(e)}catch{}try{return e+""}catch{}}return""}var wn=/[\\^$.*+?()[\]{}|]/g,Tn=/^\[object .+?Constructor\]$/,Cn=Function.prototype,Sn=Object.prototype,Pn=Cn.toString,xn=Sn.hasOwnProperty,On=RegExp("^"+Pn.call(xn).replace(wn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $n(e){if(!ue(e)||bn(e))return!1;var t=oe(e)?On:Tn;return t.test(xe(e))}function En(e,t){return e==null?void 0:e[t]}function Oe(e,t){var r=En(e,t);return $n(r)?r:void 0}var lt=Oe(pe,"WeakMap"),Vt=Object.create,An=function(){function e(){}return function(t){if(!ue(t))return{};if(Vt)return Vt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function jn(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Fn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Dn=800,Rn=16,In=Date.now;function Mn(e){var t=0,r=0;return function(){var n=In(),a=Rn-(n-r);if(r=n,a>0){if(++t>=Dn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function kn(e){return function(){return e}}var We=function(){try{var e=Oe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ln=We?function(e,t){return We(e,"toString",{configurable:!0,enumerable:!1,value:kn(t),writable:!0})}:Bt,Nn=Mn(Ln),Un=9007199254740991,Bn=/^(?:0|[1-9]\d*)$/;function ft(e,t){var r=typeof e;return t=t??Un,!!t&&(r=="number"||r!="symbol"&&Bn.test(e))&&e>-1&&e%1==0&&e<t}function dt(e,t,r){t=="__proto__"&&We?We(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ke(e,t){return e===t||e!==e&&t!==t}var Wn=Object.prototype,Vn=Wn.hasOwnProperty;function Yt(e,t,r){var n=e[t];(!(Vn.call(e,t)&&ke(n,r))||r===void 0&&!(t in e))&&dt(e,t,r)}function Yn(e,t,r,n){var a=!r;r||(r={});for(var s=-1,i=t.length;++s<i;){var u=t[s],c=void 0;c===void 0&&(c=e[u]),a?dt(r,u,c):Yt(r,u,c)}return r}var zt=Math.max;function zn(e,t,r){return t=zt(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,s=zt(n.length-t,0),i=Array(s);++a<s;)i[a]=n[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=n[a];return u[t]=r(i),jn(e,this,u)}}function Hn(e,t){return Nn(zn(e,t,Bt),e+"")}var Gn=9007199254740991;function Ht(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Gn}function Ve(e){return e!=null&&Ht(e.length)&&!oe(e)}function qn(e,t,r){if(!ue(r))return!1;var n=typeof t;return(n=="number"?Ve(r)&&ft(t,r.length):n=="string"&&t in r)?ke(r[t],e):!1}function Kn(e){return Hn(function(t,r){var n=-1,a=r.length,s=a>1?r[a-1]:void 0,i=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,i&&qn(r[0],r[1],i)&&(s=a<3?void 0:s,a=1),t=Object(t);++n<a;){var u=r[n];u&&e(t,u,n,s)}return t})}var Xn=Object.prototype;function pt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xn;return e===r}function Jn(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Zn="[object Arguments]";function Gt(e){return le(e)&&he(e)==Zn}var qt=Object.prototype,Qn=qt.hasOwnProperty,eo=qt.propertyIsEnumerable,ht=Gt(function(){return arguments}())?Gt:function(e){return le(e)&&Qn.call(e,"callee")&&!eo.call(e,"callee")};function to(){return!1}var Kt=typeof V=="object"&&V&&!V.nodeType&&V,Xt=Kt&&typeof module=="object"&&module&&!module.nodeType&&module,ro=Xt&&Xt.exports===Kt,Jt=ro?pe.Buffer:void 0,no=Jt?Jt.isBuffer:void 0,Ye=no||to,oo="[object Arguments]",ao="[object Array]",so="[object Boolean]",io="[object Date]",uo="[object Error]",co="[object Function]",lo="[object Map]",fo="[object Number]",po="[object Object]",ho="[object RegExp]",go="[object Set]",mo="[object String]",vo="[object WeakMap]",bo="[object ArrayBuffer]",yo="[object DataView]",_o="[object Float32Array]",wo="[object Float64Array]",To="[object Int8Array]",Co="[object Int16Array]",So="[object Int32Array]",Po="[object Uint8Array]",xo="[object Uint8ClampedArray]",Oo="[object Uint16Array]",$o="[object Uint32Array]",G={};G[_o]=G[wo]=G[To]=G[Co]=G[So]=G[Po]=G[xo]=G[Oo]=G[$o]=!0,G[oo]=G[ao]=G[bo]=G[so]=G[yo]=G[io]=G[uo]=G[co]=G[lo]=G[fo]=G[po]=G[ho]=G[go]=G[mo]=G[vo]=!1;function Eo(e){return le(e)&&Ht(e.length)&&!!G[he(e)]}function Ao(e){return function(t){return e(t)}}var Zt=typeof V=="object"&&V&&!V.nodeType&&V,Le=Zt&&typeof module=="object"&&module&&!module.nodeType&&module,jo=Le&&Le.exports===Zt,gt=jo&&It.process,Qt=function(){try{var e=Le&&Le.require&&Le.require("util").types;return e||gt&>.binding&>.binding("util")}catch{}}(),er=Qt&&Qt.isTypedArray,mt=er?Ao(er):Eo,Fo=Object.prototype,Do=Fo.hasOwnProperty;function tr(e,t){var r=ie(e),n=!r&&ht(e),a=!r&&!n&&Ye(e),s=!r&&!n&&!a&&mt(e),i=r||n||a||s,u=i?Jn(e.length,String):[],c=u.length;for(var l in e)(t||Do.call(e,l))&&!(i&&(l=="length"||a&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||ft(l,c)))&&u.push(l);return u}function rr(e,t){return function(r){return e(t(r))}}var Ro=rr(Object.keys,Object),Io=Object.prototype,Mo=Io.hasOwnProperty;function ko(e){if(!pt(e))return Ro(e);var t=[];for(var r in Object(e))Mo.call(e,r)&&r!="constructor"&&t.push(r);return t}function Lo(e){return Ve(e)?tr(e):ko(e)}function No(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Uo=Object.prototype,Bo=Uo.hasOwnProperty;function Wo(e){if(!ue(e))return No(e);var t=pt(e),r=[];for(var n in e)n=="constructor"&&(t||!Bo.call(e,n))||r.push(n);return r}function nr(e){return Ve(e)?tr(e,!0):Wo(e)}var Vo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yo=/^\w*$/;function zo(e,t){if(ie(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ut(e)?!0:Yo.test(e)||!Vo.test(e)||t!=null&&e in Object(t)}var Ne=Oe(Object,"create");function Ho(){this.__data__=Ne?Ne(null):{},this.size=0}function Go(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var qo="__lodash_hash_undefined__",Ko=Object.prototype,Xo=Ko.hasOwnProperty;function Jo(e){var t=this.__data__;if(Ne){var r=t[e];return r===qo?void 0:r}return Xo.call(t,e)?t[e]:void 0}var Zo=Object.prototype,Qo=Zo.hasOwnProperty;function ea(e){var t=this.__data__;return Ne?t[e]!==void 0:Qo.call(t,e)}var ta="__lodash_hash_undefined__";function ra(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ne&&t===void 0?ta:t,this}function $e(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}$e.prototype.clear=Ho,$e.prototype.delete=Go,$e.prototype.get=Jo,$e.prototype.has=ea,$e.prototype.set=ra;function na(){this.__data__=[],this.size=0}function ze(e,t){for(var r=e.length;r--;)if(ke(e[r][0],t))return r;return-1}var oa=Array.prototype,aa=oa.splice;function sa(e){var t=this.__data__,r=ze(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():aa.call(t,r,1),--this.size,!0}function ia(e){var t=this.__data__,r=ze(t,e);return r<0?void 0:t[r][1]}function ua(e){return ze(this.__data__,e)>-1}function ca(e,t){var r=this.__data__,n=ze(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function be(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}be.prototype.clear=na,be.prototype.delete=sa,be.prototype.get=ia,be.prototype.has=ua,be.prototype.set=ca;var Ue=Oe(pe,"Map");function la(){this.size=0,this.__data__={hash:new $e,map:new(Ue||be),string:new $e}}function fa(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function He(e,t){var r=e.__data__;return fa(t)?r[typeof t=="string"?"string":"hash"]:r.map}function da(e){var t=He(this,e).delete(e);return this.size-=t?1:0,t}function pa(e){return He(this,e).get(e)}function ha(e){return He(this,e).has(e)}function ga(e,t){var r=He(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ye(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ye.prototype.clear=la,ye.prototype.delete=da,ye.prototype.get=pa,ye.prototype.has=ha,ye.prototype.set=ga;var ma="Expected a function";function vt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ma);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],s=r.cache;if(s.has(a))return s.get(a);var i=e.apply(this,n);return r.cache=s.set(a,i)||s,i};return r.cache=new(vt.Cache||ye),r}vt.Cache=ye;var va=500;function ba(e){var t=vt(e,function(n){return r.size===va&&r.clear(),n}),r=t.cache;return t}var ya=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_a=/\\(\\)?/g,wa=ba(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ya,function(r,n,a,s){t.push(a?s.replace(_a,"$1"):n||r)}),t});function Ta(e){return e==null?"":Ut(e)}function Ca(e,t){return ie(e)?e:zo(e,t)?[e]:wa(Ta(e))}var Sa=1/0;function Pa(e){if(typeof e=="string"||ut(e))return e;var t=e+"";return t=="0"&&1/e==-Sa?"-0":t}function xa(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var or=rr(Object.getPrototypeOf,Object),Oa="[object Object]",$a=Function.prototype,Ea=Object.prototype,ar=$a.toString,Aa=Ea.hasOwnProperty,ja=ar.call(Object);function Fa(e){if(!le(e)||he(e)!=Oa)return!1;var t=or(e);if(t===null)return!0;var r=Aa.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ar.call(r)==ja}function Da(){this.__data__=new be,this.size=0}function Ra(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Ia(e){return this.__data__.get(e)}function Ma(e){return this.__data__.has(e)}var ka=200;function La(e,t){var r=this.__data__;if(r instanceof be){var n=r.__data__;if(!Ue||n.length<ka-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ye(n)}return r.set(e,t),this.size=r.size,this}function _e(e){var t=this.__data__=new be(e);this.size=t.size}_e.prototype.clear=Da,_e.prototype.delete=Ra,_e.prototype.get=Ia,_e.prototype.has=Ma,_e.prototype.set=La;var sr=typeof V=="object"&&V&&!V.nodeType&&V,ir=sr&&typeof module=="object"&&module&&!module.nodeType&&module,Na=ir&&ir.exports===sr,ur=Na?pe.Buffer:void 0;ur&&ur.allocUnsafe;function Ua(e,t){return e.slice()}function Ba(e,t){for(var r=-1,n=e==null?0:e.length,a=0,s=[];++r<n;){var i=e[r];t(i,r,e)&&(s[a++]=i)}return s}function Wa(){return[]}var Va=Object.prototype,Ya=Va.propertyIsEnumerable,cr=Object.getOwnPropertySymbols,za=cr?function(e){return e==null?[]:(e=Object(e),Ba(cr(e),function(t){return Ya.call(e,t)}))}:Wa;function Ha(e,t,r){var n=t(e);return ie(e)?n:xa(n,r(e))}function lr(e){return Ha(e,Lo,za)}var bt=Oe(pe,"DataView"),yt=Oe(pe,"Promise"),_t=Oe(pe,"Set"),fr="[object Map]",Ga="[object Object]",dr="[object Promise]",pr="[object Set]",hr="[object WeakMap]",gr="[object DataView]",qa=xe(bt),Ka=xe(Ue),Xa=xe(yt),Ja=xe(_t),Za=xe(lt),Se=he;(bt&&Se(new bt(new ArrayBuffer(1)))!=gr||Ue&&Se(new Ue)!=fr||yt&&Se(yt.resolve())!=dr||_t&&Se(new _t)!=pr||lt&&Se(new lt)!=hr)&&(Se=function(e){var t=he(e),r=t==Ga?e.constructor:void 0,n=r?xe(r):"";if(n)switch(n){case qa:return gr;case Ka:return fr;case Xa:return dr;case Ja:return pr;case Za:return hr}return t});var Ge=pe.Uint8Array;function Qa(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function es(e,t){var r=Qa(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function ts(e){return typeof e.constructor=="function"&&!pt(e)?An(or(e)):{}}var rs="__lodash_hash_undefined__";function ns(e){return this.__data__.set(e,rs),this}function os(e){return this.__data__.has(e)}function qe(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ye;++t<r;)this.add(e[t])}qe.prototype.add=qe.prototype.push=ns,qe.prototype.has=os;function as(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function ss(e,t){return e.has(t)}var is=1,us=2;function mr(e,t,r,n,a,s){var i=r&is,u=e.length,c=t.length;if(u!=c&&!(i&&c>u))return!1;var l=s.get(e),d=s.get(t);if(l&&d)return l==t&&d==e;var h=-1,p=!0,S=r&us?new qe:void 0;for(s.set(e,t),s.set(t,e);++h<u;){var g=e[h],$=t[h];if(n)var j=i?n($,g,h,t,e,s):n(g,$,h,e,t,s);if(j!==void 0){if(j)continue;p=!1;break}if(S){if(!as(t,function(L,M){if(!ss(S,M)&&(g===L||a(g,L,r,n,s)))return S.push(M)})){p=!1;break}}else if(!(g===$||a(g,$,r,n,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function cs(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ls(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var fs=1,ds=2,ps="[object Boolean]",hs="[object Date]",gs="[object Error]",ms="[object Map]",vs="[object Number]",bs="[object RegExp]",ys="[object Set]",_s="[object String]",ws="[object Symbol]",Ts="[object ArrayBuffer]",Cs="[object DataView]",vr=Ce?Ce.prototype:void 0,wt=vr?vr.valueOf:void 0;function Ss(e,t,r,n,a,s,i){switch(r){case Cs:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ts:return!(e.byteLength!=t.byteLength||!s(new Ge(e),new Ge(t)));case ps:case hs:case vs:return ke(+e,+t);case gs:return e.name==t.name&&e.message==t.message;case bs:case _s:return e==t+"";case ms:var u=cs;case ys:var c=n&fs;if(u||(u=ls),e.size!=t.size&&!c)return!1;var l=i.get(e);if(l)return l==t;n|=ds,i.set(e,t);var d=mr(u(e),u(t),n,a,s,i);return i.delete(e),d;case ws:if(wt)return wt.call(e)==wt.call(t)}return!1}var Ps=1,xs=Object.prototype,Os=xs.hasOwnProperty;function $s(e,t,r,n,a,s){var i=r&Ps,u=lr(e),c=u.length,l=lr(t),d=l.length;if(c!=d&&!i)return!1;for(var h=c;h--;){var p=u[h];if(!(i?p in t:Os.call(t,p)))return!1}var S=s.get(e),g=s.get(t);if(S&&g)return S==t&&g==e;var $=!0;s.set(e,t),s.set(t,e);for(var j=i;++h<c;){p=u[h];var L=e[p],M=t[p];if(n)var K=i?n(M,L,p,t,e,s):n(L,M,p,e,t,s);if(!(K===void 0?L===M||a(L,M,r,n,s):K)){$=!1;break}j||(j=p=="constructor")}if($&&!j){var J=e.constructor,X=t.constructor;J!=X&&"constructor"in e&&"constructor"in t&&!(typeof J=="function"&&J instanceof J&&typeof X=="function"&&X instanceof X)&&($=!1)}return s.delete(e),s.delete(t),$}var Es=1,br="[object Arguments]",yr="[object Array]",Ke="[object Object]",As=Object.prototype,_r=As.hasOwnProperty;function js(e,t,r,n,a,s){var i=ie(e),u=ie(t),c=i?yr:Se(e),l=u?yr:Se(t);c=c==br?Ke:c,l=l==br?Ke:l;var d=c==Ke,h=l==Ke,p=c==l;if(p&&Ye(e)){if(!Ye(t))return!1;i=!0,d=!1}if(p&&!d)return s||(s=new _e),i||mt(e)?mr(e,t,r,n,a,s):Ss(e,t,c,r,n,a,s);if(!(r&Es)){var S=d&&_r.call(e,"__wrapped__"),g=h&&_r.call(t,"__wrapped__");if(S||g){var $=S?e.value():e,j=g?t.value():t;return s||(s=new _e),a($,j,r,n,s)}}return p?(s||(s=new _e),$s(e,t,r,n,a,s)):!1}function wr(e,t,r,n,a){return e===t?!0:e==null||t==null||!le(e)&&!le(t)?e!==e&&t!==t:js(e,t,r,n,wr,a)}function Fs(e){return function(t,r,n){for(var a=-1,s=Object(t),i=n(t),u=i.length;u--;){var c=i[++a];if(r(s[c],c,s)===!1)break}return t}}var Ds=Fs();function Tt(e,t,r){(r!==void 0&&!ke(e[t],r)||r===void 0&&!(t in e))&&dt(e,t,r)}function Rs(e){return le(e)&&Ve(e)}function Ct(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Is(e){return Yn(e,nr(e))}function Ms(e,t,r,n,a,s,i){var u=Ct(e,r),c=Ct(t,r),l=i.get(c);if(l){Tt(e,r,l);return}var d=s?s(u,c,r+"",e,t,i):void 0,h=d===void 0;if(h){var p=ie(c),S=!p&&Ye(c),g=!p&&!S&&mt(c);d=c,p||S||g?ie(u)?d=u:Rs(u)?d=Fn(u):S?(h=!1,d=Ua(c)):g?(h=!1,d=es(c)):d=[]:Fa(c)||ht(c)?(d=u,ht(u)?d=Is(u):(!ue(u)||oe(u))&&(d=ts(c))):h=!1}h&&(i.set(c,d),a(d,c,n,s,i),i.delete(c)),Tt(e,r,d)}function Tr(e,t,r,n,a){e!==t&&Ds(t,function(s,i){if(a||(a=new _e),ue(s))Ms(e,t,i,r,Tr,n,a);else{var u=n?n(Ct(e,i),s,i+"",e,t,a):void 0;u===void 0&&(u=s),Tt(e,i,u)}},nr)}var ks="[object String]";function Cr(e){return typeof e=="string"||!ie(e)&&le(e)&&he(e)==ks}var Ls="[object Boolean]";function St(e){return e===!0||e===!1||le(e)&&he(e)==Ls}function Xe(e,t){return wr(e,t)}var Ns="[object Number]";function Us(e){return typeof e=="number"||le(e)&&he(e)==Ns}function Sr(e){return e==null}function Bs(e){return e===null}var Ae=Kn(function(e,t,r){Tr(e,t,r)});function Ws(e,t,r,n){if(!ue(e))return e;t=Ca(t,e);for(var a=-1,s=t.length,i=s-1,u=e;u!=null&&++a<s;){var c=Pa(t[a]),l=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(a!=i){var d=u[c];l=void 0,l===void 0&&(l=ue(d)?d:ft(t[a+1])?[]:{})}Yt(u,c,l),u=u[c]}return e}function Pr(e,t,r){return e==null?e:Ws(e,t,r)}function Vs(e){const{extendActionsProps:t}=Er();return{actionsProps:{...Ae(Ae({items:[],max:10},t),e)}}}function xr(e){return"component"in e}function Ys(e){return"render"in e}function zs(e){const{type:t,disabled:r,items:n,max:a}=e,s=n.map(u=>{const c={...u};return xr(c)&&(c.componentProps={type:t,disabled:r,...c.componentProps}),c}),i=Us(a)&&a>=0;return{showActionItems:s.slice(0,i?a:s.length),ellipsisActionItems:s.slice(i?a:s.length)}}const Hs=e=>{const{componentProps:t}=e,r=()=>{const{...n}=t;return n};return w.jsx(E.Button,{...r()})},Gs=e=>{const{componentProps:t}=e,n=(()=>{const{dropDownItems:a,onClick:s,...i}=t;return i})();return w.jsx(E.Dropdown,{disabled:n.disabled,menu:{items:(t==null?void 0:t.dropDownItems)||[],onClick:t==null?void 0:t.onClick},trigger:["click"],children:w.jsx("div",{children:w.jsxs(E.Button,{...n,children:[n.children,w.jsx(Ee.CaretDownOutlined,{})]})})})},Je=new Map;Je.set("Button",Hs),Je.set("Dropdown",Gs);function Or(){const{setExtendActionsComp:e}=Er();return e(Je),{renderContent:y.useCallback((r,n)=>{const a=xr(r),s=Ys(r);if(a){const i=Je.get(r.component);return w.jsx(i,{...r},n)}return s?w.jsx("div",{children:r.render},n):null},[])}}const $r=y.createContext({}),qs=e=>{const{extendProps:t,extendComp:r}=e.value;return w.jsx($r.Provider,{value:{extendProps:t,extendComp:r},children:e.children})},Ze=()=>y.useContext($r),Er=()=>{const{extendProps:e,extendComp:t}=Ze(),r=n=>{const a=t==null?void 0:t.actions;a&&Object.keys(a).forEach(s=>{n.set(s,a[s])})};return{extendActionsProps:e==null?void 0:e.actions,setExtendActionsComp:r}},{useToken:Ks}=E.theme,Xs=({items:e,actionsProps:t})=>{const{type:r,disabled:n}=t,{renderContent:a}=Or(),{token:s}=Ks(),i={backgroundColor:s.colorBgElevated,borderRadius:s.borderRadiusLG,boxShadow:s.boxShadowSecondary},u=()=>w.jsx("div",{style:i,children:w.jsx(E.Space,{style:{padding:8},children:e==null?void 0:e.map((c,l)=>a(c,l))})});return w.jsx(E.Dropdown,{disabled:n,menu:{items:[]},dropdownRender:u,trigger:["click"],children:w.jsxs(E.Button,{type:r,children:["更多",w.jsx(Ee.CaretDownOutlined,{})]})})},Pt=e=>{const{actionsProps:t}=Vs(e),{showActionItems:r,ellipsisActionItems:n}=zs(t),{renderContent:a}=Or();return t!=null&&t.render?t.render:w.jsxs(y.Fragment,{children:[r==null?void 0:r.map((s,i)=>a(s,i)),n!=null&&n.length?w.jsx(Xs,{actionsProps:t,items:n}):null]})},Js=()=>w.jsx(w.Fragment,{});function xt(e){return"component"in e}function Ot(e){return"render"in e}function Zs(e){return e.includes("Input")||e.includes("Complete")?"请输入":e.includes("Picker")||e.includes("Select")||e.includes("Cascader")||e.includes("Checkbox")||e.includes("Radio")||e.includes("Switch")?"请选择":""}function Qs(e,t,r){["DatePicker","MonthPicker","WeekPicker","TimePicker"].includes(t)?e.type=r?"string":"object":["RangePicker","Upload","CheckboxGroup","TimePicker"].includes(t)?e.type="array":["InputNumber"].includes(t)&&(e.type="number")}const ei=["DatePicker","MonthPicker","RangePicker","WeekPicker","TimePicker"],ti=e=>{const{show:t,ifShow:r,required:n,disabled:a,componentProps:s}=e;return!!(oe(t)||oe(r)||oe(n)||oe(a)||oe(s)||Ot(e))},ri=e=>["application/json","application/javascript","text/plain","text/html","text/css"].includes(e)?`${e}; charset=utf-8`:e,ni=(e,t,r)=>{const n=y.useRef(null),a=y.useRef(null),{handleCollapseChangeFalse:s}=r.current||{},{show:i,ifShow:u}=e;let c=!0,l=!0;if(St(i)&&(c=i),St(u)&&(l=u),oe(i)){c=i({model:t});const d=Sr(n.current)?c:n.current;y.useEffect(()=>{Xe(c,d)||s&&s()},[t])}if(oe(u)){l=u({model:t});const d=Sr(a.current)?l:a.current;y.useEffect(()=>{Xe(l,d)||s&&s()},[t])}return n.current=c,a.current=l,{isShow:c,isIfShow:l}},oi=(e,t)=>{const{collapsible:r,collapseNum:n}=e,[a,s]=y.useState(!!(r&&t>=n));return{itemCollapse:a,setItemCollapse:s}},ai=({item:e,model:t,isShow:r,componentProps:n})=>{const{rules:a=[],label:s,required:i}=e;let u=a;const c=xt(e),l=c?Zs(e.component)+s:"";function d(g,$){const j=g.message||l;return $===void 0||Bs($)||Array.isArray($)&&$.length===0||typeof $=="string"&&$.trim()===""||typeof $=="object"&&Reflect.has($,"checked")&&Reflect.has($,"halfChecked")&&Array.isArray($.checked)&&Array.isArray($.halfChecked)&&$.checked.length===0&&$.halfChecked.length===0?Promise.reject(j):Promise.resolve()}const h=oe(i)?i({model:t}):i;h&&(!u||u.length===0?u=[{required:h,validator:d}]:u.findIndex($=>Reflect.has($,"required"))===-1&&u.push({required:h,validator:d}));const p=u.findIndex(g=>Reflect.has(g,"required")&&!Reflect.has(g,"validator"));if(p!==-1){const g=u[p];if(r||(g.required=!1),c){const{component:$}=e;Reflect.has(g,"type")||(g.type=$==="InputNumber"?"number":"string"),g.message=g.message||l,($.includes("Input")||$.includes("Textarea"))&&(g.whitespace=!0);const j=n.valueFormat;Qs(g,$,j)}}const S=u.findIndex(g=>g.max);return S!==-1&&!u[S].validator&&(u[S].message=u[S].message||`字符数应小于${u[S].max}位`),{rules:u}},si=(e,t,r)=>{const{disabled:n}=e;let a=!1;const{disabled:s}=t;return oe(s)&&(a=s({model:r})),St(s)&&(a=s),{disabled:Reflect.has(t,"disabled")?a:n}},ii=(e,t)=>{const r={},{componentProps:n={}}=e;return oe(n)&&Object.assign(r,n({model:t})),Object.assign(r,n),{componentProps:r}},ui=(e,t)=>{const{colProps:r={}}=e,{colProps:n={span:24}}=t;return{colProps:{...n,...r}}},ci=({formProps:e})=>{const{items:t}=e;return{formItems:t.map(n=>({...n}))}},li=(e,t)=>{const r=u=>(Object.keys(u).forEach(c=>{Object.defineProperty(u,c,{value:u[c],writable:!1,enumerable:!0,configurable:!1})}),u),n={};e.items.forEach(u=>{n[u.name]=u.initialValue});const a=ti(t),s=a?E.Form.useWatch(u=>r(u)):null;return{rewritingModel:y.useMemo(()=>s||r(n),[s]),isusewatch:a}},fi=()=>{const e=y.useRef(null);function t(n){e.current=n}const r={getFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.getFieldsValue(...n)},setFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.setFieldsValue(...n)},resetFields:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.resetFields(...n)},validator:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.validator(...n)},scrollToField:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.scrollToField(...n)}};return y.useEffect(()=>(console.log("ParentComponent is mounted====================================="),()=>{console.log("ParentComponent is unmounted===================================="),e.current=null}),[]),[t,r]};var Ar={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Jr,function(){var r=1e3,n=6e4,a=36e5,s="millisecond",i="second",u="minute",c="hour",l="day",d="week",h="month",p="quarter",S="year",g="date",$="Invalid Date",j=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,L=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var m=["th","st","nd","rd"],v=C%100;return"["+C+(m[(v-20)%10]||m[v]||m[0])+"]"}},K=function(C,m,v){var O=String(C);return!O||O.length>=m?C:""+Array(m+1-O.length).join(v)+C},J={s:K,z:function(C){var m=-C.utcOffset(),v=Math.abs(m),O=Math.floor(v/60),_=v%60;return(m<=0?"+":"-")+K(O,2,"0")+":"+K(_,2,"0")},m:function C(m,v){if(m.date()<v.date())return-C(v,m);var O=12*(v.year()-m.year())+(v.month()-m.month()),_=m.clone().add(O,h),D=v-_<0,R=m.clone().add(O+(D?-1:1),h);return+(-(O+(v-_)/(D?_-R:R-_))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:h,y:S,w:d,d:l,D:g,h:c,m:u,s:i,ms:s,Q:p}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},X="en",re={};re[X]=M;var I="$isDayjsObject",T=function(C){return C instanceof N||!(!C||!C[I])},A=function C(m,v,O){var _;if(!m)return X;if(typeof m=="string"){var D=m.toLowerCase();re[D]&&(_=D),v&&(re[D]=v,_=D);var R=m.split("-");if(!_&&R.length>1)return C(R[0])}else{var W=m.name;re[W]=m,_=W}return!O&&_&&(X=_),_||!O&&X},P=function(C,m){if(T(C))return C.clone();var v=typeof m=="object"?m:{};return v.date=C,v.args=arguments,new N(v)},x=J;x.l=A,x.i=T,x.w=function(C,m){return P(C,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var N=function(){function C(v){this.$L=A(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[I]=!0}var m=C.prototype;return m.parse=function(v){this.$d=function(O){var _=O.date,D=O.utc;if(_===null)return new Date(NaN);if(x.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var R=_.match(j);if(R){var W=R[2]-1||0,q=(R[7]||"0").substring(0,3);return D?new Date(Date.UTC(R[1],W,R[3]||1,R[4]||0,R[5]||0,R[6]||0,q)):new Date(R[1],W,R[3]||1,R[4]||0,R[5]||0,R[6]||0,q)}}return new Date(_)}(v),this.init()},m.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},m.$utils=function(){return x},m.isValid=function(){return this.$d.toString()!==$},m.isSame=function(v,O){var _=P(v);return this.startOf(O)<=_&&_<=this.endOf(O)},m.isAfter=function(v,O){return P(v)<this.startOf(O)},m.isBefore=function(v,O){return this.endOf(O)<P(v)},m.$g=function(v,O,_){return x.u(v)?this[O]:this.set(_,v)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(v,O){var _=this,D=!!x.u(O)||O,R=x.p(v),W=function(de,te){var ve=x.w(_.$u?Date.UTC(_.$y,te,de):new Date(_.$y,te,de),_);return D?ve:ve.endOf(l)},q=function(de,te){return x.w(_.toDate()[de].apply(_.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(te)),_)},Z=this.$W,ne=this.$M,se=this.$D,ge="set"+(this.$u?"UTC":"");switch(R){case S:return D?W(1,0):W(31,11);case h:return D?W(1,ne):W(0,ne+1);case d:var fe=this.$locale().weekStart||0,me=(Z<fe?Z+7:Z)-fe;return W(D?se-me:se+(6-me),ne);case l:case g:return q(ge+"Hours",0);case c:return q(ge+"Minutes",1);case u:return q(ge+"Seconds",2);case i:return q(ge+"Milliseconds",3);default:return this.clone()}},m.endOf=function(v){return this.startOf(v,!1)},m.$set=function(v,O){var _,D=x.p(v),R="set"+(this.$u?"UTC":""),W=(_={},_[l]=R+"Date",_[g]=R+"Date",_[h]=R+"Month",_[S]=R+"FullYear",_[c]=R+"Hours",_[u]=R+"Minutes",_[i]=R+"Seconds",_[s]=R+"Milliseconds",_)[D],q=D===l?this.$D+(O-this.$W):O;if(D===h||D===S){var Z=this.clone().set(g,1);Z.$d[W](q),Z.init(),this.$d=Z.set(g,Math.min(this.$D,Z.daysInMonth())).$d}else W&&this.$d[W](q);return this.init(),this},m.set=function(v,O){return this.clone().$set(v,O)},m.get=function(v){return this[x.p(v)]()},m.add=function(v,O){var _,D=this;v=Number(v);var R=x.p(O),W=function(ne){var se=P(D);return x.w(se.date(se.date()+Math.round(ne*v)),D)};if(R===h)return this.set(h,this.$M+v);if(R===S)return this.set(S,this.$y+v);if(R===l)return W(1);if(R===d)return W(7);var q=(_={},_[u]=n,_[c]=a,_[i]=r,_)[R]||1,Z=this.$d.getTime()+v*q;return x.w(Z,this)},m.subtract=function(v,O){return this.add(-1*v,O)},m.format=function(v){var O=this,_=this.$locale();if(!this.isValid())return _.invalidDate||$;var D=v||"YYYY-MM-DDTHH:mm:ssZ",R=x.z(this),W=this.$H,q=this.$m,Z=this.$M,ne=_.weekdays,se=_.months,ge=_.meridiem,fe=function(te,ve,Pe,je){return te&&(te[ve]||te(O,D))||Pe[ve].slice(0,je)},me=function(te){return x.s(W%12||12,te,"0")},de=ge||function(te,ve,Pe){var je=te<12?"AM":"PM";return Pe?je.toLowerCase():je};return D.replace(L,function(te,ve){return ve||function(Pe){switch(Pe){case"YY":return String(O.$y).slice(-2);case"YYYY":return x.s(O.$y,4,"0");case"M":return Z+1;case"MM":return x.s(Z+1,2,"0");case"MMM":return fe(_.monthsShort,Z,se,3);case"MMMM":return fe(se,Z);case"D":return O.$D;case"DD":return x.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return fe(_.weekdaysMin,O.$W,ne,2);case"ddd":return fe(_.weekdaysShort,O.$W,ne,3);case"dddd":return ne[O.$W];case"H":return String(W);case"HH":return x.s(W,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return de(W,q,!0);case"A":return de(W,q,!1);case"m":return String(q);case"mm":return x.s(q,2,"0");case"s":return String(O.$s);case"ss":return x.s(O.$s,2,"0");case"SSS":return x.s(O.$ms,3,"0");case"Z":return R}return null}(te)||R.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(v,O,_){var D,R=this,W=x.p(O),q=P(v),Z=(q.utcOffset()-this.utcOffset())*n,ne=this-q,se=function(){return x.m(R,q)};switch(W){case S:D=se()/12;break;case h:D=se();break;case p:D=se()/3;break;case d:D=(ne-Z)/6048e5;break;case l:D=(ne-Z)/864e5;break;case c:D=ne/a;break;case u:D=ne/n;break;case i:D=ne/r;break;default:D=ne}return _?D:x.a(D)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return re[this.$L]},m.locale=function(v,O){if(!v)return this.$L;var _=this.clone(),D=A(v,O,!0);return D&&(_.$L=D),_},m.clone=function(){return x.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},C}(),z=N.prototype;return P.prototype=z,[["$ms",s],["$s",i],["$m",u],["$H",c],["$W",l],["$M",h],["$y",S],["$D",g]].forEach(function(C){z[C[1]]=function(m){return this.$g(m,C[0],C[1])}}),P.extend=function(C,m){return C.$i||(C(m,N,P),C.$i=!0),P},P.locale=A,P.isDayjs=T,P.unix=function(C){return P(1e3*C)},P.en=re[X],P.Ls=re,P.p={},P})})(Ar);var di=Ar.exports;const Qe=Zr(di);function pi(e,t={}){const r=/^\[(.+)\]$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const a=n[1].split(",");if(!a.length)return;const s=[];return a.forEach((i,u)=>{Pr(s,u,t[i.trim()])}),s.filter(Boolean).length?s:void 0}}}function hi(e,t={}){const r=/^\{(.+)\}$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const a=n[1].split(",");if(!a.length)return;const s={};return a.forEach(i=>{Pr(s,i.trim(),t[i.trim()])}),Object.values(s).filter(Boolean).length?s:void 0}}}function gi(e,t){const r=t.fieldMapToTime;if(!r||!Array.isArray(r))return e;for(const[n,[a,s],i="YYYY-MM-DD"]of r){if(!n||!a||!s)continue;if(!e[n]){Reflect.deleteProperty(e,n);continue}const[u,c]=e[n],[l,d]=Array.isArray(i)?i:[i,i];e[a]=Qe(u).format(l),e[s]=Qe(c).format(d),Reflect.deleteProperty(e,n)}return e}const mi=(e,t,r)=>{const n=e.filter(i=>i.name);return{handleFormatRenderValues:i=>{const u={},c=[];return n.forEach(l=>{const d=Reflect.has(i,l.name),h=pi(l.name,i)||hi(l.name,i);if(d||h){const p=h||i[l.name];if(xt(l))if(ei.includes(l.component)){if(ie(p)){const S=[];for(const g of p)S.push(g?Qe(g):null);u[l.name]=S}else u[l.name]=p?Qe(p):null;c.push(l.name)}else u[l.name]=p,c.push(l.name);Ot(l)&&(u[l.name]=p,c.push(l.name))}}),{renderValues:u,validKeys:c}},handleFormatReturnValues:i=>{var c,l,d,h,p;if(!ue(i))return{};const u={};for(const S of Object.entries(i)){let[,g]=S;const[$]=S;if(!$||ie(g)&&g.length===0||oe(g))continue;const{transformDateFunc:j}=t,L=(d=(l=(c=r.current)==null?void 0:c.get($))==null?void 0:l.current)==null?void 0:d.componentProps,M=L==null?void 0:L.valueFormat;if(ue(g)){const K=g;K.format&&(g=j==null?void 0:j(K,M))}ie(g)&&((h=g[0])!=null&&h.format)&&((p=g[1])!=null&&p.format)&&(g=g.map(K=>j==null?void 0:j(K,M))),Cr(g)&&(g===""?g=void 0:g=g.trim()),u[$]=g}return gi(u,t)}}},vi=(e,t,r)=>({getFieldsValue:(...c)=>r(e.getFieldsValue(...c)),setFieldsValue:c=>{const{renderValues:l,validKeys:d}=t(c);e.setFieldsValue(l),e.validateFields(d)},resetFields:async()=>e.resetFields(),validator:async c=>e.validateFields(c).then(l=>r(l)),scrollToField:async(c,l)=>e.scrollToField(c,l)}),bi=e=>{const{extendFormProps:t}=jr();return{formProps:{...Ae(Ae({collapseNum:5,colon:!1,items:[],labelWrap:!0,transformDateFunc:(a,s)=>{var i;return((i=a==null?void 0:a.format)==null?void 0:i.call(a,s||"YYYY-MM-DD HH:mm:ss"))??a},fieldMapToTime:[]},t),e)}}},et=e=>{const{immediate:t=!0,params:r,api:n,apiCallback:a,isUseWatch:s}=e,i=y.useRef(!0),u=y.useRef(r),c=()=>{n&&oe(n)&&(r?n(r).then(a):n().then(a),u.current=r)};return y.useEffect(()=>{i.current&&(t&&c(),i.current=!1),!i.current&&s&&(Xe(r,u.current)||t&&c())},[r]),{getApiData:c}},yi=(e,t)=>{const{collapsible:r,collapseNum:n}=e,a=y.useRef();return{collapsible:r,collapseNum:n,collapseRef:a,onClickCollapseToTrue:()=>{var u;(u=t.current)==null||u.forEach(c=>{if(c.current){const{itemIndex:l}=c.current;l>=n&&r&&c.current.setItemCollapse(!0)}})},onClickCollapseToFalse:()=>{var u;(u=t.current)==null||u.forEach(c=>{if(c.current){const{itemCollapse:l}=c.current;l&&c.current.setItemCollapse(!1)}})}}},jr=()=>{const{extendProps:e,extendComp:t}=Ze(),r=n=>{const a=t==null?void 0:t.form;a&&Object.keys(a).forEach(s=>{n.set(s,a[s])})};return{extendFormProps:e==null?void 0:e.form,setExtendFormComp:r}},_i=e=>{console.log("render ApiSelect");const{api:t,params:r,immediate:n=!0,isusewatch:a,onDropdownVisibleChange:s}=e,i=a==="true",[u,c]=y.useState([]),{getApiData:l}=et({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:i}),d=p=>{p&&!n&&l(),s&&s(p)},h=()=>{const{api:p,params:S,immediate:g,isusewatch:$,...j}=e;return j};return w.jsx(E.Select,{...h(),options:u,onDropdownVisibleChange:d})},wi=e=>{console.log("render ApiTreeSelect");const{api:t,params:r,immediate:n=!0,isusewatch:a,onDropdownVisibleChange:s}=e,i=a==="true",[u,c]=y.useState([]),{getApiData:l}=et({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:i}),d=p=>{p&&!n&&l(),s&&s(p)},h=()=>{const{api:p,params:S,immediate:g,isusewatch:$,...j}=e;return j};return w.jsx(E.TreeSelect,{...h(),treeData:u,onDropdownVisibleChange:d})},Ti=e=>{console.log("render ApiTransfer");const{api:t,params:r,isusewatch:n}=e,a=n==="true",[s,i]=y.useState([]);et({api:t,params:r,apiCallback:i,isUseWatch:a});const u=()=>{const{api:c,params:l,isusewatch:d,...h}=e;return h};return w.jsx(E.Transfer,{...u(),dataSource:s})},Ci=e=>{console.log("render ApiAutoComplete");const{api:t,params:r,immediate:n=!0,isusewatch:a,onDropdownVisibleChange:s}=e,i=a==="true",[u,c]=y.useState([]),{getApiData:l}=et({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:i}),d=p=>{p&&!n&&l(),s&&s(p)},h=()=>{const{api:p,params:S,immediate:g,isusewatch:$,...j}=e;return j};return w.jsx(E.AutoComplete,{...h(),options:u,onDropdownVisibleChange:d})},we={String:"String","String[]":"String[]","File[]":"File[]",FileList:"FileList"},Si=e=>{console.log("render AutoUpload"),console.log(st());const t="",{api:r,maxCount:n=1,maxSize:a=2,listType:s="picture-card",openCrop:i=!1,data:u,returnType:c=we.String,value:l=t,onChange:d}=e,h=y.useRef(!0),p=y.useRef(0),S=y.useRef([]),[g,$]=y.useState([]),j=T=>{S.current=T,$([...T])},L=()=>{const{api:T,maxCount:A,maxSize:P,openCrop:x,beforeUpload:N,fileList:z,returnType:C,...m}=e;return m},M=T=>{const A=T.size/1024/1024<a;A||E.message.error(`文件大小超过:${a}M, 请重试`);const P=S.current.length+p.current<n;return P||E.message.error(`文件数量不能超过${n}个`),A&&P&&p.current++,A&&P&&K(T),E.Upload.LIST_IGNORE},K=T=>{i?(E.message.error("暂时不支持裁剪功能,后续兼容。。。。"),J({file:T})):J({file:T})},J=T=>{r?r({file:T.file,...u}).then(A=>{j([...S.current,...A])}).finally(()=>{p.current--}):(Object.assign(T.file,{status:"done",url:URL.createObjectURL(new Blob([T.file],{type:ri(T.file.type)}))}),j([...S.current,T.file]),p.current--)},X=T=>{const{file:A,fileList:P}=T,{status:x}=A;switch(x){case"removed":{j([...P]);break}}},re=T=>{const A=x=>{const N=x.split("/"),z=N[N.length-1],[C]=z.split("?");return C};return{uid:(x=>{const N=S.current.find(z=>z.url===x);return N?N.uid:st()})(T),name:A(T),url:T,status:"done"}},I=()=>{switch(c){case we.String:return g.map(T=>T.url).join(",");case we["String[]"]:return g.map(T=>T.url);case we["File[]"]:return[...g];case we.FileList:return[...g]}};return y.useEffect(()=>{const T=I();if(Xe(T,l))return;let A=[];switch(c){case we.String:{A=(l||"").split(",").filter(P=>P).map(P=>re(P));break}case we["String[]"]:{A=(l||[]).map(P=>re(P));break}case we["File[]"]:{A=(l||[]).map(P=>P);break}case we.FileList:{A=(l||[]).map(P=>P);break}}j(A)},[l]),y.useEffect(()=>{if(h.current){h.current=!1;return}const T=I();d==null||d(T)},[g]),w.jsx(E.Upload,{listType:s,...L(),fileList:g,beforeUpload:M,onChange:X,children:"上传"})},Y=new Map;Y.set("Input",E.Input),Y.set("ApiSelect",_i),Y.set("Select",E.Select),Y.set("InputNumber",E.InputNumber),Y.set("ApiTreeSelect",wi),Y.set("TreeSelect",E.TreeSelect),Y.set("ApiTransfer",Ti),Y.set("Transfer",E.Transfer),Y.set("Switch",E.Switch),Y.set("Button",E.Button),Y.set("Radio",E.Radio),Y.set("RadioGroup",E.Radio.Group),Y.set("Checkbox",E.Checkbox),Y.set("CheckboxGroup",E.Checkbox.Group),Y.set("Cascader",E.Cascader),Y.set("TimePicker",E.TimePicker),Y.set("DatePicker",E.DatePicker),Y.set("MonthPicker",E.DatePicker.MonthPicker),Y.set("WeekPicker",E.DatePicker.WeekPicker),Y.set("RangePicker",E.DatePicker.RangePicker),Y.set("InputPassword",E.Input.Password),Y.set("InputTextArea",E.Input.TextArea),Y.set("ApiAutoComplete",Ci),Y.set("AutoComplete",E.AutoComplete),Y.set("Upload",E.Upload),Y.set("AutoUpload",Si);const Fr={"form-item-force":"_form-item-force_1hsf3_1","form-item-hidden":"_form-item-hidden_1hsf3_9"},Pi=y.forwardRef(({itemIndex:e,itemProps:t,methods:r,formProps:n,collapseRef:a},s)=>{console.log("render FormItem",t.name);const{rewritingModel:i,isusewatch:u}=li(n,t),{isIfShow:c,isShow:l}=ni(t,i,a),{colProps:d}=ui(t,n),{componentProps:h}=ii(t,i),{rules:p}=ai({item:t,model:i,isShow:l,componentProps:h}),{disabled:S}=si(n,t,i),{itemCollapse:g,setItemCollapse:$}=oi(n,e),{name:j,label:L,wrapperCol:M,labelCol:K,valuePropName:J,initialValue:X,forceRow:re}=t;y.useImperativeHandle(s,()=>({itemIndex:e,componentProps:h,itemCollapse:g,setItemCollapse:$}));const I=()=>({name:j,label:L,rules:p,wrapperCol:M,labelCol:K,valuePropName:J,initialValue:X}),{setExtendFormComp:T}=jr();T(Y);const A=xt(t),P=Ot(t),x=()=>{if(A){const N=Y.get(t.component);return w.jsx(N,{...h,disabled:S,isusewatch:u.toString()})}return P?t.render({model:i,name:j,disabled:S,methods:r,componentProps:h}):null};return w.jsxs(y.Fragment,{children:[re?w.jsx("div",{className:Fr["form-item-force"]}):null,c?w.jsx(E.Col,{...d,className:l&&!g?void 0:Fr["form-item-hidden"],children:w.jsx(E.Form.Item,{...I(),children:x()})}):null]})}),xi={"collapse-wrapper":"_collapse-wrapper_ylm01_1"},Oi=y.forwardRef(({collapsible:e,onClickExpand:t,onClickFold:r},n)=>{const[a,s]=y.useState(e),i=y.useMemo(()=>a,[a]),u=()=>{r(),s(!0)},c=()=>{t(),s(!1)};return y.useImperativeHandle(n,()=>({handleCollapseChangeFalse:c})),w.jsx("div",{className:xi["collapse-wrapper"],children:i?w.jsx(E.Button,{onClick:c,type:"link",icon:w.jsx(Ee.DownOutlined,{}),children:"展开"}):w.jsx(E.Button,{onClick:u,type:"link",icon:w.jsx(Ee.UpOutlined,{}),children:"折叠"})})}),$i={"group-wrapper":"_group-wrapper_g8zqi_1"},Ei=({formProps:e})=>{const{renderActions:t}=e;return w.jsx("div",{className:$i["group-wrapper"],children:t==null?void 0:t()})},Ai={"xph-form-action":"_xph-form-action_8ws73_1"},ji=(e,t)=>{console.log("render Form");const[r]=E.Form.useForm(),{formProps:n}=bi(e),{formItems:a}=ci({formProps:n}),s=y.useRef(new Map),{collapsible:i,collapseNum:u,collapseRef:c,onClickCollapseToFalse:l,onClickCollapseToTrue:d}=yi(n,s),{handleFormatRenderValues:h,handleFormatReturnValues:p}=mi(a,n,s),{setFieldsValue:S,getFieldsValue:g,resetFields:$,validator:j,scrollToField:L}=vi(r,h,p),M=()=>{const{layout:J,wrapperCol:X,labelCol:re,colon:I,disabled:T,labelWrap:A,labelAlign:P,scrollToFirstError:x,size:N}=n;return{layout:J,wrapperCol:X,labelCol:re,colon:I,disabled:T,labelWrap:A,labelAlign:P,scrollToFirstError:x,size:N}},K={setFieldsValue:S,getFieldsValue:g,resetFields:$,validator:j,scrollToField:L};return y.useImperativeHandle(t,()=>({...K})),y.useEffect(()=>(console.log("Form is mounted======================="),n.register&&n.register(K),()=>{console.log("Form is unmounted========================="),s.current.clear()}),[]),w.jsxs(E.Form,{form:r,...M(),children:[w.jsx(E.Row,{children:a.map((J,X)=>(s.current.has(J.name)||s.current.set(J.name,y.createRef()),w.jsx(Pi,{ref:s.current.get(J.name),itemIndex:X,itemProps:J,formProps:n,methods:K,collapseRef:c},X)))}),w.jsxs("div",{className:Ai["xph-form-action"],children:[w.jsx(Ei,{formProps:n}),i?w.jsx(Oi,{ref:c,collapsible:a.length>u,onClickExpand:l,onClickFold:d}):null]})]})},Dr=y.forwardRef(ji),Fi=y.forwardRef(({getBindProps:e},t)=>{const{formProps:r,setFormLoading:n}=e(),a=y.useRef(null);return y.useImperativeHandle(t,()=>({setFormLoading:n,...a.current})),w.jsx(Dr,{ref:a,...r})}),Di=y.memo(Fi),Ri=y.forwardRef((e,t)=>{const{renderActions:r,showSearch:n,tableRef:a}=e,[s,i]=y.useState(!1),u=y.useCallback(()=>{const{renderActions:p,...S}=e;return S},[]),c=()=>{const{reloadData:p}=a.current;p()},l=()=>{const{resetData:p}=a.current;p()},d=()=>w.jsxs("div",{style:{width:"100%",display:"flex"},children:[w.jsx("div",{style:{flex:1,width:0},children:r==null?void 0:r()}),n&&w.jsxs("div",{style:{display:"flex",gap:"8px"},children:[w.jsx(E.Button,{type:"primary",icon:w.jsx(Ee.SearchOutlined,{}),onClick:c,children:"搜索"}),w.jsx(E.Button,{icon:w.jsx(Ee.ReloadOutlined,{}),onClick:l,children:"重置"})]})]}),h=y.useCallback(()=>({setFormLoading:i,formProps:{...u(),renderActions:d}}),[]);return w.jsx(E.Spin,{spinning:s,children:w.jsx(Di,{ref:t,getBindProps:h})})});function Ii({searchForm:e}){return{searchFormRef:y.useRef(null),searchFormProps:e}}function Mi(e){return"cellFunc"in e}function ki(e){return"children"in e}const{useToken:Li}=E.theme,Ni=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:a}=t,{url:s,onClick:i}=n,{token:u}=Li(),c={color:u.colorLink,cursor:"pointer"},l=()=>{if(r.mainClick&&r.mainClick(),i){i();return}if(s){window.open(s,"_blank");return}};return w.jsx(e,{...r,mainClick:l,mainStyle:Object.assign(c,(r==null?void 0:r.mainStyle)||{})})},Ui={"cellfunc-actions":"_cellfunc-actions_14drt_1"},Rr={link:{Comp:Ni},actions:{Comp:(e,t,r)=>{const{curComponentProps:n,cellFuncProps:a}=t;return w.jsx("div",{className:Ui["cellfunc-actions"],children:w.jsx(Pt,{...n})})}}},Bi=(e,t)=>{const{renderPrams:{text:r}}=e;return w.jsx("span",{onClick:t==null?void 0:t.mainClick,style:t==null?void 0:t.mainStyle,children:r})},Wi=e=>{const{setExtendTableCellComp:t}=Mr();t(Rr);const{dslConfig:r}=e;let n=Bi.bind(null,e),a=0;for(;a<r.length;){const s=a++,i=Rr[r[s].component];i&&(n=i.Comp.bind(null,n,{curComponentProps:r[s].componentProps||{},cellFuncProps:e}))}return w.jsx(n,{})};function Ir(e){return e.map(t=>{let r={...t};if(Mi(r)){const{cellFunc:n,...a}=r;r={...a,render:(...s)=>{const i=oe(n),[u,c,l]=s,d={text:u,record:c,index:l},h=i?n(d):n;return w.jsx(Wi,{dslConfig:h,renderPrams:d})}}}return ki(r)&&r.children&&Array.isArray(r.children)&&(r.children=Ir(r.children)),r})}function Vi(e){const{columns:t}=e.table,r=Ir(t);return console.log(r),{columns:r}}const Yi=e=>{const{extendTableProps:t}=Mr();return{tableProps:{...Ae(Ae({table:{columns:[],fullHeight:!1,autoRequest:!0,pagination:{pageSize:20,total:0,showTotal:a=>`共:${a} 条`,current:1,pageSizeOptions:[10,20,50,100],showSizeChanger:!0,showQuickJumper:!0}},crudForm:{items:[]},searchForm:{showSearch:!0,items:[]}},t),e)}}};function zi(e){const{pagination:t,autoPagination:r}=e.table,[n,a]=y.useState(t),s=y.useRef(t),i=y.useMemo(()=>n&&(r===!0||r===void 0)||!1,[n]);return{pagination:{model:n,update:c=>{if(!s.current)return;const l={...s.current,...c};a(l),s.current=l},show:i},lastPaginationState:s}}function Hi(e,t){const{api:r,formatDataSource:n,autoPagination:a,onChange:s}=e.table,i=e.onPaginationChange,{pagination:u,lastPaginationState:c}=zi(e),[l,d]=y.useState({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),h=y.useRef({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),p={model:l,update:I=>{const T={...h.current,...I};d(T),h.current=T;const{setFormLoading:A}=t.current;A(T.loading)}},S=async()=>{y.useEffect(()=>{const{autoRequest:I}=e.table,{validator:T}=t.current;I&&T().then(A=>{L({searchFormParams:A})})},[])},g=async({searchFormParams:I,paginationParams:T})=>{const A={...I,current:c.current.current,pageSize:c.current.pageSize,...T};return r(A).then(P=>{const{data:x,current:N,total:z}=P;p.update({dataSource:n?n(x):x}),u.update({total:z,current:N})}).finally(()=>{p.update({loading:!1})})},$=async({searchFormParams:I,paginationParams:T})=>{const A={...I};return r(A).then(P=>{const x=n?n(P):P;p.update({selection:[],dataSource:x}),u.update({current:1,total:P.length})}).finally(()=>{p.update({loading:!1})})},j=async({searchFormParams:I,paginationParams:T})=>{var P;const A={...I};if(T){const{current:x,pageSize:N}=T;u.update({current:x,pageSize:N});const z=(x-1)*N,C=z+N,m=(P=h.current.backupsDataSource)==null?void 0:P.slice(z,C);return p.update({loading:!1,selection:[],dataSource:m})}else return r(A).then(x=>{let N=n?n(x):x;const z=[...N],C=0,m=C+c.current.pageSize;N=N.slice(C,m),p.update({selection:[],dataSource:N,backupsDataSource:z}),u.update({current:1,total:x.length})}).finally(()=>{p.update({loading:!1})})},L=async({searchFormParams:I,paginationParams:T})=>{if(p.update({loading:!0,selection:[]}),r)switch(!!c.current){case!0:return a===!0?j({searchFormParams:I,paginationParams:T}):a===!1?$({searchFormParams:I,paginationParams:T}):g({searchFormParams:I,paginationParams:T});case!1:return $({searchFormParams:I,paginationParams:T})}return p.update({loading:!1})};return{table:p,pagination:u,firstGetTableData:S,onPaginationChange:(I,T)=>{const{validator:A}=t.current;A().then(P=>{L({searchFormParams:P,paginationParams:{current:I,pageSize:T}})}),i&&i(I,T)},onAllChange:async(...I)=>{const[T,A,P,x]=I,N=[];for(let z=0;z<N.length&&!N[z]();z++);s&&s(A,P,x)},resetData:async()=>{const{resetFields:I,validator:T}=t.current;return I().then(async()=>{const A=await T();return L({searchFormParams:A})})},resetAllData:async()=>{const{resetFields:I,validator:T}=t.current;return I().then(async()=>{const A={};if(c.current){const{pageSize:P}=c.current;a===void 0&&(A.paginationParams={current:1,pageSize:P})}return A.searchFormParams=await T(),L(A)})},reloadData:async()=>{const{validator:I}=t.current;return I().then(T=>L({searchFormParams:T}))}}}const Gi=(e,t)=>{const{onRowSelectionChange:r}=e,{rowSelection:n}=e.table,a=()=>{if(Cr(n))return{type:n,onChange:(s,i,u)=>{t.update({selection:i}),r&&r(s,i)}};if(ue(n)){const{onChange:s}=n;return{...n,onChange:(i,u,c)=>{t.update({selection:u}),s&&s(i,u,c),r&&r(i,u)}}}return n};return{rowSelection:a(),getNewRowSelection:a}};function qi(e,t){const{scroll:r,virtual:n}=e.table,a=y.useRef(null),[s,i]=y.useState(0),[u,c]=y.useState(0);y.useEffect(()=>{const d=()=>{a.current&&(i(a.current.offsetWidth),c(a.current.offsetHeight))};d();const h=new ResizeObserver(d);return a.current&&h.observe(a.current),()=>{h&&a.current&&h.unobserve(a.current)}},[]);const l=y.useMemo(()=>t?n?{x:s,y:u-70,...r}:{x:"max-content",y:u-70,...r}:{x:"max-content",...r},[u]);return{divRef:a,scroll:l}}function Ki(e,t){const{toolbar:r}=e.table;return{getTopToolbarBindProps:()=>{if(oe(r)){const a=r({loading:t.model.loading,selection:t.model.selection});return{...a,disabled:t.model.loading||a.disabled}}return{...r,disabled:t.model.loading||(r==null?void 0:r.disabled)}}}}const Mr=()=>{const{extendProps:e,extendComp:t}=Ze(),r=n=>{const a=t==null?void 0:t.tableCellFunc;a&&Object.keys(a).forEach(s=>{const i=a[s];n[s]={Comp:i}})};return{extendTableProps:e==null?void 0:e.table,setExtendTableCellComp:r}},tt={"main-container":"_main-container_1yx5k_1",container__toolbar:"_container__toolbar_1yx5k_13",container__table:"_container__table_1yx5k_27",container__pagination:"_container__pagination_1yx5k_35"},Xi=y.forwardRef(({tableProps:e,searchFormRef:t,fullHeight:r},n)=>{const{columns:a}=Vi(e),s=y.useRef(null),{table:i,pagination:u,firstGetTableData:c,onPaginationChange:l,onAllChange:d,resetData:h,resetAllData:p,reloadData:S}=Hi(e,t),{rowSelection:g}=Gi(e,i),{divRef:$,scroll:j}=qi(e,r),{getTopToolbarBindProps:L}=Ki(e,i),M=()=>{const{autoRequest:K,api:J,formatDataSource:X,autoPagination:re,columns:I,scroll:T,pagination:A,rowSelection:P,onChange:x,...N}=e.table;return N};return c(),y.useImperativeHandle(n,()=>({resetData:h,resetAllData:p,reloadData:S,...s.current})),console.log("render Table"),w.jsxs("div",{className:r?tt["main-container"]:void 0,children:[w.jsx("div",{className:tt.container__toolbar,children:w.jsx(Pt,{...L()})}),w.jsx("div",{ref:$,className:r?tt.container__table:void 0,children:w.jsx(E.Table,{ref:s,...M(),loading:i.model.loading,columns:a,dataSource:i.model.dataSource,pagination:!1,rowSelection:g,scroll:j,onChange:d})}),u.show?w.jsx("div",{className:tt.container__pagination,children:w.jsx(E.Pagination,{disabled:i.model.loading,...u.model,onChange:l})}):null]})}),kr={"xph-table-full-wrapper":"_xph-table-full-wrapper_mdv0g_1","full-wrapper__table":"_full-wrapper__table_mdv0g_13"},Ji=(e,t)=>{const{tableProps:r}=Yi(e),n=y.useRef(null),{searchFormRef:a,searchFormProps:s}=Ii(r);let{fullHeight:i}=r.table;const{virtual:u}=r.table;return u&&(i=!0),y.useImperativeHandle(t,()=>({...n.current})),w.jsxs("div",{className:i?kr["xph-table-full-wrapper"]:void 0,children:[w.jsx("div",{children:w.jsx(Ri,{ref:a,tableRef:n,...s})}),w.jsx("div",{className:i?kr["full-wrapper__table"]:void 0,children:w.jsx(Xi,{ref:n,searchFormRef:a,fullHeight:i,tableProps:r})})]})},Zi=y.forwardRef(Ji);V.XphActions=Pt,V.XphDialog=Js,V.XphExtendCompPropsProvider=qs,V.XphForm=Dr,V.XphTable=Zi,V.buildUUID=st,V.useXphExtendCompProps=Ze,V.useXphForm=fi,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._form-item-force_1hsf3_1{flex-basis:100%;height:0}._form-item-hidden_1hsf3_9{display:none}._collapse-wrapper_ylm01_1{display:inline-block;margin-right:8px}._group-wrapper_g8zqi_1{display:flex;flex:1;width:0}._xph-form-action_8ws73_1{display:flex;align-items:center;gap:8px}._cellfunc-actions_14drt_1{display:flex;align-items:center;gap:4px;flex-wrap:wrap}._main-container_1yx5k_1{width:100%;height:100%;display:flex;flex-direction:column}._container__toolbar_1yx5k_13{display:flex;gap:8px;margin:4px 0;align-items:center;flex-wrap:wrap}._container__table_1yx5k_27{flex:1;height:0}._container__pagination_1yx5k_35{display:flex;justify-content:flex-end;align-items:center;margin-right:8px}._xph-table-full-wrapper_mdv0g_1{width:100%;height:100%;display:flex;flex-direction:column}._full-wrapper__table_mdv0g_13{flex:1;height:0}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as useActionsProps } from './useActionsProps';
|
|
2
|
+
export * from './useActionsProps';
|
|
3
|
+
export { default as useActionItems } from './useActionItems';
|
|
4
|
+
export * from './useActionItems';
|
|
5
|
+
export { default as useRenderContent } from './useRenderContent';
|
|
6
|
+
export * from './useRenderContent';
|
|
7
|
+
export { default as useExtendActions } from './useExtendActions';
|
|
8
|
+
export * from './useExtendActions';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ButtonProps, MenuProps } from 'antd';
|
|
2
|
+
|
|
3
|
+
export interface IBaseActionProps {
|
|
4
|
+
/** 唯一标识 */
|
|
5
|
+
key?: string;
|
|
6
|
+
}
|
|
7
|
+
export type TComponentType = {
|
|
8
|
+
Button: IButtonProps;
|
|
9
|
+
Dropdown: IDropdownProps;
|
|
10
|
+
};
|
|
11
|
+
interface IButtonProps extends ButtonProps {
|
|
12
|
+
}
|
|
13
|
+
interface IDropdownProps extends Omit<ButtonProps, "onClick"> {
|
|
14
|
+
dropDownItems: {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
/** 注意:父级如果disabled为true,子级无法展开(所以相当于是变向的父级禁用,子级也禁用了) */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
}[];
|
|
21
|
+
onClick: MenuProps["onClick"];
|
|
22
|
+
}
|
|
23
|
+
/** 组件类型 */
|
|
24
|
+
export interface IComponentActionProps<T extends keyof TComponentType> extends IBaseActionProps {
|
|
25
|
+
/** 组件 */
|
|
26
|
+
component: T;
|
|
27
|
+
/** 组件属性 */
|
|
28
|
+
componentProps?: TComponentType[T];
|
|
29
|
+
}
|
|
30
|
+
/** 自定义内容 */
|
|
31
|
+
export interface IRenderActionProps extends IBaseActionProps {
|
|
32
|
+
/** 自定义内容 */
|
|
33
|
+
render: React.ReactElement;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* 这个类型接受两个泛型参数 T 和 K。它使用了 TypeScript 中的映射类型,并从 T 中移除 K 对应的属性。这样做的结果是,返回的类型会继承 T,但移除了 K 对应的属性
|
|
38
|
+
*/
|
|
39
|
+
type Without<T, K> = {
|
|
40
|
+
[P in Exclude<keyof T, K>]?: never;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* 这个 `XOR` 类型的定义是一个 TypeScript 中的条件类型,用于实现对多个类型的互斥组合。现在,我会逐步解释这个类型的定义:
|
|
45
|
+
|
|
46
|
+
1. `T extends [infer A, infer B, ...infer Rest]`:这个条件判断首先检查泛型类型 `T` 是否是一个元组类型。如果是的话,它会将元组的第一个类型赋值给 `A`,第二个类型赋值给 `B`,并将剩余的类型赋值给 `Rest`。如果 `T` 不是元组类型,则跳到下一个条件。
|
|
47
|
+
|
|
48
|
+
2. `? A | B extends object`:在这个条件分支中,我们检查 `A` 或 `B` 是否为对象类型。如果至少有一个是对象类型,则进入这个条件分支,否则直接返回 `A | B`。
|
|
49
|
+
|
|
50
|
+
3. `| (Without<A, keyof B> & B) | (Without<B, keyof A> & A) | XOR<[A | B, ...Rest]>`:在这个部分中,我们处理了 `A` 和 `B` 的互斥性。如果 `A` 是对象类型,则返回一个交叉类型,其中包含了 `A` 中除去 `B` 中存在的属性之外的所有属性,并与 `B` 的类型相交。类似地,我们也处理了 `B` 的情况。然后,我们通过递归调用 `XOR` 类型处理剩余的类型 `Rest`,确保在同一时间只能使用其中一个类型。
|
|
51
|
+
|
|
52
|
+
4. `: T extends [infer A] ? A : never`:如果 `T` 只有一个元素,那么直接返回这个元素的类型 `A`。
|
|
53
|
+
|
|
54
|
+
5. `: never`:如果 `T` 不是一个元组,并且不止一个元素,则返回 `never` 类型,表示无法匹配任何类型。
|
|
55
|
+
|
|
56
|
+
综上所述,这个 `XOR` 类型的定义通过条件类型实现了对多个类型的互斥组合,并确保在同一时间只能使用其中一个类型。
|
|
57
|
+
*/
|
|
58
|
+
type XOR<T extends any[]> = T extends [infer A, infer B, ...infer Rest] ? A | B extends object ? (Without<A, keyof B> & B) | (Without<B, keyof A> & A) | XOR<[A | B, ...Rest]> : A | B : T extends [infer A] ? A : never;
|
|
59
|
+
export type TActionItemProps = XOR<[
|
|
60
|
+
IComponentActionProps<"Button">,
|
|
61
|
+
IComponentActionProps<"Dropdown">,
|
|
62
|
+
IRenderActionProps
|
|
63
|
+
]>;
|
|
64
|
+
/** 判断是哪种类型的action */
|
|
65
|
+
export declare function isComponentActionItemProps(item: TActionItemProps): item is IComponentActionProps<"Button">;
|
|
66
|
+
export declare function isRenderActionItemProps(item: TActionItemProps): item is IRenderActionProps;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TActionItemProps } from './actionItem';
|
|
2
|
+
import { ButtonProps } from 'antd/lib/button';
|
|
3
|
+
|
|
4
|
+
export interface IActionsProps {
|
|
5
|
+
/** 类型 */
|
|
6
|
+
type?: ButtonProps["type"];
|
|
7
|
+
/** 操作项 */
|
|
8
|
+
items?: TActionItemProps[];
|
|
9
|
+
/** 禁用(items中的componentProps的disabled优先级最高) */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** 自定义内容(items的优先级高于render) */
|
|
12
|
+
render?: React.ReactElement;
|
|
13
|
+
/** 超过多少个item自动省略,默认是10(其余全部放在一个dropdown中) */
|
|
14
|
+
max?: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as XphActions } from './actions/actions';
|
|
2
|
+
import { TActionItemProps as TXphActionItemProps, IActionsProps as IXphActionsProps } from './actions/types';
|
|
3
|
+
import { default as XphDialog } from './dialog/dialog';
|
|
4
|
+
|
|
5
|
+
export { XphActions, TXphActionItemProps, IXphActionsProps, XphDialog };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IExtendProps as IXphExtendProps, IExtendComponentProps as IXphExtendComponentProps, ExtendCompPropsProvider as XphExtendCompPropsProvider, useExtendCompProps as useXphExtendCompProps } from './useExtendCompProps';
|
|
2
|
+
|
|
3
|
+
export { IXphExtendProps, IXphExtendComponentProps, XphExtendCompPropsProvider, useXphExtendCompProps, };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IXphActionsProps } from '../componnets';
|
|
3
|
+
import { IXphFormProps } from '../../../form';
|
|
4
|
+
import { TXphTableProps } from '../../../table';
|
|
5
|
+
|
|
6
|
+
export interface IExtendProps {
|
|
7
|
+
/** 表单的属性 */
|
|
8
|
+
form?: IXphFormProps;
|
|
9
|
+
/** 表格的属性 */
|
|
10
|
+
table?: TXphTableProps;
|
|
11
|
+
/** 操作组的属性 */
|
|
12
|
+
actions?: IXphActionsProps;
|
|
13
|
+
}
|
|
14
|
+
export interface IExtendComp {
|
|
15
|
+
/** 扩展的表单项 */
|
|
16
|
+
form?: {
|
|
17
|
+
[key: string]: React.FC<any>;
|
|
18
|
+
};
|
|
19
|
+
/** 扩展单元格内容 */
|
|
20
|
+
tableCellFunc?: {
|
|
21
|
+
[key: string]: React.FC<any>;
|
|
22
|
+
};
|
|
23
|
+
/** 扩展actions项 */
|
|
24
|
+
actions?: {
|
|
25
|
+
[key: string]: React.FC<any>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface IExtendComponentProps {
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
value: {
|
|
31
|
+
/** 扩展的属性 */
|
|
32
|
+
extendProps?: IExtendProps;
|
|
33
|
+
/** 扩展的组件 */
|
|
34
|
+
extendComp?: IExtendComp;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export declare const ExtendCompPropsContext: React.Context<{
|
|
38
|
+
/** 扩展的属性 */
|
|
39
|
+
extendProps?: IExtendProps | undefined;
|
|
40
|
+
/** 扩展的组件 */
|
|
41
|
+
extendComp?: IExtendComp | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const ExtendCompPropsProvider: (props: IExtendComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
/** 提供给使用方来扩展xph的组件/给组件提供默认属性 */
|
|
45
|
+
export declare const useExtendCompProps: () => IExtendComponentProps["value"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildUUID(): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as XphForm } from './src/form';
|
|
2
|
+
import { IFormProps as IXphFormProps, IFormActionType as IXphFormActionType, TFormItemProps as TXphFormItemProps } from './src/types';
|
|
3
|
+
import { useForm as useXphForm } from './src/hooks';
|
|
4
|
+
|
|
5
|
+
export { XphForm, IXphFormProps, TXphFormItemProps, IXphFormActionType, useXphForm, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AutoCompleteProps } from 'antd';
|
|
3
|
+
|
|
4
|
+
export interface IApiAutoCompleteProps extends AutoCompleteProps {
|
|
5
|
+
/** 扩展api */
|
|
6
|
+
api?: (...args: any[]) => Promise<any>;
|
|
7
|
+
/** 扩展api的参数 */
|
|
8
|
+
params?: any;
|
|
9
|
+
/** 是否立即触发(默认立即触发,否者展开选项时触发) */
|
|
10
|
+
immediate?: boolean;
|
|
11
|
+
/** 是否启用了Form.useWatch监听('true' | 'false') */
|
|
12
|
+
isusewatch?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const ApiAutoComplete: React.FC<IApiAutoCompleteProps>;
|
|
15
|
+
export default ApiAutoComplete;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SelectProps } from 'antd';
|
|
3
|
+
|
|
4
|
+
export interface IApiSelectProps extends SelectProps {
|
|
5
|
+
/** 扩展api */
|
|
6
|
+
api?: (...args: any[]) => Promise<any>;
|
|
7
|
+
/** 扩展api的参数 */
|
|
8
|
+
params?: any;
|
|
9
|
+
/** 是否立即触发(默认立即触发,否者展开选项时触发) */
|
|
10
|
+
immediate?: boolean;
|
|
11
|
+
/** 是否启用了Form.useWatch监听('true' | 'false') */
|
|
12
|
+
isusewatch?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const ApiSelect: React.FC<IApiSelectProps>;
|
|
15
|
+
export default ApiSelect;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TransferProps } from 'antd';
|
|
3
|
+
|
|
4
|
+
export interface IApiTransferProps extends TransferProps {
|
|
5
|
+
/** 扩展api */
|
|
6
|
+
api?: (...args: any[]) => Promise<any>;
|
|
7
|
+
/** 扩展api的参数 */
|
|
8
|
+
params?: any;
|
|
9
|
+
/** 是否启用了Form.useWatch监听('true' | 'false') */
|
|
10
|
+
isusewatch?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const ApiTransfer: React.FC<IApiTransferProps>;
|
|
13
|
+
export default ApiTransfer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TreeSelectProps } from 'antd';
|
|
3
|
+
|
|
4
|
+
export interface IApiTreeSelectProps extends TreeSelectProps {
|
|
5
|
+
/** 扩展api */
|
|
6
|
+
api?: (...args: any[]) => Promise<any>;
|
|
7
|
+
/** 扩展api的参数 */
|
|
8
|
+
params?: any;
|
|
9
|
+
/** 是否立即触发(默认立即触发,否者展开选项时触发) */
|
|
10
|
+
immediate?: boolean;
|
|
11
|
+
/** 是否启用了Form.useWatch监听('true' | 'false') */
|
|
12
|
+
isusewatch?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const ApiTreeSelect: React.FC<IApiTreeSelectProps>;
|
|
15
|
+
export default ApiTreeSelect;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { UploadProps, UploadFile } from 'antd';
|
|
3
|
+
|
|
4
|
+
type IFileList = Array<UploadFile>;
|
|
5
|
+
declare const returnTypeMap: {
|
|
6
|
+
String: string;
|
|
7
|
+
"String[]": string;
|
|
8
|
+
"File[]": string;
|
|
9
|
+
FileList: string;
|
|
10
|
+
};
|
|
11
|
+
export interface IAutoUploadProps extends UploadProps {
|
|
12
|
+
/** 上传服务器的api,有api证明默认是上传服务器,否者默认返回File[] */
|
|
13
|
+
api?: (...args: any[]) => Promise<IFileList>;
|
|
14
|
+
/** 上传的最大数量 */
|
|
15
|
+
maxCount?: number;
|
|
16
|
+
/** 上传的最大大小,单位为M */
|
|
17
|
+
maxSize?: number;
|
|
18
|
+
/** 返回类型(也就是表单获取到的类型) */
|
|
19
|
+
returnType?: keyof typeof returnTypeMap;
|
|
20
|
+
/** 是否开启裁剪 */
|
|
21
|
+
openCrop?: boolean;
|
|
22
|
+
/** 改变表单值事件 */
|
|
23
|
+
onChange?: (...args: any[]) => void;
|
|
24
|
+
/** 默认文件列表(默认都是value字段) */
|
|
25
|
+
value: any;
|
|
26
|
+
}
|
|
27
|
+
declare const AutoUpload: React.FC<IAutoUploadProps>;
|
|
28
|
+
export default AutoUpload;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IFormProps, TFormItemProps, IFormActionType } from '../../types';
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const FormItem: import('react').ForwardRefExoticComponent<{
|
|
5
|
+
itemIndex: number;
|
|
6
|
+
itemProps: TFormItemProps;
|
|
7
|
+
methods: IFormActionType;
|
|
8
|
+
formProps: IFormProps;
|
|
9
|
+
collapseRef: RefObject<any>;
|
|
10
|
+
} & import('react').RefAttributes<unknown>>;
|
|
11
|
+
export default FormItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IFormProps, IFormActionType } from './types';
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const XphForm: (props: IFormProps, ref: ForwardedRef<IFormActionType>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const ForwardedXphForm: (props: IFormProps & {
|
|
6
|
+
ref?: ForwardedRef<IFormActionType>;
|
|
7
|
+
}) => ReturnType<typeof XphForm>;
|
|
8
|
+
export default ForwardedXphForm;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RuleObject } from 'antd/es/form';
|
|
2
|
+
import { TComponentPropsMap, TFormItemProps } from './types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description: 生成placeholder
|
|
6
|
+
*/
|
|
7
|
+
export declare function createPlaceholderMessage(component: keyof TComponentPropsMap): "" | "请输入" | "请选择";
|
|
8
|
+
export declare function setComponentRuleType(rule: RuleObject, component: keyof TComponentPropsMap, valueFormat: string): void;
|
|
9
|
+
/** 时间类型组件集合 */
|
|
10
|
+
export declare const dateComponents: string[];
|
|
11
|
+
/** 判断当前项是否需要监听表单的model值 */
|
|
12
|
+
export declare const isNeedWatchModel: (itemProps: TFormItemProps) => boolean;
|
|
13
|
+
/** 有些文件本地创建预览地址后由于编码问题会出现乱码,所以这里需对这些乱码的文件进行编码配置,让浏览器以正确的编码读文件 */
|
|
14
|
+
export declare const getFileEncodingType: (type: any) => any;
|