cnhis-design-vue 3.1.52-release.3 → 3.1.52-release.5
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/index.d.ts +14 -4
- package/es/components/body-select/src/config/index.js +1 -1
- package/es/components/body-select/src/hooks/renderCanvas.d.ts +1 -1
- package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
- package/es/components/body-select/src/index.vue.d.ts +14 -4
- 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/utils/print.d.ts +3 -3
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +45 -41
- package/es/components/classification/index.d.ts +6 -4
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +6 -4
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +6 -4
- package/es/components/classification/src/index.vue.d.ts +6 -4
- 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/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +2 -2
- package/es/components/form-config/index.d.ts +108 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +182 -74
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +37 -37
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +73 -37
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +12 -0
- package/es/components/form-render/index.d.ts +37 -37
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +37 -37
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +6 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/iho-table/index.d.ts +8 -4
- package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -4
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/plugins/copyPastePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/copyPastePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.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/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +15 -11
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +75 -75
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +38 -38
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +37 -37
- package/es/components/quick-search/index.d.ts +3 -1
- package/es/components/quick-search/src/index.vue.d.ts +3 -1
- package/es/components/quick-search/src/index.vue2.js +1 -1
- 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 +0 -6
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +12 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +49 -37
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-filter/index.d.ts +2 -0
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +0 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +0 -2
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +6 -4
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.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/package.json.js +1 -1
- package/es/shared/types/business.d.ts +2 -0
- package/es/shared/utils/business.d.ts +1 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -324,7 +324,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
324
324
|
syncBarPosition: Func<any[], any>;
|
|
325
325
|
} | undefined>;
|
|
326
326
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
327
|
-
updateAnchorList: (field: import("
|
|
327
|
+
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
328
328
|
anchorIdList: import("vue").Ref<{
|
|
329
329
|
name: string;
|
|
330
330
|
title: string;
|
|
@@ -341,12 +341,12 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
341
341
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
|
|
342
342
|
afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
|
|
343
343
|
}>>[T]>>;
|
|
344
|
-
triggerAutoHidden: (field: import("
|
|
345
|
-
observeFormGraph: Record<string, import("
|
|
346
|
-
setGraph: (field: import("
|
|
347
|
-
removeGraph: (field: import("
|
|
348
|
-
lowCodeEventTrigger: (field: import("
|
|
349
|
-
formModel: import("
|
|
344
|
+
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
345
|
+
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
346
|
+
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
347
|
+
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
348
|
+
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
349
|
+
formModel: import("@formily/core").Form<{
|
|
350
350
|
[x: string]: any;
|
|
351
351
|
}>;
|
|
352
352
|
lowCodeReactionsHandler: (field: string) => void;
|
|
@@ -561,12 +561,12 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
561
561
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
562
562
|
clearSpan: (uuid: string) => void;
|
|
563
563
|
exposeEvent: {
|
|
564
|
-
validate(path?: string | ((field: import("
|
|
564
|
+
validate(path?: string | ((field: import("@formily/core").Field<any, any, any, any>) => boolean), { force }?: {
|
|
565
565
|
force?: boolean | undefined;
|
|
566
566
|
}): Promise<void>;
|
|
567
567
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
568
568
|
setFormValues(values: import("../../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
569
|
-
setFieldState(path: string, setter: (field: Partial<Pick<import("
|
|
569
|
+
setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
570
570
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
571
571
|
validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
|
|
572
572
|
data: any;
|
|
@@ -579,22 +579,22 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
579
579
|
onBlur: (...args: any[]) => Promise<void>;
|
|
580
580
|
onInput: (...args: any[]) => Promise<void>;
|
|
581
581
|
editable: boolean;
|
|
582
|
-
reset: (options?: import("
|
|
582
|
+
reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
|
|
583
583
|
title: string;
|
|
584
584
|
visible: boolean;
|
|
585
585
|
submit: <T_1>(onSubmit?: ((values: any) => void | Promise<T_1>) | undefined) => Promise<T_1>;
|
|
586
|
-
validator: import("
|
|
587
|
-
pattern: import("
|
|
586
|
+
validator: import("@formily/core").FieldValidator;
|
|
587
|
+
pattern: import("@formily/core").FieldPatternTypes;
|
|
588
588
|
content: any;
|
|
589
|
-
display: import("
|
|
589
|
+
display: import("@formily/core").FieldDisplayTypes;
|
|
590
590
|
hidden: boolean;
|
|
591
|
-
form: import("
|
|
591
|
+
form: import("@formily/core").Form<any>;
|
|
592
592
|
componentProps: Record<string, any>;
|
|
593
593
|
decoratorProps: Record<string, any>;
|
|
594
594
|
description: string;
|
|
595
595
|
readOnly: boolean;
|
|
596
|
-
component: import("
|
|
597
|
-
decorator: import("
|
|
596
|
+
component: import("@formily/core").FieldComponent<any, any>;
|
|
597
|
+
decorator: import("@formily/core").FieldDecorator<any, any>;
|
|
598
598
|
validating: boolean;
|
|
599
599
|
submitting: boolean;
|
|
600
600
|
active: boolean;
|
|
@@ -603,27 +603,27 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
603
603
|
modified: boolean;
|
|
604
604
|
inputValue: string;
|
|
605
605
|
inputValues: any[];
|
|
606
|
-
dataSource: import("
|
|
607
|
-
feedbacks: import("
|
|
608
|
-
caches: import("
|
|
609
|
-
selfErrors: import("
|
|
610
|
-
readonly errors: import("
|
|
611
|
-
selfWarnings: import("
|
|
612
|
-
readonly warnings: import("
|
|
613
|
-
selfSuccesses: import("
|
|
614
|
-
readonly successes: import("
|
|
606
|
+
dataSource: import("@formily/core").FieldDataSource;
|
|
607
|
+
feedbacks: import("@formily/core").IFieldFeedback[];
|
|
608
|
+
caches: import("@formily/core").IFieldCaches;
|
|
609
|
+
selfErrors: import("@formily/core").FeedbackMessage;
|
|
610
|
+
readonly errors: import("@formily/core").IFormFeedback[];
|
|
611
|
+
selfWarnings: import("@formily/core").FeedbackMessage;
|
|
612
|
+
readonly warnings: import("@formily/core").IFormFeedback[];
|
|
613
|
+
selfSuccesses: import("@formily/core").FeedbackMessage;
|
|
614
|
+
readonly successes: import("@formily/core").IFormFeedback[];
|
|
615
615
|
readonly selfValid: boolean;
|
|
616
616
|
readonly valid: boolean;
|
|
617
617
|
readonly selfInvalid: boolean;
|
|
618
618
|
readonly invalid: boolean;
|
|
619
619
|
initialValue: string;
|
|
620
620
|
readonly validateStatus: "error" | "success" | "warning" | "validating";
|
|
621
|
-
setDataSource: (dataSource?: import("
|
|
622
|
-
setFeedback: (feedback?: import("
|
|
623
|
-
setSelfErrors: (messages?: import("
|
|
624
|
-
setSelfWarnings: (messages?: import("
|
|
625
|
-
setSelfSuccesses: (messages?: import("
|
|
626
|
-
setValidator: (validator?: import("
|
|
621
|
+
setDataSource: (dataSource?: import("@formily/core").FieldDataSource | undefined) => void;
|
|
622
|
+
setFeedback: (feedback?: import("@formily/core").IFieldFeedback | undefined) => void;
|
|
623
|
+
setSelfErrors: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
|
|
624
|
+
setSelfWarnings: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
|
|
625
|
+
setSelfSuccesses: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
|
|
626
|
+
setValidator: (validator?: import("@formily/core").FieldValidator | undefined) => void;
|
|
627
627
|
setValidatorRule: (name: string, value: any) => void;
|
|
628
628
|
setRequired: (required?: boolean | undefined) => void;
|
|
629
629
|
setValue: (value?: string | undefined) => void;
|
|
@@ -631,7 +631,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
631
631
|
setLoading: (loading?: boolean | undefined) => void;
|
|
632
632
|
setValidating: (validating?: boolean | undefined) => void;
|
|
633
633
|
setSubmitting: (submitting?: boolean | undefined) => void;
|
|
634
|
-
queryFeedbacks: (search?: import("
|
|
634
|
+
queryFeedbacks: (search?: import("@formily/core").ISearchFeedback | undefined) => import("@formily/core").IFieldFeedback[];
|
|
635
635
|
modify: () => void;
|
|
636
636
|
initialized: boolean;
|
|
637
637
|
mounted: boolean;
|
|
@@ -640,13 +640,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
640
640
|
componentType: any;
|
|
641
641
|
designable: boolean;
|
|
642
642
|
locate: (address: import("@formily/path").Pattern) => void;
|
|
643
|
-
readonly parent: import("
|
|
643
|
+
readonly parent: import("@formily/core").GeneralField;
|
|
644
644
|
readPretty: boolean;
|
|
645
645
|
readonly destroyed: boolean;
|
|
646
646
|
setTitle: (title?: string | undefined) => void;
|
|
647
647
|
setDescription: (description?: string | undefined) => void;
|
|
648
|
-
setDisplay: (type?: import("
|
|
649
|
-
setPattern: (type?: import("
|
|
648
|
+
setDisplay: (type?: import("@formily/core").FieldDisplayTypes | undefined) => void;
|
|
649
|
+
setPattern: (type?: import("@formily/core").FieldPatternTypes | undefined) => void;
|
|
650
650
|
setComponent: <C extends unknown, ComponentProps extends object = {}>(component?: C | undefined, props?: ComponentProps | undefined) => void;
|
|
651
651
|
setComponentProps: <ComponentProps_1 extends object = {}>(props?: ComponentProps_1 | undefined) => void;
|
|
652
652
|
setDecorator: <D extends unknown, ComponentProps_2 extends object = {}>(component?: D | undefined, props?: ComponentProps_2 | undefined) => void;
|
|
@@ -656,8 +656,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
656
656
|
onInit: () => void;
|
|
657
657
|
onMount: () => void;
|
|
658
658
|
onUnmount: () => void;
|
|
659
|
-
query: (pattern: import("@formily/path").Pattern) => import("
|
|
660
|
-
notify: (type: import("
|
|
659
|
+
query: (pattern: import("@formily/path").Pattern) => import("@formily/core").Query;
|
|
660
|
+
notify: (type: import("@formily/core").LifeCycleTypes, payload?: any) => void;
|
|
661
661
|
dispose: () => void;
|
|
662
662
|
destroy: (forceClear?: boolean | undefined) => void;
|
|
663
663
|
}>>>) => void): void;
|
|
@@ -69,6 +69,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
69
69
|
default: string;
|
|
70
70
|
};
|
|
71
71
|
clearable: BooleanConstructor;
|
|
72
|
+
selectAll: BooleanConstructor;
|
|
72
73
|
onChange: {};
|
|
73
74
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
74
75
|
value: {
|
|
@@ -138,6 +139,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
138
139
|
default: string;
|
|
139
140
|
};
|
|
140
141
|
clearable: BooleanConstructor;
|
|
142
|
+
selectAll: BooleanConstructor;
|
|
141
143
|
onChange: {};
|
|
142
144
|
}>> & {
|
|
143
145
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -151,6 +153,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
151
153
|
childFieldStrategy: "checked" | "all";
|
|
152
154
|
childWidthMode: "inner" | "outer";
|
|
153
155
|
clearable: boolean;
|
|
156
|
+
selectAll: boolean;
|
|
154
157
|
}>;
|
|
155
158
|
export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
156
159
|
value: {
|
|
@@ -220,6 +223,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
220
223
|
default: string;
|
|
221
224
|
};
|
|
222
225
|
clearable: BooleanConstructor;
|
|
226
|
+
selectAll: BooleanConstructor;
|
|
223
227
|
onChange: {};
|
|
224
228
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
225
229
|
value: {
|
|
@@ -289,6 +293,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
289
293
|
default: string;
|
|
290
294
|
};
|
|
291
295
|
clearable: BooleanConstructor;
|
|
296
|
+
selectAll: BooleanConstructor;
|
|
292
297
|
onChange: {};
|
|
293
298
|
}>> & {
|
|
294
299
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -302,4 +307,5 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
302
307
|
childFieldStrategy: "checked" | "all";
|
|
303
308
|
childWidthMode: "inner" | "outer";
|
|
304
309
|
clearable: boolean;
|
|
310
|
+
selectAll: boolean;
|
|
305
311
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,createVNode as
|
|
1
|
+
import{defineComponent as e,computed as t,createVNode as l,mergeProps as a,isVNode as o}from"vue";import i from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{connect as r,mapProps as n}from"@formily/vue";import{isArray as u,xor as d,isNumber as s,isEmpty as c}from"lodash-es";import{NCheckboxGroup as p,NCheckbox as m,NRadioGroup as v}from"naive-ui";import"../../../index.js";import{useComplexOptions as f}from"../../hooks/useComplexOptions.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"date-fns";import{assignUpdateValue as h,createVisitedSetter as y}from"../../utils/schema.js";import{useUrlConfigOptions as g,useAutographOptions as j}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as b}from"../../hooks/useCommonInjection.js";import{useFormField as x}from"../../hooks/useFormField.js";function k(i,r,n){return e({name:i,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},urlConfig:{type:Object},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},childWidthMode:{type:String,default:"outer"},clearable:Boolean,selectAll:Boolean,onChange:{}},emits:["update:value"],setup(e,{emit:i,attrs:v}){const{field:h}=x();const k=t({get(){return t=e.value,s(t)?t+"":t;var t},set(e){i("update:value",e)}}),{renderComplexOption:C}=f(e,k),{labelKey:F,valueKey:S,fullOptions:O}=e.urlConfig?g(e,k):j(e,k),{injectValueBindKey:w,injectValueValidate:_}=b();_(k);const B=w(k);function W(){k.value=null}const K=t({get:()=>u(k.value)&&k.value.length===O.value.length,set(e){const t=e?O.value.map((e=>e[S.value])):[];d(t,k.value).length&&(k.value=t)}}),R=t((()=>u(e.value)&&e.value.length&&e.value.length<O.value.length));function A(t){let a;const i={display:"flex",alignItems:"center"};if(t.__spanPercent&&"inner"===e.childWidthMode){const e=`${t.__spanPercent}%`;i.maxWidth=e,function(e,t){return!c(t.childrenFields)&&(u(e)?e.includes(t[S.value]):e===t[S.value])}(k.value,t)&&(i.width=e)}return l(n,{key:t[S.value],value:t[S.value],disabled:t.disabled,currentValue:k.value,cancelable:e.clearable,onCancel:W,style:i},"function"==typeof(r=a=C({value:k.value,option:t,valueKey:S.value,labelKey:F.value,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode}))||"[object Object]"===Object.prototype.toString.call(r)&&!o(r)?a:{default:()=>[a]});var r}return()=>{const t=O.value.map((e=>{var t;const l=null==(t=e.childrenFields)?void 0:t.reduce(((e,t)=>e+ +(t.elem_width||3)),0);return{...e,__spanPercent:(l||0)/12*100}})),o={display:"flex",flexDirection:e.vertical?"column":"row",flexWrap:"wrap",justifyItems:"flex-start",alignItems:e.vertical?"flex-start":"center",width:"100%"},i=l(r,a({key:B.value,value:k.value,"onUpdate:value":e=>k.value=e,onClick:y(h),style:{width:"100%"}},v),{default:()=>[l("section",{style:o},[t.map(A)])]});return e.selectAll?l("section",null,[[r!==p?null:l(m,{checked:K.value,"onUpdate:checked":e=>K.value=e,indeterminate:R.value},{default:()=>"全选"}),i]]):i}}})}const C=r(k("FormRadio",v,i),n({dataSource:"options"},h)),F=r(k("FormCheckbox",p,m),n({dataSource:"options"},h));export{F as CHECKBOX,C as RADIO};
|
|
@@ -106,6 +106,9 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
106
106
|
type: BooleanConstructor;
|
|
107
107
|
default: boolean;
|
|
108
108
|
};
|
|
109
|
+
selectAll: {
|
|
110
|
+
type: BooleanConstructor;
|
|
111
|
+
};
|
|
109
112
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend")[], "update:value" | "postRecommend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
110
113
|
value: {
|
|
111
114
|
type: PropType<ArrayAble<string | number> | null>;
|
|
@@ -209,6 +212,9 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
209
212
|
type: BooleanConstructor;
|
|
210
213
|
default: boolean;
|
|
211
214
|
};
|
|
215
|
+
selectAll: {
|
|
216
|
+
type: BooleanConstructor;
|
|
217
|
+
};
|
|
212
218
|
}>> & {
|
|
213
219
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
214
220
|
onPostRecommend?: ((...args: any[]) => any) | undefined;
|
|
@@ -221,6 +227,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
221
227
|
lazyRequest: boolean;
|
|
222
228
|
requestCache: boolean;
|
|
223
229
|
deletable: boolean;
|
|
230
|
+
selectAll: boolean;
|
|
224
231
|
shouldSave: boolean;
|
|
225
232
|
recommend: boolean;
|
|
226
233
|
recommendCache: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as l,inject as t,useAttrs as
|
|
1
|
+
import{defineComponent as e,computed as l,inject as t,useAttrs as a,ref as o,createVNode as u,mergeProps as n,toRaw as r,nextTick as s,createTextVNode as i}from"vue";import{arrayed as p}from"../../../../../shared/utils/index.js";import{HelpCircleSharp as m}from"@vicons/ionicons5";import{promiseTimeout as c}from"@vueuse/shared";import{cloneDeep as d,isArray as v,isString as f,isObject as y,omit as h,xor as g}from"lodash-es";import{useCommonInjection as S,useSelectOptionProps as b}from"../../hooks/useCommonInjection.js";import{useComplexOptions as j,useComplexOptionsSpan as C}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as w,InjectionFormUUID as k}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"@vueuse/core";import{NSelect as B,NTooltip as F,NIcon as x,NTag as A,NButton as O}from"naive-ui";import"date-fns";import{assignUpdateValue as H,assignClearBindVisited as P,createVisitedSetter as R}from"../../utils/schema.js";import{useFormField as V}from"../../hooks/useFormField.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import{connect as K,mapProps as L}from"@formily/vue";import"./index.js";import{useUrlConfigOptions as E,useAutographOptions as _,useRecommendOptions as I,searchContentMatcher as N}from"../../hooks/useFormRenderOptions.js";const q=K(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean}},emits:["update:value","postRecommend"],setup(e,{slots:H,emit:P}){const K=l({get:()=>e.value,async set(e){P("update:value",e),Y(e)}}),L=l((()=>(e.multiple&&e.allowModify&&console.warn("多选模式下不支持allowModify"),!e.multiple&&e.allowModify))),{labelKey:q,valueKey:M,showKey:z,fetchData:W,searchContent:U,fullOptions:D,filterOptions:T,remoteOptions:$,loading:G}=e.urlConfig?E(e,K):_(e,K),{renderComplexOption:J,hasComplexOption:Q}=j(e,K),{getRecommend:X,postRecommend:Y,sortedOptions:Z}=I(e,T,P,q,M),{field:ee,fieldKey:le}=V();t(w).setContext(le.value,(e=>({currentOption:d(function(e){const l=pe(D.value);return v(e)?function(e){const t=l.reduce(((e,l)=>(e[l[M.value]]=l,e)),{});return e.map((e=>t[e]))}(e):(t=e,l.find((e=>e[M.value]===t)));var t}(e))})));const te=async(e="")=>(U.value=e,Promise.allSettled([W(e),X(e)])),{injectValueValidate:ae,injectValueWatchFromEmpty:oe,injectValueBindKey:ue}=S();oe(K,te),ae(K);const ne=ue(K),{menuProps:re,nodeProps:se}=b();function ie(e){const l=e[q.value];if(!l||!f(l))return"";const t=U.value?N(U.value,l):null,a=t?u("section",null,[t.map(((e,l)=>0!==l&&e?u("span",{style:{color:l%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):l;return e.desc?u("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[a,e.desc?u(F,null,{trigger:()=>u(x,{component:m},null),default:()=>e.desc}):null]):a}function pe(l){return e.allowCreate&&U.value&&!l.some((e=>e[q.value]===U.value))?[...l,{[q.value]:U.value,[M.value]:U.value,created:!0,shouldSave:e.shouldSave}]:l}const me=l((()=>pe(L.value?D.value:Z.value))),ce=a(),de=l((()=>{if(e.allowCreate||e.showCustomValue)return K.value;const l=e.multiple&&v(K.value);return D.value.find((e=>l?K.value.includes(e[M.value]):e[M.value]===K.value))?K.value:null})),ve=o(!1);async function fe(e){e&&await te(),ve.value=e}let ye=null;async function he(l,t){K.value=l,ye&&y(t)&&L.value&&(ye.focus(),await s(),ye.value=t[q.value]||"",ye.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&ye.setSelectionRange(0,0)),$.value&&t&&p(t).forEach((e=>{if(!y(e))return;const l=e;l.created&&l.shouldSave&&$.value.push(h(r(l),["created","shouldSave"]))}))}const ge=t(k),{getSpan:Se}=C(),be=R(ee,(async l=>{var t,a,o;L.value&&(ye=l.target,ye&&K.value&&(await s(),ye.value=null!=(o=null!=(a=null==(t=D.value.find((e=>e[M.value]===K.value)))?void 0:t[q.value])?a:K.value)?o:"",ye.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&(await c(0),ye.setSelectionRange(0,0))))}));function je(e){if(!L.value)return;if(ye=e.target,!ye)return;if(!ye.value)return K.value=null;const l=D.value.find((e=>e[q.value]===ye.value));l?K.value=l[M.value]:(U.value=ye.value,K.value=ye.value)}const Ce=o("");function we({option:l,handleClose:t}){var a;const o=null!=(a=z.value&&l[z.value])?a:l[q.value];return e.multiple?(Ce.value="",e.deletable?u(A,{closable:!0,onClose:e=>{e.stopPropagation(),t()}},{default:()=>u("span",{title:o},[o])}):`${o} ;`):(Ce.value=o,o)}function ke(l){if(!e.multiple)return;const t=l?me.value.map((e=>e[M.value])):[];g(t,e.value).length&&(K.value=t)}function Be(){return[u(O,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>ke(!0)},{default:()=>[i("全选")]}),u(O,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>ke(!1)},{default:()=>[i("清空")]})]}function Fe(l){let t=H;return e.multiple&&e.selectAll&&(t={action:Be,...H}),u(B,n({title:Ce.value,key:ne.value,multiple:e.multiple,remote:!0,filterable:!0,loading:G.value,value:de.value,onUpdateValue:he,"menu-props":re,"node-props":se,labelField:q.value,valueField:M.value,options:me.value,onSearch:te,show:ve.value,"onUpdate:show":fe,onFocus:be,onBlur:je,renderLabel:ie,renderTag:we},l,ce),t)}return()=>{var e,l;if(!Q.value)return Fe();const t=null!=(l=null==(e=ee.value.decoratorProps)?void 0:e.span)?l:6,a=Se(ge,ee.value.address);return u("section",{class:"form-render__selectChildField",style:{"--column":a+t}},[Fe({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),D.value.map((e=>J({option:e,value:K.value,valueKey:M.value,labelKey:q.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":a}}})))])}}}),L({dataSource:"options"},H,P));export{q as SELECT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{format as s}from"date-fns";import{useFieldNormalize as l}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(f){const{createValidatorSchema:x}=c(),_=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=x(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},h=e=>{var o,t,r,s,l,a,p;const c=_(e);e.urlConfig?u(c,e):e.autograph&&m(c,e);const d=!!e.__multiple,f="1"===e.allowModify,x=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(c["x-component-props"],{multiple:d,options:(null==(r=e.componentProps)?void 0:r.options)||e.option,allowModify:f,allowCreate:"1"===e.free_entry||!!c["x-component-props"].allowCreate||f,shouldSave:"1"===e.save_free_entry,showField:null!=(l=e.show_key)?l:null==(s=e.componentProps)?void 0:s.showField,maxTagCount:null!=(p=i(e.multi_select_value))?p:null==(a=c["x-component-props"])?void 0:a.maxTagCount,selectAll:"1"===x||!0===x,...n(e,["lazyRequest","requestCache"])}),d&&(c.type="array"),c},g=e=>{var o,t;const n=_(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?u(n,e):e.autograph&&m(n,e),n},y=e=>{const t=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},v=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",v],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==i||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",h],["REMOTE_SEARCH",h],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=s(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=_(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=_(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",g],["CHECKBOX",g],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=_(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),w=e=>{if(e.suffixConfig)return C(e);return(b.get(e.html_type)||y)(e)},C=o=>{if(!o.suffixConfig&&!o.prefixConfig)return w(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=_(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:j(n)}),i},{FieldNormalizeWaterfallHook:A,FieldListNormalizeWaterfallHook:O}=l();function j(o,n={column:9999}){let i=null;return O.call(t(o),n).reduce(((e,o,l)=>{var a;const p=null==(a=(o=A.call(o,n)).validate)?void 0:a.obj_type;return p&&f&&f.collect(p,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(v(o),l),i=e[s(o)].properties={}):i?i[s(o)]=r(w(o),l):(i=null,e[s(o)]=r(w(o),l)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{f as useFieldListAdaptor};
|
|
@@ -2,7 +2,6 @@ import { AnyObject, ArrayAble, BindEventSettingItem } from '../../../../../es/sh
|
|
|
2
2
|
import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
|
|
3
3
|
import { CSSProperties, VNode } from 'vue';
|
|
4
4
|
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
|
|
5
|
-
export * from '@formily/core';
|
|
6
5
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
7
6
|
declare type HtmlType = 'INPUT' | 'TEXTAREA' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
|
|
8
7
|
declare type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
|
|
@@ -181,3 +180,4 @@ export declare type FieldItem = {
|
|
|
181
180
|
reactions: ArrayAble<ReactionType>;
|
|
182
181
|
[key: string]: any;
|
|
183
182
|
}>;
|
|
183
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1880,6 +1880,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1880
1880
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
1881
1881
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
1882
1882
|
}) => boolean) | undefined;
|
|
1883
|
+
forceArrowKey?: boolean | undefined;
|
|
1883
1884
|
} | undefined;
|
|
1884
1885
|
clipConfig?: {
|
|
1885
1886
|
isCopy?: boolean | undefined;
|
|
@@ -2121,10 +2122,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2121
2122
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2122
2123
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2123
2124
|
isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2124
|
-
|
|
2125
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2126
|
+
rowDraggable?: boolean | undefined;
|
|
2125
2127
|
showSeq?: boolean | undefined;
|
|
2126
2128
|
forceClearable?: boolean | undefined;
|
|
2127
|
-
|
|
2129
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2128
2130
|
rowGroupSetting?: {
|
|
2129
2131
|
firstRowGroup?: {
|
|
2130
2132
|
groupName?: string | undefined;
|
|
@@ -4381,6 +4383,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4381
4383
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4382
4384
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4383
4385
|
}) => boolean) | undefined;
|
|
4386
|
+
forceArrowKey?: boolean | undefined;
|
|
4384
4387
|
} | undefined;
|
|
4385
4388
|
clipConfig?: {
|
|
4386
4389
|
isCopy?: boolean | undefined;
|
|
@@ -4562,10 +4565,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4562
4565
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4563
4566
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4564
4567
|
isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4565
|
-
|
|
4568
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4569
|
+
rowDraggable?: boolean | undefined;
|
|
4566
4570
|
showSeq?: boolean | undefined;
|
|
4567
4571
|
forceClearable?: boolean | undefined;
|
|
4568
|
-
|
|
4572
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4569
4573
|
rowGroupSetting?: {
|
|
4570
4574
|
firstRowGroup?: {
|
|
4571
4575
|
groupName?: string | undefined;
|
|
@@ -1880,6 +1880,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1880
1880
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
1881
1881
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
1882
1882
|
}) => boolean) | undefined;
|
|
1883
|
+
forceArrowKey?: boolean | undefined;
|
|
1883
1884
|
} | undefined;
|
|
1884
1885
|
clipConfig?: {
|
|
1885
1886
|
isCopy?: boolean | undefined;
|
|
@@ -2121,10 +2122,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2121
2122
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2122
2123
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2123
2124
|
isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2124
|
-
|
|
2125
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2126
|
+
rowDraggable?: boolean | undefined;
|
|
2125
2127
|
showSeq?: boolean | undefined;
|
|
2126
2128
|
forceClearable?: boolean | undefined;
|
|
2127
|
-
|
|
2129
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2128
2130
|
rowGroupSetting?: {
|
|
2129
2131
|
firstRowGroup?: {
|
|
2130
2132
|
groupName?: string | undefined;
|
|
@@ -4381,6 +4383,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4381
4383
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4382
4384
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4383
4385
|
}) => boolean) | undefined;
|
|
4386
|
+
forceArrowKey?: boolean | undefined;
|
|
4384
4387
|
} | undefined;
|
|
4385
4388
|
clipConfig?: {
|
|
4386
4389
|
isCopy?: boolean | undefined;
|
|
@@ -4562,10 +4565,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4562
4565
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4563
4566
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4564
4567
|
isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4565
|
-
|
|
4568
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4569
|
+
rowDraggable?: boolean | undefined;
|
|
4566
4570
|
showSeq?: boolean | undefined;
|
|
4567
4571
|
forceClearable?: boolean | undefined;
|
|
4568
|
-
|
|
4572
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4569
4573
|
rowGroupSetting?: {
|
|
4570
4574
|
firstRowGroup?: {
|
|
4571
4575
|
groupName?: string | undefined;
|
|
@@ -27,7 +27,9 @@ declare class ConfigHooks extends AbstractConfigHooks {
|
|
|
27
27
|
readonly treeConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.TreeConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
28
28
|
readonly mouseConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.MouseConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
29
29
|
readonly menuConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.MenuConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
30
|
-
readonly keyboardConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.KeyboardConfig
|
|
30
|
+
readonly keyboardConfig: SyncWaterfallHook<[(import("vxe-table").VxeTablePropTypes.KeyboardConfig & Partial<import("vxe-table").VxeTablePropTypes.KeyboardConfig & {
|
|
31
|
+
forceArrowKey: boolean;
|
|
32
|
+
}>) | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
31
33
|
readonly scrollY: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ScrollY | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
32
34
|
readonly scrollX: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ScrollX | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
33
35
|
readonly editRules: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.EditRules | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyPastePlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unref as e}from"vue";import"../../index.js";import{useSessionStorage as t}from"@vueuse/core";import{selectOptionsMap as n}from"./rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{isInvalidDate as o,isInvalidTime as l,IhoTableUtils as i}from"../utils/index.js";import{EDITABLE_WIDGET_TYPE as r}from"../constants/index.js";import{isString as u,trim as d,isEmpty as s,isEqual as a,isFunction as f}from"lodash-es";import{defineTablePlugin as p}from"../hooks/useTablePlugin.js";function c(){const c="copyPastePlugin",m=t("ihoTableClipData","");return p({name:c,apply(t){function p(t,p,c,g,E){var C,b;if(!(null==(C=null==c?void 0:c.keyboardConfig)?void 0:C.isClip))return;if("paste"===t&&!p.getSelectedCell())return;const{row:T,column:x}=p.getSelectedCell()||p.getEditRecord()||{};if(!T||!x||!v(x,r.SELECT)&&e(m)===T[x.field])return;const R=c.uuid&&v(x,r.SELECT)&&n.get(c.uuid)[x.field],y=T[x.field];if("copy"===t){const e=(null==(b=(R||[]).filter((e=>y.includes(e.value))))?void 0:b.map((e=>e.label)).join(","))||y;m.value=e}else{if(u(e(m))&&(m.value=d(e(m)||"")),!e(m)||!function(e){var t;const n=null==(t=e.editRender)?void 0:t.props;return n&&Object.keys(r).includes(i.getCellType(n))}(x)||T.$__SEPARATE||!function(e,t,n,o){var l,i;const{beforeEditMethod:r}=t.editConfig||{},u={rowIndex:null!=(l=e.getRowIndex(n))?l:0,columnIndex:null!=(i=e.getColumnIndex(o))?i:0};return!r||f(r)&&r({row:n,column:o,...u,$table:e,$grid:void 0})}(p,c,T,x))return;if(v(x,r.DATE)&&o(x,T,m))return;if(v(x,r.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(m)||"").toString()))return;if(v(x,r.TIME)&&l(x,m))return;let t=e(m)||"";if(R&&!s(R)){const e=R.filter((e=>t.split(",").includes(e.label))).map((e=>e.value));if(s(e))return;if(function(e){var t,n;const o=null==(t=e.editRender)?void 0:t.props;return v(e,r.SELECT)&&(null==(n=o.componentProps)?void 0:n.multiple)}(x)){if(a(y,e))return;t=e}else{if(e.includes(y))return;t=e[0]}}T[x.field]=t,g("formChange",{column:x,row:T,oldValue:y,value:t,index:p.getRowIndex(T)}),v(x,r.SEPARATE)&&(null==E||E())}}function v(e,t){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&i.getCellType(o)===t}t.eventHooks.onCopy.tap(c,(({$table:e},t,{emits:n})=>p("copy",e,t,n))),t.eventHooks.onPaste.tap(c,(({$table:e},t,{emits:n,updateTableDataRef:o})=>p("paste",e,t,n,o)))}})}export{c as copyPastePlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function forceArrowKeyPlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../index.js";import{EDITABLE_WIDGET_TYPE as e}from"../constants/index.js";import{promiseTimeout as r}from"@vueuse/shared";import{identity as o}from"lodash-es";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";function n(){const n="forceArrowKeyPlugin",i=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function s({keyboardConfig:e={}}){return e.isArrow&&e.forceArrowKey}return t({name:n,apply(t){t.eventHooks.onKeydown.tap(n,(async({$event:e,$table:o},t)=>{const n=e;if(!s(t)||!i.includes(n.key))return;const d=o.getEditRecord()||{};if(d.row&&d.column){e.preventDefault();const r="ArrowLeft"===n.key,t="ArrowUp"===n.key,i="ArrowRight"===n.key,s="ArrowDown"===n.key;o.moveSelected(d,r,t,i,s,n)}await r(0);const{row:p,column:l}=o.getSelectedCell()||{};p&&l&&await o.setEditCell(p,l)}));const d={[e.NUMBER]:e=>{var r;return e.editRender.props={...e.editRender.props,componentProps:{keyboard:{ArrowUp:!1,ArrowDown:!1},...null==(r=e.editRender.props)?void 0:r.componentProps}},e}};t.fieldHooks.field.tap(n,((e,r,t)=>{var n;if(!s(t))return e;return(d[null==(n=e.editRender)?void 0:n.name]||o)(e)}))}})}export{n as forceArrowKeyPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./defaultConfigPlugin/index.js";import*as
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./copyPastePlugin.js";import*as n from"./defaultConfigPlugin/index.js";import*as s from"./defaultValuePlugin.js";import*as t from"./filterDaterangeRenderPlugin/index.js";import*as d from"./filterRenderPlugin/index.js";import*as l from"./filterVisibleEventPlugin.js";import*as g from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as o from"./highLightSetPlugin.js";import*as a from"./keyboardEventPlugin/index.js";import*as P from"./lowCodeFieldAdaptorPlugin/index.js";import*as m from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin/index.js";import*as f from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as j from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as R from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as b from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as w from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as c from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as h from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as W from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as v from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as k from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as C from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as S from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as y from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as E from"./rowClickPlugin/index.js";import*as A from"./rowDragPlugin/index.js";import*as D from"./rowGroupSettingPlugin/index.js";import*as F from"./varialbleHeightPlugin/index.js";import*as V from"./virtualTreePlugin/index.js";import{separateMetaModule as q}from"../../../../shared/utils/index.js";var z=q(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./copyPastePlugin.ts":i,"./defaultConfigPlugin/index.ts":n,"./defaultValuePlugin.ts":s,"./filterDaterangeRenderPlugin/index.tsx":t,"./filterRenderPlugin/index.tsx":d,"./filterVisibleEventPlugin.ts":l,"./forceArrowKeyPlugin.ts":g,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":o,"./keyboardEventPlugin/index.ts":a,"./lowCodeFieldAdaptorPlugin/index.tsx":P,"./maxCheckSizePlugin.ts":m,"./operationalFormPlugin/index.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":f,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":p,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":j,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":b,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":c,"./rendererPlugins/widgets/checkRendererPlugin.tsx":h,"./rendererPlugins/widgets/colorRendererPlugin.tsx":W,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":v,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":k,"./rendererPlugins/widgets/labelRendererPlugin.tsx":C,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":S,"./rendererPlugins/widgets/seqRendererPlugin.tsx":y,"./rowClickPlugin/index.ts":E,"./rowDragPlugin/index.ts":A,"./rowGroupSettingPlugin/index.ts":D,"./varialbleHeightPlugin/index.tsx":F,"./virtualTreePlugin/index.ts":V}));export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{promiseTimeout as e}from"@vueuse/shared";import"../../../index.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function t(){const t="keyboardEventPlugin";return o({name:t,apply(o){o.eventHooks.onKeydown.tap(t,(async({$event:o,$table:t},n,{emits:r})=>{await e(0);const{row:a,column:i}=t.getSelectedCell()||t.getEditRecord()||{};if(!a||!i)return;r("keyboard",{$table:t,key:o.key,index:t.getRowIndex(a),value:a[i.field],row:a,column:i})}))}})}export{t as keyboardEventPlugin};
|
|
@@ -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 n}from"date-fns";import{isFunction as t}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as i,IhoTableRenderHelper as d,isInvalidDate as l,getLowCodeFieldFromField as a}from"../../../../utils/index.js";import m from"./editDate.vue.js";import{defineTablePlugin as u}from"../../../../hooks/useTablePlugin.js";function s(){const s="dateRendererPlugin";return u({name:s,vxe(n){n.interceptor.add("event.clearActived",i(r.DATE,(e=>e.classList.contains("n-date-panel")))),n.renderer.add(r.DATE,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:n,emitFormClick:t,row:r,column:i,$rowIndex:d})=>[e(m,o({value:r[i.field],"onUpdate:value":e=>r[i.field]=e,isStartDate:n.isStartDate,isEndDate:n.isEndDate,connectField:n.connectField,valueFormat:n.valueFormat},n.componentProps,{column:i,row:r,"row-index":d,onClick:t}),null)]))})},apply(e){e.eventHooks.onCellDblclick.tap(s,(({row:e,column:o,columnIndex:i,rowIndex:d,$rowIndex:m},u,{$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(t(null==(p=u.editConfig)?void 0:p.beforeEditMethod)){if(!(null==(v=u.editConfig)?void 0:v.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:d,$table:s,$grid:s})))return}const w=new Date;if(l(o,e,w))return;const D=e[o.field];e[o.field]=n(w,(null==(x=a(o))?void 0:x.valueFormat)||"yyyy-MM-dd HH:mm:ss"),c("formChange",{oldValue:D,index:d>-1?d:m,value:e[o.field],row:e,column:o,$table:s})}))}})}export{s as dateRendererPlugin};
|
|
@@ -141,9 +141,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
141
|
valueField: string;
|
|
142
142
|
placeholder: string;
|
|
143
143
|
deletable: boolean;
|
|
144
|
+
selectAll: boolean;
|
|
144
145
|
shouldSave: boolean;
|
|
145
146
|
consistentMenuWidth: boolean;
|
|
146
147
|
allowCreate: boolean;
|
|
147
|
-
selectAll: boolean;
|
|
148
148
|
}>;
|
|
149
149
|
export default _default;
|