cnhis-design-vue 3.1.55-beta.5 → 3.1.55-release.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/body-select/src/hooks/renderCanvas.js +1 -1
- package/es/components/body-select/src/index.vue2.js +1 -1
- package/es/components/button-print/index.d.ts +0 -13
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +0 -13
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +6 -26
- package/es/components/classification/index.d.ts +1 -486
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +1 -473
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +1 -473
- package/es/components/classification/src/index.vue.d.ts +1 -486
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/fabric-chart/index.d.ts +0 -1
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +0 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/constants/index.d.ts +0 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +0 -5
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +3 -3
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/form-config/index.d.ts +57 -104
- package/es/components/form-config/src/FormConfig.vue.d.ts +57 -104
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +6 -26
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +21 -44
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +5 -5
- package/es/components/form-render/index.d.ts +6 -26
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +6 -26
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +6 -26
- package/es/components/form-render/src/components/renderer/complex.js +1 -1
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/components/renderer/textarea.js +1 -1
- package/es/components/form-render/src/constants/index.d.ts +1 -0
- package/es/components/form-render/src/constants/index.js +1 -1
- package/es/components/form-render/src/hooks/index.d.ts +9 -20
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +3 -14
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +4 -4
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +10 -11
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/useOperationalForm.d.ts +2 -3
- package/es/components/form-render/src/hooks/useOperationalForm.js +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
- package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +4 -13
- package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +0 -1
- package/es/components/form-render/src/types/index.d.ts +5 -10
- package/es/components/form-render/src/utils/index.d.ts +16 -3
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +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/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +3 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +0 -2
- package/es/components/iho-table/src/utils/index.d.ts +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -3
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +12 -52
- package/es/components/info-header/src/InfoHeader.vue.d.ts +12 -52
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +6 -26
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +6 -26
- package/es/components/{biunique-chat → multi-chat}/index.d.ts +2 -2
- package/es/components/multi-chat/index.js +1 -0
- package/es/components/multi-chat/src/MultiChat.vue.js +1 -0
- package/es/components/multi-chat/src/MultiChat.vue2.js +1 -0
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +11 -32
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +11 -32
- package/es/components/table-filter/src/constants/index.d.ts +0 -1
- package/es/components/table-filter/src/constants/index.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.d.ts +0 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -3
- package/es/components/audio-sdk/index.d.ts +0 -2
- package/es/components/audio-sdk/index.js +0 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +0 -24
- package/es/components/audio-sdk/src/audioSDK.js +0 -1
- package/es/components/audio-sdk/src/components/recordingDialog.vue.d.ts +0 -26
- package/es/components/audio-sdk/src/components/recordingDialog.vue.js +0 -1
- package/es/components/audio-sdk/src/components/recordingDialog.vue2.js +0 -1
- package/es/components/audio-sdk/src/utils/recordingDialog.d.ts +0 -8
- package/es/components/audio-sdk/src/utils/recordingDialog.js +0 -1
- package/es/components/audio-sdk/style/index.css +0 -1
- package/es/components/biunique-chat/index.js +0 -1
- package/es/components/biunique-chat/src/BiuniqueChat.vue.js +0 -1
- package/es/components/biunique-chat/src/BiuniqueChat.vue2.js +0 -1
- package/es/components/iho-table/src/plugins/colorAndIconPlugin.d.ts +0 -1
- package/es/components/iho-table/src/plugins/colorAndIconPlugin.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +0 -320
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +0 -127
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue2.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.d.ts +0 -41
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/InputFilter.vue2.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.d.ts +0 -28
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/InputNumber.vue2.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +0 -51
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue2.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +0 -244
- package/es/components/table-filter/src/components/bi-filter/components/index.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/helpers/options.d.ts +0 -14
- package/es/components/table-filter/src/components/bi-filter/helpers/options.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.d.ts +0 -13
- package/es/components/table-filter/src/components/bi-filter/hooks/useBiConditions.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +0 -474
- package/es/components/table-filter/src/components/bi-filter/index.vue.js +0 -1
- package/es/components/table-filter/src/components/bi-filter/index.vue2.js +0 -1
- /package/es/components/{biunique-chat/src/BiuniqueChat.vue.d.ts → multi-chat/src/MultiChat.vue.d.ts} +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/api/index.d.ts +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/api/index.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatFooter.vue.d.ts +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatFooter.vue.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatFooter.vue2.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatHeader.vue.d.ts +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatHeader.vue.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatHeader.vue2.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatMain.vue.d.ts +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatMain.vue.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/ChatMain.vue2.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/SiderList.vue.d.ts +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/SiderList.vue.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/components/SiderList.vue2.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/utils/chatSock.d.ts +0 -0
- /package/es/components/{biunique-chat → multi-chat}/src/utils/chatSock.js +0 -0
- /package/es/components/{biunique-chat → multi-chat}/style/index.css +0 -0
|
@@ -143,10 +143,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
143
143
|
dateOperationalForm: {
|
|
144
144
|
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
145
145
|
};
|
|
146
|
-
operationalFormInit: {
|
|
147
|
-
type: BooleanConstructor;
|
|
148
|
-
default: boolean;
|
|
149
|
-
};
|
|
150
146
|
linebarAutoHidden: {
|
|
151
147
|
type: BooleanConstructor;
|
|
152
148
|
};
|
|
@@ -299,10 +295,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
299
295
|
dateOperationalForm: {
|
|
300
296
|
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
301
297
|
};
|
|
302
|
-
operationalFormInit: {
|
|
303
|
-
type: BooleanConstructor;
|
|
304
|
-
default: boolean;
|
|
305
|
-
};
|
|
306
298
|
linebarAutoHidden: {
|
|
307
299
|
type: BooleanConstructor;
|
|
308
300
|
};
|
|
@@ -383,12 +375,12 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
383
375
|
}>;
|
|
384
376
|
lowCodeReactionsHandler: (field: string) => void;
|
|
385
377
|
triggerAllReactionsHandler: () => void;
|
|
386
|
-
operationalFormHandler:
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
378
|
+
operationalFormHandler: (fieldKey: string) => void;
|
|
379
|
+
triggerAllOperationalFormHandler: () => void;
|
|
380
|
+
wordbookSettingHandler: {
|
|
381
|
+
trigger: (fieldKey: string, value: unknown) => void;
|
|
382
|
+
setDisabled: (value: boolean) => void;
|
|
390
383
|
};
|
|
391
|
-
wordbookSettingHandler: import("./src/hooks").wordbookSettingHandler;
|
|
392
384
|
schemaAdaptor: (fieldList: import("./src/types").FieldItem[], options?: Partial<{
|
|
393
385
|
fieldList: import("./src/types").FieldItem[];
|
|
394
386
|
initialData: import("../../../es/shared/types").AnyObject;
|
|
@@ -601,14 +593,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
601
593
|
force?: boolean | undefined;
|
|
602
594
|
}): Promise<void>;
|
|
603
595
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
604
|
-
setFormValues(values: import("../../../es/shared/types").AnyObject,
|
|
605
|
-
needSplitExtendKey?: boolean | undefined;
|
|
606
|
-
avoidBusinessConnection?: string | boolean | undefined;
|
|
607
|
-
avoidDependKeyConnection?: string | boolean | undefined;
|
|
608
|
-
avoidWordbookSettingConnection?: string | boolean | undefined;
|
|
609
|
-
avoidOperationalFormConnection?: string | boolean | undefined;
|
|
610
|
-
overwrite?: boolean | undefined;
|
|
611
|
-
}, avoidBusinessConnection?: string | boolean, overwrite?: boolean): Promise<void>;
|
|
596
|
+
setFormValues(values: import("../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
612
597
|
setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
613
598
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
614
599
|
validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
|
|
@@ -905,10 +890,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
905
890
|
dateOperationalForm: {
|
|
906
891
|
type: import("vue").PropType<import("../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
907
892
|
};
|
|
908
|
-
operationalFormInit: {
|
|
909
|
-
type: BooleanConstructor;
|
|
910
|
-
default: boolean;
|
|
911
|
-
};
|
|
912
893
|
linebarAutoHidden: {
|
|
913
894
|
type: BooleanConstructor;
|
|
914
895
|
};
|
|
@@ -944,7 +925,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
944
925
|
bordered: string | boolean;
|
|
945
926
|
uniqueCacheData: boolean;
|
|
946
927
|
outBordered: boolean;
|
|
947
|
-
operationalFormInit: boolean;
|
|
948
928
|
}>;
|
|
949
929
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
950
930
|
export default FormRender;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as
|
|
1
|
+
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as s}from"../../shared/utils/index.js";import r from"./src/FormRenderWrapper.vue.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useFormField}from"./src/hooks/useFormField.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,mergeDeepProperties,parseNumberFromMaybeString,renderDescOption,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./src/utils/schema.js";const o=r;o.install=function(r){s(r,o,e+"FormRender")};export{o as default};
|
|
@@ -138,10 +138,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
138
138
|
dateOperationalForm: {
|
|
139
139
|
type: PropType<LowCodeTypes.dateOperationalConfig[]>;
|
|
140
140
|
};
|
|
141
|
-
operationalFormInit: {
|
|
142
|
-
type: BooleanConstructor;
|
|
143
|
-
default: boolean;
|
|
144
|
-
};
|
|
145
141
|
linebarAutoHidden: {
|
|
146
142
|
type: BooleanConstructor;
|
|
147
143
|
};
|
|
@@ -294,10 +290,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
294
290
|
dateOperationalForm: {
|
|
295
291
|
type: PropType<LowCodeTypes.dateOperationalConfig[]>;
|
|
296
292
|
};
|
|
297
|
-
operationalFormInit: {
|
|
298
|
-
type: BooleanConstructor;
|
|
299
|
-
default: boolean;
|
|
300
|
-
};
|
|
301
293
|
linebarAutoHidden: {
|
|
302
294
|
type: BooleanConstructor;
|
|
303
295
|
};
|
|
@@ -378,12 +370,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
378
370
|
}>;
|
|
379
371
|
lowCodeReactionsHandler: (field: string) => void;
|
|
380
372
|
triggerAllReactionsHandler: () => void;
|
|
381
|
-
operationalFormHandler:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
373
|
+
operationalFormHandler: (fieldKey: string) => void;
|
|
374
|
+
triggerAllOperationalFormHandler: () => void;
|
|
375
|
+
wordbookSettingHandler: {
|
|
376
|
+
trigger: (fieldKey: string, value: unknown) => void;
|
|
377
|
+
setDisabled: (value: boolean) => void;
|
|
385
378
|
};
|
|
386
|
-
wordbookSettingHandler: import("./hooks").wordbookSettingHandler;
|
|
387
379
|
schemaAdaptor: (fieldList: FieldItem[], options?: Partial<{
|
|
388
380
|
fieldList: FieldItem[];
|
|
389
381
|
initialData: AnyObject;
|
|
@@ -596,14 +588,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
596
588
|
force?: boolean | undefined;
|
|
597
589
|
}): Promise<void>;
|
|
598
590
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
599
|
-
setFormValues(values: AnyObject,
|
|
600
|
-
needSplitExtendKey?: boolean | undefined;
|
|
601
|
-
avoidBusinessConnection?: string | boolean | undefined;
|
|
602
|
-
avoidDependKeyConnection?: string | boolean | undefined;
|
|
603
|
-
avoidWordbookSettingConnection?: string | boolean | undefined;
|
|
604
|
-
avoidOperationalFormConnection?: string | boolean | undefined;
|
|
605
|
-
overwrite?: boolean | undefined;
|
|
606
|
-
}, avoidBusinessConnection?: string | boolean, overwrite?: boolean): Promise<void>;
|
|
591
|
+
setFormValues(values: AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
607
592
|
setFieldState(path: string, setter: (field: Partial<Pick<Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
608
593
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
609
594
|
validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
|
|
@@ -900,10 +885,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
900
885
|
dateOperationalForm: {
|
|
901
886
|
type: PropType<LowCodeTypes.dateOperationalConfig[]>;
|
|
902
887
|
};
|
|
903
|
-
operationalFormInit: {
|
|
904
|
-
type: BooleanConstructor;
|
|
905
|
-
default: boolean;
|
|
906
|
-
};
|
|
907
888
|
linebarAutoHidden: {
|
|
908
889
|
type: BooleanConstructor;
|
|
909
890
|
};
|
|
@@ -939,6 +920,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
939
920
|
bordered: string | boolean;
|
|
940
921
|
uniqueCacheData: boolean;
|
|
941
922
|
outBordered: boolean;
|
|
942
|
-
operationalFormInit: boolean;
|
|
943
923
|
}>;
|
|
944
924
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,provide as r,onMounted as s,onUnmounted as a,nextTick as i,openBlock as l,createBlock as n,unref as m,mergeProps as d,withCtx as p,createElementBlock as u,createVNode as c,isRef as f,Fragment as h,renderList as y,createCommentVNode as g,createElementVNode as j,normalizeStyle as b,withKeys as v,toDisplayString as k,renderSlot as C}from"vue";import{useTheme as F}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as S,cloneDeep as H,isObject as A,isBoolean as x}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NForm as L,NTabs as O,NTabPane as B,NConfigProvider as R}from"naive-ui";import{useVersion as w}from"../../../shared/hooks/useVersion.js";import{createForm as D,onFormMount as V,onFieldValueChange as _,onFieldMount as I,onFieldUnmount as N,onFieldReact as W}from"@formily/core";import{Path as q}from"@formily/path";import{FormProvider as E,FormConsumer as K}from"@formily/vue";import{InjectionFormLifeCycleCaller as T,InjectionFormGraph as U}from"./constants/index.js";import{useAutoHidden as G}from"./hooks/useAutoHidden.js";import{useComplexOptionsSpan as M}from"./hooks/useComplexOptions.js";import{useFormDomEvent as P,useFormExposeEvent as J}from"./hooks/useFormEvent.js";import{useFormGraph as $}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as z}from"./hooks/useFormRenderLifeCycle.js";import{useLowCodeEvent as Q}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as X}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as Y}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as Z}from"./hooks/useOperationalForm.js";import{useWordbookSetting as ee}from"./hooks/useWordbookSetting.js";import"../index.js";import{createObjSchema as oe}from"./utils/schema.js";import{useFieldListAdaptor as te}from"./hooks/useFieldListAdaptor.js";import{useFieldVisitor as re}from"./hooks/useFieldVisitor.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{validateMessageLocale as se}from"./hooks/useFormValidator.js";import{useAnchor as ae}from"./hooks/useAnchor.js";import{useFormContext as ie}from"./hooks/useFormContext.js";const le={key:0,style:{height:"54px"}},ne={style:{"white-space":"pre"}};var me=e({__name:"FormRender",props:{fieldList:{type:Array},initialData:{type:Object,default:()=>({})},fieldVisitor:{type:Object},column:{type:Number,default:24},maxHeight:{type:[Number,String],default:""},anchor:{type:Boolean,default:!1},parallelism:{type:Number,default:3},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},lowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean},emits:["formChange","annotationChange","scroll"],setup(e,{expose:me,emit:de}){const pe=e,ue=F(),{nuiThemeOverrides:ce}=Y();se();const fe=o(),he=t((()=>S(pe.maxHeight)?pe.maxHeight+"px":pe.maxHeight)),{SchemaField:ye,businessCollector:ge,formItemDepsCollector:je,changeContextCollector:be,formUUID:ve}=ie(pe,de),{anchorBarRef:ke,currentAnchor:Ce,updateAnchorList:Fe,anchorIdList:Se,onScroll:He}=ae(pe,de,fe,je),{callLifeCycle:Ae}=z(pe);r(T,Ae),Ae("onSetup");const{trigger:xe}=G(),{observeFormGraph:Le,setGraph:Oe,removeGraph:Be}=$();r(U,Le);const{lowCodeEventTrigger:Re}=Q(),we=D({initialValues:pe.initialData,effects(e){const o={};V((()=>{Object.assign(o,H(e.values))})),_("*",(t=>{const r=q.getIn(o,t.path);q.setIn(o,t.path,t.value);const s=t.props.name.toString();ge.trigger(e,s),je.trigger(s),de("formChange",{fieldInstance:t,fieldKey:s,oldValue:r,fieldName:t.title,value:t.value,context:be.getContext(s,t.value)}),Re(t),De(s),_e(s),Ne.trigger(s,t.value)})),I("*",Oe),N("*",Be),pe.linebarAutoHidden&&(W("*",xe),V((e=>e.query("*").forEach(xe)))),pe.anchor&&W("*",Fe)}}),{lowCodeReactionsHandler:De,triggerAllReactionsHandler:Ve}=X(t((()=>pe.lowCodeReactions)),we),{operationalFormHandler:_e,triggerAllOperationalFormHandler:Ie}=Z(pe,we),Ne=ee(we,be);s(Ve),s(Ie);const{schemaAdaptor:We}=te(ge,pe.lifeCycle);let qe=pe.fieldList||[];const Ee=t((()=>pe.schema?pe.schema:pe.fieldList?(qe=re().traverse(H(pe.fieldList),pe.fieldVisitor),oe(We(qe,pe))):oe({}))),{onKeydown:Ke}=P({formModel:we,formRenderRef:fe,props:pe}),{clearSpan:Te}=M();a((()=>Te(ve)));const Ue=J({formModel:we,formRenderRef:fe,formItemDepsCollector:je,getFieldList:()=>qe,formUUID:ve});return me({formModel:we,validate:(e="*",o={})=>Ue.validate(e,o),getFormValues:(e=!0)=>Ue.getFormValues(e),async setFormValues(e,o={},t=!1,r=!0){var s,a,l,n,m;let d=!0,p=!0,u=!0;A(o)?(p=null==(s=o.needSplitExtendKey)||s,d=null==(a=o.avoidDependKeyConnection)||a,t=null!=(l=o.avoidBusinessConnection)&&l,u=null==(n=o.avoidWordbookSettingConnection)||n,r=null==(m=o.overwrite)||m):x(o)&&(p=o),t&&(ge.triggerLock=!0),d&&(je.triggerDisabled=!0),u&&Ne.setDisabled(!0),Ue.setFormValues(e,p,r),await i(),ge.triggerLock=!1,je.triggerDisabled=!1,Ne.setDisabled(!1)},setFieldState(e,o){Ue.setFieldState(e,o)},resetFields(e="*"){Ue.resetFields(e)},queryWidget:async e=>Ue.queryWidget(e),getFieldList:()=>qe,async reload(){console.error("reload function is abstract,it should be overwrite!")}}),(o,t)=>(l(),n(m(L),d({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:m(ue)},m(w)()),{default:p((()=>[e.anchor?(l(),u("section",le,[c(m(O),{value:m(Ce),"onUpdate:value":t[0]||(t[0]=e=>f(Ce)?Ce.value=e:null),type:"line",ref_key:"anchorBarRef",ref:ke},{default:p((()=>[(l(!0),u(h,null,y(m(Se),(e=>(l(),n(m(B),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):g("v-if",!0),c(m(R),{"theme-overrides":m(ce)},{default:p((()=>[j("section",{class:"form-render__wrapper",style:b({"--column":e.column,"--form-height":m(he)}),ref_key:"formRenderRef",ref:fe,onScroll:t[1]||(t[1]=(...e)=>m(He)&&m(He)(...e)),onKeydownCapture:t[2]||(t[2]=v(((...e)=>m(Ke)&&m(Ke)(...e)),["enter"]))},[c(m(E),{form:m(we)},{default:p((()=>[c(m(ye),{schema:m(Ee)},null,8,["schema"]),e.consumer?(l(),n(m(K),{key:0},{default:p((({form:e})=>[j("div",ne,k(JSON.stringify(e.values,null,2)),1)])),_:1})):g("v-if",!0),C(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},16,["class","style"]))}});export{me as default};
|
|
@@ -141,10 +141,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
141
141
|
dateOperationalForm: {
|
|
142
142
|
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
143
143
|
};
|
|
144
|
-
operationalFormInit: {
|
|
145
|
-
type: BooleanConstructor;
|
|
146
|
-
default: boolean;
|
|
147
|
-
};
|
|
148
144
|
linebarAutoHidden: {
|
|
149
145
|
type: BooleanConstructor;
|
|
150
146
|
};
|
|
@@ -297,10 +293,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
297
293
|
dateOperationalForm: {
|
|
298
294
|
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
299
295
|
};
|
|
300
|
-
operationalFormInit: {
|
|
301
|
-
type: BooleanConstructor;
|
|
302
|
-
default: boolean;
|
|
303
|
-
};
|
|
304
296
|
linebarAutoHidden: {
|
|
305
297
|
type: BooleanConstructor;
|
|
306
298
|
};
|
|
@@ -381,12 +373,12 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
381
373
|
}>;
|
|
382
374
|
lowCodeReactionsHandler: (field: string) => void;
|
|
383
375
|
triggerAllReactionsHandler: () => void;
|
|
384
|
-
operationalFormHandler:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
376
|
+
operationalFormHandler: (fieldKey: string) => void;
|
|
377
|
+
triggerAllOperationalFormHandler: () => void;
|
|
378
|
+
wordbookSettingHandler: {
|
|
379
|
+
trigger: (fieldKey: string, value: unknown) => void;
|
|
380
|
+
setDisabled: (value: boolean) => void;
|
|
388
381
|
};
|
|
389
|
-
wordbookSettingHandler: import("../../../../es/components/form-render").wordbookSettingHandler;
|
|
390
382
|
schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[], options?: Partial<{
|
|
391
383
|
fieldList: import("../../../../es/components/form-render").FieldItem[];
|
|
392
384
|
initialData: import("../../../../es/shared/types").AnyObject;
|
|
@@ -599,14 +591,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
599
591
|
force?: boolean | undefined;
|
|
600
592
|
}): Promise<void>;
|
|
601
593
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
602
|
-
setFormValues(values: import("../../../../es/shared/types").AnyObject,
|
|
603
|
-
needSplitExtendKey?: boolean | undefined;
|
|
604
|
-
avoidBusinessConnection?: string | boolean | undefined;
|
|
605
|
-
avoidDependKeyConnection?: string | boolean | undefined;
|
|
606
|
-
avoidWordbookSettingConnection?: string | boolean | undefined;
|
|
607
|
-
avoidOperationalFormConnection?: string | boolean | undefined;
|
|
608
|
-
overwrite?: boolean | undefined;
|
|
609
|
-
}, avoidBusinessConnection?: string | boolean, overwrite?: boolean): Promise<void>;
|
|
594
|
+
setFormValues(values: import("../../../../es/shared/types").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
610
595
|
setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
611
596
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
612
597
|
validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
|
|
@@ -903,10 +888,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
903
888
|
dateOperationalForm: {
|
|
904
889
|
type: import("vue").PropType<import("../../../../es/shared/types").LowCodeTypes.dateOperationalConfig[]>;
|
|
905
890
|
};
|
|
906
|
-
operationalFormInit: {
|
|
907
|
-
type: BooleanConstructor;
|
|
908
|
-
default: boolean;
|
|
909
|
-
};
|
|
910
891
|
linebarAutoHidden: {
|
|
911
892
|
type: BooleanConstructor;
|
|
912
893
|
};
|
|
@@ -942,7 +923,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
942
923
|
bordered: string | boolean;
|
|
943
924
|
uniqueCacheData: boolean;
|
|
944
925
|
outBordered: boolean;
|
|
945
|
-
operationalFormInit: boolean;
|
|
946
926
|
}>;
|
|
947
927
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
948
928
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,createVNode as r}from"vue";import{connect as t,mapProps as o}from"@formily/vue";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"naive-ui";import"date-fns";import{assignUpdateValue as i}from"../../utils/schema.js";const p=t(e({props:{onChange:{},span:{type:Number,default:6},display:{type:String,default:"grid"},wrapperStyle:{type:Object,default:()=>({})}},setup:(e,{slots:t})=>()=>r("section",{class:"form-render__complex"},[r("section",{class:`form-render__complexContent--${e.display}`,style:e.wrapperStyle},[t.default&&t.default()])])}),o(i));export{p as COMPLEX};
|
|
1
|
+
import{defineComponent as e,createVNode as r}from"vue";import{connect as t,mapProps as o}from"@formily/vue";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"naive-ui";import"../../../index.js";import"date-fns";import{assignUpdateValue as i}from"../../utils/schema.js";const p=t(e({props:{onChange:{},span:{type:Number,default:6},display:{type:String,default:"grid"},wrapperStyle:{type:Object,default:()=>({})}},setup:(e,{slots:t})=>()=>r("section",{class:"form-render__complex"},[r("section",{class:`form-render__complexContent--${e.display}`,style:e.wrapperStyle},[t.default&&t.default()])])}),o(i));export{p as COMPLEX};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,watch as a,ref as o,onMounted as n,createVNode as
|
|
1
|
+
import{defineComponent as e,computed as t,watch as a,ref as o,onMounted as n,createVNode as i,mergeProps as r}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as l,mapProps as s}from"@formily/vue";import{isObject as d,useEventListener as m}from"@vueuse/core";import{format as v}from"date-fns";import c from"../../../../date-picker/index.js";import{useCommonInjection as p}from"../../hooks/useCommonInjection.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"../../../index.js";import{assignUpdateValue as f,assignClearBindVisited as y}from"../../utils/schema.js";const w=l(e({props:{onChange:{},disabled:{type:Boolean},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"},allowedInvalidValue:{type:String,default:"-"},dbclickToCurrent:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:l}){const{injectValueValidate:s,injectValueBindKey:f}=p();function y(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function w(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function D(e){return y()&&e<Date.now()-864e5||w()&&e>Date.now()}function b(e){const t=new Date(e),a=new Date,o=new Date(t);o.setHours(0),o.setMinutes(0),o.setSeconds(0);const n=new Date(t);n.setHours(23),n.setMinutes(59),n.setSeconds(59);const i=o>a,r=n<a,u=t.getHours(),l=a.getHours(),s=a.getMinutes();return{isHourDisabled:function(e){return y()&&!i&&e<l||w()&&!r&&e>l},isMinuteDisabled:function(e){if(u===l)return y()&&!i&&e<s||w()&&!r&&e>s;return y()&&!i&&u<l||w()&&!r&&u>l}}}s((()=>e.value));const j=t((()=>{const t={};if(d(e.validate)){const{min_date:a,max_date:o}=e.validate;(a||o)&&(t.isDateDisabled=D,t.isTimeDisabled=b)}return t})),g=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function h(t){return t?t===e.allowedInvalidValue?t:v(new Date(t),e.valueFormat):null}a((()=>e.value),(e=>{e&&h(e)!==e&&l("update:value",h(e))}));const k=t({get:()=>h(e.value),set:e=>{l("update:value",e)}}),F=f(k),V=o();return n((()=>{var t;if(!e.dbclickToCurrent)return;const a=null==(t=V.value)?void 0:t.$el;if(!a)return;const o=a.querySelector("input");o&&m(a,"dblclick",(()=>function(t){e.disabled||(t.value=v(Date.now(),e.valueFormat),t.dispatchEvent(new Event("input")))}(o)))})),()=>i(c,r({ref:V,key:F.value,disabled:e.disabled,allowedInvalidValue:e.allowedInvalidValue},j.value,g.value,{"formatted-value":k.value,"onUpdate:formatted-value":e=>k.value=e}),null)}}),s(f,y));export{w as DATE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as r,computed as l,ref as o,onUnmounted as t,createVNode as n,mergeProps as i}from"vue";import{arrayed as a,widthAppend as s}from"../../../../../shared/utils/index.js";import{isVoidField as m}from"@formily/core";import{observe as u,autorun as d}from"@formily/reactive";import{connect as f,mapProps as p}from"@formily/vue";import{useDebounceFn as v}from"@vueuse/core";import{isString as c,isArray as b,isFunction as y}from"lodash-es";import{NFormItem as _}from"naive-ui";import g from"../../../../annotation-edit/index.js";import"../../../index.js";import x from"../tooltipMessage.vue.js";import{InjectionFormUUID as I,InjectionFormGraph as j,InjectionAnnotation as h,InjectionFormGlobalProps as k}from"../../constants/index.js";import{useComplexOptionsSpan as F}from"../../hooks/useComplexOptions.js";import{
|
|
1
|
+
import{defineComponent as e,inject as r,computed as l,ref as o,onUnmounted as t,createVNode as n,mergeProps as i}from"vue";import{arrayed as a,widthAppend as s}from"../../../../../shared/utils/index.js";import{isVoidField as m}from"@formily/core";import{observe as u,autorun as d}from"@formily/reactive";import{connect as f,mapProps as p}from"@formily/vue";import{useDebounceFn as v}from"@vueuse/core";import{isString as c,isArray as b,isFunction as y}from"lodash-es";import{NFormItem as _}from"naive-ui";import g from"../../../../annotation-edit/index.js";import"../../../index.js";import x from"../tooltipMessage.vue.js";import{InjectionFormUUID as I,InjectionFormGraph as j,InjectionAnnotation as h,InjectionFormGlobalProps as k}from"../../constants/index.js";import{useComplexOptionsSpan as F}from"../../hooks/useComplexOptions.js";import{dotEscape as R}from"../../utils/schema.js";import{validateMessageParser as L}from"../../utils/index.js";import{useFormField as q}from"../../hooks/useFormField.js";const K=f(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},fieldItem:{type:Object}},setup(e,{slots:a}){const{field:f,fieldKey:p,fieldAddress:c}=q(),L=r(I),K=l((()=>R(`${L}-${c.value}`))),S=o(!1);if(m(f.value)&&b(e.suffixFields)){const l=r(j);t(u(l,v((()=>{m(f.value)&&b(e.suffixFields)&&(S.value=e.suffixFields.some((e=>{const r=f.value.form.query(e).take();return r&&Reflect.get(r,"required")})))}),100)))}else t(d((()=>{S.value=Reflect.get(f.value,"required")})));const A=r(h),E=l({get(){var r,l;return null!=(l=null==(r=A.value)?void 0:r[e.propertyKey])?l:""},set(r){A.value={property:e.propertyKey,value:r}}});const M=l((()=>A.value&&!1!==e.annotation)),O=l((()=>e.label&&" "!==e.label)),V=l((()=>{let r=0;return M.value&&(r+=18),e.remark&&(r+=18),r})),$=r(k,{}),w=l((()=>{var r;const l=null==(r=e.fieldItem)?void 0:r.bordered;return null==l?$.bordered:l}));function C(){return O.value?n("section",{class:"form-render__formItemLabel"},[n("span",{class:"form-render__formItemLabel--text",style:{marginRight:s(V.value)}},[y(e.labelRender)?e.labelRender(e.label):e.label]),V.value?n("section",{class:"form-render__formItemLabel--operation"},[e.remark?n("div",{class:"form-render__formItemLabel--tooltip"},[n(x,{message:e.remark},null)]):null,M.value?n(g,{class:"form-render__formItemLabel--annotation",modelValue:E.value,"onUpdate:modelValue":e=>E.value=e},null):null]):null]):null}const{getSpan:N}=F();return()=>{return n(_,i({class:["form-render__formItem",{"form-render--no-border":!w.value,"form-render--underline":"underline"===w.value}],style:{"--form-item-column":"inner"===(null==(r=e.fieldItem)?void 0:r.childWidthMode)?e.span:N(L,f.value.address,!1)+e.span}},{id:K.value,uuid:L,"widget-type":f.value.componentType,"field-key":R(p.value),"field-address":R(c.value),required:S.value}),{...a,label:C});var r}}}),p({title:"label"},((e,r)=>{const l=m(r)?void 0:a(r.selfErrors).length?function(e,r){if(!c(r.defined_error_msg)||!r.defined_error_msg)return e.map((e=>L(e,r))).join(",");return L(r.defined_error_msg,r)}(a(r.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:l,"validation-status":l?"error":void 0}})));export{K as FORM_ITEM};
|
|
@@ -33,7 +33,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
33
|
headerClass: import("vue").ComputedRef<(string | {
|
|
34
34
|
'form-render__linebarHeader--disabled': boolean;
|
|
35
35
|
})[]>;
|
|
36
|
-
|
|
36
|
+
fieldKey: import("vue").ComputedRef<string>;
|
|
37
37
|
formItemDepsCollector: import("../../../../../../../es/components/form-render").FormItemDepsCollector;
|
|
38
38
|
TooltipMessage: import("vue").DefineComponent<{
|
|
39
39
|
message: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as r,computed as a,inject as o,openBlock as s,createElementBlock as
|
|
1
|
+
import{defineComponent as e,ref as r,computed as a,inject as o,openBlock as s,createElementBlock as l,createElementVNode as t,normalizeClass as i,unref as n,createTextVNode as d,toDisplayString as m,createBlock as f,createCommentVNode as u,Fragment as p,createVNode as v,withCtx as c,renderSlot as _}from"vue";import"../../../../index.js";import b from"../../tooltipMessage.vue.js";import{InjectionFormItemDepsCollector as k,FormItemLineBarDepKeyPrepend as y}from"../../../constants/index.js";import{ChevronDown as h,ChevronUp as g}from"@vicons/ionicons5";import{NCollapseTransition as j}from"naive-ui";import{useFormField as w}from"../../../hooks/useFormField.js";const x={class:"form-render__linebar","anchor-target":""},F={class:"form-render__linebarHeaderTitle"};var H=e({__name:"FormCollapse",props:{show:{type:Boolean,default:!0},title:{type:String,default:""},remark:String,disabled:{type:Boolean,default:!1}},setup(e){const H=e,B=r(H.show);function C(){H.disabled||(B.value=!B.value)}const S=a((()=>["form-render__linebarHeader",{"form-render__linebarHeader--disabled":!!H.disabled}])),{fieldKey:D}=w();return o(k).setDeps(D.value,y+D.value,((e=!0)=>{B.value=e})),(r,a)=>(s(),l("section",x,[t("header",{class:i(n(S)),onClick:C},[t("div",F,[d(m(e.title)+" ",1),e.remark?(s(),f(b,{key:0,message:e.remark},null,8,["message"])):u("v-if",!0)]),e.disabled?u("v-if",!0):(s(),l(p,{key:0},[B.value?(s(),f(n(h),{key:0})):(s(),f(n(g),{key:1}))],64))],2),v(n(j),{class:"form-render__linebarItem",show:B.value},{default:c((()=>[_(r.$slots,"default")])),_:3},8,["show"])]))}});export{H as default};
|
|
@@ -33,7 +33,7 @@ export declare const LINEBAR: import("vue").DefineComponent<{
|
|
|
33
33
|
headerClass: import("vue").ComputedRef<(string | {
|
|
34
34
|
'form-render__linebarHeader--disabled': boolean;
|
|
35
35
|
})[]>;
|
|
36
|
-
|
|
36
|
+
fieldKey: import("vue").ComputedRef<string>;
|
|
37
37
|
formItemDepsCollector: import("../../../hooks").FormItemDepsCollector;
|
|
38
38
|
TooltipMessage: import("vue").DefineComponent<{
|
|
39
39
|
message: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,inject as l,watch as
|
|
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 +1 @@
|
|
|
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
|
|
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 R}from"../../hooks/useFormRenderOptions.js";const x=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},searchByValue:{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:x,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:x,valueRef:F,fullOptions:_}),{renderComplexOption:T,hasComplexOption:U}=k(e,F),{getRecommend:z,postRecommend:D,sortedOptions:G}=R(e,N,b,A,x),{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[x.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[x.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,valueKey:x,valueRef:F,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[x.value]):e[x.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[x.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:x.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:x.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},F,A));export{x as SELECT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as r,createVNode as o,createTextVNode as i}from"vue";import{NSwitch as t}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as n,assignValueBindKey as l}from"../../utils/schema.js";import{connect as u,mapProps as c}from"@formily/vue";const p=u(e({name:"FormSwitch",props:{openDescription:{type:Object},closeDescription:{type:Object},onChange:{}},setup:e=>()=>{const n=r((()=>{var r,o;return null==(o=null==(r=e.openDescription)?void 0:r.value)||o})),l=r((()=>{var r,o;return null!=(o=null==(r=e.closeDescription)?void 0:r.value)&&o}));return o(t,{checkedValue:n.value,uncheckedValue:l.value},{checked:()=>{var r,o;return i(null!=(o=null==(r=e.openDescription)?void 0:r.describe)?o:"")},unchecked:()=>{var r,o;return i(null!=(o=null==(r=e.closeDescription)?void 0:r.describe)?o:"")}})}}),c(n,l));export{p as SWITCH};
|
|
1
|
+
import{defineComponent as e,computed as r,createVNode as o,createTextVNode as i}from"vue";import{NSwitch as t}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"../../../index.js";import"date-fns";import{assignUpdateValue as n,assignValueBindKey as l}from"../../utils/schema.js";import{connect as u,mapProps as c}from"@formily/vue";const p=u(e({name:"FormSwitch",props:{openDescription:{type:Object},closeDescription:{type:Object},onChange:{}},setup:e=>()=>{const n=r((()=>{var r,o;return null==(o=null==(r=e.openDescription)?void 0:r.value)||o})),l=r((()=>{var r,o;return null!=(o=null==(r=e.closeDescription)?void 0:r.value)&&o}));return o(t,{checkedValue:n.value,uncheckedValue:l.value},{checked:()=>{var r,o;return i(null!=(o=null==(r=e.openDescription)?void 0:r.describe)?o:"")},unchecked:()=>{var r,o;return i(null!=(o=null==(r=e.closeDescription)?void 0:r.describe)?o:"")}})}}),c(n,l));export{p as SWITCH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as o,createVNode as t}from"vue";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import{NInput as i}from"naive-ui";import"date-fns";import{assignUpdateValue as m,assignClearBindVisited as a}from"../../utils/schema.js";import{connect as
|
|
1
|
+
import{defineComponent as e,computed as o,createVNode as t}from"vue";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import{NInput as i}from"naive-ui";import"../../../index.js";import"date-fns";import{assignUpdateValue as m,assignClearBindVisited as a}from"../../utils/schema.js";import{connect as p,mapProps as u}from"@formily/vue";const s=p(e({name:"FormTextarea",props:{value:{type:String}},emits:["update:value"],setup(e,{emit:m}){const a=o({get:()=>e.value,set:e=>m("update:value",e)}),p=r().injectValueBindKey(a);return()=>t(i,{type:"textarea",key:p.value,value:a.value,"onUpdate:value":e=>a.value=e},null)}}),u(m,a));export{s as TEXTAREA};
|
|
@@ -17,6 +17,7 @@ export declare const InjectionFormUUID: InjectionKey<string>;
|
|
|
17
17
|
export declare const InjectionFormGraph: InjectionKey<Record<string, GeneralField>>;
|
|
18
18
|
export declare const InjectionAnnotation: InjectionKey<WritableComputedRef<Nullable<Record<string, AnnotationItem>>>>;
|
|
19
19
|
export declare const InjectionFormGlobalProps: InjectionKey<Readonly<FormRenderProps>>;
|
|
20
|
+
export declare const FormItemLineBarDepKeyPrepend = "__dep_LINEBAR_";
|
|
20
21
|
export declare enum FIELD_BUSINESS_TYPE {
|
|
21
22
|
PASSWORD = "password",
|
|
22
23
|
ID_CARD = "id_card",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o=Symbol("InjectionAsyncQueue"),e=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),l=Symbol("InjectionFormItemDepsCollector"),E=Symbol("InjectionFormLifeCycleCaller"),I=Symbol("InjectionFormUUID"),i=Symbol("InjectionFormGraph"),
|
|
1
|
+
const o=Symbol("InjectionAsyncQueue"),e=Symbol("InjectionSchemaField"),n=Symbol("InjectionBusinessCollector"),t=Symbol("InjectionChangeContextCollector"),l=Symbol("InjectionFormItemDepsCollector"),E=Symbol("InjectionFormLifeCycleCaller"),I=Symbol("InjectionFormUUID"),i=Symbol("InjectionFormGraph"),A=Symbol("InjectionAnnotation"),a=Symbol("InjectionFormGlobalProps"),c="__dep_LINEBAR_";var m=(o=>(o.PASSWORD="password",o.ID_CARD="id_card",o.AGE="age",o.AGE_UNIT="age_unit",o.MOBILE="mobile",o.TELEPHONE="telephone",o.EMAIL="email",o.SEX="sex",o.BIRTHDAY="birthday",o.BANK_CARD="bank_card",o.WEBSITE="website",o.GESTATIONAL_WEEKS="gestational_weeks",o.GESTATIONAL_STAGE="gestational_stage",o.CUSTOMER_NAME="customer_name",o))(m||{}),S=(o=>(o.MALE="1",o.FEMALE="2",o))(S||{}),r=(o=>(o.DAY="D",o.MONTH="M",o.YEAR="Y",o.HOUR="H",o.WEEK="W",o.MINUTE="N",o))(r||{});const s=["COMPLEX","COMBINATION"];export{r as FIELD_AGE_UNIT,m as FIELD_BUSINESS_TYPE,S as FIELD_SEX_VALUE,c as FormItemLineBarDepKeyPrepend,A as InjectionAnnotation,o as InjectionAsyncQueue,n as InjectionBusinessCollector,t as InjectionChangeContextCollector,a as InjectionFormGlobalProps,i as InjectionFormGraph,l as InjectionFormItemDepsCollector,E as InjectionFormLifeCycleCaller,I as InjectionFormUUID,e as InjectionSchemaField,s as NESTED_FORM_ITEM_TYPE};
|
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
export * from './useAnchor';
|
|
2
|
-
export * from './useAutoHidden';
|
|
3
|
-
export * from './useBusinessBinding';
|
|
4
|
-
export * from './useChangeContext';
|
|
5
|
-
export * from './useCommonInjection';
|
|
6
|
-
export * from './useCommonLog';
|
|
7
|
-
export * from './useComplexOptions';
|
|
8
1
|
export * from './useFieldListAdaptor';
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './useFieldVisitor';
|
|
11
|
-
export * from './useFormContext';
|
|
12
|
-
export * from './useFormEvent';
|
|
2
|
+
export * from './useCommonLog';
|
|
13
3
|
export * from './useFormField';
|
|
14
|
-
export * from './
|
|
4
|
+
export * from './useFieldVisitor';
|
|
5
|
+
export * from './useFieldNormalize';
|
|
6
|
+
export * from './useFormValidator';
|
|
7
|
+
export * from './useBusinessBinding';
|
|
8
|
+
export * from './useChangeContext';
|
|
15
9
|
export * from './useFormItemDeps';
|
|
16
|
-
export * from './
|
|
10
|
+
export * from './useAnchor';
|
|
11
|
+
export * from './useFormContext';
|
|
12
|
+
export * from './useCommonInjection';
|
|
17
13
|
export * from './useFormRenderOptions';
|
|
18
|
-
export * from './useFormValidator';
|
|
19
|
-
export * from './useLowCodeEvent';
|
|
20
|
-
export * from './useLowCodeReactions';
|
|
21
|
-
export * from './useNuiThemeOverrides';
|
|
22
|
-
export * from './useOperationalForm';
|
|
23
|
-
export * from './usePresetScope';
|
|
24
|
-
export * from './useWordbookSetting';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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 +1 @@
|
|
|
1
|
-
import{doAnimation as e}from"../../../../shared/utils/anime.js";import{
|
|
1
|
+
import{doAnimation as e}from"../../../../shared/utils/anime.js";import{useDebounceFn as o,watchOnce as t}from"@vueuse/core";import{ref as r,computed as n,nextTick as i}from"vue";import{FormItemLineBarDepKeyPrepend as l}from"../constants/index.js";import"../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"../../index.js";import"date-fns";import{createLinebarId as a}from"../utils/schema.js";function s(s,u,c,m){const v=r(),p=r(""),f=r([]),d=async function(e){var o;f.value=Object.values(e.fields).reduce(((e,o)=>{var t,r;return"LINEBAR"===o.componentType&&"visible"===o.selfDisplay&&e.push({title:null!=(r=null==(t=o.componentProps)?void 0:t.title)?r:o.title,name:o.address.toString()}),e}),[]),await i(),null==(o=v.value)||o.syncBarPosition()};let h=!1;async function y(o){h=!0;try{if(!c.value)return;m.trigger(l+o,!0),await i();const t=c.value.querySelector(`#${a(o)}`);if(!t)return;await new Promise((o=>{e(c.value.scrollTop,t.offsetTop,300,(e=>{var o;null==(o=c.value)||o.scrollTo({top:e})}),"easeInSine",(()=>setTimeout(o,300)))}))}finally{h=!1}}const T=o((function(e){var o;if(h||!c.value)return;const{scrollTop:t,clientHeight:r}=c.value,n=f.value.find(((e,o,n)=>{const i=n[o+1];if(!i)return!0;const l=c.value.querySelector(`#${a(i.name)}`);return l?l.offsetTop>t+r/2:void 0}))||f.value[f.value.length-1];p.value=null!=(o=null==n?void 0:n.name)?o:"",u("scroll",e)}),300);t(f,(e=>{var o,t;p.value=null!=(t=null==(o=e[0])?void 0:o.name)?t:""}));return{currentAnchor:n({get:()=>p.value,async set(e){p.value=e,await new Promise((e=>setTimeout(e,100))),await y(e)}}),onScroll:T,anchorIdList:f,generateAnchorList:d,updateAnchorList:function(e){"LINEBAR"===e.componentType&&e.selfDisplay&&d(e.form)},scrollTo:y,anchorBarRef:v}}export{s as useAnchor};
|
|
@@ -3,7 +3,7 @@ import { FieldItem, FormBusinessFormatter } from '../../../../../es/components/f
|
|
|
3
3
|
import { FIELD_BUSINESS_TYPE } from '../constants';
|
|
4
4
|
export declare class BusinessCollector {
|
|
5
5
|
private businessFormatter?;
|
|
6
|
-
|
|
6
|
+
triggerLock: boolean;
|
|
7
7
|
private readonly typeLockMap;
|
|
8
8
|
private readonly typeCollector;
|
|
9
9
|
private readonly fieldNameCollector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isField as e}from"@formily/core";import{
|
|
1
|
+
import{isField as e}from"@formily/core";import{isString as t}from"@vueuse/core";import{format as s}from"date-fns";import{isFunction as i,isNumber as r}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"naive-ui";import"../../index.js";import{isIdCard as a,parseIdCard as l,parseAgeFromContext as o,parseBirthday as u,parseAge2Birthday as h}from"../utils/business.js";class y{constructor(e){this.businessFormatter=e,this.triggerLock=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return i(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,t,s,i){const r=this.getField(t);r&&e.setFieldState(r.val_key,(e=>{e.value!==s&&(!this.typeLockMap.get(t)&&this.typeLockMap.set(t,1),e.value=this.formatter({value:s,type:t,fieldKey:r.val_key,from:i}))}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(this.triggerLock)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r))return this.typeLockMap.set(r,0);const n="change"===s?this.changeHandlerMap:null;n&&(null==(i=n.get(r))||i.call(this,e))}}function c(){function e(){var e;const t=this.getField(n.BIRTHDAY);return null!=(e=null==t?void 0:t.date_format)?e:"yyyy-MM-dd HH:mm"}function i(i){const r=this.getValueByType(i,n.ID_CARD);if(!r||!t(r)||!a(r))return;const u=l(r),{age:h,ageUnit:y}=o(u);this.setValueByType(i,n.AGE_UNIT,y,n.ID_CARD),this.setValueByType(i,n.AGE,h,n.ID_CARD),this.setValueByType(i,n.SEX,u.sex,n.ID_CARD),this.setValueByType(i,n.BIRTHDAY,s(new Date(u.birthday),e.call(this)),n.ID_CARD)}function c(e){const s=this.getValueByType(e,n.BIRTHDAY);if(!t(s))return;const{age:i,ageUnit:r}=o(u(s));this.setValueByType(e,n.AGE_UNIT,r,n.BIRTHDAY),this.setValueByType(e,n.AGE,i,n.BIRTHDAY)}function p(s){return function(i){const a=this.getValueByType(i,n.AGE),l=this.getValueByType(i,n.AGE_UNIT);(t(a)||r(a))&&""!==a&&t(l)&&""!==l&&this.setValueByType(i,n.BIRTHDAY,h(+a,l,e.call(this)),s)}}return{create:function(e){return new y(e).registerChangeBusiness(n.ID_CARD,i).registerChangeBusiness(n.AGE_UNIT,p(n.AGE_UNIT)).registerChangeBusiness(n.AGE,p(n.AGE)).registerChangeBusiness(n.BIRTHDAY,c)}}}export{y as BusinessCollector,c as useBusinessBinding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as r}from"../../../../shared/utils/index.js";import{isFunction as e}from"@vueuse/core";function i(){return{traverse:function i(t,n,s="val_key"){return n?t.reduce(((t,o)=>{Array.isArray(o.children)&&(o.children=i(o.children,n,s)),Array.isArray(o.properties)&&(o.properties=i(o.properties,n,s)),o.suffixConfig&&(o.suffixConfig=i(r(o.suffixConfig),n,s));const f=Object.keys(n).
|
|
1
|
+
import{arrayed as r}from"../../../../shared/utils/index.js";import{isFunction as e}from"@vueuse/core";function i(){return{traverse:function i(t,n,s="val_key"){return n?t.reduce(((t,o)=>{Array.isArray(o.children)&&(o.children=i(o.children,n,s)),Array.isArray(o.properties)&&(o.properties=i(o.properties,n,s)),o.suffixConfig&&(o.suffixConfig=i(r(o.suffixConfig),n,s));const f=Object.keys(n).find((r=>function(r,e){return r.split("|").some((r=>r.trim()===e))}(r,o[s]))),u=f&&n[f];let c=o;const p=[],a=[];return e(u)&&u({field:o,replace(r){c=r},insertBefore(e){p.push(...r(e))},insertAfter(e){a.push(...r(e))}}),t.concat([...p,c,...a])}),[]):t}}}export{i as useFieldVisitor};
|