cnhis-design-vue 3.3.1-beta.11 → 3.3.1-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/ai-chat/index.d.ts +10 -145
- package/es/components/ai-chat/src/Index.vue.d.ts +10 -145
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +2 -55
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/utils/index.d.ts +0 -1
- package/es/components/ai-chat/src/utils/index.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/index.d.ts +304 -2
- package/es/components/audio-sdk/index.js +1 -1
- package/es/components/audio-sdk/src/Index.vue.d.ts +304 -0
- package/es/components/audio-sdk/src/Index.vue.js +1 -0
- package/es/components/audio-sdk/src/Index.vue2.js +1 -0
- package/es/components/audio-sdk/src/audioSDK.d.ts +5 -8
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/form.vue.d.ts +51 -0
- package/es/components/audio-sdk/src/components/form.vue.js +1 -0
- package/es/components/audio-sdk/src/components/form.vue2.js +1 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +91 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +1 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +1 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +43 -4
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/index.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/index.js +1 -0
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +7 -4
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
- package/es/components/card-render/src/components/index.d.ts +23 -23
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/editor/src/Editor.js +1 -1
- package/es/components/editor/style/index.css +0 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/field-editor/index.d.ts +7 -1
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
- package/es/components/form-config/index.d.ts +38 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +38 -3
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +17 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -1
- package/es/components/form-render/index.d.ts +7 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/input.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +14 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +14 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +12 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +2 -0
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-chat/index.d.ts +1 -0
- package/es/components/iho-chat/src/Index.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-table/index.d.ts +26 -23
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.d.ts +78 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.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/selectRendererPlugin/selectUtils.d.ts +1 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +24 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
- package/es/components/scale-view/index.d.ts +3 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -2
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +3 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -2189
- package/es/components/shortcut-setter/index.d.ts +8 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/ai__avatar.png.js +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/logo.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +1 -0
- package/es/shared/components/ArrowIcon/index.d.ts +2 -0
- package/es/shared/components/ArrowIcon/index.js +1 -0
- package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
- package/es/shared/components/DateIcon/index.d.ts +2 -0
- package/es/shared/components/DateIcon/index.js +1 -0
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/ai-chat/src/api/index.d.ts +0 -6
- package/es/components/ai-chat/src/api/index.js +0 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -44
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -1
- package/es/components/ai-chat/src/components/ChatMainInner.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -55
- package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -1
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -1
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
- package/es/components/ai-chat/src/components/card/JsonCard.js +0 -1
- package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +0 -14
- package/es/components/ai-chat/src/components/card/SelectIcon.js +0 -1
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
- package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -2
- package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -1
- package/es/shared/assets/img/file-emr.png.js +0 -1
- package/es/shared/assets/img/file.png.js +0 -1
- package/es/shared/assets/img/use.png.js +0 -1
@@ -150,6 +150,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
150
150
|
extendKey?: string | undefined;
|
151
151
|
is_not_fold?: string | undefined;
|
152
152
|
remark?: string | undefined;
|
153
|
+
remarkTo?: string | HTMLElement | undefined;
|
153
154
|
free_entry?: import("../../../../components/form-render").FormCommonState | undefined;
|
154
155
|
save_free_entry?: import("../../../../components/form-render").FormCommonState | undefined;
|
155
156
|
initialize_high?: number | undefined;
|
@@ -428,6 +429,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
428
429
|
fixMemoLeak: {
|
429
430
|
type: BooleanConstructor;
|
430
431
|
};
|
432
|
+
lazyRender: BooleanConstructor;
|
431
433
|
}, {
|
432
434
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
433
435
|
fieldList: {
|
@@ -630,6 +632,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
630
632
|
fixMemoLeak: {
|
631
633
|
type: BooleanConstructor;
|
632
634
|
};
|
635
|
+
lazyRender: BooleanConstructor;
|
633
636
|
}>> & {
|
634
637
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
635
638
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -804,6 +807,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
804
807
|
linebarTextDirection: "horizontal" | "vertical";
|
805
808
|
autoWidth: number | boolean;
|
806
809
|
feedbackType: "default" | "tooltip";
|
810
|
+
fixMemoLeak: boolean;
|
811
|
+
lazyRender: boolean;
|
807
812
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
808
813
|
[key: symbol]: any;
|
809
814
|
[key: `x-${string}`]: any;
|
@@ -1190,6 +1195,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1190
1195
|
fixMemoLeak: {
|
1191
1196
|
type: BooleanConstructor;
|
1192
1197
|
};
|
1198
|
+
lazyRender: BooleanConstructor;
|
1193
1199
|
}>> & {
|
1194
1200
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
1195
1201
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -1221,9 +1227,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
1221
1227
|
linebarTextDirection: "horizontal" | "vertical";
|
1222
1228
|
autoWidth: number | boolean;
|
1223
1229
|
feedbackType: "default" | "tooltip";
|
1230
|
+
fixMemoLeak: boolean;
|
1231
|
+
lazyRender: boolean;
|
1224
1232
|
operationalFormInit: boolean;
|
1225
1233
|
incrementalRender: boolean;
|
1226
|
-
fixMemoLeak: boolean;
|
1227
1234
|
}>;
|
1228
1235
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
1229
1236
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -209,6 +209,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
209
209
|
fixMemoLeak: {
|
210
210
|
type: BooleanConstructor;
|
211
211
|
};
|
212
|
+
lazyRender: BooleanConstructor;
|
212
213
|
}, {
|
213
214
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
214
215
|
fieldList: {
|
@@ -411,6 +412,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
411
412
|
fixMemoLeak: {
|
412
413
|
type: BooleanConstructor;
|
413
414
|
};
|
415
|
+
lazyRender: BooleanConstructor;
|
414
416
|
}>> & {
|
415
417
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
416
418
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -585,6 +587,8 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
585
587
|
linebarTextDirection: "horizontal" | "vertical";
|
586
588
|
autoWidth: number | boolean;
|
587
589
|
feedbackType: "default" | "tooltip";
|
590
|
+
fixMemoLeak: boolean;
|
591
|
+
lazyRender: boolean;
|
588
592
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
589
593
|
[key: symbol]: any;
|
590
594
|
[key: `x-${string}`]: any;
|
@@ -971,6 +975,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
971
975
|
fixMemoLeak: {
|
972
976
|
type: BooleanConstructor;
|
973
977
|
};
|
978
|
+
lazyRender: BooleanConstructor;
|
974
979
|
}>> & {
|
975
980
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
976
981
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -1002,9 +1007,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
1002
1007
|
linebarTextDirection: "horizontal" | "vertical";
|
1003
1008
|
autoWidth: number | boolean;
|
1004
1009
|
feedbackType: "default" | "tooltip";
|
1010
|
+
fixMemoLeak: boolean;
|
1011
|
+
lazyRender: boolean;
|
1005
1012
|
operationalFormInit: boolean;
|
1006
1013
|
incrementalRender: boolean;
|
1007
|
-
fixMemoLeak: boolean;
|
1008
1014
|
}>;
|
1009
1015
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
1010
1016
|
export default FormRender;
|
@@ -1 +1 @@
|
|
1
|
-
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import s from"./src/FormRenderWrapper.vue.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./src/hooks/useComplexOptions.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./src/hooks/useFormEvent.js";export{useFormField}from"./src/hooks/useFormField.js";export{useFormGraph}from"./src/hooks/useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useFormRenderLifeCycle}from"./src/hooks/useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{useLowCodeEvent}from"./src/hooks/useLowCodeEvent.js";export{useLowCodeReactions}from"./src/hooks/useLowCodeReactions.js";export{useNuiThemeOverrides}from"./src/hooks/useNuiThemeOverrides.js";export{useOperationalForm}from"./src/hooks/useOperationalForm.js";export{usePresetScope}from"./src/hooks/usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./src/hooks/useWordbookSetting.js";export{useNewLowCodeReactions}from"./src/hooks/useNewLowCodeReactions.js";export{useSelectedSetting}from"./src/hooks/useSelectedSetting.js";export{FieldListFilter,combineExtendKey,createInputSlot,createSlot,editorUnescape,findItemByValCondition,formRenderLog,getAbsoluteKey,injectOrProvide,isEnter,isNegative,isNestedFieldType,isNestedType,isPositive,mergeDeepProperties,parseEnhanceText,parseNumberFromMaybeString,renderDescOption,renderOptionLabel,replace2Any,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,isForeignerID,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,createFieldAddressId,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./src/utils/schema.js";const r=s;r.install=function(s){o(s,r,e+"FormRender")};export{r as default};
|
1
|
+
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import s from"./src/FormRenderWrapper.vue.js";export{useAnchor}from"./src/hooks/useAnchor.js";export{BusinessCollector,useBusinessBinding}from"./src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./src/hooks/useChangeContext.js";export{useCommonInjection,useSelectOptionProps}from"./src/hooks/useCommonInjection.js";export{useCommonLog}from"./src/hooks/useCommonLog.js";export{useComplexOptions,useComplexOptionsSpan}from"./src/hooks/useComplexOptions.js";export{useFieldListAdaptor}from"./src/hooks/useFieldListAdaptor.js";export{useFieldNormalize}from"./src/hooks/useFieldNormalize.js";export{useFieldVisitor}from"./src/hooks/useFieldVisitor.js";export{useFormContext}from"./src/hooks/useFormContext.js";export{useFormDomEvent,useFormExposeEvent}from"./src/hooks/useFormEvent.js";export{useFormField}from"./src/hooks/useFormField.js";export{useFormGraph}from"./src/hooks/useFormGraph.js";export{FormItemDepsCollector,useFormItemDeps}from"./src/hooks/useFormItemDeps.js";export{useFormRenderLifeCycle}from"./src/hooks/useFormRenderLifeCycle.js";export{useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./src/hooks/useFormRenderOptions.js";export{useFormValidator,validateMessageLocale}from"./src/hooks/useFormValidator.js";export{useLowCodeEvent}from"./src/hooks/useLowCodeEvent.js";export{useLowCodeReactions}from"./src/hooks/useLowCodeReactions.js";export{useNuiThemeOverrides}from"./src/hooks/useNuiThemeOverrides.js";export{useOperationalForm}from"./src/hooks/useOperationalForm.js";export{usePresetScope}from"./src/hooks/usePresetScope.js";export{useWordbookSetting,wordbookSettingHandler}from"./src/hooks/useWordbookSetting.js";export{useNewLowCodeReactions}from"./src/hooks/useNewLowCodeReactions.js";export{useSelectedSetting}from"./src/hooks/useSelectedSetting.js";export{FieldListFilter,combineExtendKey,createInputSlot,createSlot,editorUnescape,findItemByValCondition,formRenderLog,getAbsoluteKey,injectOrProvide,isEnter,isNegative,isNestedFieldType,isNestedType,isPositive,isValidWidgetCombination,mergeDeepProperties,parseEnhanceText,parseNumberFromMaybeString,renderDescOption,renderOptionLabel,replace2Any,splitExtendKey,validateMessageParser}from"./src/utils/index.js";export{businessDateParser,isForeignerID,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,createFieldAddressId,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./src/utils/schema.js";const r=s;r.install=function(s){o(s,r,e+"FormRender")};export{r as default};
|
@@ -204,6 +204,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
204
204
|
fixMemoLeak: {
|
205
205
|
type: BooleanConstructor;
|
206
206
|
};
|
207
|
+
lazyRender: BooleanConstructor;
|
207
208
|
}, {
|
208
209
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
209
210
|
fieldList: {
|
@@ -406,6 +407,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
406
407
|
fixMemoLeak: {
|
407
408
|
type: BooleanConstructor;
|
408
409
|
};
|
410
|
+
lazyRender: BooleanConstructor;
|
409
411
|
}>> & {
|
410
412
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
411
413
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -580,6 +582,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
580
582
|
linebarTextDirection: "horizontal" | "vertical";
|
581
583
|
autoWidth: number | boolean;
|
582
584
|
feedbackType: "default" | "tooltip";
|
585
|
+
fixMemoLeak: boolean;
|
586
|
+
lazyRender: boolean;
|
583
587
|
}>) => Record<string, import("@formily/vue").Stringify<{
|
584
588
|
[key: symbol]: any;
|
585
589
|
[key: `x-${string}`]: any;
|
@@ -966,6 +970,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
966
970
|
fixMemoLeak: {
|
967
971
|
type: BooleanConstructor;
|
968
972
|
};
|
973
|
+
lazyRender: BooleanConstructor;
|
969
974
|
}>> & {
|
970
975
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
971
976
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -997,8 +1002,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
997
1002
|
linebarTextDirection: "horizontal" | "vertical";
|
998
1003
|
autoWidth: number | boolean;
|
999
1004
|
feedbackType: "default" | "tooltip";
|
1005
|
+
fixMemoLeak: boolean;
|
1006
|
+
lazyRender: boolean;
|
1000
1007
|
operationalFormInit: boolean;
|
1001
1008
|
incrementalRender: boolean;
|
1002
|
-
fixMemoLeak: boolean;
|
1003
1009
|
}>;
|
1004
1010
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as o,provide as t,computed as r,nextTick as a,onBeforeUnmount as s,openBlock as i,createBlock as l,unref as n,mergeProps as m,withCtx as p,createElementBlock as d,createVNode as u,isRef as c,Fragment as f,renderList as h,createCommentVNode as y,createElementVNode as g,normalizeStyle as v,toDisplayString as b,renderSlot as j}from"vue";import{useTheme as k}from"../../../shared/hooks/useTheme.js";import{useElementSize as C}from"@vueuse/core";import"date-fns";import{isNumber as F,cloneDeep as S}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 x,NTabs as w,NTabPane as L,NConfigProvider as B}from"naive-ui";import{useVersion as A}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{createForm as R,onFormMount as H,onFieldValueChange as O,onFieldMount as T,onFieldUnmount as I,onFieldReact as V}from"@formily/core";import{Path as N}from"@formily/path";import{FormProvider as _,FormConsumer as D}from"@formily/vue";import{InjectionFormColumnWidth as W,InjectionFormLifeCycleCaller as U,InjectionFormGraph as E}from"./constants/index.js";import"./components/renderer/text.js";import"./utils/business.js";import{createObjSchema as M}from"./utils/schema.js";import{useAnchor as q}from"./hooks/useAnchor.js";import"../index.js";import{useComplexOptionsSpan as P}from"./hooks/useComplexOptions.js";import{useFieldListAdaptor as G}from"./hooks/useFieldListAdaptor.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{useFieldVisitor as K}from"./hooks/useFieldVisitor.js";import{useFormContext as z}from"./hooks/useFormContext.js";import{useFormDomEvent as J,useFormExposeEvent as Q}from"./hooks/useFormEvent.js";import{useFormGraph as $}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as X}from"./hooks/useFormRenderLifeCycle.js";import{validateMessageLocale as Y}from"./hooks/useFormValidator.js";import{useLowCodeEvent as Z}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as ee}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as oe}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as te}from"./hooks/useOperationalForm.js";import{useWordbookSetting as re}from"./hooks/useWordbookSetting.js";import{useNewLowCodeReactions as ae}from"./hooks/useNewLowCodeReactions.js";import{GlobalState as se}from"@formily/core/esm/shared/constants";const ie={key:0,style:{height:"54px"}},le={style:{"white-space":"pre"}};var ne=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:5},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},annotationShortcuts:{type:Array},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},autoExpand:Boolean,lowCodeReactions:{type:Array},newLowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},operationalFormInit:{type:Boolean,default:!0},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},labelPlacementOverwrite:Boolean,outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean,wordSplitFilter:{type:Boolean,default:!0},selectMode:Boolean,selectedFields:{type:Array},linebarDirection:{type:String,default:"vertical"},linebarTextDirection:{type:String,default:"horizontal"},linebarWidth:{type:[Number,String],default:120},autoWidth:{type:[Boolean,Number],default:!1},incrementalRender:{type:Boolean,default:!1},feedbackType:{type:String,default:"default"},fixMemoLeak:{type:Boolean}},emits:["formChange","annotationChange","scroll","update:selectedFields","linebarChange","ready"],setup(e,{expose:ne,emit:me}){const pe=e,de=k(),{nuiThemeOverrides:ue}=oe();Y();const ce=o(),{width:fe}=C(ce);t(W,r((()=>fe.value?(fe.value-16*(pe.column-1))/24:0)));const he=r((()=>F(pe.maxHeight)?pe.maxHeight+"px":pe.maxHeight)),{SchemaField:ye,businessCollector:ge,formItemDepsCollector:ve,changeContextCollector:be,asyncQueue:je,formUUID:ke}=z(pe,me),{anchorBarRef:Ce,currentAnchor:Fe,updateAnchorList:Se,anchorIdList:xe,onScroll:we,generateAnchorList:Le}=q(pe,me,ce,ve),{callLifeCycle:Be}=X(pe);t(U,Be),Be("onSetup");const{observeFormGraph:Ae,setGraph:Re,removeGraph:He}=$();t(E,Ae);const{lowCodeEventTrigger:Oe}=Z(),Te=o(!0),Ie=R({initialValues:pe.initialData,effects(e){const o={};H((()=>{Object.assign(o,S(e.values))})),O("*",(t=>{const r=N.getIn(o,t.path);N.setIn(o,t.path,t.value);const a=t.props.name.toString();ge.trigger(e,a),ve.trigger(t.path),Te.value&&me("formChange",{fieldInstance:t,fieldKey:a,oldValue:r,fieldName:t.title,value:t.value,context:be.getContext(a,t.value)}),Oe(t),Ve(a),Ne(a),_e.trigger(a),De.trigger(a,t.value)})),T("*",Re),T("*",(e=>{const o=e.props.name.toString();Ve(o),Ne(o),pe.operationalFormInit&&_e.trigger(o)})),I("*",He),pe.anchor&&V("*",Se)}}),{lowCodeReactionsHandler:Ve}=ee(r((()=>pe.lowCodeReactions)),Ie),{newLowCodeReactionsHandler:Ne}=ae(r((()=>pe.newLowCodeReactions)),Ie),_e=te(pe,Ie),De=re().create(Ie,be),{schemaAdaptor:We}=G(ge,pe.lifeCycle);let Ue=pe.fieldList||[],Ee=[];const Me=r((()=>{var e;let o=!1;const t=pe.schema?pe.schema:pe.fieldList?(Ue!==pe.fieldList&&0!==Ue.length||(o=!0),Ue=K().traverse(S(pe.fieldList),pe.fieldVisitor),M(We(Ue,pe))):M({});return pe.incrementalRender&&(null==(e=pe.fieldList)?void 0:e.length)&&o&&(Ee=[],Object.values(t.properties).forEach((e=>{var o;"visible"===e["x-display"]&&"LINEBAR"===e["x-component"]&&!1!==(null==(o=e["x-component-props"])?void 0:o.show)&&(Ee.push(e),e["x-component-props"].show=!1)})),qe()),t}));function qe(){Ee.length?setTimeout((()=>{const e=Ee.shift();e&&(ve.trigger(N.parse(e.name),!0),Ie.setFieldState(e.name,(e=>{e.componentProps.show=!0})),Ee.length?qe():a().then((()=>{me("ready")})))}),300):me("ready")}const{onKeydown:Pe}=J({formModel:Ie,formRenderRef:ce,props:pe,formUUID:ke}),{clearSpan:Ge}=P();s((()=>{Ge(ke),pe.fixMemoLeak&&(se.lifecycles.length=0)}));const Ke=Q({formModel:Ie,formRenderRef:ce,formItemDepsCollector:ve,businessCollector:ge,wordbookSettingHandler:De,operationalFormHandler:_e,getFieldList:()=>Ue,formUUID:ke,changeContextCollector:be,emitFormChange:Te});return ne({formModel:Ie,validate:(e="*",o={})=>Ke.validate(e,o),getFormValues:(e=!0)=>Ke.getFormValues(e),setFormValues:async(e,o={})=>Ke.setFormValues(e,o),setFieldState(e,o){Ke.setFieldState(e,o)},resetFields(e="*"){Ke.resetFields(e)},queryWidget:async e=>Ke.queryWidget(e),getFieldList:()=>Ue,applySelectedSetting:e=>Ke.applySelectedSetting(e),async reload(){console.error("reload function is abstract,it should be overwrite!")},async optionInited(e={}){if(await a(),je.activeTasks)return new Promise((o=>{var t;const r=()=>{o(),je.onActiveTaskChange=null};je.onActiveTaskChange=()=>{je.activeTasks||r()},setTimeout(r,null!=(t=e.timeout)?t:5e3)}))},updateAnchor(){Le(Ie)},getTextFormValues:()=>Ke.getTextFormValues()}),(o,t)=>(i(),l(n(x),m({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:n(de)},n(A)(),{uuid:n(ke)}),{default:p((()=>[e.anchor&&n(xe).length?(i(),d("section",ie,[u(n(w),{value:n(Fe),"onUpdate:value":t[0]||(t[0]=e=>c(Fe)?Fe.value=e:null),type:"line",ref_key:"anchorBarRef",ref:Ce},{default:p((()=>[(i(!0),d(f,null,h(n(xe),(e=>(i(),l(n(L),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):y("v-if",!0),u(n(B),{"theme-overrides":n(ue)},{default:p((()=>[g("section",{class:"form-render__wrapper",style:v({"--column":e.column,"--form-height":n(he)}),ref_key:"formRenderRef",ref:ce,onScroll:t[1]||(t[1]=(...e)=>n(we)&&n(we)(...e)),onKeydownCapture:t[2]||(t[2]=(...e)=>n(Pe)&&n(Pe)(...e))},[u(n(_),{form:n(Ie)},{default:p((()=>[u(n(ye),{schema:n(Me)},null,8,["schema"]),e.consumer?(i(),l(n(D),{key:0},{default:p((({form:e})=>[g("div",le,b(JSON.stringify(e.values,null,2)),1)])),_:1})):y("v-if",!0),j(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},16,["class","style","uuid"]))}});export{ne as default};
|
1
|
+
import{defineComponent as e,ref as o,provide as t,computed as r,nextTick as a,onBeforeUnmount as s,openBlock as i,createBlock as l,unref as n,mergeProps as m,withCtx as p,createElementBlock as d,createVNode as u,isRef as c,Fragment as f,renderList as h,createCommentVNode as y,createElementVNode as g,normalizeStyle as v,toDisplayString as b,renderSlot as j}from"vue";import{useTheme as k}from"../../../shared/hooks/useTheme.js";import{useElementSize as C}from"@vueuse/core";import"date-fns";import{isNumber as F,cloneDeep as S}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 x,NTabs as w,NTabPane as L,NConfigProvider as B}from"naive-ui";import{useVersion as A}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{createForm as R,onFormMount as H,onFieldValueChange as O,onFieldMount as T,onFieldUnmount as I,onFieldReact as V}from"@formily/core";import{Path as N}from"@formily/path";import{FormProvider as _,FormConsumer as D}from"@formily/vue";import{InjectionFormColumnWidth as W,InjectionFormLifeCycleCaller as U,InjectionFormGraph as E}from"./constants/index.js";import"./components/renderer/text.js";import"./utils/business.js";import{createObjSchema as M}from"./utils/schema.js";import{useAnchor as q}from"./hooks/useAnchor.js";import"../index.js";import{useComplexOptionsSpan as P}from"./hooks/useComplexOptions.js";import{useFieldListAdaptor as G}from"./hooks/useFieldListAdaptor.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{useFieldVisitor as K}from"./hooks/useFieldVisitor.js";import{useFormContext as z}from"./hooks/useFormContext.js";import{useFormDomEvent as J,useFormExposeEvent as Q}from"./hooks/useFormEvent.js";import{useFormGraph as $}from"./hooks/useFormGraph.js";import{useFormRenderLifeCycle as X}from"./hooks/useFormRenderLifeCycle.js";import{validateMessageLocale as Y}from"./hooks/useFormValidator.js";import{useLowCodeEvent as Z}from"./hooks/useLowCodeEvent.js";import{useLowCodeReactions as ee}from"./hooks/useLowCodeReactions.js";import{useNuiThemeOverrides as oe}from"./hooks/useNuiThemeOverrides.js";import{useOperationalForm as te}from"./hooks/useOperationalForm.js";import{useWordbookSetting as re}from"./hooks/useWordbookSetting.js";import{useNewLowCodeReactions as ae}from"./hooks/useNewLowCodeReactions.js";import{GlobalState as se}from"@formily/core/esm/shared/constants";const ie={key:0,style:{height:"54px"}},le={style:{"white-space":"pre"}};var ne=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:5},businessFormatter:{type:Function},schema:{type:Object},components:{type:Object,default:()=>({})},scope:{type:Object,default:()=>({})},annotation:{type:Object},annotationShortcuts:{type:Array},consumer:{type:Boolean,default:!1},uuid:{type:String},lifeCycle:{type:Object},requestInstance:{type:Object},enterToNextWidget:{type:[Boolean,Function],default:!0},autoExpand:Boolean,lowCodeReactions:{type:Array},newLowCodeReactions:{type:Array},operationalForm:{type:Array},dateOperationalForm:{type:Object},operationalFormInit:{type:Boolean,default:!0},linebarAutoHidden:{type:Boolean},bordered:{type:[Boolean,String],default:!0},labelPlacementOverwrite:Boolean,outBordered:{type:Boolean,default:!1},uniqueCacheData:{type:Boolean,default:!1},forceClearable:Boolean,wordSplitFilter:{type:Boolean,default:!0},selectMode:Boolean,selectedFields:{type:Array},linebarDirection:{type:String,default:"vertical"},linebarTextDirection:{type:String,default:"horizontal"},linebarWidth:{type:[Number,String],default:120},autoWidth:{type:[Boolean,Number],default:!1},incrementalRender:{type:Boolean,default:!1},feedbackType:{type:String,default:"default"},fixMemoLeak:{type:Boolean},lazyRender:Boolean},emits:["formChange","annotationChange","scroll","update:selectedFields","linebarChange","ready"],setup(e,{expose:ne,emit:me}){const pe=e,de=k(),{nuiThemeOverrides:ue}=oe();Y();const ce=o(),{width:fe}=C(ce);t(W,r((()=>fe.value?(fe.value-16*(pe.column-1))/24:0)));const he=r((()=>F(pe.maxHeight)?pe.maxHeight+"px":pe.maxHeight)),{SchemaField:ye,businessCollector:ge,formItemDepsCollector:ve,changeContextCollector:be,asyncQueue:je,formUUID:ke}=z(pe,me),{anchorBarRef:Ce,currentAnchor:Fe,updateAnchorList:Se,anchorIdList:xe,onScroll:we,generateAnchorList:Le}=q(pe,me,ce,ve),{callLifeCycle:Be}=X(pe);t(U,Be),Be("onSetup");const{observeFormGraph:Ae,setGraph:Re,removeGraph:He}=$();t(E,Ae);const{lowCodeEventTrigger:Oe}=Z(),Te=o(!0),Ie=R({initialValues:pe.initialData,effects(e){const o={};H((()=>{Object.assign(o,S(e.values))})),O("*",(t=>{const r=N.getIn(o,t.path);N.setIn(o,t.path,t.value);const a=t.props.name.toString();ge.trigger(e,a),ve.trigger(t.path),Te.value&&me("formChange",{fieldInstance:t,fieldKey:a,oldValue:r,fieldName:t.title,value:t.value,context:be.getContext(a,t.value)}),Oe(t),Ve(a),Ne(a),_e.trigger(a),De.trigger(a,t.value)})),T("*",Re),T("*",(e=>{const o=e.props.name.toString();Ve(o),Ne(o),pe.operationalFormInit&&_e.trigger(o)})),I("*",He),pe.anchor&&V("*",Se)}}),{lowCodeReactionsHandler:Ve}=ee(r((()=>pe.lowCodeReactions)),Ie),{newLowCodeReactionsHandler:Ne}=ae(r((()=>pe.newLowCodeReactions)),Ie),_e=te(pe,Ie),De=re().create(Ie,be),{schemaAdaptor:We}=G(ge,pe.lifeCycle);let Ue=pe.fieldList||[],Ee=[];const Me=r((()=>{var e;let o=!1;const t=pe.schema?pe.schema:pe.fieldList?(Ue!==pe.fieldList&&0!==Ue.length||(o=!0),Ue=K().traverse(S(pe.fieldList),pe.fieldVisitor),M(We(Ue,pe))):M({});return pe.incrementalRender&&(null==(e=pe.fieldList)?void 0:e.length)&&o&&(Ee=[],Object.values(t.properties).forEach((e=>{var o;"visible"===e["x-display"]&&"LINEBAR"===e["x-component"]&&!1!==(null==(o=e["x-component-props"])?void 0:o.show)&&(Ee.push(e),e["x-component-props"].show=!1)})),qe()),t}));function qe(){Ee.length?setTimeout((()=>{const e=Ee.shift();e&&(ve.trigger(N.parse(e.name),!0),Ie.setFieldState(e.name,(e=>{e.componentProps.show=!0})),Ee.length?qe():a().then((()=>{me("ready")})))}),300):me("ready")}const{onKeydown:Pe}=J({formModel:Ie,formRenderRef:ce,props:pe,formUUID:ke}),{clearSpan:Ge}=P();s((()=>{Ge(ke),pe.fixMemoLeak&&(se.lifecycles.length=0)}));const Ke=Q({formModel:Ie,formRenderRef:ce,formItemDepsCollector:ve,businessCollector:ge,wordbookSettingHandler:De,operationalFormHandler:_e,getFieldList:()=>Ue,formUUID:ke,changeContextCollector:be,emitFormChange:Te});return ne({formModel:Ie,validate:(e="*",o={})=>Ke.validate(e,o),getFormValues:(e=!0)=>Ke.getFormValues(e),setFormValues:async(e,o={})=>Ke.setFormValues(e,o),setFieldState(e,o){Ke.setFieldState(e,o)},resetFields(e="*"){Ke.resetFields(e)},queryWidget:async e=>Ke.queryWidget(e),getFieldList:()=>Ue,applySelectedSetting:e=>Ke.applySelectedSetting(e),async reload(){console.error("reload function is abstract,it should be overwrite!")},async optionInited(e={}){if(await a(),je.activeTasks)return new Promise((o=>{var t;const r=()=>{o(),je.onActiveTaskChange=null};je.onActiveTaskChange=()=>{je.activeTasks||r()},setTimeout(r,null!=(t=e.timeout)?t:5e3)}))},updateAnchor(){Le(Ie)},getTextFormValues:()=>Ke.getTextFormValues()}),(o,t)=>(i(),l(n(x),m({class:["form-render",{"form-render--out-border":e.outBordered}],"require-mark-placement":"left",style:n(de)},n(A)(),{uuid:n(ke)}),{default:p((()=>[e.anchor&&n(xe).length?(i(),d("section",ie,[u(n(w),{value:n(Fe),"onUpdate:value":t[0]||(t[0]=e=>c(Fe)?Fe.value=e:null),type:"line",ref_key:"anchorBarRef",ref:Ce},{default:p((()=>[(i(!0),d(f,null,h(n(xe),(e=>(i(),l(n(L),{name:e.name,tab:e.title,key:e.name},null,8,["name","tab"])))),128))])),_:1},8,["value"])])):y("v-if",!0),u(n(B),{"theme-overrides":n(ue)},{default:p((()=>[g("section",{class:"form-render__wrapper",style:v({"--column":e.column,"--form-height":n(he)}),ref_key:"formRenderRef",ref:ce,onScroll:t[1]||(t[1]=(...e)=>n(we)&&n(we)(...e)),onKeydownCapture:t[2]||(t[2]=(...e)=>n(Pe)&&n(Pe)(...e))},[u(n(_),{form:n(Ie)},{default:p((()=>[u(n(ye),{schema:n(Me)},null,8,["schema"]),e.consumer?(i(),l(n(D),{key:0},{default:p((({form:e})=>[g("div",le,b(JSON.stringify(e.values,null,2)),1)])),_:1})):y("v-if",!0),j(o.$slots,"default")])),_:3},8,["form"])],36)])),_:3},8,["theme-overrides"])])),_:3},16,["class","style","uuid"]))}});export{ne as default};
|
@@ -207,6 +207,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
207
207
|
fixMemoLeak: {
|
208
208
|
type: BooleanConstructor;
|
209
209
|
};
|
210
|
+
lazyRender: BooleanConstructor;
|
210
211
|
}, {
|
211
212
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
212
213
|
fieldList: {
|
@@ -409,6 +410,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
409
410
|
fixMemoLeak: {
|
410
411
|
type: BooleanConstructor;
|
411
412
|
};
|
413
|
+
lazyRender: BooleanConstructor;
|
412
414
|
}>> & {
|
413
415
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
414
416
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -583,6 +585,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
583
585
|
linebarTextDirection: "horizontal" | "vertical";
|
584
586
|
autoWidth: number | boolean;
|
585
587
|
feedbackType: "default" | "tooltip";
|
588
|
+
fixMemoLeak: boolean;
|
589
|
+
lazyRender: boolean;
|
586
590
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
587
591
|
[key: symbol]: any;
|
588
592
|
[key: `x-${string}`]: any;
|
@@ -969,6 +973,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
969
973
|
fixMemoLeak: {
|
970
974
|
type: BooleanConstructor;
|
971
975
|
};
|
976
|
+
lazyRender: BooleanConstructor;
|
972
977
|
}>> & {
|
973
978
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
974
979
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -1000,9 +1005,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
1000
1005
|
linebarTextDirection: "horizontal" | "vertical";
|
1001
1006
|
autoWidth: number | boolean;
|
1002
1007
|
feedbackType: "default" | "tooltip";
|
1008
|
+
fixMemoLeak: boolean;
|
1009
|
+
lazyRender: boolean;
|
1003
1010
|
operationalFormInit: boolean;
|
1004
1011
|
incrementalRender: boolean;
|
1005
|
-
fixMemoLeak: boolean;
|
1006
1012
|
}>;
|
1007
1013
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1008
1014
|
export default _default;
|
@@ -32,6 +32,7 @@ export declare const DATE: import("vue").DefineComponent<{
|
|
32
32
|
type: StringConstructor;
|
33
33
|
default: string;
|
34
34
|
};
|
35
|
+
placeholder: StringConstructor;
|
35
36
|
dbclickToCurrent: {
|
36
37
|
type: BooleanConstructor;
|
37
38
|
default: boolean;
|
@@ -69,6 +70,7 @@ export declare const DATE: import("vue").DefineComponent<{
|
|
69
70
|
type: StringConstructor;
|
70
71
|
default: string;
|
71
72
|
};
|
73
|
+
placeholder: StringConstructor;
|
72
74
|
dbclickToCurrent: {
|
73
75
|
type: BooleanConstructor;
|
74
76
|
default: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as t,watch as a,ref as
|
1
|
+
import{defineComponent as e,computed as t,watch as a,ref as n,onMounted as o,inject as r,createVNode as i,mergeProps as l}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as s,mapProps as d}from"@formily/vue";import{isObject as c,useEventListener as m}from"@vueuse/core";import{promiseTimeout as v}from"@vueuse/shared";import{format as p}from"date-fns";import f from"naive-ui/es/_mixins/use-locale";import y from"../../../../date-picker/index.js";import{InjectionFormGlobalProps as b}from"../../constants/index.js";import{useCommonInjection as D}from"../../hooks/useCommonInjection.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as h,assignClearBindVisited as w}from"../../utils/schema.js";import x from"../../../../../shared/components/DateIcon/DateIcon.vue.js";const _=s(e({props:{onChange:{},disabled:{type:Boolean},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"},allowedInvalidValue:{type:String,default:"-"},placeholder:String,dbclickToCurrent:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:s,attrs:d}){const{injectValueValidate:h,injectValueBindKey:w}=D();function _(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function j(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function k(e){return _()&&e<Date.now()-864e5||j()&&e>Date.now()}function M(e){const t=new Date(e),a=new Date,n=new Date(t);n.setHours(0),n.setMinutes(0),n.setSeconds(0);const o=new Date(t);o.setHours(23),o.setMinutes(59),o.setSeconds(59);const r=n>a,i=o<a,l=t.getHours(),u=a.getHours(),s=a.getMinutes();return{isHourDisabled:function(e){return _()&&!r&&e<u||j()&&!i&&e>u},isMinuteDisabled:function(e){if(l===u)return _()&&!r&&e<s||j()&&!i&&e>s;return _()&&!r&&l<u||j()&&!i&&l>u}}}h((()=>e.value));const g=t((()=>{const t={};if(c(e.validate)){const{min_date:a,max_date:n}=e.validate;(a||n)&&(t.isDateDisabled=k,t.isTimeDisabled=M)}return t})),F=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function I(t){return t?t===e.allowedInvalidValue?t:p(new Date(t),e.valueFormat):null}a((()=>e.value),(e=>{e&&I(e)!==e&&s("update:value",I(e))}));const S=t({get:()=>I(e.value),set:e=>{s("update:value",e)}}),V=w(S),H=n();let P=!1;function T(){var t;if(!e.dbclickToCurrent||P)return;const a=null==(t=H.value)?void 0:t.$el;if(!a)return;const n=a.querySelector("input");n&&(m(a,"dblclick",(()=>function(t){e.disabled||(t.value=p(Date.now(),e.valueFormat),t.dispatchEvent(new Event("input")))}(n))),P=!0)}o(T);const C=r(b),B=n(!0);async function q(){var e;B.value=!1,await v(0);const t=null==(e=H.value)?void 0:e.$el;if(!t)return;const a=t.querySelector("input");a&&(a.click(),T())}const{localeRef:E}=f("DatePicker");return()=>{var t;return(null==C?void 0:C.lazyRender)&&B.value?i("div",{class:["form-render__textMode--input n-input",{"form-render__textMode--inputDisabled":e.disabled}],tabindex:0,onFocus:q},[[S.value?i("span",null,[S.value]):i("span",{class:"form-render__textMode--inputPlaceholder"},[e.placeholder||(null==(t=E.value)?void 0:t.datetimePlaceholder)]),i(x,{class:"form-render__textMode--dateIcon n-base-icon n-date-picker-icon"},null)]]):i(y,l({ref:H,key:V.value,disabled:e.disabled,allowedInvalidValue:e.allowedInvalidValue},g.value,F.value,{"formatted-value":S.value,"onUpdate:formatted-value":e=>S.value=e}),null)}}}),d(h,w));export{_ as DATE};
|
@@ -4,6 +4,7 @@ export declare const FORM_ITEM: import("vue").DefineComponent<{
|
|
4
4
|
label: StringConstructor;
|
5
5
|
propertyKey: StringConstructor;
|
6
6
|
remark: StringConstructor;
|
7
|
+
remarkTo: {};
|
7
8
|
span: {
|
8
9
|
type: NumberConstructor;
|
9
10
|
default: number;
|
@@ -30,6 +31,7 @@ export declare const FORM_ITEM: import("vue").DefineComponent<{
|
|
30
31
|
label: StringConstructor;
|
31
32
|
propertyKey: StringConstructor;
|
32
33
|
remark: StringConstructor;
|
34
|
+
remarkTo: {};
|
33
35
|
span: {
|
34
36
|
type: NumberConstructor;
|
35
37
|
default: number;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,inject as l,computed as t,ref as r,onUnmounted as o,createVNode as
|
1
|
+
import{defineComponent as e,inject as l,computed as t,ref as r,onUnmounted as o,createVNode as a,mergeProps as i,unref as n,withModifiers as d,createTextVNode as u}from"vue";import{arrayed as s,getStringWidth as m,widthAppend as f}from"../../../../../shared/utils/index.js";import{isVoidField as v}from"@formily/core";import{observe as c,autorun as p}from"@formily/reactive";import{connect as b,mapProps as h}from"@formily/vue";import{useDebounceFn as _}from"@vueuse/core";import{isString as y,isArray as g,isObject as k,isNumber as I,isFunction as x,uniq as F}from"lodash-es";import{NFormItem as T,NTooltip as w,NButton as O}from"naive-ui";import P from"../../../../annotation-edit/index.js";import"../../../index.js";import R from"../tooltipMessage.vue.js";import{InjectionFormGlobalProps as j,InjectionFormGlobalEmit as E,InjectionFormUUID as L,InjectionFormGraph as M,InjectionAnnotation as S,InjectionAnnotationShortcuts as C,InjectionFormColumnWidth as A}from"../../constants/index.js";import{useComplexOptionsSpan as U}from"../../hooks/useComplexOptions.js";import{validateMessageParser as W,editorUnescape as N}from"../../utils/index.js";import{dotEscape as q,createFieldAddressId as B}from"../../utils/schema.js";import{useFormField as H}from"../../hooks/useFormField.js";const K=b(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,remarkTo:{},span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},isOptionChildField:Boolean,feedback:String,showFeedback:{type:Boolean,default:void 0},fieldItem:{type:Object},showTooltipFeedback:{type:Boolean,default:!0}},setup(e,{slots:s,attrs:b}){const h=l(j),W=l(E),{field:K,fieldKey:V,fieldAddress:D}=H(),G=l(L),$=t((()=>q(`${G}-${D.value}`))),z=r(!1);if(v(K.value)&&g(e.suffixFields)){const t=l(M);o(c(t,_((()=>{v(K.value)&&g(e.suffixFields)&&(z.value=e.suffixFields.some((e=>{const l=K.value.form.query(e).take();return l&&Reflect.get(l,"required")})))}),100)))}else o(p((()=>{z.value=Reflect.get(K.value,"required")})));const Y=l(S),J=t({get(){var l,t;return null!=(t=null==(l=Y.value)?void 0:l[e.propertyKey])?t:""},set(l){Y.value={property:e.propertyKey,value:l}}}),Q=l(C);const X=t((()=>{var l;const t={color:null==(l=e.fieldItem)?void 0:l.labelColor};return k(b.labelStyle)&&Object.assign(t,b.labelStyle),t})),Z=t((()=>Y.value&&!1!==e.annotation)),ee=t((()=>{var l;return y(null==(l=e.fieldItem)?void 0:l.editor_title)&&e.fieldItem.editor_title&&["POPUP_ALERT","HOVER_TOOLTIP"].includes(e.fieldItem.editor_title_mode)})),le=r(!1);const te=t((()=>e.label&&" "!==e.label)),re=t((()=>{let l=0;return Z.value&&(l+=18),e.remark&&(l+=18),ee.value&&(l+=32),l})),oe=l(j,{}),ae=t((()=>{var l;const t=null==(l=e.fieldItem)?void 0:l.bordered;return null==t?oe.bordered:t})),ie=l("n-form",{}),ne=t((()=>{var e,l,t,r;if("left"!==(null!=(l=b.labelPlacement)?l:null==(e=ie.props)?void 0:e.labelPlacement))return"";let o=null!=(r=b.labelWidth)?r:null==(t=ie.props)?void 0:t.labelWidth;return o&&"auto"!==o?(o=parseInt(o+""),isNaN(o)||!I(o)?"":o-12-re.value-(z.value?11:0)):""})),de=t((()=>x(e.labelRender)?"":y(e.label)?e.label:"")),ue=t((()=>{var l;return null==(l=e.fieldItem)?void 0:l.fieldTitleColor}));function se(){return te.value?a("section",{class:"form-render__formItemLabel"},[a("span",{class:"form-render__formItemLabel--text",style:{marginRight:f(re.value),maxWidth:f(ne.value),color:ue.value},title:de.value},[x(e.labelRender)?e.labelRender(e.label):e.label]),re.value?a("section",{class:"form-render__formItemLabel--operation"},[e.remark?a("div",{class:"form-render__formItemLabel--tooltip"},[a(R,{message:e.remark,to:e.remarkTo},null)]):null,Z.value?a(P,{class:"form-render__formItemLabel--annotation",modelValue:J.value,"onUpdate:modelValue":e=>J.value=e,shortcuts:n(Q)},null):null,ee.value?a(w,{zIndex:3e3,raw:!0,showArrow:!1,trigger:"POPUP_ALERT"===e.fieldItem.editor_title_mode?"manual":"hover",placement:"top-start",show:"HOVER_TOOLTIP"===e.fieldItem.editor_title_mode?void 0:le.value,contentStyle:"background-color:white;color:rgb(51, 54, 57);padding:8px;position:relative;"},{trigger:()=>a(O,{onClick:d((()=>le.value=!le.value),["stop","prev"]),text:!0,type:"primary"},{default:()=>[a("span",{style:"display:inline-block;margin-left:4px"},[u("提示")])]}),default:()=>{var l,t;return[a("div",{innerHTML:N(null!=(t=null==(l=e.fieldItem)?void 0:l.editor_title)?t:"")},null),a(O,{text:!0,onClick:()=>le.value=!le.value,style:"position:absolute;right:2px;top:2px;line-height:1;height:12px;transform:scaleY(0.9)"},{default:()=>[u("x")]})]}}):null]):null]):null}const me=t((()=>{let l=re.value;return z.value&&(l+=11),y(e.label)&&(l+=ne.value||m(e.label)),l})),fe=l(A),{getSpan:ve}=U();function ce(){var l,t,r,o,a,i,d;const u="inner"===(null==(l=e.fieldItem)?void 0:l.childWidthMode)?e.span:ve(G,K.value.address,!1)+e.span;if("left"!==(null!=(r=b.labelPlacement)?r:null==(t=ie.props)?void 0:t.labelPlacement)||!n(fe)||!(null==h?void 0:h.autoWidth)||"INPUT_GROUP"===(null==(a=null==(o=K.value.parent)?void 0:o.component)?void 0:a[0]))return u;if("INPUT_GROUP"===(null==(d=null==(i=K.value.parent)?void 0:i.component)?void 0:d[0]))return u;const s=16+fe.value;let m=u*s-16-me.value;const f=I(null==h?void 0:h.autoWidth)?h.autoWidth:120;let v=u;for(;m<f&&v<12;)v++,m+=s;return v}function pe(){var l;return"tooltip"!==(null==h?void 0:h.feedbackType)?null==(l=s.default)?void 0:l.call(s):a(w,{to:"body",trigger:"manual",show:!!e.feedback&&e.showTooltipFeedback,raw:!0,animated:!1,showArrow:!1,placement:"top-start",contentStyle:"background-color:#e88080;color:white;padding:8px;border-radius:4px"},{trigger(){var e;return null==(e=s.default)?void 0:e.call(s)},default:()=>e.feedback})}function be(){var l,t,r;const o=null==(l=e.fieldItem)?void 0:l.editor_title,i=!(null==(t=e.fieldItem)?void 0:t.editor_title_mode)||"EMBEDDED_FORM"===(null==(r=e.fieldItem)?void 0:r.editor_title_mode);return y(o)&&o&&i?a("section",{style:"display:flex;flex-direction:column;gap:4px;width:100%"},[pe(),a("div",{innerHTML:N(o)},null)]):pe()}function he(){const e=[K.value.path+""];return K.value.form.query("*").forEach((l=>{(l.address+"").includes(K.value.address+"")&&((l.path+"").includes(K.value.path+"")||e.push(l.path+""))})),e}const _e=t({get:()=>!(!(null==h?void 0:h.selectMode)||!g(null==h?void 0:h.selectedFields))&&h.selectedFields.includes(K.value.path+""),set(e){if(!g(null==h?void 0:h.selectedFields))return;let l=[...h.selectedFields];e?(l.push(...he()),l=F(l)):he().forEach((e=>{const t=l.indexOf(e);t>-1&&l.splice(t,1)})),null==W||W("update:selectedFields",l)}}),ye=t((()=>(null==h?void 0:h.selectMode)&&!(K.value.parent&&"LINEBAR"!==K.value.parent.componentType)));function ge(){(null==h?void 0:h.selectMode)&&(_e.value=!_e.value)}const ke=t((()=>e.isOptionChildField?!!e.feedback&&" "!==e.feedback&&e.showFeedback:e.showFeedback));return()=>a(T,i({class:["form-render__formItem",{"form-render--no-border":!ae.value,"form-render--underline":"underline"===ae.value,"form-render__formItemMask":ye.value,"form-render__formItemMask--selected":ye.value&&_e.value}],style:{"--form-item-column":ce()},showFeedback:ke.value,feedback:"tooltip"===(null==h?void 0:h.feedbackType)?"":e.feedback,labelStyle:X.value},{id:$.value,uuid:G,onClick:ge,"widget-type":K.value.componentType,"field-key":q(V.value),"field-address":B(D.value),required:z.value}),{...s,default:be,label:se})}}),h({title:"label"},((e,l)=>{const t=v(l)?void 0:s(l.selfErrors).length?function(e,l){if(!y(l.defined_error_msg)||!l.defined_error_msg)return e.map((e=>W(e,l))).join(",");return W(l.defined_error_msg,l)}(s(l.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:t,"validation-status":t?"error":void 0}})));export{K as FORM_ITEM};
|
@@ -8,6 +8,8 @@ export declare const INPUT: import("vue").DefineComponent<{
|
|
8
8
|
suffix: {
|
9
9
|
type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
10
10
|
};
|
11
|
+
placeholder: StringConstructor;
|
12
|
+
disabled: BooleanConstructor;
|
11
13
|
password: {
|
12
14
|
type: BooleanConstructor;
|
13
15
|
};
|
@@ -21,6 +23,8 @@ export declare const INPUT: import("vue").DefineComponent<{
|
|
21
23
|
suffix: {
|
22
24
|
type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
23
25
|
};
|
26
|
+
placeholder: StringConstructor;
|
27
|
+
disabled: BooleanConstructor;
|
24
28
|
password: {
|
25
29
|
type: BooleanConstructor;
|
26
30
|
};
|
@@ -28,4 +32,5 @@ export declare const INPUT: import("vue").DefineComponent<{
|
|
28
32
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
29
33
|
}, {
|
30
34
|
password: boolean;
|
35
|
+
disabled: boolean;
|
31
36
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,createVNode as t}from"vue";import{useVModel as
|
1
|
+
import{defineComponent as e,inject as o,createVNode as t,ref as r,createTextVNode as n,nextTick as l}from"vue";import{useVModel as a}from"@vueuse/core";import{InjectionFormGlobalProps as i}from"../../constants/index.js";import{useCommonInjection as u}from"../../hooks/useCommonInjection.js";import{createInputSlot as s}from"../../utils/index.js";import{connect as p,mapProps as d}from"@formily/vue";import{NInput as c}from"naive-ui";import m from"naive-ui/es/_mixins/use-locale";import{assignUpdateValue as v,assignClearBindVisited as f}from"../../utils/schema.js";const x=p(e({name:"FormInput",props:{value:{type:String},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},placeholder:String,disabled:Boolean,password:{type:Boolean}},emits:["update:value"],setup(e,{emit:p}){const d=o(i),v=a(e,"value",p),f=u().injectValueBindKey(v),x=s(e,(e=>[t("i",{style:{color:"rgba(33,33,33,.4)"}},[e])]));function y(o){var r;return(null==(r=x.value)?void 0:r[o])?t("div",{class:`n-input__${o}`},[n(" "),x.value[o](e)]):""}const h=r(!0),b=r();async function _(){h.value=!1,await l(),b.value.focus()}const{localeRef:j}=m("Input");return()=>{var o;return(null==d?void 0:d.lazyRender)&&h.value?t("div",{class:["form-render__textMode--input n-input",{"form-render__textMode--inputDisabled":e.disabled}],tabindex:0,onFocus:_},[[y("prefix"),v.value?t("span",null,[v.value]):t("span",{class:"form-render__textMode--inputPlaceholder"},[e.placeholder||(null==(o=j.value)?void 0:o.placeholder)]),y("suffix")]]):t(c,{ref:b,type:e.password?"password":"text",key:f.value,disabled:e.disabled,placeholder:e.placeholder,value:v.value,"onUpdate:value":e=>v.value=e},x.value)}}}),d(((e,o)=>{const t=v(e,o);return t.allowInput=e=>!e.startsWith(" ")&&!e.endsWith(" "),t}),f));export{x as INPUT};
|
@@ -157,6 +157,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
157
157
|
linebarTextDirection: "horizontal" | "vertical";
|
158
158
|
autoWidth: number | boolean;
|
159
159
|
feedbackType: "default" | "tooltip";
|
160
|
+
fixMemoLeak: boolean;
|
161
|
+
lazyRender: boolean;
|
160
162
|
}>>;
|
161
163
|
isVerticalLinebar: import("vue").ComputedRef<boolean>;
|
162
164
|
wrapperClass: import("vue").ComputedRef<string[] | "">;
|
@@ -175,16 +177,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
175
177
|
textStyle: import("vue").ComputedRef<CSSProperties>;
|
176
178
|
TooltipMessage: import("vue").DefineComponent<{
|
177
179
|
message: StringConstructor;
|
180
|
+
to: {
|
181
|
+
default: string;
|
182
|
+
};
|
178
183
|
}, {
|
179
184
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
180
185
|
message: StringConstructor;
|
186
|
+
to: {
|
187
|
+
default: string;
|
188
|
+
};
|
181
189
|
}>> & {}>>;
|
182
190
|
parsedMessages: import("vue").ComputedRef<string[]>;
|
183
191
|
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
184
192
|
NTooltip: any;
|
185
193
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
186
194
|
message: StringConstructor;
|
187
|
-
|
195
|
+
to: {
|
196
|
+
default: string;
|
197
|
+
};
|
198
|
+
}>>, {
|
199
|
+
to: string;
|
200
|
+
}>;
|
188
201
|
ChevronDown: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
189
202
|
ChevronUp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
190
203
|
NCollapseTransition: any;
|
@@ -156,6 +156,8 @@ export declare const LINEBAR: import("@vue/runtime-core").DefineComponent<{
|
|
156
156
|
linebarTextDirection: "horizontal" | "vertical";
|
157
157
|
autoWidth: number | boolean;
|
158
158
|
feedbackType: "default" | "tooltip";
|
159
|
+
fixMemoLeak: boolean;
|
160
|
+
lazyRender: boolean;
|
159
161
|
}>>;
|
160
162
|
isVerticalLinebar: import("vue").ComputedRef<boolean>;
|
161
163
|
wrapperClass: import("vue").ComputedRef<string[] | "">;
|
@@ -174,16 +176,27 @@ export declare const LINEBAR: import("@vue/runtime-core").DefineComponent<{
|
|
174
176
|
textStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
175
177
|
TooltipMessage: import("@vue/runtime-core").DefineComponent<{
|
176
178
|
message: StringConstructor;
|
179
|
+
to: {
|
180
|
+
default: string;
|
181
|
+
};
|
177
182
|
}, {
|
178
183
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
179
184
|
message: StringConstructor;
|
185
|
+
to: {
|
186
|
+
default: string;
|
187
|
+
};
|
180
188
|
}>> & {}>>;
|
181
189
|
parsedMessages: import("vue").ComputedRef<string[]>;
|
182
190
|
HelpCircleOutline: import("@vue/runtime-core").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
183
191
|
NTooltip: any;
|
184
192
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
185
193
|
message: StringConstructor;
|
186
|
-
|
194
|
+
to: {
|
195
|
+
default: string;
|
196
|
+
};
|
197
|
+
}>>, {
|
198
|
+
to: string;
|
199
|
+
}>;
|
187
200
|
ChevronDown: import("@vue/runtime-core").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
188
201
|
ChevronUp: import("@vue/runtime-core").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
189
202
|
NCollapseTransition: any;
|
@@ -113,6 +113,8 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
113
113
|
type: BooleanConstructor;
|
114
114
|
};
|
115
115
|
wordSplitFilter: {};
|
116
|
+
disabled: BooleanConstructor;
|
117
|
+
placeholder: StringConstructor;
|
116
118
|
unMatchedOption: {
|
117
119
|
type: FunctionConstructor;
|
118
120
|
};
|
@@ -226,6 +228,8 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
226
228
|
type: BooleanConstructor;
|
227
229
|
};
|
228
230
|
wordSplitFilter: {};
|
231
|
+
disabled: BooleanConstructor;
|
232
|
+
placeholder: StringConstructor;
|
229
233
|
unMatchedOption: {
|
230
234
|
type: FunctionConstructor;
|
231
235
|
};
|
@@ -236,6 +240,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
236
240
|
}, {
|
237
241
|
options: AnyObject[];
|
238
242
|
multiple: boolean;
|
243
|
+
disabled: boolean;
|
239
244
|
labelField: string;
|
240
245
|
valueField: string;
|
241
246
|
allowModify: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as
|
1
|
+
import{defineComponent as e,computed as o,watch as t,inject as l,useAttrs as a,ref as r,createVNode as n,mergeProps as s,toRaw as i,nextTick as u}from"vue";import p from"../../../../../shared/components/ArrowIcon/ArrowIcon.vue.js";import{arrayed as d}from"../../../../../shared/utils/index.js";import{NSelect as c}from"naive-ui";import"@vueuse/core";import"date-fns";import{cloneDeep as m,isArray as v,isFunction as f,isObject as y,omit as h,xor as b}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as j}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as S}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import"../../../../../shared/hooks/useScrollLoading.js";import{connect as k,mapProps as g}from"@formily/vue";import C from"naive-ui/es/_mixins/use-locale";import{useCommonInjection as F,useSelectOptionProps as B}from"../../hooks/useCommonInjection.js";import{useComplexOptions as w,useComplexOptionsSpan as x}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as A,InjectionFormUUID as O,InjectionFormGlobalProps as _}from"../../constants/index.js";import"@formily/path";import"@formily/core";import"@vicons/ionicons5";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as R,assignClearBindVisited as H,createVisitedSetter as K}from"../../utils/schema.js";import"../../../index.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"./index.js";import"@vueuse/shared";import{useFormField as V}from"../../hooks/useFormField.js";import"@formily/reactive";import{useUrlConfigOptions as L,useAutographOptions as M,useRecommendOptions as P}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const I=k(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean},searchByValue:{type:Boolean},wordSplitFilter:{},disabled:Boolean,placeholder:String,unMatchedOption:{type:Function}},emits:["update:value","postRecommend","patternChange"],setup(e,{slots:k,emit:g}){const R=o({get:()=>e.value,async set(e){g("update:value",e),Y(e)}}),{labelKey:H,valueKey:I,showKey:N,fetchData:q,searchContent:W,fullOptions:z,filterOptions:E,remoteOptions:D,loading:T}=e.urlConfig?L(e,R):M(e,R);t(W,(e=>{g("patternChange",{pattern:e,options:me.value})}));const{modifyEvent:U,modifyAbleRef:$,getOptionsWithCreated:G}=j(e,{searchContent:W,labelKey:H,valueKey:I,valueRef:R,fullOptions:z}),{renderComplexOption:J,hasComplexOption:Q}=w(e,R),{getRecommend:X,postRecommend:Y,sortedOptions:Z}=P(e,E,g,H,I),{field:ee,fieldKey:oe}=V();l(A).setContext(oe.value,(e=>({currentOption:m(function(e){const o=G(z.value);return v(e)?function(e){const t=o.reduce(((e,o)=>(e[o[I.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[I.value]===t)));var t}(e)),labelField:H.value,valueField:I.value})));const te=async e=>(W.value=e,Promise.allSettled([q(e),X(e)])),{injectValueValidate:le,injectValueWatchFromEmpty:ae,injectValueBindKey:re}=F();ae(R,(()=>e.lazyRequest&&te())),le(R);const ne=re(R),{menuProps:se,nodeProps:ie}=B(),{renderTag:ue,renderLabel:pe,renderSelectAll:de,titleRef:ce}=S(e,{labelKey:H,valueKey:I,valueRef:R,showKey:N,searchContent:W}),me=o((()=>G($.value?z.value:Z.value))),ve=a(),fe=o((()=>{var o;return f(e.unMatchedOption)?t()?R.value:null==(o=e.unMatchedOption(R.value))?void 0:o[H.value]:e.allowCreate||e.showCustomValue||t()?R.value:null;function t(){const o=e.multiple&&v(R.value);return!!z.value.find((e=>o?R.value.includes(e[I.value]):e[I.value]===R.value))}})),ye=r(!1);async function he(e){e&&await te(),ye.value=e}async function be(e,o){await U.updateValue(e,o),D.value&&o&&d(o).forEach((e=>{if(!y(e))return;const o=e;o.created&&o.shouldSave&&D.value.push(h(i(o),["created","shouldSave"]))}))}const je=l(O),{getSpan:Se}=x(),ke=K(ee,U.focus);function ge(o){if(!e.multiple)return;const t=o?me.value.map((e=>e[I.value])):[];b(t,e.value).length&&(R.value=t)}const Ce=l(_),{localeRef:Fe}=C("Select"),Be=r(!0),we=r();async function xe(){var e;Be.value=!1,await u();const o=null==(e=we.value)?void 0:e.$el;if(!o)return;const t=o.querySelector("input");t&&t.click()}function Ae(o){var t;let l=k;return e.multiple&&e.selectAll&&(l={action:()=>de(ge),...k}),(null==Ce?void 0:Ce.lazyRender)&&Be.value?n("div",{class:["form-render__textMode--input n-input",{"form-render__textMode--inputDisabled":e.disabled}],tabindex:0,onFocus:xe},[[R.value?n("span",null,[R.value]):n("span",{class:"form-render__textMode--inputPlaceholder"},[e.placeholder||(null==(t=Fe.value)?void 0:t.placeholder)]),n(p,{class:"form-render__textMode--dateIcon n-base-icon n-date-picker-icon"},null)]]):n(c,s({ref:we,title:ce.value,key:ne.value,multiple:e.multiple,remote:!0,filterable:!0,loading:T.value,placeholder:e.placeholder,disabled:e.disabled,value:fe.value,onUpdateValue:be,"menu-props":se,"node-props":ie,labelField:H.value,valueField:I.value,options:me.value,onSearch:te,show:ye.value,"onUpdate:show":he,onFocus:ke,onBlur:U.blur,renderLabel:pe,renderTag:ue},o,ve),l)}return()=>{var e,o;if(!Q.value)return Ae();const t=null!=(o=null==(e=ee.value.decoratorProps)?void 0:e.span)?o:6,l=Se(je,ee.value.address);return n("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[Ae({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),z.value.map((e=>J({option:e,value:R.value,valueKey:I.value,labelKey:H.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),g({dataSource:"options"},R,H));export{I as SELECT};
|
@@ -1,13 +1,24 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
2
2
|
message: StringConstructor;
|
3
|
+
to: {
|
4
|
+
default: string;
|
5
|
+
};
|
3
6
|
}, {
|
4
7
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
5
8
|
message: StringConstructor;
|
9
|
+
to: {
|
10
|
+
default: string;
|
11
|
+
};
|
6
12
|
}>> & {}>>;
|
7
13
|
parsedMessages: import("vue").ComputedRef<string[]>;
|
8
14
|
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
9
15
|
NTooltip: any;
|
10
16
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
11
17
|
message: StringConstructor;
|
12
|
-
|
18
|
+
to: {
|
19
|
+
default: string;
|
20
|
+
};
|
21
|
+
}>>, {
|
22
|
+
to: string;
|
23
|
+
}>;
|
13
24
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as
|
1
|
+
import{defineComponent as e,computed as o,openBlock as t,createBlock as s,unref as r,withCtx as i,renderSlot as n,createVNode as l,createElementVNode as a,createElementBlock as m,Fragment as p,renderList as g,toDisplayString as f}from"vue";import{HelpCircleOutline as u}from"@vicons/ionicons5";import{isString as c}from"lodash-es";import{NTooltip as d}from"naive-ui";const v={style:{display:"inline-flex","flex-direction":"column"}};var y=e({__name:"tooltipMessage",props:{message:String,to:{default:"body"}},setup(e){const y=e,x=o((()=>c(y.message)?y.message.split("<br>"):[]));return(o,c)=>(t(),s(r(d),{trigger:"hover",to:e.to},{trigger:i((()=>[n(o.$slots,"trigger",{},(()=>[l(r(u))]))])),default:i((()=>[a("section",v,[(t(!0),m(p,null,g(r(x),(e=>(t(),m("span",{key:e},f(e),1)))),128))])])),_:3},8,["to"]))}});export{y as default};
|