cnhis-design-vue 3.1.42-beta.27 → 3.1.42-beta.29
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/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/recommend-search/index.d.ts +2 -1
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -1
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/env.d.ts +24 -24
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e,h as t,inject as i,createVNode as l}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function S(){const S="lowCodeFieldAdaptorPlugin";return g({name:S,apply(g){g.fieldHooks.field.tap({name:S,stage:m},((m,p,g)=>{const S=m,F={className:S.bold?"iho-table__boldCell":"",field:S.columnName,showOverflow:"tooltip",visible:R.notNegative(S.isShow),minWidth:S.colWidth,sortable:R.isPositive(S.isSort),fixed:c[S.isFixed],...S,title:S.alias||S.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=i=>a.checkEditStatus(i)?e(i):[t("span",null,P(i.row,i.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){const m=i(v),c=i(b),p=e.column||{},h=n(null==m?void 0:m.value)&&!1!==t.annotation,g=x.isEditableColumn(c.value,p),R=p.sortable||x.hasFilter(t.fieldSetting),j=r(a)?a:d(a)?a(e):null;let P=!1;if(c.value){const e=c.value.editRules&&c.value.editRules[p.field];e&&(P=o(e).some((e=>e.required)))}return l("section",{class:"iho-table__headerWrapper"},[l("section",{style:{width:s(Math.max(0,p.renderWidth-20-(P?14:0)-(h?16:0)-(R?
|
|
1
|
+
import{toRaw as e,h as t,inject as i,createVNode as l}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function S(){const S="lowCodeFieldAdaptorPlugin";return g({name:S,apply(g){g.fieldHooks.field.tap({name:S,stage:m},((m,p,g)=>{const S=m,F={className:S.bold?"iho-table__boldCell":"",field:S.columnName,showOverflow:"tooltip",visible:R.notNegative(S.isShow),minWidth:S.colWidth,sortable:R.isPositive(S.isSort),fixed:c[S.isFixed],...S,title:S.alias||S.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=i=>a.checkEditStatus(i)?e(i):[t("span",null,P(i.row,i.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){const m=i(v),c=i(b),p=e.column||{},h=n(null==m?void 0:m.value)&&!1!==t.annotation,g=x.isEditableColumn(c.value,p),R=p.sortable||x.hasFilter(t.fieldSetting),j=r(a)?a:d(a)?a(e):null;let P=!1;if(c.value){const e=c.value.editRules&&c.value.editRules[p.field];e&&(P=o(e).some((e=>e.required)))}return l("section",{class:"iho-table__headerWrapper"},[l("section",{style:{width:s(Math.max(0,p.renderWidth-20-(P?14:0)-(h?16:0)-(R?22:0)-(g?22:0)))}},[null!=j?j:l(u,{style:{maxWidth:"100%"}},{default:()=>p.title})]),h?l(f,{modelValue:m.value[p.field],"onUpdate:modelValue":e=>m.value[p.field]=e},null):null])}(e,a,c),e.slots=m}(F,S),function(t,i,l){var o,s;const r=a(e(i));r.componentProps={size:"mini"===l.size?"small":l.size,...r.componentProps},t.editRender={autofocus:"input",name:j.getCellType(i),props:r},t.editRender.enabled=!Reflect.get(h,t.editRender.name),d(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&d(null==(s=t.slots)?void 0:s.edit));if(!n(i.settingObj))return;Reflect.has(i.settingObj,"isHide")&&(t.visible=t.visible&&R.notPositive(i.settingObj.isHide))}(F,S,g),F})),g.fieldHooks.field.tap({name:S+"After",stage:p},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,i])=>{null==i&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{S as lowCodeFieldAdaptorPlugin};
|
|
@@ -629,7 +629,8 @@ declare const RecommendSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
629
629
|
};
|
|
630
630
|
currentComponent: import("vue").ComputedRef<any>;
|
|
631
631
|
inputRef: import("vue").Ref<any>;
|
|
632
|
-
exposeMethods:
|
|
632
|
+
exposeMethods: Record<any, any>;
|
|
633
|
+
instance: import("vue").ComponentInternalInstance | null;
|
|
633
634
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "clear" | "update:value" | "search" | "choose" | "openMenu" | "closeMenu")[], "search" | "closeMenu" | "delete" | "clear" | "update:value" | "choose" | "openMenu", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
634
635
|
mode: {
|
|
635
636
|
type: import("vue").PropType<"input" | "select">;
|
|
@@ -631,7 +631,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
631
631
|
};
|
|
632
632
|
currentComponent: import("vue").ComputedRef<any>;
|
|
633
633
|
inputRef: import("vue").Ref<any>;
|
|
634
|
-
exposeMethods:
|
|
634
|
+
exposeMethods: Record<any, any>;
|
|
635
|
+
instance: import("vue").ComponentInternalInstance | null;
|
|
635
636
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "clear" | "update:value" | "search" | "choose" | "openMenu" | "closeMenu")[], "search" | "closeMenu" | "delete" | "clear" | "update:value" | "choose" | "openMenu", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
636
637
|
mode: {
|
|
637
638
|
type: PropType<"input" | "select">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,provide as o,useSlots as
|
|
1
|
+
import{defineComponent as e,computed as t,provide as o,useSlots as n,ref as a,getCurrentInstance as p,watch as r,openBlock as l,createBlock as c,resolveDynamicComponent as u,unref as s,mergeProps as m,isRef as i,withCtx as d,renderSlot as f}from"vue";import{useVModel as y}from"@vueuse/core";import{isObject as v}from"lodash-es";import{InjectionRecommendSearchRootSlots as h,InjectionRecommendSearchRef as g}from"./constant/index.js";import b from"./components/RecommendInput.vue.js";import S from"./components/RecommendSelect.vue.js";import j from"../../../_virtual/plugin-vue_export-helper.js";var x=j(e({__name:"RecommendSearch",props:{mode:{type:String,default:"input"},value:{type:[String,Number]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},placeholder:{type:String},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},clearable:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},commonList:{type:Array,default:()=>[]},recentList:{type:Array,default:()=>[]},recommendDeletable:{type:Boolean,default:!0},inputProps:{type:Object},popProps:{type:Object}},emits:["update:value","search","delete","choose","clear","openMenu","closeMenu"],setup(e,{expose:j,emit:x}){const C=e,$=y(C,"value",x),_={input:b,select:S},M=t((()=>_[C.mode]));o(h,n());const O=a();o(g,O);const R={},P=p();return r(O,(e=>{if(Object.keys(R).forEach((e=>Reflect.deleteProperty(R,e))),v(e))try{if(P&&P.appContext&&v(P.appContext.config)){const t=P.appContext.config.warnHandler;P.appContext.config.warnHandler=()=>1,Object.assign(R,e),P.appContext.config.warnHandler=t}else Object.assign(R,e)}catch(e){}})),j(R),(e,t)=>(l(),c(u(s(M)),m(e.$props,{value:s($),"onUpdate:value":t[0]||(t[0]=e=>i($)?$.value=e:null),onSearch:t[1]||(t[1]=t=>e.$emit("search",t)),onChoose:t[2]||(t[2]=t=>e.$emit("choose",t)),onOpenMenu:t[3]||(t[3]=t=>e.$emit("openMenu",t)),onCloseMenu:t[4]||(t[4]=t=>e.$emit("closeMenu",t)),onDelete:t[5]||(t[5]=t=>e.$emit("delete",t))}),{empty:d((()=>[f(e.$slots,"empty")])),_:3},16,["value"]))}}),[["__file","RecommendSearch.vue"]]);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,normalizeClass as s,unref as r,createCommentVNode as u,Fragment as c,createBlock as p,mergeProps as d,createElementVNode as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as h,resolveDynamicComponent as k,h as C}from"vue";import S from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as A,isCollection as O,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import D from"./components/NoData.vue.js";import P from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import F from"./components/EvaluateCountdown.vue.js";import x from"./components/EvaluatePage.vue.js";import N from"./components/AnswerParse.vue.js";import B from"./components/ScaleScore.js";import{useDialog as I,useMessage as M,NForm as q,NFormItem as R,NButton as K}from"naive-ui";import U from"../../../_virtual/plugin-vue_export-helper.js";const V=["innerHTML"],H={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y={key:1,class:"footer"};var X=U(e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({checkFileMd5Exist:"http://192.168.1.223:12060/storage/checkFileMd5Exist",fileChannel:"null",md5:"9ed34823e7ef4754819704135b29c9ab",objectName:"0/0/20220602",partFileMerge:"http://192.168.1.223:12060/storage/partFileMerge",partFileUpload:"http://192.168.1.223:12060/storage/partFileUpload",token:"4d0eb8f174994d33adb71766d1ef8ce4"})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:U,emit:X}){const G=e,{ScaleViewState:Q}=w(),Z=t(Q),$=I(),z=M(),ee=a(null),te=a(null),{noDataState:ae,setNoData:oe,resetNodata:ie}=S(),le=A(),{showEvatip:ne,isFormBoldOpen:se,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:pe,hasScore:de,isPreviewScale:me,showEvaluateEntry:ve,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:be,propsConfig:he,evaluatePageProps:ke,evaluateCountdownProps:Ce,skipCover:Se,scaleEdit:we}=E(G,Z,{query:le}),{initForm:Ee}=_(G,Z,X,{query:le}),{submitMethod:_e}=j(G,Z,X,{query:le}),{nextLogicEvent:je,handleDynamicDataRelation:Ae}=L(G,Z);(()=>{let{id:e}=le;e&&(Z.shareId=e)})();const Oe=e=>{try{ie(),Ee(e)}catch(e){console.log(e,"--error"),Z.spinning=!1,Z.hasFrontAddress=!1,oe(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>G.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Oe(e):e.guage_id&&Oe(e)}),{immediate:!0}),o((()=>G.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;Z.form={},Z.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{Ee(t)}))}),{immediate:!0});const Te=e=>{Z.showEvaluateSettingWrap=!1,Z.showEvaluateCountdown=!!e,X("startWriteScale")},Le=()=>{console.log("----closeEvaluateCountdown"),Z.showEvaluateCountdown=!1,me.value||(Z.banSubmit=!0,_e(),$.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>{}}))},De=e=>{$.warning({title:"提示",content:()=>C("div",{class:"evatip-container"},[C("span","答案解析:"),C("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Pe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||(Z.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":let{value:a,list:l=[]}=e;Z.form[t.val_key]=a,je(e,t,Z.formArray),Ae(l,t,Z.formArray);break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(Z.choiceComObj[t.val_key]=o),je(e,t,Z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":je(e,t,Z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":Z.submitForm[t.val_key]=e}},Fe=(e,t)=>{console.log(t),Z.form[t.val_key]=e},xe=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),Z.labelSelectedList=t,{labelStr:a.join(","),labels:o}},Ne=()=>{var e;if(!Z.formArray.find((e=>T(e.type))))return void Be("确认要提交吗?");let{evaluateResultSetting:t}=Z.config;if(!t||!Object.keys(t).length&&!ve.value||we.value)return void Be("确认要结束测评吗?");if("formIframe"==G.openType&&ve.value)return void X("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==Z?void 0:Z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Be(a)},Be=e=>{$.warning({title:"温馨提示",content:()=>C("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Ie()},onNegativeClick(){}})},Ie=()=>{var e;null==(e=te.value)||e.validate((e=>{var t;if(e){console.log(e);let a=(null==(t=e[0])?void 0:t[0])||{},o=a.field,i=a.message,l=Z.formArray.find((e=>e.databaseTitle===o));return l&&(o=l.title),z.error(o+i),!1}_e()}))},Me=()=>{X("onCloseSetting")};return U({getScaleData:()=>({...Z}),onSubmit:Ne,cancel:Me}),(e,t)=>(l(),n("div",{class:s(["c-scale",{"c-scale-nobtn":r(ge)}])},[u(' <template v-if="state.spinning">\
|
|
1
|
+
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,normalizeClass as s,unref as r,createCommentVNode as u,Fragment as c,createBlock as p,mergeProps as d,createElementVNode as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as h,resolveDynamicComponent as k,h as C}from"vue";import S from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as A,isCollection as O,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import D from"./components/NoData.vue.js";import P from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import F from"./components/EvaluateCountdown.vue.js";import x from"./components/EvaluatePage.vue.js";import N from"./components/AnswerParse.vue.js";import B from"./components/ScaleScore.js";import{useDialog as I,useMessage as M,NForm as q,NFormItem as R,NButton as K}from"naive-ui";import U from"../../../_virtual/plugin-vue_export-helper.js";const V=["innerHTML"],H={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y={key:1,class:"footer"};var X=U(e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({checkFileMd5Exist:"http://192.168.1.223:12060/storage/checkFileMd5Exist",fileChannel:"null",md5:"9ed34823e7ef4754819704135b29c9ab",objectName:"0/0/20220602",partFileMerge:"http://192.168.1.223:12060/storage/partFileMerge",partFileUpload:"http://192.168.1.223:12060/storage/partFileUpload",token:"4d0eb8f174994d33adb71766d1ef8ce4"})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:U,emit:X}){const G=e,{ScaleViewState:Q}=w(),Z=t(Q),$=I(),z=M(),ee=a(null),te=a(null),{noDataState:ae,setNoData:oe,resetNodata:ie}=S(),le=A(),{showEvatip:ne,isFormBoldOpen:se,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:pe,hasScore:de,isPreviewScale:me,showEvaluateEntry:ve,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:be,propsConfig:he,evaluatePageProps:ke,evaluateCountdownProps:Ce,skipCover:Se,scaleEdit:we}=E(G,Z,{query:le}),{initForm:Ee}=_(G,Z,X,{query:le}),{submitMethod:_e}=j(G,Z,X,{query:le}),{nextLogicEvent:je,handleDynamicDataRelation:Ae}=L(G,Z);(()=>{let{id:e}=le;e&&(Z.shareId=e)})();const Oe=e=>{try{ie(),Ee(e)}catch(e){console.log(e,"--error"),Z.spinning=!1,Z.hasFrontAddress=!1,oe(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>G.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Oe(e):e.guage_id&&Oe(e)}),{immediate:!0}),o((()=>G.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;Z.form={},Z.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{Ee(t)}))}),{immediate:!0});const Te=e=>{Z.showEvaluateSettingWrap=!1,Z.showEvaluateCountdown=!!e,X("startWriteScale")},Le=()=>{console.log("----closeEvaluateCountdown"),Z.showEvaluateCountdown=!1,me.value||(Z.banSubmit=!0,_e(),$.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>{}}))},De=e=>{$.warning({title:"提示",content:()=>C("div",{class:"evatip-container"},[C("span","答案解析:"),C("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Pe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||(Z.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":let{value:a,list:l=[]}=e;Z.form[t.val_key]=a,je(e,t,Z.formArray),Ae(l,t,Z.formArray);break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(Z.choiceComObj[t.val_key]=o),je(e,t,Z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":je(e,t,Z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":Z.submitForm[t.val_key]=e}},Fe=(e,t)=>{console.log(t),Z.form[t.val_key]=e},xe=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),Z.labelSelectedList=t,{labelStr:a.join(","),labels:o}},Ne=()=>{var e;if(!Z.formArray.find((e=>T(e.type))))return void Be("确认要提交吗?");let{evaluateResultSetting:t}=Z.config;if(!t||!Object.keys(t).length&&!ve.value||we.value)return void Be("确认要结束测评吗?");if("formIframe"==G.openType&&ve.value)return void X("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==Z?void 0:Z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Be(a)},Be=e=>{$.warning({title:"温馨提示",content:()=>C("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Ie()},onNegativeClick(){}})},Ie=()=>{var e;null==(e=te.value)||e.validate((e=>{var t;if(e){console.log(e);let a=(null==(t=e[0])?void 0:t[0])||{},o=a.field,i=a.message,l=Z.formArray.find((e=>e.databaseTitle===o));return l&&(o=l.title),z.error(o+i),!1}_e()}))},Me=()=>{X("onCloseSetting")};return U({getScaleData:()=>({...Z}),onSubmit:Ne,cancel:Me}),(e,t)=>(l(),n("div",{class:s(["c-scale",{"c-scale-nobtn":r(ge)}])},[u(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),Z.spinning||Z.hasFrontAddress?u("v-if",!0):(l(),n(c,{key:0},[r(ae).noData?(l(),p(D,{key:0,noDataImg:r(ae).noDataImg,noDataTip:r(ae).noDataTip},null,8,["noDataImg","noDataTip"])):(l(),n(c,{key:1},[r(ve)&&!r(Se)?(l(),p(x,d({key:0},r(ke),{onWriteGuage:Te}),null,16)):(l(),n(c,{key:1},[r(fe)?(l(),p(F,d({key:0,ref_key:"countdownDom",ref:ee},r(Ce),{onCloseEvaluateCountdown:Le}),null,16)):u("v-if",!0),m("div",{class:s(["scale-container",{"scale-container-nopadding":r(ue),"scale-container-hasfooter":r(ge)}]),style:v(r(re))},[r(de)?(l(),p(r(B),{key:0,config:Z.config,maxScore:Z.maxScore},null,8,["config","maxScore"])):u("v-if",!0),f(r(q),{ref_key:"formRef",ref:te,model:Z.form,rules:Z.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(l(!0),n(c,null,y(Z.formArray,((e,t)=>(l(),n(c,{key:(e.id||e.seq)+t},[r(ce)(e)?(l(),p(r(R),{key:0,path:e.val_key,"show-label":!r(O)(e.type),class:"c-scle-form-item"},{label:g((()=>[m("span",{class:s({"scale-label-required":r(se)(e)}),innerHTML:r(pe)(e)},null,10,V),r(se)(e)?(l(),n("span",H,"(必填)")):u("v-if",!0),r(ye)(e)?(l(),n("span",W,b(r(ye)(e)),1)):u("v-if",!0),r(ne)(e)?(l(),n("span",{key:2,class:"evalute-tip",onClick:t=>(async e=>{var t;if(Z.evatipMap[e.id])return void De(Z.evatipMap[e.id]);let a="getSubjectAnswer";const o=(null==(t=G.scaleApiConfig)?void 0:t[a])||null;if(!o||"function"!=typeof o)return void z.error(`${a} Is not a function`);let i=await o(e.id);i&&(Z.evatipMap[e.id]||(Z.evatipMap[e.id]=i,De(i)))})(e)},[f(r(P),{"icon-class":"a-xitongtubiaotishi"}),h(" 查看提示 ")],8,J)):u("v-if",!0)])),default:g((()=>[(l(),p(k(e.renderCom),d(r(he)(e,t),{key:(e.id||e.seq)+t,onScaleChange:Pe,onOnChange:t=>((e,t)=>{Z.form[t.val_key]=xe(e)})(t,e),onVodFileList:Fe}),null,16,["onOnChange"])),r(be)(e)?(l(),p(N,{key:0,item:e},null,8,["item"])):u("v-if",!0)])),_:2},1032,["path","show-label"])):u("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),r(ge)?(l(),n("div",Y,[u(" 分享的链接 隐藏取消按钮 "),"guage"!==G.sourceType?(l(),p(r(K),{key:0,onClick:Me},{default:g((()=>[h("取消")])),_:1})):u("v-if",!0),G.isLock?u("v-if",!0):(l(),p(r(K),{key:1,onClick:Ne,disabled:Z.banSubmit,type:"primary"},{default:g((()=>[h("保存")])),_:1},8,["disabled"]))])):u("v-if",!0)],64))],64))],64))],2))}}),[["__file","ScaleView.vue"]]);export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../_virtual/plugin-vue_export-helper.js";import A from"xe-utils";const O={key:0,class:"label-disable-wrap"},K=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],j={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}P.labelSelectedEdit=[...d],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[d(W)?(n(),s("div",O,K)):o("v-if",!0),r(c("div",j,[c("div",k,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(P.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(P.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
|
package/es/env.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
declare const draggableComponent: import('vue').DefineComponent<
|
|
2
|
+
{
|
|
3
|
+
list: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
required: boolean;
|
|
6
|
+
default: any;
|
|
7
|
+
};
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: ArrayConstructor;
|
|
10
|
+
required: boolean;
|
|
11
|
+
default: any;
|
|
12
|
+
};
|
|
13
|
+
itemKey: {
|
|
14
|
+
type: (FunctionConstructor | StringConstructor)[];
|
|
15
|
+
required: boolean;
|
|
16
|
+
};
|
|
17
|
+
clone: {
|
|
18
|
+
type: FunctionConstructor;
|
|
19
|
+
default: (original: any) => any;
|
|
20
|
+
};
|
|
21
|
+
tag: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
move: {
|
|
26
|
+
type: FunctionConstructor;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
componentData: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
required: boolean;
|
|
32
|
+
default: any;
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
unknown,
|
|
36
|
+
{
|
|
37
|
+
error: boolean;
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
realList(): any;
|
|
41
|
+
getKey(): any;
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
getUnderlyingVm(domElement: any): any;
|
|
45
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
46
|
+
emitChanges(evt: any): void;
|
|
47
|
+
alterList(onList: any): void;
|
|
48
|
+
spliceList(): void;
|
|
49
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
50
|
+
getRelatedContextFromMoveEvent({ to, related }: { to: any; related: any }): any;
|
|
51
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
52
|
+
onDragStart(evt: any): void;
|
|
53
|
+
onDragAdd(evt: any): void;
|
|
54
|
+
onDragRemove(evt: any): void;
|
|
55
|
+
onDragUpdate(evt: any): void;
|
|
56
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
57
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
58
|
+
onDragEnd(): void;
|
|
59
|
+
},
|
|
60
|
+
import('vue').ComponentOptionsMixin,
|
|
61
|
+
import('vue').ComponentOptionsMixin,
|
|
62
|
+
any[],
|
|
63
|
+
any,
|
|
64
|
+
import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps,
|
|
65
|
+
Readonly<
|
|
66
|
+
{
|
|
67
|
+
move: Function;
|
|
68
|
+
tag: string;
|
|
69
|
+
clone: Function;
|
|
70
|
+
list: unknown[];
|
|
71
|
+
modelValue: unknown[];
|
|
72
|
+
componentData: Record<string, any>;
|
|
73
|
+
} & {
|
|
74
|
+
itemKey?: string | Function;
|
|
75
|
+
}
|
|
76
|
+
>,
|
|
77
|
+
{
|
|
78
|
+
move: Function;
|
|
79
|
+
tag: string;
|
|
80
|
+
clone: Function;
|
|
81
|
+
list: unknown[];
|
|
82
|
+
modelValue: unknown[];
|
|
83
|
+
componentData: Record<string, any>;
|
|
84
|
+
}
|
|
85
|
+
>;
|
|
86
|
+
export default draggableComponent;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
type FixedSizeArray<T extends number, U> = T extends 0
|
|
2
|
+
? void[]
|
|
3
|
+
: ReadonlyArray<U> & {
|
|
4
|
+
0: U;
|
|
5
|
+
length: T;
|
|
6
|
+
};
|
|
7
|
+
type Measure<T extends number> = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 ? T : never;
|
|
8
|
+
type Append<T extends any[], U> = {
|
|
9
|
+
0: [U];
|
|
10
|
+
1: [T[0], U];
|
|
11
|
+
2: [T[0], T[1], U];
|
|
12
|
+
3: [T[0], T[1], T[2], U];
|
|
13
|
+
4: [T[0], T[1], T[2], T[3], U];
|
|
14
|
+
5: [T[0], T[1], T[2], T[3], T[4], U];
|
|
15
|
+
6: [T[0], T[1], T[2], T[3], T[4], T[5], U];
|
|
16
|
+
7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U];
|
|
17
|
+
8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U];
|
|
18
|
+
}[Measure<T['length']>];
|
|
19
|
+
type AsArray<T> = T extends any[] ? T : [T];
|
|
20
|
+
|
|
21
|
+
declare class UnsetAdditionalOptions {
|
|
22
|
+
_UnsetAdditionalOptions: true;
|
|
23
|
+
}
|
|
24
|
+
type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
|
|
25
|
+
|
|
26
|
+
type Callback<E, T> = (error: E | null, result?: T) => void;
|
|
27
|
+
type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
|
|
28
|
+
|
|
29
|
+
type FullTap = Tap & {
|
|
30
|
+
type: 'sync' | 'async' | 'promise';
|
|
31
|
+
fn: Function;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
type Tap = TapOptions & {
|
|
35
|
+
name: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type TapOptions = {
|
|
39
|
+
before?: string;
|
|
40
|
+
stage?: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
44
|
+
name?: string;
|
|
45
|
+
tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
|
|
46
|
+
call?: (...args: any[]) => void;
|
|
47
|
+
loop?: (...args: any[]) => void;
|
|
48
|
+
error?: (err: Error) => void;
|
|
49
|
+
result?: (result: R) => void;
|
|
50
|
+
done?: () => void;
|
|
51
|
+
register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
|
|
55
|
+
|
|
56
|
+
declare class Hook<T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
57
|
+
constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
|
|
58
|
+
name: string | undefined;
|
|
59
|
+
taps: FullTap[];
|
|
60
|
+
intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
|
|
61
|
+
isUsed(): boolean;
|
|
62
|
+
callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
63
|
+
promise(...args: AsArray<T>): Promise<R>;
|
|
64
|
+
tap(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => R): void;
|
|
65
|
+
withOptions(options: TapOptions & IfSet<AdditionalOptions>): Omit<this, 'call' | 'callAsync' | 'promise'>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class SyncHook<T, R = void, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
|
|
69
|
+
call(...args: AsArray<T>): R;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export class SyncBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, R, AdditionalOptions> {}
|
|
73
|
+
export class SyncLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, void, AdditionalOptions> {}
|
|
74
|
+
export class SyncWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<
|
|
75
|
+
T,
|
|
76
|
+
AsArray<T>[0],
|
|
77
|
+
AdditionalOptions
|
|
78
|
+
> {}
|
|
79
|
+
|
|
80
|
+
declare class AsyncHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
|
|
81
|
+
tapAsync(
|
|
82
|
+
options: string | (Tap & IfSet<AdditionalOptions>),
|
|
83
|
+
fn: (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void
|
|
84
|
+
): void;
|
|
85
|
+
tapPromise(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => Promise<R>): void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export class AsyncParallelHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
89
|
+
T,
|
|
90
|
+
void,
|
|
91
|
+
AdditionalOptions
|
|
92
|
+
> {}
|
|
93
|
+
export class AsyncParallelBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
94
|
+
T,
|
|
95
|
+
R,
|
|
96
|
+
AdditionalOptions
|
|
97
|
+
> {}
|
|
98
|
+
export class AsyncSeriesHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
99
|
+
T,
|
|
100
|
+
void,
|
|
101
|
+
AdditionalOptions
|
|
102
|
+
> {}
|
|
103
|
+
export class AsyncSeriesBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
104
|
+
T,
|
|
105
|
+
R,
|
|
106
|
+
AdditionalOptions
|
|
107
|
+
> {}
|
|
108
|
+
export class AsyncSeriesLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
109
|
+
T,
|
|
110
|
+
void,
|
|
111
|
+
AdditionalOptions
|
|
112
|
+
> {}
|
|
113
|
+
export class AsyncSeriesWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
114
|
+
T,
|
|
115
|
+
AsArray<T>[0],
|
|
116
|
+
AdditionalOptions
|
|
117
|
+
> {}
|
|
118
|
+
|
|
119
|
+
type HookFactory<H> = (key: any, hook?: H) => H;
|
|
120
|
+
|
|
121
|
+
interface HookMapInterceptor<H> {
|
|
122
|
+
factory?: HookFactory<H>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export class HookMap<H> {
|
|
126
|
+
constructor(factory: HookFactory<H>, name?: string);
|
|
127
|
+
name: string | undefined;
|
|
128
|
+
get(key: any): H | undefined;
|
|
129
|
+
for(key: any): H;
|
|
130
|
+
intercept(interceptor: HookMapInterceptor<H>): void;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export class MultiHook<H> {
|
|
134
|
+
constructor(hooks: H[], name?: string);
|
|
135
|
+
name: string | undefined;
|
|
136
|
+
tap(options: string | Tap, fn?: Function): void;
|
|
137
|
+
tapAsync(options: string | Tap, fn?: Function): void;
|
|
138
|
+
tapPromise(options: string | Tap, fn?: Function): void;
|
|
139
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.42-beta.
|
|
3
|
+
"version": "3.1.42-beta.29",
|
|
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": "
|
|
64
|
+
"gitHead": "7be1a8665b9f47797c1e794657cd27f8bee2366e"
|
|
65
65
|
}
|