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