cnhis-design-vue 3.1.53-hotfix.0 → 3.1.53-release.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
- package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
- package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
- package/es/components/button-print/src/utils/dialog.d.ts +2 -2
- package/es/components/button-print/src/utils/print.d.ts +14 -13
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +69 -6
- package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/form-config/index.d.ts +98 -26
- package/es/components/form-config/src/FormConfig.vue.d.ts +99 -27
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +30 -6
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +48 -12
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
- package/es/components/form-render/index.d.ts +30 -6
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +31 -7
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -7
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/index.js +1 -1
- package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
- package/es/components/form-render/src/components/renderer/{levelSearchCascader.d.ts → levelSearchCascader/index.d.ts} +3 -5
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -0
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +3 -2
- package/es/components/form-render/src/hooks/index.d.ts +0 -2
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
- package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +10 -2
- package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +9 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -5
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +4 -26
- package/es/components/form-render/src/types/index.d.ts +7 -14
- package/es/components/form-render/src/utils/index.d.ts +1 -2
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +2 -2
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/guide/src/renderer.js +1 -1
- package/es/components/iho-table/index.d.ts +39 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -0
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +4 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +552 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +4 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/wordbookSettingPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/wordbookSettingPlugin.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +7 -2
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
- package/es/components/iho-table/style/index.css +1 -1
- 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 +97 -29
- package/es/components/info-header/src/InfoHeader.vue.d.ts +98 -30
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +9 -5
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +10 -6
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +41 -13
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +30 -6
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/search-cascader/index.d.ts +23 -3
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +24 -4
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/search-cascader/src/components/ClearIcon.vue.js +1 -0
- package/es/components/shortcut-setter/index.d.ts +33 -9
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +34 -10
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
- package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
- package/es/shared/hooks/index.d.ts +3 -0
- package/es/shared/hooks/index.js +1 -1
- package/es/shared/hooks/selectHooks/index.d.ts +4 -0
- package/es/shared/hooks/selectHooks/index.js +1 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +10 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -0
- package/es/shared/hooks/selectHooks/useSearchContent.d.ts +6 -0
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -0
- package/es/shared/hooks/selectHooks/useSelectAllowModify.d.ts +23 -0
- package/es/shared/hooks/selectHooks/useSelectAllowModify.js +1 -0
- package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +19 -0
- package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -0
- package/es/shared/hooks/{useAsyncQueue.d.ts → useAsyncQueue/index.d.ts} +7 -15
- package/es/shared/hooks/useAsyncQueue/index.js +1 -0
- package/es/shared/hooks/useAsyncQueue/types.d.ts +20 -0
- package/es/shared/hooks/useAsyncQueue/types.js +1 -0
- package/es/shared/hooks/useDateTime.d.ts +2 -2
- package/es/shared/hooks/useFormRequest/index.d.ts +24 -0
- package/es/shared/hooks/useFormRequest/index.js +1 -0
- package/es/shared/hooks/useFormRequest/types.d.ts +39 -0
- package/es/shared/hooks/useFormRequest/types.js +1 -0
- package/es/shared/hooks/useLevelSearchCascader.d.ts +31 -0
- package/es/shared/hooks/useLevelSearchCascader.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +24 -0
- package/es/shared/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +0 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +0 -16
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +0 -1
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +0 -26
- package/es/components/form-render/src/hooks/useFormRequest.js +0 -1
- package/es/shared/hooks/useAsyncQueue.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../es/shared/types';
|
|
2
2
|
import { FormRenderExpose } from '../../../../es/components/form-render';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
4
4
|
formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
|
|
@@ -116,13 +116,17 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
116
116
|
lifeCycle: {
|
|
117
117
|
type: import("vue").PropType<Partial<{
|
|
118
118
|
onSetup(): void;
|
|
119
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
120
|
+
field: import("@formily/core").GeneralField;
|
|
121
|
+
oldValue: unknown;
|
|
122
|
+
}): any;
|
|
119
123
|
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
120
124
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
|
|
121
125
|
afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
|
|
122
126
|
}>>;
|
|
123
127
|
};
|
|
124
128
|
requestInstance: {
|
|
125
|
-
type: import("vue").PropType<import("
|
|
129
|
+
type: import("vue").PropType<import("../..").FormRequestDefine.RequestInstance>;
|
|
126
130
|
};
|
|
127
131
|
enterToNextWidget: {
|
|
128
132
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -261,13 +265,17 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
261
265
|
lifeCycle: {
|
|
262
266
|
type: import("vue").PropType<Partial<{
|
|
263
267
|
onSetup(): void;
|
|
268
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
269
|
+
field: import("@formily/core").GeneralField;
|
|
270
|
+
oldValue: unknown;
|
|
271
|
+
}): any;
|
|
264
272
|
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
265
273
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
|
|
266
274
|
afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
|
|
267
275
|
}>>;
|
|
268
276
|
};
|
|
269
277
|
requestInstance: {
|
|
270
|
-
type: import("vue").PropType<import("
|
|
278
|
+
type: import("vue").PropType<import("../..").FormRequestDefine.RequestInstance>;
|
|
271
279
|
};
|
|
272
280
|
enterToNextWidget: {
|
|
273
281
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -321,7 +329,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
321
329
|
changeContextCollector: import("../../../../es/components/form-render").ContextCollector;
|
|
322
330
|
formUUID: string;
|
|
323
331
|
anchorBarRef: import("vue").Ref<{
|
|
324
|
-
syncBarPosition:
|
|
332
|
+
syncBarPosition: AnyFn<any[], any>;
|
|
325
333
|
} | undefined>;
|
|
326
334
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
327
335
|
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
@@ -330,13 +338,21 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
330
338
|
title: string;
|
|
331
339
|
}[]>;
|
|
332
340
|
onScroll: (scrollEvent: Event) => void;
|
|
333
|
-
callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
341
|
+
callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
334
342
|
onSetup(): void;
|
|
343
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
344
|
+
field: import("@formily/core").GeneralField;
|
|
345
|
+
oldValue: unknown;
|
|
346
|
+
}): any;
|
|
335
347
|
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
336
348
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
|
|
337
349
|
afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
|
|
338
350
|
}>>[T]> | undefined) => import("../../../../es/shared/types").UndefinedAble<ReturnType<Required<Partial<{
|
|
339
351
|
onSetup(): void;
|
|
352
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
353
|
+
field: import("@formily/core").GeneralField;
|
|
354
|
+
oldValue: unknown;
|
|
355
|
+
}): any;
|
|
340
356
|
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
341
357
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
|
|
342
358
|
afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
|
|
@@ -429,12 +445,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
429
445
|
uuid: string;
|
|
430
446
|
lifeCycle: Partial<{
|
|
431
447
|
onSetup(): void;
|
|
448
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
449
|
+
field: import("@formily/core").GeneralField;
|
|
450
|
+
oldValue: unknown;
|
|
451
|
+
}): any;
|
|
432
452
|
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
433
453
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
|
|
434
454
|
afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
|
|
435
455
|
}>;
|
|
436
456
|
businessFormatter: import("../../../../es/components/form-render").FormBusinessFormatter;
|
|
437
|
-
requestInstance: import("
|
|
457
|
+
requestInstance: import("../..").FormRequestDefine.RequestInstance;
|
|
438
458
|
enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
|
|
439
459
|
lowCodeReactions: import("../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
440
460
|
linebarAutoHidden: boolean;
|
|
@@ -836,13 +856,17 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
836
856
|
lifeCycle: {
|
|
837
857
|
type: import("vue").PropType<Partial<{
|
|
838
858
|
onSetup(): void;
|
|
859
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
860
|
+
field: import("@formily/core").GeneralField;
|
|
861
|
+
oldValue: unknown;
|
|
862
|
+
}): any;
|
|
839
863
|
beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
|
|
840
864
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
|
|
841
865
|
afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
|
|
842
866
|
}>>;
|
|
843
867
|
};
|
|
844
868
|
requestInstance: {
|
|
845
|
-
type: import("vue").PropType<import("
|
|
869
|
+
type: import("vue").PropType<import("../..").FormRequestDefine.RequestInstance>;
|
|
846
870
|
};
|
|
847
871
|
enterToNextWidget: {
|
|
848
872
|
type: import("vue").PropType<boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void)>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,watch as r,inject as a,onBeforeUnmount as i,createVNode as m}from"vue";import{isObjectField as n}from"@formily/core";import{autorun as l}from"@formily/reactive";import{connect as s,RecursionField as u}from"@formily/vue";import{AddCircleOutline as p,RemoveCircle as c}from"@vicons/ionicons5";import{isNumber as d,isArray as f,isFunction as v,range as b}from"lodash-es";import{NButton as y,NIcon as h}from"naive-ui";import"../../../index.js";import{InjectionBusinessCollector as x}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"@formily/path";import"@vue/shared";import"@vueuse/core";import"date-fns";import{createObjSchema as
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,watch as r,inject as a,onBeforeUnmount as i,createVNode as m}from"vue";import{isObjectField as n}from"@formily/core";import{autorun as l}from"@formily/reactive";import{connect as s,RecursionField as u}from"@formily/vue";import{AddCircleOutline as p,RemoveCircle as c}from"@vicons/ionicons5";import{isNumber as d,isArray as f,isFunction as v,range as b}from"lodash-es";import{NButton as y,NIcon as h}from"naive-ui";import"../../../index.js";import{InjectionBusinessCollector as x,InjectionFormGlobalProps as _}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"@formily/path";import"@vue/shared";import"@vueuse/core";import"date-fns";import{createObjSchema as C}from"../../utils/schema.js";import{useFormField as j}from"../../hooks/useFormField.js";import{useFieldListAdaptor as k}from"../../hooks/useFieldListAdaptor.js";const F=s(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:s,fieldKey:F}=j(),I=o(1),N=t((()=>d(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));function A(){I.value++}r((()=>e.value),(e=>{f(e)&&(I.value=Math.min(Math.max(e.length,1),N.value))}),{immediate:!0});const D=a(x),G=a(_),{schemaAdaptor:g}=k(D,G.lifeCycle),B=o([]);return i(l((()=>{f(s.value.value)&&(B.value=s.value.value.map(((o,t)=>v(e.combinationItemDeletable)?e.combinationItemDeletable(o||{},t):e.combinationItemDeletable)))}))),()=>m("section",{class:"form-render__combination"},[m("header",{class:"form-render__combinationHeader"},[m("div",{class:"form-render__combinationHeaderText"},[e.title]),m(y,{onClick:A,text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:I.value>=N.value||e.disabled},{icon:()=>m(h,{component:p},null),default:()=>"新增"})]),b(I.value).map(((o,t)=>m("section",{class:"form-render__combinationContent"},[m(u,{schema:C(g(e.properties)),name:t},null),m(y,{text:!0,disabled:!B.value[t],type:"error",class:"form-render__combinationClose",onClick:()=>async function(e){if(I.value>1)I.value--,await s.value.remove(e);else{const o=s.value.query(`${F.value}.${e}`).take();if(!o||!n(o))return;await o.reset()}}(t)},{icon:()=>m(h,{component:c},null)})])))])}}));export{F as COMBINATION};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as s from"./combination.js";import*as t from"./complex.js";import*as o from"./date.js";import*as r from"./formItem.js";import*as m from"./input.js";import*as e from"./inputGroup.js";import*as
|
|
1
|
+
import*as s from"./combination.js";import*as t from"./complex.js";import*as o from"./date.js";import*as r from"./formItem.js";import*as m from"./input.js";import*as e from"./inputGroup.js";import*as i from"./inputNumber.js";import*as a from"./jsonCombination/index.js";import*as p from"./levelSearchCascader/index.js";import*as n from"./lineBar/index.js";import*as x from"./radio_checkbox.js";import*as c from"./remoteSearch.js";import*as f from"./searchCascade.js";import*as j from"./select.js";import*as d from"./simpleComponent.js";import*as l from"./slider.js";import*as u from"./switch.js";import*as h from"./textarea.js";import{separateMetaModule as b}from"../../../../../shared/utils/index.js";var C=b(Object.assign({"./combination.tsx":s,"./complex.tsx":t,"./date.tsx":o,"./formItem.tsx":r,"./input.tsx":m,"./inputGroup.ts":e,"./inputNumber.tsx":i,"./jsonCombination/index.tsx":a,"./levelSearchCascader/index.tsx":p,"./lineBar/index.ts":n,"./radio&checkbox.tsx":x,"./remoteSearch.tsx":c,"./searchCascade.tsx":f,"./select.tsx":j,"./simpleComponent.tsx":d,"./slider.tsx":l,"./switch.tsx":u,"./textarea.tsx":h}));export{C as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
export declare const INPUT_NUMBER: import("vue").DefineComponent<{
|
|
4
4
|
value: {
|
|
5
5
|
type: (NumberConstructor | StringConstructor)[];
|
|
6
6
|
};
|
|
7
7
|
onChange: {
|
|
8
|
-
type: PropType<
|
|
8
|
+
type: PropType<AnyFn<any[], any>>;
|
|
9
9
|
required: true;
|
|
10
10
|
};
|
|
11
11
|
prefix: {
|
|
@@ -19,7 +19,7 @@ export declare const INPUT_NUMBER: import("vue").DefineComponent<{
|
|
|
19
19
|
type: (NumberConstructor | StringConstructor)[];
|
|
20
20
|
};
|
|
21
21
|
onChange: {
|
|
22
|
-
type: PropType<
|
|
22
|
+
type: PropType<AnyFn<any[], any>>;
|
|
23
23
|
required: true;
|
|
24
24
|
};
|
|
25
25
|
prefix: {
|
|
@@ -34,7 +34,7 @@ export declare const INPUT_NUMBER_SLASH: import("vue").DefineComponent<{
|
|
|
34
34
|
type: (NumberConstructor | StringConstructor)[];
|
|
35
35
|
};
|
|
36
36
|
onChange: {
|
|
37
|
-
type: PropType<
|
|
37
|
+
type: PropType<AnyFn<any[], any>>;
|
|
38
38
|
required: true;
|
|
39
39
|
};
|
|
40
40
|
prefix: {
|
|
@@ -51,7 +51,7 @@ export declare const INPUT_NUMBER_SLASH: import("vue").DefineComponent<{
|
|
|
51
51
|
type: (NumberConstructor | StringConstructor)[];
|
|
52
52
|
};
|
|
53
53
|
onChange: {
|
|
54
|
-
type: PropType<
|
|
54
|
+
type: PropType<AnyFn<any[], any>>;
|
|
55
55
|
required: true;
|
|
56
56
|
};
|
|
57
57
|
prefix: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { AnyObject } from '
|
|
1
|
+
import { AnyObject } from '../../../../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
-
declare type ValueType = string | AnyObject[];
|
|
4
3
|
export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
5
4
|
options: {
|
|
6
5
|
type: PropType<AnyObject[]>;
|
|
@@ -54,7 +53,7 @@ export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
54
53
|
};
|
|
55
54
|
onChange: {};
|
|
56
55
|
value: {
|
|
57
|
-
type: PropType<
|
|
56
|
+
type: PropType<string | AnyObject[]>;
|
|
58
57
|
};
|
|
59
58
|
}, () => 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<{
|
|
60
59
|
options: {
|
|
@@ -109,7 +108,7 @@ export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
109
108
|
};
|
|
110
109
|
onChange: {};
|
|
111
110
|
value: {
|
|
112
|
-
type: PropType<
|
|
111
|
+
type: PropType<string | AnyObject[]>;
|
|
113
112
|
};
|
|
114
113
|
}>> & {
|
|
115
114
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -120,4 +119,3 @@ export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
120
119
|
lazyRequest: boolean;
|
|
121
120
|
requestCache: boolean;
|
|
122
121
|
}>;
|
|
123
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,inject as o,createVNode as t}from"vue";import a from"../../../../../../shared/components/no-data/NoData.vue.js";import"../../../../../../shared/utils/index.js";import"lodash-es";import"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import{useLevelSearchCascader as r}from"../../../../../../shared/hooks/useLevelSearchCascader.js";import"@vueuse/shared";import"../../../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{connect as s,mapProps as u}from"@formily/vue";import"../../../../index.js";import{InjectionAsyncQueue as i}from"../../../constants/index.js";import{useCommonInjection as l}from"../../../hooks/useCommonInjection.js";import n from"../../../../../search-cascader/index.js";import{assignUpdateValue as d}from"../../../utils/schema.js";import{useFormField as m}from"../../../hooks/useFormField.js";const p=s(e({name:"FormSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},onChange:{},value:{type:[String,Array]}},emits:["update:value"],setup(e,{emit:s}){const u=o(i),{field:d,fieldKey:p}=m(),{valueRef:c,labelKey:v,valueKey:f,optionsRef:h,showRef:y,fetchData:j,menuWidth:S,searchCascaderRef:g}=r(e,s,{fieldKey:p,asyncQueue:u,getRequestPayload:()=>({field:d.value})});function k(){S.value=150}const{injectValueValidate:C,injectValueBindKey:K}=l();C(c);const x=K(c);return()=>t(n,{ref:g,value:c.value,"onUpdate:value":e=>c.value=e,show:y.value,"onUpdate:show":e=>y.value=e,options:h.value,key:x.value,labelKey:v.value,valueKey:f.value,search:j,onFocus:k,menuWidth:S.value},{empty:()=>t(a,null,null)})}}),u({dataSource:"options"},d));export{p as LEVEL_SEARCH_CASCADER};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject,
|
|
1
|
+
import { AnyObject, AnyFn } from '../../../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
import { UrlConfig } from '../../../../../../es/components/form-render';
|
|
4
4
|
export declare const SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
@@ -21,7 +21,7 @@ export declare const SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
21
21
|
default: boolean;
|
|
22
22
|
};
|
|
23
23
|
onFocus: {
|
|
24
|
-
type: PropType<
|
|
24
|
+
type: PropType<AnyFn<any[], any>>;
|
|
25
25
|
};
|
|
26
26
|
filterable: {
|
|
27
27
|
type: BooleanConstructor;
|
|
@@ -61,7 +61,7 @@ export declare const SEARCH_CASCADER: import("vue").DefineComponent<{
|
|
|
61
61
|
default: boolean;
|
|
62
62
|
};
|
|
63
63
|
onFocus: {
|
|
64
|
-
type: PropType<
|
|
64
|
+
type: PropType<AnyFn<any[], any>>;
|
|
65
65
|
};
|
|
66
66
|
filterable: {
|
|
67
67
|
type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{connect as u,mapProps as i}from"@formily/vue";import{isEqual as s,isArray as c,isString as p}from"lodash-es";import{NCascader as d}from"naive-ui";import"../../../index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as v,InjectionFormUUID as f}from"../../constants/index.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 y,createVisitedSetter as h,traverseDependKey as k}from"../../utils/schema.js";import{useFormField as j}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"
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{connect as u,mapProps as i}from"@formily/vue";import{isEqual as s,isArray as c,isString as p}from"lodash-es";import{NCascader as d}from"naive-ui";import"../../../index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as v,InjectionFormUUID as f}from"../../constants/index.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 y,createVisitedSetter as h,traverseDependKey as k}from"../../utils/schema.js";import{useFormField as j}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"@vueuse/shared";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import"./index.js";const g=u(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},checkStrategy:{type:String,default:"child"},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:u,emit:i}){const y=t(),{field:g,title:b}=j(),S=t(1),C=t(!0);const w=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),F=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),A=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");if(!Array.isArray(t)||!t.length)return null;const a=t.map((e=>e[F.value])).slice(-1).join(""),l=t.map((e=>e[w.value])).join(" / ");return a||l}catch(e){return null}}));function H(e,t,a){i("update:value",c(a)?a.map((function(e){return{...e,label:e[w.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const q=l(v);async function x(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await q.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:b.value,cache:e.requestCache,payload:{field:g.value,labelKey:w.value,valueKey:F.value}});function a(e,t,r){const o=[...r,...l(e)],n={[w.value]:e[w.value],[F.value]:e[F.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:o};return c(e.children)&&(n.children=e.children.map((e=>a(e,t+1,o))),n.isLeaf=!e.children.length),S.value=Math.max(S.value,t+1),n}function l(e){let t=[];if(p(e[w.value])&&(t=[...t,e[w.value]]),p(e.keyword)&&e.keyword.length>0){const a=e.keyword.split(",");t=[...t,...a]}return t}y.value=t.map((e=>a(e,0,[])))}():await async function(t){if(r(e,t))return;const a=await q.addAsync(o(s(t),i(e),b.value,t));if(!a.length&&t)return t.isLeaf=!0,H(0,0,n(t)),void(W.value=!1);const l=a.map((e=>u(e,s(t))));function r(e,t){return!i(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&k(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function u(a,l){return{[w.value]:a[w.value],[F.value]:a[F.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function i(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:y.value=l}(t),await B()}const V=`form-render__cascade--menu-${l(f)}`;async function B(){await n();const e=document.querySelector(`.${V} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function K(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;return!(e.checkStrategy.includes("child")&&a.depth<S.value)&&(l.length>0&&l.some((e=>e.includes(t.trim()))))}const{injectValueValidate:L,injectValueWatchFromEmpty:I,injectValueBindKey:E}=m();I((()=>e.value),x),L((()=>e.value)),r((()=>e.urlConfig),(async(t,a)=>{s(t,a)||(y.value=null,C.value?e.lazyRequest||(x(),C.value=!C.value):await x())}),{immediate:!0});const W=t(!1);function z(e){W.value=!!e,e&&x()}const N=a((()=>y.value||e.options||[])),O=a((()=>!e.filterable)),P=E(A);return()=>o(d,{key:P.value,remote:O.value,filterable:e.filterable,"menu-props":{class:V,onClick:B},"check-strategy":e.checkStrategy,show:!!W.value,"onUpdate:show":z,value:A.value,filter:K,"onUpdate:value":H,labelField:w.value,valueField:F.value,options:N.value,onLoad:x,onFocus:h(g)},u)}}),i({dataSource:"options"},y));export{g as SEARCH_CASCADER};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { FormRequestDefine } from '../../../../../../es/shared/hooks';
|
|
1
2
|
import { AnyObject, ArrayAble } from '../../../../../../es/shared/types';
|
|
3
|
+
import { PropType } from 'vue';
|
|
2
4
|
import { RecommendItem } from '../../../../../../es/components/recommend-search/src/types';
|
|
3
|
-
import { RecommendIds } from '../../hooks';
|
|
4
5
|
import { UrlConfig } from '../../types';
|
|
5
|
-
import { PropType } from 'vue';
|
|
6
6
|
export declare const SELECT: import("vue").DefineComponent<{
|
|
7
7
|
value: {
|
|
8
8
|
type: PropType<ArrayAble<string | number> | null>;
|
|
@@ -81,7 +81,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
81
81
|
type: PropType<RecommendItem[]>;
|
|
82
82
|
};
|
|
83
83
|
getRecommendInfo: {
|
|
84
|
-
type: PropType<() => RecommendIds>;
|
|
84
|
+
type: PropType<() => FormRequestDefine.RecommendIds>;
|
|
85
85
|
};
|
|
86
86
|
commonNum: {
|
|
87
87
|
type: NumberConstructor;
|
|
@@ -187,7 +187,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
187
187
|
type: PropType<RecommendItem[]>;
|
|
188
188
|
};
|
|
189
189
|
getRecommendInfo: {
|
|
190
|
-
type: PropType<() => RecommendIds>;
|
|
190
|
+
type: PropType<() => FormRequestDefine.RecommendIds>;
|
|
191
191
|
};
|
|
192
192
|
commonNum: {
|
|
193
193
|
type: NumberConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as
|
|
1
|
+
import{defineComponent as e,computed as o,inject as t,useAttrs as l,ref as a,createVNode as r,mergeProps as s,toRaw as n}from"vue";import{arrayed as u}from"../../../../../shared/utils/index.js";import{cloneDeep as i,isArray as p,isObject as m,omit as d,xor as c}from"lodash-es";import{NSelect as f}from"naive-ui";import"@vueuse/core";import"date-fns";import"@vue/shared";import{useSelectAllowModify as y}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as v}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{connect as h,mapProps as b}from"@formily/vue";import{useCommonInjection as j,useSelectOptionProps as S}from"../../hooks/useCommonInjection.js";import{useComplexOptions as k,useComplexOptionsSpan as g}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as C,InjectionFormUUID as B}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import{assignUpdateValue as F,assignClearBindVisited as A,createVisitedSetter as w}from"../../utils/schema.js";import{useFormField as H}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"./index.js";import{useUrlConfigOptions as O,useAutographOptions as K,useRecommendOptions as x}from"../../hooks/useFormRenderOptions.js";const R=h(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:b}){const F=o({get:()=>e.value,async set(e){b("update:value",e),D(e)}}),{labelKey:A,valueKey:R,showKey:V,fetchData:L,searchContent:P,fullOptions:_,filterOptions:N,remoteOptions:I,loading:W}=e.urlConfig?O(e,F):K(e,F),{modifyEvent:E,modifyAbleRef:q,getOptionsWithCreated:M}=y(e,{searchContent:P,labelKey:A,valueKey:R,valueRef:F,fullOptions:_}),{renderComplexOption:T,hasComplexOption:U}=k(e,F),{getRecommend:z,postRecommend:D,sortedOptions:G}=x(e,N,b,A,R),{field:J,fieldKey:Q}=H();t(C).setContext(Q.value,(e=>({currentOption:i(function(e){const o=M(_.value);return p(e)?function(e){const t=o.reduce(((e,o)=>(e[o[R.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[R.value]===t)));var t}(e))})));const X=async(e="")=>(P.value=e,Promise.allSettled([L(e),z(e)])),{injectValueValidate:Y,injectValueWatchFromEmpty:Z,injectValueBindKey:$}=j();Z(F,X),Y(F);const ee=$(F),{menuProps:oe,nodeProps:te}=S(),{renderTag:le,renderLabel:ae,renderSelectAll:re,titleRef:se}=v(e,{labelKey:A,showKey:V,searchContent:P}),ne=o((()=>M(q.value?_.value:G.value))),ue=l(),ie=o((()=>{if(e.allowCreate||e.showCustomValue)return F.value;const o=e.multiple&&p(F.value);return _.value.find((e=>o?F.value.includes(e[R.value]):e[R.value]===F.value))?F.value:null})),pe=a(!1);async function me(e){e&&await X(),pe.value=e}async function de(e,o){await E.updateValue(e,o),I.value&&o&&u(o).forEach((e=>{if(!m(e))return;const o=e;o.created&&o.shouldSave&&I.value.push(d(n(o),["created","shouldSave"]))}))}const ce=t(B),{getSpan:fe}=g(),ye=w(J,E.focus);function ve(o){if(!e.multiple)return;const t=o?ne.value.map((e=>e[R.value])):[];c(t,e.value).length&&(F.value=t)}function he(o){let t=h;return e.multiple&&e.selectAll&&(t={action:()=>re(ve),...h}),r(f,s({title:se.value,key:ee.value,multiple:e.multiple,remote:!0,filterable:!0,loading:W.value,value:ie.value,onUpdateValue:de,"menu-props":oe,"node-props":te,labelField:A.value,valueField:R.value,options:ne.value,onSearch:X,show:pe.value,"onUpdate:show":me,onFocus:ye,onBlur:E.blur,renderLabel:ae,renderTag:le},o,ue),t)}return()=>{var e,o;if(!U.value)return he();const t=null!=(o=null==(e=J.value.decoratorProps)?void 0:e.span)?o:6,l=fe(ce,J.value.address);return r("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[he({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),_.value.map((e=>T({option:e,value:F.value,valueKey:R.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},F,A));export{R as SELECT};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { FormRequestDefine } from '../../../../../es/shared/hooks';
|
|
1
2
|
import { Nullable } from '../../../../../es/shared/types';
|
|
2
3
|
import { GeneralField } from '@formily/core';
|
|
3
4
|
import { AnnotationItem } from '../../../../../es/components/annotation-edit/src/type';
|
|
4
5
|
import { ContextCollector } from '../../../../../es/components/form-render/src/hooks/useChangeContext';
|
|
5
6
|
import { useFormRenderLifeCycle } from '../../../../../es/components/form-render/src/hooks/useFormRenderLifeCycle';
|
|
6
7
|
import { BusinessCollector, FormItemDepsCollector } from '../hooks';
|
|
7
|
-
import {
|
|
8
|
+
import { FormRenderProps } from '../types';
|
|
8
9
|
import { Component, InjectionKey, WritableComputedRef } from 'vue';
|
|
9
|
-
export declare const InjectionAsyncQueue: InjectionKey<FormAsyncQueue>;
|
|
10
|
+
export declare const InjectionAsyncQueue: InjectionKey<FormRequestDefine.FormAsyncQueue>;
|
|
10
11
|
export declare const InjectionSchemaField: InjectionKey<Component>;
|
|
11
12
|
export declare const InjectionBusinessCollector: InjectionKey<BusinessCollector>;
|
|
12
13
|
export declare const InjectionChangeContextCollector: InjectionKey<ContextCollector>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './useFieldListAdaptor';
|
|
2
|
-
export * from './useFormRequest';
|
|
3
2
|
export * from './useCommonLog';
|
|
4
3
|
export * from './useFormField';
|
|
5
|
-
export * from './useFormAsyncQueue';
|
|
6
4
|
export * from './useFieldVisitor';
|
|
7
5
|
export * from './useFieldNormalize';
|
|
8
6
|
export * from './useFormValidator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{
|
|
1
|
+
export{useFieldListAdaptor}from"./useFieldListAdaptor.js";export{useCommonLog}from"./useCommonLog.js";export{useFormField}from"./useFormField.js";export{useFieldVisitor}from"./useFieldVisitor.js";export{useFieldNormalize}from"./useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./useFormItemDeps.js";export{useAnchor}from"./useAnchor.js";export{useFormContext}from"./useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./useCommonInjection.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./useFormRenderOptions.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn, UndefinedAble } from '../../../../../es/shared/types';
|
|
2
2
|
import { Form, GeneralField } from '@formily/core';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
import { FormItemDepsCollector, FormRenderProps } from '../../../../../es/components/form-render';
|
|
5
|
-
export declare function useAnchor(props: Readonly<FormRenderProps>, emit:
|
|
5
|
+
export declare function useAnchor(props: Readonly<FormRenderProps>, emit: AnyFn, scrollbarRef: Ref<UndefinedAble<HTMLElement>>, collector: FormItemDepsCollector): {
|
|
6
6
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
7
7
|
onScroll: (scrollEvent: Event) => void;
|
|
8
8
|
anchorIdList: Ref<{
|
|
@@ -13,6 +13,6 @@ export declare function useAnchor(props: Readonly<FormRenderProps>, emit: Func,
|
|
|
13
13
|
updateAnchorList: (field: GeneralField) => void;
|
|
14
14
|
scrollTo: (id: string) => Promise<void>;
|
|
15
15
|
anchorBarRef: Ref<{
|
|
16
|
-
syncBarPosition:
|
|
16
|
+
syncBarPosition: AnyFn;
|
|
17
17
|
} | undefined>;
|
|
18
18
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../../es/shared/types';
|
|
2
2
|
import { WatchSource } from '@vue/runtime-core';
|
|
3
3
|
export declare function useCommonInjection(): {
|
|
4
4
|
injectValueValidate: (traverser: WatchSource) => void;
|
|
5
|
-
injectValueWatchFromEmpty: (traverser: WatchSource, trigger:
|
|
5
|
+
injectValueWatchFromEmpty: (traverser: WatchSource, trigger: AnyFn) => void;
|
|
6
6
|
injectValueBindKey: (traverser: WatchSource) => import("vue").Ref<number>;
|
|
7
7
|
};
|
|
8
8
|
export declare function useSelectOptionProps(): {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BusinessCollector, FormRenderProps } from '../../../../../es/components/form-render';
|
|
1
|
+
import { BusinessCollector, FormRenderProps, FormRenderLifeCycle } from '../../../../../es/components/form-render';
|
|
2
2
|
import { FieldItem } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* @description 胶水层, 将低代码平台中的fieldList转换为JSONSchema
|
|
5
5
|
*/
|
|
6
|
-
export declare function useFieldListAdaptor(collector?: BusinessCollector): {
|
|
6
|
+
export declare function useFieldListAdaptor(collector?: BusinessCollector, hooks?: FormRenderLifeCycle): {
|
|
7
7
|
schemaAdaptor: (fieldList: FieldItem[], options?: FormRenderProps) => Record<string, import("@formily/json-schema/esm/types").Stringify<{
|
|
8
8
|
[key: symbol]: any;
|
|
9
9
|
[key: `x-${string}`]: any;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 l}from"date-fns";import{useFieldNormalize as s}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,x){const{createValidatorSchema:_}=c(),h=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,beforeSetValue:null==x?void 0:x.beforeSetValue,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=_(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},g=e=>{var o,t,r,l,s,a,p;const c=h(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!=(s=e.show_key)?s:null==(l=e.componentProps)?void 0:l.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},y=e=>{var o,t;const n=h(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},b=e=>{const t=h(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}}),w=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=h(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=h(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=h(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",g],["REMOTE_SEARCH",g],["DATE",e=>{const o=h(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=l(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=h(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=h(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=h(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",y],["CHECKBOX",y],["SWITCH",e=>{const o=h(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=h(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=h(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?E(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}]]),C=e=>{if(e.suffixConfig)return A(e);return(w.get(e.html_type)||b)(e)},A=o=>{if(!o.suffixConfig&&!o.prefixConfig)return C(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=h(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:E(n)}),i},{FieldNormalizeWaterfallHook:O,FieldListNormalizeWaterfallHook:j}=s();function E(o,n={column:9999}){let i=null;return j.call(t(o),n).reduce(((e,o,s)=>{var a;const p=null==(a=(o=O.call(o,n)).validate)?void 0:a.obj_type;return p&&f&&f.collect(p,t(o)),"LINEBAR"===o.html_type?(e[l(o)]=r(v(o),s),i=e[l(o)].properties={}):i?i[l(o)]=r(C(o),s):(i=null,e[l(o)]=r(C(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function l(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:E}}export{f as useFieldListAdaptor};
|
|
@@ -73,12 +73,16 @@ export declare function useFieldNormalize(): {
|
|
|
73
73
|
uuid: string;
|
|
74
74
|
lifeCycle: Partial<{
|
|
75
75
|
onSetup(): void;
|
|
76
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
77
|
+
field: import("@formily/core").GeneralField;
|
|
78
|
+
oldValue: unknown;
|
|
79
|
+
}): any;
|
|
76
80
|
beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../es/shared/types").UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
|
|
77
81
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
|
|
78
82
|
afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
|
|
79
83
|
}>;
|
|
80
84
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
81
|
-
requestInstance: import("
|
|
85
|
+
requestInstance: import("../../..").FormRequestDefine.RequestInstance;
|
|
82
86
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
83
87
|
lowCodeReactions: import("../../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
84
88
|
linebarAutoHidden: boolean;
|
|
@@ -160,12 +164,16 @@ export declare function useFieldNormalize(): {
|
|
|
160
164
|
uuid: string;
|
|
161
165
|
lifeCycle: Partial<{
|
|
162
166
|
onSetup(): void;
|
|
167
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
168
|
+
field: import("@formily/core").GeneralField;
|
|
169
|
+
oldValue: unknown;
|
|
170
|
+
}): any;
|
|
163
171
|
beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../es/shared/types").UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
|
|
164
172
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
|
|
165
173
|
afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
|
|
166
174
|
}>;
|
|
167
175
|
businessFormatter: import("../types").FormBusinessFormatter;
|
|
168
|
-
requestInstance: import("
|
|
176
|
+
requestInstance: import("../../..").FormRequestDefine.RequestInstance;
|
|
169
177
|
enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
|
|
170
178
|
lowCodeReactions: import("../../../../../es/shared/types").FormLowCodeReactions.Config[];
|
|
171
179
|
linebarAutoHidden: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../../es/shared/types';
|
|
2
2
|
import { ShallowReactive } from 'vue';
|
|
3
3
|
import { FormRenderProps } from '../../../../../es/components/form-render';
|
|
4
|
-
export declare function useFormContext(props: ShallowReactive<FormRenderProps>, emit:
|
|
5
|
-
asyncQueue: import("
|
|
4
|
+
export declare function useFormContext(props: ShallowReactive<FormRenderProps>, emit: AnyFn): {
|
|
5
|
+
asyncQueue: import("../../../../../es/shared/hooks").AsyncQueue<import("../../../../../es/shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
|
|
6
6
|
label: string;
|
|
7
7
|
value: unknown;
|
|
8
8
|
}[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{uuidGenerator as e}from"../../../../shared/utils/index.js";import{
|
|
1
|
+
import{uuidGenerator as e}from"../../../../shared/utils/index.js";import"lodash-es";import"naive-ui";import{computed as o,provide as t,readonly as r}from"vue";import"@vueuse/core";import"date-fns";import{useFormAsyncQueue as s,presetRequestHandler as n}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{createSchemaField as i}from"@formily/vue";import{isObject as a}from"@vue/shared";import"../../index.js";import m from"../components/renderer/index.js";import{InjectionAsyncQueue as u,InjectionSchemaField as c,InjectionBusinessCollector as p,InjectionChangeContextCollector as l,InjectionFormItemDepsCollector as f,InjectionFormUUID as d,InjectionAnnotation as h,InjectionFormGlobalProps as j}from"../constants/index.js";import{useFormRenderLifeCycle as C}from"./useFormRenderLifeCycle.js";import{usePresetScope as v}from"./usePresetScope.js";import{useBusinessBinding as x}from"./useBusinessBinding.js";import{useChangeContext as y}from"./useChangeContext.js";import{useFormItemDeps as q}from"./useFormItemDeps.js";function g(g,F){const{callLifeCycle:R}=C(g),b=s(o((()=>g.requestInstance)),o((()=>!!g.uniqueCacheData))).create(g.parallelism,{beforeRequest:(...e)=>R("beforeRequest",e)||e[1],afterRequest:(...e)=>R("afterRequest",e)||n(e[1])});t(u,b);const D=i({components:{...m,...g.components},scope:Object.assign({},v(),g.scope)}).SchemaField;t(c,D);const I=x().create(g.businessFormatter);t(p,I);const S=y().create();t(l,S);const k=q().create();t(f,k);const B=g.uuid||e();return t(d,B),t(h,o({get:()=>g.annotation?r(g.annotation):null,set(e){if(!a(g.annotation)||!a(e))return;const o=g.annotation[e.property];g.annotation[e.property]=e.value,F("annotationChange",{fieldKey:e.property,value:e.value,oldValue:o})}})),t(j,g),{asyncQueue:b,SchemaField:D,businessCollector:I,changeContextCollector:S,formItemDepsCollector:k,formUUID:B}}export{g as useFormContext};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyFn } from '../../../../../es/shared/types';
|
|
2
2
|
import { DependKeyType } from '../../../../../es/components/form-render';
|
|
3
3
|
export declare class FormItemDepsCollector {
|
|
4
4
|
triggerDisabled: boolean;
|
|
5
5
|
private readonly collector;
|
|
6
|
-
setDeps(key: string, dependKeys: DependKeyType, callback:
|
|
7
|
-
getDeps(dependKey: string): Map<string,
|
|
6
|
+
setDeps(key: string, dependKeys: DependKeyType, callback: AnyFn): void;
|
|
7
|
+
getDeps(dependKey: string): Map<string, AnyFn<any[], any>> | undefined;
|
|
8
8
|
trigger(dependKey: string, payload?: unknown): void;
|
|
9
9
|
}
|
|
10
10
|
export declare function useFormItemDeps(): {
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { UndefinedAble } from '../../../../../es/shared/types';
|
|
2
2
|
import { FormRenderLifeCycle, FormRenderProps } from '../../../../../es/components/form-render';
|
|
3
3
|
export declare function useFormRenderLifeCycle(props: FormRenderProps): {
|
|
4
|
-
callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
4
|
+
callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
5
5
|
onSetup(): void;
|
|
6
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
7
|
+
field: import("@formily/core").GeneralField;
|
|
8
|
+
oldValue: unknown;
|
|
9
|
+
}): any;
|
|
6
10
|
beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
|
|
7
11
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
|
|
8
12
|
afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
|
|
9
13
|
}>>[T]> | undefined) => UndefinedAble<ReturnType<Required<Partial<{
|
|
10
14
|
onSetup(): void;
|
|
15
|
+
beforeSetValue(fieldKey: string, value: unknown, payload: {
|
|
16
|
+
field: import("@formily/core").GeneralField;
|
|
17
|
+
oldValue: unknown;
|
|
18
|
+
}): any;
|
|
11
19
|
beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
|
|
12
20
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
|
|
13
21
|
afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
|