@flatbiz/antd 2.3.25 → 2.3.27
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/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/index.d.ts +7 -6
- package/package.json +2 -2
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
require('./index.css')
|
|
3
3
|
/*! @flatjs/forge MIT https://github.com/flatjs */
|
|
4
|
-
import{noop as e,getGlobalData as r,flatbizDate as t,isUndefinedOrNull as n,arrayField2LabelValue as a,valueIsEqual as i,treeToTiledArray as l,treeLeafParentsArray as o}from"@flatbiz/utils";import{isUndefined as u}from"@dimjs/lang/cjs/is-undefined";import{Space as s,Divider as c,Popconfirm as d,Button as f,DatePicker as v,Drawer as m,Form as p,Checkbox as h,Tag as g,Input as b,InputNumber as y,Radio as C,message as w,Select as N,Empty as L,Upload as x,Table as k,Tooltip as R,Modal as S,TreeSelect as q,Tree as T,Spin as I}from"antd";import{isArray as P}from"@dimjs/lang/cjs/is-array";import{Fragment as D,createElement as O,useMemo as A,useEffect as _,forwardRef as E,useRef as M,useState as B,useImperativeHandle as F,cloneElement as W,Children as K}from"react";import{jsx as j,jsxs as z,Fragment as Y}from"react/jsx-runtime";import{hooks as U}from"@wove/react/cjs/hooks";import G from"moment";import{Model as V}from"@dimjs/model-react";import{classNames as H}from"@dimjs/utils/cjs/class-names";import J from"@ant-design/icons/es/icons/SaveOutlined";import Q from"@ant-design/icons/es/icons/PlusOutlined";import{extend as X}from"@dimjs/utils/cjs/extend";import Z from"@ant-design/icons/es/icons/RedoOutlined";import{useEffectCustom as $}from"@flatbiz/antd";import{isBoolean as ee}from"@dimjs/lang/cjs/is-boolean";import{isNumber as re}from"@dimjs/lang/cjs/is-number";import{isString as te}from"@dimjs/lang/cjs/is-string";import ne from"@ant-design/icons/es/icons/DeleteOutlined";var ae=e;function ie(){ie=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t){if(Object.prototype.hasOwnProperty.call(t,n)){e[n]=t[n]}}}return e};return ie.apply(this,arguments)}function le(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var a,i;for(i=0;i<n.length;i++){a=n[i];if(r.indexOf(a)>=0)continue;t[a]=e[a]}return t}var oe=function e(){var t=r(),n=t.elemAclLimits;var a=P(n)?n:[];return a};var ue=function e(r){var t=oe();if(t.includes(r)){return true}return false};var se=function e(r){var t=oe();if(t.includes(r.name)){return j(D,{children:r.children})}return null};var ce=["text","color","onClick","permission","needConfirm","confirmMessage","hidden","style"];var de=function e(r){return j("div",{className:"table-operate",children:j(s,{split:j(c,{type:"vertical"}),size:r.size,wrap:u(r.wrap)?true:r.wrap,children:r.operateList.map((function(e,r){if(!e)return null;var t=e.text,n=e.color,a=e.onClick,i=e.permission,l=e.needConfirm,o=e.confirmMessage,u=e.hidden,s=e.style,c=le(e,ce);if(u)return null;if(i&&!ue(i))return null;var v=n?ie({color:n},s):s;var m=e.type||"link";if(l){return j(d,{title:o,okText:"确定",cancelText:"取消",onConfirm:a,arrowPointAtCenter:true,children:j(f,ie({},c,{onClick:undefined,type:m,danger:true,style:v,children:t}))},r)}return O(f,ie({},c,{type:m,style:v,key:r,onClick:a}),t)}))})})};de.defaultProps={size:0};var fe=["value","onChange","style"];var ve=function e(r){var n=r.value,a=r.onChange,i=r.style,l=le(r,fe);var o=A((function(){if(r.format)return r.format;if(r.showTime)return"YYYY-MM-DD HH:mm:ss";return"YYYY-MM-DD"}),[r.showTime,r.format]);var u=U.useCallbackRef((function(e){if(e){a==null?void 0:a(G(e).format(o))}else{a==null?void 0:a(undefined)}}));var s=n&&t.isDate(n)?G(new Date(n)):undefined;return j(v,ie({},l,{style:ie({width:"100%"},i),value:s,onChange:u}))};var me=["value","onChange","style"];var pe=function e(r){var n=r.value,a=r.onChange,i=r.style,l=le(r,me);var o=A((function(){if(r.format)return r.format;if(r.showTime===true)return"YYYY-MM-DD HH:mm:ss";return"YYYY-MM-DD"}),[r.showTime,r.format]);var u=U.useCallbackRef((function(e){if(e){var r=e||[],t=r[0],n=r[1];a==null?void 0:a([G(t).format(o),G(n).format(o)])}else{a==null?void 0:a(undefined)}}));var s=n||[],c=s[0],d=s[1];var f=c&&d&&t.isDate(c)&&t.isDate(d)?[G(new Date(c)),G(new Date(d))]:undefined;return j(v.RangePicker,ie({},l,{style:ie({width:"100%"},i),value:f,onChange:u}))};var he={actions:{openDrawerForm:function e(r){var t=r.itemData,n=r.title,a=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=n;e.operateType=a;e.pageLoading=i;e.visible=true}},closeDrawer:function e(){return function(e){e.visible=false}},setDrawerItemData:function e(r){return function(e){e.pageLoading=false;e.itemData=r}}},state:{visible:false,title:"",operateType:null}};var ge=function e(r){return j("div",{className:"fixed-bottom-block",children:z(s,{size:"middle",children:[j(f,ie({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&j(f,ie({type:"primary",icon:j(J,{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var be=["pageLoading","className","width","children","footer","operationProps"];var ye=function e(){return j("div",{className:"drawer-wraper-loader",children:z("div",{className:"loader-wrapper",children:[j("div",{className:"loader-inner"}),j("div",{className:"loader-text",children:"LOADING"})]})})};var Ce=function e(r){var t=r.pageLoading,n=r.className,a=r.width,i=a===void 0?600:a,l=r.children,o=r.footer,u=r.operationProps,s=le(r,be);_((function(){console.error("@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整")}),[]);return z(m,ie({className:H("drawer-wraper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:i},size:"default"},s,{footer:o||o===null?o:j(ge,ie({},u)),children:[j("div",{className:"drawer-wraper-content",children:l}),t&&j(ye,{})]}))};var we={};var Ne=function e(r){if(!we[r]){we[r]=V(he)}return we[r]};var Le={actions:{openDrawerForm:function e(r){var t=r.itemData,n=r.title,a=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=n;e.operateType=a;e.pageLoading=i;e.visible=true}},closeDrawer:function e(){return function(e){e.visible=false}},setDrawerItemData:function e(r){return function(e){e.pageLoading=false;e.itemData=r}}},state:{visible:false,title:"",operateType:null}};var xe=function e(r,t){return _(r,t)};var ke=function e(r,t){_((function(){function e(){return new Promise((function(e,t){return Promise.resolve(r()).then((function(r){try{return e()}catch(e){return t(e)}}),t)}))}void e()}),t)};var Re=function e(r){return j("div",{className:"fixed-bottom-block",children:z(s,{size:"middle",children:[j(f,ie({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&j(f,ie({type:"primary",icon:j(J,{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var Se=["pageLoading","className","width","children"];var qe=function e(){return j("div",{className:"drawer-wrapper-loader",children:z("div",{className:"loader-wrapper",children:[j("div",{className:"loader-inner"}),j("div",{className:"loader-text",children:"LOADING"})]})})};var Te=function e(r){return z(D,{children:[j("div",{className:"drawer-wrapper-content",children:r.children}),r.operationProps?j(Ie,{children:j(Re,ie({},r.operationProps))}):null]})};var Ie=function e(r){return j("div",{className:"drawer-wrapper-footer",children:r.children})};var Pe=function e(r){var t=r.pageLoading,n=r.className,a=r.width,i=a===void 0?600:a,l=r.children,o=le(r,Se);xe((function(){if(r["operationProps"]){throw new Error("DrawerWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return z(m,ie({className:H("drawer-wrapper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:i},size:"default"},o,{footer:null,children:[t&&j(qe,{}),l]}))};Pe.Content=Te;Pe.Footer=Ie;var De={};var Oe=function e(r){if(!De[r]){De[r]=V(Le)}return De[r]};var Ae=function e(r,t){return typeof r==="boolean"?r:r==null?void 0:r({tableRowIndex:t})};var _e=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=A((function(){if(a)return[];var e=P(r.value)?r.value:[];var t=l.options||[];if(!P(t)||t.length===0){return e.map((function(e){return{label:e,value:e}}))}var n=[];e.forEach((function(e){var r=t.find((function(r){return r.value===e}));n.push(r?r:{label:e,value:e})}));return n}),[a,l.options,r.value]);if(a){return j(h.Group,ie({},l,{value:r.value,onChange:r.onChange}))}return j("span",{className:"editable-checkbox-group-view",children:i?i(r.value):o.map((function(e,r){return j(g,{color:"#1890ff",children:e.label},r)}))})};var Ee=function e(r){var t=r.fieldConfig.formItemProps;return j(p.Item,ie({},t,{name:r.name,className:H("editable-checkbox-group-form-item",t==null?void 0:t.className),children:j(_e,ie({},r))}))};var Me=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return j(p.Item,ie({},n,{name:r.name,className:H("editable-date-picker-wraper-form-item",n==null?void 0:n.className),children:j(ve,ie({},a.editableComptProps))}))};var Be=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=A((function(){var e=P(r.value)?r.value:[];if(a)return undefined;return e.join("~")}),[a,r.value]);if(a){return j(pe,ie({},l,{value:r.value,onChange:r.onChange}))}return j("span",{className:"editable-date-range-picker-view",children:i?i(r.value):o})};var Fe=function e(r){var t=r.fieldConfig.formItemProps;return j(p.Item,ie({},t,{name:r.name,className:H("editable-date-range-picker-wraper-form-item",t==null?void 0:t.className),children:j(Be,ie({},r))}))};var We=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return j(p.Item,ie({},n,{name:r.name,children:j(b,ie({},a.editableComptProps))}))};var Ke=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return j(p.Item,ie({},n,{name:r.name,className:H("editable-input-number-form-item",n==null?void 0:n.className),children:j(y,ie({},a.editableComptProps))}))};var je=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=A((function(){if(a)return[];var e=r.value;var t=l.options||[];if(!P(t)||t.length===0){return e}var n=t.find((function(r){return r.value===e}));return(n==null?void 0:n.label)||e}),[a,l.options,r.value]);var u=U.useCallbackRef((function(e){r.onChange==null?void 0:r.onChange(e.target.value)}));if(a){return j(C.Group,ie({},l,{value:r.value,onChange:u}))}return j("span",{className:"editable-radio-group-view",children:i?i(r.value):o?j(g,{color:"#1890ff",children:o}):null})};var ze=function e(r){var t=r.fieldConfig.formItemProps;return j(p.Item,ie({},t,{name:r.name,className:H("editable-radio-group-form-item",t==null?void 0:t.className),children:j(je,ie({},r))}))};var Ye={selectorList:[],queryIsEmpty:false,requestStatus:"init"};var Ue={actions:{setSelectBoxList:function e(r){return function(e){e.selectorList=r||[];e.requestStatus="request-success"}},resetSelectBoxList:function e(){return function(e){e.selectorList=[]}},changeRequestStatus:function e(r){return function(e){e.requestStatus=r}}},state:Ye};var Ge={};var Ve=function e(r){if(!Ge[r]){Ge[r]=V(Ue)}return Ge[r]};var He=["serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","operateType","searchFieldName","selectorList","modelKey","fieldNames"];var Je=E((function(e,r){var t=e.serviceConfig,l=e.showAllOption,o=e.effectDependencyList,u=e.onSelectorListChange,s=e.operateType,c=e.searchFieldName,d=e.selectorList,f=e.modelKey,v=e.fieldNames,m=le(e,He);var p=s==="search"&&d===undefined;var h=t||{};var g=o||[];var b=M();var y=B(false),C=y[0],L=y[1];var x=Ve(f).useStore(),k=x[0],R=x[1];var S=function e(r){return r===""||n(r)};var q=function e(r){var t=h.onRequestResultAdapter?h.onRequestResultAdapter(r):r;return a(t||[],v)};var T=U.useCallbackRef((function(e,r){return new Promise((function(t,a){var i,l,o,s,d,f;var v=function(){try{return t()}catch(e){return a(e)}};var m=function(e){try{L(false);void w.error(e.message||"数据查询异常...");return v()}catch(e){return a(e)}};try{if(!h.onRequest){throw new Error("onRequest 调用接口服务不能为空")}i=h.requiredParamsKeys;l=X({},h.params);if(i){o=i.find((function(e){return S(l[e])}));if(o){console.warn("SelectorWrapper组件:参数:"+i.join("、")+"不能为空");return t()}}var g=function(){try{return v()}catch(e){return m(e)}};var b=function(e){try{console.error(e);L(false);void R.changeRequestStatus("request-error");void w.error(e.message||"获取数据异常");return g()}catch(e){return m(e)}};try{L(true);void R.changeRequestStatus("request-pre");if((!n(e)||!n(r))&&p){s=c||"keyword";l[s]=e;l["id"]=r}return Promise.resolve(h.onRequest==null?void 0:h.onRequest(l)).then((function(e){try{d=e;f=q(d);L(false);u==null?void 0:u(f);void R.setSelectBoxList(f);return g()}catch(e){return b(e)}}),b)}catch(e){b(e)}}catch(e){m(e)}}))}));$((function(){if(d){void R.setSelectBoxList(a(d||[],v));return}if(p)return;var e=Ve(f).getState();if(g.length>0||i(e.requestStatus,["request-error","init"])){void T()}}),g);$((function(){if(p){if(S(e.value)){u==null?void 0:u([]);void R.resetSelectBoxList()}else{if(e.value!==b.current){void T(undefined,e.value)}}}}),g.concat([e.value]));F(r,(function(){return{onClearSelectorList:function e(){void R.resetSelectBoxList()},getSelectorList:function e(){return k.selectorList}}}));var I=U.useCallbackRef((function(e,r){return(r==null?void 0:r.children).toLowerCase().indexOf(e.toLowerCase())>=0}));var P=U.useDebounceCallback((function(e){if(e){void T(e)}else{void R.resetSelectBoxList()}}),300);var D=U.useCallbackRef((function(r){b.current=r;for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++){n[a-1]=arguments[a]}e.onChange==null?void 0:e.onChange(r,n)}));var O=U.useCallbackRef((function(){void T()}));var A=j(N.Option,{value:"",children:"全部"});return z(N,ie({showSearch:true,allowClear:true},m,{value:n(e.value)?undefined:e.value,notFoundContent:j(Qe,{requestStatus:k.requestStatus,onAgainRequest:O}),loading:C,onSearch:p?P:undefined,filterOption:p?false:I,onChange:D,fieldNames:undefined,suffixIcon:k.requestStatus==="request-error"?j(Z,{spin:C,onClick:O}):undefined,children:[l===true?A:l,k.selectorList.map((function(r){return j(N.Option,{value:r.value,label:r.label,children:e.onLabelRenderAdapter?e.onLabelRenderAdapter(r):r.label},r.value)}))]}))}));var Qe=function e(r){var t=A((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return j(L,{image:L.PRESENTED_IMAGE_SIMPLE,description:t,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&j(f,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var Xe=function e(r){var t=r.fieldConfig,n=t.editableConfig,i=t.editable,l=t.render;var o=n.editableComptProps;var u=A((function(){var e=P(r.value)?r.value:[];if(i)return[];var t=a(o.selectorList||[],o.fieldNames);if(t.length===0){return e.map((function(e){return{label:e,value:e}}))}var n=[];e.forEach((function(e){var r=t.find((function(r){return r.value===e}));n.push(r?r:{label:e,value:e})}));return n}),[i,o.fieldNames,o.selectorList,r.value]);if(i){return j(Je,ie({},o,{value:r.value,onChange:r.onChange}))}return j("span",{className:"editable-selector-view",children:l?l(r.value):u.map((function(e,r){return j(g,{color:"#1890ff",children:e.label},r)}))})};var Ze=function e(r){var t=r.fieldConfig.formItemProps;return j(p.Item,ie({},t,{name:r.name,className:H("editable-selector-wrapper-form-item",t==null?void 0:t.className),children:j(Xe,ie({},r))}))};var $e=function e(r){var t,n;var a=A((function(){var e;if((e=r.fieldConfig)!=null&&e.render)return undefined;var t=te(r.value)||re(r.value)||ee(r.value)||!r.value;if(!t){console.warn("Form.List name:【"+r.name+"】数据【"+JSON.stringify(r.value)+"】不能渲染在页面中")}return t?r.value:undefined}),[(t=r.fieldConfig)==null?void 0:t.render,r.name,r.value]);return j("span",{className:"editable-text-view",children:((n=r.fieldConfig)==null?void 0:n.render==null?void 0:n.render(r.value))||a})};var er=function e(r){return j(p.Item,{noStyle:true,name:r.name,children:j($e,{name:r.name,fieldConfig:r.fieldConfig})})};var rr=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return j(p.Item,ie({},n,{name:r.name,children:j(b.TextArea,ie({},a.editableComptProps))}))};var tr=["onChange","onUploadError","value"];var nr=function e(r){var t=r.onChange,n=r.onUploadError,a=r.value,i=le(r,tr);var l=B(),o=l[0],u=l[1];var s=X({uid:"uid",name:"name",url:"url"},r.fieldNames);xe((function(){u(a==null?void 0:a.map((function(e){return{uid:e[s.uid],name:e[s.name],url:e[s.url]}})))}),[s.name,s.uid,s.url,a]);var c=U.useCallbackRef((function(e){var i=e.fileList;if(e.file.status==="done"){var l=e.file.response;if(l.code==="0000"){var o=r.onRequestResultAdapter?r.onRequestResultAdapter(l.data):l.data;o[s.uid]=o[s.uid]||e.file.uid;o[s.name]=o[s.name]||e.file.name;if(r.maxCount===1){t==null?void 0:t([o])}else{t==null?void 0:t((a||[]).concat(o))}}else{if(n){n(l.message)}else{void w.error(l.message||"上传操作失败...")}i[i.length-1]=ie({},i[i.length-1],{status:"error"})}}else if(e.file.status==="removed"){var c=e.file.uid;var d=a!==undefined?[].concat(a):[];var f=d.findIndex((function(e){var r=e[s.uid];return r===c}));if(f>=0){d.splice(f,1)}t==null?void 0:t(d)}else if(e.file.status==="error"){if(n){n()}else{void w.error("上传操作失败...")}}u([].concat(i));r.onUploadChange==null?void 0:r.onUploadChange(e)}));return j(x,ie({},i,{onChange:c,fileList:o,className:H("v-upload-wrapper",i.className),children:i.disabled?null:j(ar,{listType:i.listType,children:r.children})}))};var ar=function e(r){if(r.children)return j(D,{children:r.children});if(r.listType==="picture-card"){return z("div",{children:[j(Q,{}),j("div",{style:{marginTop:8},children:"上传图片"})]})}if(r.listType==="picture"){return j(f,{type:"primary",ghost:true,children:"选择图片上传"})}return j(f,{type:"primary",ghost:true,children:"选择文件上传"})};var ir=["children"];var lr=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.render,i=t.editable;var l=n.editableComptProps,o=l.children,u=le(l,ir);if(i){return j(nr,ie({listType:"text"},u,{value:r.value,onChange:r.onChange,children:o}))}return j("div",{className:"upload-wrapper-selector-view",children:a?a(r.value):j(nr,ie({listType:"text"},u,{value:r.value,disabled:true}))})};var or=function e(r){var t=r.fieldConfig.formItemProps;return j(p.Item,ie({},t,{name:r.name,className:H("editable-upload-wrapper-form-item",t==null?void 0:t.className),children:j(lr,ie({},r))}))};var ur=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable;var i=Ae(a,r.tableRowIndex);var l=X({},r.fieldConfig,{editable:i});var o={name:r.name,fieldConfig:l};if((n==null?void 0:n.type)==="input"&&i){return j(We,ie({},o))}else if((n==null?void 0:n.type)==="inputNumber"&&i){return j(Ke,ie({},o))}else if((n==null?void 0:n.type)==="textArea"&&i){return j(rr,ie({},o))}else if((n==null?void 0:n.type)==="datePickerWrapper"&&i){return j(Me,ie({},o))}else if((n==null?void 0:n.type)==="dateRangePickerWrapper"){return j(Fe,ie({},o))}else if((n==null?void 0:n.type)==="selectorWrapper"){return j(Ze,ie({},o))}else if((n==null?void 0:n.type)==="checkboxGroup"){return j(Ee,ie({},o))}else if((n==null?void 0:n.type)==="radioGroup"){return j(ze,ie({},o))}else if((n==null?void 0:n.type)==="uploadWrapper"){return j(or,ie({},o))}else if((n==null?void 0:n.type)==="custom"){return n.editableComptProps({name:r.name,editable:i,completeName:r.completeName})}return j(er,ie({},o))};var sr=function e(r){var t=p.useFormInstance();var n=r.formListConfig,a=n.onFormListBeforeRender,i=n.editableConfigList,l=n.onFormListAfterRender,o=n.onFormListItemBeforeRender,u=n.onFormListItemAfterRender,c=n.deleteOperateRender;return j(p.List,{name:r.name,children:function e(n,d){var f=d.add,v=d.remove;return z(Y,{children:[a?a({tableRowIndex:r.tableRowIndex,add:f,get value(){return t.getFieldValue(r.completeName)}}):null,n.map((function(e,n){var a=i.find((function(e){return Ae(e.editable,r.tableRowIndex)}));var l=H("editable-inner-formlist-item","editable-inner-formlist-item-"+r.name[1],{"editable-inner-formlist-item_preview":!a});return z("div",{className:l,children:[o?o({add:f,remove:function e(){v(n)},formListItemIndex:n,tableRowIndex:r.tableRowIndex,get value(){return t.getFieldValue([].concat(r.completeName,[e.name]))}}):null,z(s,{children:[i.map((function(t,n){return j(ur,{name:[e.name,t.fieldName],fieldConfig:t,tableRowIndex:r.tableRowIndex,completeName:[].concat(r.completeName,[e.name])},n)})),a?j(cr,{deleteOperateRender:c,remove:function e(){v(n)},index:n}):null]}),u?u({add:f,formListItemIndex:n,tableRowIndex:r.tableRowIndex,remove:function e(){v(n)},get value(){return t.getFieldValue([].concat(r.completeName,[e.name]))}}):null]},n)})),l?l({tableRowIndex:r.tableRowIndex,add:f,get value(){return t.getFieldValue(r.completeName)}}):null]})}})};var cr=function e(r){return j(p.Item,{children:r.deleteOperateRender?r.deleteOperateRender({remove:r.remove,formListItemIndex:r.index}):j(f,{type:"link",danger:true,icon:j(ne,{}),onClick:r.remove,children:"删除"})})};var dr=function e(r){if(r.fieldConfig){if(P(r.fieldConfig["editableConfigList"])){var t=r.fieldConfig;return j(sr,{name:r.name,completeName:r.completeName,formListConfig:t,tableRowIndex:r.tableRowIndex})}else{return j(ur,{name:r.name,fieldConfig:r.fieldConfig,tableRowIndex:r.tableRowIndex,completeName:r.completeName})}}return j(er,{name:r.name})};var fr=["fieldConfig","operateRender"];var vr=function e(r){var t;var n=A((function(){if(!r.columns)return[];return r.columns.map((function(e){var t=e.fieldConfig,n=e.operateRender,a=le(e,fr);return ie({onCell:function e(){var t;return{valign:((t=r.tableProps)==null?void 0:t.cellVerticalAlign)||"middle"}}},a,{render:function a(i,l){if(n){return n({name:[].concat(r.name,[l.name]),tableRowIndex:l.name,operation:l.operation})||""}return j(dr,{name:e.dataIndex?[l.name,e.dataIndex]:[l.name],completeName:e.dataIndex?[].concat(r.name,[l.name,e.dataIndex]):[].concat(r.name,[l.name]),fieldConfig:t,tableRowIndex:l.name})}})}))}),[r.columns,r.name,(t=r.tableProps)==null?void 0:t.cellVerticalAlign]);return j("div",{className:"editable-table",children:j(p.List,{name:r.name,rules:r.rules,children:function e(t,a){return z(D,{children:[r.onTableBeforeRender?r.onTableBeforeRender(a,t.length):null,j(k,ie({scroll:{x:"max-content"},pagination:false},r.tableProps,{dataSource:t.map((function(e){return ie({},e,{operation:a})})),columns:n,rowKey:"key"})),r.onTableAfterRender?r.onTableAfterRender(a,t.length):j(f,{type:"dashed",onClick:function e(){return a.add()},block:true,icon:j(Q,{}),style:{marginTop:15},children:"新增"})]})}})})};var mr=["onImportFinish"];var pr=function e(r){var t=r.onImportFinish,n=le(r,mr);var a=B(false),i=a[0],l=a[1];var o=U.useCallbackRef((function(e){if(e.file.status==="uploading"){l(true)}else if(e.file.status==="done"){l(false);var r=e.file.response;if(r.code==="0000"){t(r.data)}else{void w.error(r.message||"文件导入异常...")}}}));return j(x,ie({showUploadList:false,maxCount:1},n,{onChange:o,children:r.children?r.children:j(f,{type:"primary",ghost:true,loading:i,children:"选择文件"})}))};pr.defaultProps={name:"file",accept:".xlsx,.xls"};var hr=["onChange","onUploadError","onPreview","value"];var gr=function e(r){xe((function(){console.error("@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换")}),[]);var t=r.onChange,n=r.onUploadError,a=r.onPreview,i=r.value,l=le(r,hr);var o=B([]),u=o[0],s=o[1];var c=X({fileKey:"fileKey",fileName:"fileName"},r.fieldNames);_((function(){if(i&&P(i)){s(i.map((function(e){return{uid:e["uid"]||e[c.fileKey],name:e[c.fileName],fileKey:e[c.fileKey],url:e[c.fileKey],thumbUrl:e[c.fileKey]}})))}}),[c.fileKey,c.fileName,i]);var d=U.useCallbackRef((function(e){if(e.file.status==="done"){var a=e.file.response;if(a.code==="0000"){var l=a.data||{};var o={uid:e.file.uid,fileName:l[c.fileName]||e.file.name,fileKey:l[c.fileKey]};var u=(i||[]).concat(o);t==null?void 0:t(u)}else{n==null?void 0:n(a.message)}}else if(e.file.status==="removed"){var d=e.file.uid;var f=i!==undefined?[].concat(i):[];var v=f.findIndex((function(e){var r=e["uid"]||e[c.fileKey];return r===d}));if(v>=0){f.splice(v,1)}t==null?void 0:t(f)}else if(e.file.status==="error"){n==null?void 0:n()}s([].concat(e.fileList));r.onUploadChange==null?void 0:r.onUploadChange(e)}));var f=U.useCallbackRef((function(e){a==null?void 0:a({fileKey:e[c.fileKey],fileName:e[c.fileName]})}));return j(x,ie({},l,{onChange:d,onPreview:f,fileList:u,className:H("v-file-upload",l.className),children:r.children}))};var br=function e(r){var t=P(r.children)?r.children:[r.children];var a=r.direction||"vertical";var i=r.gap?r.gap:0;var l=!n(r.fullIndex)?P(r.fullIndex)?r.fullIndex:[r.fullIndex]:[];return j("div",{className:H("v-flex-layout","v-flex-"+a,r.className),style:r.style,onClick:r.onClick,children:t.map((function(e,r){var n=e.props.style||{};var o=l.includes(r)?ie({flex:1},n):n;if(r<t.length-1&&i>0){if(a==="horizontal"){o.marginRight=i}else{o.marginBottom=i}}return W(e,{style:o,key:r})}))})};var yr=function e(r){return j("div",{style:ie({height:r.height},r.style),className:r.className})};var Cr=function e(r){return j(R,{title:r.hoverTips,children:z("div",{className:H("icon-wrapper","icon-wrapper-"+(r.size||"middle"),r.className),style:r.style,children:[r.icon,r.text?j("span",{className:"icon-wrapper-text",children:r.text}):null]})})};var wr={actions:{openModalForm:function e(r){var t=r.itemData,n=r.title,a=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=n;e.operateType=a;e.pageLoading=i;e.visible=true}},closeModal:function e(){return function(e){e.visible=false}},setModalItemData:function e(r){return function(e){e.pageLoading=false;e.itemData=r}}},state:{visible:false,title:"",operateType:"view"}};var Nr=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Lr=function e(r){var t=r.loading,n=r.okText,a=n===void 0?"保存":n,i=r.cancelText,l=i===void 0?"取消":i,o=r.onCancel,u=r.onOk,c=r.hideOkBtn,d=le(r,Nr);return j(D,{children:z(s,{size:"middle",children:[j(f,ie({},d.cancelButtonProps,{className:"cancel-btn",onClick:o,children:l})),c!=true&&j(f,ie({type:"primary"},d.okButtonProps,{className:"ok-btn",onClick:u,loading:t,children:a}))]})})};var xr=["pageLoading","className","width","children","footer","operationProps"];var kr=function e(){return j("div",{className:"modal-wraper-loader",children:z("div",{className:"loader-wrapper",children:[j("div",{className:"loader-inner"}),j("div",{className:"loader-text",children:"LOADING"})]})})};var Rr=function e(r){var t=r.pageLoading,n=r.className,a=r.width,i=r.children,l=r.footer,o=r.operationProps,u=le(r,xr);_((function(){console.error("@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整")}),[]);return z(S,ie({className:H("modal-wraper",n),keyboard:false,forceRender:false,destroyOnClose:true},u,{width:a||600,footer:null,children:[z("div",{className:"modal-wraper-content",children:[i,t&&j(kr,{})]}),l!==null&&j("div",{className:"modal-wraper-content-footer",children:l?l:j(Lr,ie({},o))})]}))};var Sr={};var qr=function e(r){if(!Sr[r]){Sr[r]=V(wr)}return Sr[r]};var Tr={actions:{openModalForm:function e(r){var t=r.itemData,n=r.title,a=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=n;e.operateType=a;e.pageLoading=i;e.visible=true}},closeModal:function e(){return function(e){e.visible=false}},setModalItemData:function e(r){return function(e){e.pageLoading=false;e.itemData=r}}},state:{visible:false,title:"",operateType:"view"}};var Ir=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Pr=function e(r){var t=r.loading,n=r.okText,a=n===void 0?"保存":n,i=r.cancelText,l=i===void 0?"取消":i,o=r.onCancel,u=r.onOk,c=r.hideOkBtn,d=le(r,Ir);return j(D,{children:z(s,{size:"middle",children:[j(f,ie({},d.cancelButtonProps,{className:"cancel-btn",onClick:o,children:l})),c!=true&&j(f,ie({type:"primary"},d.okButtonProps,{className:"ok-btn",onClick:u,loading:t,children:a}))]})})};var Dr=["pageLoading","className","width","children"];var Or=function e(){return j("div",{className:"modal-wrapper-loader",children:z("div",{className:"loader-wrapper",children:[j("div",{className:"loader-inner"}),j("div",{className:"loader-text",children:"LOADING"})]})})};var Ar=function e(r){return z(D,{children:[j("div",{className:"modal-wrapper-content",children:r.children}),r.operationProps?j(_r,{children:j(Pr,ie({},r.operationProps))}):null]})};var _r=function e(r){return j("div",{className:"modal-wrapper-footer",children:r.children})};var Er=function e(r){var t=r.pageLoading,n=r.className,a=r.width,i=r.children,l=le(r,Dr);xe((function(){if(r["operationProps"]){throw new Error("ModalWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return z(S,ie({className:H("modal-wrapper",n),keyboard:false,forceRender:true,destroyOnClose:true},l,{width:a||600,footer:null,children:[i,t&&j(Or,{})]}))};Er.Content=Ar;Er.Footer=_r;var Mr={};var Br=function e(r){if(!Mr[r]){Mr[r]=V(Tr)}return Mr[r]};var Fr=function e(r){return j("div",{className:H("page-fixed-footer",r.className),style:r.style,children:r.children})};var Wr=function e(){return j("div",{className:"v-404",children:"404"})};var Kr={label_width_70:"form-label-70",label_width_80:"form-label-80",label_width_90:"form-label-90",label_width_100:"form-label-100",label_width_110:"form-label-110",label_width_120:"form-label-120",label_width_130:"form-label-130",label_width_auto:"form-label-auto"};var jr={label_width_70:"form-item-label-70",label_width_80:"form-item-label-80",label_width_90:"form-item-label-90",label_width_100:"form-item-label-100",label_width_110:"form-item-label-110",label_width_120:"form-item-label-120",label_width_130:"form-item-label-130",label_width_auto:"form-item-label-auto"};var zr={form:Kr,formItem:jr};var Yr=function e(r){var t=r.formLabelAlign||"right";var n=H("simple-layout",{"simple-layout-tight":r.layoutType==="tight","simple-layout-formlabel-left":t==="left"},r.className);var a=H("simple-layout-title",{"simple-layout-title-sign":r.titleLeftLine});return z("div",{className:n,style:r.style,children:[r.title?j("div",{className:a,children:r.title}):null,r.desc?j("div",{className:"simple-layout-desc",children:r.desc}):null,r.children?j("div",{className:"simple-layout-content",children:r.children}):null]})};Yr.defaultProps={titleLeftLine:true,layoutType:"layer"};var Ur=function e(r){var t=B(),n=t[0],a=t[1];var i=B(false),l=i[0],o=i[1];var u=B(false),s=u[0],c=u[1];var d=A((function(){return{sendTxt:r.sendTxt,sentTxt:r.sentTxt,processingTxt:r.processingTxt,format:r.format,autoStart:r.autoStart,totalTicks:r.totalTicks,duration:r.duration}}),[]);var f=d.format;var v=d.totalTicks;var m=d.duration;var p=U.useCountdownCallback((function(e){var t=e/1e3;if(e>0){if(!l){o(true)}a(f.replace("{t}",String(t)));r.onTick==null?void 0:r.onTick(t)}else if(e===0){o(false);c(false);r.onTick==null?void 0:r.onTick(t);a(d.sentTxt)}}),v*1e3,{intervalTime:m});_((function(){if(!d.autoStart){a(d.sendTxt)}else{p();c(true);o(true)}}),[p,d]);var h=U.useCallbackRef((function(){if(l||s)return;c(true);a(d.processingTxt);void r.onSendRequest().then((function(){o(true);p()})).catch((function(){a(d.sendTxt);c(false)}))}));var g=H("v-count-down",r.className,{running:l,starting:s});return j("div",{className:g,onClick:h,children:n})};Ur.defaultProps={totalTicks:60,duration:1e3,autoStart:false,format:"{t}s",sendTxt:"获取验证码",sentTxt:"重新获取",processingTxt:"发送中..."};var Gr=function e(){console.error("@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代")};var Vr=function e(r){xe((function(){Gr()}),[]);return j("div",{className:H("table-filter-layout",{"table-filter-layout-flex":r.isFixed},r.className),children:K.map(r.children,(function(e,t){if(r.isFixed&&t===r.fullIndex){return W(e,{className:"table-filter-layout-flex-full"})}return e}))})};var Hr=function e(r){return j("div",{className:H("table-filter-layout-condition",r.className),children:r.children})};var Jr=function e(r){return j("div",{className:H("table-filter-layout-operate",r.className),children:r.children})};var Qr=function e(r){return j("div",{className:H("table-filter-layout-table",r.className),children:r.children})};var Xr=function e(r){return j("div",{className:H("table-filter-layout-footer",r.className),children:r.children})};Vr.Condition=Hr;Vr.Operate=Jr;Vr.Table=Qr;Vr.Footer=Xr;var Zr={treeSelectorList:[],queryIsEmpty:false};var $r={actions:{setSelectBoxList:function e(r){return function(e){e.treeSelectorList=r||[];e.requestStatus="request-success"}},resetSelectBoxList:function e(){return function(e){e.treeSelectorList=[]}},changeRequestStatus:function e(r){return function(e){e.requestStatus=r}}},state:Zr};var et={};var rt=function e(r){if(!et[r]){et[r]=V($r)}return et[r]};var tt=function e(r,t,n){if(!P(t)||t.length===0)return[];var a=l(t,n);return o(r,a)};var nt=["serviceConfig","effectDependencyList","onTreeSelectorListChange","treeSelectorList","modelKey"];var at=E((function(e,r){var t=e.serviceConfig,a=e.effectDependencyList,i=e.onTreeSelectorListChange,l=e.treeSelectorList,o=e.modelKey,u=le(e,nt);var s=t||{};var c=a||[];var d=B(false),f=d[0],v=d[1];var m=B(),p=m[0],h=m[1];var g=rt(o).useStore(),b=g[0],y=g[1];var C=function e(r){return r===""||n(r)};var N=function e(r){var t=s.onRequestResultAdapter?s.onRequestResultAdapter(r):r;return t};var L=U.useCallbackRef((function(){return new Promise((function(e,r){var t,n,a,l,o;var u=function(){try{return e()}catch(e){return r(e)}};var c=function(e){try{v(false);void w.error(e.message||"数据查询异常...");return u()}catch(e){return r(e)}};try{if(!s.onRequest){throw new Error("onRequest 调用接口服务不能为空")}t=s.requiredParamsKeys;n=X({},s.params);if(t){a=t.find((function(e){return C(n[e])}));if(a){console.warn("TreeSelectorWrapper组件:参数:"+t.join("、")+"不能为空");return e()}}var d=function(){try{return u()}catch(e){return c(e)}};var f=function(e){try{v(false);void y.changeRequestStatus("request-error");return d()}catch(e){return c(e)}};try{v(true);void y.changeRequestStatus("request-pre");return Promise.resolve(s.onRequest==null?void 0:s.onRequest(n)).then((function(e){try{l=e;o=N(l);v(false);i==null?void 0:i(o);void y.setSelectBoxList(o||[]);return d()}catch(e){return f(e)}}),f)}catch(e){f(e)}}catch(e){c(e)}}))}));$((function(){if(l){void y.setSelectBoxList(l);return}var e=rt(o).getState();console.log("realTimeState",e.requestStatus);if(c.length>0||!e.requestStatus||e.requestStatus==="request-error"){void L()}}),c);_((function(){if(!n(e.value)){var r=P(e.value)?e.value:[e.value];if(r.length>0&&b.treeSelectorList.length>0){var t=[];r.forEach((function(r){var n=tt(r,b.treeSelectorList,e.fieldNames);t=t.concat(n.map((function(e){return e.value})))}));h((function(e){var r=t.concat(e||[]);return Array.from(new Set(r))}))}}}),[b.treeSelectorList,e.fieldNames,e.value]);F(r,(function(){return{onClearSelectorList:function e(){void y.setSelectBoxList([])},getTreeSelectorList:function e(){return b.treeSelectorList}}}));var x=U.useCallbackRef((function(e){h(e)}));var k=U.useCallbackRef((function(){void L()}));return j(q,ie({dropdownStyle:{maxHeight:400,overflow:"auto"},showSearch:true,treeLine:true},u,{value:n(e.value)?undefined:e.value,treeExpandedKeys:p,treeData:b.treeSelectorList,loading:f,onTreeExpand:x,style:ie({width:"100%"},u.style),suffixIcon:b.requestStatus==="request-error"?j(Z,{spin:f,onClick:k}):undefined,notFoundContent:j(it,{requestStatus:b.requestStatus,onAgainRequest:k})}))}));var it=function e(r){var t=A((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return j(L,{image:L.PRESENTED_IMAGE_SIMPLE,description:t,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&j(f,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var lt={treeList:[],queryIsEmpty:false};var ot={actions:{setTreeList:function e(r){return function(e){e.treeList=r||[];e.requestStatus="request-success"}},resetTreeList:function e(){return function(e){e.treeList=[]}},changeRequestStatus:function e(r){return function(e){e.requestStatus=r}}},state:lt};var ut={};var st=function e(r){if(!ut[r]){ut[r]=V(ot)}return ut[r]};var ct=function e(r,t,n){var a=l(t,n);return o(r,a)};var dt=["serviceConfig","effectDependencyList","selectorTreeList","value","onChange","fieldNames","modelKey"];var ft=E((function(e,r){var t=e.serviceConfig,a=e.effectDependencyList,i=e.selectorTreeList,o=e.value,u=e.onChange,s=e.fieldNames,c=e.modelKey,d=le(e,dt);var f=t||{};var v=a||[];var m=B(),p=m[0],h=m[1];var g=st(c).useStore(),b=g[0],y=g[1];var C=B(false),N=C[0],L=C[1];var x=A((function(){if(n(e.value))return undefined;return P(e.value)?e.value:[e.value]}),[e.value]);var k=function e(r){return r===""||n(r)};var R=function e(r){var t=f.onRequestResultAdapter?f.onRequestResultAdapter(r):r;return t};var S=U.useCallbackRef((function(){return new Promise((function(e,r){var t,n,a,i,l;var o=function(){try{return e()}catch(e){return r(e)}};var u=function(e){try{L(false);void w.error(e.message||"数据查询异常...");return o()}catch(e){return r(e)}};try{if(!f.onRequest){throw new Error("onRequest 调用接口服务不能为空")}t=f.requiredParamsKeys;n=X({},f.params);if(t){a=t.find((function(e){return k(n[e])}));if(a){console.warn("TreeWrapper组件:参数:"+t.join("、")+"不能为空");return e()}}var s=function(){try{return o()}catch(e){return u(e)}};var c=function(e){try{L(false);void y.changeRequestStatus("request-error");return s()}catch(e){return u(e)}};try{L(true);void y.changeRequestStatus("request-pre");return Promise.resolve(f.onRequest==null?void 0:f.onRequest(n)).then((function(e){try{i=e;l=R(i);void y.setTreeList(l||[]);L(false);return s()}catch(e){return c(e)}}),c)}catch(e){c(e)}}catch(e){u(e)}}))}));$((function(){if(i){void y.setTreeList(i);return}var e=st(c).getState();if(v.length>0||!e.requestStatus||e.requestStatus==="request-error"){void S()}}),v);$((function(){if(x&&x.length>0&&b.treeList.length>0&&!p){var r=[];x.forEach((function(t){var n=ct(t,b.treeList,e.fieldNames);r=r.concat(n.map((function(e){return e.value})))}));h((function(e){var t=r.concat(e||[]);return Array.from(new Set(t))}))}}),[b.treeList,e.fieldNames,o]);U.useUpdateEffect((function(){if(e.filterLabel){var r=l(b.treeList||[],e.fieldNames);var t=r.filter((function(r){var t;return(t=r.label)==null?void 0:t.includes(e.filterLabel||"")}));var n=[];t.map((function(r){var t=ct(r.value,b.treeList||[],e.fieldNames);var a=t.map((function(e){return e.value}));n=n.concat(a)}));h(Array.from(new Set(n)))}else{h([])}}),[e.filterLabel]);F(r,(function(){return{onClearSelectorList:function e(){void y.resetTreeList()},getTreeDataList:function e(){return b.treeList}}}));var q=U.useCallbackRef((function(e){h(e)}));var I=U.useCallbackRef((function(e){u==null?void 0:u(e)}));var D=U.useCallbackRef((function(r){if(e.multiple){u==null?void 0:u(r)}else{u==null?void 0:u(r[0])}}));var O=A((function(){var e=X({label:"label",value:"value",children:"children"},s);return{title:e.label,key:e.value,children:e.children}}),[s]);if(b.treeList.length>0){return j(T,ie({showLine:d.checkable?false:{showLeafIcon:false}},d,{fieldNames:O,expandedKeys:p,treeData:b.treeList,onExpand:q,selectedKeys:d.checkable?undefined:x,checkedKeys:d.checkable?x:undefined,onCheck:d.checkable?I:undefined,onSelect:d.checkable?undefined:D,style:ie({width:"100%"},d.style)}))}return j(vt,{requestStatus:b.requestStatus,loading:N,onAgainRequest:S})}));var vt=function e(r){var t=A((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return z("div",{className:"tree-wrapper-empty",children:[j(I,{spinning:r.loading}),j(L,{image:L.PRESENTED_IMAGE_SIMPLE,description:t,children:r.requestStatus==="request-error"&&j(f,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})]})};export{de as ButtonOperate,ve as DatePickerWrapper,pe as DateRangePickerWrapper,Ce as DrawerWraper,Pe as DrawerWrapper,vr as EditableTable,pr as FileImport,gr as FileUpload,br as FlexLayout,yr as Gap,Cr as IconWrapper,Rr as ModalWraper,Er as ModalWrapper,Wr as Page404,Fr as PageFixedFooter,se as Permission,Je as SelectorWrapper,Yr as SimpleLayout,Ur as SmsCountDown,Vr as TableFilterLayout,at as TreeSelectorWrapper,ft as TreeWrapper,nr as UploadWrapper,Ne as createDrawerWraperModel,Oe as createDrawerWrapperModel,qr as createModalWraperModel,Br as createModalWrapperModel,oe as getPermissionList,ue as hasPermission,zr as preDefinedClassName,ae as styles,xe as useEffectCustom,ke as useEffectCustomAsync};
|
|
4
|
+
import{noop as e,getGlobalData as r,flatbizDate as t,isUndefinedOrNull as n,arrayField2LabelValue as a,treeToTiledArray as i,treeLeafParentsArray as l}from"@flatbiz/utils";import{isUndefined as o}from"@dimjs/lang/cjs/is-undefined";import{Space as u,Divider as s,Popconfirm as c,Button as d,DatePicker as f,Drawer as v,Form as m,Checkbox as p,Tag as h,Input as g,InputNumber as b,Radio as y,message as w,Select as C,Empty as N,Upload as L,Table as S,Tooltip as x,Modal as k,TreeSelect as R,Tree as q,Spin as T}from"antd";import{isArray as I}from"@dimjs/lang/cjs/is-array";import{Fragment as P,createElement as D,useMemo as O,useEffect as A,forwardRef as _,useRef as E,useState as M,useImperativeHandle as B,cloneElement as K,Children as F}from"react";import{jsx as W,jsxs as j,Fragment as z}from"react/jsx-runtime";import{hooks as Y}from"@wove/react/cjs/hooks";import U from"moment";import{Model as G}from"@dimjs/model-react";import{classNames as V}from"@dimjs/utils/cjs/class-names";import H from"@ant-design/icons/es/icons/SaveOutlined";import J from"@ant-design/icons/es/icons/PlusOutlined";import{extend as Q}from"@dimjs/utils/cjs/extend";import X from"@ant-design/icons/es/icons/RedoOutlined";import{useEffectCustom as Z}from"@flatbiz/antd";import{isBoolean as $}from"@dimjs/lang/cjs/is-boolean";import{isNumber as ee}from"@dimjs/lang/cjs/is-number";import{isString as re}from"@dimjs/lang/cjs/is-string";import te from"@ant-design/icons/es/icons/DeleteOutlined";var ne=e;function ae(){ae=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t){if(Object.prototype.hasOwnProperty.call(t,n)){e[n]=t[n]}}}return e};return ae.apply(this,arguments)}function ie(e,r){if(e==null)return{};var t={};var n=Object.keys(e);var a,i;for(i=0;i<n.length;i++){a=n[i];if(r.indexOf(a)>=0)continue;t[a]=e[a]}return t}var le=function e(){var t=r(),n=t.elemAclLimits;var a=I(n)?n:[];return a};var oe=function e(r){var t=le();if(t.includes(r)){return true}return false};var ue=function e(r){var t=le();if(t.includes(r.name)){return W(P,{children:r.children})}return null};var se=["text","color","onClick","permission","needConfirm","confirmMessage","hidden","style"];var ce=function e(r){return W("div",{className:"table-operate",children:W(u,{split:W(s,{type:"vertical"}),size:r.size,wrap:o(r.wrap)?true:r.wrap,children:r.operateList.map((function(e,r){if(!e)return null;var t=e.text,n=e.color,a=e.onClick,i=e.permission,l=e.needConfirm,o=e.confirmMessage,u=e.hidden,s=e.style,f=ie(e,se);if(u)return null;if(i&&!oe(i))return null;var v=n?ae({color:n},s):s;var m=e.type||"link";if(l){return W(c,{title:o,okText:"确定",cancelText:"取消",onConfirm:a,arrowPointAtCenter:true,children:W(d,ae({},f,{onClick:undefined,type:m,danger:true,style:v,children:t}))},r)}return D(d,ae({},f,{type:m,style:v,key:r,onClick:a}),t)}))})})};ce.defaultProps={size:0};var de=["value","onChange","style"];var fe=function e(r){var n=r.value,a=r.onChange,i=r.style,l=ie(r,de);var o=O((function(){if(r.format)return r.format;if(r.showTime)return"YYYY-MM-DD HH:mm:ss";return"YYYY-MM-DD"}),[r.showTime,r.format]);var u=Y.useCallbackRef((function(e){if(e){a==null?void 0:a(U(e).format(o))}else{a==null?void 0:a(undefined)}}));var s=n&&t.isDate(n)?U(new Date(n)):undefined;return W(f,ae({},l,{style:ae({width:"100%"},i),value:s,onChange:u}))};var ve=["value","onChange","style"];var me=function e(r){var n=r.value,a=r.onChange,i=r.style,l=ie(r,ve);var o=O((function(){if(r.format)return r.format;if(r.showTime===true)return"YYYY-MM-DD HH:mm:ss";return"YYYY-MM-DD"}),[r.showTime,r.format]);var u=Y.useCallbackRef((function(e){if(e){var r=e||[],t=r[0],n=r[1];a==null?void 0:a([U(t).format(o),U(n).format(o)])}else{a==null?void 0:a(undefined)}}));var s=n||[],c=s[0],d=s[1];var v=c&&d&&t.isDate(c)&&t.isDate(d)?[U(new Date(c)),U(new Date(d))]:undefined;return W(f.RangePicker,ae({},l,{style:ae({width:"100%"},i),value:v,onChange:u}))};var pe={actions:{openDrawerForm:function e(r){var t=r.itemData,n=r.title,a=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=n;e.operateType=a;e.pageLoading=i;e.visible=true}},closeDrawer:function e(){return function(e){e.visible=false}},setDrawerItemData:function e(r){return function(e){e.pageLoading=false;e.itemData=r}}},state:{visible:false,title:"",operateType:null}};var he=function e(r){return W("div",{className:"fixed-bottom-block",children:j(u,{size:"middle",children:[W(d,ae({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&W(d,ae({type:"primary",icon:W(H,{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var ge=["pageLoading","className","width","children","footer","operationProps"];var be=function e(){return W("div",{className:"drawer-wraper-loader",children:j("div",{className:"loader-wrapper",children:[W("div",{className:"loader-inner"}),W("div",{className:"loader-text",children:"LOADING"})]})})};var ye=function e(r){var t=r.pageLoading,n=r.className,a=r.width,i=a===void 0?600:a,l=r.children,o=r.footer,u=r.operationProps,s=ie(r,ge);A((function(){console.error("@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整")}),[]);return j(v,ae({className:V("drawer-wraper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:i},size:"default"},s,{footer:o||o===null?o:W(he,ae({},u)),children:[W("div",{className:"drawer-wraper-content",children:l}),t&&W(be,{})]}))};var we={};var Ce=function e(r){if(!we[r]){we[r]=G(pe)}return we[r]};var Ne={actions:{openDrawerForm:function e(r){var t=r.itemData,n=r.title,a=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=n;e.operateType=a;e.pageLoading=i;e.visible=true}},closeDrawer:function e(){return function(e){e.visible=false}},setDrawerItemData:function e(r){return function(e){e.pageLoading=false;e.itemData=r}}},state:{visible:false,title:"",operateType:null}};var Le=function e(r,t){return A(r,t)};var Se=function e(r,t){A((function(){function e(){return new Promise((function(e,t){return Promise.resolve(r()).then((function(r){try{return e()}catch(e){return t(e)}}),t)}))}void e()}),t)};var xe=function e(r){return W("div",{className:"fixed-bottom-block",children:j(u,{size:"middle",children:[W(d,ae({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&W(d,ae({type:"primary",icon:W(H,{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var ke=["pageLoading","className","width","children"];var Re=function e(){return W("div",{className:"drawer-wrapper-loader",children:j("div",{className:"loader-wrapper",children:[W("div",{className:"loader-inner"}),W("div",{className:"loader-text",children:"LOADING"})]})})};var qe=function e(r){return j(P,{children:[W("div",{className:"drawer-wrapper-content",children:r.children}),r.operationProps?W(Te,{children:W(xe,ae({},r.operationProps))}):null]})};var Te=function e(r){return W("div",{className:"drawer-wrapper-footer",children:r.children})};var Ie=function e(r){var t=r.pageLoading,n=r.className,a=r.width,i=a===void 0?600:a,l=r.children,o=ie(r,ke);Le((function(){if(r["operationProps"]){throw new Error("DrawerWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return j(v,ae({className:V("drawer-wrapper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:i},size:"default"},o,{footer:null,children:[t&&W(Re,{}),l]}))};Ie.Content=qe;Ie.Footer=Te;var Pe={};var De=function e(r){if(!Pe[r]){Pe[r]=G(Ne)}return Pe[r]};var Oe=function e(r,t){return typeof r==="boolean"?r:r==null?void 0:r({tableRowIndex:t})};var Ae=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=O((function(){if(a)return[];var e=I(r.value)?r.value:[];var t=l.options||[];if(!I(t)||t.length===0){return e.map((function(e){return{label:e,value:e}}))}var n=[];e.forEach((function(e){var r=t.find((function(r){return r.value===e}));n.push(r?r:{label:e,value:e})}));return n}),[a,l.options,r.value]);if(a){return W(p.Group,ae({},l,{value:r.value,onChange:r.onChange}))}return W("span",{className:"editable-checkbox-group-view",children:i?i(r.value):o.map((function(e,r){return W(h,{color:"#1890ff",children:e.label},r)}))})};var _e=function e(r){var t=r.fieldConfig.formItemProps;return W(m.Item,ae({},t,{name:r.name,className:V("editable-checkbox-group-form-item",t==null?void 0:t.className),children:W(Ae,ae({},r))}))};var Ee=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return W(m.Item,ae({},n,{name:r.name,className:V("editable-date-picker-wraper-form-item",n==null?void 0:n.className),children:W(fe,ae({},a.editableComptProps))}))};var Me=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=O((function(){var e=I(r.value)?r.value:[];if(a)return undefined;return e.join("~")}),[a,r.value]);if(a){return W(me,ae({},l,{value:r.value,onChange:r.onChange}))}return W("span",{className:"editable-date-range-picker-view",children:i?i(r.value):o})};var Be=function e(r){var t=r.fieldConfig.formItemProps;return W(m.Item,ae({},t,{name:r.name,className:V("editable-date-range-picker-wraper-form-item",t==null?void 0:t.className),children:W(Me,ae({},r))}))};var Ke=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return W(m.Item,ae({},n,{name:r.name,children:W(g,ae({},a.editableComptProps))}))};var Fe=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return W(m.Item,ae({},n,{name:r.name,className:V("editable-input-number-form-item",n==null?void 0:n.className),children:W(b,ae({},a.editableComptProps))}))};var We=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=O((function(){if(a)return[];var e=r.value;var t=l.options||[];if(!I(t)||t.length===0){return e}var n=t.find((function(r){return r.value===e}));return(n==null?void 0:n.label)||e}),[a,l.options,r.value]);var u=Y.useCallbackRef((function(e){r.onChange==null?void 0:r.onChange(e.target.value)}));if(a){return W(y.Group,ae({},l,{value:r.value,onChange:u}))}return W("span",{className:"editable-radio-group-view",children:i?i(r.value):o?W(h,{color:"#1890ff",children:o}):null})};var je=function e(r){var t=r.fieldConfig.formItemProps;return W(m.Item,ae({},t,{name:r.name,className:V("editable-radio-group-form-item",t==null?void 0:t.className),children:W(We,ae({},r))}))};var ze={selectorList:[],originalSelectorList:[],queryIsEmpty:false,requestStatus:"init"};var Ye={actions:{setSelectBoxList:function e(r){return function(e){e.selectorList=r.selectorList||[];e.originalSelectorList=r.originalSelectorList||[];e.requestStatus="request-success"}},resetSelectBoxList:function e(){return function(e){e.selectorList=[]}},changeRequestStatus:function e(r){return function(e){e.requestStatus=r}}},state:ze};var Ue={};var Ge=function e(r){if(!Ue[r]){Ue[r]=G(Ye)}return Ue[r]};var Ve=["serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","operateType","searchFieldName","selectorList","modelKey","fieldNames"];var He=_((function(e,r){var t=e.serviceConfig,i=e.showAllOption,l=e.effectDependencyList,o=e.onSelectorListChange,u=e.operateType,s=e.searchFieldName,c=e.selectorList,d=e.modelKey,f=e.fieldNames,v=ie(e,Ve);var m=u==="search"&&c===undefined;var p=t||{};var h=l||[];var g=E();var b=M(false),y=b[0],N=b[1];var L=Ge(d).useStore(),S=L[0],x=L[1];var k="request-pre-"+e.modelKey;var R=function e(r){return r===""||n(r)};var q=function e(r){var t=p.onRequestResultAdapter?p.onRequestResultAdapter(r):r;return t};var T=Y.useCallbackRef((function(e,r){return new Promise((function(t,i){var l,o,u,c,d,v,h;var g=function(){try{return t()}catch(e){return i(e)}};var b=function(e){try{N(false);void w.error(e.message||"数据查询异常...");return g()}catch(e){return i(e)}};try{if(!p.onRequest){throw new Error("onRequest 调用接口服务不能为空")}l=p.requiredParamsKeys;o=Q({},p.params);if(l){u=l.find((function(e){return R(o[e])}));if(u){console.warn("SelectorWrapper组件:参数:"+l.join("、")+"不能为空");return t()}}var y=function(){try{return g()}catch(e){return b(e)}};var C=function(e){try{console.error(e);N(false);window[k]=false;void x.changeRequestStatus("request-error");void w.error(e.message||"获取数据异常");return y()}catch(e){return b(e)}};try{N(true);window[k]=true;void x.changeRequestStatus("request-pre");if((!n(e)||!n(r))&&m){c=s||"keyword";o[c]=e;o["id"]=r}return Promise.resolve(p.onRequest==null?void 0:p.onRequest(o)).then((function(e){try{d=e;v=q(d);h=a(v||[],f);N(false);window[k]=false;void x.setSelectBoxList({selectorList:h,originalSelectorList:v});return y()}catch(e){return C(e)}}),C)}catch(e){C(e)}}catch(e){b(e)}}))}));Z((function(){if(S.originalSelectorList&&S.requestStatus==="request-success"){o==null?void 0:o(S.originalSelectorList)}}),[S.originalSelectorList,S.requestStatus]);Z((function(){if(c){void x.setSelectBoxList({selectorList:a(c,f),originalSelectorList:c});return}if(m)return;var e=Ge(d).getState();if(h.length>0||!window[k]&&e.requestStatus!=="request-success"){void T()}}),h);Z((function(){if(m){if(R(e.value)){o==null?void 0:o([]);void x.resetSelectBoxList()}else{if(e.value!==g.current){void T(undefined,e.value)}}}}),h.concat([e.value]));B(r,(function(){return{onClearSelectorList:function e(){void x.resetSelectBoxList()},getSelectorList:function e(){return S.selectorList}}}));var I=Y.useCallbackRef((function(e,r){return(r==null?void 0:r.children).toLowerCase().indexOf(e.toLowerCase())>=0}));var P=Y.useDebounceCallback((function(e){if(e){void T(e)}else{void x.resetSelectBoxList()}}),300);var D=Y.useCallbackRef((function(r){g.current=r;for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++){n[a-1]=arguments[a]}e.onChange==null?void 0:e.onChange(r,n)}));var O=Y.useCallbackRef((function(){void T()}));var A=W(C.Option,{value:"",children:"全部"});return j(C,ae({showSearch:true,allowClear:true},v,{value:n(e.value)?undefined:e.value,notFoundContent:W(Je,{requestStatus:S.requestStatus,onAgainRequest:O}),loading:y,onSearch:m?P:undefined,filterOption:m?false:I,onChange:D,fieldNames:undefined,suffixIcon:S.requestStatus==="request-error"?W(X,{spin:y,onClick:O}):undefined,children:[i===true?A:i,S.selectorList.map((function(r){return W(C.Option,{value:r.value,label:r.label,children:e.onLabelRenderAdapter?e.onLabelRenderAdapter(r):r.label},r.value)}))]}))}));var Je=function e(r){var t=O((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return W(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&W(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var Qe=function e(r){var t=r.fieldConfig,n=t.editableConfig,i=t.editable,l=t.render;var o=n.editableComptProps;var u=M([]),s=u[0],c=u[1];var d=M([]),f=d[0],v=d[1];A((function(){if(!i){var e=I(r.value)?r.value:r.value===undefined?[]:[r.value];if(s.length===0){v(e.map((function(e){return{label:e,value:e}})))}var t=[];e.forEach((function(e){var r=s.find((function(r){return r.value===e}));t.push(r?r:{label:String(e),value:e})}));v(t)}}),[i,o.fieldNames,r.value,s]);var m=Y.useCallbackRef((function(e){c(a(e||[],o.fieldNames))}));if(i){return W(He,ae({},o,{value:r.value,onChange:r.onChange,onSelectorListChange:m}))}return j(P,{children:[W("div",{style:{display:"none"},children:W(He,ae({},o,{onSelectorListChange:m}))}),W("span",{className:"editable-selector-view",children:l?l(r.value):f.map((function(e,r){return W(h,{color:"#1890ff",children:e.label},r)}))})]})};var Xe=function e(r){var t=r.fieldConfig.formItemProps;return W(m.Item,ae({},t,{name:r.name,className:V("editable-selector-wrapper-form-item",t==null?void 0:t.className),children:W(Qe,ae({},r))}))};var Ze=function e(r){var t,n;var a=O((function(){var e;if((e=r.fieldConfig)!=null&&e.render)return undefined;var t=re(r.value)||ee(r.value)||$(r.value)||!r.value;if(!t){console.warn("Form.List name:【"+r.name+"】数据【"+JSON.stringify(r.value)+"】不能渲染在页面中")}return t?r.value:undefined}),[(t=r.fieldConfig)==null?void 0:t.render,r.name,r.value]);return W("span",{className:"editable-text-view",children:((n=r.fieldConfig)==null?void 0:n.render==null?void 0:n.render(r.value))||a})};var $e=function e(r){return W(m.Item,{noStyle:true,name:r.name,children:W(Ze,{name:r.name,fieldConfig:r.fieldConfig})})};var er=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return W(m.Item,ae({},n,{name:r.name,children:W(g.TextArea,ae({},a.editableComptProps))}))};var rr=["onChange","onUploadError","value"];var tr=function e(r){var t=r.onChange,n=r.onUploadError,a=r.value,i=ie(r,rr);var l=M(),o=l[0],u=l[1];var s=Q({uid:"uid",name:"name",url:"url"},r.fieldNames);Le((function(){u(a==null?void 0:a.map((function(e){return{uid:e[s.uid],name:e[s.name],url:e[s.url]}})))}),[s.name,s.uid,s.url,a]);var c=Y.useCallbackRef((function(e){var i=e.fileList;if(e.file.status==="done"){var l=e.file.response;if(l.code==="0000"){var o=r.onRequestResultAdapter?r.onRequestResultAdapter(l.data):l.data;o[s.uid]=o[s.uid]||e.file.uid;o[s.name]=o[s.name]||e.file.name;if(r.maxCount===1){t==null?void 0:t([o])}else{t==null?void 0:t((a||[]).concat(o))}}else{if(n){n(l.message)}else{void w.error(l.message||"上传操作失败...")}i[i.length-1]=ae({},i[i.length-1],{status:"error"})}}else if(e.file.status==="removed"){var c=e.file.uid;var d=a!==undefined?[].concat(a):[];var f=d.findIndex((function(e){var r=e[s.uid];return r===c}));if(f>=0){d.splice(f,1)}t==null?void 0:t(d)}else if(e.file.status==="error"){if(n){n()}else{void w.error("上传操作失败...")}}u([].concat(i));r.onUploadChange==null?void 0:r.onUploadChange(e)}));return W(L,ae({},i,{onChange:c,fileList:o,className:V("v-upload-wrapper",i.className),children:i.disabled?null:W(nr,{listType:i.listType,children:r.children})}))};var nr=function e(r){if(r.children)return W(P,{children:r.children});if(r.listType==="picture-card"){return j("div",{children:[W(J,{}),W("div",{style:{marginTop:8},children:"上传图片"})]})}if(r.listType==="picture"){return W(d,{type:"primary",ghost:true,children:"选择图片上传"})}return W(d,{type:"primary",ghost:true,children:"选择文件上传"})};var ar=["children"];var ir=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.render,i=t.editable;var l=n.editableComptProps,o=l.children,u=ie(l,ar);if(i){return W(tr,ae({listType:"text"},u,{value:r.value,onChange:r.onChange,children:o}))}return W("div",{className:"upload-wrapper-selector-view",children:a?a(r.value):W(tr,ae({listType:"text"},u,{value:r.value,disabled:true}))})};var lr=function e(r){var t=r.fieldConfig.formItemProps;return W(m.Item,ae({},t,{name:r.name,className:V("editable-upload-wrapper-form-item",t==null?void 0:t.className),children:W(ir,ae({},r))}))};var or=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable;var i=Oe(a,r.tableRowIndex);var l=Q({},r.fieldConfig,{editable:i});var o={name:r.name,fieldConfig:l};if((n==null?void 0:n.type)==="input"&&i){return W(Ke,ae({},o))}else if((n==null?void 0:n.type)==="inputNumber"&&i){return W(Fe,ae({},o))}else if((n==null?void 0:n.type)==="textArea"&&i){return W(er,ae({},o))}else if((n==null?void 0:n.type)==="datePickerWrapper"&&i){return W(Ee,ae({},o))}else if((n==null?void 0:n.type)==="dateRangePickerWrapper"){return W(Be,ae({},o))}else if((n==null?void 0:n.type)==="selectorWrapper"){return W(Xe,ae({},o))}else if((n==null?void 0:n.type)==="checkboxGroup"){return W(_e,ae({},o))}else if((n==null?void 0:n.type)==="radioGroup"){return W(je,ae({},o))}else if((n==null?void 0:n.type)==="uploadWrapper"){return W(lr,ae({},o))}else if((n==null?void 0:n.type)==="custom"){return n.editableComptProps({name:r.name,editable:i,completeName:r.completeName})}return W($e,ae({},o))};var ur=function e(r){var t=m.useFormInstance();var n=r.formListConfig,a=n.onFormListBeforeRender,i=n.editableConfigList,l=n.onFormListAfterRender,o=n.onFormListItemBeforeRender,s=n.onFormListItemAfterRender,c=n.deleteOperateRender;return W(m.List,{name:r.name,children:function e(n,d){var f=d.add,v=d.remove;return j(z,{children:[a?a({tableRowIndex:r.tableRowIndex,add:f,get value(){return t.getFieldValue(r.completeName)}}):null,n.map((function(e,n){var a=i.find((function(e){return Oe(e.editable,r.tableRowIndex)}));var l=V("editable-inner-formlist-item","editable-inner-formlist-item-"+r.name[1],{"editable-inner-formlist-item_preview":!a});return j("div",{className:l,children:[o?o({add:f,remove:function e(){v(n)},formListItemIndex:n,tableRowIndex:r.tableRowIndex,get value(){return t.getFieldValue([].concat(r.completeName,[e.name]))}}):null,j(u,{children:[i.map((function(t,n){return W(or,{name:[e.name,t.fieldName],fieldConfig:t,tableRowIndex:r.tableRowIndex,completeName:[].concat(r.completeName,[e.name])},n)})),a?W(sr,{deleteOperateRender:c,remove:function e(){v(n)},index:n}):null]}),s?s({add:f,formListItemIndex:n,tableRowIndex:r.tableRowIndex,remove:function e(){v(n)},get value(){return t.getFieldValue([].concat(r.completeName,[e.name]))}}):null]},n)})),l?l({tableRowIndex:r.tableRowIndex,add:f,get value(){return t.getFieldValue(r.completeName)}}):null]})}})};var sr=function e(r){return W(m.Item,{children:r.deleteOperateRender?r.deleteOperateRender({remove:r.remove,formListItemIndex:r.index}):W(d,{type:"link",danger:true,icon:W(te,{}),onClick:r.remove,children:"删除"})})};var cr=function e(r){if(r.fieldConfig){if(I(r.fieldConfig["editableConfigList"])){var t=r.fieldConfig;return W(ur,{name:r.name,completeName:r.completeName,formListConfig:t,tableRowIndex:r.tableRowIndex})}else{return W(or,{name:r.name,fieldConfig:r.fieldConfig,tableRowIndex:r.tableRowIndex,completeName:r.completeName})}}return W($e,{name:r.name})};var dr=["fieldConfig","operateRender"];var fr=function e(r){var t;var n=O((function(){if(!r.columns)return[];return r.columns.map((function(e){var t=e.fieldConfig,n=e.operateRender,a=ie(e,dr);return ae({onCell:function e(){var t;return{valign:((t=r.tableProps)==null?void 0:t.cellVerticalAlign)||"middle"}}},a,{render:function a(i,l){if(n){return n({name:[].concat(r.name,[l.name]),tableRowIndex:l.name,operation:l.operation})||""}return W(cr,{name:e.dataIndex?[l.name,e.dataIndex]:[l.name],completeName:e.dataIndex?[].concat(r.name,[l.name,e.dataIndex]):[].concat(r.name,[l.name]),fieldConfig:t,tableRowIndex:l.name})}})}))}),[r.columns,r.name,(t=r.tableProps)==null?void 0:t.cellVerticalAlign]);return W("div",{className:"editable-table",children:W(m.List,{name:r.name,rules:r.rules,children:function e(t,a){return j(P,{children:[r.onTableBeforeRender?r.onTableBeforeRender(a,t.length):null,W(S,ae({scroll:{x:"max-content"},pagination:false},r.tableProps,{dataSource:t.map((function(e){return ae({},e,{operation:a})})),columns:n,rowKey:"key"})),r.onTableAfterRender?r.onTableAfterRender(a,t.length):W(d,{type:"dashed",onClick:function e(){return a.add()},block:true,icon:W(J,{}),style:{marginTop:15},children:"新增"})]})}})})};var vr=["onImportFinish"];var mr=function e(r){var t=r.onImportFinish,n=ie(r,vr);var a=M(false),i=a[0],l=a[1];var o=Y.useCallbackRef((function(e){if(e.file.status==="uploading"){l(true)}else if(e.file.status==="done"){l(false);var r=e.file.response;if(r.code==="0000"){t(r.data)}else{void w.error(r.message||"文件导入异常...")}}}));return W(L,ae({showUploadList:false,maxCount:1},n,{onChange:o,children:r.children?r.children:W(d,{type:"primary",ghost:true,loading:i,children:"选择文件"})}))};mr.defaultProps={name:"file",accept:".xlsx,.xls"};var pr=["onChange","onUploadError","onPreview","value"];var hr=function e(r){Le((function(){console.error("@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换")}),[]);var t=r.onChange,n=r.onUploadError,a=r.onPreview,i=r.value,l=ie(r,pr);var o=M([]),u=o[0],s=o[1];var c=Q({fileKey:"fileKey",fileName:"fileName"},r.fieldNames);A((function(){if(i&&I(i)){s(i.map((function(e){return{uid:e["uid"]||e[c.fileKey],name:e[c.fileName],fileKey:e[c.fileKey],url:e[c.fileKey],thumbUrl:e[c.fileKey]}})))}}),[c.fileKey,c.fileName,i]);var d=Y.useCallbackRef((function(e){if(e.file.status==="done"){var a=e.file.response;if(a.code==="0000"){var l=a.data||{};var o={uid:e.file.uid,fileName:l[c.fileName]||e.file.name,fileKey:l[c.fileKey]};var u=(i||[]).concat(o);t==null?void 0:t(u)}else{n==null?void 0:n(a.message)}}else if(e.file.status==="removed"){var d=e.file.uid;var f=i!==undefined?[].concat(i):[];var v=f.findIndex((function(e){var r=e["uid"]||e[c.fileKey];return r===d}));if(v>=0){f.splice(v,1)}t==null?void 0:t(f)}else if(e.file.status==="error"){n==null?void 0:n()}s([].concat(e.fileList));r.onUploadChange==null?void 0:r.onUploadChange(e)}));var f=Y.useCallbackRef((function(e){a==null?void 0:a({fileKey:e[c.fileKey],fileName:e[c.fileName]})}));return W(L,ae({},l,{onChange:d,onPreview:f,fileList:u,className:V("v-file-upload",l.className),children:r.children}))};var gr=function e(r){var t=I(r.children)?r.children:[r.children];var a=r.direction||"vertical";var i=r.gap?r.gap:0;var l=!n(r.fullIndex)?I(r.fullIndex)?r.fullIndex:[r.fullIndex]:[];return W("div",{className:V("v-flex-layout","v-flex-"+a,r.className),style:r.style,onClick:r.onClick,children:t.map((function(e,r){var n=e.props.style||{};var o=l.includes(r)?ae({flex:1},n):n;if(r<t.length-1&&i>0){if(a==="horizontal"){o.marginRight=i}else{o.marginBottom=i}}return K(e,{style:o,key:r})}))})};var br=function e(r){return W("div",{style:ae({height:r.height},r.style),className:r.className})};var yr=function e(r){return W(x,{title:r.hoverTips,children:j("div",{className:V("icon-wrapper","icon-wrapper-"+(r.size||"middle"),r.className),style:r.style,children:[r.icon,r.text?W("span",{className:"icon-wrapper-text",children:r.text}):null]})})};var wr={actions:{openModalForm:function e(r){var t=r.itemData,n=r.title,a=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=n;e.operateType=a;e.pageLoading=i;e.visible=true}},closeModal:function e(){return function(e){e.visible=false}},setModalItemData:function e(r){return function(e){e.pageLoading=false;e.itemData=r}}},state:{visible:false,title:"",operateType:"view"}};var Cr=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Nr=function e(r){var t=r.loading,n=r.okText,a=n===void 0?"保存":n,i=r.cancelText,l=i===void 0?"取消":i,o=r.onCancel,s=r.onOk,c=r.hideOkBtn,f=ie(r,Cr);return W(P,{children:j(u,{size:"middle",children:[W(d,ae({},f.cancelButtonProps,{className:"cancel-btn",onClick:o,children:l})),c!=true&&W(d,ae({type:"primary"},f.okButtonProps,{className:"ok-btn",onClick:s,loading:t,children:a}))]})})};var Lr=["pageLoading","className","width","children","footer","operationProps"];var Sr=function e(){return W("div",{className:"modal-wraper-loader",children:j("div",{className:"loader-wrapper",children:[W("div",{className:"loader-inner"}),W("div",{className:"loader-text",children:"LOADING"})]})})};var xr=function e(r){var t=r.pageLoading,n=r.className,a=r.width,i=r.children,l=r.footer,o=r.operationProps,u=ie(r,Lr);A((function(){console.error("@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整")}),[]);return j(k,ae({className:V("modal-wraper",n),keyboard:false,forceRender:false,destroyOnClose:true},u,{width:a||600,footer:null,children:[j("div",{className:"modal-wraper-content",children:[i,t&&W(Sr,{})]}),l!==null&&W("div",{className:"modal-wraper-content-footer",children:l?l:W(Nr,ae({},o))})]}))};var kr={};var Rr=function e(r){if(!kr[r]){kr[r]=G(wr)}return kr[r]};var qr={actions:{openModalForm:function e(r){var t=r.itemData,n=r.title,a=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=n;e.operateType=a;e.pageLoading=i;e.visible=true}},closeModal:function e(){return function(e){e.visible=false}},setModalItemData:function e(r){return function(e){e.pageLoading=false;e.itemData=r}}},state:{visible:false,title:"",operateType:"view"}};var Tr=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Ir=function e(r){var t=r.loading,n=r.okText,a=n===void 0?"保存":n,i=r.cancelText,l=i===void 0?"取消":i,o=r.onCancel,s=r.onOk,c=r.hideOkBtn,f=ie(r,Tr);return W(P,{children:j(u,{size:"middle",children:[W(d,ae({},f.cancelButtonProps,{className:"cancel-btn",onClick:o,children:l})),c!=true&&W(d,ae({type:"primary"},f.okButtonProps,{className:"ok-btn",onClick:s,loading:t,children:a}))]})})};var Pr=["pageLoading","className","width","children"];var Dr=function e(){return W("div",{className:"modal-wrapper-loader",children:j("div",{className:"loader-wrapper",children:[W("div",{className:"loader-inner"}),W("div",{className:"loader-text",children:"LOADING"})]})})};var Or=function e(r){return j(P,{children:[W("div",{className:"modal-wrapper-content",children:r.children}),r.operationProps?W(Ar,{children:W(Ir,ae({},r.operationProps))}):null]})};var Ar=function e(r){return W("div",{className:"modal-wrapper-footer",children:r.children})};var _r=function e(r){var t=r.pageLoading,n=r.className,a=r.width,i=r.children,l=ie(r,Pr);Le((function(){if(r["operationProps"]){throw new Error("ModalWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return j(k,ae({className:V("modal-wrapper",n),keyboard:false,forceRender:true,destroyOnClose:true},l,{width:a||600,footer:null,children:[i,t&&W(Dr,{})]}))};_r.Content=Or;_r.Footer=Ar;var Er={};var Mr=function e(r){if(!Er[r]){Er[r]=G(qr)}return Er[r]};var Br=function e(r){return W("div",{className:V("page-fixed-footer",r.className),style:r.style,children:r.children})};var Kr=function e(){return W("div",{className:"v-404",children:"404"})};var Fr={label_width_70:"form-label-70",label_width_80:"form-label-80",label_width_90:"form-label-90",label_width_100:"form-label-100",label_width_110:"form-label-110",label_width_120:"form-label-120",label_width_130:"form-label-130",label_width_auto:"form-label-auto"};var Wr={label_width_70:"form-item-label-70",label_width_80:"form-item-label-80",label_width_90:"form-item-label-90",label_width_100:"form-item-label-100",label_width_110:"form-item-label-110",label_width_120:"form-item-label-120",label_width_130:"form-item-label-130",label_width_auto:"form-item-label-auto"};var jr={form:Fr,formItem:Wr};var zr=function e(r){var t=r.formLabelAlign||"right";var n=V("simple-layout",{"simple-layout-tight":r.layoutType==="tight","simple-layout-formlabel-left":t==="left"},r.className);var a=V("simple-layout-title",{"simple-layout-title-sign":r.titleLeftLine});return j("div",{className:n,style:r.style,children:[r.title?W("div",{className:a,children:r.title}):null,r.desc?W("div",{className:"simple-layout-desc",children:r.desc}):null,r.children?W("div",{className:"simple-layout-content",children:r.children}):null]})};zr.defaultProps={titleLeftLine:true,layoutType:"layer"};var Yr=function e(r){var t=M(),n=t[0],a=t[1];var i=M(false),l=i[0],o=i[1];var u=M(false),s=u[0],c=u[1];var d=O((function(){return{sendTxt:r.sendTxt,sentTxt:r.sentTxt,processingTxt:r.processingTxt,format:r.format,autoStart:r.autoStart,totalTicks:r.totalTicks,duration:r.duration}}),[]);var f=d.format;var v=d.totalTicks;var m=d.duration;var p=Y.useCountdownCallback((function(e){var t=e/1e3;if(e>0){if(!l){o(true)}a(f.replace("{t}",String(t)));r.onTick==null?void 0:r.onTick(t)}else if(e===0){o(false);c(false);r.onTick==null?void 0:r.onTick(t);a(d.sentTxt)}}),v*1e3,{intervalTime:m});A((function(){if(!d.autoStart){a(d.sendTxt)}else{p();c(true);o(true)}}),[p,d]);var h=Y.useCallbackRef((function(){if(l||s)return;c(true);a(d.processingTxt);void r.onSendRequest().then((function(){o(true);p()})).catch((function(){a(d.sendTxt);c(false)}))}));var g=V("v-count-down",r.className,{running:l,starting:s});return W("div",{className:g,onClick:h,children:n})};Yr.defaultProps={totalTicks:60,duration:1e3,autoStart:false,format:"{t}s",sendTxt:"获取验证码",sentTxt:"重新获取",processingTxt:"发送中..."};var Ur=function e(){console.error("@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代")};var Gr=function e(r){Le((function(){Ur()}),[]);return W("div",{className:V("table-filter-layout",{"table-filter-layout-flex":r.isFixed},r.className),children:F.map(r.children,(function(e,t){if(r.isFixed&&t===r.fullIndex){return K(e,{className:"table-filter-layout-flex-full"})}return e}))})};var Vr=function e(r){return W("div",{className:V("table-filter-layout-condition",r.className),children:r.children})};var Hr=function e(r){return W("div",{className:V("table-filter-layout-operate",r.className),children:r.children})};var Jr=function e(r){return W("div",{className:V("table-filter-layout-table",r.className),children:r.children})};var Qr=function e(r){return W("div",{className:V("table-filter-layout-footer",r.className),children:r.children})};Gr.Condition=Vr;Gr.Operate=Hr;Gr.Table=Jr;Gr.Footer=Qr;var Xr={treeSelectorList:[],queryIsEmpty:false};var Zr={actions:{setSelectBoxList:function e(r){return function(e){e.treeSelectorList=r||[];e.requestStatus="request-success"}},resetSelectBoxList:function e(){return function(e){e.treeSelectorList=[]}},changeRequestStatus:function e(r){return function(e){e.requestStatus=r}}},state:Xr};var $r={};var et=function e(r){if(!$r[r]){$r[r]=G(Zr)}return $r[r]};var rt=function e(r,t,n){if(!I(t)||t.length===0)return[];var a=i(t,n);return l(r,a)};var tt=["serviceConfig","effectDependencyList","onTreeSelectorListChange","treeSelectorList","modelKey"];var nt=_((function(e,r){var t=e.serviceConfig,a=e.effectDependencyList,i=e.onTreeSelectorListChange,l=e.treeSelectorList,o=e.modelKey,u=ie(e,tt);var s=t||{};var c=a||[];var d=M(false),f=d[0],v=d[1];var m=M(),p=m[0],h=m[1];var g=et(o).useStore(),b=g[0],y=g[1];var C="request-pre-"+e.modelKey;var N=function e(r){return r===""||n(r)};var L=function e(r){var t=s.onRequestResultAdapter?s.onRequestResultAdapter(r):r;return t};var S=Y.useCallbackRef((function(){return new Promise((function(e,r){var t,n,a,i,l;var o=function(){try{return e()}catch(e){return r(e)}};var u=function(e){try{v(false);void w.error(e.message||"数据查询异常...");return o()}catch(e){return r(e)}};try{if(!s.onRequest){throw new Error("onRequest 调用接口服务不能为空")}t=s.requiredParamsKeys;n=Q({},s.params);if(t){a=t.find((function(e){return N(n[e])}));if(a){console.warn("TreeSelectorWrapper组件:参数:"+t.join("、")+"不能为空");return e()}}var c=function(){try{return o()}catch(e){return u(e)}};var d=function(e){try{v(false);window[C]=false;void y.changeRequestStatus("request-error");return c()}catch(e){return u(e)}};try{v(true);window[C]=true;void y.changeRequestStatus("request-pre");return Promise.resolve(s.onRequest==null?void 0:s.onRequest(n)).then((function(e){try{i=e;l=L(i);v(false);window[C]=false;void y.setSelectBoxList(l||[]);return c()}catch(e){return d(e)}}),d)}catch(e){d(e)}}catch(e){u(e)}}))}));Z((function(){if(b.treeSelectorList&&b.requestStatus==="request-success"){i==null?void 0:i(b.treeSelectorList)}}),[b.treeSelectorList,b.requestStatus]);Z((function(){if(l){void y.setSelectBoxList(l);return}var e=et(o).getState();console.log("realTimeState",e.requestStatus);if(c.length>0||!window[C]&&e.requestStatus!=="request-success"){void S()}}),c);A((function(){if(!n(e.value)){var r=I(e.value)?e.value:[e.value];if(r.length>0&&b.treeSelectorList.length>0){var t=[];r.forEach((function(r){var n=rt(r,b.treeSelectorList,e.fieldNames);t=t.concat(n.map((function(e){return e.value})))}));h((function(e){var r=t.concat(e||[]);return Array.from(new Set(r))}))}}}),[b.treeSelectorList,e.fieldNames,e.value]);B(r,(function(){return{onClearSelectorList:function e(){void y.setSelectBoxList([])},getTreeSelectorList:function e(){return b.treeSelectorList}}}));var x=Y.useCallbackRef((function(e){h(e)}));var k=Y.useCallbackRef((function(){void S()}));return W(R,ae({dropdownStyle:{maxHeight:400,overflow:"auto"},showSearch:true,treeLine:true},u,{value:n(e.value)?undefined:e.value,treeExpandedKeys:p,treeData:b.treeSelectorList,loading:f,onTreeExpand:x,style:ae({width:"100%"},u.style),suffixIcon:b.requestStatus==="request-error"?W(X,{spin:f,onClick:k}):undefined,notFoundContent:W(at,{requestStatus:b.requestStatus,onAgainRequest:k})}))}));var at=function e(r){var t=O((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return W(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&W(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var it={treeList:[],queryIsEmpty:false};var lt={actions:{setTreeList:function e(r){return function(e){e.treeList=r||[];e.requestStatus="request-success"}},resetTreeList:function e(){return function(e){e.treeList=[]}},changeRequestStatus:function e(r){return function(e){e.requestStatus=r}}},state:it};var ot={};var ut=function e(r){if(!ot[r]){ot[r]=G(lt)}return ot[r]};var st=function e(r,t,n){var a=i(t,n);return l(r,a)};var ct=["serviceConfig","effectDependencyList","selectorTreeList","value","onChange","fieldNames","modelKey"];var dt=_((function(e,r){var t=e.serviceConfig,a=e.effectDependencyList,l=e.selectorTreeList,o=e.value,u=e.onChange,s=e.fieldNames,c=e.modelKey,d=ie(e,ct);var f=t||{};var v=a||[];var m=M(),p=m[0],h=m[1];var g=ut(c).useStore(),b=g[0],y=g[1];var C=M(false),N=C[0],L=C[1];var S=O((function(){if(n(e.value))return undefined;return I(e.value)?e.value:[e.value]}),[e.value]);var x=function e(r){return r===""||n(r)};var k=function e(r){var t=f.onRequestResultAdapter?f.onRequestResultAdapter(r):r;return t};var R=Y.useCallbackRef((function(){return new Promise((function(e,r){var t,n,a,i,l;var o=function(){try{return e()}catch(e){return r(e)}};var u=function(e){try{L(false);void w.error(e.message||"数据查询异常...");return o()}catch(e){return r(e)}};try{if(!f.onRequest){throw new Error("onRequest 调用接口服务不能为空")}t=f.requiredParamsKeys;n=Q({},f.params);if(t){a=t.find((function(e){return x(n[e])}));if(a){console.warn("TreeWrapper组件:参数:"+t.join("、")+"不能为空");return e()}}var s=function(){try{return o()}catch(e){return u(e)}};var c=function(e){try{L(false);void y.changeRequestStatus("request-error");return s()}catch(e){return u(e)}};try{L(true);void y.changeRequestStatus("request-pre");return Promise.resolve(f.onRequest==null?void 0:f.onRequest(n)).then((function(e){try{i=e;l=k(i);void y.setTreeList(l||[]);L(false);return s()}catch(e){return c(e)}}),c)}catch(e){c(e)}}catch(e){u(e)}}))}));Z((function(){if(l){void y.setTreeList(l);return}var e=ut(c).getState();if(v.length>0||!e.requestStatus||e.requestStatus==="request-error"){void R()}}),v);Z((function(){if(S&&S.length>0&&b.treeList.length>0&&!p){var r=[];S.forEach((function(t){var n=st(t,b.treeList,e.fieldNames);r=r.concat(n.map((function(e){return e.value})))}));h((function(e){var t=r.concat(e||[]);return Array.from(new Set(t))}))}}),[b.treeList,e.fieldNames,o]);Y.useUpdateEffect((function(){if(e.filterLabel){var r=i(b.treeList||[],e.fieldNames);var t=r.filter((function(r){var t;return(t=r.label)==null?void 0:t.includes(e.filterLabel||"")}));var n=[];t.map((function(r){var t=st(r.value,b.treeList||[],e.fieldNames);var a=t.map((function(e){return e.value}));n=n.concat(a)}));h(Array.from(new Set(n)))}else{h([])}}),[e.filterLabel]);B(r,(function(){return{onClearSelectorList:function e(){void y.resetTreeList()},getTreeDataList:function e(){return b.treeList}}}));var T=Y.useCallbackRef((function(e){h(e)}));var P=Y.useCallbackRef((function(e){u==null?void 0:u(e)}));var D=Y.useCallbackRef((function(r){if(e.multiple){u==null?void 0:u(r)}else{u==null?void 0:u(r[0])}}));var A=O((function(){var e=Q({label:"label",value:"value",children:"children"},s);return{title:e.label,key:e.value,children:e.children}}),[s]);if(b.treeList.length>0){return W(q,ae({showLine:d.checkable?false:{showLeafIcon:false}},d,{fieldNames:A,expandedKeys:p,treeData:b.treeList,onExpand:T,selectedKeys:d.checkable?undefined:S,checkedKeys:d.checkable?S:undefined,onCheck:d.checkable?P:undefined,onSelect:d.checkable?undefined:D,style:ae({width:"100%"},d.style)}))}return W(ft,{requestStatus:b.requestStatus,loading:N,onAgainRequest:R})}));var ft=function e(r){var t=O((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return j("div",{className:"tree-wrapper-empty",children:[W(T,{spinning:r.loading}),W(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,children:r.requestStatus==="request-error"&&W(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})]})};export{ce as ButtonOperate,fe as DatePickerWrapper,me as DateRangePickerWrapper,ye as DrawerWraper,Ie as DrawerWrapper,fr as EditableTable,mr as FileImport,hr as FileUpload,gr as FlexLayout,br as Gap,yr as IconWrapper,xr as ModalWraper,_r as ModalWrapper,Kr as Page404,Br as PageFixedFooter,ue as Permission,He as SelectorWrapper,zr as SimpleLayout,Yr as SmsCountDown,Gr as TableFilterLayout,nt as TreeSelectorWrapper,dt as TreeWrapper,tr as UploadWrapper,Ce as createDrawerWraperModel,De as createDrawerWrapperModel,Rr as createModalWraperModel,Mr as createModalWrapperModel,le as getPermissionList,oe as hasPermission,jr as preDefinedClassName,ne as styles,Le as useEffectCustom,Se as useEffectCustomAsync};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/01-styles/index.ts","@flatbiz/antd/src/permission/index.tsx","@flatbiz/antd/src/button-operate/index.tsx","@flatbiz/antd/src/date-picker-wrapper/index.tsx","@flatbiz/antd/src/date-range-picker-wrapper/index.tsx","@flatbiz/antd/src/drawer-wraper/drawer.model.ts","@flatbiz/antd/src/drawer-wraper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wraper/drawer-wraper.tsx","@flatbiz/antd/src/drawer-wraper/index.ts","@flatbiz/antd/src/drawer-wrapper/drawer.model.ts","@flatbiz/antd/src/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/drawer-wrapper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wrapper/drawer-wrapper.tsx","@flatbiz/antd/src/drawer-wrapper/index.ts","@flatbiz/antd/src/editable-table/utils.ts","@flatbiz/antd/src/editable-table/form-item/checkbox-group.tsx","@flatbiz/antd/src/editable-table/form-item/date-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/date-range-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/input.tsx","@flatbiz/antd/src/editable-table/form-item/input-number.tsx","@flatbiz/antd/src/editable-table/form-item/radio-group.tsx","@flatbiz/antd/src/selector-wrapper/model.ts","@flatbiz/antd/src/selector-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/selector-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/text.tsx","@flatbiz/antd/src/editable-table/form-item/textarea.tsx","@flatbiz/antd/src/upload-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/upload-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/index.tsx","@flatbiz/antd/src/editable-table/form-list-item/form-list.tsx","@flatbiz/antd/src/editable-table/form-list-item/index.tsx","@flatbiz/antd/src/editable-table/index.tsx","@flatbiz/antd/src/file-import/index.tsx","@flatbiz/antd/src/file-upload/index.tsx","@flatbiz/antd/src/flex-layout/index.tsx","@flatbiz/antd/src/gap/index.tsx","@flatbiz/antd/src/icon-wrapper/index.tsx","@flatbiz/antd/src/modal-wraper/modal.model.ts","@flatbiz/antd/src/modal-wraper/modal-operation.tsx","@flatbiz/antd/src/modal-wraper/modal-wraper.tsx","@flatbiz/antd/src/modal-wraper/index.ts","@flatbiz/antd/src/modal-wrapper/modal.model.ts","@flatbiz/antd/src/modal-wrapper/modal-operation.tsx","@flatbiz/antd/src/modal-wrapper/modal-wrapper.tsx","@flatbiz/antd/src/modal-wrapper/index.ts","@flatbiz/antd/src/page-fixed-footer/index.tsx","@flatbiz/antd/src/page404/index.tsx","@flatbiz/antd/src/pre-defined-classname/form/index.tsx","@flatbiz/antd/src/pre-defined-classname/index.ts","@flatbiz/antd/src/simple-layout/index.tsx","@flatbiz/antd/src/sms-count-down/index.tsx","@flatbiz/antd/src/table-filter-layout/index.tsx","@flatbiz/antd/src/tree-selector-wrapper/model.ts","@flatbiz/antd/src/tree-selector-wrapper/utils.ts","@flatbiz/antd/src/tree-selector-wrapper/index.tsx","@flatbiz/antd/src/tree-wrapper/model.ts","@flatbiz/antd/src/tree-wrapper/utils.ts","@flatbiz/antd/src/tree-wrapper/index.tsx"],"sourcesContent":["import { noop } from '@flatbiz/utils';\nimport './1_root.less';\nimport './2_base.less';\n\nexport const styles = noop;\n","import { isArray } from '@dimjs/lang';\nimport { getGlobalData } from '@flatbiz/utils';\nimport { FC, Fragment } from 'react';\n\nexport const getPermissionList = () => {\n const { elemAclLimits } = getGlobalData();\n const permissionList: string[] = isArray(elemAclLimits) ? elemAclLimits : [];\n return permissionList;\n};\n\nexport const hasPermission = (name: string) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(name)) {\n return true;\n }\n return false;\n};\n\nexport interface PermissionProps {\n name: string;\n}\nexport const Permission: FC<PermissionProps> = (props) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(props.name)) {\n return <Fragment>{props.children}</Fragment>;\n }\n return null;\n};\n","import { isUndefined } from '@dimjs/lang';\nimport { Button, ButtonProps, Divider, Popconfirm, Space, SpaceProps } from 'antd';\nimport { VFC } from 'react';\nimport { hasPermission } from '../permission';\nimport './style.less';\n\nexport interface ButtonOperateItem extends ButtonProps {\n text: string;\n color?: string;\n onClick: () => void;\n permission?: string;\n needConfirm?: boolean;\n confirmMessage?: string;\n hidden?: boolean;\n}\n\nexport interface ButtonOperateProps {\n operateList: Array<ButtonOperateItem | null>;\n wrap?: boolean;\n size?: SpaceProps['size'];\n}\n\nexport const ButtonOperate: VFC<ButtonOperateProps> = (props) => {\n return (\n <div className=\"table-operate\">\n <Space\n split={<Divider type=\"vertical\" />}\n size={props.size}\n wrap={isUndefined(props.wrap) ? true : props.wrap}\n >\n {props.operateList.map((item, index) => {\n if (!item) return null;\n const {\n text,\n color,\n onClick,\n permission,\n needConfirm,\n confirmMessage,\n hidden,\n style,\n ...otherProps\n } = item;\n if (hidden) return null;\n if (permission && !hasPermission(permission)) return null;\n const newStyle = color ? { color, ...style } : style;\n const type = item.type || 'link';\n if (needConfirm) {\n return (\n <Popconfirm\n title={confirmMessage}\n okText=\"确定\"\n cancelText=\"取消\"\n onConfirm={onClick}\n arrowPointAtCenter={true}\n key={index}\n >\n <Button {...otherProps} onClick={undefined} type={type} danger style={newStyle}>\n {text}\n </Button>\n </Popconfirm>\n );\n }\n return (\n <Button {...otherProps} type={type} style={newStyle} key={index} onClick={onClick}>\n {text}\n </Button>\n );\n })}\n </Space>\n </div>\n );\n};\n\nButtonOperate.defaultProps = {\n size: 0,\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { PickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DatePickerWrapperProps = {\n value?: string;\n onChange?: (value?: string) => void;\n} & Omit<PickerDateProps<moment.Moment>, 'value' | 'onChange'>;\n\n/**\n * DatePicker包装组件\n * ```\n * 1. value类型为 string\n * 2. onChange返回类型 string\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * ```\n */\nexport const DatePickerWrapper: VFC<DatePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n const format = useMemo(() => {\n if (props.format) return props.format as string;\n if (props.showTime) return 'YYYY-MM-DD HH:mm:ss';\n return 'YYYY-MM-DD';\n }, [props.showTime, props.format]);\n\n const onChangeDate = hooks.useCallbackRef((value) => {\n if (value) {\n onChange?.(moment(value).format(format));\n } else {\n onChange?.(undefined);\n }\n });\n\n const datePickerValue = value && flatbizDate.isDate(value) ? moment(new Date(value)) : undefined;\n\n return (\n <DatePicker\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={datePickerValue}\n onChange={onChangeDate}\n />\n );\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { RangePickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DateRangePickerWrapperProps = {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n} & Omit<RangePickerDateProps<moment.Moment>, 'value' | 'onChange'>;\n\n/**\n * DatePicker.RangePicker包装组件\n * ```\n * TODO: 引用DatePicker.RangePicker TS有问题,待解决\n * 1. value类型为 [string, string]\n * 2. onChange返回类型 [string, string]\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * ```\n */\nexport const DateRangePickerWrapper: VFC<DateRangePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n\n const format = useMemo(() => {\n if (props.format) return props.format as string;\n if (props.showTime === true) return 'YYYY-MM-DD HH:mm:ss';\n return 'YYYY-MM-DD';\n }, [props.showTime, props.format]);\n\n const onChangeDate = hooks.useCallbackRef((values) => {\n if (values) {\n const [value1, value2] = values || [];\n onChange?.([moment(value1).format(format), moment(value2).format(format)]);\n } else {\n onChange?.(undefined);\n }\n });\n\n const [date1, date2] = value || [];\n\n const rangePickerValue =\n date1 && date2 && flatbizDate.isDate(date1) && flatbizDate.isDate(date2)\n ? [moment(new Date(date1)), moment(new Date(date2))]\n : undefined;\n\n return (\n <DatePicker.RangePicker\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={rangePickerValue as [moment.Moment, moment.Moment]}\n onChange={onChangeDate}\n />\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationOldProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { DrawerOperation, DrawerOperationOldProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerFormProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationOldProps;\n} & DrawerProps;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWraper: FC<DrawerFormProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整',\n );\n }, []);\n return (\n <Drawer\n className={classNames('drawer-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wraper-content\">{children}</div>\n {pageLoading && <PageLoader />}\n </Drawer>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWraperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWraperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { DependencyList, EffectCallback, useEffect } from 'react';\n\nexport const useEffectCustom = (fn: EffectCallback, deps: DependencyList) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useEffect(fn, deps);\n};\n","import { DependencyList, useEffect } from 'react';\n\nexport const useEffectCustomAsync = (fn: () => Promise<void>, deps: DependencyList) => {\n useEffect(() => {\n async function asyncFunction() {\n await fn();\n }\n void asyncFunction();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport { DrawerOperation, DrawerOperationProps } from './drawer-operation';\nimport './style.less';\n\ntype DrawerWrapperStaticMethods = {\n Content: typeof DrawerWrapperContent;\n Footer: typeof DrawerWrapperFooter;\n};\n\nexport type DrawerWrapperProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n} & Omit<DrawerProps, 'footer'>;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst DrawerWrapperContent: FC<{ operationProps?: DrawerOperationProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"drawer-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <DrawerWrapperFooter>\n <DrawerOperation {...props.operationProps} />\n </DrawerWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst DrawerWrapperFooter = (props) => {\n return <div className=\"drawer-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWrapper: FC<DrawerWrapperProps> & DrawerWrapperStaticMethods = (props) => {\n const { pageLoading, className, width = 600, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('DrawerWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Drawer\n className={classNames('drawer-wrapper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={null}\n >\n {pageLoading && <PageLoader />}\n {children}\n </Drawer>\n );\n};\n\nDrawerWrapper.Content = DrawerWrapperContent;\nDrawerWrapper.Footer = DrawerWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWrapperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWrapperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wrapper';\n","import { FieldSingleConfig } from './type';\n\nexport const getEditable = (editable: FieldSingleConfig['editable'], tableRowIndex: number) => {\n return typeof editable === 'boolean' ? editable : editable?.({ tableRowIndex });\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { Checkbox, Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableCheckboxGroupConfig, EditableFormItemProps } from '../type';\n\ntype CheckboxGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst CheckboxGroupFormItemContent = (props: CheckboxGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableCheckboxGroupConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n if (editable) return [];\n const value = isArray(props.value) ? props.value : ([] as any[]);\n const options = (editableComptProps.options || []) as LabelValueItem[];\n if (!isArray(options) || options.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = options.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.options, props.value]);\n\n if (editable) {\n return <Checkbox.Group {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-checkbox-group-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const CheckboxGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-checkbox-group-form-item', formItemProps?.className)}\n >\n <CheckboxGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { DatePickerWrapper } from '../../date-picker-wrapper';\nimport { EditableDatePickerWrapperConfig, EditableFormItemProps } from '../type';\n\nexport const DatePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-picker-wraper-form-item', formItemProps?.className)}\n >\n <DatePickerWrapper {...(editableConfig as EditableDatePickerWrapperConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { DateRangePickerWrapper } from '../../date-range-picker-wrapper';\nimport { EditableDateRangePickerWrapperConfig, EditableFormItemProps } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableDateRangePickerWrapperConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return undefined;\n return value.join('~');\n }, [editable, props.value]);\n\n if (editable) {\n return <DateRangePickerWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return <span className=\"editable-date-range-picker-view\">{render ? render(props.value) : viewLabel}</span>;\n};\n\nexport const DateRangePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-range-picker-wraper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableInputConfig } from '../type';\n\nexport const InputFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input {...(editableConfig as EditableInputConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form, InputNumber } from 'antd';\nimport { EditableFormItemProps, EditableInputNumberConfig } from '../type';\n\nexport const InputNumberFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-input-number-form-item', formItemProps?.className)}\n >\n <InputNumber {...(editableConfig as EditableInputNumberConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Radio, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, EditableRadioGroupConfig } from '../type';\n\ntype RadioGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number;\n onChange?: (value: string | number) => void;\n};\n\nconst RadioGroupFormItemContent = (props: RadioGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableRadioGroupConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n if (editable) return [];\n const value = props.value;\n const options = (editableComptProps.options || []) as LabelValueItem<string | number>[];\n if (!isArray(options) || options.length === 0) {\n return value;\n }\n const target = options.find((item) => item.value === value);\n return target?.label || value;\n }, [editable, editableComptProps.options, props.value]);\n\n const onChange = hooks.useCallbackRef((e) => {\n props.onChange?.(e.target.value as string | number);\n });\n\n if (editable) {\n return <Radio.Group {...editableComptProps} value={props.value} onChange={onChange} />;\n }\n return (\n <span className=\"editable-radio-group-view\">\n {render ? render(props.value) : viewLabel ? <Tag color=\"#1890ff\">{viewLabel}</Tag> : null}\n </span>\n );\n};\n\nexport const RadioGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-radio-group-form-item', formItemProps?.className)}\n >\n <RadioGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { LabelValueItem } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: LabelValueItem[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['selectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n selectorList: [],\n queryIsEmpty: false,\n requestStatus: 'init',\n};\n\nconst _SelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.selectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.selectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst selectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = selectorWrapperModel('key值').useStore();\n * ```\n */\nexport const selectorWrapperModel = (key: string) => {\n if (!selectorWrapperModels[key]) {\n selectorWrapperModels[key] = Model(_SelectorWrapperModel);\n }\n return selectorWrapperModels[key];\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport {\n arrayField2LabelValue,\n isUndefinedOrNull,\n LabelValueItem,\n TPlainObject,\n valueIsEqual,\n} from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport {\n DependencyList,\n forwardRef,\n ReactElement,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { ModelState, selectorWrapperModel } from './model';\n\ntype SelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type SelectorWrapperProps = Omit<\n SelectProps,\n 'filterOption' | 'onSearch' | 'loading' | 'notFoundContent' | 'options' | 'fieldNames'\n> & {\n // 模型唯一值\n modelKey: string;\n fieldNames?: { label: string; value: string };\n /**\n * useEffect依赖性数组\n */\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorList`后无效果\n */\n serviceConfig?: SelectorServiceConfig;\n /**\n * 同步设置选择器选项列表\n * ```\n * 1. 当设置selectorList后,serviceConfig、operateType=search、onSelectorListChange将失效\n * 2. 不支持异步数据,异步使用serviceConfig方式\n * 3. 如果配置fieldNames,会转换后使用\n * ```\n */\n selectorList?: TPlainObject[];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorListChange?: (dataList: LabelValueItem[]) => void;\n /**\n * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项\n * ```\n */\n showAllOption?: true | JSX.Element;\n /**\n * 输入操作类型,默认值:filter\n * ```\n * 1. search:根据输入项去服务端查询\n * 2. filter:初始化已查询数据,根据输入内容筛选\n * 3. 在设置`selectorList`后,operateType=search将失效\n * ```\n */\n operateType?: 'search' | 'filter';\n // 搜索调接口字段名称,默认值:keyword\n searchFieldName?: string;\n // label渲染适配器\n onLabelRenderAdapter?: (dataItem: LabelValueItem) => string | ReactElement;\n};\n\nexport type SelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getSelectorList: () => LabelValueItem<string | number>[];\n};\n\n/**\n * 选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. modelKey的配置是为了缓存数据;\n * 1.1: 当有effectDependencyList依赖项时,依赖项的发生变化后,每次都会去调用接口获取数据\n * 1.2: 当无effectDependencyList依赖项时,第一次调用接口成功后会有标记,下次访问存在标记,就不在调用接口,使用缓存数据;如果想强制刷新数据,可通过随便配置依赖项完成\n * 2. selectorList属性\n * 2.1 当设置selectorList属性后,serviceConfig、operateType=search、onSelectorListChange将失效\n * 2.2 不支持异步数据,异步使用serviceConfig方式\n * 3. operateType=search状态下,回填数据查询接口时,会在接口中默认添加id字段(id的值为回填的值)\n * ```\n */\nexport const SelectorWrapper = forwardRef<SelectorWrapperRefApi, SelectorWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n showAllOption,\n effectDependencyList,\n onSelectorListChange,\n operateType,\n searchFieldName,\n selectorList,\n modelKey,\n fieldNames,\n ...otherProps\n } = props;\n\n const isSearch = operateType === 'search' && selectorList === undefined;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const changeOperateValueRef = useRef<string | number>();\n const [loading, setLoading] = useState(false);\n const [state, actions] = selectorWrapperModel(modelKey).useStore();\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceRespDataTranslation = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return arrayField2LabelValue(respDataList || [], fieldNames);\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(\n async (inputValue?: string, searchId?: string | number) => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`SelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n if ((!isUndefinedOrNull(inputValue) || !isUndefinedOrNull(searchId)) && isSearch) {\n const keyword = searchFieldName || 'keyword';\n params[keyword] = inputValue;\n params['id'] = searchId;\n }\n const respData = await newServiceConfig.onRequest?.(params);\n const respDataTranslation = serviceRespDataTranslation(respData);\n setLoading(false);\n onSelectorListChange?.(respDataTranslation);\n void actions.setSelectBoxList(respDataTranslation);\n } catch (error) {\n console.error(error);\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n void message.error(error.message || '获取数据异常');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n },\n );\n\n useEffectCustom(() => {\n if (selectorList) {\n void actions.setSelectBoxList(arrayField2LabelValue(selectorList || [], fieldNames));\n return;\n }\n if (isSearch) return;\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = selectorWrapperModel(modelKey).getState();\n\n if (\n newEffectDependencyList.length > 0 ||\n valueIsEqual(realTimeState.requestStatus, ['request-error', 'init'])\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (isSearch) {\n if (valueIsEmpty(props.value as string | number)) {\n onSelectorListChange?.([]);\n void actions.resetSelectBoxList();\n } else {\n // 判断是否由外部回填value数据\n if (props.value !== changeOperateValueRef.current) {\n void startDataSourceRequest(undefined, props.value as string | number);\n }\n }\n }\n }, newEffectDependencyList.concat([props.value]));\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetSelectBoxList();\n },\n getSelectorList: () => {\n return state.selectorList;\n },\n };\n });\n\n const filterOption = hooks.useCallbackRef((input: string, option) => {\n return (option?.children as unknown as string).toLowerCase().indexOf(input.toLowerCase()) >= 0;\n });\n\n const onSearch = hooks.useDebounceCallback((value: string) => {\n if (value) {\n void startDataSourceRequest(value);\n } else {\n void actions.resetSelectBoxList();\n }\n }, 300);\n\n const onChange = hooks.useCallbackRef((value: string | number, ...otherParams) => {\n changeOperateValueRef.current = value;\n props.onChange?.(value, otherParams);\n });\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const selectOptionsAll = <Select.Option value=\"\">全部</Select.Option>;\n return (\n <Select\n showSearch={true}\n allowClear={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n loading={loading}\n onSearch={isSearch ? onSearch : undefined}\n filterOption={isSearch ? false : filterOption}\n onChange={onChange}\n fieldNames={undefined}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n >\n {showAllOption === true ? selectOptionsAll : showAllOption}\n {state.selectorList.map((item) => {\n return (\n <Select.Option value={item.value} label={item.label} key={item.value}>\n {props.onLabelRenderAdapter ? props.onLabelRenderAdapter(item) : item.label}\n </Select.Option>\n );\n })}\n </Select>\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { arrayField2LabelValue, LabelValueItem } from '@flatbiz/utils';\nimport { Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { SelectorWrapper } from '../../selector-wrapper';\nimport { EditableFormItemProps, EditableSelectWrapperConfig } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number | Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableSelectWrapperConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return [];\n const selectorList = arrayField2LabelValue(\n editableComptProps.selectorList || [],\n editableComptProps.fieldNames,\n );\n if (selectorList.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = selectorList.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.fieldNames, editableComptProps.selectorList, props.value]);\n\n if (editable) {\n return <SelectorWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-selector-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const SelectorWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-selector-wrapper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { isBoolean, isNumber, isString } from '@dimjs/lang';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, FieldSingleConfig } from '../type';\n\nconst FormItemTextContent = (props: {\n value?: string | number;\n name: EditableFormItemProps['name'];\n fieldConfig?: FieldSingleConfig;\n}) => {\n const value = useMemo(() => {\n if (props.fieldConfig?.render) return undefined;\n const isBaseData =\n isString(props.value) || isNumber(props.value) || isBoolean(props.value) || !props.value;\n if (!isBaseData) {\n console.warn(`Form.List name:【${props.name}】数据【${JSON.stringify(props.value)}】不能渲染在页面中`);\n }\n return isBaseData ? props.value : undefined;\n }, [props.fieldConfig?.render, props.name, props.value]);\n\n return <span className=\"editable-text-view\">{props.fieldConfig?.render?.(props.value) || value}</span>;\n};\n\nexport const TextFormItem = (props: { name: Array<number | string>; fieldConfig?: FieldSingleConfig }) => {\n return (\n <Form.Item noStyle name={props.name}>\n <FormItemTextContent name={props.name} fieldConfig={props.fieldConfig} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableTextareaConfig } from '../type';\n\nexport const TextAreaFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input.TextArea {...(editableConfig as EditableTextareaConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { classNames, extend } from '@dimjs/utils';\nimport { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile, UploadListType } from 'antd/lib/upload/interface';\nimport { FC, Fragment, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type UploadWrapperFileItem = {\n uid: string;\n name: string;\n url?: string;\n};\n\nexport type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {\n value?: T[];\n onChange?: (value?: T[]) => void;\n onUploadError?: (message?: string) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n uid?: string;\n name?: string;\n url?: string;\n };\n /**\n * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject;\n} & Omit<UploadProps, 'onChange' | 'fileList'>;\n\n/**\n * 文件上传\n * ```\n * 1. 可通过配置children替换默认上传触发布局\n * 2. 接口返回结构:\n * formData上传接口返回值\n * {\n * code: '0000',\n * data: {\n * uid: '唯一值,可使用fileKey值'\n * name: '文件名称'\n * url: '预览地址'\n * }\n * }\n * 3. 如果接口返回的不是上面的字段名称,可通过fieldNames配置接口返回字段名称映射\n *\n * 4. 最佳使用方式,与Form结合使用\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <UploadWrapper action={uploadUrl} />\n * </Form.Item>\n * ```\n *\n */\nexport const UploadWrapper: FC<UploadWrapperProps> = (props) => {\n const { onChange, onUploadError, value, ...otherProps } = props;\n const [uploadList, setUploadList] = useState<UploadWrapperFileItem[]>();\n const fieldNames = extend(\n {\n uid: 'uid',\n name: 'name',\n url: 'url',\n },\n props.fieldNames,\n ) as Required<UploadWrapperFileItem>;\n\n useEffectCustom(() => {\n setUploadList(\n value?.map((item) => {\n return {\n uid: item[fieldNames.uid],\n name: item[fieldNames.name],\n url: item[fieldNames.url],\n };\n }),\n );\n }, [fieldNames.name, fieldNames.uid, fieldNames.url, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n const fileList = info.fileList as TPlainObject[];\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = (\n props.onRequestResultAdapter ? props.onRequestResultAdapter(respData.data) : respData.data\n ) as TPlainObject;\n result[fieldNames.uid] = result[fieldNames.uid] || info.file.uid;\n result[fieldNames.name] = result[fieldNames.name] || info.file.name;\n if (props.maxCount === 1) {\n onChange?.([result]);\n } else {\n onChange?.((value || []).concat(result));\n }\n } else {\n if (onUploadError) {\n onUploadError(respData.message as string);\n } else {\n void message.error((respData.message as string) || '上传操作失败...');\n }\n fileList[fileList.length - 1] = {\n ...fileList[fileList.length - 1],\n status: 'error',\n };\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item[fieldNames.uid];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n if (onUploadError) {\n onUploadError();\n } else {\n void message.error('上传操作失败...');\n }\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadList([...fileList] as UploadWrapperFileItem[]);\n props.onUploadChange?.(info);\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n fileList={uploadList}\n className={classNames('v-upload-wrapper', otherProps.className)}\n >\n {otherProps.disabled ? null : (\n <UploadTrigger listType={otherProps.listType}>{props.children}</UploadTrigger>\n )}\n </Upload>\n );\n};\n\nconst UploadTrigger: FC<{ listType?: UploadListType }> = (props) => {\n if (props.children) return <Fragment>{props.children}</Fragment>;\n if (props.listType === 'picture-card') {\n return (\n <div>\n <PlusOutlined />\n <div style={{ marginTop: 8 }}>上传图片</div>\n </div>\n );\n }\n if (props.listType === 'picture') {\n return (\n <Button type=\"primary\" ghost>\n 选择图片上传\n </Button>\n );\n }\n return (\n <Button type=\"primary\" ghost>\n 选择文件上传\n </Button>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { UploadWrapper } from '../../upload-wrapper';\nimport { EditableFileUploadConfig, EditableFormItemProps } from '../type';\n\nconst UploadWrapperFormItemContent = (\n props: EditableFormItemProps & { value?: any; onChange?: (value?: any) => void },\n) => {\n const { editableConfig, render, editable } = props.fieldConfig;\n const { children, ...otherProps } = (editableConfig as EditableFileUploadConfig).editableComptProps;\n if (editable) {\n return (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} onChange={props.onChange}>\n {children}\n </UploadWrapper>\n );\n }\n return (\n <div className=\"upload-wrapper-selector-view\">\n {render ? (\n render(props.value)\n ) : (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} disabled={true} />\n )}\n </div>\n );\n};\n\nexport const UploadWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-upload-wrapper-form-item', formItemProps?.className)}\n >\n <UploadWrapperFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { extend } from '@dimjs/utils';\nimport { FieldSingleConfig } from '../type';\nimport { getEditable } from '../utils';\nimport { CheckboxGroupFormItem } from './checkbox-group';\nimport { DatePickerWrapperFormItem } from './date-picker-wrapper';\nimport { DateRangePickerWrapperFormItem } from './date-range-picker-wrapper';\nimport { InputFormItem } from './input';\nimport { InputNumberFormItem } from './input-number';\nimport { RadioGroupFormItem } from './radio-group';\nimport { SelectorWrapperFormItem } from './selector-wrapper';\nimport { TextFormItem } from './text';\nimport { TextAreaFormItem } from './textarea';\nimport { UploadWrapperFormItem } from './upload-wrapper';\n\nexport type FormItemAdapterProps = {\n name: Array<number | string>;\n completeName: Array<number | string>;\n fieldConfig: FieldSingleConfig;\n tableRowIndex: number;\n};\n\nexport const FormItemAdapter = (props: FormItemAdapterProps) => {\n const { editableConfig, editable } = props.fieldConfig;\n const newEditable = getEditable(editable, props.tableRowIndex);\n const fieldConfig = extend({}, props.fieldConfig, { editable: newEditable });\n\n const commomProps = {\n name: props.name,\n fieldConfig,\n };\n\n if (editableConfig?.type === 'input' && newEditable) {\n return <InputFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'inputNumber' && newEditable) {\n return <InputNumberFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'textArea' && newEditable) {\n return <TextAreaFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'datePickerWrapper' && newEditable) {\n return <DatePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'dateRangePickerWrapper') {\n return <DateRangePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'selectorWrapper') {\n return <SelectorWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'checkboxGroup') {\n return <CheckboxGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'radioGroup') {\n return <RadioGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'uploadWrapper') {\n return <UploadWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'custom') {\n return editableConfig.editableComptProps({\n name: props.name,\n editable: newEditable,\n completeName: props.completeName,\n });\n }\n return <TextFormItem {...commomProps} />;\n};\n","import { DeleteOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { Button, Form, Space } from 'antd';\nimport { FormItemAdapter } from '../form-item';\nimport { FormListConfig } from '../type';\nimport { getEditable } from '../utils';\n\nexport type FormListProps = {\n name: Array<number | string>;\n formListConfig: FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormList = (props: FormListProps) => {\n const from = Form.useFormInstance();\n const {\n onFormListBeforeRender,\n editableConfigList,\n onFormListAfterRender,\n onFormListItemBeforeRender,\n onFormListItemAfterRender,\n deleteOperateRender,\n } = props.formListConfig;\n return (\n <Form.List name={props.name}>\n {(fields, { add, remove }) => (\n <>\n {onFormListBeforeRender\n ? onFormListBeforeRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n {fields.map((fieldChild, index) => {\n const hasEditable = editableConfigList.find((item) =>\n getEditable(item.editable, props.tableRowIndex),\n );\n const className = classNames(\n 'editable-inner-formlist-item',\n `editable-inner-formlist-item-${props.name[1]}`,\n { 'editable-inner-formlist-item_preview': !hasEditable },\n );\n return (\n <div key={index} className={className}>\n {onFormListItemBeforeRender\n ? onFormListItemBeforeRender({\n add,\n remove: () => {\n remove(index);\n },\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n <Space>\n {editableConfigList.map((fieldItem, index) => {\n return (\n <FormItemAdapter\n name={[fieldChild.name, fieldItem.fieldName]}\n fieldConfig={fieldItem}\n key={index}\n tableRowIndex={props.tableRowIndex}\n completeName={[...props.completeName, fieldChild.name]}\n />\n );\n })}\n {hasEditable ? (\n <DeleteFormListItem\n deleteOperateRender={deleteOperateRender}\n remove={() => {\n remove(index);\n }}\n index={index}\n />\n ) : null}\n </Space>\n {onFormListItemAfterRender\n ? onFormListItemAfterRender({\n add,\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n remove: () => {\n remove(index);\n },\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n </div>\n );\n })}\n {onFormListAfterRender\n ? onFormListAfterRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n </>\n )}\n </Form.List>\n );\n};\n\nconst DeleteFormListItem = (props: {\n deleteOperateRender: FormListConfig['deleteOperateRender'];\n remove: () => void;\n index: number;\n}) => {\n return (\n <Form.Item>\n {props.deleteOperateRender ? (\n props.deleteOperateRender({ remove: props.remove, formListItemIndex: props.index })\n ) : (\n <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={props.remove}>\n 删除\n </Button>\n )}\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { FormItemAdapter } from '../form-item';\nimport { TextFormItem } from '../form-item/text';\nimport { FieldSingleConfig, FormListConfig } from '../type';\nimport { FormList } from './form-list';\n\nexport type FormListItemProps = {\n name: Array<number | string>;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormListItem = (props: FormListItemProps) => {\n if (props.fieldConfig) {\n if (isArray(props.fieldConfig['editableConfigList'])) {\n const formListConfig = props.fieldConfig as FormListConfig;\n return (\n <FormList\n name={props.name}\n completeName={props.completeName}\n formListConfig={formListConfig}\n tableRowIndex={props.tableRowIndex}\n />\n );\n } else {\n return (\n <FormItemAdapter\n name={props.name}\n fieldConfig={props.fieldConfig as FieldSingleConfig}\n tableRowIndex={props.tableRowIndex}\n completeName={props.completeName}\n />\n );\n }\n }\n return <TextFormItem name={props.name} />;\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { Button, Form, Table, TableProps } from 'antd';\nimport { FormListOperation, FormListProps } from 'antd/lib/form/FormList';\nimport { ColumnsType } from 'antd/lib/table';\nimport { Fragment, ReactElement, useMemo } from 'react';\nimport { FormListItem } from './form-list-item';\nimport './style.less';\nimport { EditableTableRecordType, FieldSingleConfig, FormListConfig } from './type';\n\n// export type EditableTableDataSourceItem = FormListFieldData & { operation: FormListOperation };\n\n/**\n * antd 默认render功能此处不能使用\n */\nexport type EditableTableColumn = Omit<ColumnsType['0'], 'render'> & {\n dataIndex?: string;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n /**\n * 配置操作功能处理后,fieldConfig配置将失效\n * ```\n * 1. tableRowIndex:当前row的索引值\n * 1. name:当前row的form.item的name值\n * ```\n */\n operateRender?: (item: {\n tableRowIndex: number;\n name: Array<string | number>;\n operation: FormListOperation;\n }) => ReactElement;\n};\n\nexport type EditableTableProps = {\n name: string;\n /**\n * ```\n * antd table属性\n * 1. 新增cellVerticalAlign,单元格竖直方向对齐方式,设置table column onCell属性后失效\n * ```\n */\n tableProps?: Omit<TableProps<EditableTableRecordType>, 'dataSource' | 'columns' | 'rowKey'> & {\n cellVerticalAlign?: 'baseline' | 'middle' | 'top' | 'bottom';\n };\n columns: EditableTableColumn[];\n onTableBeforeRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;\n /**\n * 设置后,将覆盖底部`新增`按钮\n */\n onTableAfterRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;\n rules?: FormListProps['rules'];\n};\n\nexport const EditableTable = (props: EditableTableProps) => {\n const columns = useMemo(() => {\n if (!props.columns) return [];\n return props.columns.map((columnItem) => {\n const { fieldConfig, operateRender, ...otherColumnItem } = columnItem;\n return {\n onCell: () => {\n return {\n valign: props.tableProps?.cellVerticalAlign || 'middle',\n };\n },\n ...otherColumnItem,\n render: (_value, record) => {\n if (operateRender) {\n return (\n operateRender({\n name: [...props.name, record.name],\n tableRowIndex: record.name,\n operation: record.operation,\n }) || ''\n );\n }\n return (\n <FormListItem\n name={columnItem.dataIndex ? [record.name, columnItem.dataIndex] : [record.name]}\n completeName={\n columnItem.dataIndex\n ? [...props.name, record.name, columnItem.dataIndex]\n : [...props.name, record.name]\n }\n fieldConfig={fieldConfig}\n tableRowIndex={record.name}\n />\n );\n },\n };\n }) as ColumnsType<EditableTableRecordType>;\n }, [props.columns, props.name, props.tableProps?.cellVerticalAlign]);\n\n return (\n <div className=\"editable-table\">\n <Form.List name={props.name} rules={props.rules}>\n {(fields, formListOperation) => {\n return (\n <Fragment>\n {props.onTableBeforeRender ? props.onTableBeforeRender(formListOperation, fields.length) : null}\n <Table\n scroll={{ x: 'max-content' }}\n pagination={false}\n {...props.tableProps}\n dataSource={fields.map((item) => ({ ...item, operation: formListOperation }))}\n columns={columns}\n rowKey=\"key\"\n />\n {props.onTableAfterRender ? (\n props.onTableAfterRender(formListOperation, fields.length)\n ) : (\n <Button\n type=\"dashed\"\n onClick={() => formListOperation.add()}\n block\n icon={<PlusOutlined />}\n style={{ marginTop: 15 }}\n >\n 新增\n </Button>\n )}\n </Fragment>\n );\n }}\n </Form.List>\n </div>\n );\n};\n","import { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { FC, useState } from 'react';\n\nexport type FileImportProps = {\n onImportFinish: (data?: any) => void;\n} & Omit<\n UploadProps,\n | 'fileList'\n | 'showUploadList'\n | 'itemRender'\n | 'listType'\n | 'multiple'\n | 'previewFile'\n | 'progress'\n | 'onChange'\n | 'onDownload'\n | 'onRemove'\n | 'onPreview'\n | 'directory'\n | 'customRequest'\n | 'defaultFileList'\n | 'iconRender'\n>;\n\n/**\n * 文件导入\n * ```\n * 默认值:\n * name: 'file',\n * accept: '.xlsx,.xls',\n * ```\n */\nexport const FileImport: FC<FileImportProps> = (props) => {\n const { onImportFinish, ...otherProps } = props;\n\n const [loading, setLoading] = useState(false);\n\n const onChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'uploading') {\n setLoading(true);\n } else if (info.file.status === 'done') {\n setLoading(false);\n const respData = info.file.response;\n if (respData.code === '0000') {\n onImportFinish(respData.data);\n } else {\n void message.error((respData.message as string) || '文件导入异常...');\n }\n }\n });\n\n return (\n <Upload showUploadList={false} maxCount={1} {...otherProps} onChange={onChange}>\n {props.children ? (\n props.children\n ) : (\n <Button type=\"primary\" ghost loading={loading}>\n 选择文件\n </Button>\n )}\n </Upload>\n );\n};\n\nFileImport.defaultProps = {\n name: 'file',\n accept: '.xlsx,.xls',\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames, extend } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile } from 'antd/lib/upload/interface';\nimport { FC, useEffect, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type FileUploadItem = {\n fileKey: string;\n fileName: string;\n};\n\ntype AntdFileUploadItem = {\n uid: string;\n name: string;\n fileKey: string;\n};\n\nexport type FileUploadProps = {\n onChange?: (value?: FileUploadItem[]) => void;\n onUploadError?: (message?: string) => void;\n value?: FileUploadItem[];\n onPreview?: (item: FileUploadItem) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n fileKey?: string;\n fileName?: string;\n };\n} & Omit<UploadProps, 'onChange' | 'fileList' | 'onPreview'>;\n\n/**\n * 文件上传,结合Form使用最佳\n * ```\n * 接口返回结构:\n * formData上传接口必须返回fileKey值\n * {\n * code: '0000',\n * data: {\n * fileKey: '预览文件对应的fileKey'\n * }\n * }\n * 可通过fieldNames配置接口返回值属性名称映射\n * ```\n * ```\n * 最佳使用方式:\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <FileUpload action={uploadUrl} onPreview={onPreviewFile}>\n * <Button type=\"primary\">选择文件导入</Button>\n * </FileUpload>\n * </Form.Item>\n * ```\n *\n */\nexport const FileUpload: FC<FileUploadProps> = (props) => {\n useEffectCustom(() => {\n console.error('@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换');\n }, []);\n\n const { onChange, onUploadError, onPreview, value, ...otherProps } = props;\n const [uploadValue, setUploadValue] = useState<AntdFileUploadItem[]>([]);\n const fieldNames = extend(\n {\n fileKey: 'fileKey',\n fileName: 'fileName',\n },\n props.fieldNames,\n ) as FileUploadItem;\n\n useEffect(() => {\n if (value && isArray(value)) {\n setUploadValue(\n value.map((item) => {\n return {\n uid: item['uid'] || item[fieldNames.fileKey],\n name: item[fieldNames.fileName],\n fileKey: item[fieldNames.fileKey],\n url: item[fieldNames.fileKey],\n thumbUrl: item[fieldNames.fileKey],\n };\n }),\n );\n }\n }, [fieldNames.fileKey, fieldNames.fileName, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = respData.data || {};\n const uploadItem = {\n uid: info.file.uid,\n fileName: result[fieldNames.fileName] || (info.file.name as string),\n fileKey: result[fieldNames.fileKey],\n } as FileUploadItem;\n const respValue = (value || []).concat(uploadItem);\n onChange?.(respValue as unknown as FileUploadItem[]);\n } else {\n onUploadError?.(respData.message as string);\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item['uid'] || item[fieldNames.fileKey];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n onUploadError?.();\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadValue([...info.fileList]);\n props.onUploadChange?.(info);\n });\n\n const onUploadPreview = hooks.useCallbackRef((file) => {\n onPreview?.({\n fileKey: file[fieldNames.fileKey],\n fileName: file[fieldNames.fileName],\n });\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n onPreview={onUploadPreview}\n fileList={uploadValue}\n className={classNames('v-file-upload', otherProps.className)}\n >\n {props.children}\n </Upload>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { isUndefinedOrNull } from '@flatbiz/utils';\nimport { cloneElement, CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type FlexLayoutProps = {\n className?: string;\n fullIndex?: number | number[];\n direction?: 'vertical' | 'horizontal';\n onClick?: () => void;\n style?: CSSProperties;\n gap?: number;\n};\n/**\n * flex布局\n * 1. direction:默认值vertical\n * 2. gap间隙距离\n * 3. fullIndex:指定children数组索引值对象flex=1\n * 4. children添加key熟悉\n * @param props\n * @returns\n */\nexport const FlexLayout: FC<FlexLayoutProps> = (props) => {\n const childrens = (isArray(props.children) ? props.children : [props.children]) as JSX.Element[];\n const direction = props.direction || 'vertical';\n const gap = props.gap ? props.gap : 0;\n const fullIndexList = !isUndefinedOrNull(props.fullIndex)\n ? isArray(props.fullIndex)\n ? props.fullIndex\n : [props.fullIndex as number]\n : [];\n return (\n <div\n className={classNames('v-flex-layout', `v-flex-${direction}`, props.className)}\n style={props.style}\n onClick={props.onClick}\n >\n {childrens.map((children, index) => {\n const childrenStyle = children.props.style || {};\n const style = fullIndexList.includes(index) ? { flex: 1, ...childrenStyle } : childrenStyle;\n if (index < childrens.length - 1 && gap > 0) {\n if (direction === 'horizontal') {\n style.marginRight = gap;\n } else {\n style.marginBottom = gap;\n }\n }\n return cloneElement(children, { style, key: index });\n })}\n </div>\n );\n};\n","import { CSSProperties, VFC } from 'react';\n\nexport type GapProps = {\n height?: number;\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * 间隙组件\n * @param props\n * @returns\n */\nexport const Gap: VFC<GapProps> = (props) => {\n return <div style={{ height: props.height, ...props.style }} className={props.className} />;\n};\n","import { classNames } from '@dimjs/utils';\nimport { Tooltip } from 'antd';\nimport { CSSProperties, VFC } from 'react';\nimport './style.less';\n\nexport type IconWrapperProps = {\n hoverTips?: string;\n icon?: React.ReactNode;\n style?: CSSProperties;\n text?: string | React.ReactElement;\n className?: string;\n size?: 'small' | 'middle' | 'large';\n};\nexport const IconWrapper: VFC<IconWrapperProps> = (props) => {\n return (\n <Tooltip title={props.hoverTips}>\n <div\n className={classNames('icon-wrapper', `icon-wrapper-${props.size || 'middle'}`, props.className)}\n style={props.style}\n >\n {props.icon}\n {props.text ? <span className=\"icon-wrapper-text\">{props.text}</span> : null}\n </div>\n </Tooltip>\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { ModalOperation, ModalOperationProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalFormProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationProps;\n footer?: null | React.ReactNode;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWraper: FC<ModalFormProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\n\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整',\n );\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n <div className=\"modal-wraper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wraper-content-footer\">\n {footer ? footer : <ModalOperation {...operationProps} />}\n </div>\n )}\n </Modal>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n/**\n * 组件单词写错,请输入\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWraperModel('key值').useStore();\n * ```\n */\nexport const createModalWraperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationOldProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModalOperation, ModalOperationOldProps } from './modal-operation';\nimport './style.less';\n\ntype ModalWrapperStaticMethods = {\n Content: typeof ModalWrapperContent;\n Footer: typeof ModalWrapperFooter;\n};\n\nexport type ModalWrapperProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst ModalWrapperContent: FC<{ operationProps?: ModalOperationOldProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"modal-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <ModalWrapperFooter>\n <ModalOperation {...props.operationProps} />\n </ModalWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst ModalWrapperFooter = (props) => {\n return <div className=\"modal-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWrapper: FC<ModalWrapperProps> & ModalWrapperStaticMethods = (props) => {\n const { pageLoading, className, width, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('ModalWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wrapper', className)}\n keyboard={false}\n forceRender={true}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n {children}\n {pageLoading && <PageLoader />}\n </Modal>\n );\n};\n\nModalWrapper.Content = ModalWrapperContent;\nModalWrapper.Footer = ModalWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWrapperModel('key值').useStore();\n * ```\n */\nexport const createModalWrapperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wrapper';\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type PageFixedFooterProps = {\n className?: string;\n style?: CSSProperties;\n};\n\nexport const PageFixedFooter: FC<PageFixedFooterProps> = (props) => {\n return (\n <div className={classNames('page-fixed-footer', props.className)} style={props.style}>\n {props.children}\n </div>\n );\n};\n","export const Page404 = () => {\n return <div className=\"v-404\">404</div>;\n};\n","import './style.less';\n/**\n * 使用在Form组件上,预定义form-item label宽度\n */\nexport const formClassName = {\n label_width_70: 'form-label-70',\n label_width_80: 'form-label-80',\n label_width_90: 'form-label-90',\n label_width_100: 'form-label-100',\n label_width_110: 'form-label-110',\n label_width_120: 'form-label-120',\n label_width_130: 'form-label-130',\n label_width_auto: 'form-label-auto',\n};\n\n/**\n * 使用在Form.Item组件上,预定义form-item label宽度\n */\nexport const formItemClassName = {\n label_width_70: 'form-item-label-70',\n label_width_80: 'form-item-label-80',\n label_width_90: 'form-item-label-90',\n label_width_100: 'form-item-label-100',\n label_width_110: 'form-item-label-110',\n label_width_120: 'form-item-label-120',\n label_width_130: 'form-item-label-130',\n label_width_auto: 'form-item-label-auto',\n};\n","import { formClassName, formItemClassName } from './form';\n\n/**\n * 预定义className\n * ```\n * form: 使用在Form组件上,设置form-item label宽度\n * formItem: 使用在Form.Item组件上,设置form-item label宽度\n * ```\n */\nexport const preDefinedClassName = {\n form: formClassName,\n formItem: formItemClassName,\n};\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC, ReactElement } from 'react';\nimport './style.less';\n\nexport type SimpleLayoutProps = {\n className?: string;\n style?: CSSProperties;\n title?: string | ReactElement;\n desc?: string | ReactElement;\n formLabelAlign?: 'left' | 'right';\n layoutType?: 'layer' | 'tight';\n titleLeftLine?: boolean;\n};\n\n/**\n * 简单布局\n * @param props\n * @returns\n * ```\n * 1. layoutType 布局类型\n * layer:分层布局\n * tight:紧凑布局\n * ```\n */\nexport const SimpleLayout: FC<SimpleLayoutProps> = (props) => {\n const labelAlign = props.formLabelAlign || 'right';\n const className = classNames(\n 'simple-layout',\n {\n 'simple-layout-tight': props.layoutType === 'tight',\n 'simple-layout-formlabel-left': labelAlign === 'left',\n },\n props.className,\n );\n\n const titleClassName = classNames('simple-layout-title', {\n 'simple-layout-title-sign': props.titleLeftLine,\n });\n\n return (\n <div className={className} style={props.style}>\n {props.title ? <div className={titleClassName}>{props.title}</div> : null}\n {props.desc ? <div className=\"simple-layout-desc\">{props.desc}</div> : null}\n {props.children ? <div className=\"simple-layout-content\">{props.children}</div> : null}\n </div>\n );\n};\n\nSimpleLayout.defaultProps = {\n titleLeftLine: true,\n layoutType: 'layer',\n};\n","import { classNames } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { FC, useEffect, useMemo, useState } from 'react';\n\nexport interface SmsCountDownProps {\n onSendRequest: () => Promise<void>; // 验证码请求函数\n totalTicks?: number; // 总倒计时,默认:60(s)\n duration?: number; // 倒计时间隔,默认:1000ms(1s)\n autoStart?: boolean; // 是否自动开始倒计时,默认:fasle,注意:不会自动调用 onSendRequest\n format?: string; // 倒计时格式化,默认:'{t}s'\n sendTxt?: string; // 文案,默认:'获取验证码'\n sentTxt?: string; // 倒计时完成文案,默认:'重新获取'\n processingTxt?: string; // 倒计时中文案,默认:'发送中...'\n onTick?: (time: number) => void; // 倒计时回调\n className?: string;\n}\nexport const SmsCountDown: FC<SmsCountDownProps> = (props) => {\n const [showMessage, setShowMessage] = useState<string>();\n\n const [running, setRunning] = useState(false);\n const [starting, setStarting] = useState(false);\n\n // 初始化设置有效\n const initConfig = useMemo<Omit<SmsCountDownProps, 'onSendRequest' | 'onTick' | 'className'>>(() => {\n return {\n sendTxt: props.sendTxt,\n sentTxt: props.sentTxt,\n processingTxt: props.processingTxt,\n format: props.format,\n autoStart: props.autoStart,\n totalTicks: props.totalTicks,\n duration: props.duration,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const format = initConfig.format as string;\n const totalTicks = initConfig.totalTicks as number;\n const duration = initConfig.duration as number;\n\n const countdownFnc = hooks.useCountdownCallback(\n (num) => {\n const second = num / 1000;\n if (num > 0) {\n if (!running) {\n setRunning(true);\n }\n setShowMessage(format.replace('{t}', String(second)));\n props.onTick?.(second);\n } else if (num === 0) {\n setRunning(false);\n setStarting(false);\n props.onTick?.(second);\n setShowMessage(initConfig.sentTxt);\n }\n },\n totalTicks * 1000,\n { intervalTime: duration },\n );\n\n useEffect(() => {\n if (!initConfig.autoStart) {\n setShowMessage(initConfig.sendTxt);\n } else {\n countdownFnc();\n setStarting(true);\n setRunning(true);\n }\n }, [countdownFnc, initConfig]);\n\n const onStart = hooks.useCallbackRef(() => {\n if (running || starting) return;\n setStarting(true);\n setShowMessage(initConfig.processingTxt);\n void props\n .onSendRequest()\n .then(() => {\n setRunning(true);\n countdownFnc();\n })\n .catch(() => {\n setShowMessage(initConfig.sendTxt);\n setStarting(false);\n });\n });\n\n const className = classNames('v-count-down', props.className, {\n running,\n starting,\n });\n\n return (\n <div className={className} onClick={onStart}>\n {showMessage}\n </div>\n );\n};\n\nSmsCountDown.defaultProps = {\n totalTicks: 60,\n duration: 1000,\n autoStart: false,\n format: '{t}s',\n sendTxt: '获取验证码',\n sentTxt: '重新获取',\n processingTxt: '发送中...',\n};\n","import { classNames } from '@dimjs/utils';\nimport { Children, cloneElement, FC } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\ntype StaticMethods = {\n Condition: typeof Condition;\n Operate: typeof Operate;\n Table: typeof Table;\n Footer: typeof Footer;\n};\n\nconst overdueConsole = () => {\n console.error('@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代');\n};\n\nexport type TableFilterLayoutProps = {\n className?: string;\n isFixed?: boolean;\n fullIndex?: number;\n};\n\nexport const TableFilterLayout: FC<TableFilterLayoutProps> & StaticMethods = (props) => {\n useEffectCustom(() => {\n overdueConsole();\n }, []);\n\n return (\n <div\n className={classNames(\n 'table-filter-layout',\n { 'table-filter-layout-flex': props.isFixed },\n props.className,\n )}\n >\n {Children.map(props.children, (item, index) => {\n if (props.isFixed && index === props.fullIndex) {\n return cloneElement(item as JSX.Element, { className: 'table-filter-layout-flex-full' });\n }\n return item;\n })}\n </div>\n );\n};\n\nconst Condition: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-condition', props.className)}>{props.children}</div>;\n};\n\nconst Operate: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-operate', props.className)}>{props.children}</div>;\n};\n\nconst Table: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-table', props.className)}>{props.children}</div>;\n};\nconst Footer: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-footer', props.className)}>{props.children}</div>;\n};\n\nTableFilterLayout.Condition = Condition;\nTableFilterLayout.Operate = Operate;\nTableFilterLayout.Table = Table;\nTableFilterLayout.Footer = Footer;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport type ModelState = {\n treeSelectorList: TSetDefaultDefined<TreeSelectProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['treeSelectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeSelectorList: [],\n queryIsEmpty: false,\n};\n\nconst TreeSelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.treeSelectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.treeSelectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeSelectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeSelectorWrapperModel('key值').useStore();\n * ```\n */\nexport const treeSelectorWrapperModel = (key: string) => {\n if (!treeSelectorWrapperModels[key]) {\n treeSelectorWrapperModels[key] = Model(TreeSelectorWrapperModel);\n }\n return treeSelectorWrapperModels[key];\n};\n","import { isArray } from '@dimjs/lang';\nimport { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: TreeSelectProps['fieldNames'],\n) => {\n if (!isArray(treeList) || treeList.length === 0) return [];\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { isArray } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { isUndefinedOrNull, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, TreeSelect, TreeSelectProps } from 'antd';\nimport { DependencyList, forwardRef, useEffect, useImperativeHandle, useMemo, useState } from 'react';\nimport { ModelState, treeSelectorWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\ntype TreeSelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeSelectorWrapperProps = Omit<\n TreeSelectProps,\n 'treeExpandedKeys' | 'treeData' | 'loading' | 'onTreeExpand'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`treeSelectorList`后无效果\n */\n serviceConfig?: TreeSelectorServiceConfig;\n /**\n * 当设置treeSelectorList后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n treeSelectorList?: TreeSelectProps['treeData'];\n /**\n * 通过服务获取数据后回调,当设置`treeSelectorList`后无效果\n */\n onTreeSelectorListChange?: (treeSelectorList?: TreeSelectProps['treeData']) => void;\n};\n\nexport type TreeSelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeSelectorList: () => TreeSelectProps['treeData'];\n};\n\n/**\n * 树选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置treeSelectorList属性后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n */\nexport const TreeSelectorWrapper = forwardRef<TreeSelectorWrapperRefApi, TreeSelectorWrapperProps>(\n (props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n onTreeSelectorListChange,\n treeSelectorList,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [loading, setLoading] = useState(false);\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeSelectorWrapperModel(modelKey).useStore();\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeSelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeSelectProps['treeData'];\n setLoading(false);\n onTreeSelectorListChange?.(respData);\n void actions.setSelectBoxList(respData || []);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (treeSelectorList) {\n void actions.setSelectBoxList(treeSelectorList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeSelectorWrapperModel(modelKey).getState();\n console.log('realTimeState', realTimeState.requestStatus);\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffect(() => {\n if (!isUndefinedOrNull(props.value)) {\n const valueList = isArray(props.value) ? props.value : [props.value];\n if (valueList.length > 0 && state.treeSelectorList.length > 0) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(\n tempValue as string | number,\n state.treeSelectorList,\n props.fieldNames,\n );\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }\n }, [state.treeSelectorList, props.fieldNames, props.value]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.setSelectBoxList([]);\n },\n getTreeSelectorList: () => {\n return state.treeSelectorList;\n },\n };\n });\n\n const onTreeExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n return (\n <TreeSelect\n dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}\n showSearch={true}\n treeLine={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n treeExpandedKeys={treeExpandedKeys}\n treeData={state.treeSelectorList}\n loading={loading}\n onTreeExpand={onTreeExpand}\n style={{ width: '100%', ...otherProps.style }}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n />\n );\n },\n);\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeProps } from 'antd';\n\nexport type ModelState = {\n treeList: TSetDefaultDefined<TreeProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setTreeList: ModelState['treeList'];\n resetTreeList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeList: [],\n queryIsEmpty: false,\n};\n\nconst TreeWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setTreeList: (params) => {\n return (state) => {\n state.treeList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetTreeList: () => {\n return (state) => {\n state.treeList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeWrapperModel('key值').useStore();\n * ```\n */\nexport const treeWrapperModel = (key: string) => {\n if (!treeWrapperModels[key]) {\n treeWrapperModels[key] = Model(TreeWrapperModel);\n }\n return treeWrapperModels[key];\n};\n","import { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: { label?: string; value?: string; children?: string },\n) => {\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { isArray } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { isUndefinedOrNull, TPlainObject, treeToTiledArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Spin, Tree, TreeProps } from 'antd';\nimport { DependencyList, forwardRef, useImperativeHandle, useMemo, useState } from 'react';\nimport { ModelState, treeWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\n\ntype TreeServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeWrapperProps = Omit<\n TreeProps,\n | 'expandedKeys'\n | 'treeData'\n | 'onExpand'\n | 'selectedKeys'\n | 'checkedKeys'\n | 'onCheck'\n | 'onSelect'\n | 'defaultCheckedKeys'\n | 'defaultSelectedKeys'\n | 'fieldNames'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorTreeList`后无效果\n */\n serviceConfig?: TreeServiceConfig;\n /**\n * 当设置selectorTreeList后,serviceConfig将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n selectorTreeList?: TreeProps['treeData'];\n value?: string | number | Array<string | number>;\n onChange?: (selectedKey: string | number | Array<string | number>) => void;\n fieldNames?: { label?: string; value?: string; children?: string };\n /**\n * 打开tree折叠过滤关键字\n */\n filterLabel?: string;\n};\n\nexport type TreeWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeDataList: () => TreeProps['treeData'];\n};\n\n/**\n * 树包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置selectorTreeList属性后,serviceConfig、onSelectorListChange将失效\n * ```\n */\nexport const TreeWrapper = forwardRef<TreeWrapperRefApi, TreeWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n selectorTreeList,\n value,\n onChange,\n fieldNames,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeWrapperModel(modelKey).useStore();\n const [loading, setLoading] = useState(false);\n\n const valueList = useMemo(() => {\n if (isUndefinedOrNull(props.value)) return undefined;\n return (isArray(props.value) ? props.value : [props.value]) as Array<string | number>;\n }, [props.value]);\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeProps['treeData'];\n void actions.setTreeList(respData || []);\n setLoading(false);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (selectorTreeList) {\n void actions.setTreeList(selectorTreeList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (valueList && valueList.length > 0 && state.treeList.length > 0 && !treeExpandedKeys) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(tempValue, state.treeList, props.fieldNames);\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }, [state.treeList, props.fieldNames, value]);\n\n hooks.useUpdateEffect(() => {\n if (props.filterLabel) {\n const tiledArray = treeToTiledArray(state.treeList || [], props.fieldNames);\n const targetList = tiledArray.filter((item) => item.label?.includes(props.filterLabel || ''));\n let expandedKeys = [] as Array<string | number>;\n targetList.map((tempItem) => {\n const targetValues = getExpandedKeys(\n tempItem.value as string,\n state.treeList || [],\n props.fieldNames,\n );\n const valueList = targetValues.map((item) => item.value);\n expandedKeys = expandedKeys.concat(valueList);\n });\n setTreeExpandedKeys(Array.from(new Set(expandedKeys)));\n } else {\n setTreeExpandedKeys([]);\n }\n }, [props.filterLabel]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetTreeList();\n },\n getTreeDataList: () => {\n return state.treeList;\n },\n };\n });\n\n const onExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n const onCheck = hooks.useCallbackRef((checkedKeys) => {\n onChange?.(checkedKeys as Array<string | number>);\n });\n const onSelect = hooks.useCallbackRef((checkedKeys) => {\n if (props.multiple) {\n onChange?.(checkedKeys as Array<string | number>);\n } else {\n onChange?.(checkedKeys[0] as string | number);\n }\n });\n\n const treeFieldNames = useMemo(() => {\n const newFieldNames = extend({ label: 'label', value: 'value', children: 'children' }, fieldNames);\n return { title: newFieldNames.label, key: newFieldNames.value, children: newFieldNames.children };\n }, [fieldNames]);\n\n if (state.treeList.length > 0) {\n return (\n <Tree\n showLine={otherProps.checkable ? false : { showLeafIcon: false }}\n {...otherProps}\n fieldNames={treeFieldNames}\n expandedKeys={treeExpandedKeys}\n treeData={state.treeList}\n onExpand={onExpand}\n selectedKeys={otherProps.checkable ? undefined : valueList}\n checkedKeys={otherProps.checkable ? valueList : undefined}\n onCheck={otherProps.checkable ? onCheck : undefined}\n onSelect={otherProps.checkable ? undefined : onSelect}\n style={{ width: '100%', ...otherProps.style }}\n />\n );\n }\n\n return (\n <NotFoundContent\n requestStatus={state.requestStatus}\n loading={loading}\n onAgainRequest={startDataSourceRequest}\n />\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n loading: boolean;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <div className=\"tree-wrapper-empty\">\n <Spin spinning={props.loading}></Spin>\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={description}>\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n </div>\n );\n};\n"],"names":["styles","noop","getPermissionList","_getGlobalData","getGlobalData","elemAclLimits","permissionList","_isArray","hasPermission","name","includes","Permission","props","_jsx","Fragment","children","ButtonOperate","className","Space","split","Divider","type","size","wrap","_isUndefined","operateList","map","item","index","text","color","onClick","permission","needConfirm","confirmMessage","hidden","style","otherProps","_excluded","newStyle","_extends","Popconfirm","title","okText","cancelText","onConfirm","arrowPointAtCenter","Button","undefined","danger","_createElement","key","defaultProps","DatePickerWrapper","value","onChange","format","useMemo","showTime","onChangeDate","_hooks","useCallbackRef","moment","datePickerValue","flatbizDate","isDate","Date","DatePicker","width","DateRangePickerWrapper","values","value1","_ref","value2","date1","_ref2","date2","rangePickerValue","RangePicker","DrawerModel","actions","openDrawerForm","itemData","operateType","pageLoading","state","visible","closeDrawer","setDrawerItemData","params","DrawerOperation","_jsxs","cancelButtonProps","onCancel","hideOkBtn","icon","_SaveOutlined","okButtonProps","onOk","loading","PageLoader","DrawerWraper","_props$width","footer","operationProps","useEffect","console","error","Drawer","_classNames","keyboard","forceRender","destroyOnClose","contentWrapperStyle","maxWidth","drawerModels","createDrawerWraperModel","Model","useEffectCustom","fn","deps","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","DrawerWrapperContent","DrawerWrapperFooter","DrawerWrapper","Error","Content","Footer","createDrawerWrapperModel","getEditable","editable","tableRowIndex","CheckboxGroupFormItemContent","fieldConfig","editableConfig","render","editableComptProps","viewLabelList","options","length","label","returnList","forEach","target","find","temp","push","Checkbox","Group","tag","Tag","CheckboxGroupFormItem","formItemProps","Form","Item","DatePickerWrapperFormItem","FormItemContent","viewLabel","join","DateRangePickerWrapperFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","defaultState","selectorList","queryIsEmpty","requestStatus","_SelectorWrapperModel","setSelectBoxList","resetSelectBoxList","changeRequestStatus","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","forwardRef","ref","serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","modelKey","fieldNames","isSearch","newServiceConfig","newEffectDependencyList","changeOperateValueRef","useRef","useState","_useState","setLoading","_selectorWrapperModel","useStore","valueIsEmpty","isUndefinedOrNull","serviceRespDataTranslation","respData","respDataList","onRequestResultAdapter","arrayField2LabelValue","startDataSourceRequest","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","_respData","respDataTranslation","$Try_1_Post","$Try_1_Catch","message","onRequest","_extend","warn","$Try_2_Post","$Try_2_Catch","$await_3","realTimeState","getState","valueIsEqual","current","concat","useImperativeHandle","onClearSelectorList","getSelectorList","filterOption","input","option","toLowerCase","indexOf","onSearch","useDebounceCallback","_len","arguments","otherParams","Array","_key","onAgainRequest","selectOptionsAll","Select","Option","showSearch","allowClear","notFoundContent","NotFoundContent","suffixIcon","_RedoOutlined","spin","onLabelRenderAdapter","description","Empty","image","PRESENTED_IMAGE_SIMPLE","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isString","_isNumber","_isBoolean","JSON","stringify","TextFormItem","noStyle","TextAreaFormItem","TextArea","UploadWrapper","onUploadError","uploadList","setUploadList","uid","url","onUploadChange","info","fileList","file","status","response","code","result","data","maxCount","targetList","targetIndex","findIndex","tempUid","splice","Upload","disabled","UploadTrigger","listType","marginTop","ghost","UploadWrapperFormItemContent","_objectWithoutPropertiesLoose","_editableComptProps","UploadWrapperFormItem","FormItemAdapter","newEditable","commomProps","completeName","FormList","from","useFormInstance","formListConfig","onFormListBeforeRender","editableConfigList","onFormListAfterRender","onFormListItemBeforeRender","onFormListItemAfterRender","deleteOperateRender","List","fields","add","remove","_Fragment","getFieldValue","fieldChild","hasEditable","formListItemIndex","fieldItem","fieldName","DeleteFormListItem","_DeleteOutlined","FormListItem","EditableTable","_props$tableProps2","columns","columnItem","operateRender","otherColumnItem","onCell","_props$tableProps","valign","tableProps","cellVerticalAlign","_value","record","operation","dataIndex","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","FileImport","onImportFinish","showUploadList","accept","FileUpload","onPreview","uploadValue","setUploadValue","fileKey","fileName","thumbUrl","uploadItem","respValue","onUploadPreview","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","height","IconWrapper","Tooltip","hoverTips","ModalModel","openModalForm","closeModal","setModalItemData","ModalOperation","_ref$okText","_ref$cancelText","ModalWraper","Modal","modalModels","createModalWraperModel","ModalWrapperContent","ModalWrapperFooter","ModalWrapper","createModalWrapperModel","PageFixedFooter","Page404","formClassName","label_width_70","label_width_80","label_width_90","label_width_100","label_width_110","label_width_120","label_width_130","label_width_auto","formItemClassName","preDefinedClassName","form","formItem","SimpleLayout","labelAlign","formLabelAlign","layoutType","titleClassName","titleLeftLine","desc","SmsCountDown","showMessage","setShowMessage","running","_useState2","setRunning","starting","_useState3","setStarting","initConfig","sendTxt","sentTxt","processingTxt","autoStart","totalTicks","duration","countdownFnc","useCountdownCallback","num","second","replace","String","onTick","intervalTime","onStart","onSendRequest","catch","overdueConsole","TableFilterLayout","isFixed","Children","Condition","Operate","treeSelectorList","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","log","valueList","expandedKeys","tempValue","prev","mergeList","Set","getTreeSelectorList","onTreeExpand","TreeSelect","dropdownStyle","maxHeight","overflow","treeLine","treeData","TreeWrapperModel","setTreeList","resetTreeList","treeWrapperModels","treeWrapperModel","TreeWrapper","selectorTreeList","_treeWrapperModel$use","useUpdateEffect","filterLabel","filter","_item$label","tempItem","targetValues","getTreeDataList","onExpand","onCheck","checkedKeys","onSelect","multiple","treeFieldNames","newFieldNames","Tree","showLine","checkable","showLeafIcon","selectedKeys","Spin","spinning"],"mappings":";68CAIO,IAAMA,GAASC,sYCATC,IAAAA,GAAoB,SAApBA,IACX,IAAAC,EAA0BC,IAAlBC,IAAAA,cACR,IAAMC,EAA2BC,EAAQF,GAAiBA,EAAgB,GAC1E,OAAOC,OAGIE,GAAgB,SAAhBA,EAAiBC,GAC5B,IAAMH,EAAiBJ,KACvB,GAAII,EAAeI,SAASD,GAAO,CACjC,OAAO,KAET,OAAO,WAMIE,GAAkC,SAAlCA,EAAmCC,GAC9C,IAAMN,EAAiBJ,KACvB,GAAII,EAAeI,SAASE,EAAMH,MAAO,CACvC,OAAOI,EAACC,EAAD,CAAAC,SAAWH,EAAMG,WAE1B,OAAO,yGCJIC,GAAyC,SAAzCA,EAA0CJ,GACrD,OACEC,EAAA,MAAA,CAAKI,UAAU,gBAAfF,SACEF,EAACK,EAAD,CACEC,MAAON,EAACO,EAAD,CAASC,KAAK,aACrBC,KAAMV,EAAMU,KACZC,KAAMC,EAAYZ,EAAMW,MAAQ,KAAOX,EAAMW,KAH/CR,SAKGH,EAAMa,YAAYC,KAAI,SAACC,EAAMC,GAC5B,IAAKD,EAAM,OAAO,KAClB,IACEE,EASEF,EATFE,KACAC,EAQEH,EARFG,MACAC,EAOEJ,EAP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AAUpe,EAAWqe,UAAY,MAAQ,CAAEC,aAAc,QACrDte,EAFN,CAGE6J,WAAYoU,EACZjC,aAAcP,EACdmB,SAAU5Z,EAAMmY,SAChByC,SAAUA,EACVW,aAAcve,EAAWqe,UAAY1d,UAAYob,EACjD+B,YAAa9d,EAAWqe,UAAYtC,EAAYpb,UAChDkd,QAAS7d,EAAWqe,UAAYR,EAAUld,UAC1Cod,SAAU/d,EAAWqe,UAAY1d,UAAYod,EAC7Che,MAAKI,GAAA,CAAI4B,MAAO,QAAW/B,EAAWD,UAK5C,OACEvB,EAACoP,GAAD,CACE/E,cAAe7F,EAAM6F,cACrB/E,QAASA,EACTuJ,eAAgBtC,OAKtB,IAAM6C,GAAkB,SAAlBA,EAAmBrP,GAKvB,IAAM0P,EAAc7M,GAAQ,WAC1B,GAAI7C,EAAMsK,gBAAkB,gBAAiB,CAC3C,MAAO,cACF,GAAItK,EAAMsK,gBAAkB,kBAAmB,CACpD,MAAO,OAET,MAAO,UACN,CAACtK,EAAMsK,gBACV,OACEvF,EAAA,MAAA,CAAK1E,UAAU,qBAAfF,SAAA,CACEF,EAACggB,EAAD,CAAMC,SAAUlgB,EAAMuF,UACtBtF,EAAC0P,EAAD,CAAOC,MAAOD,EAAME,uBAAwBH,YAAaA,EAAzDvP,SACGH,EAAMsK,gBAAkB,iBACvBrK,EAACkC,EAAD,CAAQ1B,KAAK,UAAUU,QAASnB,EAAM8O,eAAtC3O,SAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/01-styles/index.ts","@flatbiz/antd/src/permission/index.tsx","@flatbiz/antd/src/button-operate/index.tsx","@flatbiz/antd/src/date-picker-wrapper/index.tsx","@flatbiz/antd/src/date-range-picker-wrapper/index.tsx","@flatbiz/antd/src/drawer-wraper/drawer.model.ts","@flatbiz/antd/src/drawer-wraper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wraper/drawer-wraper.tsx","@flatbiz/antd/src/drawer-wraper/index.ts","@flatbiz/antd/src/drawer-wrapper/drawer.model.ts","@flatbiz/antd/src/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/drawer-wrapper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wrapper/drawer-wrapper.tsx","@flatbiz/antd/src/drawer-wrapper/index.ts","@flatbiz/antd/src/editable-table/utils.ts","@flatbiz/antd/src/editable-table/form-item/checkbox-group.tsx","@flatbiz/antd/src/editable-table/form-item/date-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/date-range-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/input.tsx","@flatbiz/antd/src/editable-table/form-item/input-number.tsx","@flatbiz/antd/src/editable-table/form-item/radio-group.tsx","@flatbiz/antd/src/selector-wrapper/model.ts","@flatbiz/antd/src/selector-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/selector-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/text.tsx","@flatbiz/antd/src/editable-table/form-item/textarea.tsx","@flatbiz/antd/src/upload-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/upload-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/index.tsx","@flatbiz/antd/src/editable-table/form-list-item/form-list.tsx","@flatbiz/antd/src/editable-table/form-list-item/index.tsx","@flatbiz/antd/src/editable-table/index.tsx","@flatbiz/antd/src/file-import/index.tsx","@flatbiz/antd/src/file-upload/index.tsx","@flatbiz/antd/src/flex-layout/index.tsx","@flatbiz/antd/src/gap/index.tsx","@flatbiz/antd/src/icon-wrapper/index.tsx","@flatbiz/antd/src/modal-wraper/modal.model.ts","@flatbiz/antd/src/modal-wraper/modal-operation.tsx","@flatbiz/antd/src/modal-wraper/modal-wraper.tsx","@flatbiz/antd/src/modal-wraper/index.ts","@flatbiz/antd/src/modal-wrapper/modal.model.ts","@flatbiz/antd/src/modal-wrapper/modal-operation.tsx","@flatbiz/antd/src/modal-wrapper/modal-wrapper.tsx","@flatbiz/antd/src/modal-wrapper/index.ts","@flatbiz/antd/src/page-fixed-footer/index.tsx","@flatbiz/antd/src/page404/index.tsx","@flatbiz/antd/src/pre-defined-classname/form/index.tsx","@flatbiz/antd/src/pre-defined-classname/index.ts","@flatbiz/antd/src/simple-layout/index.tsx","@flatbiz/antd/src/sms-count-down/index.tsx","@flatbiz/antd/src/table-filter-layout/index.tsx","@flatbiz/antd/src/tree-selector-wrapper/model.ts","@flatbiz/antd/src/tree-selector-wrapper/utils.ts","@flatbiz/antd/src/tree-selector-wrapper/index.tsx","@flatbiz/antd/src/tree-wrapper/model.ts","@flatbiz/antd/src/tree-wrapper/utils.ts","@flatbiz/antd/src/tree-wrapper/index.tsx"],"sourcesContent":["import { noop } from '@flatbiz/utils';\nimport './1_root.less';\nimport './2_base.less';\n\nexport const styles = noop;\n","import { isArray } from '@dimjs/lang';\nimport { getGlobalData } from '@flatbiz/utils';\nimport { FC, Fragment } from 'react';\n\nexport const getPermissionList = () => {\n const { elemAclLimits } = getGlobalData();\n const permissionList: string[] = isArray(elemAclLimits) ? elemAclLimits : [];\n return permissionList;\n};\n\nexport const hasPermission = (name: string) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(name)) {\n return true;\n }\n return false;\n};\n\nexport interface PermissionProps {\n name: string;\n}\nexport const Permission: FC<PermissionProps> = (props) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(props.name)) {\n return <Fragment>{props.children}</Fragment>;\n }\n return null;\n};\n","import { isUndefined } from '@dimjs/lang';\nimport { Button, ButtonProps, Divider, Popconfirm, Space, SpaceProps } from 'antd';\nimport { VFC } from 'react';\nimport { hasPermission } from '../permission';\nimport './style.less';\n\nexport interface ButtonOperateItem extends ButtonProps {\n text: string;\n color?: string;\n onClick: () => void;\n permission?: string;\n needConfirm?: boolean;\n confirmMessage?: string;\n hidden?: boolean;\n}\n\nexport interface ButtonOperateProps {\n operateList: Array<ButtonOperateItem | null>;\n wrap?: boolean;\n size?: SpaceProps['size'];\n}\n\nexport const ButtonOperate: VFC<ButtonOperateProps> = (props) => {\n return (\n <div className=\"table-operate\">\n <Space\n split={<Divider type=\"vertical\" />}\n size={props.size}\n wrap={isUndefined(props.wrap) ? true : props.wrap}\n >\n {props.operateList.map((item, index) => {\n if (!item) return null;\n const {\n text,\n color,\n onClick,\n permission,\n needConfirm,\n confirmMessage,\n hidden,\n style,\n ...otherProps\n } = item;\n if (hidden) return null;\n if (permission && !hasPermission(permission)) return null;\n const newStyle = color ? { color, ...style } : style;\n const type = item.type || 'link';\n if (needConfirm) {\n return (\n <Popconfirm\n title={confirmMessage}\n okText=\"确定\"\n cancelText=\"取消\"\n onConfirm={onClick}\n arrowPointAtCenter={true}\n key={index}\n >\n <Button {...otherProps} onClick={undefined} type={type} danger style={newStyle}>\n {text}\n </Button>\n </Popconfirm>\n );\n }\n return (\n <Button {...otherProps} type={type} style={newStyle} key={index} onClick={onClick}>\n {text}\n </Button>\n );\n })}\n </Space>\n </div>\n );\n};\n\nButtonOperate.defaultProps = {\n size: 0,\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { PickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DatePickerWrapperProps = {\n value?: string;\n onChange?: (value?: string) => void;\n} & Omit<PickerDateProps<moment.Moment>, 'value' | 'onChange'>;\n\n/**\n * DatePicker包装组件\n * ```\n * 1. value类型为 string\n * 2. onChange返回类型 string\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * ```\n */\nexport const DatePickerWrapper: VFC<DatePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n const format = useMemo(() => {\n if (props.format) return props.format as string;\n if (props.showTime) return 'YYYY-MM-DD HH:mm:ss';\n return 'YYYY-MM-DD';\n }, [props.showTime, props.format]);\n\n const onChangeDate = hooks.useCallbackRef((value) => {\n if (value) {\n onChange?.(moment(value).format(format));\n } else {\n onChange?.(undefined);\n }\n });\n\n const datePickerValue = value && flatbizDate.isDate(value) ? moment(new Date(value)) : undefined;\n\n return (\n <DatePicker\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={datePickerValue}\n onChange={onChangeDate}\n />\n );\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { RangePickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DateRangePickerWrapperProps = {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n} & Omit<RangePickerDateProps<moment.Moment>, 'value' | 'onChange'>;\n\n/**\n * DatePicker.RangePicker包装组件\n * ```\n * TODO: 引用DatePicker.RangePicker TS有问题,待解决\n * 1. value类型为 [string, string]\n * 2. onChange返回类型 [string, string]\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * ```\n */\nexport const DateRangePickerWrapper: VFC<DateRangePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n\n const format = useMemo(() => {\n if (props.format) return props.format as string;\n if (props.showTime === true) return 'YYYY-MM-DD HH:mm:ss';\n return 'YYYY-MM-DD';\n }, [props.showTime, props.format]);\n\n const onChangeDate = hooks.useCallbackRef((values) => {\n if (values) {\n const [value1, value2] = values || [];\n onChange?.([moment(value1).format(format), moment(value2).format(format)]);\n } else {\n onChange?.(undefined);\n }\n });\n\n const [date1, date2] = value || [];\n\n const rangePickerValue =\n date1 && date2 && flatbizDate.isDate(date1) && flatbizDate.isDate(date2)\n ? [moment(new Date(date1)), moment(new Date(date2))]\n : undefined;\n\n return (\n <DatePicker.RangePicker\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={rangePickerValue as [moment.Moment, moment.Moment]}\n onChange={onChangeDate}\n />\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationOldProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { DrawerOperation, DrawerOperationOldProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerFormProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationOldProps;\n} & DrawerProps;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWraper: FC<DrawerFormProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整',\n );\n }, []);\n return (\n <Drawer\n className={classNames('drawer-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wraper-content\">{children}</div>\n {pageLoading && <PageLoader />}\n </Drawer>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWraperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWraperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { DependencyList, EffectCallback, useEffect } from 'react';\n\nexport const useEffectCustom = (fn: EffectCallback, deps: DependencyList) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useEffect(fn, deps);\n};\n","import { DependencyList, useEffect } from 'react';\n\nexport const useEffectCustomAsync = (fn: () => Promise<void>, deps: DependencyList) => {\n useEffect(() => {\n async function asyncFunction() {\n await fn();\n }\n void asyncFunction();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport { DrawerOperation, DrawerOperationProps } from './drawer-operation';\nimport './style.less';\n\ntype DrawerWrapperStaticMethods = {\n Content: typeof DrawerWrapperContent;\n Footer: typeof DrawerWrapperFooter;\n};\n\nexport type DrawerWrapperProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n} & Omit<DrawerProps, 'footer'>;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst DrawerWrapperContent: FC<{ operationProps?: DrawerOperationProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"drawer-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <DrawerWrapperFooter>\n <DrawerOperation {...props.operationProps} />\n </DrawerWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst DrawerWrapperFooter = (props) => {\n return <div className=\"drawer-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWrapper: FC<DrawerWrapperProps> & DrawerWrapperStaticMethods = (props) => {\n const { pageLoading, className, width = 600, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('DrawerWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Drawer\n className={classNames('drawer-wrapper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={null}\n >\n {pageLoading && <PageLoader />}\n {children}\n </Drawer>\n );\n};\n\nDrawerWrapper.Content = DrawerWrapperContent;\nDrawerWrapper.Footer = DrawerWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWrapperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWrapperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wrapper';\n","import { FieldSingleConfig } from './type';\n\nexport const getEditable = (editable: FieldSingleConfig['editable'], tableRowIndex: number) => {\n return typeof editable === 'boolean' ? editable : editable?.({ tableRowIndex });\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { Checkbox, Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableCheckboxGroupConfig, EditableFormItemProps } from '../type';\n\ntype CheckboxGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst CheckboxGroupFormItemContent = (props: CheckboxGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableCheckboxGroupConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n if (editable) return [];\n const value = isArray(props.value) ? props.value : ([] as any[]);\n const options = (editableComptProps.options || []) as LabelValueItem[];\n if (!isArray(options) || options.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = options.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.options, props.value]);\n\n if (editable) {\n return <Checkbox.Group {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-checkbox-group-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const CheckboxGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-checkbox-group-form-item', formItemProps?.className)}\n >\n <CheckboxGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { DatePickerWrapper } from '../../date-picker-wrapper';\nimport { EditableDatePickerWrapperConfig, EditableFormItemProps } from '../type';\n\nexport const DatePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-picker-wraper-form-item', formItemProps?.className)}\n >\n <DatePickerWrapper {...(editableConfig as EditableDatePickerWrapperConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { DateRangePickerWrapper } from '../../date-range-picker-wrapper';\nimport { EditableDateRangePickerWrapperConfig, EditableFormItemProps } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableDateRangePickerWrapperConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return undefined;\n return value.join('~');\n }, [editable, props.value]);\n\n if (editable) {\n return <DateRangePickerWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return <span className=\"editable-date-range-picker-view\">{render ? render(props.value) : viewLabel}</span>;\n};\n\nexport const DateRangePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-range-picker-wraper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableInputConfig } from '../type';\n\nexport const InputFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input {...(editableConfig as EditableInputConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form, InputNumber } from 'antd';\nimport { EditableFormItemProps, EditableInputNumberConfig } from '../type';\n\nexport const InputNumberFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-input-number-form-item', formItemProps?.className)}\n >\n <InputNumber {...(editableConfig as EditableInputNumberConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Radio, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, EditableRadioGroupConfig } from '../type';\n\ntype RadioGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number;\n onChange?: (value: string | number) => void;\n};\n\nconst RadioGroupFormItemContent = (props: RadioGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableRadioGroupConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n if (editable) return [];\n const value = props.value;\n const options = (editableComptProps.options || []) as LabelValueItem<string | number>[];\n if (!isArray(options) || options.length === 0) {\n return value;\n }\n const target = options.find((item) => item.value === value);\n return target?.label || value;\n }, [editable, editableComptProps.options, props.value]);\n\n const onChange = hooks.useCallbackRef((e) => {\n props.onChange?.(e.target.value as string | number);\n });\n\n if (editable) {\n return <Radio.Group {...editableComptProps} value={props.value} onChange={onChange} />;\n }\n return (\n <span className=\"editable-radio-group-view\">\n {render ? render(props.value) : viewLabel ? <Tag color=\"#1890ff\">{viewLabel}</Tag> : null}\n </span>\n );\n};\n\nexport const RadioGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-radio-group-form-item', formItemProps?.className)}\n >\n <RadioGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { LabelValueItem, TPlainObject } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: LabelValueItem[];\n originalSelectorList: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: { selectorList: LabelValueItem[]; originalSelectorList: TPlainObject[] };\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n selectorList: [],\n originalSelectorList: [],\n queryIsEmpty: false,\n requestStatus: 'init',\n};\n\nconst _SelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.selectorList = params.selectorList || [];\n state.originalSelectorList = params.originalSelectorList || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.selectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst selectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = selectorWrapperModel('key值').useStore();\n * ```\n */\nexport const selectorWrapperModel = (key: string) => {\n if (!selectorWrapperModels[key]) {\n selectorWrapperModels[key] = Model(_SelectorWrapperModel);\n }\n return selectorWrapperModels[key];\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { arrayField2LabelValue, isUndefinedOrNull, LabelValueItem, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport {\n DependencyList,\n forwardRef,\n ReactElement,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { ModelState, selectorWrapperModel } from './model';\n\ntype SelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type SelectorWrapperProps = Omit<\n SelectProps,\n 'filterOption' | 'onSearch' | 'loading' | 'notFoundContent' | 'options' | 'fieldNames'\n> & {\n // 模型唯一值\n modelKey: string;\n fieldNames?: { label: string; value: string };\n /**\n * useEffect依赖性数组\n */\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorList`后无效果\n */\n serviceConfig?: SelectorServiceConfig;\n /**\n * 同步设置选择器选项列表\n * ```\n * 1. 当设置selectorList后,serviceConfig、operateType=search将失效\n * 2. 不支持异步数据,异步使用serviceConfig方式\n * 3. 如果配置fieldNames,会转换后使用\n * ```\n */\n selectorList?: TPlainObject[];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorListChange?: (dataList: TPlainObject[]) => void;\n /**\n * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项\n * ```\n */\n showAllOption?: true | JSX.Element;\n /**\n * 输入操作类型,默认值:filter\n * ```\n * 1. search:根据输入项去服务端查询\n * 2. filter:初始化已查询数据,根据输入内容筛选\n * 3. 在设置`selectorList`后,operateType=search将失效\n * ```\n */\n operateType?: 'search' | 'filter';\n // 搜索调接口字段名称,默认值:keyword\n searchFieldName?: string;\n // label渲染适配器\n onLabelRenderAdapter?: (dataItem: LabelValueItem) => string | ReactElement;\n};\n\nexport type SelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getSelectorList: () => LabelValueItem<string | number>[];\n};\n/**\n * 选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. modelKey的配置是为了缓存数据;\n * 1.1: 当有effectDependencyList依赖项时,依赖项的发生变化后,每次都会去调用接口获取数据\n * 1.2: 当无effectDependencyList依赖项时,第一次调用接口成功后会有标记,下次访问存在标记,就不在调用接口,使用缓存数据;如果想强制刷新数据,可通过随便配置依赖项完成\n * 2. selectorList属性\n * 2.1 当设置selectorList属性后,serviceConfig、operateType=search将失效\n * 2.2 不支持异步数据,异步使用serviceConfig方式\n * 3. operateType=search状态下,回填数据查询接口时,会在接口中默认添加id字段(id的值为回填的值)\n * ```\n */\nexport const SelectorWrapper = forwardRef<SelectorWrapperRefApi, SelectorWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n showAllOption,\n effectDependencyList,\n onSelectorListChange,\n operateType,\n searchFieldName,\n selectorList,\n modelKey,\n fieldNames,\n ...otherProps\n } = props;\n\n const isSearch = operateType === 'search' && selectorList === undefined;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const changeOperateValueRef = useRef<string | number>();\n const [loading, setLoading] = useState(false);\n const [state, actions] = selectorWrapperModel(modelKey).useStore();\n // const effectDependencyListPrev = usePrevious(props.effectDependencyList);\n // console.log('effectDependencyListPrev', effectDependencyListPrev);\n const requestPreKey = `request-pre-${props.modelKey}`;\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceRespDataAdapter = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(\n async (inputValue?: string, searchId?: string | number) => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`SelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n window[requestPreKey] = true;\n void actions.changeRequestStatus('request-pre');\n if ((!isUndefinedOrNull(inputValue) || !isUndefinedOrNull(searchId)) && isSearch) {\n const keyword = searchFieldName || 'keyword';\n params[keyword] = inputValue;\n params['id'] = searchId;\n }\n const respData = await newServiceConfig.onRequest?.(params);\n const respAdapterData = serviceRespDataAdapter(respData);\n const respDataTranslation = arrayField2LabelValue(respAdapterData || [], fieldNames);\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList({\n selectorList: respDataTranslation,\n originalSelectorList: respAdapterData,\n });\n } catch (error) {\n console.error(error);\n setLoading(false);\n window[requestPreKey] = false;\n void actions.changeRequestStatus('request-error');\n void message.error(error.message || '获取数据异常');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n },\n );\n\n useEffectCustom(() => {\n if (state.originalSelectorList && state.requestStatus === 'request-success') {\n onSelectorListChange?.(state.originalSelectorList);\n }\n }, [state.originalSelectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (selectorList) {\n void actions.setSelectBoxList({\n selectorList: arrayField2LabelValue(selectorList, fieldNames),\n originalSelectorList: selectorList,\n });\n return;\n }\n if (isSearch) return;\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = selectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (isSearch) {\n if (valueIsEmpty(props.value as string | number)) {\n onSelectorListChange?.([]);\n void actions.resetSelectBoxList();\n } else {\n // 判断是否由外部回填value数据\n if (props.value !== changeOperateValueRef.current) {\n void startDataSourceRequest(undefined, props.value as string | number);\n }\n }\n }\n }, newEffectDependencyList.concat([props.value]));\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetSelectBoxList();\n },\n getSelectorList: () => {\n return state.selectorList;\n },\n };\n });\n\n const filterOption = hooks.useCallbackRef((input: string, option) => {\n return (option?.children as unknown as string).toLowerCase().indexOf(input.toLowerCase()) >= 0;\n });\n\n const onSearch = hooks.useDebounceCallback((value: string) => {\n if (value) {\n void startDataSourceRequest(value);\n } else {\n void actions.resetSelectBoxList();\n }\n }, 300);\n\n const onChange = hooks.useCallbackRef((value: string | number, ...otherParams) => {\n changeOperateValueRef.current = value;\n props.onChange?.(value, otherParams);\n });\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const selectOptionsAll = <Select.Option value=\"\">全部</Select.Option>;\n return (\n <Select\n showSearch={true}\n allowClear={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n loading={loading}\n onSearch={isSearch ? onSearch : undefined}\n filterOption={isSearch ? false : filterOption}\n onChange={onChange}\n fieldNames={undefined}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n >\n {showAllOption === true ? selectOptionsAll : showAllOption}\n {state.selectorList.map((item) => {\n return (\n <Select.Option value={item.value} label={item.label} key={item.value}>\n {props.onLabelRenderAdapter ? props.onLabelRenderAdapter(item) : item.label}\n </Select.Option>\n );\n })}\n </Select>\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { arrayField2LabelValue, LabelValueItem, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Tag } from 'antd';\nimport { Fragment, useEffect, useState } from 'react';\nimport { SelectorWrapper } from '../../selector-wrapper';\nimport { EditableFormItemProps, EditableSelectWrapperConfig } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number | Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableSelectWrapperConfig).editableComptProps;\n const [selectorList, setSelectorList] = useState<LabelValueItem[]>([]);\n const [viewLabelList, setviewLabelList] = useState<LabelValueItem[]>([]);\n\n useEffect(() => {\n if (!editable) {\n const value = isArray(props.value) ? props.value : props.value === undefined ? [] : [props.value];\n if (selectorList.length === 0) {\n setviewLabelList(value.map((item) => ({ label: item as string, value: item })));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = selectorList.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: String(item), value: item });\n });\n setviewLabelList(returnList);\n }\n }, [editable, editableComptProps.fieldNames, props.value, selectorList]);\n\n const onSelectorListChange = hooks.useCallbackRef((dataList: TPlainObject[]) => {\n setSelectorList(arrayField2LabelValue(dataList || [], editableComptProps.fieldNames));\n });\n\n if (editable) {\n return (\n <SelectorWrapper\n {...editableComptProps}\n value={props.value}\n onChange={props.onChange}\n onSelectorListChange={onSelectorListChange}\n />\n );\n }\n return (\n <Fragment>\n <div style={{ display: 'none' }}>\n <SelectorWrapper {...editableComptProps} onSelectorListChange={onSelectorListChange} />\n </div>\n <span className=\"editable-selector-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n </Fragment>\n );\n};\n\nexport const SelectorWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-selector-wrapper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { isBoolean, isNumber, isString } from '@dimjs/lang';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, FieldSingleConfig } from '../type';\n\nconst FormItemTextContent = (props: {\n value?: string | number;\n name: EditableFormItemProps['name'];\n fieldConfig?: FieldSingleConfig;\n}) => {\n const value = useMemo(() => {\n if (props.fieldConfig?.render) return undefined;\n const isBaseData =\n isString(props.value) || isNumber(props.value) || isBoolean(props.value) || !props.value;\n if (!isBaseData) {\n console.warn(`Form.List name:【${props.name}】数据【${JSON.stringify(props.value)}】不能渲染在页面中`);\n }\n return isBaseData ? props.value : undefined;\n }, [props.fieldConfig?.render, props.name, props.value]);\n\n return <span className=\"editable-text-view\">{props.fieldConfig?.render?.(props.value) || value}</span>;\n};\n\nexport const TextFormItem = (props: { name: Array<number | string>; fieldConfig?: FieldSingleConfig }) => {\n return (\n <Form.Item noStyle name={props.name}>\n <FormItemTextContent name={props.name} fieldConfig={props.fieldConfig} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableTextareaConfig } from '../type';\n\nexport const TextAreaFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input.TextArea {...(editableConfig as EditableTextareaConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { classNames, extend } from '@dimjs/utils';\nimport { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile, UploadListType } from 'antd/lib/upload/interface';\nimport { FC, Fragment, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type UploadWrapperFileItem = {\n uid: string;\n name: string;\n url?: string;\n};\n\nexport type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {\n value?: T[];\n onChange?: (value?: T[]) => void;\n onUploadError?: (message?: string) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n uid?: string;\n name?: string;\n url?: string;\n };\n /**\n * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject;\n} & Omit<UploadProps, 'onChange' | 'fileList'>;\n\n/**\n * 文件上传\n * ```\n * 1. 可通过配置children替换默认上传触发布局\n * 2. 接口返回结构:\n * formData上传接口返回值\n * {\n * code: '0000',\n * data: {\n * uid: '唯一值,可使用fileKey值'\n * name: '文件名称'\n * url: '预览地址'\n * }\n * }\n * 3. 如果接口返回的不是上面的字段名称,可通过fieldNames配置接口返回字段名称映射\n *\n * 4. 最佳使用方式,与Form结合使用\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <UploadWrapper action={uploadUrl} />\n * </Form.Item>\n * ```\n *\n */\nexport const UploadWrapper: FC<UploadWrapperProps> = (props) => {\n const { onChange, onUploadError, value, ...otherProps } = props;\n const [uploadList, setUploadList] = useState<UploadWrapperFileItem[]>();\n const fieldNames = extend(\n {\n uid: 'uid',\n name: 'name',\n url: 'url',\n },\n props.fieldNames,\n ) as Required<UploadWrapperFileItem>;\n\n useEffectCustom(() => {\n setUploadList(\n value?.map((item) => {\n return {\n uid: item[fieldNames.uid],\n name: item[fieldNames.name],\n url: item[fieldNames.url],\n };\n }),\n );\n }, [fieldNames.name, fieldNames.uid, fieldNames.url, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n const fileList = info.fileList as TPlainObject[];\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = (\n props.onRequestResultAdapter ? props.onRequestResultAdapter(respData.data) : respData.data\n ) as TPlainObject;\n result[fieldNames.uid] = result[fieldNames.uid] || info.file.uid;\n result[fieldNames.name] = result[fieldNames.name] || info.file.name;\n if (props.maxCount === 1) {\n onChange?.([result]);\n } else {\n onChange?.((value || []).concat(result));\n }\n } else {\n if (onUploadError) {\n onUploadError(respData.message as string);\n } else {\n void message.error((respData.message as string) || '上传操作失败...');\n }\n fileList[fileList.length - 1] = {\n ...fileList[fileList.length - 1],\n status: 'error',\n };\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item[fieldNames.uid];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n if (onUploadError) {\n onUploadError();\n } else {\n void message.error('上传操作失败...');\n }\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadList([...fileList] as UploadWrapperFileItem[]);\n props.onUploadChange?.(info);\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n fileList={uploadList}\n className={classNames('v-upload-wrapper', otherProps.className)}\n >\n {otherProps.disabled ? null : (\n <UploadTrigger listType={otherProps.listType}>{props.children}</UploadTrigger>\n )}\n </Upload>\n );\n};\n\nconst UploadTrigger: FC<{ listType?: UploadListType }> = (props) => {\n if (props.children) return <Fragment>{props.children}</Fragment>;\n if (props.listType === 'picture-card') {\n return (\n <div>\n <PlusOutlined />\n <div style={{ marginTop: 8 }}>上传图片</div>\n </div>\n );\n }\n if (props.listType === 'picture') {\n return (\n <Button type=\"primary\" ghost>\n 选择图片上传\n </Button>\n );\n }\n return (\n <Button type=\"primary\" ghost>\n 选择文件上传\n </Button>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { UploadWrapper } from '../../upload-wrapper';\nimport { EditableFileUploadConfig, EditableFormItemProps } from '../type';\n\nconst UploadWrapperFormItemContent = (\n props: EditableFormItemProps & { value?: any; onChange?: (value?: any) => void },\n) => {\n const { editableConfig, render, editable } = props.fieldConfig;\n const { children, ...otherProps } = (editableConfig as EditableFileUploadConfig).editableComptProps;\n if (editable) {\n return (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} onChange={props.onChange}>\n {children}\n </UploadWrapper>\n );\n }\n return (\n <div className=\"upload-wrapper-selector-view\">\n {render ? (\n render(props.value)\n ) : (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} disabled={true} />\n )}\n </div>\n );\n};\n\nexport const UploadWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-upload-wrapper-form-item', formItemProps?.className)}\n >\n <UploadWrapperFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { extend } from '@dimjs/utils';\nimport { FieldSingleConfig } from '../type';\nimport { getEditable } from '../utils';\nimport { CheckboxGroupFormItem } from './checkbox-group';\nimport { DatePickerWrapperFormItem } from './date-picker-wrapper';\nimport { DateRangePickerWrapperFormItem } from './date-range-picker-wrapper';\nimport { InputFormItem } from './input';\nimport { InputNumberFormItem } from './input-number';\nimport { RadioGroupFormItem } from './radio-group';\nimport { SelectorWrapperFormItem } from './selector-wrapper';\nimport { TextFormItem } from './text';\nimport { TextAreaFormItem } from './textarea';\nimport { UploadWrapperFormItem } from './upload-wrapper';\n\nexport type FormItemAdapterProps = {\n name: Array<number | string>;\n completeName: Array<number | string>;\n fieldConfig: FieldSingleConfig;\n tableRowIndex: number;\n};\n\nexport const FormItemAdapter = (props: FormItemAdapterProps) => {\n const { editableConfig, editable } = props.fieldConfig;\n const newEditable = getEditable(editable, props.tableRowIndex);\n const fieldConfig = extend({}, props.fieldConfig, { editable: newEditable });\n\n const commomProps = {\n name: props.name,\n fieldConfig,\n };\n\n if (editableConfig?.type === 'input' && newEditable) {\n return <InputFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'inputNumber' && newEditable) {\n return <InputNumberFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'textArea' && newEditable) {\n return <TextAreaFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'datePickerWrapper' && newEditable) {\n return <DatePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'dateRangePickerWrapper') {\n return <DateRangePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'selectorWrapper') {\n return <SelectorWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'checkboxGroup') {\n return <CheckboxGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'radioGroup') {\n return <RadioGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'uploadWrapper') {\n return <UploadWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'custom') {\n return editableConfig.editableComptProps({\n name: props.name,\n editable: newEditable,\n completeName: props.completeName,\n });\n }\n return <TextFormItem {...commomProps} />;\n};\n","import { DeleteOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { Button, Form, Space } from 'antd';\nimport { FormItemAdapter } from '../form-item';\nimport { FormListConfig } from '../type';\nimport { getEditable } from '../utils';\n\nexport type FormListProps = {\n name: Array<number | string>;\n formListConfig: FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormList = (props: FormListProps) => {\n const from = Form.useFormInstance();\n const {\n onFormListBeforeRender,\n editableConfigList,\n onFormListAfterRender,\n onFormListItemBeforeRender,\n onFormListItemAfterRender,\n deleteOperateRender,\n } = props.formListConfig;\n return (\n <Form.List name={props.name}>\n {(fields, { add, remove }) => (\n <>\n {onFormListBeforeRender\n ? onFormListBeforeRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n {fields.map((fieldChild, index) => {\n const hasEditable = editableConfigList.find((item) =>\n getEditable(item.editable, props.tableRowIndex),\n );\n const className = classNames(\n 'editable-inner-formlist-item',\n `editable-inner-formlist-item-${props.name[1]}`,\n { 'editable-inner-formlist-item_preview': !hasEditable },\n );\n return (\n <div key={index} className={className}>\n {onFormListItemBeforeRender\n ? onFormListItemBeforeRender({\n add,\n remove: () => {\n remove(index);\n },\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n <Space>\n {editableConfigList.map((fieldItem, index) => {\n return (\n <FormItemAdapter\n name={[fieldChild.name, fieldItem.fieldName]}\n fieldConfig={fieldItem}\n key={index}\n tableRowIndex={props.tableRowIndex}\n completeName={[...props.completeName, fieldChild.name]}\n />\n );\n })}\n {hasEditable ? (\n <DeleteFormListItem\n deleteOperateRender={deleteOperateRender}\n remove={() => {\n remove(index);\n }}\n index={index}\n />\n ) : null}\n </Space>\n {onFormListItemAfterRender\n ? onFormListItemAfterRender({\n add,\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n remove: () => {\n remove(index);\n },\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n </div>\n );\n })}\n {onFormListAfterRender\n ? onFormListAfterRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n </>\n )}\n </Form.List>\n );\n};\n\nconst DeleteFormListItem = (props: {\n deleteOperateRender: FormListConfig['deleteOperateRender'];\n remove: () => void;\n index: number;\n}) => {\n return (\n <Form.Item>\n {props.deleteOperateRender ? (\n props.deleteOperateRender({ remove: props.remove, formListItemIndex: props.index })\n ) : (\n <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={props.remove}>\n 删除\n </Button>\n )}\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { FormItemAdapter } from '../form-item';\nimport { TextFormItem } from '../form-item/text';\nimport { FieldSingleConfig, FormListConfig } from '../type';\nimport { FormList } from './form-list';\n\nexport type FormListItemProps = {\n name: Array<number | string>;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormListItem = (props: FormListItemProps) => {\n if (props.fieldConfig) {\n if (isArray(props.fieldConfig['editableConfigList'])) {\n const formListConfig = props.fieldConfig as FormListConfig;\n return (\n <FormList\n name={props.name}\n completeName={props.completeName}\n formListConfig={formListConfig}\n tableRowIndex={props.tableRowIndex}\n />\n );\n } else {\n return (\n <FormItemAdapter\n name={props.name}\n fieldConfig={props.fieldConfig as FieldSingleConfig}\n tableRowIndex={props.tableRowIndex}\n completeName={props.completeName}\n />\n );\n }\n }\n return <TextFormItem name={props.name} />;\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { Button, Form, Table, TableProps } from 'antd';\nimport { FormListOperation, FormListProps } from 'antd/lib/form/FormList';\nimport { ColumnsType } from 'antd/lib/table';\nimport { Fragment, ReactElement, useMemo } from 'react';\nimport { FormListItem } from './form-list-item';\nimport './style.less';\nimport { EditableTableRecordType, FieldSingleConfig, FormListConfig } from './type';\n\n// export type EditableTableDataSourceItem = FormListFieldData & { operation: FormListOperation };\n\n/**\n * antd 默认render功能此处不能使用\n */\nexport type EditableTableColumn = Omit<ColumnsType['0'], 'render'> & {\n dataIndex?: string;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n /**\n * 配置操作功能处理后,fieldConfig配置将失效\n * ```\n * 1. tableRowIndex:当前row的索引值\n * 1. name:当前row的form.item的name值\n * ```\n */\n operateRender?: (item: {\n tableRowIndex: number;\n name: Array<string | number>;\n operation: FormListOperation;\n }) => ReactElement;\n};\n\nexport type EditableTableProps = {\n name: string;\n /**\n * ```\n * antd table属性\n * 1. 新增cellVerticalAlign,单元格竖直方向对齐方式,设置table column onCell属性后失效\n * ```\n */\n tableProps?: Omit<TableProps<EditableTableRecordType>, 'dataSource' | 'columns' | 'rowKey'> & {\n cellVerticalAlign?: 'baseline' | 'middle' | 'top' | 'bottom';\n };\n columns: EditableTableColumn[];\n onTableBeforeRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;\n /**\n * 设置后,将覆盖底部`新增`按钮\n */\n onTableAfterRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;\n rules?: FormListProps['rules'];\n};\n\nexport const EditableTable = (props: EditableTableProps) => {\n const columns = useMemo(() => {\n if (!props.columns) return [];\n return props.columns.map((columnItem) => {\n const { fieldConfig, operateRender, ...otherColumnItem } = columnItem;\n return {\n onCell: () => {\n return {\n valign: props.tableProps?.cellVerticalAlign || 'middle',\n };\n },\n ...otherColumnItem,\n render: (_value, record) => {\n if (operateRender) {\n return (\n operateRender({\n name: [...props.name, record.name],\n tableRowIndex: record.name,\n operation: record.operation,\n }) || ''\n );\n }\n return (\n <FormListItem\n name={columnItem.dataIndex ? [record.name, columnItem.dataIndex] : [record.name]}\n completeName={\n columnItem.dataIndex\n ? [...props.name, record.name, columnItem.dataIndex]\n : [...props.name, record.name]\n }\n fieldConfig={fieldConfig}\n tableRowIndex={record.name}\n />\n );\n },\n };\n }) as ColumnsType<EditableTableRecordType>;\n }, [props.columns, props.name, props.tableProps?.cellVerticalAlign]);\n\n return (\n <div className=\"editable-table\">\n <Form.List name={props.name} rules={props.rules}>\n {(fields, formListOperation) => {\n return (\n <Fragment>\n {props.onTableBeforeRender ? props.onTableBeforeRender(formListOperation, fields.length) : null}\n <Table\n scroll={{ x: 'max-content' }}\n pagination={false}\n {...props.tableProps}\n dataSource={fields.map((item) => ({ ...item, operation: formListOperation }))}\n columns={columns}\n rowKey=\"key\"\n />\n {props.onTableAfterRender ? (\n props.onTableAfterRender(formListOperation, fields.length)\n ) : (\n <Button\n type=\"dashed\"\n onClick={() => formListOperation.add()}\n block\n icon={<PlusOutlined />}\n style={{ marginTop: 15 }}\n >\n 新增\n </Button>\n )}\n </Fragment>\n );\n }}\n </Form.List>\n </div>\n );\n};\n","import { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { FC, useState } from 'react';\n\nexport type FileImportProps = {\n onImportFinish: (data?: any) => void;\n} & Omit<\n UploadProps,\n | 'fileList'\n | 'showUploadList'\n | 'itemRender'\n | 'listType'\n | 'multiple'\n | 'previewFile'\n | 'progress'\n | 'onChange'\n | 'onDownload'\n | 'onRemove'\n | 'onPreview'\n | 'directory'\n | 'customRequest'\n | 'defaultFileList'\n | 'iconRender'\n>;\n\n/**\n * 文件导入\n * ```\n * 默认值:\n * name: 'file',\n * accept: '.xlsx,.xls',\n * ```\n */\nexport const FileImport: FC<FileImportProps> = (props) => {\n const { onImportFinish, ...otherProps } = props;\n\n const [loading, setLoading] = useState(false);\n\n const onChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'uploading') {\n setLoading(true);\n } else if (info.file.status === 'done') {\n setLoading(false);\n const respData = info.file.response;\n if (respData.code === '0000') {\n onImportFinish(respData.data);\n } else {\n void message.error((respData.message as string) || '文件导入异常...');\n }\n }\n });\n\n return (\n <Upload showUploadList={false} maxCount={1} {...otherProps} onChange={onChange}>\n {props.children ? (\n props.children\n ) : (\n <Button type=\"primary\" ghost loading={loading}>\n 选择文件\n </Button>\n )}\n </Upload>\n );\n};\n\nFileImport.defaultProps = {\n name: 'file',\n accept: '.xlsx,.xls',\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames, extend } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile } from 'antd/lib/upload/interface';\nimport { FC, useEffect, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type FileUploadItem = {\n fileKey: string;\n fileName: string;\n};\n\ntype AntdFileUploadItem = {\n uid: string;\n name: string;\n fileKey: string;\n};\n\nexport type FileUploadProps = {\n onChange?: (value?: FileUploadItem[]) => void;\n onUploadError?: (message?: string) => void;\n value?: FileUploadItem[];\n onPreview?: (item: FileUploadItem) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n fileKey?: string;\n fileName?: string;\n };\n} & Omit<UploadProps, 'onChange' | 'fileList' | 'onPreview'>;\n\n/**\n * 文件上传,结合Form使用最佳\n * ```\n * 接口返回结构:\n * formData上传接口必须返回fileKey值\n * {\n * code: '0000',\n * data: {\n * fileKey: '预览文件对应的fileKey'\n * }\n * }\n * 可通过fieldNames配置接口返回值属性名称映射\n * ```\n * ```\n * 最佳使用方式:\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <FileUpload action={uploadUrl} onPreview={onPreviewFile}>\n * <Button type=\"primary\">选择文件导入</Button>\n * </FileUpload>\n * </Form.Item>\n * ```\n *\n */\nexport const FileUpload: FC<FileUploadProps> = (props) => {\n useEffectCustom(() => {\n console.error('@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换');\n }, []);\n\n const { onChange, onUploadError, onPreview, value, ...otherProps } = props;\n const [uploadValue, setUploadValue] = useState<AntdFileUploadItem[]>([]);\n const fieldNames = extend(\n {\n fileKey: 'fileKey',\n fileName: 'fileName',\n },\n props.fieldNames,\n ) as FileUploadItem;\n\n useEffect(() => {\n if (value && isArray(value)) {\n setUploadValue(\n value.map((item) => {\n return {\n uid: item['uid'] || item[fieldNames.fileKey],\n name: item[fieldNames.fileName],\n fileKey: item[fieldNames.fileKey],\n url: item[fieldNames.fileKey],\n thumbUrl: item[fieldNames.fileKey],\n };\n }),\n );\n }\n }, [fieldNames.fileKey, fieldNames.fileName, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = respData.data || {};\n const uploadItem = {\n uid: info.file.uid,\n fileName: result[fieldNames.fileName] || (info.file.name as string),\n fileKey: result[fieldNames.fileKey],\n } as FileUploadItem;\n const respValue = (value || []).concat(uploadItem);\n onChange?.(respValue as unknown as FileUploadItem[]);\n } else {\n onUploadError?.(respData.message as string);\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item['uid'] || item[fieldNames.fileKey];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n onUploadError?.();\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadValue([...info.fileList]);\n props.onUploadChange?.(info);\n });\n\n const onUploadPreview = hooks.useCallbackRef((file) => {\n onPreview?.({\n fileKey: file[fieldNames.fileKey],\n fileName: file[fieldNames.fileName],\n });\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n onPreview={onUploadPreview}\n fileList={uploadValue}\n className={classNames('v-file-upload', otherProps.className)}\n >\n {props.children}\n </Upload>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { isUndefinedOrNull } from '@flatbiz/utils';\nimport { cloneElement, CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type FlexLayoutProps = {\n className?: string;\n fullIndex?: number | number[];\n direction?: 'vertical' | 'horizontal';\n onClick?: () => void;\n style?: CSSProperties;\n gap?: number;\n};\n/**\n * flex布局\n * 1. direction:默认值vertical\n * 2. gap间隙距离\n * 3. fullIndex:指定children数组索引值对象flex=1\n * 4. children添加key熟悉\n * @param props\n * @returns\n */\nexport const FlexLayout: FC<FlexLayoutProps> = (props) => {\n const childrens = (isArray(props.children) ? props.children : [props.children]) as JSX.Element[];\n const direction = props.direction || 'vertical';\n const gap = props.gap ? props.gap : 0;\n const fullIndexList = !isUndefinedOrNull(props.fullIndex)\n ? isArray(props.fullIndex)\n ? props.fullIndex\n : [props.fullIndex as number]\n : [];\n return (\n <div\n className={classNames('v-flex-layout', `v-flex-${direction}`, props.className)}\n style={props.style}\n onClick={props.onClick}\n >\n {childrens.map((children, index) => {\n const childrenStyle = children.props.style || {};\n const style = fullIndexList.includes(index) ? { flex: 1, ...childrenStyle } : childrenStyle;\n if (index < childrens.length - 1 && gap > 0) {\n if (direction === 'horizontal') {\n style.marginRight = gap;\n } else {\n style.marginBottom = gap;\n }\n }\n return cloneElement(children, { style, key: index });\n })}\n </div>\n );\n};\n","import { CSSProperties, VFC } from 'react';\n\nexport type GapProps = {\n height?: number;\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * 间隙组件\n * @param props\n * @returns\n */\nexport const Gap: VFC<GapProps> = (props) => {\n return <div style={{ height: props.height, ...props.style }} className={props.className} />;\n};\n","import { classNames } from '@dimjs/utils';\nimport { Tooltip } from 'antd';\nimport { CSSProperties, VFC } from 'react';\nimport './style.less';\n\nexport type IconWrapperProps = {\n hoverTips?: string;\n icon?: React.ReactNode;\n style?: CSSProperties;\n text?: string | React.ReactElement;\n className?: string;\n size?: 'small' | 'middle' | 'large';\n};\nexport const IconWrapper: VFC<IconWrapperProps> = (props) => {\n return (\n <Tooltip title={props.hoverTips}>\n <div\n className={classNames('icon-wrapper', `icon-wrapper-${props.size || 'middle'}`, props.className)}\n style={props.style}\n >\n {props.icon}\n {props.text ? <span className=\"icon-wrapper-text\">{props.text}</span> : null}\n </div>\n </Tooltip>\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { ModalOperation, ModalOperationProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalFormProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationProps;\n footer?: null | React.ReactNode;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWraper: FC<ModalFormProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\n\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整',\n );\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n <div className=\"modal-wraper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wraper-content-footer\">\n {footer ? footer : <ModalOperation {...operationProps} />}\n </div>\n )}\n </Modal>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n/**\n * 组件单词写错,请输入\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWraperModel('key值').useStore();\n * ```\n */\nexport const createModalWraperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationOldProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModalOperation, ModalOperationOldProps } from './modal-operation';\nimport './style.less';\n\ntype ModalWrapperStaticMethods = {\n Content: typeof ModalWrapperContent;\n Footer: typeof ModalWrapperFooter;\n};\n\nexport type ModalWrapperProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst ModalWrapperContent: FC<{ operationProps?: ModalOperationOldProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"modal-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <ModalWrapperFooter>\n <ModalOperation {...props.operationProps} />\n </ModalWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst ModalWrapperFooter = (props) => {\n return <div className=\"modal-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWrapper: FC<ModalWrapperProps> & ModalWrapperStaticMethods = (props) => {\n const { pageLoading, className, width, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('ModalWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wrapper', className)}\n keyboard={false}\n forceRender={true}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n {children}\n {pageLoading && <PageLoader />}\n </Modal>\n );\n};\n\nModalWrapper.Content = ModalWrapperContent;\nModalWrapper.Footer = ModalWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWrapperModel('key值').useStore();\n * ```\n */\nexport const createModalWrapperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wrapper';\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type PageFixedFooterProps = {\n className?: string;\n style?: CSSProperties;\n};\n\nexport const PageFixedFooter: FC<PageFixedFooterProps> = (props) => {\n return (\n <div className={classNames('page-fixed-footer', props.className)} style={props.style}>\n {props.children}\n </div>\n );\n};\n","export const Page404 = () => {\n return <div className=\"v-404\">404</div>;\n};\n","import './style.less';\n/**\n * 使用在Form组件上,预定义form-item label宽度\n */\nexport const formClassName = {\n label_width_70: 'form-label-70',\n label_width_80: 'form-label-80',\n label_width_90: 'form-label-90',\n label_width_100: 'form-label-100',\n label_width_110: 'form-label-110',\n label_width_120: 'form-label-120',\n label_width_130: 'form-label-130',\n label_width_auto: 'form-label-auto',\n};\n\n/**\n * 使用在Form.Item组件上,预定义form-item label宽度\n */\nexport const formItemClassName = {\n label_width_70: 'form-item-label-70',\n label_width_80: 'form-item-label-80',\n label_width_90: 'form-item-label-90',\n label_width_100: 'form-item-label-100',\n label_width_110: 'form-item-label-110',\n label_width_120: 'form-item-label-120',\n label_width_130: 'form-item-label-130',\n label_width_auto: 'form-item-label-auto',\n};\n","import { formClassName, formItemClassName } from './form';\n\n/**\n * 预定义className\n * ```\n * form: 使用在Form组件上,设置form-item label宽度\n * formItem: 使用在Form.Item组件上,设置form-item label宽度\n * ```\n */\nexport const preDefinedClassName = {\n form: formClassName,\n formItem: formItemClassName,\n};\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC, ReactElement } from 'react';\nimport './style.less';\n\nexport type SimpleLayoutProps = {\n className?: string;\n style?: CSSProperties;\n title?: string | ReactElement;\n desc?: string | ReactElement;\n formLabelAlign?: 'left' | 'right';\n layoutType?: 'layer' | 'tight';\n titleLeftLine?: boolean;\n};\n\n/**\n * 简单布局\n * @param props\n * @returns\n * ```\n * 1. layoutType 布局类型\n * layer:分层布局\n * tight:紧凑布局\n * ```\n */\nexport const SimpleLayout: FC<SimpleLayoutProps> = (props) => {\n const labelAlign = props.formLabelAlign || 'right';\n const className = classNames(\n 'simple-layout',\n {\n 'simple-layout-tight': props.layoutType === 'tight',\n 'simple-layout-formlabel-left': labelAlign === 'left',\n },\n props.className,\n );\n\n const titleClassName = classNames('simple-layout-title', {\n 'simple-layout-title-sign': props.titleLeftLine,\n });\n\n return (\n <div className={className} style={props.style}>\n {props.title ? <div className={titleClassName}>{props.title}</div> : null}\n {props.desc ? <div className=\"simple-layout-desc\">{props.desc}</div> : null}\n {props.children ? <div className=\"simple-layout-content\">{props.children}</div> : null}\n </div>\n );\n};\n\nSimpleLayout.defaultProps = {\n titleLeftLine: true,\n layoutType: 'layer',\n};\n","import { classNames } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { FC, useEffect, useMemo, useState } from 'react';\n\nexport interface SmsCountDownProps {\n onSendRequest: () => Promise<void>; // 验证码请求函数\n totalTicks?: number; // 总倒计时,默认:60(s)\n duration?: number; // 倒计时间隔,默认:1000ms(1s)\n autoStart?: boolean; // 是否自动开始倒计时,默认:fasle,注意:不会自动调用 onSendRequest\n format?: string; // 倒计时格式化,默认:'{t}s'\n sendTxt?: string; // 文案,默认:'获取验证码'\n sentTxt?: string; // 倒计时完成文案,默认:'重新获取'\n processingTxt?: string; // 倒计时中文案,默认:'发送中...'\n onTick?: (time: number) => void; // 倒计时回调\n className?: string;\n}\nexport const SmsCountDown: FC<SmsCountDownProps> = (props) => {\n const [showMessage, setShowMessage] = useState<string>();\n\n const [running, setRunning] = useState(false);\n const [starting, setStarting] = useState(false);\n\n // 初始化设置有效\n const initConfig = useMemo<Omit<SmsCountDownProps, 'onSendRequest' | 'onTick' | 'className'>>(() => {\n return {\n sendTxt: props.sendTxt,\n sentTxt: props.sentTxt,\n processingTxt: props.processingTxt,\n format: props.format,\n autoStart: props.autoStart,\n totalTicks: props.totalTicks,\n duration: props.duration,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const format = initConfig.format as string;\n const totalTicks = initConfig.totalTicks as number;\n const duration = initConfig.duration as number;\n\n const countdownFnc = hooks.useCountdownCallback(\n (num) => {\n const second = num / 1000;\n if (num > 0) {\n if (!running) {\n setRunning(true);\n }\n setShowMessage(format.replace('{t}', String(second)));\n props.onTick?.(second);\n } else if (num === 0) {\n setRunning(false);\n setStarting(false);\n props.onTick?.(second);\n setShowMessage(initConfig.sentTxt);\n }\n },\n totalTicks * 1000,\n { intervalTime: duration },\n );\n\n useEffect(() => {\n if (!initConfig.autoStart) {\n setShowMessage(initConfig.sendTxt);\n } else {\n countdownFnc();\n setStarting(true);\n setRunning(true);\n }\n }, [countdownFnc, initConfig]);\n\n const onStart = hooks.useCallbackRef(() => {\n if (running || starting) return;\n setStarting(true);\n setShowMessage(initConfig.processingTxt);\n void props\n .onSendRequest()\n .then(() => {\n setRunning(true);\n countdownFnc();\n })\n .catch(() => {\n setShowMessage(initConfig.sendTxt);\n setStarting(false);\n });\n });\n\n const className = classNames('v-count-down', props.className, {\n running,\n starting,\n });\n\n return (\n <div className={className} onClick={onStart}>\n {showMessage}\n </div>\n );\n};\n\nSmsCountDown.defaultProps = {\n totalTicks: 60,\n duration: 1000,\n autoStart: false,\n format: '{t}s',\n sendTxt: '获取验证码',\n sentTxt: '重新获取',\n processingTxt: '发送中...',\n};\n","import { classNames } from '@dimjs/utils';\nimport { Children, cloneElement, FC } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\ntype StaticMethods = {\n Condition: typeof Condition;\n Operate: typeof Operate;\n Table: typeof Table;\n Footer: typeof Footer;\n};\n\nconst overdueConsole = () => {\n console.error('@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代');\n};\n\nexport type TableFilterLayoutProps = {\n className?: string;\n isFixed?: boolean;\n fullIndex?: number;\n};\n\nexport const TableFilterLayout: FC<TableFilterLayoutProps> & StaticMethods = (props) => {\n useEffectCustom(() => {\n overdueConsole();\n }, []);\n\n return (\n <div\n className={classNames(\n 'table-filter-layout',\n { 'table-filter-layout-flex': props.isFixed },\n props.className,\n )}\n >\n {Children.map(props.children, (item, index) => {\n if (props.isFixed && index === props.fullIndex) {\n return cloneElement(item as JSX.Element, { className: 'table-filter-layout-flex-full' });\n }\n return item;\n })}\n </div>\n );\n};\n\nconst Condition: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-condition', props.className)}>{props.children}</div>;\n};\n\nconst Operate: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-operate', props.className)}>{props.children}</div>;\n};\n\nconst Table: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-table', props.className)}>{props.children}</div>;\n};\nconst Footer: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-footer', props.className)}>{props.children}</div>;\n};\n\nTableFilterLayout.Condition = Condition;\nTableFilterLayout.Operate = Operate;\nTableFilterLayout.Table = Table;\nTableFilterLayout.Footer = Footer;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport type ModelState = {\n treeSelectorList: TSetDefaultDefined<TreeSelectProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['treeSelectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeSelectorList: [],\n queryIsEmpty: false,\n};\n\nconst TreeSelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.treeSelectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.treeSelectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeSelectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeSelectorWrapperModel('key值').useStore();\n * ```\n */\nexport const treeSelectorWrapperModel = (key: string) => {\n if (!treeSelectorWrapperModels[key]) {\n treeSelectorWrapperModels[key] = Model(TreeSelectorWrapperModel);\n }\n return treeSelectorWrapperModels[key];\n};\n","import { isArray } from '@dimjs/lang';\nimport { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: TreeSelectProps['fieldNames'],\n) => {\n if (!isArray(treeList) || treeList.length === 0) return [];\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { isArray } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { isUndefinedOrNull, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, TreeSelect, TreeSelectProps } from 'antd';\nimport { DependencyList, forwardRef, useEffect, useImperativeHandle, useMemo, useState } from 'react';\nimport { ModelState, treeSelectorWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\ntype TreeSelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeSelectorWrapperProps = Omit<\n TreeSelectProps,\n 'treeExpandedKeys' | 'treeData' | 'loading' | 'onTreeExpand'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`treeSelectorList`后无效果\n */\n serviceConfig?: TreeSelectorServiceConfig;\n /**\n * 当设置treeSelectorList后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n treeSelectorList?: TreeSelectProps['treeData'];\n /**\n * 通过服务获取数据后回调,当设置`treeSelectorList`后无效果\n */\n onTreeSelectorListChange?: (treeSelectorList?: TreeSelectProps['treeData']) => void;\n};\n\nexport type TreeSelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeSelectorList: () => TreeSelectProps['treeData'];\n};\n\n/**\n * 树选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置treeSelectorList属性后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n */\nexport const TreeSelectorWrapper = forwardRef<TreeSelectorWrapperRefApi, TreeSelectorWrapperProps>(\n (props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n onTreeSelectorListChange,\n treeSelectorList,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [loading, setLoading] = useState(false);\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeSelectorWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeSelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n window[requestPreKey] = true;\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeSelectProps['treeData'];\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList(respData || []);\n } catch (error) {\n setLoading(false);\n window[requestPreKey] = false;\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (state.treeSelectorList && state.requestStatus === 'request-success') {\n onTreeSelectorListChange?.(state.treeSelectorList);\n }\n }, [state.treeSelectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (treeSelectorList) {\n void actions.setSelectBoxList(treeSelectorList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeSelectorWrapperModel(modelKey).getState();\n console.log('realTimeState', realTimeState.requestStatus);\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffect(() => {\n if (!isUndefinedOrNull(props.value)) {\n const valueList = isArray(props.value) ? props.value : [props.value];\n if (valueList.length > 0 && state.treeSelectorList.length > 0) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(\n tempValue as string | number,\n state.treeSelectorList,\n props.fieldNames,\n );\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }\n }, [state.treeSelectorList, props.fieldNames, props.value]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.setSelectBoxList([]);\n },\n getTreeSelectorList: () => {\n return state.treeSelectorList;\n },\n };\n });\n\n const onTreeExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n return (\n <TreeSelect\n dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}\n showSearch={true}\n treeLine={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n treeExpandedKeys={treeExpandedKeys}\n treeData={state.treeSelectorList}\n loading={loading}\n onTreeExpand={onTreeExpand}\n style={{ width: '100%', ...otherProps.style }}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n />\n );\n },\n);\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeProps } from 'antd';\n\nexport type ModelState = {\n treeList: TSetDefaultDefined<TreeProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setTreeList: ModelState['treeList'];\n resetTreeList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeList: [],\n queryIsEmpty: false,\n};\n\nconst TreeWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setTreeList: (params) => {\n return (state) => {\n state.treeList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetTreeList: () => {\n return (state) => {\n state.treeList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeWrapperModel('key值').useStore();\n * ```\n */\nexport const treeWrapperModel = (key: string) => {\n if (!treeWrapperModels[key]) {\n treeWrapperModels[key] = Model(TreeWrapperModel);\n }\n return treeWrapperModels[key];\n};\n","import { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: { label?: string; value?: string; children?: string },\n) => {\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { isArray } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { isUndefinedOrNull, TPlainObject, treeToTiledArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Spin, Tree, TreeProps } from 'antd';\nimport { DependencyList, forwardRef, useImperativeHandle, useMemo, useState } from 'react';\nimport { ModelState, treeWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\n\ntype TreeServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeWrapperProps = Omit<\n TreeProps,\n | 'expandedKeys'\n | 'treeData'\n | 'onExpand'\n | 'selectedKeys'\n | 'checkedKeys'\n | 'onCheck'\n | 'onSelect'\n | 'defaultCheckedKeys'\n | 'defaultSelectedKeys'\n | 'fieldNames'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorTreeList`后无效果\n */\n serviceConfig?: TreeServiceConfig;\n /**\n * 当设置selectorTreeList后,serviceConfig将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n selectorTreeList?: TreeProps['treeData'];\n value?: string | number | Array<string | number>;\n onChange?: (selectedKey: string | number | Array<string | number>) => void;\n fieldNames?: { label?: string; value?: string; children?: string };\n /**\n * 打开tree折叠过滤关键字\n */\n filterLabel?: string;\n};\n\nexport type TreeWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeDataList: () => TreeProps['treeData'];\n};\n\n/**\n * 树包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置selectorTreeList属性后,serviceConfig将失效\n * ```\n */\nexport const TreeWrapper = forwardRef<TreeWrapperRefApi, TreeWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n selectorTreeList,\n value,\n onChange,\n fieldNames,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeWrapperModel(modelKey).useStore();\n const [loading, setLoading] = useState(false);\n\n const valueList = useMemo(() => {\n if (isUndefinedOrNull(props.value)) return undefined;\n return (isArray(props.value) ? props.value : [props.value]) as Array<string | number>;\n }, [props.value]);\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeProps['treeData'];\n void actions.setTreeList(respData || []);\n setLoading(false);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (selectorTreeList) {\n void actions.setTreeList(selectorTreeList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (valueList && valueList.length > 0 && state.treeList.length > 0 && !treeExpandedKeys) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(tempValue, state.treeList, props.fieldNames);\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }, [state.treeList, props.fieldNames, value]);\n\n hooks.useUpdateEffect(() => {\n if (props.filterLabel) {\n const tiledArray = treeToTiledArray(state.treeList || [], props.fieldNames);\n const targetList = tiledArray.filter((item) => item.label?.includes(props.filterLabel || ''));\n let expandedKeys = [] as Array<string | number>;\n targetList.map((tempItem) => {\n const targetValues = getExpandedKeys(\n tempItem.value as string,\n state.treeList || [],\n props.fieldNames,\n );\n const valueList = targetValues.map((item) => item.value);\n expandedKeys = expandedKeys.concat(valueList);\n });\n setTreeExpandedKeys(Array.from(new Set(expandedKeys)));\n } else {\n setTreeExpandedKeys([]);\n }\n }, [props.filterLabel]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetTreeList();\n },\n getTreeDataList: () => {\n return state.treeList;\n },\n };\n });\n\n const onExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n const onCheck = hooks.useCallbackRef((checkedKeys) => {\n onChange?.(checkedKeys as Array<string | number>);\n });\n const onSelect = hooks.useCallbackRef((checkedKeys) => {\n if (props.multiple) {\n onChange?.(checkedKeys as Array<string | number>);\n } else {\n onChange?.(checkedKeys[0] as string | number);\n }\n });\n\n const treeFieldNames = useMemo(() => {\n const newFieldNames = extend({ label: 'label', value: 'value', children: 'children' }, fieldNames);\n return { title: newFieldNames.label, key: newFieldNames.value, children: newFieldNames.children };\n }, [fieldNames]);\n\n if (state.treeList.length > 0) {\n return (\n <Tree\n showLine={otherProps.checkable ? false : { showLeafIcon: false }}\n {...otherProps}\n fieldNames={treeFieldNames}\n expandedKeys={treeExpandedKeys}\n treeData={state.treeList}\n onExpand={onExpand}\n selectedKeys={otherProps.checkable ? undefined : valueList}\n checkedKeys={otherProps.checkable ? valueList : undefined}\n onCheck={otherProps.checkable ? onCheck : undefined}\n onSelect={otherProps.checkable ? undefined : onSelect}\n style={{ width: '100%', ...otherProps.style }}\n />\n );\n }\n\n return (\n <NotFoundContent\n requestStatus={state.requestStatus}\n loading={loading}\n onAgainRequest={startDataSourceRequest}\n />\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n loading: boolean;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <div className=\"tree-wrapper-empty\">\n <Spin spinning={props.loading}></Spin>\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={description}>\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n </div>\n );\n};\n"],"names":["styles","noop","getPermissionList","_getGlobalData","getGlobalData","elemAclLimits","permissionList","_isArray","hasPermission","name","includes","Permission","props","_jsx","Fragment","children","ButtonOperate","className","Space","split","Divider","type","size","wrap","_isUndefined","operateList","map","item","index","text","color","onClick","permission","needConfirm","confirmMessage","hidden","style","otherProps","_excluded","newStyle","_extends","Popconfirm","title","okText","cancelText","onConfirm","arrowPointAtCenter","Button","undefined","danger","_createElement","key","defaultProps","DatePickerWrapper","value","onChange","format","useMemo","showTime","onChangeDate","_hooks","useCallbackRef","moment","datePickerValue","flatbizDate","isDate","Date","DatePicker","width","DateRangePickerWrapper","values","value1","_ref","value2","date1","_ref2","date2","rangePickerValue","RangePicker","DrawerModel","actions","openDrawerForm","itemData","operateType","pageLoading","state","visible","closeDrawer","setDrawerItemData","params","DrawerOperation","_jsxs","cancelButtonProps","onCancel","hideOkBtn","icon","_SaveOutlined","okButtonProps","onOk","loading","PageLoader","DrawerWraper","_props$width","footer","operationProps","useEffect","console","error","Drawer","_classNames","keyboard","forceRender","destroyOnClose","contentWrapperStyle","maxWidth","drawerModels","createDrawerWraperModel","Model","useEffectCustom","fn","deps","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","DrawerWrapperContent","DrawerWrapperFooter","DrawerWrapper","Error","Content","Footer","createDrawerWrapperModel","getEditable","editable","tableRowIndex","CheckboxGroupFormItemContent","fieldConfig","editableConfig","render","editableComptProps","viewLabelList","options","length","label","returnList","forEach","target","find","temp","push","Checkbox","Group","tag","Tag","CheckboxGroupFormItem","formItemProps","Form","Item","DatePickerWrapperFormItem","FormItemContent","viewLabel","join","DateRangePickerWrapperFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","defaultState","selectorList","originalSelectorList","queryIsEmpty","requestStatus","_SelectorWrapperModel","setSelectBoxList","resetSelectBoxList","changeRequestStatus","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","forwardRef","ref","serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","modelKey","fieldNames","isSearch","newServiceConfig","newEffectDependencyList","changeOperateValueRef","useRef","useState","_useState","setLoading","_selectorWrapperModel","useStore","requestPreKey","valueIsEmpty","isUndefinedOrNull","serviceRespDataAdapter","respData","respDataList","onRequestResultAdapter","startDataSourceRequest","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","_respData","respAdapterData","respDataTranslation","$Try_1_Post","$Try_1_Catch","message","onRequest","_extend","warn","$Try_2_Post","$Try_2_Catch","window","$await_3","arrayField2LabelValue","realTimeState","getState","current","concat","useImperativeHandle","onClearSelectorList","getSelectorList","filterOption","input","option","toLowerCase","indexOf","onSearch","useDebounceCallback","_len","arguments","otherParams","Array","_key","onAgainRequest","selectOptionsAll","Select","Option","showSearch","allowClear","notFoundContent","NotFoundContent","suffixIcon","_RedoOutlined","spin","onLabelRenderAdapter","description","Empty","image","PRESENTED_IMAGE_SIMPLE","setSelectorList","_useState2","setviewLabelList","String","dataList","display","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isString","_isNumber","_isBoolean","JSON","stringify","TextFormItem","noStyle","TextAreaFormItem","TextArea","UploadWrapper","onUploadError","uploadList","setUploadList","uid","url","onUploadChange","info","fileList","file","status","response","code","result","data","maxCount","targetList","targetIndex","findIndex","tempUid","splice","Upload","disabled","UploadTrigger","listType","marginTop","ghost","UploadWrapperFormItemContent","_objectWithoutPropertiesLoose","_editableComptProps","UploadWrapperFormItem","FormItemAdapter","newEditable","commomProps","completeName","FormList","from","useFormInstance","formListConfig","onFormListBeforeRender","editableConfigList","onFormListAfterRender","onFormListItemBeforeRender","onFormListItemAfterRender","deleteOperateRender","List","fields","add","remove","_Fragment","getFieldValue","fieldChild","hasEditable","formListItemIndex","fieldItem","fieldName","DeleteFormListItem","_DeleteOutlined","FormListItem","EditableTable","_props$tableProps2","columns","columnItem","operateRender","otherColumnItem","onCell","_props$tableProps","valign","tableProps","cellVerticalAlign","_value","record","operation","dataIndex","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","FileImport","onImportFinish","showUploadList","accept","FileUpload","onPreview","uploadValue","setUploadValue","fileKey","fileName","thumbUrl","uploadItem","respValue","onUploadPreview","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","height","IconWrapper","Tooltip","hoverTips","ModalModel","openModalForm","closeModal","setModalItemData","ModalOperation","_ref$okText","_ref$cancelText","ModalWraper","Modal","modalModels","createModalWraperModel","ModalWrapperContent","ModalWrapperFooter","ModalWrapper","createModalWrapperModel","PageFixedFooter","Page404","formClassName","label_width_70","label_width_80","label_width_90","label_width_100","label_width_110","label_width_120","label_width_130","label_width_auto","formItemClassName","preDefinedClassName","form","formItem","SimpleLayout","labelAlign","formLabelAlign","layoutType","titleClassName","titleLeftLine","desc","SmsCountDown","showMessage","setShowMessage","running","setRunning","starting","_useState3","setStarting","initConfig","sendTxt","sentTxt","processingTxt","autoStart","totalTicks","duration","countdownFnc","useCountdownCallback","num","second","replace","onTick","intervalTime","onStart","onSendRequest","catch","overdueConsole","TableFilterLayout","isFixed","Children","Condition","Operate","treeSelectorList","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","log","valueList","expandedKeys","tempValue","prev","mergeList","Set","getTreeSelectorList","onTreeExpand","TreeSelect","dropdownStyle","maxHeight","overflow","treeLine","treeData","TreeWrapperModel","setTreeList","resetTreeList","treeWrapperModels","treeWrapperModel","TreeWrapper","selectorTreeList","_treeWrapperModel$use","useUpdateEffect","filterLabel","filter","_item$label","tempItem","targetValues","getTreeDataList","onExpand","onCheck","checkedKeys","onSelect","multiple","treeFieldNames","newFieldNames","Tree","showLine","checkable","showLeafIcon","selectedKeys","Spin","spinning"],"mappings":";07CAIO,IAAMA,GAASC,sYCATC,IAAAA,GAAoB,SAApBA,IACX,IAAAC,EAA0BC,IAAlBC,IAAAA,cACR,IAAMC,EAA2BC,EAAQF,GAAiBA,EAAgB,GAC1E,OAAOC,OAGIE,GAAgB,SAAhBA,EAAiBC,GAC5B,IAAMH,EAAiBJ,KACvB,GAAII,EAAeI,SAASD,GAAO,CACjC,OAAO,KAET,OAAO,WAMIE,GAAkC,SAAlCA,EAAmCC,GAC9C,IAAMN,EAAiBJ,KACvB,GAAII,EAAeI,SAASE,EAAMH,MAAO,CACvC,OAAOI,EAACC,EAAD,CAAAC,SAAWH,EAAMG,WAE1B,OAAO,yGCJIC,GAAyC,SAAzCA,EAA0CJ,GACrD,OACEC,EAAA,MAAA,CAAKI,UAAU,gBAAfF,SACEF,EAACK,EAAD,CACEC,MAAON,EAACO,EAAD,CAASC,KAAK,aACrBC,KAAMV,EAAMU,KACZC,KAAMC,EAAYZ,EAAMW,MAAQ,KAAOX,EAAMW,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rD7e,EAFN,CAGE8J,WAAY0U,EACZjC,aAAcP,EACdmB,SAAUna,EAAM0Y,SAChByC,SAAUA,EACVW,aAAc9e,EAAW4e,UAAYje,UAAY2b,EACjD+B,YAAare,EAAW4e,UAAYtC,EAAY3b,UAChDyd,QAASpe,EAAW4e,UAAYR,EAAUzd,UAC1C2d,SAAUte,EAAW4e,UAAYje,UAAY2d,EAC7Cve,MAAKI,GAAA,CAAI4B,MAAO,QAAW/B,EAAWD,UAK5C,OACEvB,EAACuP,GAAD,CACEjF,cAAe9F,EAAM8F,cACrBhF,QAASA,EACT0J,eAAgBxC,OAKtB,IAAM+C,GAAkB,SAAlBA,EAAmBxP,GAKvB,IAAM6P,EAAchN,GAAQ,WAC1B,GAAI7C,EAAMuK,gBAAkB,gBAAiB,CAC3C,MAAO,cACF,GAAIvK,EAAMuK,gBAAkB,kBAAmB,CACpD,MAAO,OAET,MAAO,UACN,CAACvK,EAAMuK,gBACV,OACExF,EAAA,MAAA,CAAK1E,UAAU,qBAAfF,SAAA,CACEF,EAACugB,EAAD,CAAMC,SAAUzgB,EAAMuF,UACtBtF,EAAC6P,EAAD,CAAOC,MAAOD,EAAME,uBAAwBH,YAAaA,EAAzD1P,SACGH,EAAMuK,gBAAkB,iBACvBtK,EAACkC,EAAD,CAAQ1B,KAAK,UAAUU,QAASnB,EAAMiP,eAAtC9O,SAAA"}
|
package/index.d.ts
CHANGED
|
@@ -211,7 +211,7 @@ export declare type SelectorWrapperProps = Omit<SelectProps, "filterOption" | "o
|
|
|
211
211
|
/**
|
|
212
212
|
* 同步设置选择器选项列表
|
|
213
213
|
* ```
|
|
214
|
-
* 1. 当设置selectorList后,serviceConfig、operateType=search
|
|
214
|
+
* 1. 当设置selectorList后,serviceConfig、operateType=search将失效
|
|
215
215
|
* 2. 不支持异步数据,异步使用serviceConfig方式
|
|
216
216
|
* 3. 如果配置fieldNames,会转换后使用
|
|
217
217
|
* ```
|
|
@@ -220,7 +220,7 @@ export declare type SelectorWrapperProps = Omit<SelectProps, "filterOption" | "o
|
|
|
220
220
|
/**
|
|
221
221
|
* 通过服务获取数据后回调,当设置`selectorList`后无效果
|
|
222
222
|
*/
|
|
223
|
-
onSelectorListChange?: (dataList:
|
|
223
|
+
onSelectorListChange?: (dataList: TPlainObject[]) => void;
|
|
224
224
|
/**
|
|
225
225
|
* 添加全部选项
|
|
226
226
|
* ```
|
|
@@ -254,7 +254,7 @@ export declare type SelectorWrapperRefApi = {
|
|
|
254
254
|
* 1.1: 当有effectDependencyList依赖项时,依赖项的发生变化后,每次都会去调用接口获取数据
|
|
255
255
|
* 1.2: 当无effectDependencyList依赖项时,第一次调用接口成功后会有标记,下次访问存在标记,就不在调用接口,使用缓存数据;如果想强制刷新数据,可通过随便配置依赖项完成
|
|
256
256
|
* 2. selectorList属性
|
|
257
|
-
* 2.1 当设置selectorList属性后,serviceConfig、operateType=search
|
|
257
|
+
* 2.1 当设置selectorList属性后,serviceConfig、operateType=search将失效
|
|
258
258
|
* 2.2 不支持异步数据,异步使用serviceConfig方式
|
|
259
259
|
* 3. operateType=search状态下,回填数据查询接口时,会在接口中默认添加id字段(id的值为回填的值)
|
|
260
260
|
* ```
|
|
@@ -276,7 +276,7 @@ export declare const SelectorWrapper: import("react").ForwardRefExoticComponent<
|
|
|
276
276
|
/**
|
|
277
277
|
* 同步设置选择器选项列表
|
|
278
278
|
* ```
|
|
279
|
-
* 1. 当设置selectorList后,serviceConfig、operateType=search
|
|
279
|
+
* 1. 当设置selectorList后,serviceConfig、operateType=search将失效
|
|
280
280
|
* 2. 不支持异步数据,异步使用serviceConfig方式
|
|
281
281
|
* 3. 如果配置fieldNames,会转换后使用
|
|
282
282
|
* ```
|
|
@@ -285,7 +285,7 @@ export declare const SelectorWrapper: import("react").ForwardRefExoticComponent<
|
|
|
285
285
|
/**
|
|
286
286
|
* 通过服务获取数据后回调,当设置`selectorList`后无效果
|
|
287
287
|
*/
|
|
288
|
-
onSelectorListChange?: ((dataList:
|
|
288
|
+
onSelectorListChange?: ((dataList: TPlainObject[]) => void) | undefined;
|
|
289
289
|
/**
|
|
290
290
|
* 添加全部选项
|
|
291
291
|
* ```
|
|
@@ -582,6 +582,7 @@ export declare type GapProps = {
|
|
|
582
582
|
export declare const Gap: VFC<GapProps>;
|
|
583
583
|
export declare const useEffectCustom: (fn: EffectCallback, deps: DependencyList) => void;
|
|
584
584
|
export declare const useEffectCustomAsync: (fn: () => Promise<void>, deps: DependencyList) => void;
|
|
585
|
+
export declare type ShouldUpdateFunc<T> = (prev: T | undefined, next: T) => boolean;
|
|
585
586
|
export declare type IconWrapperProps = {
|
|
586
587
|
hoverTips?: string;
|
|
587
588
|
icon?: React.ReactNode;
|
|
@@ -904,7 +905,7 @@ export declare type TreeWrapperRefApi = {
|
|
|
904
905
|
* @param props
|
|
905
906
|
* @returns
|
|
906
907
|
* ```
|
|
907
|
-
* 1. 当设置selectorTreeList属性后,serviceConfig
|
|
908
|
+
* 1. 当设置selectorTreeList属性后,serviceConfig将失效
|
|
908
909
|
* ```
|
|
909
910
|
*/
|
|
910
911
|
export declare const TreeWrapper: import("react").ForwardRefExoticComponent<Omit<TreeProps<import("antd").TreeDataNode>, "onSelect" | "checkedKeys" | "selectedKeys" | "fieldNames" | "defaultSelectedKeys" | "onExpand" | "expandedKeys" | "treeData" | "defaultCheckedKeys" | "onCheck"> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.27",
|
|
4
4
|
"description": "flat-biz oss ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"react-router": "^6.3.0",
|
|
50
50
|
"react-router-dom": "^6.3.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "c82cfe5e186a3a88b113e8cd7e3c21b84915fecd"
|
|
53
53
|
}
|