cnhis-design-vue 3.1.53-beta.0 → 3.1.53-beta.2
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/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
- package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
- package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +3 -1
- package/es/components/button-print/src/utils/dialog.d.ts +2 -2
- package/es/components/button-print/src/utils/print.d.ts +14 -13
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +44 -5
- package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/form-config/index.d.ts +24 -24
- package/es/components/form-config/src/FormConfig.vue.d.ts +25 -25
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +5 -5
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +11 -11
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
- package/es/components/form-render/index.d.ts +5 -5
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +6 -6
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +6 -6
- package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +2 -4
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/select.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +3 -2
- package/es/components/form-render/src/hooks/index.d.ts +0 -2
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
- package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -4
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -2
- package/es/components/form-render/src/types/index.d.ts +2 -13
- package/es/components/form-render/src/utils/index.d.ts +1 -2
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +2 -2
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-table/index.d.ts +39 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -0
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +4 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +552 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/types/index.d.ts +6 -2
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +27 -27
- package/es/components/info-header/src/InfoHeader.vue.d.ts +28 -28
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +5 -5
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +6 -6
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +12 -12
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +5 -5
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/search-cascader/index.d.ts +23 -3
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +24 -4
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/search-cascader/src/components/ClearIcon.vue.js +1 -0
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/shortcut-setter/index.d.ts +8 -8
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +9 -9
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
- package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
- package/es/shared/hooks/index.d.ts +2 -0
- package/es/shared/hooks/index.js +1 -1
- package/es/shared/hooks/{useAsyncQueue.d.ts → useAsyncQueue/index.d.ts} +7 -15
- package/es/shared/hooks/useAsyncQueue/index.js +1 -0
- package/es/shared/hooks/useAsyncQueue/types.d.ts +20 -0
- package/es/shared/hooks/useAsyncQueue/types.js +1 -0
- package/es/shared/hooks/useDateTime.d.ts +2 -2
- package/es/shared/hooks/useFormRequest/index.d.ts +24 -0
- package/es/shared/hooks/useFormRequest/index.js +1 -0
- package/es/shared/hooks/useFormRequest/types.d.ts +39 -0
- package/es/shared/hooks/useFormRequest/types.js +1 -0
- package/es/shared/hooks/useLevelSearchCascader.d.ts +31 -0
- package/es/shared/hooks/useLevelSearchCascader.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader/utils.d.ts +0 -23
- package/es/components/form-render/src/components/renderer/levelSearchCascader/utils.js +0 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +0 -16
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +0 -1
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +0 -26
- package/es/components/form-render/src/hooks/useFormRequest.js +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/hooks/useAsyncQueue.js +0 -1
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isObject as e}from"@vue/shared";import{uuidGenerator as t}from"../../utils/index.js";import{unref as r}from"vue";import{cloneDeep as n,isFunction as o}from"lodash-es";import"naive-ui";import"@vueuse/core";import"date-fns";import{AsyncQueue as s}from"../useAsyncQueue/index.js";let u=null;const a={method:"post",url:"",primaryKeyUrl:""},c={url:{get:"/fdp-api/fdp/aiRec/search",post:"/fdp-api/fdp/aiRec/sendBehaviorData",delete:"/fdp-api/fdp/aiRec/delete"},getRecommendIds:()=>({})};function i(){return{getHttpInstance:function(){return u},registGlobHttpInstance:function(e){u=e},registGlobRecommendInfo:function(e){Object.assign(c,e)},registGlobSearchInfo:function(e){Object.assign(a,e)},getSearchRequestInfo:function(){return{...a}},getRecommendRequestInfo:function(){return n(c)}}}function f(e,n){const{getHttpInstance:u}=i();return{create:function(a=3,c){return new s({name:"FormRenderAsyncQueue",uniqueData:n.value,parallelism:a,async processor({key:t,method:n="post",cache:s,params:a,url:i,payload:f},l,p){var m,d;const h=null!=(m=r(e))?m:u();if(!h)return console.log("before use http feature, you should regist http instance by useFormRequest.registGlobHttpInstance()"),l(),void p();try{c&&o(c.beforeRequest)&&(a=null!=(d=c.beforeRequest(t,a,f))?d:{});let e=await h[n](i,a);c&&o(c.afterRequest)&&(e=c.afterRequest(t,e,f)),l(void 0,Array.isArray(e)?e:[]),!s&&p()}catch(e){l(new Error(`Request error => ${e}`)),p()}},getKey:({url:e,method:r="post",cache:n,params:o})=>n?e+r+JSON.stringify(o||{}):t()})}}}function l(t){if(!e(t))throw t;return r=t,Reflect.has(r,"map")&&Reflect.has(r,"result")?function(e){const{result:t,map:r}=e;if("SUCCESS"!==t)throw e;return r.rows}(t):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(t)?function(t){const{obj:r,result:n}=t;if("SUCCESS"!==n||!e(r))throw t;return Object.entries(r).reduce(((e,[t,r])=>(r.forEach((r=>e.push({...r,type:t}))),e)),[])}(t):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(t)?function(e){const{data:t,success:r}=e;if(!r)throw e;return t}(t):[];var r}export{l as presetRequestHandler,f as useFormAsyncQueue,i as useFormRequest};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AsyncQueue } from '../../../../es/shared/hooks';
|
|
2
|
+
import { AnyObject, AnyFn } from '../../../../es/shared/types';
|
|
3
|
+
export declare namespace FormRequestDefine {
|
|
4
|
+
type RequestType = 'post' | 'get' | 'patch' | 'delete' | 'put';
|
|
5
|
+
interface AsyncQueueItem {
|
|
6
|
+
key: any;
|
|
7
|
+
cache?: boolean;
|
|
8
|
+
url: string;
|
|
9
|
+
method?: RequestType;
|
|
10
|
+
params?: AnyObject;
|
|
11
|
+
payload?: AnyObject;
|
|
12
|
+
}
|
|
13
|
+
type FormAsyncQueue = AsyncQueue<AsyncQueueItem, any, AnyObject[]>;
|
|
14
|
+
type RequestInstance = Record<string, AnyFn>;
|
|
15
|
+
type SearchInfo = {
|
|
16
|
+
method: RequestType;
|
|
17
|
+
url: string;
|
|
18
|
+
primaryKeyUrl?: string;
|
|
19
|
+
};
|
|
20
|
+
type RecommendIds = Partial<Record<'businessId' | 'componentId' | 'deptId' | 'userId', string>>;
|
|
21
|
+
type RecommendInfo = {
|
|
22
|
+
getRecommendIds(): RecommendIds;
|
|
23
|
+
url: Record<'get' | 'post' | 'delete', string>;
|
|
24
|
+
};
|
|
25
|
+
type SearchResult = {
|
|
26
|
+
result: 'SUCCESS' | 'ERROR';
|
|
27
|
+
map: {
|
|
28
|
+
rows: AnyObject[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type SelectResult = {
|
|
32
|
+
success: boolean;
|
|
33
|
+
data: AnyObject[];
|
|
34
|
+
};
|
|
35
|
+
type RecommendResult = {
|
|
36
|
+
result: 'SUCCESS' | 'ERROR';
|
|
37
|
+
obj: Partial<Record<'commonly' | 'recently', AnyObject[]>>;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FormRequestDefine } from '../../../es/shared/hooks';
|
|
2
|
+
import { AnyObject, FormWordbook, AnyFn } from '../../../es/shared/types';
|
|
3
|
+
import { MaybeRef } from '@vueuse/core';
|
|
4
|
+
import { Ref } from 'vue';
|
|
5
|
+
export declare function useLevelSearchCascader(props: Partial<{
|
|
6
|
+
options: AnyObject[];
|
|
7
|
+
lazyRequest: boolean;
|
|
8
|
+
requestCache: boolean;
|
|
9
|
+
value: string | AnyObject[];
|
|
10
|
+
}> & {
|
|
11
|
+
autograph: string;
|
|
12
|
+
wordbook: FormWordbook;
|
|
13
|
+
labelField: string;
|
|
14
|
+
valueField: string;
|
|
15
|
+
}, emit: AnyFn, { asyncQueue, fieldKey, getRequestPayload }: {
|
|
16
|
+
asyncQueue: FormRequestDefine.FormAsyncQueue;
|
|
17
|
+
fieldKey: MaybeRef<string>;
|
|
18
|
+
getRequestPayload?: () => any;
|
|
19
|
+
}): {
|
|
20
|
+
valueRef: import("vue").WritableComputedRef<string | AnyObject[] | undefined>;
|
|
21
|
+
labelKey: import("vue").ComputedRef<string>;
|
|
22
|
+
valueKey: import("vue").ComputedRef<string>;
|
|
23
|
+
optionsRef: Ref<AnyObject[]>;
|
|
24
|
+
showRef: Ref<boolean>;
|
|
25
|
+
fetchData: (node?: AnyObject, keyword?: string, updateValueWhenNoChild?: boolean) => Promise<void | AnyObject>;
|
|
26
|
+
menuWidth: Ref<number>;
|
|
27
|
+
searchCascaderRef: Ref<{
|
|
28
|
+
getWidth: () => number;
|
|
29
|
+
setCursor: (option?: AnyObject) => void;
|
|
30
|
+
} | undefined>;
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../utils/index.js";import{isEqual as e,noop as r,isString as t,isNumber as n,isEmpty as a,isFunction as o,cloneDeep as i,omit as l,isArray as u}from"lodash-es";import"naive-ui";import{computed as s,ref as c,watch as d,unref as v}from"vue";import"@vueuse/core";import"date-fns";import{useFormRequest as p}from"./useFormRequest/index.js";function h(h,y,{asyncQueue:f,fieldKey:m,getRequestPayload:k=r}){const g=s({get:()=>h.value,set(r){e(r,h.value)||y("update:value",r)}}),w=c(!1),b=c([]),O=s((()=>{var e,r,t;return null!=(t=null==(r=null==(e=h.wordbook)?void 0:e.show_key)?void 0:r[0])?t:h.labelField})),_=s((()=>{var e,r;return null!=(r=null==(e=h.wordbook)?void 0:e.value_key)?r:h.valueField})),L=s((()=>{var e,r;return null==(r=null==(e=h.wordbook)?void 0:e.render_key)?void 0:r[0]})),j=s((()=>{var e;return(null==(e=h.wordbook)?void 0:e.level_num)||1/0})),C=function(e,r,t){return{transformListToChildren(e){if(!e.length)return[];const r=[(e=i(e))[0]];let t=e[0];for(let r=1;r<e.length;r++){const n=e[r];n&&(t.children=[n],n.parent=t,t=n)}return[e,r]},getNodeDepth(e){let r=1,t=e.parent;for(;t;)r++,t=t.parent;return r},enrichChildOption(e,r,t){return{...e,parent:r,isLeaf:this.getNodeDepth(r)+1>=t}},enrichKeywordOption:(e,n)=>(e.__keyword=!!n,e.isLeaf=!!n,n&&t.value&&e[t.value]&&(e[r.value]=e[t.value]),e),sortOptionWithIdList:(r,t)=>t.map((t=>r.find((r=>r[e.value]===t)))),generateOptionWithIdList(r,t,n){let a=r[0];return{options:t.reduce(((e,t,i)=>{const l=o(r,t);return 0===i?(a=l,[l]):(Object.assign(l,{parent:a,isLeaf:i+1>=n}),a.children=[l],a=l,e)}),[]),lastOption:a};function o(r,t){return r.find((r=>r[e.value]===t))}},parseLinkFromString2List:e=>e.split("_").filter((e=>e)),isClickNodeCheckbox:e=>e&&!e.__keyword&&e.isLeaf,createConfigObject:(r,t,n)=>t?r.conObj||[]:n?[{con:"EQ",is_compare_field:!1,field_key:r.level_key,value:n[e.value]}]:r.conObjFirstLevel||[],createOptionValue(e){const r=[];let t=e;for(;t;)r.unshift(l(t,["parent","isLeaf","__keyword","children"])),t=t.parent;return r},shouldInitOptionList:(r,t,n)=>u(r)&&!a(r)&&r.every((r=>r[e.value]))&&!t&&!n}}(_,O,L),{getSearchRequestInfo:K}=p(),I=c(150),R=c();async function x(e,r,i=!0){var l,u;if(I.value=r&&(null==(l=R.value)?void 0:l.getWidth())||150,C.shouldInitOptionList(g.value,e,r)){const[e,r]=C.transformListToChildren(g.value),t=e[Math.max(0,e.length-2)];if(g.value.length>1){b.value=r;const t=e[Math.max(0,e.length-2)];return await x(t,void 0,!1),t}if(null==(u=b.value)?void 0:u.length)return t}try{return C.isClickNodeCheckbox(e)?s(e):e?e.__keyword?async function(){var r;if(!t(e.id_link))return Promise.reject();const o=C.parseLinkFromString2List(e.id_link);n(j.value)&&j.value!==1/0&&o.splice(j.value);const i=await async function(e){if(!K().primaryKeyUrl)return[];try{return await f.addAsync(r(h.wordbook,h.autograph,e,v(m)))}catch(e){t(e)&&console.error(e)}function r(e,r,t,n){const a=K();return{key:n,params:{autograph:r,tableId:e.id,primaryKeyValue:t.join(","),page:1},...a,url:a.primaryKeyUrl,cache:h.requestCache,payload:{field:{},labelKey:O.value,valueKey:_.value}}}}(o);if(!i)return Promise.reject();const{lastOption:l,options:u}=C.generateOptionWithIdList(i,o,j.value);if(u.length<j.value&&(await x(l),a(l.children)))return g.value=C.sortOptionWithIdList(i,o),w.value=!1,Promise.reject();return b.value=u,null==(r=R.value)||r.setCursor(l),l}():async function(){const r=await f.addAsync(c(h.wordbook,h.autograph,e,v(m)));if(!r.length)return i?s(e):Promise.reject();e.children=r.map((r=>C.enrichChildOption(r,e,j.value)))}():async function(){var t;const n=await f.addAsync(c(h.wordbook,h.autograph,e,v(m)));b.value=n.map((e=>C.enrichKeywordOption(e,r))),r&&(null==(t=R.value)||t.setCursor(b.value[0]))}()}catch(e){t(e)&&console.error(e)}function s(e){return g.value=C.createOptionValue(e),w.value=!1,Promise.reject()}function c(e,n,a,i){const l={autograph:()=>n,wordbookId:"id",wordbookType:"type",fieldKeys:()=>e.search_key?JSON.stringify(e.search_key):void 0,conObj:()=>JSON.stringify(C.createConfigObject(e,r,a)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>r,page:()=>1},u=Object.entries(l).reduce(((r,[n,a])=>(r[n]=t(a)?e[a]:o(a)?a():void 0,r)),{});return{...K(),params:u,key:i,cache:h.requestCache,payload:{...k(),labelKey:O.value,valueKey:_.value}}}}return d((()=>h.wordbook),((r,t)=>{e(r,t)||(b.value=[],r&&(g.value||!h.lazyRequest)&&x())}),{immediate:!0}),{valueRef:g,labelKey:O,valueKey:_,optionsRef:b,showRef:w,fetchData:x,menuWidth:I,searchCascaderRef:R}}export{h as useLevelSearchCascader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.53-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.53-beta.2",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.53-beta.2",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};
|
|
@@ -4,7 +4,7 @@ export declare type SFCWithInstall<T> = T & {
|
|
|
4
4
|
install: (app: App, ...options: any[]) => any;
|
|
5
5
|
};
|
|
6
6
|
export declare type AnyObject = Record<string, any>;
|
|
7
|
-
export declare type
|
|
7
|
+
export declare type AnyFn<T extends Array<any> = any[], P = any> = (...args: T) => P;
|
|
8
8
|
export declare type Nullable<T> = T | null | undefined;
|
|
9
9
|
export declare type UndefinedAble<T> = T | undefined;
|
|
10
10
|
export declare type ArrayAble<T> = T | T[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.53-beta.
|
|
3
|
+
"version": "3.1.53-beta.2",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "11fcd653ce02c55ee27cdc01c58e6bcdcdf99d72"
|
|
67
67
|
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'diagram-js/lib/navigation/movecanvas';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AnyObject, FormWordbook } from '../../../../../../../es/shared/types';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
export declare function createCascaderUtils(valueKey: Ref<string>, labelKey: Ref<string>, renderKey: Ref<string | undefined>): {
|
|
4
|
-
transformListToChildren(list: AnyObject[]): AnyObject[][];
|
|
5
|
-
getNodeDepth(node: AnyObject): number;
|
|
6
|
-
enrichChildOption(option: AnyObject, parent: AnyObject, depth: number): {
|
|
7
|
-
parent: AnyObject;
|
|
8
|
-
isLeaf: boolean;
|
|
9
|
-
};
|
|
10
|
-
enrichKeywordOption(option: AnyObject, keyword?: string): AnyObject;
|
|
11
|
-
sortOptionWithIdList(options: AnyObject[], idList: string[]): AnyObject[];
|
|
12
|
-
generateOptionWithIdList(options: AnyObject[], idList: string[], depth: number): {
|
|
13
|
-
options: AnyObject[];
|
|
14
|
-
lastOption: AnyObject;
|
|
15
|
-
};
|
|
16
|
-
parseLinkFromString2List(linkString: string): string[];
|
|
17
|
-
isClickNodeCheckbox(node?: AnyObject): node is {
|
|
18
|
-
isLeaf: true;
|
|
19
|
-
} & AnyObject;
|
|
20
|
-
createConfigObject(wordbook: FormWordbook, keyword?: string, node?: AnyObject): AnyObject[];
|
|
21
|
-
createOptionValue(node: AnyObject): AnyObject[];
|
|
22
|
-
shouldInitOptionList(value: unknown, node?: AnyObject, keyword?: string): value is any[];
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cloneDeep as e,omit as t,isArray as r,isEmpty as n}from"lodash-es";function i(i,o,a){return{transformListToChildren(t){if(!t.length)return[];const r=[(t=e(t))[0]];let n=t[0];for(let e=1;e<t.length;e++){const r=t[e];r&&(n.children=[r],r.parent=n,n=r)}return[t,r]},getNodeDepth(e){let t=1,r=e.parent;for(;r;)t++,r=r.parent;return t},enrichChildOption(e,t,r){return{...e,parent:t,isLeaf:this.getNodeDepth(t)+1>=r}},enrichKeywordOption:(e,t)=>(e.__keyword=!!t,e.isLeaf=!!t,t&&a.value&&e[a.value]&&(e[o.value]=e[a.value]),e),sortOptionWithIdList:(e,t)=>t.map((t=>e.find((e=>e[i.value]===t)))),generateOptionWithIdList(e,t,r){let n=e[0];return{options:t.reduce(((t,o,a)=>{const l=(s=o,e.find((e=>e[i.value]===s)));var s;return 0===a?(n=l,[l]):(Object.assign(l,{parent:n,isLeaf:a+1>=r}),n.children=[l],n=l,t)}),[]),lastOption:n}},parseLinkFromString2List:e=>e.split("_").filter((e=>e)),isClickNodeCheckbox:e=>e&&!e.__keyword&&e.isLeaf,createConfigObject:(e,t,r)=>t?e.conObj||[]:r?[{con:"EQ",is_compare_field:!1,field_key:e.level_key,value:r[i.value]}]:e.conObjFirstLevel||[],createOptionValue(e){const r=[];let n=e;for(;n;)r.unshift(t(n,["parent","isLeaf","__keyword","children"])),n=n.parent;return r},shouldInitOptionList:(e,t,o)=>r(e)&&!n(e)&&e.every((e=>e[i.value]))&&!t&&!o}}export{i as createCascaderUtils};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AsyncQueue } from '../../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject, UndefinedAble } from '../../../../../es/shared/types';
|
|
3
|
-
import { ComputedRef } from 'vue';
|
|
4
|
-
import { FormAsyncQueueItem } from '../types';
|
|
5
|
-
import { RequestInstance } from '../../../../../es/components/form-render';
|
|
6
|
-
declare type ProcessorOption = Partial<{
|
|
7
|
-
afterRequest(key: string, res?: unknown, payload?: AnyObject): AnyObject[];
|
|
8
|
-
beforeRequest(key: string, params?: unknown, payload?: AnyObject): UndefinedAble<AnyObject> | void;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useFormAsyncQueue(requestInstance: ComputedRef<UndefinedAble<RequestInstance>>, uniqueData: ComputedRef<boolean>): {
|
|
11
|
-
create: (parallelism?: number, option?: ProcessorOption) => AsyncQueue<FormAsyncQueueItem, any, {
|
|
12
|
-
label: string;
|
|
13
|
-
value: unknown;
|
|
14
|
-
}[]>;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{isFunction as r}from"lodash-es";import"naive-ui";import{unref as t}from"vue";import"@vueuse/core";import"date-fns";import{AsyncQueue as o}from"../../../../shared/hooks/useAsyncQueue.js";import"../../index.js";import{useCommonLog as s}from"./useCommonLog.js";import{useFormRequest as a}from"./useFormRequest.js";function n(n,u){const{getHttpInstance:i}=a();return{create:function(a=3,m){return new o({name:"FormRenderAsyncQueue",uniqueData:u.value,parallelism:a,async processor({key:e,method:o="post",cache:a,params:u,url:p,payload:c},f,l){var d,y;const h=null!=(d=t(n))?d:i();if(!h)return s().invalidHttpInstanceLog(),f(),void l();try{m&&r(m.beforeRequest)&&(u=null!=(y=m.beforeRequest(e,u,c))?y:{});let t=await h[o](p,u);m&&r(m.afterRequest)&&(t=m.afterRequest(e,t,c)),f(void 0,Array.isArray(t)?t:[]),!a&&l()}catch(e){f(new Error(`Request error => ${e}`)),l()}},getKey:({url:r,method:t="post",cache:o,params:s})=>o?r+t+JSON.stringify(s||{}):e()})}}}export{n as useFormAsyncQueue};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Func, Nullable } from '../../../../../es/shared/types';
|
|
2
|
-
import { FormRequestType } from '../../../../../es/components/form-render';
|
|
3
|
-
export declare type RequestInstance = Record<string, Func>;
|
|
4
|
-
declare type SearchRequestInfo = {
|
|
5
|
-
method: FormRequestType;
|
|
6
|
-
url: string;
|
|
7
|
-
primaryKeyUrl?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare type RecommendIds = Partial<Record<'businessId' | 'componentId' | 'deptId' | 'userId', string>>;
|
|
10
|
-
declare type RecommendRequestInfo = {
|
|
11
|
-
getRecommendIds(): RecommendIds;
|
|
12
|
-
url: Record<'get' | 'post' | 'delete', string>;
|
|
13
|
-
};
|
|
14
|
-
export declare function useFormRequest(): {
|
|
15
|
-
getHttpInstance: () => Nullable<RequestInstance>;
|
|
16
|
-
registGlobHttpInstance: (instance: RequestInstance) => void;
|
|
17
|
-
registGlobRecommendInfo: (info: Partial<RecommendRequestInfo>) => void;
|
|
18
|
-
registGlobSearchInfo: (info: SearchRequestInfo) => void;
|
|
19
|
-
getSearchRequestInfo: () => {
|
|
20
|
-
method: FormRequestType;
|
|
21
|
-
url: string;
|
|
22
|
-
primaryKeyUrl?: string | undefined;
|
|
23
|
-
};
|
|
24
|
-
getRecommendRequestInfo: () => RecommendRequestInfo;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cloneDeep as e}from"lodash-es";let t=null;const n={method:"post",url:"",primaryKeyUrl:""},o={url:{get:"/fdp-api/fdp/aiRec/search",post:"/fdp-api/fdp/aiRec/sendBehaviorData",delete:"/fdp-api/fdp/aiRec/delete"},getRecommendIds:()=>({})};function r(){return{getHttpInstance:function(){return t},registGlobHttpInstance:function(e){t=e},registGlobRecommendInfo:function(e){Object.assign(o,e)},registGlobSearchInfo:function(e){Object.assign(n,e)},getSearchRequestInfo:function(){return{...n}},getRecommendRequestInfo:function(){return e(o)}}}export{r as useFormRequest};
|
|
@@ -1,86 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cloneDeep as s}from"lodash-es";class e{constructor(s,e,t){this.item=s,this.key=e,this.state=0,this.callback=t}}class t{constructor(s){this._list=s?Array.from(s):[]}enqueue(s){this._list.push(s)}dequeue(){return this._list.shift()}}class i{constructor({name:s,processor:e,getKey:i,parallelism:r,uniqueData:a}){this._queued=new t,this._entries=new Map,this._activeTasks=0,this._processingLock=!1,this._stopped=!1,this.uniqueData=!0,this.name=s,this.processor=e,this.getKey=i,this.parallelism=r||100,this.uniqueData=!!a}add(t,i){if(this._stopped)return i(new Error("Queue was stopped"));const r=this.getKey(t);if(this._entries.has(r)){const e=this._entries.get(r);return void(1===e.state?setTimeout((()=>{i&&i(this.uniqueData?s(e.error):e.error,this.uniqueData?s(e.result):e.result)})):e.callbacks?e.callbacks.push(i):e.callbacks=[i])}const a=new e(t,r,i);this._entries.set(r,a),this._queued.enqueue(a),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}addAsync(s){return new Promise(((e,t)=>{this.add(s,((s,i)=>{s&&t(s),e(i)}))}))}_ensureProcessing(){for(;this._activeTasks<this.parallelism;){const s=this._queued.dequeue();if(!s)break;this._activeTasks++,s.state=0,this._startProcess(s)}this._processingLock=!1}_startProcess(s){this.processor(s.item,((e,t)=>{e?this._handlerResult(s,e):this._handlerResult(s,e,t)}),(()=>this._entries.delete(s.key)))}_handlerResult(e,t,i){const r=e.callback;e.state=1,e.callback=void 0,e.result=this.uniqueData?s(i):i,e.error=this.uniqueData?s(t):t,this._activeTasks--,r&&r(t,i),e.callbacks&&e.callbacks.forEach((s=>s(t,i))),this._processingLock||(this._processingLock=!0,Promise.resolve().then(this._ensureProcessing.bind(this)))}}export{i as AsyncQueue};
|