@flatbiz/antd 2.3.19 → 2.3.20

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 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,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,Upload as g,Input as b,InputNumber as y,Radio as C,Select as w,Empty as N,message as L,Table as x,Modal as k,TreeSelect as R,Tree as S,Spin as q}from"antd";import{isArray as T}from"@dimjs/lang/cjs/is-array";import{Fragment as I,createElement as P,useMemo as D,useEffect as O,useState as _,forwardRef as A,useRef as E,useImperativeHandle as M,cloneElement as B,Children as K}from"react";import{jsx as F,jsxs as j,Fragment as W}from"react/jsx-runtime";import{hooks as U}from"@wove/react/cjs/hooks";import z from"moment";import{Model as Y}from"@dimjs/model-react";import{classNames as G}from"@dimjs/utils/cjs/class-names";import H from"@ant-design/icons/es/icons/SaveOutlined";import V from"@ant-design/icons/es/icons/PlusOutlined";import{extend as J}from"@dimjs/utils/cjs/extend";import Q from"@ant-design/icons/es/icons/UploadOutlined";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||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=T(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 F(I,{children:r.children})}return null};var se=["text","color","onClick","permission","needConfirm","confirmMessage","hidden","style"];var ce=function e(r){return F("div",{className:"table-operate",children:F(u,{split:F(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 F(c,{title:o,okText:"确定",cancelText:"取消",onConfirm:a,arrowPointAtCenter:true,children:F(d,ae({},f,{onClick:undefined,type:m,danger:true,style:v,children:t}))},r)}return P(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=D((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(z(e).format(o))}else{a==null?void 0:a(undefined)}}));var s=n&&t.isDate(n)?z(new Date(n)):undefined;return F(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=D((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([z(t).format(o),z(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)?[z(new Date(c)),z(new Date(d))]:undefined;return F(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 F("div",{className:"fixed-bottom-block",children:j(u,{size:"middle",children:[F(d,ae({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&F(d,ae({type:"primary",icon:F(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 F("div",{className:"drawer-wraper-loader",children:j("div",{className:"loader-wrapper",children:[F("div",{className:"loader-inner"}),F("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);O((function(){console.error("@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换,可全局替换DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel")}),[]);return j(v,ae({className:G("drawer-wraper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:i},size:"default"},s,{footer:o||o===null?o:F(he,ae({},u)),children:[F("div",{className:"drawer-wraper-content",children:l}),t&&F(be,{})]}))};var Ce={};var we=function e(r){if(!Ce[r]){Ce[r]=Y(pe)}return Ce[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){return F("div",{className:"fixed-bottom-block",children:j(u,{size:"middle",children:[F(d,ae({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&F(d,ae({type:"primary",icon:F(H,{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var xe=["pageLoading","className","width","children","footer","operationProps"];var ke=function e(){return F("div",{className:"drawer-wrapper-loader",children:j("div",{className:"loader-wrapper",children:[F("div",{className:"loader-inner"}),F("div",{className:"loader-text",children:"LOADING"})]})})};var Re=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,xe);return j(v,ae({className:G("drawer-wrapper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:i},size:"default"},s,{footer:o||o===null?o:F(Le,ae({},u)),children:[F("div",{className:"drawer-wrapper-content",children:l}),t&&F(ke,{})]}))};var Se={};var qe=function e(r){if(!Se[r]){Se[r]=Y(Ne)}return Se[r]};var Te=function e(r,t){return typeof r==="boolean"?r:r==null?void 0:r({tableRowIndex:t})};var Ie=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=D((function(){if(a)return[];var e=T(r.value)?r.value:[];var t=l.options||[];if(!T(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 F(p.Group,ae({},l,{value:r.value,onChange:r.onChange}))}return F("span",{className:"editable-checkbox-group-view",children:i?i(r.value):o.map((function(e,r){return F(h,{color:"#2db7f5",children:e.label},r)}))})};var Pe=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-checkbox-group-form-item",t==null?void 0:t.className),children:F(Ie,ae({},r))}))};var De=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return F(m.Item,ae({},n,{name:r.name,className:G("editable-date-picker-wraper-form-item",n==null?void 0:n.className),children:F(fe,ae({},a.editableComptProps))}))};var Oe=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=D((function(){var e=T(r.value)?r.value:[];if(a)return undefined;return e.join("~")}),[a,r.value]);if(a){return F(me,ae({},l,{value:r.value,onChange:r.onChange}))}return F("span",{className:"editable-date-range-picker-view",children:i?i(r.value):o})};var _e=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-date-range-picker-wraper-form-item",t==null?void 0:t.className),children:F(Oe,ae({},r))}))};var Ae=function e(r,t){return O(r,t)};var Ee=function e(r,t){O((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 Me=["onChange","onUploadError","onPreview","value"];var Be=function e(r){Ae((function(){console.error("@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换")}),[]);var t=r.onChange,n=r.onUploadError,a=r.onPreview,i=r.value,l=ie(r,Me);var o=_([]),u=o[0],s=o[1];var c=J({fileKey:"fileKey",fileName:"fileName"},r.fieldNames);O((function(){if(i&&T(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 F(g,ae({},l,{onChange:d,onPreview:f,fileList:u,className:G("v-file-upload",l.className),children:r.children}))};var Ke=["children"];var Fe=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,Ke);if(i){return F(Be,ae({},u,{value:r.value,onChange:r.onChange,children:o?o:F(d,{type:"primary",ghost:true,icon:F(Q,{}),children:"选择文件上传"})}))}return F("div",{className:"form-upload-selector-view",children:a?a(r.value):F(Be,ae({},u,{value:r.value,disabled:true}))})};var je=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-form-upload-form-item",t==null?void 0:t.className),children:F(Fe,ae({},r))}))};var We=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return F(m.Item,ae({},n,{name:r.name,children:F(b,ae({},a.editableComptProps))}))};var Ue=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return F(m.Item,ae({},n,{name:r.name,className:G("editable-input-number-form-item",n==null?void 0:n.className),children:F(y,ae({},a.editableComptProps))}))};var ze=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=D((function(){if(a)return[];var e=r.value;var t=l.options||[];if(!T(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 F(C.Group,ae({},l,{value:r.value,onChange:u}))}return F("span",{className:"editable-radio-group-view",children:i?i(r.value):o?F(h,{color:"#2db7f5",children:o}):null})};var Ye=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-radio-group-form-item",t==null?void 0:t.className),children:F(ze,ae({},r))}))};var Ge={selectorList:[],queryIsEmpty:false};var He={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:Ge};var Ve={};var Je=function e(r){if(!Ve[r]){Ve[r]=Y(He)}return Ve[r]};var Qe=["serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","operateType","searchFieldName","selectorList","modelKey","fieldNames"];var Xe=A((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,Qe);var m=u==="search"&&c===undefined;var p=t||{};var h=l||[];var g=E();var b=_(false),y=b[0],C=b[1];var N=Je(d).useStore(),x=N[0],k=N[1];var R=function e(r){return r===""||n(r)};var S=function e(r){var t=p.onRequestResultAdapter?p.onRequestResultAdapter(r):r;return a(t||[],f)};var q=U.useCallbackRef((function(e,r){return new Promise((function(t,a){var i,l,u,c,d,f;var v=function(){try{return t()}catch(e){return a(e)}};var h=function(e){try{C(false);void L.error(e.message||"数据查询异常...");return v()}catch(e){return a(e)}};try{if(!p.onRequest){throw new Error("onRequest 调用接口服务不能为空")}i=p.requiredParamsKeys;l=J({},p.params);if(i){u=i.find((function(e){return R(l[e])}));if(u){console.warn("SelectorWrapper组件:参数:"+i.join("、")+"不能为空");return t()}}var g=function(){try{return v()}catch(e){return h(e)}};var b=function(e){try{C(false);void k.changeRequestStatus("request-error");return g()}catch(e){return h(e)}};try{C(true);void k.changeRequestStatus("request-pre");if((!n(e)||!n(r))&&m){c=s||"keyword";l[c]=e;l["id"]=r}return Promise.resolve(p.onRequest==null?void 0:p.onRequest(l)).then((function(e){try{d=e;f=S(d);C(false);o==null?void 0:o(f);void k.setSelectBoxList(f);return g()}catch(e){return b(e)}}),b)}catch(e){b(e)}}catch(e){h(e)}}))}));Z((function(){if(c){void k.setSelectBoxList(a(c||[],f));return}if(m)return;var e=Je(d).getState();if(h.length>0||!e.requestStatus||e.requestStatus==="request-error"){void q()}}),h);Z((function(){if(m){if(R(e.value)){o==null?void 0:o([]);void k.resetSelectBoxList()}else{if(e.value!==g.current){void q(undefined,e.value)}}}}),h.concat([e.value]));M(r,(function(){return{onClearSelectorList:function e(){void k.resetSelectBoxList()},getSelectorList:function e(){return x.selectorList}}}));var T=U.useCallbackRef((function(e,r){return(r==null?void 0:r.children).toLowerCase().indexOf(e.toLowerCase())>=0}));var I=U.useDebounceCallback((function(e){if(e){void q(e)}else{void k.resetSelectBoxList()}}),300);var P=U.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 D=U.useCallbackRef((function(){void q()}));var O=F(w.Option,{value:"",children:"全部"});return j(w,ae({showSearch:true,allowClear:true},v,{notFoundContent:F(Ze,{requestStatus:x.requestStatus,onAgainRequest:D}),loading:y,onSearch:m?I:undefined,filterOption:m?false:T,onChange:P,fieldNames:undefined,suffixIcon:x.requestStatus==="request-error"?F(X,{spin:y,onClick:D}):undefined,children:[i===true?O:i,x.selectorList.map((function(e){return F(w.Option,{value:e.value,children:e.label},e.value)}))]}))}));var Ze=function e(r){var t=D((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return F(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&F(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var $e=function e(r){var t=r.fieldConfig,n=t.editableConfig,i=t.editable,l=t.render;var o=n.editableComptProps;var u=D((function(){var e=T(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 F(Xe,ae({},o,{value:r.value,onChange:r.onChange}))}return F("span",{className:"editable-selector-view",children:l?l(r.value):u.map((function(e,r){return F(h,{color:"#2db7f5",children:e.label},r)}))})};var er=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-selector-wrapper-form-item",t==null?void 0:t.className),children:F($e,ae({},r))}))};var rr=function e(r){var t,n;var a=D((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 F("span",{className:"editable-text-view",children:((n=r.fieldConfig)==null?void 0:n.render==null?void 0:n.render(r.value))||a})};var tr=function e(r){return F(m.Item,{noStyle:true,name:r.name,children:F(rr,{name:r.name,fieldConfig:r.fieldConfig})})};var nr=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return F(m.Item,ae({},n,{name:r.name,children:F(b.TextArea,ae({},a.editableComptProps))}))};var ar=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable;var i=Te(a,r.tableRowIndex);var l=J({},r.fieldConfig,{editable:i});var o={name:r.name,fieldConfig:l};if((n==null?void 0:n.type)==="input"&&i){return F(We,ae({},o))}else if((n==null?void 0:n.type)==="inputNumber"&&i){return F(Ue,ae({},o))}else if((n==null?void 0:n.type)==="textArea"&&i){return F(nr,ae({},o))}else if((n==null?void 0:n.type)==="datePickerWrapper"&&i){return F(De,ae({},o))}else if((n==null?void 0:n.type)==="dateRangePickerWrapper"){return F(_e,ae({},o))}else if((n==null?void 0:n.type)==="selectorWrapper"){return F(er,ae({},o))}else if((n==null?void 0:n.type)==="checkboxGroup"){return F(Pe,ae({},o))}else if((n==null?void 0:n.type)==="radioGroup"){return F(Ye,ae({},o))}else if((n==null?void 0:n.type)==="fileUpload"){return F(je,ae({},o))}else if((n==null?void 0:n.type)==="custom"){return n.editableComptProps({name:r.name,editable:i,completeName:[].concat(r.completeName,r.name)})}return F(tr,ae({},o))};var ir=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;console.log("props.name",r.name);return F(m.List,{name:r.name,children:function e(n,d){var f=d.add,v=d.remove;return j(W,{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 Te(e.editable,r.tableRowIndex)}));var l=G("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 F(ar,{name:[e.name,t.fieldName],fieldConfig:t,tableRowIndex:r.tableRowIndex,completeName:r.completeName},n)})),a?F(lr,{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 lr=function e(r){return F(m.Item,{children:r.deleteOperateRender?r.deleteOperateRender({remove:r.remove,formListItemIndex:r.index}):F(d,{type:"link",danger:true,icon:F(te,{}),onClick:r.remove,children:"删除"})})};var or=function e(r){if(r.fieldConfig){if(T(r.fieldConfig["editableConfigList"])){var t=r.fieldConfig;return F(ir,{name:r.name,completeName:r.completeName,formListConfig:t,tableRowIndex:r.tableRowIndex})}else{return F(ar,{name:r.name,fieldConfig:r.fieldConfig,tableRowIndex:r.tableRowIndex,completeName:r.completeName})}}return F(tr,{name:r.name})};var ur=["fieldConfig","operateRender"];var sr=function e(r){var t=D((function(){if(!r.columns)return[];return r.columns.map((function(e){var t=e.fieldConfig,n=e.operateRender,a=ie(e,ur);return ae({},a,{render:function a(i,l){if(n){return n({name:[].concat(r.name,[l.name]),tableRowIndex:l.name,operation:l.operation})||""}return F(or,{name:[l.name,e.dataIndex],completeName:[].concat(r.name,[l.name,e.dataIndex]),fieldConfig:t,tableRowIndex:l.name})}})}))}),[r.columns,r.name]);return F("div",{className:"editable-table",children:F(m.List,{name:r.name,rules:r.rules,children:function e(n,a){return j(I,{children:[r.onTableBeforeRender?r.onTableBeforeRender(a,n.length):null,F(x,ae({scroll:{x:"max-content"},pagination:false,components:{body:{cell:function e(t){var n;return F("td",ae({},t,{valign:((n=r.tableProps)==null?void 0:n.cellVerticalAlign)||"middle"}))}}}},r.tableProps,{dataSource:n.map((function(e){return ae({},e,{operation:a})})),columns:t,rowKey:"key"})),r.onTableAfterRender?r.onTableAfterRender(a,n.length):F(d,{type:"dashed",onClick:function e(){return a.add()},block:true,icon:F(V,{}),style:{marginTop:15},children:"新增"})]})}})})};var cr=["onChange","onUploadError","value"];var dr=function e(r){var t=r.onChange,n=r.onUploadError,a=r.value,i=ie(r,cr);var l=_(),o=l[0],u=l[1];var s=J({uid:"uid",name:"name",url:"url"},r.fieldNames);Ae((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;t==null?void 0:t((a||[]).concat(o))}else{if(n){n(l.message)}else{void L.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 L.error("上传操作失败...")}}u([].concat(i));r.onUploadChange==null?void 0:r.onUploadChange(e)}));return F(g,ae({},i,{onChange:c,fileList:o,className:G("v-upload-wrapper",i.className),children:r.children?r.children:F(fr,{listType:i.listType})}))};var fr=function e(r){if(r.listType==="picture-card"){return j("div",{children:[F(V,{}),F("div",{style:{marginTop:8},children:"上传图片"})]})}if(r.listType==="picture"){return F(d,{type:"primary",ghost:true,children:"选择图片上传"})}return F(d,{type:"primary",ghost:true,children:"选择文件导入"})};var vr=["onImportFinish"];var mr=function e(r){var t=r.onImportFinish,n=ie(r,vr);var a=_(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 u=U.useCallbackRef((function(e){l(false);void L.error(e||"文件导入异常...")}));var s=U.useCallbackRef((function(e){t(e)}));return F(dr,ae({showUploadList:false,onUploadChange:o,onUploadError:u},n,{onChange:s,children:r.children?r.children:F(d,{type:"primary",ghost:true,loading:i,children:"选择文件"})}))};mr.defaultProps={name:"file",accept:".xlsx,.xls"};var pr=function e(r){var t=T(r.children)?r.children:[r.children];var a=r.direction||"vertical";var i=r.gap?r.gap:0;var l=!n(r.fullIndex)?T(r.fullIndex)?r.fullIndex:[r.fullIndex]:[];return F("div",{className:G("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 B(e,{style:o})}))})};var hr=function e(r){return F("div",{style:ae({height:r.height},r.style),className:r.className})};var gr={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 br=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var yr=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,br);return F(I,{children:j(u,{size:"middle",children:[F(d,ae({},f.cancelButtonProps,{className:"cancel-btn",onClick:o,children:l})),c!=true&&F(d,ae({type:"primary"},f.okButtonProps,{className:"ok-btn",onClick:s,loading:t,children:a}))]})})};var Cr=["pageLoading","className","width","children","footer","operationProps"];var wr=function e(){return F("div",{className:"modal-wraper-loader",children:j("div",{className:"loader-wrapper",children:[F("div",{className:"loader-inner"}),F("div",{className:"loader-text",children:"LOADING"})]})})};var Nr=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,Cr);O((function(){console.error("@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换,可全局替换ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel")}),[]);return j(k,ae({className:G("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&&F(wr,{})]}),l!==null&&F("div",{className:"modal-wraper-content-footer",children:l?l:F(yr,ae({},o))})]}))};var Lr={};var xr=function e(r){if(!Lr[r]){Lr[r]=Y(gr)}return Lr[r]};var kr={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 Rr=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Sr=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,Rr);return F(I,{children:j(u,{size:"middle",children:[F(d,ae({},f.cancelButtonProps,{className:"cancel-btn",onClick:o,children:l})),c!=true&&F(d,ae({type:"primary"},f.okButtonProps,{className:"ok-btn",onClick:s,loading:t,children:a}))]})})};var qr=["pageLoading","className","width","children","footer","operationProps"];var Tr=function e(){return F("div",{className:"modal-wrapper-loader",children:j("div",{className:"loader-wrapper",children:[F("div",{className:"loader-inner"}),F("div",{className:"loader-text",children:"LOADING"})]})})};var Ir=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,qr);return j(k,ae({className:G("modal-wrapper",n),keyboard:false,forceRender:true,destroyOnClose:true},u,{width:a||600,footer:null,children:[j("div",{className:"modal-wrapper-content",children:[i,t&&F(Tr,{})]}),l!==null&&F("div",{className:"modal-wrapper-content-footer",children:l?l:F(Sr,ae({},o))})]}))};var Pr={};var Dr=function e(r){if(!Pr[r]){Pr[r]=Y(kr)}return Pr[r]};var Or=function e(r){return F("div",{className:G("page-fixed-footer",r.className),style:r.style,children:r.children})};var _r=function e(){return F("div",{className:"v-404",children:"404"})};var Ar={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 Er={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 Mr={form:Ar,formItem:Er};var Br=function e(r){var t=r.formLabelAlign||"right";var n=G("simple-layout",{"simple-layout-tight":r.layoutType==="tight","simple-layout-formlabel-left":t==="left"},r.className);return j("div",{className:n,style:r.style,children:[r.title?F("div",{className:"simple-layout-title",children:r.title}):null,r.desc?F("div",{className:"simple-layout-desc",children:r.desc}):null,r.children?F("div",{className:"simple-layout-content",children:r.children}):null]})};var Kr=function e(r){var t=_(),n=t[0],a=t[1];var i=_(false),l=i[0],o=i[1];var u=_(false),s=u[0],c=u[1];var d=D((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});O((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=G("v-count-down",r.className,{running:l,starting:s});return F("div",{className:g,onClick:h,children:n})};Kr.defaultProps={totalTicks:60,duration:1e3,autoStart:false,format:"{t}s",sendTxt:"获取验证码",sentTxt:"重新获取",processingTxt:"发送中..."};var Fr=function e(){console.error("@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代")};var jr=function e(r){Ae((function(){Fr()}),[]);return F("div",{className:G("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 B(e,{className:"table-filter-layout-flex-full"})}return e}))})};var Wr=function e(r){return F("div",{className:G("table-filter-layout-condition",r.className),children:r.children})};var Ur=function e(r){return F("div",{className:G("table-filter-layout-operate",r.className),children:r.children})};var zr=function e(r){return F("div",{className:G("table-filter-layout-table",r.className),children:r.children})};var Yr=function e(r){return F("div",{className:G("table-filter-layout-footer",r.className),children:r.children})};jr.Condition=Wr;jr.Operate=Ur;jr.Table=zr;jr.Footer=Yr;var Gr={treeSelectorList:[],queryIsEmpty:false};var Hr={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:Gr};var Vr={};var Jr=function e(r){if(!Vr[r]){Vr[r]=Y(Hr)}return Vr[r]};var Qr=function e(r,t,n){if(!T(t)||t.length===0)return[];var a=i(t,n);return l(r,a)};var Xr=["serviceConfig","effectDependencyList","onTreeSelectorListChange","treeSelectorList","modelKey"];var Zr=A((function(e,r){var t=e.serviceConfig,a=e.effectDependencyList,i=e.onTreeSelectorListChange,l=e.treeSelectorList,o=e.modelKey,u=ie(e,Xr);var s=t||{};var c=a||[];var d=_(false),f=d[0],v=d[1];var m=_(),p=m[0],h=m[1];var g=Jr(o).useStore(),b=g[0],y=g[1];var C=function e(r){return r===""||n(r)};var w=function e(r){var t=s.onRequestResultAdapter?s.onRequestResultAdapter(r):r;return t};var N=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 L.error(e.message||"数据查询异常...");return u()}catch(e){return r(e)}};try{if(!s.onRequest){throw new Error("onRequest 调用接口服务不能为空")}t=s.requiredParamsKeys;n=J({},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=w(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)}}))}));Z((function(){if(l){void y.setSelectBoxList(l);return}var e=Jr(o).getState();console.log("realTimeState",e.requestStatus);if(c.length>0||!e.requestStatus||e.requestStatus==="request-error"){void N()}}),c);O((function(){if(!n(e.value)){var r=T(e.value)?e.value:[e.value];if(r.length>0&&b.treeSelectorList.length>0){var t=[];r.forEach((function(r){var n=Qr(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]);M(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 N()}));return F(R,ae({dropdownStyle:{maxHeight:400,overflow:"auto"},showSearch:true,treeLine:true},u,{treeExpandedKeys:p,treeData:b.treeSelectorList,loading:f,onTreeExpand:x,style:ae({width:"100%"},u.style),suffixIcon:b.requestStatus==="request-error"?F(X,{spin:f,onClick:k}):undefined,notFoundContent:F($r,{requestStatus:b.requestStatus,onAgainRequest:k})}))}));var $r=function e(r){var t=D((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return F(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&F(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var et={treeList:[],queryIsEmpty:false};var rt={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:et};var tt={};var nt=function e(r){if(!tt[r]){tt[r]=Y(rt)}return tt[r]};var at=function e(r,t,n){var a=i(t,n);return l(r,a)};var it=["serviceConfig","effectDependencyList","selectorTreeList","value","onChange","fieldNames","modelKey"];var lt=A((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,it);var f=t||{};var v=a||[];var m=_(),p=m[0],h=m[1];var g=nt(c).useStore(),b=g[0],y=g[1];var C=_(false),w=C[0],N=C[1];var x=D((function(){if(n(e.value))return undefined;return T(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 q=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{N(false);void L.error(e.message||"数据查询异常...");return o()}catch(e){return r(e)}};try{if(!f.onRequest){throw new Error("onRequest 调用接口服务不能为空")}t=f.requiredParamsKeys;n=J({},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{N(false);void y.changeRequestStatus("request-error");return s()}catch(e){return u(e)}};try{N(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||[]);N(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=nt(c).getState();if(v.length>0||!e.requestStatus||e.requestStatus==="request-error"){void q()}}),v);Z((function(){if(x&&x.length>0&&b.treeList.length>0&&!p){var r=[];x.forEach((function(t){var n=at(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=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=at(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]);M(r,(function(){return{onClearSelectorList:function e(){void y.resetTreeList()},getTreeDataList:function e(){return b.treeList}}}));var I=U.useCallbackRef((function(e){h(e)}));var P=U.useCallbackRef((function(e){u==null?void 0:u(e)}));var O=U.useCallbackRef((function(r){if(e.multiple){u==null?void 0:u(r)}else{u==null?void 0:u(r[0])}}));var A=D((function(){var e=J({label:"label",value:"value",children:"children"},s);return{title:e.label,key:e.value,children:e.children}}),[s]);if(b.treeList.length>0){return F(S,ae({showLine:d.checkable?false:{showLeafIcon:false}},d,{fieldNames:A,expandedKeys:p,treeData:b.treeList,onExpand:I,selectedKeys:d.checkable?undefined:x,checkedKeys:d.checkable?x:undefined,onCheck:d.checkable?P:undefined,onSelect:d.checkable?undefined:O,style:ae({width:"100%"},d.style)}))}return F(ot,{requestStatus:b.requestStatus,loading:w,onAgainRequest:q})}));var ot=function e(r){var t=D((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:[F(q,{spinning:r.loading}),F(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,children:r.requestStatus==="request-error"&&F(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})]})};export{ce as ButtonOperate,fe as DatePickerWrapper,me as DateRangePickerWrapper,ye as DrawerWraper,Re as DrawerWrapper,sr as EditableTable,mr as FileImport,Be as FileUpload,pr as FlexLayout,hr as Gap,Nr as ModalWraper,Ir as ModalWrapper,_r as Page404,Or as PageFixedFooter,ue as Permission,Xe as SelectorWrapper,Br as SimpleLayout,Kr as SmsCountDown,jr as TableFilterLayout,Zr as TreeSelectorWrapper,lt as TreeWrapper,dr as UploadWrapper,we as createDrawerWraperModel,qe as createDrawerWrapperModel,xr as createModalWraperModel,Dr as createModalWrapperModel,le as getPermissionList,oe as hasPermission,Mr as preDefinedClassName,ne as styles,Ae as useEffectCustom,Ee 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,Upload as g,Input as b,InputNumber as y,Radio as C,Select as w,Empty as N,message as L,Table as x,Modal as k,TreeSelect as R,Tree as S,Spin as q}from"antd";import{isArray as T}from"@dimjs/lang/cjs/is-array";import{Fragment as I,createElement as P,useMemo as D,useEffect as O,useState as _,forwardRef as A,useRef as E,useImperativeHandle as M,cloneElement as B,Children as K}from"react";import{jsx as F,jsxs as j,Fragment as W}from"react/jsx-runtime";import{hooks as U}from"@wove/react/cjs/hooks";import z from"moment";import{Model as Y}from"@dimjs/model-react";import{classNames as G}from"@dimjs/utils/cjs/class-names";import V from"@ant-design/icons/es/icons/SaveOutlined";import H from"@ant-design/icons/es/icons/PlusOutlined";import{extend as J}from"@dimjs/utils/cjs/extend";import Q from"@ant-design/icons/es/icons/UploadOutlined";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||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=T(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 F(I,{children:r.children})}return null};var se=["text","color","onClick","permission","needConfirm","confirmMessage","hidden","style"];var ce=function e(r){return F("div",{className:"table-operate",children:F(u,{split:F(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 F(c,{title:o,okText:"确定",cancelText:"取消",onConfirm:a,arrowPointAtCenter:true,children:F(d,ae({},f,{onClick:undefined,type:m,danger:true,style:v,children:t}))},r)}return P(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=D((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(z(e).format(o))}else{a==null?void 0:a(undefined)}}));var s=n&&t.isDate(n)?z(new Date(n)):undefined;return F(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=D((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([z(t).format(o),z(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)?[z(new Date(c)),z(new Date(d))]:undefined;return F(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 F("div",{className:"fixed-bottom-block",children:j(u,{size:"middle",children:[F(d,ae({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&F(d,ae({type:"primary",icon:F(V,{})},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 F("div",{className:"drawer-wraper-loader",children:j("div",{className:"loader-wrapper",children:[F("div",{className:"loader-inner"}),F("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);O((function(){console.error("@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换,可全局替换DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel")}),[]);return j(v,ae({className:G("drawer-wraper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:i},size:"default"},s,{footer:o||o===null?o:F(he,ae({},u)),children:[F("div",{className:"drawer-wraper-content",children:l}),t&&F(be,{})]}))};var Ce={};var we=function e(r){if(!Ce[r]){Ce[r]=Y(pe)}return Ce[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){return F("div",{className:"fixed-bottom-block",children:j(u,{size:"middle",children:[F(d,ae({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&F(d,ae({type:"primary",icon:F(V,{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var xe=["pageLoading","className","width","children","footer","operationProps"];var ke=function e(){return F("div",{className:"drawer-wrapper-loader",children:j("div",{className:"loader-wrapper",children:[F("div",{className:"loader-inner"}),F("div",{className:"loader-text",children:"LOADING"})]})})};var Re=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,xe);return j(v,ae({className:G("drawer-wrapper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:i},size:"default"},s,{footer:o||o===null?o:F(Le,ae({},u)),children:[F("div",{className:"drawer-wrapper-content",children:l}),t&&F(ke,{})]}))};var Se={};var qe=function e(r){if(!Se[r]){Se[r]=Y(Ne)}return Se[r]};var Te=function e(r,t){return typeof r==="boolean"?r:r==null?void 0:r({tableRowIndex:t})};var Ie=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=D((function(){if(a)return[];var e=T(r.value)?r.value:[];var t=l.options||[];if(!T(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 F(p.Group,ae({},l,{value:r.value,onChange:r.onChange}))}return F("span",{className:"editable-checkbox-group-view",children:i?i(r.value):o.map((function(e,r){return F(h,{color:"#2db7f5",children:e.label},r)}))})};var Pe=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-checkbox-group-form-item",t==null?void 0:t.className),children:F(Ie,ae({},r))}))};var De=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return F(m.Item,ae({},n,{name:r.name,className:G("editable-date-picker-wraper-form-item",n==null?void 0:n.className),children:F(fe,ae({},a.editableComptProps))}))};var Oe=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=D((function(){var e=T(r.value)?r.value:[];if(a)return undefined;return e.join("~")}),[a,r.value]);if(a){return F(me,ae({},l,{value:r.value,onChange:r.onChange}))}return F("span",{className:"editable-date-range-picker-view",children:i?i(r.value):o})};var _e=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-date-range-picker-wraper-form-item",t==null?void 0:t.className),children:F(Oe,ae({},r))}))};var Ae=function e(r,t){return O(r,t)};var Ee=function e(r,t){O((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 Me=["onChange","onUploadError","onPreview","value"];var Be=function e(r){Ae((function(){console.error("@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换")}),[]);var t=r.onChange,n=r.onUploadError,a=r.onPreview,i=r.value,l=ie(r,Me);var o=_([]),u=o[0],s=o[1];var c=J({fileKey:"fileKey",fileName:"fileName"},r.fieldNames);O((function(){if(i&&T(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 F(g,ae({},l,{onChange:d,onPreview:f,fileList:u,className:G("v-file-upload",l.className),children:r.children}))};var Ke=["children"];var Fe=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,Ke);if(i){return F(Be,ae({},u,{value:r.value,onChange:r.onChange,children:o?o:F(d,{type:"primary",ghost:true,icon:F(Q,{}),children:"选择文件上传"})}))}return F("div",{className:"form-upload-selector-view",children:a?a(r.value):F(Be,ae({},u,{value:r.value,disabled:true}))})};var je=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-form-upload-form-item",t==null?void 0:t.className),children:F(Fe,ae({},r))}))};var We=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return F(m.Item,ae({},n,{name:r.name,children:F(b,ae({},a.editableComptProps))}))};var Ue=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return F(m.Item,ae({},n,{name:r.name,className:G("editable-input-number-form-item",n==null?void 0:n.className),children:F(y,ae({},a.editableComptProps))}))};var ze=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable,i=t.render;var l=n.editableComptProps;var o=D((function(){if(a)return[];var e=r.value;var t=l.options||[];if(!T(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 F(C.Group,ae({},l,{value:r.value,onChange:u}))}return F("span",{className:"editable-radio-group-view",children:i?i(r.value):o?F(h,{color:"#2db7f5",children:o}):null})};var Ye=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-radio-group-form-item",t==null?void 0:t.className),children:F(ze,ae({},r))}))};var Ge={selectorList:[],queryIsEmpty:false};var Ve={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:Ge};var He={};var Je=function e(r){if(!He[r]){He[r]=Y(Ve)}return He[r]};var Qe=["serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","operateType","searchFieldName","selectorList","modelKey","fieldNames"];var Xe=A((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,Qe);var m=u==="search"&&c===undefined;var p=t||{};var h=l||[];var g=E();var b=_(false),y=b[0],C=b[1];var N=Je(d).useStore(),x=N[0],k=N[1];var R=function e(r){return r===""||n(r)};var S=function e(r){var t=p.onRequestResultAdapter?p.onRequestResultAdapter(r):r;return a(t||[],f)};var q=U.useCallbackRef((function(e,r){return new Promise((function(t,a){var i,l,u,c,d,f;var v=function(){try{return t()}catch(e){return a(e)}};var h=function(e){try{C(false);void L.error(e.message||"数据查询异常...");return v()}catch(e){return a(e)}};try{if(!p.onRequest){throw new Error("onRequest 调用接口服务不能为空")}i=p.requiredParamsKeys;l=J({},p.params);if(i){u=i.find((function(e){return R(l[e])}));if(u){console.warn("SelectorWrapper组件:参数:"+i.join("、")+"不能为空");return t()}}var g=function(){try{return v()}catch(e){return h(e)}};var b=function(e){try{C(false);void k.changeRequestStatus("request-error");return g()}catch(e){return h(e)}};try{C(true);void k.changeRequestStatus("request-pre");if((!n(e)||!n(r))&&m){c=s||"keyword";l[c]=e;l["id"]=r}return Promise.resolve(p.onRequest==null?void 0:p.onRequest(l)).then((function(e){try{d=e;f=S(d);C(false);o==null?void 0:o(f);void k.setSelectBoxList(f);return g()}catch(e){return b(e)}}),b)}catch(e){b(e)}}catch(e){h(e)}}))}));Z((function(){if(c){void k.setSelectBoxList(a(c||[],f));return}if(m)return;var e=Je(d).getState();if(h.length>0||!e.requestStatus||e.requestStatus==="request-error"){void q()}}),h);Z((function(){if(m){if(R(e.value)){o==null?void 0:o([]);void k.resetSelectBoxList()}else{if(e.value!==g.current){void q(undefined,e.value)}}}}),h.concat([e.value]));M(r,(function(){return{onClearSelectorList:function e(){void k.resetSelectBoxList()},getSelectorList:function e(){return x.selectorList}}}));var T=U.useCallbackRef((function(e,r){return(r==null?void 0:r.children).toLowerCase().indexOf(e.toLowerCase())>=0}));var I=U.useDebounceCallback((function(e){if(e){void q(e)}else{void k.resetSelectBoxList()}}),300);var P=U.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 D=U.useCallbackRef((function(){void q()}));var O=F(w.Option,{value:"",children:"全部"});return j(w,ae({showSearch:true,allowClear:true},v,{notFoundContent:F(Ze,{requestStatus:x.requestStatus,onAgainRequest:D}),loading:y,onSearch:m?I:undefined,filterOption:m?false:T,onChange:P,fieldNames:undefined,suffixIcon:x.requestStatus==="request-error"?F(X,{spin:y,onClick:D}):undefined,children:[i===true?O:i,x.selectorList.map((function(e){return F(w.Option,{value:e.value,children:e.label},e.value)}))]}))}));var Ze=function e(r){var t=D((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return F(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&F(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var $e=function e(r){var t=r.fieldConfig,n=t.editableConfig,i=t.editable,l=t.render;var o=n.editableComptProps;var u=D((function(){var e=T(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 F(Xe,ae({},o,{value:r.value,onChange:r.onChange}))}return F("span",{className:"editable-selector-view",children:l?l(r.value):u.map((function(e,r){return F(h,{color:"#2db7f5",children:e.label},r)}))})};var er=function e(r){var t=r.fieldConfig.formItemProps;return F(m.Item,ae({},t,{name:r.name,className:G("editable-selector-wrapper-form-item",t==null?void 0:t.className),children:F($e,ae({},r))}))};var rr=function e(r){var t,n;var a=D((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 F("span",{className:"editable-text-view",children:((n=r.fieldConfig)==null?void 0:n.render==null?void 0:n.render(r.value))||a})};var tr=function e(r){return F(m.Item,{noStyle:true,name:r.name,children:F(rr,{name:r.name,fieldConfig:r.fieldConfig})})};var nr=function e(r){var t=r.fieldConfig,n=t.formItemProps,a=t.editableConfig;return F(m.Item,ae({},n,{name:r.name,children:F(b.TextArea,ae({},a.editableComptProps))}))};var ar=function e(r){var t=r.fieldConfig,n=t.editableConfig,a=t.editable;var i=Te(a,r.tableRowIndex);var l=J({},r.fieldConfig,{editable:i});var o={name:r.name,fieldConfig:l};if((n==null?void 0:n.type)==="input"&&i){return F(We,ae({},o))}else if((n==null?void 0:n.type)==="inputNumber"&&i){return F(Ue,ae({},o))}else if((n==null?void 0:n.type)==="textArea"&&i){return F(nr,ae({},o))}else if((n==null?void 0:n.type)==="datePickerWrapper"&&i){return F(De,ae({},o))}else if((n==null?void 0:n.type)==="dateRangePickerWrapper"){return F(_e,ae({},o))}else if((n==null?void 0:n.type)==="selectorWrapper"){return F(er,ae({},o))}else if((n==null?void 0:n.type)==="checkboxGroup"){return F(Pe,ae({},o))}else if((n==null?void 0:n.type)==="radioGroup"){return F(Ye,ae({},o))}else if((n==null?void 0:n.type)==="fileUpload"){return F(je,ae({},o))}else if((n==null?void 0:n.type)==="custom"){return n.editableComptProps({name:r.name,editable:i,completeName:[].concat(r.completeName,r.name)})}return F(tr,ae({},o))};var ir=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;console.log("props.name",r.name);return F(m.List,{name:r.name,children:function e(n,d){var f=d.add,v=d.remove;return j(W,{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 Te(e.editable,r.tableRowIndex)}));var l=G("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 F(ar,{name:[e.name,t.fieldName],fieldConfig:t,tableRowIndex:r.tableRowIndex,completeName:r.completeName},n)})),a?F(lr,{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 lr=function e(r){return F(m.Item,{children:r.deleteOperateRender?r.deleteOperateRender({remove:r.remove,formListItemIndex:r.index}):F(d,{type:"link",danger:true,icon:F(te,{}),onClick:r.remove,children:"删除"})})};var or=function e(r){if(r.fieldConfig){if(T(r.fieldConfig["editableConfigList"])){var t=r.fieldConfig;return F(ir,{name:r.name,completeName:r.completeName,formListConfig:t,tableRowIndex:r.tableRowIndex})}else{return F(ar,{name:r.name,fieldConfig:r.fieldConfig,tableRowIndex:r.tableRowIndex,completeName:r.completeName})}}return F(tr,{name:r.name})};var ur=["fieldConfig","operateRender"];var sr=function e(r){var t;var n=D((function(){if(!r.columns)return[];return r.columns.map((function(e){var t=e.fieldConfig,n=e.operateRender,a=ie(e,ur);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 F(or,{name:[l.name,e.dataIndex],completeName:[].concat(r.name,[l.name,e.dataIndex]),fieldConfig:t,tableRowIndex:l.name})}})}))}),[r.columns,r.name,(t=r.tableProps)==null?void 0:t.cellVerticalAlign]);return F("div",{className:"editable-table",children:F(m.List,{name:r.name,rules:r.rules,children:function e(t,a){return j(I,{children:[r.onTableBeforeRender?r.onTableBeforeRender(a,t.length):null,F(x,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):F(d,{type:"dashed",onClick:function e(){return a.add()},block:true,icon:F(H,{}),style:{marginTop:15},children:"新增"})]})}})})};var cr=["onChange","onUploadError","value"];var dr=function e(r){var t=r.onChange,n=r.onUploadError,a=r.value,i=ie(r,cr);var l=_(),o=l[0],u=l[1];var s=J({uid:"uid",name:"name",url:"url"},r.fieldNames);Ae((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;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 L.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 L.error("上传操作失败...")}}u([].concat(i));r.onUploadChange==null?void 0:r.onUploadChange(e)}));return F(g,ae({},i,{onChange:c,fileList:o,className:G("v-upload-wrapper",i.className),children:F(fr,{listType:i.listType,children:r.children})}))};var fr=function e(r){if(r.children)return F(I,{children:r.children});if(r.listType==="picture-card"){return j("div",{children:[F(H,{}),F("div",{style:{marginTop:8},children:"上传图片"})]})}if(r.listType==="picture"){return F(d,{type:"primary",ghost:true,children:"选择图片上传"})}return F(d,{type:"primary",ghost:true,children:"选择文件导入"})};var vr=["onImportFinish"];var mr=function e(r){var t=r.onImportFinish,n=ie(r,vr);var a=_(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 u=U.useCallbackRef((function(e){l(false);void L.error(e||"文件导入异常...")}));var s=U.useCallbackRef((function(e){t(e)}));return F(dr,ae({showUploadList:false,onUploadChange:o,onUploadError:u},n,{onChange:s,children:r.children?r.children:F(d,{type:"primary",ghost:true,loading:i,children:"选择文件"})}))};mr.defaultProps={name:"file",accept:".xlsx,.xls"};var pr=function e(r){var t=T(r.children)?r.children:[r.children];var a=r.direction||"vertical";var i=r.gap?r.gap:0;var l=!n(r.fullIndex)?T(r.fullIndex)?r.fullIndex:[r.fullIndex]:[];return F("div",{className:G("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 B(e,{style:o})}))})};var hr=function e(r){return F("div",{style:ae({height:r.height},r.style),className:r.className})};var gr={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 br=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var yr=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,br);return F(I,{children:j(u,{size:"middle",children:[F(d,ae({},f.cancelButtonProps,{className:"cancel-btn",onClick:o,children:l})),c!=true&&F(d,ae({type:"primary"},f.okButtonProps,{className:"ok-btn",onClick:s,loading:t,children:a}))]})})};var Cr=["pageLoading","className","width","children","footer","operationProps"];var wr=function e(){return F("div",{className:"modal-wraper-loader",children:j("div",{className:"loader-wrapper",children:[F("div",{className:"loader-inner"}),F("div",{className:"loader-text",children:"LOADING"})]})})};var Nr=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,Cr);O((function(){console.error("@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换,可全局替换ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel")}),[]);return j(k,ae({className:G("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&&F(wr,{})]}),l!==null&&F("div",{className:"modal-wraper-content-footer",children:l?l:F(yr,ae({},o))})]}))};var Lr={};var xr=function e(r){if(!Lr[r]){Lr[r]=Y(gr)}return Lr[r]};var kr={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 Rr=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Sr=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,Rr);return F(I,{children:j(u,{size:"middle",children:[F(d,ae({},f.cancelButtonProps,{className:"cancel-btn",onClick:o,children:l})),c!=true&&F(d,ae({type:"primary"},f.okButtonProps,{className:"ok-btn",onClick:s,loading:t,children:a}))]})})};var qr=["pageLoading","className","width","children","footer","operationProps"];var Tr=function e(){return F("div",{className:"modal-wrapper-loader",children:j("div",{className:"loader-wrapper",children:[F("div",{className:"loader-inner"}),F("div",{className:"loader-text",children:"LOADING"})]})})};var Ir=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,qr);return j(k,ae({className:G("modal-wrapper",n),keyboard:false,forceRender:true,destroyOnClose:true},u,{width:a||600,footer:null,children:[j("div",{className:"modal-wrapper-content",children:[i,t&&F(Tr,{})]}),l!==null&&F("div",{className:"modal-wrapper-content-footer",children:l?l:F(Sr,ae({},o))})]}))};var Pr={};var Dr=function e(r){if(!Pr[r]){Pr[r]=Y(kr)}return Pr[r]};var Or=function e(r){return F("div",{className:G("page-fixed-footer",r.className),style:r.style,children:r.children})};var _r=function e(){return F("div",{className:"v-404",children:"404"})};var Ar={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 Er={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 Mr={form:Ar,formItem:Er};var Br=function e(r){var t=r.formLabelAlign||"right";var n=G("simple-layout",{"simple-layout-tight":r.layoutType==="tight","simple-layout-formlabel-left":t==="left"},r.className);return j("div",{className:n,style:r.style,children:[r.title?F("div",{className:"simple-layout-title",children:r.title}):null,r.desc?F("div",{className:"simple-layout-desc",children:r.desc}):null,r.children?F("div",{className:"simple-layout-content",children:r.children}):null]})};var Kr=function e(r){var t=_(),n=t[0],a=t[1];var i=_(false),l=i[0],o=i[1];var u=_(false),s=u[0],c=u[1];var d=D((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});O((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=G("v-count-down",r.className,{running:l,starting:s});return F("div",{className:g,onClick:h,children:n})};Kr.defaultProps={totalTicks:60,duration:1e3,autoStart:false,format:"{t}s",sendTxt:"获取验证码",sentTxt:"重新获取",processingTxt:"发送中..."};var Fr=function e(){console.error("@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代")};var jr=function e(r){Ae((function(){Fr()}),[]);return F("div",{className:G("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 B(e,{className:"table-filter-layout-flex-full"})}return e}))})};var Wr=function e(r){return F("div",{className:G("table-filter-layout-condition",r.className),children:r.children})};var Ur=function e(r){return F("div",{className:G("table-filter-layout-operate",r.className),children:r.children})};var zr=function e(r){return F("div",{className:G("table-filter-layout-table",r.className),children:r.children})};var Yr=function e(r){return F("div",{className:G("table-filter-layout-footer",r.className),children:r.children})};jr.Condition=Wr;jr.Operate=Ur;jr.Table=zr;jr.Footer=Yr;var Gr={treeSelectorList:[],queryIsEmpty:false};var Vr={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:Gr};var Hr={};var Jr=function e(r){if(!Hr[r]){Hr[r]=Y(Vr)}return Hr[r]};var Qr=function e(r,t,n){if(!T(t)||t.length===0)return[];var a=i(t,n);return l(r,a)};var Xr=["serviceConfig","effectDependencyList","onTreeSelectorListChange","treeSelectorList","modelKey"];var Zr=A((function(e,r){var t=e.serviceConfig,a=e.effectDependencyList,i=e.onTreeSelectorListChange,l=e.treeSelectorList,o=e.modelKey,u=ie(e,Xr);var s=t||{};var c=a||[];var d=_(false),f=d[0],v=d[1];var m=_(),p=m[0],h=m[1];var g=Jr(o).useStore(),b=g[0],y=g[1];var C=function e(r){return r===""||n(r)};var w=function e(r){var t=s.onRequestResultAdapter?s.onRequestResultAdapter(r):r;return t};var N=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 L.error(e.message||"数据查询异常...");return u()}catch(e){return r(e)}};try{if(!s.onRequest){throw new Error("onRequest 调用接口服务不能为空")}t=s.requiredParamsKeys;n=J({},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=w(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)}}))}));Z((function(){if(l){void y.setSelectBoxList(l);return}var e=Jr(o).getState();console.log("realTimeState",e.requestStatus);if(c.length>0||!e.requestStatus||e.requestStatus==="request-error"){void N()}}),c);O((function(){if(!n(e.value)){var r=T(e.value)?e.value:[e.value];if(r.length>0&&b.treeSelectorList.length>0){var t=[];r.forEach((function(r){var n=Qr(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]);M(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 N()}));return F(R,ae({dropdownStyle:{maxHeight:400,overflow:"auto"},showSearch:true,treeLine:true},u,{treeExpandedKeys:p,treeData:b.treeSelectorList,loading:f,onTreeExpand:x,style:ae({width:"100%"},u.style),suffixIcon:b.requestStatus==="request-error"?F(X,{spin:f,onClick:k}):undefined,notFoundContent:F($r,{requestStatus:b.requestStatus,onAgainRequest:k})}))}));var $r=function e(r){var t=D((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return F(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&F(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var et={treeList:[],queryIsEmpty:false};var rt={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:et};var tt={};var nt=function e(r){if(!tt[r]){tt[r]=Y(rt)}return tt[r]};var at=function e(r,t,n){var a=i(t,n);return l(r,a)};var it=["serviceConfig","effectDependencyList","selectorTreeList","value","onChange","fieldNames","modelKey"];var lt=A((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,it);var f=t||{};var v=a||[];var m=_(),p=m[0],h=m[1];var g=nt(c).useStore(),b=g[0],y=g[1];var C=_(false),w=C[0],N=C[1];var x=D((function(){if(n(e.value))return undefined;return T(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 q=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{N(false);void L.error(e.message||"数据查询异常...");return o()}catch(e){return r(e)}};try{if(!f.onRequest){throw new Error("onRequest 调用接口服务不能为空")}t=f.requiredParamsKeys;n=J({},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{N(false);void y.changeRequestStatus("request-error");return s()}catch(e){return u(e)}};try{N(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||[]);N(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=nt(c).getState();if(v.length>0||!e.requestStatus||e.requestStatus==="request-error"){void q()}}),v);Z((function(){if(x&&x.length>0&&b.treeList.length>0&&!p){var r=[];x.forEach((function(t){var n=at(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=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=at(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]);M(r,(function(){return{onClearSelectorList:function e(){void y.resetTreeList()},getTreeDataList:function e(){return b.treeList}}}));var I=U.useCallbackRef((function(e){h(e)}));var P=U.useCallbackRef((function(e){u==null?void 0:u(e)}));var O=U.useCallbackRef((function(r){if(e.multiple){u==null?void 0:u(r)}else{u==null?void 0:u(r[0])}}));var A=D((function(){var e=J({label:"label",value:"value",children:"children"},s);return{title:e.label,key:e.value,children:e.children}}),[s]);if(b.treeList.length>0){return F(S,ae({showLine:d.checkable?false:{showLeafIcon:false}},d,{fieldNames:A,expandedKeys:p,treeData:b.treeList,onExpand:I,selectedKeys:d.checkable?undefined:x,checkedKeys:d.checkable?x:undefined,onCheck:d.checkable?P:undefined,onSelect:d.checkable?undefined:O,style:ae({width:"100%"},d.style)}))}return F(ot,{requestStatus:b.requestStatus,loading:w,onAgainRequest:q})}));var ot=function e(r){var t=D((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:[F(q,{spinning:r.loading}),F(N,{image:N.PRESENTED_IMAGE_SIMPLE,description:t,children:r.requestStatus==="request-error"&&F(d,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})]})};export{ce as ButtonOperate,fe as DatePickerWrapper,me as DateRangePickerWrapper,ye as DrawerWraper,Re as DrawerWrapper,sr as EditableTable,mr as FileImport,Be as FileUpload,pr as FlexLayout,hr as Gap,Nr as ModalWraper,Ir as ModalWrapper,_r as Page404,Or as PageFixedFooter,ue as Permission,Xe as SelectorWrapper,Br as SimpleLayout,Kr as SmsCountDown,jr as TableFilterLayout,Zr as TreeSelectorWrapper,lt as TreeWrapper,dr as UploadWrapper,we as createDrawerWraperModel,qe as createDrawerWrapperModel,xr as createModalWraperModel,Dr as createModalWrapperModel,le as getPermissionList,oe as hasPermission,Mr as preDefinedClassName,ne as styles,Ae as useEffectCustom,Ee 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/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/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/file-upload/index.tsx","@flatbiz/antd/src/editable-table/form-item/form-upload.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/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/upload-wrapper/index.tsx","@flatbiz/antd/src/file-import/index.tsx","@flatbiz/antd/src/flex-layout/index.tsx","@flatbiz/antd/src/gap/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 * 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',\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 { 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 } from 'react';\nimport { DrawerOperation, DrawerOperationProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerWrapperProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationProps;\n} & DrawerProps;\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\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWrapper: FC<DrawerWrapperProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\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={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wrapper-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] = 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=\"#2db7f5\">\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 { 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 { 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 { UploadOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { Button, Form } from 'antd';\nimport { FileUpload } from '../../file-upload';\nimport { EditableFileUploadConfig, EditableFormItemProps } from '../type';\n\nconst FileUploadFormItemContent = (\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 <FileUpload {...otherProps} value={props.value} onChange={props.onChange}>\n {children ? (\n children\n ) : (\n <Button type=\"primary\" ghost icon={<UploadOutlined />}>\n 选择文件上传\n </Button>\n )}\n </FileUpload>\n );\n }\n return (\n <div className=\"form-upload-selector-view\">\n {render ? render(props.value) : <FileUpload {...otherProps} value={props.value} disabled={true} />}\n </div>\n );\n};\n\nexport const FileUploadFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-form-upload-form-item', formItemProps?.className)}\n >\n <FileUploadFormItemContent {...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=\"#2db7f5\">{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?: '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};\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 { arrayField2LabelValue, isUndefinedOrNull, LabelValueItem, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport { DependencyList, forwardRef, useImperativeHandle, useMemo, useRef, useState } 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};\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 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\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 !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\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 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} key={item.value}>\n {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=\"#2db7f5\">\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 { 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 { FileUploadFormItem } from './form-upload';\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';\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 === 'fileUpload') {\n return <FileUploadFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'custom') {\n return editableConfig.editableComptProps({\n name: props.name,\n editable: newEditable,\n completeName: [...props.completeName, ...props.name],\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 console.log('props.name', props.name);\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}\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 { FormListFieldData, 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 { FieldSingleConfig, FormListConfig } from './type';\n\nexport type EditableTableDataSourceItem = FormListFieldData & { operation: FormListOperation };\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 components属性后失效\n * ```\n */\n tableProps: Omit<TableProps<any>, '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: ColumnsType<EditableTableDataSourceItem> = useMemo(() => {\n if (!props.columns) return [];\n return props.columns.map((columnItem) => {\n const { fieldConfig, operateRender, ..._columnItem } = columnItem;\n return {\n ...(_columnItem as ColumnsType<EditableTableDataSourceItem>['0']),\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={[record.name, columnItem.dataIndex]}\n completeName={[...props.name, record.name, columnItem.dataIndex]}\n fieldConfig={fieldConfig}\n tableRowIndex={record.name}\n />\n );\n },\n };\n });\n }, [props.columns, props.name]);\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 components={{\n body: {\n cell: (cellProps) => {\n return <td {...cellProps} valign={props.tableProps?.cellVerticalAlign || 'middle'} />;\n },\n },\n }}\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 { 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, 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 * 可通过fieldNames配置接口返回值属性名称映射\n * 3. 最佳使用方式,与Form结合使用\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <UploadWrapper action={uploadUrl} onPreview={onPreviewFile} />\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 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 onChange?.((value || []).concat(result));\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 {props.children ? props.children : <UploadTrigger listType={otherProps.listType} />}\n </Upload>\n );\n};\n\nconst UploadTrigger = (props: { listType?: UploadListType }) => {\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 { hooks } from '@wove/react';\nimport { Button, message, UploadProps } from 'antd';\nimport { FC, useState } from 'react';\nimport { UploadWrapper } from '../upload-wrapper';\n\nexport type FileImportProps = {\n onImportFinish: (data?: any[]) => void;\n} & Pick<UploadProps, 'accept' | 'action' | 'beforeUpload' | 'disabled' | 'maxCount' | 'method' | 'name'>;\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 onUploadChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'uploading') {\n setLoading(true);\n } else if (info.file.status === 'done') {\n setLoading(false);\n }\n });\n const onUploadError = hooks.useCallbackRef((errorMsg) => {\n setLoading(false);\n void message.error(errorMsg || '文件导入异常...');\n });\n\n const onChange = hooks.useCallbackRef((data) => {\n onImportFinish(data as any[]);\n });\n\n return (\n <UploadWrapper\n showUploadList={false}\n onUploadChange={onUploadChange}\n onUploadError={onUploadError}\n {...otherProps}\n onChange={onChange}\n >\n {props.children ? (\n props.children\n ) : (\n <Button type=\"primary\" ghost loading={loading}>\n 选择文件\n </Button>\n )}\n </UploadWrapper>\n );\n};\n\nFileImport.defaultProps = {\n name: 'file',\n accept: '.xlsx,.xls',\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 });\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 { 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',\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 } from 'react';\nimport { ModalOperation, ModalOperationOldProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalWrapperProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationOldProps;\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-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\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWrapper: FC<ModalWrapperProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\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 <div className=\"modal-wrapper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wrapper-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// 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};\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 return (\n <div className={className} style={props.style}>\n {props.title ? <div className=\"simple-layout-title\">{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","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\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 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 [dataSource, setDataSource] = useState<TreeProps['treeData']>([]);\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","DrawerWrapper","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","useEffectCustom","fn","deps","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","FileUpload","onUploadError","onPreview","useState","uploadValue","_useState","setUploadValue","fieldNames","_extend","fileKey","fileName","uid","url","thumbUrl","onUploadChange","info","file","status","respData","response","code","result","data","uploadItem","respValue","concat","message","targetList","targetIndex","findIndex","tempUid","splice","fileList","onUploadPreview","Upload","FileUploadFormItemContent","_objectWithoutPropertiesLoose","_editableComptProps","ghost","_UploadOutlined","disabled","FileUploadFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","defaultState","selectorList","queryIsEmpty","_SelectorWrapperModel","setSelectBoxList","requestStatus","resetSelectBoxList","changeRequestStatus","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","forwardRef","ref","serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","modelKey","isSearch","newServiceConfig","newEffectDependencyList","changeOperateValueRef","useRef","setLoading","_selectorWrapperModel","useStore","valueIsEmpty","isUndefinedOrNull","serviceRespDataTranslation","respDataList","onRequestResultAdapter","arrayField2LabelValue","startDataSourceRequest","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","_respData","respDataTranslation","$Try_1_Post","$Try_1_Catch","onRequest","Error","warn","$Try_2_Post","$Try_2_Catch","$await_3","realTimeState","getState","current","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","description","Empty","image","PRESENTED_IMAGE_SIMPLE","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isString","_isNumber","_isBoolean","JSON","stringify","TextFormItem","noStyle","TextAreaFormItem","TextArea","FormItemAdapter","newEditable","commomProps","completeName","FormList","from","useFormInstance","formListConfig","onFormListBeforeRender","editableConfigList","onFormListAfterRender","onFormListItemBeforeRender","onFormListItemAfterRender","deleteOperateRender","log","List","fields","add","remove","_Fragment","getFieldValue","fieldChild","hasEditable","formListItemIndex","fieldItem","fieldName","DeleteFormListItem","_DeleteOutlined","FormListItem","EditableTable","columns","columnItem","operateRender","_columnItem","_value","record","operation","dataIndex","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","components","body","cell","cellProps","_props$tableProps","valign","tableProps","cellVerticalAlign","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","marginTop","UploadWrapper","uploadList","setUploadList","UploadTrigger","listType","FileImport","onImportFinish","errorMsg","showUploadList","accept","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","height","ModalModel","openModalForm","closeModal","setModalItemData","ModalOperation","_ref$okText","_ref$cancelText","ModalWraper","Modal","modalModels","createModalWraperModel","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","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","Footer","treeSelectorList","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","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":";s+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4Q,eAAtCzQ,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/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/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/file-upload/index.tsx","@flatbiz/antd/src/editable-table/form-item/form-upload.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/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/upload-wrapper/index.tsx","@flatbiz/antd/src/file-import/index.tsx","@flatbiz/antd/src/flex-layout/index.tsx","@flatbiz/antd/src/gap/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 * 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',\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 { 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 } from 'react';\nimport { DrawerOperation, DrawerOperationProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerWrapperProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationProps;\n} & DrawerProps;\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\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWrapper: FC<DrawerWrapperProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\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={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wrapper-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] = 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=\"#2db7f5\">\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 { 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 { 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 { UploadOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { Button, Form } from 'antd';\nimport { FileUpload } from '../../file-upload';\nimport { EditableFileUploadConfig, EditableFormItemProps } from '../type';\n\nconst FileUploadFormItemContent = (\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 <FileUpload {...otherProps} value={props.value} onChange={props.onChange}>\n {children ? (\n children\n ) : (\n <Button type=\"primary\" ghost icon={<UploadOutlined />}>\n 选择文件上传\n </Button>\n )}\n </FileUpload>\n );\n }\n return (\n <div className=\"form-upload-selector-view\">\n {render ? render(props.value) : <FileUpload {...otherProps} value={props.value} disabled={true} />}\n </div>\n );\n};\n\nexport const FileUploadFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-form-upload-form-item', formItemProps?.className)}\n >\n <FileUploadFormItemContent {...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=\"#2db7f5\">{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?: '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};\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 { arrayField2LabelValue, isUndefinedOrNull, LabelValueItem, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport { DependencyList, forwardRef, useImperativeHandle, useMemo, useRef, useState } 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};\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 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\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 !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\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 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} key={item.value}>\n {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=\"#2db7f5\">\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 { 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 { FileUploadFormItem } from './form-upload';\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';\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 === 'fileUpload') {\n return <FileUploadFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'custom') {\n return editableConfig.editableComptProps({\n name: props.name,\n editable: newEditable,\n completeName: [...props.completeName, ...props.name],\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 console.log('props.name', props.name);\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}\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={[record.name, columnItem.dataIndex]}\n completeName={[...props.name, record.name, columnItem.dataIndex]}\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 { 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 * 可通过fieldNames配置接口返回值属性名称映射\n * 3. 最佳使用方式,与Form结合使用\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <UploadWrapper action={uploadUrl} onPreview={onPreviewFile} />\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 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 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 {/* {props.maxCount && (props.maxCount > uploadList?.length) && } */}\n <UploadTrigger listType={otherProps.listType}>{props.children}</UploadTrigger>\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 { hooks } from '@wove/react';\nimport { Button, message, UploadProps } from 'antd';\nimport { FC, useState } from 'react';\nimport { UploadWrapper } from '../upload-wrapper';\n\nexport type FileImportProps = {\n onImportFinish: (data?: any[]) => void;\n} & Pick<UploadProps, 'accept' | 'action' | 'beforeUpload' | 'disabled' | 'maxCount' | 'method' | 'name'>;\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 onUploadChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'uploading') {\n setLoading(true);\n } else if (info.file.status === 'done') {\n setLoading(false);\n }\n });\n const onUploadError = hooks.useCallbackRef((errorMsg) => {\n setLoading(false);\n void message.error(errorMsg || '文件导入异常...');\n });\n\n const onChange = hooks.useCallbackRef((data) => {\n onImportFinish(data as any[]);\n });\n\n return (\n <UploadWrapper\n showUploadList={false}\n onUploadChange={onUploadChange}\n onUploadError={onUploadError}\n {...otherProps}\n onChange={onChange}\n >\n {props.children ? (\n props.children\n ) : (\n <Button type=\"primary\" ghost loading={loading}>\n 选择文件\n </Button>\n )}\n </UploadWrapper>\n );\n};\n\nFileImport.defaultProps = {\n name: 'file',\n accept: '.xlsx,.xls',\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 });\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 { 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',\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 } from 'react';\nimport { ModalOperation, ModalOperationOldProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalWrapperProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationOldProps;\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-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\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWrapper: FC<ModalWrapperProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\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 <div className=\"modal-wrapper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wrapper-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// 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};\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 return (\n <div className={className} style={props.style}>\n {props.title ? <div className=\"simple-layout-title\">{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","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\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 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 [dataSource, setDataSource] = useState<TreeProps['treeData']>([]);\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","DrawerWrapper","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","useEffectCustom","fn","deps","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","FileUpload","onUploadError","onPreview","useState","uploadValue","_useState","setUploadValue","fieldNames","_extend","fileKey","fileName","uid","url","thumbUrl","onUploadChange","info","file","status","respData","response","code","result","data","uploadItem","respValue","concat","message","targetList","targetIndex","findIndex","tempUid","splice","fileList","onUploadPreview","Upload","FileUploadFormItemContent","_objectWithoutPropertiesLoose","_editableComptProps","ghost","_UploadOutlined","disabled","FileUploadFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","defaultState","selectorList","queryIsEmpty","_SelectorWrapperModel","setSelectBoxList","requestStatus","resetSelectBoxList","changeRequestStatus","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","forwardRef","ref","serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","modelKey","isSearch","newServiceConfig","newEffectDependencyList","changeOperateValueRef","useRef","setLoading","_selectorWrapperModel","useStore","valueIsEmpty","isUndefinedOrNull","serviceRespDataTranslation","respDataList","onRequestResultAdapter","arrayField2LabelValue","startDataSourceRequest","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","_respData","respDataTranslation","$Try_1_Post","$Try_1_Catch","onRequest","Error","warn","$Try_2_Post","$Try_2_Catch","$await_3","realTimeState","getState","current","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","description","Empty","image","PRESENTED_IMAGE_SIMPLE","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isString","_isNumber","_isBoolean","JSON","stringify","TextFormItem","noStyle","TextAreaFormItem","TextArea","FormItemAdapter","newEditable","commomProps","completeName","FormList","from","useFormInstance","formListConfig","onFormListBeforeRender","editableConfigList","onFormListAfterRender","onFormListItemBeforeRender","onFormListItemAfterRender","deleteOperateRender","log","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","marginTop","UploadWrapper","uploadList","setUploadList","maxCount","UploadTrigger","listType","FileImport","onImportFinish","errorMsg","showUploadList","accept","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","height","ModalModel","openModalForm","closeModal","setModalItemData","ModalOperation","_ref$okText","_ref$cancelText","ModalWraper","Modal","modalModels","createModalWraperModel","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","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","Footer","treeSelectorList","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","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":";s+CAIO,IAAMA,GAASC,kXCATC,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,GAC5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,YAAapd,EAAW2d,UAAYtC,EAAY1a,UAChDwc,QAASnd,EAAW2d,UAAYR,EAAUxc,UAC1C0c,SAAUrd,EAAW2d,UAAYhd,UAAY0c,EAC7Ctd,MAAKI,GAAA,CAAI4B,MAAO,QAAW/B,EAAWD,UAK5C,OACEvB,EAACkR,GAAD,CACEtE,cAAepI,EAAMoI,cACrBtH,QAASA,EACTqL,eAAgBnC,OAKtB,IAAM0C,GAAkB,SAAlBA,EAAmBnR,GAKvB,IAAMuR,EAAc1O,GAAQ,WAC1B,GAAI7C,EAAM6M,gBAAkB,gBAAiB,CAC3C,MAAO,cACF,GAAI7M,EAAM6M,gBAAkB,kBAAmB,CACpD,MAAO,OAET,MAAO,UACN,CAAC7M,EAAM6M,gBACV,OACE9H,EAAA,MAAA,CAAK1E,UAAU,qBAAfF,SAAA,CACEF,EAACsf,EAAD,CAAMC,SAAUxf,EAAMuF,UACtBtF,EAACuR,EAAD,CAAOC,MAAOD,EAAME,uBAAwBH,YAAaA,EAAzDpR,SACGH,EAAM6M,gBAAkB,iBACvB5M,EAACkC,EAAD,CAAQ1B,KAAK,UAAUU,QAASnB,EAAM4Q,eAAtCzQ,SAAA"}
package/index.d.ts CHANGED
@@ -338,6 +338,9 @@ export declare const SelectorWrapper: import("react").ForwardRefExoticComponent<
338
338
  operateType?: "search" | "filter" | undefined;
339
339
  searchFieldName?: string | undefined;
340
340
  } & import("react").RefAttributes<SelectorWrapperRefApi>>;
341
+ export declare type EditableTableRecordType = FormListFieldData & {
342
+ operation: FormListOperation;
343
+ };
341
344
  export declare type EditableInputConfig = {
342
345
  type: "input";
343
346
  editableComptProps?: InputProps;
@@ -440,9 +443,9 @@ export declare type FormListConfig = {
440
443
  formListItemIndex: number;
441
444
  }) => ReactElement;
442
445
  };
443
- export declare type EditableTableDataSourceItem = FormListFieldData & {
444
- operation: FormListOperation;
445
- };
446
+ /**
447
+ * antd 默认render功能此处不能使用
448
+ */
446
449
  export declare type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
447
450
  dataIndex: string;
448
451
  fieldConfig?: FieldSingleConfig | FormListConfig;
@@ -464,10 +467,10 @@ export declare type EditableTableProps = {
464
467
  /**
465
468
  * ```
466
469
  * antd table属性
467
- * 1. 新增cellVerticalAlign,单元格竖直方向对齐方式,设置table components属性后失效
470
+ * 1. 新增cellVerticalAlign,单元格竖直方向对齐方式,设置table column onCell属性后失效
468
471
  * ```
469
472
  */
470
- tableProps: Omit<TableProps<any>, "dataSource" | "columns" | "rowKey"> & {
473
+ tableProps?: Omit<TableProps<EditableTableRecordType>, "dataSource" | "columns" | "rowKey"> & {
471
474
  cellVerticalAlign?: "baseline" | "middle" | "top" | "bottom";
472
475
  };
473
476
  columns: EditableTableColumn[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "2.3.19",
3
+ "version": "2.3.20",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -40,5 +40,5 @@
40
40
  "@flatbiz/utils": "^2.3.15",
41
41
  "@wove/react": "^1.2.10"
42
42
  },
43
- "gitHead": "bb3e9505174f2460930ce3704b6ac673e57703e8"
43
+ "gitHead": "832728aa5971b953283f06598f0fe5cf8a7b32fa"
44
44
  }