@flatbiz/antd 4.2.91 → 4.2.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/_rollupPluginBabelHelpers-a0769acd.js +3 -0
- package/esm/_rollupPluginBabelHelpers-a0769acd.js.map +1 -0
- package/esm/alert-wrapper/index.css +1 -0
- package/esm/alert-wrapper/index.js +5 -0
- package/esm/alert-wrapper/index.js.map +1 -0
- package/esm/amount-fen-input/index.js +1 -1
- package/esm/amount-fen-input-form-item/index.js +1 -1
- package/esm/anchor-steps/index.js +1 -1
- package/esm/button-operate/index.js +1 -1
- package/esm/button-wrapper/index.js +1 -1
- package/esm/card-wrapper/index.js +1 -1
- package/esm/cascader-wrapper/index.js +1 -1
- package/esm/cascader-wrapper/index.js.map +1 -1
- package/esm/check-list/index.js +1 -1
- package/esm/checkbox-wrapper/index.js +1 -1
- package/esm/color-picker-wrapper/index.js +1 -1
- package/esm/config-provider-wrapper/index.js +1 -1
- package/esm/css-node-hover/index.js +1 -1
- package/esm/date-picker-wrapper/index.js +1 -1
- package/esm/date-range-picker-wrapper/index.js +1 -1
- package/esm/date-range-picker-wrapper-form-item/index.js +1 -1
- package/esm/dialog-alert/index.js +1 -1
- package/esm/dialog-confirm/index.js +1 -1
- package/esm/dialog-drawer/index.js +1 -1
- package/esm/dialog-drawer-content/index.js +1 -1
- package/esm/dialog-loading/index.js +1 -1
- package/esm/dialog-modal/index.js +1 -1
- package/esm/drag-collapse/index.js +1 -1
- package/esm/drag-collapse-form-list/index.js +1 -1
- package/esm/drag-form-list/index.js +1 -1
- package/esm/drag-table/index.js +1 -1
- package/esm/drawer-wrapper/index.js +1 -1
- package/esm/dropdown-menu-wrapper/index.js +1 -1
- package/esm/easy-table/index.js +1 -1
- package/esm/editable-field/index.js +1 -1
- package/esm/editable-table/index.js +1 -1
- package/esm/editor-wrapper/index.js +1 -1
- package/esm/error-boundary-wrapper/index.css +0 -0
- package/esm/error-boundary-wrapper/index.js +5 -0
- package/esm/error-boundary-wrapper/index.js.map +1 -0
- package/esm/fba-app/index.js +1 -1
- package/esm/fba-app/index.js.map +1 -1
- package/esm/fba-hooks/index.js +1 -1
- package/esm/file-export/index.js +1 -1
- package/esm/file-import/index.js +1 -1
- package/esm/flex-layout/index.js +1 -1
- package/esm/flex-layout/index.js.map +1 -1
- package/esm/form-grid/index.js +1 -1
- package/esm/form-item-group/index.js +1 -1
- package/esm/form-item-text/index.css +1 -0
- package/esm/form-item-text/index.js +5 -0
- package/esm/form-item-text/index.js.map +1 -0
- package/esm/form-item-wrapper/index.js +1 -1
- package/esm/form-list-wrapper/index.js +1 -1
- package/esm/form-list-wrapper/index.js.map +1 -1
- package/esm/gap/index.js +1 -1
- package/esm/{index-e98b9352.js → index-6677fbfc.js} +2 -2
- package/esm/{index-e98b9352.js.map → index-6677fbfc.js.map} +1 -1
- package/esm/index.js +4 -1
- package/esm/input-search-wrapper/index.js +1 -1
- package/esm/input-text-area-wrapper/index.js +1 -1
- package/esm/input-wrapper/index.js +1 -1
- package/esm/label-value-layout/index.js +1 -1
- package/esm/local-loading/index.js +1 -1
- package/esm/modal-action/index.js +1 -1
- package/esm/modal-wrapper/index.js +1 -1
- package/esm/pagination-wrapper/index.js +1 -1
- package/esm/relation-tree/index.js +1 -1
- package/esm/rich-text-editor/index.js +1 -1
- package/esm/rich-text-viewer/index.js +1 -1
- package/esm/roll-location-center/index.js +1 -1
- package/esm/roll-location-in-view/index.js +1 -1
- package/esm/rule-describe/index.js +1 -1
- package/esm/search-menu/index.js +1 -1
- package/esm/selector-wrapper/index.js +1 -1
- package/esm/selector-wrapper-search/index.js +1 -1
- package/esm/selector-wrapper-simple/index.js +1 -1
- package/esm/simple-layout/index.js +1 -1
- package/esm/split-wrapper/index.css +1 -0
- package/esm/split-wrapper/index.js +5 -0
- package/esm/split-wrapper/index.js.map +1 -0
- package/esm/switch-confirm-wrapper/index.js +1 -1
- package/esm/switch-wrapper/index.js +1 -1
- package/esm/table-cell-render/index.js +1 -1
- package/esm/table-scrollbar/index.js +1 -1
- package/esm/tabs-wrapper/index.js +1 -1
- package/esm/tag-group/index.js +1 -1
- package/esm/tag-wrapper/index.js +1 -1
- package/esm/text-overflow-render/index.js +1 -1
- package/esm/time-picker-wrapper/index.js +1 -1
- package/esm/time-range-picker-wrapper/index.js +1 -1
- package/esm/time-range-picker-wrapper-form-item/index.js +1 -1
- package/esm/tips-wrapper/index.js +1 -1
- package/esm/tree-selector-wrapper/index.js +1 -1
- package/esm/tree-wrapper/index.js +1 -1
- package/esm/tree-wrapper/index.js.map +1 -1
- package/esm/upload-wrapper/index.js +1 -1
- package/esm/upload-wrapper/index.js.map +1 -1
- package/index.d.ts +106 -4
- package/package.json +1 -1
- package/esm/_rollupPluginBabelHelpers-fc015ef2.js +0 -3
- package/esm/_rollupPluginBabelHelpers-fc015ef2.js.map +0 -1
package/esm/form-grid/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import './index.css';
|
|
3
3
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
-
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-
|
|
4
|
+
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{Col as n,Form as t,Row as i,Space as o}from"antd";import{jsx as a,jsxs as l}from"react/jsx-runtime";import{classNames as u}from"@dimjs/utils/cjs/class-names";import{useMemo as s,isValidElement as f,cloneElement as d}from"react";import{toArray as p,valueIsEqual as v}from"@flatbiz/utils";import{u as m}from"../use-responsive-point-21b8c601.js";var c=["forceAloneRow","hidden"];var h={xs:24,sm:24,md:24,lg:24,xl:24,xxl:24};var g=function t(i){var o=i.forceAloneRow,l=i.hidden,u=r(i,c);var s=o?h:u;if(l)return null;return a(n,e({},s,{children:i.children}))};g["domTypeName"]="FormCol";var x=["leftList","rightList","rowColTotal","justify","forceAloneRow","hidden","leftSpaceProps","rightSpaceProps"];var y={xs:24,sm:24,md:24,lg:24,xl:24,xxl:24};var L=function f(d){var p=d,v=p.leftList,m=p.rightList,c=p.rowColTotal,h=p.justify,g=p.forceAloneRow,L=p.hidden,w=p.leftSpaceProps,C=p.rightSpaceProps,T=r(p,x);var j=(v||[]).filter(Boolean);var N=(m||[]).filter(Boolean);var F=j.length>0&&N.length>0;var S=g||F?y:{};var G=s((function(){if(h)return h;if(F)return"space-between";if(g)return"end";if(c===1)return"start";return"end"}),[g,F,h,c]);var O=u(d.className,"v-form-col-operate");if(L)return null;return a(n,e({},T,S,{className:O,children:a(t.Item,{children:l(i,{justify:G,wrap:false,children:[a(o,e({},w,{children:j.map((function(r){return r}))})),a(o,e({},C,{style:e({overflowX:"auto"},C==null?void 0:C.style),children:N==null?void 0:N.map((function(r){return r}))}))]})})}))};L["domTypeName"]="FormOperateCol";var w=function r(e,n){try{var t=[];var i=function r(n){var t=e[n];return{index:n,value:t>24?24:t}};var o=true;var a=[];var l=0;var u=0;while(o){var s=e[l];a.push(i(l));if(s>=24){t.push(a);a=[];u=0}else if(l===e.length-1){t.push(a)}else{u+=s;if(u>=24){t.push(a);a=[];u=0}}l=l+1;if(l>=e.length){o=false}}var f=t.find((function(r){return!!r.find((function(r){return r.index===n}))}))||[];var d=0;var p=0;f.forEach((function(r,e){if(r.index===n)p=e;if(r.index<n){d=d+r.value}}));if(d===24||d===0){f[p].value=24}else{f[p].value=24-d}return{gridList:t.reduce((function(r,e){return r.concat(e)})).map((function(r){return r.value})),gridGroupList:t}}catch(r){return{gridList:e,gridGroupList:[]}}};var C=["gridSize"];var T={xs:24,sm:12,md:12,lg:8,xl:8,xxl:6};var j={xs:24,sm:12,md:8,lg:6,xl:6,xxl:6};var N=function n(t){var o=t.gridSize,l=r(t,C);var u=m()||"md";var c=p(t.children).filter((function(r){if(!r||!f(r))return false;return v(r.type["domTypeName"],["FormOperateCol","FormCol"])}));var h=o==="small"?j:T;console.log("screenType",u,h[u]);var g=s((function(){var r=c.findIndex((function(r){return r.type["domTypeName"]==="FormOperateCol"}));if(u===undefined){return{gridList:[],gridGroupList:[]}}var e=c.map((function(e,n){var t,i;if(n===r)return 0;if(["md","sm","xs"].includes(u)){var o;return((o=e.props)==null?void 0:o[u])||h[u]}var a=(t=e.props)==null?void 0:t.span;return((i=e.props)==null?void 0:i[u])||a||h[u]}));if(r<0){return{gridList:e,gridGroupList:[]}}return w(e,r)}),[c,h,u]),x=g.gridList,y=g.gridGroupList;return a(i,e({},l,{children:c.map((function(r,n){var t;var i=e({},h,r.props);var o=e({key:n},i,(t={},t[u]=x[n]||i[u],t));if(r.type["domTypeName"]==="FormOperateCol"){o["rowColTotal"]=y.length}return d(r,o)}))}))};var F={Row:N,Col:g,OperateCol:L};export{F as FormGrid};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@ import './../fba-hooks/index.css';
|
|
|
3
3
|
import './../flex-layout/index.css';
|
|
4
4
|
import './index.css';
|
|
5
5
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
6
|
-
import{_ as e}from"../_rollupPluginBabelHelpers-
|
|
6
|
+
import{_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{classNames as r}from"@dimjs/utils/cjs/class-names";import{fbaHooks as t}from"../fba-hooks/index.js";import{jsxs as i,jsx as o}from"react/jsx-runtime";import{Form as l}from"antd";import{useMemo as n,isValidElement as a,cloneElement as s}from"react";import{FlexLayout as m}from"../flex-layout/index.js";import"@dimjs/lang/cjs/is-array";import"@wove/react/cjs/hooks";import"../use-responsive-point-21b8c601.js";import"@flatbiz/utils";var f=function l(n){var a;var s="form-item-group-card";var m=t.useThemeToken();var f={"--form-item-group-colorPrimary":m.colorPrimary};return i("div",{className:r(s,n.className),style:e({},f,n.style),children:[n.title?o("div",{className:r(s+"-title",(a={},a[s+"-title-sign"]=n.titleSign===true,a)),children:n.title}):null,n.children]})};f.defaultProps={titleSign:true};var u=function t(i){var f=n((function(){var r=[];var t=[];var l=i.groupConfigList.filter((function(e){return!e.hidden}));l.forEach((function(i){if(i.before){t.push(a(i.before)?i.before:o("div",{className:"union-before-text",children:i.before}))}if(i.width){t.push(s(i.mainItem,{style:e({width:i.width},i.mainItem.props.style)}))}else{r.push(t.length);t.push(i.mainItem)}if(i.after){t.push(a(i.after)?i.after:o("div",{className:"union-after-text",children:i.after}))}}));return{flexElementList:t,fullIndex:r}}),[i.groupConfigList]);return o(l.Item,{label:i.label,className:r("form-item-group-horizontal-union",i.className),style:i.style,hidden:i.hidden,required:i.required,colon:i.colon,children:o(m,{direction:"horizontal",gap:i.gap===undefined?15:i.gap,fullIndex:f.fullIndex,style:i.flexLayoutStyle,children:f.flexElementList.map((function(e,r){return s(e,{key:r})}))})})};var d={HorizontalUnion:u,Card:f};export{d as FormItemGroup};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.form-item-text-content{color:rgba(0,0,0,.88);display:inline-flex;font-size:14px;padding:4px 11px;width:100%}.form-item-text{overflow:hidden}.form-item-text .ant-input{border:none}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import './index.css';
|
|
3
|
+
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
+
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{classNames as a}from"@dimjs/utils/cjs/class-names";import{TextCssEllipsis as t}from"@flatbiz/antd";import{Form as l}from"antd";import{jsx as n}from"react/jsx-runtime";var o=["wrap","render","placeholderValue"];var m=function r(e){var a=typeof e.value==="string"?e.value:JSON.stringify(e.value);var l=(e.render?e.render(e.value):a)||e.placeholderValue;return n("span",{className:"form-item-text-content",children:e.wrap?l:n(t,{text:l||""})})};var s=function t(s){var i=s.wrap,p=s.render,u=s.placeholderValue,c=r(s,o);return n(l.Item,e({},c,{className:a("form-item-text",s.className),children:n(m,{wrap:i,render:p,placeholderValue:u})}))};export{s as FormItemText};
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/form-item-text/form-item-text.tsx"],"sourcesContent":["import { classNames } from '@dimjs/utils';\nimport { TextCssEllipsis } from '@flatbiz/antd';\nimport { type TAny } from '@flatbiz/utils';\nimport { Form, type FormItemProps } from 'antd';\nimport './style.less';\n\ntype FormItemTextProps = FormItemProps & {\n /** 是否换行,默认不换行,超出省略(鼠标悬浮可显示) */\n wrap?: boolean;\n /** 自定义数据显示 */\n render?: (value?: TAny) => string;\n /** 占位值,当 value 为 ''、undefined、null时显示 */\n placeholderValue?: string;\n};\n\nconst FormItemTextContent = (\n props: Pick<FormItemTextProps, 'render' | 'wrap' | 'placeholderValue'> & { value?: string },\n) => {\n const originalValue = typeof props.value === 'string' ? props.value : JSON.stringify(props.value);\n const value = (props.render ? props.render(props.value) : originalValue) || props.placeholderValue;\n\n return (\n <span className=\"form-item-text-content\">\n {props.wrap ? value : <TextCssEllipsis text={value || ''} />}\n </span>\n );\n};\n\n/**\n * FormItem 文本显示,默认不换行,超出省略(鼠标悬浮可显示)\n * @param props\n * @returns\n */\nexport const FormItemText = (props: FormItemTextProps) => {\n const { wrap, render, placeholderValue, ...otherProps } = props;\n\n return (\n <Form.Item {...otherProps} className={classNames('form-item-text', props.className)}>\n <FormItemTextContent wrap={wrap} render={render} placeholderValue={placeholderValue} />\n </Form.Item>\n );\n};\n"],"names":["FormItemTextContent","props","originalValue","value","JSON","stringify","render","placeholderValue","_jsx","className","children","wrap","TextCssEllipsis","text","FormItemText","otherProps","_objectWithoutPropertiesLoose","_excluded","Form","Item","_extends","_classNames"],"mappings":";6RAeA,IAAMA,EAAsB,SAAtBA,EACJC,GAEA,IAAMC,SAAuBD,EAAME,QAAU,SAAWF,EAAME,MAAQC,KAAKC,UAAUJ,EAAME,OAC3F,IAAMA,GAASF,EAAMK,OAASL,EAAMK,OAAOL,EAAME,OAASD,IAAkBD,EAAMM,iBAElF,OACEC,EAAA,OAAA,CAAMC,UAAU,yBAAwBC,SACrCT,EAAMU,KAAOR,EAAQK,EAACI,EAAe,CAACC,KAAMV,GAAS,MAG5D,MAOaW,EAAe,SAAfA,EAAgBb,GAC3B,IAAQU,EAAkDV,EAAlDU,KAAML,EAA4CL,EAA5CK,OAAQC,EAAoCN,EAApCM,iBAAqBQ,EAAUC,EAAKf,EAAKgB,GAE/D,OACET,EAACU,EAAKC,KAAIC,KAAKL,EAAU,CAAEN,UAAWY,EAAW,iBAAkBpB,EAAMQ,WAAWC,SAClFF,EAACR,EAAmB,CAACW,KAAMA,EAAML,OAAQA,EAAQC,iBAAkBA,MAGzE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import './index.css';
|
|
3
3
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
-
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-
|
|
4
|
+
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{composeProps as i}from"@flatbiz/utils";import{Form as a}from"antd";import{isValidElement as t,cloneElement as l}from"react";import{jsx as n,jsxs as o}from"react/jsx-runtime";var p=["wrapper","children","inputNormalize"],f=["wrapper","isClear","children","before","after","inputNormalize","outputNormalize"];var u=function e(a){var t=a.wrapper,f=a.children,u=a.inputNormalize,m=r(a,p);var s=m.hasOwnProperty("value");if(s&&u){m["value"]=u(m["value"])}var c=l(f,i(f.props,m,true));if(t){return t(c)}if(a.before||a.after){return o("div",{style:{display:"flex",alignItems:"center"},children:[a.before?n("span",{style:{marginRight:10},children:a.before}):null,n("div",{style:{flex:1},children:c}),a.after?n("span",{style:{marginLeft:10},children:a.after}):null]})}return c};var m=function i(l){var o=l.wrapper,p=l.isClear,m=l.children,s=l.before,c=l.after,d=l.inputNormalize,h=l.outputNormalize,v=r(l,f);if(p)return null;return n(a.Item,e({normalize:h},v,{children:t(m)?n(u,{wrapper:o,before:s,after:c,inputNormalize:d,children:m}):m}))};export{m as FormItemWrapper};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import './index.css';
|
|
3
3
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
-
import{_ as e}from"../_rollupPluginBabelHelpers-
|
|
4
|
+
import{_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{classNames as r}from"@dimjs/utils/cjs/class-names";import{ButtonWrapper as t}from"@flatbiz/antd";import{toArray as n,getUuid as a}from"@flatbiz/utils";import{Form as i,Empty as o}from"antd";import{useRef as l,Fragment as m}from"react";import{jsxs as d,jsx as u}from"react/jsx-runtime";var s=function e(r){if(r.wrapper)return r.wrapper({children:r.children});return r.children};var c=function c(p){var f=[].concat(p.prevCompleteName,n(p.name));var h=i.useFormInstance();var v=l([]);var g=p.uidFieldName||"uid";var w=i.useWatch(f,h);return d("div",{className:r("form-list-wrapper",p.className),style:p.style,children:[!p.hiddenEmptyRender&&!(w!=null&&w.length)?u(o,{image:o.PRESENTED_IMAGE_SIMPLE,style:{margin:"15px 0"}}):null,u(i.List,{name:p.name,rules:p.rules,children:function r(n,i){v.current=n;return u(s,{wrapper:p.formListChildrenWrapper,children:d(m,{children:[n.map((function(e,r){var t=[].concat(f,[e.name]);return u(m,{children:p.children({formListFieldData:e,operation:i,formStageCompleteName:t,prevCompleteName:f,index:r,getInsideFormItemName:function r(t){return[e.name,t]},getInsideFormItemData:function e(){return h.getFieldValue(t)},uidKey:g})},e.key)})),p.onCustomAddRowButton?p.onCustomAddRowButton(i):u(t,{hidden:p.hiddenAddRowButton,type:"dashed",block:true,onClick:function r(){var t;return i.add(e((t={},t[g]=a(),t),p.getAddRowDefaultValues==null?void 0:p.getAddRowDefaultValues()))},children:"添加"})]})})}})]})};export{c as FormListWrapper};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/form-list-wrapper/form-list-wrapper.tsx"],"sourcesContent":["import { classNames } from '@dimjs/utils';\nimport { ButtonWrapper } from '@flatbiz/antd';\nimport { getUuid, toArray } from '@flatbiz/utils';\nimport { Empty, Form, type FormListFieldData } from 'antd';\nimport { Fragment, useRef, type ReactElement } from 'react';\nimport './style.less';\nimport { type FormListWrapperProps } from './types';\ntype FormListChildrenWrapperProps = {\n wrapper?: FormListWrapperProps['formListChildrenWrapper'];\n children: ReactElement;\n};\nconst FormListChildrenWrapper = (props: FormListChildrenWrapperProps) => {\n if (props.wrapper) return props.wrapper({ children: props.children });\n return props.children;\n};\n\n/**\n * FormList\n * ```\n * 1. FormList数组中必须要有唯一值字段,默认值字段名称uid,可通过uidFieldName自定义设置\n * 2. Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list\n * ```\n */\nexport const FormListWrapper = (props: FormListWrapperProps) => {\n const stageCompleteName = [...props.prevCompleteName, ...toArray(props.name)] as Array<string | number>;\n const form = Form.useFormInstance();\n const formListOperationRef = useRef<FormListFieldData[]>([]);\n const uidFieldName = props.uidFieldName || 'uid';\n const formListValue = Form.useWatch(stageCompleteName, form);\n\n return (\n <div className={classNames('form-list-wrapper', props.className)} style={props.style}>\n {!props.hiddenEmptyRender && !formListValue?.length ? (\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} style={{ margin: '15px 0' }} />\n ) : null}\n <Form.List name={props.name}>\n {(fields, operation) => {\n formListOperationRef.current = fields;\n return (\n <FormListChildrenWrapper wrapper={props.formListChildrenWrapper}>\n <Fragment>\n {fields.map((field, index) => {\n const formStageCompleteName = [...stageCompleteName, field.name];\n return (\n <Fragment key={field.key}>\n {props.children({\n formListFieldData: field,\n operation: operation,\n formStageCompleteName,\n prevCompleteName: stageCompleteName,\n index,\n getInsideFormItemName: (key: string) => {\n return [field.name, key];\n },\n getInsideFormItemData: () => {\n return form.getFieldValue(formStageCompleteName);\n },\n uidKey: uidFieldName,\n })}\n </Fragment>\n );\n })}\n {props.onCustomAddRowButton ? (\n props.onCustomAddRowButton(operation)\n ) : (\n <ButtonWrapper\n hidden={props.hiddenAddRowButton}\n type=\"dashed\"\n block\n onClick={() =>\n operation.add({ [uidFieldName]: getUuid(), ...props.getAddRowDefaultValues?.() })\n }\n >\n 添加\n </ButtonWrapper>\n )}\n </Fragment>\n </FormListChildrenWrapper>\n );\n }}\n </Form.List>\n </div>\n );\n};\n"],"names":["FormListChildrenWrapper","props","wrapper","children","FormListWrapper","stageCompleteName","concat","prevCompleteName","toArray","name","form","Form","useFormInstance","formListOperationRef","useRef","uidFieldName","formListValue","useWatch","_jsxs","className","_classNames","style","hiddenEmptyRender","length","_jsx","Empty","image","PRESENTED_IMAGE_SIMPLE","margin","List","fields","operation","current","formListChildrenWrapper","Fragment","map","field","index","formStageCompleteName","formListFieldData","getInsideFormItemName","key","getInsideFormItemData","getFieldValue","uidKey","onCustomAddRowButton","ButtonWrapper","hidden","hiddenAddRowButton","type","block","onClick","_extends2","add","_extends","getUuid","getAddRowDefaultValues"],"mappings":";iWAWA,IAAMA,EAA0B,SAA1BA,EAA2BC,GAC/B,GAAIA,EAAMC,QAAS,OAAOD,EAAMC,QAAQ,CAAEC,SAAUF,EAAME,WAC1D,OAAOF,EAAME,QACf,MASaC,EAAkB,SAAlBA,EAAmBH,GAC9B,IAAMI,EAAiB,GAAAC,OAAOL,EAAMM,iBAAqBC,EAAQP,EAAMQ,OACvE,IAAMC,EAAOC,EAAKC,kBAClB,IAAMC,EAAuBC,EAA4B,IACzD,IAAMC,EAAed,EAAMc,cAAgB,MAC3C,IAAMC,EAAgBL,EAAKM,SAASZ,EAAmBK,GAEvD,OACEQ,EAAA,MAAA,CAAKC,UAAWC,EAAW,oBAAqBnB,EAAMkB,WAAYE,MAAOpB,EAAMoB,MAAMlB,SAClF,EAACF,EAAMqB,qBAAsBN,GAAa,MAAbA,EAAeO,QAC3CC,EAACC,EAAK,CAACC,MAAOD,EAAME,uBAAwBN,MAAO,CAAEO,OAAQ,YAC3D,KACJJ,EAACb,EAAKkB,KAAI,CAACpB,KAAMR,EAAMQ,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/form-list-wrapper/form-list-wrapper.tsx"],"sourcesContent":["import { classNames } from '@dimjs/utils';\nimport { ButtonWrapper } from '@flatbiz/antd';\nimport { getUuid, toArray } from '@flatbiz/utils';\nimport { Empty, Form, type FormListFieldData } from 'antd';\nimport { Fragment, useRef, type ReactElement } from 'react';\nimport './style.less';\nimport { type FormListWrapperProps } from './types';\ntype FormListChildrenWrapperProps = {\n wrapper?: FormListWrapperProps['formListChildrenWrapper'];\n children: ReactElement;\n};\nconst FormListChildrenWrapper = (props: FormListChildrenWrapperProps) => {\n if (props.wrapper) return props.wrapper({ children: props.children });\n return props.children;\n};\n\n/**\n * FormList\n * ```\n * 1. FormList数组中必须要有唯一值字段,默认值字段名称uid,可通过uidFieldName自定义设置\n * 2. Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list\n * ```\n */\nexport const FormListWrapper = (props: FormListWrapperProps) => {\n const stageCompleteName = [...props.prevCompleteName, ...toArray(props.name)] as Array<string | number>;\n const form = Form.useFormInstance();\n const formListOperationRef = useRef<FormListFieldData[]>([]);\n const uidFieldName = props.uidFieldName || 'uid';\n const formListValue = Form.useWatch(stageCompleteName, form);\n\n return (\n <div className={classNames('form-list-wrapper', props.className)} style={props.style}>\n {!props.hiddenEmptyRender && !formListValue?.length ? (\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} style={{ margin: '15px 0' }} />\n ) : null}\n <Form.List name={props.name} rules={props.rules}>\n {(fields, operation) => {\n formListOperationRef.current = fields;\n return (\n <FormListChildrenWrapper wrapper={props.formListChildrenWrapper}>\n <Fragment>\n {fields.map((field, index) => {\n const formStageCompleteName = [...stageCompleteName, field.name];\n return (\n <Fragment key={field.key}>\n {props.children({\n formListFieldData: field,\n operation: operation,\n formStageCompleteName,\n prevCompleteName: stageCompleteName,\n index,\n getInsideFormItemName: (key: string) => {\n return [field.name, key];\n },\n getInsideFormItemData: () => {\n return form.getFieldValue(formStageCompleteName);\n },\n uidKey: uidFieldName,\n })}\n </Fragment>\n );\n })}\n {props.onCustomAddRowButton ? (\n props.onCustomAddRowButton(operation)\n ) : (\n <ButtonWrapper\n hidden={props.hiddenAddRowButton}\n type=\"dashed\"\n block\n onClick={() =>\n operation.add({ [uidFieldName]: getUuid(), ...props.getAddRowDefaultValues?.() })\n }\n >\n 添加\n </ButtonWrapper>\n )}\n </Fragment>\n </FormListChildrenWrapper>\n );\n }}\n </Form.List>\n </div>\n );\n};\n"],"names":["FormListChildrenWrapper","props","wrapper","children","FormListWrapper","stageCompleteName","concat","prevCompleteName","toArray","name","form","Form","useFormInstance","formListOperationRef","useRef","uidFieldName","formListValue","useWatch","_jsxs","className","_classNames","style","hiddenEmptyRender","length","_jsx","Empty","image","PRESENTED_IMAGE_SIMPLE","margin","List","rules","fields","operation","current","formListChildrenWrapper","Fragment","map","field","index","formStageCompleteName","formListFieldData","getInsideFormItemName","key","getInsideFormItemData","getFieldValue","uidKey","onCustomAddRowButton","ButtonWrapper","hidden","hiddenAddRowButton","type","block","onClick","_extends2","add","_extends","getUuid","getAddRowDefaultValues"],"mappings":";iWAWA,IAAMA,EAA0B,SAA1BA,EAA2BC,GAC/B,GAAIA,EAAMC,QAAS,OAAOD,EAAMC,QAAQ,CAAEC,SAAUF,EAAME,WAC1D,OAAOF,EAAME,QACf,MASaC,EAAkB,SAAlBA,EAAmBH,GAC9B,IAAMI,EAAiB,GAAAC,OAAOL,EAAMM,iBAAqBC,EAAQP,EAAMQ,OACvE,IAAMC,EAAOC,EAAKC,kBAClB,IAAMC,EAAuBC,EAA4B,IACzD,IAAMC,EAAed,EAAMc,cAAgB,MAC3C,IAAMC,EAAgBL,EAAKM,SAASZ,EAAmBK,GAEvD,OACEQ,EAAA,MAAA,CAAKC,UAAWC,EAAW,oBAAqBnB,EAAMkB,WAAYE,MAAOpB,EAAMoB,MAAMlB,SAClF,EAACF,EAAMqB,qBAAsBN,GAAa,MAAbA,EAAeO,QAC3CC,EAACC,EAAK,CAACC,MAAOD,EAAME,uBAAwBN,MAAO,CAAEO,OAAQ,YAC3D,KACJJ,EAACb,EAAKkB,KAAI,CAACpB,KAAMR,EAAMQ,KAAMqB,MAAO7B,EAAM6B,MAAM3B,SAC7C,SAAAA,EAAC4B,EAAQC,GACRnB,EAAqBoB,QAAUF,EAC/B,OACEP,EAACxB,EAAuB,CAACE,QAASD,EAAMiC,wBAAwB/B,SAC9De,EAACiB,EAAQ,CAAAhC,SAAA,CACN4B,EAAOK,KAAI,SAACC,EAAOC,GAClB,IAAMC,KAAqBjC,OAAOD,EAAmBgC,CAAAA,EAAM5B,OAC3D,OACEe,EAACW,EAAQ,CAAAhC,SACNF,EAAME,SAAS,CACdqC,kBAAmBH,EACnBL,UAAWA,EACXO,sBAAAA,EACAhC,iBAAkBF,EAClBiC,MAAAA,EACAG,sBAAuB,SAAAA,EAACC,GACtB,MAAO,CAACL,EAAM5B,KAAMiC,EACrB,EACDC,sBAAuB,SAAAA,IACrB,OAAOjC,EAAKkC,cAAcL,EAC3B,EACDM,OAAQ9B,KAbGsB,EAAMK,IAiBzB,IACCzC,EAAM6C,qBACL7C,EAAM6C,qBAAqBd,GAE3BR,EAACuB,EAAa,CACZC,OAAQ/C,EAAMgD,mBACdC,KAAK,SACLC,MAAK,KACLC,QAAS,SAAAA,IAAA,IAAAC,EAAA,OACPrB,EAAUsB,IAAGC,GAAAF,EAAA,CAAA,EAAAA,EAAItC,GAAeyC,IAASH,GAAKpD,EAAMwD,wBAAsB,UAAA,EAA5BxD,EAAMwD,0BACrD,EAAAtD,SACF,WAOX,MAIR"}
|
package/esm/gap/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import './index.css';
|
|
3
3
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
-
import{_ as e}from"../_rollupPluginBabelHelpers-
|
|
4
|
+
import{_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{jsx as i}from"react/jsx-runtime";var l=function l(t){return i("div",{style:e({height:t.height},t.style,{display:t.inline?"inline-block":"block",width:t.width}),className:t.className})};export{l as Gap};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
2
|
-
import{_ as t}from"./_rollupPluginBabelHelpers-
|
|
3
|
-
//# sourceMappingURL=index-
|
|
2
|
+
import{_ as t}from"./_rollupPluginBabelHelpers-a0769acd.js";import{Select as e,Pagination as r}from"antd";import"react";import{jsx as n}from"react/jsx-runtime";var o=function r(o){return n(e,t({size:"small"},o,{placement:"topLeft"}))};o.Option=e.Option;e.Option;var i=function r(o){return n(e,t({size:"middle"},o,{placement:"topLeft"}))};i.Option=e.Option;var p=function e(p){var a=p.size==="small"?o:i;return n(r,t({},p,{selectComponentClass:a}))};export{p as P,o as S};
|
|
3
|
+
//# sourceMappingURL=index-6677fbfc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-6677fbfc.js","sources":["@flatbiz/antd/src/pagination-wrapper/select.tsx","@flatbiz/antd/src/pagination-wrapper/pagination.tsx"],"sourcesContent":["import { Select, SelectProps } from 'antd';\nimport * as React from 'react';\n\ntype CompoundedComponent = React.FC<SelectProps> & {\n Option: typeof Select.Option;\n};\n\n/**\n * 由于 antd 5.3.x 分页Pagination组件,存在点击分页选择框框时,一直朝下\n * issues:https://github.com/ant-design/ant-design/issues/36866\n * 为了兼容,在 Pagination 中添加了 selectComponentClass 属性,后期antd 官方优化了bug,可取消 配置selectComponentClass\n * @param props\n * @returns\n */\nexport const SmallSelect: CompoundedComponent = (props) => (\n <Select size=\"small\" {...props} placement=\"topLeft\" />\n);\n\nSmallSelect.Option = Select.Option;\n\nexport const LargeSelect: CompoundedComponent = (props) => (\n <Select size=\"large\" {...props} placement=\"topLeft\" />\n);\n\nLargeSelect.Option = Select.Option;\n\nexport const MiddleSelect: CompoundedComponent = (props) => (\n <Select size=\"middle\" {...props} placement=\"topLeft\" />\n);\n\nMiddleSelect.Option = Select.Option;\n","import { Pagination, PaginationProps } from 'antd';\nimport { MiddleSelect, SmallSelect } from './select';\n\n/**\n * 由于 antd 5.3.x 分页Pagination组件,存在点击分页选择框时,一直朝下\n * issues:https://github.com/ant-design/ant-design/issues/36866\n * 为了兼容,在 Pagination 中添加了 selectComponentClass 属性,后期antd 官方优化了bug,可取消 配置selectComponentClass\n * @param props\n * @returns\n */\nexport const PaginationWrapper = (props: PaginationProps) => {\n const selectComponentClass = props.size === 'small' ? SmallSelect : MiddleSelect;\n return <Pagination {...props} selectComponentClass={selectComponentClass} />;\n};\n"],"names":["SmallSelect","props","_jsx","Select","_extends","size","placement","Option","MiddleSelect","PaginationWrapper","selectComponentClass","Pagination"],"mappings":";oKAcaA,EAAmC,SAAnCA,EAAoCC,GAAK,OACpDC,EAACC,EAAMC,EAAA,CAACC,KAAK,SAAYJ,EAAK,CAAEK,UAAU,YAAY,EAGxDN,EAAYO,OAASJ,EAAOI,OAMPJ,EAAOI,OAErB,IAAMC,EAAoC,SAApCA,EAAqCP,GAAK,OACrDC,EAACC,EAAMC,EAAA,CAACC,KAAK,UAAaJ,EAAK,CAAEK,UAAU,YAAY,EAGzDE,EAAaD,OAASJ,EAAOI,WCpBhBE,EAAoB,SAApBA,EAAqBR,GAChC,IAAMS,EAAuBT,EAAMI,OAAS,QAAUL,EAAcQ,EACpE,OAAON,EAACS,EAAUP,KAAKH,EAAK,CAAES,qBAAsBA,IACtD"}
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
+
import './alert-wrapper/index.css';
|
|
2
3
|
import './amount-fen-input/index.css';
|
|
3
4
|
import './amount-fen-input-form-item/index.css';
|
|
4
5
|
import './anchor-steps/index.css';
|
|
@@ -55,6 +56,7 @@ import './tag-list-select/index.css';
|
|
|
55
56
|
import './input-wrapper/index.css';
|
|
56
57
|
import './input-text-area-wrapper/index.css';
|
|
57
58
|
import './editor-wrapper/index.css';
|
|
59
|
+
import './error-boundary-wrapper/index.css';
|
|
58
60
|
import './fba-app/index.css';
|
|
59
61
|
import './file-import/index.css';
|
|
60
62
|
import './file-select/index.css';
|
|
@@ -82,6 +84,7 @@ import './search-menu/index.css';
|
|
|
82
84
|
import './selector-wrapper-search/index.css';
|
|
83
85
|
import './selector-wrapper-simple/index.css';
|
|
84
86
|
import './sms-count-down/index.css';
|
|
87
|
+
import './split-wrapper/index.css';
|
|
85
88
|
import './styles/index.css';
|
|
86
89
|
import './switch-confirm-wrapper/index.css';
|
|
87
90
|
import './tabs-wrapper/index.css';
|
|
@@ -97,5 +100,5 @@ import './tree-selector-wrapper/index.css';
|
|
|
97
100
|
import './tree-wrapper/index.css';
|
|
98
101
|
import './index.css';
|
|
99
102
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
100
|
-
export{AmountFenInput}from"./amount-fen-input/index.js";export{AmountFenInputFormItem}from"./amount-fen-input-form-item/index.js";export{AnchorSteps}from"./anchor-steps/index.js";export{ButtonOperate,ButtonOperateItemContent}from"./button-operate/index.js";export{ButtonWrapper}from"./button-wrapper/index.js";export{CardWrapper}from"./card-wrapper/index.js";export{CascaderWrapper}from"./cascader-wrapper/index.js";export{CheckList}from"./check-list/index.js";export{CheckboxWrapper}from"./checkbox-wrapper/index.js";export{ColorPickerWrapper}from"./color-picker-wrapper/index.js";export{ConfigProviderWrapper}from"./config-provider-wrapper/index.js";export{createDrawerWrapperModel}from"./create-drawer-wrapper-model/index.js";export{createModalWrapperModel}from"./create-modal-wrapper-model/index.js";export{CssNodeHover}from"./css-node-hover/index.js";export{DataRender}from"./data-render/index.js";export{DatePickerWrapper}from"./date-picker-wrapper/index.js";export{DateRangePickerWrapper}from"./date-range-picker-wrapper/index.js";export{DateRangePickerWrapperFormItem}from"./date-range-picker-wrapper-form-item/index.js";export{dialogAlert}from"./dialog-alert/index.js";export{dialogConfirm}from"./dialog-confirm/index.js";export{dialogDrawer}from"./dialog-drawer/index.js";export{DialogDrawerContent}from"./dialog-drawer-content/index.js";export{dialogLoading}from"./dialog-loading/index.js";export{dialogModal}from"./dialog-modal/index.js";export{DragCollapse}from"./drag-collapse/index.js";export{DragCollapseFormList}from"./drag-collapse-form-list/index.js";export{DragFormList}from"./drag-form-list/index.js";export{DragTable}from"./drag-table/index.js";export{DrawerWrapper}from"./drawer-wrapper/index.js";export{DropdownMenuWrapper}from"./dropdown-menu-wrapper/index.js";export{dynamicNode}from"./dynamic-node/index.js";export{EasyTable}from"./easy-table/index.js";export{EditableField}from"./editable-field/index.js";export{EditableFieldProvider}from"./editable-field-provider/index.js";export{EditableTable}from"./editable-table/index.js";export{EditorWrapper}from"./editor-wrapper/index.js";export{FbaApp}from"./fba-app/index.js";export{fbaHooks}from"./fba-hooks/index.js";export{fbaUtils}from"./fba-utils/index.js";export{FileImport}from"./file-import/index.js";export{FileSelect}from"./file-select/index.js";export{FlexLayout}from"./flex-layout/index.js";export{FormGrid}from"./form-grid/index.js";export{FormItemGroup}from"./form-item-group/index.js";export{FormItemHidden}from"./form-item-hidden/index.js";export{FormItemWrapper}from"./form-item-wrapper/index.js";export{FormListWrapper}from"./form-list-wrapper/index.js";export{Gap}from"./gap/index.js";export{IconWrapper}from"./icon-wrapper/index.js";export{InputSearchWrapper}from"./input-search-wrapper/index.js";export{InputTextAreaWrapper}from"./input-text-area-wrapper/index.js";export{InputWrapper}from"./input-wrapper/index.js";export{LabelValueLayout}from"./label-value-layout/index.js";export{LocalLoading}from"./local-loading/index.js";export{ModalAction}from"./modal-action/index.js";export{ModalWrapper}from"./modal-wrapper/index.js";export{PageFixedFooter}from"./page-fixed-footer/index.js";export{Page404}from"./page404/index.js";export{P as PaginationWrapper}from"./index-
|
|
103
|
+
export{AlertWrapper}from"./alert-wrapper/index.js";export{AmountFenInput}from"./amount-fen-input/index.js";export{AmountFenInputFormItem}from"./amount-fen-input-form-item/index.js";export{AnchorSteps}from"./anchor-steps/index.js";export{ButtonOperate,ButtonOperateItemContent}from"./button-operate/index.js";export{ButtonWrapper}from"./button-wrapper/index.js";export{CardWrapper}from"./card-wrapper/index.js";export{CascaderWrapper}from"./cascader-wrapper/index.js";export{CheckList}from"./check-list/index.js";export{CheckboxWrapper}from"./checkbox-wrapper/index.js";export{ColorPickerWrapper}from"./color-picker-wrapper/index.js";export{ConfigProviderWrapper}from"./config-provider-wrapper/index.js";export{createDrawerWrapperModel}from"./create-drawer-wrapper-model/index.js";export{createModalWrapperModel}from"./create-modal-wrapper-model/index.js";export{CssNodeHover}from"./css-node-hover/index.js";export{DataRender}from"./data-render/index.js";export{DatePickerWrapper}from"./date-picker-wrapper/index.js";export{DateRangePickerWrapper}from"./date-range-picker-wrapper/index.js";export{DateRangePickerWrapperFormItem}from"./date-range-picker-wrapper-form-item/index.js";export{dialogAlert}from"./dialog-alert/index.js";export{dialogConfirm}from"./dialog-confirm/index.js";export{dialogDrawer}from"./dialog-drawer/index.js";export{DialogDrawerContent}from"./dialog-drawer-content/index.js";export{dialogLoading}from"./dialog-loading/index.js";export{dialogModal}from"./dialog-modal/index.js";export{DragCollapse}from"./drag-collapse/index.js";export{DragCollapseFormList}from"./drag-collapse-form-list/index.js";export{DragFormList}from"./drag-form-list/index.js";export{DragTable}from"./drag-table/index.js";export{DrawerWrapper}from"./drawer-wrapper/index.js";export{DropdownMenuWrapper}from"./dropdown-menu-wrapper/index.js";export{dynamicNode}from"./dynamic-node/index.js";export{EasyTable}from"./easy-table/index.js";export{EditableField}from"./editable-field/index.js";export{EditableFieldProvider}from"./editable-field-provider/index.js";export{EditableTable}from"./editable-table/index.js";export{EditorWrapper}from"./editor-wrapper/index.js";export{ErrorBoundaryWrapper}from"./error-boundary-wrapper/index.js";export{FbaApp}from"./fba-app/index.js";export{fbaHooks}from"./fba-hooks/index.js";export{fbaUtils}from"./fba-utils/index.js";export{FileImport}from"./file-import/index.js";export{FileSelect}from"./file-select/index.js";export{FlexLayout}from"./flex-layout/index.js";export{FormGrid}from"./form-grid/index.js";export{FormItemGroup}from"./form-item-group/index.js";export{FormItemHidden}from"./form-item-hidden/index.js";export{FormItemWrapper}from"./form-item-wrapper/index.js";export{FormListWrapper}from"./form-list-wrapper/index.js";export{Gap}from"./gap/index.js";export{IconWrapper}from"./icon-wrapper/index.js";export{InputSearchWrapper}from"./input-search-wrapper/index.js";export{InputTextAreaWrapper}from"./input-text-area-wrapper/index.js";export{InputWrapper}from"./input-wrapper/index.js";export{LabelValueLayout}from"./label-value-layout/index.js";export{LocalLoading}from"./local-loading/index.js";export{ModalAction}from"./modal-action/index.js";export{ModalWrapper}from"./modal-wrapper/index.js";export{PageFixedFooter}from"./page-fixed-footer/index.js";export{Page404}from"./page404/index.js";export{P as PaginationWrapper}from"./index-6677fbfc.js";export{Permission}from"./permission/index.js";export{preDefinedClassName}from"./pre-defined-class-name/index.js";export{RadioGroupWrapper}from"./radio-group-wrapper/index.js";export{RelationTree}from"./relation-tree/index.js";export{RequestStatus}from"./request-status/index.js";export{RichTextEditor}from"./rich-text-editor/index.js";export{RichTextViewer}from"./rich-text-viewer/index.js";export{RollLocationCenter}from"./roll-location-center/index.js";export{RollLocationInView}from"./roll-location-in-view/index.js";export{RuleDescribe}from"./rule-describe/index.js";export{SearchMenu}from"./search-menu/index.js";export{SelectorWrapper}from"./selector-wrapper/index.js";export{SelectorWrapperSearch}from"./selector-wrapper-search/index.js";export{SelectorWrapperSimple}from"./selector-wrapper-simple/index.js";export{SimpleLayout}from"./simple-layout/index.js";export{SmsCountDown}from"./sms-count-down/index.js";export{SplitWrapper}from"./split-wrapper/index.js";export{styles}from"./styles/index.js";export{SwitchConfirmWrapper}from"./switch-confirm-wrapper/index.js";export{SwitchWrapper}from"./switch-wrapper/index.js";export{tableCellRender}from"./table-cell-render/index.js";export{TableScrollbar}from"./table-scrollbar/index.js";export{TableTitleTooltip}from"./table-title-tooltip/index.js";export{TabsWrapper}from"./tabs-wrapper/index.js";export{TagGroup}from"./tag-group/index.js";export{TagListSelect}from"./tag-list-select/index.js";export{TagWrapper}from"./tag-wrapper/index.js";export{TextCssEllipsis}from"./text-css-ellipsis/index.js";export{TextOverflowRender}from"./text-overflow-render/index.js";export{TimePickerWrapper}from"./time-picker-wrapper/index.js";export{TimeRangePickerWrapper}from"./time-range-picker-wrapper/index.js";export{TimeRangePickerWrapperFormItem}from"./time-range-picker-wrapper-form-item/index.js";export{TipsTitle}from"./tips-title/index.js";export{TipsWrapper}from"./tips-wrapper/index.js";export{TreeSelectorWrapper}from"./tree-selector-wrapper/index.js";export{TreeWrapper}from"./tree-wrapper/index.js";export{UploadWrapper}from"./upload-wrapper/index.js";import"./_rollupPluginBabelHelpers-a0769acd.js";import"@dimjs/utils/cjs/class-names";import"@flatbiz/utils";import"antd";import"react/jsx-runtime";import"react";import"@ant-design/icons/es/icons/MoreOutlined";import"@dimjs/lang/cjs/is-undefined";import"@dimjs/lang/cjs/is-plain-object";import"@dimjs/lang/cjs/is-string";import"@dimjs/lang/cjs/is-promise";import"@wove/react/cjs/hooks";import"@ant-design/icons/es/icons/LoadingOutlined";import"@ant-design/icons/es/icons/RedoOutlined";import"@dimjs/lang/cjs/is-array";import"@dimjs/utils/cjs/get";import"@dimjs/utils/cjs/extend";import"@dimjs/model";import"@dimjs/model-react";import"@wove/react/cjs/create-ctx";import"@ant-design/icons/es/icons/CloseCircleOutlined";import"@flatbiz/antd";import"antd/es/locale/en_US";import"antd/es/locale/zh_CN";import"dayjs";import"dayjs/locale/en";import"dayjs/locale/zh-cn";import"dayjs/plugin/advancedFormat";import"dayjs/plugin/customParseFormat";import"dayjs/plugin/localeData";import"dayjs/plugin/utc";import"dayjs/plugin/weekday";import"dayjs/plugin/weekOfYear";import"dayjs/plugin/weekYear";import"./index-ac189a77.js";import"./time-53b3f55f.js";import"react-dom/client";import"./dom-4d04aa64.js";import"./context-1f2093c6.js";import"ahooks";import"@dimjs/utils/cjs/array";import"@dnd-kit/core";import"@dnd-kit/sortable";import"@ant-design/icons/es/icons/DragOutlined";import"@dnd-kit/utilities";import"@dnd-kit/modifiers";import"@ant-design/icons/es/icons/SaveOutlined";import"@ant-design/icons/es/icons/ExclamationCircleFilled";import"@ant-design/icons/es/icons/DownOutlined";import"@ant-design/icons/es/icons/UpOutlined";import"react-is";import"@ant-design/icons/es/icons/CloseOutlined";import"@ant-design/icons/es/icons/CheckOutlined";import"@dimjs/lang/cjs/is-number";import"@ant-design/icons/es/icons/EditOutlined";import"./context-25d0b686.js";import"@ant-design/icons/es/icons/PlusOutlined";import"@dimjs/lang/cjs/is-boolean";import"@ant-design/icons/es/icons/DeleteOutlined";import"@wove/react/cjs/editor";import"./use-responsive-point-21b8c601.js";import"@dimjs/lang/cjs/is-deep-equal";import"@tinymce/tinymce-react";import"@ant-design/icons/es/icons/PlusCircleOutlined";import"@ant-design/icons/es/icons/FullscreenOutlined";import"@dimjs/utils/cjs/json";import"pubsub-js";import"@dimjs/lang/cjs/is-object";import"react-split";import"@dimjs/lang/cjs/is-empty";import"@ant-design/icons/es/icons/QuestionCircleOutlined";import"dayjs/plugin/isSameOrAfter";import"dayjs/plugin/isSameOrBefore";import"@ant-design/icons/es/icons/CaretDownFilled";import"dequal";import"@dimjs/utils/cjs/tree";import"react-dom";
|
|
101
104
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import './../fba-hooks/index.css';
|
|
3
3
|
import './index.css';
|
|
4
4
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
|
-
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-
|
|
5
|
+
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{hooks as t}from"@wove/react/cjs/hooks";import{isUndefinedOrNull as o}from"@flatbiz/utils";import{Input as n}from"antd";import{useRef as a,useState as i,createElement as u}from"react";import{fbaHooks as s}from"../fba-hooks/index.js";import"@dimjs/lang/cjs/is-array";import"../use-responsive-point-21b8c601.js";var f=["value"];var l=function l(m){var p=m.value,c=r(m,f);var v=a();var C=a(true);var d=i(0),g=d[0],h=d[1];s.useEffectCustom((function(){if(o(p)&&C.current)return;C.current=false;if(p===v.current&&!o(p))return;h(Date.now())}),[p]);var j=t.useCallbackRef((function(r){if(r.nativeEvent["inputType"]==="insertCompositionText"){return}v.current=r.target.value;m.onChange==null?void 0:m.onChange(r)}));var b=t.useCallbackRef((function(r){j(r)}));return u(n.Search,e({},c,{key:g,onCompositionEnd:b,onChange:j,defaultValue:p}))};export{l as InputSearchWrapper};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import './../fba-hooks/index.css';
|
|
3
3
|
import './index.css';
|
|
4
4
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
|
-
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-
|
|
5
|
+
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{hooks as o}from"@wove/react/cjs/hooks";import{Input as t}from"antd";import{isUndefinedOrNull as n}from"@flatbiz/utils";import{useRef as a,useState as i,createElement as u}from"react";import{fbaHooks as s}from"../fba-hooks/index.js";import"@dimjs/lang/cjs/is-array";import"../use-responsive-point-21b8c601.js";var f=["value","debounceDuration"];var l=function l(c){var m=c.value,p=c.debounceDuration,v=r(c,f);var b=a();var d=a(true);var C=i(0),g=C[0],j=C[1];s.useEffectCustom((function(){if(n(m)&&d.current)return;d.current=false;if(m===b.current&&!n(m))return;j(Date.now())}),[m]);var h=o.useDebounceCallback((function(r){if(r.nativeEvent["inputType"]==="insertCompositionText"){return}b.current=r.target.value;c.onChange==null?void 0:c.onChange(r)}),p||0);var k=o.useCallbackRef((function(r){h(r)}));return u(t.TextArea,e({},v,{key:g,onCompositionEnd:k,onChange:h,defaultValue:m}))};export{l as InputTextAreaWrapper};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import './../fba-hooks/index.css';
|
|
3
3
|
import './index.css';
|
|
4
4
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
|
-
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-
|
|
5
|
+
import{a as r,_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{hooks as o}from"@wove/react/cjs/hooks";import{isUndefinedOrNull as n}from"@flatbiz/utils";import{Input as t}from"antd";import{useRef as a,useState as i,createElement as u}from"react";import{fbaHooks as s}from"../fba-hooks/index.js";import"@dimjs/lang/cjs/is-array";import"../use-responsive-point-21b8c601.js";var f=["value","debounceDuration"];var l=function l(c){var m=c.value,p=c.debounceDuration,v=r(c,f);var b=a();var d=a(true);var C=i(0),g=C[0],j=C[1];s.useEffectCustom((function(){if(n(m)&&d.current)return;d.current=false;if(m===b.current&&!n(m))return;j(Date.now())}),[m]);var h=o.useDebounceCallback((function(r){if(r.nativeEvent["inputType"]==="insertCompositionText"){return}b.current=r.target.value;c.onChange==null?void 0:c.onChange(r)}),p||0);var k=o.useCallbackRef((function(r){h(r)}));return u(t,e({},v,{key:g,onCompositionEnd:k,onChange:h,defaultValue:m}))};export{l as InputWrapper};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import './index.css';
|
|
3
3
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
-
import{classNames as r}from"@dimjs/utils/cjs/class-names";import{_ as e}from"../_rollupPluginBabelHelpers-
|
|
4
|
+
import{classNames as r}from"@dimjs/utils/cjs/class-names";import{_ as e}from"../_rollupPluginBabelHelpers-a0769acd.js";import{getUuid as l}from"@flatbiz/utils";import{Descriptions as t}from"antd";import{useMemo as a}from"react";import{jsx as o}from"react/jsx-runtime";var n=function n(i){var u=i.labelWidth==="auto"?"auto":(i.labelWidth||120)+"px";var m=e({"--v-label-value-layout-Width":u},i.style);var s=r("v-label-value-layout",i.className);var p=a((function(){var r=i.options.filter((function(r){return!r.hidden}));return r.map((function(r){return e({key:l()},r)}))}),[i.options]);return o(t,{column:i.column||1,bordered:i.bordered,size:"small",className:s,style:m,children:p.map((function(r){return o(t.Item,{label:r.label,span:r.span,children:r.value},r.key)}))})};export{n as LabelValueLayout};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,5 +4,5 @@ import './../dynamic-node/index.css';
|
|
|
4
4
|
import './../fba-hooks/index.css';
|
|
5
5
|
import './index.css';
|
|
6
6
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
7
|
-
import{fbaUtils as r}from"../fba-utils/index.js";import{createCtx as e}from"@wove/react/cjs/create-ctx";import{classNames as n}from"@dimjs/utils/cjs/class-names";import{isDeepEqual as t}from"@dimjs/lang/cjs/is-deep-equal";import{_ as i}from"../_rollupPluginBabelHelpers-
|
|
7
|
+
import{fbaUtils as r}from"../fba-utils/index.js";import{createCtx as e}from"@wove/react/cjs/create-ctx";import{classNames as n}from"@dimjs/utils/cjs/class-names";import{isDeepEqual as t}from"@dimjs/lang/cjs/is-deep-equal";import{_ as i}from"../_rollupPluginBabelHelpers-a0769acd.js";import{toArray as a}from"@flatbiz/utils";import{Result as o,Button as s,Spin as c}from"antd";import{forwardRef as l,useState as u,useRef as m,useMemo as f,useImperativeHandle as d}from"react";import{dynamicNode as v}from"../dynamic-node/index.js";import{fbaHooks as p}from"../fba-hooks/index.js";import{jsx as h,jsxs as g}from"react/jsx-runtime";import"@dimjs/lang/cjs/is-array";import"react-dom/client";import"../dom-4d04aa64.js";import"@wove/react/cjs/hooks";import"../use-responsive-point-21b8c601.js";var y=e(),j=y[0],b=y[1];var x=l((function(r,e){var l=r.serviceConfig,y=r.isAsync,j=r.children,x=r.errorRender;var C=u("init"),N=C[0],P=C[1];var R=u(),q=R[0],k=R[1];var w=r.loadingHeight===undefined?100:r.loadingHeight;var E=m(null);var H=m();var T=m();var z=p.usePrevious(l.params);var A=f((function(){var r;if(!l.params||a(l.invalidParamKey).length===0){return l.params}var e=i({},l.params);(r=l.invalidParamKey)==null?void 0:r.forEach((function(r){e[r]=undefined}));return e}),[l]);var K=function r(){T.current=undefined;H.current=v.append({content:h(c,{spinning:true}),getContainer:function r(){return E.current}}).elementId};var L=function r(){v.remove(H.current)};var _=function r(e){return new Promise((function(r,n){var t=function(r){return function(e){try{L();return r&&r.call(this,e)}catch(r){return n(r)}}.bind(this)}.bind(this);var a;var o=function(){try{return r()}catch(r){return n(r)}};var s=function(r){try{console.error(r);P("error");T.current=r.message;return t(o)()}catch(r){return t(n)(r)}};try{K();return Promise.resolve(l.onRequest(i({},A,e))).then((function(r){try{a=r;P("success");k(a);return t(o)()}catch(r){return s(r)}}),s)}catch(r){s(r)}}))};p.useEffectCustomAsync(_,[]);p.useEffectCustom((function(){if(z){if(!t(l.params,z)){void _()}}}),[z,l.params]);d(e,(function(){return{onRefresh:_}}));if(N==="error"){if(x){return x(q)}return h(b,{value:{onRequest:_},children:g("div",{className:"local-loading-error",children:[h("div",{className:"local-loading-area",ref:E}),h(o,{status:"error",subTitle:T.current||"数据处理异常",extra:[h(s,{type:"primary",ghost:true,size:"small",onClick:function r(){P("init");setTimeout((function(){void _()}),100)},children:"重新获取"},"console")]})]})})}if(N!=="success"&&!y){return h("div",{className:"fba-local-loading-process",style:{height:w,display:"flex",justifyContent:"center",position:"relative",backgroundColor:"#fff"},children:h("div",{className:"local-loading-area",ref:E})})}return h(b,{value:{onRequest:_},children:g("div",{className:n("fba-local-loading",r.className),style:r.style,children:[h("div",{className:"local-loading-area",ref:E}),h("div",{className:"local-loading-content",style:r.contentStyle,children:j(q)})]})})}));var C=r.attachPropertiesToComponent(x,{useLocalLoading:function r(){var e=j();return{onRequest:function r(n){e.onRequest(n)}}}});export{C as LocalLoading};
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import './index.css';
|
|
3
3
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
-
import{_ as r}from"../_rollupPluginBabelHelpers-
|
|
4
|
+
import{_ as r}from"../_rollupPluginBabelHelpers-a0769acd.js";import{useState as n,isValidElement as o,Fragment as e}from"react";import{jsxs as t,jsx as i}from"react/jsx-runtime";var l=function l(c){var u=c.action,a=c.children;var s=n(false),p=s[0],f=s[1];var v=function r(n){return new Promise((function(r,e){var t;if(o(u)){t=u.props.onClick;if(typeof t==="function"){return Promise.resolve(t==null?void 0:t(n)).then(function(r){try{return i.call(this)}catch(r){return e(r)}}.bind(this),e)}function i(){return l.call(this)}return i.call(this)}function l(){f(true);return r()}return l.call(this)}))};var h=function r(){f(false)};var m=o(a)?a:a({onClose:h,open:p});return t(e,{children:[o(u)?i(u.type,r({},u.props,{onClick:v})):u==null?void 0:u({onClick:v,onClose:h,open:p}),i(m.type,r({open:p,onClose:h,onCancel:h},m.props))]})};export{l as ModalAction};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import './../fba-hooks/index.css';
|
|
3
3
|
import './index.css';
|
|
4
4
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
|
-
import{classNames as r}from"@dimjs/utils/cjs/class-names";import{a as e,_ as o}from"../_rollupPluginBabelHelpers-
|
|
5
|
+
import{classNames as r}from"@dimjs/utils/cjs/class-names";import{a as e,_ as o}from"../_rollupPluginBabelHelpers-a0769acd.js";import{Space as a,Button as n,Modal as i}from"antd";import{Fragment as l}from"react";import{fbaHooks as t}from"../fba-hooks/index.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import"@dimjs/lang/cjs/is-array";import"@wove/react/cjs/hooks";import"../use-responsive-point-21b8c601.js";var d=["loading","okText","cancelText","onCancel","onOk","hideOkBtn"];var p=function r(i){var t=i.loading,p=i.okText,m=p===void 0?"保存":p,h=i.cancelText,u=h===void 0?"取消":h,f=i.onCancel,v=i.onOk,k=i.hideOkBtn,N=e(i,d);return s(l,{children:c(a,{size:"middle",children:[s(n,o({},N.cancelButtonProps,{className:"cancel-btn",onClick:f,children:u})),k!=true&&s(n,o({type:"primary"},N.okButtonProps,{className:"ok-btn",onClick:v,loading:t,children:m}))]})})};var m=["pageLoading","className","width","children"];var h=function r(){return s("div",{className:"modal-wrapper-loader",children:c("div",{className:"loader-wrapper",children:[s("div",{className:"loader-inner"}),s("div",{className:"loader-text",children:"LOADING"})]})})};var u=function r(e){return c(l,{children:[s("div",{className:"modal-wrapper-content",children:e.children}),e.operationProps?s(f,{children:s(p,o({},e.operationProps))}):null]})};var f=function r(e){return s("div",{className:"modal-wrapper-footer",children:e.children})};var v=function a(n){var d=n.pageLoading,p=n.className,u=n.width,f=n.children,v=e(n,m);t.useEffectCustom((function(){if(n["operationProps"]){throw new Error("ModalWrapper组件升级,参数operationProps用法变更,请及时更新")}}),[]);return s(i,o({className:r("modal-wrapper",p),keyboard:false,destroyOnClose:true,forceRender:false},v,{width:u||600,footer:null,children:c(l,{children:[f,d&&s(h,{})]})}))};v.Content=u;v.Footer=f;export{v as ModalWrapper};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import './index.css';
|
|
3
3
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
4
|
-
export{P as PaginationWrapper}from"../index-
|
|
4
|
+
export{P as PaginationWrapper}from"../index-6677fbfc.js";import"../_rollupPluginBabelHelpers-a0769acd.js";import"antd";import"react";import"react/jsx-runtime";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import './../fba-hooks/index.css';
|
|
3
3
|
import './index.css';
|
|
4
4
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
|
-
import{hooks as e}from"@wove/react/cjs/hooks";import{_ as n}from"../_rollupPluginBabelHelpers-
|
|
5
|
+
import{hooks as e}from"@wove/react/cjs/hooks";import{_ as n}from"../_rollupPluginBabelHelpers-a0769acd.js";import{classNames as i}from"@dimjs/utils/cjs/class-names";import{Tag as r,Empty as t,Form as l}from"antd";import{useState as a,createElement as o,Fragment as c}from"react";import{fbaHooks as s}from"../fba-hooks/index.js";import{jsxs as d,jsx as u}from"react/jsx-runtime";import"@dimjs/lang/cjs/is-array";import"../use-responsive-point-21b8c601.js";var m=function e(n){var t;var l={"--relation-tagline-width":(n.tagLineWidth||40)+"px","--relation-group-indent-width":(n.indentWidth||80)+"px","--relation-tag-width":(n.tagWidth||26)+"px","--relation-line-color":""+(n.lineColor||"#fda148")};var a=i("relation-list",{"relation-list-only-one":n.onlyOne,"relation-list-only-no-main-one":n.onlyOne},n.className);var o=n.solt1,c=n.solt2;return d("div",{className:a,style:l,children:[o?d("div",{className:"relation-list-solt1",children:[u("div",{className:"relation-list-line"}),u("div",{className:"relation-list-label",children:n.label}),n.tagName?u(r,{className:"relation-item-tag",color:n.tagColor||"#fecd96",onClick:(t=n.onTagClick)==null?void 0:t.bind(null,n.tagName),children:n.tagName}):null,o()]}):null,c?u("div",{className:"relation-list-solt2",children:c()}):null]})};var f=function e(n){return u("div",{className:i("relation-group-list",n.className),children:n.children})};var h=function e(n){var r=i("relation-item",{"relation-item-line":true,"relation-item-first":n.isFirst,"relation-item-last":n.isLast,"relation-item-only-one":n.onlyOne});return u("div",{className:r,style:n.style,children:n.children})};var v=function e(n,i){var r;if(n.uid===i){n["_delete"]=true}n==null||(r=n.relationList)==null?void 0:r.forEach((function(r){var t,l;if(r.uid===i||((t=r.customData)==null?void 0:t.uid)===i){r["_delete"]=true;if(n.relationList.length===1){n["_delete"]=true}}(l=r.children)==null?void 0:l.forEach((function(n){e(n,i)}))}))};var g=function e(n){n.relationList=n.relationList||[];n.relationList=n.relationList.filter((function(e){return!e["_delete"]}));n.relationList.forEach((function(n){n.children=n.children||[];n.children=n.children.filter((function(e){return!e["_delete"]}));n.children.forEach((function(n){e(n)}))}));n.relationList=n.relationList.filter((function(e){if(!e.customData&&!e.children){return false}if(!e.customData&&(!e.children||e.children.length===0)){return false}return true}))};var p=function e(n){var r=n.relationItem;var t=n.dataSource;var a=n.index;if(r.customData&&r.children&&r.children.length>0){var o;return d(c,{children:[u(h,{isFirst:a===0,isLast:a===t.relationList.length-1,onlyOne:n.onlyOne,children:n.relationItemRender(r.customData,r.extraData)}),u(f,{children:(o=r.children)==null?void 0:o.map((function(e){return u(C,{dataSource:e,relationItemRender:n.relationItemRender,relationProps:n.relationProps,onTagClick:n.onTagClick,className:n.className},e.uid)}))})]},r.uid)}if(r.children&&r.children.length>0){var s;return u("div",{className:i("form-list-no-main-group",{"form-list-no-main-group":a===0}),children:(s=r.children)==null?void 0:s.map((function(e){return u(C,{dataSource:e,relationItemRender:n.relationItemRender,className:i("form-list-no-main",{"form-list-no-main-first":a===0,"form-list-no-main-last":a===t.relationList.length-1}),relationProps:n.relationProps,onTagClick:n.onTagClick},e.uid)}))},r.uid)}if(r.customData){return u(h,{isFirst:a===0,isLast:a===t.relationList.length-1,onlyOne:n.onlyOne,children:u(l,{component:false,children:n.relationItemRender(r.customData,r.extraData)})},r.uid)}return null};var C=function e(i){var r=i.dataSource;var t=r.relationList||[];var l=t[t.length-1];var a=t.length>0&&l.customData&&l.children&&l.children.length>0;var s=t.length==1;return o(m,n({},i.relationProps,{tagName:r.tagName,key:r.uid,onlyOne:s,label:r.label,className:i.className,onTagClick:function e(){i.onTagClick==null?void 0:i.onTagClick(r.uid,r.extraData)},solt1:function e(){return u(c,{children:t.map((function(e,r){var l=a&&r===t.length-1;return u(p,{dataSource:i.dataSource,relationItemRender:i.relationItemRender,relationProps:i.relationProps,onTagClick:i.onTagClick,relationItem:l?n({},e,{children:undefined}):e,index:r,onlyOne:s},r)}))})},solt2:function n(){if(a&&l.children&&l.children.length>0){return u(f,{children:l.children.map((function(n){return u(e,{dataSource:n,relationItemRender:i.relationItemRender,relationProps:i.relationProps,onTagClick:i.onTagClick},n.uid)}))},l.uid)}return null}}))};var N=function r(l){var o=a(),c=o[0],d=o[1];s.useEffectCustom((function(){d(l.dataSource)}),[l.dataSource]);var m=e.useCallbackRef((function(e,i,r){if(e){e[i]=r;l.onChange==null?void 0:l.onChange(n({},c))}}));var f=function e(n,i){for(var r=0;r<n.length;r++){var t=n[r];for(var l=0;l<t.relationList.length;l++){var a;var o=t.relationList[l];if(((a=o.customData)==null?void 0:a.uid)===i){return{relationTree:t,index:l,element:o}}else if(o.children){var c=e(o.children,i);if(c){return c}}}}return null};var h=e.useCallbackRef((function(e,n){var i;if(!c)return;var r=f([c],e.uid);if((i=r.relationTree)!=null&&i.relationList){var t;(t=r.relationTree)==null?void 0:t.relationList.splice(r.index+1,0,n);l.onChange==null?void 0:l.onChange(c)}}));var p=e.useCallbackRef((function(e,n){if(!c)return;var i=f([c],e.uid);if(i.element){i.element.children=(i.element.children||[]).concat(n);l.onChange==null?void 0:l.onChange(c)}}));var N=e.useCallbackRef((function(e){if(!c)return;v(c,e);if(c["_delete"]){l.onChange==null?void 0:l.onChange(undefined)}else{g(c);l.onChange==null?void 0:l.onChange(c)}}));if(!c)return u(t,{description:"暂无数据"});return u("div",{className:i("relation-tree",l.className),children:u(C,{dataSource:c,relationProps:l.relationProps,onTagClick:l.onTagClick,relationItemRender:function e(n,i){return l.children(n,{add:h,addChildren:p,remove:N,onChange:m.bind(null,n)},i)}})})};export{N as RelationTree};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@ import './../dynamic-node/index.css';
|
|
|
3
3
|
import './../fba-hooks/index.css';
|
|
4
4
|
import './index.css';
|
|
5
5
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
6
|
-
import{a as e,_ as n}from"../_rollupPluginBabelHelpers-
|
|
6
|
+
import{a as e,_ as n}from"../_rollupPluginBabelHelpers-a0769acd.js";import{classNames as t}from"@dimjs/utils/cjs/class-names";import{hooks as r}from"@wove/react/cjs/hooks";import{Editor as i}from"@tinymce/tinymce-react";import{useKeyPress as o}from"ahooks";import{Fragment as a,useRef as l,useState as s}from"react";import c from"@ant-design/icons/es/icons/PlusCircleOutlined";import{Image as u}from"antd";import{dynamicNode as m}from"../dynamic-node/index.js";import{fbaHooks as d}from"../fba-hooks/index.js";import{jsx as p,Fragment as f,jsxs as v}from"react/jsx-runtime";import"react-dom/client";import"../dom-4d04aa64.js";import"@dimjs/lang/cjs/is-array";import"../use-responsive-point-21b8c601.js";var g=function e(n){var t=n.visible,r=n.url;d.useEffectCustom((function(){if(t){m.append({content:p(c,{onClick:n.close,className:"preview-image-popup-close",twoToneColor:"#1890ff"})})}else{m.remove()}}),[t]);if(!r)return p(f,{});return p(a,{children:p(u,{style:{left:"100px"},preview:{className:"preview-image-popup",maskStyle:{backgroundColor:"rgba(0,0,0,0.85)"},visible:t,src:r,onVisibleChange:function e(){n.close()}}},r)})};var h=["onUploadImage","onChange","className"];var y=function a(c){var u,m,d,f;var y=c.onUploadImage,b=c.onChange,C=c.className,k=e(c,h);var x=l(null);var w=s(""),_=w[0],j=w[1];var E=((u=c.init)==null?void 0:u.img_ratio)||[{min:0,max:1e3,ratio:.5},{min:1e3,ratio:.3}];o((function(){return true}),(function(e){try{if(e.type==="keyup"&&e.key==="Escape"){var n;var t=(n=x.current)==null?void 0:n.editorContainer.classList.contains("tox-fullscreen");if(t){var r;(r=x.current)==null?void 0:r.editorCommands.execCommand("mceFullScreen")}}}catch(e){}}),{events:["keydown","keyup"]});var I=r.useCallbackRef((function(e,n){try{if(e.keyCode==27){var t;var r=(t=x.current)==null?void 0:t.editorContainer.classList.contains("tox-fullscreen");if(r){var i;(i=x.current)==null?void 0:i.editorCommands.execCommand("mceFullScreen")}}}catch(e){}c.onKeyDown==null?void 0:c.onKeyDown(e,n)}));var S=r.useCallbackRef((function(e,n){x.current=n;n.on("FullscreenStateChanged",(function(e){c.onFullScreenChange==null?void 0:c.onFullScreenChange(e.state)}));try{var t;(t=n.iframeElement)==null||(t=t.contentDocument)==null?void 0:t.addEventListener("click",(function(e){var n;if(c.imgPreview&&((n=e.target)==null?void 0:n["tagName"])==="IMG"){j(e.target["src"])}}),true)}catch(e){}k.onInit==null?void 0:k.onInit(e,n)}));var F=r.useCallbackRef((function(e,n){x.current=n;k.onEditorChange==null?void 0:k.onEditorChange(e,n);b==null?void 0:b(e)}));var N="https://file.40017.cn/tcsk/tinymce@6.4.1";var P=function e(n){if(E.length===0)return 1;for(var t=0;t<E.length;t++){var r=E[t];if(r.max){if(n>=r.min&&n<=r.max)return r.ratio}else{if(n>=r.min)return r.ratio}}return 1};var z=r.useCallbackRef((function(e,n){try{var t=n.node.children||[];if(t.length===1&&t[0].nodeName==="IMG"){t[0].setAttribute("style","display:none");var r=document.createElement("img");r.src=t[0].getAttribute("src");r.onload=function(){var n=P(r.width);e.execCommand("mceInsertContent",true,'<img src="'+r.src+'" width="'+r.width*n+'" height="'+r.height*n+'" />')}}}catch(e){}}));return v("div",{className:t("v-editor-wrapper",C),children:[p(i,n({tinymceScriptSrc:N+"/tinymce.min.js"},k,{onInit:S,onKeyDown:I,onEditorChange:F,init:n({promotion:false,language:"zh-Hans",height:500,paste_data_images:y?true:false,paste_postprocess:z,autosave_ask_before_unload:false,base_url:N,autoresize_bottom_margin:0,images_upload_handler:function e(n){return new Promise((function(e,t){var r,i,o;var a=function(n){try{return e(Promise.reject((n==null?void 0:n.message)||"图片上传异常"))}catch(e){return t(e)}};try{r=n.blob();i=new File([r],r.name,{type:r.type});return Promise.resolve(y==null?void 0:y(i)).then((function(n){try{o=n;return e(Promise.resolve(o))}catch(e){return a(e)}}),a)}catch(e){a(e)}}))},plugins:"lists link image advlist charmap preview fullscreen code table help codesample "+(((m=c.init)==null?void 0:m.plugins_append)||""),toolbar:"undo redo fullscreen preview | bold italic underline strikethrough |"+"fontsize blocks |"+"forecolor backcolor removeformat |"+"numlist bullist advlist |"+"alignleft aligncenter alignright alignjustify |"+"outdent indent |"+"hr image link code codesample |"+(((d=c.init)==null?void 0:d.toolbar_append)||""),font_size_formats:"8px 10px 12px 14px 16px 18px 24px 36px 48px"},c.init,{content_style:"img {max-width:100%;} table{width:100%} "+((f=c.init)==null?void 0:f.content_style)})})),p(g,{visible:!!_,url:_,close:function e(){j("")}})]})};export{y as RichTextEditor};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,5 +5,5 @@ import './../rich-text-editor/index.css';
|
|
|
5
5
|
import './../dynamic-node/index.css';
|
|
6
6
|
import './index.css';
|
|
7
7
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
8
|
-
import e from"@ant-design/icons/es/icons/FullscreenOutlined";import{classNames as i}from"@dimjs/utils/cjs/class-names";import{hooks as r}from"@wove/react/cjs/hooks";import{useKeyPress as o}from"ahooks";import{useState as t,useRef as n}from"react";import{fbaHooks as s}from"../fba-hooks/index.js";import{IconWrapper as a}from"../icon-wrapper/index.js";import{RichTextEditor as c}from"../rich-text-editor/index.js";import{jsxs as l,jsx as m}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-
|
|
8
|
+
import e from"@ant-design/icons/es/icons/FullscreenOutlined";import{classNames as i}from"@dimjs/utils/cjs/class-names";import{hooks as r}from"@wove/react/cjs/hooks";import{useKeyPress as o}from"ahooks";import{useState as t,useRef as n}from"react";import{fbaHooks as s}from"../fba-hooks/index.js";import{IconWrapper as a}from"../icon-wrapper/index.js";import{RichTextEditor as c}from"../rich-text-editor/index.js";import{jsxs as l,jsx as m}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-a0769acd.js";import"@dimjs/lang/cjs/is-array";import"../use-responsive-point-21b8c601.js";import"antd";import"@tinymce/tinymce-react";import"@ant-design/icons/es/icons/PlusCircleOutlined";import"../dynamic-node/index.js";import"react-dom/client";import"../dom-4d04aa64.js";var u=function u(d){var p=t(false),f=p[0],v=p[1];var j=n();o((function(){return true}),(function(e){if(e.type==="keyup"&&e.key==="Escape"&&f){v(false)}}),{events:["keydown","keyup"]});var b=r.useCallbackRef((function(){v(!f)}));var y=r.useCallbackRef((function(e,i){j.current=i;d.onInit==null?void 0:d.onInit(i)}));s.useEffectCustom((function(){var e;(e=j.current)==null?void 0:e.editorCommands.execCommand("mceAutoResize")}),[d.value]);return l("div",{className:i("fba-editor-viewer",{"fba-editor-viewer-fixed":f},d.className),style:d.style,children:[d.children,d.fullscreen&&d.value&&m("div",{className:"fba-editor-viewer-icon",children:m(a,{hoverTips:d.fullscreenIconTips,icon:m(e,{}),onClick:b})}),m(c,{value:d.value,onInit:y,imgPreview:true,disabled:true,init:{plugins:"autoresize",menubar:false,toolbar:"",statusbar:false}})]})};export{u as RichTextViewer};
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import './../fba-hooks/index.css';
|
|
3
3
|
import './index.css';
|
|
4
4
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
|
-
import{classNames as r}from"@dimjs/utils/cjs/class-names";import{useMutationObserver as e}from"ahooks";import{useRef as o}from"react";import{fbaHooks as t}from"../fba-hooks/index.js";import{jsx as i}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-
|
|
5
|
+
import{classNames as r}from"@dimjs/utils/cjs/class-names";import{useMutationObserver as e}from"ahooks";import{useRef as o}from"react";import{fbaHooks as t}from"../fba-hooks/index.js";import{jsx as i}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-a0769acd.js";import"@dimjs/lang/cjs/is-array";import"@wove/react/cjs/hooks";import"../use-responsive-point-21b8c601.js";import"antd";var l=function l(a){var c=o(null);var n=a.behavior||"smooth";var v=a.direction||"vertical";var s=function r(e){var o,t;var i=(o=c.current)==null?void 0:o.querySelector(".roll-location-center-"+e);var l=(t=c.current)==null?void 0:t.offsetHeight;var a=i.offsetTop;var v=i.offsetHeight;if(a<=v){var s;(s=c.current)==null?void 0:s.scrollTo({top:0,behavior:n})}else{var u=a-l/2+v/2;if(u>0){var f;(f=c.current)==null?void 0:f.scrollTo({top:u,behavior:n})}else{var m;(m=c.current)==null?void 0:m.scrollTo({top:0,behavior:n})}}};var u=function r(e){var o,t;var i=(o=c.current)==null?void 0:o.querySelector(".roll-location-center-"+e);var l=(t=c.current)==null?void 0:t.offsetWidth;var a=i.offsetLeft;var v=i.offsetWidth;if(a<=v){var s;(s=c.current)==null?void 0:s.scrollTo({left:0,behavior:n})}else{var u=a-l/2+v/2;if(u>0){var f;(f=c.current)==null?void 0:f.scrollTo({left:u,behavior:n})}else{var m;(m=c.current)==null?void 0:m.scrollTo({left:0,behavior:n})}}};t.useEffectCustom((function(){if(a.activeKey){if(v==="vertical"){s(a.activeKey)}else{u(a.activeKey)}}}),[a.activeKey]);e((function(){if(a.activeKey){if(v==="vertical"){s(a.activeKey)}else{u(a.activeKey)}}}),c,{subtree:true,childList:true,characterData:true});return i("div",{className:r("roll-location-center","roll-location-center-"+v,a.className),style:a.style,ref:c,children:a.renderList.map((function(r){return i("div",{className:"roll-location-center-"+r.activeKey,children:r.render},r.activeKey)}))})};export{l as RollLocationCenter};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import './../fba-hooks/index.css';
|
|
3
3
|
import './index.css';
|
|
4
4
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
|
-
import{classNames as r}from"@dimjs/utils/cjs/class-names";import{useMutationObserver as e}from"ahooks";import{useRef as i}from"react";import{fbaHooks as t}from"../fba-hooks/index.js";import{jsx as o}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-
|
|
5
|
+
import{classNames as r}from"@dimjs/utils/cjs/class-names";import{useMutationObserver as e}from"ahooks";import{useRef as i}from"react";import{fbaHooks as t}from"../fba-hooks/index.js";import{jsx as o}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-a0769acd.js";import"@dimjs/lang/cjs/is-array";import"@wove/react/cjs/hooks";import"../use-responsive-point-21b8c601.js";import"antd";var l=function l(a){var v=i(null);var c=a.behavior||"smooth";var n=a.activeOffset||0;var s=a.direction||"vertical";var u=function r(e){try{var i,t,o;var l=(i=v.current)==null?void 0:i.querySelector(".roll-location-in-view-item-"+e);var a=(t=v.current)==null?void 0:t.offsetHeight;var s=(o=v.current)==null?void 0:o.scrollTop;var u=l.offsetTop;var f=u-s;var m=l.offsetHeight;if(u===0){var d;(d=v.current)==null?void 0:d.scrollTo({top:0,behavior:c})}else{if(f<0){var h;(h=v.current)==null?void 0:h.scrollTo({top:u-n,behavior:c})}else if(f>=0&&f+m<a){}else{var p;var y=u-(a-m);(p=v.current)==null?void 0:p.scrollTo({top:y+n,behavior:c})}}}catch(r){}};var f=function r(e){try{var i,t,o;var l=(i=v.current)==null?void 0:i.querySelector(".roll-location-in-view-item-"+e);var a=(t=v.current)==null?void 0:t.offsetWidth;var s=(o=v.current)==null?void 0:o.scrollLeft;var u=l.offsetLeft;var f=u-s;var m=l.offsetWidth;if(u===0){var d;(d=v.current)==null?void 0:d.scrollTo({left:0,behavior:c})}else{if(f<0){var h;(h=v.current)==null?void 0:h.scrollTo({left:u-n,behavior:c})}else if(f>=0&&f+m<a){}else{var p;var y=u-(a-m);(p=v.current)==null?void 0:p.scrollTo({left:y+n,behavior:c})}}}catch(r){}};t.useEffectCustom((function(){if(a.activeKey){if(s==="vertical"){u(a.activeKey)}else{f(a.activeKey)}}}),[a.activeKey]);e((function(){if(a.activeKey){if(s==="vertical"){u(a.activeKey)}else{f(a.activeKey)}}}),v,{subtree:true,childList:true,characterData:true});return o("div",{className:r("roll-location-in-view","roll-location-in-view-"+s,a.className),style:a.style,ref:v,children:a.renderList.map((function(r){return o("div",{className:"roll-location-in-view-item-"+r.activeKey,children:r.render},r.activeKey)}))})};export{l as RollLocationInView};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@ import './../fba-hooks/index.css';
|
|
|
3
3
|
import './../flex-layout/index.css';
|
|
4
4
|
import './index.css';
|
|
5
5
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
6
|
-
import{classNames as e}from"@dimjs/utils/cjs/class-names";import{isUndefinedOrNull as i}from"@flatbiz/utils";import{fbaHooks as l}from"../fba-hooks/index.js";import{FlexLayout as t}from"../flex-layout/index.js";import{jsxs as r,jsx as s}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-
|
|
6
|
+
import{classNames as e}from"@dimjs/utils/cjs/class-names";import{isUndefinedOrNull as i}from"@flatbiz/utils";import{fbaHooks as l}from"../fba-hooks/index.js";import{FlexLayout as t}from"../flex-layout/index.js";import{jsxs as r,jsx as s}from"react/jsx-runtime";import"../_rollupPluginBabelHelpers-a0769acd.js";import"@dimjs/lang/cjs/is-array";import"@wove/react/cjs/hooks";import"react";import"../use-responsive-point-21b8c601.js";import"antd";var c=function c(a){var n=i(a.showTitleIndex)?true:a.showTitleIndex;var m=l.useThemeToken();var d={"--rule-describe-colorPrimary":m.colorPrimary};return r("div",{className:e("v-rule-describe",a.className),style:d,children:[a.title?s("div",{className:e("v-rule-describe-title",{"v-rule-describe-title-sign":a.titleSign}),children:a.title}):null,a.ruleDataList.map((function(e,i){if(n&&e.title){return r("div",{className:"v-rule-describe-item",children:[r(t,{fullIndex:1,direction:"horizontal",className:"v-rule-describe-item-title",style:a.ruleItemTitleStyle,children:[r("span",{className:"v-rule-describe-item-title-index",children:[i+1,". "]}),s("span",{className:"v-rule-describe-item-title-content",children:e.title})]}),e.desc?r(t,{direction:"horizontal",className:"v-rule-describe-item-desc",style:a.ruleItemDescStyle,fullIndex:1,children:[s("span",{className:"v-rule-describe-item-title-index"}),s("span",{className:"v-rule-describe-item-title-content",children:e.desc})]}):null]},i)}return r("div",{className:"v-rule-describe-item",children:[e.title?s("div",{className:"v-rule-describe-item-title",style:a.ruleItemTitleStyle,children:e.title}):null,e.desc?s("div",{className:"v-rule-describe-item-desc",style:a.ruleItemDescStyle,children:e.desc}):null]},i)}))]})};export{c as RuleDescribe};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/esm/search-menu/index.js
CHANGED
|
@@ -3,5 +3,5 @@ import './../fba-hooks/index.css';
|
|
|
3
3
|
import './../input-search-wrapper/index.css';
|
|
4
4
|
import './index.css';
|
|
5
5
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
6
|
-
import{hooks as e}from"@wove/react/cjs/hooks";import{_ as r}from"../_rollupPluginBabelHelpers-
|
|
6
|
+
import{hooks as e}from"@wove/react/cjs/hooks";import{_ as r}from"../_rollupPluginBabelHelpers-a0769acd.js";import{cloneState as n}from"@dimjs/model";import{treeFieldNameChangeAdapter as l,treeFilter as i,treeToArray as o,valueIsEqual as t}from"@flatbiz/utils";import{Menu as a}from"antd";import{useState as u,useRef as c,useMemo as d}from"react";import{fbaHooks as s}from"../fba-hooks/index.js";import{InputSearchWrapper as f}from"../input-search-wrapper/index.js";import{jsxs as m,jsx as p}from"react/jsx-runtime";import"@dimjs/lang/cjs/is-array";import"../use-responsive-point-21b8c601.js";function v(v){var h=v.value,y=v.onChange,k=v.dataSource,b=v.searchKeyList,j=v.wrapStyle,g=v.style,C=v.placeholder,w=v.fieldNames,S=v.renderItem,x=v.lazySearch,N=v.className;var K=u([]),z=K[0],E=K[1];var I=c();var P=d((function(){return r({label:"label",key:"key",children:"children"},w)}),[w]);var _=b!=null&&b.length?b:[P.label];var B=d((function(){var e=P.label,n=P.key,i=P.children;return l(z,(function(l){return r({},l,{label:S?S(l):l==null?void 0:l[e],key:l==null?void 0:l[n],children:l==null?void 0:l[i]})}))}),[z,P,S]);s.useEffectCustom((function(){H("")}),[k]);var H=function e(r){if(!r){I.current=undefined;E(n(k)||[]);return}var l=i(n(k),(function(e){return!!(_!=null&&_.find((function(n){var l;return(l=e[n])==null?void 0:l.includes(r)})))}),{childrenName:P.children});I.current=o(l,P.children).map((function(e){return String(e[P.key])}));E(l)};var L=function e(r){H(r.target.value)};var R=e.useCallbackRef((function(e){var r=o(k,P.children).find((function(r){return t(e.key,r[P.key])}));y==null?void 0:y(e.key,e.keyPath,r)}));return m("div",{style:j,className:N,children:[p(f,{onSearch:x?H:undefined,onChange:!x?L:undefined,placeholder:C||"请输入搜索关键词",allowClear:true}),p(a,{openKeys:I.current,mode:"inline",items:B,selectedKeys:h?[h]:undefined,onClick:R,style:r({overflowY:"auto",borderInlineEnd:"none"},g)})]})}export{v as SearchMenu};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@ import './../request-status/index.css';
|
|
|
3
3
|
import './../fba-hooks/index.css';
|
|
4
4
|
import './index.css';
|
|
5
5
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
6
|
-
import e from"@ant-design/icons/es/icons/RedoOutlined";import{isString as r}from"@dimjs/lang/cjs/is-string";import{hooks as n}from"@wove/react/cjs/hooks";import{a as t,_ as o}from"../_rollupPluginBabelHelpers-
|
|
6
|
+
import e from"@ant-design/icons/es/icons/RedoOutlined";import{isString as r}from"@dimjs/lang/cjs/is-string";import{hooks as n}from"@wove/react/cjs/hooks";import{a as t,_ as o}from"../_rollupPluginBabelHelpers-a0769acd.js";import{isUndefinedOrNull as u,toArray as s,valueIsEqual as i,arrayFind as a}from"@flatbiz/utils";import{Select as l,Button as c}from"antd";import{useState as f,useMemo as v,useRef as d}from"react";import{RequestStatus as h}from"../request-status/index.js";import{isDeepEqual as p}from"@dimjs/lang/cjs/is-deep-equal";import{isArray as m}from"@dimjs/lang/cjs/is-array";import{get as g}from"@dimjs/utils/cjs/get";import{json as C}from"@dimjs/utils/cjs/json";import q from"pubsub-js";import{fbaHooks as w}from"../fba-hooks/index.js";import{isObject as y}from"@dimjs/lang/cjs/is-object";import{jsx as _,jsxs as b}from"react/jsx-runtime";import"@dimjs/utils/cjs/extend";import"../use-responsive-point-21b8c601.js";var j=function e(r){var n=r.cacheKey,t=r.serviceConfig,o=r.hasOuterSelectorList,s=r.outerSelectorList,i=r.onRespDataChange,a=r.onSelectorRequestError,l=r.onChange,c=r.useCache,d=r.fieldNames;var h=t==null?void 0:t.params;var y=(t==null?void 0:t.requiredParamsKeys)||[];var _=h&&Object.keys(h).length>0;var b=f(),j=b[0],R=b[1];var S=f(),L=S[0],O=S[1];var P=f(Date.now()),A=P[0],k=P[1];var x=v((function(){try{if(_){var e=JSON.stringify(C.sort(h));if(e==="{}"){return undefined}return e}}catch(e){}return undefined}),[_,h]);var N=""+x;var E=x+"_status";var D=n+"_"+N;var I=w.usePrevious(x);var K=w.usePrevious(h);var M=function e(r){if(t!=null&&t.onRequestResultAdapter){return t==null?void 0:t.onRequestResultAdapter(r)}if(d!=null&&d.list){var n=g(r,d==null?void 0:d.list);return m(n)?n:[]}return r};var B=function e(){var r;return(r=window["__selector_wrapper_"])==null?void 0:r[n]};var J=function e(){var r;return(r=B())==null?void 0:r[N]};var T=function e(){var r;return(r=B())==null?void 0:r[E]};var V=function e(r,t){if(!window["__selector_wrapper_"]){window["__selector_wrapper_"]={}}if(!window["__selector_wrapper_"][n]){window["__selector_wrapper_"][n]={}}window["__selector_wrapper_"][n][r]=t};var z=function e(r){V(E,r);O(r)};var F=function e(){return new Promise((function(e,r){var n,o;var u=function(n){try{console.error(n);z("request-error");R(undefined);setTimeout((function(){q.publish(D,{status:"request-error"})}));a==null?void 0:a(n);return e(Promise.reject())}catch(e){return r(e)}};try{z("request-progress");return Promise.resolve(t==null||t.onRequest==null?void 0:t.onRequest(h||{})).then((function(r){try{n=r;o=M(n)||[];V(N,o);z("request-success");setTimeout((function(){q.publish(D,{status:"request-success",respData:o})}));return e(o)}catch(e){return u(e)}}),u)}catch(e){u(e)}}))};w.useEffectCustomAsync((function(){return new Promise((function(e,r){var n,f,v,d,m,g;if(o){O("request-success");R(s);i==null?void 0:i(s);return e()}if(y.length>0){n=h?y.find((function(e){return u(h[e])})):true;if(n){R([]);O("no-dependencies-params");if(I){l==null?void 0:l(undefined)}return e()}if(c===false){if(p(h,K)){return e()}var C=function(){try{return e()}catch(e){return r(e)}};var w=function(e){try{console.error(e);O("request-error");R(undefined);a==null?void 0:a(e);return C()}catch(e){return r(e)}};try{O("request-progress");return Promise.resolve(t==null||t.onRequest==null?void 0:t.onRequest(h||{})).then((function(e){try{f=e;v=M(f)||[];O("request-success");R(v);i==null?void 0:i(v);return C()}catch(e){return w(e)}}),w)}catch(e){w(e)}}return _.call(this)}function _(){d=T();if(d==="request-success"){m=J();R(m);O(d);i==null?void 0:i(m);return e()}if(d==="request-progress"){O(d);q.subscribe(D,(function(e,r){var n=r.status,t=r.respData;if(n==="request-success"){O(n);R(t);i==null?void 0:i(t)}else{O("request-error");R(undefined)}}));return e()}var n=function(){try{return e()}catch(e){return r(e)}};var t=function(e){try{console.error(e);O("request-error");R(undefined);a==null?void 0:a(e);return n()}catch(e){return r(e)}};try{return Promise.resolve(F()).then((function(e){try{g=e;R(g);O("request-success");i==null?void 0:i(g);return n()}catch(e){return t(e)}}),t)}catch(e){t(e)}}return _.call(this)}))}),[JSON.stringify(h),s,A]);var H=function e(){k(Date.now())};return{requestStatus:L,stateSelectorList:j,serviceRequestParamsStringify:x,onRefreshRequest:H}};var R=function e(r,n){var t=s(r);t=t.map((function(e){if(y(e))return e[n];return e}));return t};var S=["serviceConfig","showAllOption","onSelectorListChange","onSelectorListAllChange","onSelectorRequestError","onLabelRenderAdapter","requestMessageConfig","selectorList","modelKey","fieldNames","value","labelInValue","useCache"];var L=function u(f){var p=f.serviceConfig,m=f.showAllOption,g=f.onSelectorListChange,C=f.onSelectorListAllChange,q=f.onSelectorRequestError,w=f.onLabelRenderAdapter,y=f.requestMessageConfig,L=f.selectorList,O=f.modelKey,P=f.fieldNames,A=f.value,k=f.labelInValue,x=f.useCache,N=t(f,S);var E=d(true);var D=f.hasOwnProperty("selectorList");var I=o({label:"label",value:"value",disabled:"disabled"},P);var K=I.label,M=I.value,B=I.disabled;var J=v((function(){var e;if(!m)return null;var r=m===true;return e={},e[K]=r?"全部":m.label,e[M]=r?"":m.value,e}),[K,M,m]);var T=i(f.mode,["multiple"]);var V=j({fieldNames:I,cacheKey:O,hasOuterSelectorList:D,onChange:f.onChange,serviceConfig:p,outerSelectorList:L,onRespDataChange:function e(r){if(E.current){g==null?void 0:g(r||[]);E.current=false}C==null?void 0:C(r||[])},onSelectorRequestError:q,useCache:x===undefined?true:x}),z=V.requestStatus,F=V.stateSelectorList,H=V.onRefreshRequest;var W=n.useCallbackRef((function(e){if(k){if(T){f.onChange==null?void 0:f.onChange(e,e)}else{f.onChange==null?void 0:f.onChange(e[0],e)}}else{var r=e.map((function(e){return e[M]}));if(T){f.onChange==null?void 0:f.onChange(r,e)}else{f.onChange==null?void 0:f.onChange(r[0],e[0])}}}));var G=n.useCallbackRef((function(e,r){if(!r)return f.onChange==null?void 0:f.onChange(undefined);var n=s(r);var t=[];n.forEach((function(e){if(m&&J&&e.value===J[M]){t.push(J)}else{var r=a(F||[],e.value,M);if(r){t.push(r)}}}));W(t)}));var Q=v((function(){if(z!=="request-success")return[];if(!F||F.length===0)return[];if(!J)return F;return[J].concat(F)}),[J,z,F]);var U=z==="request-progress";var X=v((function(){var e=R(A,M);return T?e:e[0]}),[T,M,A]);var Y=n.useCallbackRef((function(e,n){var t=s(n.children);var o="";t.forEach((function(e){if(r(e))o+=e}));return o.toLowerCase().indexOf(e.toLowerCase())>=0}));return _(l,o({showSearch:true,allowClear:true,popupMatchSelectWidth:false,filterOption:Y},N,{style:o({width:"100%"},f.style),value:X,loading:U,onChange:G,fieldNames:undefined,suffixIcon:z==="request-error"?_(e,{spin:U,onClick:H}):N.suffixIcon,notFoundContent:_(h,{status:z,loading:U,messageConfig:o({"request-init":"暂无数据"},y),errorButton:_(c,{type:"primary",onClick:H,children:"重新获取数据"})}),children:Q.map((function(e,r){var n=e[M];var t=e[K];return b(l.Option,{value:n,label:t,disabled:e[B],children:[f.showIcon?_("span",{className:"v-selector-item-icon",children:f.icon==null?void 0:f.icon(e,r)}):null,w?w(e):t]},n+"-"+r)}))}))};export{L as SelectorWrapper};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@ import './../fba-hooks/index.css';
|
|
|
3
3
|
import './../request-status/index.css';
|
|
4
4
|
import './index.css';
|
|
5
5
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
6
|
-
import e from"@ant-design/icons/es/icons/RedoOutlined";import{hooks as r}from"@wove/react/cjs/hooks";import{a as t,_ as o}from"../_rollupPluginBabelHelpers-
|
|
6
|
+
import e from"@ant-design/icons/es/icons/RedoOutlined";import{hooks as r}from"@wove/react/cjs/hooks";import{a as t,_ as o}from"../_rollupPluginBabelHelpers-a0769acd.js";import{isArray as n}from"@dimjs/lang/cjs/is-array";import{get as i}from"@dimjs/utils/cjs/get";import{Select as s,Button as a}from"antd";import{useState as u,useMemo as l}from"react";import{fbaHooks as c}from"../fba-hooks/index.js";import{RequestStatus as d}from"../request-status/index.js";import{jsx as f}from"react/jsx-runtime";import"../use-responsive-point-21b8c601.js";import"@dimjs/utils/cjs/extend";import"@flatbiz/utils";var v=["showAllOption","serviceConfig","onSelectorListChange","onSelectorRequestError","requestMessageConfig","fieldNames","onLabelRenderAdapter"];var m=function m(p){var h=p.showAllOption,g=p.serviceConfig,b=p.onSelectorListChange,q=p.onSelectorRequestError,y=p.requestMessageConfig,w=p.fieldNames,C=p.onLabelRenderAdapter,j=t(p,v);var R=u("request-init"),S=R[0],x=R[1];var A=u(),k=A[0],K=A[1];var E=(w==null?void 0:w.label)||"label";var L=(w==null?void 0:w.value)||"value";var O=(w==null?void 0:w.disabled)||"disabled";var M=(w==null?void 0:w.searchKeyword)||"searchKeyword";var P=g.params;var B=l((function(){var e=h===true;if(h){return{label:e?"全部":h.label,value:e?"":h.value}}return null}),[h]);var N=function e(r){if(g.onRequestResultAdapter){return g.onRequestResultAdapter(r)}if(w!=null&&w.list){var t=i(r,w==null?void 0:w.list);return n(t)?t:[]}return n(r)?r:[]};var _=function e(r){return new Promise((function(e,t){var n,i,s;var a=function(){try{return e()}catch(e){return t(e)}};var u=function(e){try{x("request-error");q==null?void 0:q(e);return a()}catch(e){return t(e)}};try{x("request-progress");return Promise.resolve(g.onRequest==null?void 0:g.onRequest(o({},P,(n={},n[M]=r,n)))).then((function(e){try{i=e;s=N(i);b==null?void 0:b(s);if(E&&L){s=s.map((function(e){return o({},e,{label:e[E],value:e[L],disabled:e[O||"disabled"]})}))}s.forEach((function(e){if(C){e.label=C(e)}}));if(B){s.unshift(B)}K(s);x("request-success");return a()}catch(e){return u(e)}}),u)}catch(e){u(e)}}))};var z=r.useDebounceCallback((function(e){K([]);void _(e)}),300);c.useEffectCustom((function(){if(p.customKeyword){void _(p.customKeyword)}}),[p.customKeyword]);var D=S==="request-progress";return f(s,o({showSearch:true,allowClear:true,dropdownMatchSelectWidth:false},j,{style:o({width:"100%"},p.style),options:k,filterOption:false,onSearch:z,notFoundContent:f(d,{status:S,loading:D,messageConfig:o({"request-init":"请输入搜索条件"},y),errorButton:f(a,{type:"primary",onClick:_,children:"重新获取数据"})}),suffixIcon:S==="request-error"?f(e,{spin:D,onClick:_}):undefined,loading:D}))};export{m as SelectorWrapperSearch};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|