cnhis-design-vue 3.1.22-beta.8 → 3.1.22-beta.9
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 +123 -123
- package/es/components/big-table/index.d.ts +0 -8
- package/es/components/big-table/src/BigTable.vue.d.ts +0 -8
- package/es/components/big-table/src/components/edit-form/useCommon.d.ts +4 -0
- package/es/components/big-table/style/index.css +1 -1
- 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/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-render/src/components/renderer/cascader.js +10 -7
- package/es/components/form-render/src/components/renderer/date.js +11 -4
- package/es/components/form-render/src/components/renderer/input.js +2 -2
- package/es/components/form-render/src/components/renderer/inputNumber.js +2 -2
- package/es/components/form-render/src/components/renderer/search.js +3 -3
- package/es/components/form-render/src/components/renderer/select.js +3 -3
- package/es/components/form-render/src/components/renderer/textarea.js +2 -2
- package/es/components/form-render/src/hooks/useCommonInjection2.js +6 -2
- package/es/components/form-render/src/utils/schema.d.ts +4 -1
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/form-render/src/utils/schema2.js +9 -2
- package/es/components/iho-table/index.d.ts +229 -446
- package/es/components/iho-table/src/IhoTable.js +8 -5
- package/es/components/iho-table/src/IhoTable.vue.d.ts +229 -446
- package/es/components/iho-table/src/components/IhoTableColumn.js +2 -1
- package/es/components/iho-table/src/constants/index.d.ts +4 -2
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/constants/index2.js +15 -2
- package/es/components/iho-table/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +42 -27
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -1
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks2.js +4 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index2.js +2 -1
- package/es/components/iho-table/src/plugins/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -0
- package/es/components/iho-table/src/plugins/index2.js +1 -0
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +10 -6
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index2.js +72 -0
- package/es/components/iho-table/src/types/index.d.ts +23 -9
- package/es/components/iho-table/src/types/pluginType.d.ts +4 -1
- package/es/components/iho-table/src/utils/index.d.ts +2 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/src/utils/index2.js +5 -1
- package/es/components/index.css +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -38,7 +38,7 @@ import './complex.js';
|
|
|
38
38
|
import './simpleComponent.js';
|
|
39
39
|
import './search.js';
|
|
40
40
|
import { NCascader } from 'naive-ui';
|
|
41
|
-
import { assignUpdateValue,
|
|
41
|
+
import { assignUpdateValue, traverseDependKey } from '../../utils/schema2.js';
|
|
42
42
|
|
|
43
43
|
const script = defineComponent({
|
|
44
44
|
name: "FormCascader",
|
|
@@ -146,7 +146,7 @@ const script = defineComponent({
|
|
|
146
146
|
function notNeedToFetchData(props2, option2) {
|
|
147
147
|
return !configFor(props2) || !option2 && remoteOptions.value || deepFor(option2) >= deepFor(props2) - 1;
|
|
148
148
|
}
|
|
149
|
-
function createRequestParams(deep, config,
|
|
149
|
+
function createRequestParams(deep, config, key2, option2) {
|
|
150
150
|
const params = {
|
|
151
151
|
lvlnr: deep + 1 + ""
|
|
152
152
|
};
|
|
@@ -158,7 +158,7 @@ const script = defineComponent({
|
|
|
158
158
|
return {
|
|
159
159
|
params,
|
|
160
160
|
...config,
|
|
161
|
-
key
|
|
161
|
+
key: key2
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
function getOptionChain(option2) {
|
|
@@ -189,7 +189,8 @@ const script = defineComponent({
|
|
|
189
189
|
}
|
|
190
190
|
const {
|
|
191
191
|
injectValueValidate,
|
|
192
|
-
injectValueWatchFromEmpty
|
|
192
|
+
injectValueWatchFromEmpty,
|
|
193
|
+
injectValueBindKey
|
|
193
194
|
} = useCommonInjection();
|
|
194
195
|
injectValueWatchFromEmpty(() => props.value, fetchData);
|
|
195
196
|
injectValueValidate(() => props.value);
|
|
@@ -207,7 +208,7 @@ const script = defineComponent({
|
|
|
207
208
|
const parsedOptions = computed(() => {
|
|
208
209
|
return remoteOptions.value || props.options || [];
|
|
209
210
|
});
|
|
210
|
-
function
|
|
211
|
+
function visitedDecorator(onFocus) {
|
|
211
212
|
return (...args) => {
|
|
212
213
|
if (isField(field.value)) {
|
|
213
214
|
field.value.visited = true;
|
|
@@ -216,8 +217,10 @@ const script = defineComponent({
|
|
|
216
217
|
};
|
|
217
218
|
}
|
|
218
219
|
const remote = computed(() => !props.filterable);
|
|
220
|
+
const key = injectValueBindKey(valueRef);
|
|
219
221
|
return () => {
|
|
220
222
|
return createVNode(NCascader, {
|
|
223
|
+
"key": key.value,
|
|
221
224
|
"remote": remote.value,
|
|
222
225
|
"filterable": props.filterable,
|
|
223
226
|
"checkStrategy": "child",
|
|
@@ -229,13 +232,13 @@ const script = defineComponent({
|
|
|
229
232
|
"valueField": valueKey.value,
|
|
230
233
|
"options": parsedOptions.value,
|
|
231
234
|
"onLoad": fetchData,
|
|
232
|
-
"onFocus":
|
|
235
|
+
"onFocus": visitedDecorator(props.onFocus)
|
|
233
236
|
}, slots);
|
|
234
237
|
};
|
|
235
238
|
}
|
|
236
239
|
});
|
|
237
240
|
const SEARCH_CASCADE = connect(script, mapProps({
|
|
238
241
|
dataSource: "options"
|
|
239
|
-
}, assignUpdateValue
|
|
242
|
+
}, assignUpdateValue));
|
|
240
243
|
|
|
241
244
|
export { SEARCH_CASCADE };
|
|
@@ -6,7 +6,7 @@ import { format } from 'date-fns';
|
|
|
6
6
|
import { NDatePicker } from 'naive-ui';
|
|
7
7
|
import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
8
8
|
import '../../utils/index.js';
|
|
9
|
-
import { assignUpdateValue,
|
|
9
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
10
10
|
|
|
11
11
|
const script = defineComponent({
|
|
12
12
|
props: {
|
|
@@ -26,7 +26,11 @@ const script = defineComponent({
|
|
|
26
26
|
setup(props, {
|
|
27
27
|
emit
|
|
28
28
|
}) {
|
|
29
|
-
|
|
29
|
+
const {
|
|
30
|
+
injectValueValidate,
|
|
31
|
+
injectValueBindKey
|
|
32
|
+
} = useCommonInjection();
|
|
33
|
+
injectValueValidate(() => props.value);
|
|
30
34
|
function minCurrentDate() {
|
|
31
35
|
var _a;
|
|
32
36
|
return ((_a = props.validate) == null ? void 0 : _a.min_date) === "currTime";
|
|
@@ -115,12 +119,15 @@ const script = defineComponent({
|
|
|
115
119
|
get: () => formatDate(props.value),
|
|
116
120
|
set: (value) => emit("update:value", value)
|
|
117
121
|
});
|
|
118
|
-
|
|
122
|
+
const key = injectValueBindKey(valueRef);
|
|
123
|
+
return () => createVNode(NDatePicker, mergeProps({
|
|
124
|
+
"key": key.value
|
|
125
|
+
}, validateConfig.value, formatConfig.value, {
|
|
119
126
|
"formatted-value": valueRef.value,
|
|
120
127
|
"onUpdate:formatted-value": ($event) => valueRef.value = $event
|
|
121
128
|
}), null);
|
|
122
129
|
}
|
|
123
130
|
});
|
|
124
|
-
const DATE = connect(script, mapProps(assignUpdateValue,
|
|
131
|
+
const DATE = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
125
132
|
|
|
126
133
|
export { DATE };
|
|
@@ -3,7 +3,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
|
3
3
|
import { createInputSlot } from '../../utils/index.js';
|
|
4
4
|
import { connect, mapProps } from '@formily/vue';
|
|
5
5
|
import { NInput } from 'naive-ui';
|
|
6
|
-
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
6
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
7
7
|
|
|
8
8
|
const script = defineComponent({
|
|
9
9
|
name: "FormInput",
|
|
@@ -41,6 +41,6 @@ const INPUT = connect(script, mapProps((props, field) => {
|
|
|
41
41
|
const _props = assignUpdateValue(props, field);
|
|
42
42
|
_props.allowInput = (value) => !value.startsWith(" ") && !value.endsWith(" ");
|
|
43
43
|
return _props;
|
|
44
|
-
}));
|
|
44
|
+
}, assignClearBindVisited));
|
|
45
45
|
|
|
46
46
|
export { INPUT };
|
|
@@ -4,7 +4,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
|
4
4
|
import { createInputSlot, parseNumberFromMaybeString } from '../../utils/index.js';
|
|
5
5
|
import { connect, mapProps } from '@formily/vue';
|
|
6
6
|
import { NInputNumber } from 'naive-ui';
|
|
7
|
-
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
7
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
8
8
|
|
|
9
9
|
const script = defineComponent({
|
|
10
10
|
props: {
|
|
@@ -50,6 +50,6 @@ const script = defineComponent({
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
const INPUT_NUMBER = connect(script, mapProps(assignUpdateValue));
|
|
53
|
+
const INPUT_NUMBER = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
54
54
|
|
|
55
55
|
export { INPUT_NUMBER };
|
|
@@ -39,7 +39,7 @@ import './slider.js';
|
|
|
39
39
|
import './complex.js';
|
|
40
40
|
import './simpleComponent.js';
|
|
41
41
|
import { NSelect } from 'naive-ui';
|
|
42
|
-
import {
|
|
42
|
+
import { visitedDecorator, assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
43
43
|
|
|
44
44
|
const script = defineComponent({
|
|
45
45
|
name: "FormSearch",
|
|
@@ -157,10 +157,10 @@ const script = defineComponent({
|
|
|
157
157
|
"options": parsedOptions.value,
|
|
158
158
|
"onSearch": fetchData,
|
|
159
159
|
"onUpdate:show": (show) => show && fetchData(),
|
|
160
|
-
"onFocus":
|
|
160
|
+
"onFocus": visitedDecorator(field, props.onFocus)
|
|
161
161
|
}, slots);
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
|
-
const SEARCH = connect(script, mapProps(assignUpdateValue));
|
|
164
|
+
const SEARCH = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
165
165
|
|
|
166
166
|
export { SEARCH };
|
|
@@ -38,7 +38,7 @@ import './complex.js';
|
|
|
38
38
|
import './simpleComponent.js';
|
|
39
39
|
import './search.js';
|
|
40
40
|
import { NSelect } from 'naive-ui';
|
|
41
|
-
import { traverseDependKey,
|
|
41
|
+
import { traverseDependKey, visitedDecorator, assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
42
42
|
|
|
43
43
|
const script = defineComponent({
|
|
44
44
|
name: "FormSelect",
|
|
@@ -174,12 +174,12 @@ const script = defineComponent({
|
|
|
174
174
|
"options": parsedOptions.value,
|
|
175
175
|
"onSearch": fetchData,
|
|
176
176
|
"onUpdate:show": (show) => show && fetchData(),
|
|
177
|
-
"onFocus":
|
|
177
|
+
"onFocus": visitedDecorator(field, props.onFocus)
|
|
178
178
|
}, slots);
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
const SELECT = connect(script, mapProps({
|
|
182
182
|
dataSource: "options"
|
|
183
|
-
}, assignUpdateValue));
|
|
183
|
+
}, assignUpdateValue, assignClearBindVisited));
|
|
184
184
|
|
|
185
185
|
export { SELECT };
|
|
@@ -3,7 +3,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection2.js';
|
|
|
3
3
|
import '../../utils/index.js';
|
|
4
4
|
import { connect, mapProps } from '@formily/vue';
|
|
5
5
|
import { NInput } from 'naive-ui';
|
|
6
|
-
import { assignUpdateValue } from '../../utils/schema2.js';
|
|
6
|
+
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema2.js';
|
|
7
7
|
|
|
8
8
|
const script = defineComponent({
|
|
9
9
|
name: "FormTextarea",
|
|
@@ -31,6 +31,6 @@ const script = defineComponent({
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
const TEXTAREA = connect(script, mapProps(assignUpdateValue));
|
|
34
|
+
const TEXTAREA = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
35
35
|
|
|
36
36
|
export { TEXTAREA };
|
|
@@ -7,9 +7,13 @@ function useCommonInjection() {
|
|
|
7
7
|
function injectValueValidate(traverser) {
|
|
8
8
|
const { field } = useFormField();
|
|
9
9
|
watch(traverser, () => {
|
|
10
|
-
var _a, _b;
|
|
10
|
+
var _a, _b, _c;
|
|
11
11
|
try {
|
|
12
|
-
|
|
12
|
+
if (!isField(field.value))
|
|
13
|
+
return;
|
|
14
|
+
if (!field.value.visited && !((_a = field.value.selfErrors) == null ? void 0 : _a.length))
|
|
15
|
+
return;
|
|
16
|
+
(_c = (_b = field.value).validate) == null ? void 0 : _c.call(_b);
|
|
13
17
|
} catch (e) {
|
|
14
18
|
}
|
|
15
19
|
});
|
|
@@ -17,6 +17,9 @@ export declare function assignUpdateValue(props: AnyObject, field: GeneralField)
|
|
|
17
17
|
export declare function assignValueBindKey(props: AnyObject, field: GeneralField): {
|
|
18
18
|
[x: string]: any;
|
|
19
19
|
};
|
|
20
|
+
export declare function assignClearBindVisited(props: AnyObject, field: GeneralField): {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
};
|
|
20
23
|
export declare function createObjSchema(properties: Record<string, ISchema>): {
|
|
21
24
|
type: string;
|
|
22
25
|
properties: Record<string, import("@formily/json-schema/esm/types").Stringify<{
|
|
@@ -77,4 +80,4 @@ export declare function createObjSchema(properties: Record<string, ISchema>): {
|
|
|
77
80
|
"x-compile-omitted"?: string[] | undefined;
|
|
78
81
|
}>>;
|
|
79
82
|
};
|
|
80
|
-
export declare function
|
|
83
|
+
export declare function visitedDecorator(field: Ref<GeneralField>, onFocus?: Func): (...args: unknown[]) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape,
|
|
1
|
+
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema, visitedDecorator } from './schema2.js';
|
|
@@ -86,10 +86,17 @@ function assignValueBindKey(props, field) {
|
|
|
86
86
|
}
|
|
87
87
|
return _props;
|
|
88
88
|
}
|
|
89
|
+
function assignClearBindVisited(props, field) {
|
|
90
|
+
const _props = { ...props };
|
|
91
|
+
if (isField(field)) {
|
|
92
|
+
_props.onClear = () => field.visited = true;
|
|
93
|
+
}
|
|
94
|
+
return _props;
|
|
95
|
+
}
|
|
89
96
|
function createObjSchema(properties) {
|
|
90
97
|
return { type: "object", properties };
|
|
91
98
|
}
|
|
92
|
-
function
|
|
99
|
+
function visitedDecorator(field, onFocus) {
|
|
93
100
|
return (...args) => {
|
|
94
101
|
if (isField(field.value)) {
|
|
95
102
|
field.value.visited = true;
|
|
@@ -98,4 +105,4 @@ function focusDecorator(field, onFocus) {
|
|
|
98
105
|
};
|
|
99
106
|
}
|
|
100
107
|
|
|
101
|
-
export { assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape,
|
|
108
|
+
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema, visitedDecorator };
|