cnhis-design-vue 3.1.33-beta.2 → 3.1.33-beta.21

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 (114) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/index.d.ts +2 -2
  3. package/es/components/big-table/src/BigTable.vue.d.ts +2 -2
  4. package/es/components/big-table/src/BigTable.vue2.js +11 -14
  5. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -1
  6. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  7. package/es/components/big-table/src/components/edit-form/edit-time.js +7 -4
  8. package/es/components/big-table/src/components/edit-form/useCommon.d.ts +2 -1
  9. package/es/components/big-table/src/components/edit-form/useCommon.js +7 -3
  10. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  11. package/es/components/button-print/index.d.ts +13 -0
  12. package/es/components/button-print/src/ButtonPrint.vue.d.ts +13 -0
  13. package/es/components/button-print/src/ButtonPrint.vue2.js +6 -1
  14. package/es/components/button-print/src/utils/print.d.ts +2 -2
  15. package/es/components/button-print/src/utils/print.js +7 -4
  16. package/es/components/fabric-chart/index.d.ts +392 -180
  17. package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +181 -0
  18. package/es/components/fabric-chart/src/BirthProcessChart.vue.js +172 -0
  19. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +395 -182
  20. package/es/components/fabric-chart/src/FabricChart.vue.js +33 -324
  21. package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +214 -0
  22. package/es/components/fabric-chart/src/TemperatureChart.vue.js +359 -0
  23. package/es/components/fabric-chart/src/components/PopupMenu.js +3 -3
  24. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +3 -2
  25. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
  27. package/es/components/fabric-chart/src/hooks/index.js +2 -1
  28. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +26 -0
  29. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +419 -0
  30. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +0 -2
  31. package/es/components/fabric-chart/src/hooks/useCenter.js +26 -45
  32. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +8 -0
  33. package/es/components/fabric-chart/src/hooks/useCommon.js +31 -0
  34. package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +9 -2
  35. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +34 -1
  36. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +2 -2
  37. package/es/components/fabric-chart/src/hooks/useGrid.js +28 -18
  38. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
  39. package/es/components/fabric-chart/src/hooks/useLeft.js +11 -7
  40. package/es/components/fabric-chart/src/interface.d.ts +24 -6
  41. package/es/components/fabric-chart/src/interface.js +0 -3
  42. package/es/components/fabric-chart/src/utils/utils.d.ts +11 -0
  43. package/es/components/fabric-chart/src/utils/utils.js +27 -0
  44. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -4
  45. package/es/components/form-render/src/hooks/useFormRenderOptions.js +14 -8
  46. package/es/components/iho-table/index.d.ts +1 -0
  47. package/es/components/iho-table/index.js +1 -1
  48. package/es/components/iho-table/src/IhoTable.vue.d.ts +1 -0
  49. package/es/components/iho-table/src/IhoTable.vue.js +7 -1
  50. package/es/components/iho-table/src/components/IhoTableColumn.js +1 -1
  51. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -0
  52. package/es/components/iho-table/src/hooks/tapHooks/index.js +3 -1
  53. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +11 -0
  54. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +26 -0
  55. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +5 -1
  56. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +2 -1
  57. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +17 -12
  58. package/es/components/iho-table/src/plugins/filterPlugin/index.js +16 -5
  59. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -0
  60. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +8 -22
  61. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +8 -16
  62. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +7 -4
  63. package/es/components/iho-table/src/types/index.d.ts +9 -1
  64. package/es/components/iho-table/src/types/index.js +1 -1
  65. package/es/components/iho-table/src/types/pluginType.d.ts +4 -0
  66. package/es/components/iho-table/src/types/pluginType.js +3 -1
  67. package/es/components/iho-table/style/index.css +1 -1
  68. package/es/components/index.css +1 -1
  69. package/es/components/index.js +1 -1
  70. package/es/components/info-header/index.d.ts +2 -0
  71. package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
  72. package/es/components/info-header/src/InfoHeader.vue.js +72 -56
  73. package/es/components/info-header/style/index.css +1 -1
  74. package/es/components/keyboard/index.d.ts +62 -1
  75. package/es/components/keyboard/src/Keyboard.vue.d.ts +62 -1
  76. package/es/components/keyboard/src/Keyboard.vue.js +4 -1
  77. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +67 -5
  78. package/es/components/keyboard/src/components/NumberPanel.vue.js +48 -26
  79. package/es/components/keyboard/style/index.css +1 -1
  80. package/es/components/shortcut-provider/src/utils/index.d.ts +0 -1
  81. package/es/components/shortcut-provider/src/utils/index.js +26 -3
  82. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +3 -0
  83. package/es/shared/assets/img/failure.js +1 -1
  84. package/es/shared/assets/img/failure.png.js +1 -1
  85. package/es/shared/assets/img/icon-asc.js +1 -1
  86. package/es/shared/assets/img/icon-desc.js +1 -1
  87. package/es/shared/assets/img/no-permission.js +1 -1
  88. package/es/shared/assets/img/no-permission.png.js +1 -1
  89. package/es/shared/assets/img/nodata.js +1 -1
  90. package/es/shared/assets/img/nodata.png.js +1 -1
  91. package/es/shared/assets/img/notfound.js +1 -1
  92. package/es/shared/assets/img/notfound.png.js +1 -1
  93. package/es/shared/assets/img/qr.js +1 -1
  94. package/es/shared/assets/img/qr.png.js +1 -1
  95. package/es/shared/assets/img/success.js +1 -1
  96. package/es/shared/assets/img/success.png.js +1 -1
  97. package/es/shared/assets/img/video.js +1 -1
  98. package/es/shared/assets/img/video.png.js +1 -1
  99. package/es/shared/assets/img/video_default_cover.js +1 -1
  100. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  101. package/es/shared/assets/img/video_hover.js +1 -1
  102. package/es/shared/assets/img/video_play_hover.js +1 -1
  103. package/es/shared/assets/img/xb_big.js +1 -1
  104. package/es/shared/assets/img/xb_big.png.js +1 -1
  105. package/es/shared/assets/img/xb_small.js +1 -1
  106. package/es/shared/assets/img/xb_small.png.js +1 -1
  107. package/package.json +2 -2
  108. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  109. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  110. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  111. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  112. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  113. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  114. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -0,0 +1,181 @@
