cnhis-design-vue 3.1.53-beta.5 → 3.1.53-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/button-print/src/ButtonPrint.vue.d.ts +1 -3
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +7 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +7 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/{combination.d.ts → combination/combination.d.ts} +1 -1
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/index.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/index.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +8 -0
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/index.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/combination/index.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/combination/tableCombination.d.ts +61 -0
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -0
- package/es/components/form-render/src/components/renderer/index.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/shortcut-setter/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- 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/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/combination.js +0 -1
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +0 -1
- /package/es/components/form-render/src/components/renderer/{jsonCombination → combination}/hooks/useDeepValidate.d.ts +0 -0
- /package/es/components/form-render/src/components/renderer/{jsonCombination → combination}/hooks/useDeepValidate.js +0 -0
- /package/es/components/form-render/src/components/renderer/{jsonCombination/index.d.ts → combination/jsonCombination.d.ts} +0 -0
|
@@ -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.53-beta.
|
|
3
|
+
"version": "3.1.53-beta.6",
|
|
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": "03cdbf6f5574f5a1899d470ab4f0df11172db541"
|
|
67
67
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,watch as r,inject as a,onBeforeUnmount as i,createVNode as m}from"vue";import{isObjectField as n}from"@formily/core";import{autorun as l}from"@formily/reactive";import{connect as s,RecursionField as u}from"@formily/vue";import{AddCircleOutline as p,RemoveCircle as c}from"@vicons/ionicons5";import{isNumber as d,isArray as f,isFunction as v,range as b}from"lodash-es";import{NButton as y,NIcon as h}from"naive-ui";import"../../../index.js";import{InjectionBusinessCollector as x,InjectionFormGlobalProps as _}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"@formily/path";import"@vue/shared";import"@vueuse/core";import"date-fns";import{createObjSchema as C}from"../../utils/schema.js";import{useFormField as j}from"../../hooks/useFormField.js";import{useFieldListAdaptor as k}from"../../hooks/useFieldListAdaptor.js";const F=s(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:s,fieldKey:F}=j(),I=o(1),N=t((()=>d(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));function A(){I.value++}r((()=>e.value),(e=>{f(e)&&(I.value=Math.min(Math.max(e.length,1),N.value))}),{immediate:!0});const D=a(x),G=a(_),{schemaAdaptor:g}=k(D,G.lifeCycle),B=o([]);return i(l((()=>{f(s.value.value)&&(B.value=s.value.value.map(((o,t)=>v(e.combinationItemDeletable)?e.combinationItemDeletable(o||{},t):e.combinationItemDeletable)))}))),()=>m("section",{class:"form-render__combination"},[m("header",{class:"form-render__combinationHeader"},[m("div",{class:"form-render__combinationHeaderText"},[e.title]),m(y,{onClick:A,text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:I.value>=N.value||e.disabled},{icon:()=>m(h,{component:p},null),default:()=>"新增"})]),b(I.value).map(((o,t)=>m("section",{class:"form-render__combinationContent"},[m(u,{schema:C(g(e.properties)),name:t},null),m(y,{text:!0,disabled:!B.value[t],type:"error",class:"form-render__combinationClose",onClick:()=>async function(e){if(I.value>1)I.value--,await s.value.remove(e);else{const o=s.value.query(`${F.value}.${e}`).take();if(!o||!n(o))return;await o.reset()}}(t)},{icon:()=>m(h,{component:c},null)})])))])}}));export{F as COMBINATION};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as r,watch as t,onMounted as n,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as a}from"@formily/path";import{AddCircleOutline as u,RemoveCircle as s}from"@vicons/ionicons5";import{isNumber as m,range as p,isArray as c,isEqual as f}from"lodash-es";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{formRenderLog as d,mergeDeepProperties as y}from"../../../utils/index.js";import{connect as h,mapProps as g}from"@formily/vue";import{useDebounceFn as b,isObject as x}from"@vueuse/core";import{NButton as N,NIcon as _}from"naive-ui";import C from"../../../FormRender.vue.js";import{assignUpdateValue as j}from"../../../utils/schema.js";const I=h(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},properties:{type:Array,default:()=>[]},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:h}){d("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const g=b((function(){h("update:value",JSON.stringify(j.value))}),300),j=o([]),I=r((()=>j.value.length));function S(o,r=!1){c(o)&&(o.length||o.push({}),o=JSON.stringify(o));const t=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var n;(n=t)&&!f(n,j.value)&&(t.splice(O.value),t.forEach((function(o,t){if(!x(o))return;j.value[t]=o,r&&y(o,e.properties)})),j.value.splice(t.length),j.value.forEach(F))}t((()=>e.value),(e=>S(e))),n((()=>{S(e.value||"[{}]",!0),g()}));const A=o([]);function F(e,o){var r;null==(r=A.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=a.getIn(e,o.path))}))}function J(){j.value.push(y({},e.properties)),g()}v().bindDeepValidate(A);const O=r((()=>m(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));t(O,(e=>{I.value<=e||(j.value.splice(e),g(),A.value.splice(e))}),{immediate:!0});const G=C;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(N,{onClick:J,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:I.value>=O.value},{icon:()=>i(_,{component:u},null),default:()=>"新增"})]),p(I.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(G,{ref:e=>function(e,o){A.value[e]=o,F(j.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!j.value[e]&&(j.value[e]={}),a.setIn(j.value[e],o,r),g()}(r,e)},null),i(N,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(e){j.value.length>1?(j.value.splice(e,1),A.value.splice(e,1)):j.value.splice(e,1,{}),g()}(r)},{icon:()=>i(_,{component:s},null)})])))])}}),g(j));export{I as JSON_COMBINATION};
|
|
File without changes
|
|
File without changes
|