cnhis-design-vue 3.1.35-beta.1 → 3.1.35-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/README.md +123 -123
- package/es/components/big-table/index.d.ts +14 -0
- package/es/components/big-table/src/BigTable.vue.d.ts +14 -0
- package/es/components/big-table/src/BigTable.vue2.js +594 -13
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -0
- package/es/components/big-table/src/components/separate.vue.d.ts +1 -0
- package/es/components/big-table/src/hooks/useEdit.d.ts +4 -0
- package/es/components/big-table/src/hooks/useSeparateRow.d.ts +11 -1
- package/es/components/big-table/src/hooks/useSeparateRow.js +56 -12
- 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-config/src/components/FormConfigCreator.vue.js +1 -0
- package/es/components/form-config/src/hooks/useConfigurationField.js +7 -1
- package/es/components/form-render/src/components/renderer/combination.js +11 -3
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +7 -3
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +45 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +39 -6
- package/es/components/info-header/src/InfoHeader.vue.js +40 -29
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/keyboard/index.d.ts +34 -6
- package/es/components/keyboard/src/Keyboard.vue.d.ts +34 -6
- package/es/components/keyboard/src/Keyboard.vue.js +16 -12
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +14 -4
- package/es/components/keyboard/src/components/NumberPanel.vue.js +88 -30
- package/es/components/keyboard/style/index.css +1 -1
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -40,18 +40,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
40
|
index: number;
|
|
41
41
|
rawRow: AnyObject;
|
|
42
42
|
row: AnyObject;
|
|
43
|
+
colspans?: Record<string, number> | undefined;
|
|
43
44
|
} | undefined;
|
|
44
45
|
onShow: (target: {
|
|
45
46
|
separateData: Record<string, string>;
|
|
46
47
|
index: number;
|
|
47
48
|
rawRow: AnyObject;
|
|
48
49
|
row: AnyObject;
|
|
50
|
+
colspans?: Record<string, number> | undefined;
|
|
49
51
|
} | undefined) => Promise<void>;
|
|
50
52
|
onClose: (target: {
|
|
51
53
|
separateData: Record<string, string>;
|
|
52
54
|
index: number;
|
|
53
55
|
rawRow: AnyObject;
|
|
54
56
|
row: AnyObject;
|
|
57
|
+
colspans?: Record<string, number> | undefined;
|
|
55
58
|
} | undefined) => Promise<void>;
|
|
56
59
|
updateShow: (show: boolean) => void;
|
|
57
60
|
style: CSSProperties;
|
|
@@ -99,6 +102,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
102
|
index: number;
|
|
100
103
|
rawRow: AnyObject;
|
|
101
104
|
row: AnyObject;
|
|
105
|
+
colspans?: Record<string, number> | undefined;
|
|
102
106
|
}>>;
|
|
103
107
|
displayContent: import("vue").ComputedRef<string>;
|
|
104
108
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -25,6 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
25
|
index: number;
|
|
26
26
|
rawRow: AnyObject;
|
|
27
27
|
row: AnyObject;
|
|
28
|
+
colspans?: Record<string, number> | undefined;
|
|
28
29
|
}>>;
|
|
29
30
|
displayContent: import("vue").ComputedRef<string>;
|
|
30
31
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -232,18 +232,21 @@ export declare const comps: {
|
|
|
232
232
|
index: number;
|
|
233
233
|
rawRow: import("../../../../shared/types").AnyObject;
|
|
234
234
|
row: import("../../../../shared/types").AnyObject;
|
|
235
|
+
colspans?: Record<string, number> | undefined;
|
|
235
236
|
} | undefined;
|
|
236
237
|
onShow: (target: {
|
|
237
238
|
separateData: Record<string, string>;
|
|
238
239
|
index: number;
|
|
239
240
|
rawRow: import("../../../../shared/types").AnyObject;
|
|
240
241
|
row: import("../../../../shared/types").AnyObject;
|
|
242
|
+
colspans?: Record<string, number> | undefined;
|
|
241
243
|
} | undefined) => Promise<void>;
|
|
242
244
|
onClose: (target: {
|
|
243
245
|
separateData: Record<string, string>;
|
|
244
246
|
index: number;
|
|
245
247
|
rawRow: import("../../../../shared/types").AnyObject;
|
|
246
248
|
row: import("../../../../shared/types").AnyObject;
|
|
249
|
+
colspans?: Record<string, number> | undefined;
|
|
247
250
|
} | undefined) => Promise<void>;
|
|
248
251
|
updateShow: (show: boolean) => void;
|
|
249
252
|
style: import("vue").CSSProperties;
|
|
@@ -291,6 +294,7 @@ export declare const comps: {
|
|
|
291
294
|
index: number;
|
|
292
295
|
rawRow: import("../../../../shared/types").AnyObject;
|
|
293
296
|
row: import("../../../../shared/types").AnyObject;
|
|
297
|
+
colspans?: Record<string, number> | undefined;
|
|
294
298
|
}>>;
|
|
295
299
|
displayContent: import("vue").ComputedRef<string>;
|
|
296
300
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnyObject, Func } from '../../../../../es/shared/types';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { VxeTableEvents, VxeTableInstance } from 'vxe-table';
|
|
4
|
+
import { VxeTablePropTypes } from 'vxe-table/types/table';
|
|
4
5
|
export declare class SeparateHandle {
|
|
5
6
|
callbacks: Set<Func<any[], any>>;
|
|
6
7
|
add(cb: Func): void;
|
|
@@ -14,17 +15,26 @@ export declare function useSeparateMap(): {
|
|
|
14
15
|
index: number;
|
|
15
16
|
rawRow: AnyObject;
|
|
16
17
|
row: AnyObject;
|
|
18
|
+
colspans?: Record<string, number> | undefined;
|
|
17
19
|
}>>;
|
|
18
20
|
getRowData: (row: AnyObject) => {
|
|
19
21
|
separateData: Record<string, string>;
|
|
20
22
|
index: number;
|
|
21
23
|
rawRow: AnyObject;
|
|
22
24
|
row: AnyObject;
|
|
25
|
+
colspans?: Record<string, number> | undefined;
|
|
23
26
|
} | undefined;
|
|
24
27
|
};
|
|
25
|
-
export declare function useSeparateRow(getColumnConfig: () => AnyObject[], getFieldItem: (columnName: string) => AnyObject, $VXETable: Ref<undefined | VxeTableInstance>): {
|
|
28
|
+
export declare function useSeparateRow(getColumnConfig: () => AnyObject[], spanMethod: VxeTablePropTypes.SpanMethod, getFieldItem: (columnName: string) => AnyObject, $VXETable: Ref<undefined | VxeTableInstance>): {
|
|
26
29
|
onColumnResize: VxeTableEvents.ResizableChange;
|
|
27
30
|
needSeparateColumn: import("vue").ComputedRef<AnyObject[]>;
|
|
28
31
|
separate: (data: AnyObject[], rawData: AnyObject[]) => Promise<AnyObject[]>;
|
|
29
32
|
separateHandle: SeparateHandle;
|
|
33
|
+
separateDataMap: Ref<WeakMap<AnyObject, {
|
|
34
|
+
separateData: Record<string, string>;
|
|
35
|
+
index: number;
|
|
36
|
+
rawRow: AnyObject;
|
|
37
|
+
row: AnyObject;
|
|
38
|
+
colspans?: Record<string, number> | undefined;
|
|
39
|
+
}>>;
|
|
30
40
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getStringWidth } from '../../../../shared/utils/index.js';
|
|
2
|
-
import { isNumber, isArray, cloneDeep, isString } from 'lodash-es';
|
|
2
|
+
import { isFunction, isNumber, isArray, cloneDeep, isString } from 'lodash-es';
|
|
3
3
|
import { ref, computed, provide, watch, nextTick } from 'vue';
|
|
4
4
|
import { InjectionSeparateHandle } from '../constants/index.js';
|
|
5
5
|
|
|
@@ -29,22 +29,32 @@ function useSeparateMap() {
|
|
|
29
29
|
}
|
|
30
30
|
return { separateDataMap, getRowData };
|
|
31
31
|
}
|
|
32
|
-
function useSeparateRow(getColumnConfig, getFieldItem, $VXETable) {
|
|
32
|
+
function useSeparateRow(getColumnConfig, spanMethod, getFieldItem, $VXETable) {
|
|
33
33
|
const needSeparateColumn = computed(() => {
|
|
34
34
|
return getColumnConfig().filter((column) => column.formType === "separate");
|
|
35
35
|
});
|
|
36
|
+
const columnWidthCacheMap = /* @__PURE__ */ new Map();
|
|
36
37
|
async function separate(data, rawData) {
|
|
38
|
+
var _a, _b;
|
|
37
39
|
if (!needSeparateColumn.value.length) {
|
|
38
40
|
return data;
|
|
39
41
|
}
|
|
42
|
+
columnWidthCacheMap.clear();
|
|
43
|
+
const visibleColumn = (_b = (_a = $VXETable.value) == null ? void 0 : _a.getColumns()) != null ? _b : [];
|
|
40
44
|
return data.reduce(async (res, row, dataIndex) => {
|
|
41
45
|
const parsedRowData = [];
|
|
42
46
|
for (const column of needSeparateColumn.value) {
|
|
47
|
+
const { width, colspan } = await getColumnRenderWidth(column, row, dataIndex);
|
|
43
48
|
parsedRowData.push({
|
|
44
49
|
columnName: column.columnName,
|
|
45
|
-
|
|
50
|
+
colspan,
|
|
51
|
+
data: contentSeparate(row[column.columnName], column.columnName, width)
|
|
46
52
|
});
|
|
47
53
|
}
|
|
54
|
+
const separateColspans = visibleColumn.reduce((res2, column) => {
|
|
55
|
+
res2[column.field] = getColspanInfo(column.field, row, dataIndex).colspan;
|
|
56
|
+
return res2;
|
|
57
|
+
}, {});
|
|
48
58
|
(await res).push(
|
|
49
59
|
...Array.from({ length: getColumnInfoMaxLength(parsedRowData) }).map((_, index) => {
|
|
50
60
|
const separateData = getSeparateRowData(parsedRowData, index);
|
|
@@ -53,7 +63,8 @@ function useSeparateRow(getColumnConfig, getFieldItem, $VXETable) {
|
|
|
53
63
|
row,
|
|
54
64
|
rawRow: rawData[dataIndex],
|
|
55
65
|
index: dataIndex,
|
|
56
|
-
separateData
|
|
66
|
+
separateData,
|
|
67
|
+
colspans: separateColspans
|
|
57
68
|
});
|
|
58
69
|
row.$__SEPARATE_DATA = [separateData];
|
|
59
70
|
return row;
|
|
@@ -77,21 +88,54 @@ function useSeparateRow(getColumnConfig, getFieldItem, $VXETable) {
|
|
|
77
88
|
return res;
|
|
78
89
|
}, {});
|
|
79
90
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
91
|
+
}
|
|
92
|
+
function getColumnInfoMaxLength(parsedRowData) {
|
|
93
|
+
return Math.max(...parsedRowData.map((r) => r.data.length), 1);
|
|
94
|
+
}
|
|
95
|
+
function getColspanInfo(field, row, rowIndex) {
|
|
96
|
+
if (!$VXETable.value)
|
|
97
|
+
return { colspan: 1, columnIndex: 0 };
|
|
98
|
+
const columnInfo = $VXETable.value.getColumnByField(field);
|
|
99
|
+
const columnIndex = $VXETable.value.getColumnIndex(columnInfo);
|
|
100
|
+
const visibleColumn = $VXETable.value.getColumns() || [];
|
|
101
|
+
const _columnIndex = visibleColumn.findIndex((column) => column.field === field);
|
|
102
|
+
const { colspan = 1 } = spanMethod({
|
|
103
|
+
column: columnInfo,
|
|
104
|
+
row,
|
|
105
|
+
rowIndex,
|
|
106
|
+
$rowIndex: rowIndex,
|
|
107
|
+
_rowIndex: rowIndex,
|
|
108
|
+
columnIndex,
|
|
109
|
+
$columnIndex: columnIndex,
|
|
110
|
+
_columnIndex
|
|
111
|
+
}) || {};
|
|
112
|
+
return { colspan, columnIndex };
|
|
113
|
+
}
|
|
114
|
+
async function getColumnRenderWidth(column, row, rowIndex) {
|
|
115
|
+
if (!isFunction(spanMethod) || !$VXETable.value)
|
|
116
|
+
return { width: await getWidth(column), colspan: 1 };
|
|
117
|
+
const { colspan, columnIndex } = getColspanInfo(column.columnName, row, rowIndex);
|
|
118
|
+
const width = colspan <= 0 ? 0 : colspan === 1 ? await getWidth(column) : await $VXETable.value.getColumns().slice(columnIndex, columnIndex + colspan).reduce(async (res, columnInfo) => {
|
|
119
|
+
return await res + await getWidth({ columnName: columnInfo.field });
|
|
120
|
+
}, Promise.resolve(0));
|
|
121
|
+
return { width, colspan };
|
|
122
|
+
async function getWidth(column2) {
|
|
123
|
+
let width2 = columnWidthCacheMap.get(column2.columnName);
|
|
124
|
+
if (width2)
|
|
125
|
+
return width2;
|
|
84
126
|
const prev = getRenderWidth();
|
|
85
127
|
if (!prev) {
|
|
86
128
|
await nextTick();
|
|
87
129
|
}
|
|
88
|
-
|
|
130
|
+
width2 = getRenderWidth() || getColumnWidth();
|
|
131
|
+
columnWidthCacheMap.set(column2.columnName, width2);
|
|
132
|
+
return width2;
|
|
89
133
|
function getRenderWidth() {
|
|
90
134
|
var _a, _b;
|
|
91
|
-
return (_b = (_a = $VXETable.value) == null ? void 0 : _a.getColumnByField(
|
|
135
|
+
return (_b = (_a = $VXETable.value) == null ? void 0 : _a.getColumnByField(column2.columnName)) == null ? void 0 : _b.renderWidth;
|
|
92
136
|
}
|
|
93
137
|
function getColumnWidth() {
|
|
94
|
-
return isNumber(
|
|
138
|
+
return isNumber(column2.width) ? column2.width : 64;
|
|
95
139
|
}
|
|
96
140
|
}
|
|
97
141
|
}
|
|
@@ -126,7 +170,7 @@ function useSeparateRow(getColumnConfig, getFieldItem, $VXETable) {
|
|
|
126
170
|
const separateHandle = new SeparateHandle();
|
|
127
171
|
provide(InjectionSeparateHandle, separateHandle);
|
|
128
172
|
watch(needSeparateColumn, separateHandle.trigger.bind(separateHandle));
|
|
129
|
-
return { onColumnResize, needSeparateColumn, separate, separateHandle };
|
|
173
|
+
return { onColumnResize, needSeparateColumn, separate, separateHandle, separateDataMap };
|
|
130
174
|
}
|
|
131
175
|
|
|
132
176
|
export { SeparateHandle, useSeparateMap, useSeparateRow };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|