cnhis-design-vue 3.1.51-beta.0 → 3.1.51-release.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/base-search/index.d.ts +8 -14
- package/es/components/base-search/src/index.vue.d.ts +8 -14
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +0 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
- package/es/components/form-config/index.d.ts +25 -174
- package/es/components/form-config/src/FormConfig.vue.d.ts +26 -175
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -4
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +10 -13
- package/es/components/form-config/src/constants/index.d.ts +1 -19
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +3 -7
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/index.d.ts +4 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -4
- 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/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -2
- package/es/components/form-render/src/types/index.d.ts +19 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -2
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +13 -13
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -13
- 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 +5 -5
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -4
- package/es/components/quick-search/index.d.ts +8 -13
- package/es/components/quick-search/src/index.vue.d.ts +8 -13
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/shortcut-setter/index.d.ts +5 -6
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +5 -6
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +1 -56
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +1 -4
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -55
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +0 -2
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +7 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +0 -6
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +1 -19
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +0 -20
- package/es/shared/utils/business.d.ts +2 -1
- package/es/shared/utils/index.d.ts +3 -3
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +0 -121
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +0 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +0 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +0 -58
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.js +0 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{range as e}from"lodash-es";const
|
|
1
|
+
import{range as e}from"lodash-es";const t=new Map([["LINE_BAR","分线栏"],["NEWLINE","分行符"]]);var n=(e=>(e.NAME="name",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e.SHOW="show",e.ROWS="initialHigh",e))(n||{});function l(){return{option:[{text:"整行",value:"ALL_LINE"},{text:"半行",value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function o(){return{option:e(1,11).map((e=>({text:`${e}行`,value:e})))}}function i(){return{open:{describe:"默认展开",value:!0},close:{describe:"默认收起",value:!1}}}function u(){return{open:{describe:"可折叠",value:!0},close:{describe:"不可折叠",value:!1}}}function a(){return{open:{describe:"可编辑",value:!0},close:{describe:"不可编辑",value:!1}}}function r(){return{open:{describe:"必填",value:!0},close:{describe:"不必填",value:!1}}}function E(){return{open:{describe:"显示",value:!0},close:{describe:"隐藏",value:!1}}}const c="__display",s=Symbol("InjectionFieldList"),d=Symbol("InjectionMaterialList"),v=Symbol("InjectionActiveFieldItem"),I=Symbol("InjectionFormConfigEmit");export{n as EditAbleField,c as FORM_CONFIG_GROUP,v as InjectionActiveFieldItem,s as InjectionFieldList,I as InjectionFormConfigEmit,d as InjectionMaterialList,t as WidgetTextMap,a as isEditOptionConfig,u as isNotFoldOptionConfig,r as isNullOptionConfig,i as isShowOptionConfig,E as isVisibleOptionConfig,o as rowsOptionConfig,l as widgetWidthOptionConfig};
|
|
@@ -3,5 +3,5 @@ export declare function useDataNormalize(props: {
|
|
|
3
3
|
fieldVisitor?: FormConfigVisitor;
|
|
4
4
|
}): {
|
|
5
5
|
transform: (fieldList: FormConfigItem[]) => FormConfigItem[];
|
|
6
|
-
inverseTransform: (fieldList: FormConfigItem[], withOriginalSetting: boolean
|
|
6
|
+
inverseTransform: (fieldList: FormConfigItem[], withOriginalSetting: boolean) => FormConfigItem[];
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
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,r
|
|
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,r){return e.reduce(((e,r)=>("LINE_BAR"===r.type?(e.push(n(r,["children"])),e.push(...r.children||[])):e.push(r),e)),[]).map((e=>r?e:n(e,["originalSetting"])))}}}export{r as useDataNormalize};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, FunctionalComponent } from 'vue';
|
|
2
|
-
import { ArrayAble
|
|
2
|
+
import { ArrayAble } from '../../../../../es/shared/types';
|
|
3
3
|
import { FieldItem } from '../../../../../es/components/form-render';
|
|
4
4
|
interface Matcher {
|
|
5
5
|
(type: string): boolean;
|
|
@@ -36,13 +36,9 @@ export interface FormConfigTextFormatter {
|
|
|
36
36
|
(formConfigItem: FormConfigItem, parsedText: string): string;
|
|
37
37
|
}
|
|
38
38
|
export interface FormConfigExpose {
|
|
39
|
-
loadData(payload: Record<'fieldList', FormConfigItem[]>
|
|
40
|
-
lowCodeReactions?: FormLowCodeReactions.Config[];
|
|
41
|
-
}): void;
|
|
39
|
+
loadData(payload: Record<'fieldList', FormConfigItem[]>): void;
|
|
42
40
|
validate(): Promise<unknown>;
|
|
43
|
-
getData(withOriginalSetting?: boolean): Record<'fieldList' | 'materialList', FormConfigItem[]
|
|
44
|
-
lowCodeReactions: FormLowCodeReactions.Config[];
|
|
45
|
-
};
|
|
41
|
+
getData(withOriginalSetting?: boolean): Record<'fieldList' | 'materialList', FormConfigItem[]>;
|
|
46
42
|
clearExtraList(): void;
|
|
47
43
|
}
|
|
48
44
|
interface FieldVisitorContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-config,.form-config__material{display:flex;justify-content:space-between}.form-config__material{border-radius:8px;box-sizing:border-box;flex-direction:column;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;flex:1;gap:8px;max-height:var(--max-height);min-height:200px;overflow-y:auto;padding:16px}.form-config__materialExtraList{margin-top:12px}.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);min-height:38px;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--defaultWrapper{align-items:center;border-radius:2px;box-sizing:border-box;display:inline-flex;height:34px;padding:0 14px;transition:all .3s linear}.form-config__renderer--defaultWrapper.is-disabled{background-color:transparent;border:1px dashed var(--c-primary-color)}.form-config__renderer--defaultWrapper:not(.is-disabled){background-color:rgba(46,51,56,.05);border:1px dashed transparent}.form-config__renderer--defaultWrapper:not(.is-disabled):hover{background-color:rgba(46,51,56,.09)}.form-config__renderer--defaultWrapper:not(.is-disabled):active{background-color:rgba(46,51,56,.15)}.form-config__renderer--complex{border:1px dashed var(--c-primary-color);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));min-height:24px}.form-config__renderer--complex--flex{display:flex;min-height:24px}.form-config .is-required{padding-left:16px!important}.form-config .is-required:before{color:red;content:"*";left:8px;position:absolute}.form-config .is-extra:before{border-bottom:6px solid transparent;border-left:6px solid var(--c-primary-color);border-right:6px solid transparent;border-top:6px solid var(--c-primary-color);content:"";height:0;left:0;position:absolute;top:0;width:0}.form-config .is-active{color:var(--c-primary-color)!important}.form-config .is-choosing{box-shadow:inset var(--c-primary-color) 0 0 0 2px;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,.form-config__material{display:flex;justify-content:space-between}.form-config__material{border-radius:8px;box-sizing:border-box;flex-direction:column;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;flex:1;gap:8px;max-height:var(--max-height);min-height:200px;overflow-y:auto;padding:16px}.form-config__materialExtraList{margin-top:12px}.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);min-height:38px;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--defaultWrapper{align-items:center;border-radius:2px;box-sizing:border-box;display:inline-flex;height:34px;padding:0 14px;transition:all .3s linear}.form-config__renderer--defaultWrapper.is-disabled{background-color:transparent;border:1px dashed var(--c-primary-color)}.form-config__renderer--defaultWrapper:not(.is-disabled){background-color:rgba(46,51,56,.05);border:1px dashed transparent}.form-config__renderer--defaultWrapper:not(.is-disabled):hover{background-color:rgba(46,51,56,.09)}.form-config__renderer--defaultWrapper:not(.is-disabled):active{background-color:rgba(46,51,56,.15)}.form-config__renderer--complex{border:1px dashed var(--c-primary-color);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));min-height:24px}.form-config__renderer--complex--flex{display:flex;min-height:24px}.form-config .is-required{padding-left:16px!important}.form-config .is-required:before{color:red;content:"*";left:8px;position:absolute}.form-config .is-extra:before{border-bottom:6px solid transparent;border-left:6px solid var(--c-primary-color);border-right:6px solid transparent;border-top:6px solid var(--c-primary-color);content:"";height:0;left:0;position:absolute;top:0;width:0}.form-config .is-active{color:var(--c-primary-color)!important}.form-config .is-choosing{box-shadow:inset var(--c-primary-color) 0 0 0 2px;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}
|
|
@@ -131,7 +131,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
131
131
|
default: boolean;
|
|
132
132
|
};
|
|
133
133
|
lowCodeReactions: {
|
|
134
|
-
type: import("vue").PropType<import("
|
|
134
|
+
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
135
135
|
};
|
|
136
136
|
operationalForm: {
|
|
137
137
|
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
@@ -276,7 +276,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
276
276
|
default: boolean;
|
|
277
277
|
};
|
|
278
278
|
lowCodeReactions: {
|
|
279
|
-
type: import("vue").PropType<import("
|
|
279
|
+
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
280
280
|
};
|
|
281
281
|
operationalForm: {
|
|
282
282
|
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
@@ -435,7 +435,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
435
435
|
businessFormatter: import("./src/types").FormBusinessFormatter;
|
|
436
436
|
requestInstance: import("./src/hooks").RequestInstance;
|
|
437
437
|
enterToNextWidget: boolean | ((fieldItem: import("./src/types").FieldItem) => boolean | void);
|
|
438
|
-
lowCodeReactions: import("
|
|
438
|
+
lowCodeReactions: import("./src/types").FormLowCodeReactions.Config[];
|
|
439
439
|
linebarAutoHidden: boolean;
|
|
440
440
|
bordered: string | boolean;
|
|
441
441
|
uniqueCacheData: boolean;
|
|
@@ -846,7 +846,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
846
846
|
default: boolean;
|
|
847
847
|
};
|
|
848
848
|
lowCodeReactions: {
|
|
849
|
-
type: import("vue").PropType<import("
|
|
849
|
+
type: import("vue").PropType<import("./src/types").FormLowCodeReactions.Config[]>;
|
|
850
850
|
};
|
|
851
851
|
operationalForm: {
|
|
852
852
|
type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AnyObject,
|
|
1
|
+
import { AnyObject, FormOperationalConfig } from '../../../../es/shared/types';
|
|
2
2
|
import { Field } from '@formily/core';
|
|
3
3
|
import { Component, FunctionalComponent, PropType } from 'vue';
|
|
4
4
|
import { RequestInstance } from './hooks';
|
|
5
|
-
import { FieldItem, FieldVisitor, FormBusinessFormatter } from './types';
|
|
5
|
+
import { FieldItem, FieldVisitor, FormBusinessFormatter, FormLowCodeReactions } from './types';
|
|
6
6
|
declare const _default: import("vue").DefineComponent<{
|
|
7
7
|
fieldList: {
|
|
8
8
|
type: PropType<FieldItem[]>;
|
|
@@ -129,7 +129,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
129
129
|
default: boolean;
|
|
130
130
|
};
|
|
131
131
|
lowCodeReactions: {
|
|
132
|
-
type: import("vue").PropType<import("../../../../es/
|
|
132
|
+
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
133
133
|
};
|
|
134
134
|
operationalForm: {
|
|
135
135
|
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
@@ -274,7 +274,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
274
274
|
default: boolean;
|
|
275
275
|
};
|
|
276
276
|
lowCodeReactions: {
|
|
277
|
-
type: import("vue").PropType<import("../../../../es/
|
|
277
|
+
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
278
278
|
};
|
|
279
279
|
operationalForm: {
|
|
280
280
|
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
@@ -433,7 +433,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
433
433
|
businessFormatter: import("../../../../es/components/form-render").FormBusinessFormatter;
|
|
434
434
|
requestInstance: import("../../../../es/components/form-render").RequestInstance;
|
|
435
435
|
enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
|
|
436
|
-
lowCodeReactions: import("../../../../es/
|
|
436
|
+
lowCodeReactions: import("../../../../es/components/form-render").FormLowCodeReactions.Config[];
|
|
437
437
|
linebarAutoHidden: boolean;
|
|
438
438
|
bordered: string | boolean;
|
|
439
439
|
uniqueCacheData: boolean;
|
|
@@ -844,7 +844,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
844
844
|
default: boolean;
|
|
845
845
|
};
|
|
846
846
|
lowCodeReactions: {
|
|
847
|
-
type: import("vue").PropType<import("../../../../es/
|
|
847
|
+
type: import("vue").PropType<import("../../../../es/components/form-render").FormLowCodeReactions.Config[]>;
|
|
848
848
|
};
|
|
849
849
|
operationalForm: {
|
|
850
850
|
type: import("vue").PropType<import("../../../../es/shared/types").FormOperationalConfig[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as
|
|
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{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(u){const{createValidatorSchema:f}=l(),_=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,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=f(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},x=e=>{var o;const t=_(e);e.urlConfig?d(t,e):e.autograph&&m(t,e);const r=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:r,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowModify:"1"===e.allowModify,allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate||"1"===e.allowModify,shouldSave:"1"===e.save_free_entry,showField:e.show_key,maxTagCount:i(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),r&&(t.type="array"),t},h=e=>{const o=_(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),e.urlConfig?d(o,e):e.autograph&&m(o,e),o},g=e=>{const t=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},y=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}}),b=new Map([["LINEBAR",y],["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=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(e),{decimal_length:t,validate:n,allowSlash:i}=e;return i&&(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",x],["REMOTE_SEARCH",x],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(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=_(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=_(e);return o.type="array",!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,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",h],["CHECKBOX",h],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(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=_(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(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}]]),v=e=>{if(e.suffixConfig)return w(e);return(b.get(e.html_type)||g)(e)},w=o=>{if(!o.suffixConfig&&!o.prefixConfig)return v(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=_(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:j(n)}),i},{FieldNormalizeWaterfallHook:C,FieldListNormalizeWaterfallHook:O}=s();function j(o,n={column:9999}){let i=null;return O.call(t(o),n).reduce(((e,o,a)=>{var p;const l=null==(p=(o=C.call(o,n)).validate)?void 0:p.obj_type;return l&&u&&u.collect(l,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(y(o),a),i=e[s(o)].properties={}):i?i[s(o)]=r(v(o),a):(i=null,e[s(o)]=r(v(o),a)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{u as useFieldListAdaptor};
|
|
@@ -80,7 +80,7 @@ export declare function useFieldNormalize(): {
|
|
|
80
80
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
81
81
|
requestInstance: import("./useFormRequest").RequestInstance;
|
|
82
82
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
83
|
-
lowCodeReactions: import("
|
|
83
|
+
lowCodeReactions: import("../types").FormLowCodeReactions.Config[];
|
|
84
84
|
linebarAutoHidden: boolean;
|
|
85
85
|
bordered: string | boolean;
|
|
86
86
|
uniqueCacheData: boolean;
|
|
@@ -167,7 +167,7 @@ export declare function useFieldNormalize(): {
|
|
|
167
167
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
168
168
|
requestInstance: import("./useFormRequest").RequestInstance;
|
|
169
169
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
170
|
-
lowCodeReactions: import("
|
|
170
|
+
lowCodeReactions: import("../types").FormLowCodeReactions.Config[];
|
|
171
171
|
linebarAutoHidden: boolean;
|
|
172
172
|
bordered: string | boolean;
|
|
173
173
|
uniqueCacheData: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as
|
|
1
|
+
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as a,isNumber as i,isString as m}from"lodash-es";import"vue";import{registerValidateLocale as r,registerValidateRules as s}from"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import{isFunction as l}from"@vueuse/core";import"naive-ui";import"../../index.js";import{isIdCard as n}from"../utils/business.js";function o(){const a=new Map([["mobile",({validate:e})=>({format:"phone",message:null==e?void 0:e.message})],["integer",({validate:e})=>({format:"integer",message:null==e?void 0:e.message})],["number",({validate:e})=>({format:"number",message:null==e?void 0:e.message})],["id_card",({validate:e})=>({validator(a){var i;if(null!=a&&""!==a)return m(a)&&n(a)?void 0:null!=(i=null==e?void 0:e.message)?i:"该字段不是合法的身份证格式"}})],["regular",({validate:e,regular_expression:a,regular_error_tip:i})=>({pattern:a||(null==e?void 0:e.regular_expression)||"",message:i||(null==e?void 0:e.regular_error_tip)||(null==e?void 0:e.message)||"格式错误"})]]),i={triggerType:"onBlur"};return{createValidatorSchema:function(m){const r=[],{validate:{vali_obj:s,max_length:n,min_length:o,message:u,max_value:t,min_value:g,decimal_length:d}={},validator:v}=m;if(v&&e(v).forEach((e=>{l(e)&&r.push({validator:a=>e(a,m)})})),n&&r.push({max:n,message:u}),o&&r.push({min:o,message:u}),t&&r.push({maximum:t,message:u}),g&&r.push({minimum:g,message:u}),null!=d&&r.push(((e,a)=>{const i=null!=a?a:`小数位数最多${e}位`;return{validator(a){var m;return(null==(m=String(a).split(".")[1])?void 0:m.length)>e?i:""}}})(+d,u)),s){const e=a.get(s)||(({validate:e})=>({format:s,message:null==e?void 0:e.message}));r.push(Object.assign({},i,e(m)))}return r}}}const u=a((()=>{r({"zh-CN":{required:"${alias||name}为必填"}}),s({maximum:(e,a)=>i(Number(a.maximum))&&null!=e&&""!==e&&"/"!==e?(m(e)&&(e=+e),!i(e)||isNaN(e)?a.message||"":e>Number(a.maximum)&&a.message||""):"",minimum:(e,a)=>i(Number(a.minimum))&&null!=e&&""!==e&&"/"!==e?(m(e)&&(e=+e),!i(e)||isNaN(e)?a.message||"":e<Number(a.minimum)&&a.message||""):""})}));export{o as useFormValidator,u as validateMessageLocale};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FormLowCodeReactions } from '../../../../../es/shared/types';
|
|
2
1
|
import { Form } from '@formily/core';
|
|
3
2
|
import { MaybeRef } from '@vueuse/core';
|
|
3
|
+
import { FormLowCodeReactions } from '../../../../../es/components/form-render';
|
|
4
4
|
export declare function useLowCodeReactions(configListRef: MaybeRef<FormLowCodeReactions.Config[] | undefined>, formModel: Form): {
|
|
5
5
|
lowCodeReactionsHandler: (field: string) => void;
|
|
6
6
|
triggerAllReactionsHandler: () => void;
|
|
@@ -149,10 +149,9 @@ export declare type FieldItem = {
|
|
|
149
149
|
allow_check_mid_level: '1' | '2' | '3' | '4';
|
|
150
150
|
prefix: string | AnyObject | (() => any);
|
|
151
151
|
suffix: string | AnyObject | (() => any);
|
|
152
|
-
allowSlash: boolean
|
|
152
|
+
allowSlash: boolean;
|
|
153
153
|
allowModify: '0' | '1';
|
|
154
154
|
show_key: string;
|
|
155
|
-
whiteList: string[];
|
|
156
155
|
bordered: boolean | string;
|
|
157
156
|
fieldType: SchemaTypes;
|
|
158
157
|
content: string | FormRenderer | Record<string, FormRenderer>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncQueue } from '../../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject,
|
|
2
|
+
import { AnyObject, FormOperationalConfig, LOW_CODE_VALUE_RELATION, UndefinedAble } from '../../../../../es/shared/types';
|
|
3
3
|
import { DataField, Field, Form } from '@formily/core';
|
|
4
4
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
5
5
|
import { Component, FunctionalComponent } from 'vue';
|
|
@@ -152,3 +152,21 @@ export declare type FormBusinessFormatter = (payload: {
|
|
|
152
152
|
type: FIELD_BUSINESS_TYPE;
|
|
153
153
|
from: FIELD_BUSINESS_TYPE;
|
|
154
154
|
}) => unknown;
|
|
155
|
+
export declare namespace FormLowCodeReactions {
|
|
156
|
+
type ConObj = {
|
|
157
|
+
con: LOW_CODE_VALUE_RELATION;
|
|
158
|
+
field_key: string;
|
|
159
|
+
value: unknown;
|
|
160
|
+
};
|
|
161
|
+
type Config = {
|
|
162
|
+
conObj: ConObj[];
|
|
163
|
+
} & Partial<{
|
|
164
|
+
sqlExpression: string;
|
|
165
|
+
showField: string[];
|
|
166
|
+
hideField: string[];
|
|
167
|
+
requiredField: string[];
|
|
168
|
+
notRequiredField: string[];
|
|
169
|
+
enabledField: string[];
|
|
170
|
+
disabledField: string[];
|
|
171
|
+
}>;
|
|
172
|
+
}
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as
|
|
1
|
+
import{createVNode as e,mergeProps as l,defineComponent as o,computed as r}from"vue";import n from"../../../../../../shared/components/InputNumberSlash/InputNumberSlash.js";import{isNumber as u}from"lodash-es";import{NInputNumber as t}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as a}from"../../../constants/index.js";import{useAutoFocus as s}from"./hooks/useAutoFocus.js";import{IhoTableRenderHelper as i}from"../../../utils/index.js";import{defineTablePlugin as m}from"../../../hooks/useTablePlugin.js";const p=o({name:"IhoTableInputNumber",props:{value:[String,Number]},emits:["update:value"],setup(l,{emit:o}){const n=r({get:()=>u(l.value)?l.value:l.value&&u(+l.value)?+l.value:null,set(e){o("update:value",e)}});return()=>e(t,{value:n.value,"onUpdate:value":e=>n.value=e},null)}});function d(){const o="numberRendererPlugin";return m({name:o,vxe(o){o.renderer.add(a.NUMBER,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({row:o,column:r,fieldItem:u,emitFormClick:t,emitFormChangeWithParams:a})=>{const{placeholder:s="请输入"}=u.componentProps||{},i={clearable:!0,placeholder:s,onBlur:()=>a({type:"blur",oldValue:o[r.field]}),[u.allowSlash?"onChange":"onUpdateValue"]:e=>{const l=o[r.field];o[r.field]=e,a({oldValue:l})},onClick:t};return u.allowSlash?e(n,l({value:o[r.field]},i,u.componentProps),null):e(p,l({value:o[r.field]},i,u.componentProps),null)}))})},apply(e){s(e).bindAutoFocusConfig(o,a.NUMBER,".n-input__input-el",{focusType:"class"})}})}export{d as numberRendererPlugin};
|
|
@@ -131,8 +131,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
131
131
|
variableHeight: boolean | '0' | '1';
|
|
132
132
|
filterSetting: IhoTableLowCodeField.FilterSetting;
|
|
133
133
|
bindEventSetting: BindEventSettingItem[];
|
|
134
|
-
allowSlash: boolean
|
|
135
|
-
whiteList: string[];
|
|
134
|
+
allowSlash: boolean;
|
|
136
135
|
}> & Partial<VxeTableDefines.ColumnInfo>;
|
|
137
136
|
export declare type IhoTableFormChangePayload = {
|
|
138
137
|
column: IhoTableFieldItem;
|