cnhis-design-vue 3.1.16-beta.1 → 3.1.16-beta.12
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/index.d.ts +652 -430
- package/es/packages/big-table/src/BigTable.vue.d.ts +655 -457
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +106 -112
- package/es/packages/big-table/src/bigTableProps.d.ts +4 -0
- package/es/packages/big-table/src/bigTableProps.js +2 -1
- package/es/packages/big-table/src/bigTableState.d.ts +2 -0
- package/es/packages/big-table/src/bigTableState.js +3 -1
- package/es/packages/big-table/src/components/edit-form/edit-time.js +1 -1
- package/es/packages/big-table/src/hooks/index.d.ts +9 -0
- package/es/packages/big-table/src/hooks/index.js +9 -0
- package/es/packages/big-table/src/hooks/useAnchor.d.ts +7 -0
- package/es/packages/big-table/src/hooks/useAnchor.js +49 -0
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +24 -8
- package/es/packages/big-table/src/hooks/useEdit.js +1 -1
- package/es/packages/big-table/src/hooks/useEvent.d.ts +1 -1
- package/es/packages/big-table/src/hooks/useEvent.js +3 -2
- package/es/packages/big-table/style/index.css +1 -2
- package/es/packages/button-print/index.d.ts +7 -4
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +7 -4
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +5 -16
- package/es/packages/button-print/src/components/IdentityVerification.js +5 -7
- package/es/packages/button-print/src/components/IdentityVerification.vue.d.ts +6 -3
- package/es/packages/drag-layout/index.d.ts +2 -2
- package/es/packages/drag-layout/src/DragLayout.vue.d.ts +2 -2
- package/es/packages/fabric-chart/src/FabricChart.js +3 -2
- package/es/packages/fabric-chart/src/hooks/constant.js +5 -5
- package/es/packages/fabric-chart/src/hooks/useCenter.js +20 -23
- package/es/packages/fabric-chart/src/hooks/useDraw.js +11 -4
- package/es/packages/fabric-chart/src/hooks/useEvent.js +11 -3
- package/es/packages/fabric-chart/src/hooks/useLeft.js +8 -4
- package/es/packages/fabric-chart/src/hooks/useOther.js +63 -13
- package/es/packages/fabric-chart/src/hooks/useTop.js +5 -8
- package/es/packages/field-set/index.d.ts +1 -1
- package/es/packages/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/packages/form-config/index.d.ts +110 -3367
- package/es/packages/form-config/src/FormConfig.js +42 -34
- package/es/packages/form-config/src/FormConfig.vue.d.ts +147 -3404
- package/es/packages/form-config/src/components/FormConfigCreator.js +13 -11
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +23 -22
- package/es/packages/form-config/src/components/FormConfigEdit.js +2 -2
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +75 -49
- package/es/packages/form-config/src/constants/index.d.ts +58 -24
- package/es/packages/form-config/src/constants/index.js +52 -23
- package/es/packages/form-config/src/hooks/index.d.ts +1 -0
- package/es/packages/form-config/src/hooks/index.js +1 -0
- package/es/packages/form-config/src/hooks/useConfigurationField.d.ts +2 -1
- package/es/packages/form-config/src/hooks/useConfigurationField.js +29 -80
- package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -3
- package/es/packages/form-config/src/hooks/usePresetRenderer.js +16 -19
- package/es/packages/form-config/src/hooks/useSortable.js +1 -1
- package/es/packages/form-config/src/types/index.d.ts +22 -4
- package/es/packages/form-config/src/utils/index.d.ts +2 -0
- package/es/packages/form-config/src/utils/index.js +15 -0
- package/es/packages/form-config/style/index.css +27 -3
- package/es/packages/form-render/index.d.ts +13 -15
- package/es/packages/form-render/src/FormRender.js +11 -8
- package/es/packages/form-render/src/FormRender.vue.d.ts +14 -16
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +2 -14
- package/es/packages/form-render/src/components/renderer/cascader.js +3 -3
- package/es/packages/form-render/src/components/renderer/checkbox.js +1 -1
- package/es/packages/form-render/src/components/renderer/combination/index.js +2 -1
- package/es/packages/form-render/src/components/renderer/complex.js +1 -1
- package/es/packages/form-render/src/components/renderer/date.d.ts +20 -4
- package/es/packages/form-render/src/components/renderer/date.js +36 -20
- package/es/packages/form-render/src/components/renderer/input.js +2 -1
- package/es/packages/form-render/src/components/renderer/inputNumber.js +2 -1
- package/es/packages/form-render/src/components/renderer/linebar.js +1 -4
- package/es/packages/form-render/src/components/renderer/radio.js +1 -1
- package/es/packages/form-render/src/components/renderer/select.d.ts +1 -10
- package/es/packages/form-render/src/components/renderer/select.js +26 -17
- package/es/packages/form-render/src/components/renderer/slider.d.ts +8 -344
- package/es/packages/form-render/src/components/renderer/slider.js +24 -2
- package/es/packages/form-render/src/components/renderer/switch.js +1 -1
- package/es/packages/form-render/src/components/renderer/textarea.js +1 -1
- package/es/packages/form-render/src/hooks/useAnchor.js +7 -4
- package/es/packages/form-render/src/hooks/useBusinessBinding.d.ts +15 -9
- package/es/packages/form-render/src/hooks/useBusinessBinding.js +62 -58
- package/es/packages/form-render/src/hooks/useChangeContext.d.ts +4 -2
- package/es/packages/form-render/src/hooks/useChangeContext.js +4 -7
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +17 -7
- package/es/packages/form-render/src/hooks/useFormContext.d.ts +2 -1
- package/es/packages/form-render/src/hooks/useFormContext.js +2 -2
- package/es/packages/form-render/src/hooks/useFormValidator.js +13 -3
- package/es/packages/form-render/src/hooks/useInitialData.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useInitialData.js +9 -4
- package/es/packages/form-render/src/hooks/useTypeNormalize.js +3 -2
- package/es/packages/form-render/src/types/fieldItem.d.ts +11 -12
- package/es/packages/form-render/src/types/index.d.ts +7 -8
- package/es/packages/form-render/src/utils/business.d.ts +12 -0
- package/es/packages/form-render/src/utils/business.js +78 -0
- package/es/packages/form-render/src/utils/dom.d.ts +6 -0
- package/es/packages/form-render/src/utils/dom.js +14 -0
- package/es/packages/form-render/src/utils/index.d.ts +6 -26
- package/es/packages/form-render/src/utils/index.js +9 -138
- package/es/packages/form-render/src/utils/schema.d.ts +16 -0
- package/es/packages/form-render/src/utils/schema.js +94 -0
- package/es/packages/index.css +28 -5
- package/es/packages/scale-view/src/hooks/use-component.d.ts +7 -7
- package/es/packages/select-label/index.d.ts +10 -10
- package/es/packages/select-label/src/LabelFormContent.vue.d.ts +3 -3
- package/es/packages/select-label/src/SelectLabel.vue.d.ts +7 -7
- package/es/packages/shortcut-setter/index.d.ts +18 -20
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -20
- package/es/packages/time-line/index.d.ts +2 -2
- package/es/packages/time-line/src/TimeLine.vue.d.ts +2 -2
- package/global.d.ts +8 -8
- package/package.json +1 -1
|
@@ -3,25 +3,75 @@ import { fabric } from '../utils/index.js';
|
|
|
3
3
|
import { defaultStyle } from './useDraw.js';
|
|
4
4
|
|
|
5
5
|
function useOther(canvas, propItems, cumputedX) {
|
|
6
|
-
const {
|
|
6
|
+
const { other, vitalSignsOriginY } = propItems;
|
|
7
7
|
function drawOther() {
|
|
8
|
-
if (!other
|
|
8
|
+
if (!(other == null ? void 0 : other.list))
|
|
9
9
|
return false;
|
|
10
10
|
const list = [];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
const otherList = [];
|
|
12
|
+
other.list.forEach((item) => {
|
|
13
|
+
const align = item.align || "vertical";
|
|
14
|
+
const left = cumputedX(item.time);
|
|
15
|
+
const obj = otherList.find((v) => v.left == left);
|
|
16
|
+
if (obj) {
|
|
17
|
+
obj[align].push(item);
|
|
18
|
+
} else {
|
|
19
|
+
const initObj = {
|
|
20
|
+
left,
|
|
21
|
+
vertical: [],
|
|
22
|
+
horizontal: []
|
|
23
|
+
};
|
|
24
|
+
initObj[align].push(item);
|
|
25
|
+
otherList.push(initObj);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
let textWidth = 0;
|
|
29
|
+
otherList.forEach((item) => {
|
|
30
|
+
let topY = vitalSignsOriginY.originY;
|
|
31
|
+
let leftX = item.left;
|
|
32
|
+
let textHeight = 0;
|
|
33
|
+
item.vertical.forEach((v) => {
|
|
34
|
+
const { commonOptions, value } = getTextData(v);
|
|
35
|
+
topY += (v.baseTop || 0) + textHeight;
|
|
36
|
+
const text = new fabric.Text(value, {
|
|
37
|
+
top: topY,
|
|
38
|
+
left: item.left,
|
|
39
|
+
...commonOptions
|
|
40
|
+
});
|
|
41
|
+
textHeight = text.height || 0;
|
|
42
|
+
setTextWidth(text);
|
|
43
|
+
});
|
|
44
|
+
item.horizontal.forEach((v, i) => {
|
|
45
|
+
if (i > 0 || item.vertical.length) {
|
|
46
|
+
leftX += textWidth;
|
|
47
|
+
}
|
|
48
|
+
const { commonOptions, value } = getTextData(v);
|
|
49
|
+
const text = new fabric.Text(value, {
|
|
50
|
+
top: vitalSignsOriginY.originY,
|
|
51
|
+
left: leftX,
|
|
52
|
+
...commonOptions
|
|
53
|
+
});
|
|
54
|
+
setTextWidth(text);
|
|
20
55
|
});
|
|
21
|
-
list.push(text);
|
|
22
56
|
});
|
|
57
|
+
function setTextWidth(text) {
|
|
58
|
+
if (!textWidth) {
|
|
59
|
+
textWidth = text.width || 0;
|
|
60
|
+
}
|
|
61
|
+
list.push(text);
|
|
62
|
+
}
|
|
63
|
+
function getTextData(v) {
|
|
64
|
+
return {
|
|
65
|
+
commonOptions: {
|
|
66
|
+
originX: "center",
|
|
67
|
+
textAlign: "center",
|
|
68
|
+
...defaultStyle,
|
|
69
|
+
...v.style || {}
|
|
70
|
+
},
|
|
71
|
+
value: String(v.value.toString().split("").join("\n"))
|
|
72
|
+
};
|
|
73
|
+
}
|
|
23
74
|
const group = list.length > 0 ? new fabric.Group([...list], { ...defaultStyle }) : null;
|
|
24
|
-
group && group.sendToBack();
|
|
25
75
|
group && canvas.value.add(group);
|
|
26
76
|
}
|
|
27
77
|
onMounted(() => {
|
|
@@ -24,7 +24,7 @@ function useTop(canvas, propItems) {
|
|
|
24
24
|
topY += propItems[`${topList[index - 1].key}Height`];
|
|
25
25
|
}
|
|
26
26
|
if (item.key == "xScalevalue") {
|
|
27
|
-
drawDay(list, topY);
|
|
27
|
+
drawDay(item, list, topY);
|
|
28
28
|
drawTime(item, list, topY);
|
|
29
29
|
} else {
|
|
30
30
|
propItems[`${item.key}Height`] && drawDate(item, list, topY);
|
|
@@ -35,7 +35,6 @@ function useTop(canvas, propItems) {
|
|
|
35
35
|
group && canvas.value.add(group);
|
|
36
36
|
}
|
|
37
37
|
function drawTime(item, list, topY) {
|
|
38
|
-
var _a;
|
|
39
38
|
const dayHeight = top.xScalevalue.show ? top.dayHeight || 0 : 0;
|
|
40
39
|
const height = xScalevalueHeight - dayHeight;
|
|
41
40
|
const title = drawTextGroup({
|
|
@@ -45,7 +44,7 @@ function useTop(canvas, propItems) {
|
|
|
45
44
|
}, {
|
|
46
45
|
value: top.xScalevalue.title,
|
|
47
46
|
...defaultTextStyle,
|
|
48
|
-
...
|
|
47
|
+
...item.style || {},
|
|
49
48
|
...item.titleStyle || {}
|
|
50
49
|
}, {
|
|
51
50
|
left: iconsWidth,
|
|
@@ -57,7 +56,6 @@ function useTop(canvas, propItems) {
|
|
|
57
56
|
timeList.push(top.xScalevalue.list);
|
|
58
57
|
}
|
|
59
58
|
timeList.flat().forEach((v, i) => {
|
|
60
|
-
var _a2;
|
|
61
59
|
const left = originX + i * xCellWidth;
|
|
62
60
|
const textGroup = drawTextGroup({
|
|
63
61
|
width: xCellWidth,
|
|
@@ -65,7 +63,7 @@ function useTop(canvas, propItems) {
|
|
|
65
63
|
}, {
|
|
66
64
|
value: v,
|
|
67
65
|
...defaultTextStyle,
|
|
68
|
-
...
|
|
66
|
+
...item.style || {}
|
|
69
67
|
}, {
|
|
70
68
|
left,
|
|
71
69
|
top: topY + dayHeight
|
|
@@ -73,8 +71,7 @@ function useTop(canvas, propItems) {
|
|
|
73
71
|
list.push(textGroup);
|
|
74
72
|
});
|
|
75
73
|
}
|
|
76
|
-
function drawDay(list, topY) {
|
|
77
|
-
var _a;
|
|
74
|
+
function drawDay(item, list, topY) {
|
|
78
75
|
if (!top.dayHeight)
|
|
79
76
|
return false;
|
|
80
77
|
const height = top.dayHeight;
|
|
@@ -89,7 +86,7 @@ function useTop(canvas, propItems) {
|
|
|
89
86
|
}, {
|
|
90
87
|
value,
|
|
91
88
|
...defaultTextStyle,
|
|
92
|
-
...
|
|
89
|
+
...item.style || {}
|
|
93
90
|
}, {
|
|
94
91
|
left,
|
|
95
92
|
top: topY
|
|
@@ -6974,7 +6974,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
6974
6974
|
modelValue: unknown[];
|
|
6975
6975
|
componentData: Record<string, any>;
|
|
6976
6976
|
}>;
|
|
6977
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose")[], "
|
|
6977
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose")[], "onClose" | "onSave", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6978
6978
|
fields: {
|
|
6979
6979
|
type: import("vue").PropType<any[]>;
|
|
6980
6980
|
default: () => never[];
|
|
@@ -6954,7 +6954,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6954
6954
|
modelValue: unknown[];
|
|
6955
6955
|
componentData: Record<string, any>;
|
|
6956
6956
|
}>;
|
|
6957
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose")[], "
|
|
6957
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose")[], "onClose" | "onSave", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6958
6958
|
fields: {
|
|
6959
6959
|
type: PropType<any[]>;
|
|
6960
6960
|
default: () => never[];
|