cnhis-design-vue 3.1.14-beta.14 → 3.1.14-beta.17

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 (59) hide show
  1. package/es/node_modules/@formily/path/esm/contexts.js +22 -0
  2. package/es/node_modules/@formily/path/esm/destructor.js +124 -0
  3. package/es/node_modules/@formily/path/esm/index.js +579 -0
  4. package/es/node_modules/@formily/path/esm/matcher.js +199 -0
  5. package/es/node_modules/@formily/path/esm/parser.js +402 -0
  6. package/es/node_modules/@formily/path/esm/shared.js +73 -0
  7. package/es/node_modules/@formily/path/esm/tokenizer.js +287 -0
  8. package/es/node_modules/@formily/path/esm/tokens.js +240 -0
  9. package/es/node_modules/@formily/path/esm/types.js +17 -0
  10. package/es/packages/big-table/index.d.ts +13 -0
  11. package/es/packages/big-table/src/BigTable.vue.d.ts +18 -12
  12. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +7 -4
  13. package/es/packages/big-table/src/bigTableProps.d.ts +4 -0
  14. package/es/packages/big-table/src/bigTableProps.js +1 -0
  15. package/es/packages/big-table/src/components/edit-form/edit-date.js +11 -3
  16. package/es/packages/big-table/src/components/edit-form/edit-input.js +15 -4
  17. package/es/packages/big-table/src/components/edit-form/edit-time.d.ts +43 -0
  18. package/es/packages/big-table/src/components/edit-form/edit-time.js +52 -0
  19. package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +51 -12
  20. package/es/packages/big-table/src/hooks/useEdit.d.ts +42 -0
  21. package/es/packages/big-table/src/hooks/useEdit.js +2 -0
  22. package/es/packages/big-table/src/hooks/useFormat.js +8 -1
  23. package/es/packages/big-table/src/utils.js +1 -0
  24. package/es/packages/big-table/style/index.css +11 -0
  25. package/es/packages/button-print/src/utils/print.d.ts +1 -1
  26. package/es/packages/button-print/src/utils/print.js +4 -4
  27. package/es/packages/form-render/index.d.ts +0 -1
  28. package/es/packages/form-render/src/FormRender.js +2 -2
  29. package/es/packages/form-render/src/FormRender.vue.d.ts +0 -1
  30. package/es/packages/form-render/src/components/renderer/cascader.d.ts +4 -4
  31. package/es/packages/form-render/src/components/renderer/cascader.js +44 -45
  32. package/es/packages/form-render/src/components/renderer/combination.d.ts +6 -0
  33. package/es/packages/form-render/src/components/renderer/combination.js +53 -16
  34. package/es/packages/form-render/src/components/renderer/formItem.js +1 -1
  35. package/es/packages/form-render/src/components/renderer/radio.d.ts +12 -4
  36. package/es/packages/form-render/src/components/renderer/radio.js +23 -5
  37. package/es/packages/form-render/src/components/renderer/select.js +46 -52
  38. package/es/packages/form-render/src/components/renderer/simpleComponent.d.ts +4 -2
  39. package/es/packages/form-render/src/components/renderer/simpleComponent.js +4 -3
  40. package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +1 -1
  41. package/es/packages/form-render/src/hooks/useChangeContext.d.ts +1 -1
  42. package/es/packages/form-render/src/hooks/useChangeContext.js +1 -1
  43. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +3 -2
  44. package/es/packages/form-render/src/hooks/useFormItemDeps.d.ts +4 -3
  45. package/es/packages/form-render/src/hooks/useFormRequest.d.ts +2 -2
  46. package/es/packages/form-render/src/types/fieldItem.d.ts +123 -35
  47. package/es/packages/form-render/src/types/index.d.ts +4 -2
  48. package/es/packages/form-render/src/utils/index.d.ts +3 -6
  49. package/es/packages/index.css +14 -0
  50. package/es/packages/info-header/style/index.css +3 -0
  51. package/es/packages/shortcut-provider/src/types/index.d.ts +11 -9
  52. package/es/packages/shortcut-provider/src/utils/index.js +5 -5
  53. package/es/packages/shortcut-setter/index.d.ts +3247 -1486
  54. package/es/packages/shortcut-setter/src/ShortcutSetter.js +9 -5
  55. package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +3247 -1486
  56. package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +24 -11
  57. package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +1700 -1661
  58. package/es/src/utils/anime.d.ts +1 -1
  59. package/package.json +1 -1
