cnhis-design-vue 3.2.14-release.1 → 3.2.15-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/ai-chat/index.d.ts +1 -0
- package/es/components/ai-chat/src/Index.vue.d.ts +1 -0
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +1 -0
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/base-search/index.d.ts +8 -3
- package/es/components/base-search/src/index.vue.d.ts +8 -3
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/big-table/src/BigTable.vue2.js +1 -1
- package/es/components/big-table/src/components/NoData.vue2.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
- package/es/components/big-table/src/components/input-button.vue2.js +1 -1
- package/es/components/big-table/src/hooks/useNestTable.js +1 -1
- package/es/components/big-table/src/hooks/useTableParse.js +1 -1
- package/es/components/body-select/src/index.vue2.js +1 -1
- package/es/components/branch-notice/index.d.ts +479 -0
- package/es/components/branch-notice/index.js +1 -0
- package/es/components/branch-notice/src/BranchNotice.vue.d.ts +433 -0
- package/es/components/branch-notice/src/BranchNotice.vue.js +1 -0
- package/es/components/branch-notice/src/BranchNotice.vue2.js +1 -0
- package/es/components/branch-notice/src/canstants.d.ts +8 -0
- package/es/components/branch-notice/src/canstants.js +1 -0
- package/es/components/branch-notice/src/components/NoticeItem.vue.d.ts +275 -0
- package/es/components/branch-notice/src/components/NoticeItem.vue.js +1 -0
- package/es/components/branch-notice/src/components/NoticeItem.vue2.js +1 -0
- package/es/components/branch-notice/src/components/NoticeItemAside.vue.d.ts +104 -0
- package/es/components/branch-notice/src/components/NoticeItemAside.vue.js +1 -0
- package/es/components/branch-notice/src/components/NoticeItemAside.vue2.js +1 -0
- package/es/components/branch-notice/src/components/NoticeOperationList.vue.d.ts +49 -0
- package/es/components/branch-notice/src/components/NoticeOperationList.vue.js +1 -0
- package/es/components/branch-notice/src/components/NoticeOperationList.vue2.js +1 -0
- package/es/components/branch-notice/src/drawLine.d.ts +2 -0
- package/es/components/branch-notice/src/drawLine.js +1 -0
- package/es/components/branch-notice/src/hooks/useTheme.d.ts +1 -0
- package/es/components/branch-notice/src/hooks/useTheme.js +1 -0
- package/es/components/branch-notice/src/types.d.ts +32 -0
- package/es/components/branch-notice/src/types.js +1 -0
- package/es/components/branch-notice/style/index.css +1 -0
- package/es/components/button-print/index.d.ts +4 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue2.js +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/Preview.vue2.js +1 -1
- package/es/components/button-print/src/utils/dialog.js +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/calendar/index.d.ts +4 -4
- package/es/components/calendar/src/Calendar.vue.d.ts +4 -4
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -1
- package/es/components/card-reader-sdk/src/utils/readHealthCard.js +1 -1
- package/es/components/classification/index.d.ts +1 -0
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
- package/es/components/classification/src/index.vue.d.ts +1 -0
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/default-page/src/constants/index.js +1 -1
- package/es/components/default-page/src/index.vue2.js +1 -1
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
- package/es/components/expand-field/src/components/FormItemPerson.vue2.js +1 -1
- package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/expand-field/src/utils/constant.js +1 -1
- package/es/components/fabric-chart/index.d.ts +23 -4
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +23 -4
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/useStyle.js +1 -1
- package/es/components/fabric-chart/src/constants/index.d.ts +1 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/fabric-chart/src/hooks/{temperature/useShadow.d.ts → useShadow.d.ts} +2 -2
- package/es/components/fabric-chart/src/hooks/useShadow.js +1 -0
- package/es/components/fabric-chart/src/interface.d.ts +3 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +2 -1
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +4 -4
- package/es/components/field-set/src/FieldColor.vue2.js +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +7 -5
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +3 -3
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/TableStyle.vue2.js +1 -1
- package/es/components/field-set/src/components/condition.vue2.js +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
- package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +3 -3
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/field-set/src/constants/filter.d.ts +21 -12
- package/es/components/field-set/src/constants/filter.js +1 -1
- package/es/components/field-set/src/constants/index.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -1
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/form-config/index.d.ts +108 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +108 -3
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useLocale.js +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- 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 +1 -1
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/complex.js +1 -1
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/components/renderer/text.js +1 -1
- package/es/components/form-render/src/components/renderer/textarea.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-chat/index.d.ts +885 -66
- package/es/components/iho-chat/src/Index.vue.d.ts +888 -73
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.d.ts +1 -0
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +33 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +54 -3
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +54 -2
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +232 -13
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +86 -7
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +20 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +44 -5
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +75 -5
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +53 -2
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +21 -2
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +276 -5
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +20 -1
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/components/userItemRender.d.ts +18 -0
- package/es/components/iho-chat/src/components/userItemRender.js +1 -0
- package/es/components/iho-chat/src/constants/index.d.ts +12 -3
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
- package/es/components/iho-chat/src/hooks/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useData.d.ts +96 -0
- package/es/components/iho-chat/src/hooks/useData.js +1 -0
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +20 -1
- package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
- package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
- package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
- package/es/components/iho-chat/src/types/index.d.ts +2 -6
- package/es/components/iho-chat/src/types/index.js +1 -1
- package/es/components/iho-chat/src/utils/chatSock.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +2 -0
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
- package/es/components/map/src/Map.vue2.js +1 -1
- package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
- package/es/components/quick-search/index.d.ts +3 -1
- package/es/components/quick-search/src/index.vue.d.ts +3 -1
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/recommend-search/src/components/BaseSearch.js +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
- package/es/components/scale-view/index.d.ts +31 -0
- package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/NoData.vue2.js +1 -1
- package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +1 -1
- package/es/components/select-person/src/index.vue2.js +1 -1
- package/es/components/slider-tree/src/index.vue2.js +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
- package/es/components/table-export-field/src/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +3 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/tool/baseOptions.js +1 -1
- package/es/components/template-render/src/components/index.d.ts +23 -23
- package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/ai__avatar.png.js +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/logo.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/hooks/useLevelSearchCascader.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- 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/components/fabric-chart/src/hooks/temperature/useShadow.js +0 -1
- package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
- package/es/components/iho-chat/src/hooks/useSession.js +0 -1
- package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
- package/es/components/iho-chat/src/hooks/useState.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
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as o,computed as r,watch as n,onMounted as t,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as
|
1
|
+
import{defineComponent as e,ref as o,computed as r,watch as n,onMounted as t,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as a}from"@formily/path";import{AddCircleOutline as u,RemoveCircle as m}from"@vicons/ionicons5";import{range as s,isNumber as p,isArray as c,isEqual as f}from"lodash-es";import"../../../../index.js";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{connect as d,mapProps as y}from"@formily/vue";import{useDebounceFn as h,isObject as N}from"@vueuse/core";import{NButton as g,NIcon as b}from"naive-ui";import x from"../../../FormRender.vue.js";import{formRenderLog as C,mergeDeepProperties as _}from"../../../utils/index.js";import{assignUpdateValue as j}from"../../../utils/schema.js";const G=d(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},properties:{type:Array,default:()=>[]},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:d}){C("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const y=h((function(){d("update:value",JSON.stringify(j.value))}),300),j=o([]),G=r((()=>j.value.length));function I(o,r=!1){c(o)&&(o.length||o.push(...s(e.minGroupNum).map((()=>({})))),o=JSON.stringify(o));const n=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var t;(t=n)&&!f(t,j.value)&&(n.splice(F.value),n.forEach((function(o,n){if(!N(o))return;j.value[n]=o,r&&_(o,e.properties)})),j.value.splice(n.length),j.value.forEach(w))}n((()=>e.value),(e=>I(e))),t((()=>{const o=`[${s(e.minGroupNum).map((()=>"{}")).join(",")}]`;I(e.value||o,!0),y()}));const S=o([]);function w(e,o){var r;null==(r=S.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=a.getIn(e,o.path))}))}function A(){j.value.push(_({},e.properties)),y()}v().bindDeepValidate(S);const F=r((()=>p(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));n(F,(e=>{G.value<=e||(j.value.splice(e),y(),S.value.splice(e))}),{immediate:!0});const J=x;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(g,{onClick:A,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:G.value>=F.value},{icon:()=>i(b,{component:u},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.279"))||"新增"}})]),s(G.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(J,{ref:e=>function(e,o){S.value[e]=o,w(j.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!j.value[e]&&(j.value[e]={}),a.setIn(j.value[e],o,r),y()}(r,e)},null),i(g,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(o){j.value.length>e.minGroupNum?(j.value.splice(o,1),S.value.splice(o,1)):j.value.splice(o,1,{}),y()}(r)},{icon:()=>i(b,{component:m},null)})])))])}}),y(j));export{G as JSON_COMBINATION};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as
|
1
|
+
import{defineComponent as e,ref as o,watch as a,onMounted as t,createVNode as l}from"vue";import{arrayed as u}from"../../../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{connect as i,mapProps as n}from"@formily/vue";import{isArray as m,range as s,property as p}from"lodash-es";import"../../../../index.js";import"../../../../../iho-table/index.js";import d from"../../../../../iho-table/src/IhoTable.vue.js";import{useCombination as v}from"./hooks/useCombination.js";import{assignUpdateValue as f}from"../../../utils/schema.js";import{useColumnConfigAdaptor as c}from"../../../../../iho-table/src/hooks/useColumnConfigAdaptor.js";import{useFormField as b}from"../../../hooks/useFormField.js";const h=i(e({name:"FormTableCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:i}){var n;const{field:f}=b(),{formConfigLikeAdaptor:h}=c(),{fieldList:y,editRules:N}=h({fieldList:e.properties}),{currentGroupNum:g,renderRemoveBtn:j,renderHeader:C}=v(e),w=o({editRules:N}),x=o(e.value);async function G(){g.value++,m(x.value)?x.value.push({}):(x.value=[{}],i("update:value",x.value))}a((()=>e.value),(e=>{x.value=e}));const k=y.concat({alias:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.241"))||"操作",columnName:"operation",width:60,isFixed:2,align:"center",slots:{default:({rowIndex:o})=>j({onClick:()=>async function(o){if(m(x.value))if(g.value>e.minGroupNum)g.value--,x.value.splice(o,1);else{const e=x.value[0];y.forEach((o=>{o.columnName&&(o.defaultValue?e[o.columnName]=o.defaultValue:Reflect.deleteProperty(e,o.columnName))}))}}(o)},o)}});t((()=>{if(!m(x.value))return x.value=s(e.minGroupNum).map((()=>({}))),void i("update:value",x.value);!x.value.length&&e.minGroupNum&&x.value.push(...s(e.minGroupNum).map((()=>({}))))}));const B=o();async function F(){if(!B.value)return;const e=await B.value.$table.validate(!0);return e?Object.values(e).map((e=>e.map(p("rule.message")))).join(","):""}return t((()=>{if(!r(f.value))return;const e=f.value.validator;f.value.validator=[{validator:F},...e?u(e):[]]})),()=>l("section",{class:"form-render__combination"},[C({onClick:G}),l(d,{ref:B,fieldList:k,tableConfig:w.value,tableData:x.value},null)])}}),n(f));export{h as TABLE_COMBINATION};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,createVNode as
|
1
|
+
import{defineComponent as e,createVNode as t}from"vue";import{connect as r,mapProps as o}from"@formily/vue";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"naive-ui";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as s}from"../../utils/schema.js";const i=r(e({props:{onChange:{},span:{type:Number,default:6},display:{type:String,default:"grid"},wrapperStyle:{type:Object,default:()=>({})}},setup:(e,{slots:r})=>()=>t("section",{class:"form-render__complex"},[t("section",{class:`form-render__complexContent--${e.display}`,style:e.wrapperStyle},[r.default&&r.default()])])}),o(s));export{i as COMPLEX};
|
@@ -1 +1 @@
|
|
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"../../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};
|
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};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as t,inject as l,createVNode as a,mergeProps as o,isVNode as n}from"vue";import i from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{connect as r,mapProps as u}from"@formily/vue";import{cloneDeep as s,isArray as
|
1
|
+
import{defineComponent as e,computed as t,inject as l,createVNode as a,mergeProps as o,isVNode as n}from"vue";import i from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{connect as r,mapProps as u}from"@formily/vue";import{cloneDeep as s,isArray as d,xor as c,isNumber as p,isEmpty as v}from"lodash-es";import{NCheckboxGroup as m,NCheckbox as f,NRadioGroup as h}from"naive-ui";import"../../../index.js";import{InjectionChangeContextCollector as y}from"../../constants/index.js";import{useComplexOptions as g}from"../../hooks/useComplexOptions.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as j,createVisitedSetter as b}from"../../utils/schema.js";import{useUrlConfigOptions as x,useAutographOptions as C}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as F}from"../../hooks/useCommonInjection.js";import{useFormField as k}from"../../hooks/useFormField.js";function S(i,r,u){return e({name:i,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},urlConfig:{type:Object},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},childWidthMode:{type:String,default:"outer"},clearable:Boolean,selectAll:Boolean,onChange:{}},emits:["update:value"],setup(e,{emit:i,attrs:h}){const{field:j,fieldKey:S}=k();const w=t({get(){return t=e.value,p(t)?t+"":t;var t},set(e){i("update:value",e)}}),{renderComplexOption:O}=g(e,w),{labelKey:B,valueKey:_,fullOptions:K}=e.urlConfig?x(e,w):C(e,w);l(y).setContext(S.value,(e=>{return{currentOption:s((t=e,d(t)?function(e){const t=K.value.reduce(((e,t)=>(e[t[_.value]]=t,e)),{});return e.map((e=>t[e]))}(t):(l=t,K.value.find((e=>e[_.value]===l))))),labelField:B.value,valueField:_.value};var t,l}));const{injectValueBindKey:W,injectValueValidate:R}=F();R(w);const A=W(w);function I(){w.value=null}const M=t({get:()=>d(w.value)&&w.value.length===K.value.length,set(e){const t=e?K.value.map((e=>e[_.value])):[];c(t,w.value).length&&(w.value=t)}}),V=t((()=>d(e.value)&&e.value.length&&e.value.length<K.value.length));function P(t){let l;const o={display:"flex",alignItems:"center"};if(t.__spanPercent&&"inner"===e.childWidthMode){const e=`${t.__spanPercent}%`;o.maxWidth=e,function(e,t){return!v(t.childrenFields)&&(d(e)?e.includes(t[_.value]):e===t[_.value])}(w.value,t)&&(o.width=e)}return a(u,{key:t[_.value],value:t[_.value],disabled:t.disabled,currentValue:w.value,cancelable:e.clearable,onCancel:I,style:o},"function"==typeof(i=l=O({value:w.value,option:t,valueKey:_.value,labelKey:B.value,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode}))||"[object Object]"===Object.prototype.toString.call(i)&&!n(i)?l:{default:()=>[l]});var i}return()=>{const t=K.value.map((e=>{var t;const l=null==(t=e.childrenFields)?void 0:t.reduce(((e,t)=>e+ +(t.elem_width||3)),0);return{...e,__spanPercent:(l||0)/12*100}})),l={display:"flex",flexDirection:e.vertical?"column":"row",flexWrap:"wrap",justifyItems:"flex-start",alignItems:e.vertical?"flex-start":"center",width:"100%"},n=a(r,o({key:A.value,value:w.value,"onUpdate:value":e=>w.value=e,onClick:b(j),style:{width:"100%"}},h),{default:()=>[a("section",{style:l},[t.map(P)])]});return e.selectAll?a("section",null,[[r!==m?null:a(f,{checked:M.value,"onUpdate:checked":e=>M.value=e,indeterminate:V.value},{default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.37"))||"全选"}}),n]]):n}}})}const w=r(S("FormRadio",h,i),u({dataSource:"options"},j)),O=r(S("FormCheckbox",m,f),u({dataSource:"options"},j));export{O as CHECKBOX,w as RADIO};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,watch as l,inject as a,computed as o,ref as t,createVNode as
|
1
|
+
import{defineComponent as e,watch as l,inject as a,computed as o,ref as t,createVNode as n}from"vue";import{connect as u,mapProps as r}from"@formily/vue";import{HelpCircleSharp as i}from"@vicons/ionicons5";import{useVModel as s,useDebounceFn as v}from"@vueuse/core";import{cloneDeep as p,isString as d}from"lodash-es";import{NSelect as m,NSpin as c,NEmpty as f,NTooltip as y,NIcon as g,NTag as h}from"naive-ui";import"../../../index.js";import{InjectionChangeContextCollector as C}from"../../constants/index.js";import{useCommonInjection as b,useSelectOptionProps as F}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as j,assignClearBindVisited as w,createVisitedSetter as B}from"../../utils/schema.js";import{useFormField as S}from"../../hooks/useFormField.js";import{useUrlConfigOptions as x,useAutographOptions as K}from"../../hooks/useFormRenderOptions.js";const k=u(e({name:"FormRemoteSearch",props:{value:{type:[String,Number,Array]},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},allowCreate:Boolean,labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},onChange:{},useLoading:{type:Boolean,default:!0},lazyRequest:{type:Boolean,default:!0},multiple:Boolean,deletable:Boolean},emits:["update:value"],setup(e,{slots:u,emit:r}){const j=s(e,"value",r),{field:w,fieldKey:k}=S(),{injectValueValidate:O,injectValueBindKey:D}=b();O(j);const L=D(j),R={onRequestConfigChange:({fetchData:e,valueKey:l})=>e(j.value,{[l]:j.value}),onDepsChange:({fetchData:e,valueKey:l})=>e(j.value,{[l]:j.value})},{labelKey:q,valueKey:P,showKey:V,fetchData:A,searchContent:I,fullOptions:U,loading:z}=e.urlConfig?x(e,j,R):K(e,j,R),N=v(((e,l="label")=>A(e,{["value"===l?P.value:"keyword"]:e},{avoidSearchContent:!1})),300);l(j,(e=>{if(e&&!U.value.find((l=>l[P.value]===e)))return N(e,"value")}),{immediate:!0});a(C).setContext(k.value,(e=>{return{currentOption:p((l=e,U.value.find((e=>e[P.value]===l)))),labelField:q.value,valueField:P.value};var l}));const{menuProps:T,nodeProps:$}=F(),E=o((()=>U.value.length||!e.allowCreate?U.value:I.value?[{[q.value]:I.value,[P.value]:I.value},...U.value]:U.value));async function G(e){z.value=e,e&&N()}function H(e){const l=e.alias||e[q.value];if(!l||!d(l))return"";const a=l;return e.desc?n("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[a,e.desc?n(y,null,{trigger:()=>n(g,{component:i},null),default:()=>e.desc}):null]):a}function J({option:l,handleClose:a}){var o;const t=null!=(o=V.value&&l[V.value])?o:l[q.value];if(!e.multiple)return M.value=t,t;return M.value="",e.deletable?n(h,{closable:!0,onClose:function(e){e.stopPropagation(),a()}},{default:()=>t}):`${t};`}const M=t("");return()=>n(m,{title:M.value,remote:!0,filterable:!0,key:L.value,value:j.value,"onUpdate:value":e=>j.value=e,labelField:q.value,valueField:P.value,"menu-props":T,"node-props":$,onSearch:N,"onUpdate:show":G,options:E.value,onFocus:B(w),renderLabel:H,renderTag:J},{empty(){var l;return e.useLoading&&z.value?n(c,null,null):n(f,{description:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.380"))||"无数据"},null)},...u})}}),r(j,w));export{k as REMOTE_SEARCH};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,inject as l,watch as o,createVNode as r,nextTick as n}from"vue";import{connect as u,mapProps as i}from"@formily/vue";import{last as s,isEqual as c,isArray as p,isString as d}from"lodash-es";import{NCascader as v}from"naive-ui";import"../../../index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as f,InjectionAsyncQueue as h,InjectionFormUUID as y}from"../../constants/index.js";import"@formily/path";import"@vueuse/core";import"../../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"../../utils/business.js";import{assignUpdateValue as k,createVisitedSetter as j,traverseDependKey as g}from"../../utils/schema.js";import"date-fns";import"../../hooks/useComplexOptions.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"@vueuse/shared";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../../shared/hooks/useScrollLoading.js";import"./index.js";import{useFormField as b}from"../../hooks/useFormField.js";import"@formily/reactive";import"../../hooks/useFormValidator.js";const C=u(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},checkStrategy:{type:String,default:"child"},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:u,emit:i}){const k=t(),{field:C,title:S,fieldKey:F}=b(),w=t(1),A=t(!0);const
|
1
|
+
import{defineComponent as e,ref as t,computed as a,inject as l,watch as o,createVNode as r,nextTick as n}from"vue";import{connect as u,mapProps as i}from"@formily/vue";import{last as s,isEqual as c,isArray as p,isString as d}from"lodash-es";import{NCascader as v}from"naive-ui";import"../../../index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as f,InjectionAsyncQueue as h,InjectionFormUUID as y}from"../../constants/index.js";import"@formily/path";import"@vueuse/core";import"../../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as k,createVisitedSetter as j,traverseDependKey as g}from"../../utils/schema.js";import"date-fns";import"../../hooks/useComplexOptions.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"@vueuse/shared";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../../shared/hooks/useScrollLoading.js";import"./index.js";import{useFormField as b}from"../../hooks/useFormField.js";import"@formily/reactive";import"../../hooks/useFormValidator.js";const C=u(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},checkStrategy:{type:String,default:"child"},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:u,emit:i}){const k=t(),{field:C,title:S,fieldKey:F}=b(),w=t(1),A=t(!0);const x=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),H=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"}));l(f).setContext(F.value,(()=>({labelField:x.value,valueField:H.value})));const q=a((()=>{var t;try{const a=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");if(!Array.isArray(a)||!a.length)return null;const l=null==(t=s(a))?void 0:t[H.value];return null!=l?l:a.map((e=>e[x.value])).join(" / ")}catch(e){return null}}));function K(e,t,a){i("update:value",p(a)?a.map((function(e){return{...e,label:e[x.value],children:void 0,parent:void 0,mergeItemValue:void 0}})):null)}const L=l(h);async function V(t){e.filterable?await async function(){if(!e.urlConfig||k.value&&e.requestCache)return;const t=await L.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:F.value,cache:e.requestCache,payload:{field:C.value,labelKey:x.value,valueKey:H.value}});function a(e,t,o){const r=[...o,...l(e)],n={[x.value]:e[x.value],[H.value]:e[H.value],depth:t+1,isLeaf:!0,keyword:e.keyword,mergeItemValue:r};return p(e.children)&&(n.children=e.children.map((e=>a(e,t+1,r))),n.isLeaf=!e.children.length),w.value=Math.max(w.value,t+1),n}function l(e){let t=[];if(d(e[x.value])&&(t=[...t,e[x.value]]),d(e.keyword)&&e.keyword.length>0){const a=e.keyword.split(",");t=[...t,...a]}return t}k.value=t.map((e=>a(e,0,[])))}():await async function(t){if(o(e,t))return;const a=await L.addAsync(r(s(t),i(e),S.value,t));if(!a.length&&t)return t.isLeaf=!0,K(0,0,n(t)),void(N.value=!1);const l=a.map((e=>u(e,s(t))));function o(e,t){return!i(e)||!t&&k.value&&e.requestCache||s(t)>=s(e)-1}function r(t,a,l,o){const r={lvlnr:t+1+""};return o&&a.dependKey&&g(a.dependKey,((e,t)=>{r[t]=o[e]})),{params:r,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function u(a,l){return{[x.value]:a[x.value],[H.value]:a[H.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function i(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:k.value=l}(t),await I()}const B=`form-render__cascade--menu-${l(y)}`;async function I(){await n();const e=document.querySelector(`.${B} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}function E(t,a){if(!t||!a)return!1;const{mergeItemValue:l}=a;return!(e.checkStrategy.includes("child")&&a.depth<w.value)&&(l.length>0&&l.some((e=>e.includes(t.trim()))))}const{injectValueValidate:O,injectValueWatchFromEmpty:W,injectValueBindKey:z}=m();W((()=>e.value),V),O((()=>e.value)),o((()=>e.urlConfig),(async(t,a)=>{c(t,a)||(k.value=null,A.value?e.lazyRequest||(V(),A.value=!A.value):await V())}),{immediate:!0});const N=t(!1);function P(e){N.value=!!e,e&&V()}const R=a((()=>k.value||e.options||[])),U=a((()=>!e.filterable)),$=z(q);return()=>r(v,{key:$.value,remote:U.value,filterable:e.filterable,"menu-props":{class:B,onClick:I},"check-strategy":e.checkStrategy,show:!!N.value,"onUpdate:show":P,value:q.value,filter:E,"onUpdate:value":K,labelField:x.value,valueField:H.value,options:R.value,onLoad:V,onFocus:j(C)},u)}}),i({dataSource:"options"},k));export{C as SEARCH_CASCADER};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as o,watch as t,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,isObject as c,omit as v,xor as y}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as f}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as h}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import"../../../../../shared/hooks/useScrollLoading.js";import{connect as
|
1
|
+
import{defineComponent as e,computed as o,watch as t,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,isObject as c,omit as v,xor as y}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as f}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as h}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import"../../../../../shared/hooks/useScrollLoading.js";import{connect as j,mapProps as b}from"@formily/vue";import{useCommonInjection as S,useSelectOptionProps as g}from"../../hooks/useCommonInjection.js";import{useComplexOptions as k,useComplexOptionsSpan as C}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as F,InjectionFormUUID as B}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 O}from"../../hooks/useFormField.js";import"@formily/reactive";import{useUrlConfigOptions as K,useAutographOptions as R,useRecommendOptions as x}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const V=j(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:{}},emits:["update:value","postRecommend","patternChange"],setup(e,{slots:j,emit:b}){const w=o({get:()=>e.value,async set(e){b("update:value",e),G(e)}}),{labelKey:A,valueKey:V,showKey:L,fetchData:P,searchContent:_,fullOptions:N,filterOptions:I,remoteOptions:W,loading:q}=e.urlConfig?K(e,w):R(e,w);t(_,(e=>{b("patternChange",{pattern:e,options:ue.value})}));const{modifyEvent:E,modifyAbleRef:z,getOptionsWithCreated:M}=f(e,{searchContent:_,labelKey:A,valueKey:V,valueRef:w,fullOptions:N}),{renderComplexOption:T,hasComplexOption:U}=k(e,w),{getRecommend:D,postRecommend:G,sortedOptions:J}=x(e,I,b,A,V),{field:Q,fieldKey:X}=O();l(F).setContext(X.value,(e=>({currentOption:m(function(e){const o=M(N.value);return d(e)?function(e){const t=o.reduce(((e,o)=>(e[o[V.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[V.value]===t)));var t}(e)),labelField:A.value,valueField:V.value})));const Y=async e=>(_.value=e,Promise.allSettled([P(e),D(e)])),{injectValueValidate:Z,injectValueWatchFromEmpty:$,injectValueBindKey:ee}=S();$(w,(()=>e.lazyRequest&&Y())),Z(w);const oe=ee(w),{menuProps:te,nodeProps:le}=g(),{renderTag:ae,renderLabel:re,renderSelectAll:se,titleRef:ne}=h(e,{labelKey:A,valueKey:V,valueRef:w,showKey:L,searchContent:_}),ue=o((()=>M(z.value?N.value:J.value))),ie=a(),pe=o((()=>{if(e.allowCreate||e.showCustomValue)return w.value;const o=e.multiple&&d(w.value);return N.value.find((e=>o?w.value.includes(e[V.value]):e[V.value]===w.value))?w.value:null})),me=r(!1);async function de(e){e&&await Y(),me.value=e}async function ce(e,o){await E.updateValue(e,o),W.value&&o&&i(o).forEach((e=>{if(!c(e))return;const o=e;o.created&&o.shouldSave&&W.value.push(v(u(o),["created","shouldSave"]))}))}const ve=l(B),{getSpan:ye}=C(),fe=H(Q,E.focus);function he(o){if(!e.multiple)return;const t=o?ue.value.map((e=>e[V.value])):[];y(t,e.value).length&&(w.value=t)}function je(o){let t=j;return e.multiple&&e.selectAll&&(t={action:()=>se(he),...j}),s(p,n({title:ne.value,key:oe.value,multiple:e.multiple,remote:!0,filterable:!0,loading:q.value,value:pe.value,onUpdateValue:ce,"menu-props":te,"node-props":le,labelField:A.value,valueField:V.value,options:ue.value,onSearch:Y,show:me.value,"onUpdate:show":de,onFocus:fe,onBlur:E.blur,renderLabel:re,renderTag:ae},o,ie),t)}return()=>{var e,o;if(!U.value)return je();const t=null!=(o=null==(e=Q.value.decoratorProps)?void 0:e.span)?o:6,l=ye(ve,Q.value.address);return s("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[je({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),N.value.map((e=>T({option:e,value:w.value,valueKey:V.value,labelKey:A.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},w,A));export{V as SELECT};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as o,ref as
|
1
|
+
import{defineComponent as e,useAttrs as o,ref as i,computed as l,createVNode as t,mergeProps as r,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as d}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as s,assignValueBindKey as v}from"../../utils/schema.js";import{connect as p,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const w=p(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:s}){const v=o(),p=i(!1),{field:c,fieldKey:w}=m(),h=l((()=>{var e,o;return null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.requiredReminderContent})),f=l((()=>{var o,i;return null==(i=null==(o=e.openDescription)?void 0:o.value)||i})),g=l((()=>{var o,i;return null!=(i=null==(o=e.closeDescription)?void 0:o.value)&&i})),y=()=>{var o,i;return u(null!=(i=null==(o=e.openDescription)?void 0:o.describe)?i:"")},C=()=>{var o,i;return u(null!=(i=null==(o=e.closeDescription)?void 0:o.describe)?i:"")},j=l({get:()=>e.value===f.value,set(o){if(!h.value||"SWITCH"!==e.showMode||o)return s("update:value",o?f.value:g.value);p.value=!0}});function k(){s("update:value",g.value)}return()=>{return"SWITCH"===e.showMode?[t(n,r({value:j.value,"onUpdate:value":e=>j.value=e},v),{checked:y,unchecked:C}),h.value?t(a,{show:p.value,"onUpdate:show":e=>p.value=e,"display-directive":"show",preset:"dialog",title:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.428"))||"确认","positive-text":(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.428"))||"确认","negative-text":(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.28"))||"取消",content:h.value,onPositiveClick:k},null):null]:t(d,{checked:j.value,"onUpdate:checked":e=>j.value=e},{default:y});var o,i,l}}}),c(s,v));export{w as SWITCH};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as t,inject as n,createVNode as o}from"vue";import{connect as r,mapProps as l,RecursionField as i}from"@formily/vue";import{isString as s}from"lodash-es";import"../../../index.js";import{InjectionBusinessCollector as a,InjectionFormGlobalProps as u}from"../../constants/index.js";import{
|
1
|
+
import{defineComponent as e,computed as t,inject as n,createVNode as o}from"vue";import{connect as r,mapProps as l,RecursionField as i}from"@formily/vue";import{isString as s}from"lodash-es";import"../../../index.js";import{InjectionBusinessCollector as a,InjectionFormGlobalProps as u}from"../../constants/index.js";import{useFieldListAdaptor as m}from"../../hooks/useFieldListAdaptor.js";import{createObjSchema as c}from"../../utils/schema.js";import{createSlot as p,replace2Any as d}from"../../utils/index.js";const f=r(e({name:"FORM_TEXT",props:{content:{},fieldItem:{type:Object},value:{},onChange:{}},setup(e){function r(t,n=!1,r=!0){return r?o("div",{style:n?{display:"flex",alignItems:"center"}:{}},[l()]):l();function l(){var n,r;return null==(r=(n=p(t,e,(e=>s(e)?e=d(e.replace("\n","<br>"),[{from:"<br>",to:o("i",{style:{width:"100%",height:"4px"}},null)},{from:" ",to:o("i",{style:{display:"inline-block",width:"4px"}},null)}]):[e]))).default)?void 0:r.call(n)}}const l=t((()=>{var t,n;return null!=(n=null==(t=e.fieldItem)?void 0:t.__textEnhance)?n:[]})),f=t((()=>l.value.length&&l.value.some((e=>"widget"===e.type)))),v=n(a),h=n(u),{schemaAdaptor:y}=m(v,h.lifeCycle);return()=>{var t;return f.value?o("div",{style:{display:"flex",alignItems:"center"}},[l.value.map((e=>{if("text"===e.type)return r(e.content,!0,!1);if(s(e.content))return r(e.content,!0,!1);const t={...e.content};return t.decoratorProps={...t.decoratorProps,showLabel:!1,showFeedback:!1},o(i,{basePath:".",schema:c(y([t]))},null)}))]):r(null!=(t=e.content)?t:e.value)}}}),l((e=>{var t;return{...e,content:null==(t=e.fieldItem)?void 0:t.content}})));export{f as TEXT};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,computed as o,inject as r,createVNode as t,mergeProps as i}from"vue";import{InjectionFormGlobalProps as s}from"../../constants/index.js";import{useCommonInjection as u}from"../../hooks/useCommonInjection.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import{NInput as m}from"naive-ui";import"../../utils/business.js";import{assignUpdateValue as a,assignClearBindVisited as l}from"../../utils/schema.js";import{connect as n,mapProps as p,useField as v}from"@formily/vue";const d=n(e({name:"FormTextarea",props:{value:{type:String},rows:{type:Number}},emits:["update:value"],setup(e,{emit:a}){const l=o({get:()=>e.value,set:e=>a("update:value",e)}),n=u().injectValueBindKey(l),p=v(),d=r(s,{}),c=o((()=>{var e,o,r;return null!=(r=null==(o=null==(e=p.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.bordered)?r:d.bordered})),f=o((()=>"underline"===c.value?{autosize:{minRows:e.rows,maxRows:99}}:{rows:e.rows}));return()=>t(m,i({type:"textarea"},f.value,{key:n.value,value:l.value,"onUpdate:value":e=>l.value=e}),null)}}),p(a,l));export{d as TEXTAREA};
|
1
|
+
import{defineComponent as e,computed as o,inject as r,createVNode as t,mergeProps as i}from"vue";import{InjectionFormGlobalProps as s}from"../../constants/index.js";import{useCommonInjection as u}from"../../hooks/useCommonInjection.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import{NInput as m}from"naive-ui";import"./text.js";import"../../utils/business.js";import{assignUpdateValue as a,assignClearBindVisited as l}from"../../utils/schema.js";import{connect as n,mapProps as p,useField as v}from"@formily/vue";const d=n(e({name:"FormTextarea",props:{value:{type:String},rows:{type:Number}},emits:["update:value"],setup(e,{emit:a}){const l=o({get:()=>e.value,set:e=>a("update:value",e)}),n=u().injectValueBindKey(l),p=v(),d=r(s,{}),c=o((()=>{var e,o,r;return null!=(r=null==(o=null==(e=p.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.bordered)?r:d.bordered})),f=o((()=>"underline"===c.value?{autosize:{minRows:e.rows,maxRows:99}}:{rows:e.rows}));return()=>t(m,i({type:"textarea"},f.value,{key:n.value,value:l.value,"onUpdate:value":e=>l.value=e}),null)}}),p(a,l));export{d as TEXTAREA};
|
@@ -1 +1 @@
|
|
1
|
-
import{doAnimation as e}from"../../../../shared/utils/anime.js";import{Path as o}from"@formily/path";import{useDebounceFn as r,watchOnce as t}from"@vueuse/core";import{ref as n,nextTick as i,computed as l}from"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"../utils/business.js";import{createLinebarId as s}from"../utils/schema.js";function a(a,u,c,m){const
|
1
|
+
import{doAnimation as e}from"../../../../shared/utils/anime.js";import{Path as o}from"@formily/path";import{useDebounceFn as r,watchOnce as t}from"@vueuse/core";import{ref as n,nextTick as i,computed as l}from"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"../components/renderer/text.js";import"../utils/business.js";import{createLinebarId as s}from"../utils/schema.js";function a(a,u,c,m){const p=n(),v=n(""),f=n([]),d=r((async function(e){var o;f.value=Object.values(e.fields).reduce(((e,o)=>{var r,t,n,i;return"LINEBAR"===o.componentType&&"visible"===o.selfDisplay&&e.push({title:null!=(t=null==(r=o.componentProps)?void 0:r.title)?t:o.title,name:o.address.toString(),index:null!=(i=null==(n=o.decoratorProps)?void 0:n._index)?i:0}),e}),[]).sort(((e,o)=>e.index-o.index)),await i(),null==(o=p.value)||o.syncBarPosition()}),100);let h=!1;async function y(r){h=!0;try{if(!c.value)return;m.trigger(o.parse(r),!0),await i();const t=c.value.querySelector(`#${s(r)}`);if(!t)return;await new Promise((o=>{e(c.value.scrollTop,t.offsetTop,300,(e=>{var o;null==(o=c.value)||o.scrollTo({top:e})}),"easeInSine",(()=>setTimeout(o,300)))}))}finally{h=!1}}const T=r((function(e){var o;if(h||!c.value)return;const{scrollTop:r,clientHeight:t}=c.value,n=f.value.find(((e,o,n)=>{const i=n[o+1];if(!i)return!0;const l=c.value.querySelector(`#${s(i.name)}`);return l?l.offsetTop>r+t/2:void 0}))||f.value[f.value.length-1];v.value=null!=(o=null==n?void 0:n.name)?o:"",u("scroll",e)}),300);t(f,(e=>{var o,r;v.value=null!=(r=null==(o=e[0])?void 0:o.name)?r:""}));return{currentAnchor:l({get:()=>v.value,async set(e){v.value=e,await new Promise((e=>setTimeout(e,100))),await y(e)}}),onScroll:T,anchorIdList:f,generateAnchorList:d,updateAnchorList:function(e){"LINEBAR"===e.componentType&&e.selfDisplay&&d(e.form)},scrollTo:y,anchorBarRef:p}}export{a as useAnchor};
|
@@ -1 +1 @@
|
|
1
|
-
import{isField as e}from"@formily/core";import{Path as t}from"@formily/path";import{isString as s}from"@vueuse/core";import{format as i}from"date-fns";import{isFunction as r,isNumber as n}from"lodash-es";import{FIELD_BUSINESS_TYPE as l}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@vicons/ionicons5";import"@vue/shared";import"naive-ui";import{isIdCard as a,parseIdCard as o,parseAgeFromContext as u,parseBirthday as h,parseAge2Birthday as y}from"../utils/business.js";class
|
1
|
+
import{isField as e}from"@formily/core";import{Path as t}from"@formily/path";import{isString as s}from"@vueuse/core";import{format as i}from"date-fns";import{isFunction as r,isNumber as n}from"lodash-es";import{FIELD_BUSINESS_TYPE as l}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@vicons/ionicons5";import"@vue/shared";import"naive-ui";import"../components/renderer/text.js";import{isIdCard as a,parseIdCard as o,parseAgeFromContext as u,parseBirthday as h,parseAge2Birthday as y}from"../utils/business.js";class p{constructor(e){this.businessFormatter=e,this.triggerDisabled=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return r(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,i,r,n){const l=this.getField(i);l&&e.setFieldState(l.val_key,(e=>{e.value!==r&&(!this.typeLockMap.get(i)&&this.typeLockMap.set(i,1),this.triggerDisabled&&s(this.triggerDisabled)&&t.parse(this.triggerDisabled).match(l.val_key)||(e.value=this.formatter({value:r,type:i,fieldKey:l.val_key,from:n})))}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(!0===this.triggerDisabled)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r))return this.typeLockMap.set(r,0);const n="change"===s?this.changeHandlerMap:null;n&&(null==(i=n.get(r))||i.call(this,e))}}function c(){function e(){var e;const t=this.getField(l.BIRTHDAY);return null!=(e=null==t?void 0:t.date_format)?e:"yyyy-MM-dd HH:mm"}function t(t){const r=this.getValueByType(t,l.ID_CARD);if(!r||!s(r)||!a(r))return;const n=o(r),{age:h,ageUnit:y}=u(n);null!=y&&this.setValueByType(t,l.AGE_UNIT,y,l.ID_CARD),null!=h&&this.setValueByType(t,l.AGE,h,l.ID_CARD),null!=n.sex&&this.setValueByType(t,l.SEX,n.sex,l.ID_CARD),null!=n.birthday&&this.setValueByType(t,l.BIRTHDAY,i(new Date(n.birthday),e.call(this)),l.ID_CARD)}function r(e){const t=this.getValueByType(e,l.BIRTHDAY);if(!s(t))return;const{age:i,ageUnit:r}=u(h(t));this.setValueByType(e,l.AGE_UNIT,r,l.BIRTHDAY),this.setValueByType(e,l.AGE,i,l.BIRTHDAY)}function c(t){return function(i){const r=this.getValueByType(i,l.AGE),a=this.getValueByType(i,l.AGE_UNIT);(s(r)||n(r))&&""!==r&&s(a)&&""!==a&&this.setValueByType(i,l.BIRTHDAY,y(+r,a,e.call(this)),t)}}return{create:function(e){return new p(e).registerChangeBusiness(l.ID_CARD,t).registerChangeBusiness(l.AGE_UNIT,c(l.AGE_UNIT)).registerChangeBusiness(l.AGE,c(l.AGE)).registerChangeBusiness(l.BIRTHDAY,r)}}}export{p as BusinessCollector,c as useBusinessBinding};
|
@@ -1 +1 @@
|
|
1
|
-
import{reactive as e,computed as t,createVNode as r,mergeProps as n,defineComponent as l,inject as o,provide as i,watch as s,onUnmounted as a,onMounted as d,withModifiers as c}from"vue";import{checkInSetupEnv as u}from"../../../../shared/utils/index.js";import{useField as p,useForm as m,RecursionField as f}from"@formily/vue";import{isArray as h,noop as v,isEmpty as y}from"lodash-es";import"../../index.js";import{InjectionFormUUID as g,InjectionBusinessCollector as x}from"../constants/index.js";import{
|
1
|
+
import{reactive as e,computed as t,createVNode as r,mergeProps as n,defineComponent as l,inject as o,provide as i,watch as s,onUnmounted as a,onMounted as d,withModifiers as c}from"vue";import{checkInSetupEnv as u}from"../../../../shared/utils/index.js";import{useField as p,useForm as m,RecursionField as f}from"@formily/vue";import{isArray as h,noop as v,isEmpty as y}from"lodash-es";import"../../index.js";import{InjectionFormUUID as g,InjectionBusinessCollector as x}from"../constants/index.js";import{renderOptionLabel as b,renderDescOption as F}from"../utils/index.js";import{useFieldListAdaptor as S}from"./useFieldListAdaptor.js";import{createObjSchema as j}from"../utils/schema.js";const O=e(new Map);function M(e,t,r=0){O.set(e,O.get(e)||{});O.get(e)[t+""]=r}function W(e,t,r=!0){const n=O.get(e);return n?Object.entries(n).reduce(((e,[n,l])=>r&&n===`${t}`||n.startsWith(`${t}.`)?e+l:e),0):0}function $(e,t){const r=O.get(e);r&&Reflect.deleteProperty(r,t+"")}function E(e){O.delete(e)}const K=l({props:{fieldItems:{type:Array,default:()=>[]},childFieldStrategy:{type:String,default:"checked"},childWidthMode:{type:String,default:"outer"},name:{type:String,required:!0}},setup(e){const l=o(g),u=o(x),h=p(),y=o(l+"_virtualParent",""),b=`${y?y+".":""}${h.value.address}`;function F(e){return`${b}.${e}`}i(l+"_virtualParent",b);const{schemaAdaptor:O}=S(u);function E(t){var r,n,l,o;return Object.assign(t,{"x-decorator-props":{...t["x-decorator-props"],labelPlacement:"left",isOptionChildField:!0},"x-component-props":{...t["x-component-props"],childFieldStrategy:null!=(n=null==(r=t["x-component-props"])?void 0:r.childFieldStrategy)?n:e.childFieldStrategy,childWidthMode:null!=(o=null==(l=t["x-component-props"])?void 0:l.childWidthMode)?o:e.childWidthMode,size:"small"}})}const K=t((()=>{const t=O(e.fieldItems);return Object.values(t).forEach(E),j(t)}));s(K,(()=>{return e=K.value,void Object.values(e.properties||{}).forEach((e=>{var t;M(l,F(e.name),null==(t=null==e?void 0:e["x-decorator-props"])?void 0:t.span)}));var e}),{immediate:!0});const P=m();function _(){return e.fieldItems.map((e=>P.value.query(e.val_key).take()))}a((()=>{var e;_().forEach((e=>{e&&e.setDisplay("none")})),e=K.value,Object.values(e.properties||{}).forEach((e=>{$(l,F(e.name))}))})),d((()=>{_().forEach((e=>{e&&e.setDisplay("visible")}))}));const k=c(v,["stop"]),C=["onClick","onKeydown","onKeyup","onKeypress"].reduce(((e,t)=>(e[t]=k,e)),{});return()=>{return r("section",n({class:"form-render__labelField",style:{"--column":(e=K.value,Object.values(e.properties||{}).reduce(((e,t)=>e+W(l,F(t.name))),0)),flex:"1"}},C),[r(f,{basePath:".",schema:K.value},null)]);var e}}});function P(e,l){u();const o=t((()=>e.options.some((e=>h(e.childrenFields)&&e.childrenFields.length))));function i(e,t,r="value"){return!y(t.childrenFields)&&(h(e)?e.includes(t[r]):e===t[r])}return{renderComplexOption:function({value:e,option:t,valueKey:l="value",labelKey:s="label",childFieldStrategy:a,childWidthMode:d,renderLabel:c=!0,attrs:u}){return[function(){const e=b(t,s);return c?t.desc?F(e,t):e:null}(),o.value&&("all"===a||i(e,t,l))?r(K,n({fieldItems:t.childrenFields,name:t[l],childFieldStrategy:a,childWidthMode:d},u),null):null]},valueRef:l,hasComplexOption:o}}function _(){return{getSpan:W,setSpan:M,deleteSpan:$,clearSpan:E}}export{P as useComplexOptions,_ as useComplexOptionsSpan};
|
@@ -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 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=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:s(e.is_empty),...e.componentProps||{}},"x-content":e.slots,"x-display":s(e.is_show)?"hidden":"visible","x-pattern":s(e.is_edit)?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,beforeSetValue:null==h?void 0:h.beforeSetValue,span:2*(e.elem_width||3),showLabel:!r(e.hide_title),remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=g(e);return n&&(t["x-validator"]=n),s(e.is_null)&&(t.required=!0),t},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),
|
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=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:s(e.is_empty),...e.componentProps||{}},"x-content":e.slots,"x-display":s(e.is_show)?"hidden":"visible","x-pattern":s(e.is_edit)?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,beforeSetValue:null==h?void 0:h.beforeSetValue,span:2*(e.elem_width||3),showLabel:!r(e.hide_title),remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=g(e);return n&&(t["x-validator"]=n),s(e.is_null)&&(t.required=!0),t},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,N=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:N,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=>{const o=v(e);return Object.assign(o["x-component-props"],{...i(e,["prefix","suffix"])}),o}],["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)?I(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:I(i)}),t},{FieldNormalizeWaterfallHook:k,FieldListNormalizeWaterfallHook:N}=p();function I(o,i={column:9999}){let r=null;const s=N.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:I}}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};
|
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as e,traverse as t}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import
|
1
|
+
import{arrayed as e,traverse as t}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import a from"../../../../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{format as l}from"date-fns";import{isString as o,isEmpty as r}from"lodash-es";import"../../index.js";import{FIELD_BUSINESS_TYPE as _}from"../constants/index.js";import{isNegative as i,isPositive as s,FieldListFilter as n,findItemByValCondition as p,parseEnhanceText as c}from"../utils/index.js";import{transformDateFormat as u}from"../utils/business.js";function d(){const d=new a(["fieldList","props"]),m=new a(["fieldItem","props"]);m.tap("__forceClearable",((e,t)=>(t.forceClearable&&(e.componentProps={...e.componentProps,clearable:!0}),e))),m.tap({name:"__fieldAlias",before:"__labelPlacementOverwrite"},(e=>("BOTTOM"===e.inputBorder&&(e.bordered="underline"),null!=e.title_h_layout&&(e.decoratorProps={...e.decoratorProps},i(e.title_h_layout)?e.decoratorProps.labelPlacement="top":s(e.title_h_layout)&&(e.decoratorProps.labelPlacement="left")),o(e.lineBarLayoutDirection)&&(e.linebarDirection=e.lineBarLayoutDirection.toLowerCase()),e))),m.tap("__labelPlacementOverwrite",((e,t)=>(t.labelPlacementOverwrite&&(e.decoratorProps={...e.decoratorProps,labelPlacement:void 0}),e))),m.tap("__time",(e=>("DATE"===e.html_type&&"time"===u(e.date_format)&&(e.html_type="TIME"),e))),m.tap("__block",(e=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(e.html_type)&&(e.__vertical=!0),e))),m.tap("__age",(t=>("AGE"===t.html_type&&(t.html_type="INPUT_NUMBER",t.reactions=t.reactions?e(t.reactions):[],t.reactions.push({target:t.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),t.suffixConfig=[{validate:{obj_type:_.AGE_UNIT},val_key:t.val_key_unit,html_type:"SELECT",option:t.option,urlConfig:t.urlConfig}]),t))),m.tap({name:"__multiple_select",before:"__defaultValue"},(e=>{const{html_type:t,multi_select:a,__multiple:l}=e;return e.__multiple="SEARCH"!==t&&("SEARCH_MORE"===t||("SELECT"===t?i(a):l)),e})),m.tap("__defaultValue",(e=>{switch(e.html_type){case"TIME":"current"===e.default_val&&(e.default_val=l(new Date,e.date_format||"HH:mm:ss"));break;case"DATE":"current"===e.default_val&&(e.default_val=l(new Date,e.date_format||"yyyy-MM-dd"));break;case"CHECKBOX":case"CHECKBOX_BLOCK":o(e.default_val)&&e.default_val&&(e.default_val=e.default_val.split(","));break;case"SELECT":case"SEARCH":case"SEARCH_MORE":o(e.default_val)&&e.default_val&&(e.default_val=e.__multiple?e.default_val.split(","):e.default_val)}return e}));const E=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];m.tap("__normalize",(e=>(E.some((([t,a])=>(Array.isArray(t)?t.includes(e.html_type):t===e.html_type)&&(e.html_type=a))),e)));const f=new Map([[["SELECT","SEARCH","SEARCH_MORE"],new Map([["H_TILE",e=>e.html_type=e.__multiple?"CHECKBOX":"RADIO"],["V_TILE",e=>{e.html_type=e.__multiple?"CHECKBOX":"RADIO",e.__vertical=!0}]])],["RADIO",new Map([["DROPDOWN",e=>e.html_type="SELECT"]])],["CHECKBOX",new Map([["DROPDOWN",e=>{e.__multiple=!0,e.html_type="SELECT"}]])]]);return m.tap({stage:9999,name:"__show_mode"},(t=>t.show_mode?([...f].some((([a,l])=>{if(!e(a).includes(t.html_type))return;const o=l.get(t.show_mode);return o&&o(t),!0})),t):t)),d.tap("__out_bordered",((e,{column:t,outBordered:a})=>e)),d.tap("__prefix/suffix",(e=>{const a=[];return t(e,(t=>{["prefix","suffix"].forEach((l=>{const r=t[l];if(!o(r))return;const _=r.match("#{(.+)}");if(!_)return;const i=o(_[1])&&p(e,(e=>e.val_key===_[1].trim()));i&&(Reflect.deleteProperty(t,l),t[`${l}Config`]=t[`${l}Config`]||[],t[`${l}Config`].push(i),a.push(i))}))}),["children","properties"]),a.length?n(e,(e=>a.includes(e))):e})),d.tap("__checkboxOrRadioEnhance",(e=>{const a=[];return t(e,(t=>{["CHECKBOX","RADIO","RADIO_BLOCK","CHECKBOX_BLOCK"].includes(t.html_type)&&!r(t.option)&&t.option.forEach((t=>{const l=c(t.text||"");t.__textEnhance=l,l.forEach((t=>{if("text"===t.type)return;const l=p(e,(e=>[e.name,e.val_key].includes(t.content)));l&&(a.push(l),t.content=l)}))}))})),n(e,(e=>a.includes(e)))})),d.tap("__textEnhance",(e=>{const a=[];return t(e,(t=>{if("TEXT"!==t.html_type||!o(t.default_val))return;const l=c(t.default_val);t.__textEnhance=l,l.forEach((l=>{if("text"===l.type)return;const o=p(e,(e=>[e.name,e.val_key].includes(l.content)));o&&(Reflect.deleteProperty(t,"default_val"),a.push(o),l.content=o)}))}),["children","properties"]),n(e,(e=>a.includes(e)))})),{FieldNormalizeWaterfallHook:m,FieldListNormalizeWaterfallHook:d}}export{d as useFieldNormalize};
|
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as e,findAncestor as t,targetStringIncludes as r}from"../../../../shared/utils/index.js";import{isField as o}from"@formily/core";import{Path as
|
1
|
+
import{arrayed as e,findAncestor as t,targetStringIncludes as r}from"../../../../shared/utils/index.js";import{isField as o}from"@formily/core";import{Path as n}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as a}from"@vueuse/shared";import{isFunction as s,isArray as l,castArray as d,isString as u}from"lodash-es";import{nextTick as c}from"vue";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as m}from"../constants/index.js";import{formValueFormatter as f}from"../utils/valueFormatter.js";import{queryDecoratorByAddress as p,queryInput as g,queryDecoratorByFieldKey as v,findNextWidget as y}from"../utils/dom.js";import{validateMessageParser as h,combineExtendKey as S,splitExtendKey as b,isEnter as x}from"../utils/index.js";import{getParentLinebar as F}from"../utils/schema.js";import{useSelectedSetting as C}from"./useSelectedSetting.js";function E({formModel:t,formRenderRef:r,formUUID:a,getFieldList:m,formItemDepsCollector:y,businessCollector:x,wordbookSettingHandler:E,operationalFormHandler:D,changeContextCollector:I,emitFormChange:j}){const{applySelectedSetting:w}=C();return{validate(n,{force:c}={}){if(null==n&&(n="*"),s(n)){const e=Object.entries(t.fields).reduce(((e,[t,r])=>(n(r)&&e.push(t),e)),[]);if(!e.length)return Promise.resolve();n=e.length?`*(${e.join(",")})`:"*"}const m=[];c&&t.setFieldState(n,(e=>{"visible"===e.display&&"editable"!==e.pattern&&o(e)&&(m.push({pattern:e.pattern,state:e}),e.pattern="editable")}));const f=t.validate(n).catch((e=>Promise.reject(Array.isArray(e)?e.reduce(v,[]):e)));return c&&m.forEach((({pattern:e,state:t})=>t.pattern=e)),f;function v(t,r){if(!i(r))return t;let o=!1;return l(r.messages)&&r.messages.forEach((r=>{i(r)&&(t.push(...e(r).map(y)),o=!0)})),!o&&t.push(y(r)),t}function y(e){if(e.decoratorElement)return e;const o=t.query(e.path),n=o.get("title"),s=d(e.messages).map((e=>function(e,t){if(!t||!i(t.fieldItem))return e;const r=t.fieldItem.defined_error_msg;return h(r&&u(r)?r:e,t.fieldItem)}(e,o.get("decoratorProps")))),l=p(e.address,r.value,a);return{...e,messages:s,title:n,decoratorElement:l,...g(l)}}},getFormValues(e=!0){let r=t.getFormState().values;return e&&(r=S(m(),r)),r},async setFormValues(e,r){r=Object.assign({avoidDependKeyConnection:!0,needSplitExtendKey:!0,avoidWordbookSettingConnection:!0,avoidOperationalFormConnection:!0,dependKeyKeepValue:!1,avoidBusinessConnection:!1,avoidFormChangeEvent:!1,overwrite:!0},r),x.triggerDisabled=r.avoidBusinessConnection,y.triggerDisabled=r.avoidDependKeyConnection,y.keepValue=r.dependKeyKeepValue,E.triggerDisabled=r.avoidWordbookSettingConnection,D.triggerDisabled=r.avoidOperationalFormConnection,r.needSplitExtendKey&&(e=b(m(),e)),r.avoidFormChangeEvent&&(j.value=!1),t.setFieldState("*",(t=>{o(t)&&(r.overwrite||n.existIn(e,t.path))&&(t.value=n.getIn(e,t.path))})),await c(),j.value=!0,x.triggerDisabled=!1,y.triggerDisabled=!1,E.triggerDisabled=!1,D.triggerDisabled=!1,y.keepValue=!1},setFieldState(e,r){t.setFieldState(e,r)},resetFields:(e="*")=>t.reset(e),queryWidget:e=>async function(e,t,o){if(!r.value)return l();const i=v(e,t,a);if(i)return l(i);const s=F(e,o);return s?(y.trigger(n.parse(s),!0),await c(),l(v(e,t,a))):l();function l(e){return{decoratorElement:e,...g(e)}}}(e,r.value,m()),applySelectedSetting(e){const r=t.getFormState().values;w(r,e,((e,r)=>{t.setFieldState(e,(e=>{o(e)&&e.setValue(r)}))}))},getTextFormValues:()=>f(t,I)}}function D({props:e,formRenderRef:o,formModel:n,formUUID:i}){return{onKeydown:async function l(d){var u,c;if(!d.isComposing)if(x(d)){if(e.enterToNextWidget&&d.target){if("TEXTAREA"===d.target.tagName&&!d.ctrlKey)return;null==(u=d.preventDefault)||u.call(d)}if(await a(0),Reflect.get(d,"stopCapture")||!e.enterToNextWidget||!o.value)return;const r=t(d.target,(e=>e.classList.contains("form-render__formItem")));if(!r)return;const i=`.form-render__formItem${m.map((e=>`:not([widget-type=${e}])`)).join("")}`,p=Array.from(o.value.querySelectorAll(i)),g=p.findIndex((e=>e.id===r.id));if(!~g)return;const{widget:v,field:h}=y(p,g,d.target);if(!v)return;if(s(e.enterToNextWidget)){const t=h&&n.query(h).take();!t||e.enterToNextWidget(null==(c=t.decoratorProps)?void 0:c.fieldItem)?f(v,e.autoExpand):l({target:v,code:"Enter"})}else f(v,e.autoExpand)}else if("Tab"===d.code){if(!e.autoExpand)return;await a(0);const t=document.querySelector(":focus");if(!t)return;f(t,!0)}async function f(e,o){if(await a(0),e.focus(),!o)return;if(!t(e,(e=>e.getAttribute("uuid")===i)))return;if(!r(["radio","checkbox"],e.className))if(e.click(),"INPUT"!==e.tagName){const t=e.querySelector("input");if(!t)return;t.focus(),n(t)}else n(e);function n(e){if("INPUT"!==e.tagName)return;const t=e.value;t&&t.match(/^\d{4}-\d{2}/)&&e.setSelectionRange(0,4)}}}}}export{D as useFormDomEvent,E as useFormExposeEvent};
|
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as
|
1
|
+
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as r,isNumber as a,isString as i}from"lodash-es";import"vue";import{registerValidateLocale as m,registerValidateRules as s}from"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import{isFunction as l}from"@vueuse/core";import"naive-ui";import"../components/renderer/text.js";import{isIdCard as n}from"../utils/business.js";function o(){const r=new Map([["mobile",({validate:e})=>({format:"phone",message:null==e?void 0:e.message})],["integer",({validate:e})=>({format:"integer",message:null==e?void 0:e.message})],["number",({validate:e})=>({format:"number",message:null==e?void 0:e.message})],["id_card",({validate:e})=>({validator(r){var a;if(null!=r&&""!==r)return i(r)&&n(r)?void 0:null!=(a=null==e?void 0:e.message)?a:"该字段不是合法的身份证格式"}})],["regular",({validate:e,regular_expression:r,regular_error_tip:a})=>({pattern:r||(null==e?void 0:e.regular_expression)||"",message:a||(null==e?void 0:e.regular_error_tip)||(null==e?void 0:e.message)||"格式错误"})]]),a={triggerType:"onBlur"};return{createValidatorSchema:function(i){const m=[],{validate:{vali_obj:s,max_length:n,min_length:o,message:t,max_value:u,min_value:g,decimal_length:d}={},validator:v}=i;if(v&&e(v).forEach((e=>{l(e)&&m.push({validator:(r,a,m)=>e(r,i,m)})})),n&&m.push({max:n,message:t}),o&&m.push({min:o,message:t}),u&&m.push({maximum:u,message:t}),g&&m.push({minimum:g,message:t}),null!=d&&m.push(((e,r)=>{const a=null!=r?r:`小数位数最多${e}位`;return{validator(r){var i;return(null==(i=String(r).split(".")[1])?void 0:i.length)>e?a:""}}})(+d,t)),s){const e=r.get(s)||(({validate:e})=>({format:s,message:null==e?void 0:e.message}));m.push(Object.assign({},a,e(i)))}return m}}}const t=r((()=>{m({"zh-CN":{required:"${alias||name}为必填"}}),s({maximum:(e,r)=>a(Number(r.maximum))&&null!=e&&""!==e&&"/"!==e?(i(e)&&(e=+e),!a(e)||isNaN(e)?"":e>Number(r.maximum)&&r.message||""):"",minimum:(e,r)=>a(Number(r.minimum))&&null!=e&&""!==e&&"/"!==e?(i(e)&&(e=+e),!a(e)||isNaN(e)?"":e<Number(r.minimum)&&r.message||""):""})}));export{o as useFormValidator,t as validateMessageLocale};
|
@@ -1 +1 @@
|
|
1
|
-
import{isString as i,isEmpty as
|
1
|
+
import{isString as i,isEmpty as e}from"lodash-es";import"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"naive-ui";import"../components/renderer/text.js";import{isIdCard as r,isMobile as o}from"../utils/business.js";function s(){return{isIdCard:e=>i(e)&&r(e),isMobile:e=>i(e)&&o(e),isEmail:e=>i(e)&&/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(e),isNumber:e=>i(e)&&/\d+/.test(e),hasVisible(i){if(e(i))return!1;const r=i.slice(0,i.length/2),o=i.slice(i.length/2).map((i=>null==i?void 0:i[0]));return r.some(((i,e)=>(!i||"visible"===i)&&"LINE_BREAKS"!==o[e]))}}}export{s as usePresetScope};
|
@@ -1 +1 @@
|
|
1
|
-
import{inject as e,provide as t,computed as n,createVNode as r,Fragment as o}from"vue";import{widthAppend as i,traverse as u,arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as s}from"@formily/core";import{Path as f}from"@formily/path";import{HelpCircleSharp as l}from"@vicons/ionicons5";import{isObject as a}from"@vue/shared";import{useMemoize as p}from"@vueuse/core";import{isString as d,isFunction as m,omit as h,castArray as E,flattenDeep as T}from"lodash-es";import{NTooltip as g,NIcon as x}from"naive-ui";import{NESTED_FORM_ITEM_TYPE as y}from"../constants/index.js";export{businessDateParser,isForeignerID,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./business.js";function
|
1
|
+
import{inject as e,provide as t,computed as n,createVNode as r,Fragment as o}from"vue";import{widthAppend as i,traverse as u,arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as s}from"@formily/core";import{Path as f}from"@formily/path";import{HelpCircleSharp as l}from"@vicons/ionicons5";import{isObject as a}from"@vue/shared";import{useMemoize as p}from"@vueuse/core";import{isString as d,isFunction as m,omit as h,castArray as E,flattenDeep as T}from"lodash-es";import{NTooltip as g,NIcon as x}from"naive-ui";import{NESTED_FORM_ITEM_TYPE as y}from"../constants/index.js";import{TEXT as v}from"../components/renderer/text.js";export{businessDateParser,isForeignerID,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./business.js";function I(e){console.warn(`[FormRender]: ${e}`)}function R(e){return"1"===e||!0===e||1===e}function D(e){return"0"===e||!1===e||0===e}function A(e,t,n=["children","properties","suffixConfig"],r="val_key",o="default_val"){return function e(t,r){r.forEach((r=>{a(r)&&(null!=u(r)&&null==t[i(r)]&&f.setIn(t,i(r),u(r)),n.forEach((n=>{r[n]&&(t[i(r)]||(t[i(r)]={}),e(t[i(r)],c(r[n])))})))}))}(e,t),e;function i(e){return e[r]}function u(e){return e[o]}}function W(n,r){let o=e(n,null);return o||(o=r(),t(n,o)),o}function P(e){return e&&d(e)?+e:e}function _(e,t,n){if(a(e)&&!m(e)){const n={};return Object.entries(e).forEach((([e,r])=>{m(r)&&(n[e]=()=>r(t))})),n}return{default:()=>m(e)?e(t):n?n(e):[e]}}function G(e,t){return n((()=>{const n={};return e.prefix&&(n.prefix=()=>r(o,null,[_(e.prefix,e,t).default()])),e.suffix&&(n.suffix=()=>r(o,null,[_(e.suffix,e,t).default()])),n}))}function S(e,t){return d(e)&&e?e.replace(/\$\{([^}]*)}/g,(function(e,n){const r=n.split("||");for(const e of r){const n=t[e.trim()];if(n)return n}return""})):""}function j(e){return e.reduce(((e,t)=>(d(t.extendKey)&&t.extendKey&&e.push(t),B(t)&&e.push(...j(t.children||[])),e)),[])}function w(e,t){const n=j(e);if(!n.length)return t;const r={},o=new Map;return Object.entries(t).forEach((([e,i])=>{const u=n.find((t=>t.val_key===e));if(!u)return r[e]=i;const{val_key:c,extendKey:s}=u,l=o.get(s)||{};o.set(s,l);const a=f.getIn(t,e);null!=a&&f.setIn(l,c,a)})),[...o.entries()].forEach((([e,t])=>{r[e]=JSON.stringify(t)})),r}function $(e,t){const n=j(e);if(!n.length)return t;const r=p((e=>{try{return a(t[e])?t[e]:JSON.parse(t[e])||{}}catch(e){return{}}})),o=h(t,n.map((e=>e.extendKey)));return n.forEach((({val_key:e,extendKey:t})=>{Reflect.has(o,e)||(o[e]=r(t)[e])})),o}function b(e){return e&&y.includes(e)}function B(e){return b(s(e)?e.componentType:e.html_type)}function K(e,t){var n;const o=null!=(n=e.title)?n:e[t];return r("span",{title:o,style:{display:"inline-flex",flexDirection:"column",alignItems:"center","justify-content":"center"}},[e.imageBase64?r("img",{src:e.imageBase64,style:{width:i(e.imageWidth||80),height:i(e.imageHeight||80),marginBottom:"4px"}},null):null,r(v,{content:e[t],fieldItem:e},null)])}function X(e,t){return r("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[e,t.desc?r(g,null,{trigger:()=>r(x,{component:l},null),default:()=>t.desc}):null])}function k(e,t){return f.parse(e.startsWith(".")?e:`.${e}`,t).toString()}function C(e){return e.replace(/</g,"<").replace(/>/g,">")}function F(e,t){return e.reduce(((e,n)=>(t(n)||(e.push(n),n.properties&&(n.properties=F(n.properties,t)),n.children&&(n.children=F(n.children,t))),e)),[])}function O(e,t){let n=null;return u(e,((e,r)=>{t(e)&&(n=e,r())}),["children","properties"]),n}var N=function(e){return e[e.PREPARE=0]="PREPARE",e[e.TEXT=1]="TEXT",e[e.WIDGET_START=2]="WIDGET_START",e[e.WIDGET=3]="WIDGET",e}(N||{});function J(e){const t=[...e],n=[];let r=N.PREPARE,o="";function i(e){switch(r=e,r){case N.PREPARE:case N.WIDGET_START:case N.WIDGET:o=""}}function u(e="text",t=o){n.push({type:e,content:t})}function c(){const e=n.pop();e&&("text"===e.type?o=e.content:n.push(e))}return t.forEach(((e,n)=>{const s=n===t.length-1;switch(r){case N.PREPARE:return"#"===e?(i(N.WIDGET_START),void(s&&u())):(i(N.TEXT),o=e,void(s&&u()));case N.TEXT:return"#"===e?void(s?(o+=e,u()):(u(),i(N.WIDGET_START))):(o+=e,void(s&&u()));case N.WIDGET_START:return"{"!==e||s?(c(),i(N.TEXT),o+=`#${e}`,void(s&&u())):void i(N.WIDGET);case N.WIDGET:return"}"===e?(u("widget"),void i(N.PREPARE)):"#"===e?(c(),u(),i(N.WIDGET_START),o+=`#${e}`,void(s&&u())):(o+=e,void(s&&u("text",`#{${o}`)))}})),n}function M(e,t){let n=E(e);return t.forEach((({from:e,to:t})=>{n.forEach(((r,o)=>{d(r)&&(n[o]=r.split(e).map(((e,n,r)=>[e,n<r.length-1?t:null])))})),n=T(n)})),n}function H(e){return"Enter"===e.code||"NumpadEnter"===e.code}export{F as FieldListFilter,w as combineExtendKey,G as createInputSlot,_ as createSlot,C as editorUnescape,O as findItemByValCondition,I as formRenderLog,k as getAbsoluteKey,W as injectOrProvide,H as isEnter,D as isNegative,B as isNestedFieldType,b as isNestedType,R as isPositive,A as mergeDeepProperties,J as parseEnhanceText,P as parseNumberFromMaybeString,X as renderDescOption,K as renderOptionLabel,M as replace2Any,$ as splitExtendKey,S as validateMessageParser};
|