cnhis-design-vue 3.1.57-beta.3 → 3.1.57-beta.32
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/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/index.d.ts +8 -8
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +8 -8
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +3 -3
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +7 -7
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/calendar/index.d.ts +277 -0
- package/es/components/calendar/index.js +1 -0
- package/es/components/calendar/src/Calendar.vue.d.ts +266 -0
- package/es/components/calendar/src/Calendar.vue.js +1 -0
- package/es/components/calendar/src/Calendar.vue2.js +1 -0
- package/es/components/calendar/src/types/index.d.ts +6 -0
- package/es/components/calendar/src/types/index.js +1 -0
- package/es/components/calendar/style/index.css +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +259 -224
- package/es/components/classification/index.d.ts +3 -3
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -3
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +3 -3
- package/es/components/classification/src/index.vue.d.ts +6 -3
- package/es/components/date-picker/index.d.ts +1 -1
- package/es/components/date-picker/src/DatePicker.vue.d.ts +1 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/drag-scroll/index.d.ts +2 -0
- package/es/components/drag-scroll/index.js +1 -0
- package/es/components/drag-scroll/src/index.d.ts +4 -0
- package/es/components/drag-scroll/src/index.js +1 -0
- package/es/components/drag-scroll/src/types.d.ts +19 -0
- package/es/components/drag-scroll/src/types.js +1 -0
- package/es/components/expand-field/index.d.ts +3 -3
- package/es/components/expand-field/src/components/form.vue.d.ts +3 -3
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue.d.ts +3 -3
- package/es/components/fabric-chart/index.d.ts +4 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +4 -2
- 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/constants/index.d.ts +2 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +4 -3
- package/es/components/field-set/index.d.ts +107 -616
- package/es/components/field-set/index.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1680 -0
- package/es/components/field-set/src/FieldColor.vue.js +1 -0
- package/es/components/field-set/src/FieldColor.vue2.js +1 -0
- package/es/components/field-set/src/FieldSet.vue.d.ts +58 -16
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/Index.vue.d.ts +141 -0
- package/es/components/field-set/src/Index.vue.js +1 -0
- package/es/components/field-set/src/Index.vue2.js +1 -0
- package/es/components/field-set/src/components/Row.vue.d.ts +50 -9
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +172 -0
- package/es/components/field-set/src/components/condition.vue.js +1 -0
- package/es/components/field-set/src/components/condition.vue2.js +1 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1194 -0
- package/es/components/field-set/src/components/edit-dialog.vue.js +1 -0
- package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +286 -0
- package/es/components/field-set/src/components/edit-filter.vue.js +1 -0
- package/es/components/field-set/src/components/edit-filter.vue2.js +1 -0
- package/es/components/field-set/src/constants/index.d.ts +55 -0
- package/es/components/field-set/src/constants/index.js +1 -0
- package/es/components/field-set/src/types/index.d.ts +31 -1
- package/es/components/field-set/src/utils/index.d.ts +2 -1
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +89 -30
- package/es/components/form-config/src/FormConfig.vue.d.ts +89 -30
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +31 -8
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +40 -11
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -8
- package/es/components/form-config/src/constants/index.d.ts +1 -1
- package/es/components/form-config/src/types/index.d.ts +2 -2
- package/es/components/form-render/index.d.ts +31 -8
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +31 -8
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -8
- package/es/components/form-render/src/components/renderer/combination/combination.d.ts +12 -0
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.d.ts +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.d.ts +12 -0
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -0
- 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/hooks/index.d.ts +1 -0
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -2
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
- package/es/components/form-render/src/hooks/useNewLowCodeReactions.d.ts +6 -0
- package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +2 -1
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/iho-table/index.d.ts +228 -216
- package/es/components/iho-table/src/IhoTable.vue.d.ts +228 -216
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/plugins/{bindEventSettingPlugin/index.d.ts → bindEventSettingPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/{defaultConfigPlugin/index.d.ts → defaultConfigPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/dragScrollPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/dragScrollPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +4 -2
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/{keyboardEventPlugin/index.d.ts → keyboardEventPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/{lowCodeFieldAdaptorPlugin/index.d.ts → lowCodeFieldAdaptorPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/{operationalFormPlugin/index.d.ts → operationalFormPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +32 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rowClickPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowClickPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rowDragPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowDragPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/{varialbleHeightPlugin/index.d.ts → varialbleHeightPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.d.ts +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/constants.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.d.ts +3 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/types.d.ts +8 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/types.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.d.ts +15 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.js +1 -0
- package/es/components/iho-table/src/plugins/{virtualTreePlugin/index.d.ts → virtualTreePlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +10 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
- package/es/components/iho-table/src/utils/index.d.ts +4 -7
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +74 -23
- package/es/components/info-header/src/InfoHeader.vue.d.ts +74 -23
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +33 -9
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +31 -8
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- package/es/components/quick-search/index.d.ts +3 -3
- package/es/components/quick-search/src/index.vue.d.ts +3 -3
- package/es/components/recommend-search/index.d.ts +6 -6
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +6 -6
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
- package/es/components/scale-view/index.d.ts +3 -3
- package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -3
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
- package/es/components/select-label/index.d.ts +2 -2
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
- package/es/components/select-label/src/index.vue.d.ts +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +32 -8
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +32 -8
- package/es/components/table-export-field/index.d.ts +3 -3
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +3 -3
- package/es/components/table-export-field/src/index.vue.d.ts +3 -3
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +1 -1
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -4
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -4
- package/es/components/time-line/index.d.ts +7 -7
- package/es/components/time-line/src/TimeLine.vue.d.ts +3 -3
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.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/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +3 -1
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
- package/es/shared/hooks/selectHooks/useSearchContent.d.ts +1 -1
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +23 -3
- package/es/shared/utils/business.d.ts +2 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.d.ts +2 -1
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +8 -2
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/operationalFormPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.57-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.57-beta.32",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.57-beta.32",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
|
@@ -66,7 +66,7 @@ export declare namespace LowCodeTypes {
|
|
|
66
66
|
field_key: string;
|
|
67
67
|
value: unknown;
|
|
68
68
|
};
|
|
69
|
-
type
|
|
69
|
+
type reactionConfig = {
|
|
70
70
|
conObj: reactionsConObj[];
|
|
71
71
|
} & Partial<{
|
|
72
72
|
compareMap: BindEventSettingItem['compareMap'];
|
|
@@ -78,9 +78,29 @@ export declare namespace LowCodeTypes {
|
|
|
78
78
|
notRequiredField: string[];
|
|
79
79
|
enabledField: string[];
|
|
80
80
|
disabledField: string[];
|
|
81
|
-
__oppositeBindField:
|
|
82
|
-
__oppositeTargetField:
|
|
81
|
+
__oppositeBindField: reactionConfig;
|
|
82
|
+
__oppositeTargetField: reactionConfig;
|
|
83
83
|
}>;
|
|
84
|
+
type reactionActionType = 'show' | 'hide' | 'required' | 'notRequired' | 'enabled' | 'disabled';
|
|
85
|
+
type reactionAction = {
|
|
86
|
+
action: reactionActionType;
|
|
87
|
+
fields: string[];
|
|
88
|
+
actionConfig?: Partial<{
|
|
89
|
+
restoreDefault: boolean;
|
|
90
|
+
restoreEmpty: boolean;
|
|
91
|
+
}>;
|
|
92
|
+
};
|
|
93
|
+
type newReactionConfig = {
|
|
94
|
+
conditions: {
|
|
95
|
+
field: string;
|
|
96
|
+
type: VALUE_RELATION;
|
|
97
|
+
valueType?: 'const' | 'field';
|
|
98
|
+
value?: any;
|
|
99
|
+
}[];
|
|
100
|
+
compareMap?: BindEventSettingItem['compareMap'];
|
|
101
|
+
sqlExpression?: string;
|
|
102
|
+
actions: reactionAction[];
|
|
103
|
+
};
|
|
84
104
|
type switchProperty = {
|
|
85
105
|
value?: any;
|
|
86
106
|
describe?: string;
|
|
@@ -5,7 +5,8 @@ export declare function isMatchLowCodeCondition(value: unknown, condition: {
|
|
|
5
5
|
value: unknown;
|
|
6
6
|
}, overwriteCompareMap?: LowCodeTypes.BindEventSettingItem['compareMap']): boolean;
|
|
7
7
|
export declare function isConditionsMatchSqlExpression(conditions: boolean[], sqlExpression?: string): any;
|
|
8
|
-
export declare function isMatchLowCodeConditionsWithSqlExpression(formData: AnyObject, config: LowCodeTypes.
|
|
8
|
+
export declare function isMatchLowCodeConditionsWithSqlExpression(formData: AnyObject, config: LowCodeTypes.reactionConfig): any;
|
|
9
|
+
export declare function isMatchNewLowCodeConditionsWithSqlExpression(formData: AnyObject, config: LowCodeTypes.newReactionConfig): any;
|
|
9
10
|
declare function handleFieldTriggerSetValue(bindEventSetting: LowCodeTypes.BindEventSettingItem, { getter, setter }: {
|
|
10
11
|
setter: (key: string, value: unknown) => void;
|
|
11
12
|
getter: (key: string) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Path as e}from"@formily/path";import{isArray as
|
|
1
|
+
import{Path as e}from"@formily/path";import{isArray as n,isString as t,includes as r,negate as a,isNumber as o,gt as i,gte as l,lt as u,lte as c,identity as f,noop as s,isObject as p}from"lodash-es";import{unref as d}from"vue";import{add as m,differenceInMilliseconds as F}from"date-fns";function D(e){return null==e||""==e}function N(e){return(n,r)=>(t(n)&&(n=+n),t(r)&&(r=+r),!(!o(n)||Number.isNaN(n)||!o(r)||Number.isNaN(r))&&e(n,r))}const g={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(e,a)=>!(!n(e)&&!t(e))&&r(e,a),NC:(e,a)=>!n(e)&&!t(e)||!r(e,a),NULL:D,NOT_NULL:a(D),BIG:N(i),BIGEQ:N(l),LESS:N(u),LESSEQ:N(c)};function E(e,n,t={}){return(t[n.con]||g[n.con]||(()=>!1))(e,`${n.value}`)}function h(e,n){if(!n||!t(n))return e.every(f);try{return new Function("return "+n.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(n=>e[+n-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",n),!1}}function v(t,r){if(!n(r.conObj))return!1;return h(r.conObj.map((n=>E(e.getIn(t,n.field_key),n,r.compareMap))),r.sqlExpression)}function A(t,r){if(!n(r.conditions))return!1;return h(r.conditions.map((n=>{const a=e.getIn(t,n.field);return"field"===n.valueType?E(a,{con:n.type,value:e.getIn(t,n.value)},r.compareMap):E(a,{con:n.type,value:n.value},r.compareMap)})),r.sqlExpression)}const b=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:a=[],params:o=[],compareMap:i={}}=e;if(!a.length)return;function l(e){var r;if(!t(e))return e;const a=e.trim().match(/^\$\{([a-zA-Z\d\s]+)}$/);return a?n(null==(r=a[1])?void 0:r.trim()):e}o.every((e=>e&&e.p_name&&E(n(e.p_name),{con:e.p_select,value:l(e.p_value)},i)))&&a.forEach((e=>r(e.p_name,l(e.p_value))))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function I(e){return b[e]||s}function L(e,r,a){function i(e){return n(e)&&!!e.length}function l(e,n=!0){e.forEach((e=>{if(!e.operationalResult||!n&&null!=r(e.operationalResult))return;const i=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+r(n),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${l}`)(i);t(u)&&(u=+u),u=o(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",a(e.operationalResult,u)}))}return{operationalFormHandler:function(n){if(!i(d(e)))return;const t=d(e).filter((e=>e.operationFormParam.includes(`table.${n}`)));t.length&&l(t)},triggerAllOperationalFormHandler:function(){i(d(e))&&l(d(e),!1)}}}function V(e,t,r){function a(e){return n(e)&&!!e.length}function i(e,n=!0){e.forEach((e=>{e.diffValField&&e.diffValUnit&&e.scene&&(n||null==t(e.diffValField))&&("DIFF"===e.scene?function({startDateField:e,endDateField:n,diffValField:a,diffValUnit:o,precision:i="0"}){const l=t(e),u=t(n);if(l&&u){const e=F(new Date(u),new Date(l))/1e3/60,n=e/60,t=n/24;let c="";switch(o){case"DAY":c=t.toFixed(+i);break;case"HOUR":c=n.toFixed(+i);break;case"MIN":c=e.toFixed(+i);break;case"DHM":c=`${Math.floor(t)}天${Math.floor(n%24)}小时${Math.floor(e%60)}分钟`;break}r(a,c)}else r(a,null)}(e):"CALC"===e.scene&&function(e){const n=+e.diffValField;if(!o(n)||Number.isNaN(n))return;const a=t(e.endDateField);if(a){const t=m(new Date(a),{days:"DAY"===e.diffValUnit?n:0,hours:"HOUR"===e.diffValUnit?n:0,minutes:"MIN"===e.diffValUnit?n:0});r(e.startDateField,t)}else r(e.startDateField,null)}(e))}))}return{dateOperationalFormHandler:function(n){if(!a(d(e)))return;const t=d(e).filter((e=>"DIFF"===e.scene&&e.startDateField===n||e.endDateField===n));t.length&&i(t)},triggerAllDateOperationalFormHandler:function(){a(d(e))&&i(d(e),!1)}}}export{I as getBindEventSettingTrigger,V as getDateOperationalFormHandler,L as getOperationalFormHandler,h as isConditionsMatchSqlExpression,E as isMatchLowCodeCondition,v as isMatchLowCodeConditionsWithSqlExpression,A as isMatchNewLowCodeConditionsWithSqlExpression};
|