@@ -1,14 +1,24 @@
1
1
  import { AnyObject, ArrayAble } from '../../../../../es/src/types';
2
+ import { SchemaReaction } from '@formily/json-schema/esm/types';
3
+ import { SchemaTypes } from '@formily/vue';
2
4
  import { CSSProperties, VNode } from 'vue';
5
+ import { DependKeyType, FormCommonState } from '../../../../../es/packages/form-render';
6
+ declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
3
7
  export declare type ValidateItem = Partial<{
4
- obj_type: string;
8
+ /**
9
+ * 业务类型
10
+ */
11
+ obj_type: FieldBusinessType;
12
+ /**
13
+ * 校验类型
14
+ */
5
15
  vali_obj: string;
6
16
  max_value: string | number;
7
17
  min_value: string | number;
8
18
  min_length: string | number;
9
19
  max_length: string | number;
10
20
  decimal_length: string | number;
11
- regular_expression: any;
21
+ regular_expression: RegExp | string;
12
22
  regular_error_tip: string;
13
23
  [key: string]: any;
14
24
  }>;
@@ -17,10 +27,6 @@ interface OptionItem {
17
27
  value: any;
18
28
  children?: OptionItem[];
19
29
  }
20
- export interface Ievent {
21
- event_field: string;
22
- event_type: string;
23
- }
24
30
  interface FormRendererPayload {
25
31
  clearable: boolean;
26
32
  disabled: boolean;
@@ -36,64 +42,146 @@ interface SwitchProperty {
36
42
  describe?: string;
37
43
  }
38
44
  export declare type FieldItem = {
45
+ /**
46
+ * 字段的key
47
+ */
39
48
  val_key: string;
49
+ /**
50
+ * 控件类型
51
+ */
40
52
  html_type: string;
41
53
  } & Partial<{
54
+ /**
55
+ * 是否开启批注(需要先在表单维度开启)
56
+ */
42
57
  annotation: boolean;
58
+ /**
59
+ * 定制化字段, AGE类型控件时的单位字段
60
+ */
43
61
  val_key_unit: string;
44
- is_edit: string;
62
+ /**
63
+ * 是否允许编辑('1'为允许编辑)
64
+ */
65
+ is_edit: FormCommonState;
66
+ /**
67
+ * 控件在栅栏系统中的的宽度值, 默认为3
68
+ */
45
69
  elem_width: number;
46
- is_show: string | number;
47
- is_null: string;
70
+ /**
71
+ * 是否展示('1'为展示)
72
+ */
73
+ is_show: FormCommonState;
74
+ /**
75
+ * 是否允许为空('1'为允许为空)
76
+ */
77
+ is_null: FormCommonState;
78
+ /**
79
+ * 字段label
80
+ */
48
81
  name: string;
82
+ /**
83
+ * 字段label(优先级比name高)
84
+ */
49
85
  alias: string;
86
+ /**
87
+ * 默认值
88
+ */
50
89
  default_val: any;
51
- is_empty: string;
52
- group: string;
53
- hide_title: string;
90
+ /**
91
+ * 是否开启清空功能('0'表示开启)
92
+ */
93
+ is_empty: FormCommonState;
94
+ /**
95
+ * 是否隐藏label('1'表示隐藏)
96
+ */
97
+ hide_title: FormCommonState;
54
98
  placeholder: string;
55
99
  validate: ValidateItem;
56
100
  option: OptionItem[];
57
- wordbook: AnyObject;
58
- suFieldList: any[];
59
- bindEventSetting: Ievent[];
101
+ /**
102
+ * 用于cascader控件提供层级参数
103
+ */
104
+ wordbook: {
105
+ level_num: number;
106
+ };
107
+ /**
108
+ * switch控件,开启状态参数
109
+ */
60
110
  open: SwitchProperty;
111
+ /**
112
+ * switch控件,关闭状态参数
113
+ */
61
114
  close: SwitchProperty;
115
+ /**
116
+ * date控件value格式
117
+ */
62
118
  date_format: string;
119
+ /**
120
+ * slider控件间距
121
+ */
63
122
  step_length: string | number;
64
123
  urlConfig: Partial<{
65
124
  url: string;
66
125
  method: 'post' | 'get' | 'put' | 'patch' | 'delete';
67
- dependKey: string | string[] | Record<string, string>;
126
+ /**
127
+ * 请求参数依赖关系
128
+ */
129
+ dependKey: DependKeyType;
68
130
  params: AnyObject;
69
131
  nameKey: string;
70
132
  valueKey: string;
71
133
  }>;
72
- suffixConfig: FieldItem[] | FieldItem;
73
- fieldType: 'string' | 'object' | 'array' | 'number' | 'void' | 'boolean' | 'datetime';
134
+ /**
135
+ * 控件组
136
+ */
137
+ suffixConfig: ArrayAble<FieldItem>;
138
+ /**
139
+ * 数据类型
140
+ */
141
+ fieldType: SchemaTypes;
142
+ /**
143
+ * BUTTON/TEXT控件内容
144
+ */
74
145
  content: string | FormRenderer | Record<string, FormRenderer>;
75
- properties: FieldItem[];
146
+ /**
147
+ * COMBINATION控件最大表单组数量
148
+ */
149
+ maxGroupNum: number;
150
+ /**
151
+ * COMBINATION控件子项
152
+ */
76
153
  children: FieldItem[];
154
+ /**
155
+ * 子项
156
+ */
157
+ properties: FieldItem[];
158
+ /**
159
+ * 控件额外的props
160
+ */
77
161
  componentProps: AnyObject;
162
+ /**
163
+ * FormItem额外的props
164
+ */
78
165
  decoratorProps: AnyObject;
166
+ /**
167
+ * COMPLEX控件布局类型
168
+ */
79
169
  display: 'grid' | 'flex';
170
+ /**
171
+ * COMPLEX控件额外样式
172
+ */
80
173
  wrapperStyle: CSSProperties | Record<string, string>;
81
- validator: (value: any, fieldItem: FieldItem) => void | string;
82
- reactions: {
83
- target?: string;
84
- dependencies?: string[];
85
- fulfill: {
86
- state?: Partial<{
87
- value: string;
88
- disabled: string;
89
- display: string;
90
- componentProps: AnyObject;
91
- decoratorProps: AnyObject;
92
- selfErrors: string;
93
- [key: string]: string | AnyObject;
94
- }>;
95
- };
96
- };
174
+ /**
175
+ * 自定义校验规则
176
+ * @param value 表单当前控件的值
177
+ * @param fieldItem 配置参数
178
+ * @return {void|string} 返回校验信息
179
+ */
180
+ validator: (value: unknown, fieldItem: FieldItem) => void | string;
181
+ /**
182
+ * 表单联动配置
183
+ */
184
+ reactions: ArrayAble<SchemaReaction>;
97
185
  [key: string]: any;
98
186
  }>;
99
187
  export {};
@@ -1,9 +1,10 @@
1
- import { AnyObject } from '../../../../../es/src/types';
1
+ import { AnyObject, ArrayAble } from '../../../../../es/src/types';
2
2
  import { DataField, Field } from '@formily/core';
3
3
  import { FIELD_BUSINESS_TYPE } from '../../../../../es/packages/form-render/src/constants';
4
4
  import { FieldItem } from '../types';
5
5
  import { AsyncQueue } from '../hooks';
6
6
  export * from './fieldItem';
7
+ export declare type FormCommonState = '0' | '1';
7
8
  export interface FieldVisitorContext {
8
9
  field: FieldItem;
9
10
  replace(f: FieldItem): void;
@@ -15,7 +16,7 @@ export declare type FormRequestType = 'post' | 'get' | 'patch' | 'delete' | 'put
15
16
  export interface FormAsyncQueueItem {
16
17
  key: any;
17
18
  url: string;
18
- method: FormRequestType;
19
+ method?: FormRequestType;
19
20
  params?: AnyObject;
20
21
  }
21
22
  export declare type FormAsyncQueue = AsyncQueue<FormAsyncQueueItem, any, AnyObject[]>;
@@ -48,3 +49,4 @@ export declare type FormBusinessFilter = (payload: {
48
49
  type: FIELD_BUSINESS_TYPE;
49
50
  context?: any;
50
51
  }) => unknown;
52
+ export declare type DependKeyType = ArrayAble<string> | Record<string, string> | ArrayAble<Record<'paramName' | 'paramValue', string>>;
@@ -2,7 +2,7 @@ import { AnyObject, ArrayAble } from '../../../../../es/src/types';
2
2
  import { ISchema } from '@formily/json-schema/esm/types';
3
3
  import { GeneralField } from '@formily/core';
4
4
  import { FunctionalComponent, InjectionKey, VNode } from 'vue';
5
- import { AgeContext, FieldItem, IdCardParseInfo } from '../types';
5
+ import { AgeContext, DependKeyType, FieldItem, IdCardParseInfo } from '../types';
6
6
  export declare function formRenderLog(message: string, type?: keyof Console): void;
7
7
  export declare function arrayed<T>(maybeArray: T): T extends Array<any> ? T : [T];
8
8
  export declare function assignUpdateValue(props: AnyObject, field: GeneralField): {
@@ -14,15 +14,12 @@ export declare function isMobile(mobile: string): boolean;
14
14
  export declare function parseBirthday(birthday: string): AgeContext;
15
15
  export declare function parseIdCard(idCardNo: string): IdCardParseInfo;
16
16
  export declare function injectOrProvide<T>(key: InjectionKey<T>, creator: () => T): T;
17
- export declare function traverseDependKey(dependKeys: ArrayAble<string> | Record<string, string> | ArrayAble<{
18
- paramName: string;
19
- paramValue: string;
20
- }>, handler: {
17
+ export declare function traverseDependKey(dependKeys: DependKeyType, handler: {
21
18
  (dependKey: string, valueKey: string): void;
22
19
  }): void;
23
20
  export declare function traverseSchema(schema: ISchema, handler: (_s: ISchema) => void): void;
24
21
  export declare function uuidGenerator(): string;
25
- export declare function createSlot(renderer: unknown, props: any): Record<string, () => ArrayAble<VNode>> | {
22
+ export declare function createSlot(renderer: unknown, props: AnyObject): Record<string, () => ArrayAble<VNode>> | {
26
23
  default(): any;
27
24
  };
28
25
  export declare function queryDecorator(key: string, wrapperElement: HTMLElement, formUUID: string): HTMLElement | null;
@@ -396,6 +396,17 @@ body > .vxe-table--tooltip-wrapper {
396
396
  height: var(--tableImageHeight);
397
397
  width: var(--tableImageWidth);
398
398
  }
399
+ .custom-big-table .domPropsInnerHTML-span .icon-dot-custom {
400
+ width: 8px;
401
+ height: 8px;
402
+ -webkit-border-radius: 50%;
403
+ -moz-border-radius: 50%;
404
+ border-radius: 50%;
405
+ background: var(--table-icon-color);
406
+ display: inline-block;
407
+ margin-right: 6px;
408
+ box-shadow: 0px 2px 4px 0px var(--table-icon-shadow);
409
+ }
399
410
  .custom-big-table .domPropsInnerHTML-span .icon-dot-red {
400
411
  width: 8px;
401
412
  height: 8px;
@@ -2774,6 +2785,9 @@ body > .vxe-table--tooltip-wrapper {
2774
2785
  display: none !important;
2775
2786
  }
2776
2787
  .c-info-header.is-compact .icon-double_down {
2788
+ transform: rotate(0deg);
2789
+ }
2790
+ .c-info-header .icon-double_down {
2777
2791
  transform: rotate(180deg);
2778
2792
  }
2779
2793
  .c-info-header__hidden {
@@ -101,6 +101,9 @@
101
101
  display: none !important;
102
102
  }
103
103
  .c-info-header.is-compact .icon-double_down {
104
+ transform: rotate(0deg);
105
+ }
106
+ .c-info-header .icon-double_down {
104
107
  transform: rotate(180deg);
105
108
  }
106
109
  .c-info-header__hidden {
@@ -8,19 +8,21 @@ export interface ShortcutSignatureInfo {
8
8
  alt?: boolean;
9
9
  key: string;
10
10
  }
11
- export interface ShortcutOption {
11
+ export declare type ShortcutOption = {
12
12
  label: string | Render;
13
- key?: string;
14
13
  defaultShortcut: ShortcutSignatureInfo;
15
- order?: number;
16
- debounce?: boolean;
17
- debounceOption?: {
14
+ callback(): void;
15
+ } & Partial<{
16
+ placeholder: string;
17
+ editPlaceholder: string;
18
+ key: string;
19
+ order: number;
20
+ debounce: boolean;
21
+ debounceOption: {
18
22
  duration?: number;
19
23
  };
20
- beforeTrigger?(): void | Promise<unknown>;
21
- callback(): void;
22
- afterTrigger?(): void | Promise<unknown>;
23
- }
24
+ operation: Array<'disabled' | 'reset'>;
25
+ }>;
24
26
  export interface ShortcutItem extends ShortcutOption {
25
27
  status: ShortcutStatus;
26
28
  currentKeySignature: string;
@@ -4,7 +4,7 @@ function isKeyboardEvent(event) {
4
4
  function normalizeSignatureInfo(info) {
5
5
  var _a, _b;
6
6
  let ctrl, shift, alt;
7
- const key = (_b = (_a = info.key) == null ? void 0 : _a.toLowerCase()) != null ? _b : "";
7
+ const key = (_b = (_a = info.key) == null ? void 0 : _a.toUpperCase()) != null ? _b : "";
8
8
  if (isKeyboardEvent(info)) {
9
9
  ctrl = info.ctrlKey;
10
10
  shift = info.shiftKey;
@@ -18,18 +18,18 @@ function normalizeSignatureInfo(info) {
18
18
  }
19
19
  function getKeySignature(info) {
20
20
  const { ctrl, shift, alt, key } = normalizeSignatureInfo(info);
21
- return `${ctrl ? "CTRL_" : ""}${shift ? "SHIFT_" : ""}${alt ? "ALT_" : ""}${key}`;
21
+ return `${ctrl ? "Ctrl_" : ""}${shift ? "Shift_" : ""}${alt ? "Alt_" : ""}${key}`;
22
22
  }
23
- const keyBlackList = ["control", "alt", "shift"];
23
+ const keyBlackList = ["CONTROL", "ALT", "SHIFT"];
24
24
  const inBlackList = (key) => {
25
25
  return keyBlackList.includes(key);
26
26
  };
27
27
  function getDisplaySignature(info) {
28
28
  const { ctrl, shift, alt, key } = normalizeSignatureInfo(info);
29
- return `${ctrl ? "ctrl+ " : ""}${alt ? "alt + " : ""}${shift ? "shift + " : ""}${inBlackList(key) ? "" : key}`;
29
+ return `${ctrl ? "Ctrl+ " : ""}${alt ? "Alt + " : ""}${shift ? "Shift + " : ""}${inBlackList(key) ? "" : key}`;
30
30
  }
31
31
  function transformKey2DisplaySignature(keySignature) {
32
- return keySignature.toLowerCase().replace(/_/g, " + ");
32
+ return keySignature.replace(/_/g, " + ");
33
33
  }
34
34
  function isShortcutProvider(ele) {
35
35
  return ele && ele.getAttribute("is-shortcut-capture") != void 0;