cnhis-design-vue 3.1.47-beta.1 → 3.1.47-beta.10
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/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +7 -5
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -0
- package/es/components/form-config/index.d.ts +9 -9
- package/es/components/form-config/src/FormConfig.vue.d.ts +9 -9
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +4 -4
- package/es/components/form-render/index.d.ts +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +2 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +1 -0
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/form-render/src/types/index.d.ts +59 -2
- package/es/components/form-render/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/index.d.ts +2 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -1
- package/es/components/multi-chat/index.d.ts +1023 -0
- package/es/components/multi-chat/index.js +1 -0
- package/es/components/multi-chat/src/MultiChat.vue.d.ts +1005 -0
- package/es/components/multi-chat/src/MultiChat.vue.js +1 -0
- package/es/components/multi-chat/src/MultiChat.vue2.js +1 -0
- package/es/components/multi-chat/src/api/index.d.ts +8 -0
- package/es/components/multi-chat/src/api/index.js +1 -0
- package/es/components/multi-chat/src/components/ChatFooter.vue.d.ts +17 -0
- package/es/components/multi-chat/src/components/ChatFooter.vue.js +1 -0
- package/es/components/multi-chat/src/components/ChatFooter.vue2.js +1 -0
- package/es/components/multi-chat/src/components/ChatHeader.vue.d.ts +7 -0
- package/es/components/multi-chat/src/components/ChatHeader.vue.js +1 -0
- package/es/components/multi-chat/src/components/ChatHeader.vue2.js +1 -0
- package/es/components/multi-chat/src/components/ChatMain.vue.d.ts +13 -0
- package/es/components/multi-chat/src/components/ChatMain.vue.js +1 -0
- package/es/components/multi-chat/src/components/ChatMain.vue2.js +1 -0
- package/es/components/multi-chat/src/components/SiderList.vue.d.ts +41 -0
- package/es/components/multi-chat/src/components/SiderList.vue.js +1 -0
- package/es/components/multi-chat/src/components/SiderList.vue2.js +1 -0
- package/es/components/multi-chat/src/utils/chatSock.d.ts +28 -0
- package/es/components/multi-chat/src/utils/chatSock.js +1 -0
- package/es/components/multi-chat/style/index.css +1 -0
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +2 -2
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +2 -2
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +4 -2
|
@@ -41,7 +41,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
41
41
|
level_key: string;
|
|
42
42
|
link_key: string;
|
|
43
43
|
link_key_split: string;
|
|
44
|
-
show_key: string[];
|
|
44
|
+
show_key: string | string[];
|
|
45
45
|
conObj: AnyObject[];
|
|
46
46
|
conObjFirstLevel: AnyObject[];
|
|
47
47
|
setting: Partial<{
|
|
@@ -103,7 +103,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
103
103
|
level_key: string;
|
|
104
104
|
link_key: string;
|
|
105
105
|
link_key_split: string;
|
|
106
|
-
show_key: string[];
|
|
106
|
+
show_key: string | string[];
|
|
107
107
|
conObj: AnyObject[];
|
|
108
108
|
conObjFirstLevel: AnyObject[];
|
|
109
109
|
setting: Partial<{
|
|
@@ -177,7 +177,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
177
177
|
level_key: string;
|
|
178
178
|
link_key: string;
|
|
179
179
|
link_key_split: string;
|
|
180
|
-
show_key: string[];
|
|
180
|
+
show_key: string | string[];
|
|
181
181
|
conObj: AnyObject[];
|
|
182
182
|
conObjFirstLevel: AnyObject[];
|
|
183
183
|
setting: Partial<{
|
|
@@ -239,7 +239,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
239
239
|
level_key: string;
|
|
240
240
|
link_key: string;
|
|
241
241
|
link_key_split: string;
|
|
242
|
-
show_key: string[];
|
|
242
|
+
show_key: string | string[];
|
|
243
243
|
conObj: AnyObject[];
|
|
244
244
|
conObjFirstLevel: AnyObject[];
|
|
245
245
|
setting: Partial<{
|
|
@@ -49,7 +49,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
49
49
|
level_key: string;
|
|
50
50
|
link_key: string;
|
|
51
51
|
link_key_split: string;
|
|
52
|
-
show_key: string[];
|
|
52
|
+
show_key: string | string[];
|
|
53
53
|
conObj: AnyObject[];
|
|
54
54
|
conObjFirstLevel: AnyObject[];
|
|
55
55
|
setting: Partial<{
|
|
@@ -131,7 +131,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
131
131
|
level_key: string;
|
|
132
132
|
link_key: string;
|
|
133
133
|
link_key_split: string;
|
|
134
|
-
show_key: string[];
|
|
134
|
+
show_key: string | string[];
|
|
135
135
|
conObj: AnyObject[];
|
|
136
136
|
conObjFirstLevel: AnyObject[];
|
|
137
137
|
setting: Partial<{
|
|
@@ -12,7 +12,7 @@ export declare function useFormExposeEvent({ formModel, formRenderRef, formUUID,
|
|
|
12
12
|
validate(path?: string): Promise<void>;
|
|
13
13
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
14
14
|
setFormValues(values: AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
15
|
-
setFieldState(path: string,
|
|
15
|
+
setFieldState(path: string, setter: (field: IFieldState) => void): void;
|
|
16
16
|
resetFields(path?: string): Promise<void>;
|
|
17
17
|
queryWidget(key: string): Promise<{
|
|
18
18
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Func } from '../../../../../es/shared/types';
|
|
2
2
|
import { DependKeyType } from '../../../../../es/components/form-render';
|
|
3
3
|
export declare class FormItemDepsCollector {
|
|
4
|
+
triggerDisabled: boolean;
|
|
4
5
|
private readonly collector;
|
|
5
6
|
setDeps(key: string, dependKeys: DependKeyType, callback: Func): void;
|
|
6
7
|
getDeps(dependKey: string): Map<string, Func<any[], any>> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFunction as t}from"lodash-es";import"../utils/index.js";import{traverseDependKey as e}from"../utils/schema.js";class r{constructor(){this.collector=new Map}setDeps(t,r,s){e(r,(e=>{const r=this.collector.get(e)||new Map;r.set(t,s),this.collector.set(e,r)}))}getDeps(t){return this.collector.get(t)}trigger(e,r){var s;null==(s=this.getDeps(e))||s.forEach((e=>t(e)&&e(r)))}}function s(){return{create:function(){return new r}}}export{r as FormItemDepsCollector,s as useFormItemDeps};
|
|
1
|
+
import{isFunction as t}from"lodash-es";import"../utils/index.js";import{traverseDependKey as e}from"../utils/schema.js";class r{constructor(){this.triggerDisabled=!1,this.collector=new Map}setDeps(t,r,s){e(r,(e=>{const r=this.collector.get(e)||new Map;r.set(t,s),this.collector.set(e,r)}))}getDeps(t){return this.collector.get(t)}trigger(e,r){var s;this.triggerDisabled||null==(s=this.getDeps(e))||s.forEach((e=>t(e)&&e(r)))}}function s(){return{create:function(){return new r}}}export{r as FormItemDepsCollector,s as useFormItemDeps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useForm as t}from"@formily/vue";import{useMemoize as l,useDebounceFn as u}from"@vueuse/core";import{identity as o,uniqBy as r,isString as a,isEqual as i,
|
|
1
|
+
import{checkInSetupEnv as e,jsonParse as n}from"../../../../shared/utils/index.js";import{useForm as t}from"@formily/vue";import{useMemoize as l,useDebounceFn as u}from"@vueuse/core";import{identity as o,uniqBy as r,isString as a,isEqual as i,isArray as c,omit as s,isFunction as v}from"lodash-es";import{computed as m,inject as f,ref as d,toRaw as y,watch as p}from"vue";import"../../index.js";import{InjectionAsyncQueue as h,InjectionFormLifeCycleCaller as g,InjectionFormItemDepsCollector as w}from"../constants/index.js";import{createUrlConfigParams as k,formRenderLog as b,keywordMatcher as R}from"../utils/index.js";import{useFormField as C}from"./useFormField.js";import{useFormRequest as F}from"./useFormRequest.js";function K(e,n){const t=d();return m({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const q=(()=>{const e=l((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:o});return(n,t)=>t.match(e(n))})();function O(){const e=d();return{searchContent:e,optionSearchFilter:function(n,t,l){if(!e.value)return n;const u=c(l)?l.filter((e=>e&&a(e))):[];return n.filter((n=>function(n,t,l){if(!e.value)return!0;const u=n?n[t]:"";return!!a(u)&&(!!q(e.value,u)||!!R(e.value,n.keyword)||!!l.length&&l.some((t=>a(n[t])&&n[t].includes(e.value))))}(n,t,u)))}}}function j(e,t,l,u,o){const a=K(e,"commonList"),i=K(e,"recentList"),{searchContent:c,optionSearchFilter:d}=O();function y(e){return n(e.itemObj)}const p=m((()=>{var e,n;return null!=(n=null==(e=a.value)?void 0:e.map(y))?n:[]})),g=m((()=>{var e,n;return null!=(n=null==(e=i.value)?void 0:e.map(y))?n:[]})),w=m((()=>{if(!e.recommend||!p.value.length&&!g.value.length)return t.value;const n=r(p.value.concat(g.value),(e=>e[o.value])),l=t.value.filter((e=>n.every((function(n){return n[o.value]!==e[o.value]}))));return[...d(n,u.value),...l]})),{getRecommendRequestInfo:k,getHttpInstance:b}=F();function R(n){const{url:t,getRecommendIds:l}=k(),u=v(l)?l():{},o=v(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:q}=C(),j=f(h);return{postRecommend:async function(n){if(!e.recommend)return;const t=b();if(!t)return;const{url:u,info:r}=R("post"),a=w.value.find((e=>e[o.value]===n));a&&l("postRecommend",await t.post(u,{...r,keyword:"",itemId:o.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(c.value=n,a.value&&i.value&&e.recommendCache)return;const t=await j.addAsync(function(n,t){const{url:l,info:u}=R("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(q.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(s(n,["type"])):"recently"===n.type&&e.recently.push(s(n,["type"])),e)),{commonly:[],recently:[]});a.value=l.slice(0,e.commonNum),i.value=u.slice(0,e.recentNum)},sortedOptions:w}}function I(n,t){e();const l=f(h),o=f(g),r=m((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),c=m((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:s,optionSearchFilter:v}=O(),R=d(null),{field:F,fieldKey:K}=C(),q=u((async function(e){if(s.value=e||"",!n.urlConfig)return R.value=null;try{const e=await l.addAsync(await k({config:n.urlConfig,cache:n.requestCache,field:F.value}));y(R.value)!==e&&(R.value=e,o("afterOptionInit",[K.value,R.value]))}catch(e){a(e)&&b(e)}}),300),j=m((()=>R.value?v(R.value,r.value):Array.isArray(n.options)?v(n.options,r.value):[])),I=m((()=>R.value||n.options||[])),x=f(w);return p((()=>n.urlConfig),((e,l)=>{if(!i(e,l)){if(R.value=null,!e)return R.value=null;x.setDeps(K.value,e.dependKey||[],(async()=>{R.value=null,t.value=null,!n.lazyRequest&&await q()})),(t.value||!n.lazyRequest)&&q()}}),{immediate:!0}),{labelKey:r,valueKey:c,filterOptions:j,fullOptions:I,fetchData:q}}function x(n,l){e();const o=f(h),r=f(g),s=t(),v=m((()=>{var e,t,l,u;const o=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0];if(a(o))return o;let r=null==(l=n.wordbook)?void 0:l.show_key;return c(r)&&(r=r[0]),a(r)?r:null!=(u=n.labelField)?u:"text"})),k=m((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),R=m((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:K,optionSearchFilter:q}=O(),j=d(null),{fieldKey:I}=C(),{getSearchRequestInfo:x}=F(),A=u((async function(e){if(K.value=e||"",!n.autograph||!n.wordbook)return j.value=null;try{const e=await o.addAsync(function(e,t,l){var u,o,r;const a={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};if(null==(u=e.queryParams)?void 0:u.length){const n=null!=(r=null==(o=s.value)?void 0:o.getFormState().values)?r:{};e.queryParams.forEach((e=>{a[e]=n[e]}))}return console.log(a),{...x(),params:a,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,I.value));y(j.value)!==e&&(j.value=e,r("afterOptionInit",[I.value,j.value]))}catch(e){a(e)&&b(e)}}),300),S=m((()=>j.value?q(j.value,v.value,R.value):Array.isArray(n.options)?q(n.options,v.value):[])),N=m((()=>j.value||n.options||[])),_=f(w);return p((()=>n.wordbook),((e,t)=>{if(!i(e,t)){if(j.value=null,!e)return j.value=null;_.setDeps(I.value,e.queryParams||[],(async()=>{j.value=null,A()})),(l.value||!n.lazyRequest)&&A()}}),{immediate:!0}),{labelKey:v,valueKey:k,filterOptions:S,fullOptions:N,fetchData:A}}export{q as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
|
|
@@ -28,17 +28,74 @@ export declare type AgeContext = Record<'age' | 'day' | 'month' | 'year' | 'hour
|
|
|
28
28
|
export declare type IdCardParseInfo = Record<'sex' | 'birthday', string> & AgeContext;
|
|
29
29
|
export declare type FormRenderExpose = {
|
|
30
30
|
formModel: Form;
|
|
31
|
+
/**
|
|
32
|
+
* @desc 触发表单校验
|
|
33
|
+
* @param {string} path 目标路径, 支持Path语法
|
|
34
|
+
* @return {void | Promise<Object[]>}
|
|
35
|
+
*/
|
|
31
36
|
validate(path?: string): Promise<unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* @desc 获取表单当前所有数据
|
|
39
|
+
* @param {boolean} needCombineExtendKey 是否合并extendKey
|
|
40
|
+
* @return {Object}
|
|
41
|
+
*/
|
|
32
42
|
getFormValues(needCombineExtendKey?: boolean): AnyObject;
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
/**
|
|
44
|
+
* @desc 对象形式为表单设值
|
|
45
|
+
* @param {object} values 值对象
|
|
46
|
+
* @param {{
|
|
47
|
+
* needSplitExtendKey?: boolean;
|
|
48
|
+
* avoidBusinessConnection?: boolean;
|
|
49
|
+
* avoidDependKeyConnection?: boolean;
|
|
50
|
+
* overwrite?: boolean;
|
|
51
|
+
* } | boolean} options 为了兼容旧的用法, 也可以直接传boolean值, 但是此用法即将移除
|
|
52
|
+
* ⭐️ 当值为对象时(推荐)
|
|
53
|
+
* {
|
|
54
|
+
* needSplitExtendKey, //是否将extendKey展开, 默认为true
|
|
55
|
+
* avoidBusinessConnection, // 赋值时是否规避业务联动, 默认为false
|
|
56
|
+
* avoidDependKeyConnection, // 赋值时是否规避依赖联动, 默认为true
|
|
57
|
+
* overwrite // 是否对表单值进行全量覆盖, 默认为true
|
|
58
|
+
* }
|
|
59
|
+
* 🗑 当值为boolean时(即将移除此用法)
|
|
60
|
+
* 表示needSplitExtendKey 是否将extendKey展开, 默认为true
|
|
61
|
+
* @param {boolean} avoidBusinessConnection 🗑 赋值时是否规避业务联动, 默认为false(即将移除此参数)
|
|
62
|
+
* @param {boolean} overwrite 🗑 是否对表单值进行全量覆盖, 默认为true(即将移除此参数)
|
|
63
|
+
*/
|
|
64
|
+
setFormValues(values: AnyObject, options?: Partial<{
|
|
65
|
+
needSplitExtendKey: boolean;
|
|
66
|
+
avoidBusinessConnection: boolean;
|
|
67
|
+
avoidDependKeyConnection: boolean;
|
|
68
|
+
overwrite: boolean;
|
|
69
|
+
}> | boolean, avoidBusinessConnection?: boolean, overwrite?: boolean): any;
|
|
70
|
+
/**
|
|
71
|
+
* @desc 修改表单field实例配置
|
|
72
|
+
* @param {string} path 目标路径, 支持Path语法
|
|
73
|
+
* @param {Partial<Field>|((field: Field) => void)} setter
|
|
74
|
+
*/
|
|
75
|
+
setFieldState(path: string, setter: Partial<Field> | ((field: Field) => void)): void;
|
|
76
|
+
/**
|
|
77
|
+
* @desc 重置表单状态
|
|
78
|
+
* @param {string} path 目标路径, 支持Path语法
|
|
79
|
+
*/
|
|
35
80
|
resetFields(path?: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* @desc 查询val_key对应的dom元素组合
|
|
83
|
+
* @param {string} key val_key值
|
|
84
|
+
* @return {Object}
|
|
85
|
+
*/
|
|
36
86
|
queryWidget(key: string): Promise<{
|
|
37
87
|
widgetElement: HTMLInputElement | null;
|
|
38
88
|
widgetElementList: HTMLInputElement[];
|
|
39
89
|
decoratorElement: HTMLElement | null;
|
|
40
90
|
}>;
|
|
91
|
+
/**
|
|
92
|
+
* @desc 获取经过visitor解析之后的fieldList(无响应式)
|
|
93
|
+
* @return {FieldItem[]}
|
|
94
|
+
*/
|
|
41
95
|
getFieldList(): FieldItem[] | null;
|
|
96
|
+
/**
|
|
97
|
+
* @desc 完全重置表单
|
|
98
|
+
*/
|
|
42
99
|
reload(): Promise<any>;
|
|
43
100
|
};
|
|
44
101
|
export declare type FormChangeContext = Partial<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{inject as e,provide as t,computed as r,createVNode as n,Fragment as o}from"vue";import{arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as
|
|
1
|
+
import{inject as e,provide as t,computed as r,createVNode as n,Fragment as o}from"vue";import{arrayed as c}from"../../../../shared/utils/index.js";import{isGeneralField as u,isField as i}from"@formily/core";import{Path as s}from"@formily/path";import{isObject as f}from"@vue/shared";import{useMemoize as a}from"@vueuse/core";import{isString as l,isFunction as p,omit as m}from"lodash-es";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as d}from"../constants/index.js";import"date-fns";import{traverseDependKey as h}from"./schema.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./schema.js";function y(e){console.warn(`[FormRender]: ${e}`)}function x(e,t,r=["children","properties","suffixConfig"],n="val_key",o="default_val"){return function e(t,n){n.forEach((n=>{f(n)&&(null!=i(n)&&null==t[u(n)]&&s.setIn(t,u(n),i(n)),r.forEach((r=>{n[r]&&(t[u(n)]||(t[u(n)]={}),e(t[u(n)],c(n[r])))})))}))}(e,t),e;function u(e){return e[n]}function i(e){return e[o]}}function g(r,n){let o=e(r,null);return o||(o=n(),t(r,o)),o}function v(e){return l(e)?+e:e}function S(e,t,r){if(f(e)&&!p(e)){const r={};return Object.entries(e).forEach((([e,n])=>{p(n)&&(r[e]=()=>n(t))})),r}return{default:()=>p(e)?e(t):r?r(e):[e]}}function j(e,t){return r((()=>{const r={};return e.prefix&&(r.prefix=()=>n(o,null,[S(e.prefix,e,t).default()])),e.suffix&&(r.suffix=()=>n(o,null,[S(e.suffix,e,t).default()])),r}))}function E(e){if(!f(e))throw e;return t=e,Reflect.has(t,"map")&&Reflect.has(t,"result")?function(e){const{result:t,map:r}=e;if("SUCCESS"!==t)throw e;return r.rows}(e):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(e)?function(e){const{obj:t,result:r}=e;if("SUCCESS"!==r||!f(t))throw e;return Object.entries(t).reduce(((e,[t,r])=>(r.forEach((r=>e.push({...r,type:t}))),e)),[])}(e):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(e)?function(e){const{data:t,success:r}=e;if(!r)throw e;return t}(e):[];var t}const K=a((function(e,t){return!(!l(t)||!l(e))&&t.split(",").some((t=>t.trim().includes(e)))}),{getKey:(...e)=>e.reduce(((e,t)=>String(e)+"_"+String(t)),"")});function b(e,t){return l(e)&&e?e.replace(/\$\{([^}]*)}/g,(function(e,r){var n;return null!=(n=t[r.trim()])?n:""})):""}function w(e){return e.reduce(((e,t)=>(l(t.extendKey)&&t.extendKey&&e.push(t),k(t)&&e.push(...w(t.children||[])),e)),[])}function R(e,t){const r=w(e);if(!r.length)return t;const n={},o=new Map;return Object.entries(t).forEach((([e,c])=>{const u=r.find((t=>t.val_key===e));if(!u)return n[e]=c;const{val_key:i,extendKey:s}=u,f=o.get(s)||{};o.set(s,f),f[i]=t[i]})),[...o.entries()].forEach((([e,t])=>{n[e]=JSON.stringify(t)})),n}function O(e,t){const r=w(e);if(!r.length)return t;const n=a((e=>{try{return f(t[e])?t[e]:JSON.parse(t[e])||{}}catch(e){return{}}})),o=m(t,r.map((e=>e.extendKey)));return r.forEach((({val_key:e,extendKey:t})=>{Reflect.has(o,e)||(o[e]=n(t)[e])})),o}function _(e){return e&&d.includes(e)}function k(e){return _(u(e)?e.componentType:e.html_type)}async function C({config:e,field:t,cache:r}){const n={},o=t.props.name.toString();try{h(e.dependKey||[],((e,r,o)=>{const c=t.query(e).take();if(!i(c)||o&&null==c.value)throw`缺少必须的参数=>${e}`;n[r]=c.value}))}catch(e){return Promise.reject(e)}return{...e,params:Object.assign({},e.params,n),key:o,cache:r}}export{R as combineExtendKey,j as createInputSlot,S as createSlot,C as createUrlConfigParams,y as formRenderLog,g as injectOrProvide,k as isNestedFieldType,_ as isNestedType,K as keywordMatcher,x as mergeDeepProperties,v as parseNumberFromMaybeString,E as presetRequestHandler,O as splitExtendKey,b as validateMessageParser};
|