cnhis-design-vue 3.3.1-beta.13 → 3.3.1-beta.14
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 +145 -10
- package/es/components/ai-chat/src/Index.vue.d.ts +145 -10
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +6 -0
- package/es/components/ai-chat/src/api/index.js +1 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +44 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -0
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +55 -2
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMainInner.d.ts +2 -0
- package/es/components/ai-chat/src/components/ChatMainInner.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +55 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -0
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -0
- package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +14 -0
- package/es/components/ai-chat/src/components/card/SelectIcon.js +1 -0
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +6 -0
- package/es/components/ai-chat/src/hooks/useProgram.js +1 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +2 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -0
- package/es/components/ai-chat/src/utils/index.d.ts +1 -0
- 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 +2 -304
- package/es/components/audio-sdk/index.js +1 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +8 -5
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +4 -43
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +4 -7
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +1 -7
- package/es/components/card-render/src/components/index.d.ts +23 -23
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- 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 +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/field-editor/index.d.ts +1 -7
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +1 -7
- package/es/components/form-config/index.d.ts +3 -38
- package/es/components/form-config/src/FormConfig.vue.d.ts +3 -38
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -7
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -17
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -8
- package/es/components/form-render/index.d.ts +1 -7
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -7
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -7
- package/es/components/form-render/src/components/renderer/date.d.ts +0 -2
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.d.ts +0 -2
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/input.d.ts +0 -5
- 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 +1 -14
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -14
- package/es/components/form-render/src/components/renderer/select.d.ts +0 -5
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +1 -12
- 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 +0 -4
- package/es/components/form-render/src/types/fieldItem.d.ts +0 -1
- package/es/components/form-render/src/types/index.d.ts +0 -2
- package/es/components/form-render/src/utils/index.d.ts +0 -1
- 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 +0 -1
- package/es/components/iho-chat/src/Index.vue.d.ts +0 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +0 -1
- 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 +23 -26
- 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 +0 -78
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +0 -7
- 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 +2 -1
- 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 +0 -1
- 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 +1 -2
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -24
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -24
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +0 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +0 -2
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -9
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -7
- package/es/components/scale-view/index.d.ts +2 -3
- package/es/components/scale-view/src/ScaleView.vue.d.ts +2 -3
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +1 -3
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +2189 -1
- package/es/components/shortcut-setter/index.d.ts +1 -8
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -8
- 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/file-emr.png.js +1 -0
- package/es/shared/assets/img/file.png.js +1 -0
- 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/use.png.js +1 -0
- 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/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/audio-sdk/src/Index.vue.d.ts +0 -304
- package/es/components/audio-sdk/src/Index.vue.js +0 -1
- package/es/components/audio-sdk/src/Index.vue2.js +0 -1
- package/es/components/audio-sdk/src/components/form.vue.d.ts +0 -51
- package/es/components/audio-sdk/src/components/form.vue.js +0 -1
- package/es/components/audio-sdk/src/components/form.vue2.js +0 -1
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +0 -91
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +0 -1
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +0 -1
- package/es/components/audio-sdk/src/utils/index.d.ts +0 -4
- package/es/components/audio-sdk/src/utils/index.js +0 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +0 -1
- package/es/shared/components/ArrowIcon/index.d.ts +0 -2
- package/es/shared/components/ArrowIcon/index.js +0 -1
- package/es/shared/components/DateIcon/DateIcon.vue.js +0 -1
- package/es/shared/components/DateIcon/index.d.ts +0 -2
- package/es/shared/components/DateIcon/index.js +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -209,7 +209,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
209
209
|
fixMemoLeak: {
|
210
210
|
type: BooleanConstructor;
|
211
211
|
};
|
212
|
-
lazyRender: BooleanConstructor;
|
213
212
|
}, {
|
214
213
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
215
214
|
fieldList: {
|
@@ -412,7 +411,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
412
411
|
fixMemoLeak: {
|
413
412
|
type: BooleanConstructor;
|
414
413
|
};
|
415
|
-
lazyRender: BooleanConstructor;
|
416
414
|
}>> & {
|
417
415
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
418
416
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -587,8 +585,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
587
585
|
linebarTextDirection: "horizontal" | "vertical";
|
588
586
|
autoWidth: number | boolean;
|
589
587
|
feedbackType: "default" | "tooltip";
|
590
|
-
fixMemoLeak: boolean;
|
591
|
-
lazyRender: boolean;
|
592
588
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
593
589
|
[key: symbol]: any;
|
594
590
|
[key: `x-${string}`]: any;
|
@@ -975,7 +971,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
975
971
|
fixMemoLeak: {
|
976
972
|
type: BooleanConstructor;
|
977
973
|
};
|
978
|
-
lazyRender: BooleanConstructor;
|
979
974
|
}>> & {
|
980
975
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
981
976
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -1007,10 +1002,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
1007
1002
|
linebarTextDirection: "horizontal" | "vertical";
|
1008
1003
|
autoWidth: number | boolean;
|
1009
1004
|
feedbackType: "default" | "tooltip";
|
1010
|
-
fixMemoLeak: boolean;
|
1011
|
-
lazyRender: boolean;
|
1012
1005
|
operationalFormInit: boolean;
|
1013
1006
|
incrementalRender: boolean;
|
1007
|
+
fixMemoLeak: boolean;
|
1014
1008
|
}>;
|
1015
1009
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
1016
1010
|
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,
|
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};
|
@@ -204,7 +204,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
204
204
|
fixMemoLeak: {
|
205
205
|
type: BooleanConstructor;
|
206
206
|
};
|
207
|
-
lazyRender: BooleanConstructor;
|
208
207
|
}, {
|
209
208
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
210
209
|
fieldList: {
|
@@ -407,7 +406,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
407
406
|
fixMemoLeak: {
|
408
407
|
type: BooleanConstructor;
|
409
408
|
};
|
410
|
-
lazyRender: BooleanConstructor;
|
411
409
|
}>> & {
|
412
410
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
413
411
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -582,8 +580,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
582
580
|
linebarTextDirection: "horizontal" | "vertical";
|
583
581
|
autoWidth: number | boolean;
|
584
582
|
feedbackType: "default" | "tooltip";
|
585
|
-
fixMemoLeak: boolean;
|
586
|
-
lazyRender: boolean;
|
587
583
|
}>) => Record<string, import("@formily/vue").Stringify<{
|
588
584
|
[key: symbol]: any;
|
589
585
|
[key: `x-${string}`]: any;
|
@@ -970,7 +966,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
970
966
|
fixMemoLeak: {
|
971
967
|
type: BooleanConstructor;
|
972
968
|
};
|
973
|
-
lazyRender: BooleanConstructor;
|
974
969
|
}>> & {
|
975
970
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
976
971
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -1002,9 +997,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
1002
997
|
linebarTextDirection: "horizontal" | "vertical";
|
1003
998
|
autoWidth: number | boolean;
|
1004
999
|
feedbackType: "default" | "tooltip";
|
1005
|
-
fixMemoLeak: boolean;
|
1006
|
-
lazyRender: boolean;
|
1007
1000
|
operationalFormInit: boolean;
|
1008
1001
|
incrementalRender: boolean;
|
1002
|
+
fixMemoLeak: boolean;
|
1009
1003
|
}>;
|
1010
1004
|
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}
|
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};
|
@@ -207,7 +207,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
207
207
|
fixMemoLeak: {
|
208
208
|
type: BooleanConstructor;
|
209
209
|
};
|
210
|
-
lazyRender: BooleanConstructor;
|
211
210
|
}, {
|
212
211
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
213
212
|
fieldList: {
|
@@ -410,7 +409,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
410
409
|
fixMemoLeak: {
|
411
410
|
type: BooleanConstructor;
|
412
411
|
};
|
413
|
-
lazyRender: BooleanConstructor;
|
414
412
|
}>> & {
|
415
413
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
416
414
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -585,8 +583,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
585
583
|
linebarTextDirection: "horizontal" | "vertical";
|
586
584
|
autoWidth: number | boolean;
|
587
585
|
feedbackType: "default" | "tooltip";
|
588
|
-
fixMemoLeak: boolean;
|
589
|
-
lazyRender: boolean;
|
590
586
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
591
587
|
[key: symbol]: any;
|
592
588
|
[key: `x-${string}`]: any;
|
@@ -973,7 +969,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
973
969
|
fixMemoLeak: {
|
974
970
|
type: BooleanConstructor;
|
975
971
|
};
|
976
|
-
lazyRender: BooleanConstructor;
|
977
972
|
}>> & {
|
978
973
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
979
974
|
onScroll?: ((...args: any[]) => any) | undefined;
|
@@ -1005,10 +1000,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
1005
1000
|
linebarTextDirection: "horizontal" | "vertical";
|
1006
1001
|
autoWidth: number | boolean;
|
1007
1002
|
feedbackType: "default" | "tooltip";
|
1008
|
-
fixMemoLeak: boolean;
|
1009
|
-
lazyRender: boolean;
|
1010
1003
|
operationalFormInit: boolean;
|
1011
1004
|
incrementalRender: boolean;
|
1005
|
+
fixMemoLeak: boolean;
|
1012
1006
|
}>;
|
1013
1007
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1014
1008
|
export default _default;
|
@@ -32,7 +32,6 @@ export declare const DATE: import("vue").DefineComponent<{
|
|
32
32
|
type: StringConstructor;
|
33
33
|
default: string;
|
34
34
|
};
|
35
|
-
placeholder: StringConstructor;
|
36
35
|
dbclickToCurrent: {
|
37
36
|
type: BooleanConstructor;
|
38
37
|
default: boolean;
|
@@ -70,7 +69,6 @@ export declare const DATE: import("vue").DefineComponent<{
|
|
70
69
|
type: StringConstructor;
|
71
70
|
default: string;
|
72
71
|
};
|
73
|
-
placeholder: StringConstructor;
|
74
72
|
dbclickToCurrent: {
|
75
73
|
type: BooleanConstructor;
|
76
74
|
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 o,onMounted as i,createVNode as n,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"./text.js";import"../../utils/business.js";import{assignUpdateValue as f,assignClearBindVisited as y}from"../../utils/schema.js";const b=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 b(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function w(e){return y()&&e<Date.now()-864e5||b()&&e>Date.now()}function D(e){const t=new Date(e),a=new Date,o=new Date(t);o.setHours(0),o.setMinutes(0),o.setSeconds(0);const i=new Date(t);i.setHours(23),i.setMinutes(59),i.setSeconds(59);const n=o>a,r=i<a,u=t.getHours(),l=a.getHours(),s=a.getMinutes();return{isHourDisabled:function(e){return y()&&!n&&e<l||b()&&!r&&e>l},isMinuteDisabled:function(e){if(u===l)return y()&&!n&&e<s||b()&&!r&&e>s;return y()&&!n&&u<l||b()&&!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=w,t.isTimeDisabled=D)}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 i((()=>{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)))})),()=>n(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{b as DATE};
|
@@ -4,7 +4,6 @@ export declare const FORM_ITEM: import("vue").DefineComponent<{
|
|
4
4
|
label: StringConstructor;
|
5
5
|
propertyKey: StringConstructor;
|
6
6
|
remark: StringConstructor;
|
7
|
-
remarkTo: {};
|
8
7
|
span: {
|
9
8
|
type: NumberConstructor;
|
10
9
|
default: number;
|
@@ -31,7 +30,6 @@ export declare const FORM_ITEM: import("vue").DefineComponent<{
|
|
31
30
|
label: StringConstructor;
|
32
31
|
propertyKey: StringConstructor;
|
33
32
|
remark: StringConstructor;
|
34
|
-
remarkTo: {};
|
35
33
|
span: {
|
36
34
|
type: NumberConstructor;
|
37
35
|
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 i,mergeProps as a,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 w,NTooltip as O,NButton as T}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,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,{}),ie=t((()=>{var l;const t=null==(l=e.fieldItem)?void 0:l.bordered;return null==t?oe.bordered:t})),ae=l("n-form",{}),ne=t((()=>{var e,l,t,r;if("left"!==(null!=(l=b.labelPlacement)?l:null==(e=ae.props)?void 0:e.labelPlacement))return"";let o=null!=(r=b.labelWidth)?r:null==(t=ae.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?i("section",{class:"form-render__formItemLabel"},[i("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?i("section",{class:"form-render__formItemLabel--operation"},[e.remark?i("div",{class:"form-render__formItemLabel--tooltip"},[i(R,{message:e.remark},null)]):null,Z.value?i(P,{class:"form-render__formItemLabel--annotation",modelValue:J.value,"onUpdate:modelValue":e=>J.value=e,shortcuts:n(Q)},null):null,ee.value?i(O,{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:()=>i(T,{onClick:d((()=>le.value=!le.value),["stop","prev"]),text:!0,type:"primary"},{default:()=>[i("span",{style:"display:inline-block;margin-left:4px"},[u("提示")])]}),default:()=>{var l,t;return[i("div",{innerHTML:N(null!=(t=null==(l=e.fieldItem)?void 0:l.editor_title)?t:"")},null),i(T,{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,i,a,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=ae.props)?void 0:t.labelPlacement)||!n(fe)||!(null==h?void 0:h.autoWidth)||"INPUT_GROUP"===(null==(i=null==(o=K.value.parent)?void 0:o.component)?void 0:i[0]))return u;if("INPUT_GROUP"===(null==(d=null==(a=K.value.parent)?void 0:a.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):i(O,{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,a=!(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&&a?i("section",{style:"display:flex;flex-direction:column;gap:4px;width:100%"},[pe(),i("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()=>i(w,a({class:["form-render__formItem",{"form-render--no-border":!ie.value,"form-render--underline":"underline"===ie.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,8 +8,6 @@ export declare const INPUT: import("vue").DefineComponent<{
|
|
8
8
|
suffix: {
|
9
9
|
type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
10
10
|
};
|
11
|
-
placeholder: StringConstructor;
|
12
|
-
disabled: BooleanConstructor;
|
13
11
|
password: {
|
14
12
|
type: BooleanConstructor;
|
15
13
|
};
|
@@ -23,8 +21,6 @@ export declare const INPUT: import("vue").DefineComponent<{
|
|
23
21
|
suffix: {
|
24
22
|
type: (ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
25
23
|
};
|
26
|
-
placeholder: StringConstructor;
|
27
|
-
disabled: BooleanConstructor;
|
28
24
|
password: {
|
29
25
|
type: BooleanConstructor;
|
30
26
|
};
|
@@ -32,5 +28,4 @@ export declare const INPUT: import("vue").DefineComponent<{
|
|
32
28
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
33
29
|
}, {
|
34
30
|
password: boolean;
|
35
|
-
disabled: boolean;
|
36
31
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,
|
1
|
+
import{defineComponent as e,createVNode as t}from"vue";import{useVModel as o}from"@vueuse/core";import{useCommonInjection as r}from"../../hooks/useCommonInjection.js";import{createInputSlot as i}from"../../utils/index.js";import{connect as u,mapProps as s}from"@formily/vue";import{NInput as n}from"naive-ui";import{assignUpdateValue as p,assignClearBindVisited as a}from"../../utils/schema.js";const m=u(e({name:"FormInput",props:{value:{type:String},prefix:{type:[String,Function,Object]},suffix:{type:[String,Function,Object]},password:{type:Boolean}},emits:["update:value"],setup(e,{emit:u}){const s=o(e,"value",u),p=r().injectValueBindKey(s),a=i(e,(e=>[t("i",{style:{color:"rgba(33,33,33,.4)"}},[e])]));return()=>t(n,{type:e.password?"password":"text",key:p.value,value:s.value,"onUpdate:value":e=>s.value=e},a.value)}}),s(((e,t)=>{const o=p(e,t);return o.allowInput=e=>!e.startsWith(" ")&&!e.endsWith(" "),o}),a));export{m as INPUT};
|
@@ -157,8 +157,6 @@ 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;
|
162
160
|
}>>;
|
163
161
|
isVerticalLinebar: import("vue").ComputedRef<boolean>;
|
164
162
|
wrapperClass: import("vue").ComputedRef<string[] | "">;
|
@@ -177,27 +175,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
177
175
|
textStyle: import("vue").ComputedRef<CSSProperties>;
|
178
176
|
TooltipMessage: import("vue").DefineComponent<{
|
179
177
|
message: StringConstructor;
|
180
|
-
to: {
|
181
|
-
default: string;
|
182
|
-
};
|
183
178
|
}, {
|
184
179
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
185
180
|
message: StringConstructor;
|
186
|
-
to: {
|
187
|
-
default: string;
|
188
|
-
};
|
189
181
|
}>> & {}>>;
|
190
182
|
parsedMessages: import("vue").ComputedRef<string[]>;
|
191
183
|
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<{}>>, {}>;
|
192
184
|
NTooltip: any;
|
193
185
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
194
186
|
message: StringConstructor;
|
195
|
-
|
196
|
-
default: string;
|
197
|
-
};
|
198
|
-
}>>, {
|
199
|
-
to: string;
|
200
|
-
}>;
|
187
|
+
}>>, {}>;
|
201
188
|
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<{}>>, {}>;
|
202
189
|
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<{}>>, {}>;
|
203
190
|
NCollapseTransition: any;
|
@@ -156,8 +156,6 @@ 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;
|
161
159
|
}>>;
|
162
160
|
isVerticalLinebar: import("vue").ComputedRef<boolean>;
|
163
161
|
wrapperClass: import("vue").ComputedRef<string[] | "">;
|
@@ -176,27 +174,16 @@ export declare const LINEBAR: import("@vue/runtime-core").DefineComponent<{
|
|
176
174
|
textStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
177
175
|
TooltipMessage: import("@vue/runtime-core").DefineComponent<{
|
178
176
|
message: StringConstructor;
|
179
|
-
to: {
|
180
|
-
default: string;
|
181
|
-
};
|
182
177
|
}, {
|
183
178
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
184
179
|
message: StringConstructor;
|
185
|
-
to: {
|
186
|
-
default: string;
|
187
|
-
};
|
188
180
|
}>> & {}>>;
|
189
181
|
parsedMessages: import("vue").ComputedRef<string[]>;
|
190
182
|
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<{}>>, {}>;
|
191
183
|
NTooltip: any;
|
192
184
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
193
185
|
message: StringConstructor;
|
194
|
-
|
195
|
-
default: string;
|
196
|
-
};
|
197
|
-
}>>, {
|
198
|
-
to: string;
|
199
|
-
}>;
|
186
|
+
}>>, {}>;
|
200
187
|
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<{}>>, {}>;
|
201
188
|
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<{}>>, {}>;
|
202
189
|
NCollapseTransition: any;
|
@@ -113,8 +113,6 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
113
113
|
type: BooleanConstructor;
|
114
114
|
};
|
115
115
|
wordSplitFilter: {};
|
116
|
-
disabled: BooleanConstructor;
|
117
|
-
placeholder: StringConstructor;
|
118
116
|
unMatchedOption: {
|
119
117
|
type: FunctionConstructor;
|
120
118
|
};
|
@@ -228,8 +226,6 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
228
226
|
type: BooleanConstructor;
|
229
227
|
};
|
230
228
|
wordSplitFilter: {};
|
231
|
-
disabled: BooleanConstructor;
|
232
|
-
placeholder: StringConstructor;
|
233
229
|
unMatchedOption: {
|
234
230
|
type: FunctionConstructor;
|
235
231
|
};
|
@@ -240,7 +236,6 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
240
236
|
}, {
|
241
237
|
options: AnyObject[];
|
242
238
|
multiple: boolean;
|
243
|
-
disabled: boolean;
|
244
239
|
labelField: string;
|
245
240
|
valueField: string;
|
246
241
|
allowModify: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as
|
1
|
+
import{defineComponent as e,computed as t,watch as o,inject as l,useAttrs as a,ref as r,createVNode as s,mergeProps as n,toRaw as u}from"vue";import{arrayed as i}from"../../../../../shared/utils/index.js";import{NSelect as p}from"naive-ui";import"@vueuse/core";import"date-fns";import{cloneDeep as m,isArray as d,isFunction as c,isObject as v,omit as y,xor as f}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as h}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as j}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import"../../../../../shared/hooks/useScrollLoading.js";import{connect as b,mapProps as S}from"@formily/vue";import{useCommonInjection as g,useSelectOptionProps as k}from"../../hooks/useCommonInjection.js";import{useComplexOptions as C,useComplexOptionsSpan as F}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as B,InjectionFormUUID as O}from"../../constants/index.js";import"@formily/path";import"@formily/core";import"@vicons/ionicons5";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as w,assignClearBindVisited as A,createVisitedSetter as H}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 K}from"../../hooks/useFormField.js";import"@formily/reactive";import{useUrlConfigOptions as R,useAutographOptions as x,useRecommendOptions as V}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const L=b(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:{},unMatchedOption:{type:Function}},emits:["update:value","postRecommend","patternChange"],setup(e,{slots:b,emit:S}){const w=t({get:()=>e.value,async set(e){S("update:value",e),J(e)}}),{labelKey:A,valueKey:L,showKey:P,fetchData:_,searchContent:M,fullOptions:N,filterOptions:I,remoteOptions:W,loading:q}=e.urlConfig?R(e,w):x(e,w);o(M,(e=>{S("patternChange",{pattern:e,options:ie.value})}));const{modifyEvent:E,modifyAbleRef:z,getOptionsWithCreated:T}=h(e,{searchContent:M,labelKey:A,valueKey:L,valueRef:w,fullOptions:N}),{renderComplexOption:U,hasComplexOption:D}=C(e,w),{getRecommend:G,postRecommend:J,sortedOptions:Q}=V(e,I,S,A,L),{field:X,fieldKey:Y}=K();l(B).setContext(Y.value,(e=>({currentOption:m(function(e){const t=T(N.value);return d(e)?function(e){const o=t.reduce(((e,t)=>(e[t[L.value]]=t,e)),{});return e.map((e=>o[e]))}(e):(o=e,t.find((e=>e[L.value]===o)));var o}(e)),labelField:A.value,valueField:L.value})));const Z=async e=>(M.value=e,Promise.allSettled([_(e),G(e)])),{injectValueValidate:$,injectValueWatchFromEmpty:ee,injectValueBindKey:te}=g();ee(w,(()=>e.lazyRequest&&Z())),$(w);const oe=te(w),{menuProps:le,nodeProps:ae}=k(),{renderTag:re,renderLabel:se,renderSelectAll:ne,titleRef:ue}=j(e,{labelKey:A,valueKey:L,valueRef:w,showKey:P,searchContent:M}),ie=t((()=>T(z.value?N.value:Q.value))),pe=a(),me=t((()=>{var t;return c(e.unMatchedOption)?o()?w.value:null==(t=e.unMatchedOption(w.value))?void 0:t[A.value]:e.allowCreate||e.showCustomValue||o()?w.value:null;function o(){const t=e.multiple&&d(w.value);return!!N.value.find((e=>t?w.value.includes(e[L.value]):e[L.value]===w.value))}})),de=r(!1);async function ce(e){e&&await Z(),de.value=e}async function ve(e,t){await E.updateValue(e,t),W.value&&t&&i(t).forEach((e=>{if(!v(e))return;const t=e;t.created&&t.shouldSave&&W.value.push(y(u(t),["created","shouldSave"]))}))}const ye=l(O),{getSpan:fe}=F(),he=H(X,E.focus);function je(t){if(!e.multiple)return;const o=t?ie.value.map((e=>e[L.value])):[];f(o,e.value).length&&(w.value=o)}function be(t){let o=b;return e.multiple&&e.selectAll&&(o={action:()=>ne(je),...b}),s(p,n({title:ue.value,key:oe.value,multiple:e.multiple,remote:!0,filterable:!0,loading:q.value,value:me.value,onUpdateValue:ve,"menu-props":le,"node-props":ae,labelField:A.value,valueField:L.value,options:ie.value,onSearch:Z,show:de.value,"onUpdate:show":ce,onFocus:he,onBlur:E.blur,renderLabel:se,renderTag:re},t,pe),o)}return()=>{var e,t;if(!D.value)return be();const o=null!=(t=null==(e=X.value.decoratorProps)?void 0:e.span)?t:6,l=fe(ye,X.value.address);return s("section",{class:"form-render__selectChildField",style:{"--column":l+o}},[be({class:"form-render__selectChildFieldItem",style:{"--form-item-column":o}}),N.value.map((e=>U({option:e,value:w.value,valueKey:L.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),S({dataSource:"options"},w,A));export{L as SELECT};
|
@@ -1,24 +1,13 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
2
2
|
message: StringConstructor;
|
3
|
-
to: {
|
4
|
-
default: string;
|
5
|
-
};
|
6
3
|
}, {
|
7
4
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
8
5
|
message: StringConstructor;
|
9
|
-
to: {
|
10
|
-
default: string;
|
11
|
-
};
|
12
6
|
}>> & {}>>;
|
13
7
|
parsedMessages: import("vue").ComputedRef<string[]>;
|
14
8
|
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<{}>>, {}>;
|
15
9
|
NTooltip: any;
|
16
10
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
17
11
|
message: StringConstructor;
|
18
|
-
|
19
|
-
default: string;
|
20
|
-
};
|
21
|
-
}>>, {
|
22
|
-
to: string;
|
23
|
-
}>;
|
12
|
+
}>>, {}>;
|
24
13
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as
|
1
|
+
import{defineComponent as e,computed as s,openBlock as o,createBlock as r,unref as t,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 x=e({__name:"tooltipMessage",props:{message:String},setup(e){const x=e,y=s((()=>c(x.message)?x.message.split("<br>"):[]));return(e,s)=>(o(),r(t(d),{trigger:"hover"},{trigger:i((()=>[n(e.$slots,"trigger",{},(()=>[l(t(u))]))])),default:i((()=>[a("section",v,[(o(!0),m(p,null,g(t(y),(e=>(o(),m("span",{key:e},f(e),1)))),128))])])),_:3}))}});export{x as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,castArray as n,pick as i}from"lodash-es";import"../../index.js";import{isPositive as r,isNegative as
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,castArray as n,pick as i}from"lodash-es";import"../../index.js";import{isPositive as r,isNegative as s,parseNumberFromMaybeString as l,formRenderLog as a}from"../utils/index.js";import{useFieldNormalize as p}from"./useFieldNormalize.js";import{traverseSchema as c,fieldKeyEscape as d,createLinebarId as m}from"../utils/schema.js";import{useFormValidator as u}from"./useFormValidator.js";import{transformDateFormat as f}from"../utils/business.js";function x(e,o){Object.assign(e["x-component-props"],{...i(o,["wordbook","autograph"])})}function _(e,o){Object.assign(e["x-component-props"],{...i(o,["urlConfig","wordbook"])})}function h(n,h){const{createValidatorSchema:g}=u(),v=o=>{var t;const n={name:o.val_key,type:null!=(t=o.fieldType)?t:"string",title:o.alias||o.name,"x-component":o.html_type,default:o.default_val,"x-component-props":{placeholder:o.placeholder,clearable:s(o.is_empty),...o.componentProps||{}},"x-content":o.slots,"x-display":s(o.is_show)?"hidden":"visible","x-pattern":s(o.is_edit)?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};o.reactions&&(n["x-reactions"]=e(o.reactions).map((e=>{var o;return e.target?{...e,effects:null!=(o=e.effects)?o:["onFieldInit","onFieldValueChange"]}:e}))),o.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o,beforeSetValue:null==h?void 0:h.beforeSetValue,span:2*(o.elem_width||3),showLabel:!r(o.hide_title),remark:o.remark,propertyKey:o.val_key,annotation:o.annotation,...o.decoratorProps||{}}});const i=g(o);return i&&(n["x-validator"]=i),s(o.is_null)&&(n.required=!0),n},y=e=>{var o,t,n,s,a,p,c,d,m,u,f,h,b,g;const y=v(e);e.urlConfig?_(y,e):e.autograph&&x(y,e);const w=!!e.__multiple,C=r(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),O=r(null!=(s=null==(n=e.componentProps)?void 0:n.selectAll)?s:e.selectAll),A=r(null!=(p=null==(a=e.componentProps)?void 0:a.shouldSave)?p:e.save_free_entry),j=r(null!=(d=null==(c=e.componentProps)?void 0:c.allowCreate)?d:e.free_entry),E=null!=(u=null==(m=e.componentProps)?void 0:m.showField)?u:e.show_key,k=null!=(h=null==(f=e.componentProps)?void 0:f.options)?h:e.option,I=null!=(g=l(e.multi_select_value))?g:null==(b=e.componentProps)?void 0:b.maxTagCount;return Object.assign(y["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:j||C,shouldSave:A,showField:E,maxTagCount:I,selectAll:O,...i(e,["lazyRequest","requestCache"])}),w&&(y.type="array"),y},w=e=>{var o,t;const n=v(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:r(i)}),e.urlConfig?_(n,e):e.autograph&&x(n,e),n},C=e=>{const t=v(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},O=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{linebarTextDirection:e.linebarTextDirection,linebarDirection:e.linebarDirection,linebarWidth:e.linebarWidth,disabled:r(e.is_not_fold),id:m(e.val_key),show:!s(e.is_show),remark:e.remark},"x-content":e.slots}),A=new Map([["LINEBAR",O],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":s(e.is_show)?"hidden":"visible"})],["INPUT",e=>{var o;const t=v(e);return Object.assign(t["x-component-props"],{...i(e,["prefix","suffix"]),password:"password"===(null==(o=e.validate)?void 0:o.obj_type)}),t}],["TEXTAREA",e=>{const o=v(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=v(e),{decimal_length:t,validate:n,allowSlash:i}=e;return r(i)&&(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:l(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",y],["REMOTE_SEARCH",y],["DATE",e=>{const o=v(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:f(e.date_format),validate:e.validate}),o}],["TIME",e=>{const o=v(e);return Object.assign(o["x-component-props"],{format:e.date_format,type:f(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=v(e);return Object.assign(o["x-component-props"],{...i(e,["wordbook","lazyRequest","autograph"])}),r(e.is_allow_check_mid)&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=v(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=v(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,minGroupNum:e.minGroupNum,showLabel:!r(e.hide_title),properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",w],["CHECKBOX",w],["SWITCH",e=>{const o=v(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=v(e);return Object.assign(o["x-component-props"],{step:l(e.step_length),max:l(e.max_length),min:l(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=v(e);Array.isArray(e.properties)&&a("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?N(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],i(e,["wrapperStyle","display"])),o}]]),j=e=>{if(e.suffixConfig||e.prefixConfig)return E(e);return(A.get(e.html_type)||C)(e)},E=o=>{if(!o.suffixConfig&&!o.prefixConfig)return j(o);const t=v(o),n=o.suffixConfig?e(o.suffixConfig):[],i=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:s(e.is_show)?"0":o.is_show}))),{...o,hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...n.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:s(e.is_show)?"0":o.is_show})))],r=i.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(t,{type:"void",name:d(i),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...t["x-decorator-props"],showFeedback:!1,suffixFields:i.map((e=>e.val_key))},properties:N(i)}),t},{FieldNormalizeWaterfallHook:k,FieldListNormalizeWaterfallHook:I}=p();function N(o,i={column:9999}){let r=null;const s=I.call(t(o),i).reduce(((e,o,s)=>{var p;const c=null==(p=(o=k.call(o,i)).validate)?void 0:p.obj_type;return c&&n&&n.collect(c,t(o)),"LINEBAR"===o.html_type?(e[a(o)]=l(O(o),s),r=e[a(o)].properties={}):r?r[a(o)]=l(j(o),s):(r=null,e[a(o)]=l(j(o),s)),e}),{});return i.linebarAutoHidden&&Object.values(s).forEach((e=>{"LINEBAR"===e["x-component"]&&b(e)})),c({properties:s,"x-root":!0},((e,o)=>{"INPUT_GROUP"===e["x-component"]&&b(e,!!o&&!o["x-root"])})),s;function l(e,o){return e["x-index"]=o,e["x-decorator-props"]={_index:o,...e["x-decorator-props"]},e}function a(o){if(o.suffixConfig||o.prefixConfig){const t=[...e(o.prefixConfig),o,...e(o.suffixConfig)].filter(Boolean);return d(t)}return o.val_key}}return{schemaAdaptor:N}}function b(e,o=!1){e["x-reactions"]?e["x-reactions"]=n(e["x-reactions"]):e["x-reactions"]=[];const t=Object.keys(e.properties||{}).map((t=>`${o?"*.":"."}${e.name}.${t}#selfDisplay`)).concat(Object.keys(e.properties||{}).map((t=>`${o?"*.":"."}${e.name}.${t}#component`)));e["x-reactions"].push({dependencies:t,fulfill:{state:{visible:"{{hasVisible($deps)}}"}}})}export{h as useFieldListAdaptor};
|
@@ -105,8 +105,6 @@ export declare function useFieldNormalize(): {
|
|
105
105
|
linebarTextDirection: "horizontal" | "vertical";
|
106
106
|
autoWidth: number | boolean;
|
107
107
|
feedbackType: "default" | "tooltip";
|
108
|
-
fixMemoLeak: boolean;
|
109
|
-
lazyRender: boolean;
|
110
108
|
}>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
111
109
|
FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], Partial<{
|
112
110
|
fieldList: FieldItem[];
|
@@ -212,7 +210,5 @@ export declare function useFieldNormalize(): {
|
|
212
210
|
linebarTextDirection: "horizontal" | "vertical";
|
213
211
|
autoWidth: number | boolean;
|
214
212
|
feedbackType: "default" | "tooltip";
|
215
|
-
fixMemoLeak: boolean;
|
216
|
-
lazyRender: boolean;
|
217
213
|
}>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
218
214
|
};
|