cnhis-design-vue 3.1.57-beta.2 → 3.1.57-beta.20
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/button-print/index.d.ts +8 -8
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +8 -8
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +3 -3
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +7 -7
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/calendar/index.d.ts +276 -0
- package/es/components/calendar/index.js +1 -0
- package/es/components/calendar/src/Calendar.vue.d.ts +265 -0
- package/es/components/calendar/src/Calendar.vue.js +1 -0
- package/es/components/calendar/src/Calendar.vue2.js +1 -0
- package/es/components/calendar/src/types/index.d.ts +6 -0
- package/es/components/calendar/src/types/index.js +1 -0
- package/es/components/calendar/style/index.css +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +233 -224
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +3 -3
- package/es/components/expand-field/index.d.ts +18 -27
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +15 -24
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +15 -24
- package/es/components/expand-field/src/components/form.vue.d.ts +18 -27
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue.d.ts +18 -27
- package/es/components/fabric-chart/index.d.ts +4 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +4 -2
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +3 -3
- package/es/components/field-set/index.d.ts +107 -616
- package/es/components/field-set/index.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1680 -0
- package/es/components/field-set/src/FieldColor.vue.js +1 -0
- package/es/components/field-set/src/FieldColor.vue2.js +1 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +58 -16
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/Index.vue.d.ts +141 -0
- package/es/components/field-set/src/Index.vue.js +1 -0
- package/es/components/field-set/src/Index.vue2.js +1 -0
- package/es/components/field-set/src/components/Row.vue.d.ts +50 -9
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +172 -0
- package/es/components/field-set/src/components/condition.vue.js +1 -0
- package/es/components/field-set/src/components/condition.vue2.js +1 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1194 -0
- package/es/components/field-set/src/components/edit-dialog.vue.js +1 -0
- package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +286 -0
- package/es/components/field-set/src/components/edit-filter.vue.js +1 -0
- package/es/components/field-set/src/components/edit-filter.vue2.js +1 -0
- package/es/components/field-set/src/constants/index.d.ts +55 -0
- package/es/components/field-set/src/constants/index.js +1 -0
- package/es/components/field-set/src/types/index.d.ts +31 -1
- package/es/components/field-set/src/utils/index.d.ts +2 -1
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +55 -30
- package/es/components/form-config/src/FormConfig.vue.d.ts +55 -30
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +17 -8
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +23 -11
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -8
- package/es/components/form-config/src/constants/index.d.ts +1 -1
- package/es/components/form-config/src/types/index.d.ts +2 -2
- package/es/components/form-render/index.d.ts +17 -8
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +17 -8
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +17 -8
- package/es/components/form-render/src/components/renderer/combination/combination.d.ts +12 -0
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.d.ts +12 -0
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/hooks/index.d.ts +1 -0
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
- package/es/components/form-render/src/hooks/useNewLowCodeReactions.d.ts +6 -0
- package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +1 -1
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/iho-table/index.d.ts +216 -216
- package/es/components/iho-table/src/IhoTable.vue.d.ts +216 -216
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +3 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +41 -23
- package/es/components/info-header/src/InfoHeader.vue.d.ts +41 -23
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +18 -9
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +17 -8
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- package/es/components/quick-search/index.d.ts +3 -3
- package/es/components/quick-search/src/index.vue.d.ts +3 -3
- package/es/components/recommend-search/index.d.ts +6 -6
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +6 -6
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
- package/es/components/scale-view/index.d.ts +3 -3
- package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -3
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
- package/es/components/select-label/index.d.ts +2 -2
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
- package/es/components/select-label/src/index.vue.d.ts +1 -1
- package/es/components/select-person/index.d.ts +15 -24
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +15 -18
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +18 -8
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -8
- package/es/components/table-export-field/index.d.ts +3 -3
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +3 -3
- package/es/components/table-export-field/src/index.vue.d.ts +3 -3
- package/es/components/time-line/index.d.ts +7 -7
- package/es/components/time-line/src/TimeLine.vue.d.ts +3 -3
- 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/package.json.js +1 -1
- package/es/shared/types/business.d.ts +23 -3
- package/es/shared/utils/business.d.ts +2 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +8 -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/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -11,6 +11,10 @@ export declare const COMBINATION: import("vue").DefineComponent<{
|
|
|
11
11
|
maxGroupNum: {
|
|
12
12
|
type: NumberConstructor;
|
|
13
13
|
};
|
|
14
|
+
minGroupNum: {
|
|
15
|
+
type: NumberConstructor;
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
14
18
|
disabled: {
|
|
15
19
|
type: BooleanConstructor;
|
|
16
20
|
};
|
|
@@ -22,6 +26,7 @@ export declare const COMBINATION: import("vue").DefineComponent<{
|
|
|
22
26
|
type: PropType<boolean | CombinationItemDeletableFn>;
|
|
23
27
|
default: boolean;
|
|
24
28
|
};
|
|
29
|
+
showLabel: BooleanConstructor;
|
|
25
30
|
onInput: {};
|
|
26
31
|
onBlur: {};
|
|
27
32
|
onChange: {};
|
|
@@ -36,6 +41,10 @@ export declare const COMBINATION: import("vue").DefineComponent<{
|
|
|
36
41
|
maxGroupNum: {
|
|
37
42
|
type: NumberConstructor;
|
|
38
43
|
};
|
|
44
|
+
minGroupNum: {
|
|
45
|
+
type: NumberConstructor;
|
|
46
|
+
default: number;
|
|
47
|
+
};
|
|
39
48
|
disabled: {
|
|
40
49
|
type: BooleanConstructor;
|
|
41
50
|
};
|
|
@@ -47,6 +56,7 @@ export declare const COMBINATION: import("vue").DefineComponent<{
|
|
|
47
56
|
type: PropType<boolean | CombinationItemDeletableFn>;
|
|
48
57
|
default: boolean;
|
|
49
58
|
};
|
|
59
|
+
showLabel: BooleanConstructor;
|
|
50
60
|
onInput: {};
|
|
51
61
|
onBlur: {};
|
|
52
62
|
onChange: {};
|
|
@@ -54,7 +64,9 @@ export declare const COMBINATION: import("vue").DefineComponent<{
|
|
|
54
64
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
55
65
|
}, {
|
|
56
66
|
disabled: boolean;
|
|
67
|
+
showLabel: boolean;
|
|
57
68
|
title: string;
|
|
69
|
+
minGroupNum: number;
|
|
58
70
|
combinationItemDeletable: boolean | CombinationItemDeletableFn;
|
|
59
71
|
properties: FieldItem[];
|
|
60
72
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as o,createVNode as r}from"vue";import{isObjectField as t}from"@formily/core";import{connect as i,RecursionField as n}from"@formily/vue";import{range as m}from"lodash-es";import"../../../../index.js";import{InjectionBusinessCollector as a,InjectionFormGlobalProps as s}from"../../../constants/index.js";import"../../../../../../shared/utils/index.js";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"date-fns";import{createObjSchema as
|
|
1
|
+
import{defineComponent as e,inject as o,createVNode as r}from"vue";import{isObjectField as t}from"@formily/core";import{connect as i,RecursionField as n}from"@formily/vue";import{range as m}from"lodash-es";import"../../../../index.js";import{InjectionBusinessCollector as a,InjectionFormGlobalProps as s}from"../../../constants/index.js";import"../../../../../../shared/utils/index.js";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"date-fns";import{createObjSchema as u}from"../../../utils/schema.js";import{useCombination as l}from"./hooks/useCombination.js";import{useFormField as p}from"../../../hooks/useFormField.js";import{useFieldListAdaptor as c}from"../../../hooks/useFieldListAdaptor.js";const f=i(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:i,fieldKey:f}=p(),{currentGroupNum:d,renderRemoveBtn:v,renderHeader:y}=l(e);function h(){d.value++}const b=o(a),C=o(s),{schemaAdaptor:j}=c(b,C.lifeCycle);return()=>r("section",{class:"form-render__combination"},[y({onClick:h}),m(d.value).map(((o,m)=>r("section",{class:"form-render__combinationContent"},[r(n,{schema:u(j(e.properties)),name:m},null),v({onClick:()=>async function(o){if(d.value>e.minGroupNum)d.value--,await i.value.remove(o);else{const e=i.value.query(`${f.value}.${o}`).take();if(!e||!t(e))return;await e.reset()}}(m),class:"form-render__combinationClose"},m)])))])}}));export{f as COMBINATION};
|
package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../../../shared/types';
|
|
2
2
|
export declare function useCombination(props: AnyObject): {
|
|
3
3
|
deletableList: import("vue").Ref<boolean[]>;
|
|
4
|
-
currentGroupNum:
|
|
4
|
+
currentGroupNum: any;
|
|
5
5
|
maxGroupNum: import("vue").ComputedRef<number>;
|
|
6
6
|
renderHeader: (attrs: AnyObject) => JSX.Element;
|
|
7
7
|
renderRemoveBtn: (attrs: AnyObject, idx: number) => JSX.Element;
|
package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e,computed as o,watch as r,onBeforeUnmount as t,createVNode as
|
|
1
|
+
import{ref as e,computed as o,watch as r,onBeforeUnmount as t,createVNode as m,mergeProps as a}from"vue";import{autorun as n}from"@formily/reactive";import{AddCircleOutline as i,RemoveCircle as l}from"@vicons/ionicons5";import{isNumber as u,isArray as c,isFunction as d}from"lodash-es";import{NButton as s,NIcon as p}from"naive-ui";import"../../../../../index.js";import{useFormField as v}from"../../../../hooks/useFormField.js";function f(f){var b;const{field:x}=v(),h=e(null!=(b=f.minGroupNum)?b:1),G=o((()=>u(f.maxGroupNum)?f.maxGroupNum<1?0:~~f.maxGroupNum:1/0));r((()=>f.value),(e=>{c(e)&&(h.value=Math.min(Math.max(e.length,f.minGroupNum),G.value))}),{immediate:!0});const N=e([]);return t(n((()=>{c(x.value.value)&&(N.value=x.value.value.map(((e,o)=>d(f.combinationItemDeletable)?f.combinationItemDeletable(e||{},o):f.combinationItemDeletable)))}))),{deletableList:N,currentGroupNum:h,maxGroupNum:G,renderHeader:function(e){return m("header",{class:"form-render__combinationHeader"},[f.showLabel?m("div",{class:"form-render__combinationHeaderText"},[f.title]):null,m(s,a(e,{text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:h.value>=G.value||f.disabled}),{icon:()=>m(p,{component:i},null),default:()=>"新增"})])},renderRemoveBtn:function(e,o){return m(s,a(e,{text:!0,disabled:!N.value[o],type:"error",size:"small"}),{icon:()=>m(p,{component:l},null)})}}}export{f as useCombination};
|
|
@@ -11,10 +11,15 @@ export declare const JSON_COMBINATION: import("vue").DefineComponent<{
|
|
|
11
11
|
maxGroupNum: {
|
|
12
12
|
type: NumberConstructor;
|
|
13
13
|
};
|
|
14
|
+
minGroupNum: {
|
|
15
|
+
type: NumberConstructor;
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
14
18
|
properties: {
|
|
15
19
|
type: PropType<FieldItem[]>;
|
|
16
20
|
default: () => never[];
|
|
17
21
|
};
|
|
22
|
+
showLabel: BooleanConstructor;
|
|
18
23
|
onInput: {};
|
|
19
24
|
onBlur: {};
|
|
20
25
|
onChange: {};
|
|
@@ -29,16 +34,23 @@ export declare const JSON_COMBINATION: import("vue").DefineComponent<{
|
|
|
29
34
|
maxGroupNum: {
|
|
30
35
|
type: NumberConstructor;
|
|
31
36
|
};
|
|
37
|
+
minGroupNum: {
|
|
38
|
+
type: NumberConstructor;
|
|
39
|
+
default: number;
|
|
40
|
+
};
|
|
32
41
|
properties: {
|
|
33
42
|
type: PropType<FieldItem[]>;
|
|
34
43
|
default: () => never[];
|
|
35
44
|
};
|
|
45
|
+
showLabel: BooleanConstructor;
|
|
36
46
|
onInput: {};
|
|
37
47
|
onBlur: {};
|
|
38
48
|
onChange: {};
|
|
39
49
|
}>> & {
|
|
40
50
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
41
51
|
}, {
|
|
52
|
+
showLabel: boolean;
|
|
42
53
|
title: string;
|
|
54
|
+
minGroupNum: number;
|
|
43
55
|
properties: FieldItem[];
|
|
44
56
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as r,watch as
|
|
1
|
+
import{defineComponent as e,ref as o,computed as r,watch as n,onMounted as t,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as u}from"@formily/path";import{AddCircleOutline as a,RemoveCircle as m}from"@vicons/ionicons5";import{range as s,isNumber as p,isArray as c,isEqual as f}from"lodash-es";import"../../../../index.js";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{connect as d,mapProps as y}from"@formily/vue";import{useDebounceFn as h,isObject as N}from"@vueuse/core";import{NButton as b,NIcon as g}from"naive-ui";import x from"../../../FormRender.vue.js";import{formRenderLog as _,mergeDeepProperties as j}from"../../../utils/index.js";import{assignUpdateValue as C}from"../../../utils/schema.js";const G=d(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},properties:{type:Array,default:()=>[]},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:d}){_("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const y=h((function(){d("update:value",JSON.stringify(C.value))}),300),C=o([]),G=r((()=>C.value.length));function I(o,r=!1){c(o)&&(o.length||o.push(...s(e.minGroupNum).map((()=>({})))),o=JSON.stringify(o));const n=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var t;(t=n)&&!f(t,C.value)&&(n.splice(J.value),n.forEach((function(o,n){if(!N(o))return;C.value[n]=o,r&&j(o,e.properties)})),C.value.splice(n.length),C.value.forEach(A))}n((()=>e.value),(e=>I(e))),t((()=>{const o=`[${s(e.minGroupNum).map((()=>"{}")).join(",")}]`;I(e.value||o,!0),y()}));const S=o([]);function A(e,o){var r;null==(r=S.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=u.getIn(e,o.path))}))}function F(){C.value.push(j({},e.properties)),y()}v().bindDeepValidate(S);const J=r((()=>p(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));n(J,(e=>{G.value<=e||(C.value.splice(e),y(),S.value.splice(e))}),{immediate:!0});const O=x;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(b,{onClick:F,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:G.value>=J.value},{icon:()=>i(g,{component:a},null),default:()=>"新增"})]),s(G.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(O,{ref:e=>function(e,o){S.value[e]=o,A(C.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!C.value[e]&&(C.value[e]={}),u.setIn(C.value[e],o,r),y()}(r,e)},null),i(b,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(o){C.value.length>e.minGroupNum?(C.value.splice(o,1),S.value.splice(o,1)):C.value.splice(o,1,{}),y()}(r)},{icon:()=>i(g,{component:m},null)})])))])}}),y(C));export{G as JSON_COMBINATION};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as o,createVNode as r,createTextVNode as t}from"vue";import{NSwitch as i,NCheckbox as l}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as u,assignValueBindKey as n}from"../../utils/schema.js";import{connect as a,mapProps as p}from"@formily/vue";const s=a(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"
|
|
1
|
+
import{defineComponent as e,computed as o,createVNode as r,createTextVNode as t}from"vue";import{NSwitch as i,NCheckbox as l}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as u,assignValueBindKey as n}from"../../utils/schema.js";import{connect as a,mapProps as p}from"@formily/vue";const s=a(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:u}){const n=o((()=>{var o,r;return null==(r=null==(o=e.openDescription)?void 0:o.value)||r})),a=o((()=>{var o,r;return null!=(r=null==(o=e.closeDescription)?void 0:o.value)&&r})),p=()=>{var o,r;return t(null!=(r=null==(o=e.openDescription)?void 0:o.describe)?r:"")},s=()=>{var o,r;return t(null!=(r=null==(o=e.closeDescription)?void 0:o.describe)?r:"")},c=o({get:()=>e.value===n.value,set:e=>u("update:value",e?n.value:a.value)});return()=>"SWITCH"===e.showMode?r(i,{value:c.value,"onUpdate:value":e=>c.value=e},{checked:p,unchecked:s}):r(l,{checked:c.value,"onUpdate:checked":e=>c.value=e},{default:p})}}),p(u,n));export{s as SWITCH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useAnchor}from"./useAnchor.js";export{useAutoHidden}from"./useAutoHidden.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{useCommonLog}from"./useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./useComplexOptions.js";export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFormContext}from"./useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./useFormEvent.js";export{useFormField}from"./useFormField.js";export{useFormGraph}from"./useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useFormRenderLifeCycle}from"./useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{useLowCodeEvent}from"./useLowCodeEvent.js";export{useLowCodeReactions}from"./useLowCodeReactions.js";export{useNuiThemeOverrides}from"./useNuiThemeOverrides.js";export{useOperationalForm}from"./useOperationalForm.js";export{usePresetScope}from"./usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./useWordbookSetting.js";
|
|
1
|
+
export{useAnchor}from"./useAnchor.js";export{useAutoHidden}from"./useAutoHidden.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{useCommonLog}from"./useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./useComplexOptions.js";export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFormContext}from"./useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./useFormEvent.js";export{useFormField}from"./useFormField.js";export{useFormGraph}from"./useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useFormRenderLifeCycle}from"./useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{useLowCodeEvent}from"./useLowCodeEvent.js";export{useLowCodeReactions}from"./useLowCodeReactions.js";export{useNuiThemeOverrides}from"./useNuiThemeOverrides.js";export{useOperationalForm}from"./useOperationalForm.js";export{usePresetScope}from"./usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./useWordbookSetting.js";export{useNewLowCodeReactions}from"./useNewLowCodeReactions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{format as l}from"date-fns";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(e){return"1"===e||!0===e}function _(_,
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{format as l}from"date-fns";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(e){return"1"===e||!0===e}function _(_,h){const{createValidatorSchema:x}=c(),g=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,beforeSetValue:null==h?void 0:h.beforeSetValue,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=x(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},y=e=>{var o,t,r,l,s,a,p,c,d,_,h,x,y,v;const b=g(e);e.urlConfig?u(b,e):e.autograph&&m(b,e);const w=!!e.__multiple,C=f(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),A=f(null!=(l=null==(r=e.componentProps)?void 0:r.selectAll)?l:e.selectAll),O=f(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=f(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(_=null==(d=e.componentProps)?void 0:d.showField)?_:e.show_key,k=null!=(x=null==(h=e.componentProps)?void 0:h.options)?x:e.option,N=null!=(v=i(e.multi_select_value))?v:null==(y=e.componentProps)?void 0:y.maxTagCount;return Object.assign(b["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:O,showField:j,maxTagCount:N,selectAll:A,...n(e,["lazyRequest","requestCache"])}),w&&(b.type="array"),b},v=e=>{var o,t;const n=g(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?u(n,e):e.autograph&&m(n,e),n},b=e=>{const t=g(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},w=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),C=new Map([["LINEBAR",w],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=g(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=g(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=g(e),{decimal_length:t,validate:n,allowSlash:r}=e;return!0!==r&&"1"!==r||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:i(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",y],["REMOTE_SEARCH",y],["DATE",e=>{const o=g(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=l(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=g(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=g(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=g(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,minGroupNum:e.minGroupNum,showLabel:"1"!==e.hide_title,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",v],["CHECKBOX",v],["SWITCH",e=>{const o=g(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=g(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=g(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?k(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),A=e=>{if(e.suffixConfig)return O(e);return(C.get(e.html_type)||b)(e)},O=o=>{if(!o.suffixConfig&&!o.prefixConfig)return A(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=g(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:k(n)}),i},{FieldNormalizeWaterfallHook:E,FieldListNormalizeWaterfallHook:j}=s();function k(o,n={column:9999}){let i=null;return j.call(t(o),n).reduce(((e,o,s)=>{var a;const p=null==(a=(o=E.call(o,n)).validate)?void 0:a.obj_type;return p&&_&&_.collect(p,t(o)),"LINEBAR"===o.html_type?(e[l(o)]=r(w(o),s),i=e[l(o)].properties={}):i?i[l(o)]=r(A(o),s):(i=null,e[l(o)]=r(A(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function l(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:k}}export{_ as useFieldListAdaptor};
|
|
@@ -88,7 +88,7 @@ export declare function useFieldNormalize(): {
|
|
|
88
88
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
89
89
|
requestInstance: import("../../..").FormRequestDefine.RequestInstance;
|
|
90
90
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
91
|
-
lowCodeReactions: import("../../../../shared/types").LowCodeTypes.
|
|
91
|
+
lowCodeReactions: import("../../../../shared/types").LowCodeTypes.reactionConfig[];
|
|
92
92
|
linebarAutoHidden: boolean;
|
|
93
93
|
bordered: string | boolean;
|
|
94
94
|
uniqueCacheData: boolean;
|
|
@@ -183,7 +183,7 @@ export declare function useFieldNormalize(): {
|
|
|
183
183
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
184
184
|
requestInstance: import("../../..").FormRequestDefine.RequestInstance;
|
|
185
185
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
186
|
-
lowCodeReactions: import("../../../../shared/types").LowCodeTypes.
|
|
186
|
+
lowCodeReactions: import("../../../../shared/types").LowCodeTypes.reactionConfig[];
|
|
187
187
|
linebarAutoHidden: boolean;
|
|
188
188
|
bordered: string | boolean;
|
|
189
189
|
uniqueCacheData: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LowCodeTypes } from '../../../../shared/types';
|
|
2
2
|
import { Form } from '@formily/core';
|
|
3
3
|
import { MaybeRef } from '@vueuse/core';
|
|
4
|
-
export declare function useLowCodeReactions(configListRef: MaybeRef<LowCodeTypes.
|
|
4
|
+
export declare function useLowCodeReactions(configListRef: MaybeRef<LowCodeTypes.reactionConfig[] | undefined>, formModel: Form): {
|
|
5
5
|
lowCodeReactionsHandler: (field: string) => void;
|
|
6
6
|
triggerAllReactionsHandler: () => void;
|
|
7
7
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LowCodeTypes } from '../../../../shared/types';
|
|
2
|
+
import { Form } from '@formily/core';
|
|
3
|
+
import { MaybeRef } from '@vueuse/core';
|
|
4
|
+
export declare function useNewLowCodeReactions(configListRef: MaybeRef<LowCodeTypes.newReactionConfig[] | undefined>, formModel: Form): {
|
|
5
|
+
newLowCodeReactionsHandler: (field: string) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{isEmpty as o,isString as i,isArray as n}from"lodash-es";import{computed as r,unref as t}from"vue";import{isMatchNewLowCodeConditionsWithSqlExpression as s}from"../../../../shared/utils/business.js";function a(a,l){function u(o){return(i,n)=>{i.fields.forEach((r=>{const t=l.query(r).take();t&&e(t)&&o(t,n,i)}))}}const d=new Map([[["show","hide"],u(((e,o,{actionConfig:{restoreDefault:i}={}})=>{var n;return o?e.display="visible":i?(e.setValue(null!=(n=e.initialValue)?n:null),void(e.display="hidden")):void(e.display="none")}))],[["required","notRequired"],u(((e,o)=>{e.required=o}))],[["disabled","enabled"],u(((e,o)=>{e.disabled=o}))]]),f=r((()=>{const e=new Map,n=t(a);return n?(n.forEach((n=>{o(n.conditions)||n.conditions.forEach((o=>{const r=[];i(o.field)&&o.field&&r.push(o.field),"field"===o.valueType&&i(o.value)&&o.value&&r.push(o.value),r.forEach((o=>{var i;e.has(o)||e.set(o,[]),null==(i=e.get(o))||i.push(n)}))}))})),e):e}));return{newLowCodeReactionsHandler:function(e){const o=f.value.get(e);o&&o.forEach((e=>{!function(e,o){if(!n(e.actions))return;e.actions.forEach((e=>{for(const[i,n]of[...d]){const r=i.indexOf(e.action);if(~r){n(e,r?!o:o);break}}}))}(e,s(l.values,e))}))}}}export{a as useNewLowCodeReactions};
|
|
@@ -133,6 +133,7 @@ export declare type FieldItem = {
|
|
|
133
133
|
lazyRequest: boolean;
|
|
134
134
|
requestCache: boolean;
|
|
135
135
|
maxGroupNum: number;
|
|
136
|
+
minGroupNum: number;
|
|
136
137
|
jsonCombination: boolean;
|
|
137
138
|
combinationItemDeletable: boolean | CombinationItemDeletableFn;
|
|
138
139
|
children: FieldItem[];
|
|
@@ -143,7 +143,7 @@ export declare type FormRenderProps = Partial<{
|
|
|
143
143
|
businessFormatter: FormBusinessFormatter;
|
|
144
144
|
requestInstance: FormRequestDefine.RequestInstance;
|
|
145
145
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
146
|
-
lowCodeReactions: LowCodeTypes.
|
|
146
|
+
lowCodeReactions: LowCodeTypes.reactionConfig[];
|
|
147
147
|
linebarAutoHidden: boolean;
|
|
148
148
|
bordered: boolean | string;
|
|
149
149
|
uniqueCacheData: boolean;
|
|
@@ -14,7 +14,7 @@ export declare function createGuideStep(instance?: ComponentInternalInstance | n
|
|
|
14
14
|
type: NumberConstructor;
|
|
15
15
|
required: true;
|
|
16
16
|
};
|
|
17
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
17
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("next" | "cancel" | "toNext")[], "next" | "cancel" | "toNext", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
18
|
config: {
|
|
19
19
|
type: PropType<GuideDefine.Config>;
|
|
20
20
|
required: true;
|
|
@@ -29,8 +29,8 @@ export declare function createGuideStep(instance?: ComponentInternalInstance | n
|
|
|
29
29
|
required: true;
|
|
30
30
|
};
|
|
31
31
|
}>> & {
|
|
32
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
33
32
|
onNext?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
34
34
|
onToNext?: ((...args: any[]) => any) | undefined;
|
|
35
35
|
}, {
|
|
36
36
|
config: GuideDefine.Config;
|