cnhis-design-vue 3.1.47-beta.4 → 3.1.47-beta.6

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.
Files changed (22) hide show
  1. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  2. package/es/components/button-print/src/utils/print.d.ts +2 -2
  3. package/es/components/button-print/src/utils/print.js +1 -1
  4. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  5. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  6. package/es/components/form-render/src/utils/index.js +1 -1
  7. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  8. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  9. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  10. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  11. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  12. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +3 -0
  13. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  14. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  15. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  16. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  17. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  18. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  19. package/es/shared/package.json.js +1 -1
  20. package/package.json +2 -2
  21. package/es/shared/utils/tapableLess.d.ts +0 -28
  22. package/es/shared/utils/tapableLess.js +0 -1
@@ -1 +1 @@
1
- import{defineComponent as t,reactive as e,computed as r,onMounted as a,watch as n,openBlock as i,createElementBlock as o,Fragment as l,createVNode as s,unref as m,withCtx as p,renderSlot as d,withModifiers as u,createTextVNode as c,toDisplayString as f,mergeProps as v}from"vue";import{isObject as y}from"@vue/shared";import{useMessage as b,NDropdown as g,NButton as I,NIcon as P}from"naive-ui";import{ChevronDown as w}from"@vicons/ionicons5";import{Print as h}from"./utils/print.js";import{isIReport as F}from"./utils/browserPrint.js";import k from"./components/IdentityVerification.vue.js";import{format as T}from"date-fns";import{savePrivateFormatApi as x,getPrivateFormatApi as S}from"./api.js";var D=t({__name:"ButtonPrint",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})}},emits:["success","error","clickoutside"],setup(t,{expose:D,emit:O}){var j;const E=t,L=b();let M;const N={},V=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),C=e([{label:E.printText,key:"printText"},{label:E.previewText,key:"previewText"},{label:E.pdfLoadText,key:"downloadPdf"},{label:E.formatEditText,key:"formatEditText"},...(null==(j=E.externalOptionConfig)?void 0:j.options)||[]]),Y=r((()=>{if(!V.currentFormatId)return{};let t=V.currentFormatId;return V.formatList.find((e=>e.id===t))})),J=r((()=>{var t;return(null==(t=Y.value)?void 0:t.name)||"格式选择"})),U=r((()=>{let t=V.formatList.find((t=>t.id===V.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(E.directPrint){if(V.spinning)return;return"button"===t?void await nt():et()}return et()},B=t=>s("span",{class:{active:t.key===V.currentFormatId}},[t.label]),q=(t,e)=>{let r={type:e,formatId:V.currentFormatId,templateId:U.value};O("success",t,r)},R=t=>{O("error",t),y(t)&&"notInstalledApp"===t.type&&L.error(t.message)},_=t=>{O("error",{message:"前置条件执行错误",type:t,preExecution:!0})},z=(t=0)=>{var e;const r=(null==(e=E.printParams)?void 0:e.length)?E.printParams[t]:V.printParams[t];return JSON.stringify({...r||{},...E.token?{token:E.token}:{}})},H=()=>{var t,e;let r={},a={};if(null==(t=V.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(V.printParams[0].datasetData||{}))?void 0:e[0])||"",r=JSON.stringify(V.printParams.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=r}else Object.keys(V.printParams[0]).forEach((t=>{a[t]=[],V.printParams.forEach((e=>{a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(z(0)),a),JSON.stringify(r)},$=()=>{let t=V.printParams.length;const e=async e=>{try{--t<=0&&q(e,"print")}catch(t){console.log("error",t)}};E.prevFn("print").then((()=>{const t={formatId:V.currentFormatId,templateId:U.value,printdlgshow:E.printdlgshow};if("MULTI"===E.strategy)for(let r=0;r<V.printParams.length;r++)r>0&&(t.printdlgshow="0"),M.printDirect({...t,params:z(r)},e,R);else M.printDirect({...t,params:H()},(t=>{q(t,"print")}),R)})).catch((()=>{_("print")})).finally((()=>{V.visible=!1}))},G=async(t,e)=>{var r,a;switch(t){case"printText":$();break;case"previewText":(async()=>{E.prevFn("preview").then((()=>{const t="MULTI"===E.strategy?z():H(),e={formatId:V.currentFormatId,templateId:U.value,params:t,btnprint:E.btnprint};M.preview(e,(t=>{q(t,"preview")}),R)})).catch((()=>{_("preview")})).finally((()=>{V.visible=!1}))})();break;case"formatEditText":E.prevFn("edit").then((()=>{V.identityVerification.visible=!0})).catch((()=>{_("edit")})).finally((()=>{V.visible=!1}));break;case"downloadPdf":(async()=>{E.prevFn("download").then((()=>{const t="MULTI"===E.strategy?z():H(),e={formatId:V.currentFormatId,templateId:U.value,print:{print:"1",type:"1"},params:t};M.downloadPDF(e,(t=>q(t,"preview")),R)})).catch((()=>{_("download")})).finally((()=>{V.visible=!1}))})();break;default:{V.visible=!1;const n=V.formatList.find((e=>e.id===t))||{};if(Object.keys(n).length>0){V.currentFormatId=t;const[e]=C;e.label=(null==n?void 0:n.name)||e.label,await x({formatForms:[{...n}],name:N.name||n.templateName,number:N.number||n.number,templateId:N.templateId||n.templateId,...N.id?{id:N.id}:{}},{token:E.token})}else null==(a=null==(r=E.externalOptionConfig)?void 0:r.onSelect)||a.call(r,t,e);break}}},K=()=>{V.visible=!1,O("clickoutside")},Q=()=>(V.isInited=!1,V.spinning=!1,setTimeout((()=>{V.visible=!1}),0),!1),W=(t,e,r)=>{const a={};return e.forEach((e=>{let n=((t,e)=>{const r={DATE:"YYYY-MM-DD",DATETIME:"YYYY-MM-DD HH:mm:ss"};let a=e;return Object.keys(r).includes(t.type)&&e&&(a=T(e,r[t.type])),(null==t?void 0:t.defaultValue)||a})(e,t[e[r]]);t[e[r]]&&n&&(a[e[r]]=n)})),a},X=({customizeDataset:t=[],param:e=[]},r=[])=>r.map((r=>{let a={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;a.datasetData={[t.name]:JSON.stringify(W(r,e,"fieldName"))}})),a=Object.assign({},a,W(r,e,"key")),a})),Z=async t=>{var e;if(V.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],V.currentFormatId=await(async(t,e)=>{var r;if(!(null==t?void 0:t.length))return"";const{data:a}=await S({templateId:t[0].templateId},{token:E.token});if("SUCCESS"===a.result){const{formatForms:e=[]}=a.map||{};Object.assign(N,a.map||{});const n=null==(r=null==e?void 0:e[0])?void 0:r.id;if(n&&t.map((t=>t.id)).includes(n))return n}const n=t.find((t=>1==t[e]));return(null==n?void 0:n.id)||t[0].id})(V.formatList,"defaultFlag"),!V.currentFormatId)return L.error("获取打印格式失败,请联系管理员!"),Q();(()=>{const t=V.formatList.map((t=>({label:t.name,key:t.id})));C.unshift({label:J.value,key:"format",children:t})})();let r=null==(e=await E.queryTemplateParams())?void 0:e.obj;if(!r||!U.value)return L.error("获取打印模板失败,请联系管理员!"),Q();V.templateParams=r,V.printParams=X(V.templateParams,E.params)},tt=async()=>{if(V.isInited)return!0;V.isInited=!0,V.spinning=!0,(()=>{if(M)return!1;M=new h})();const t=await E.queryPrintFormatByNumber();return await Z(t),V.spinning=!1,!0},et=async(t=!0)=>{var e;if(await E.clickPrevFn())if(null==(e=E.params)?void 0:e.length){if(!V.visible){if(!await tt())return!1}t&&(V.visible=!V.visible)}else L.warning(E.noDataMsg)},rt=()=>{V.watchPrintParamsReformatFn&&V.watchPrintParamsReformatFn(),V.isInited?V.printParams=X(V.templateParams,E.params):V.watchPrintParamsReformatFn=()=>n((()=>V.isInited),(t=>{if(!t)return!1;rt()}))},at=t=>{if(V.identityVerification.visible=!1,F(V.currentFormatId))return q(null,"edit");const e={formatId:V.currentFormatId,templateId:U.value,params:z(),token:t};M.editPrintFormat(e,(t=>{q(t,"edit")}),R)};async function nt(){await et(!1),$()}return a((()=>{V.isInited=!1})),n((()=>E.params),(t=>{if(!(null==t?void 0:t.length))return!1;rt()}),{deep:!0}),D({directPrint:nt}),(e,r)=>(i(),o(l,null,[s(m(g),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:V.visible,onClickoutside:K,options:C,onSelect:G,"render-label":B},{default:p((()=>[d(e.$slots,"button",{handleClickPrintBtn:et,printSpinning:V.spinning,printbtnText:t.btnText,printVisible:V.visible},(()=>[s(m(I),{class:"dropdown-button",onClick:r[1]||(r[1]=u((()=>A("button")),["stop"]))},{default:p((()=>[c(f(t.btnText)+" ",1),s(m(P),{component:m(w),style:{"margin-left":"5px"},onClick:r[0]||(r[0]=u((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1})]))])),_:3},8,["show","options"]),s(k,v(e.$attrs,{modelValue:V.identityVerification.visible,"onUpdate:modelValue":r[2]||(r[2]=t=>V.identityVerification.visible=t),formatId:V.currentFormatId,templateId:m(U),onSuccess:at}),null,16,["modelValue","formatId","templateId"])],64))}});export{D as default};
1
+ import{defineComponent as t,reactive as e,computed as r,onMounted as a,watch as n,openBlock as i,createElementBlock as o,Fragment as l,createVNode as s,unref as m,withCtx as p,renderSlot as d,withModifiers as u,createTextVNode as c,toDisplayString as f,mergeProps as v}from"vue";import{isObject as y}from"@vue/shared";import{useMessage as b,NDropdown as g,NButton as I,NIcon as P}from"naive-ui";import{ChevronDown as w}from"@vicons/ionicons5";import{Print as h}from"./utils/print.js";import{isIReport as F}from"./utils/browserPrint.js";import k from"./components/IdentityVerification.vue.js";import{format as T}from"date-fns";import{savePrivateFormatApi as x,getPrivateFormatApi as S}from"./api.js";var D=t({__name:"ButtonPrint",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})}},emits:["success","error","clickoutside"],setup(t,{expose:D,emit:O}){var j;const E=t,L=b();let M;const N={},V=e({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null}),C=e([{label:E.printText,key:"printText"},{label:E.previewText,key:"previewText"},{label:E.pdfLoadText,key:"downloadPdf"},{label:E.formatEditText,key:"formatEditText"},...(null==(j=E.externalOptionConfig)?void 0:j.options)||[]]),Y=r((()=>{if(!V.currentFormatId)return{};let t=V.currentFormatId;return V.formatList.find((e=>e.id===t))})),J=r((()=>{var t;return(null==(t=Y.value)?void 0:t.name)||"格式选择"})),U=r((()=>{let t=V.formatList.find((t=>t.id===V.currentFormatId));return null==t?void 0:t.templateId})),A=async t=>{if(E.directPrint){if(V.spinning)return;return"button"===t?void await nt():et()}return et()},B=t=>s("span",{class:{active:t.key===V.currentFormatId}},[t.label]),q=(t,e)=>{let r={type:e,formatId:V.currentFormatId,templateId:U.value};O("success",t,r)},R=t=>{O("error",t),y(t)&&"notInstalledApp"===t.type&&L.error(t.message)},_=t=>{O("error",{message:"前置条件执行错误",type:t,preExecution:!0})},z=(t=0)=>{var e;const r=(null==(e=E.printParams)?void 0:e.length)?E.printParams[t]:V.printParams[t];return JSON.stringify({...r||{},...E.token?{token:E.token}:{}})},H=()=>{var t,e;let r={},a={};if(null==(t=V.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(V.printParams[0].datasetData||{}))?void 0:e[0])||"",r=JSON.stringify(V.printParams.map((e=>JSON.parse(e.datasetData[t]))));a={datasetData:{}},a.datasetData[t]=r}else Object.keys(V.printParams[0]).forEach((t=>{a[t]=[],V.printParams.forEach((e=>{a[t].push(e[t])})),a[t]=a[t].join(",")}));return r=Object.assign({},JSON.parse(z(0)),a),JSON.stringify(r)},$=()=>{let t=V.printParams.length;const e=async e=>{try{--t<=0&&q(e,"print")}catch(t){console.log("error",t)}};E.prevFn("print").then((()=>{const t={formatId:V.currentFormatId,templateId:U.value,printdlgshow:E.printdlgshow};if("MULTI"===E.strategy)for(let r=0;r<V.printParams.length;r++)r>0&&(t.printdlgshow="0"),M.printDirect({...t,messageTimeout:0,params:z(r)},e,R);else M.printDirect({...t,messageTimeout:0,params:H()},(t=>{q(t,"print")}),R)})).catch((()=>{_("print")})).finally((()=>{V.visible=!1}))},G=async(t,e)=>{var r,a;switch(t){case"printText":$();break;case"previewText":(async()=>{E.prevFn("preview").then((()=>{const t="MULTI"===E.strategy?z():H(),e={formatId:V.currentFormatId,templateId:U.value,params:t,btnprint:E.btnprint};M.preview(e,(t=>{q(t,"preview")}),R)})).catch((()=>{_("preview")})).finally((()=>{V.visible=!1}))})();break;case"formatEditText":E.prevFn("edit").then((()=>{V.identityVerification.visible=!0})).catch((()=>{_("edit")})).finally((()=>{V.visible=!1}));break;case"downloadPdf":(async()=>{E.prevFn("download").then((()=>{const t="MULTI"===E.strategy?z():H(),e={formatId:V.currentFormatId,templateId:U.value,print:{print:"1",type:"1"},params:t};M.downloadPDF(e,(t=>q(t,"preview")),R)})).catch((()=>{_("download")})).finally((()=>{V.visible=!1}))})();break;default:{V.visible=!1;const n=V.formatList.find((e=>e.id===t))||{};if(Object.keys(n).length>0){V.currentFormatId=t;const[e]=C;e.label=(null==n?void 0:n.name)||e.label,await x({formatForms:[{...n}],name:N.name||n.templateName,number:N.number||n.number,templateId:N.templateId||n.templateId,...N.id?{id:N.id}:{}},{token:E.token})}else null==(a=null==(r=E.externalOptionConfig)?void 0:r.onSelect)||a.call(r,t,e);break}}},K=()=>{V.visible=!1,O("clickoutside")},Q=()=>(V.isInited=!1,V.spinning=!1,setTimeout((()=>{V.visible=!1}),0),!1),W=(t,e,r)=>{const a={};return e.forEach((e=>{let n=((t,e)=>{const r={DATE:"YYYY-MM-DD",DATETIME:"YYYY-MM-DD HH:mm:ss"};let a=e;return Object.keys(r).includes(t.type)&&e&&(a=T(e,r[t.type])),(null==t?void 0:t.defaultValue)||a})(e,t[e[r]]);t[e[r]]&&n&&(a[e[r]]=n)})),a},X=({customizeDataset:t=[],param:e=[]},r=[])=>r.map((r=>{let a={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;a.datasetData={[t.name]:JSON.stringify(W(r,e,"fieldName"))}})),a=Object.assign({},a,W(r,e,"key")),a})),Z=async t=>{var e;if(V.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],V.currentFormatId=await(async(t,e)=>{var r;if(!(null==t?void 0:t.length))return"";const{data:a}=await S({templateId:t[0].templateId},{token:E.token});if("SUCCESS"===a.result){const{formatForms:e=[]}=a.map||{};Object.assign(N,a.map||{});const n=null==(r=null==e?void 0:e[0])?void 0:r.id;if(n&&t.map((t=>t.id)).includes(n))return n}const n=t.find((t=>1==t[e]));return(null==n?void 0:n.id)||t[0].id})(V.formatList,"defaultFlag"),!V.currentFormatId)return L.error("获取打印格式失败,请联系管理员!"),Q();(()=>{const t=V.formatList.map((t=>({label:t.name,key:t.id})));C.unshift({label:J.value,key:"format",children:t})})();let r=null==(e=await E.queryTemplateParams())?void 0:e.obj;if(!r||!U.value)return L.error("获取打印模板失败,请联系管理员!"),Q();V.templateParams=r,V.printParams=X(V.templateParams,E.params)},tt=async()=>{if(V.isInited)return!0;V.isInited=!0,V.spinning=!0,(()=>{if(M)return!1;M=new h})();const t=await E.queryPrintFormatByNumber();return await Z(t),V.spinning=!1,!0},et=async(t=!0)=>{var e;if(await E.clickPrevFn())if(null==(e=E.params)?void 0:e.length){if(!V.visible){if(!await tt())return!1}t&&(V.visible=!V.visible)}else L.warning(E.noDataMsg)},rt=()=>{V.watchPrintParamsReformatFn&&V.watchPrintParamsReformatFn(),V.isInited?V.printParams=X(V.templateParams,E.params):V.watchPrintParamsReformatFn=()=>n((()=>V.isInited),(t=>{if(!t)return!1;rt()}))},at=t=>{if(V.identityVerification.visible=!1,F(V.currentFormatId))return q(null,"edit");const e={formatId:V.currentFormatId,templateId:U.value,params:z(),token:t};M.editPrintFormat(e,(t=>{q(t,"edit")}),R)};async function nt(){await et(!1),$()}return a((()=>{V.isInited=!1})),n((()=>E.params),(t=>{if(!(null==t?void 0:t.length))return!1;rt()}),{deep:!0}),D({directPrint:nt}),(e,r)=>(i(),o(l,null,[s(m(g),{class:"c-dropdown",placement:"bottom-start",trigger:"click",show:V.visible,onClickoutside:K,options:C,onSelect:G,"render-label":B},{default:p((()=>[d(e.$slots,"button",{handleClickPrintBtn:et,printSpinning:V.spinning,printbtnText:t.btnText,printVisible:V.visible},(()=>[s(m(I),{class:"dropdown-button",onClick:r[1]||(r[1]=u((()=>A("button")),["stop"]))},{default:p((()=>[c(f(t.btnText)+" ",1),s(m(P),{component:m(w),style:{"margin-left":"5px"},onClick:r[0]||(r[0]=u((()=>A("icon")),["stop"]))},null,8,["component"])])),_:1})]))])),_:3},8,["show","options"]),s(k,v(e.$attrs,{modelValue:V.identityVerification.visible,"onUpdate:modelValue":r[2]||(r[2]=t=>V.identityVerification.visible=t),formatId:V.currentFormatId,templateId:m(U),onSuccess:at}),null,16,["modelValue","formatId","templateId"])],64))}});export{D as default};
@@ -38,13 +38,13 @@ export declare class Print {
38
38
  pageCount: any;
39
39
  formatId: string;
40
40
  };
41
- _handleEventDirect({ templateId, formatId, params, cmdid, print, printdlgshow, nobillnode, btnprint }: AnyObject): Promise<any>;
41
+ _handleEventDirect({ templateId, formatId, params, cmdid, print, printdlgshow, nobillnode, btnprint, messageTimeout }: AnyObject): Promise<any>;
42
42
  _handleEventEditFormat({ templateId, formatId, params, token }: AnyObject): Promise<any>;
43
43
  _queryProxyOrigin(): Promise<void>;
44
44
  _queryPrintFile(formatId: string, params?: string): Promise<any>;
45
45
  _browserPrint(result: AnyObject, mode: string): Promise<string | void>;
46
46
  preview({ templateId, formatId, params, btnprint }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<any>;
47
- printDirect({ templateId, formatId, params, print, printdlgshow, nobillnode, isDownloadFile }: AnyObject, successCallbackFn: Func, errorCallbackFn: Func, mode?: string): Promise<any>;
47
+ printDirect({ templateId, formatId, params, print, printdlgshow, nobillnode, isDownloadFile, messageTimeout }: AnyObject, successCallbackFn: Func, errorCallbackFn: Func, mode?: string): Promise<any>;
48
48
  private _downloadPDF;
49
49
  /**
50
50
  * 下载pdf
@@ -1 +1 @@
1
- import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";const h=t.create({timeout:1e3,withCredentials:!1}),c=`${window.location.protocol}//${window.location.host}`,u=`${c}/fdp-api/print/assembly/printIReport`,p=`${c}/bi-api/reprot/print/open/client/getRemote`,m=`${c}/printService/file`;let f=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],f)return f;f=this;const e=window;if(this.CMonitor=e.$CMonitor,this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=e;try{n(i.res||"")}catch(t){s(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async postMessage(t){if(!this.webview)return Promise.reject();const e=Date.now().toString();return Promise.race([new Promise(((i,n)=>{this.messageHandlerQueue.push({resolve:i,reject:n,id:e}),this.webview.postMessage(t)})),new Promise(((t,i)=>{setTimeout((()=>{const t=this.messageHandlerQueue.findIndex((t=>t.id===e));t>-1&&this.messageHandlerQueue.splice(t,1),i({type:"timeout"})}),5e3)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{h({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}}):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const n={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(n),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="0",nobillnode:a="1",btnprint:o="1"}){const l={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}l.print=s}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");l.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(l)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await h({method:"get",url:p})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=c+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await h({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-2],o=n[n.length-1],l=await s(`${m}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n}),a=this._handleResult(r,l);if(!a)return!1;if(this.isRemote){const t=await this._browserPrint(a,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}null==s||s(a)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==l||l(i),this._handleMonitorNotify(i)}}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0},d,h,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==d||d({file:t}))):null==h?void 0:h("获取文件失败!")}await this._queryProxyOrigin();const u=await this._testConnection();if(!this._handleResultTest(u,h))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o}),a=this._handleResult(r,h);if(!a)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(a,c),null==d||d(a)}catch(t){const e="printDirect"===c?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==h||h(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):h.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=d(new Date,"yyyy-MM-dd"),i=l(),n=d(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${n}/${n}`.replace(/\\/g,"/")}this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o,s)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{w as Print};
1
+ import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";const h=t.create({timeout:1e3,withCredentials:!1}),c=`${window.location.protocol}//${window.location.host}`,u=`${c}/fdp-api/print/assembly/printIReport`,m=`${c}/bi-api/reprot/print/open/client/getRemote`,p=`${c}/printService/file`;let f=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],f)return f;f=this;const e=window;if(this.CMonitor=e.$CMonitor,this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=e;try{n(i.res||"")}catch(t){s(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async postMessage(t,e=5e3){if(!this.webview)return Promise.reject();const i=l(),n=[new Promise(((e,n)=>{this.messageHandlerQueue.push({resolve:e,reject:n,id:i}),this.webview.postMessage(t)})),new Promise(((t,n)=>{setTimeout((()=>{const t=this.messageHandlerQueue.findIndex((t=>t.id===i));t>-1&&this.messageHandlerQueue.splice(t,1),n({type:"timeout"})}),e)}))];return 0===e?n[0]:Promise.race(n)}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{h({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const n={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(n),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="0",nobillnode:a="1",btnprint:o="1",messageTimeout:l=5e3}){const h={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o,messageTimeout:l};if(s){try{s=JSON.parse(s)}catch(t){}h.print=s}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");h.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(h)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await h({method:"get",url:m})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=c+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await h({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-2],o=n[n.length-1],l=await s(`${p}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n}),a=this._handleResult(r,l);if(!a)return!1;if(this.isRemote){const t=await this._browserPrint(a,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}null==s||s(a)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==l||l(i),this._handleMonitorNotify(i)}}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0,messageTimeout:d=5e3},h,c,u="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,u),void(null==h||h({file:t}))):null==c?void 0:c("获取文件失败!")}await this._queryProxyOrigin();const m=await this._testConnection();if(!this._handleResultTest(m,c))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o,messageTimeout:d}),a=this._handleResult(r,c);if(!a)return!1;l&&["downloadPDF"].includes(u)&&await this._browserPrint(a,u),null==h||h(a)}catch(t){const e="printDirect"===u?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==c||c(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):h.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=d(new Date,"yyyy-MM-dd"),i=l(),n=d(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${n}/${n}`.replace(/\\/g,"/")}this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o,s)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{w as Print};
@@ -0,0 +1,77 @@
1
+ export const __esModule: true;
2
+ export const LEVEL_SEARCH_CASCADER: vue_2.DefineComponent<{
3
+ options: {
4
+ type: ArrayConstructor;
5
+ default: () => never[];
6
+ };
7
+ labelField: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ valueField: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ autograph: {
16
+ type: StringConstructor;
17
+ required: true;
18
+ };
19
+ lazyRequest: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ requestCache: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ wordbook: {
28
+ type: ObjectConstructor;
29
+ required: true;
30
+ };
31
+ onChange: {};
32
+ value: {
33
+ type: (ArrayConstructor | StringConstructor)[];
34
+ };
35
+ }, () => any, any, {}, {}, vue_2.ComponentOptionsMixin, vue_2.ComponentOptionsMixin, "update:value"[], "update:value", vue_2.VNodeProps & vue_2.AllowedComponentProps & vue_2.ComponentCustomProps, Readonly<vue_2.ExtractPropTypes<{
36
+ options: {
37
+ type: ArrayConstructor;
38
+ default: () => never[];
39
+ };
40
+ labelField: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ valueField: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ autograph: {
49
+ type: StringConstructor;
50
+ required: true;
51
+ };
52
+ lazyRequest: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ requestCache: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ wordbook: {
61
+ type: ObjectConstructor;
62
+ required: true;
63
+ };
64
+ onChange: {};
65
+ value: {
66
+ type: (ArrayConstructor | StringConstructor)[];
67
+ };
68
+ }>> & {
69
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
70
+ }, {
71
+ options: unknown[];
72
+ labelField: string;
73
+ valueField: string;
74
+ lazyRequest: boolean;
75
+ requestCache: boolean;
76
+ }>;
77
+ import vue_2 = require("vue");
@@ -0,0 +1,93 @@
1
+ export const __esModule: true;
2
+ export const SEARCH_CASCADER: vue_2.DefineComponent<{
3
+ options: {
4
+ type: ArrayConstructor;
5
+ default: () => never[];
6
+ };
7
+ depth: {
8
+ type: (NumberConstructor | StringConstructor)[];
9
+ };
10
+ urlConfig: {
11
+ type: ObjectConstructor;
12
+ };
13
+ lazyRequest: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ requestCache: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ onFocus: {
22
+ type: FunctionConstructor;
23
+ };
24
+ filterable: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ checkStrategy: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ labelField: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ valueField: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ onChange: {};
41
+ value: {};
42
+ }, () => any, any, {}, {}, vue_2.ComponentOptionsMixin, vue_2.ComponentOptionsMixin, "update:value"[], "update:value", vue_2.VNodeProps & vue_2.AllowedComponentProps & vue_2.ComponentCustomProps, Readonly<vue_2.ExtractPropTypes<{
43
+ options: {
44
+ type: ArrayConstructor;
45
+ default: () => never[];
46
+ };
47
+ depth: {
48
+ type: (NumberConstructor | StringConstructor)[];
49
+ };
50
+ urlConfig: {
51
+ type: ObjectConstructor;
52
+ };
53
+ lazyRequest: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ requestCache: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ onFocus: {
62
+ type: FunctionConstructor;
63
+ };
64
+ filterable: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ checkStrategy: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ labelField: {
73
+ type: StringConstructor;
74
+ default: string;
75
+ };
76
+ valueField: {
77
+ type: StringConstructor;
78
+ default: string;
79
+ };
80
+ onChange: {};
81
+ value: {};
82
+ }>> & {
83
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
84
+ }, {
85
+ options: unknown[];
86
+ checkStrategy: string;
87
+ labelField: string;
88
+ valueField: string;
89
+ lazyRequest: boolean;
90
+ requestCache: boolean;
91
+ filterable: boolean;
92
+ }>;
93
+ import vue_2 = require("vue");
@@ -1 +1 @@
1
- import{inject as e,provide as t,computed as r,createVNode as n,Fragment as o}from"vue";import{arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as i,isField as u}from"@formily/core";import{Path as s}from"@formily/path";import{isObject as f}from"@vue/shared";import{useMemoize as a}from"@vueuse/core";import{isString as l,isFunction as p,omit as m}from"lodash-es";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as d}from"../constants/index.js";import"date-fns";import{traverseDependKey as h}from"./schema.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./schema.js";function y(e){console.warn(`[FormRender]: ${e}`)}function x(e,t,r=["children","properties","suffixConfig"],n="val_key",o="default_val"){return function e(t,n){n.forEach((n=>{f(n)&&(null!=u(n)&&null==t[i(n)]&&s.setIn(t,i(n),u(n)),r.forEach((r=>{n[r]&&(t[i(n)]||(t[i(n)]={}),e(t[i(n)],c(n[r])))})))}))}(e,t),e;function i(e){return e[n]}function u(e){return e[o]}}function g(r,n){let o=e(r,null);return o||(o=n(),t(r,o)),o}function v(e){return l(e)?+e:e}function S(e,t,r){if(f(e)&&!p(e)){const r={};return Object.entries(e).forEach((([e,n])=>{p(n)&&(r[e]=()=>n(t))})),r}return{default:()=>p(e)?e(t):r?r(e):[e]}}function j(e,t){return r((()=>{const r={};return e.prefix&&(r.prefix=()=>n(o,null,[S(e.prefix,e,t).default()])),e.suffix&&(r.suffix=()=>n(o,null,[S(e.suffix,e,t).default()])),r}))}function E(e){if(!f(e))throw e;return t=e,Reflect.has(t,"map")&&Reflect.has(t,"result")?function(e){const{result:t,map:r}=e;if("SUCCESS"!==t)throw e;return r.rows}(e):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(e)?function(e){const{obj:t,result:r}=e;if("SUCCESS"!==r||!f(t))throw e;return Object.entries(t).reduce(((e,[t,r])=>(r.forEach((r=>e.push({...r,type:t}))),e)),[])}(e):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(e)?function(e){const{data:t,success:r}=e;if(!r)throw e;return t}(e):[];var t}const K=a((function(e,t){return!(!l(t)||!l(e))&&t.split(",").some((t=>t.trim().includes(e)))}),{getKey:(...e)=>e.reduce(((e,t)=>String(e)+"_"+String(t)),"")});function b(e,t){return l(e)&&e?e.replace(/\$\{([^}]*)}/g,(function(e,r){var n;return null!=(n=t[r.trim()])?n:""})):""}function w(e){return e.reduce(((e,t)=>(l(t.extendKey)&&t.extendKey&&e.push(t),k(t)&&e.push(...w(t.children||[])),e)),[])}function R(e,t){const r=w(e);if(!r.length)return t;const n={},o=new Map;return Object.entries(t).forEach((([e,c])=>{const i=r.find((t=>t.val_key===e));if(!i)return n[e]=c;const{val_key:u,extendKey:s}=i,f=o.get(s)||{};o.set(s,f),f[u]=t[u]})),[...o.entries()].forEach((([e,t])=>{n[e]=JSON.stringify(t)})),n}function O(e,t){const r=w(e);if(!r.length)return t;const n=a((e=>{try{return f(t[e])?t[e]:JSON.parse(t[e])||{}}catch(e){return{}}})),o=m(t,r.map((e=>e.extendKey)));return r.forEach((({val_key:e,extendKey:t})=>{Reflect.has(o,e)||(o[e]=n(t)[e])})),o}function _(e){return e&&d.includes(e)}function k(e){return _(i(e)?e.componentType:e.html_type)}async function C({config:e,field:t,cache:r}){const n={},o=t.props.name.toString();try{h(e.dependKey||[],((e,r,o)=>{const c=t.query(e).take();if(u(c)){if(o&&null==c.value)throw`缺少必须的参数=>${e}`;n[r]=c.value}}))}catch(e){return Promise.reject(e)}return{...e,params:Object.assign({},e.params,n),key:o,cache:r}}export{R as combineExtendKey,j as createInputSlot,S as createSlot,C as createUrlConfigParams,y as formRenderLog,g as injectOrProvide,k as isNestedFieldType,_ as isNestedType,K as keywordMatcher,x as mergeDeepProperties,v as parseNumberFromMaybeString,E as presetRequestHandler,O as splitExtendKey,b as validateMessageParser};
1
+ import{inject as e,provide as t,computed as r,createVNode as n,Fragment as o}from"vue";import{arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as u,isField as i}from"@formily/core";import{Path as s}from"@formily/path";import{isObject as f}from"@vue/shared";import{useMemoize as a}from"@vueuse/core";import{isString as l,isFunction as p,omit as m}from"lodash-es";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as d}from"../constants/index.js";import"date-fns";import{traverseDependKey as h}from"./schema.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./schema.js";function y(e){console.warn(`[FormRender]: ${e}`)}function x(e,t,r=["children","properties","suffixConfig"],n="val_key",o="default_val"){return function e(t,n){n.forEach((n=>{f(n)&&(null!=i(n)&&null==t[u(n)]&&s.setIn(t,u(n),i(n)),r.forEach((r=>{n[r]&&(t[u(n)]||(t[u(n)]={}),e(t[u(n)],c(n[r])))})))}))}(e,t),e;function u(e){return e[n]}function i(e){return e[o]}}function g(r,n){let o=e(r,null);return o||(o=n(),t(r,o)),o}function v(e){return l(e)?+e:e}function S(e,t,r){if(f(e)&&!p(e)){const r={};return Object.entries(e).forEach((([e,n])=>{p(n)&&(r[e]=()=>n(t))})),r}return{default:()=>p(e)?e(t):r?r(e):[e]}}function j(e,t){return r((()=>{const r={};return e.prefix&&(r.prefix=()=>n(o,null,[S(e.prefix,e,t).default()])),e.suffix&&(r.suffix=()=>n(o,null,[S(e.suffix,e,t).default()])),r}))}function E(e){if(!f(e))throw e;return t=e,Reflect.has(t,"map")&&Reflect.has(t,"result")?function(e){const{result:t,map:r}=e;if("SUCCESS"!==t)throw e;return r.rows}(e):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(e)?function(e){const{obj:t,result:r}=e;if("SUCCESS"!==r||!f(t))throw e;return Object.entries(t).reduce(((e,[t,r])=>(r.forEach((r=>e.push({...r,type:t}))),e)),[])}(e):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(e)?function(e){const{data:t,success:r}=e;if(!r)throw e;return t}(e):[];var t}const K=a((function(e,t){return!(!l(t)||!l(e))&&t.split(",").some((t=>t.trim().includes(e)))}),{getKey:(...e)=>e.reduce(((e,t)=>String(e)+"_"+String(t)),"")});function b(e,t){return l(e)&&e?e.replace(/\$\{([^}]*)}/g,(function(e,r){var n;return null!=(n=t[r.trim()])?n:""})):""}function w(e){return e.reduce(((e,t)=>(l(t.extendKey)&&t.extendKey&&e.push(t),k(t)&&e.push(...w(t.children||[])),e)),[])}function R(e,t){const r=w(e);if(!r.length)return t;const n={},o=new Map;return Object.entries(t).forEach((([e,c])=>{const u=r.find((t=>t.val_key===e));if(!u)return n[e]=c;const{val_key:i,extendKey:s}=u,f=o.get(s)||{};o.set(s,f),f[i]=t[i]})),[...o.entries()].forEach((([e,t])=>{n[e]=JSON.stringify(t)})),n}function O(e,t){const r=w(e);if(!r.length)return t;const n=a((e=>{try{return f(t[e])?t[e]:JSON.parse(t[e])||{}}catch(e){return{}}})),o=m(t,r.map((e=>e.extendKey)));return r.forEach((({val_key:e,extendKey:t})=>{Reflect.has(o,e)||(o[e]=n(t)[e])})),o}function _(e){return e&&d.includes(e)}function k(e){return _(u(e)?e.componentType:e.html_type)}async function C({config:e,field:t,cache:r}){const n={},o=t.props.name.toString();try{h(e.dependKey||[],((e,r,o)=>{const c=t.query(e).take();if(!i(c)||o&&null==c.value)throw`缺少必须的参数=>${e}`;n[r]=c.value}))}catch(e){return Promise.reject(e)}return{...e,params:Object.assign({},e.params,n),key:o,cache:r}}export{R as combineExtendKey,j as createInputSlot,S as createSlot,C as createUrlConfigParams,y as formRenderLog,g as injectOrProvide,k as isNestedFieldType,_ as isNestedType,K as keywordMatcher,x as mergeDeepProperties,v as parseNumberFromMaybeString,E as presetRequestHandler,O as splitExtendKey,b as validateMessageParser};
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function highLightSetPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function filterRenderPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function dateRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function defaultRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function seqRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../../es/components/iho-table");
@@ -0,0 +1,3 @@
1
+ export const __esModule: true;
2
+ export function variableHeightRendererPlugin(): iho_table_1.TablePlugin;
3
+ import iho_table_1 = require("../../../../../../../es/components/iho-table");
@@ -0,0 +1,44 @@
1
+ export const __esModule: true;
2
+ export const IhoTableUtils: Readonly<{
3
+ getCellType: (lowCodeField: any) => any;
4
+ }>;
5
+ export const IhoTableRenderHelper: Readonly<{
6
+ createDefaultRenderCell: typeof createDefaultRenderCell;
7
+ createRenderEdit: typeof createRenderEdit;
8
+ isEditableColumn: (config: any, column: any) => any;
9
+ hasFilter: (lowCodeField: any) => boolean;
10
+ hasDateFiler: (lowCodeField: any) => any;
11
+ }>;
12
+ export const IhoTableStatusHelper: Readonly<{
13
+ isPositive: (value: any) => boolean;
14
+ isNegative: (value: any) => boolean;
15
+ notPositive: (value: any) => boolean;
16
+ notNegative: (value: any) => boolean;
17
+ }>;
18
+ export function createIhoTableClearActivedInterceptor(type: any, solution: any): (_a: any) => boolean;
19
+ export function IhoTableLog(message: any): void;
20
+ export function IhoTableWarn(message: any): void;
21
+ export function getRowHeight(): number;
22
+ export function eventListener2EventName(eventListenerName: any): string;
23
+ export function eventName2EventListener(eventName: any): string;
24
+ export function useUUIDMap(creator: any, isReactive: any): {
25
+ getItemFromUUID: (uuid: any) => any;
26
+ setItemFromUUID: (uuid: any, value: any) => void;
27
+ removeItemFromUUID: (uuid: any) => void;
28
+ };
29
+ export function getColumnRenderWidth(column: any, $table: any): any;
30
+ export function useIhoTableFormEvent(payload: any): {
31
+ emitFormChange: () => void;
32
+ emitFormClick: () => void;
33
+ emitFormChangeWithParams: (params: any) => void;
34
+ emitFormClickWithParams: (params: any) => void;
35
+ };
36
+ export function getLowCodeFieldFromField(field: any): any;
37
+ declare function createDefaultRenderCell(): (_: any, _a: any) => any[];
38
+ declare function createRenderEdit(renderer: any): (_a: any, params: any) => any;
39
+ export function isTransformTreeType(config: any): boolean;
40
+ export function isRichContent(content: any): boolean;
41
+ export function parseRichContent(richContent: any): any;
42
+ export function parseMergeField(row: any, column: any): any;
43
+ export function isCompatibleColumn(field: any): any;
44
+ export {};
@@ -0,0 +1,36 @@
1
+ export const __esModule: true;
2
+ declare const _default: vue_1.DefineComponent<{
3
+ form: {
4
+ type: ObjectConstructor;
5
+ default: () => void;
6
+ };
7
+ item: {
8
+ type: ObjectConstructor;
9
+ default: () => void;
10
+ };
11
+ isLock: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
16
+ form: {
17
+ type: ObjectConstructor;
18
+ default: () => void;
19
+ };
20
+ item: {
21
+ type: ObjectConstructor;
22
+ default: () => void;
23
+ };
24
+ isLock: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }>> & {
29
+ onScaleChange?: ((...args: any[]) => any) | undefined;
30
+ }, {
31
+ item: Record<string, any>;
32
+ isLock: boolean;
33
+ form: Record<string, any>;
34
+ }>;
35
+ export default _default;
36
+ import vue_1 = require("vue");
@@ -0,0 +1,36 @@
1
+ export const __esModule: true;
2
+ declare const _default: vue_1.DefineComponent<{
3
+ form: {
4
+ type: ObjectConstructor;
5
+ default: () => {};
6
+ };
7
+ item: {
8
+ type: ObjectConstructor;
9
+ default: () => {};
10
+ };
11
+ isLock: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, "scaleChange"[], "scaleChange", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
16
+ form: {
17
+ type: ObjectConstructor;
18
+ default: () => {};
19
+ };
20
+ item: {
21
+ type: ObjectConstructor;
22
+ default: () => {};
23
+ };
24
+ isLock: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }>> & {
29
+ onScaleChange?: ((...args: any[]) => any) | undefined;
30
+ }, {
31
+ item: Record<string, any>;
32
+ isLock: boolean;
33
+ form: Record<string, any>;
34
+ }>;
35
+ export default _default;
36
+ import vue_1 = require("vue");
@@ -0,0 +1,82 @@
1
+ export const __esModule: true;
2
+ declare const _default: vue_1.DefineComponent<{
3
+ title: {
4
+ type: (StringConstructor | FunctionConstructor)[];
5
+ default: string;
6
+ };
7
+ changeSize: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ closable: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ modalWidth: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ modalHeight: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ handleOk: {
24
+ type: FunctionConstructor;
25
+ default: () => {};
26
+ };
27
+ cancel: {
28
+ type: FunctionConstructor;
29
+ default: () => {};
30
+ };
31
+ visible: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("update:visible" | "onClose")[], "onClose" | "update:visible", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
36
+ title: {
37
+ type: (StringConstructor | FunctionConstructor)[];
38
+ default: string;
39
+ };
40
+ changeSize: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ closable: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ modalWidth: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ };
52
+ modalHeight: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ handleOk: {
57
+ type: FunctionConstructor;
58
+ default: () => {};
59
+ };
60
+ cancel: {
61
+ type: FunctionConstructor;
62
+ default: () => {};
63
+ };
64
+ visible: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ }>> & {
69
+ "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
70
+ onOnClose?: ((...args: any[]) => any) | undefined;
71
+ }, {
72
+ closable: boolean;
73
+ title: string | Function;
74
+ visible: boolean;
75
+ modalWidth: string;
76
+ modalHeight: string;
77
+ handleOk: Function;
78
+ cancel: Function;
79
+ changeSize: boolean;
80
+ }>;
81
+ export default _default;
82
+ import vue_1 = require("vue");
@@ -0,0 +1,57 @@
1
+ export const __esModule: true;
2
+ export const SearchMenu: vue_1.DefineComponent<{
3
+ childKey: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ options: {
8
+ type: ArrayConstructor;
9
+ default: () => never[];
10
+ };
11
+ labelKey: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ valueKey: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ currentNode: {
20
+ type: ObjectConstructor;
21
+ };
22
+ cursorNode: {
23
+ type: ObjectConstructor;
24
+ };
25
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
26
+ childKey: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ options: {
31
+ type: ArrayConstructor;
32
+ default: () => never[];
33
+ };
34
+ labelKey: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ valueKey: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ currentNode: {
43
+ type: ObjectConstructor;
44
+ };
45
+ cursorNode: {
46
+ type: ObjectConstructor;
47
+ };
48
+ }>> & {
49
+ onNodeClick?: ((...args: any[]) => any) | undefined;
50
+ onChangeCursor?: ((...args: any[]) => any) | undefined;
51
+ }, {
52
+ options: unknown[];
53
+ valueKey: string;
54
+ childKey: string;
55
+ labelKey: string;
56
+ }>;
57
+ import vue_1 = require("vue");
@@ -0,0 +1,57 @@
1
+ export const __esModule: true;
2
+ export const SearchMenu: vue_1.DefineComponent<{
3
+ childKey: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ options: {
8
+ type: ArrayConstructor;
9
+ default: () => never[];
10
+ };
11
+ labelKey: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ valueKey: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ currentNode: {
20
+ type: ObjectConstructor;
21
+ };
22
+ cursorNode: {
23
+ type: ObjectConstructor;
24
+ };
25
+ }, () => any, any, {}, {}, vue_1.ComponentOptionsMixin, vue_1.ComponentOptionsMixin, ("nodeClick" | "changeCursor")[], "nodeClick" | "changeCursor", vue_1.VNodeProps & vue_1.AllowedComponentProps & vue_1.ComponentCustomProps, Readonly<vue_1.ExtractPropTypes<{
26
+ childKey: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ options: {
31
+ type: ArrayConstructor;
32
+ default: () => never[];
33
+ };
34
+ labelKey: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ valueKey: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ currentNode: {
43
+ type: ObjectConstructor;
44
+ };
45
+ cursorNode: {
46
+ type: ObjectConstructor;
47
+ };
48
+ }>> & {
49
+ onNodeClick?: ((...args: any[]) => any) | undefined;
50
+ onChangeCursor?: ((...args: any[]) => any) | undefined;
51
+ }, {
52
+ options: unknown[];
53
+ valueKey: string;
54
+ childKey: string;
55
+ labelKey: string;
56
+ }>;
57
+ import vue_1 = require("vue");
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.47-beta.4",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.47-beta.4",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
1
+ var e="@cnhis-design-vue/shared",i="3.1.47-beta.6",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.47-beta.6",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.47-beta.4",
3
+ "version": "3.1.47-beta.6",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "798cb5a58f2e86566188b1836b64bf1d3e04a815"
64
+ "gitHead": "a42ae8f620ac2b9d5e952bad8f981a64d3d52418"
65
65
  }
@@ -1,28 +0,0 @@
1
- declare type PluginName = string | {
2
- name: string;
3
- stage: number;
4
- };
5
- declare type WithStage<T extends (...p: any[]) => any> = {
6
- stage: number;
7
- callback: T;
8
- };
9
- declare type ReplaceWithString<T extends any[]> = T extends [infer A, ...infer R] ? [string, ...ReplaceWithString<R>] : T;
10
- export declare class SyncHook<T extends any[]> {
11
- private args;
12
- constructor(args: ReplaceWithString<T>);
13
- callbackList: WithStage<(...payload: T) => any>[];
14
- tap(pluginName: PluginName, callback: (...payload: T) => any): void;
15
- tapPromise(pluginName: PluginName, callback: (...payload: T) => any): void;
16
- call(...payload: T): void;
17
- }
18
- export declare class SyncWaterfallHook<T extends any[]> extends SyncHook<T> {
19
- callbackList: WithStage<(...payload: T) => T[0]>[];
20
- call(...payload: T): T[0];
21
- }
22
- export declare class AsyncParallelHook<T extends any[]> extends SyncHook<T> {
23
- promise(...payload: T): void;
24
- }
25
- export declare class AsyncSeriesHook<T extends any[]> extends SyncHook<T> {
26
- promise(...payload: T): Promise<void>;
27
- }
28
- export {};
@@ -1 +0,0 @@
1
- import{isObject as a}from"@vueuse/core";import{isString as s,sortBy as c}from"lodash-es";class l{constructor(a){this.args=a,this.callbackList=[]}tap(l,t){var i;if(s(l))this.callbackList.push({stage:0,callback:t});else{if(!a(l))return;this.callbackList.push({stage:null!=(i=l.stage)?i:0,callback:t})}this.callbackList=c(this.callbackList,(a=>a.stage))}tapPromise(l,t){var i;if(s(l))this.callbackList.push({stage:0,callback:t});else{if(!a(l))return;this.callbackList.push({stage:null!=(i=l.stage)?i:0,callback:t})}this.callbackList=c(this.callbackList,(a=>a.stage))}call(...a){this.callbackList.forEach((({callback:s})=>s(...a)))}}class t extends l{constructor(){super(...arguments),this.callbackList=[]}call(...a){return this.callbackList.reduce(((s,{callback:c})=>c(s,...a.slice(1))),a[0])}}class i extends l{promise(...a){this.callbackList.forEach((({callback:s})=>s(...a)))}}class e extends l{promise(...a){return this.callbackList.reduce((async(s,{callback:c})=>(await s,c(...a))),Promise.resolve())}}export{i as AsyncParallelHook,e as AsyncSeriesHook,l as SyncHook,t as SyncWaterfallHook};