cnhis-design-vue 3.1.54-beta.2 → 3.1.54-beta.21
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/button-print/index.d.ts +13 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +16 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +54 -14
- package/es/components/chat-sdk/index.d.ts +2 -0
- package/es/components/chat-sdk/index.js +1 -0
- package/es/components/chat-sdk/src/chatSDK.d.ts +7 -0
- package/es/components/chat-sdk/src/chatSDK.js +1 -0
- package/es/components/classification/index.d.ts +498 -1
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +485 -1
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +485 -1
- package/es/components/classification/src/index.vue.d.ts +500 -1
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/index.d.ts +1 -0
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/constants/index.d.ts +1 -0
- package/es/components/fabric-chart/src/constants/index.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 +18 -1
- 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.d.ts +5 -0
- 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 +10 -4
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/form-config/index.d.ts +135 -111
- package/es/components/form-config/src/FormConfig.vue.d.ts +136 -112
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +26 -14
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +53 -41
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +17 -17
- 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 +26 -14
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +27 -15
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +26 -14
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/index.d.ts +20 -9
- package/es/components/form-render/src/hooks/index.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/useFieldVisitor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +12 -3
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- 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 +13 -4
- 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/bindEventSettingPlugin/index.js +1 -1
- 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 +8 -3
- 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/index.css +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +62 -38
- package/es/components/info-header/src/InfoHeader.vue.d.ts +62 -38
- 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 +28 -16
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +26 -14
- package/es/components/quick-search/style/index.css +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 +33 -21
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +33 -21
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +332 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +127 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.d.ts +41 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.d.ts +28 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +51 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue2.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +244 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/helpers/options.d.ts +14 -0
- package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +486 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.js +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -0
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
- package/es/components/table-filter/src/constants/index.d.ts +1 -0
- package/es/components/table-filter/src/constants/index.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/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/index.js +1 -1
- 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/fabric-chart/src/hooks/electrocardiogram/constants/index.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/constants/index.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,6 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LowCodeTypes } from '../../../../../es/shared/types';
|
|
2
|
+
import { Field, Form } from '@formily/core';
|
|
2
3
|
import { ContextCollector } from '../../../../../es/components/form-render';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export declare class wordbookSettingHandler {
|
|
5
|
+
private formModel;
|
|
6
|
+
private changeContextCollector;
|
|
7
|
+
triggerDisabled: string | boolean;
|
|
8
|
+
constructor(formModel: Form, changeContextCollector: ContextCollector);
|
|
9
|
+
getWordbook(field: Field): LowCodeTypes.wordbook | undefined;
|
|
10
|
+
findFieldByLabel(formModel: Form, label: string): import("@formily/core").GeneralField | undefined;
|
|
11
|
+
trigger(fieldKey: string, value: unknown): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function useWordbookSetting(): {
|
|
14
|
+
create: (formModel: Form, changeContextCollector: ContextCollector) => wordbookSettingHandler;
|
|
6
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isField as t}from"@formily/core";
|
|
1
|
+
import{isField as t}from"@formily/core";import{Path as r}from"@formily/path";import{isString as e}from"lodash-es";class i{constructor(t,r){this.formModel=t,this.changeContextCollector=r,this.triggerDisabled=!1}getWordbook(t){var r,e;return null==(e=null==(r=t.decoratorProps)?void 0:r.fieldItem)?void 0:e.wordbook}findFieldByLabel(t,r){return Object.values(t.fields).find((t=>t.title===r))}trigger(i,o){var n,l;if(!0===this.triggerDisabled)return;const s=this.formModel.query(i).take();if(!t(s))return;const a=this.getWordbook(s);(null==(l=null==(n=null==a?void 0:a.setting)?void 0:n.cascading)?void 0:l.length)&&a.setting.cascading.forEach((n=>{var l;const s=this.findFieldByLabel(this.formModel,n["form.name"]);if(!s||!t(s))return;if(this.triggerDisabled&&e(this.triggerDisabled)&&r.parse(this.triggerDisabled).match(s.path))return;const a=null==(l=this.changeContextCollector.getContext(i,o))?void 0:l.currentOption;a&&s.setValue(a[n.value])}))}}function o(){return{create:function(t,r){return new i(t,r)}}}export{o as useWordbookSetting,i as wordbookSettingHandler};
|
|
@@ -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 n}from"lodash-es";import{
|
|
1
|
+
import"../../../../../shared/utils/index.js";import"../../../index.js";import{isFunction as n}from"lodash-es";import{getBindEventSettingTrigger as t}from"../../../../../shared/utils/business.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function e(){const e="bindEventSettingPlugin";return o({name:e,apply(o){o.configHooks.config.tap(e,(o=>{const e=o.onFormChange;return o.onFormChange=function(o){var i;const{column:r,row:s}=o,u=null==(i=r.editRender)?void 0:i.props;if(u&&(null==u?void 0:u.bindEventSetting)){u.bindEventSetting.forEach((n=>{t(n.event_type)(n,{getter:n=>s[n],setter:(n,t)=>s[n]=t})}))}n(e)&&e(o)},o}))}})}export{e as bindEventSettingPlugin};
|
|
@@ -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{getOperationalFormHandler as a,getDateOperationalFormHandler as m}from"../../../../../shared/utils/business.js";import{defineTablePlugin as l}from"../../hooks/useTablePlugin.js";function u(){const u="operationalFormPlugin";return l({name:u,apply(l){l.configHooks.config.tap(u,(l=>{const u=l.onFormChange;return l.onFormChange=function(d){const{column:p,row:f,$table:c}=d;!function(n,u){const{operationalFormHandler:d}=a(l.operationalForm||l.operationForm,(o=>n[o]),((o,t)=>{u.getColumns().some((n=>n.field===o))&&(n[o]=t)})),{dateOperationalFormHandler:p}=m(l.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)},l}))}})}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};
|
|
@@ -54,13 +54,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
isShow: import("vue").Ref<boolean>;
|
|
55
55
|
timePickerRef: import("vue").Ref<any>;
|
|
56
56
|
inputValue: import("vue").Ref<any>;
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
inputProps: import("vue").ComputedRef<{
|
|
58
|
+
style: string;
|
|
59
|
+
} | {
|
|
60
|
+
style?: undefined;
|
|
61
|
+
}>;
|
|
62
|
+
__formattedValue: import("vue").WritableComputedRef<any>;
|
|
59
63
|
placeholder: any;
|
|
60
64
|
valueFormat: any;
|
|
61
65
|
timeConfig: AnyObject;
|
|
62
66
|
clickShortcutOption: (item: string) => void;
|
|
63
|
-
onUpdateFormattedValue: (value: string) => void;
|
|
67
|
+
onUpdateFormattedValue: (value: string | null) => void;
|
|
68
|
+
isDisabled: (value: string) => boolean;
|
|
64
69
|
onChange: () => void;
|
|
65
70
|
onKeydown: (event: KeyboardEvent) => void;
|
|
66
71
|
NInput: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as l,inject as t,ref as a,
|
|
1
|
+
import{defineComponent as e,useAttrs as l,inject as t,ref as a,computed as r,reactive as u,watch as o,nextTick as i,openBlock as n,createBlock as d,unref as c,withCtx as v,createVNode as m,mergeProps as s,isRef as f,createElementBlock as p,Fragment as h,renderList as y,createTextVNode as k,toDisplayString as b,createCommentVNode as w}from"vue";import{NPopover as _,NInput as g,NSpace as V,NScrollbar as C,NButton as F}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import D from"../../../../../../time-picker/index.js";import{parse as q,isValid as O,getHours as j,getMinutes as S,getSeconds as $,format as A}from"date-fns";var H=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:H}){const I=e,P=l(),R=t("$xetable"),{emitFormChangeWithParams:E}=x({...I,$table:R}),M=a(null),U=a(!1),z=a(),K=a(),N=r((()=>K.value&&L(K.value)?{style:"text-decoration: line-through"}:{})),T=r({get(){if(!K.value)return null;const e=q(K.value,G.valueFormat,new Date);return O(e)?K.value:I.formattedValue?I.formattedValue:null},set(e){J(e)}}),{placeholder:W="请选择",valueFormat:B="HH:mm"}=P,G=u({...P,placeholder:W,valueFormat:B,format:B});function J(e){if(K.value=e||"",e&&L(e))return;const l=I.formattedValue;l!==e&&(H("update:formattedValue",e),E({oldValue:l}))}function L(e){var l,t,a;const r=q(e,G.format,new Date),u=j(r),o=S(r),i=$(r),n=null==(l=G.isHourDisabled)?void 0:l.call(G,u),d=null==(t=G.isMinuteDisabled)?void 0:t.call(G,o,u),c=null==(a=G.isSecondDisabled)?void 0:a.call(G,i,o,u);return!!n||(!!d||!!c)}function Q(){[G.valueFormat.replace(/[^\w]/g,""),G.valueFormat].some((e=>{const l=q(K.value,e,new Date);if(!K.value||O(l)){return J(K.value?A(l,G.valueFormat):null),!0}return!1}))}function X(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=M.value)||l.blur(),U.value=!1)}return o((()=>I.formattedValue),(e=>{if(!e)return"";K.value=e}),{immediate:!0}),o((()=>U.value),(async e=>{var l,t,a,r,u;e&&(await i(),null==(u=null==(r=null==(a=null==(t=null==(l=z.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)=>(n(),d(c(_),{show:U.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[4]||(t[4]=()=>U.value=!1)},{trigger:v((()=>[m(c(g),{ref_key:"formRef",ref:M,clearable:"",placeholder:c(W),value:K.value,"onUpdate:value":t[0]||(t[0]=e=>K.value=e),valueModifiers:{trim:!0},"input-props":c(N),onClick:t[1]||(t[1]=()=>U.value=!0),onChange:Q,onKeydown:X},null,8,["placeholder","value","input-props"])])),default:v((()=>[m(c(V),null,{default:v((()=>[m(c(D),s({ref_key:"timePickerRef",ref:z,show:""},c(G),{class:"iho-table__time-picker",to:!1,"formatted-value":c(T),"onUpdate:formatted-value":t[2]||(t[2]=e=>f(T)?T.value=e:null),onConfirm:t[3]||(t[3]=()=>U.value=!1)}),null,16,["formatted-value"]),m(c(C),{class:"iho-table__scrollbar"},{default:v((()=>[e.shortcutOptions.length?(n(),d(c(V),{key:0,vertical:"",wrap:!1},{default:v((()=>[(n(!0),p(h,null,y(e.shortcutOptions,(e=>(n(),d(c(F),{size:"tiny",key:e,disabled:L(e),onClick:l=>function(e){J(e),U.value=!1}(e)},{default:v((()=>[k(b(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):w("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{H 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 e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}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(t.DEFAULT,{renderCell(t,{row:d,column:u}){const a=r(d,u),f=i(a)?function(o,e){const t=l(o);return[n("span",{title:s(e,t.change_text),style:{color:t.background||t.icon}},[r(t.icon),t.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:t.icon},null):null}}(a,u):[a];return function(o,t,r,i){if(!e(o)||!o.length)return n("span",{title:s(r,i)},[i]);const l=o.find((n=>n.condition&&n.condition.find((n=>{const o=t[n.field_key||r.field];return c(o,n)}))));return n("span",l?{title:s(r,i),style:{color:l.color},class:l.icon}:{title:s(r,i)},[i])}(function(n){var e,t,r;const i=null==(e=n.editRender)?void 0:e.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(t=i.settingObj)?void 0:t.colorAndIcon}(u),d,u,f)}}),d.renderer.add(t.STATUS,d.renderer.get(t.DEFAULT))}})}export{u as defaultRendererPlugin};
|
|
1
|
+
import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}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(t.DEFAULT,{renderCell(t,{row:d,column:u}){const a=r(d,u),f=i(a)?function(o,e){const t=l(o);return[n("span",{title:s(e,t.change_text),style:{color:t.background||t.icon}},[r(t.icon),t.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:t.icon},null):null}}(a,u):[a];return function(o,t,r,i){if(!e(o)||!o.length)return n("span",{title:String(s(r,i))},[i]);const l=o.find((n=>n.condition&&n.condition.find((n=>{const o=t[n.field_key||r.field];return c(o,n)}))));return n("span",l?{title:s(r,i),style:{color:l.color},class:l.icon}:{title:s(r,i)},[i])}(function(n){var e,t,r;const i=null==(e=n.editRender)?void 0:e.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(t=i.settingObj)?void 0:t.colorAndIcon}(u),d,u,f)}}),d.renderer.add(t.STATUS,d.renderer.get(t.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>;
|