cnhis-design-vue 3.1.50-beta.10 → 3.1.50-beta.12
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/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +3 -0
- 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.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -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/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
- package/es/components/form-config/index.d.ts +188 -8
- package/es/components/form-config/src/FormConfig.vue.d.ts +188 -8
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +91 -4
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +94 -4
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-render/index.d.ts +91 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +91 -4
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +91 -4
- package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -5
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +173 -4
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +2 -0
- package/es/components/iho-table/index.d.ts +26 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +26 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +4 -0
- package/es/components/info-header/index.d.ts +272 -11
- package/es/components/info-header/src/InfoHeader.vue.d.ts +272 -11
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +86 -3
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +86 -3
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +177 -7
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +91 -4
- package/es/components/shortcut-setter/index.d.ts +91 -4
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +91 -4
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +28 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.d.ts +3 -1
- package/es/shared/utils/business.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,25 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
3
3
|
component: any;
|
|
4
4
|
props: {
|
|
5
5
|
clearable: boolean;
|
|
6
|
+
allowInput?: undefined;
|
|
7
|
+
filterable?: undefined;
|
|
8
|
+
multiple?: undefined;
|
|
9
|
+
maxTagCount?: undefined;
|
|
10
|
+
type?: undefined;
|
|
11
|
+
valueFormat?: undefined;
|
|
12
|
+
};
|
|
13
|
+
eventsBySearch: {
|
|
14
|
+
name: string;
|
|
15
|
+
handler(e: KeyboardEvent, search: funcVoid): void;
|
|
16
|
+
}[];
|
|
17
|
+
handlerProps(props: any, { title }?: any): any;
|
|
18
|
+
setDefaultValue: (defaultValue: any) => any;
|
|
19
|
+
style?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
component: any;
|
|
22
|
+
props: {
|
|
23
|
+
clearable: boolean;
|
|
24
|
+
allowInput: (value: string) => boolean;
|
|
6
25
|
filterable?: undefined;
|
|
7
26
|
multiple?: undefined;
|
|
8
27
|
maxTagCount?: undefined;
|
|
@@ -60,6 +79,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
60
79
|
filterable: boolean;
|
|
61
80
|
multiple: boolean;
|
|
62
81
|
maxTagCount: string;
|
|
82
|
+
allowInput?: undefined;
|
|
63
83
|
type?: undefined;
|
|
64
84
|
valueFormat?: undefined;
|
|
65
85
|
};
|
|
@@ -301,6 +321,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
301
321
|
filterable: boolean;
|
|
302
322
|
multiple: boolean;
|
|
303
323
|
maxTagCount: string;
|
|
324
|
+
allowInput?: undefined;
|
|
304
325
|
type?: undefined;
|
|
305
326
|
valueFormat?: undefined;
|
|
306
327
|
};
|
|
@@ -544,6 +565,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
544
565
|
type: string;
|
|
545
566
|
clearable: boolean;
|
|
546
567
|
valueFormat: string;
|
|
568
|
+
allowInput?: undefined;
|
|
547
569
|
filterable?: undefined;
|
|
548
570
|
multiple?: undefined;
|
|
549
571
|
maxTagCount?: undefined;
|
|
@@ -695,6 +717,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
695
717
|
type: string;
|
|
696
718
|
clearable: boolean;
|
|
697
719
|
valueFormat: string;
|
|
720
|
+
allowInput?: undefined;
|
|
698
721
|
filterable?: undefined;
|
|
699
722
|
multiple?: undefined;
|
|
700
723
|
maxTagCount?: undefined;
|
|
@@ -959,6 +982,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
959
982
|
type: string;
|
|
960
983
|
clearable: boolean;
|
|
961
984
|
valueFormat: string;
|
|
985
|
+
allowInput?: undefined;
|
|
962
986
|
filterable?: undefined;
|
|
963
987
|
multiple?: undefined;
|
|
964
988
|
maxTagCount?: undefined;
|
|
@@ -1114,6 +1138,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
1114
1138
|
type: string;
|
|
1115
1139
|
clearable: boolean;
|
|
1116
1140
|
valueFormat: string;
|
|
1141
|
+
allowInput?: undefined;
|
|
1117
1142
|
filterable?: undefined;
|
|
1118
1143
|
multiple?: undefined;
|
|
1119
1144
|
maxTagCount?: undefined;
|
|
@@ -1226,6 +1251,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
1226
1251
|
}>;
|
|
1227
1252
|
props: {
|
|
1228
1253
|
clearable?: undefined;
|
|
1254
|
+
allowInput?: undefined;
|
|
1229
1255
|
filterable?: undefined;
|
|
1230
1256
|
multiple?: undefined;
|
|
1231
1257
|
maxTagCount?: undefined;
|
|
@@ -1301,6 +1327,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
1301
1327
|
}>;
|
|
1302
1328
|
props: {
|
|
1303
1329
|
clearable?: undefined;
|
|
1330
|
+
allowInput?: undefined;
|
|
1304
1331
|
filterable?: undefined;
|
|
1305
1332
|
multiple?: undefined;
|
|
1306
1333
|
maxTagCount?: undefined;
|
|
@@ -1362,6 +1389,7 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
1362
1389
|
filterable: boolean;
|
|
1363
1390
|
multiple: boolean;
|
|
1364
1391
|
maxTagCount: string;
|
|
1392
|
+
allowInput?: undefined;
|
|
1365
1393
|
type?: undefined;
|
|
1366
1394
|
valueFormat?: undefined;
|
|
1367
1395
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a,NInput as o}from"naive-ui";import{InputNumberGroup as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:n,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
|
|
1
|
+
import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a,NInput as o}from"naive-ui";import{InputNumberGroup as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:n,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:o,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.50-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.50-beta.12",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.50-beta.12",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};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { BindEventSettingItem, FormOperationalConfig, LOW_CODE_EVENT_TYPE, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
|
|
1
|
+
import { AnyObject, BindEventSettingItem, FormOperationalConfig, LOW_CODE_EVENT_TYPE, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
|
|
2
2
|
import { MaybeRef } from '@vueuse/core';
|
|
3
|
+
import { FormLowCodeReactions } from '../../../es/components/form-render';
|
|
3
4
|
export declare function isMatchLowCodeCondition(value: unknown, condition: {
|
|
4
5
|
con: LOW_CODE_VALUE_RELATION;
|
|
5
6
|
value: unknown;
|
|
6
7
|
}): boolean;
|
|
8
|
+
export declare function isMatchLowCodeConditionsWithSqlExpression(formData: AnyObject, config: FormLowCodeReactions.Config): any;
|
|
7
9
|
declare function handleFieldTriggerSetValue(bindEventSetting: BindEventSettingItem, { getter, setter }: {
|
|
8
10
|
setter: (key: string, value: unknown) => void;
|
|
9
11
|
getter: (key: string) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isArray as
|
|
1
|
+
import{Path as e}from"@formily/path";import{isArray as r,isString as n,includes as t,negate as o,gt as l,gte as a,isNumber as i,lt as u,lte as c,noop as s,isObject as p}from"lodash-es";import{unref as f}from"vue";function E(e){return null==e||""==e}const m={EQ:(e,r)=>`${e}`===r,NEQ:(e,r)=>`${e}`!==r,CL:(e,o)=>!(!r(e)&&!n(e))&&t(e,o),NC:(e,o)=>!r(e)&&!n(e)||!t(e,o),NULL:E,NOT_NULL:o(E),BIG:l,BIGEQ:a,LESS:(e,r)=>!!(i(e)||n(e)&&e)&&u(e,r),LESSEQ:(e,r)=>!!(i(e)||n(e)&&e)&&c(e,r)};function g(e,r){return(m[r.con]||(()=>!1))(e,`${r.value}`)}function _(t,o){if(!r(o.conObj))return!1;if(!o.sqlExpression||!n(o.sqlExpression))return o.conObj.every((r=>g(e.getIn(t,r.field_key),r)));const l=o.conObj.map((r=>g(e.getIn(t,r.field_key),r)));try{return new Function("return "+o.sqlExpression.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(e=>l[+e-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",o.sqlExpression),!1}}const L=Object.freeze({SET_VALUE:function(e,{getter:r,setter:n}){if(!p(e))return;const{results:t=[],params:o=[]}=e;if(!t.length)return;o.every((e=>e&&e.p_name&&g(r(e.p_name),{con:e.p_select,value:e.p_value})))&&t.forEach((e=>n(e.p_name,e.p_value)))},REPEAT_VALIDATE:s,IS_SHOW_FIELD:s,SQLSAVE:s,API:s});function d(e){return L[e]||s}function A(e,t,o){function l(e){return r(e)&&!!e.length}function a(e,r=!0){e.forEach((e=>{const l=e.operationFormParam.reduce(((e,r)=>(e[r=r.replace(/^table\./,"")]=+t(r),e)),{}),a=e.operationalRule.replace(/\${(.+?)}/g,"$1");let u=new Function("table",`return ${a}`)(l);n(u)&&(u=+u),u=i(u)?isNaN(u)?"":u.toFixed(+e.operationalPrecision):"",(r||null==t(e.operationalResult))&&o(e.operationalResult,u)}))}return{operationalFormHandler:function(r){if(!l(f(e)))return;const n=f(e).filter((e=>e.operationFormParam.includes(`table.${r}`)));n.length&&a(n)},triggerAllOperationalFormHandler:function(){l(f(e))&&a(f(e),!1)}}}export{d as getBindEventSettingTrigger,A as getOperationalFormHandler,g as isMatchLowCodeCondition,_ as isMatchLowCodeConditionsWithSqlExpression};
|
package/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{useMemoize as o}from"@vueuse/core";import{isString as i,isObject as
|
|
1
|
+
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{useMemoize as o}from"@vueuse/core";import{isString as i,isObject as s,isNumber as u,isArray as c,isFunction as f}from"lodash-es";import a from"../package.json.js";export{getBindEventSettingTrigger,getOperationalFormHandler,isMatchLowCodeCondition,isMatchLowCodeConditionsWithSqlExpression}from"./business.js";function l(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",s){r=x(r),e=x(e);for(let u=0;u<e.length;u++){if(n(e[u],i,s),o)return;for(let i=0;i<r.length;i++){const s=e[u][r[i]];if(Array.isArray(s)&&t(s,n,r,e[u]),o)return}}}(t,e,n,r)}function d(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(!Reflect.get(t,"__cnhis_version")&&s(a)&&Reflect.set(t,"__cnhis_version",a.version),r?r():t.component(n,e))}function p(t){if(!i(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function x(t){return Array.isArray(t)?t:[t]}function m(){return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const h=o((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),g=Object.seal(Object.create(null));function v(t,e){return function t(e,n){return s(e)?c(e)?e.map((e=>t(e,n))):Object.entries(e).reduce(((e,[r,o])=>(n.includes(r)||(s(o)&&!f(o)?e[r]=t(o,n):e[r]=o),e)),{}):e}(t,e)}function y(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function b(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function j(t,e="px"){if(u(t))return`${t}${e}`;if(i(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}const O=o((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function w(t,e){if(!s(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function E(e){if(!t())throw new Error(e||"can't use this hook out of setup environment")}function $(t,e=1){const[n,r,o,i,s]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!n)return[255,255,255,e];const c=s&&parseInt(s,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(i,16),+(u(c)?c.toFixed(2):e)]}function _(t){return e({setup(e,{slots:o}){let i=(null==t?void 0:t.parent)&&Reflect.get(t.parent,"provides");const s=[];for(;i;)Object.entries(i).forEach((([t,e])=>{s.includes(t)||(s.push(t),n(t,e))})),i=Object.getPrototypeOf(i);return()=>{var t;return r("div",null,[null==(t=o.default)?void 0:t.call(o)])}}})}const S=o((function(t,e){return!(!i(e)||!i(t))&&e.split(",").some((e=>e.trim().includes(t)))}),{getKey:(...t)=>t.reduce(((t,e)=>String(t)+"_"+String(e)),"")});export{g as DMZ,x as arrayed,E as checkInSetupEnv,_ as createProviderWrapper,v as deepOmit,b as findAncestor,p as generateTimeFormat,h as getStringWidth,$ as hex2rgba,O as jsonParse,S as keywordMatcher,d as safeComponentRegister,y as separateMetaModule,w as shallowOmit,l as traverse,m as uuidGenerator,j as widthAppend};
|