cnhis-design-vue 3.3.1-release.5 → 3.3.2-beta.11
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/audio-sdk/index.d.ts +20 -0
- package/es/components/audio-sdk/src/Index.vue.d.ts +20 -0
- package/es/components/audio-sdk/src/Index.vue2.js +1 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +1 -0
- package/es/components/audio-sdk/src/audioSDK.js +11 -3
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +10 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +10 -0
- package/es/components/audio-sdk/src/components/recording.vue2.js +5 -0
- package/es/components/audio-sdk/src/constants/index.d.ts +1 -0
- package/es/components/audio-sdk/src/constants/index.js +3 -0
- package/es/components/audio-sdk/src/utils/recordingModal.js +13 -2
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/base-search/src/index.vue2.js +30 -18
- package/es/components/big-table/src/BigTable.vue2.js +191 -133
- package/es/components/big-table/src/components/NoData.vue2.js +16 -4
- package/es/components/big-table/src/components/edit-form/edit-date.js +12 -6
- package/es/components/big-table/src/components/edit-form/edit-input.js +8 -2
- package/es/components/big-table/src/components/edit-form/edit-select.js +21 -17
- package/es/components/big-table/src/components/edit-form/edit-time.js +11 -4
- package/es/components/big-table/src/components/input-button.vue2.js +8 -4
- package/es/components/big-table/src/hooks/useNestTable.js +18 -4
- package/es/components/big-table/src/hooks/useTableParse.js +16 -3
- package/es/components/body-select/src/index.vue2.js +24 -4
- package/es/components/button-print/index.d.ts +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +52 -11
- package/es/components/button-print/src/components/EditFormat.vue2.js +16 -8
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +98 -47
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +229 -94
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +92 -32
- package/es/components/button-print/src/components/Preview.vue2.js +8 -2
- package/es/components/button-print/src/utils/dialog.js +24 -6
- package/es/components/button-print/src/utils/print.d.ts +5 -5
- package/es/components/button-print/src/utils/print.js +108 -21
- package/es/components/callback/src/components/render/popupMaps.d.ts +17 -1
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +8 -2
- package/es/components/card-reader-sdk/src/utils/readHealthCard.js +16 -4
- package/es/components/card-reader-sdk-cn/src/henan/index.js +38 -11
- package/es/components/card-render/index.d.ts +4 -4
- package/es/components/card-render/src/CardRender.vue.d.ts +4 -4
- package/es/components/classification/src/components/search-filter/index.vue2.js +24 -10
- package/es/components/classification/src/components/set-classification/index.vue2.js +24 -7
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/components/table-modal/index.vue2.js +324 -165
- package/es/components/classification/src/index.vue2.js +261 -69
- package/es/components/default-page/src/constants/index.js +144 -19
- package/es/components/default-page/src/index.vue2.js +8 -2
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +75 -51
- package/es/components/expand-field/src/components/FormItemPerson.vue2.js +46 -38
- package/es/components/expand-field/src/components/PersonModal.vue2.js +62 -50
- package/es/components/expand-field/src/components/form.vue2.js +783 -412
- package/es/components/expand-field/src/index.vue2.js +88 -22
- package/es/components/expand-field/src/utils/constant.js +88 -12
- package/es/components/fabric-chart/src/components/PopupMenu.js +32 -15
- package/es/components/fabric-chart/src/constants/index.js +72 -10
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +16 -3
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +8 -2
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +32 -5
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +8 -2
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +45 -8
- package/es/components/fabric-chart/src/hooks/useCommon.js +24 -4
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +12 -6
- package/es/components/field-editor/index.d.ts +4 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +4 -0
- package/es/components/field-editor/src/fields.js +232 -30
- package/es/components/field-set/src/FieldColor.vue2.js +88 -21
- package/es/components/field-set/src/FieldFilter.vue2.js +32 -16
- package/es/components/field-set/src/FieldSet.vue2.js +210 -57
- package/es/components/field-set/src/Index.vue2.js +40 -6
- package/es/components/field-set/src/TableStyle.vue2.js +48 -13
- package/es/components/field-set/src/components/condition.vue2.js +26 -10
- package/es/components/field-set/src/components/edit-dialog.vue2.js +148 -68
- package/es/components/field-set/src/components/edit-filter.vue2.js +24 -4
- package/es/components/field-set/src/components/table-row.vue2.js +123 -42
- package/es/components/field-set/src/constants/filter.js +328 -42
- package/es/components/field-set/src/constants/index.js +504 -64
- package/es/components/form-config/index.d.ts +80 -5
- package/es/components/form-config/src/FormConfig.vue.d.ts +80 -5
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +57 -4
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +16 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +91 -46
- package/es/components/form-config/src/constants/index.d.ts +2 -1
- package/es/components/form-config/src/constants/index.js +81 -11
- package/es/components/form-config/src/hooks/useConfigurationField.js +19 -1
- package/es/components/form-config/src/hooks/useLocale.d.ts +1 -0
- package/es/components/form-config/src/hooks/useLocale.js +241 -31
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/index.d.ts +4 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +4 -0
- package/es/components/form-render/src/FormRender.vue2.js +3 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -0
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +8 -4
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +8 -4
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +8 -2
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/input.d.ts +16 -4
- package/es/components/form-render/src/components/renderer/input.js +39 -7
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +3 -0
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +17 -12
- package/es/components/form-render/src/components/renderer/remoteSearch.js +8 -2
- package/es/components/form-render/src/components/renderer/switch.js +24 -4
- package/es/components/form-render/src/components/renderer/text.js +1 -1
- package/es/components/form-render/src/components/renderer/textarea.d.ts +16 -1
- package/es/components/form-render/src/components/renderer/textarea.js +36 -8
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -0
- package/es/components/form-render/src/hooks/useComplexOptions.js +3 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +4 -3
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormField.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormField.js +5 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -0
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +11 -0
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -0
- package/es/components/form-render/src/utils/schema.js +80 -15
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/iho-chat/src/Index.vue2.js +42 -38
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +108 -33
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +132 -90
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +110 -48
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +40 -20
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +55 -23
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +77 -45
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +256 -208
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +306 -208
- package/es/components/iho-chat/src/components/ContextMenu.js +50 -9
- package/es/components/iho-chat/src/components/MessageEvent.vue2.js +16 -4
- package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +8 -2
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +104 -18
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +67 -12
- package/es/components/iho-chat/src/components/SelectLabel.vue2.js +47 -43
- package/es/components/iho-chat/src/components/SiderList.vue2.js +68 -38
- package/es/components/iho-chat/src/components/Video.vue2.js +38 -11
- package/es/components/iho-chat/src/hooks/useVideo.js +15 -4
- package/es/components/iho-chat/src/utils/index.js +79 -14
- package/es/components/iho-table/index.d.ts +13 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +13 -2
- package/es/components/iho-table/src/IhoTable.vue2.js +27 -20
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +8 -2
- package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +40 -15
- package/es/components/iho-table/src/plugins/filterRemoteSearchPlugin/remoteFilter.vue2.js +40 -15
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +7 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +50 -20
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +16 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +10 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +42 -15
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +18 -12
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +0 -3
- package/es/components/info-header/index.d.ts +13 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -0
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +144 -25
- package/es/components/keyboard/src/Keyboard.vue2.js +20 -8
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +51 -37
- package/es/components/map/src/Map.vue2.js +8 -4
- package/es/components/picture-clipper/src/PictureClipper.vue2.js +16 -8
- package/es/components/quick-search/src/index.vue2.js +176 -131
- package/es/components/recommend-search/src/components/BaseSearch.js +14 -8
- package/es/components/recommend-search/src/components/RecommendInput.vue2.js +28 -8
- package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +18 -5
- package/es/components/scale-view/index.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +18 -10
- package/es/components/scale-view/src/components/NoData.vue2.js +16 -4
- package/es/components/scale-view/src/components/formitem/r-cascader.js +8 -2
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +24 -6
- package/es/components/scale-view/src/components/formitem/r-input.js +8 -2
- package/es/components/scale-view/src/components/formitem/r-map.js +8 -2
- package/es/components/scale-view/src/components/formitem/r-radio.js +24 -6
- package/es/components/scale-view/src/components/formitem/r-select.js +8 -2
- package/es/components/scale-view/src/components/formitem/r-sign.js +32 -11
- package/es/components/scale-view/src/components/formitem/standard-modal.js +16 -3
- package/es/components/scale-view/src/hooks/scaleview-computed.js +24 -5
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +2 -2
- package/es/components/scale-view/src/hooks/scaleview-methods.js +16 -4
- package/es/components/scale-view/src/hooks/scaleview-submit.js +16 -3
- package/es/components/scale-view/src/hooks/scaleview-validate.js +40 -9
- package/es/components/search-cascader/src/SearchCascader.vue2.js +20 -14
- package/es/components/select-label/src/LabelFormContent.vue2.js +53 -21
- package/es/components/select-label/src/SelectLabel.vue2.js +81 -51
- package/es/components/select-label/src/components/label-classify.vue2.js +28 -11
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +18 -5
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +34 -8
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +18 -5
- package/es/components/select-person/src/SelectPerson.vue2.js +221 -145
- package/es/components/select-person/src/SelectPersonType.vue2.js +127 -102
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +9 -2
- package/es/components/select-person/src/index.vue2.js +20 -7
- package/es/components/shortcut-setter/index.d.ts +16 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +16 -1
- package/es/components/slider-tree/src/index.vue2.js +16 -3
- package/es/components/table-export-field/index.d.ts +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +1 -0
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +187 -113
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +147 -88
- package/es/components/table-export-field/src/index.vue.d.ts +1 -0
- package/es/components/table-export-field/src/index.vue2.js +28 -12
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +32 -5
- package/es/components/table-filter/src/components/bi-filter/helpers/options.js +264 -34
- package/es/components/table-filter/src/components/bi-filter/index.vue2.js +214 -135
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +16 -3
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +9 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +39 -6
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +18 -5
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +29 -18
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +16 -3
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +8 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +195 -130
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +26 -7
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +12 -6
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +34 -8
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +21 -8
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +8 -4
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +19 -6
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +16 -3
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +24 -10
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1648 -207
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +11 -11
- package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +8 -2
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +16 -3
- package/es/components/table-filter/src/tool/baseOptions.js +144 -19
- package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +32 -16
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +22 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +8 -4
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +16 -8
- package/es/env.d.ts +25 -25
- package/es/shared/components/CancelRadio/CancelRadio.d.ts +7 -0
- package/es/shared/components/CancelRadio/CancelRadio.js +6 -6
- package/es/shared/hooks/selectHooks/useSelectAllowModify.js +2 -2
- package/es/shared/package.json.js +1 -1
- package/package.json +76 -77
- package/es/components/ai-chat/index.d.ts +0 -680
- package/es/components/ai-chat/index.js +0 -10
- package/es/components/ai-chat/src/Index.vue.d.ts +0 -682
- package/es/components/ai-chat/src/Index.vue.js +0 -6
- package/es/components/ai-chat/src/Index.vue2.js +0 -175
- package/es/components/ai-chat/src/api/index.d.ts +0 -8
- package/es/components/ai-chat/src/api/index.js +0 -87
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -38
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -103
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +0 -101
- package/es/components/ai-chat/src/components/ChatBI.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +0 -73
- package/es/components/ai-chat/src/components/ChatCard.d.ts +0 -43
- package/es/components/ai-chat/src/components/ChatCard.js +0 -403
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +0 -203
- package/es/components/ai-chat/src/components/ChatFooter.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +0 -373
- package/es/components/ai-chat/src/components/ChatMain.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatMain.js +0 -350
- package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatMainDefault.js +0 -278
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +0 -59
- package/es/components/ai-chat/src/components/ChatPatient.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +0 -218
- package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +0 -45
- package/es/components/ai-chat/src/components/ChatPrompt.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +0 -143
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -57
- package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -6
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -190
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
- package/es/components/ai-chat/src/components/card/JsonCard.js +0 -574
- package/es/components/ai-chat/src/components/message-render/CardRender.d.ts +0 -16
- package/es/components/ai-chat/src/components/message-render/CardRender.js +0 -80
- package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +0 -16
- package/es/components/ai-chat/src/components/message-render/FormRender.js +0 -173
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +0 -36
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +0 -6
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +0 -96
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +0 -105
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +0 -6
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +0 -260
- package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +0 -18
- package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +0 -37
- package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +0 -20
- package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +0 -48
- package/es/components/ai-chat/src/hooks/index.d.ts +0 -2
- package/es/components/ai-chat/src/hooks/index.js +0 -2
- package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +0 -18
- package/es/components/ai-chat/src/hooks/useChartAudioContext.js +0 -202
- package/es/components/ai-chat/src/hooks/useData.d.ts +0 -77
- package/es/components/ai-chat/src/hooks/useData.js +0 -289
- package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +0 -38
- package/es/components/ai-chat/src/hooks/useFooterContext.js +0 -218
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -14
- package/es/components/ai-chat/src/hooks/useProgram.js +0 -306
- package/es/components/ai-chat/src/hooks/useSSE.d.ts +0 -9
- package/es/components/ai-chat/src/hooks/useSSE.js +0 -138
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -4
- package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -66
- package/es/components/ai-chat/src/types/index.d.ts +0 -45
- package/es/components/ai-chat/src/types/index.js +0 -1
- package/es/components/ai-chat/src/utils/index.d.ts +0 -7
- package/es/components/ai-chat/src/utils/index.js +0 -41
- package/es/components/ai-chat/style/index.css +0 -1
- package/es/shared/assets/img/ai__avatar.png.js +0 -3
- package/es/shared/assets/img/file-emr.png.js +0 -3
- package/es/shared/assets/img/file.png.js +0 -3
- package/es/shared/assets/img/logo.png.js +0 -3
- package/es/shared/assets/img/use.png.js +0 -3
@@ -1,12 +1,13 @@
|
|
1
|
-
import { defineComponent, inject,
|
2
|
-
import {
|
1
|
+
import { defineComponent, inject, computed, ref, watch, createVNode, createTextVNode, nextTick } from 'vue';
|
2
|
+
import { LifeCycleTypes } from '@formily/core';
|
3
|
+
import '../../../index.js';
|
3
4
|
import { InjectionFormGlobalProps } from '../../constants/index.js';
|
4
|
-
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
5
5
|
import { createInputSlot } from '../../utils/index.js';
|
6
6
|
import { connect, mapProps } from '@formily/vue';
|
7
7
|
import { NInput } from 'naive-ui';
|
8
8
|
import useLocale from 'naive-ui/es/_mixins/use-locale';
|
9
9
|
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
10
|
+
import { useFormField } from '../../hooks/useFormField.js';
|
10
11
|
|
11
12
|
const script = /* @__PURE__ */ defineComponent({
|
12
13
|
name: "FormInput",
|
@@ -22,17 +23,40 @@ const script = /* @__PURE__ */ defineComponent({
|
|
22
23
|
},
|
23
24
|
placeholder: String,
|
24
25
|
disabled: Boolean,
|
26
|
+
onChange: {},
|
27
|
+
updateKey: {},
|
28
|
+
eventType: {
|
29
|
+
type: String,
|
30
|
+
default: "input"
|
31
|
+
},
|
25
32
|
password: {
|
26
33
|
type: Boolean
|
27
34
|
}
|
28
35
|
},
|
29
|
-
emits: ["update:value"],
|
30
36
|
setup(props, {
|
31
37
|
emit
|
32
38
|
}) {
|
33
39
|
const globProps = inject(InjectionFormGlobalProps);
|
34
|
-
const
|
35
|
-
|
40
|
+
const {
|
41
|
+
getFieldItem,
|
42
|
+
field
|
43
|
+
} = useFormField();
|
44
|
+
const valueRef = computed({
|
45
|
+
get: () => props.value,
|
46
|
+
set(value) {
|
47
|
+
emit("update:value", value);
|
48
|
+
field.value.notify(LifeCycleTypes.ON_FIELD_INPUT_VALUE_CHANGE);
|
49
|
+
}
|
50
|
+
});
|
51
|
+
const isChangeMode = computed(() => {
|
52
|
+
var _a;
|
53
|
+
return props.eventType === "change" || ((_a = getFieldItem()) == null ? void 0 : _a.confirmBeforeValueChange);
|
54
|
+
});
|
55
|
+
const key = ref(1);
|
56
|
+
watch([valueRef, () => props.updateKey], ([n], [o]) => {
|
57
|
+
if (n === void 0 && o !== void 0 || isChangeMode.value)
|
58
|
+
key.value++;
|
59
|
+
});
|
36
60
|
const _slots = createInputSlot(props, (v) => {
|
37
61
|
return [createVNode("i", {
|
38
62
|
"style": {
|
@@ -66,7 +90,15 @@ const script = /* @__PURE__ */ defineComponent({
|
|
66
90
|
"onFocus": onFocus
|
67
91
|
}, [[renderSlotContent("prefix"), valueRef.value ? createVNode("span", null, [valueRef.value]) : createVNode("span", {
|
68
92
|
"class": "form-render__textMode--inputPlaceholder"
|
69
|
-
}, [props.placeholder || ((_a = localeRef.value) == null ? void 0 : _a.placeholder)]), renderSlotContent("suffix")]]) : createVNode(NInput, {
|
93
|
+
}, [props.placeholder || ((_a = localeRef.value) == null ? void 0 : _a.placeholder)]), renderSlotContent("suffix")]]) : isChangeMode.value ? createVNode(NInput, {
|
94
|
+
"ref": inputRef,
|
95
|
+
"type": props.password ? "password" : "text",
|
96
|
+
"key": key.value,
|
97
|
+
"disabled": props.disabled,
|
98
|
+
"placeholder": props.placeholder,
|
99
|
+
"defaultValue": valueRef.value,
|
100
|
+
"onChange": (value) => valueRef.value = value
|
101
|
+
}, _slots.value) : createVNode(NInput, {
|
70
102
|
"ref": inputRef,
|
71
103
|
"type": props.password ? "password" : "text",
|
72
104
|
"key": key.value,
|
@@ -116,8 +116,11 @@ const script = /* @__PURE__ */ defineComponent({
|
|
116
116
|
return;
|
117
117
|
field.value.validator = [{
|
118
118
|
async validator() {
|
119
|
+
var _a;
|
119
120
|
if (!isArray(valueRef.value) || !valueRef.value.length)
|
120
121
|
return;
|
122
|
+
if (((_a = last(valueRef.value)) == null ? void 0 : _a.lvlnr) === (props.wordbook.level_num || Infinity) - 1)
|
123
|
+
return;
|
121
124
|
try {
|
122
125
|
if (await nodeHasChild(last(valueRef.value)))
|
123
126
|
return isString(props.validateLastNode) ? props.validateLastNode : "\u8BF7\u9009\u62E9\u6700\u540E\u4E00\u7EA7\u9009\u9879";
|
@@ -159,6 +159,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
159
159
|
feedbackType: "default" | "tooltip";
|
160
160
|
fixMemoLeak: boolean;
|
161
161
|
lazyRender: boolean;
|
162
|
+
dialogFn: any;
|
162
163
|
}>>;
|
163
164
|
isVerticalLinebar: import("vue").ComputedRef<boolean>;
|
164
165
|
wrapperClass: import("vue").ComputedRef<string[] | "">;
|
@@ -158,6 +158,7 @@ export declare const LINEBAR: import("@vue/runtime-core").DefineComponent<{
|
|
158
158
|
feedbackType: "default" | "tooltip";
|
159
159
|
fixMemoLeak: boolean;
|
160
160
|
lazyRender: boolean;
|
161
|
+
dialogFn: any;
|
161
162
|
}>>;
|
162
163
|
isVerticalLinebar: import("vue").ComputedRef<boolean>;
|
163
164
|
wrapperClass: import("vue").ComputedRef<string[] | "">;
|
@@ -89,12 +89,8 @@ function createComponent(name, Wrapper, Item) {
|
|
89
89
|
return value;
|
90
90
|
}
|
91
91
|
const valueRef = computed({
|
92
|
-
get()
|
93
|
-
|
94
|
-
},
|
95
|
-
set(value) {
|
96
|
-
emit("update:value", value);
|
97
|
-
}
|
92
|
+
get: () => dangerousTypeTransform(props.value),
|
93
|
+
set: (value) => emit("update:value", value)
|
98
94
|
});
|
99
95
|
const {
|
100
96
|
renderComplexOption
|
@@ -159,13 +155,21 @@ function createComponent(name, Wrapper, Item) {
|
|
159
155
|
"onUpdate:checked": ($event) => selectAllState.value = $event,
|
160
156
|
"indeterminate": indeterminate.value
|
161
157
|
}, {
|
162
|
-
default: () => {
|
163
|
-
var _a;
|
164
|
-
|
165
|
-
|
158
|
+
default: () => function() {
|
159
|
+
var _a, _b, _c;
|
160
|
+
try {
|
161
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.37")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.37")) || "\u5168\u9009";
|
162
|
+
} catch (e) {
|
163
|
+
return "\u5168\u9009";
|
164
|
+
}
|
165
|
+
}()
|
166
166
|
});
|
167
167
|
}
|
168
|
+
const {
|
169
|
+
getFieldItem
|
170
|
+
} = useFormField();
|
168
171
|
function renderOption(option) {
|
172
|
+
var _a;
|
169
173
|
let _slot;
|
170
174
|
const childInnerWidthMode = option.__spanPercent && props.childWidthMode === "inner";
|
171
175
|
const style = {
|
@@ -185,6 +189,7 @@ function createComponent(name, Wrapper, Item) {
|
|
185
189
|
"disabled": option.disabled,
|
186
190
|
"currentValue": valueRef.value,
|
187
191
|
"cancelable": props.clearable,
|
192
|
+
"showType": ((_a = getFieldItem()) == null ? void 0 : _a.selected_style) === "CHECK_MARK" ? "checkbox" : "",
|
188
193
|
"onCancel": onCancel,
|
189
194
|
"style": style
|
190
195
|
}, _isSlot(_slot = renderComplexOption({
|
@@ -210,11 +215,11 @@ function createComponent(name, Wrapper, Item) {
|
|
210
215
|
};
|
211
216
|
});
|
212
217
|
const elementStyle = {
|
213
|
-
|
218
|
+
alignItems: props.vertical ? "flex-start" : "center",
|
214
219
|
flexDirection: props.vertical ? "column" : "row",
|
220
|
+
display: "flex",
|
215
221
|
flexWrap: "wrap",
|
216
222
|
justifyItems: "flex-start",
|
217
|
-
alignItems: props.vertical ? "flex-start" : "center",
|
218
223
|
width: "100%"
|
219
224
|
};
|
220
225
|
const _Wrapper = Wrapper;
|
@@ -212,9 +212,15 @@ const script = /* @__PURE__ */ defineComponent({
|
|
212
212
|
"renderTag": renderTag
|
213
213
|
}, {
|
214
214
|
empty() {
|
215
|
-
var _a;
|
216
215
|
return props.useLoading && loading.value ? createVNode(NSpin, null, null) : createVNode(NEmpty, {
|
217
|
-
"description": (
|
216
|
+
"description": function() {
|
217
|
+
var _a, _b, _c;
|
218
|
+
try {
|
219
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.380")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.380")) || "\u65E0\u6570\u636E";
|
220
|
+
} catch (e) {
|
221
|
+
return "\u65E0\u6570\u636E";
|
222
|
+
}
|
223
|
+
}()
|
218
224
|
}, null);
|
219
225
|
},
|
220
226
|
...slots
|
@@ -76,7 +76,6 @@ const script = /* @__PURE__ */ defineComponent({
|
|
76
76
|
emit("update:value", uncheckedValue.value);
|
77
77
|
}
|
78
78
|
function renderSwitch() {
|
79
|
-
var _a, _b, _c;
|
80
79
|
return [createVNode(NSwitch, mergeProps({
|
81
80
|
"value": valueRef.value,
|
82
81
|
"onUpdate:value": ($event) => valueRef.value = $event
|
@@ -88,9 +87,30 @@ const script = /* @__PURE__ */ defineComponent({
|
|
88
87
|
"onUpdate:show": ($event) => showModal.value = $event,
|
89
88
|
"display-directive": "show",
|
90
89
|
"preset": "dialog",
|
91
|
-
"title": (
|
92
|
-
|
93
|
-
|
90
|
+
"title": function() {
|
91
|
+
var _a, _b, _c;
|
92
|
+
try {
|
93
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.428")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.428")) || "\u786E\u8BA4";
|
94
|
+
} catch (e) {
|
95
|
+
return "\u786E\u8BA4";
|
96
|
+
}
|
97
|
+
}(),
|
98
|
+
"positive-text": function() {
|
99
|
+
var _a, _b, _c;
|
100
|
+
try {
|
101
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.428")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.428")) || "\u786E\u8BA4";
|
102
|
+
} catch (e) {
|
103
|
+
return "\u786E\u8BA4";
|
104
|
+
}
|
105
|
+
}(),
|
106
|
+
"negative-text": function() {
|
107
|
+
var _a, _b, _c;
|
108
|
+
try {
|
109
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.28")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.28")) || "\u53D6\u6D88";
|
110
|
+
} catch (e) {
|
111
|
+
return "\u53D6\u6D88";
|
112
|
+
}
|
113
|
+
}(),
|
94
114
|
"content": reminderContent.value,
|
95
115
|
"onPositiveClick": onComfirm
|
96
116
|
}, null) : null];
|
@@ -69,7 +69,7 @@ const script = /* @__PURE__ */ defineComponent({
|
|
69
69
|
const globProps = inject(InjectionFormGlobalProps);
|
70
70
|
const {
|
71
71
|
schemaAdaptor
|
72
|
-
} = useFieldListAdaptor(collector, globProps
|
72
|
+
} = useFieldListAdaptor(collector, globProps);
|
73
73
|
return () => {
|
74
74
|
var _a;
|
75
75
|
if (!hasWidget.value)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { PropType } from 'vue';
|
1
2
|
export declare const TEXTAREA: import("vue").DefineComponent<{
|
2
3
|
value: {
|
3
4
|
type: StringConstructor;
|
@@ -5,6 +6,12 @@ export declare const TEXTAREA: import("vue").DefineComponent<{
|
|
5
6
|
rows: {
|
6
7
|
type: NumberConstructor;
|
7
8
|
};
|
9
|
+
onChange: {};
|
10
|
+
updateKey: {};
|
11
|
+
eventType: {
|
12
|
+
type: PropType<"change" | "input">;
|
13
|
+
default: string;
|
14
|
+
};
|
8
15
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
9
16
|
value: {
|
10
17
|
type: StringConstructor;
|
@@ -12,6 +19,14 @@ export declare const TEXTAREA: import("vue").DefineComponent<{
|
|
12
19
|
rows: {
|
13
20
|
type: NumberConstructor;
|
14
21
|
};
|
22
|
+
onChange: {};
|
23
|
+
updateKey: {};
|
24
|
+
eventType: {
|
25
|
+
type: PropType<"change" | "input">;
|
26
|
+
default: string;
|
27
|
+
};
|
15
28
|
}>> & {
|
16
29
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
17
|
-
}, {
|
30
|
+
}, {
|
31
|
+
eventType: "change" | "input";
|
32
|
+
}>;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { defineComponent, computed, inject, createVNode, mergeProps } from 'vue';
|
1
|
+
import { defineComponent, computed, ref, watch, inject, createVNode, mergeProps } from 'vue';
|
2
|
+
import { LifeCycleTypes } from '@formily/core';
|
3
|
+
import '../../../index.js';
|
2
4
|
import { InjectionFormGlobalProps } from '../../constants/index.js';
|
3
|
-
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
4
5
|
import '../../../../../shared/utils/index.js';
|
5
|
-
import '@formily/core';
|
6
6
|
import '@formily/path';
|
7
7
|
import '@vicons/ionicons5';
|
8
8
|
import '@vue/shared';
|
@@ -12,7 +12,8 @@ import { NInput } from 'naive-ui';
|
|
12
12
|
import './text.js';
|
13
13
|
import '../../utils/business.js';
|
14
14
|
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
15
|
-
import { connect, mapProps
|
15
|
+
import { connect, mapProps } from '@formily/vue';
|
16
|
+
import { useFormField } from '../../hooks/useFormField.js';
|
16
17
|
|
17
18
|
const script = /* @__PURE__ */ defineComponent({
|
18
19
|
name: "FormTextarea",
|
@@ -22,18 +23,38 @@ const script = /* @__PURE__ */ defineComponent({
|
|
22
23
|
},
|
23
24
|
rows: {
|
24
25
|
type: Number
|
26
|
+
},
|
27
|
+
onChange: {},
|
28
|
+
updateKey: {},
|
29
|
+
eventType: {
|
30
|
+
type: String,
|
31
|
+
default: "input"
|
25
32
|
}
|
26
33
|
},
|
27
34
|
emits: ["update:value"],
|
28
35
|
setup(props, {
|
29
36
|
emit
|
30
37
|
}) {
|
38
|
+
const {
|
39
|
+
getFieldItem,
|
40
|
+
field
|
41
|
+
} = useFormField();
|
31
42
|
const valueRef = computed({
|
32
43
|
get: () => props.value,
|
33
|
-
set: (v) =>
|
44
|
+
set: (v) => {
|
45
|
+
emit("update:value", v);
|
46
|
+
field.value.notify(LifeCycleTypes.ON_FIELD_INPUT_VALUE_CHANGE);
|
47
|
+
}
|
48
|
+
});
|
49
|
+
const isChangeMode = computed(() => {
|
50
|
+
var _a;
|
51
|
+
return props.eventType === "change" || ((_a = getFieldItem()) == null ? void 0 : _a.confirmBeforeValueChange);
|
52
|
+
});
|
53
|
+
const key = ref(1);
|
54
|
+
watch([valueRef, () => props.updateKey], ([n], [o]) => {
|
55
|
+
if (n === void 0 && o !== void 0 || isChangeMode.value)
|
56
|
+
key.value++;
|
34
57
|
});
|
35
|
-
const key = useCommonInjection().injectValueBindKey(valueRef);
|
36
|
-
const field = useField();
|
37
58
|
const globProps = inject(InjectionFormGlobalProps, {});
|
38
59
|
const borderState = computed(() => {
|
39
60
|
var _a, _b, _c;
|
@@ -50,7 +71,14 @@ const script = /* @__PURE__ */ defineComponent({
|
|
50
71
|
};
|
51
72
|
});
|
52
73
|
return () => {
|
53
|
-
|
74
|
+
var _a;
|
75
|
+
return props.eventType === "change" || ((_a = getFieldItem()) == null ? void 0 : _a.confirmBeforeValueChange) ? createVNode(NInput, mergeProps({
|
76
|
+
"type": "textarea"
|
77
|
+
}, rowsProps.value, {
|
78
|
+
"key": key.value,
|
79
|
+
"defaultValue": valueRef.value,
|
80
|
+
"onChange": (value) => valueRef.value = value
|
81
|
+
}), null) : createVNode(NInput, mergeProps({
|
54
82
|
"type": "textarea"
|
55
83
|
}, rowsProps.value, {
|
56
84
|
"key": key.value,
|
@@ -11,6 +11,7 @@ import '@vueuse/core';
|
|
11
11
|
import 'naive-ui';
|
12
12
|
import '../components/renderer/text.js';
|
13
13
|
import { isIdCard, parseIdCard, parseAgeFromContext, parseBirthday, parseAge2Birthday } from '../utils/business.js';
|
14
|
+
import '../../index.js';
|
14
15
|
|
15
16
|
class BusinessCollector {
|
16
17
|
constructor(businessFormatter) {
|
@@ -3,7 +3,7 @@ import { checkInSetupEnv } from '../../../../shared/utils/index.js';
|
|
3
3
|
import { useField, useForm, RecursionField } from '@formily/vue';
|
4
4
|
import { isArray, noop, isEmpty } from 'lodash-es';
|
5
5
|
import '../../index.js';
|
6
|
-
import { InjectionFormUUID, InjectionBusinessCollector } from '../constants/index.js';
|
6
|
+
import { InjectionFormUUID, InjectionBusinessCollector, InjectionFormGlobalProps } from '../constants/index.js';
|
7
7
|
import { renderOptionLabel, renderDescOption } from '../utils/index.js';
|
8
8
|
import { useFieldListAdaptor } from './useFieldListAdaptor.js';
|
9
9
|
import { createObjSchema } from '../utils/schema.js';
|
@@ -60,9 +60,10 @@ const ChildSchemaField = /* @__PURE__ */ defineComponent({
|
|
60
60
|
function prepend(fieldKey) {
|
61
61
|
return `${virtualField}.${fieldKey}`;
|
62
62
|
}
|
63
|
+
const globProps = inject(InjectionFormGlobalProps);
|
63
64
|
const {
|
64
65
|
schemaAdaptor
|
65
|
-
} = useFieldListAdaptor(collector);
|
66
|
+
} = useFieldListAdaptor(collector, globProps);
|
66
67
|
function assignConfig(schema2) {
|
67
68
|
var _a, _b, _c, _d;
|
68
69
|
return Object.assign(schema2, {
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { BusinessCollector, FormRenderProps
|
1
|
+
import { BusinessCollector, FormRenderProps } from '../../../../components/form-render';
|
2
2
|
import { FieldItem } from '../types';
|
3
3
|
/**
|
4
4
|
* @description 胶水层, 将低代码平台中的fieldList转换为JSONSchema
|
5
5
|
*/
|
6
|
-
export declare function useFieldListAdaptor(collector?: BusinessCollector,
|
6
|
+
export declare function useFieldListAdaptor(collector?: BusinessCollector, globProps?: FormRenderProps): {
|
7
7
|
schemaAdaptor: (fieldList: FieldItem[], options?: FormRenderProps) => Record<string, import("@formily/json-schema/esm/types").Stringify<{
|
8
8
|
[key: symbol]: any;
|
9
9
|
[key: `x-${string}`]: any;
|
@@ -17,12 +17,12 @@ function bindUrlProps(schema, item) {
|
|
17
17
|
...pick(item, ["urlConfig", "wordbook"])
|
18
18
|
});
|
19
19
|
}
|
20
|
-
function useFieldListAdaptor(collector,
|
20
|
+
function useFieldListAdaptor(collector, globProps) {
|
21
21
|
const {
|
22
22
|
createValidatorSchema
|
23
23
|
} = useFormValidator();
|
24
24
|
const createStandardSchema = (item) => {
|
25
|
-
var _a;
|
25
|
+
var _a, _b;
|
26
26
|
const result = {
|
27
27
|
name: item.val_key,
|
28
28
|
type: (_a = item.fieldType) != null ? _a : "string",
|
@@ -57,7 +57,8 @@ function useFieldListAdaptor(collector, hooks) {
|
|
57
57
|
"x-decorator": "FORM_ITEM",
|
58
58
|
"x-decorator-props": {
|
59
59
|
fieldItem: item,
|
60
|
-
beforeSetValue:
|
60
|
+
beforeSetValue: (_b = globProps == null ? void 0 : globProps.lifeCycle) == null ? void 0 : _b.beforeSetValue,
|
61
|
+
dialogFn: globProps == null ? void 0 : globProps.dialogFn,
|
61
62
|
span: (item.elem_width || 3) * 2,
|
62
63
|
showLabel: !isPositive(item.hide_title),
|
63
64
|
remark: item.remark,
|
@@ -107,6 +107,7 @@ export declare function useFieldNormalize(): {
|
|
107
107
|
feedbackType: "default" | "tooltip";
|
108
108
|
fixMemoLeak: boolean;
|
109
109
|
lazyRender: boolean;
|
110
|
+
dialogFn: any;
|
110
111
|
}>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
111
112
|
FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], Partial<{
|
112
113
|
fieldList: FieldItem[];
|
@@ -214,5 +215,6 @@ export declare function useFieldNormalize(): {
|
|
214
215
|
feedbackType: "default" | "tooltip";
|
215
216
|
fixMemoLeak: boolean;
|
216
217
|
lazyRender: boolean;
|
218
|
+
dialogFn: any;
|
217
219
|
}>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
218
220
|
};
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { GeneralField } from '@formily/core';
|
2
|
+
import { FieldItem } from '../../../../components/form-render';
|
2
3
|
export declare function useFormField<T extends GeneralField>(): {
|
3
4
|
field: import("vue").Ref<T>;
|
4
5
|
title: import("vue").ComputedRef<any>;
|
5
6
|
fieldKey: import("vue").ComputedRef<string>;
|
6
7
|
fieldAddress: import("vue").ComputedRef<string>;
|
8
|
+
getFieldItem(): FieldItem | undefined;
|
7
9
|
};
|
@@ -7,7 +7,11 @@ function useFormField() {
|
|
7
7
|
field,
|
8
8
|
title: computed(() => field.value.title),
|
9
9
|
fieldKey: computed(() => field.value.props.name.toString()),
|
10
|
-
fieldAddress: computed(() => field.value.address.toString())
|
10
|
+
fieldAddress: computed(() => field.value.address.toString()),
|
11
|
+
getFieldItem() {
|
12
|
+
var _a, _b;
|
13
|
+
return (_b = (_a = field.value) == null ? void 0 : _a.decoratorProps) == null ? void 0 : _b.fieldItem;
|
14
|
+
}
|
11
15
|
};
|
12
16
|
}
|
13
17
|
|
@@ -9,6 +9,7 @@ import { isFunction } from '@vueuse/core';
|
|
9
9
|
import 'naive-ui';
|
10
10
|
import '../components/renderer/text.js';
|
11
11
|
import { isIdCard } from '../utils/business.js';
|
12
|
+
import '../../index.js';
|
12
13
|
|
13
14
|
function useFormValidator() {
|
14
15
|
const validateMap = /* @__PURE__ */ new Map([["mobile", ({
|
@@ -138,6 +138,17 @@ export type FieldItem = {
|
|
138
138
|
linebarTextDirection: 'horizontal' | 'vertical';
|
139
139
|
labelColor: string;
|
140
140
|
fieldTitleRed: FormCommonState | boolean;
|
141
|
+
confirmBeforeValueChange: boolean;
|
142
|
+
confirmBeforeValueChangeProps: {
|
143
|
+
content: string | ((params: {
|
144
|
+
fieldName: string;
|
145
|
+
newValue: any;
|
146
|
+
oldValue: any;
|
147
|
+
}) => any);
|
148
|
+
updateOriginValue: boolean;
|
149
|
+
[key: string]: any;
|
150
|
+
};
|
151
|
+
selected_style: 'RADIO_MARK' | 'CHECK_MARK';
|
141
152
|
fieldTitleColor: string;
|
142
153
|
fieldType: SchemaTypes;
|
143
154
|
content: string | FormRenderer | Record<string, FormRenderer>;
|
@@ -10,6 +10,7 @@ import { NTooltip, NIcon } from 'naive-ui';
|
|
10
10
|
import { NESTED_FORM_ITEM_TYPE } from '../constants/index.js';
|
11
11
|
import { TEXT } from '../components/renderer/text.js';
|
12
12
|
export { businessDateParser, isForeignerID, isIdCard, isMobile, parseAge2Birthday, parseAgeFromContext, parseBirthday, parseIdCard, transformDateFormat } from './business.js';
|
13
|
+
import '../../index.js';
|
13
14
|
|
14
15
|
function formRenderLog(message) {
|
15
16
|
console.warn(`[FormRender]: ${message}`);
|
@@ -1,13 +1,14 @@
|
|
1
|
+
import { uuidGenerator } from '../../../../shared/utils/index.js';
|
1
2
|
import { isField } from '@formily/core';
|
2
3
|
import { isObject, isPromise } from '@vue/shared';
|
3
4
|
import { isString, isArray, isFunction, noop } from 'lodash-es';
|
5
|
+
import '../../index.js';
|
6
|
+
import { parseEnhanceText } from './index.js';
|
4
7
|
|
5
8
|
function traverseSchema(schema, handler, parent) {
|
6
9
|
handler(schema, parent);
|
7
10
|
if (isObject(schema.properties)) {
|
8
|
-
Object.values(schema.properties).forEach((_s) =>
|
9
|
-
traverseSchema(_s, handler, schema);
|
10
|
-
});
|
11
|
+
Object.values(schema.properties).forEach((_s) => traverseSchema(_s, handler, schema));
|
11
12
|
}
|
12
13
|
}
|
13
14
|
function fieldKeyEscape(fieldList) {
|
@@ -45,9 +46,7 @@ function traverseDependKey(dependKeys, handler) {
|
|
45
46
|
}
|
46
47
|
});
|
47
48
|
} else if (isObject(dependKeys)) {
|
48
|
-
Object.entries(dependKeys).forEach(([k, v]) =>
|
49
|
-
result.set(k, v);
|
50
|
-
});
|
49
|
+
Object.entries(dependKeys).forEach(([k, v]) => result.set(k, v));
|
51
50
|
} else if (isString(dependKeys)) {
|
52
51
|
result.set(dependKeys, dependKeys);
|
53
52
|
}
|
@@ -71,25 +70,91 @@ function getParentLinebar(key, fieldList) {
|
|
71
70
|
return field.html_type === "LINEBAR";
|
72
71
|
}
|
73
72
|
}
|
73
|
+
function isEmptyValue(v1) {
|
74
|
+
return [null, void 0, ""].includes(v1);
|
75
|
+
}
|
76
|
+
function getOrInit(origin, key, initValue) {
|
77
|
+
return key in origin ? origin[key] : origin[key] = initValue;
|
78
|
+
}
|
79
|
+
const DEFAULT_TEXT = '\u60A8\u5C06\u628A\u654F\u611F\u5B57\u6BB5"#{fieldName}"\u7531#{oldValue}\u6539\u4E3A#{newValue}\uFF0C\u8BF7\u52A1\u5FC5\u786E\u8BA4\u66F4\u6539\u524D\u540E\u7684\u6863\u6848\u5747\u4E3A\u540C\u4E00\u4EBA\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u9020\u6210\u60A3\u8005\u6863\u6848\u6DF7\u4E71\u7684\u4E25\u91CD\u540E\u679C\uFF01\uFF01\uFF01';
|
74
80
|
function assignUpdateValue(props, field) {
|
75
81
|
const _props = {
|
76
82
|
...props
|
77
83
|
};
|
78
84
|
if (isField(field)) {
|
79
85
|
Object.assign(_props, {
|
80
|
-
"onUpdate:value"(value) {
|
81
|
-
|
82
|
-
const
|
86
|
+
async "onUpdate:value"(value) {
|
87
|
+
const $dialog = field.decoratorProps.dialogFn;
|
88
|
+
const fieldItem = field.decoratorProps.fieldItem;
|
89
|
+
const {
|
90
|
+
confirmBeforeValueChangeProps: dialogProps,
|
91
|
+
confirmBeforeValueChange: confirm,
|
92
|
+
confirmBeforeValueChangeText: confirmText
|
93
|
+
} = fieldItem;
|
94
|
+
const oldValue = (dialogProps == null ? void 0 : dialogProps.updateOriginValue) ? field.value : getOrInit(fieldItem, "__oldValue", field.value);
|
95
|
+
const valueMap = {
|
96
|
+
newValue: value,
|
97
|
+
oldValue,
|
98
|
+
fieldName: field.title
|
99
|
+
};
|
100
|
+
if (confirm && $dialog && !isEmptyValue(oldValue) && oldValue !== value) {
|
101
|
+
try {
|
102
|
+
await new Promise((resolve, reject) => {
|
103
|
+
const params = {
|
104
|
+
title: function() {
|
105
|
+
var _a, _b, _c;
|
106
|
+
try {
|
107
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.228")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.228")) || "\u8B66\u544A";
|
108
|
+
} catch (e) {
|
109
|
+
return "\u8B66\u544A";
|
110
|
+
}
|
111
|
+
}(),
|
112
|
+
positiveText: function() {
|
113
|
+
var _a, _b, _c;
|
114
|
+
try {
|
115
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.27")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.27")) || "\u786E\u5B9A";
|
116
|
+
} catch (e) {
|
117
|
+
return "\u786E\u5B9A";
|
118
|
+
}
|
119
|
+
}(),
|
120
|
+
negativeText: function() {
|
121
|
+
var _a, _b, _c;
|
122
|
+
try {
|
123
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.28")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.28")) || "\u53D6\u6D88";
|
124
|
+
} catch (e) {
|
125
|
+
return "\u53D6\u6D88";
|
126
|
+
}
|
127
|
+
}(),
|
128
|
+
onPositiveClick: resolve,
|
129
|
+
onNegativeClick: reject,
|
130
|
+
content: confirmText != null ? confirmText : DEFAULT_TEXT,
|
131
|
+
...fieldItem.confirmBeforeValueChangeProps
|
132
|
+
};
|
133
|
+
const _content = params.content;
|
134
|
+
isFunction(_content) && (params.content = () => _content(valueMap));
|
135
|
+
isString(_content) && (params.content = parseEnhanceText(_content).reduce((res, item) => {
|
136
|
+
var _a;
|
137
|
+
if (item.type === "text")
|
138
|
+
res += item.content;
|
139
|
+
if (item.type === "widget")
|
140
|
+
res += (_a = valueMap[item.content]) != null ? _a : field.value;
|
141
|
+
return res;
|
142
|
+
}, ""));
|
143
|
+
$dialog.warning(params);
|
144
|
+
});
|
145
|
+
} catch (e) {
|
146
|
+
field.setValue(oldValue);
|
147
|
+
field.componentProps.updateKey = uuidGenerator();
|
148
|
+
return;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
const beforeSetValue = field.decoratorProps.beforeSetValue;
|
83
152
|
if (isFunction(beforeSetValue)) {
|
84
153
|
const res = beforeSetValue(field.path.toString(), value, {
|
85
154
|
field,
|
86
|
-
oldValue
|
155
|
+
oldValue
|
87
156
|
});
|
88
|
-
|
89
|
-
return res.then((v) => field.setValue(v), noop);
|
90
|
-
} else {
|
91
|
-
return field.setValue(res);
|
92
|
-
}
|
157
|
+
return isPromise(res) ? res.then((v) => field.setValue(v), noop) : field.setValue(res);
|
93
158
|
}
|
94
159
|
field.setValue(value);
|
95
160
|
}
|