1
+ import { PropType } from 'vue';
2
+ import { IBirthProcessData } from './interface';
3
+ import { AnyObject } from '../../../../es/shared/types';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ data: {
6
+ type: PropType<IBirthProcessData>;
7
+ required: true;
8
+ };
9
+ }, {
10
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
11
+ data: {
12
+ type: PropType<IBirthProcessData>;
13
+ required: true;
14
+ };
15
+ }>> & {
16
+ onChange?: ((...args: any[]) => any) | undefined;
17
+ onSelect?: ((...args: any[]) => any) | undefined;
18
+ onAdd?: ((...args: any[]) => any) | undefined;
19
+ onDelete?: ((...args: any[]) => any) | undefined;
20
+ }>>;
21
+ emits: (event: "delete" | "change" | "add" | "select", ...args: any[]) => void;
22
+ leftScales: import("vue").ComputedRef<AnyObject[]>;
23
+ rightScales: import("vue").ComputedRef<AnyObject[]>;
24
+ leftAddAreaWidth: number;
25
+ rightAddAreaWidth: import("vue").ComputedRef<0 | 30>;
26
+ originX: import("vue").ComputedRef<number>;
27
+ endX: import("vue").ComputedRef<number>;
28
+ gridXNumber: import("vue").ComputedRef<any>;
29
+ gridYNumber: import("vue").ComputedRef<any>;
30
+ xCellWidth: import("vue").ComputedRef<number>;
31
+ yCellHeight: import("vue").ComputedRef<number>;
32
+ originY: import("vue").ComputedRef<number>;
33
+ originYCervix: import("vue").ComputedRef<number>;
34
+ endY: import("vue").ComputedRef<number>;
35
+ startTime: import("vue").ComputedRef<number>;
36
+ timeXCell: import("vue").ComputedRef<number>;
37
+ cervixYCell: import("vue").ComputedRef<number>;
38
+ FHRYCell: import("vue").ComputedRef<number>;
39
+ fetalPresentationYCell: import("vue").ComputedRef<number>;
40
+ event: import("vue").ComputedRef<any>;
41
+ select: import("vue").Ref<any>;
42
+ canvasRef: any;
43
+ canvas: import("vue").Ref<any>;
44
+ propItems: any;
45
+ pointTipProps: {
46
+ show: boolean;
47
+ point: {
48
+ x: number;
49
+ y: number;
50
+ };
51
+ list: string[];
52
+ };
53
+ pointMenuProps: {
54
+ show: boolean;
55
+ point: {
56
+ x: number;
57
+ y: number;
58
+ };
59
+ list: any[];
60
+ target: any;
61
+ };
62
+ clickMenu: ({ item, target }: {
63
+ item: any;
64
+ target: any;
65
+ }) => void;
66
+ PopupTip: import("vue").DefineComponent<{
67
+ show: {
68
+ type: BooleanConstructor;
69
+ required: true;
70
+ default: boolean;
71
+ };
72
+ point: {
73
+ type: null;
74
+ required: true;
75
+ };
76
+ list: {
77
+ type: ArrayConstructor;
78
+ required: false;
79
+ default: () => never[];
80
+ };
81
+ propItems: {
82
+ type: null;
83
+ required: true;
84
+ };
85
+ }, {
86
+ props: {
87
+ show: boolean;
88
+ point: import("./interface").ICoordinateValue;
89
+ list: string[];
90
+ propItems: AnyObject;
91
+ };
92
+ pointStyle: import("vue").ComputedRef<{
93
+ top: string;
94
+ bottom: string;
95
+ left: string;
96
+ right: string;
97
+ 'transform-origin': string;
98
+ }>;
99
+ Teleport: {
100
+ new (): {
101
+ $props: import("vue").VNodeProps & import("vue").TeleportProps;
102
+ };
103
+ __isTeleport: true;
104
+ };
105
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
106
+ show: {
107
+ type: BooleanConstructor;
108
+ required: true;
109
+ default: boolean;
110
+ };
111
+ point: {
112
+ type: null;
113
+ required: true;
114
+ };
115
+ list: {
116
+ type: ArrayConstructor;
117
+ required: false;
118
+ default: () => never[];
119
+ };
120
+ propItems: {
121
+ type: null;
122
+ required: true;
123
+ };
124
+ }>>, {
125
+ list: unknown[];
126
+ }>;
127
+ PopupMenu: import("vue").DefineComponent<{
128
+ show: {
129
+ type: BooleanConstructor;
130
+ default: boolean;
131
+ };
132
+ list: {
133
+ type: ArrayConstructor;
134
+ default: () => never[];
135
+ };
136
+ point: {
137
+ type: PropType<import("./interface").ICoordinateValue>;
138
+ };
139
+ propItems: {
140
+ type: PropType<import("./interface").IPropItems>;
141
+ };
142
+ target: {
143
+ type: PropType<any>;
144
+ };
145
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:show" | "clickMenu")[], "clickMenu" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
146
+ show: {
147
+ type: BooleanConstructor;
148
+ default: boolean;
149
+ };
150
+ list: {
151
+ type: ArrayConstructor;
152
+ default: () => never[];
153
+ };
154
+ point: {
155
+ type: PropType<import("./interface").ICoordinateValue>;
156
+ };
157
+ propItems: {
158
+ type: PropType<import("./interface").IPropItems>;
159
+ };
160
+ target: {
161
+ type: PropType<any>;
162
+ };
163
+ }>> & {
164
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
165
+ onClickMenu?: ((...args: any[]) => any) | undefined;
166
+ }, {
167
+ show: boolean;
168
+ list: unknown[];
169
+ }>;
170
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "change" | "add" | "select")[], "delete" | "change" | "add" | "select", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
171
+ data: {
172
+ type: PropType<IBirthProcessData>;
173
+ required: true;
174
+ };
175
+ }>> & {
176
+ onChange?: ((...args: any[]) => any) | undefined;
177
+ onSelect?: ((...args: any[]) => any) | undefined;
178
+ onAdd?: ((...args: any[]) => any) | undefined;
179
+ onDelete?: ((...args: any[]) => any) | undefined;
180
+ }, {}>;
181
+ export default _default;
@@ -0,0 +1,172 @@
1
+ import { defineComponent, computed, ref, reactive, onMounted, onBeforeUnmount, openBlock, createElementBlock, Fragment, createElementVNode, unref, createBlock, mergeProps, createCommentVNode } from 'vue';
2
+ import { fabric } from './utils/index.js';
3
+ import { defaultBorderStyle } from './hooks/useDraw.js';
4
+ import 'naive-ui';
5
+ import './hooks/useShadow.js';
6
+ import 'lodash-es';
7
+ import { useEvent } from './hooks/useEvent.js';
8
+ import { useBirthProcess } from './hooks/useBirthProcess.js';
9
+ import PopupTip from './components/PopupTip.vue.js';
10
+ import PopupMenu from './components/PopupMenu.js';
11
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
12
+
13
+ const _sfc_main = /* @__PURE__ */ defineComponent({
14
+ __name: "BirthProcessChart",
15
+ props: {
16
+ data: { type: Object, required: true }
17
+ },
18
+ emits: [
19
+ "change",
20
+ "add",
21
+ "delete",
22
+ "select"
23
+ ],
24
+ setup(__props, { expose, emit: emits }) {
25
+ const props = __props;
26
+ const leftScales = computed(() => props.data.scaleValues.filter((item) => item.layout === "left"));
27
+ const rightScales = computed(() => props.data.scaleValues.filter((item) => item.layout === "right"));
28
+ const leftAddAreaWidth = 30;
29
+ const rightAddAreaWidth = computed(() => {
30
+ var _a;
31
+ return !((_a = rightScales.value) == null ? void 0 : _a.length) ? 0 : 30;
32
+ });
33
+ const originX = computed(() => {
34
+ var _a;
35
+ const leftScalesWidth = (_a = leftScales.value) == null ? void 0 : _a.reduce((width, item) => {
36
+ width += item.width;
37
+ return width;
38
+ }, 0);
39
+ return leftAddAreaWidth + leftScalesWidth;
40
+ });
41
+ const endX = computed(() => {
42
+ var _a;
43
+ const { width } = props.data;
44
+ const rightScalesWidth = (_a = rightScales.value) == null ? void 0 : _a.reduce((width2, item) => {
45
+ width2 += item.width;
46
+ return width2;
47
+ }, 0);
48
+ return width - rightAddAreaWidth.value - rightScalesWidth;
49
+ });
50
+ const gridXNumber = computed(() => props.data.grid.mainXCell);
51
+ const gridYNumber = computed(() => props.data.grid.mainYCell);
52
+ const xCellWidth = computed(() => {
53
+ return (endX.value - originX.value) / gridXNumber.value;
54
+ });
55
+ const yCellHeight = computed(() => {
56
+ const { xAxis, height } = props.data;
57
+ const xAxisNumber = Object.values(xAxis).reduce((num, item) => {
58
+ if (item.show)
59
+ num++;
60
+ return num;
61
+ }, 0);
62
+ return height / (gridYNumber.value + xAxisNumber);
63
+ });
64
+ const originY = computed(() => yCellHeight.value);
65
+ const originYCervix = computed(() => {
66
+ const { scaleValues } = props.data;
67
+ const cervixItem = scaleValues.find((item) => item.key === "cervix");
68
+ const [, max] = (cervixItem == null ? void 0 : cervixItem.range) || [0, 10];
69
+ const spaceValue = (cervixItem == null ? void 0 : cervixItem.spaceValue) || 1;
70
+ return endY.value - max * spaceValue * yCellHeight.value;
71
+ });
72
+ const endY = computed(() => {
73
+ const { height } = props.data;
74
+ return height - yCellHeight.value;
75
+ });
76
+ const startTime = computed(() => new Date(props.data.xAxis.time.startTime).getTime());
77
+ const timeXCell = computed(() => 1 * 60 * 60 * 1e3 / xCellWidth.value);
78
+ const cervixYCell = computed(() => {
79
+ const { scaleValues } = props.data;
80
+ const cervixItem = scaleValues.find((item) => item.key === "cervix");
81
+ return ((cervixItem == null ? void 0 : cervixItem.spaceValue) || 1) / yCellHeight.value;
82
+ });
83
+ const FHRYCell = computed(() => {
84
+ const { scaleValues } = props.data;
85
+ const cervixItem = scaleValues.find((item) => item.key === "FHR");
86
+ return ((cervixItem == null ? void 0 : cervixItem.spaceValue) || 10) / yCellHeight.value;
87
+ });
88
+ const fetalPresentationYCell = computed(() => {
89
+ const { scaleValues } = props.data;
90
+ const cervixItem = scaleValues.find((item) => item.key === "fetalPresentation");
91
+ return ((cervixItem == null ? void 0 : cervixItem.spaceValue) || 1) / yCellHeight.value;
92
+ });
93
+ const event = computed(() => {
94
+ var _a;
95
+ return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true, hovered: true };
96
+ });
97
+ let select = ref();
98
+ const canvasRef = ref(null);
99
+ let canvas = ref();
100
+ const propItems = reactive({
101
+ canvasWidth: props.data.width,
102
+ canvasHeight: props.data.height,
103
+ borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
104
+ selectionStyle: props.data.selectionStyle || {},
105
+ grid: props.data.grid,
106
+ originX: originX.value,
107
+ endX: endX.value,
108
+ originY: originY.value,
109
+ endY: endY.value,
110
+ xCellWidth: xCellWidth.value,
111
+ yCellHeight: yCellHeight.value,
112
+ gridXNumber: gridXNumber.value,
113
+ gridYNumber: gridYNumber.value,
114
+ xAxis: props.data.xAxis,
115
+ leftScales: leftScales.value,
116
+ rightScales: rightScales.value,
117
+ leftAddAreaWidth,
118
+ rightAddAreaWidth: rightAddAreaWidth.value,
119
+ startTime: startTime.value,
120
+ timeXCell: timeXCell.value,
121
+ cervixYCell: cervixYCell.value,
122
+ FHRYCell: FHRYCell.value,
123
+ fetalPresentationYCell: fetalPresentationYCell.value,
124
+ scaleValues: props.data.scaleValues,
125
+ event: event.value,
126
+ originYCervix: originYCervix.value
127
+ });
128
+ const { pointTipProps, pointMenuProps, clickMenu } = useBirthProcess(canvas, propItems, emits);
129
+ onMounted(() => {
130
+ canvas.value = new fabric.Canvas(canvasRef.value, {
131
+ width: propItems.canvasWidth,
132
+ height: propItems.canvasHeight,
133
+ backgroundColor: "#fff",
134
+ selection: false,
135
+ containerClass: "c-fabric-chart",
136
+ fireRightClick: true
137
+ });
138
+ useEvent(canvasRef.value);
139
+ });
140
+ onBeforeUnmount(() => {
141
+ canvas.value.clear();
142
+ canvas.value = null;
143
+ });
144
+ expose({
145
+ select,
146
+ canvas
147
+ });
148
+ return (_ctx, _cache) => {
149
+ return openBlock(), createElementBlock(Fragment, null, [
150
+ createElementVNode("canvas", {
151
+ ref_key: "canvasRef",
152
+ ref: canvasRef
153
+ }, null, 512),
154
+ unref(canvas) ? (openBlock(), createBlock(PopupTip, mergeProps({
155
+ key: 0,
156
+ propItems
157
+ }, unref(pointTipProps)), null, 16, ["propItems"])) : createCommentVNode("v-if", true),
158
+ unref(canvas) ? (openBlock(), createBlock(unref(PopupMenu), mergeProps({
159
+ key: 1,
160
+ propItems
161
+ }, unref(pointMenuProps), {
162
+ show: unref(pointMenuProps).show,
163
+ "onUpdate:show": _cache[0] || (_cache[0] = ($event) => unref(pointMenuProps).show = $event),
164
+ onClickMenu: unref(clickMenu)
165
+ }), null, 16, ["propItems", "show", "onClickMenu"])) : createCommentVNode("v-if", true)
166
+ ], 64);
167
+ };
168
+ }
169
+ });
170
+ var BirthProcessChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "BirthProcessChart.vue"]]);
171
+
172
+ export { BirthProcessChart as default };