cnhis-design-vue 3.1.54-beta.1 → 3.1.54-beta.11
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/body-select/src/hooks/renderCanvas.js +1 -1
- package/es/components/body-select/src/index.vue2.js +1 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -3
- package/es/components/callback/src/components/render/popupMaps.d.ts +47 -10
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.d.ts +21 -4
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.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.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +8 -2
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/form-config/index.d.ts +76 -58
- package/es/components/form-config/src/FormConfig.vue.d.ts +77 -59
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +19 -10
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +31 -22
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +12 -12
- package/es/components/form-config/src/constants/index.d.ts +4 -4
- package/es/components/form-config/src/types/index.d.ts +3 -3
- package/es/components/form-render/index.d.ts +19 -10
- package/es/components/form-render/src/FormRender.vue.d.ts +20 -11
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +19 -10
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -4
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -2
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +2 -2
- package/es/components/form-render/src/hooks/useOperationalForm.d.ts +7 -5
- package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
- package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +1 -1
- package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -3
- package/es/components/form-render/src/types/index.d.ts +6 -6
- package/es/components/iho-table/index.d.ts +28 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +28 -0
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +7 -5
- package/es/components/info-header/index.d.ts +48 -30
- package/es/components/info-header/src/InfoHeader.vue.d.ts +48 -30
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +21 -12
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +19 -10
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/shortcut-setter/index.d.ts +21 -12
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +21 -12
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/useLevelSearchCascader.d.ts +2 -2
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +61 -53
- package/es/shared/utils/business.d.ts +11 -7
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/constants/index.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/constants/index.js +0 -1
|
@@ -84,11 +84,11 @@ export declare function useFieldNormalize(): {
|
|
|
84
84
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
85
85
|
requestInstance: import("../../..").FormRequestDefine.RequestInstance;
|
|
86
86
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
87
|
-
lowCodeReactions: import("../../../../../es/shared/types").
|
|
87
|
+
lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
|
|
88
88
|
linebarAutoHidden: boolean;
|
|
89
89
|
bordered: string | boolean;
|
|
90
90
|
uniqueCacheData: boolean;
|
|
91
|
-
operationalForm: import("../../../../../es/shared/types").
|
|
91
|
+
operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
|
|
92
92
|
outBordered: boolean;
|
|
93
93
|
forceClearable: boolean;
|
|
94
94
|
}>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -175,11 +175,11 @@ export declare function useFieldNormalize(): {
|
|
|
175
175
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
176
176
|
requestInstance: import("../../..").FormRequestDefine.RequestInstance;
|
|
177
177
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
178
|
-
lowCodeReactions: import("../../../../../es/shared/types").
|
|
178
|
+
lowCodeReactions: import("../../../../../es/shared/types").LowCodeTypes.reactionsConfig[];
|
|
179
179
|
linebarAutoHidden: boolean;
|
|
180
180
|
bordered: string | boolean;
|
|
181
181
|
uniqueCacheData: boolean;
|
|
182
|
-
operationalForm: import("../../../../../es/shared/types").
|
|
182
|
+
operationalForm: import("../../../../../es/shared/types").LowCodeTypes.operationalConfig[];
|
|
183
183
|
outBordered: boolean;
|
|
184
184
|
forceClearable: boolean;
|
|
185
185
|
}>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyFn } from '../../../../../es/shared/types';
|
|
2
2
|
import { DependKeyType } from '../../../../../es/components/form-render';
|
|
3
3
|
export declare class FormItemDepsCollector {
|
|
4
|
-
triggerDisabled: boolean;
|
|
4
|
+
triggerDisabled: string | boolean;
|
|
5
5
|
private readonly collector;
|
|
6
6
|
setDeps(key: string, dependKeys: DependKeyType, callback: AnyFn): void;
|
|
7
7
|
getDeps(dependKey: string): Map<string, AnyFn<any[], any>> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Path as t}from"@formily/path";import{isFunction as e,isString as r}from"lodash-es";import"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"../../index.js";import"date-fns";import{traverseDependKey as i}from"../utils/schema.js";class s{constructor(){this.triggerDisabled=!1,this.collector=new Map}setDeps(t,e,r){i(e,(e=>{const i=this.collector.get(e)||new Map;i.set(t,r),this.collector.set(e,i)}))}getDeps(t){return this.collector.get(t)}trigger(i,s){if(!0===this.triggerDisabled)return;const o=this.getDeps(i);o&&[...o.entries()].forEach((([i,o])=>{!e(o)||this.triggerDisabled&&r(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(i)||o(s)}))}}function o(){return{create:function(){return new s}}}export{s as FormItemDepsCollector,o as useFormItemDeps};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormRequestDefine } from '../../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject,
|
|
2
|
+
import { AnyObject, AnyFn, LowCodeTypes } from '../../../../../es/shared/types';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
import { UrlConfig } from '../../../../../es/components/form-render';
|
|
5
5
|
import { RecommendItem } from '../../../../../es/components/recommend-search/src/types';
|
|
@@ -46,7 +46,7 @@ export declare function useAutographOptions(props: Partial<{
|
|
|
46
46
|
valueField: string;
|
|
47
47
|
showField: string;
|
|
48
48
|
requestCache: boolean;
|
|
49
|
-
wordbook:
|
|
49
|
+
wordbook: LowCodeTypes.wordbook;
|
|
50
50
|
autograph: string;
|
|
51
51
|
lazyRequest: boolean;
|
|
52
52
|
options: AnyObject[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LowCodeTypes } from '../../../../../es/shared/types';
|
|
2
2
|
import { Form } from '@formily/core';
|
|
3
3
|
import { MaybeRef } from '@vueuse/core';
|
|
4
|
-
export declare function useLowCodeReactions(configListRef: MaybeRef<
|
|
4
|
+
export declare function useLowCodeReactions(configListRef: MaybeRef<LowCodeTypes.reactionsConfig[] | undefined>, formModel: Form): {
|
|
5
5
|
lowCodeReactionsHandler: (field: string) => void;
|
|
6
6
|
triggerAllReactionsHandler: () => void;
|
|
7
7
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LowCodeTypes } from '../../../../../es/shared/types';
|
|
2
2
|
import { Form } from '@formily/core';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare function useOperationalForm(props: {
|
|
4
|
+
operationalForm?: LowCodeTypes.operationalConfig[];
|
|
5
|
+
dateOperationalForm?: LowCodeTypes.dateOperationalConfig[];
|
|
6
|
+
}, formModel: Form): {
|
|
7
|
+
operationalFormHandler(fieldKey: string): void;
|
|
8
|
+
triggerAllOperationalFormHandler(): void;
|
|
7
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../../shared/utils/index.js";import{getOperationalFormHandler as
|
|
1
|
+
import"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{format as e}from"date-fns";import{isNumber as o,isDate as t}from"lodash-es";import{computed as a}from"vue";import{getOperationalFormHandler as l,getDateOperationalFormHandler as n}from"../../../../shared/utils/business.js";function i(i,m){const s=r=>m.getValuesIn(r),{triggerAllOperationalFormHandler:d,operationalFormHandler:p}=l(a((()=>i.operationalForm)),s,((r,e)=>m.setValuesIn(r,e))),{triggerAllDateOperationalFormHandler:u,dateOperationalFormHandler:f}=n(a((()=>i.dateOperationalForm)),s,((a,l)=>{var n,i,s;const d=m.query(a).take();if(!r(d))return;const[p]=d.component||[];if(["DATE","TIME"].includes(p)){const r=null!=(s=null==(i=null==(n=d.decoratorProps)?void 0:n.fieldItem)?void 0:i.date_format)?s:"yyyy-MM-dd";l=o(l)||t(l)?e(new Date(l),r):l}d.setValue(l)}));return{operationalFormHandler(r){p(r),f(r)},triggerAllOperationalFormHandler(){d(),u()}}}export{i as useOperationalForm};
|
|
@@ -2,5 +2,5 @@ import { Form } from '@formily/core';
|
|
|
2
2
|
import { ContextCollector } from '../../../../../es/components/form-render';
|
|
3
3
|
export declare function useWordbookSetting(formModel: Form, changeContextCollector: ContextCollector): {
|
|
4
4
|
trigger: (fieldKey: string, value: unknown) => void;
|
|
5
|
-
setDisabled: (value: boolean) => void;
|
|
5
|
+
setDisabled: (value: boolean | string) => void;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isField as t}from"@formily/core";function
|
|
1
|
+
import{isField as t}from"@formily/core";import{Path as r}from"@formily/path";import{isString as n}from"lodash-es";function o(o,e){let i=!1;return{trigger:function(l,u){var a,c;if(!0===i)return;const f=o.query(l).take();if(!t(f))return;const s=function(t){var r,n;return null==(n=null==(r=t.decoratorProps)?void 0:r.fieldItem)?void 0:n.wordbook}(f);(null==(c=null==(a=null==s?void 0:s.setting)?void 0:a.cascading)?void 0:c.length)&&s.setting.cascading.forEach((a=>{var c;const f=function(t,r){return Object.values(t.fields).find((t=>t.title===r))}(o,a["form.name"]);if(!f||!t(f))return;if(i&&n(i)&&r.parse(i).match(f.path))return;const s=null==(c=e.getContext(l,u))?void 0:c.currentOption;s&&f.setValue(s[a.value])}))},setDisabled:function(t){i=t}}}export{o as useWordbookSetting};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormRequestDefine } from '../../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject, ArrayAble,
|
|
2
|
+
import { AnyObject, ArrayAble, LowCodeTypes } from '../../../../../es/shared/types';
|
|
3
3
|
import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
|
|
4
4
|
import { CSSProperties, VNode } from 'vue';
|
|
5
5
|
import { DependKeyType, FormCommonState } from '../../../../../es/components/form-render';
|
|
@@ -104,7 +104,7 @@ export declare type FieldItem = {
|
|
|
104
104
|
* 1.用于CASCADER控件提供层级参数
|
|
105
105
|
* 2.用于SEARCH控件提供字段信息
|
|
106
106
|
*/
|
|
107
|
-
wordbook:
|
|
107
|
+
wordbook: LowCodeTypes.wordbook;
|
|
108
108
|
open: SwitchProperty;
|
|
109
109
|
close: SwitchProperty;
|
|
110
110
|
date_format: string;
|
|
@@ -120,7 +120,7 @@ export declare type FieldItem = {
|
|
|
120
120
|
free_entry: FormCommonState;
|
|
121
121
|
save_free_entry: FormCommonState;
|
|
122
122
|
initialize_high: number;
|
|
123
|
-
bindEventSetting: BindEventSettingItem[];
|
|
123
|
+
bindEventSetting: LowCodeTypes.BindEventSettingItem[];
|
|
124
124
|
show_mode: ShowModeType;
|
|
125
125
|
is_allow_check_mid: FormCommonState;
|
|
126
126
|
allow_check_mid_level: '1' | '2' | '3' | '4';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormRequestDefine } from '../../../../../es/shared/hooks';
|
|
2
|
-
import { AnyObject,
|
|
2
|
+
import { AnyObject, LowCodeTypes, UndefinedAble } from '../../../../../es/shared/types';
|
|
3
3
|
import { DataField, Field, Form, GeneralField } from '@formily/core';
|
|
4
4
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
5
5
|
import { Component, FunctionalComponent } from 'vue';
|
|
@@ -56,9 +56,9 @@ export declare type FormRenderExpose = {
|
|
|
56
56
|
*/
|
|
57
57
|
setFormValues(values: AnyObject, options?: Partial<{
|
|
58
58
|
needSplitExtendKey: boolean;
|
|
59
|
-
avoidBusinessConnection: boolean;
|
|
60
|
-
avoidDependKeyConnection: boolean;
|
|
61
|
-
avoidWordbookSettingConnection: boolean;
|
|
59
|
+
avoidBusinessConnection: boolean | string;
|
|
60
|
+
avoidDependKeyConnection: boolean | string;
|
|
61
|
+
avoidWordbookSettingConnection: boolean | string;
|
|
62
62
|
overwrite: boolean;
|
|
63
63
|
}> | boolean, avoidBusinessConnection?: boolean, overwrite?: boolean): any;
|
|
64
64
|
/**
|
|
@@ -136,11 +136,11 @@ export declare type FormRenderProps = Partial<{
|
|
|
136
136
|
businessFormatter: FormBusinessFormatter;
|
|
137
137
|
requestInstance: FormRequestDefine.RequestInstance;
|
|
138
138
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
139
|
-
lowCodeReactions:
|
|
139
|
+
lowCodeReactions: LowCodeTypes.reactionsConfig[];
|
|
140
140
|
linebarAutoHidden: boolean;
|
|
141
141
|
bordered: boolean | string;
|
|
142
142
|
uniqueCacheData: boolean;
|
|
143
|
-
operationalForm:
|
|
143
|
+
operationalForm: LowCodeTypes.operationalConfig[];
|
|
144
144
|
outBordered: boolean;
|
|
145
145
|
forceClearable: boolean;
|
|
146
146
|
}>;
|
|
@@ -2214,12 +2214,26 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2214
2214
|
enable?: boolean | undefined;
|
|
2215
2215
|
usePreset?: boolean | undefined;
|
|
2216
2216
|
} | undefined;
|
|
2217
|
+
operationalForm?: {
|
|
2218
|
+
operationFormParam: string[];
|
|
2219
|
+
operationalRule: string;
|
|
2220
|
+
operationalPrecision: string;
|
|
2221
|
+
operationalResult: string;
|
|
2222
|
+
}[] | undefined;
|
|
2217
2223
|
operationForm?: {
|
|
2218
2224
|
operationFormParam: string[];
|
|
2219
2225
|
operationalRule: string;
|
|
2220
2226
|
operationalPrecision: string;
|
|
2221
2227
|
operationalResult: string;
|
|
2222
2228
|
}[] | undefined;
|
|
2229
|
+
dateOperationalForm?: {
|
|
2230
|
+
scene: "DIFF" | "CALC";
|
|
2231
|
+
precision: string;
|
|
2232
|
+
diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
|
|
2233
|
+
diffValField: string;
|
|
2234
|
+
startDateField: string;
|
|
2235
|
+
endDateField: string;
|
|
2236
|
+
}[] | undefined;
|
|
2223
2237
|
}>;
|
|
2224
2238
|
updateConfigRefDebounced: () => void;
|
|
2225
2239
|
updateConfigRef: () => void;
|
|
@@ -4657,12 +4671,26 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4657
4671
|
enable?: boolean | undefined;
|
|
4658
4672
|
usePreset?: boolean | undefined;
|
|
4659
4673
|
} | undefined;
|
|
4674
|
+
operationalForm?: {
|
|
4675
|
+
operationFormParam: string[];
|
|
4676
|
+
operationalRule: string;
|
|
4677
|
+
operationalPrecision: string;
|
|
4678
|
+
operationalResult: string;
|
|
4679
|
+
}[] | undefined;
|
|
4660
4680
|
operationForm?: {
|
|
4661
4681
|
operationFormParam: string[];
|
|
4662
4682
|
operationalRule: string;
|
|
4663
4683
|
operationalPrecision: string;
|
|
4664
4684
|
operationalResult: string;
|
|
4665
4685
|
}[] | undefined;
|
|
4686
|
+
dateOperationalForm?: {
|
|
4687
|
+
scene: "DIFF" | "CALC";
|
|
4688
|
+
precision: string;
|
|
4689
|
+
diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
|
|
4690
|
+
diffValField: string;
|
|
4691
|
+
startDateField: string;
|
|
4692
|
+
endDateField: string;
|
|
4693
|
+
}[] | undefined;
|
|
4666
4694
|
}>;
|
|
4667
4695
|
configChanged: boolean;
|
|
4668
4696
|
fieldChanged: boolean;
|
|
@@ -2215,12 +2215,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2215
2215
|
enable?: boolean | undefined;
|
|
2216
2216
|
usePreset?: boolean | undefined;
|
|
2217
2217
|
} | undefined;
|
|
2218
|
+
operationalForm?: {
|
|
2219
|
+
operationFormParam: string[];
|
|
2220
|
+
operationalRule: string;
|
|
2221
|
+
operationalPrecision: string;
|
|
2222
|
+
operationalResult: string;
|
|
2223
|
+
}[] | undefined;
|
|
2218
2224
|
operationForm?: {
|
|
2219
2225
|
operationFormParam: string[];
|
|
2220
2226
|
operationalRule: string;
|
|
2221
2227
|
operationalPrecision: string;
|
|
2222
2228
|
operationalResult: string;
|
|
2223
2229
|
}[] | undefined;
|
|
2230
|
+
dateOperationalForm?: {
|
|
2231
|
+
scene: "DIFF" | "CALC";
|
|
2232
|
+
precision: string;
|
|
2233
|
+
diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
|
|
2234
|
+
diffValField: string;
|
|
2235
|
+
startDateField: string;
|
|
2236
|
+
endDateField: string;
|
|
2237
|
+
}[] | undefined;
|
|
2224
2238
|
}>;
|
|
2225
2239
|
updateConfigRefDebounced: () => void;
|
|
2226
2240
|
updateConfigRef: () => void;
|
|
@@ -4658,12 +4672,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4658
4672
|
enable?: boolean | undefined;
|
|
4659
4673
|
usePreset?: boolean | undefined;
|
|
4660
4674
|
} | undefined;
|
|
4675
|
+
operationalForm?: {
|
|
4676
|
+
operationFormParam: string[];
|
|
4677
|
+
operationalRule: string;
|
|
4678
|
+
operationalPrecision: string;
|
|
4679
|
+
operationalResult: string;
|
|
4680
|
+
}[] | undefined;
|
|
4661
4681
|
operationForm?: {
|
|
4662
4682
|
operationFormParam: string[];
|
|
4663
4683
|
operationalRule: string;
|
|
4664
4684
|
operationalPrecision: string;
|
|
4665
4685
|
operationalResult: string;
|
|
4666
4686
|
}[] | undefined;
|
|
4687
|
+
dateOperationalForm?: {
|
|
4688
|
+
scene: "DIFF" | "CALC";
|
|
4689
|
+
precision: string;
|
|
4690
|
+
diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
|
|
4691
|
+
diffValField: string;
|
|
4692
|
+
startDateField: string;
|
|
4693
|
+
endDateField: string;
|
|
4694
|
+
}[] | undefined;
|
|
4667
4695
|
}>;
|
|
4668
4696
|
configChanged: boolean;
|
|
4669
4697
|
fieldChanged: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../../../shared/utils/index.js";import"../../../index.js";import{isFunction as
|
|
1
|
+
import"../../../../../shared/utils/index.js";import{format as o}from"date-fns";import"../../../index.js";import{isFunction as n,isNumber as t,isDate as e}from"lodash-es";import{EDITABLE_WIDGET_TYPE as r}from"../../constants/index.js";import{getLowCodeFieldFromField as i,IhoTableUtils as s}from"../../utils/index.js";import{defineTablePlugin as a}from"../../hooks/useTablePlugin.js";import{getOperationalFormHandler as m,getDateOperationalFormHandler as l}from"../../../../../shared/utils/business.js";function u(){const u="operationalFormPlugin";return a({name:u,apply(a){a.configHooks.config.tap(u,(a=>{const u=a.onFormChange;return a.onFormChange=function(d){const{column:p,row:f,$table:c}=d;!function(n,u){const{operationalFormHandler:d}=m(a.operationalForm||a.operationForm,(o=>n[o]),((o,t)=>{u.getColumns().some((n=>n.field===o))&&(n[o]=t)})),{dateOperationalFormHandler:p}=l(a.dateOperationalForm,(o=>n[o]),((a,m)=>{const l=u.getColumns().find((o=>o.field===a));if(!l)return;const d=i(l);d&&[r.DATE,r.TIME].includes(s.getCellType(d))&&(m=t(m)||e(m)?o(new Date(m),d.valueFormat||"yyyy-MM-dd HH:mm:ss"):null),n[a]=m}));return function(o){d(o),p(o)}}(f,c)(p.field),n(u)&&u(d)},a}))}})}export{u as operationalFormPlugin};
|
|
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
emitFormChangeWithParams: (params?: AnyObject) => void;
|
|
45
45
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
46
46
|
formRef: import("vue").Ref<any>;
|
|
47
|
-
formattedValue: import("vue").WritableComputedRef<string | undefined>;
|
|
47
|
+
formattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
48
48
|
formatConfig: import("vue").ComputedRef<{
|
|
49
49
|
valueFormat: string;
|
|
50
50
|
format: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,inject as r,ref as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,inject as r,ref as a,computed as i,openBlock as o,createBlock as s,unref as n,mergeProps as l,isRef as u}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as d}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import f from"../../../../../../date-picker/index.js";var w=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:w}){const c=e,D=t(),v=r("$xetable"),{emitFormChangeWithParams:b}=p({...c,$table:v}),y=a(),g=i({get:()=>c.value?c.value:null,set(e){const t=c.value;t!==e&&(w("update:value",e),b({oldValue:t}))}}),$=i((()=>{const e=D.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:m(e)}}})),{isStartDate:T=!1,isEndDate:h=!1}=D,x=D.connectField||"",j=(e,t)=>T&&x?e>t:!(!h||!x)&&e<t,F=e=>{const t=new Date(c.row[x]),r=new Date(e),{h:a,m:i,s:o}=S(t),s=(e,t,r,a)=>!(h&&r>a)&&(!(T&&r<a)&&j(e,t));return{isHourDisabled:t=>{if(!c.row[x])return!1;const i=new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime(),{m:o,s:n}=S(r);return s(t,a,e-60*t*60*1e3-60*o*1e3-1e3*n,i)},isMinuteDisabled:t=>{if(!c.row[x])return!1;const o=new Date(`${c.row[x].split(" ")[0]} ${a}:00:00`).getTime(),{s:n}=S(r);return s(t,i,e-60*t*1e3-1e3*n,o)},isSecondDisabled:t=>{if(!c.row[x])return!1;const r=new Date(`${c.row[x].split(" ")[0]} ${a}:${i}:00`).getTime();return s(t,o,e-1e3*t,r)}}},H={type:D.type||"datetime",clearable:!0,allowedInvalidValue:"-",...D,...$.value,isDateDisabled:M(D.isDateDisabled)||(e=>!!c.row[x]&&j(e,h?new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime():new Date(c.row[x]).getTime()))};function M(e){return d(e)?t=>e(t,c.row):null}function S(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return H.type.includes("time")&&(H.isTimeDisabled=M(D.isTimeDisabled)||F),(e,t)=>(o(),s(n(f),l({ref_key:"formRef",ref:y},n(H),{"formatted-value":n(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as o}from"vue";import{format as
|
|
1
|
+
import{createVNode as e,mergeProps as o}from"vue";import{format as t}from"date-fns";import{isFunction as n}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{useAutoFocus as i}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as d,IhoTableRenderHelper as l,isInvalidDate as a,getLowCodeFieldFromField as u}from"../../../../utils/index.js";import m from"./editDate.vue.js";import{defineTablePlugin as s}from"../../../../hooks/useTablePlugin.js";function c(){const c="dateRendererPlugin";return s({name:c,vxe(t){t.interceptor.add("event.clearActived",d(r.DATE,(e=>e.classList.contains("n-date-panel")))),t.renderer.add(r.DATE,{renderCell:l.createDefaultRenderCell(),renderEdit:l.createRenderEdit((({fieldItem:t,emitFormClick:n,row:r,column:i,$rowIndex:d})=>[e(m,o({value:r[i.field],"onUpdate:value":e=>r[i.field]=e,isStartDate:t.isStartDate,isEndDate:t.isEndDate,connectField:t.connectField,valueFormat:t.valueFormat},t.componentProps,{column:i,row:r,"row-index":d,onClick:n}),null)]))})},apply(e){i(e).bindAutoFocusConfig(c,r.DATE,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)}),e.eventHooks.onCellDblclick.tap(c,(({row:e,column:o,columnIndex:i,rowIndex:d,$rowIndex:l},m,{$table:s,emits:c})=>{var f,p,v,x;if((null==(f=o.editRender)?void 0:f.name)!==r.DATE||e[o.field])return;if(n(null==(p=m.editConfig)?void 0:p.beforeEditMethod)){if(!(null==(v=m.editConfig)?void 0:v.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:d,$table:s,$grid:s})))return}const D=new Date;if(a(o,e,D))return;const w=e[o.field];e[o.field]=t(D,(null==(x=u(o))?void 0:x.valueFormat)||"yyyy-MM-dd HH:mm:ss"),c("formChange",{oldValue:w,index:d>-1?d:l,value:e[o.field],row:e,column:o,$table:s})}))}})}export{c as dateRendererPlugin};
|
|
@@ -61,6 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
timeConfig: AnyObject;
|
|
62
62
|
clickShortcutOption: (item: string) => void;
|
|
63
63
|
onUpdateFormattedValue: (value: string) => void;
|
|
64
|
+
isDisabled: (value: string) => boolean;
|
|
64
65
|
onChange: () => void;
|
|
65
66
|
onKeydown: (event: KeyboardEvent) => void;
|
|
66
67
|
NInput: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,withCtx as
|
|
1
|
+
import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,withCtx as d,createVNode as c,mergeProps as m,createElementBlock as v,Fragment as s,renderList as f,createTextVNode as p,toDisplayString as h,createCommentVNode as k}from"vue";import{NPopover as y,NInput as b,NSpace as _,NScrollbar as w,NButton as g}from"naive-ui";import{useIhoTableFormEvent as V}from"../../../../utils/index.js";import C from"../../../../../../time-picker/index.js";import{parse as F,getHours as q,getMinutes as x,getSeconds as D,isValid as O,format as j}from"date-fns";var S=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:S}){const $=e,A=l(),H=t("$xetable"),{emitFormChangeWithParams:I}=V({...$,$table:H}),P=a(null),R=a(!1),E=a(),M=a(),U=a();let z=$.formattedValue;const{placeholder:K="请选择",valueFormat:N="HH:mm"}=A,T={...A,placeholder:K,valueFormat:N,format:N};function W(e){if(e&&B(e))return;if(U.value=e,z===e)return;const l=e||null;S("update:formattedValue",l),I({oldValue:z}),z=l}function B(e){var l,t,a;const r=F(e,T.format,new Date),o=q(r),u=x(r),i=D(r),n=null==(l=T.isHourDisabled)?void 0:l.call(T,o),d=null==(t=T.isMinuteDisabled)?void 0:t.call(T,u,o),c=null==(a=T.isSecondDisabled)?void 0:a.call(T,i,u,o);return!!n||(!!d||!!c)}function G(){[T.valueFormat.replace(/:/,""),T.valueFormat].some((e=>{const l=F(M.value,e,new Date);if(!M.value||O(l)){return W(M.value?j(l,T.valueFormat):""),!0}return!1}))}function J(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=P.value)||l.blur(),R.value=!1)}return r((()=>$.formattedValue),(e=>{M.value=e,U.value=e}),{immediate:!0}),r((()=>R.value),(async e=>{var l,t,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(t=null==(l=E.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(l,t)=>(u(),i(n(y),{show:R.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[3]||(t[3]=()=>R.value=!1)},{trigger:d((()=>[c(n(b),{ref_key:"formRef",ref:P,clearable:"",placeholder:n(K),value:M.value,"onUpdate:value":t[0]||(t[0]=e=>M.value=e),valueModifiers:{trim:!0},onClick:t[1]||(t[1]=()=>R.value=!0),onChange:G,onKeydown:J},null,8,["placeholder","value"])])),default:d((()=>[c(n(_),null,{default:d((()=>[c(n(C),m({ref_key:"timePickerRef",ref:E,show:"","formatted-value":U.value},n(T),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":W,onConfirm:t[2]||(t[2]=()=>R.value=!1)}),null,16,["formatted-value"]),c(n(w),{class:"iho-table__scrollbar"},{default:d((()=>[e.shortcutOptions.length?(u(),i(n(_),{key:0,vertical:"",wrap:!1},{default:d((()=>[(u(!0),v(s,null,f(e.shortcutOptions,(e=>(u(),i(n(g),{size:"tiny",key:e,disabled:B(e),onClick:l=>function(e){W(e),R.value=!1}(e)},{default:d((()=>[p(h(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{S as default};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as
|
|
1
|
+
import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as t}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as e}from"../../../constants/index.js";import{parseMergeField as r,isRichContent as i,parseRichContent as l,getTitle as s}from"../../../utils/index.js";import{isMatchLowCodeCondition as c}from"../../../../../../shared/utils/business.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function u(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(e.DEFAULT,{renderCell(e,{row:d,column:u}){const a=r(d,u),f=i(a)?function(o,t){const e=l(o);return[n("span",{title:s(t,e.change_text),style:{color:e.background||e.icon}},[r(e.icon),e.change_text])];function r(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:e.icon},null):null}}(a,u):[a];return function(e,r,i,l){if(l=o(l)?String(l):null==l?"":l+"",!t(e)||!e.length)return n("span",{title:String(s(i,l))},[l]);const d=e.find((n=>n.condition&&n.condition.find((n=>{const o=r[n.field_key||i.field];return c(o,n)}))));return n("span",d?{title:s(i,l),style:{color:d.color},class:d.icon}:{title:s(i,l)},[l])}(function(n){var t,e,r;const i=null==(t=n.editRender)?void 0:t.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(e=i.settingObj)?void 0:e.colorAndIcon}(u),d,u,f)}}),d.renderer.add(e.STATUS,d.renderer.get(e.DEFAULT))}})}export{u as defaultRendererPlugin};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, ArrayAble,
|
|
1
|
+
import { AnyObject, ArrayAble, AnyFn, MaybeString, LowCodeTypes, TupleToUnion } from '../../../../../es/shared/types';
|
|
2
2
|
import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes, VxeTablePropTypes, VxeTableConstructor } from 'vxe-table';
|
|
3
3
|
import { VxePagerEventProps } from 'vxe-table/types/pager';
|
|
4
4
|
import { VxeTableEventProps, VxeTableListeners, VxeTablePrivateMethods } from 'vxe-table/types/table';
|
|
@@ -36,7 +36,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
36
36
|
usePreset: boolean;
|
|
37
37
|
[K: string]: any;
|
|
38
38
|
}>;
|
|
39
|
-
|
|
39
|
+
operationalForm: LowCodeTypes.operationalConfig[];
|
|
40
|
+
operationForm: LowCodeTypes.operationalConfig[];
|
|
41
|
+
dateOperationalForm: LowCodeTypes.dateOperationalConfig[];
|
|
40
42
|
checkboxConfig: Partial<VxeTableProps['checkboxConfig'] & {
|
|
41
43
|
slots: VxeColumnPropTypes.Slots;
|
|
42
44
|
maxCheckSize: number;
|
|
@@ -75,7 +77,7 @@ export declare namespace IhoTableLowCodeField {
|
|
|
75
77
|
}>;
|
|
76
78
|
type ColorAndIconItem = Partial<{
|
|
77
79
|
condition: {
|
|
78
|
-
con:
|
|
80
|
+
con: LowCodeTypes.VALUE_RELATION;
|
|
79
81
|
value: unknown;
|
|
80
82
|
field_key?: string;
|
|
81
83
|
}[];
|
|
@@ -149,12 +151,12 @@ export declare type LowCodeTableFieldItem = {
|
|
|
149
151
|
colorAndIcon: IhoTableLowCodeField.ColorAndIconItem[];
|
|
150
152
|
variableHeight: boolean | '0' | '1';
|
|
151
153
|
filterSetting: IhoTableLowCodeField.FilterSetting;
|
|
152
|
-
bindEventSetting: BindEventSettingItem[];
|
|
154
|
+
bindEventSetting: LowCodeTypes.BindEventSettingItem[];
|
|
153
155
|
allowSlash: boolean | string;
|
|
154
156
|
whiteList: string[];
|
|
155
157
|
defaultValue: any;
|
|
156
158
|
autograph: string;
|
|
157
|
-
wordbook:
|
|
159
|
+
wordbook: LowCodeTypes.wordbook;
|
|
158
160
|
requestCache: boolean;
|
|
159
161
|
lazyRequest: boolean;
|
|
160
162
|
}> & Partial<VxeTableDefines.ColumnInfo>;
|