cnhis-design-vue 3.1.43-beta.30 → 3.1.43-beta.31
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/base-search/index.d.ts +1 -0
- package/es/components/base-search/src/index.vue.d.ts +1 -0
- 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/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
- package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
- package/es/components/quick-search/index.d.ts +1 -0
- package/es/components/quick-search/src/index.vue.d.ts +1 -0
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +1 -0
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
selectOptions: import("vue").Ref<any[]>;
|
|
27
27
|
isRemote: import("vue").Ref<boolean>;
|
|
28
28
|
isLoading: import("vue").Ref<boolean>;
|
|
29
|
-
valueCp: import("vue").WritableComputedRef<
|
|
29
|
+
valueCp: import("vue").WritableComputedRef<unknown>;
|
|
30
30
|
searchOptions: (keyword: string) => Promise<any>;
|
|
31
31
|
_handleSearch: (query: string) => Promise<void>;
|
|
32
32
|
handleSearch: (query: string) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as a,ref as t,computed as n,openBlock as l,createBlock as i,unref as o,mergeProps as
|
|
1
|
+
import{defineComponent as e,useAttrs as a,ref as t,computed as n,openBlock as l,createBlock as i,unref as o,mergeProps as r,isRef as u,h as s}from"vue";import{NSelect as c,NTag as p}from"naive-ui";import{useDebounceFn as v}from"@vueuse/core";import d from"../../../hooks/useMixins.js";import f from"../../../../../../_virtual/plugin-vue_export-helper.js";var y=f(e({__name:"Select",props:{value:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:value","changeInitState"],setup(e,{emit:f}){const y=e,{handleGetConfigApi:m}=d(),g=a(),h=t([]),b=t(!1),w=t(!1),A=n({set(e){const a=Array.isArray(e)?e:e?[e]:null;f("update:value",a)},get(){if(Array.isArray(y.value)&&y.value.length>0){const{multiple:e}=g;return e||1!=y.value.length?y.value:y.value[0]}return y.value}});async function I(e){try{if(g.dynamicOptionInfo){const{autograph:a,dataSourceId:t,dataSourceType:n,filterKeys:l,showKeys:i,valueKey:o}=g.dynamicOptionInfo;let r={wordbookId:t,autograph:a,wordbookType:n,fieldKeys:l,keyword:e,page:1};w.value=!0;let u=await m(r,"requestDynamicSelect",{},y.filterApiConfig);if(u){const{fieldList:e,rows:a}=u,t=a.map((e=>({...e,label:e[i[0]],value:e[o]})));return h.value=t,t}}}catch(e){console.log(e)}finally{w.value=!1}}const S=v((async e=>{await async function(e){const{manualMapping:a}=g;if(!a){const a=e.trim();await I(a)}}(e)}),300);async function C(){const{manualMapping:e,dynamicOptionInfo:a,valueList:t}=g;if(e&&Array.isArray(t))return b.value=!1,void(h.value=t.map((({value:e,label:a})=>({value:e,label:a}))));Object.keys(a).length>0&&y.filterApiConfig&&(b.value=!0,await I(""))}function O(e){const{manualMapping:a}=g;if(a)return s("div",e.label);const{showKeys:t=[]}=g.dynamicOptionInfo;return g.dynamicOptionInfo&&t.length>0?s("div",{class:"select-widget-dynamic-option"},t.map((a=>s("span",{class:"select-widget-dynamic-item"},e[a])))):s("div",e.label)}function _({option:e,handleClose:a}){const{multiple:t}=g;return t?s(p,{style:{padding:"0 8px"},closable:!0,onClose:e=>{e.stopPropagation(),a()}},{default:()=>s("div",e.label)}):s("div",e.label)}return async function(){const{manualMapping:e,defValue:a,defValueUnit:t,_frontId:n,isInit:l}=g;await C();const i=Array.isArray(y.value)?y.value.length>0:y.value;if(!l&&!i){if(e)return f("update:value",a),void f("changeInitState",n,!0);if(t)switch(t){case"FIRST":{const e=h.value[0];f("update:value",[e.value]),f("changeInitState",n,!0);break}}}}(),(e,a)=>(l(),i(o(c),r(o(g),{value:o(A),"onUpdate:value":a[0]||(a[0]=e=>u(A)?A.value=e:null),loading:w.value,options:h.value,remote:b.value,"render-label":O,"render-tag":_,onSearch:o(S),onClear:C}),null,16,["value","loading","options","remote","onSearch"]))}}),[["__file","Select.vue"]]);export{y as default};
|
|
@@ -44,7 +44,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
44
44
|
selectOptions: import("vue").Ref<any[]>;
|
|
45
45
|
isRemote: import("vue").Ref<boolean>;
|
|
46
46
|
isLoading: import("vue").Ref<boolean>;
|
|
47
|
-
valueCp: import("vue").WritableComputedRef<
|
|
47
|
+
valueCp: import("vue").WritableComputedRef<unknown>;
|
|
48
48
|
searchOptions: (keyword: string) => Promise<any>;
|
|
49
49
|
_handleSearch: (query: string) => Promise<void>;
|
|
50
50
|
handleSearch: (query: string) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";const l={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function a(){return{transformData:function(i){return i.map((i=>{var n,a;const{optionInfo:o={list:[],manualMapping:!0,dynamicOptionInfo:{}},type:u,defaultValue:r,optionType:s,filterExplicit:p,rangeFilter:d}=i,c={},
|
|
1
|
+
import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";const l={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function a(){return{transformData:function(i){return i.map((i=>{var n,a;const{optionInfo:o={list:[],manualMapping:!0,dynamicOptionInfo:{}},type:u,defaultValue:r,optionType:s,filterExplicit:p,rangeFilter:d}=i,c={},E={title:(m=i).title,alias:m.customTitle,isShowSearch:m.isShowSearch?1:0,filterExplicit:m.filterExplicit?1:0,explicitRequired:m.explicitRequired?1:0,advanceOptionSetting:m.optionType?l[m.optionType]:"",placeholder:m.remark,advanceColWidth:m.width};var m;let f,T,v=u;p?(f=u===t.SELECT&&s===e.MULTIPLE?null==r?void 0:r.valueList:null==(n=null==r?void 0:r.valueList)?void 0:n[0],T=null==r?void 0:r.unit):u===t.SELECT&&(null==o?void 0:o.list)&&(null==o?void 0:o.list.length)<10&&(v="CHECKBOX_GROUP"),d&&(u===t.INPUT_NUMBER&&(v="INPUTNUMBER_RANGE"),u===t.DATE&&(v="DATE_RANGE"),u===t.DATE_TIME&&(v="DATETIME_RANGE"));const g={isRender:!0,isInit:!1,widgetType:v,valueList:null==(a=null==o?void 0:o.list)?void 0:a.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:f,defValueUnit:T,multiple:s===e.MULTIPLE,manualMapping:null==o?void 0:o.manualMapping,dynamicOptionInfo:null==o?void 0:o.dynamicOptionInfo};return{...E,fieldType:i.dataType,columnName:i.name,settingObj:c,setting:JSON.stringify(c),widgetCfg:g,rangeFilter:d}}))},getCacheDef:function(e,i){const{widgetType:n,widgetCfg:l}=e;return n!==t.SELECT&&n!==t.CHECKBOX_GROUP||!l.multiple?i[0]:i},transformClassifyChild:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const l=e.field_key,a=e.value&&e.value.length>1?e.value:e.value.toString();if(t[l]=a,e.unit&&e.unit!==n.CUSTOM){const n=i(e.unit,"YYYY-MM-DD HH:mm:ss");t[l]=n}})),t},transformParams:function(e){const i={},n=[t.SELECT];return e&&e.length>0&&e.forEach((e=>{const t=e.field_key,l=n.includes(e.widgetType)||e.value&&e.value.length>1?e.value:e.value.toString();i[t]=l})),i}}}export{a as default};
|
|
@@ -4,6 +4,7 @@ export default function (): {
|
|
|
4
4
|
getDefValByRenderWidget: (cfg: ISearchType) => any;
|
|
5
5
|
initRenderWidgetCfg: (cfg: ISearchType) => any;
|
|
6
6
|
getRenderSearchConObj: (cfg: ISearchType) => {
|
|
7
|
+
widgetType: any;
|
|
7
8
|
field_key: string;
|
|
8
9
|
con: string | undefined;
|
|
9
10
|
value: any[] | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{DatePresetValEnums as
|
|
1
|
+
import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{DatePresetValEnums as t}from"../components/render-widget/enums.js";import{WidgetTypeEnums as n}from"../types/enums.js";const r=[n.CHECKBOX_GROUP,n.DATE_RANGE,n.DATETIME_RANGE];function i(){function i(e){var t;return null==(t=e.widgetCfg)?void 0:t.isRender}function u(t){const{rangeFilter:n}=t,{widgetType:r,defaultValue:i,defValueUnit:u}=t.widgetCfg||{},l=e.get(r);let o;if(l){const{setDefaultValue:e}=l;e&&!n&&(o=e(i,u))}return o}return{isRender:i,getDefValByRenderWidget:u,initRenderWidgetCfg:function(e){const t=i(e);if(!t)return t;const{widgetType:n}=e.widgetCfg||{};return e._frontId||(e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))),e.isRender=t,e.widgetType=n,e.con="EQ",r.includes(n)&&(e._isBlock=!0),e.value=u(e),t},getRenderSearchConObj:function(e){if(!i(e))return null;const{columnName:r,con:u,value:l,widgetType:o}=e;let d=null;[n.DATE,n.DATE_TIME].includes(o)&&(d=t.CUSTOM);const f=Array.isArray(l)?l:l?[l]:[];return{widgetType:o,field_key:r,con:u,value:f.length>0?f:null,unit:d}},getDefValByRenderConObj:function(e,t){if(!i(t))return null;const{widgetType:r,multiple:u}=t.widgetCfg||{},{value:l}=e;return r!==n.SELECT&&r!==n.CHECKBOX_GROUP||!u?Array.isArray(l)?l[0]:l:Array.isArray(l)?l:l?[l]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:t,defValueUnit:n}=e.widgetCfg||{};return!(!t&&!n)},resetRenderWidgetValue:function(e){const t=i(e);return t?(e.value=null,t):t}}}export{i as default};
|
package/es/env.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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';
|
|
25
|
-
|
|
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';
|
|
25
|
+
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.43-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.43-beta.31",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.43-beta.31",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};
|
|
@@ -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.43-beta.
|
|
3
|
+
"version": "3.1.43-beta.31",
|
|
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": "9e4b6bb5da8464993b34af60ec10b8f3dfa77dda"
|
|
65
65
|
}
|