star-horse-lowcode 3.1.6 → 3.1.8

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.
Files changed (30) hide show
  1. package/README.md +9 -0
  2. package/dist/api/star_horse_apis.d.ts +1 -1
  3. package/dist/api/star_horse_utils.d.ts +3 -2
  4. package/dist/api/system.d.ts +3 -3
  5. package/dist/assets/index.css +1 -1
  6. package/dist/components/comp/StarHorseSearchForm.vue.d.ts +9 -62
  7. package/dist/components/formcomp/utils/FieldList.vue.d.ts +12 -3
  8. package/dist/components/formcomp/utils/ItemRelationEventUtils.d.ts +13 -3
  9. package/dist/components/types/ApiUrls.d.ts +20 -0
  10. package/dist/components/types/ItemPreps.d.ts +155 -2
  11. package/dist/components/types/PageFieldInfo.d.ts +8 -0
  12. package/dist/index.es.js +6 -6
  13. package/dist/plugins/AblesPlugin.d.ts +15 -1
  14. package/dist/store/FormDataCache.d.ts +252 -0
  15. package/dist/store/SelfOperation.d.ts +30 -0
  16. package/dist/store/StoreManager.d.ts +564 -0
  17. package/dist/types/api/star_horse_apis.d.ts +1 -1
  18. package/dist/types/api/star_horse_utils.d.ts +3 -2
  19. package/dist/types/api/system.d.ts +3 -3
  20. package/dist/types/components/comp/StarHorseSearchForm.vue.d.ts +9 -62
  21. package/dist/types/components/formcomp/utils/FieldList.vue.d.ts +12 -3
  22. package/dist/types/components/formcomp/utils/ItemRelationEventUtils.d.ts +13 -3
  23. package/dist/types/components/types/ApiUrls.d.ts +20 -0
  24. package/dist/types/components/types/ItemPreps.d.ts +155 -2
  25. package/dist/types/components/types/PageFieldInfo.d.ts +8 -0
  26. package/dist/types/plugins/AblesPlugin.d.ts +15 -1
  27. package/dist/types/store/FormDataCache.d.ts +252 -0
  28. package/dist/types/store/SelfOperation.d.ts +30 -0
  29. package/dist/types/store/StoreManager.d.ts +564 -0
  30. package/package.json +12 -11
@@ -1,77 +1,24 @@
1
1
  import { SearchParams } from '../types/Params';
2
2
  import { SearchFields } from '../types/SearchProps';
