@flatbiz/antd 2.3.35 → 2.3.36

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/cjs/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
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("@flatbiz/utils");var r=require("@dimjs/lang/cjs/is-undefined");var t=require("antd");var a=require("@dimjs/lang/cjs/is-array");var n=require("react");var i=require("react/jsx-runtime");var l=require("@wove/react/cjs/hooks");var o=require("moment");var s=require("@dimjs/model-react");var u=require("@dimjs/utils/cjs/class-names");var c=require("@ant-design/icons/es/icons/SaveOutlined");var d=require("@ant-design/icons/es/icons/PlusOutlined");var f=require("@dimjs/utils/cjs/extend");var v=require("@ant-design/icons/es/icons/RedoOutlined");var m=require("@dimjs/lang/cjs/is-boolean");var p=require("@dimjs/lang/cjs/is-number");var h=require("@dimjs/lang/cjs/is-string");var x=require("@ant-design/icons/es/icons/DeleteOutlined");var g=require("@dimjs/lang/cjs/is-object");function b(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var y=b(o);var j=b(c);var w=b(d);var N=b(v);var C=b(x);var S=e.noop;function L(){L=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t){if(Object.prototype.hasOwnProperty.call(t,a)){e[a]=t[a]}}}return e};return L.apply(this,arguments)}function k(e,r){if(e==null)return{};var t={};var a=Object.keys(e);var n,i;for(i=0;i<a.length;i++){n=a[i];if(r.indexOf(n)>=0)continue;t[n]=e[n]}return t}var q=function r(){var t=e.getGlobalData(),n=t.elemAclLimits;var i=a.isArray(n)?n:[];return i};var R=function e(r){var t=q();if(t.includes(r)){return true}return false};var T=function e(r){var t=q();if(t.includes(r.name)){return i.jsx(n.Fragment,{children:r.children})}return null};var D=["text","color","onClick","permission","needConfirm","confirmMessage","hidden","style"];var I=function e(a){return i.jsx("div",{className:"table-operate",children:i.jsx(t.Space,{split:i.jsx(t.Divider,{type:"vertical"}),size:a.size,wrap:r.isUndefined(a.wrap)?true:a.wrap,children:a.operateList.map((function(e,r){if(!e)return null;var a=e.text,l=e.color,o=e.onClick,s=e.permission,u=e.needConfirm,c=e.confirmMessage,d=e.hidden,f=e.style,v=k(e,D);if(d)return null;if(s&&!R(s))return null;var m=l?L({color:l},f):f;var p=e.type||"link";if(u){return i.jsx(t.Popconfirm,{title:c,okText:"确定",cancelText:"取消",onConfirm:o,arrowPointAtCenter:true,children:i.jsx(t.Button,L({},v,{onClick:undefined,type:p,danger:true,style:m,children:a}))},r)}return n.createElement(t.Button,L({},v,{type:p,style:m,key:r,onClick:o}),a)}))})})};I.defaultProps={size:0};var P=["value","onChange","style"];var M=function r(a){var o=a.value,s=a.onChange,u=a.style,c=k(a,P);var d=n.useMemo((function(){if(a.format)return a.format;if(a.showTime)return"YYYY-MM-DD HH:mm:ss";return"YYYY-MM-DD"}),[a.showTime,a.format]);var f=l.hooks.useCallbackRef((function(e){if(e){s==null?void 0:s(y["default"](e).format(d))}else{s==null?void 0:s(undefined)}}));var v=l.hooks.useCallbackRef((function(e){var r=y["default"](e.format("YYYY-MM-DD"));if(!a.disabledDateConfig){return false}var t=a.disabledDateConfig,n=t.minDate,i=t.maxDate;if(n&&i){if(r.isBefore(n)||r.isAfter(i)){return true}}else if(n){if(r.isAfter(n)){return true}}else if(i){if(r.isBefore(n)){return true}}return false}));var m=n.useMemo((function(){if(o){return y["default"](e.flatbizDate.dateNormalize(o))}return undefined}),[o]);return i.jsx(t.DatePicker,L({disabledDate:v},c,{style:L({width:"100%"},u),value:m,onChange:f}))};var A=["value","onChange","style"];var F=function r(a){var o=a.value,s=a.onChange,u=a.style,c=k(a,A);var d=n.useState(),f=d[0],v=d[1];var m=n.useMemo((function(){if(a.format)return a.format;if(a.showTime===true)return"YYYY-MM-DD HH:mm:ss";return"YYYY-MM-DD"}),[a.showTime,a.format]);var p=l.hooks.useCallbackRef((function(e){if(e){var r=e||[],t=r[0],a=r[1];s==null?void 0:s([y["default"](t).format(m),y["default"](a).format(m)])}else{s==null?void 0:s(undefined)}}));var h=l.hooks.useCallbackRef((function(e){if(a.disabledDateConfig){v(e)}}));var x=l.hooks.useCallbackRef((function(e){var r=y["default"](e.format("YYYY-MM-DD"));if(!a.disabledDateConfig){return false}var t=a.disabledDateConfig,n=t.maxDays,i=t.minDate,l=t.maxDate;if(i&&l){if(r.isBefore(i)||r.isAfter(l)){return true}}else if(i){if(r.isBefore(i)){return true}}else if(l){if(r.isAfter(l)){return true}}if(!f||!n){return false}var o=f[0]?y["default"](f[0].format("YYYY-MM-DD")):undefined;var s=f[1]?y["default"](f[1].format("YYYY-MM-DD")):undefined;var u=o?o.clone().add(n-1,"d"):s;var c=s?s.clone().subtract(n-1,"d"):o;return r.isBefore(c)||r.isAfter(u)}));var g=o||[],b=g[0],j=g[1];var w=n.useMemo((function(){if(b&&j){var r=e.flatbizDate.dateNormalize(b);var t=e.flatbizDate.dateNormalize(j);return[y["default"](r),y["default"](t)]}return undefined}),[b,j]);return i.jsx(t.DatePicker.RangePicker,L({disabledDate:x,onCalendarChange:h},c,{style:L({width:"100%"},u),value:w,onChange:p}))};var O={actions:{openDrawerForm:function e(r){var t=r.itemData,a=r.title,n=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=a;e.operateType=n;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 B=function e(r){return i.jsx("div",{className:"fixed-bottom-block",children:i.jsxs(t.Space,{size:"middle",children:[i.jsx(t.Button,L({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&i.jsx(t.Button,L({type:"primary",icon:i.jsx(j["default"],{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var E=["pageLoading","className","width","children","footer","operationProps"];var W=function e(){return i.jsx("div",{className:"drawer-wraper-loader",children:i.jsxs("div",{className:"loader-wrapper",children:[i.jsx("div",{className:"loader-inner"}),i.jsx("div",{className:"loader-text",children:"LOADING"})]})})};var _=function e(r){var a=r.pageLoading,l=r.className,o=r.width,s=o===void 0?600:o,c=r.children,d=r.footer,f=r.operationProps,v=k(r,E);n.useEffect((function(){console.error("@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整")}),[]);return i.jsxs(t.Drawer,L({className:u.classNames("drawer-wraper",l),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:s},size:"default"},v,{footer:d||d===null?d:i.jsx(B,L({},f)),children:[i.jsx("div",{className:"drawer-wraper-content",children:c}),a&&i.jsx(W,{})]}))};var Y={};var K=function e(r){if(!Y[r]){Y[r]=s.Model(O)}return Y[r]};var U={actions:{openDrawerForm:function e(r){var t=r.itemData,a=r.title,n=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=a;e.operateType=n;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 z=function e(r,t){return n.useEffect(r,t)};var G=function e(r,t){n.useEffect((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 V=function e(r){return i.jsx("div",{className:"fixed-bottom-block",children:i.jsxs(t.Space,{size:"middle",children:[i.jsx(t.Button,L({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&i.jsx(t.Button,L({type:"primary",icon:i.jsx(j["default"],{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var H=["pageLoading","className","width","children"];var J=function e(){return i.jsx("div",{className:"drawer-wrapper-loader",children:i.jsxs("div",{className:"loader-wrapper",children:[i.jsx("div",{className:"loader-inner"}),i.jsx("div",{className:"loader-text",children:"LOADING"})]})})};var Q=function e(r){return i.jsxs(n.Fragment,{children:[i.jsx("div",{className:"drawer-wrapper-content",children:r.children}),r.operationProps?i.jsx(X,{children:i.jsx(V,L({},r.operationProps))}):null]})};var X=function e(r){return i.jsx("div",{className:"drawer-wrapper-footer",children:r.children})};var Z=function e(r){var a=r.pageLoading,n=r.className,l=r.width,o=l===void 0?600:l,s=r.children,c=k(r,H);z((function(){if(r["operationProps"]){throw new Error("DrawerWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return i.jsxs(t.Drawer,L({className:u.classNames("drawer-wrapper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:o},size:"default"},c,{footer:null,children:[a&&i.jsx(J,{}),s]}))};Z.Content=Q;Z.Footer=X;var $={};var ee=function e(r){if(!$[r]){$[r]=s.Model(U)}return $[r]};var re=function e(r,t){return typeof r==="boolean"?r:r==null?void 0:r({tableRowIndex:t})};var te=function e(r){var l=r.fieldConfig,o=l.editableConfig,s=l.editable,u=l.render;var c=o.editableComptProps;var d=n.useMemo((function(){if(s)return[];var e=a.isArray(r.value)?r.value:[];var t=c.options||[];if(!a.isArray(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}),[s,c.options,r.value]);if(s){return i.jsx(t.Checkbox.Group,L({},c,{value:r.value,onChange:r.onChange}))}return i.jsx("span",{className:"editable-checkbox-group-view",children:u?u(r.value):d.map((function(e,r){return i.jsx(t.Tag,{color:"#1890ff",children:e.label},r)}))})};var ae=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-checkbox-group-form-item",a==null?void 0:a.className),children:i.jsx(te,L({},r))}))};var ne=function e(r){var a=r.fieldConfig,n=a.formItemProps,l=a.editableConfig;return i.jsx(t.Form.Item,L({},n,{name:r.name,className:u.classNames("editable-date-picker-wraper-form-item",n==null?void 0:n.className),children:i.jsx(M,L({},l.editableComptProps))}))};var ie=function e(r){var t=r.fieldConfig,l=t.editableConfig,o=t.editable,s=t.render;var u=l.editableComptProps;var c=n.useMemo((function(){var e=a.isArray(r.value)?r.value:[];if(o)return undefined;return e.join("~")}),[o,r.value]);if(o){return i.jsx(F,L({},u,{value:r.value,onChange:r.onChange}))}return i.jsx("span",{className:"editable-date-range-picker-view",children:s?s(r.value):c})};var le=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-date-range-picker-wraper-form-item",a==null?void 0:a.className),children:i.jsx(ie,L({},r))}))};var oe=function e(r){var a=r.fieldConfig,n=a.formItemProps,l=a.editableConfig;return i.jsx(t.Form.Item,L({},n,{name:r.name,children:i.jsx(t.Input,L({},l.editableComptProps))}))};var se=function e(r){var a=r.fieldConfig,n=a.formItemProps,l=a.editableConfig;return i.jsx(t.Form.Item,L({},n,{name:r.name,className:u.classNames("editable-input-number-form-item",n==null?void 0:n.className),children:i.jsx(t.InputNumber,L({},l.editableComptProps))}))};var ue=function e(r){var o=r.fieldConfig,s=o.editableConfig,u=o.editable,c=o.render;var d=s.editableComptProps;var f=n.useMemo((function(){if(u)return[];var e=r.value;var t=d.options||[];if(!a.isArray(t)||t.length===0){return e}var n=t.find((function(r){return r.value===e}));return(n==null?void 0:n.label)||e}),[u,d.options,r.value]);var v=l.hooks.useCallbackRef((function(e){r.onChange==null?void 0:r.onChange(e.target.value)}));if(u){return i.jsx(t.Radio.Group,L({},d,{value:r.value,onChange:v}))}return i.jsx("span",{className:"editable-radio-group-view",children:c?c(r.value):f?i.jsx(t.Tag,{color:"#1890ff",children:f}):null})};var ce=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-radio-group-form-item",a==null?void 0:a.className),children:i.jsx(ue,L({},r))}))};var de={selectorList:[],originalSelectorList:[],queryIsEmpty:false,requestStatus:"init"};var fe={actions:{setSelectBoxList:function e(r){return function(e){e.selectorList=r.selectorList||[];e.originalSelectorList=r.originalSelectorList||[];e.requestStatus="request-success"}},resetSelectBoxList:function e(){return function(e){e.selectorList=[]}},changeRequestStatus:function e(r){return function(e){e.requestStatus=r}}},state:de};var ve={};var me=function e(r){if(!ve[r]){ve[r]=s.Model(fe)}return ve[r]};var pe=["serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","operateType","searchFieldName","selectorList","modelKey","fieldNames"];var he=n.forwardRef((function(r,a){var o=r.serviceConfig,s=r.showAllOption,u=r.effectDependencyList,c=r.onSelectorListChange,d=r.operateType,v=r.searchFieldName,m=r.selectorList,p=r.modelKey,h=r.fieldNames,x=k(r,pe);var g=d==="search"&&m===undefined;var b=o||{};var y=u||[];var j=n.useRef();var w=n.useState(false),C=w[0],S=w[1];var q=me(p).useStore(),R=q[0],T=q[1];var D="request-pre-"+r.modelKey;var I=function r(t){return t===""||e.isUndefinedOrNull(t)};var P=function e(r){var t=b.onRequestResultAdapter?b.onRequestResultAdapter(r):r;return t};var M=l.hooks.useCallbackRef((function(r,a){return new Promise((function(n,i){var l,o,s,u,c,d,m;var p=function(){try{return n()}catch(e){return i(e)}};var x=function(e){try{S(false);void t.message.error(e.message||"数据查询异常...");return p()}catch(e){return i(e)}};try{if(!b.onRequest){throw new Error("onRequest 调用接口服务不能为空")}l=b.requiredParamsKeys;o=f.extend({},b.params);if(l){s=l.find((function(e){return I(o[e])}));if(s){console.warn("SelectorWrapper组件:参数:"+l.join("、")+"不能为空");return n()}}var y=function(){try{return p()}catch(e){return x(e)}};var j=function(e){try{console.error(e);S(false);window[D]=false;void T.changeRequestStatus("request-error");void t.message.error(e.message||"获取数据异常");return y()}catch(e){return x(e)}};try{S(true);window[D]=true;void T.changeRequestStatus("request-pre");if((!e.isUndefinedOrNull(r)||!e.isUndefinedOrNull(a))&&g){u=v||"keyword";o[u]=r;o["id"]=a}return Promise.resolve(b.onRequest==null?void 0:b.onRequest(o)).then((function(r){try{c=r;d=P(c);m=e.arrayField2LabelValue(d||[],h);S(false);window[D]=false;void T.setSelectBoxList({selectorList:m,originalSelectorList:d});return y()}catch(e){return j(e)}}),j)}catch(e){j(e)}}catch(e){x(e)}}))}));z((function(){if(R.originalSelectorList&&R.requestStatus==="request-success"){c==null?void 0:c(R.originalSelectorList)}}),[R.originalSelectorList,R.requestStatus]);z((function(){if(m){void T.setSelectBoxList({selectorList:e.arrayField2LabelValue(m,h),originalSelectorList:m});return}if(g)return;var r=me(p).getState();if(y.length>0||!window[D]&&r.requestStatus!=="request-success"){void M()}}),y);z((function(){if(g){if(I(r.value)){c==null?void 0:c([]);void T.resetSelectBoxList()}else{if(r.value!==j.current){void M(undefined,r.value)}}}}),y.concat([r.value]));n.useImperativeHandle(a,(function(){return{onClearSelectorList:function e(){void T.resetSelectBoxList()},getSelectorList:function e(){return R.selectorList}}}));var A=l.hooks.useCallbackRef((function(e,r){return(r==null?void 0:r.children).toLowerCase().indexOf(e.toLowerCase())>=0}));var F=l.hooks.useDebounceCallback((function(e){if(e){void M(e)}else{void T.resetSelectBoxList()}}),300);var O=l.hooks.useCallbackRef((function(e){j.current=e;for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++){a[n-1]=arguments[n]}r.onChange==null?void 0:r.onChange(e,a)}));var B=l.hooks.useCallbackRef((function(){void M()}));var E=i.jsx(t.Select.Option,{value:"",children:"全部"});return i.jsxs(t.Select,L({showSearch:true,allowClear:true},x,{value:e.isUndefinedOrNull(r.value)?undefined:r.value,notFoundContent:i.jsx(xe,{requestStatus:R.requestStatus,onAgainRequest:B}),loading:C,onSearch:g?F:undefined,filterOption:g?false:A,onChange:O,fieldNames:undefined,suffixIcon:R.requestStatus==="request-error"?i.jsx(N["default"],{spin:C,onClick:B}):undefined,children:[s===true?E:s,R.selectorList.map((function(e){return i.jsx(t.Select.Option,{value:e.value,label:e.label,children:r.onLabelRenderAdapter?r.onLabelRenderAdapter(e):e.label},e.value)}))]}))}));var xe=function e(r){var a=n.useMemo((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return i.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:a,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&i.jsx(t.Button,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var ge=function r(o){var s=o.fieldConfig,u=s.editableConfig,c=s.editable,d=s.render;var f=u.editableComptProps;var v=n.useState([]),m=v[0],p=v[1];var h=n.useState([]),x=h[0],g=h[1];n.useEffect((function(){if(!c){var e=a.isArray(o.value)?o.value:o.value===undefined?[]:[o.value];if(m.length===0){g(e.map((function(e){return{label:e,value:e}})))}var r=[];e.forEach((function(e){var t=m.find((function(r){return r.value===e}));r.push(t?t:{label:String(e),value:e})}));g(r)}}),[c,f.fieldNames,o.value,m]);var b=l.hooks.useCallbackRef((function(r){p(e.arrayField2LabelValue(r||[],f.fieldNames))}));if(c){return i.jsx(he,L({},f,{value:o.value,onChange:o.onChange,onSelectorListChange:b}))}return i.jsxs(n.Fragment,{children:[i.jsx("div",{style:{display:"none"},children:i.jsx(he,L({},f,{onSelectorListChange:b}))}),i.jsx("span",{className:"editable-selector-view",children:d?d(o.value):x.map((function(e,r){return i.jsx(t.Tag,{color:"#1890ff",children:e.label},r)}))})]})};var be=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-selector-wrapper-form-item",a==null?void 0:a.className),children:i.jsx(ge,L({},r))}))};var ye=function e(r){var a,l;var o=n.useMemo((function(){var e;if((e=r.fieldConfig)!=null&&e.render)return undefined;var t=h.isString(r.value)||p.isNumber(r.value)||m.isBoolean(r.value)||!r.value;if(!t){console.warn("Form.List name:【"+r.name+"】数据【"+JSON.stringify(r.value)+"】不能渲染在页面中")}return t?r.value:undefined}),[(a=r.fieldConfig)==null?void 0:a.render,r.name,r.value]);var s=((l=r.fieldConfig)==null?void 0:l.render==null?void 0:l.render(r.value))||o;return i.jsx(t.Typography.Paragraph,{className:"editable-text-view",ellipsis:h.isString(s)?{tooltip:s}:true,children:s})};var je=function e(r){return i.jsx(t.Form.Item,{noStyle:true,name:r.name,children:i.jsx(ye,{name:r.name,fieldConfig:r.fieldConfig})})};var we=function e(r){var a=r.fieldConfig,n=a.formItemProps,l=a.editableConfig;return i.jsx(t.Form.Item,L({},n,{name:r.name,children:i.jsx(t.Input.TextArea,L({},l.editableComptProps))}))};var Ne=["onChange","onUploadError","value"];var Ce=function e(r){var a=r.onChange,o=r.onUploadError,s=r.value,c=k(r,Ne);var d=n.useState(),v=d[0],m=d[1];var p=f.extend({uid:"uid",name:"name",url:"url"},r.fieldNames);z((function(){m(s==null?void 0:s.map((function(e){return{uid:e[p.uid],name:e[p.name],url:e[p.url]}})))}),[p.name,p.uid,p.url,s]);var h=l.hooks.useCallbackRef((function(e){var n=e.fileList;if(e.file.status==="done"){var i=e.file.response;if(i.code==="0000"){var l=r.onRequestResultAdapter?r.onRequestResultAdapter(i.data):i.data;l[p.uid]=l[p.uid]||e.file.uid;l[p.name]=l[p.name]||e.file.name;if(r.maxCount===1){a==null?void 0:a([l])}else{a==null?void 0:a((s||[]).concat(l))}}else{if(o){o(i.message)}else{void t.message.error(i.message||"上传操作失败...")}n[n.length-1]=L({},n[n.length-1],{status:"error"})}}else if(e.file.status==="removed"){var u=e.file.uid;var c=s!==undefined?[].concat(s):[];var d=c.findIndex((function(e){var r=e[p.uid];return r===u}));if(d>=0){c.splice(d,1)}a==null?void 0:a(c)}else if(e.file.status==="error"){if(o){o()}else{void t.message.error("上传操作失败...")}}m([].concat(n));r.onUploadChange==null?void 0:r.onUploadChange(e)}));return i.jsx(t.Upload,L({},c,{onChange:h,fileList:v,className:u.classNames("v-upload-wrapper",c.className),children:c.disabled?null:i.jsx(Se,{listType:c.listType,children:r.children})}))};var Se=function e(r){if(r.children)return i.jsx(n.Fragment,{children:r.children});if(r.listType==="picture-card"){return i.jsxs("div",{children:[i.jsx(w["default"],{}),i.jsx("div",{style:{marginTop:8},children:"上传图片"})]})}if(r.listType==="picture"){return i.jsx(t.Button,{type:"primary",ghost:true,children:"选择图片上传"})}return i.jsx(t.Button,{type:"primary",ghost:true,children:"选择文件上传"})};var Le=["children"];var ke=function e(r){var t=r.fieldConfig,a=t.editableConfig,n=t.render,l=t.editable;var o=a.editableComptProps,s=o.children,u=k(o,Le);if(l){return i.jsx(Ce,L({listType:"text"},u,{value:r.value,onChange:r.onChange,children:s}))}return i.jsx("div",{className:"upload-wrapper-selector-view",children:n?n(r.value):i.jsx(Ce,L({listType:"text"},u,{value:r.value,disabled:true}))})};var qe=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-upload-wrapper-form-item",a==null?void 0:a.className),children:i.jsx(ke,L({},r))}))};var Re=function e(r){var t=r.fieldConfig,a=t.editableConfig,n=t.editable;var l=re(n,r.tableRowIndex);var o=f.extend({},r.fieldConfig,{editable:l});var s={name:r.name,fieldConfig:o};if((a==null?void 0:a.type)==="input"&&l){return i.jsx(oe,L({},s))}else if((a==null?void 0:a.type)==="inputNumber"&&l){return i.jsx(se,L({},s))}else if((a==null?void 0:a.type)==="textArea"&&l){return i.jsx(we,L({},s))}else if((a==null?void 0:a.type)==="datePickerWrapper"&&l){return i.jsx(ne,L({},s))}else if((a==null?void 0:a.type)==="dateRangePickerWrapper"){return i.jsx(le,L({},s))}else if((a==null?void 0:a.type)==="selectorWrapper"){return i.jsx(be,L({},s))}else if((a==null?void 0:a.type)==="checkboxGroup"){return i.jsx(ae,L({},s))}else if((a==null?void 0:a.type)==="radioGroup"){return i.jsx(ce,L({},s))}else if((a==null?void 0:a.type)==="uploadWrapper"){return i.jsx(qe,L({},s))}else if((a==null?void 0:a.type)==="custom"){return a.editableComptProps({name:r.name,editable:l,completeName:r.completeName})}return i.jsx(je,L({},s))};var Te=function e(r){var a=t.Form.useFormInstance();var n=r.formListConfig,l=n.onFormListBeforeRender,o=n.editableConfigList,s=n.onFormListAfterRender,c=n.onFormListItemBeforeRender,d=n.onFormListItemAfterRender,f=n.deleteOperateRender;return i.jsx(t.Form.List,{name:r.name,children:function e(n,v){var m=v.add,p=v.remove;return i.jsxs(i.Fragment,{children:[l?l({tableRowIndex:r.tableRowIndex,add:m,get value(){return a.getFieldValue(r.completeName)}}):null,n.map((function(e,n){var l=o.find((function(e){return re(e.editable,r.tableRowIndex)}));var s=u.classNames("editable-inner-formlist-item","editable-inner-formlist-item-"+r.name[1],{"editable-inner-formlist-item_preview":!l});return i.jsxs("div",{className:s,children:[c?c({add:m,remove:function e(){p(n)},formListItemIndex:n,tableRowIndex:r.tableRowIndex,get value(){return a.getFieldValue([].concat(r.completeName,[e.name]))}}):null,i.jsxs(t.Space,{children:[o.map((function(t,a){return i.jsx(Re,{name:[e.name,t.fieldName],fieldConfig:t,tableRowIndex:r.tableRowIndex,completeName:[].concat(r.completeName,[e.name])},a)})),l?i.jsx(De,{deleteOperateRender:f,remove:function e(){p(n)},index:n}):null]}),d?d({add:m,formListItemIndex:n,tableRowIndex:r.tableRowIndex,remove:function e(){p(n)},get value(){return a.getFieldValue([].concat(r.completeName,[e.name]))}}):null]},n)})),s?s({tableRowIndex:r.tableRowIndex,add:m,get value(){return a.getFieldValue(r.completeName)}}):null]})}})};var De=function e(r){return i.jsx(t.Form.Item,{children:r.deleteOperateRender?r.deleteOperateRender({remove:r.remove,formListItemIndex:r.index}):i.jsx(t.Button,{type:"link",danger:true,icon:i.jsx(C["default"],{}),onClick:r.remove,children:"删除"})})};var Ie=function e(r){if(r.fieldConfig){if(a.isArray(r.fieldConfig["editableConfigList"])){var t=r.fieldConfig;return i.jsx(Te,{name:r.name,completeName:r.completeName,formListConfig:t,tableRowIndex:r.tableRowIndex})}else{return i.jsx(Re,{name:r.name,fieldConfig:r.fieldConfig,tableRowIndex:r.tableRowIndex,completeName:r.completeName})}}return i.jsx(je,{name:r.name})};var Pe=["fieldConfig","renderMiddleware"];var Me=function e(r){var a;var l=n.useMemo((function(){if(!r.columns)return[];return r.columns.map((function(e){var t=e.fieldConfig,a=e.renderMiddleware,n=k(e,Pe);return L({onCell:function e(){var t;return{valign:((t=r.tableProps)==null?void 0:t.cellVerticalAlign)||"middle"}}},n,{render:function n(l,o){var s=e.dataIndex?[].concat(r.name,[o.name,e.dataIndex]):[].concat(r.name,[o.name]);var u=a==null?void 0:a({name:s,tableRowIndex:o.name,operation:o.operation});if(u){return u}return i.jsx(Ie,{name:e.dataIndex?[o.name,e.dataIndex]:[o.name],completeName:s,fieldConfig:t,tableRowIndex:o.name})}})}))}),[r.columns,r.name,(a=r.tableProps)==null?void 0:a.cellVerticalAlign]);return i.jsx("div",{className:"editable-table",children:i.jsx(t.Form.List,{name:r.name,rules:r.rules,children:function e(a,o){return i.jsxs(n.Fragment,{children:[r.onTableBeforeRender?r.onTableBeforeRender(o,a.length):null,i.jsx(t.Table,L({scroll:{x:"max-content"},pagination:false},r.tableProps,{dataSource:a.map((function(e){return L({},e,{operation:o})})),columns:l,rowKey:"key"})),r.onTableAfterRender?r.onTableAfterRender(o,a.length):i.jsx(t.Button,{type:"dashed",onClick:function e(){return o.add()},block:true,icon:i.jsx(w["default"],{}),style:{marginTop:15},children:"新增"})]})}})})};var Ae=["onImportFinish"];var Fe=function e(r){var a=r.onImportFinish,o=k(r,Ae);var s=n.useState(false),u=s[0],c=s[1];var d=l.hooks.useCallbackRef((function(e){if(e.file.status==="uploading"){c(true)}else if(e.file.status==="done"){c(false);var r=e.file.response;if(r.code==="0000"){a(r.data)}else{void t.message.error(r.message||"文件导入异常...")}}}));return i.jsx(t.Upload,L({showUploadList:false,maxCount:1},o,{onChange:d,children:r.children?r.children:i.jsx(t.Button,{type:"primary",ghost:true,loading:u,children:"选择文件"})}))};Fe.defaultProps={name:"file",accept:".xlsx,.xls"};var Oe=["onChange","onUploadError","onPreview","value"];var Be=function e(r){z((function(){console.error("@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换")}),[]);var o=r.onChange,s=r.onUploadError,c=r.onPreview,d=r.value,v=k(r,Oe);var m=n.useState([]),p=m[0],h=m[1];var x=f.extend({fileKey:"fileKey",fileName:"fileName"},r.fieldNames);n.useEffect((function(){if(d&&a.isArray(d)){h(d.map((function(e){return{uid:e["uid"]||e[x.fileKey],name:e[x.fileName],fileKey:e[x.fileKey],url:e[x.fileKey],thumbUrl:e[x.fileKey]}})))}}),[x.fileKey,x.fileName,d]);var g=l.hooks.useCallbackRef((function(e){if(e.file.status==="done"){var t=e.file.response;if(t.code==="0000"){var a=t.data||{};var n={uid:e.file.uid,fileName:a[x.fileName]||e.file.name,fileKey:a[x.fileKey]};var i=(d||[]).concat(n);o==null?void 0:o(i)}else{s==null?void 0:s(t.message)}}else if(e.file.status==="removed"){var l=e.file.uid;var u=d!==undefined?[].concat(d):[];var c=u.findIndex((function(e){var r=e["uid"]||e[x.fileKey];return r===l}));if(c>=0){u.splice(c,1)}o==null?void 0:o(u)}else if(e.file.status==="error"){s==null?void 0:s()}h([].concat(e.fileList));r.onUploadChange==null?void 0:r.onUploadChange(e)}));var b=l.hooks.useCallbackRef((function(e){c==null?void 0:c({fileKey:e[x.fileKey],fileName:e[x.fileName]})}));return i.jsx(t.Upload,L({},v,{onChange:g,onPreview:b,fileList:p,className:u.classNames("v-file-upload",v.className),children:r.children}))};var Ee=function r(t){var l=a.isArray(t.children)?t.children:[t.children];var o=t.direction||"vertical";var s=t.gap?t.gap:0;var c=!e.isUndefinedOrNull(t.fullIndex)?a.isArray(t.fullIndex)?t.fullIndex:[t.fullIndex]:[];return i.jsx("div",{className:u.classNames("v-flex-layout","v-flex-"+o,t.className),style:t.style,onClick:t.onClick,children:l.map((function(e,r){var t=e.props.style||{};var a=c.includes(r)?L({flex:1},t):t;if(r<l.length-1&&s>0){if(o==="horizontal"){a.marginRight=s}else{a.marginBottom=s}}return n.cloneElement(e,{style:a,key:r})}))})};var We=function e(r){return i.jsx("div",{style:L({height:r.height},r.style),className:r.className})};var _e=function e(r){return i.jsx(t.Tooltip,{title:r.hoverTips,children:i.jsxs("div",{className:u.classNames("icon-wrapper","icon-wrapper-"+(r.size||"middle"),r.className),style:r.style,children:[r.icon,r.text?i.jsx("span",{className:"icon-wrapper-text",children:r.text}):null]})})};var Ye={actions:{openModalForm:function e(r){var t=r.itemData,a=r.title,n=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=a;e.operateType=n;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 Ke=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Ue=function e(r){var a=r.loading,l=r.okText,o=l===void 0?"保存":l,s=r.cancelText,u=s===void 0?"取消":s,c=r.onCancel,d=r.onOk,f=r.hideOkBtn,v=k(r,Ke);return i.jsx(n.Fragment,{children:i.jsxs(t.Space,{size:"middle",children:[i.jsx(t.Button,L({},v.cancelButtonProps,{className:"cancel-btn",onClick:c,children:u})),f!=true&&i.jsx(t.Button,L({type:"primary"},v.okButtonProps,{className:"ok-btn",onClick:d,loading:a,children:o}))]})})};var ze=["pageLoading","className","width","children","footer","operationProps"];var Ge=function e(){return i.jsx("div",{className:"modal-wraper-loader",children:i.jsxs("div",{className:"loader-wrapper",children:[i.jsx("div",{className:"loader-inner"}),i.jsx("div",{className:"loader-text",children:"LOADING"})]})})};var Ve=function e(r){var a=r.pageLoading,l=r.className,o=r.width,s=r.children,c=r.footer,d=r.operationProps,f=k(r,ze);n.useEffect((function(){console.error("@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整")}),[]);return i.jsxs(t.Modal,L({className:u.classNames("modal-wraper",l),keyboard:false,forceRender:false,destroyOnClose:true},f,{width:o||600,footer:null,children:[i.jsxs("div",{className:"modal-wraper-content",children:[s,a&&i.jsx(Ge,{})]}),c!==null&&i.jsx("div",{className:"modal-wraper-content-footer",children:c?c:i.jsx(Ue,L({},d))})]}))};var He={};var Je=function e(r){if(!He[r]){He[r]=s.Model(Ye)}return He[r]};var Qe={actions:{openModalForm:function e(r){var t=r.itemData,a=r.title,n=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=a;e.operateType=n;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 Xe=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Ze=function e(r){var a=r.loading,l=r.okText,o=l===void 0?"保存":l,s=r.cancelText,u=s===void 0?"取消":s,c=r.onCancel,d=r.onOk,f=r.hideOkBtn,v=k(r,Xe);return i.jsx(n.Fragment,{children:i.jsxs(t.Space,{size:"middle",children:[i.jsx(t.Button,L({},v.cancelButtonProps,{className:"cancel-btn",onClick:c,children:u})),f!=true&&i.jsx(t.Button,L({type:"primary"},v.okButtonProps,{className:"ok-btn",onClick:d,loading:a,children:o}))]})})};var $e=["pageLoading","className","width","children"];var er=function e(){return i.jsx("div",{className:"modal-wrapper-loader",children:i.jsxs("div",{className:"loader-wrapper",children:[i.jsx("div",{className:"loader-inner"}),i.jsx("div",{className:"loader-text",children:"LOADING"})]})})};var rr=function e(r){return i.jsxs(n.Fragment,{children:[i.jsx("div",{className:"modal-wrapper-content",children:r.children}),r.operationProps?i.jsx(tr,{children:i.jsx(Ze,L({},r.operationProps))}):null]})};var tr=function e(r){return i.jsx("div",{className:"modal-wrapper-footer",children:r.children})};var ar=function e(r){var a=r.pageLoading,n=r.className,l=r.width,o=r.children,s=k(r,$e);z((function(){if(r["operationProps"]){throw new Error("ModalWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return i.jsxs(t.Modal,L({className:u.classNames("modal-wrapper",n),keyboard:false,forceRender:true,destroyOnClose:true},s,{width:l||600,footer:null,children:[o,a&&i.jsx(er,{})]}))};ar.Content=rr;ar.Footer=tr;var nr={};var ir=function e(r){if(!nr[r]){nr[r]=s.Model(Qe)}return nr[r]};var lr=function e(r){return i.jsx("div",{className:u.classNames("page-fixed-footer",r.className),style:r.style,children:r.children})};var or=function e(){return i.jsx("div",{className:"v-404",children:"404"})};var sr={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 ur={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 cr={form:sr,formItem:ur};var dr=function e(r){var t=r.formLabelAlign||"right";var a=u.classNames("simple-layout",{"simple-layout-tight":r.layoutType==="tight","simple-layout-formlabel-left":t==="left"},r.className);var n=u.classNames("simple-layout-title",{"simple-layout-title-sign":r.titleLeftLine});return i.jsxs("div",{className:a,style:r.style,children:[r.title?i.jsx("div",{className:n,children:r.title}):null,r.desc?i.jsx("div",{className:"simple-layout-desc",children:r.desc}):null,r.children?i.jsx("div",{className:"simple-layout-content",children:r.children}):null]})};dr.defaultProps={titleLeftLine:true,layoutType:"layer"};var fr=function e(r){var t=n.useState(),a=t[0],o=t[1];var s=n.useState(false),c=s[0],d=s[1];var f=n.useState(false),v=f[0],m=f[1];var p=n.useMemo((function(){return{sendTxt:r.sendTxt,sentTxt:r.sentTxt,processingTxt:r.processingTxt,format:r.format,autoStart:r.autoStart,totalTicks:r.totalTicks,duration:r.duration}}),[]);var h=p.format;var x=p.totalTicks;var g=p.duration;var b=l.hooks.useCountdownCallback((function(e){var t=e/1e3;if(e>0){if(!c){d(true)}o(h.replace("{t}",String(t)));r.onTick==null?void 0:r.onTick(t)}else if(e===0){d(false);m(false);r.onTick==null?void 0:r.onTick(t);o(p.sentTxt)}}),x*1e3,{intervalTime:g});n.useEffect((function(){if(!p.autoStart){o(p.sendTxt)}else{b();m(true);d(true)}}),[b,p]);var y=l.hooks.useCallbackRef((function(){if(c||v)return;m(true);o(p.processingTxt);void r.onSendRequest().then((function(){d(true);b()})).catch((function(){o(p.sendTxt);m(false)}))}));var j=u.classNames("v-count-down",r.className,{running:c,starting:v});return i.jsx("div",{className:j,onClick:y,children:a})};fr.defaultProps={totalTicks:60,duration:1e3,autoStart:false,format:"{t}s",sendTxt:"获取验证码",sentTxt:"重新获取",processingTxt:"发送中..."};var vr=function e(){console.error("@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代")};var mr=function e(r){z((function(){vr()}),[]);return i.jsx("div",{className:u.classNames("table-filter-layout",{"table-filter-layout-flex":r.isFixed},r.className),children:n.Children.map(r.children,(function(e,t){if(r.isFixed&&t===r.fullIndex){return n.cloneElement(e,{className:"table-filter-layout-flex-full"})}return e}))})};var pr=function e(r){return i.jsx("div",{className:u.classNames("table-filter-layout-condition",r.className),children:r.children})};var hr=function e(r){return i.jsx("div",{className:u.classNames("table-filter-layout-operate",r.className),children:r.children})};var xr=function e(r){return i.jsx("div",{className:u.classNames("table-filter-layout-table",r.className),children:r.children})};var gr=function e(r){return i.jsx("div",{className:u.classNames("table-filter-layout-footer",r.className),children:r.children})};mr.Condition=pr;mr.Operate=hr;mr.Table=xr;mr.Footer=gr;var br={treeSelectorList:[],queryIsEmpty:false};var yr={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:br};var jr={};var wr=function e(r){if(!jr[r]){jr[r]=s.Model(yr)}return jr[r]};var Nr=function r(t,n,i){if(!a.isArray(n)||n.length===0)return[];var l=e.treeToTiledArray(n,i);return e.treeLeafParentsArray(t,l)};var Cr=["serviceConfig","effectDependencyList","onTreeSelectorListChange","treeSelectorList","modelKey"];var Sr=n.forwardRef((function(r,o){var s=r.serviceConfig,u=r.effectDependencyList,c=r.onTreeSelectorListChange,d=r.treeSelectorList,v=r.modelKey,m=k(r,Cr);var p=s||{};var h=u||[];var x=n.useState(false),b=x[0],y=x[1];var j=n.useState(),w=j[0],C=j[1];var S=wr(v).useStore(),q=S[0],R=S[1];var T="request-pre-"+r.modelKey;var D=function r(t){return t===""||e.isUndefinedOrNull(t)};var I=function e(r){var t=p.onRequestResultAdapter?p.onRequestResultAdapter(r):r;return t};var P=l.hooks.useCallbackRef((function(){return new Promise((function(e,r){var a,n,i,l,o;var s=function(){try{return e()}catch(e){return r(e)}};var u=function(e){try{y(false);void t.message.error(e.message||"数据查询异常...");return s()}catch(e){return r(e)}};try{if(!p.onRequest){throw new Error("onRequest 调用接口服务不能为空")}a=p.requiredParamsKeys;n=f.extend({},p.params);if(a){i=a.find((function(e){return D(n[e])}));if(i){console.warn("TreeSelectorWrapper组件:参数:"+a.join("、")+"不能为空");return e()}}var c=function(){try{return s()}catch(e){return u(e)}};var d=function(e){try{y(false);window[T]=false;void R.changeRequestStatus("request-error");return c()}catch(e){return u(e)}};try{y(true);window[T]=true;void R.changeRequestStatus("request-pre");return Promise.resolve(p.onRequest==null?void 0:p.onRequest(n)).then((function(e){try{l=e;o=I(l);y(false);window[T]=false;void R.setSelectBoxList(o||[]);return c()}catch(e){return d(e)}}),d)}catch(e){d(e)}}catch(e){u(e)}}))}));z((function(){if(q.treeSelectorList&&q.requestStatus==="request-success"){c==null?void 0:c(q.treeSelectorList)}}),[q.treeSelectorList,q.requestStatus]);z((function(){if(d){void R.setSelectBoxList(d);return}var e=wr(v).getState();if(h.length>0||!window[T]&&e.requestStatus!=="request-success"){void P()}}),h);n.useEffect((function(){if(!e.isUndefinedOrNull(r.value)){var t=a.isArray(r.value)?r.value:[r.value];if(t.length>0&&q.treeSelectorList.length>0){var n=[];t.forEach((function(e){var t=Nr(e,q.treeSelectorList,r.fieldNames);n=n.concat(t.map((function(e){return e.value})))}));C((function(e){var r=n.concat(e||[]);return Array.from(new Set(r))}))}}}),[q.treeSelectorList,r.fieldNames,r.value]);n.useImperativeHandle(o,(function(){return{onClearSelectorList:function e(){void R.setSelectBoxList([])},getTreeSelectorList:function e(){return q.treeSelectorList}}}));var M=l.hooks.useCallbackRef((function(e){C(e)}));var A=l.hooks.useCallbackRef((function(){void P()}));var F=n.useMemo((function(){if(q.treeSelectorList.length===0)return undefined;var e=L({label:"label",value:"value"},r.fieldNames);if(r.showAllOption===true){var t;var a=(t={},t[""+e.label]="全部",t[""+e.value]="",t);return[a].concat(q.treeSelectorList)}else if(g.isObject(r.showAllOption)){return[r.showAllOption].concat(q.treeSelectorList)}return q.treeSelectorList}),[r.fieldNames,r.showAllOption,q.treeSelectorList]);return i.jsx(t.TreeSelect,L({dropdownStyle:{maxHeight:400,overflow:"auto"},showSearch:true,treeLine:true},m,{value:e.isUndefinedOrNull(r.value)?undefined:r.value,treeExpandedKeys:w,treeData:F,loading:b,onTreeExpand:M,style:L({width:"100%"},m.style),suffixIcon:q.requestStatus==="request-error"?i.jsx(N["default"],{spin:b,onClick:A}):undefined,notFoundContent:i.jsx(Lr,{requestStatus:q.requestStatus,onAgainRequest:A})}))}));var Lr=function e(r){var a=n.useMemo((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return i.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:a,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&i.jsx(t.Button,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var kr={treeList:[],queryIsEmpty:false};var qr={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:kr};var Rr={};var Tr=function e(r){if(!Rr[r]){Rr[r]=s.Model(qr)}return Rr[r]};var Dr=function r(t,a,n){var i=e.treeToTiledArray(a,n);return e.treeLeafParentsArray(t,i)};var Ir=["serviceConfig","effectDependencyList","selectorTreeList","value","onChange","fieldNames","modelKey"];var Pr=n.forwardRef((function(r,o){var s=r.serviceConfig,u=r.effectDependencyList,c=r.selectorTreeList,d=r.value,v=r.onChange,m=r.fieldNames,p=r.modelKey,h=k(r,Ir);var x=s||{};var g=u||[];var b=n.useState(),y=b[0],j=b[1];var w=Tr(p).useStore(),N=w[0],C=w[1];var S=n.useState(false),q=S[0],R=S[1];var T=n.useMemo((function(){if(e.isUndefinedOrNull(r.value))return undefined;return a.isArray(r.value)?r.value:[r.value]}),[r.value]);var D=function r(t){return t===""||e.isUndefinedOrNull(t)};var I=function e(r){var t=x.onRequestResultAdapter?x.onRequestResultAdapter(r):r;return t};var P=l.hooks.useCallbackRef((function(){return new Promise((function(e,r){var a,n,i,l,o;var s=function(){try{return e()}catch(e){return r(e)}};var u=function(e){try{R(false);void t.message.error(e.message||"数据查询异常...");return s()}catch(e){return r(e)}};try{if(!x.onRequest){throw new Error("onRequest 调用接口服务不能为空")}a=x.requiredParamsKeys;n=f.extend({},x.params);if(a){i=a.find((function(e){return D(n[e])}));if(i){console.warn("TreeWrapper组件:参数:"+a.join("、")+"不能为空");return e()}}var c=function(){try{return s()}catch(e){return u(e)}};var d=function(e){try{R(false);void C.changeRequestStatus("request-error");return c()}catch(e){return u(e)}};try{R(true);void C.changeRequestStatus("request-pre");return Promise.resolve(x.onRequest==null?void 0:x.onRequest(n)).then((function(e){try{l=e;o=I(l);void C.setTreeList(o||[]);R(false);return c()}catch(e){return d(e)}}),d)}catch(e){d(e)}}catch(e){u(e)}}))}));z((function(){if(c){void C.setTreeList(c);return}var e=Tr(p).getState();if(g.length>0||!e.requestStatus||e.requestStatus==="request-error"){void P()}}),g);z((function(){if(T&&T.length>0&&N.treeList.length>0&&!y){var e=[];T.forEach((function(t){var a=Dr(t,N.treeList,r.fieldNames);e=e.concat(a.map((function(e){return e.value})))}));j((function(r){var t=e.concat(r||[]);return Array.from(new Set(t))}))}}),[N.treeList,r.fieldNames,d]);l.hooks.useUpdateEffect((function(){if(r.filterLabel){var t=e.treeToTiledArray(N.treeList||[],r.fieldNames);var a=t.filter((function(e){var t;return(t=e.label)==null?void 0:t.includes(r.filterLabel||"")}));var n=[];a.map((function(e){var t=Dr(e.value,N.treeList||[],r.fieldNames);var a=t.map((function(e){return e.value}));n=n.concat(a)}));j(Array.from(new Set(n)))}else{j([])}}),[r.filterLabel]);n.useImperativeHandle(o,(function(){return{onClearSelectorList:function e(){void C.resetTreeList()},getTreeDataList:function e(){return N.treeList}}}));var M=l.hooks.useCallbackRef((function(e){j(e)}));var A=l.hooks.useCallbackRef((function(e){v==null?void 0:v(e)}));var F=l.hooks.useCallbackRef((function(e){if(r.multiple){v==null?void 0:v(e)}else{v==null?void 0:v(e[0])}}));var O=n.useMemo((function(){var e=f.extend({label:"label",value:"value",children:"children"},m);return{title:e.label,key:e.value,children:e.children}}),[m]);if(N.treeList.length>0){return i.jsx(t.Tree,L({showLine:h.checkable?false:{showLeafIcon:false}},h,{fieldNames:O,expandedKeys:y,treeData:N.treeList,onExpand:M,selectedKeys:h.checkable?undefined:T,checkedKeys:h.checkable?T:undefined,onCheck:h.checkable?A:undefined,onSelect:h.checkable?undefined:F,style:L({width:"100%"},h.style)}))}return i.jsx(Mr,{requestStatus:N.requestStatus,loading:q,onAgainRequest:P})}));var Mr=function e(r){var a=n.useMemo((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return i.jsxs("div",{className:"tree-wrapper-empty",children:[i.jsx(t.Spin,{spinning:r.loading}),i.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:a,children:r.requestStatus==="request-error"&&i.jsx(t.Button,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})]})};exports.ButtonOperate=I;exports.DatePickerWrapper=M;exports.DateRangePickerWrapper=F;exports.DrawerWraper=_;exports.DrawerWrapper=Z;exports.EditableTable=Me;exports.FileImport=Fe;exports.FileUpload=Be;exports.FlexLayout=Ee;exports.Gap=We;exports.IconWrapper=_e;exports.ModalWraper=Ve;exports.ModalWrapper=ar;exports.Page404=or;exports.PageFixedFooter=lr;exports.Permission=T;exports.SelectorWrapper=he;exports.SimpleLayout=dr;exports.SmsCountDown=fr;exports.TableFilterLayout=mr;exports.TreeSelectorWrapper=Sr;exports.TreeWrapper=Pr;exports.UploadWrapper=Ce;exports.createDrawerWraperModel=K;exports.createDrawerWrapperModel=ee;exports.createModalWraperModel=Je;exports.createModalWrapperModel=ir;exports.getPermissionList=q;exports.hasPermission=R;exports.preDefinedClassName=cr;exports.styles=S;exports.useEffectCustom=z;exports.useEffectCustomAsync=G;
4
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("@flatbiz/utils");var r=require("@dimjs/lang/cjs/is-undefined");var t=require("antd");var a=require("@dimjs/lang/cjs/is-array");var n=require("react");var i=require("react/jsx-runtime");var l=require("@wove/react/cjs/hooks");var o=require("moment");var s=require("@dimjs/model-react");var u=require("@dimjs/utils/cjs/class-names");var c=require("@ant-design/icons/es/icons/SaveOutlined");var d=require("@ant-design/icons/es/icons/PlusOutlined");var f=require("@dimjs/utils/cjs/extend");var v=require("@ant-design/icons/es/icons/RedoOutlined");var m=require("@dimjs/lang/cjs/is-boolean");var p=require("@dimjs/lang/cjs/is-number");var h=require("@dimjs/lang/cjs/is-string");var x=require("@ant-design/icons/es/icons/DeleteOutlined");var g=require("@dimjs/lang/cjs/is-object");function b(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var y=b(o);var j=b(c);var w=b(d);var N=b(v);var C=b(x);var S=e.noop;function L(){L=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t){if(Object.prototype.hasOwnProperty.call(t,a)){e[a]=t[a]}}}return e};return L.apply(this,arguments)}function k(e,r){if(e==null)return{};var t={};var a=Object.keys(e);var n,i;for(i=0;i<a.length;i++){n=a[i];if(r.indexOf(n)>=0)continue;t[n]=e[n]}return t}var q=function r(){var t=e.getGlobalData(),n=t.elemAclLimits;var i=a.isArray(n)?n:[];return i};var R=function e(r){var t=q();if(t.includes(r)){return true}return false};var D=function e(r){var t=q();if(t.includes(r.name)){return i.jsx(n.Fragment,{children:r.children})}return null};var T=["text","color","onClick","permission","needConfirm","confirmMessage","hidden","style"];var I=function e(a){return i.jsx("div",{className:"table-operate",children:i.jsx(t.Space,{split:i.jsx(t.Divider,{type:"vertical"}),size:a.size,wrap:r.isUndefined(a.wrap)?true:a.wrap,children:a.operateList.map((function(e,r){if(!e)return null;var a=e.text,l=e.color,o=e.onClick,s=e.permission,u=e.needConfirm,c=e.confirmMessage,d=e.hidden,f=e.style,v=k(e,T);if(d)return null;if(s&&!R(s))return null;var m=l?L({color:l},f):f;var p=e.type||"link";if(u){return i.jsx(t.Popconfirm,{title:c,okText:"确定",cancelText:"取消",onConfirm:o,arrowPointAtCenter:true,children:i.jsx(t.Button,L({},v,{onClick:undefined,type:p,danger:true,style:m,children:a}))},r)}return n.createElement(t.Button,L({},v,{type:p,style:m,key:r,onClick:o}),a)}))})})};I.defaultProps={size:0};var P=["value","onChange","style"];var M=function r(a){var o=a.value,s=a.onChange,u=a.style,c=k(a,P);var d=n.useMemo((function(){if(a.format)return a.format;if(a.showTime)return"YYYY-MM-DD HH:mm:ss";return"YYYY-MM-DD"}),[a.showTime,a.format]);var f=l.hooks.useCallbackRef((function(e){if(e){s==null?void 0:s(y["default"](e).format(d))}else{s==null?void 0:s(undefined)}}));var v=l.hooks.useCallbackRef((function(r){var t=r.format("YYYY-MM-DD");if(!a.disabledDateConfig){return false}var n=a.disabledDateConfig,i=n.minDate,l=n.maxDate;if(i&&l){if(!e.flatbizDate.in(t,i,l)){return true}}else if(i){if(!e.flatbizDate.gte(t,i)){return true}}else if(l){if(!e.flatbizDate.gte(l,t)){return true}}return false}));var m=n.useMemo((function(){if(o){return y["default"](e.flatbizDate.dateNormalize(o))}return undefined}),[o]);return i.jsx(t.DatePicker,L({disabledDate:v},c,{style:L({width:"100%"},u),value:m,onChange:f}))};var A=["value","onChange","style"];var F=function r(a){var o=a.value,s=a.onChange,u=a.style,c=k(a,A);var d=n.useState(),f=d[0],v=d[1];var m=n.useMemo((function(){if(a.format)return a.format;if(a.showTime===true)return"YYYY-MM-DD HH:mm:ss";return"YYYY-MM-DD"}),[a.showTime,a.format]);var p=l.hooks.useCallbackRef((function(e){if(e){var r=e||[],t=r[0],a=r[1];s==null?void 0:s([y["default"](t).format(m),y["default"](a).format(m)])}else{s==null?void 0:s(undefined)}}));var h=l.hooks.useCallbackRef((function(e){if(a.disabledDateConfig){v(e)}}));var x=l.hooks.useCallbackRef((function(r){var t=r.format("YYYY-MM-DD");if(!a.disabledDateConfig){return false}var n=a.disabledDateConfig,i=n.maxDays,l=n.minDate,o=n.maxDate;if(l&&o){if(!e.flatbizDate.in(t,l,o)){return true}}else if(l){if(!e.flatbizDate.gte(t,l)){return true}}else if(o){if(!e.flatbizDate.gte(o,t)){return true}}if(!f||!i){return false}var s=f[0]?f[0].format("YYYY-MM-DD"):undefined;var u=f[1]?f[1].format("YYYY-MM-DD"):undefined;var c;var d;if(s){c=e.flatbizDate.format(e.flatbizDate.update(s,"d",i-1));if(u){if(e.flatbizDate.in(u,s,c)){d=e.flatbizDate.format(e.flatbizDate.update(u,"d",-(i-1)))}else{d=s}}else{d=s}}else{c=u;d=e.flatbizDate.format(e.flatbizDate.update(u,"d",-(i-1)))}return!e.flatbizDate.in(t,d,c)}));var g=o||[],b=g[0],j=g[1];var w=n.useMemo((function(){if(b&&j){var r=e.flatbizDate.dateNormalize(b);var t=e.flatbizDate.dateNormalize(j);return[y["default"](r),y["default"](t)]}return undefined}),[b,j]);return i.jsx(t.DatePicker.RangePicker,L({disabledDate:x,onCalendarChange:h},c,{style:L({width:"100%"},u),value:w,onChange:p}))};var O={actions:{openDrawerForm:function e(r){var t=r.itemData,a=r.title,n=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=a;e.operateType=n;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 E=function e(r){return i.jsx("div",{className:"fixed-bottom-block",children:i.jsxs(t.Space,{size:"middle",children:[i.jsx(t.Button,L({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&i.jsx(t.Button,L({type:"primary",icon:i.jsx(j["default"],{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var B=["pageLoading","className","width","children","footer","operationProps"];var W=function e(){return i.jsx("div",{className:"drawer-wraper-loader",children:i.jsxs("div",{className:"loader-wrapper",children:[i.jsx("div",{className:"loader-inner"}),i.jsx("div",{className:"loader-text",children:"LOADING"})]})})};var _=function e(r){var a=r.pageLoading,l=r.className,o=r.width,s=o===void 0?600:o,c=r.children,d=r.footer,f=r.operationProps,v=k(r,B);n.useEffect((function(){console.error("@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整")}),[]);return i.jsxs(t.Drawer,L({className:u.classNames("drawer-wraper",l),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:s},size:"default"},v,{footer:d||d===null?d:i.jsx(E,L({},f)),children:[i.jsx("div",{className:"drawer-wraper-content",children:c}),a&&i.jsx(W,{})]}))};var z={};var Y=function e(r){if(!z[r]){z[r]=s.Model(O)}return z[r]};var K={actions:{openDrawerForm:function e(r){var t=r.itemData,a=r.title,n=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=a;e.operateType=n;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 U=function e(r,t){return n.useEffect(r,t)};var G=function e(r,t){n.useEffect((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 V=function e(r){return i.jsx("div",{className:"fixed-bottom-block",children:i.jsxs(t.Space,{size:"middle",children:[i.jsx(t.Button,L({},r.cancelButtonProps,{className:"cancel-btn",onClick:r.onCancel,children:r.cancelText||"取消"})),r.hideOkBtn!=true&&i.jsx(t.Button,L({type:"primary",icon:i.jsx(j["default"],{})},r.okButtonProps,{className:"ok-btn",onClick:r.onOk,loading:r.loading,children:r.okText||"提交"}))]})})};var H=["pageLoading","className","width","children"];var J=function e(){return i.jsx("div",{className:"drawer-wrapper-loader",children:i.jsxs("div",{className:"loader-wrapper",children:[i.jsx("div",{className:"loader-inner"}),i.jsx("div",{className:"loader-text",children:"LOADING"})]})})};var Q=function e(r){return i.jsxs(n.Fragment,{children:[i.jsx("div",{className:"drawer-wrapper-content",children:r.children}),r.operationProps?i.jsx(X,{children:i.jsx(V,L({},r.operationProps))}):null]})};var X=function e(r){return i.jsx("div",{className:"drawer-wrapper-footer",children:r.children})};var Z=function e(r){var a=r.pageLoading,n=r.className,l=r.width,o=l===void 0?600:l,s=r.children,c=k(r,H);U((function(){if(r["operationProps"]){throw new Error("DrawerWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return i.jsxs(t.Drawer,L({className:u.classNames("drawer-wrapper",n),keyboard:false,forceRender:false,destroyOnClose:true,width:"80%",contentWrapperStyle:{maxWidth:o},size:"default"},c,{footer:null,children:[a&&i.jsx(J,{}),s]}))};Z.Content=Q;Z.Footer=X;var $={};var ee=function e(r){if(!$[r]){$[r]=s.Model(K)}return $[r]};var re=function e(r,t){return typeof r==="boolean"?r:r==null?void 0:r({tableRowIndex:t})};var te=function e(r){var l=r.fieldConfig,o=l.editableConfig,s=l.editable,u=l.render;var c=o.editableComptProps;var d=n.useMemo((function(){if(s)return[];var e=a.isArray(r.value)?r.value:[];var t=c.options||[];if(!a.isArray(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}),[s,c.options,r.value]);if(s){return i.jsx(t.Checkbox.Group,L({},c,{value:r.value,onChange:r.onChange}))}return i.jsx("span",{className:"editable-checkbox-group-view",children:u?u(r.value):d.map((function(e,r){return i.jsx(t.Tag,{color:"#1890ff",children:e.label},r)}))})};var ae=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-checkbox-group-form-item",a==null?void 0:a.className),children:i.jsx(te,L({},r))}))};var ne=function e(r){var a=r.fieldConfig,n=a.formItemProps,l=a.editableConfig;return i.jsx(t.Form.Item,L({},n,{name:r.name,className:u.classNames("editable-date-picker-wraper-form-item",n==null?void 0:n.className),children:i.jsx(M,L({},l.editableComptProps))}))};var ie=function e(r){var t=r.fieldConfig,l=t.editableConfig,o=t.editable,s=t.render;var u=l.editableComptProps;var c=n.useMemo((function(){var e=a.isArray(r.value)?r.value:[];if(o)return undefined;return e.join("~")}),[o,r.value]);if(o){return i.jsx(F,L({},u,{value:r.value,onChange:r.onChange}))}return i.jsx("span",{className:"editable-date-range-picker-view",children:s?s(r.value):c})};var le=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-date-range-picker-wraper-form-item",a==null?void 0:a.className),children:i.jsx(ie,L({},r))}))};var oe=function e(r){var a=r.fieldConfig,n=a.formItemProps,l=a.editableConfig;return i.jsx(t.Form.Item,L({},n,{name:r.name,children:i.jsx(t.Input,L({},l.editableComptProps))}))};var se=function e(r){var a=r.fieldConfig,n=a.formItemProps,l=a.editableConfig;return i.jsx(t.Form.Item,L({},n,{name:r.name,className:u.classNames("editable-input-number-form-item",n==null?void 0:n.className),children:i.jsx(t.InputNumber,L({},l.editableComptProps))}))};var ue=function e(r){var o=r.fieldConfig,s=o.editableConfig,u=o.editable,c=o.render;var d=s.editableComptProps;var f=n.useMemo((function(){if(u)return[];var e=r.value;var t=d.options||[];if(!a.isArray(t)||t.length===0){return e}var n=t.find((function(r){return r.value===e}));return(n==null?void 0:n.label)||e}),[u,d.options,r.value]);var v=l.hooks.useCallbackRef((function(e){r.onChange==null?void 0:r.onChange(e.target.value)}));if(u){return i.jsx(t.Radio.Group,L({},d,{value:r.value,onChange:v}))}return i.jsx("span",{className:"editable-radio-group-view",children:c?c(r.value):f?i.jsx(t.Tag,{color:"#1890ff",children:f}):null})};var ce=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-radio-group-form-item",a==null?void 0:a.className),children:i.jsx(ue,L({},r))}))};var de={selectorList:[],originalSelectorList:[],queryIsEmpty:false,requestStatus:"init"};var fe={actions:{setSelectBoxList:function e(r){return function(e){e.selectorList=r.selectorList||[];e.originalSelectorList=r.originalSelectorList||[];e.requestStatus="request-success"}},resetSelectBoxList:function e(){return function(e){e.selectorList=[]}},changeRequestStatus:function e(r){return function(e){e.requestStatus=r}}},state:de};var ve={};var me=function e(r){if(!ve[r]){ve[r]=s.Model(fe)}return ve[r]};var pe=["serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","operateType","searchFieldName","selectorList","modelKey","fieldNames"];var he=n.forwardRef((function(r,a){var o=r.serviceConfig,s=r.showAllOption,u=r.effectDependencyList,c=r.onSelectorListChange,d=r.operateType,v=r.searchFieldName,m=r.selectorList,p=r.modelKey,h=r.fieldNames,x=k(r,pe);var g=d==="search"&&m===undefined;var b=o||{};var y=u||[];var j=n.useRef();var w=n.useState(false),C=w[0],S=w[1];var q=me(p).useStore(),R=q[0],D=q[1];var T="request-pre-"+r.modelKey;var I=function r(t){return t===""||e.isUndefinedOrNull(t)};var P=function e(r){var t=b.onRequestResultAdapter?b.onRequestResultAdapter(r):r;return t};var M=l.hooks.useCallbackRef((function(r,a){return new Promise((function(n,i){var l,o,s,u,c,d,m;var p=function(){try{return n()}catch(e){return i(e)}};var x=function(e){try{S(false);void t.message.error(e.message||"数据查询异常...");return p()}catch(e){return i(e)}};try{if(!b.onRequest){throw new Error("onRequest 调用接口服务不能为空")}l=b.requiredParamsKeys;o=f.extend({},b.params);if(l){s=l.find((function(e){return I(o[e])}));if(s){console.warn("SelectorWrapper组件:参数:"+l.join("、")+"不能为空");return n()}}var y=function(){try{return p()}catch(e){return x(e)}};var j=function(e){try{console.error(e);S(false);window[T]=false;void D.changeRequestStatus("request-error");void t.message.error(e.message||"获取数据异常");return y()}catch(e){return x(e)}};try{S(true);window[T]=true;void D.changeRequestStatus("request-pre");if((!e.isUndefinedOrNull(r)||!e.isUndefinedOrNull(a))&&g){u=v||"keyword";o[u]=r;o["id"]=a}return Promise.resolve(b.onRequest==null?void 0:b.onRequest(o)).then((function(r){try{c=r;d=P(c);m=e.arrayField2LabelValue(d||[],h);S(false);window[T]=false;void D.setSelectBoxList({selectorList:m,originalSelectorList:d});return y()}catch(e){return j(e)}}),j)}catch(e){j(e)}}catch(e){x(e)}}))}));U((function(){if(R.originalSelectorList&&R.requestStatus==="request-success"){c==null?void 0:c(R.originalSelectorList)}}),[R.originalSelectorList,R.requestStatus]);U((function(){if(m){void D.setSelectBoxList({selectorList:e.arrayField2LabelValue(m,h),originalSelectorList:m});return}if(g)return;var r=me(p).getState();if(y.length>0||!window[T]&&r.requestStatus!=="request-success"){void M()}}),y);U((function(){if(g){if(I(r.value)){c==null?void 0:c([]);void D.resetSelectBoxList()}else{if(r.value!==j.current){void M(undefined,r.value)}}}}),y.concat([r.value]));n.useImperativeHandle(a,(function(){return{onClearSelectorList:function e(){void D.resetSelectBoxList()},getSelectorList:function e(){return R.selectorList}}}));var A=l.hooks.useCallbackRef((function(e,r){return(r==null?void 0:r.children).toLowerCase().indexOf(e.toLowerCase())>=0}));var F=l.hooks.useDebounceCallback((function(e){if(e){void M(e)}else{void D.resetSelectBoxList()}}),300);var O=l.hooks.useCallbackRef((function(e){j.current=e;for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++){a[n-1]=arguments[n]}r.onChange==null?void 0:r.onChange(e,a)}));var E=l.hooks.useCallbackRef((function(){void M()}));var B=i.jsx(t.Select.Option,{value:"",children:"全部"});return i.jsxs(t.Select,L({showSearch:true,allowClear:true},x,{value:e.isUndefinedOrNull(r.value)?undefined:r.value,notFoundContent:i.jsx(xe,{requestStatus:R.requestStatus,onAgainRequest:E}),loading:C,onSearch:g?F:undefined,filterOption:g?false:A,onChange:O,fieldNames:undefined,suffixIcon:R.requestStatus==="request-error"?i.jsx(N["default"],{spin:C,onClick:E}):undefined,children:[s===true?B:s,R.selectorList.map((function(e){return i.jsx(t.Select.Option,{value:e.value,label:e.label,children:r.onLabelRenderAdapter?r.onLabelRenderAdapter(e):e.label},e.value)}))]}))}));var xe=function e(r){var a=n.useMemo((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return i.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:a,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&i.jsx(t.Button,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var ge=function r(o){var s=o.fieldConfig,u=s.editableConfig,c=s.editable,d=s.render;var f=u.editableComptProps;var v=n.useState([]),m=v[0],p=v[1];var h=n.useState([]),x=h[0],g=h[1];n.useEffect((function(){if(!c){var e=a.isArray(o.value)?o.value:o.value===undefined?[]:[o.value];if(m.length===0){g(e.map((function(e){return{label:e,value:e}})))}var r=[];e.forEach((function(e){var t=m.find((function(r){return r.value===e}));r.push(t?t:{label:String(e),value:e})}));g(r)}}),[c,f.fieldNames,o.value,m]);var b=l.hooks.useCallbackRef((function(r){p(e.arrayField2LabelValue(r||[],f.fieldNames))}));if(c){return i.jsx(he,L({},f,{value:o.value,onChange:o.onChange,onSelectorListChange:b}))}return i.jsxs(n.Fragment,{children:[i.jsx("div",{style:{display:"none"},children:i.jsx(he,L({},f,{onSelectorListChange:b}))}),i.jsx("span",{className:"editable-selector-view",children:d?d(o.value):x.map((function(e,r){return i.jsx(t.Tag,{color:"#1890ff",children:e.label},r)}))})]})};var be=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-selector-wrapper-form-item",a==null?void 0:a.className),children:i.jsx(ge,L({},r))}))};var ye=function e(r){var a,l;var o=n.useMemo((function(){var e;if((e=r.fieldConfig)!=null&&e.render)return undefined;var t=h.isString(r.value)||p.isNumber(r.value)||m.isBoolean(r.value)||!r.value;if(!t){console.warn("Form.List name:【"+r.name+"】数据【"+JSON.stringify(r.value)+"】不能渲染在页面中")}return t?r.value:undefined}),[(a=r.fieldConfig)==null?void 0:a.render,r.name,r.value]);var s=((l=r.fieldConfig)==null?void 0:l.render==null?void 0:l.render(r.value))||o;return i.jsx(t.Typography.Paragraph,{className:"editable-text-view",ellipsis:h.isString(s)?{tooltip:s}:true,children:s})};var je=function e(r){return i.jsx(t.Form.Item,{noStyle:true,name:r.name,children:i.jsx(ye,{name:r.name,fieldConfig:r.fieldConfig})})};var we=function e(r){var a=r.fieldConfig,n=a.formItemProps,l=a.editableConfig;return i.jsx(t.Form.Item,L({},n,{name:r.name,children:i.jsx(t.Input.TextArea,L({},l.editableComptProps))}))};var Ne=["onChange","onUploadError","value"];var Ce=function e(r){var a=r.onChange,o=r.onUploadError,s=r.value,c=k(r,Ne);var d=n.useState(),v=d[0],m=d[1];var p=f.extend({uid:"uid",name:"name",url:"url"},r.fieldNames);U((function(){m(s==null?void 0:s.map((function(e){return{uid:e[p.uid],name:e[p.name],url:e[p.url]}})))}),[p.name,p.uid,p.url,s]);var h=l.hooks.useCallbackRef((function(e){var n=e.fileList;if(e.file.status==="done"){var i=e.file.response;if(i.code==="0000"){var l=r.onRequestResultAdapter?r.onRequestResultAdapter(i.data):i.data;l[p.uid]=l[p.uid]||e.file.uid;l[p.name]=l[p.name]||e.file.name;if(r.maxCount===1){a==null?void 0:a([l])}else{a==null?void 0:a((s||[]).concat(l))}}else{if(o){o(i.message)}else{void t.message.error(i.message||"上传操作失败...")}n[n.length-1]=L({},n[n.length-1],{status:"error"})}}else if(e.file.status==="removed"){var u=e.file.uid;var c=s!==undefined?[].concat(s):[];var d=c.findIndex((function(e){var r=e[p.uid];return r===u}));if(d>=0){c.splice(d,1)}a==null?void 0:a(c)}else if(e.file.status==="error"){if(o){o()}else{void t.message.error("上传操作失败...")}}m([].concat(n));r.onUploadChange==null?void 0:r.onUploadChange(e)}));return i.jsx(t.Upload,L({},c,{onChange:h,fileList:v,className:u.classNames("v-upload-wrapper",c.className),children:c.disabled?null:i.jsx(Se,{listType:c.listType,children:r.children})}))};var Se=function e(r){if(r.children)return i.jsx(n.Fragment,{children:r.children});if(r.listType==="picture-card"){return i.jsxs("div",{children:[i.jsx(w["default"],{}),i.jsx("div",{style:{marginTop:8},children:"上传图片"})]})}if(r.listType==="picture"){return i.jsx(t.Button,{type:"primary",ghost:true,children:"选择图片上传"})}return i.jsx(t.Button,{type:"primary",ghost:true,children:"选择文件上传"})};var Le=["children"];var ke=function e(r){var t=r.fieldConfig,a=t.editableConfig,n=t.render,l=t.editable;var o=a.editableComptProps,s=o.children,u=k(o,Le);if(l){return i.jsx(Ce,L({listType:"text"},u,{value:r.value,onChange:r.onChange,children:s}))}return i.jsx("div",{className:"upload-wrapper-selector-view",children:n?n(r.value):i.jsx(Ce,L({listType:"text"},u,{value:r.value,disabled:true}))})};var qe=function e(r){var a=r.fieldConfig.formItemProps;return i.jsx(t.Form.Item,L({},a,{name:r.name,className:u.classNames("editable-upload-wrapper-form-item",a==null?void 0:a.className),children:i.jsx(ke,L({},r))}))};var Re=function e(r){var t=r.fieldConfig,a=t.editableConfig,n=t.editable;var l=re(n,r.tableRowIndex);var o=f.extend({},r.fieldConfig,{editable:l});var s={name:r.name,fieldConfig:o};if((a==null?void 0:a.type)==="input"&&l){return i.jsx(oe,L({},s))}else if((a==null?void 0:a.type)==="inputNumber"&&l){return i.jsx(se,L({},s))}else if((a==null?void 0:a.type)==="textArea"&&l){return i.jsx(we,L({},s))}else if((a==null?void 0:a.type)==="datePickerWrapper"&&l){return i.jsx(ne,L({},s))}else if((a==null?void 0:a.type)==="dateRangePickerWrapper"){return i.jsx(le,L({},s))}else if((a==null?void 0:a.type)==="selectorWrapper"){return i.jsx(be,L({},s))}else if((a==null?void 0:a.type)==="checkboxGroup"){return i.jsx(ae,L({},s))}else if((a==null?void 0:a.type)==="radioGroup"){return i.jsx(ce,L({},s))}else if((a==null?void 0:a.type)==="uploadWrapper"){return i.jsx(qe,L({},s))}else if((a==null?void 0:a.type)==="custom"){return a.editableComptProps({name:r.name,editable:l,completeName:r.completeName})}return i.jsx(je,L({},s))};var De=function e(r){var a=t.Form.useFormInstance();var n=r.formListConfig,l=n.onFormListBeforeRender,o=n.editableConfigList,s=n.onFormListAfterRender,c=n.onFormListItemBeforeRender,d=n.onFormListItemAfterRender,f=n.deleteOperateRender;return i.jsx(t.Form.List,{name:r.name,children:function e(n,v){var m=v.add,p=v.remove;return i.jsxs(i.Fragment,{children:[l?l({tableRowIndex:r.tableRowIndex,add:m,get value(){return a.getFieldValue(r.completeName)}}):null,n.map((function(e,n){var l=o.find((function(e){return re(e.editable,r.tableRowIndex)}));var s=u.classNames("editable-inner-formlist-item","editable-inner-formlist-item-"+r.name[1],{"editable-inner-formlist-item_preview":!l});return i.jsxs("div",{className:s,children:[c?c({add:m,remove:function e(){p(n)},formListItemIndex:n,tableRowIndex:r.tableRowIndex,get value(){return a.getFieldValue([].concat(r.completeName,[e.name]))}}):null,i.jsxs(t.Space,{children:[o.map((function(t,a){return i.jsx(Re,{name:[e.name,t.fieldName],fieldConfig:t,tableRowIndex:r.tableRowIndex,completeName:[].concat(r.completeName,[e.name])},a)})),l?i.jsx(Te,{deleteOperateRender:f,remove:function e(){p(n)},index:n}):null]}),d?d({add:m,formListItemIndex:n,tableRowIndex:r.tableRowIndex,remove:function e(){p(n)},get value(){return a.getFieldValue([].concat(r.completeName,[e.name]))}}):null]},n)})),s?s({tableRowIndex:r.tableRowIndex,add:m,get value(){return a.getFieldValue(r.completeName)}}):null]})}})};var Te=function e(r){return i.jsx(t.Form.Item,{children:r.deleteOperateRender?r.deleteOperateRender({remove:r.remove,formListItemIndex:r.index}):i.jsx(t.Button,{type:"link",danger:true,icon:i.jsx(C["default"],{}),onClick:r.remove,children:"删除"})})};var Ie=function e(r){if(r.fieldConfig){if(a.isArray(r.fieldConfig["editableConfigList"])){var t=r.fieldConfig;return i.jsx(De,{name:r.name,completeName:r.completeName,formListConfig:t,tableRowIndex:r.tableRowIndex})}else{return i.jsx(Re,{name:r.name,fieldConfig:r.fieldConfig,tableRowIndex:r.tableRowIndex,completeName:r.completeName})}}return i.jsx(je,{name:r.name})};var Pe=["fieldConfig","renderMiddleware"];var Me=function e(r){var a;var l=n.useMemo((function(){if(!r.columns)return[];return r.columns.map((function(e){var t=e.fieldConfig,a=e.renderMiddleware,n=k(e,Pe);return L({onCell:function e(){var t;return{valign:((t=r.tableProps)==null?void 0:t.cellVerticalAlign)||"middle"}}},n,{render:function n(l,o){var s=e.dataIndex?[].concat(r.name,[o.name,e.dataIndex]):[].concat(r.name,[o.name]);var u=a==null?void 0:a({name:s,tableRowIndex:o.name,operation:o.operation});if(u){return u}return i.jsx(Ie,{name:e.dataIndex?[o.name,e.dataIndex]:[o.name],completeName:s,fieldConfig:t,tableRowIndex:o.name})}})}))}),[r.columns,r.name,(a=r.tableProps)==null?void 0:a.cellVerticalAlign]);return i.jsx("div",{className:"editable-table",children:i.jsx(t.Form.List,{name:r.name,rules:r.rules,children:function e(a,o){return i.jsxs(n.Fragment,{children:[r.onTableBeforeRender?r.onTableBeforeRender(o,a.length):null,i.jsx(t.Table,L({scroll:{x:"max-content"},pagination:false},r.tableProps,{dataSource:a.map((function(e){return L({},e,{operation:o})})),columns:l,rowKey:"key"})),r.onTableAfterRender?r.onTableAfterRender(o,a.length):i.jsx(t.Button,{type:"dashed",onClick:function e(){return o.add()},block:true,icon:i.jsx(w["default"],{}),style:{marginTop:15},children:"新增"})]})}})})};var Ae=["onImportFinish"];var Fe=function e(r){var a=r.onImportFinish,o=k(r,Ae);var s=n.useState(false),u=s[0],c=s[1];var d=l.hooks.useCallbackRef((function(e){if(e.file.status==="uploading"){c(true)}else if(e.file.status==="done"){c(false);var r=e.file.response;if(r.code==="0000"){a(r.data)}else{void t.message.error(r.message||"文件导入异常...")}}}));return i.jsx(t.Upload,L({showUploadList:false,maxCount:1},o,{onChange:d,children:r.children?r.children:i.jsx(t.Button,{type:"primary",ghost:true,loading:u,children:"选择文件"})}))};Fe.defaultProps={name:"file",accept:".xlsx,.xls"};var Oe=["onChange","onUploadError","onPreview","value"];var Ee=function e(r){U((function(){console.error("@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换")}),[]);var o=r.onChange,s=r.onUploadError,c=r.onPreview,d=r.value,v=k(r,Oe);var m=n.useState([]),p=m[0],h=m[1];var x=f.extend({fileKey:"fileKey",fileName:"fileName"},r.fieldNames);n.useEffect((function(){if(d&&a.isArray(d)){h(d.map((function(e){return{uid:e["uid"]||e[x.fileKey],name:e[x.fileName],fileKey:e[x.fileKey],url:e[x.fileKey],thumbUrl:e[x.fileKey]}})))}}),[x.fileKey,x.fileName,d]);var g=l.hooks.useCallbackRef((function(e){if(e.file.status==="done"){var t=e.file.response;if(t.code==="0000"){var a=t.data||{};var n={uid:e.file.uid,fileName:a[x.fileName]||e.file.name,fileKey:a[x.fileKey]};var i=(d||[]).concat(n);o==null?void 0:o(i)}else{s==null?void 0:s(t.message)}}else if(e.file.status==="removed"){var l=e.file.uid;var u=d!==undefined?[].concat(d):[];var c=u.findIndex((function(e){var r=e["uid"]||e[x.fileKey];return r===l}));if(c>=0){u.splice(c,1)}o==null?void 0:o(u)}else if(e.file.status==="error"){s==null?void 0:s()}h([].concat(e.fileList));r.onUploadChange==null?void 0:r.onUploadChange(e)}));var b=l.hooks.useCallbackRef((function(e){c==null?void 0:c({fileKey:e[x.fileKey],fileName:e[x.fileName]})}));return i.jsx(t.Upload,L({},v,{onChange:g,onPreview:b,fileList:p,className:u.classNames("v-file-upload",v.className),children:r.children}))};var Be=function r(t){var l=a.isArray(t.children)?t.children:[t.children];var o=t.direction||"vertical";var s=t.gap?t.gap:0;var c=!e.isUndefinedOrNull(t.fullIndex)?a.isArray(t.fullIndex)?t.fullIndex:[t.fullIndex]:[];return i.jsx("div",{className:u.classNames("v-flex-layout","v-flex-"+o,t.className),style:t.style,onClick:t.onClick,children:l.map((function(e,r){var t=e.props.style||{};var a=c.includes(r)?L({flex:1},t):t;if(r<l.length-1&&s>0){if(o==="horizontal"){a.marginRight=s}else{a.marginBottom=s}}return n.cloneElement(e,{style:a,key:r})}))})};var We=function e(r){return i.jsx("div",{style:L({height:r.height},r.style),className:r.className})};var _e=function e(r){return i.jsx(t.Tooltip,{title:r.hoverTips,children:i.jsxs("div",{className:u.classNames("icon-wrapper","icon-wrapper-"+(r.size||"middle"),r.className),style:r.style,children:[r.icon,r.text?i.jsx("span",{className:"icon-wrapper-text",children:r.text}):null]})})};var ze={actions:{openModalForm:function e(r){var t=r.itemData,a=r.title,n=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=a;e.operateType=n;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 Ye=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Ke=function e(r){var a=r.loading,l=r.okText,o=l===void 0?"保存":l,s=r.cancelText,u=s===void 0?"取消":s,c=r.onCancel,d=r.onOk,f=r.hideOkBtn,v=k(r,Ye);return i.jsx(n.Fragment,{children:i.jsxs(t.Space,{size:"middle",children:[i.jsx(t.Button,L({},v.cancelButtonProps,{className:"cancel-btn",onClick:c,children:u})),f!=true&&i.jsx(t.Button,L({type:"primary"},v.okButtonProps,{className:"ok-btn",onClick:d,loading:a,children:o}))]})})};var Ue=["pageLoading","className","width","children","footer","operationProps"];var Ge=function e(){return i.jsx("div",{className:"modal-wraper-loader",children:i.jsxs("div",{className:"loader-wrapper",children:[i.jsx("div",{className:"loader-inner"}),i.jsx("div",{className:"loader-text",children:"LOADING"})]})})};var Ve=function e(r){var a=r.pageLoading,l=r.className,o=r.width,s=r.children,c=r.footer,d=r.operationProps,f=k(r,Ue);n.useEffect((function(){console.error("@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整")}),[]);return i.jsxs(t.Modal,L({className:u.classNames("modal-wraper",l),keyboard:false,forceRender:false,destroyOnClose:true},f,{width:o||600,footer:null,children:[i.jsxs("div",{className:"modal-wraper-content",children:[s,a&&i.jsx(Ge,{})]}),c!==null&&i.jsx("div",{className:"modal-wraper-content-footer",children:c?c:i.jsx(Ke,L({},d))})]}))};var He={};var Je=function e(r){if(!He[r]){He[r]=s.Model(ze)}return He[r]};var Qe={actions:{openModalForm:function e(r){var t=r.itemData,a=r.title,n=r.operateType,i=r.pageLoading;return function(e){e.itemData=t;e.title=a;e.operateType=n;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 Xe=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var Ze=function e(r){var a=r.loading,l=r.okText,o=l===void 0?"保存":l,s=r.cancelText,u=s===void 0?"取消":s,c=r.onCancel,d=r.onOk,f=r.hideOkBtn,v=k(r,Xe);return i.jsx(n.Fragment,{children:i.jsxs(t.Space,{size:"middle",children:[i.jsx(t.Button,L({},v.cancelButtonProps,{className:"cancel-btn",onClick:c,children:u})),f!=true&&i.jsx(t.Button,L({type:"primary"},v.okButtonProps,{className:"ok-btn",onClick:d,loading:a,children:o}))]})})};var $e=["pageLoading","className","width","children"];var er=function e(){return i.jsx("div",{className:"modal-wrapper-loader",children:i.jsxs("div",{className:"loader-wrapper",children:[i.jsx("div",{className:"loader-inner"}),i.jsx("div",{className:"loader-text",children:"LOADING"})]})})};var rr=function e(r){return i.jsxs(n.Fragment,{children:[i.jsx("div",{className:"modal-wrapper-content",children:r.children}),r.operationProps?i.jsx(tr,{children:i.jsx(Ze,L({},r.operationProps))}):null]})};var tr=function e(r){return i.jsx("div",{className:"modal-wrapper-footer",children:r.children})};var ar=function e(r){var a=r.pageLoading,n=r.className,l=r.width,o=r.children,s=k(r,$e);U((function(){if(r["operationProps"]){throw new Error("ModalWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return i.jsxs(t.Modal,L({className:u.classNames("modal-wrapper",n),keyboard:false,forceRender:true,destroyOnClose:true},s,{width:l||600,footer:null,children:[o,a&&i.jsx(er,{})]}))};ar.Content=rr;ar.Footer=tr;var nr={};var ir=function e(r){if(!nr[r]){nr[r]=s.Model(Qe)}return nr[r]};var lr=function e(r){return i.jsx("div",{className:u.classNames("page-fixed-footer",r.className),style:r.style,children:r.children})};var or=function e(){return i.jsx("div",{className:"v-404",children:"404"})};var sr={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 ur={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 cr={form:sr,formItem:ur};var dr=function e(r){var t=r.formLabelAlign||"right";var a=u.classNames("simple-layout",{"simple-layout-tight":r.layoutType==="tight","simple-layout-formlabel-left":t==="left"},r.className);var n=u.classNames("simple-layout-title",{"simple-layout-title-sign":r.titleLeftLine});return i.jsxs("div",{className:a,style:r.style,children:[r.title?i.jsx("div",{className:n,children:r.title}):null,r.desc?i.jsx("div",{className:"simple-layout-desc",children:r.desc}):null,r.children?i.jsx("div",{className:"simple-layout-content",children:r.children}):null]})};dr.defaultProps={titleLeftLine:true,layoutType:"layer"};var fr=function e(r){var t=n.useState(),a=t[0],o=t[1];var s=n.useState(false),c=s[0],d=s[1];var f=n.useState(false),v=f[0],m=f[1];var p=n.useMemo((function(){return{sendTxt:r.sendTxt,sentTxt:r.sentTxt,processingTxt:r.processingTxt,format:r.format,autoStart:r.autoStart,totalTicks:r.totalTicks,duration:r.duration}}),[]);var h=p.format;var x=p.totalTicks;var g=p.duration;var b=l.hooks.useCountdownCallback((function(e){var t=e/1e3;if(e>0){if(!c){d(true)}o(h.replace("{t}",String(t)));r.onTick==null?void 0:r.onTick(t)}else if(e===0){d(false);m(false);r.onTick==null?void 0:r.onTick(t);o(p.sentTxt)}}),x*1e3,{intervalTime:g});n.useEffect((function(){if(!p.autoStart){o(p.sendTxt)}else{b();m(true);d(true)}}),[b,p]);var y=l.hooks.useCallbackRef((function(){if(c||v)return;m(true);o(p.processingTxt);void r.onSendRequest().then((function(){d(true);b()})).catch((function(){o(p.sendTxt);m(false)}))}));var j=u.classNames("v-count-down",r.className,{running:c,starting:v});return i.jsx("div",{className:j,onClick:y,children:a})};fr.defaultProps={totalTicks:60,duration:1e3,autoStart:false,format:"{t}s",sendTxt:"获取验证码",sentTxt:"重新获取",processingTxt:"发送中..."};var vr=function e(){console.error("@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代")};var mr=function e(r){U((function(){vr()}),[]);return i.jsx("div",{className:u.classNames("table-filter-layout",{"table-filter-layout-flex":r.isFixed},r.className),children:n.Children.map(r.children,(function(e,t){if(r.isFixed&&t===r.fullIndex){return n.cloneElement(e,{className:"table-filter-layout-flex-full"})}return e}))})};var pr=function e(r){return i.jsx("div",{className:u.classNames("table-filter-layout-condition",r.className),children:r.children})};var hr=function e(r){return i.jsx("div",{className:u.classNames("table-filter-layout-operate",r.className),children:r.children})};var xr=function e(r){return i.jsx("div",{className:u.classNames("table-filter-layout-table",r.className),children:r.children})};var gr=function e(r){return i.jsx("div",{className:u.classNames("table-filter-layout-footer",r.className),children:r.children})};mr.Condition=pr;mr.Operate=hr;mr.Table=xr;mr.Footer=gr;var br={treeSelectorList:[],queryIsEmpty:false};var yr={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:br};var jr={};var wr=function e(r){if(!jr[r]){jr[r]=s.Model(yr)}return jr[r]};var Nr=function r(t,n,i){if(!a.isArray(n)||n.length===0)return[];var l=e.treeToTiledArray(n,i);return e.treeLeafParentsArray(t,l)};var Cr=["serviceConfig","effectDependencyList","onTreeSelectorListChange","treeSelectorList","modelKey"];var Sr=n.forwardRef((function(r,o){var s=r.serviceConfig,u=r.effectDependencyList,c=r.onTreeSelectorListChange,d=r.treeSelectorList,v=r.modelKey,m=k(r,Cr);var p=s||{};var h=u||[];var x=n.useState(false),b=x[0],y=x[1];var j=n.useState(),w=j[0],C=j[1];var S=wr(v).useStore(),q=S[0],R=S[1];var D="request-pre-"+r.modelKey;var T=function r(t){return t===""||e.isUndefinedOrNull(t)};var I=function e(r){var t=p.onRequestResultAdapter?p.onRequestResultAdapter(r):r;return t};var P=l.hooks.useCallbackRef((function(){return new Promise((function(e,r){var a,n,i,l,o;var s=function(){try{return e()}catch(e){return r(e)}};var u=function(e){try{y(false);void t.message.error(e.message||"数据查询异常...");return s()}catch(e){return r(e)}};try{if(!p.onRequest){throw new Error("onRequest 调用接口服务不能为空")}a=p.requiredParamsKeys;n=f.extend({},p.params);if(a){i=a.find((function(e){return T(n[e])}));if(i){console.warn("TreeSelectorWrapper组件:参数:"+a.join("、")+"不能为空");return e()}}var c=function(){try{return s()}catch(e){return u(e)}};var d=function(e){try{y(false);window[D]=false;void R.changeRequestStatus("request-error");return c()}catch(e){return u(e)}};try{y(true);window[D]=true;void R.changeRequestStatus("request-pre");return Promise.resolve(p.onRequest==null?void 0:p.onRequest(n)).then((function(e){try{l=e;o=I(l);y(false);window[D]=false;void R.setSelectBoxList(o||[]);return c()}catch(e){return d(e)}}),d)}catch(e){d(e)}}catch(e){u(e)}}))}));U((function(){if(q.treeSelectorList&&q.requestStatus==="request-success"){c==null?void 0:c(q.treeSelectorList)}}),[q.treeSelectorList,q.requestStatus]);U((function(){if(d){void R.setSelectBoxList(d);return}var e=wr(v).getState();if(h.length>0||!window[D]&&e.requestStatus!=="request-success"){void P()}}),h);n.useEffect((function(){if(!e.isUndefinedOrNull(r.value)){var t=a.isArray(r.value)?r.value:[r.value];if(t.length>0&&q.treeSelectorList.length>0){var n=[];t.forEach((function(e){var t=Nr(e,q.treeSelectorList,r.fieldNames);n=n.concat(t.map((function(e){return e.value})))}));C((function(e){var r=n.concat(e||[]);return Array.from(new Set(r))}))}}}),[q.treeSelectorList,r.fieldNames,r.value]);n.useImperativeHandle(o,(function(){return{onClearSelectorList:function e(){void R.setSelectBoxList([])},getTreeSelectorList:function e(){return q.treeSelectorList}}}));var M=l.hooks.useCallbackRef((function(e){C(e)}));var A=l.hooks.useCallbackRef((function(){void P()}));var F=n.useMemo((function(){if(q.treeSelectorList.length===0)return undefined;var e=L({label:"label",value:"value"},r.fieldNames);if(r.showAllOption===true){var t;var a=(t={},t[""+e.label]="全部",t[""+e.value]="",t);return[a].concat(q.treeSelectorList)}else if(g.isObject(r.showAllOption)){return[r.showAllOption].concat(q.treeSelectorList)}return q.treeSelectorList}),[r.fieldNames,r.showAllOption,q.treeSelectorList]);return i.jsx(t.TreeSelect,L({dropdownStyle:{maxHeight:400,overflow:"auto"},showSearch:true,treeLine:true},m,{value:e.isUndefinedOrNull(r.value)?undefined:r.value,treeExpandedKeys:w,treeData:F,loading:b,onTreeExpand:M,style:L({width:"100%"},m.style),suffixIcon:q.requestStatus==="request-error"?i.jsx(N["default"],{spin:b,onClick:A}):undefined,notFoundContent:i.jsx(Lr,{requestStatus:q.requestStatus,onAgainRequest:A})}))}));var Lr=function e(r){var a=n.useMemo((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return i.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:a,className:"tree-selector-wrapper-empty",children:r.requestStatus==="request-error"&&i.jsx(t.Button,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})};var kr={treeList:[],queryIsEmpty:false};var qr={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:kr};var Rr={};var Dr=function e(r){if(!Rr[r]){Rr[r]=s.Model(qr)}return Rr[r]};var Tr=function r(t,a,n){var i=e.treeToTiledArray(a,n);return e.treeLeafParentsArray(t,i)};var Ir=["serviceConfig","effectDependencyList","selectorTreeList","value","onChange","fieldNames","modelKey"];var Pr=n.forwardRef((function(r,o){var s=r.serviceConfig,u=r.effectDependencyList,c=r.selectorTreeList,d=r.value,v=r.onChange,m=r.fieldNames,p=r.modelKey,h=k(r,Ir);var x=s||{};var g=u||[];var b=n.useState(),y=b[0],j=b[1];var w=Dr(p).useStore(),N=w[0],C=w[1];var S=n.useState(false),q=S[0],R=S[1];var D=n.useMemo((function(){if(e.isUndefinedOrNull(r.value))return undefined;return a.isArray(r.value)?r.value:[r.value]}),[r.value]);var T=function r(t){return t===""||e.isUndefinedOrNull(t)};var I=function e(r){var t=x.onRequestResultAdapter?x.onRequestResultAdapter(r):r;return t};var P=l.hooks.useCallbackRef((function(){return new Promise((function(e,r){var a,n,i,l,o;var s=function(){try{return e()}catch(e){return r(e)}};var u=function(e){try{R(false);void t.message.error(e.message||"数据查询异常...");return s()}catch(e){return r(e)}};try{if(!x.onRequest){throw new Error("onRequest 调用接口服务不能为空")}a=x.requiredParamsKeys;n=f.extend({},x.params);if(a){i=a.find((function(e){return T(n[e])}));if(i){console.warn("TreeWrapper组件:参数:"+a.join("、")+"不能为空");return e()}}var c=function(){try{return s()}catch(e){return u(e)}};var d=function(e){try{R(false);void C.changeRequestStatus("request-error");return c()}catch(e){return u(e)}};try{R(true);void C.changeRequestStatus("request-pre");return Promise.resolve(x.onRequest==null?void 0:x.onRequest(n)).then((function(e){try{l=e;o=I(l);void C.setTreeList(o||[]);R(false);return c()}catch(e){return d(e)}}),d)}catch(e){d(e)}}catch(e){u(e)}}))}));U((function(){if(c){void C.setTreeList(c);return}var e=Dr(p).getState();if(g.length>0||!e.requestStatus||e.requestStatus==="request-error"){void P()}}),g);U((function(){if(D&&D.length>0&&N.treeList.length>0&&!y){var e=[];D.forEach((function(t){var a=Tr(t,N.treeList,r.fieldNames);e=e.concat(a.map((function(e){return e.value})))}));j((function(r){var t=e.concat(r||[]);return Array.from(new Set(t))}))}}),[N.treeList,r.fieldNames,d]);l.hooks.useUpdateEffect((function(){if(r.filterLabel){var t=e.treeToTiledArray(N.treeList||[],r.fieldNames);var a=t.filter((function(e){var t;return(t=e.label)==null?void 0:t.includes(r.filterLabel||"")}));var n=[];a.map((function(e){var t=Tr(e.value,N.treeList||[],r.fieldNames);var a=t.map((function(e){return e.value}));n=n.concat(a)}));j(Array.from(new Set(n)))}else{j([])}}),[r.filterLabel]);n.useImperativeHandle(o,(function(){return{onClearSelectorList:function e(){void C.resetTreeList()},getTreeDataList:function e(){return N.treeList}}}));var M=l.hooks.useCallbackRef((function(e){j(e)}));var A=l.hooks.useCallbackRef((function(e){v==null?void 0:v(e)}));var F=l.hooks.useCallbackRef((function(e){if(r.multiple){v==null?void 0:v(e)}else{v==null?void 0:v(e[0])}}));var O=n.useMemo((function(){var e=f.extend({label:"label",value:"value",children:"children"},m);return{title:e.label,key:e.value,children:e.children}}),[m]);if(N.treeList.length>0){return i.jsx(t.Tree,L({showLine:h.checkable?false:{showLeafIcon:false}},h,{fieldNames:O,expandedKeys:y,treeData:N.treeList,onExpand:M,selectedKeys:h.checkable?undefined:D,checkedKeys:h.checkable?D:undefined,onCheck:h.checkable?A:undefined,onSelect:h.checkable?undefined:F,style:L({width:"100%"},h.style)}))}return i.jsx(Mr,{requestStatus:N.requestStatus,loading:q,onAgainRequest:P})}));var Mr=function e(r){var a=n.useMemo((function(){if(r.requestStatus==="request-error"){return"数据查询异常"}else if(r.requestStatus==="request-success"){return"暂无数据"}return"数据查询中"}),[r.requestStatus]);return i.jsxs("div",{className:"tree-wrapper-empty",children:[i.jsx(t.Spin,{spinning:r.loading}),i.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:a,children:r.requestStatus==="request-error"&&i.jsx(t.Button,{type:"primary",onClick:r.onAgainRequest,children:"重新获取数据"})})]})};exports.ButtonOperate=I;exports.DatePickerWrapper=M;exports.DateRangePickerWrapper=F;exports.DrawerWraper=_;exports.DrawerWrapper=Z;exports.EditableTable=Me;exports.FileImport=Fe;exports.FileUpload=Ee;exports.FlexLayout=Be;exports.Gap=We;exports.IconWrapper=_e;exports.ModalWraper=Ve;exports.ModalWrapper=ar;exports.Page404=or;exports.PageFixedFooter=lr;exports.Permission=D;exports.SelectorWrapper=he;exports.SimpleLayout=dr;exports.SmsCountDown=fr;exports.TableFilterLayout=mr;exports.TreeSelectorWrapper=Sr;exports.TreeWrapper=Pr;exports.UploadWrapper=Ce;exports.createDrawerWraperModel=Y;exports.createDrawerWrapperModel=ee;exports.createModalWraperModel=Je;exports.createModalWrapperModel=ir;exports.getPermissionList=q;exports.hasPermission=R;exports.preDefinedClassName=cr;exports.styles=S;exports.useEffectCustom=U;exports.useEffectCustomAsync=G;
5
5
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["@flatbiz/antd/src/01-styles/index.ts","@flatbiz/antd/src/permission/index.tsx","@flatbiz/antd/src/button-operate/index.tsx","@flatbiz/antd/src/date-picker-wrapper/index.tsx","@flatbiz/antd/src/date-range-picker-wrapper/index.tsx","@flatbiz/antd/src/drawer-wraper/drawer.model.ts","@flatbiz/antd/src/drawer-wraper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wraper/drawer-wraper.tsx","@flatbiz/antd/src/drawer-wraper/index.ts","@flatbiz/antd/src/drawer-wrapper/drawer.model.ts","@flatbiz/antd/src/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/drawer-wrapper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wrapper/drawer-wrapper.tsx","@flatbiz/antd/src/drawer-wrapper/index.ts","@flatbiz/antd/src/editable-table/utils.ts","@flatbiz/antd/src/editable-table/form-item/checkbox-group.tsx","@flatbiz/antd/src/editable-table/form-item/date-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/date-range-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/input.tsx","@flatbiz/antd/src/editable-table/form-item/input-number.tsx","@flatbiz/antd/src/editable-table/form-item/radio-group.tsx","@flatbiz/antd/src/selector-wrapper/model.ts","@flatbiz/antd/src/selector-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/selector-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/text.tsx","@flatbiz/antd/src/editable-table/form-item/textarea.tsx","@flatbiz/antd/src/upload-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/upload-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/index.tsx","@flatbiz/antd/src/editable-table/form-list-item/form-list.tsx","@flatbiz/antd/src/editable-table/form-list-item/index.tsx","@flatbiz/antd/src/editable-table/index.tsx","@flatbiz/antd/src/file-import/index.tsx","@flatbiz/antd/src/file-upload/index.tsx","@flatbiz/antd/src/flex-layout/index.tsx","@flatbiz/antd/src/gap/index.tsx","@flatbiz/antd/src/icon-wrapper/index.tsx","@flatbiz/antd/src/modal-wraper/modal.model.ts","@flatbiz/antd/src/modal-wraper/modal-operation.tsx","@flatbiz/antd/src/modal-wraper/modal-wraper.tsx","@flatbiz/antd/src/modal-wraper/index.ts","@flatbiz/antd/src/modal-wrapper/modal.model.ts","@flatbiz/antd/src/modal-wrapper/modal-operation.tsx","@flatbiz/antd/src/modal-wrapper/modal-wrapper.tsx","@flatbiz/antd/src/modal-wrapper/index.ts","@flatbiz/antd/src/page-fixed-footer/index.tsx","@flatbiz/antd/src/page404/index.tsx","@flatbiz/antd/src/pre-defined-classname/form/index.tsx","@flatbiz/antd/src/pre-defined-classname/index.ts","@flatbiz/antd/src/simple-layout/index.tsx","@flatbiz/antd/src/sms-count-down/index.tsx","@flatbiz/antd/src/table-filter-layout/index.tsx","@flatbiz/antd/src/tree-selector-wrapper/model.ts","@flatbiz/antd/src/tree-selector-wrapper/utils.ts","@flatbiz/antd/src/tree-selector-wrapper/index.tsx","@flatbiz/antd/src/tree-wrapper/model.ts","@flatbiz/antd/src/tree-wrapper/utils.ts","@flatbiz/antd/src/tree-wrapper/index.tsx"],"sourcesContent":["import { noop } from '@flatbiz/utils';\nimport './1_root.less';\nimport './2_base.less';\n\nexport const styles = noop;\n","import { isArray } from '@dimjs/lang';\nimport { getGlobalData } from '@flatbiz/utils';\nimport { FC, Fragment } from 'react';\n\nexport const getPermissionList = () => {\n const { elemAclLimits } = getGlobalData();\n const permissionList: string[] = isArray(elemAclLimits) ? elemAclLimits : [];\n return permissionList;\n};\n\nexport const hasPermission = (name: string) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(name)) {\n return true;\n }\n return false;\n};\n\nexport interface PermissionProps {\n name: string;\n}\nexport const Permission: FC<PermissionProps> = (props) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(props.name)) {\n return <Fragment>{props.children}</Fragment>;\n }\n return null;\n};\n","import { isUndefined } from '@dimjs/lang';\nimport { Button, ButtonProps, Divider, Popconfirm, Space, SpaceProps } from 'antd';\nimport { VFC } from 'react';\nimport { hasPermission } from '../permission';\nimport './style.less';\n\nexport interface ButtonOperateItem extends ButtonProps {\n text: string;\n color?: string;\n onClick: () => void;\n permission?: string;\n needConfirm?: boolean;\n confirmMessage?: string;\n hidden?: boolean;\n}\n\nexport interface ButtonOperateProps {\n operateList: Array<ButtonOperateItem | null>;\n wrap?: boolean;\n size?: SpaceProps['size'];\n}\n\nexport const ButtonOperate: VFC<ButtonOperateProps> = (props) => {\n return (\n <div className=\"table-operate\">\n <Space\n split={<Divider type=\"vertical\" />}\n size={props.size}\n wrap={isUndefined(props.wrap) ? true : props.wrap}\n >\n {props.operateList.map((item, index) => {\n if (!item) return null;\n const {\n text,\n color,\n onClick,\n permission,\n needConfirm,\n confirmMessage,\n hidden,\n style,\n ...otherProps\n } = item;\n if (hidden) return null;\n if (permission && !hasPermission(permission)) return null;\n const newStyle = color ? { color, ...style } : style;\n const type = item.type || 'link';\n if (needConfirm) {\n return (\n <Popconfirm\n title={confirmMessage}\n okText=\"确定\"\n cancelText=\"取消\"\n onConfirm={onClick}\n arrowPointAtCenter={true}\n key={index}\n >\n <Button {...otherProps} onClick={undefined} type={type} danger style={newStyle}>\n {text}\n </Button>\n </Popconfirm>\n );\n }\n return (\n <Button {...otherProps} type={type} style={newStyle} key={index} onClick={onClick}>\n {text}\n </Button>\n );\n })}\n </Space>\n </div>\n );\n};\n\nButtonOperate.defaultProps = {\n size: 0,\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { PickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DatePickerWrapperProps = Omit<PickerDateProps<moment.Moment>, 'value' | 'onChange'> & {\n value?: string;\n onChange?: (value?: string) => void;\n /**\n * minDate、maxDate设置格式:YYYY-MM-DD\n */\n disabledDateConfig?: {\n minDate?: string;\n maxDate?: string;\n };\n};\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 getDisabledDate = hooks.useCallbackRef((current) => {\n const currentDate = moment(current.format('YYYY-MM-DD'));\n if (!props.disabledDateConfig) {\n return false;\n }\n const { minDate, maxDate } = props.disabledDateConfig;\n if (minDate && maxDate) {\n if (currentDate.isBefore(minDate) || currentDate.isAfter(maxDate)) {\n return true;\n }\n } else if (minDate) {\n if (currentDate.isAfter(minDate)) {\n return true;\n }\n } else if (maxDate) {\n if (currentDate.isBefore(minDate)) {\n return true;\n }\n }\n return false;\n });\n\n const datePickerValue = useMemo(() => {\n if (value) {\n return moment(flatbizDate.dateNormalize(value));\n }\n return undefined;\n }, [value]);\n\n return (\n <DatePicker\n disabledDate={getDisabledDate}\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, useState, VFC } from 'react';\n\nexport type DateRangePickerWrapperProps = Omit<RangePickerDateProps<moment.Moment>, 'value' | 'onChange'> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n /**\n * 1. minDate、maxDate设置格式:YYYY-MM-DD\n * 2. maxDays 最大可选的天数\n */\n disabledDateConfig?: {\n minDate?: string;\n maxDate?: string;\n maxDays?: number;\n };\n};\n\n/**\n * DatePicker.RangePicker包装组件\n * ```\n * TODO: 引用DatePicker.RangePicker TS有问题,待解决\n * 1. value类型为 [string, string]\n * 2. onChange返回类型 [string, string]\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * 5. 可设置disabledDateConfig,来控制日期项的disbaled状态\n * ```\n */\nexport const DateRangePickerWrapper: VFC<DateRangePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n const [startEndDateList, setStartEndDateList] = useState<Array<moment.Moment | null>>();\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 onCalendarChange = hooks.useCallbackRef((data) => {\n if (props.disabledDateConfig) {\n setStartEndDateList(data);\n }\n });\n\n const getDisabledDate = hooks.useCallbackRef((current) => {\n const currentDate = moment(current.format('YYYY-MM-DD'));\n if (!props.disabledDateConfig) {\n return false;\n }\n const { maxDays, minDate, maxDate } = props.disabledDateConfig;\n if (minDate && maxDate) {\n if (currentDate.isBefore(minDate) || currentDate.isAfter(maxDate)) {\n return true;\n }\n } else if (minDate) {\n if (currentDate.isBefore(minDate)) {\n return true;\n }\n } else if (maxDate) {\n if (currentDate.isAfter(maxDate)) {\n return true;\n }\n }\n\n if (!startEndDateList || !maxDays) {\n return false;\n }\n\n const startDate = startEndDateList[0] ? moment(startEndDateList[0].format('YYYY-MM-DD')) : undefined;\n const endDate = startEndDateList[1] ? moment(startEndDateList[1].format('YYYY-MM-DD')) : undefined;\n\n const selectableMaxDate = startDate ? startDate.clone().add(maxDays - 1, 'd') : endDate;\n // if (maxDate && moment(maxDate).isBefore(selectableMaxDate)) {\n // selectableMaxDate = moment(maxDate);\n // }\n\n const selectableMinDate = endDate ? endDate.clone().subtract(maxDays - 1, 'd') : startDate;\n // if (minDate && moment(minDate).isAfter(selectableMinDate)) {\n // selectableMinDate = moment(minDate);\n // }\n return currentDate.isBefore(selectableMinDate) || currentDate.isAfter(selectableMaxDate);\n });\n\n const [date1, date2] = value || [];\n const rangePickerValue = useMemo(() => {\n if (date1 && date2) {\n const newDate1 = flatbizDate.dateNormalize(date1);\n const newDate2 = flatbizDate.dateNormalize(date2);\n return [moment(newDate1), moment(newDate2)];\n }\n return undefined;\n }, [date1, date2]);\n return (\n <DatePicker.RangePicker\n disabledDate={getDisabledDate}\n onCalendarChange={onCalendarChange}\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={rangePickerValue as [moment.Moment, moment.Moment]}\n onChange={onChangeDate}\n />\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationOldProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { DrawerOperation, DrawerOperationOldProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerFormProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationOldProps;\n} & DrawerProps;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWraper: FC<DrawerFormProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整',\n );\n }, []);\n return (\n <Drawer\n className={classNames('drawer-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wraper-content\">{children}</div>\n {pageLoading && <PageLoader />}\n </Drawer>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWraperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWraperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { DependencyList, EffectCallback, useEffect } from 'react';\n\nexport const useEffectCustom = (fn: EffectCallback, deps: DependencyList) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useEffect(fn, deps);\n};\n","import { DependencyList, useEffect } from 'react';\n\nexport const useEffectCustomAsync = (fn: () => Promise<void>, deps: DependencyList) => {\n useEffect(() => {\n async function asyncFunction() {\n await fn();\n }\n void asyncFunction();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport { DrawerOperation, DrawerOperationProps } from './drawer-operation';\nimport './style.less';\n\ntype DrawerWrapperStaticMethods = {\n Content: typeof DrawerWrapperContent;\n Footer: typeof DrawerWrapperFooter;\n};\n\nexport type DrawerWrapperProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n} & Omit<DrawerProps, 'footer'>;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst DrawerWrapperContent: FC<{ operationProps?: DrawerOperationProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"drawer-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <DrawerWrapperFooter>\n <DrawerOperation {...props.operationProps} />\n </DrawerWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst DrawerWrapperFooter = (props) => {\n return <div className=\"drawer-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWrapper: FC<DrawerWrapperProps> & DrawerWrapperStaticMethods = (props) => {\n const { pageLoading, className, width = 600, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('DrawerWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Drawer\n className={classNames('drawer-wrapper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={null}\n >\n {pageLoading && <PageLoader />}\n {children}\n </Drawer>\n );\n};\n\nDrawerWrapper.Content = DrawerWrapperContent;\nDrawerWrapper.Footer = DrawerWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWrapperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWrapperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wrapper';\n","import { FieldSingleConfig } from './type';\n\nexport const getEditable = (editable: FieldSingleConfig['editable'], tableRowIndex: number) => {\n return typeof editable === 'boolean' ? editable : editable?.({ tableRowIndex });\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { Checkbox, Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableCheckboxGroupConfig, EditableFormItemProps } from '../type';\n\ntype CheckboxGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst CheckboxGroupFormItemContent = (props: CheckboxGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableCheckboxGroupConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n if (editable) return [];\n const value = isArray(props.value) ? props.value : ([] as any[]);\n const options = (editableComptProps.options || []) as LabelValueItem[];\n if (!isArray(options) || options.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = options.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.options, props.value]);\n\n if (editable) {\n return <Checkbox.Group {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-checkbox-group-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const CheckboxGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-checkbox-group-form-item', formItemProps?.className)}\n >\n <CheckboxGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { DatePickerWrapper } from '../../date-picker-wrapper';\nimport { EditableDatePickerWrapperConfig, EditableFormItemProps } from '../type';\n\nexport const DatePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-picker-wraper-form-item', formItemProps?.className)}\n >\n <DatePickerWrapper {...(editableConfig as EditableDatePickerWrapperConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { DateRangePickerWrapper } from '../../date-range-picker-wrapper';\nimport { EditableDateRangePickerWrapperConfig, EditableFormItemProps } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableDateRangePickerWrapperConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return undefined;\n return value.join('~');\n }, [editable, props.value]);\n\n if (editable) {\n return <DateRangePickerWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return <span className=\"editable-date-range-picker-view\">{render ? render(props.value) : viewLabel}</span>;\n};\n\nexport const DateRangePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-range-picker-wraper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableInputConfig } from '../type';\n\nexport const InputFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input {...(editableConfig as EditableInputConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form, InputNumber } from 'antd';\nimport { EditableFormItemProps, EditableInputNumberConfig } from '../type';\n\nexport const InputNumberFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-input-number-form-item', formItemProps?.className)}\n >\n <InputNumber {...(editableConfig as EditableInputNumberConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Radio, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, EditableRadioGroupConfig } from '../type';\n\ntype RadioGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number;\n onChange?: (value: string | number) => void;\n};\n\nconst RadioGroupFormItemContent = (props: RadioGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableRadioGroupConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n if (editable) return [];\n const value = props.value;\n const options = (editableComptProps.options || []) as LabelValueItem<string | number>[];\n if (!isArray(options) || options.length === 0) {\n return value;\n }\n const target = options.find((item) => item.value === value);\n return target?.label || value;\n }, [editable, editableComptProps.options, props.value]);\n\n const onChange = hooks.useCallbackRef((e) => {\n props.onChange?.(e.target.value as string | number);\n });\n\n if (editable) {\n return <Radio.Group {...editableComptProps} value={props.value} onChange={onChange} />;\n }\n return (\n <span className=\"editable-radio-group-view\">\n {render ? render(props.value) : viewLabel ? <Tag color=\"#1890ff\">{viewLabel}</Tag> : null}\n </span>\n );\n};\n\nexport const RadioGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-radio-group-form-item', formItemProps?.className)}\n >\n <RadioGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { LabelValueItem, TPlainObject } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: LabelValueItem[];\n originalSelectorList: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: { selectorList: LabelValueItem[]; originalSelectorList: TPlainObject[] };\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n selectorList: [],\n originalSelectorList: [],\n queryIsEmpty: false,\n requestStatus: 'init',\n};\n\nconst _SelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.selectorList = params.selectorList || [];\n state.originalSelectorList = params.originalSelectorList || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.selectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst selectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = selectorWrapperModel('key值').useStore();\n * ```\n */\nexport const selectorWrapperModel = (key: string) => {\n if (!selectorWrapperModels[key]) {\n selectorWrapperModels[key] = Model(_SelectorWrapperModel);\n }\n return selectorWrapperModels[key];\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { extend } from '@dimjs/utils';\nimport { arrayField2LabelValue, isUndefinedOrNull, LabelValueItem, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport {\n DependencyList,\n forwardRef,\n ReactElement,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModelState, selectorWrapperModel } from './model';\n\ntype SelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type SelectorWrapperProps = Omit<\n SelectProps,\n 'filterOption' | 'onSearch' | 'loading' | 'notFoundContent' | 'options' | 'fieldNames'\n> & {\n // 模型唯一值\n modelKey: string;\n fieldNames?: { label: string; value: string };\n /**\n * useEffect依赖性数组\n */\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorList`后无效果\n */\n serviceConfig?: SelectorServiceConfig;\n /**\n * 同步设置选择器选项列表\n * ```\n * 1. 当设置selectorList后,serviceConfig、operateType=search将失效\n * 2. 不支持异步数据,异步使用serviceConfig方式\n * 3. 如果配置fieldNames,会转换后使用\n * ```\n */\n selectorList?: TPlainObject[];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorListChange?: (dataList: TPlainObject[]) => void;\n /**\n * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项\n * ```\n */\n showAllOption?: true | JSX.Element;\n /**\n * 输入操作类型,默认值:filter\n * ```\n * 1. search:根据输入项去服务端查询\n * 2. filter:初始化已查询数据,根据输入内容筛选\n * 3. 在设置`selectorList`后,operateType=search将失效\n * ```\n */\n operateType?: 'search' | 'filter';\n // 搜索调接口字段名称,默认值:keyword\n searchFieldName?: string;\n // label渲染适配器\n onLabelRenderAdapter?: (dataItem: LabelValueItem) => string | ReactElement;\n};\n\nexport type SelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getSelectorList: () => LabelValueItem<string | number>[];\n};\n/**\n * 选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. modelKey的配置是为了缓存数据;\n * 1.1: 当有effectDependencyList依赖项时,依赖项的发生变化后,每次都会去调用接口获取数据\n * 1.2: 当无effectDependencyList依赖项时,第一次调用接口成功后会有标记,下次访问存在标记,就不在调用接口,使用缓存数据;如果想强制刷新数据,可通过随便配置依赖项完成\n * 2. selectorList属性\n * 2.1 当设置selectorList属性后,serviceConfig、operateType=search将失效\n * 2.2 不支持异步数据,异步使用serviceConfig方式\n * 3. operateType=search状态下,回填数据查询接口时,会在接口中默认添加id字段(id的值为回填的值)\n * ```\n */\nexport const SelectorWrapper = forwardRef<SelectorWrapperRefApi, SelectorWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n showAllOption,\n effectDependencyList,\n onSelectorListChange,\n operateType,\n searchFieldName,\n selectorList,\n modelKey,\n fieldNames,\n ...otherProps\n } = props;\n\n const isSearch = operateType === 'search' && selectorList === undefined;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const changeOperateValueRef = useRef<string | number>();\n const [loading, setLoading] = useState(false);\n const [state, actions] = selectorWrapperModel(modelKey).useStore();\n // const effectDependencyListPrev = usePrevious(props.effectDependencyList);\n // console.log('effectDependencyListPrev', effectDependencyListPrev);\n const requestPreKey = `request-pre-${props.modelKey}`;\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceRespDataAdapter = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(\n async (inputValue?: string, searchId?: string | number) => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`SelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n window[requestPreKey] = true;\n void actions.changeRequestStatus('request-pre');\n if ((!isUndefinedOrNull(inputValue) || !isUndefinedOrNull(searchId)) && isSearch) {\n const keyword = searchFieldName || 'keyword';\n params[keyword] = inputValue;\n params['id'] = searchId;\n }\n const respData = await newServiceConfig.onRequest?.(params);\n const respAdapterData = serviceRespDataAdapter(respData);\n const respDataTranslation = arrayField2LabelValue(respAdapterData || [], fieldNames);\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList({\n selectorList: respDataTranslation,\n originalSelectorList: respAdapterData,\n });\n } catch (error) {\n console.error(error);\n setLoading(false);\n window[requestPreKey] = false;\n void actions.changeRequestStatus('request-error');\n void message.error(error.message || '获取数据异常');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n },\n );\n\n useEffectCustom(() => {\n if (state.originalSelectorList && state.requestStatus === 'request-success') {\n onSelectorListChange?.(state.originalSelectorList);\n }\n }, [state.originalSelectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (selectorList) {\n void actions.setSelectBoxList({\n selectorList: arrayField2LabelValue(selectorList, fieldNames),\n originalSelectorList: selectorList,\n });\n return;\n }\n if (isSearch) return;\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = selectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (isSearch) {\n if (valueIsEmpty(props.value as string | number)) {\n onSelectorListChange?.([]);\n void actions.resetSelectBoxList();\n } else {\n // 判断是否由外部回填value数据\n if (props.value !== changeOperateValueRef.current) {\n void startDataSourceRequest(undefined, props.value as string | number);\n }\n }\n }\n }, newEffectDependencyList.concat([props.value]));\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetSelectBoxList();\n },\n getSelectorList: () => {\n return state.selectorList;\n },\n };\n });\n\n const filterOption = hooks.useCallbackRef((input: string, option) => {\n return (option?.children as unknown as string).toLowerCase().indexOf(input.toLowerCase()) >= 0;\n });\n\n const onSearch = hooks.useDebounceCallback((value: string) => {\n if (value) {\n void startDataSourceRequest(value);\n } else {\n void actions.resetSelectBoxList();\n }\n }, 300);\n\n const onChange = hooks.useCallbackRef((value: string | number, ...otherParams) => {\n changeOperateValueRef.current = value;\n props.onChange?.(value, otherParams);\n });\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const selectOptionsAll = <Select.Option value=\"\">全部</Select.Option>;\n return (\n <Select\n showSearch={true}\n allowClear={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n loading={loading}\n onSearch={isSearch ? onSearch : undefined}\n filterOption={isSearch ? false : filterOption}\n onChange={onChange}\n fieldNames={undefined}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n >\n {showAllOption === true ? selectOptionsAll : showAllOption}\n {state.selectorList.map((item) => {\n return (\n <Select.Option value={item.value} label={item.label} key={item.value}>\n {props.onLabelRenderAdapter ? props.onLabelRenderAdapter(item) : item.label}\n </Select.Option>\n );\n })}\n </Select>\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { arrayField2LabelValue, LabelValueItem, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Tag } from 'antd';\nimport { Fragment, useEffect, useState } from 'react';\nimport { SelectorWrapper } from '../../selector-wrapper';\nimport { EditableFormItemProps, EditableSelectWrapperConfig } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number | Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableSelectWrapperConfig).editableComptProps;\n const [selectorList, setSelectorList] = useState<LabelValueItem[]>([]);\n const [viewLabelList, setviewLabelList] = useState<LabelValueItem[]>([]);\n\n useEffect(() => {\n if (!editable) {\n const value = isArray(props.value) ? props.value : props.value === undefined ? [] : [props.value];\n if (selectorList.length === 0) {\n setviewLabelList(value.map((item) => ({ label: item as string, value: item })));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = selectorList.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: String(item), value: item });\n });\n setviewLabelList(returnList);\n }\n }, [editable, editableComptProps.fieldNames, props.value, selectorList]);\n\n const onSelectorListChange = hooks.useCallbackRef((dataList: TPlainObject[]) => {\n setSelectorList(arrayField2LabelValue(dataList || [], editableComptProps.fieldNames));\n });\n\n if (editable) {\n return (\n <SelectorWrapper\n {...editableComptProps}\n value={props.value}\n onChange={props.onChange}\n onSelectorListChange={onSelectorListChange}\n />\n );\n }\n return (\n <Fragment>\n <div style={{ display: 'none' }}>\n <SelectorWrapper {...editableComptProps} onSelectorListChange={onSelectorListChange} />\n </div>\n <span className=\"editable-selector-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n </Fragment>\n );\n};\n\nexport const SelectorWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-selector-wrapper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { isBoolean, isNumber, isString } from '@dimjs/lang';\nimport { Form, Typography } 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 const viewText = props.fieldConfig?.render?.(props.value) || value;\n return (\n <Typography.Paragraph\n className=\"editable-text-view\"\n ellipsis={isString(viewText) ? { tooltip: viewText } : true}\n >\n {viewText}\n </Typography.Paragraph>\n );\n};\n\nexport const TextFormItem = (props: { name: Array<number | string>; fieldConfig?: FieldSingleConfig }) => {\n return (\n <Form.Item noStyle name={props.name}>\n <FormItemTextContent name={props.name} fieldConfig={props.fieldConfig} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableTextareaConfig } from '../type';\n\nexport const TextAreaFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input.TextArea {...(editableConfig as EditableTextareaConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { classNames, extend } from '@dimjs/utils';\nimport { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile, UploadListType } from 'antd/lib/upload/interface';\nimport { FC, Fragment, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type UploadWrapperFileItem = {\n uid: string;\n name: string;\n url?: string;\n};\n\nexport type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {\n value?: T[];\n onChange?: (value?: T[]) => void;\n onUploadError?: (message?: string) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n uid?: string;\n name?: string;\n url?: string;\n };\n /**\n * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject;\n} & Omit<UploadProps, 'onChange' | 'fileList'>;\n\n/**\n * 文件上传\n * ```\n * 1. 可通过配置children替换默认上传触发布局\n * 2. 接口返回结构:\n * formData上传接口返回值\n * {\n * code: '0000',\n * data: {\n * uid: '唯一值,可使用fileKey值'\n * name: '文件名称'\n * url: '预览地址'\n * }\n * }\n * 3. 如果接口返回的不是上面的字段名称,可通过fieldNames配置接口返回字段名称映射\n *\n * 4. 最佳使用方式,与Form结合使用\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <UploadWrapper action={uploadUrl} />\n * </Form.Item>\n * ```\n *\n */\nexport const UploadWrapper: FC<UploadWrapperProps> = (props) => {\n const { onChange, onUploadError, value, ...otherProps } = props;\n const [uploadList, setUploadList] = useState<UploadWrapperFileItem[]>();\n const fieldNames = extend(\n {\n uid: 'uid',\n name: 'name',\n url: 'url',\n },\n props.fieldNames,\n ) as Required<UploadWrapperFileItem>;\n\n useEffectCustom(() => {\n setUploadList(\n value?.map((item) => {\n return {\n uid: item[fieldNames.uid],\n name: item[fieldNames.name],\n url: item[fieldNames.url],\n };\n }),\n );\n }, [fieldNames.name, fieldNames.uid, fieldNames.url, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n const fileList = info.fileList as TPlainObject[];\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = (\n props.onRequestResultAdapter ? props.onRequestResultAdapter(respData.data) : respData.data\n ) as TPlainObject;\n result[fieldNames.uid] = result[fieldNames.uid] || info.file.uid;\n result[fieldNames.name] = result[fieldNames.name] || info.file.name;\n if (props.maxCount === 1) {\n onChange?.([result]);\n } else {\n onChange?.((value || []).concat(result));\n }\n } else {\n if (onUploadError) {\n onUploadError(respData.message as string);\n } else {\n void message.error((respData.message as string) || '上传操作失败...');\n }\n fileList[fileList.length - 1] = {\n ...fileList[fileList.length - 1],\n status: 'error',\n };\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item[fieldNames.uid];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n if (onUploadError) {\n onUploadError();\n } else {\n void message.error('上传操作失败...');\n }\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadList([...fileList] as UploadWrapperFileItem[]);\n props.onUploadChange?.(info);\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n fileList={uploadList}\n className={classNames('v-upload-wrapper', otherProps.className)}\n >\n {otherProps.disabled ? null : (\n <UploadTrigger listType={otherProps.listType}>{props.children}</UploadTrigger>\n )}\n </Upload>\n );\n};\n\nconst UploadTrigger: FC<{ listType?: UploadListType }> = (props) => {\n if (props.children) return <Fragment>{props.children}</Fragment>;\n if (props.listType === 'picture-card') {\n return (\n <div>\n <PlusOutlined />\n <div style={{ marginTop: 8 }}>上传图片</div>\n </div>\n );\n }\n if (props.listType === 'picture') {\n return (\n <Button type=\"primary\" ghost>\n 选择图片上传\n </Button>\n );\n }\n return (\n <Button type=\"primary\" ghost>\n 选择文件上传\n </Button>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { UploadWrapper } from '../../upload-wrapper';\nimport { EditableFileUploadConfig, EditableFormItemProps } from '../type';\n\nconst UploadWrapperFormItemContent = (\n props: EditableFormItemProps & { value?: any; onChange?: (value?: any) => void },\n) => {\n const { editableConfig, render, editable } = props.fieldConfig;\n const { children, ...otherProps } = (editableConfig as EditableFileUploadConfig).editableComptProps;\n if (editable) {\n return (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} onChange={props.onChange}>\n {children}\n </UploadWrapper>\n );\n }\n return (\n <div className=\"upload-wrapper-selector-view\">\n {render ? (\n render(props.value)\n ) : (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} disabled={true} />\n )}\n </div>\n );\n};\n\nexport const UploadWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-upload-wrapper-form-item', formItemProps?.className)}\n >\n <UploadWrapperFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { extend } from '@dimjs/utils';\nimport { FieldSingleConfig } from '../type';\nimport { getEditable } from '../utils';\nimport { CheckboxGroupFormItem } from './checkbox-group';\nimport { DatePickerWrapperFormItem } from './date-picker-wrapper';\nimport { DateRangePickerWrapperFormItem } from './date-range-picker-wrapper';\nimport { InputFormItem } from './input';\nimport { InputNumberFormItem } from './input-number';\nimport { RadioGroupFormItem } from './radio-group';\nimport { SelectorWrapperFormItem } from './selector-wrapper';\nimport { TextFormItem } from './text';\nimport { TextAreaFormItem } from './textarea';\nimport { UploadWrapperFormItem } from './upload-wrapper';\n\nexport type FormItemAdapterProps = {\n name: Array<number | string>;\n completeName: Array<number | string>;\n fieldConfig: FieldSingleConfig;\n tableRowIndex: number;\n};\n\nexport const FormItemAdapter = (props: FormItemAdapterProps) => {\n const { editableConfig, editable } = props.fieldConfig;\n const newEditable = getEditable(editable, props.tableRowIndex);\n const fieldConfig = extend({}, props.fieldConfig, { editable: newEditable });\n\n const commomProps = {\n name: props.name,\n fieldConfig,\n };\n\n if (editableConfig?.type === 'input' && newEditable) {\n return <InputFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'inputNumber' && newEditable) {\n return <InputNumberFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'textArea' && newEditable) {\n return <TextAreaFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'datePickerWrapper' && newEditable) {\n return <DatePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'dateRangePickerWrapper') {\n return <DateRangePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'selectorWrapper') {\n return <SelectorWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'checkboxGroup') {\n return <CheckboxGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'radioGroup') {\n return <RadioGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'uploadWrapper') {\n return <UploadWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'custom') {\n return editableConfig.editableComptProps({\n name: props.name,\n editable: newEditable,\n completeName: props.completeName,\n });\n }\n return <TextFormItem {...commomProps} />;\n};\n","import { DeleteOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { Button, Form, Space } from 'antd';\nimport { FormItemAdapter } from '../form-item';\nimport { FormListConfig } from '../type';\nimport { getEditable } from '../utils';\n\nexport type FormListProps = {\n name: Array<number | string>;\n formListConfig: FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormList = (props: FormListProps) => {\n const from = Form.useFormInstance();\n const {\n onFormListBeforeRender,\n editableConfigList,\n onFormListAfterRender,\n onFormListItemBeforeRender,\n onFormListItemAfterRender,\n deleteOperateRender,\n } = props.formListConfig;\n return (\n <Form.List name={props.name}>\n {(fields, { add, remove }) => (\n <>\n {onFormListBeforeRender\n ? onFormListBeforeRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n {fields.map((fieldChild, index) => {\n const hasEditable = editableConfigList.find((item) =>\n getEditable(item.editable, props.tableRowIndex),\n );\n const className = classNames(\n 'editable-inner-formlist-item',\n `editable-inner-formlist-item-${props.name[1]}`,\n { 'editable-inner-formlist-item_preview': !hasEditable },\n );\n return (\n <div key={index} className={className}>\n {onFormListItemBeforeRender\n ? onFormListItemBeforeRender({\n add,\n remove: () => {\n remove(index);\n },\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n <Space>\n {editableConfigList.map((fieldItem, index) => {\n return (\n <FormItemAdapter\n name={[fieldChild.name, fieldItem.fieldName]}\n fieldConfig={fieldItem}\n key={index}\n tableRowIndex={props.tableRowIndex}\n completeName={[...props.completeName, fieldChild.name]}\n />\n );\n })}\n {hasEditable ? (\n <DeleteFormListItem\n deleteOperateRender={deleteOperateRender}\n remove={() => {\n remove(index);\n }}\n index={index}\n />\n ) : null}\n </Space>\n {onFormListItemAfterRender\n ? onFormListItemAfterRender({\n add,\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n remove: () => {\n remove(index);\n },\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n </div>\n );\n })}\n {onFormListAfterRender\n ? onFormListAfterRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n </>\n )}\n </Form.List>\n );\n};\n\nconst DeleteFormListItem = (props: {\n deleteOperateRender: FormListConfig['deleteOperateRender'];\n remove: () => void;\n index: number;\n}) => {\n return (\n <Form.Item>\n {props.deleteOperateRender ? (\n props.deleteOperateRender({ remove: props.remove, formListItemIndex: props.index })\n ) : (\n <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={props.remove}>\n 删除\n </Button>\n )}\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { FormItemAdapter } from '../form-item';\nimport { TextFormItem } from '../form-item/text';\nimport { FieldSingleConfig, FormListConfig } from '../type';\nimport { FormList } from './form-list';\n\nexport type FormListItemProps = {\n name: Array<number | string>;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormListItem = (props: FormListItemProps) => {\n if (props.fieldConfig) {\n if (isArray(props.fieldConfig['editableConfigList'])) {\n const formListConfig = props.fieldConfig as FormListConfig;\n return (\n <FormList\n name={props.name}\n completeName={props.completeName}\n formListConfig={formListConfig}\n tableRowIndex={props.tableRowIndex}\n />\n );\n } else {\n return (\n <FormItemAdapter\n name={props.name}\n fieldConfig={props.fieldConfig as FieldSingleConfig}\n tableRowIndex={props.tableRowIndex}\n completeName={props.completeName}\n />\n );\n }\n }\n return <TextFormItem name={props.name} />;\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { Button, Form, Table, TableProps } from 'antd';\nimport { FormListOperation, FormListProps } from 'antd/lib/form/FormList';\nimport { ColumnsType } from 'antd/lib/table';\nimport { Fragment, ReactElement, useMemo } from 'react';\nimport { FormListItem } from './form-list-item';\nimport './style.less';\nimport { EditableTableRecordType, FieldSingleConfig, FormListConfig } from './type';\n\n// export type EditableTableDataSourceItem = FormListFieldData & { operation: FormListOperation };\n\n/**\n * antd 默认render功能此处不能使用\n */\nexport type EditableTableColumn = Omit<ColumnsType['0'], 'render'> & {\n dataIndex?: string;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n /**\n * 渲染中间件,如果renderMiddleware返回值为ReactElement格式,则会终止后续逻辑,fieldConfig配置将失效\n * ```\n * 1. tableRowIndex: 当前row的索引值\n * 2. name: 当前table单元格的form.item的name值\n * 3. operation Form.List的操作函数\n * ```\n */\n renderMiddleware?: (item: {\n tableRowIndex: number;\n name: string | number | Array<string | number>;\n operation: FormListOperation;\n }) => ReactElement | null;\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, renderMiddleware, ...otherColumnItem } = columnItem;\n return {\n onCell: () => {\n return {\n valign: props.tableProps?.cellVerticalAlign || 'middle',\n };\n },\n ...otherColumnItem,\n render: (_value, record) => {\n const completeName = columnItem.dataIndex\n ? [...props.name, record.name, columnItem.dataIndex]\n : [...props.name, record.name];\n const customRender = renderMiddleware?.({\n name: completeName,\n tableRowIndex: record.name,\n operation: record.operation,\n });\n if (customRender) {\n return customRender;\n }\n return (\n <FormListItem\n name={columnItem.dataIndex ? [record.name, columnItem.dataIndex] : [record.name]}\n completeName={completeName}\n fieldConfig={fieldConfig}\n tableRowIndex={record.name}\n />\n );\n },\n };\n }) as ColumnsType<EditableTableRecordType>;\n }, [props.columns, props.name, props.tableProps?.cellVerticalAlign]);\n\n return (\n <div className=\"editable-table\">\n <Form.List name={props.name} rules={props.rules}>\n {(fields, formListOperation) => {\n return (\n <Fragment>\n {props.onTableBeforeRender ? props.onTableBeforeRender(formListOperation, fields.length) : null}\n <Table\n scroll={{ x: 'max-content' }}\n pagination={false}\n {...props.tableProps}\n dataSource={fields.map((item) => ({ ...item, operation: formListOperation }))}\n columns={columns}\n rowKey=\"key\"\n />\n {props.onTableAfterRender ? (\n props.onTableAfterRender(formListOperation, fields.length)\n ) : (\n <Button\n type=\"dashed\"\n onClick={() => formListOperation.add()}\n block\n icon={<PlusOutlined />}\n style={{ marginTop: 15 }}\n >\n 新增\n </Button>\n )}\n </Fragment>\n );\n }}\n </Form.List>\n </div>\n );\n};\n","import { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { FC, useState } from 'react';\n\nexport type FileImportProps = {\n onImportFinish: (data?: any) => void;\n} & Omit<\n UploadProps,\n | 'fileList'\n | 'showUploadList'\n | 'itemRender'\n | 'listType'\n | 'multiple'\n | 'previewFile'\n | 'progress'\n | 'onChange'\n | 'onDownload'\n | 'onRemove'\n | 'onPreview'\n | 'directory'\n | 'customRequest'\n | 'defaultFileList'\n | 'iconRender'\n>;\n\n/**\n * 文件导入\n * ```\n * 默认值:\n * name: 'file',\n * accept: '.xlsx,.xls',\n * ```\n */\nexport const FileImport: FC<FileImportProps> = (props) => {\n const { onImportFinish, ...otherProps } = props;\n\n const [loading, setLoading] = useState(false);\n\n const onChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'uploading') {\n setLoading(true);\n } else if (info.file.status === 'done') {\n setLoading(false);\n const respData = info.file.response;\n if (respData.code === '0000') {\n onImportFinish(respData.data);\n } else {\n void message.error((respData.message as string) || '文件导入异常...');\n }\n }\n });\n\n return (\n <Upload showUploadList={false} maxCount={1} {...otherProps} onChange={onChange}>\n {props.children ? (\n props.children\n ) : (\n <Button type=\"primary\" ghost loading={loading}>\n 选择文件\n </Button>\n )}\n </Upload>\n );\n};\n\nFileImport.defaultProps = {\n name: 'file',\n accept: '.xlsx,.xls',\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames, extend } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile } from 'antd/lib/upload/interface';\nimport { FC, useEffect, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type FileUploadItem = {\n fileKey: string;\n fileName: string;\n};\n\ntype AntdFileUploadItem = {\n uid: string;\n name: string;\n fileKey: string;\n};\n\nexport type FileUploadProps = {\n onChange?: (value?: FileUploadItem[]) => void;\n onUploadError?: (message?: string) => void;\n value?: FileUploadItem[];\n onPreview?: (item: FileUploadItem) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n fileKey?: string;\n fileName?: string;\n };\n} & Omit<UploadProps, 'onChange' | 'fileList' | 'onPreview'>;\n\n/**\n * 文件上传,结合Form使用最佳\n * ```\n * 接口返回结构:\n * formData上传接口必须返回fileKey值\n * {\n * code: '0000',\n * data: {\n * fileKey: '预览文件对应的fileKey'\n * }\n * }\n * 可通过fieldNames配置接口返回值属性名称映射\n * ```\n * ```\n * 最佳使用方式:\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <FileUpload action={uploadUrl} onPreview={onPreviewFile}>\n * <Button type=\"primary\">选择文件导入</Button>\n * </FileUpload>\n * </Form.Item>\n * ```\n *\n */\nexport const FileUpload: FC<FileUploadProps> = (props) => {\n useEffectCustom(() => {\n console.error('@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换');\n }, []);\n\n const { onChange, onUploadError, onPreview, value, ...otherProps } = props;\n const [uploadValue, setUploadValue] = useState<AntdFileUploadItem[]>([]);\n const fieldNames = extend(\n {\n fileKey: 'fileKey',\n fileName: 'fileName',\n },\n props.fieldNames,\n ) as FileUploadItem;\n\n useEffect(() => {\n if (value && isArray(value)) {\n setUploadValue(\n value.map((item) => {\n return {\n uid: item['uid'] || item[fieldNames.fileKey],\n name: item[fieldNames.fileName],\n fileKey: item[fieldNames.fileKey],\n url: item[fieldNames.fileKey],\n thumbUrl: item[fieldNames.fileKey],\n };\n }),\n );\n }\n }, [fieldNames.fileKey, fieldNames.fileName, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = respData.data || {};\n const uploadItem = {\n uid: info.file.uid,\n fileName: result[fieldNames.fileName] || (info.file.name as string),\n fileKey: result[fieldNames.fileKey],\n } as FileUploadItem;\n const respValue = (value || []).concat(uploadItem);\n onChange?.(respValue as unknown as FileUploadItem[]);\n } else {\n onUploadError?.(respData.message as string);\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item['uid'] || item[fieldNames.fileKey];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n onUploadError?.();\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadValue([...info.fileList]);\n props.onUploadChange?.(info);\n });\n\n const onUploadPreview = hooks.useCallbackRef((file) => {\n onPreview?.({\n fileKey: file[fieldNames.fileKey],\n fileName: file[fieldNames.fileName],\n });\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n onPreview={onUploadPreview}\n fileList={uploadValue}\n className={classNames('v-file-upload', otherProps.className)}\n >\n {props.children}\n </Upload>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { isUndefinedOrNull } from '@flatbiz/utils';\nimport { cloneElement, CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type FlexLayoutProps = {\n className?: string;\n fullIndex?: number | number[];\n direction?: 'vertical' | 'horizontal';\n onClick?: () => void;\n style?: CSSProperties;\n gap?: number;\n};\n/**\n * flex布局\n * 1. direction:默认值vertical\n * 2. gap间隙距离\n * 3. fullIndex:指定children数组索引值对象flex=1\n * 4. children添加key熟悉\n * @param props\n * @returns\n */\nexport const FlexLayout: FC<FlexLayoutProps> = (props) => {\n const childrens = (isArray(props.children) ? props.children : [props.children]) as JSX.Element[];\n const direction = props.direction || 'vertical';\n const gap = props.gap ? props.gap : 0;\n const fullIndexList = !isUndefinedOrNull(props.fullIndex)\n ? isArray(props.fullIndex)\n ? props.fullIndex\n : [props.fullIndex as number]\n : [];\n return (\n <div\n className={classNames('v-flex-layout', `v-flex-${direction}`, props.className)}\n style={props.style}\n onClick={props.onClick}\n >\n {childrens.map((children, index) => {\n const childrenStyle = children.props.style || {};\n const style = fullIndexList.includes(index) ? { flex: 1, ...childrenStyle } : childrenStyle;\n if (index < childrens.length - 1 && gap > 0) {\n if (direction === 'horizontal') {\n style.marginRight = gap;\n } else {\n style.marginBottom = gap;\n }\n }\n return cloneElement(children, { style, key: index });\n })}\n </div>\n );\n};\n","import { CSSProperties, VFC } from 'react';\n\nexport type GapProps = {\n height?: number;\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * 间隙组件\n * @param props\n * @returns\n */\nexport const Gap: VFC<GapProps> = (props) => {\n return <div style={{ height: props.height, ...props.style }} className={props.className} />;\n};\n","import { classNames } from '@dimjs/utils';\nimport { Tooltip } from 'antd';\nimport { CSSProperties, VFC } from 'react';\nimport './style.less';\n\nexport type IconWrapperProps = {\n hoverTips?: string;\n icon?: React.ReactNode;\n style?: CSSProperties;\n text?: string | React.ReactElement;\n className?: string;\n size?: 'small' | 'middle' | 'large';\n};\nexport const IconWrapper: VFC<IconWrapperProps> = (props) => {\n return (\n <Tooltip title={props.hoverTips}>\n <div\n className={classNames('icon-wrapper', `icon-wrapper-${props.size || 'middle'}`, props.className)}\n style={props.style}\n >\n {props.icon}\n {props.text ? <span className=\"icon-wrapper-text\">{props.text}</span> : null}\n </div>\n </Tooltip>\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { ModalOperation, ModalOperationProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalFormProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationProps;\n footer?: null | React.ReactNode;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWraper: FC<ModalFormProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\n\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整',\n );\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n <div className=\"modal-wraper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wraper-content-footer\">\n {footer ? footer : <ModalOperation {...operationProps} />}\n </div>\n )}\n </Modal>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n/**\n * 组件单词写错,请输入\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWraperModel('key值').useStore();\n * ```\n */\nexport const createModalWraperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationOldProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModalOperation, ModalOperationOldProps } from './modal-operation';\nimport './style.less';\n\ntype ModalWrapperStaticMethods = {\n Content: typeof ModalWrapperContent;\n Footer: typeof ModalWrapperFooter;\n};\n\nexport type ModalWrapperProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst ModalWrapperContent: FC<{ operationProps?: ModalOperationOldProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"modal-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <ModalWrapperFooter>\n <ModalOperation {...props.operationProps} />\n </ModalWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst ModalWrapperFooter = (props) => {\n return <div className=\"modal-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWrapper: FC<ModalWrapperProps> & ModalWrapperStaticMethods = (props) => {\n const { pageLoading, className, width, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('ModalWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wrapper', className)}\n keyboard={false}\n forceRender={true}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n {children}\n {pageLoading && <PageLoader />}\n </Modal>\n );\n};\n\nModalWrapper.Content = ModalWrapperContent;\nModalWrapper.Footer = ModalWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWrapperModel('key值').useStore();\n * ```\n */\nexport const createModalWrapperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wrapper';\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type PageFixedFooterProps = {\n className?: string;\n style?: CSSProperties;\n};\n\nexport const PageFixedFooter: FC<PageFixedFooterProps> = (props) => {\n return (\n <div className={classNames('page-fixed-footer', props.className)} style={props.style}>\n {props.children}\n </div>\n );\n};\n","export const Page404 = () => {\n return <div className=\"v-404\">404</div>;\n};\n","import './style.less';\n/**\n * 使用在Form组件上,预定义form-item label宽度\n */\nexport const formClassName = {\n label_width_70: 'form-label-70',\n label_width_80: 'form-label-80',\n label_width_90: 'form-label-90',\n label_width_100: 'form-label-100',\n label_width_110: 'form-label-110',\n label_width_120: 'form-label-120',\n label_width_130: 'form-label-130',\n label_width_auto: 'form-label-auto',\n};\n\n/**\n * 使用在Form.Item组件上,预定义form-item label宽度\n */\nexport const formItemClassName = {\n label_width_70: 'form-item-label-70',\n label_width_80: 'form-item-label-80',\n label_width_90: 'form-item-label-90',\n label_width_100: 'form-item-label-100',\n label_width_110: 'form-item-label-110',\n label_width_120: 'form-item-label-120',\n label_width_130: 'form-item-label-130',\n label_width_auto: 'form-item-label-auto',\n};\n","import { formClassName, formItemClassName } from './form';\n\n/**\n * 预定义className\n * ```\n * form: 使用在Form组件上,设置form-item label宽度\n * formItem: 使用在Form.Item组件上,设置form-item label宽度\n * ```\n */\nexport const preDefinedClassName = {\n form: formClassName,\n formItem: formItemClassName,\n};\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC, ReactElement } from 'react';\nimport './style.less';\n\nexport type SimpleLayoutProps = {\n className?: string;\n style?: CSSProperties;\n title?: string | ReactElement;\n desc?: string | ReactElement;\n formLabelAlign?: 'left' | 'right';\n layoutType?: 'layer' | 'tight';\n titleLeftLine?: boolean;\n};\n\n/**\n * 简单布局\n * @param props\n * @returns\n * ```\n * 1. layoutType 布局类型\n * layer:分层布局\n * tight:紧凑布局\n * ```\n */\nexport const SimpleLayout: FC<SimpleLayoutProps> = (props) => {\n const labelAlign = props.formLabelAlign || 'right';\n const className = classNames(\n 'simple-layout',\n {\n 'simple-layout-tight': props.layoutType === 'tight',\n 'simple-layout-formlabel-left': labelAlign === 'left',\n },\n props.className,\n );\n\n const titleClassName = classNames('simple-layout-title', {\n 'simple-layout-title-sign': props.titleLeftLine,\n });\n\n return (\n <div className={className} style={props.style}>\n {props.title ? <div className={titleClassName}>{props.title}</div> : null}\n {props.desc ? <div className=\"simple-layout-desc\">{props.desc}</div> : null}\n {props.children ? <div className=\"simple-layout-content\">{props.children}</div> : null}\n </div>\n );\n};\n\nSimpleLayout.defaultProps = {\n titleLeftLine: true,\n layoutType: 'layer',\n};\n","import { classNames } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { FC, useEffect, useMemo, useState } from 'react';\n\nexport interface SmsCountDownProps {\n onSendRequest: () => Promise<void>; // 验证码请求函数\n totalTicks?: number; // 总倒计时,默认:60(s)\n duration?: number; // 倒计时间隔,默认:1000ms(1s)\n autoStart?: boolean; // 是否自动开始倒计时,默认:fasle,注意:不会自动调用 onSendRequest\n format?: string; // 倒计时格式化,默认:'{t}s'\n sendTxt?: string; // 文案,默认:'获取验证码'\n sentTxt?: string; // 倒计时完成文案,默认:'重新获取'\n processingTxt?: string; // 倒计时中文案,默认:'发送中...'\n onTick?: (time: number) => void; // 倒计时回调\n className?: string;\n}\nexport const SmsCountDown: FC<SmsCountDownProps> = (props) => {\n const [showMessage, setShowMessage] = useState<string>();\n\n const [running, setRunning] = useState(false);\n const [starting, setStarting] = useState(false);\n\n // 初始化设置有效\n const initConfig = useMemo<Omit<SmsCountDownProps, 'onSendRequest' | 'onTick' | 'className'>>(() => {\n return {\n sendTxt: props.sendTxt,\n sentTxt: props.sentTxt,\n processingTxt: props.processingTxt,\n format: props.format,\n autoStart: props.autoStart,\n totalTicks: props.totalTicks,\n duration: props.duration,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const format = initConfig.format as string;\n const totalTicks = initConfig.totalTicks as number;\n const duration = initConfig.duration as number;\n\n const countdownFnc = hooks.useCountdownCallback(\n (num) => {\n const second = num / 1000;\n if (num > 0) {\n if (!running) {\n setRunning(true);\n }\n setShowMessage(format.replace('{t}', String(second)));\n props.onTick?.(second);\n } else if (num === 0) {\n setRunning(false);\n setStarting(false);\n props.onTick?.(second);\n setShowMessage(initConfig.sentTxt);\n }\n },\n totalTicks * 1000,\n { intervalTime: duration },\n );\n\n useEffect(() => {\n if (!initConfig.autoStart) {\n setShowMessage(initConfig.sendTxt);\n } else {\n countdownFnc();\n setStarting(true);\n setRunning(true);\n }\n }, [countdownFnc, initConfig]);\n\n const onStart = hooks.useCallbackRef(() => {\n if (running || starting) return;\n setStarting(true);\n setShowMessage(initConfig.processingTxt);\n void props\n .onSendRequest()\n .then(() => {\n setRunning(true);\n countdownFnc();\n })\n .catch(() => {\n setShowMessage(initConfig.sendTxt);\n setStarting(false);\n });\n });\n\n const className = classNames('v-count-down', props.className, {\n running,\n starting,\n });\n\n return (\n <div className={className} onClick={onStart}>\n {showMessage}\n </div>\n );\n};\n\nSmsCountDown.defaultProps = {\n totalTicks: 60,\n duration: 1000,\n autoStart: false,\n format: '{t}s',\n sendTxt: '获取验证码',\n sentTxt: '重新获取',\n processingTxt: '发送中...',\n};\n","import { classNames } from '@dimjs/utils';\nimport { Children, cloneElement, FC } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\ntype StaticMethods = {\n Condition: typeof Condition;\n Operate: typeof Operate;\n Table: typeof Table;\n Footer: typeof Footer;\n};\n\nconst overdueConsole = () => {\n console.error('@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代');\n};\n\nexport type TableFilterLayoutProps = {\n className?: string;\n isFixed?: boolean;\n fullIndex?: number;\n};\n\nexport const TableFilterLayout: FC<TableFilterLayoutProps> & StaticMethods = (props) => {\n useEffectCustom(() => {\n overdueConsole();\n }, []);\n\n return (\n <div\n className={classNames(\n 'table-filter-layout',\n { 'table-filter-layout-flex': props.isFixed },\n props.className,\n )}\n >\n {Children.map(props.children, (item, index) => {\n if (props.isFixed && index === props.fullIndex) {\n return cloneElement(item as JSX.Element, { className: 'table-filter-layout-flex-full' });\n }\n return item;\n })}\n </div>\n );\n};\n\nconst Condition: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-condition', props.className)}>{props.children}</div>;\n};\n\nconst Operate: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-operate', props.className)}>{props.children}</div>;\n};\n\nconst Table: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-table', props.className)}>{props.children}</div>;\n};\nconst Footer: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-footer', props.className)}>{props.children}</div>;\n};\n\nTableFilterLayout.Condition = Condition;\nTableFilterLayout.Operate = Operate;\nTableFilterLayout.Table = Table;\nTableFilterLayout.Footer = Footer;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport type ModelState = {\n treeSelectorList: TSetDefaultDefined<TreeSelectProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['treeSelectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeSelectorList: [],\n queryIsEmpty: false,\n};\n\nconst TreeSelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.treeSelectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.treeSelectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeSelectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeSelectorWrapperModel('key值').useStore();\n * ```\n */\nexport const treeSelectorWrapperModel = (key: string) => {\n if (!treeSelectorWrapperModels[key]) {\n treeSelectorWrapperModels[key] = Model(TreeSelectorWrapperModel);\n }\n return treeSelectorWrapperModels[key];\n};\n","import { isArray } from '@dimjs/lang';\nimport { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: TreeSelectProps['fieldNames'],\n) => {\n if (!isArray(treeList) || treeList.length === 0) return [];\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { isArray, isObject } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\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 { useEffectCustom } from '../hooks/use-effect-custom';\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 * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项,例如:{ label: '全部', value: 'all' }\n * 3. 自定义字段会通过fieldNames转换后使用\n * 4. 多选操作时,最好不要设置全部选项\n * ```\n */\n showAllOption?: true | TPlainObject<string | number>;\n};\n\nexport type TreeSelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeSelectorList: () => TreeSelectProps['treeData'];\n};\n\n/**\n * 树选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置treeSelectorList属性后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n */\nexport const TreeSelectorWrapper = forwardRef<TreeSelectorWrapperRefApi, TreeSelectorWrapperProps>(\n (props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n onTreeSelectorListChange,\n treeSelectorList,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [loading, setLoading] = useState(false);\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeSelectorWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeSelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n window[requestPreKey] = true;\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeSelectProps['treeData'];\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList(respData || []);\n } catch (error) {\n setLoading(false);\n window[requestPreKey] = false;\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (state.treeSelectorList && state.requestStatus === 'request-success') {\n onTreeSelectorListChange?.(state.treeSelectorList);\n }\n }, [state.treeSelectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (treeSelectorList) {\n void actions.setSelectBoxList(treeSelectorList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeSelectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffect(() => {\n if (!isUndefinedOrNull(props.value)) {\n const valueList = isArray(props.value) ? props.value : [props.value];\n if (valueList.length > 0 && state.treeSelectorList.length > 0) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(\n tempValue as string | number,\n state.treeSelectorList,\n props.fieldNames,\n );\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }\n }, [state.treeSelectorList, props.fieldNames, props.value]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.setSelectBoxList([]);\n },\n getTreeSelectorList: () => {\n return state.treeSelectorList;\n },\n };\n });\n\n const onTreeExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const treeData = useMemo(() => {\n if (state.treeSelectorList.length === 0) return undefined;\n const fieldNames = { label: 'label', value: 'value', ...props.fieldNames };\n if (props.showAllOption === true) {\n const selectOptionsAll = {\n [`${fieldNames.label}`]: '全部',\n [`${fieldNames.value}`]: '',\n } as unknown as ModelState['treeSelectorList'][0];\n return [selectOptionsAll, ...state.treeSelectorList];\n } else if (isObject(props.showAllOption)) {\n return [\n props.showAllOption as unknown as ModelState['treeSelectorList'][0],\n ...state.treeSelectorList,\n ];\n }\n return state.treeSelectorList;\n }, [props.fieldNames, props.showAllOption, state.treeSelectorList]);\n\n return (\n <TreeSelect\n dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}\n showSearch={true}\n treeLine={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n treeExpandedKeys={treeExpandedKeys}\n treeData={treeData}\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 { 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 { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModelState, treeWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\n\ntype TreeServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeWrapperProps = Omit<\n TreeProps,\n | 'expandedKeys'\n | 'treeData'\n | 'onExpand'\n | 'selectedKeys'\n | 'checkedKeys'\n | 'onCheck'\n | 'onSelect'\n | 'defaultCheckedKeys'\n | 'defaultSelectedKeys'\n | 'fieldNames'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorTreeList`后无效果\n */\n serviceConfig?: TreeServiceConfig;\n /**\n * 当设置selectorTreeList后,serviceConfig将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n selectorTreeList?: TreeProps['treeData'];\n value?: string | number | Array<string | number>;\n onChange?: (selectedKey: string | number | Array<string | number>) => void;\n fieldNames?: { label?: string; value?: string; children?: string };\n /**\n * 打开tree折叠过滤关键字\n */\n filterLabel?: string;\n};\n\nexport type TreeWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeDataList: () => TreeProps['treeData'];\n};\n\n/**\n * 树包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置selectorTreeList属性后,serviceConfig将失效\n * ```\n */\nexport const TreeWrapper = forwardRef<TreeWrapperRefApi, TreeWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n selectorTreeList,\n value,\n onChange,\n fieldNames,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeWrapperModel(modelKey).useStore();\n const [loading, setLoading] = useState(false);\n\n const valueList = useMemo(() => {\n if (isUndefinedOrNull(props.value)) return undefined;\n return (isArray(props.value) ? props.value : [props.value]) as Array<string | number>;\n }, [props.value]);\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeProps['treeData'];\n void actions.setTreeList(respData || []);\n setLoading(false);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (selectorTreeList) {\n void actions.setTreeList(selectorTreeList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (valueList && valueList.length > 0 && state.treeList.length > 0 && !treeExpandedKeys) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(tempValue, state.treeList, props.fieldNames);\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }, [state.treeList, props.fieldNames, value]);\n\n hooks.useUpdateEffect(() => {\n if (props.filterLabel) {\n const tiledArray = treeToTiledArray(state.treeList || [], props.fieldNames);\n const targetList = tiledArray.filter((item) => item.label?.includes(props.filterLabel || ''));\n let expandedKeys = [] as Array<string | number>;\n targetList.map((tempItem) => {\n const targetValues = getExpandedKeys(\n tempItem.value as string,\n state.treeList || [],\n props.fieldNames,\n );\n const valueList = targetValues.map((item) => item.value);\n expandedKeys = expandedKeys.concat(valueList);\n });\n setTreeExpandedKeys(Array.from(new Set(expandedKeys)));\n } else {\n setTreeExpandedKeys([]);\n }\n }, [props.filterLabel]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetTreeList();\n },\n getTreeDataList: () => {\n return state.treeList;\n },\n };\n });\n\n const onExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n const onCheck = hooks.useCallbackRef((checkedKeys) => {\n onChange?.(checkedKeys as Array<string | number>);\n });\n const onSelect = hooks.useCallbackRef((checkedKeys) => {\n if (props.multiple) {\n onChange?.(checkedKeys as Array<string | number>);\n } else {\n onChange?.(checkedKeys[0] as string | number);\n }\n });\n\n const treeFieldNames = useMemo(() => {\n const newFieldNames = extend({ label: 'label', value: 'value', children: 'children' }, fieldNames);\n return { title: newFieldNames.label, key: newFieldNames.value, children: newFieldNames.children };\n }, [fieldNames]);\n\n if (state.treeList.length > 0) {\n return (\n <Tree\n showLine={otherProps.checkable ? false : { showLeafIcon: false }}\n {...otherProps}\n fieldNames={treeFieldNames}\n expandedKeys={treeExpandedKeys}\n treeData={state.treeList}\n onExpand={onExpand}\n selectedKeys={otherProps.checkable ? undefined : valueList}\n checkedKeys={otherProps.checkable ? valueList : undefined}\n onCheck={otherProps.checkable ? onCheck : undefined}\n onSelect={otherProps.checkable ? undefined : onSelect}\n style={{ width: '100%', ...otherProps.style }}\n />\n );\n }\n\n return (\n <NotFoundContent\n requestStatus={state.requestStatus}\n loading={loading}\n onAgainRequest={startDataSourceRequest}\n />\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n loading: boolean;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <div className=\"tree-wrapper-empty\">\n <Spin spinning={props.loading}></Spin>\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={description}>\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n </div>\n );\n};\n"],"names":["styles","noop","getPermissionList","_getGlobalData","getGlobalData","elemAclLimits","permissionList","_isArray","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","createElement","key","defaultProps","DatePickerWrapper","value","onChange","format","useMemo","showTime","onChangeDate","_hooks","useCallbackRef","moment","getDisabledDate","current","currentDate","disabledDateConfig","minDate","maxDate","isBefore","isAfter","datePickerValue","flatbizDate","dateNormalize","DatePicker","disabledDate","width","DateRangePickerWrapper","_useState","useState","startEndDateList","setStartEndDateList","values","value1","_ref","value2","onCalendarChange","data","maxDays","startDate","endDate","selectableMaxDate","clone","add","selectableMinDate","subtract","date1","_ref2","date2","rangePickerValue","newDate1","newDate2","RangePicker","DrawerModel","actions","openDrawerForm","itemData","operateType","pageLoading","state","visible","closeDrawer","setDrawerItemData","params","DrawerOperation","_jsxs","cancelButtonProps","onCancel","hideOkBtn","icon","_SaveOutlined","okButtonProps","onOk","loading","PageLoader","jsxs","jsx","DrawerWraper","_props$width","footer","operationProps","useEffect","console","error","Drawer","_classNames","keyboard","forceRender","destroyOnClose","contentWrapperStyle","maxWidth","drawerModels","createDrawerWraperModel","Model","useEffectCustom","fn","deps","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","DrawerWrapperContent","DrawerWrapperFooter","DrawerWrapper","Error","Content","Footer","createDrawerWrapperModel","getEditable","editable","tableRowIndex","CheckboxGroupFormItemContent","fieldConfig","editableConfig","render","editableComptProps","viewLabelList","options","length","label","returnList","forEach","target","find","temp","push","Checkbox","Group","tag","Tag","CheckboxGroupFormItem","formItemProps","Form","Item","DatePickerWrapperFormItem","FormItemContent","viewLabel","join","DateRangePickerWrapperFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","defaultState","selectorList","originalSelectorList","queryIsEmpty","requestStatus","_SelectorWrapperModel","setSelectBoxList","resetSelectBoxList","changeRequestStatus","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","forwardRef","ref","serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","modelKey","fieldNames","isSearch","newServiceConfig","newEffectDependencyList","changeOperateValueRef","useRef","setLoading","_selectorWrapperModel","useStore","requestPreKey","valueIsEmpty","isUndefinedOrNull","serviceRespDataAdapter","respData","respDataList","onRequestResultAdapter","startDataSourceRequest","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","_respData","respAdapterData","respDataTranslation","$Try_1_Post","$Try_1_Catch","message","onRequest","_extend","warn","$Try_2_Post","$Try_2_Catch","window","$await_3","arrayField2LabelValue","realTimeState","getState","concat","useImperativeHandle","onClearSelectorList","getSelectorList","filterOption","input","option","toLowerCase","indexOf","onSearch","useDebounceCallback","_len","arguments","otherParams","Array","_key","onAgainRequest","selectOptionsAll","Select","Option","showSearch","allowClear","notFoundContent","NotFoundContent","suffixIcon","_RedoOutlined","spin","onLabelRenderAdapter","description","Empty","image","PRESENTED_IMAGE_SIMPLE","setSelectorList","_useState2","setviewLabelList","String","dataList","display","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isString","_isNumber","_isBoolean","JSON","stringify","viewText","Typography","Paragraph","ellipsis","tooltip","TextFormItem","noStyle","TextAreaFormItem","TextArea","UploadWrapper","onUploadError","uploadList","setUploadList","uid","url","onUploadChange","info","fileList","file","status","response","code","result","maxCount","targetList","targetIndex","findIndex","tempUid","splice","Upload","classNames","disabled","UploadTrigger","listType","marginTop","ghost","UploadWrapperFormItemContent","_objectWithoutPropertiesLoose","_editableComptProps","UploadWrapperFormItem","FormItemAdapter","newEditable","extend","commomProps","completeName","FormList","from","useFormInstance","formListConfig","onFormListBeforeRender","editableConfigList","onFormListAfterRender","onFormListItemBeforeRender","onFormListItemAfterRender","deleteOperateRender","List","fields","remove","_Fragment","getFieldValue","fieldChild","hasEditable","formListItemIndex","fieldItem","fieldName","DeleteFormListItem","_DeleteOutlined","FormListItem","EditableTable","_props$tableProps2","columns","columnItem","renderMiddleware","otherColumnItem","onCell","_props$tableProps","valign","tableProps","cellVerticalAlign","_value","record","dataIndex","customRender","operation","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","FileImport","onImportFinish","showUploadList","accept","FileUpload","onPreview","uploadValue","setUploadValue","fileKey","fileName","thumbUrl","uploadItem","respValue","onUploadPreview","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","height","IconWrapper","Tooltip","hoverTips","ModalModel","openModalForm","closeModal","setModalItemData","ModalOperation","_ref$okText","_ref$cancelText","ModalWraper","Modal","modalModels","createModalWraperModel","ModalWrapperContent","ModalWrapperFooter","ModalWrapper","createModalWrapperModel","PageFixedFooter","Page404","formClassName","label_width_70","label_width_80","label_width_90","label_width_100","label_width_110","label_width_120","label_width_130","label_width_auto","formItemClassName","preDefinedClassName","form","formItem","SimpleLayout","labelAlign","formLabelAlign","layoutType","titleClassName","titleLeftLine","desc","SmsCountDown","showMessage","setShowMessage","running","setRunning","starting","_useState3","setStarting","initConfig","sendTxt","sentTxt","processingTxt","autoStart","totalTicks","duration","countdownFnc","useCountdownCallback","num","second","replace","onTick","intervalTime","onStart","onSendRequest","catch","overdueConsole","TableFilterLayout","isFixed","Children","Condition","Operate","treeSelectorList","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","valueList","expandedKeys","tempValue","prev","mergeList","Set","getTreeSelectorList","onTreeExpand","treeData","_selectOptionsAll","_isObject","isObject","TreeSelect","dropdownStyle","maxHeight","overflow","treeLine","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":";29BAIO,IAAMA,EAASC,EAAAA,qYCATC,IAAAA,EAAoB,SAApBA,IACX,IAAAC,EAA0BC,EAAAA,gBAAlBC,IAAAA,cACR,IAAMC,EAA2BC,EAAAC,QAAQH,GAAiBA,EAAgB,GAC1E,OAAOC,OAGIG,EAAgB,SAAhBA,EAAiBC,GAC5B,IAAMJ,EAAiBJ,IACvB,GAAII,EAAeK,SAASD,GAAO,CACjC,OAAO,KAET,OAAO,WAMIE,EAAkC,SAAlCA,EAAmCC,GAC9C,IAAMP,EAAiBJ,IACvB,GAAII,EAAeK,SAASE,EAAMH,MAAO,CACvC,OAAOI,EAAAA,IAACC,EAAAA,SAAD,CAAAC,SAAWH,EAAMG,WAE1B,OAAO,wGCJIC,EAAyC,SAAzCA,EAA0CJ,GACrD,OACEC,EAAAA,IAAA,MAAA,CAAKI,UAAU,gBAAfF,SACEF,MAACK,QAAD,CACEC,MAAON,MAACO,UAAD,CAASC,KAAK,aACrBC,KAAMV,EAAMU,KACZC,KAAMC,EAAYZ,YAAAA,EAAMW,MAAQ,KAAOX,EAAMW,KAH/CR,SAKGH,EAAMa,YAAYC,KAAI,SAACC,EAAMC,GAC5B,IAAKD,EAAM,OAAO,KAClB,IACEE,EASEF,EATFE,KACAC,EAQEH,EARFG,MACAC,EAOEJ,EAPFI,QACAC,EAMEL,EANFK,WACAC,EAKEN,EALFM,YACAC,EAIEP,EAJFO,eACAC,EAGER,EAHFQ,OACAC,EAEET,EAFFS,MACGC,IACDV,EAVJW,GAWA,GAAIH,EAAQ,OAAO,KACnB,GAAIH,IAAexB,EAAcwB,GAAa,OAAO,KACrD,IAAMO,EAAWT,EAAKU,EAAA,CAAKV,MAAAA,GAAUM,GAAUA,EAC/C,IAAMf,EAAOM,EAAKN,MAAQ,OAC1B,GAAIY,EAAa,CACf,OACEpB,EAAAA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EAAMgG,cACrBlF,QAASA,EACTyJ,eAAgBvC,OAKtB,IAAM8C,GAAkB,SAAlBA,EAAmBhR,GAKvB,IAAMqR,EAAcvO,EAAAA,SAAQ,WAC1B,GAAI9C,EAAMkM,gBAAkB,gBAAiB,CAC3C,MAAO,cACF,GAAIlM,EAAMkM,gBAAkB,kBAAmB,CACpD,MAAO,OAET,MAAO,UACN,CAAClM,EAAMkM,gBACV,OACE1F,EAAAA,KAAA,MAAA,CAAKnG,UAAU,qBAAfF,SAAA,CACEF,MAACuiB,OAAD,CAAMC,SAAUziB,EAAMgH,UACtB/G,MAACqR,QAAD,CAAOC,MAAOD,EAAKA,MAACE,uBAAwBH,YAAaA,EAAzDlR,SACGH,EAAMkM,gBAAkB,iBACvBjM,EAAAA,IAACkC,EAAAA,OAAD,CAAQ1B,KAAK,UAAUU,QAASnB,EAAMyQ,eAAtCtQ,SAAA"}
1
+ {"version":3,"file":"index.js","sources":["@flatbiz/antd/src/01-styles/index.ts","@flatbiz/antd/src/permission/index.tsx","@flatbiz/antd/src/button-operate/index.tsx","@flatbiz/antd/src/date-picker-wrapper/index.tsx","@flatbiz/antd/src/date-range-picker-wrapper/index.tsx","@flatbiz/antd/src/drawer-wraper/drawer.model.ts","@flatbiz/antd/src/drawer-wraper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wraper/drawer-wraper.tsx","@flatbiz/antd/src/drawer-wraper/index.ts","@flatbiz/antd/src/drawer-wrapper/drawer.model.ts","@flatbiz/antd/src/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/drawer-wrapper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wrapper/drawer-wrapper.tsx","@flatbiz/antd/src/drawer-wrapper/index.ts","@flatbiz/antd/src/editable-table/utils.ts","@flatbiz/antd/src/editable-table/form-item/checkbox-group.tsx","@flatbiz/antd/src/editable-table/form-item/date-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/date-range-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/input.tsx","@flatbiz/antd/src/editable-table/form-item/input-number.tsx","@flatbiz/antd/src/editable-table/form-item/radio-group.tsx","@flatbiz/antd/src/selector-wrapper/model.ts","@flatbiz/antd/src/selector-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/selector-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/text.tsx","@flatbiz/antd/src/editable-table/form-item/textarea.tsx","@flatbiz/antd/src/upload-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/upload-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/index.tsx","@flatbiz/antd/src/editable-table/form-list-item/form-list.tsx","@flatbiz/antd/src/editable-table/form-list-item/index.tsx","@flatbiz/antd/src/editable-table/index.tsx","@flatbiz/antd/src/file-import/index.tsx","@flatbiz/antd/src/file-upload/index.tsx","@flatbiz/antd/src/flex-layout/index.tsx","@flatbiz/antd/src/gap/index.tsx","@flatbiz/antd/src/icon-wrapper/index.tsx","@flatbiz/antd/src/modal-wraper/modal.model.ts","@flatbiz/antd/src/modal-wraper/modal-operation.tsx","@flatbiz/antd/src/modal-wraper/modal-wraper.tsx","@flatbiz/antd/src/modal-wraper/index.ts","@flatbiz/antd/src/modal-wrapper/modal.model.ts","@flatbiz/antd/src/modal-wrapper/modal-operation.tsx","@flatbiz/antd/src/modal-wrapper/modal-wrapper.tsx","@flatbiz/antd/src/modal-wrapper/index.ts","@flatbiz/antd/src/page-fixed-footer/index.tsx","@flatbiz/antd/src/page404/index.tsx","@flatbiz/antd/src/pre-defined-classname/form/index.tsx","@flatbiz/antd/src/pre-defined-classname/index.ts","@flatbiz/antd/src/simple-layout/index.tsx","@flatbiz/antd/src/sms-count-down/index.tsx","@flatbiz/antd/src/table-filter-layout/index.tsx","@flatbiz/antd/src/tree-selector-wrapper/model.ts","@flatbiz/antd/src/tree-selector-wrapper/utils.ts","@flatbiz/antd/src/tree-selector-wrapper/index.tsx","@flatbiz/antd/src/tree-wrapper/model.ts","@flatbiz/antd/src/tree-wrapper/utils.ts","@flatbiz/antd/src/tree-wrapper/index.tsx"],"sourcesContent":["import { noop } from '@flatbiz/utils';\nimport './1_root.less';\nimport './2_base.less';\n\nexport const styles = noop;\n","import { isArray } from '@dimjs/lang';\nimport { getGlobalData } from '@flatbiz/utils';\nimport { FC, Fragment } from 'react';\n\nexport const getPermissionList = () => {\n const { elemAclLimits } = getGlobalData();\n const permissionList: string[] = isArray(elemAclLimits) ? elemAclLimits : [];\n return permissionList;\n};\n\nexport const hasPermission = (name: string) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(name)) {\n return true;\n }\n return false;\n};\n\nexport interface PermissionProps {\n name: string;\n}\nexport const Permission: FC<PermissionProps> = (props) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(props.name)) {\n return <Fragment>{props.children}</Fragment>;\n }\n return null;\n};\n","import { isUndefined } from '@dimjs/lang';\nimport { Button, ButtonProps, Divider, Popconfirm, Space, SpaceProps } from 'antd';\nimport { VFC } from 'react';\nimport { hasPermission } from '../permission';\nimport './style.less';\n\nexport interface ButtonOperateItem extends ButtonProps {\n text: string;\n color?: string;\n onClick: () => void;\n permission?: string;\n needConfirm?: boolean;\n confirmMessage?: string;\n hidden?: boolean;\n}\n\nexport interface ButtonOperateProps {\n operateList: Array<ButtonOperateItem | null>;\n wrap?: boolean;\n size?: SpaceProps['size'];\n}\n\nexport const ButtonOperate: VFC<ButtonOperateProps> = (props) => {\n return (\n <div className=\"table-operate\">\n <Space\n split={<Divider type=\"vertical\" />}\n size={props.size}\n wrap={isUndefined(props.wrap) ? true : props.wrap}\n >\n {props.operateList.map((item, index) => {\n if (!item) return null;\n const {\n text,\n color,\n onClick,\n permission,\n needConfirm,\n confirmMessage,\n hidden,\n style,\n ...otherProps\n } = item;\n if (hidden) return null;\n if (permission && !hasPermission(permission)) return null;\n const newStyle = color ? { color, ...style } : style;\n const type = item.type || 'link';\n if (needConfirm) {\n return (\n <Popconfirm\n title={confirmMessage}\n okText=\"确定\"\n cancelText=\"取消\"\n onConfirm={onClick}\n arrowPointAtCenter={true}\n key={index}\n >\n <Button {...otherProps} onClick={undefined} type={type} danger style={newStyle}>\n {text}\n </Button>\n </Popconfirm>\n );\n }\n return (\n <Button {...otherProps} type={type} style={newStyle} key={index} onClick={onClick}>\n {text}\n </Button>\n );\n })}\n </Space>\n </div>\n );\n};\n\nButtonOperate.defaultProps = {\n size: 0,\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { PickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DatePickerWrapperProps = Omit<PickerDateProps<moment.Moment>, 'value' | 'onChange'> & {\n value?: string;\n onChange?: (value?: string) => void;\n /**\n * minDate、maxDate设置格式:YYYY-MM-DD\n */\n disabledDateConfig?: {\n minDate?: string;\n maxDate?: string;\n };\n};\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 getDisabledDate = hooks.useCallbackRef((current) => {\n const currentDate = current.format('YYYY-MM-DD');\n if (!props.disabledDateConfig) {\n return false;\n }\n const { minDate, maxDate } = props.disabledDateConfig;\n if (minDate && maxDate) {\n if (!flatbizDate.in(currentDate, minDate, maxDate)) {\n return true;\n }\n } else if (minDate) {\n if (!flatbizDate.gte(currentDate, minDate)) {\n return true;\n }\n } else if (maxDate) {\n if (!flatbizDate.gte(maxDate, currentDate)) {\n return true;\n }\n }\n return false;\n });\n\n const datePickerValue = useMemo(() => {\n if (value) {\n return moment(flatbizDate.dateNormalize(value));\n }\n return undefined;\n }, [value]);\n\n return (\n <DatePicker\n disabledDate={getDisabledDate}\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, useState, VFC } from 'react';\n\nexport type DateRangePickerWrapperProps = Omit<RangePickerDateProps<moment.Moment>, 'value' | 'onChange'> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n /**\n * 1. minDate、maxDate设置格式:YYYY-MM-DD\n * 2. maxDays 最大可选的天数\n */\n disabledDateConfig?: {\n minDate?: string;\n maxDate?: string;\n maxDays?: number;\n };\n};\n\n/**\n * DatePicker.RangePicker包装组件\n * ```\n * TODO: 引用DatePicker.RangePicker TS有问题,待解决\n * 1. value类型为 [string, string]\n * 2. onChange返回类型 [string, string]\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * 5. 可设置disabledDateConfig,来控制日期项的disbaled状态\n * ```\n */\nexport const DateRangePickerWrapper: VFC<DateRangePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n const [startEndDateList, setStartEndDateList] = useState<Array<moment.Moment | null>>();\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 onCalendarChange = hooks.useCallbackRef((data) => {\n if (props.disabledDateConfig) {\n setStartEndDateList(data);\n }\n });\n\n const getDisabledDate = hooks.useCallbackRef((current) => {\n const currentDate = current.format('YYYY-MM-DD');\n if (!props.disabledDateConfig) {\n return false;\n }\n const { maxDays, minDate, maxDate } = props.disabledDateConfig;\n if (minDate && maxDate) {\n if (!flatbizDate.in(currentDate, minDate, maxDate)) {\n return true;\n }\n } else if (minDate) {\n if (!flatbizDate.gte(currentDate, minDate)) {\n return true;\n }\n } else if (maxDate) {\n if (!flatbizDate.gte(maxDate, currentDate)) {\n return true;\n }\n }\n\n if (!startEndDateList || !maxDays) {\n return false;\n }\n\n const startDateString = startEndDateList[0] ? startEndDateList[0].format('YYYY-MM-DD') : undefined;\n const endDateString = startEndDateList[1] ? startEndDateList[1].format('YYYY-MM-DD') : undefined;\n\n let selectableMaxDate: string;\n let selectableMinDate: string;\n\n if (startDateString) {\n selectableMaxDate = flatbizDate.format(flatbizDate.update(startDateString, 'd', maxDays - 1));\n if (endDateString) {\n if (flatbizDate.in(endDateString, startDateString, selectableMaxDate)) {\n selectableMinDate = flatbizDate.format(flatbizDate.update(endDateString, 'd', -(maxDays - 1)));\n } else {\n selectableMinDate = startDateString;\n }\n } else {\n selectableMinDate = startDateString;\n }\n } else {\n selectableMaxDate = endDateString as string;\n selectableMinDate = flatbizDate.format(\n flatbizDate.update(endDateString as string, 'd', -(maxDays - 1)),\n );\n }\n return !flatbizDate.in(currentDate, selectableMinDate, selectableMaxDate);\n });\n\n const [date1, date2] = value || [];\n const rangePickerValue = useMemo(() => {\n if (date1 && date2) {\n const newDate1 = flatbizDate.dateNormalize(date1);\n const newDate2 = flatbizDate.dateNormalize(date2);\n return [moment(newDate1), moment(newDate2)];\n }\n return undefined;\n }, [date1, date2]);\n return (\n <DatePicker.RangePicker\n disabledDate={getDisabledDate}\n onCalendarChange={onCalendarChange}\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={rangePickerValue as [moment.Moment, moment.Moment]}\n onChange={onChangeDate}\n />\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationOldProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { DrawerOperation, DrawerOperationOldProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerFormProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationOldProps;\n} & DrawerProps;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWraper: FC<DrawerFormProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整',\n );\n }, []);\n return (\n <Drawer\n className={classNames('drawer-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wraper-content\">{children}</div>\n {pageLoading && <PageLoader />}\n </Drawer>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWraperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWraperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { DependencyList, EffectCallback, useEffect } from 'react';\n\nexport const useEffectCustom = (fn: EffectCallback, deps: DependencyList) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useEffect(fn, deps);\n};\n","import { DependencyList, useEffect } from 'react';\n\nexport const useEffectCustomAsync = (fn: () => Promise<void>, deps: DependencyList) => {\n useEffect(() => {\n async function asyncFunction() {\n await fn();\n }\n void asyncFunction();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport { DrawerOperation, DrawerOperationProps } from './drawer-operation';\nimport './style.less';\n\ntype DrawerWrapperStaticMethods = {\n Content: typeof DrawerWrapperContent;\n Footer: typeof DrawerWrapperFooter;\n};\n\nexport type DrawerWrapperProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n} & Omit<DrawerProps, 'footer'>;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst DrawerWrapperContent: FC<{ operationProps?: DrawerOperationProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"drawer-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <DrawerWrapperFooter>\n <DrawerOperation {...props.operationProps} />\n </DrawerWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst DrawerWrapperFooter = (props) => {\n return <div className=\"drawer-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWrapper: FC<DrawerWrapperProps> & DrawerWrapperStaticMethods = (props) => {\n const { pageLoading, className, width = 600, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('DrawerWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Drawer\n className={classNames('drawer-wrapper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={null}\n >\n {pageLoading && <PageLoader />}\n {children}\n </Drawer>\n );\n};\n\nDrawerWrapper.Content = DrawerWrapperContent;\nDrawerWrapper.Footer = DrawerWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWrapperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWrapperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wrapper';\n","import { FieldSingleConfig } from './type';\n\nexport const getEditable = (editable: FieldSingleConfig['editable'], tableRowIndex: number) => {\n return typeof editable === 'boolean' ? editable : editable?.({ tableRowIndex });\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { Checkbox, Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableCheckboxGroupConfig, EditableFormItemProps } from '../type';\n\ntype CheckboxGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst CheckboxGroupFormItemContent = (props: CheckboxGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableCheckboxGroupConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n if (editable) return [];\n const value = isArray(props.value) ? props.value : ([] as any[]);\n const options = (editableComptProps.options || []) as LabelValueItem[];\n if (!isArray(options) || options.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = options.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.options, props.value]);\n\n if (editable) {\n return <Checkbox.Group {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-checkbox-group-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const CheckboxGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-checkbox-group-form-item', formItemProps?.className)}\n >\n <CheckboxGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { DatePickerWrapper } from '../../date-picker-wrapper';\nimport { EditableDatePickerWrapperConfig, EditableFormItemProps } from '../type';\n\nexport const DatePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-picker-wraper-form-item', formItemProps?.className)}\n >\n <DatePickerWrapper {...(editableConfig as EditableDatePickerWrapperConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { DateRangePickerWrapper } from '../../date-range-picker-wrapper';\nimport { EditableDateRangePickerWrapperConfig, EditableFormItemProps } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableDateRangePickerWrapperConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return undefined;\n return value.join('~');\n }, [editable, props.value]);\n\n if (editable) {\n return <DateRangePickerWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return <span className=\"editable-date-range-picker-view\">{render ? render(props.value) : viewLabel}</span>;\n};\n\nexport const DateRangePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-range-picker-wraper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableInputConfig } from '../type';\n\nexport const InputFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input {...(editableConfig as EditableInputConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form, InputNumber } from 'antd';\nimport { EditableFormItemProps, EditableInputNumberConfig } from '../type';\n\nexport const InputNumberFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-input-number-form-item', formItemProps?.className)}\n >\n <InputNumber {...(editableConfig as EditableInputNumberConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Radio, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, EditableRadioGroupConfig } from '../type';\n\ntype RadioGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number;\n onChange?: (value: string | number) => void;\n};\n\nconst RadioGroupFormItemContent = (props: RadioGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableRadioGroupConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n if (editable) return [];\n const value = props.value;\n const options = (editableComptProps.options || []) as LabelValueItem<string | number>[];\n if (!isArray(options) || options.length === 0) {\n return value;\n }\n const target = options.find((item) => item.value === value);\n return target?.label || value;\n }, [editable, editableComptProps.options, props.value]);\n\n const onChange = hooks.useCallbackRef((e) => {\n props.onChange?.(e.target.value as string | number);\n });\n\n if (editable) {\n return <Radio.Group {...editableComptProps} value={props.value} onChange={onChange} />;\n }\n return (\n <span className=\"editable-radio-group-view\">\n {render ? render(props.value) : viewLabel ? <Tag color=\"#1890ff\">{viewLabel}</Tag> : null}\n </span>\n );\n};\n\nexport const RadioGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-radio-group-form-item', formItemProps?.className)}\n >\n <RadioGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { LabelValueItem, TPlainObject } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: LabelValueItem[];\n originalSelectorList: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: { selectorList: LabelValueItem[]; originalSelectorList: TPlainObject[] };\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n selectorList: [],\n originalSelectorList: [],\n queryIsEmpty: false,\n requestStatus: 'init',\n};\n\nconst _SelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.selectorList = params.selectorList || [];\n state.originalSelectorList = params.originalSelectorList || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.selectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst selectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = selectorWrapperModel('key值').useStore();\n * ```\n */\nexport const selectorWrapperModel = (key: string) => {\n if (!selectorWrapperModels[key]) {\n selectorWrapperModels[key] = Model(_SelectorWrapperModel);\n }\n return selectorWrapperModels[key];\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { extend } from '@dimjs/utils';\nimport { arrayField2LabelValue, isUndefinedOrNull, LabelValueItem, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport {\n DependencyList,\n forwardRef,\n ReactElement,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModelState, selectorWrapperModel } from './model';\n\ntype SelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type SelectorWrapperProps = Omit<\n SelectProps,\n 'filterOption' | 'onSearch' | 'loading' | 'notFoundContent' | 'options' | 'fieldNames'\n> & {\n // 模型唯一值\n modelKey: string;\n fieldNames?: { label: string; value: string };\n /**\n * useEffect依赖性数组\n */\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorList`后无效果\n */\n serviceConfig?: SelectorServiceConfig;\n /**\n * 同步设置选择器选项列表\n * ```\n * 1. 当设置selectorList后,serviceConfig、operateType=search将失效\n * 2. 不支持异步数据,异步使用serviceConfig方式\n * 3. 如果配置fieldNames,会转换后使用\n * ```\n */\n selectorList?: TPlainObject[];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorListChange?: (dataList: TPlainObject[]) => void;\n /**\n * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项\n * ```\n */\n showAllOption?: true | JSX.Element;\n /**\n * 输入操作类型,默认值:filter\n * ```\n * 1. search:根据输入项去服务端查询\n * 2. filter:初始化已查询数据,根据输入内容筛选\n * 3. 在设置`selectorList`后,operateType=search将失效\n * ```\n */\n operateType?: 'search' | 'filter';\n // 搜索调接口字段名称,默认值:keyword\n searchFieldName?: string;\n // label渲染适配器\n onLabelRenderAdapter?: (dataItem: LabelValueItem) => string | ReactElement;\n};\n\nexport type SelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getSelectorList: () => LabelValueItem<string | number>[];\n};\n/**\n * 选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. modelKey的配置是为了缓存数据;\n * 1.1: 当有effectDependencyList依赖项时,依赖项的发生变化后,每次都会去调用接口获取数据\n * 1.2: 当无effectDependencyList依赖项时,第一次调用接口成功后会有标记,下次访问存在标记,就不在调用接口,使用缓存数据;如果想强制刷新数据,可通过随便配置依赖项完成\n * 2. selectorList属性\n * 2.1 当设置selectorList属性后,serviceConfig、operateType=search将失效\n * 2.2 不支持异步数据,异步使用serviceConfig方式\n * 3. operateType=search状态下,回填数据查询接口时,会在接口中默认添加id字段(id的值为回填的值)\n * ```\n */\nexport const SelectorWrapper = forwardRef<SelectorWrapperRefApi, SelectorWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n showAllOption,\n effectDependencyList,\n onSelectorListChange,\n operateType,\n searchFieldName,\n selectorList,\n modelKey,\n fieldNames,\n ...otherProps\n } = props;\n\n const isSearch = operateType === 'search' && selectorList === undefined;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const changeOperateValueRef = useRef<string | number>();\n const [loading, setLoading] = useState(false);\n const [state, actions] = selectorWrapperModel(modelKey).useStore();\n // const effectDependencyListPrev = usePrevious(props.effectDependencyList);\n // console.log('effectDependencyListPrev', effectDependencyListPrev);\n const requestPreKey = `request-pre-${props.modelKey}`;\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceRespDataAdapter = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(\n async (inputValue?: string, searchId?: string | number) => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`SelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n window[requestPreKey] = true;\n void actions.changeRequestStatus('request-pre');\n if ((!isUndefinedOrNull(inputValue) || !isUndefinedOrNull(searchId)) && isSearch) {\n const keyword = searchFieldName || 'keyword';\n params[keyword] = inputValue;\n params['id'] = searchId;\n }\n const respData = await newServiceConfig.onRequest?.(params);\n const respAdapterData = serviceRespDataAdapter(respData);\n const respDataTranslation = arrayField2LabelValue(respAdapterData || [], fieldNames);\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList({\n selectorList: respDataTranslation,\n originalSelectorList: respAdapterData,\n });\n } catch (error) {\n console.error(error);\n setLoading(false);\n window[requestPreKey] = false;\n void actions.changeRequestStatus('request-error');\n void message.error(error.message || '获取数据异常');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n },\n );\n\n useEffectCustom(() => {\n if (state.originalSelectorList && state.requestStatus === 'request-success') {\n onSelectorListChange?.(state.originalSelectorList);\n }\n }, [state.originalSelectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (selectorList) {\n void actions.setSelectBoxList({\n selectorList: arrayField2LabelValue(selectorList, fieldNames),\n originalSelectorList: selectorList,\n });\n return;\n }\n if (isSearch) return;\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = selectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (isSearch) {\n if (valueIsEmpty(props.value as string | number)) {\n onSelectorListChange?.([]);\n void actions.resetSelectBoxList();\n } else {\n // 判断是否由外部回填value数据\n if (props.value !== changeOperateValueRef.current) {\n void startDataSourceRequest(undefined, props.value as string | number);\n }\n }\n }\n }, newEffectDependencyList.concat([props.value]));\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetSelectBoxList();\n },\n getSelectorList: () => {\n return state.selectorList;\n },\n };\n });\n\n const filterOption = hooks.useCallbackRef((input: string, option) => {\n return (option?.children as unknown as string).toLowerCase().indexOf(input.toLowerCase()) >= 0;\n });\n\n const onSearch = hooks.useDebounceCallback((value: string) => {\n if (value) {\n void startDataSourceRequest(value);\n } else {\n void actions.resetSelectBoxList();\n }\n }, 300);\n\n const onChange = hooks.useCallbackRef((value: string | number, ...otherParams) => {\n changeOperateValueRef.current = value;\n props.onChange?.(value, otherParams);\n });\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const selectOptionsAll = <Select.Option value=\"\">全部</Select.Option>;\n return (\n <Select\n showSearch={true}\n allowClear={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n loading={loading}\n onSearch={isSearch ? onSearch : undefined}\n filterOption={isSearch ? false : filterOption}\n onChange={onChange}\n fieldNames={undefined}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n >\n {showAllOption === true ? selectOptionsAll : showAllOption}\n {state.selectorList.map((item) => {\n return (\n <Select.Option value={item.value} label={item.label} key={item.value}>\n {props.onLabelRenderAdapter ? props.onLabelRenderAdapter(item) : item.label}\n </Select.Option>\n );\n })}\n </Select>\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { arrayField2LabelValue, LabelValueItem, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Tag } from 'antd';\nimport { Fragment, useEffect, useState } from 'react';\nimport { SelectorWrapper } from '../../selector-wrapper';\nimport { EditableFormItemProps, EditableSelectWrapperConfig } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number | Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableSelectWrapperConfig).editableComptProps;\n const [selectorList, setSelectorList] = useState<LabelValueItem[]>([]);\n const [viewLabelList, setviewLabelList] = useState<LabelValueItem[]>([]);\n\n useEffect(() => {\n if (!editable) {\n const value = isArray(props.value) ? props.value : props.value === undefined ? [] : [props.value];\n if (selectorList.length === 0) {\n setviewLabelList(value.map((item) => ({ label: item as string, value: item })));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = selectorList.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: String(item), value: item });\n });\n setviewLabelList(returnList);\n }\n }, [editable, editableComptProps.fieldNames, props.value, selectorList]);\n\n const onSelectorListChange = hooks.useCallbackRef((dataList: TPlainObject[]) => {\n setSelectorList(arrayField2LabelValue(dataList || [], editableComptProps.fieldNames));\n });\n\n if (editable) {\n return (\n <SelectorWrapper\n {...editableComptProps}\n value={props.value}\n onChange={props.onChange}\n onSelectorListChange={onSelectorListChange}\n />\n );\n }\n return (\n <Fragment>\n <div style={{ display: 'none' }}>\n <SelectorWrapper {...editableComptProps} onSelectorListChange={onSelectorListChange} />\n </div>\n <span className=\"editable-selector-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n </Fragment>\n );\n};\n\nexport const SelectorWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-selector-wrapper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { isBoolean, isNumber, isString } from '@dimjs/lang';\nimport { Form, Typography } 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 const viewText = props.fieldConfig?.render?.(props.value) || value;\n return (\n <Typography.Paragraph\n className=\"editable-text-view\"\n ellipsis={isString(viewText) ? { tooltip: viewText } : true}\n >\n {viewText}\n </Typography.Paragraph>\n );\n};\n\nexport const TextFormItem = (props: { name: Array<number | string>; fieldConfig?: FieldSingleConfig }) => {\n return (\n <Form.Item noStyle name={props.name}>\n <FormItemTextContent name={props.name} fieldConfig={props.fieldConfig} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableTextareaConfig } from '../type';\n\nexport const TextAreaFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input.TextArea {...(editableConfig as EditableTextareaConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { classNames, extend } from '@dimjs/utils';\nimport { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile, UploadListType } from 'antd/lib/upload/interface';\nimport { FC, Fragment, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type UploadWrapperFileItem = {\n uid: string;\n name: string;\n url?: string;\n};\n\nexport type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {\n value?: T[];\n onChange?: (value?: T[]) => void;\n onUploadError?: (message?: string) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n uid?: string;\n name?: string;\n url?: string;\n };\n /**\n * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject;\n} & Omit<UploadProps, 'onChange' | 'fileList'>;\n\n/**\n * 文件上传\n * ```\n * 1. 可通过配置children替换默认上传触发布局\n * 2. 接口返回结构:\n * formData上传接口返回值\n * {\n * code: '0000',\n * data: {\n * uid: '唯一值,可使用fileKey值'\n * name: '文件名称'\n * url: '预览地址'\n * }\n * }\n * 3. 如果接口返回的不是上面的字段名称,可通过fieldNames配置接口返回字段名称映射\n *\n * 4. 最佳使用方式,与Form结合使用\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <UploadWrapper action={uploadUrl} />\n * </Form.Item>\n * ```\n *\n */\nexport const UploadWrapper: FC<UploadWrapperProps> = (props) => {\n const { onChange, onUploadError, value, ...otherProps } = props;\n const [uploadList, setUploadList] = useState<UploadWrapperFileItem[]>();\n const fieldNames = extend(\n {\n uid: 'uid',\n name: 'name',\n url: 'url',\n },\n props.fieldNames,\n ) as Required<UploadWrapperFileItem>;\n\n useEffectCustom(() => {\n setUploadList(\n value?.map((item) => {\n return {\n uid: item[fieldNames.uid],\n name: item[fieldNames.name],\n url: item[fieldNames.url],\n };\n }),\n );\n }, [fieldNames.name, fieldNames.uid, fieldNames.url, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n const fileList = info.fileList as TPlainObject[];\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = (\n props.onRequestResultAdapter ? props.onRequestResultAdapter(respData.data) : respData.data\n ) as TPlainObject;\n result[fieldNames.uid] = result[fieldNames.uid] || info.file.uid;\n result[fieldNames.name] = result[fieldNames.name] || info.file.name;\n if (props.maxCount === 1) {\n onChange?.([result]);\n } else {\n onChange?.((value || []).concat(result));\n }\n } else {\n if (onUploadError) {\n onUploadError(respData.message as string);\n } else {\n void message.error((respData.message as string) || '上传操作失败...');\n }\n fileList[fileList.length - 1] = {\n ...fileList[fileList.length - 1],\n status: 'error',\n };\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item[fieldNames.uid];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n if (onUploadError) {\n onUploadError();\n } else {\n void message.error('上传操作失败...');\n }\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadList([...fileList] as UploadWrapperFileItem[]);\n props.onUploadChange?.(info);\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n fileList={uploadList}\n className={classNames('v-upload-wrapper', otherProps.className)}\n >\n {otherProps.disabled ? null : (\n <UploadTrigger listType={otherProps.listType}>{props.children}</UploadTrigger>\n )}\n </Upload>\n );\n};\n\nconst UploadTrigger: FC<{ listType?: UploadListType }> = (props) => {\n if (props.children) return <Fragment>{props.children}</Fragment>;\n if (props.listType === 'picture-card') {\n return (\n <div>\n <PlusOutlined />\n <div style={{ marginTop: 8 }}>上传图片</div>\n </div>\n );\n }\n if (props.listType === 'picture') {\n return (\n <Button type=\"primary\" ghost>\n 选择图片上传\n </Button>\n );\n }\n return (\n <Button type=\"primary\" ghost>\n 选择文件上传\n </Button>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { UploadWrapper } from '../../upload-wrapper';\nimport { EditableFileUploadConfig, EditableFormItemProps } from '../type';\n\nconst UploadWrapperFormItemContent = (\n props: EditableFormItemProps & { value?: any; onChange?: (value?: any) => void },\n) => {\n const { editableConfig, render, editable } = props.fieldConfig;\n const { children, ...otherProps } = (editableConfig as EditableFileUploadConfig).editableComptProps;\n if (editable) {\n return (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} onChange={props.onChange}>\n {children}\n </UploadWrapper>\n );\n }\n return (\n <div className=\"upload-wrapper-selector-view\">\n {render ? (\n render(props.value)\n ) : (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} disabled={true} />\n )}\n </div>\n );\n};\n\nexport const UploadWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-upload-wrapper-form-item', formItemProps?.className)}\n >\n <UploadWrapperFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { extend } from '@dimjs/utils';\nimport { FieldSingleConfig } from '../type';\nimport { getEditable } from '../utils';\nimport { CheckboxGroupFormItem } from './checkbox-group';\nimport { DatePickerWrapperFormItem } from './date-picker-wrapper';\nimport { DateRangePickerWrapperFormItem } from './date-range-picker-wrapper';\nimport { InputFormItem } from './input';\nimport { InputNumberFormItem } from './input-number';\nimport { RadioGroupFormItem } from './radio-group';\nimport { SelectorWrapperFormItem } from './selector-wrapper';\nimport { TextFormItem } from './text';\nimport { TextAreaFormItem } from './textarea';\nimport { UploadWrapperFormItem } from './upload-wrapper';\n\nexport type FormItemAdapterProps = {\n name: Array<number | string>;\n completeName: Array<number | string>;\n fieldConfig: FieldSingleConfig;\n tableRowIndex: number;\n};\n\nexport const FormItemAdapter = (props: FormItemAdapterProps) => {\n const { editableConfig, editable } = props.fieldConfig;\n const newEditable = getEditable(editable, props.tableRowIndex);\n const fieldConfig = extend({}, props.fieldConfig, { editable: newEditable });\n\n const commomProps = {\n name: props.name,\n fieldConfig,\n };\n\n if (editableConfig?.type === 'input' && newEditable) {\n return <InputFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'inputNumber' && newEditable) {\n return <InputNumberFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'textArea' && newEditable) {\n return <TextAreaFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'datePickerWrapper' && newEditable) {\n return <DatePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'dateRangePickerWrapper') {\n return <DateRangePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'selectorWrapper') {\n return <SelectorWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'checkboxGroup') {\n return <CheckboxGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'radioGroup') {\n return <RadioGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'uploadWrapper') {\n return <UploadWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'custom') {\n return editableConfig.editableComptProps({\n name: props.name,\n editable: newEditable,\n completeName: props.completeName,\n });\n }\n return <TextFormItem {...commomProps} />;\n};\n","import { DeleteOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { Button, Form, Space } from 'antd';\nimport { FormItemAdapter } from '../form-item';\nimport { FormListConfig } from '../type';\nimport { getEditable } from '../utils';\n\nexport type FormListProps = {\n name: Array<number | string>;\n formListConfig: FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormList = (props: FormListProps) => {\n const from = Form.useFormInstance();\n const {\n onFormListBeforeRender,\n editableConfigList,\n onFormListAfterRender,\n onFormListItemBeforeRender,\n onFormListItemAfterRender,\n deleteOperateRender,\n } = props.formListConfig;\n return (\n <Form.List name={props.name}>\n {(fields, { add, remove }) => (\n <>\n {onFormListBeforeRender\n ? onFormListBeforeRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n {fields.map((fieldChild, index) => {\n const hasEditable = editableConfigList.find((item) =>\n getEditable(item.editable, props.tableRowIndex),\n );\n const className = classNames(\n 'editable-inner-formlist-item',\n `editable-inner-formlist-item-${props.name[1]}`,\n { 'editable-inner-formlist-item_preview': !hasEditable },\n );\n return (\n <div key={index} className={className}>\n {onFormListItemBeforeRender\n ? onFormListItemBeforeRender({\n add,\n remove: () => {\n remove(index);\n },\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n <Space>\n {editableConfigList.map((fieldItem, index) => {\n return (\n <FormItemAdapter\n name={[fieldChild.name, fieldItem.fieldName]}\n fieldConfig={fieldItem}\n key={index}\n tableRowIndex={props.tableRowIndex}\n completeName={[...props.completeName, fieldChild.name]}\n />\n );\n })}\n {hasEditable ? (\n <DeleteFormListItem\n deleteOperateRender={deleteOperateRender}\n remove={() => {\n remove(index);\n }}\n index={index}\n />\n ) : null}\n </Space>\n {onFormListItemAfterRender\n ? onFormListItemAfterRender({\n add,\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n remove: () => {\n remove(index);\n },\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n </div>\n );\n })}\n {onFormListAfterRender\n ? onFormListAfterRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n </>\n )}\n </Form.List>\n );\n};\n\nconst DeleteFormListItem = (props: {\n deleteOperateRender: FormListConfig['deleteOperateRender'];\n remove: () => void;\n index: number;\n}) => {\n return (\n <Form.Item>\n {props.deleteOperateRender ? (\n props.deleteOperateRender({ remove: props.remove, formListItemIndex: props.index })\n ) : (\n <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={props.remove}>\n 删除\n </Button>\n )}\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { FormItemAdapter } from '../form-item';\nimport { TextFormItem } from '../form-item/text';\nimport { FieldSingleConfig, FormListConfig } from '../type';\nimport { FormList } from './form-list';\n\nexport type FormListItemProps = {\n name: Array<number | string>;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormListItem = (props: FormListItemProps) => {\n if (props.fieldConfig) {\n if (isArray(props.fieldConfig['editableConfigList'])) {\n const formListConfig = props.fieldConfig as FormListConfig;\n return (\n <FormList\n name={props.name}\n completeName={props.completeName}\n formListConfig={formListConfig}\n tableRowIndex={props.tableRowIndex}\n />\n );\n } else {\n return (\n <FormItemAdapter\n name={props.name}\n fieldConfig={props.fieldConfig as FieldSingleConfig}\n tableRowIndex={props.tableRowIndex}\n completeName={props.completeName}\n />\n );\n }\n }\n return <TextFormItem name={props.name} />;\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { Button, Form, Table, TableProps } from 'antd';\nimport { FormListOperation, FormListProps } from 'antd/lib/form/FormList';\nimport { ColumnsType } from 'antd/lib/table';\nimport { Fragment, ReactElement, useMemo } from 'react';\nimport { FormListItem } from './form-list-item';\nimport './style.less';\nimport { EditableTableRecordType, FieldSingleConfig, FormListConfig } from './type';\n\n// export type EditableTableDataSourceItem = FormListFieldData & { operation: FormListOperation };\n\n/**\n * antd 默认render功能此处不能使用\n */\nexport type EditableTableColumn = Omit<ColumnsType['0'], 'render'> & {\n dataIndex?: string;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n /**\n * 渲染中间件,如果renderMiddleware返回值为ReactElement格式,则会终止后续逻辑,fieldConfig配置将失效\n * ```\n * 1. tableRowIndex: 当前row的索引值\n * 2. name: 当前table单元格的form.item的name值\n * 3. operation Form.List的操作函数\n * ```\n */\n renderMiddleware?: (item: {\n tableRowIndex: number;\n name: string | number | Array<string | number>;\n operation: FormListOperation;\n }) => ReactElement | null;\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, renderMiddleware, ...otherColumnItem } = columnItem;\n return {\n onCell: () => {\n return {\n valign: props.tableProps?.cellVerticalAlign || 'middle',\n };\n },\n ...otherColumnItem,\n render: (_value, record) => {\n const completeName = columnItem.dataIndex\n ? [...props.name, record.name, columnItem.dataIndex]\n : [...props.name, record.name];\n const customRender = renderMiddleware?.({\n name: completeName,\n tableRowIndex: record.name,\n operation: record.operation,\n });\n if (customRender) {\n return customRender;\n }\n return (\n <FormListItem\n name={columnItem.dataIndex ? [record.name, columnItem.dataIndex] : [record.name]}\n completeName={completeName}\n fieldConfig={fieldConfig}\n tableRowIndex={record.name}\n />\n );\n },\n };\n }) as ColumnsType<EditableTableRecordType>;\n }, [props.columns, props.name, props.tableProps?.cellVerticalAlign]);\n\n return (\n <div className=\"editable-table\">\n <Form.List name={props.name} rules={props.rules}>\n {(fields, formListOperation) => {\n return (\n <Fragment>\n {props.onTableBeforeRender ? props.onTableBeforeRender(formListOperation, fields.length) : null}\n <Table\n scroll={{ x: 'max-content' }}\n pagination={false}\n {...props.tableProps}\n dataSource={fields.map((item) => ({ ...item, operation: formListOperation }))}\n columns={columns}\n rowKey=\"key\"\n />\n {props.onTableAfterRender ? (\n props.onTableAfterRender(formListOperation, fields.length)\n ) : (\n <Button\n type=\"dashed\"\n onClick={() => formListOperation.add()}\n block\n icon={<PlusOutlined />}\n style={{ marginTop: 15 }}\n >\n 新增\n </Button>\n )}\n </Fragment>\n );\n }}\n </Form.List>\n </div>\n );\n};\n","import { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { FC, useState } from 'react';\n\nexport type FileImportProps = {\n onImportFinish: (data?: any) => void;\n} & Omit<\n UploadProps,\n | 'fileList'\n | 'showUploadList'\n | 'itemRender'\n | 'listType'\n | 'multiple'\n | 'previewFile'\n | 'progress'\n | 'onChange'\n | 'onDownload'\n | 'onRemove'\n | 'onPreview'\n | 'directory'\n | 'customRequest'\n | 'defaultFileList'\n | 'iconRender'\n>;\n\n/**\n * 文件导入\n * ```\n * 默认值:\n * name: 'file',\n * accept: '.xlsx,.xls',\n * ```\n */\nexport const FileImport: FC<FileImportProps> = (props) => {\n const { onImportFinish, ...otherProps } = props;\n\n const [loading, setLoading] = useState(false);\n\n const onChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'uploading') {\n setLoading(true);\n } else if (info.file.status === 'done') {\n setLoading(false);\n const respData = info.file.response;\n if (respData.code === '0000') {\n onImportFinish(respData.data);\n } else {\n void message.error((respData.message as string) || '文件导入异常...');\n }\n }\n });\n\n return (\n <Upload showUploadList={false} maxCount={1} {...otherProps} onChange={onChange}>\n {props.children ? (\n props.children\n ) : (\n <Button type=\"primary\" ghost loading={loading}>\n 选择文件\n </Button>\n )}\n </Upload>\n );\n};\n\nFileImport.defaultProps = {\n name: 'file',\n accept: '.xlsx,.xls',\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames, extend } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile } from 'antd/lib/upload/interface';\nimport { FC, useEffect, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type FileUploadItem = {\n fileKey: string;\n fileName: string;\n};\n\ntype AntdFileUploadItem = {\n uid: string;\n name: string;\n fileKey: string;\n};\n\nexport type FileUploadProps = {\n onChange?: (value?: FileUploadItem[]) => void;\n onUploadError?: (message?: string) => void;\n value?: FileUploadItem[];\n onPreview?: (item: FileUploadItem) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n fileKey?: string;\n fileName?: string;\n };\n} & Omit<UploadProps, 'onChange' | 'fileList' | 'onPreview'>;\n\n/**\n * 文件上传,结合Form使用最佳\n * ```\n * 接口返回结构:\n * formData上传接口必须返回fileKey值\n * {\n * code: '0000',\n * data: {\n * fileKey: '预览文件对应的fileKey'\n * }\n * }\n * 可通过fieldNames配置接口返回值属性名称映射\n * ```\n * ```\n * 最佳使用方式:\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <FileUpload action={uploadUrl} onPreview={onPreviewFile}>\n * <Button type=\"primary\">选择文件导入</Button>\n * </FileUpload>\n * </Form.Item>\n * ```\n *\n */\nexport const FileUpload: FC<FileUploadProps> = (props) => {\n useEffectCustom(() => {\n console.error('@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换');\n }, []);\n\n const { onChange, onUploadError, onPreview, value, ...otherProps } = props;\n const [uploadValue, setUploadValue] = useState<AntdFileUploadItem[]>([]);\n const fieldNames = extend(\n {\n fileKey: 'fileKey',\n fileName: 'fileName',\n },\n props.fieldNames,\n ) as FileUploadItem;\n\n useEffect(() => {\n if (value && isArray(value)) {\n setUploadValue(\n value.map((item) => {\n return {\n uid: item['uid'] || item[fieldNames.fileKey],\n name: item[fieldNames.fileName],\n fileKey: item[fieldNames.fileKey],\n url: item[fieldNames.fileKey],\n thumbUrl: item[fieldNames.fileKey],\n };\n }),\n );\n }\n }, [fieldNames.fileKey, fieldNames.fileName, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = respData.data || {};\n const uploadItem = {\n uid: info.file.uid,\n fileName: result[fieldNames.fileName] || (info.file.name as string),\n fileKey: result[fieldNames.fileKey],\n } as FileUploadItem;\n const respValue = (value || []).concat(uploadItem);\n onChange?.(respValue as unknown as FileUploadItem[]);\n } else {\n onUploadError?.(respData.message as string);\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item['uid'] || item[fieldNames.fileKey];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n onUploadError?.();\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadValue([...info.fileList]);\n props.onUploadChange?.(info);\n });\n\n const onUploadPreview = hooks.useCallbackRef((file) => {\n onPreview?.({\n fileKey: file[fieldNames.fileKey],\n fileName: file[fieldNames.fileName],\n });\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n onPreview={onUploadPreview}\n fileList={uploadValue}\n className={classNames('v-file-upload', otherProps.className)}\n >\n {props.children}\n </Upload>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { isUndefinedOrNull } from '@flatbiz/utils';\nimport { cloneElement, CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type FlexLayoutProps = {\n className?: string;\n fullIndex?: number | number[];\n direction?: 'vertical' | 'horizontal';\n onClick?: () => void;\n style?: CSSProperties;\n gap?: number;\n};\n/**\n * flex布局\n * 1. direction:默认值vertical\n * 2. gap间隙距离\n * 3. fullIndex:指定children数组索引值对象flex=1\n * 4. children添加key熟悉\n * @param props\n * @returns\n */\nexport const FlexLayout: FC<FlexLayoutProps> = (props) => {\n const childrens = (isArray(props.children) ? props.children : [props.children]) as JSX.Element[];\n const direction = props.direction || 'vertical';\n const gap = props.gap ? props.gap : 0;\n const fullIndexList = !isUndefinedOrNull(props.fullIndex)\n ? isArray(props.fullIndex)\n ? props.fullIndex\n : [props.fullIndex as number]\n : [];\n return (\n <div\n className={classNames('v-flex-layout', `v-flex-${direction}`, props.className)}\n style={props.style}\n onClick={props.onClick}\n >\n {childrens.map((children, index) => {\n const childrenStyle = children.props.style || {};\n const style = fullIndexList.includes(index) ? { flex: 1, ...childrenStyle } : childrenStyle;\n if (index < childrens.length - 1 && gap > 0) {\n if (direction === 'horizontal') {\n style.marginRight = gap;\n } else {\n style.marginBottom = gap;\n }\n }\n return cloneElement(children, { style, key: index });\n })}\n </div>\n );\n};\n","import { CSSProperties, VFC } from 'react';\n\nexport type GapProps = {\n height?: number;\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * 间隙组件\n * @param props\n * @returns\n */\nexport const Gap: VFC<GapProps> = (props) => {\n return <div style={{ height: props.height, ...props.style }} className={props.className} />;\n};\n","import { classNames } from '@dimjs/utils';\nimport { Tooltip } from 'antd';\nimport { CSSProperties, VFC } from 'react';\nimport './style.less';\n\nexport type IconWrapperProps = {\n hoverTips?: string;\n icon?: React.ReactNode;\n style?: CSSProperties;\n text?: string | React.ReactElement;\n className?: string;\n size?: 'small' | 'middle' | 'large';\n};\nexport const IconWrapper: VFC<IconWrapperProps> = (props) => {\n return (\n <Tooltip title={props.hoverTips}>\n <div\n className={classNames('icon-wrapper', `icon-wrapper-${props.size || 'middle'}`, props.className)}\n style={props.style}\n >\n {props.icon}\n {props.text ? <span className=\"icon-wrapper-text\">{props.text}</span> : null}\n </div>\n </Tooltip>\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { ModalOperation, ModalOperationProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalFormProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationProps;\n footer?: null | React.ReactNode;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWraper: FC<ModalFormProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\n\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整',\n );\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n <div className=\"modal-wraper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wraper-content-footer\">\n {footer ? footer : <ModalOperation {...operationProps} />}\n </div>\n )}\n </Modal>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n/**\n * 组件单词写错,请输入\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWraperModel('key值').useStore();\n * ```\n */\nexport const createModalWraperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationOldProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModalOperation, ModalOperationOldProps } from './modal-operation';\nimport './style.less';\n\ntype ModalWrapperStaticMethods = {\n Content: typeof ModalWrapperContent;\n Footer: typeof ModalWrapperFooter;\n};\n\nexport type ModalWrapperProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst ModalWrapperContent: FC<{ operationProps?: ModalOperationOldProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"modal-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <ModalWrapperFooter>\n <ModalOperation {...props.operationProps} />\n </ModalWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst ModalWrapperFooter = (props) => {\n return <div className=\"modal-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWrapper: FC<ModalWrapperProps> & ModalWrapperStaticMethods = (props) => {\n const { pageLoading, className, width, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('ModalWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wrapper', className)}\n keyboard={false}\n forceRender={true}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n {children}\n {pageLoading && <PageLoader />}\n </Modal>\n );\n};\n\nModalWrapper.Content = ModalWrapperContent;\nModalWrapper.Footer = ModalWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWrapperModel('key值').useStore();\n * ```\n */\nexport const createModalWrapperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wrapper';\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type PageFixedFooterProps = {\n className?: string;\n style?: CSSProperties;\n};\n\nexport const PageFixedFooter: FC<PageFixedFooterProps> = (props) => {\n return (\n <div className={classNames('page-fixed-footer', props.className)} style={props.style}>\n {props.children}\n </div>\n );\n};\n","export const Page404 = () => {\n return <div className=\"v-404\">404</div>;\n};\n","import './style.less';\n/**\n * 使用在Form组件上,预定义form-item label宽度\n */\nexport const formClassName = {\n label_width_70: 'form-label-70',\n label_width_80: 'form-label-80',\n label_width_90: 'form-label-90',\n label_width_100: 'form-label-100',\n label_width_110: 'form-label-110',\n label_width_120: 'form-label-120',\n label_width_130: 'form-label-130',\n label_width_auto: 'form-label-auto',\n};\n\n/**\n * 使用在Form.Item组件上,预定义form-item label宽度\n */\nexport const formItemClassName = {\n label_width_70: 'form-item-label-70',\n label_width_80: 'form-item-label-80',\n label_width_90: 'form-item-label-90',\n label_width_100: 'form-item-label-100',\n label_width_110: 'form-item-label-110',\n label_width_120: 'form-item-label-120',\n label_width_130: 'form-item-label-130',\n label_width_auto: 'form-item-label-auto',\n};\n","import { formClassName, formItemClassName } from './form';\n\n/**\n * 预定义className\n * ```\n * form: 使用在Form组件上,设置form-item label宽度\n * formItem: 使用在Form.Item组件上,设置form-item label宽度\n * ```\n */\nexport const preDefinedClassName = {\n form: formClassName,\n formItem: formItemClassName,\n};\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC, ReactElement } from 'react';\nimport './style.less';\n\nexport type SimpleLayoutProps = {\n className?: string;\n style?: CSSProperties;\n title?: string | ReactElement;\n desc?: string | ReactElement;\n formLabelAlign?: 'left' | 'right';\n layoutType?: 'layer' | 'tight';\n titleLeftLine?: boolean;\n};\n\n/**\n * 简单布局\n * @param props\n * @returns\n * ```\n * 1. layoutType 布局类型\n * layer:分层布局\n * tight:紧凑布局\n * ```\n */\nexport const SimpleLayout: FC<SimpleLayoutProps> = (props) => {\n const labelAlign = props.formLabelAlign || 'right';\n const className = classNames(\n 'simple-layout',\n {\n 'simple-layout-tight': props.layoutType === 'tight',\n 'simple-layout-formlabel-left': labelAlign === 'left',\n },\n props.className,\n );\n\n const titleClassName = classNames('simple-layout-title', {\n 'simple-layout-title-sign': props.titleLeftLine,\n });\n\n return (\n <div className={className} style={props.style}>\n {props.title ? <div className={titleClassName}>{props.title}</div> : null}\n {props.desc ? <div className=\"simple-layout-desc\">{props.desc}</div> : null}\n {props.children ? <div className=\"simple-layout-content\">{props.children}</div> : null}\n </div>\n );\n};\n\nSimpleLayout.defaultProps = {\n titleLeftLine: true,\n layoutType: 'layer',\n};\n","import { classNames } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { FC, useEffect, useMemo, useState } from 'react';\n\nexport interface SmsCountDownProps {\n onSendRequest: () => Promise<void>; // 验证码请求函数\n totalTicks?: number; // 总倒计时,默认:60(s)\n duration?: number; // 倒计时间隔,默认:1000ms(1s)\n autoStart?: boolean; // 是否自动开始倒计时,默认:fasle,注意:不会自动调用 onSendRequest\n format?: string; // 倒计时格式化,默认:'{t}s'\n sendTxt?: string; // 文案,默认:'获取验证码'\n sentTxt?: string; // 倒计时完成文案,默认:'重新获取'\n processingTxt?: string; // 倒计时中文案,默认:'发送中...'\n onTick?: (time: number) => void; // 倒计时回调\n className?: string;\n}\nexport const SmsCountDown: FC<SmsCountDownProps> = (props) => {\n const [showMessage, setShowMessage] = useState<string>();\n\n const [running, setRunning] = useState(false);\n const [starting, setStarting] = useState(false);\n\n // 初始化设置有效\n const initConfig = useMemo<Omit<SmsCountDownProps, 'onSendRequest' | 'onTick' | 'className'>>(() => {\n return {\n sendTxt: props.sendTxt,\n sentTxt: props.sentTxt,\n processingTxt: props.processingTxt,\n format: props.format,\n autoStart: props.autoStart,\n totalTicks: props.totalTicks,\n duration: props.duration,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const format = initConfig.format as string;\n const totalTicks = initConfig.totalTicks as number;\n const duration = initConfig.duration as number;\n\n const countdownFnc = hooks.useCountdownCallback(\n (num) => {\n const second = num / 1000;\n if (num > 0) {\n if (!running) {\n setRunning(true);\n }\n setShowMessage(format.replace('{t}', String(second)));\n props.onTick?.(second);\n } else if (num === 0) {\n setRunning(false);\n setStarting(false);\n props.onTick?.(second);\n setShowMessage(initConfig.sentTxt);\n }\n },\n totalTicks * 1000,\n { intervalTime: duration },\n );\n\n useEffect(() => {\n if (!initConfig.autoStart) {\n setShowMessage(initConfig.sendTxt);\n } else {\n countdownFnc();\n setStarting(true);\n setRunning(true);\n }\n }, [countdownFnc, initConfig]);\n\n const onStart = hooks.useCallbackRef(() => {\n if (running || starting) return;\n setStarting(true);\n setShowMessage(initConfig.processingTxt);\n void props\n .onSendRequest()\n .then(() => {\n setRunning(true);\n countdownFnc();\n })\n .catch(() => {\n setShowMessage(initConfig.sendTxt);\n setStarting(false);\n });\n });\n\n const className = classNames('v-count-down', props.className, {\n running,\n starting,\n });\n\n return (\n <div className={className} onClick={onStart}>\n {showMessage}\n </div>\n );\n};\n\nSmsCountDown.defaultProps = {\n totalTicks: 60,\n duration: 1000,\n autoStart: false,\n format: '{t}s',\n sendTxt: '获取验证码',\n sentTxt: '重新获取',\n processingTxt: '发送中...',\n};\n","import { classNames } from '@dimjs/utils';\nimport { Children, cloneElement, FC } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\ntype StaticMethods = {\n Condition: typeof Condition;\n Operate: typeof Operate;\n Table: typeof Table;\n Footer: typeof Footer;\n};\n\nconst overdueConsole = () => {\n console.error('@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代');\n};\n\nexport type TableFilterLayoutProps = {\n className?: string;\n isFixed?: boolean;\n fullIndex?: number;\n};\n\nexport const TableFilterLayout: FC<TableFilterLayoutProps> & StaticMethods = (props) => {\n useEffectCustom(() => {\n overdueConsole();\n }, []);\n\n return (\n <div\n className={classNames(\n 'table-filter-layout',\n { 'table-filter-layout-flex': props.isFixed },\n props.className,\n )}\n >\n {Children.map(props.children, (item, index) => {\n if (props.isFixed && index === props.fullIndex) {\n return cloneElement(item as JSX.Element, { className: 'table-filter-layout-flex-full' });\n }\n return item;\n })}\n </div>\n );\n};\n\nconst Condition: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-condition', props.className)}>{props.children}</div>;\n};\n\nconst Operate: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-operate', props.className)}>{props.children}</div>;\n};\n\nconst Table: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-table', props.className)}>{props.children}</div>;\n};\nconst Footer: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-footer', props.className)}>{props.children}</div>;\n};\n\nTableFilterLayout.Condition = Condition;\nTableFilterLayout.Operate = Operate;\nTableFilterLayout.Table = Table;\nTableFilterLayout.Footer = Footer;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport type ModelState = {\n treeSelectorList: TSetDefaultDefined<TreeSelectProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['treeSelectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeSelectorList: [],\n queryIsEmpty: false,\n};\n\nconst TreeSelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.treeSelectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.treeSelectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeSelectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeSelectorWrapperModel('key值').useStore();\n * ```\n */\nexport const treeSelectorWrapperModel = (key: string) => {\n if (!treeSelectorWrapperModels[key]) {\n treeSelectorWrapperModels[key] = Model(TreeSelectorWrapperModel);\n }\n return treeSelectorWrapperModels[key];\n};\n","import { isArray } from '@dimjs/lang';\nimport { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: TreeSelectProps['fieldNames'],\n) => {\n if (!isArray(treeList) || treeList.length === 0) return [];\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { isArray, isObject } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\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 { useEffectCustom } from '../hooks/use-effect-custom';\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 * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项,例如:{ label: '全部', value: 'all' }\n * 3. 自定义字段会通过fieldNames转换后使用\n * 4. 多选操作时,最好不要设置全部选项\n * ```\n */\n showAllOption?: true | TPlainObject<string | number>;\n};\n\nexport type TreeSelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeSelectorList: () => TreeSelectProps['treeData'];\n};\n\n/**\n * 树选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置treeSelectorList属性后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n */\nexport const TreeSelectorWrapper = forwardRef<TreeSelectorWrapperRefApi, TreeSelectorWrapperProps>(\n (props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n onTreeSelectorListChange,\n treeSelectorList,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [loading, setLoading] = useState(false);\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeSelectorWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeSelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n window[requestPreKey] = true;\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeSelectProps['treeData'];\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList(respData || []);\n } catch (error) {\n setLoading(false);\n window[requestPreKey] = false;\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (state.treeSelectorList && state.requestStatus === 'request-success') {\n onTreeSelectorListChange?.(state.treeSelectorList);\n }\n }, [state.treeSelectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (treeSelectorList) {\n void actions.setSelectBoxList(treeSelectorList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeSelectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffect(() => {\n if (!isUndefinedOrNull(props.value)) {\n const valueList = isArray(props.value) ? props.value : [props.value];\n if (valueList.length > 0 && state.treeSelectorList.length > 0) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(\n tempValue as string | number,\n state.treeSelectorList,\n props.fieldNames,\n );\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }\n }, [state.treeSelectorList, props.fieldNames, props.value]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.setSelectBoxList([]);\n },\n getTreeSelectorList: () => {\n return state.treeSelectorList;\n },\n };\n });\n\n const onTreeExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const treeData = useMemo(() => {\n if (state.treeSelectorList.length === 0) return undefined;\n const fieldNames = { label: 'label', value: 'value', ...props.fieldNames };\n if (props.showAllOption === true) {\n const selectOptionsAll = {\n [`${fieldNames.label}`]: '全部',\n [`${fieldNames.value}`]: '',\n } as unknown as ModelState['treeSelectorList'][0];\n return [selectOptionsAll, ...state.treeSelectorList];\n } else if (isObject(props.showAllOption)) {\n return [\n props.showAllOption as unknown as ModelState['treeSelectorList'][0],\n ...state.treeSelectorList,\n ];\n }\n return state.treeSelectorList;\n }, [props.fieldNames, props.showAllOption, state.treeSelectorList]);\n\n return (\n <TreeSelect\n dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}\n showSearch={true}\n treeLine={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n treeExpandedKeys={treeExpandedKeys}\n treeData={treeData}\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 { 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 { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModelState, treeWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\n\ntype TreeServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeWrapperProps = Omit<\n TreeProps,\n | 'expandedKeys'\n | 'treeData'\n | 'onExpand'\n | 'selectedKeys'\n | 'checkedKeys'\n | 'onCheck'\n | 'onSelect'\n | 'defaultCheckedKeys'\n | 'defaultSelectedKeys'\n | 'fieldNames'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorTreeList`后无效果\n */\n serviceConfig?: TreeServiceConfig;\n /**\n * 当设置selectorTreeList后,serviceConfig将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n selectorTreeList?: TreeProps['treeData'];\n value?: string | number | Array<string | number>;\n onChange?: (selectedKey: string | number | Array<string | number>) => void;\n fieldNames?: { label?: string; value?: string; children?: string };\n /**\n * 打开tree折叠过滤关键字\n */\n filterLabel?: string;\n};\n\nexport type TreeWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeDataList: () => TreeProps['treeData'];\n};\n\n/**\n * 树包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置selectorTreeList属性后,serviceConfig将失效\n * ```\n */\nexport const TreeWrapper = forwardRef<TreeWrapperRefApi, TreeWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n selectorTreeList,\n value,\n onChange,\n fieldNames,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeWrapperModel(modelKey).useStore();\n const [loading, setLoading] = useState(false);\n\n const valueList = useMemo(() => {\n if (isUndefinedOrNull(props.value)) return undefined;\n return (isArray(props.value) ? props.value : [props.value]) as Array<string | number>;\n }, [props.value]);\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeProps['treeData'];\n void actions.setTreeList(respData || []);\n setLoading(false);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (selectorTreeList) {\n void actions.setTreeList(selectorTreeList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (valueList && valueList.length > 0 && state.treeList.length > 0 && !treeExpandedKeys) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(tempValue, state.treeList, props.fieldNames);\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }, [state.treeList, props.fieldNames, value]);\n\n hooks.useUpdateEffect(() => {\n if (props.filterLabel) {\n const tiledArray = treeToTiledArray(state.treeList || [], props.fieldNames);\n const targetList = tiledArray.filter((item) => item.label?.includes(props.filterLabel || ''));\n let expandedKeys = [] as Array<string | number>;\n targetList.map((tempItem) => {\n const targetValues = getExpandedKeys(\n tempItem.value as string,\n state.treeList || [],\n props.fieldNames,\n );\n const valueList = targetValues.map((item) => item.value);\n expandedKeys = expandedKeys.concat(valueList);\n });\n setTreeExpandedKeys(Array.from(new Set(expandedKeys)));\n } else {\n setTreeExpandedKeys([]);\n }\n }, [props.filterLabel]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetTreeList();\n },\n getTreeDataList: () => {\n return state.treeList;\n },\n };\n });\n\n const onExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n const onCheck = hooks.useCallbackRef((checkedKeys) => {\n onChange?.(checkedKeys as Array<string | number>);\n });\n const onSelect = hooks.useCallbackRef((checkedKeys) => {\n if (props.multiple) {\n onChange?.(checkedKeys as Array<string | number>);\n } else {\n onChange?.(checkedKeys[0] as string | number);\n }\n });\n\n const treeFieldNames = useMemo(() => {\n const newFieldNames = extend({ label: 'label', value: 'value', children: 'children' }, fieldNames);\n return { title: newFieldNames.label, key: newFieldNames.value, children: newFieldNames.children };\n }, [fieldNames]);\n\n if (state.treeList.length > 0) {\n return (\n <Tree\n showLine={otherProps.checkable ? false : { showLeafIcon: false }}\n {...otherProps}\n fieldNames={treeFieldNames}\n expandedKeys={treeExpandedKeys}\n treeData={state.treeList}\n onExpand={onExpand}\n selectedKeys={otherProps.checkable ? undefined : valueList}\n checkedKeys={otherProps.checkable ? valueList : undefined}\n onCheck={otherProps.checkable ? onCheck : undefined}\n onSelect={otherProps.checkable ? undefined : onSelect}\n style={{ width: '100%', ...otherProps.style }}\n />\n );\n }\n\n return (\n <NotFoundContent\n requestStatus={state.requestStatus}\n loading={loading}\n onAgainRequest={startDataSourceRequest}\n />\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n loading: boolean;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <div className=\"tree-wrapper-empty\">\n <Spin spinning={props.loading}></Spin>\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={description}>\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n </div>\n );\n};\n"],"names":["styles","noop","getPermissionList","_getGlobalData","getGlobalData","elemAclLimits","permissionList","_isArray","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","createElement","key","defaultProps","DatePickerWrapper","value","onChange","format","useMemo","showTime","onChangeDate","_hooks","useCallbackRef","moment","getDisabledDate","current","currentDate","disabledDateConfig","minDate","maxDate","flatbizDate","in","gte","datePickerValue","dateNormalize","DatePicker","disabledDate","width","DateRangePickerWrapper","_useState","useState","startEndDateList","setStartEndDateList","values","value1","_ref","value2","onCalendarChange","data","maxDays","startDateString","endDateString","selectableMaxDate","selectableMinDate","update","date1","_ref2","date2","rangePickerValue","newDate1","newDate2","RangePicker","DrawerModel","actions","openDrawerForm","itemData","operateType","pageLoading","state","visible","closeDrawer","setDrawerItemData","params","DrawerOperation","_jsxs","cancelButtonProps","onCancel","hideOkBtn","icon","_SaveOutlined","okButtonProps","onOk","loading","PageLoader","jsxs","jsx","DrawerWraper","_props$width","footer","operationProps","useEffect","console","error","Drawer","_classNames","keyboard","forceRender","destroyOnClose","contentWrapperStyle","maxWidth","drawerModels","createDrawerWraperModel","Model","useEffectCustom","fn","deps","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","DrawerWrapperContent","DrawerWrapperFooter","DrawerWrapper","Error","Content","Footer","createDrawerWrapperModel","getEditable","editable","tableRowIndex","CheckboxGroupFormItemContent","fieldConfig","editableConfig","render","editableComptProps","viewLabelList","options","length","label","returnList","forEach","target","find","temp","push","Checkbox","Group","tag","Tag","CheckboxGroupFormItem","formItemProps","Form","Item","DatePickerWrapperFormItem","FormItemContent","viewLabel","join","DateRangePickerWrapperFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","defaultState","selectorList","originalSelectorList","queryIsEmpty","requestStatus","_SelectorWrapperModel","setSelectBoxList","resetSelectBoxList","changeRequestStatus","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","forwardRef","ref","serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","modelKey","fieldNames","isSearch","newServiceConfig","newEffectDependencyList","changeOperateValueRef","useRef","setLoading","_selectorWrapperModel","useStore","requestPreKey","valueIsEmpty","isUndefinedOrNull","serviceRespDataAdapter","respData","respDataList","onRequestResultAdapter","startDataSourceRequest","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","_respData","respAdapterData","respDataTranslation","$Try_1_Post","$Try_1_Catch","message","onRequest","_extend","warn","$Try_2_Post","$Try_2_Catch","window","$await_3","arrayField2LabelValue","realTimeState","getState","concat","useImperativeHandle","onClearSelectorList","getSelectorList","filterOption","input","option","toLowerCase","indexOf","onSearch","useDebounceCallback","_len","arguments","otherParams","Array","_key","onAgainRequest","selectOptionsAll","Select","Option","showSearch","allowClear","notFoundContent","NotFoundContent","suffixIcon","_RedoOutlined","spin","onLabelRenderAdapter","description","Empty","image","PRESENTED_IMAGE_SIMPLE","setSelectorList","_useState2","setviewLabelList","String","dataList","display","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isString","_isNumber","_isBoolean","JSON","stringify","viewText","Typography","Paragraph","ellipsis","tooltip","TextFormItem","noStyle","TextAreaFormItem","TextArea","UploadWrapper","onUploadError","uploadList","setUploadList","uid","url","onUploadChange","info","fileList","file","status","response","code","result","maxCount","targetList","targetIndex","findIndex","tempUid","splice","Upload","classNames","disabled","UploadTrigger","listType","marginTop","ghost","UploadWrapperFormItemContent","_objectWithoutPropertiesLoose","_editableComptProps","UploadWrapperFormItem","FormItemAdapter","newEditable","extend","commomProps","completeName","FormList","from","useFormInstance","formListConfig","onFormListBeforeRender","editableConfigList","onFormListAfterRender","onFormListItemBeforeRender","onFormListItemAfterRender","deleteOperateRender","List","fields","add","remove","_Fragment","getFieldValue","fieldChild","hasEditable","formListItemIndex","fieldItem","fieldName","DeleteFormListItem","_DeleteOutlined","FormListItem","EditableTable","_props$tableProps2","columns","columnItem","renderMiddleware","otherColumnItem","onCell","_props$tableProps","valign","tableProps","cellVerticalAlign","_value","record","dataIndex","customRender","operation","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","FileImport","onImportFinish","showUploadList","accept","FileUpload","onPreview","uploadValue","setUploadValue","fileKey","fileName","thumbUrl","uploadItem","respValue","onUploadPreview","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","height","IconWrapper","Tooltip","hoverTips","ModalModel","openModalForm","closeModal","setModalItemData","ModalOperation","_ref$okText","_ref$cancelText","ModalWraper","Modal","modalModels","createModalWraperModel","ModalWrapperContent","ModalWrapperFooter","ModalWrapper","createModalWrapperModel","PageFixedFooter","Page404","formClassName","label_width_70","label_width_80","label_width_90","label_width_100","label_width_110","label_width_120","label_width_130","label_width_auto","formItemClassName","preDefinedClassName","form","formItem","SimpleLayout","labelAlign","formLabelAlign","layoutType","titleClassName","titleLeftLine","desc","SmsCountDown","showMessage","setShowMessage","running","setRunning","starting","_useState3","setStarting","initConfig","sendTxt","sentTxt","processingTxt","autoStart","totalTicks","duration","countdownFnc","useCountdownCallback","num","second","replace","onTick","intervalTime","onStart","onSendRequest","catch","overdueConsole","TableFilterLayout","isFixed","Children","Condition","Operate","treeSelectorList","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","valueList","expandedKeys","tempValue","prev","mergeList","Set","getTreeSelectorList","onTreeExpand","treeData","_selectOptionsAll","_isObject","isObject","TreeSelect","dropdownStyle","maxHeight","overflow","treeLine","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":";29BAIO,IAAMA,EAASC,EAAAA,qYCATC,IAAAA,EAAoB,SAApBA,IACX,IAAAC,EAA0BC,EAAAA,gBAAlBC,IAAAA,cACR,IAAMC,EAA2BC,EAAAC,QAAQH,GAAiBA,EAAgB,GAC1E,OAAOC,OAGIG,EAAgB,SAAhBA,EAAiBC,GAC5B,IAAMJ,EAAiBJ,IACvB,GAAII,EAAeK,SAASD,GAAO,CACjC,OAAO,KAET,OAAO,WAMIE,EAAkC,SAAlCA,EAAmCC,GAC9C,IAAMP,EAAiBJ,IACvB,GAAII,EAAeK,SAASE,EAAMH,MAAO,CACvC,OAAOI,EAAAA,IAACC,EAAAA,SAAD,CAAAC,SAAWH,EAAMG,WAE1B,OAAO,wGCJIC,EAAyC,SAAzCA,EAA0CJ,GACrD,OACEC,EAAAA,IAAA,MAAA,CAAKI,UAAU,gBAAfF,SACEF,MAACK,QAAD,CACEC,MAAON,MAACO,UAAD,CAASC,KAAK,aACrBC,KAAMV,EAAMU,KACZC,KAAMC,EAAYZ,YAAAA,EAAMW,MAAQ,KAAOX,EAAMW,KAH/CR,SAKGH,EAAMa,YAAYC,KAAI,SAACC,EAAMC,GAC5B,IAAKD,EAAM,OAAO,KAClB,IACEE,EASEF,EATFE,KACAC,EAQEH,EARFG,MACAC,EAOEJ,EAPFI,QACAC,EAMEL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1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "2.3.35",
3
+ "version": "2.3.36",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -40,7 +40,7 @@
40
40
  "@dimjs/model": "^1.1.3",
41
41
  "@dimjs/model-react": "^1.1.4",
42
42
  "@dimjs/utils": "^1.2.9",
43
- "@flatbiz/utils": "^2.3.35",
43
+ "@flatbiz/utils": "^2.3.36",
44
44
  "@wove/react": "^1.2.10",
45
45
  "antd": "^4.20.0",
46
46
  "moment": "^2.29.3",
@@ -49,5 +49,5 @@
49
49
  "react-router": "^6.3.0",
50
50
  "react-router-dom": "^6.3.0"
51
51
  },
52
- "gitHead": "5513c02f6c91a27fea66df3fd3481b62357adce7"
52
+ "gitHead": "3265570a611930ff4305929aa8d7e15457d2c4d8"
53
53
  }