cnhis-design-vue 3.1.15-beta.9 → 3.1.15
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/packages/big-table/src/hooks/useAnnotation.js +1 -2
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +7 -2
- package/es/packages/big-table/src/hooks/useEdit.js +16 -8
- package/es/packages/fabric-chart/src/hooks/useDraw.js +1 -0
- package/es/packages/fabric-chart/src/hooks/useLeft.js +1 -2
- package/es/packages/form-config/index.d.ts +1749 -0
- package/es/packages/form-config/src/FormConfig.vue.d.ts +1749 -0
- package/es/packages/form-config/src/components/FormConfigEdit.js +3 -3
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +1747 -0
- package/es/packages/form-config/style/index.css +1 -1
- package/es/packages/form-render/src/components/renderer/combination/index.js +3 -3
- package/es/packages/form-render/src/components/renderer/formItem.js +1 -2
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +2 -2
- package/es/packages/form-render/src/types/fieldItem.d.ts +8 -0
- package/es/packages/form-render/src/utils/index.d.ts +1 -0
- package/es/packages/form-render/src/utils/index.js +9 -2
- package/es/packages/form-table/src/hooks/useNuiThemeOverrides.js +1 -1
- package/es/packages/index.css +1 -1
- package/es/packages/index.d.ts +1 -0
- package/es/packages/index.js +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-init.js +35 -35
- package/es/packages/shortcut-provider/index.d.ts +17 -2
- package/es/packages/shortcut-provider/index.js +1 -1
- package/es/packages/shortcut-provider/src/ShortcutProvider.js +5 -1
- package/es/packages/shortcut-provider/src/ShortcutProvider.vue.d.ts +17 -2
- package/es/packages/shortcut-provider/src/hooks/index.js +1 -1
- package/es/packages/shortcut-provider/src/hooks/useShortcuts.d.ts +10 -10
- package/es/packages/shortcut-provider/src/hooks/useShortcuts.js +45 -38
- package/es/packages/shortcut-provider/src/types/index.d.ts +2 -19
- package/es/packages/shortcut-setter/index.d.ts +1698 -4283
- package/es/packages/shortcut-setter/src/ShortcutSetter.js +63 -10
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +1723 -4306
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +26 -95
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +30 -3363
- package/es/packages/shortcut-setter/src/types/index.d.ts +6 -0
- package/es/packages/shortcut-setter/src/types/index.js +1 -0
- package/package.json +1 -1
- package/es/packages/shortcut-setter/constant/index.d.ts +0 -4
- package/es/packages/shortcut-setter/constant/index.js +0 -7
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { createVNode } from 'vue';
|
|
2
2
|
import { isObject } from '@vue/shared';
|
|
3
|
-
import { isBoolean } from 'lodash-es';
|
|
4
3
|
import Annotation from '../../../annotation-edit/index.js';
|
|
5
4
|
|
|
6
5
|
function useAnnotation(props) {
|
|
7
6
|
function renderAnnotation(columnConfig) {
|
|
8
|
-
if (!isObject(props.annotation) ||
|
|
7
|
+
if (!isObject(props.annotation) || columnConfig.annotation === false)
|
|
9
8
|
return null;
|
|
10
9
|
return createVNode("section", {
|
|
11
10
|
"class": "big-table__annotationWrapper"
|
|
@@ -79,12 +79,17 @@ function useColumnConfigAdaptor() {
|
|
|
79
79
|
...["open", "close"].map((key) => [key, switchOptionHandler]),
|
|
80
80
|
["is_edit", { property: "isEdit", valueMap: isEditValueMap }],
|
|
81
81
|
["html_type", { property: "formType", valueMap: htmlTypeValueMap }],
|
|
82
|
-
["option", { property: "options", fieldMap: /* @__PURE__ */ new Map([["text", "label"]]) }]
|
|
82
|
+
["option", { property: "options", fieldMap: /* @__PURE__ */ new Map([["text", "label"]]) }],
|
|
83
|
+
[
|
|
84
|
+
"alias",
|
|
85
|
+
(value, result, fieldItem) => {
|
|
86
|
+
result.title = `${value}${fieldItem.suffix ? `(${fieldItem.suffix})` : ""}`;
|
|
87
|
+
}
|
|
88
|
+
]
|
|
83
89
|
]);
|
|
84
90
|
const fieldMap = /* @__PURE__ */ new Map([
|
|
85
91
|
["sum", "isSum"],
|
|
86
92
|
["show", "isShow"],
|
|
87
|
-
["name", "title"],
|
|
88
93
|
["elementId", "columnName"],
|
|
89
94
|
["columnWidth", "colWidth"],
|
|
90
95
|
["fixedWayEnum", { property: "isFixed", valueMap: fixedWayEnumValueMap }],
|
|
@@ -106,20 +106,28 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
106
106
|
emit("formChange", { value, row, column, index, oldValue });
|
|
107
107
|
};
|
|
108
108
|
const getDefaultValue = (params, item) => {
|
|
109
|
-
var _a
|
|
109
|
+
var _a;
|
|
110
110
|
const value = params.row[item.columnName];
|
|
111
111
|
if (item.formType === "select") {
|
|
112
|
+
if (Array.isArray(value)) {
|
|
113
|
+
return (_a = value.map((v) => getValue(v))) == null ? void 0 : _a.join(",");
|
|
114
|
+
}
|
|
115
|
+
return getValue(value);
|
|
116
|
+
}
|
|
117
|
+
return value;
|
|
118
|
+
function getValue(value2) {
|
|
119
|
+
const findValue = (options) => {
|
|
120
|
+
var _a2;
|
|
121
|
+
return ((_a2 = options == null ? void 0 : options.find((v) => v.value == value2)) == null ? void 0 : _a2.label) || value2 || "";
|
|
122
|
+
};
|
|
112
123
|
if (item.formatMap) {
|
|
113
124
|
return params.row[item.formatMap.label];
|
|
114
125
|
}
|
|
115
|
-
if (item.options)
|
|
116
|
-
return (
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return ((_c = (_b = params.row[`${item.columnName}_options`]) == null ? void 0 : _b.find((v) => v.value === value)) == null ? void 0 : _c.label) || value || "";
|
|
120
|
-
}
|
|
126
|
+
if (item.options)
|
|
127
|
+
return findValue(item.options);
|
|
128
|
+
if (item.queryOptions)
|
|
129
|
+
return findValue(params.row[`${item.columnName}_options`]);
|
|
121
130
|
}
|
|
122
|
-
return value;
|
|
123
131
|
};
|
|
124
132
|
return {
|
|
125
133
|
initEditTable,
|
|
@@ -55,8 +55,7 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
55
55
|
height: painHeight,
|
|
56
56
|
...defaultRectStyle
|
|
57
57
|
}, {
|
|
58
|
-
value: `${item.title
|
|
59
|
-
${item.title.slice(-2)}`,
|
|
58
|
+
value: `${item.title}`,
|
|
60
59
|
...defaultTextStyle,
|
|
61
60
|
...item.style || {}
|
|
62
61
|
}, {
|