cnhis-design-vue 3.1.52-release.1 → 3.1.52-release.2
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/body-select/index.d.ts +47 -0
- package/es/components/body-select/index.js +1 -0
- package/es/components/body-select/src/config/index.d.ts +101 -0
- package/es/components/body-select/src/config/index.js +1 -0
- package/es/components/body-select/src/hooks/renderCanvas.d.ts +6 -0
- package/es/components/body-select/src/hooks/renderCanvas.js +1 -0
- package/es/components/body-select/src/index.vue.d.ts +48 -0
- package/es/components/body-select/src/index.vue.js +1 -0
- package/es/components/body-select/src/index.vue2.js +1 -0
- package/es/components/body-select/style/index.css +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +1 -1
- package/es/components/classification/index.d.ts +76 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +76 -6
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +76 -6
- package/es/components/classification/src/index.vue.d.ts +76 -6
- package/es/components/date-picker/index.d.ts +38 -3
- package/es/components/date-picker/src/DatePicker.vue.d.ts +38 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/form-config/index.d.ts +2 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +2 -2
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-render/index.d.ts +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +2 -2
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +38 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +38 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -1
- package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +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/src/components/classify-filter/ValueCfg.vue.d.ts +76 -6
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +76 -6
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +76 -6
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +152 -12
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +152 -12
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +9 -0
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +8 -2
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../es/shared/types';
|
|
2
|
-
import { Form, IFieldState } from '@formily/core';
|
|
2
|
+
import { Field, Form, IFieldState } from '@formily/core';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
import { FieldItem, FormItemDepsCollector, FormRenderProps } from '../../../../../es/components/form-render';
|
|
5
5
|
export declare function useFormExposeEvent({ formModel, formRenderRef, formUUID, getFieldList, formItemDepsCollector }: {
|
|
@@ -9,7 +9,7 @@ export declare function useFormExposeEvent({ formModel, formRenderRef, formUUID,
|
|
|
9
9
|
getFieldList: () => FieldItem[];
|
|
10
10
|
formItemDepsCollector: FormItemDepsCollector;
|
|
11
11
|
}): {
|
|
12
|
-
validate(path?: string, { force }?: {
|
|
12
|
+
validate(path?: string | ((field: Field) => boolean), { force }?: {
|
|
13
13
|
force?: boolean | undefined;
|
|
14
14
|
}): Promise<void>;
|
|
15
15
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,findAncestor as t}from"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{Path as o}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as n}from"@vueuse/shared";import{
|
|
1
|
+
import{arrayed as e,findAncestor as t}from"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{Path as o}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as n}from"@vueuse/shared";import{isFunction as s,isArray as a,isString as f}from"lodash-es";import{nextTick as m}from"vue";import"../../index.js";import{FormItemLineBarDepKeyPrepend as l,NESTED_FORM_ITEM_TYPE as u}from"../constants/index.js";import{queryDecoratorByAddress as d,queryInput as c,queryDecoratorByFieldKey as p,findNextWidget as g}from"../utils/dom.js";import{validateMessageParser as h,combineExtendKey as v,splitExtendKey as y}from"../utils/index.js";import{getParentLinebar as x}from"../utils/schema.js";function I({formModel:t,formRenderRef:n,formUUID:u,getFieldList:g,formItemDepsCollector:I}){return{validate(o="*",{force:m}={}){if(s(o)){const e=Object.entries(t.fields).reduce(((e,[t,r])=>(o(r)&&e.push(t),e)),[]);if(!e.length)return Promise.resolve();o=e.length?`*(${e.join(",")})`:"*"}const l=[];m&&t.setFieldState(o,(e=>{"visible"===e.display&&"editable"!==e.pattern&&r(e)&&(l.push({pattern:e.pattern,state:e}),e.pattern="editable")}));const p=t.validate(o).catch((e=>Promise.reject(Array.isArray(e)?e.reduce(g,[]):e)));return m&&l.forEach((({pattern:e,state:t})=>t.pattern=e)),p;function g(t,r){if(!i(r))return t;let o=!1;return a(r.messages)&&r.messages.forEach((r=>{i(r)&&(t.push(...e(r).map(v)),o=!0)})),!o&&t.push(v(r)),t}function v(e){if(e.decoratorElement)return e;const r=t.query(e.path),o=r.get("title"),s=e.messages.map((e=>function(e,t){if(!t||!i(t.fieldItem))return e;const r=t.fieldItem.defined_error_msg;return h(r&&f(r)?r:e,t.fieldItem)}(e,r.get("decoratorProps")))),a=d(e.address,n.value,u);return{...e,messages:s,title:o,decoratorElement:a,...c(a)}}},getFormValues(e=!0){let r=t.getFormState().values;return e&&(r=v(g(),r)),r},setFormValues(e,i=!0,n=!0){i&&(e=y(g(),e)),t.setFieldState("*",(t=>{r(t)&&(n||o.existIn(e,t.path))&&(t.value=o.getIn(e,t.path))}))},setFieldState(e,r){t.setFieldState(e,r)},resetFields:(e="*")=>t.reset(e),queryWidget:async e=>n.value?await async function(e,t,r){if(!n.value)return s();const o=p(e,t,u);if(o)return s(o);const i=x(e,r);return i?(I.trigger(l+i,!0),await m(),s(p(e,t,u))):s();function s(e){return{decoratorElement:e,...c(e)}}}(e,n.value,g()):null}}function j({props:e,formRenderRef:r,formModel:o}){return{onKeydown:async function i(a){var f;if(e.enterToNextWidget&&a.target){if("TEXTAREA"===a.target.tagName&&!a.ctrlKey)return;a.preventDefault()}if(await n(0),Reflect.get(a,"stopCapture")||!e.enterToNextWidget||!r.value)return;const m=t(a.target,(e=>e.classList.contains("form-render__formItem")));if(!m)return;const l=`.form-render__formItem${u.map((e=>`:not([widget-type=${e}])`)).join("")}`,d=Array.from(r.value.querySelectorAll(l)),c=d.findIndex((e=>e.id===m.id));if(!~c)return;const{widget:p,field:h}=g(d,c,a.target);if(p)if(s(e.enterToNextWidget)){const t=h&&o.query(h).take();!t||e.enterToNextWidget(null==(f=t.decoratorProps)?void 0:f.fieldItem)?v():i({target:p})}else v();async function v(){await n(0),p.focus()}}}}export{j as useFormDomEvent,I as useFormExposeEvent};
|
|
@@ -31,11 +31,11 @@ export declare type FormRenderExpose = {
|
|
|
31
31
|
formModel: Form;
|
|
32
32
|
/**
|
|
33
33
|
* @desc 触发表单校验
|
|
34
|
-
* @param {string} path 目标路径, 支持Path语法
|
|
34
|
+
* @param {string|((field:Field)=>boolean)} path 目标路径, 支持Path语法
|
|
35
35
|
* @param {{force?:boolean}} options 校验选项, force代表强制校验不可编辑项
|
|
36
36
|
* @return {void | Promise<Object[]>}
|
|
37
37
|
*/
|
|
38
|
-
validate(path?: string, options?: {
|
|
38
|
+
validate(path?: string | ((field: Field) => boolean), options?: {
|
|
39
39
|
force?: boolean;
|
|
40
40
|
}): Promise<unknown>;
|
|
41
41
|
/**
|
|
@@ -32,6 +32,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
onConfirm: {
|
|
33
33
|
type: FunctionConstructor;
|
|
34
34
|
};
|
|
35
|
+
formattedValue: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
38
|
+
placeholder: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
allowedInvalidValue: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
35
44
|
}, {
|
|
36
45
|
attrs: {
|
|
37
46
|
[x: string]: unknown;
|
|
@@ -43,9 +52,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
52
|
onConfirm: {
|
|
44
53
|
type: FunctionConstructor;
|
|
45
54
|
};
|
|
46
|
-
|
|
55
|
+
formattedValue: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
};
|
|
58
|
+
placeholder: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
};
|
|
61
|
+
allowedInvalidValue: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
64
|
+
}>> & {
|
|
65
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
47
68
|
datePickerRef: import("vue").Ref<import("../../../../../../es/shared/types").AnyObject | null>;
|
|
48
69
|
panelInstRef: import("vue").Ref<null>;
|
|
70
|
+
placeholderRef: import("vue").Ref<any>;
|
|
71
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
49
72
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
50
73
|
formatRef: import("vue").ComputedRef<string>;
|
|
51
74
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -54,15 +77,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
77
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
55
78
|
onUpdateShow: (show: boolean) => void;
|
|
56
79
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
80
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
57
81
|
NDatePicker: any;
|
|
58
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
82
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
83
|
updateUnchangedValue: {
|
|
60
84
|
type: BooleanConstructor;
|
|
61
85
|
};
|
|
62
86
|
onConfirm: {
|
|
63
87
|
type: FunctionConstructor;
|
|
64
88
|
};
|
|
65
|
-
|
|
89
|
+
formattedValue: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
};
|
|
92
|
+
placeholder: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
};
|
|
95
|
+
allowedInvalidValue: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
};
|
|
98
|
+
}>> & {
|
|
99
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
}, {
|
|
66
101
|
updateUnchangedValue: boolean;
|
|
67
102
|
}>>;
|
|
68
103
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -76,6 +76,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
76
76
|
onConfirm: {
|
|
77
77
|
type: FunctionConstructor;
|
|
78
78
|
};
|
|
79
|
+
formattedValue: {
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
};
|
|
82
|
+
placeholder: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
};
|
|
85
|
+
allowedInvalidValue: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
};
|
|
79
88
|
}, {
|
|
80
89
|
attrs: {
|
|
81
90
|
[x: string]: unknown;
|
|
@@ -87,9 +96,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
96
|
onConfirm: {
|
|
88
97
|
type: FunctionConstructor;
|
|
89
98
|
};
|
|
90
|
-
|
|
99
|
+
formattedValue: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
};
|
|
102
|
+
placeholder: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
};
|
|
105
|
+
allowedInvalidValue: {
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
};
|
|
108
|
+
}>> & {
|
|
109
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
110
|
+
}>>;
|
|
111
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
91
112
|
datePickerRef: import("vue").Ref<AnyObject | null>;
|
|
92
113
|
panelInstRef: import("vue").Ref<null>;
|
|
114
|
+
placeholderRef: import("vue").Ref<any>;
|
|
115
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
93
116
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
94
117
|
formatRef: import("vue").ComputedRef<string>;
|
|
95
118
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -98,15 +121,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
98
121
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
99
122
|
onUpdateShow: (show: boolean) => void;
|
|
100
123
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
124
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
101
125
|
NDatePicker: any;
|
|
102
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
126
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
103
127
|
updateUnchangedValue: {
|
|
104
128
|
type: BooleanConstructor;
|
|
105
129
|
};
|
|
106
130
|
onConfirm: {
|
|
107
131
|
type: FunctionConstructor;
|
|
108
132
|
};
|
|
109
|
-
|
|
133
|
+
formattedValue: {
|
|
134
|
+
type: StringConstructor;
|
|
135
|
+
};
|
|
136
|
+
placeholder: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
};
|
|
139
|
+
allowedInvalidValue: {
|
|
140
|
+
type: StringConstructor;
|
|
141
|
+
};
|
|
142
|
+
}>> & {
|
|
143
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
144
|
+
}, {
|
|
110
145
|
updateUnchangedValue: boolean;
|
|
111
146
|
}>>;
|
|
112
147
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,inject as r,ref as i,computed as a,onMounted as l,openBlock as o,createBlock as n,unref as u,mergeProps as s,isRef as d}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as p}from"lodash-es";import{useIhoTableFormEvent as c}from"../../../../utils/index.js";import
|
|
1
|
+
import{defineComponent as e,useAttrs as t,inject as r,ref as i,computed as a,onMounted as l,openBlock as o,createBlock as n,unref as u,mergeProps as s,isRef as d}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as p}from"lodash-es";import{useIhoTableFormEvent as c}from"../../../../utils/index.js";import v from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:f}){const w=e,D=t(),b=r("$xetable"),{emitFormChangeWithParams:y}=c({...w,$table:b}),g=i(),$=a({get:()=>w.value,set(e){const t=w.value;t!==e&&(f("update:value",e),y({oldValue:t}))}}),T=a((()=>{const e=D.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:m(e)}}})),{isStartDate:h=!1,isEndDate:x=!1}=D,j=D.connectField||"",S=(e,t)=>h&&j?e>t:!(!x||!j)&&e<t,k=e=>{const t=new Date(w.row[j]),r=new Date(e),{h:i,m:a,s:l}=H(t),o=(e,t,r,i)=>!(x&&r>i)&&(!(h&&r<i)&&S(e,t));return{isHourDisabled:t=>{if(!w.row[j])return!1;const a=new Date(`${w.row[j].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:n}=H(r);return o(t,i,e-60*t*60*1e3-60*l*1e3-1e3*n,a)},isMinuteDisabled:t=>{if(!w.row[j])return!1;const l=new Date(`${w.row[j].split(" ")[0]} ${i}:00:00`).getTime(),{s:n}=H(r);return o(t,a,e-60*t*1e3-1e3*n,l)},isSecondDisabled:t=>{if(!w.row[j])return!1;const r=new Date(`${w.row[j].split(" ")[0]} ${i}:${a}:00`).getTime();return o(t,l,e-1e3*t,r)}}},q={type:D.type||"datetime",clearable:!0,allowedInvalidValue:"-",...D,...T.value,isDateDisabled:F(D.isDateDisabled)||(e=>!!w.row[j]&&S(e,x?new Date(`${w.row[j].split(" ")[0]} 00:00:00`).getTime():new Date(w.row[j]).getTime()))};function F(e){return p(e)?t=>e(t,w.row):null}function H(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return q.type.includes("time")&&(q.isTimeDisabled=F(D.isTimeDisabled)||k),l((()=>{var e,t,r,i,a,l,o;return null==(o=null==(a=null==(r=null==(t=null==(e=g.value)?void 0:e.$datePicker)?void 0:t.inputInstRef)?void 0:(i=r.$el).querySelector)?void 0:(l=a.call(i,"input")).select)?void 0:o.call(l)})),(e,t)=>(o(),n(u(v),s({ref_key:"formRef",ref:g},u(q),{"formatted-value":u($),"onUpdate:formatted-value":t[0]||(t[0]=e=>d($)?$.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
|