cnhis-design-vue 3.1.41-release.5 → 3.1.41
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/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/useTop.js +1 -1
- package/es/components/field-set/index.d.ts +8 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +5 -0
- package/es/components/field-set/src/FieldSet.vue.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +6755 -44
- package/es/components/form-config/src/FormConfig.vue.d.ts +6897 -185
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.d.ts +4 -4
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3410 -58
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +2 -2
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
- package/es/components/form-config/src/components/renderer/CloseButton.vue.d.ts +3 -3
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +10 -10
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +6 -6
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.d.ts +2 -3
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.d.ts +4 -2
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
- package/es/components/form-config/src/hooks/usePresetRenderer.d.ts +1 -1
- package/es/components/form-config/src/types/index.d.ts +8 -2
- package/es/components/form-config/src/utils/index.d.ts +4 -1
- package/es/components/form-config/src/utils/index.js +1 -1
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +1 -1
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +21 -20
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +0 -12
- package/es/components/form-render/src/constants/index.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +4 -2
- package/es/components/iho-table/index.d.ts +2 -2
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -2
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/plugins/{filterPlugin → filterRenderPlugin}/filter.vue.d.ts +15 -74
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +85 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/{timeRendererPlugin.d.ts → timeRendererPlugin/index.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +20 -11
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +289 -155
- package/es/components/info-header/src/InfoHeader.vue.d.ts +293 -160
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/components/index.d.ts +3 -0
- package/es/components/info-header/src/components/index.js +1 -0
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -0
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +266 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +38 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -0
- package/es/components/info-header/src/types/index.d.ts +29 -0
- package/es/components/scale-view/index.d.ts +1 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -5
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/utils/judge-types.js +1 -1
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/components/table-filter/index.d.ts +12 -77
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +4 -2
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -1
- package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +4 -22
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/search-filter/index.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/search-filter/index.vue.js +1 -1
- package/es/components/table-filter/src/components/set-classification/index.vue.d.ts +4 -20
- package/es/components/table-filter/src/components/set-classification/index.vue.js +1 -1
- package/es/components/table-filter/src/components/table-modal/index.vue.js +1 -1
- package/es/components/table-filter/src/hooks/useMixins.js +1 -1
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +4 -53
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -1
- package/es/components/table-filter/style/index.css +1 -1
- package/es/shared/components/no-data/NoData.vue.d.ts +5 -0
- package/es/shared/components/no-data/NoData.vue.js +1 -1
- package/es/shared/utils/index.d.ts +16 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +64 -64
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +0 -1
- package/es/components/iho-table/src/plugins/filterPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +0 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +0 -1
- package/es/components/info-header/src/HiddenContent.vue.js +0 -1
- package/es/components/info-header/src/InfoEllipsis.vue.js +0 -1
- package/es/components/table-filter/src/components/age-com/index.vue.d.ts +0 -119
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.d.ts +0 -199
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.d.ts +0 -2
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +0 -1
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.d.ts +0 -90
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.d.ts +0 -113
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.d.ts +0 -266
- package/es/components/table-filter/src/components/range-age/index.vue.d.ts +0 -248
- package/es/components/table-filter/src/const/dataOptions.d.ts +0 -12
- package/es/components/table-filter/src/const/dataOptions.js +0 -1
- package/es/components/table-filter/src/directive/preventReClick.d.ts +0 -4
- package/es/components/table-filter/src/directive/preventReClick.js +0 -1
- package/es/components/info-header/src/{HiddenContent.vue.d.ts → components/infoDescription/HiddenContent.vue.d.ts} +2 -2
- package/es/components/info-header/src/{InfoEllipsis.vue.d.ts → components/infoDescription/InfoEllipsis.vue.d.ts} +1 -1
- /package/es/components/{iho-table/src/plugins/filterPlugin/types.js → info-header/src/types/index.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as i,ref as o,inject as
|
|
1
|
+
import{defineComponent as e,computed as i,ref as o,inject as t,watch as l,toRaw as a,openBlock as r,createElementBlock as n,Fragment as u,createBlock as s,unref as m,createVNode as d,nextTick as v}from"vue";import{cloneDeep as f}from"lodash-es";import{InjectionActiveFieldItem as p}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as c}from"../utils/index.js";import g from"../../../../_virtual/plugin-vue_export-helper.js";import"@vicons/ionicons5";import{NModal as h}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as y}from"../hooks/useConfigurationField.js";import"../../../index.js";import j from"../../../form-render/index.js";var x=g(e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},formRenderRef:{type:Object}},setup(e,{expose:g}){const x=e,_=i((()=>`#${x.uuid} .form-config__config`)),F=o(0),b=o(),k=t(p),C=o([]),R=o({}),{generateFieldListByFormConfigItem:w}=y(),P=o(!1);async function E(){var e;k.value=L,await v(),null==(e=b.value)||e.validate()}let L=null;function q({fieldKey:e,value:i}){k.value&&(k.value[e]=i)}return l(k,(async(e,i)=>{var o,t;if(!e)return C.value=[];if(i&&e!==L)try{await(null==(o=b.value)?void 0:o.validate())}catch(e){return P.value=!0}L=e,R.value={editable:!0,...f(a(e))};const l=null==(t=x.formRenderRef)?void 0:t.getFieldList();C.value=w(e,c(l,e.key)).map((e=>({...e,componentProps:{...e.componentProps,to:_.value}}))),F.value++}),{immediate:!0}),g({validate(){var e;return null==(e=b.value)?void 0:e.validate()}}),(e,i)=>(r(),n(u,null,[(r(),s(m(j),{key:F.value,column:12,ref_key:"formRenderRef",ref:b,size:"small",onFormChange:q,"field-list":C.value,"initial-data":R.value},null,8,["field-list","initial-data"])),d(m(h),{show:P.value,"onUpdate:show":i[0]||(i[0]=e=>P.value=e),preset:"dialog",to:m(_),"close-on-esc":!1,"mask-closable":!1,closable:!1,title:"存在填写错误的字段","positive-text":"继续编辑",onPositiveClick:E},null,8,["show","to"])],64))}}),[["__file","FormConfigEdit.vue"]]);export{x as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { FormConfigItem } from '../../../../../es/components/form-config';
|
|
3
3
|
declare const FormConfigMaterialItem: import("vue").DefineComponent<{
|
|
4
|
-
|
|
4
|
+
formConfigItem: {
|
|
5
5
|
type: PropType<FormConfigItem>;
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
8
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
-
|
|
9
|
+
formConfigItem: {
|
|
10
10
|
type: PropType<FormConfigItem>;
|
|
11
11
|
required: true;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as t,createVNode as e}from"vue";import{layoutWidthEnum2Column as o}from"../utils/index.js";import{NButton as m,NEllipsis as r}from"naive-ui";const f=t({props:{formConfigItem:{type:Object,required:!0}},setup:t=>()=>e(m,{secondary:!0,style:{"--item-column":o(t.formConfigItem.layoutWidthEnum)},class:"form-config__materialContentItem","data-type":t.formConfigItem.type},{default:()=>e(r,null,{default:()=>t.formConfigItem.name})})});export{f as default};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { FormConfigItem } from '../../../../../../es/components/form-config';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
|
|
4
|
+
formConfigItem: {
|
|
5
5
|
type: PropType<FormConfigItem>;
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
8
|
}, {
|
|
9
9
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
-
|
|
10
|
+
formConfigItem: {
|
|
11
11
|
type: PropType<FormConfigItem>;
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
NButton: any;
|
|
20
20
|
NIcon: any;
|
|
21
21
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
-
|
|
22
|
+
formConfigItem: {
|
|
23
23
|
type: PropType<FormConfigItem>;
|
|
24
24
|
required: true;
|
|
25
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as o,inject as e,openBlock as t,createBlock as r,unref as n,withModifiers as i,withCtx as
|
|
1
|
+
import{defineComponent as o,inject as e,openBlock as t,createBlock as r,unref as n,withModifiers as i,withCtx as m,createVNode as s}from"vue";import{CloseCircle as l}from"@vicons/ionicons5";import{isArray as p}from"lodash-es";import{NButton as u,NIcon as c}from"naive-ui";import{InjectionFieldList as f,InjectionMaterialList as a}from"../../constants/index.js";import _ from"../../../../../_virtual/plugin-vue_export-helper.js";var v=_(o({__name:"CloseButton",props:{formConfigItem:{type:Object,required:!0}},setup(o){const _=o,v=e(f),d=e(a),C=()=>{!function o(e){return p(e)&&e.some(((e,t,r)=>e!==_.formConfigItem?o(e.children):(!e.__new&&d.value.push(e),r.splice(t,1))))}(v.value)};return(o,e)=>(t(),r(n(u),{text:"",class:"form-config__renderer--closeButton","text-color":"#a5a5a5",onClick:i(C,["stop"])},{icon:m((()=>[s(n(c),{component:n(l)},null,8,["component"])])),_:1},8,["onClick"]))}}),[["__file","CloseButton.vue"]]);export{v as default};
|
|
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { FormConfigItem, FormConfigTextFormatter } from '../../../../../../es/components/form-config';
|
|
3
3
|
import { bindHover } from '../../../../../../es/components/form-config/src/utils';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
|
-
|
|
5
|
+
formConfigItem: {
|
|
6
6
|
type: PropType<FormConfigItem>;
|
|
7
7
|
required: true;
|
|
8
8
|
};
|
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
};
|
|
13
13
|
}, {
|
|
14
14
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
|
|
15
|
+
formConfigItem: {
|
|
16
16
|
type: PropType<FormConfigItem>;
|
|
17
17
|
required: true;
|
|
18
18
|
};
|
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
'is-active': boolean;
|
|
28
28
|
})[]>;
|
|
29
29
|
FormConfigDragDisplay: import("vue").DefineComponent<{
|
|
30
|
-
|
|
30
|
+
formConfigItem: {
|
|
31
31
|
type: PropType<FormConfigItem>;
|
|
32
32
|
};
|
|
33
33
|
textFormatter: {
|
|
@@ -35,10 +35,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
required: true;
|
|
36
36
|
};
|
|
37
37
|
}, {
|
|
38
|
-
getItemColumnStyle: (
|
|
38
|
+
getItemColumnStyle: (formConfigItem?: FormConfigItem | undefined) => {
|
|
39
39
|
'--item-column': number;
|
|
40
40
|
};
|
|
41
|
-
getRenderer: (
|
|
41
|
+
getRenderer: (formConfigItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
42
42
|
getCommonConfig: (formConfig?: FormConfigItem | undefined) => {
|
|
43
43
|
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
44
44
|
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
@@ -123,7 +123,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
123
123
|
componentData: Record<string, any>;
|
|
124
124
|
}>;
|
|
125
125
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
126
|
-
|
|
126
|
+
formConfigItem: {
|
|
127
127
|
type: PropType<FormConfigItem>;
|
|
128
128
|
};
|
|
129
129
|
textFormatter: {
|
|
@@ -132,13 +132,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
132
|
};
|
|
133
133
|
}>>, {}>;
|
|
134
134
|
CloseButton: import("vue").DefineComponent<{
|
|
135
|
-
|
|
135
|
+
formConfigItem: {
|
|
136
136
|
type: PropType<FormConfigItem>;
|
|
137
137
|
required: true;
|
|
138
138
|
};
|
|
139
139
|
}, {
|
|
140
140
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
141
|
-
|
|
141
|
+
formConfigItem: {
|
|
142
142
|
type: PropType<FormConfigItem>;
|
|
143
143
|
required: true;
|
|
144
144
|
};
|
|
@@ -150,14 +150,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
150
|
NButton: any;
|
|
151
151
|
NIcon: any;
|
|
152
152
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
153
|
-
|
|
153
|
+
formConfigItem: {
|
|
154
154
|
type: PropType<FormConfigItem>;
|
|
155
155
|
required: true;
|
|
156
156
|
};
|
|
157
157
|
}>>, {}>;
|
|
158
158
|
bindHover: typeof bindHover;
|
|
159
159
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
160
|
-
|
|
160
|
+
formConfigItem: {
|
|
161
161
|
type: PropType<FormConfigItem>;
|
|
162
162
|
required: true;
|
|
163
163
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as o,computed as r,openBlock as
|
|
1
|
+
import{defineComponent as e,inject as o,computed as r,openBlock as m,createElementBlock as n,createElementVNode as t,mergeProps as i,unref as f,withModifiers as l,createTextVNode as s,toDisplayString as c,createVNode as p}from"vue";import u from"../FormConfigDragDisplay.vue.js";import a from"./CloseButton.vue.js";import{InjectionActiveFieldItem as d}from"../../constants/index.js";import{bindHover as g}from"../../utils/index.js";import C from"../../../../../_virtual/plugin-vue_export-helper.js";const _={class:"form-config__renderer--complex form-config__renderer"},v=["onClick"];var x=C(e({__name:"ComplexNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const C=e,x=o(d);function I(){x.value=C.formConfigItem}const j=r((()=>[{"is-active":x.value===C.formConfigItem},"form-config__renderer--complexHeader"]));return(o,r)=>(m(),n("section",_,[t("header",i(f(g)(e.formConfigItem),{class:f(j),onClick:l(I,["stop"])}),[s(c(C.formConfigItem.name)+" ",1),p(a,{"form-config-item":e.formConfigItem},null,8,["form-config-item"])],16,v),p(u,i(o.$props,{modelValue:e.formConfigItem.children,"onUpdate:modelValue":r[0]||(r[0]=o=>e.formConfigItem.children=o),class:"form-config__renderer--complex--grid"}),null,16,["modelValue"])]))}}),[["__file","ComplexNode.vue"]]);export{x as default};
|
|
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { FormConfigItem, FormConfigTextFormatter } from '../../../../../../es/components/form-config';
|
|
3
3
|
import { bindHover } from '../../../../../../es/components/form-config/src/utils';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
|
-
|
|
5
|
+
formConfigItem: {
|
|
6
6
|
type: PropType<FormConfigItem>;
|
|
7
7
|
required: true;
|
|
8
8
|
};
|
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
};
|
|
13
13
|
}, {
|
|
14
14
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
|
|
15
|
+
formConfigItem: {
|
|
16
16
|
type: PropType<FormConfigItem>;
|
|
17
17
|
required: true;
|
|
18
18
|
};
|
|
@@ -34,13 +34,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
NEllipsis: any;
|
|
35
35
|
NButton: any;
|
|
36
36
|
CloseButton: import("vue").DefineComponent<{
|
|
37
|
-
|
|
37
|
+
formConfigItem: {
|
|
38
38
|
type: PropType<FormConfigItem>;
|
|
39
39
|
required: true;
|
|
40
40
|
};
|
|
41
41
|
}, {
|
|
42
42
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
-
|
|
43
|
+
formConfigItem: {
|
|
44
44
|
type: PropType<FormConfigItem>;
|
|
45
45
|
required: true;
|
|
46
46
|
};
|
|
@@ -52,14 +52,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
52
|
NButton: any;
|
|
53
53
|
NIcon: any;
|
|
54
54
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
|
-
|
|
55
|
+
formConfigItem: {
|
|
56
56
|
type: PropType<FormConfigItem>;
|
|
57
57
|
required: true;
|
|
58
58
|
};
|
|
59
59
|
}>>, {}>;
|
|
60
60
|
bindHover: typeof bindHover;
|
|
61
61
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
-
|
|
62
|
+
formConfigItem: {
|
|
63
63
|
type: PropType<FormConfigItem>;
|
|
64
64
|
required: true;
|
|
65
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as
|
|
1
|
+
import{defineComponent as e,inject as o,computed as t,openBlock as r,createBlock as f,unref as i,mergeProps as m,withModifiers as n,withCtx as a,createVNode as s,normalizeClass as u,createTextVNode as d,toDisplayString as l,createCommentVNode as c}from"vue";import{NButton as p,NEllipsis as g}from"naive-ui";import C from"./CloseButton.vue.js";import{InjectionActiveFieldItem as I,WidgetTextMap as _}from"../../constants/index.js";import{bindHover as v}from"../../utils/index.js";import y from"../../../../../_virtual/plugin-vue_export-helper.js";var x=y(e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const y=e,x=o(I);function j(){x.value=y.formConfigItem}const q=t((()=>[{"is-active":x.value===y.formConfigItem},"form-config__renderer"])),h=t((()=>["form-config__renderer--default",{"is-required":y.formConfigItem.required}])),k=t((()=>!1===y.formConfigItem.editable));function F(){const e=_.get(y.formConfigItem.type);return y.textFormatter(y.formConfigItem,`${y.formConfigItem.name}${e?`(${e})`:""}`)}return(o,t)=>(r(),f(i(p),m({secondary:!i(k),dashed:i(k)},i(v)(e.formConfigItem),{onClick:n(j,["stop"]),class:i(q),"data-type":e.formConfigItem.type}),{default:a((()=>[s(i(g),{class:u(i(h))},{default:a((()=>[d(l(F()),1)])),_:1},8,["class"]),e.formConfigItem.required?c("v-if",!0):(r(),f(C,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"]))])),_:1},16,["secondary","dashed","onClick","class","data-type"]))}}),[["__file","DefaultNode.vue"]]);export{x as default};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Nullable } from '../../../../../es/shared/types';
|
|
2
1
|
import { FormConfigItem } from '../../../../../es/components/form-config';
|
|
3
2
|
import { EditAbleField } from '../../../../../es/components/form-config/src/constants';
|
|
4
3
|
import { FieldItem } from '../../../../../es/components/form-render';
|
|
5
4
|
export declare function useConfigurationField(): {
|
|
6
|
-
generateFieldListByKeys: (
|
|
7
|
-
|
|
5
|
+
generateFieldListByKeys: (keyList: EditAbleField[], formConfigItem?: FormConfigItem, fieldItem?: FieldItem) => FieldItem[];
|
|
6
|
+
generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: FieldItem) => FieldItem[];
|
|
8
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as o,isEditOptionConfig as r,isNullOptionConfig as _}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as n}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:s}=n();function m(){const n=new Map([[l.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=s.call(Object.assign({},null==l?void 0:l.originalSetting,i));return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,...o()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...r()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",..._()})]]);function m(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=n.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}return{generateFieldListByKeys:m,generateFieldListByFormConfigItem:function(e,t){const i=new Map([["LINE_BAR",[l.NAME,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],...["NEWLINE","COMPLEX","COMBINATION"].map((e=>[e,[l.NAME,l.LAYOUT_WIDTH_ENUM]]))]),a=[l.NAME,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED];return m(i.get(e.type)||a,e,t)}}}export{m as useConfigurationField};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { FormConfigItem } from '../../../../../es/components/form-config';
|
|
2
|
-
export declare function useDataNormalize(
|
|
1
|
+
import { FormConfigItem, FormConfigVisitor } from '../../../../../es/components/form-config';
|
|
2
|
+
export declare function useDataNormalize(props: {
|
|
3
|
+
fieldVisitor?: FormConfigVisitor;
|
|
4
|
+
}): {
|
|
3
5
|
transform: (fieldList: FormConfigItem[]) => FormConfigItem[];
|
|
4
6
|
inverseTransform: (fieldList: FormConfigItem[]) => FormConfigItem[];
|
|
5
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{omit as
|
|
1
|
+
import{isObject as e,omit as n}from"lodash-es";function r(r){return{transform:function(n){let i=null;const t=r.fieldVisitor;return n.reduce(((n,r)=>(r.originalSetting&&e(t)&&t[r.key]&&t[r.key]({field:r.originalSetting,replace(e){r.originalSetting=e}}),"LINE_BAR"===r.type?(r.children=[],i=r.children,n.push(r),n):i?(i.push(r),n):(n.push(r),n))),[])},inverseTransform:function(e){return e.reduce(((e,r)=>("LINE_BAR"===r.type?(e.push(n(r,["children"])),e.push(...r.children||[])):e.push(r),e)),[]).map((e=>n(e,["originalSetting"])))}}}export{r as useDataNormalize};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FormConfigItem } from '../types';
|
|
2
2
|
export declare function usePresetRenderer(): {
|
|
3
|
-
getRenderer: (
|
|
3
|
+
getRenderer: (formConfigItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
4
4
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, FunctionalComponent } from 'vue';
|
|
2
2
|
import { ArrayAble } from '../../../../../es/shared/types';
|
|
3
|
+
import { FieldItem } from '../../../../../es/components/form-render';
|
|
3
4
|
interface Matcher {
|
|
4
5
|
(type: string): boolean;
|
|
5
6
|
}
|
|
@@ -16,7 +17,6 @@ export declare type FormConfigItem = {
|
|
|
16
17
|
name: string;
|
|
17
18
|
} & Partial<{
|
|
18
19
|
show: boolean;
|
|
19
|
-
options: Record<'text' | 'value', string>[];
|
|
20
20
|
defaultValue: any;
|
|
21
21
|
defaultExpand: boolean;
|
|
22
22
|
fold: boolean;
|
|
@@ -27,14 +27,20 @@ export declare type FormConfigItem = {
|
|
|
27
27
|
notes: string;
|
|
28
28
|
desc: string;
|
|
29
29
|
children: FormConfigItem[];
|
|
30
|
+
originalSetting: FieldItem;
|
|
30
31
|
__new: boolean;
|
|
31
32
|
}>;
|
|
32
33
|
export interface FormConfigTextFormatter {
|
|
33
|
-
(
|
|
34
|
+
(formConfigItem: FormConfigItem, parsedText: string): string;
|
|
34
35
|
}
|
|
35
36
|
export interface FormConfigExpose {
|
|
36
37
|
loadData(payload: Record<'fieldList', FormConfigItem[]>): void;
|
|
37
38
|
validate(): Promise<unknown>;
|
|
38
39
|
getData(): Record<'fieldList' | 'materialList', FormConfigItem[]>;
|
|
39
40
|
}
|
|
41
|
+
interface FieldVisitorContext {
|
|
42
|
+
field: FieldItem;
|
|
43
|
+
replace(f: FieldItem): void;
|
|
44
|
+
}
|
|
45
|
+
export declare type FormConfigVisitor = Record<string, (context: FieldVisitorContext) => void>;
|
|
40
46
|
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { Nullable } from '../../../../../es/shared/types';
|
|
1
2
|
import { FormConfigItem, FormConfigWidth } from '../../../../../es/components/form-config';
|
|
3
|
+
import { FieldItem } from '../../../../../es/components/form-render';
|
|
2
4
|
export declare function layoutWidthEnum2Column(layoutWidthEnum: FormConfigWidth): number;
|
|
3
|
-
export declare function bindHover(
|
|
5
|
+
export declare function bindHover(formConfigItem: FormConfigItem): {
|
|
4
6
|
onMouseenter: () => FormConfigItem;
|
|
5
7
|
onMouseleave: () => undefined;
|
|
6
8
|
'is-hovering': boolean;
|
|
7
9
|
};
|
|
10
|
+
export declare function findFieldItemByKey(fieldList: Nullable<FieldItem[]>, key: string): FieldItem | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{traverse as e}from"../../../../shared/utils/index.js";import{isArray as r}from"lodash-es";import{ref as o}from"vue";function n(e){return{ALL_LINE:24,HALF_LINE:12,FIVE_SIX:20,TWO_THREE:16,ONE_THREE:8,THREE_FOUR:18,ONE_FOUR:6,ONE_SIX:4,ONE_EIGHT:3}[e]||24}const t=o();function i(e){return{onMouseenter:()=>t.value=e,onMouseleave:()=>t.value=void 0,"is-hovering":t.value===e}}function u(o,n){if(!r(o)||!o.length)return;let t;return e(o,((e,r)=>{(null==e?void 0:e.val_key)===n&&(t=e,r())}),["children","properties"]),t}export{i as bindHover,u as findFieldItemByKey,n as layoutWidthEnum2Column};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-config{display:flex;justify-content:space-between}.form-config__material{border-radius:8px;box-sizing:border-box;flex-shrink:0;padding:16px;width:200px}.form-config__materialHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__materialContent{border:1px dashed hsla(0,0%,50%,.35);border-radius:8px;box-sizing:border-box;display:flex;flex-direction:column;flex-shrink:0;gap:8px;max-height:var(--max-height);min-height:200px;overflow-y:auto;padding:16px}.form-config__materialContentItem{cursor:move;grid-column:span var(--item-column) /span var(--item-column);justify-content:flex-start}.form-config__displayWrapper{border-radius:8px;box-sizing:border-box;flex-shrink:0;flex:1;min-width:400px;padding:16px 0}.form-config__displayHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__displayContent{border:1px dashed hsla(0,0%,50%,.35);border-radius:8px;box-sizing:border-box;display:grid!important;flex-shrink:0;gap:8px;grid-template-columns:repeat(24,minmax(0,1fr));height:fit-content;max-height:var(--max-height);overflow-y:auto;padding:16px}.form-config__displayContentItem{grid-column:span var(--item-column) /span var(--item-column);position:relative}.form-config__config{border-radius:8px;box-sizing:border-box;flex-shrink:0;padding:16px;width:240px}.form-config__configHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__configContent{border:none;border-radius:8px;box-sizing:border-box;flex-shrink:0;max-height:var(--max-height);overflow-y:auto;padding:16px}.form-config__renderer{cursor:move;justify-content:flex-start;width:100%}.form-config__renderer--default{align-items:center;box-sizing:border-box;display:flex;padding:8px 0;position:relative;user-select:none;width:100%}.form-config__renderer--complex{border:1px dashed skyblue;border-radius:8px;padding:8px}.form-config__renderer--complexHeader{display:flex;justify-content:center;margin-top:-8px;padding:8px;position:relative}.form-config__renderer--complex--grid{display:grid!important;gap:8px;grid-column:span var(--item-column) /span var(--item-column);grid-template-columns:repeat(24,minmax(0,1fr))}.form-config__renderer--complex--flex{display:flex}.form-config .is-disabled{background:#e5e5e5!important}.form-config .is-required{padding-left:16px!important}.form-config .is-required:before{color:red;content:"*";left:8px;position:absolute}.form-config .is-active{color:#5585f5!important}.form-config .is-choosing{box-shadow:0 0 0 2px #5585f5!important;opacity:.7}.form-config .is-choosing-area{background:hsla(0,0%,50%,.1)}.form-config [is-hovering=true] .form-config__renderer--closeButton{visibility:visible}.form-config .form-config__renderer--closeButton{position:absolute;right:4px;top:50%;transform:translateY(-50%);visibility:hidden}
|
|
1
|
+
.form-config{display:flex;justify-content:space-between}.form-config__material{border-radius:8px;box-sizing:border-box;flex-shrink:0;padding:16px;width:200px}.form-config__materialHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__materialContent{border:1px dashed hsla(0,0%,50%,.35);border-radius:8px;box-sizing:border-box;display:flex;flex-direction:column;flex-shrink:0;gap:8px;max-height:var(--max-height);min-height:200px;overflow-y:auto;padding:16px}.form-config__materialContentItem{cursor:move;grid-column:span var(--item-column) /span var(--item-column);justify-content:flex-start}.form-config__displayWrapper{border-radius:8px;box-sizing:border-box;flex-shrink:0;flex:1;min-width:400px;padding:16px 0}.form-config__displayHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__displayContent{border:1px dashed hsla(0,0%,50%,.35);border-radius:8px;box-sizing:border-box;display:grid!important;flex-shrink:0;gap:8px;grid-template-columns:repeat(24,minmax(0,1fr));height:fit-content;max-height:var(--max-height);overflow-y:auto;padding:16px}.form-config__displayContentItem{grid-column:span var(--item-column) /span var(--item-column);position:relative}.form-config__config{border-radius:8px;box-sizing:border-box;flex-shrink:0;padding:16px;width:240px}.form-config__configHeader{align-items:center;display:flex;height:40px;justify-content:space-between}.form-config__configContent{border:none;border-radius:8px;box-sizing:border-box;flex-shrink:0;max-height:var(--max-height);overflow-y:auto;padding:16px}.form-config__renderer{box-sizing:border-box;cursor:move;justify-content:flex-start;width:100%}.form-config__renderer--default{align-items:center;box-sizing:border-box;display:flex;padding:8px 0;position:relative;user-select:none;width:100%}.form-config__renderer--complex{border:1px dashed skyblue;border-radius:8px;padding:8px}.form-config__renderer--complexHeader{display:flex;justify-content:center;margin-top:-8px;padding:8px;position:relative}.form-config__renderer--complex--grid{display:grid!important;gap:8px;grid-column:span var(--item-column) /span var(--item-column);grid-template-columns:repeat(24,minmax(0,1fr))}.form-config__renderer--complex--flex{display:flex}.form-config .is-disabled{background:#e5e5e5!important}.form-config .is-required{padding-left:16px!important}.form-config .is-required:before{color:red;content:"*";left:8px;position:absolute}.form-config .is-active{color:#5585f5!important}.form-config .is-choosing{box-shadow:0 0 0 2px #5585f5!important;opacity:.7}.form-config .is-choosing-area{background:hsla(0,0%,50%,.1)}.form-config [is-hovering=true] .form-config__renderer--closeButton{visibility:visible}.form-config .form-config__renderer--closeButton{position:absolute;right:4px;top:50%;transform:translateY(-50%);visibility:hidden}
|
|
@@ -6,7 +6,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
6
6
|
formRenderRef: import("vue").Ref<import("./src/types").FormRenderExpose | undefined>;
|
|
7
7
|
key: import("vue").Ref<number>;
|
|
8
8
|
reload: () => Promise<void>;
|
|
9
|
-
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "
|
|
9
|
+
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList"];
|
|
10
10
|
exposed: Partial<import("./src/types").FormRenderExpose>;
|
|
11
11
|
FormRender: import("vue").DefineComponent<{
|
|
12
12
|
fieldList: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,openBlock as i,createBlock as l,unref as n,withCtx as m,createElementBlock as p,createVNode as u,isRef as d,Fragment as c,renderList as f,createCommentVNode as h,createElementVNode as y,normalizeStyle as j,withKeys as
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,openBlock as i,createBlock as l,unref as n,withCtx as m,createElementBlock as p,createVNode as u,isRef as d,Fragment as c,renderList as f,createCommentVNode as h,createElementVNode as y,normalizeStyle as j,withKeys as g,withModifiers as v,toDisplayString as b,renderSlot as k}from"vue";import{createForm as F,onFieldValueChange as x,onFieldMount as C,onFieldUnmount as H,onFieldReact as S,onFormMount as A}from"@formily/core";import{FormProvider as R,FormConsumer as L}from"@formily/vue";import{isNumber as _,cloneDeep as O}from"lodash-es";import{NForm as w,NTabs as B,NTabPane as V,NConfigProvider as I}from"naive-ui";import{InjectionFormGraph as N}from"./constants/index.js";import{useAutoHidden as D}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as q}from"./hooks/useComplexOptions.js";import{useFormDomEvent as U,useFormExposeEvent as W}from"./hooks/useFormEvent.js";import{useFormGraph as G}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as K}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeReactions as M}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as T}from"./hooks/useNuiThemeOverrides.js";import"./utils/index.js";import{useFieldListAdaptor as E}from"./hooks/useFieldListAdaptor.js";import"../../../shared/utils/index.js";import"../index.js";import{useFieldVisitor as P}from"./hooks/useFieldVisitor.js";import"../../../shared/utils/tapable/SyncHook.js";import"../../../shared/utils/tapable/SyncBailHook.js";import"../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../shared/utils/tapable/SyncLoopHook.js";import"../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{validateMessageLocale as J}from"./hooks/useFormValidator.js";import"@vueuse/core";import"date-fns";import{useAnchor as $}from"./hooks/useAnchor.js";import{useFormContext as z}from"./hooks/useFormContext.js";import"./hooks/useFormRenderOptions.js";import Q from"../../../_virtual/plugin-vue_export-helper.js";import{createObjSchema as X}from"./utils/schema.js";const Y={key:0,style:{height:"54px"}},Z={style:{"white-space":"pre"}};var ee=Q(e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},linebarAutoHidden:{type:Boolean}},emits:["formChange","annotationChange","scroll"],setup(e,{expose:Q,emit:ee}){const oe=e,{nuiThemeOverrides:te}=T();J();const re=o(),se=t((()=>_(oe.maxHeight)?oe.maxHeight+"px":oe.maxHeight)),{SchemaField:ae,businessCollector:ie,formItemDepsCollector:le,changeContextCollector:ne,formUUID:me}=z(oe,ee),{anchorBarRef:pe,currentAnchor:ue,generateAnchorList:de,updateAnchorList:ce,anchorIdList:fe,onScroll:he}=$(oe,ee,re,le);K(oe).callLifeCycle("onSetup");const{trigger:ye}=D(),{observeFormGraph:je,setGraph:ge,removeGraph:ve}=G();r(N,je);const be=F({initialValues:oe.initialData,effects(e){x("*",(o=>{const t=o.props.name.toString();ie.trigger(e,t),le.trigger(t),ee("formChange",{fieldInstance:o,fieldKey:t,fieldName:o.title,value:o.value,context:ne.getContext(t,o.value)}),ke(t,o.value)})),C("*",ge),H("*",ve),oe.linebarAutoHidden&&(S("*",ye),A((e=>e.query("*").forEach(ye)))),oe.anchor&&(S("*",ce),A(de))}}),{lowCodeReactionsHandler:ke,triggerAllReactionsHandler:Fe}=M(t((()=>oe.lowCodeReactions)),be);s(Fe);const{schemaAdaptor:xe}=E(ie);let Ce=oe.fieldList||[];const He=t((()=>oe.schema?oe.schema:oe.fieldList?(Ce=P().traverse(O(oe.fieldList),oe.fieldVisitor),X(xe(Ce))):X({}))),{onKeydown:Se}=U({formModel:be,formRenderRef:re,props:oe}),{clearSpan:Ae}=q();a((()=>Ae(me)));const Re=W({formModel:be,formRenderRef:re,formItemDepsCollector:le,getFieldList:()=>Ce,formUUID:me});return Q({formModel:be,validate:(e="*")=>Re.validate(e),getFormValues:(e=!0)=>Re.getFormValues(e),setFormValues:(e,o=!0)=>Re.setFormValues(e,o),setFieldState(e,o){Re.setFieldState(e,o)},resetFields(e="*"){Re.resetFields(e)},queryWidget:async e=>Re.queryWidget(e),getFieldList:()=>Ce,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(i(),l(n(w),{class:"form-render","require-mark-placement":"left"},{default:m((()=>[e.anchor?(i(),p("section",Y,[u(n(B),{value:n(ue),"onUpdate:value":t[0]||(t[0]=e=>d(ue)?ue.value=e:null),type:"line",ref_key:"anchorBarRef",ref:pe},{default:m((()=>[(i(!0),p(c,null,f(n(fe),(e=>(i(),l(n(V),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):h("v-if",!0),u(n(I),{"theme-overrides":n(te)},{default:m((()=>[y("section",{class:"form-render__wrapper",style:j({"--column":e.column,"--form-height":n(se)}),ref_key:"formRenderRef",ref:re,onScroll:t[1]||(t[1]=(...e)=>n(he)&&n(he)(...e)),onKeydownCapture:t[2]||(t[2]=g(v(((...e)=>n(Se)&&n(Se)(...e)),["prevent"]),["enter"]))},[u(n(R),{form:n(be)},{default:m((()=>[u(n(ae),{schema:n(He)},null,8,["schema"]),e.consumer?(i(),l(n(L),{key:0},{default:m((({form:e})=>[y("div",Z,b(JSON.stringify(e.values,null,2)),1)])),_:1})):h("v-if",!0),k(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3}))}}),[["__file","FormRender.vue"]]);export{ee as default};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { Func } from '../../../../es/shared/types';
|
|
1
2
|
import { FormRenderExpose } from '../../../../es/components/form-render';
|
|
2
3
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
3
4
|
formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
|
|
4
5
|
key: import("vue").Ref<number>;
|
|
5
6
|
reload: () => Promise<void>;
|
|
6
|
-
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "
|
|
7
|
+
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList"];
|
|
7
8
|
exposed: Partial<FormRenderExpose>;
|
|
8
9
|
FormRender: import("vue").DefineComponent<{
|
|
9
10
|
fieldList: {
|
|
10
11
|
type: import("vue").PropType<import("../../../../es/components/form-render").FieldItem[]>;
|
|
11
12
|
};
|
|
12
13
|
initialData: {
|
|
13
|
-
type: import("vue").PropType<import("
|
|
14
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
14
15
|
default: () => {};
|
|
15
16
|
};
|
|
16
17
|
fieldVisitor: {
|
|
@@ -99,11 +100,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
99
100
|
default: () => {};
|
|
100
101
|
};
|
|
101
102
|
scope: {
|
|
102
|
-
type: import("vue").PropType<import("
|
|
103
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
103
104
|
default: () => {};
|
|
104
105
|
};
|
|
105
106
|
annotation: {
|
|
106
|
-
type: import("vue").PropType<import("
|
|
107
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
107
108
|
};
|
|
108
109
|
consumer: {
|
|
109
110
|
type: BooleanConstructor;
|
|
@@ -115,8 +116,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
115
116
|
lifeCycle: {
|
|
116
117
|
type: import("vue").PropType<Partial<{
|
|
117
118
|
onSetup(): void;
|
|
118
|
-
beforeRequest(fieldKey: string, params?: import("
|
|
119
|
-
afterRequest(fieldKey: string, payload?: any): import("
|
|
119
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
120
|
+
afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
|
|
120
121
|
}>>;
|
|
121
122
|
};
|
|
122
123
|
requestInstance: {
|
|
@@ -138,7 +139,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
138
139
|
type: import("vue").PropType<import("../../../../es/components/form-render").FieldItem[]>;
|
|
139
140
|
};
|
|
140
141
|
initialData: {
|
|
141
|
-
type: import("vue").PropType<import("
|
|
142
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
142
143
|
default: () => {};
|
|
143
144
|
};
|
|
144
145
|
fieldVisitor: {
|
|
@@ -227,11 +228,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
227
228
|
default: () => {};
|
|
228
229
|
};
|
|
229
230
|
scope: {
|
|
230
|
-
type: import("vue").PropType<import("
|
|
231
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
231
232
|
default: () => {};
|
|
232
233
|
};
|
|
233
234
|
annotation: {
|
|
234
|
-
type: import("vue").PropType<import("
|
|
235
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
235
236
|
};
|
|
236
237
|
consumer: {
|
|
237
238
|
type: BooleanConstructor;
|
|
@@ -243,8 +244,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
243
244
|
lifeCycle: {
|
|
244
245
|
type: import("vue").PropType<Partial<{
|
|
245
246
|
onSetup(): void;
|
|
246
|
-
beforeRequest(fieldKey: string, params?: import("
|
|
247
|
-
afterRequest(fieldKey: string, payload?: any): import("
|
|
247
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
248
|
+
afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
|
|
248
249
|
}>>;
|
|
249
250
|
};
|
|
250
251
|
requestInstance: {
|
|
@@ -275,7 +276,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
275
276
|
changeContextCollector: import("../../../../es/components/form-render").ContextCollector;
|
|
276
277
|
formUUID: string;
|
|
277
278
|
anchorBarRef: import("vue").Ref<{
|
|
278
|
-
syncBarPosition:
|
|
279
|
+
syncBarPosition: Func<any[], any>;
|
|
279
280
|
} | undefined>;
|
|
280
281
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
281
282
|
generateAnchorList: (formModel: import("../../../../es/components/form-render").Form<any>) => Promise<void>;
|
|
@@ -414,7 +415,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
414
415
|
exposeEvent: {
|
|
415
416
|
validate(path?: string): Promise<void>;
|
|
416
417
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
417
|
-
setFormValues(values: import("
|
|
418
|
+
setFormValues(values: import("../../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean): void;
|
|
418
419
|
setFieldState(path: string, handler: (field: Partial<Pick<import("../../../../es/components/form-render").Field<any, any, any, any>, import("../../../../es/components/form-render").NonFunctionPropertyNames<{
|
|
419
420
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
420
421
|
validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
|
|
@@ -580,7 +581,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
580
581
|
type: import("vue").PropType<import("../../../../es/components/form-render").FieldItem[]>;
|
|
581
582
|
};
|
|
582
583
|
initialData: {
|
|
583
|
-
type: import("vue").PropType<import("
|
|
584
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
584
585
|
default: () => {};
|
|
585
586
|
};
|
|
586
587
|
fieldVisitor: {
|
|
@@ -669,11 +670,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
669
670
|
default: () => {};
|
|
670
671
|
};
|
|
671
672
|
scope: {
|
|
672
|
-
type: import("vue").PropType<import("
|
|
673
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
673
674
|
default: () => {};
|
|
674
675
|
};
|
|
675
676
|
annotation: {
|
|
676
|
-
type: import("vue").PropType<import("
|
|
677
|
+
type: import("vue").PropType<import("../../../../es/shared/types").AnyObject>;
|
|
677
678
|
};
|
|
678
679
|
consumer: {
|
|
679
680
|
type: BooleanConstructor;
|
|
@@ -685,8 +686,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
685
686
|
lifeCycle: {
|
|
686
687
|
type: import("vue").PropType<Partial<{
|
|
687
688
|
onSetup(): void;
|
|
688
|
-
beforeRequest(fieldKey: string, params?: import("
|
|
689
|
-
afterRequest(fieldKey: string, payload?: any): import("
|
|
689
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
690
|
+
afterRequest(fieldKey: string, payload?: any): import("../../../../es/shared/types").AnyObject[];
|
|
690
691
|
}>>;
|
|
691
692
|
};
|
|
692
693
|
requestInstance: {
|
|
@@ -711,9 +712,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
711
712
|
maxHeight: string | number;
|
|
712
713
|
column: number;
|
|
713
714
|
components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
|
|
714
|
-
initialData: import("
|
|
715
|
+
initialData: import("../../../../es/shared/types").AnyObject;
|
|
715
716
|
parallelism: number;
|
|
716
|
-
scope: import("
|
|
717
|
+
scope: import("../../../../es/shared/types").AnyObject;
|
|
717
718
|
consumer: boolean;
|
|
718
719
|
enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
|
|
719
720
|
linebarAutoHidden: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as r,computed as
|
|
1
|
+
import{defineComponent as e,ref as r,computed as l,openBlock as o,createBlock as t,nextTick as a}from"vue";import u from"./FormRender.vue.js";import d from"../../../_virtual/plugin-vue_export-helper.js";var i=d(e({__name:"FormRenderWrapper",setup(e,{expose:d}){const i=r(),m=r(0);return d({...["validate","getFormValues","setFormValues","setFieldState","resetFields","queryWidget","getFieldList"].reduce(((e,r)=>(e[r]=(...e)=>{var l;return(null==(l=i.value)?void 0:l[r]).call(l,...e)},e)),{}),formModel:l((()=>{var e;return null==(e=i.value)?void 0:e.formModel})),reload:async function(){m.value++,await a()}}),(e,r)=>(o(),t(u,{key:m.value,ref_key:"formRenderRef",ref:i}))}}),[["__file","FormRenderWrapper.vue"]]);export{i as default};
|
|
@@ -42,16 +42,4 @@ export declare enum FIELD_AGE_UNIT {
|
|
|
42
42
|
WEEK = "W",
|
|
43
43
|
MINUTE = "N"
|
|
44
44
|
}
|
|
45
|
-
export declare enum LOW_CODE_VALUE_RELATION {
|
|
46
|
-
EQ = "EQ",
|
|
47
|
-
NEQ = "NEQ",
|
|
48
|
-
CL = "CL",
|
|
49
|
-
NC = "NC",
|
|
50
|
-
NULL = "NULL",
|
|
51
|
-
NOT_NULL = "NOT_NULL",
|
|
52
|
-
BIG = "BIG",
|
|
53
|
-
BIGEQ = "BIGEQ",
|
|
54
|
-
LESS = "LESS",
|
|
55
|
-
LESSEQ = "LESSEQ"
|
|
56
|
-
}
|
|
57
45
|
export declare const NESTED_FORM_ITEM_TYPE: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=Symbol("InjectionAsyncQueue"),
|
|
1
|
+
const e=Symbol("InjectionAsyncQueue"),o=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),E=Symbol("InjectionFormItemDepsCollector"),A=Symbol("InjectionFormUUID"),I=Symbol("InjectionFormGraph"),l=Symbol("InjectionAnnotation"),a="__dep_LINEBAR_";var i=(e=>(e.PASSWORD="password",e.ID_CARD="id_card",e.AGE="age",e.AGE_UNIT="age_unit",e.MOBILE="mobile",e.TELEPHONE="telephone",e.EMAIL="email",e.SEX="sex",e.BIRTHDAY="birthday",e.BANK_CARD="bank_card",e.WEBSITE="website",e.GESTATIONAL_WEEKS="gestational_weeks",e.GESTATIONAL_STAGE="gestational_stage",e.CUSTOMER_NAME="customer_name",e))(i||{}),c=(e=>(e.MALE="1",e.FEMALE="2",e))(c||{}),S=(e=>(e.DAY="D",e.MONTH="M",e.YEAR="Y",e.HOUR="H",e.WEEK="W",e.MINUTE="N",e))(S||{});const m=["COMPLEX","COMBINATION"];export{S as FIELD_AGE_UNIT,i as FIELD_BUSINESS_TYPE,c as FIELD_SEX_VALUE,a as FormItemLineBarDepKeyPrepend,l as InjectionAnnotation,e as InjectionAsyncQueue,n as InjectionBusinessCollector,t as InjectionChangeContextCollector,I as InjectionFormGraph,E as InjectionFormItemDepsCollector,A as InjectionFormUUID,o as InjectionSchemaField,m as NESTED_FORM_ITEM_TYPE};
|