3
- import { PropType } from 'vue';
4
- declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
- formData: {
6
- type: PropType<SearchFields>;
7
- required: true;
8
- };
9
- defaultCondition: {
10
- type: {
11
- (arrayLength: number): SearchParams[];
12
- (...items: SearchParams[]): SearchParams[];
13
- new (arrayLength: number): SearchParams[];
14
- new (...items: SearchParams[]): SearchParams[];
15
- isArray(arg: any): arg is any[];
16
- readonly prototype: any[];
17
- from<T>(arrayLike: ArrayLike<T>): T[];
18
- from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
19
- from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
20
- from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
21
- of<T>(...items: T[]): T[];
22
- readonly [Symbol.species]: ArrayConstructor;
23
- };
24
- };
25
- dialogInput: {
26
- type: BooleanConstructor;
27
- default: boolean;
28
- };
29
- mutComp: {
30
- type: BooleanConstructor;
31
- default: boolean;
32
- };
33
- }>, {
3
+ type __VLS_Props = {
4
+ formData: SearchFields;
5
+ defaultCondition: SearchParams[];
6
+ dialogInput: boolean;
7
+ mutComp: boolean;
8
+ };
9
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
34
10
  searchForm: import('vue').Ref<any, any>;
35
11
  setData: (data: any) => void;
36
12
  createSearchParams: (formData: any) => any[];
37
13
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
38
14
  searchData: (...args: any[]) => void;
39
15
  initComplete: (...args: any[]) => void;
40
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
41
- formData: {
42
- type: PropType<SearchFields>;
43
- required: true;
44
- };
45
- defaultCondition: {
46
- type: {
47
- (arrayLength: number): SearchParams[];
48
- (...items: SearchParams[]): SearchParams[];
49
- new (arrayLength: number): SearchParams[];
50
- new (...items: SearchParams[]): SearchParams[];
51
- isArray(arg: any): arg is any[];
52
- readonly prototype: any[];
53
- from<T>(arrayLike: ArrayLike<T>): T[];
54
- from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
55
- from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
56
- from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
57
- of<T>(...items: T[]): T[];
58
- readonly [Symbol.species]: ArrayConstructor;
59
- };
60
- };
61
- dialogInput: {
62
- type: BooleanConstructor;
63
- default: boolean;
64
- };
65
- mutComp: {
66
- type: BooleanConstructor;
67
- default: boolean;
68
- };
69
- }>> & Readonly<{
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
70
17
  onSearchData?: (...args: any[]) => any;
71
18
  onInitComplete?: (...args: any[]) => any;
72
19
  }>, {
73
20
  dialogInput: boolean;
74
21
  mutComp: boolean;
75
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
76
23
  declare const _default: typeof __VLS_export;
77
24
  export default _default;
@@ -1,7 +1,16 @@
1
- declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
1
+ type __VLS_Props = {
2
+ showContainer: boolean;
3
+ showFormItems: boolean;
4
+ showThirdItems: boolean;
5
+ };
6
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
7
  selectData: (...args: any[]) => void;
3
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
4
9
  onSelectData?: (...args: any[]) => any;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
+ }>, {
11
+ showContainer: boolean;
12
+ showFormItems: boolean;
13
+ showThirdItems: boolean;
14
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
15
  declare const _default: typeof __VLS_export;
7
16
  export default _default;
@@ -1,6 +1,16 @@
1
- import { RelationDetail } from '../../types';
1
+ import { ItemRelation, RelationDetail } from '../../types';
2
+ import { Ref } from 'vue';
2
3
  import { executeFormulaWithFill, initFormFormulaWatchers, setupFormulaWatchers } from './FormulaEngine';
3
- declare const relationEvent: (props: any, relationDetails: RelationDetail[], e: any, actionName: string) => void;
4
+ /**
5
+ * 联动事件分发函数
6
+ * @param props
7
+ * @param item
8
+ * @param e
9
+ * @param formData
10
+ * @param actionName
11
+ */
12
+ declare const relationEventDispatcher: (props: any, item: ItemRelation, e: any, formData: Ref<Record<string, any>>, actionName: string) => void;
13
+ declare const relationEvent: (props: any, relationDetails: RelationDetail[], e: any, formData: Ref<Record<string, any>>, actionName: string) => void;
4
14
  /** 所有触发的事件 */
5
15
  declare const allAction: (context: any, emits: any, formData: any, actionName: string, _isInit?: boolean) => void;
6
16
  /** Button 组件的点击事件 */
@@ -13,4 +23,4 @@ declare const useFormField: (context: any, field: any) => {
13
23
  declare const initCompCallEvent: (props: any, emits: any, formData: any) => void;
14
24
  declare const prepsFilter: (preps: any) => any;
15
25
  declare const convertData: (data: any) => any;
16
- export { allAction, buttonAction, checkIsDisabled, initCompCallEvent, prepsFilter, relationEvent, useFormField, convertData, executeFormulaWithFill, initFormFormulaWatchers, setupFormulaWatchers, };
26
+ export { allAction, buttonAction, checkIsDisabled, initCompCallEvent, prepsFilter, relationEvent, relationEventDispatcher, useFormField, convertData, executeFormulaWithFill, initFormFormulaWatchers, setupFormulaWatchers, };
@@ -71,6 +71,26 @@ export type ApiUrls = {
71
71
  * 修改字段接口
72
72
  */
73
73
  modifyColumnsUrl?: string;
74
+ /**
75
+ * 用户自定义接口1,用户自定义接口使用时保持原样,不会像系统接口那样拼接上下文
76
+ */
77
+ customerUrl1?: string;
78
+ /**
79
+ * 用户自定义接口2
80
+ */
81
+ customerUrl2?: string;
82
+ /**
83
+ * 用户自定义接口3
84
+ */
85
+ customerUrl3?: string;
86
+ /**
87
+ * 用户自定义接口4
88
+ */
89
+ customerUrl4?: string;
90
+ /**
91
+ * 用户自定义接口5
92
+ */
93
+ customerUrl5?: string;
74
94
  /**
75
95
  * 接口路径前缀
76
96
  */
@@ -1,5 +1,5 @@
1
1
  import { ApiUrls } from './ApiUrls';
2
- import { FieldInfo, PageFieldInfo } from './PageFieldInfo';
2
+ import { FieldInfo, FieldMapping, PageFieldInfo } from './PageFieldInfo';
3
3
  import { RedirectParams } from './Params';
4
4
  import { SelectOption } from './SearchProps';
5
5
  export interface ItemPreps {
@@ -143,6 +143,155 @@ export interface RelationDetail {
143
143
  */
144
144
  isWorking: boolean;
145
145
  }
146
+ export interface ApiParam {
147
+ /**
148
+ * 值类型,如果是动态值,需要提取value 中的${xx},替换为具体的xx
149
+ */
150
+ valueType: "dynamic" | "static";
151
+ /**
152
+ * 名称
153
+ */
154
+ paramName?: string;
155
+ /**
156
+ * 值
157
+ */
158
+ paramValue?: string;
159
+ /**
160
+ * 数据匹配方式
161
+ */
162
+ matchType?: string;
163
+ }
164
+ export interface ApiInfo {
165
+ /**
166
+ * 请求头
167
+ */
168
+ headers?: ApiParam[];
169
+ /**
170
+ * 请求参数
171
+ */
172
+ requestParams?: ApiParam[];
173
+ /**
174
+ * 数据返回模板
175
+ */
176
+ responseTemplate?: string;
177
+ /**
178
+ * 消息路径,如:返回数据位 {code:0,msg:'xxx',data:业务数据},这里的路径是msg
179
+ * 返回数据位 {code:0,data:{
180
+ * msg:'xxx',
181
+ * instanceData:{}
182
+ * }},这里的路径是data.msg
183
+ */
184
+ messagePath?: string;
185
+ /**
186
+ * 编码路径,参考messagePath
187
+ */
188
+ codePath?: string;
189
+ /**
190
+ * 业务数据路径,参考messagePath
191
+ */
192
+ dataPath?: string;
193
+ /**
194
+ * 成功码
195
+ */
196
+ successCode?: string;
197
+ /**
198
+ * 请求方式
199
+ */
200
+ httpMethod?: string;
201
+ /**
202
+ * 请求数据类型
203
+ */
204
+ requestDataType?: "form" | "json" | "binary";
205
+ /**
206
+ * 接口地址
207
+ */
208
+ url?: string;
209
+ /**
210
+ * 请求协议
211
+ */
212
+ protocol?: string;
213
+ /**
214
+ * 超时
215
+ */
216
+ timeout?: number;
217
+ /**
218
+ * 接口类型
219
+ */
220
+ apiType: "systemApi" | "thirdApi";
221
+ /*******************以下参数是systemApi专属**********************/
222
+ /**
223
+ * 是否代理
224
+ */
225
+ redirect?: boolean;
226
+ /**
227
+ * 接口调用方法
228
+ */
229
+ method?: string;
230
+ /**
231
+ * 接口名称
232
+ */
233
+ interfaceName?: string;
234
+ /**
235
+ * 服务名
236
+ */
237
+ serviceName?: string;
238
+ }
239
+ export interface OptionField {
240
+ /**
241
+ * 显示属性
242
+ */
243
+ displayField: string;
244
+ /**
245
+ * 值属性
246
+ */
247
+ valueField: string;
248
+ /**
249
+ * 子节点属性
250
+ */
251
+ childrenField?: string;
252
+ /**
253
+ * 是否叶子节点属性
254
+ */
255
+ leafField?: string;
256
+ /**
257
+ * 禁用属性
258
+ */
259
+ disabledField?: string;
260
+ }
261
+ /**
262
+ * 第三方接口
263
+ */
264
+ export interface ApiLinkageDetail {
265
+ /**
266
+ * 业务接口
267
+ */
268
+ apiInfo: ApiInfo;
269
+ /**
270
+ * 认证信息
271
+ */
272
+ authInfo?: ApiInfo;
273
+ /**
274
+ * 字段映射,接口字段与表单字段之间的转换关系
275
+ */
276
+ fieldMappings?: FieldMapping[];
277
+ /**
278
+ * 数据源中数据返回后的显示属性配置
279
+ */
280
+ optionField?: OptionField;
281
+ /**
282
+ * 代理接口
283
+ */
284
+ proxyUrl?: string;
285
+ /**
286
+ * 赋值方式
287
+ */
288
+ assignValueType?: "form" | "datasource";
289
+ /** 接口来源模式 */
290
+ apiMode: "system" | "custom";
291
+ }
292
+ /**
293
+ * 联动对象
294
+ */
146
295
  export interface ItemRelation {
147
296
  /**
148
297
  * 关联事件名称
@@ -151,5 +300,9 @@ export interface ItemRelation {
151
300
  /**
152
301
  * 关联关系详情
153
302
  */
154
- relationDetails: RelationDetail[];
303
+ relationDetails?: RelationDetail[];
304
+ /**
305
+ * 动态接口
306
+ */
307
+ apiLinkage?: ApiLinkageDetail;
155
308
  }
@@ -261,6 +261,14 @@ export declare interface FieldMapping {
261
261
  * 需要赋值的属性
262
262
  */
263
263
  distField: string;
264
+ /**
265
+ * 类型转换选项
266
+ */
267
+ typeConvert?: string;
268
+ /**
269
+ * 转换表达式
270
+ */
271
+ transform?: string;
264
272
  }
265
273
  /**
266
274
  * 动态组件的参数对象