cnhis-design-vue 3.1.31-beta.3 → 3.1.31-beta.5

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 (82) hide show
  1. package/README.md +123 -123
  2. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  3. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  4. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  5. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  6. package/es/components/button-print/index.d.ts +7 -5
  7. package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -5
  8. package/es/components/button-print/src/components/{edit.js → EditFormat.js} +3 -3
  9. package/es/components/button-print/src/components/{edit.vue.d.ts → EditFormat.vue.d.ts} +3 -2
  10. package/es/components/button-print/src/components/IdentityVerification.js +2 -2
  11. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +7 -5
  12. package/es/components/button-print/src/components/Preview.js +6 -0
  13. package/es/components/button-print/src/components/Preview.vue.d.ts +41 -0
  14. package/es/components/button-print/src/components/Preview.vue_vue_type_script_setup_true_lang.js +67 -0
  15. package/es/components/button-print/src/utils/browserPrint.d.ts +1 -1
  16. package/es/components/button-print/src/utils/browserPrint.js +1 -2
  17. package/es/components/button-print/src/utils/dialog.d.ts +5 -1
  18. package/es/components/button-print/src/utils/dialog.js +64 -22
  19. package/es/components/button-print/src/utils/print.d.ts +4 -1
  20. package/es/components/button-print/src/utils/print.js +11 -2
  21. package/es/components/button-print/style/index.css +1 -1
  22. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  23. package/es/components/iho-table/index.d.ts +124 -66
  24. package/es/components/iho-table/src/IhoTable.js +2 -1
  25. package/es/components/iho-table/src/IhoTable.vue.d.ts +124 -66
  26. package/es/components/iho-table/src/components/IhoTableColumn.js +14 -11
  27. package/es/components/iho-table/src/constants/index.d.ts +5 -3
  28. package/es/components/iho-table/src/constants/index.js +5 -3
  29. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +64 -5
  30. package/es/components/iho-table/src/hooks/tapHooks/index.js +17 -9
  31. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -1
  32. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +2 -2
  33. package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
  34. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +3 -2
  35. package/es/components/iho-table/src/plugins/filterPlugin/filter.js +1 -0
  36. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +1 -1
  37. package/es/components/iho-table/src/plugins/index.js +14 -12
  38. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.d.ts +1 -0
  39. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +32 -0
  40. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
  41. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +9 -11
  42. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +11 -15
  43. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +17 -24
  44. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +11 -13
  45. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.js +2 -1
  46. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
  47. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +8 -11
  48. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +13 -17
  49. package/es/components/iho-table/src/types/index.d.ts +6 -6
  50. package/es/components/iho-table/src/types/pluginType.d.ts +2 -1
  51. package/es/components/iho-table/src/utils/index.d.ts +12 -2
  52. package/es/components/iho-table/src/utils/index.js +33 -2
  53. package/es/components/iho-table/style/index.css +1 -1
  54. package/es/components/index.css +1 -1
  55. package/es/components/keyboard/index.d.ts +113 -63
  56. package/es/components/keyboard/src/Keyboard.js +108 -252
  57. package/es/components/keyboard/src/Keyboard.vue.d.ts +115 -65
  58. package/es/components/keyboard/src/components/InputNumber.vue.d.ts +6 -4
  59. package/es/components/keyboard/src/components/NumberPanel.js +206 -0
  60. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +118 -0
  61. package/es/components/scale-view/index.d.ts +3 -2
  62. package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -2
  63. package/es/components/search-cascader/src/components/SearchMenu.js +5 -5
  64. package/es/shared/assets/img/failure.js +1 -1
  65. package/es/shared/assets/img/icon-asc.js +1 -1
  66. package/es/shared/assets/img/icon-desc.js +1 -1
  67. package/es/shared/assets/img/no-permission.js +1 -1
  68. package/es/shared/assets/img/nodata.js +1 -1
  69. package/es/shared/assets/img/notfound.js +1 -1
  70. package/es/shared/assets/img/qr.js +1 -1
  71. package/es/shared/assets/img/success.js +1 -1
  72. package/es/shared/assets/img/video.js +1 -1
  73. package/es/shared/assets/img/video_default_cover.js +1 -1
  74. package/es/shared/assets/img/video_hover.js +1 -1
  75. package/es/shared/assets/img/video_play_hover.js +1 -1
  76. package/es/shared/assets/img/xb_big.js +1 -1
  77. package/es/shared/assets/img/xb_small.js +1 -1
  78. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  79. package/es/shared/utils/index.d.ts +1 -1
  80. package/es/shared/utils/index.js +3 -3
  81. package/es/shared/utils/tapable/index.d.ts +139 -0
  82. package/package.json +2 -2
@@ -1,34 +1,21 @@
1
- import { defineComponent, ref, computed, openBlock, createElementBlock, Fragment, createCommentVNode, unref, createElementVNode, createVNode, withCtx, renderList, normalizeClass, toDisplayString, createBlock, normalizeStyle, createTextVNode } from 'vue';
2
- import { NSpace, NIcon } from 'naive-ui';
3
- import { ArrowUndoSharp, Close, GitCompareOutline } from '@vicons/ionicons5';
4
- import InputNumber from './components/InputNumber.js';
5
- import { useRefHistory, useDraggable } from '@vueuse/core';
6
- import { getNumber } from './utils/index.js';
1
+ import { defineComponent, computed, ref, unref, openBlock, createBlock, withCtx, createVNode, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
2
+ import { NPopover, NInputNumber, NSpace, NIcon } from 'naive-ui';
3
+ import { Close, GitCompareOutline, ArrowUndoSharp } from '@vicons/ionicons5';
4
+ import NumberPanel from './components/NumberPanel.js';
5
+ import { useDraggable } from '@vueuse/core';
7
6
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
8
7
 
9
- const _hoisted_1 = {
10
- key: 0,
11
- class: "c-keyboard"
12
- };
13
- const _hoisted_2 = { class: "left" };
14
- const _hoisted_3 = { class: "keys" };
15
- const _hoisted_4 = ["onClick"];
16
- const _hoisted_5 = ["onClick"];
17
- const _hoisted_6 = { class: "btns" };
18
- const _hoisted_7 = ["onClick"];
19
- const _hoisted_8 = { class: "inputs" };
20
- const _hoisted_9 = { class: "inputs-right" };
21
- const _hoisted_10 = /* @__PURE__ */ createElementVNode("hr", null, null, -1);
22
- const _hoisted_11 = /* @__PURE__ */ createElementVNode("span", null, "\u952E\u76D8", -1);
23
- const _hoisted_12 = { class: "keys" };
24
- const _hoisted_13 = ["onClick"];
8
+ const _hoisted_1 = /* @__PURE__ */ createElementVNode("span", null, "\u952E\u76D8", -1);
9
+ const _hoisted_2 = { class: "keys" };
10
+ const _hoisted_3 = ["onClick"];
25
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
26
12
  __name: "Keyboard",
27
13
  props: {
28
14
  mode: { type: String, default: "english" },
29
15
  dragable: { type: Boolean, default: false },
30
16
  positionInitialValue: { type: Object, default: () => ({ x: 0, y: 0 }) },
31
- defaultValue: { type: Number }
17
+ defaultValue: { type: Number },
18
+ panel: { type: Boolean, default: true }
32
19
  },
33
20
  emits: [
34
21
  "change",
@@ -36,249 +23,118 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
36
23
  ],
37
24
  setup(__props, { emit }) {
38
25
  const props = __props;
39
- const NUMBERKEYS = "1234567890.";
40
- const DAYS = [3, 7, 14, 30];
41
26
  const ENGLISHKEY = "QWERTYUIOPASDFGHJKLZXCVBNM.";
42
27
  const ENGLISHOTHERKEY = ["Switch", " ", "Undo", "Enter"];
43
28
  const ENGLISHKEYS = ENGLISHKEY.split("").concat(ENGLISHOTHERKEY);
44
29
  const ENGLISHKEYS_ = ENGLISHKEY.split(".")[0].split("").sort().concat(["."], ENGLISHOTHERKEY);
30
+ const isDefault = computed(() => props.mode === "english");
31
+ const englishKeys = ref(ENGLISHKEYS.slice());
32
+ const popoverRef = ref(null);
45
33
  const englishKeyboardRef = ref(null);
46
34
  const keyboardDragRef = ref(null);
47
- const numberKeys = ref(NUMBERKEYS.split(""));
48
- const days = ref(DAYS);
49
- const doses = ref([2, 3, 4, 5, 6, 7, 8]);
50
- const englishKeys = ref(ENGLISHKEYS.slice());
51
- const inputValue = ref("");
52
- const integerValue = ref();
53
- const numeratorValue = ref();
54
- const denominatorValue = ref();
55
- const inputValueStatus = ref("success");
56
- const numeratorValueStatus = ref("success");
57
- const denominatorValueStatus = ref("success");
58
- const isDefault = computed(() => props.mode === "english");
59
- const isDay = computed(() => props.mode === "day");
60
- const isDose = computed(() => props.mode === "dose");
61
- const { history, undo, redo } = useRefHistory(inputValue);
62
- const { x, y, style } = useDraggable(englishKeyboardRef, {
63
- initialValue: props.positionInitialValue,
64
- preventDefault: true,
65
- handle: keyboardDragRef
66
- });
67
- if (props.defaultValue) {
68
- inputValue.value = props.defaultValue.toString();
69
- }
70
- function keydown(key) {
71
- var _a, _b;
72
- if (props.mode === "english") {
73
- if (key !== "Switch") {
74
- emit("keydown", key);
75
- } else {
76
- englishKeys.value = englishKeys.value[0] === "Q" ? ENGLISHKEYS_.slice() : ENGLISHKEYS.slice();
77
- }
78
- return;
35
+ const currentValue = ref();
36
+ const style = init();
37
+ function init() {
38
+ if (props.defaultValue) {
39
+ currentValue.value = props.defaultValue;
79
40
  }
80
- switch (key) {
81
- case "Undo": {
82
- undo();
83
- setInputValueStatus();
84
- break;
85
- }
86
- case "Enter":
87
- emit("change", +inputValue.value);
88
- break;
89
- default:
90
- if (typeof key === "number") {
91
- inputValue.value = key.toString();
92
- } else {
93
- inputValue.value = (((_b = (_a = inputValue.value) == null ? void 0 : _a.toString) == null ? void 0 : _b.call(_a)) || "") + key;
94
- }
95
- setInputValueStatus();
96
- break;
41
+ if (isDefault.value && props.dragable) {
42
+ const { x, y, style: style2 } = useDraggable(englishKeyboardRef, {
43
+ initialValue: props.positionInitialValue,
44
+ preventDefault: true,
45
+ handle: keyboardDragRef
46
+ });
47
+ return style2;
97
48
  }
98
49
  }
99
- function updateFraction(value) {
100
- if (!setInputStatus(inputValue, inputValueStatus))
101
- return;
102
- inputValue.value = (Math.round(+inputValue.value * (1 / value) * 100) / 100).toString();
103
- setInputValueStatus();
104
- }
105
- function calculateFraction() {
106
- if (!setInputStatus(inputValue, inputValueStatus) || !setInputStatus(numeratorValue, numeratorValueStatus, true) || !setInputStatus(denominatorValue, denominatorValueStatus, true))
107
- return;
108
- const value = getNumber(integerValue.value) + getNumber(numeratorValue.value) / getNumber(denominatorValue.value);
109
- inputValue.value = (Math.round(+inputValue.value * value * 100) / 100).toString();
110
- setInputValueStatus();
111
- }
112
- function setInputStatus(valueRef, statusRef, isInteger) {
113
- if (!isInteger && (!valueRef.value || valueRef.value === ".") || isInteger && !valueRef.value) {
114
- statusRef.value = "error";
115
- return;
50
+ function keydown(key) {
51
+ if (key !== "Switch") {
52
+ emit("keydown", key);
53
+ } else {
54
+ englishKeys.value = englishKeys.value[0] === "Q" ? ENGLISHKEYS_.slice() : ENGLISHKEYS.slice();
116
55
  }
117
- return true;
118
56
  }
119
- function setInputValueStatus() {
120
- inputValueStatus.value = !inputValue.value ? "error" : "success";
57
+ function onchange(value) {
58
+ var _a, _b;
59
+ (_b = (_a = popoverRef.value) == null ? void 0 : _a.setShow) == null ? void 0 : _b.call(_a, false);
60
+ currentValue.value = value;
61
+ emit("change", value);
121
62
  }
122
63
  return (_ctx, _cache) => {
123
- return openBlock(), createElementBlock(Fragment, null, [
124
- createCommentVNode(' <n-popover\r\n ref="popoverRef"\r\n v-if="!isDefault"\r\n trigger="click"\r\n :show-arrow="false"\r\n placement="bottom-start"\r\n style="padding: 0"\r\n display-directive="show"\r\n > '),
125
- createCommentVNode(' <template #trigger>\r\n <n-input-number v-model:value="value" :show-button="false" />\r\n </template> '),
126
- !unref(isDefault) ? (openBlock(), createElementBlock("div", _hoisted_1, [
127
- createElementVNode("div", _hoisted_2, [
128
- createVNode(InputNumber, {
129
- modelValue: inputValue.value,
130
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
131
- status: inputValueStatus.value,
132
- "onUpdate:status": _cache[1] || (_cache[1] = ($event) => inputValueStatus.value = $event)
133
- }, null, 8, ["modelValue", "status"]),
134
- createElementVNode("div", _hoisted_3, [
135
- createVNode(unref(NSpace), null, {
136
- default: withCtx(() => [
137
- (openBlock(true), createElementBlock(Fragment, null, renderList(numberKeys.value, (key) => {
138
- return openBlock(), createElementBlock("span", {
139
- key,
140
- class: normalizeClass(key === "0" ? "is-0" : ""),
141
- onClick: ($event) => keydown(key)
142
- }, toDisplayString(key), 11, _hoisted_4);
143
- }), 128))
144
- ]),
145
- _: 1
146
- }),
147
- createVNode(unref(NSpace), null, {
148
- default: withCtx(() => [
149
- createElementVNode("span", {
150
- class: "opt",
151
- onClick: _cache[2] || (_cache[2] = ($event) => keydown("Undo"))
152
- }, [
153
- createVNode(unref(NIcon), { component: unref(ArrowUndoSharp) }, null, 8, ["component"])
154
- ]),
155
- createElementVNode("span", {
156
- class: "opt",
157
- onClick: _cache[3] || (_cache[3] = ($event) => keydown("Enter"))
158
- }, "\u786E\u5B9A")
159
- ]),
160
- _: 1
161
- })
162
- ])
64
+ return !unref(isDefault) && !__props.panel ? (openBlock(), createBlock(unref(NPopover), {
65
+ key: 0,
66
+ ref_key: "popoverRef",
67
+ ref: popoverRef,
68
+ trigger: "click",
69
+ "show-arrow": false,
70
+ placement: "bottom-start",
71
+ style: { "padding": "0" },
72
+ "display-directive": "show"
73
+ }, {
74
+ trigger: withCtx(() => [
75
+ createVNode(unref(NInputNumber), {
76
+ value: currentValue.value,
77
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => currentValue.value = $event),
78
+ "show-button": false
79
+ }, null, 8, ["value"])
80
+ ]),
81
+ default: withCtx(() => [
82
+ createVNode(NumberPanel, {
83
+ mode: __props.mode,
84
+ defaultValue: __props.defaultValue,
85
+ onChange: onchange
86
+ }, null, 8, ["mode", "defaultValue"])
87
+ ]),
88
+ _: 1
89
+ }, 512)) : !unref(isDefault) && __props.panel ? (openBlock(), createBlock(NumberPanel, {
90
+ key: 1,
91
+ mode: __props.mode,
92
+ defaultValue: __props.defaultValue,
93
+ onChange: onchange
94
+ }, null, 8, ["mode", "defaultValue"])) : (openBlock(), createElementBlock("div", {
95
+ key: 2,
96
+ class: normalizeClass(["c-keyboard-english", { isFixed: __props.dragable }]),
97
+ ref_key: "englishKeyboardRef",
98
+ ref: englishKeyboardRef,
99
+ style: normalizeStyle(unref(style))
100
+ }, [
101
+ createVNode(unref(NSpace), {
102
+ "wrap-item": false,
103
+ align: "center",
104
+ justify: "space-between",
105
+ ref_key: "keyboardDragRef",
106
+ ref: keyboardDragRef,
107
+ style: normalizeStyle({ cursor: __props.dragable ? "move" : "default" })
108
+ }, {
109
+ default: withCtx(() => [
110
+ _hoisted_1,
111
+ createVNode(unref(NIcon), {
112
+ onClick: _cache[1] || (_cache[1] = ($event) => keydown("close")),
113
+ component: unref(Close)
114
+ }, null, 8, ["component"])
163
115
  ]),
164
- unref(isDay) ? (openBlock(), createBlock(unref(NSpace), {
165
- key: 0,
166
- class: "right-days",
167
- justify: "center",
168
- vertical: ""
169
- }, {
170
- default: withCtx(() => [
171
- (openBlock(true), createElementBlock(Fragment, null, renderList(days.value, (day) => {
172
- return openBlock(), createElementBlock("span", {
173
- class: "btn",
174
- key: day,
175
- onClick: ($event) => keydown(day)
176
- }, toDisplayString(day) + "\u5929", 9, _hoisted_5);
177
- }), 128))
178
- ]),
179
- _: 1
180
- })) : createCommentVNode("v-if", true),
181
- unref(isDose) ? (openBlock(), createBlock(unref(NSpace), {
182
- key: 1,
183
- class: "right-dose",
184
- "wrap-item": false
185
- }, {
186
- default: withCtx(() => [
187
- createElementVNode("div", _hoisted_6, [
188
- (openBlock(true), createElementBlock(Fragment, null, renderList(doses.value, (dose) => {
189
- return openBlock(), createElementBlock("span", {
190
- class: "btn",
191
- key: dose,
192
- onClick: ($event) => updateFraction(dose)
193
- }, "1/" + toDisplayString(dose), 9, _hoisted_7);
194
- }), 128))
195
- ]),
196
- createVNode(unref(NSpace), {
197
- justify: "center",
198
- vertical: ""
199
- }, {
200
- default: withCtx(() => [
201
- createElementVNode("div", _hoisted_8, [
202
- createVNode(InputNumber, {
203
- integer: "",
204
- modelValue: integerValue.value,
205
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => integerValue.value = $event)
206
- }, null, 8, ["modelValue"]),
207
- createElementVNode("div", _hoisted_9, [
208
- createVNode(InputNumber, {
209
- integer: "",
210
- modelValue: numeratorValue.value,
211
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => numeratorValue.value = $event),
212
- status: numeratorValueStatus.value,
213
- "onUpdate:status": _cache[6] || (_cache[6] = ($event) => numeratorValueStatus.value = $event)
214
- }, null, 8, ["modelValue", "status"]),
215
- _hoisted_10,
216
- createVNode(InputNumber, {
217
- integer: "",
218
- modelValue: denominatorValue.value,
219
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => denominatorValue.value = $event),
220
- status: denominatorValueStatus.value,
221
- "onUpdate:status": _cache[8] || (_cache[8] = ($event) => denominatorValueStatus.value = $event)
222
- }, null, 8, ["modelValue", "status"])
223
- ])
224
- ]),
225
- createElementVNode("span", {
226
- class: "btn",
227
- onClick: calculateFraction
228
- }, "\u5206\u5B50\u5F0F\u5242\u91CF")
229
- ]),
230
- _: 1
231
- })
232
- ]),
233
- _: 1
234
- })) : createCommentVNode("v-if", true)
235
- ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
236
- createCommentVNode(" </n-popover> "),
237
- createElementVNode("div", {
238
- class: normalizeClass(["c-keyboard-english", { isFixed: __props.dragable }]),
239
- ref_key: "englishKeyboardRef",
240
- ref: englishKeyboardRef,
241
- style: normalizeStyle(unref(style))
242
- }, [
243
- createVNode(unref(NSpace), {
244
- "wrap-item": false,
245
- align: "center",
246
- justify: "space-between",
247
- ref_key: "keyboardDragRef",
248
- ref: keyboardDragRef,
249
- style: normalizeStyle({ cursor: __props.dragable ? "move" : "default" })
250
- }, {
251
- default: withCtx(() => [
252
- _hoisted_11,
253
- createVNode(unref(NIcon), {
254
- onClick: _cache[9] || (_cache[9] = ($event) => keydown("close")),
255
- component: unref(Close)
256
- }, null, 8, ["component"])
257
- ]),
258
- _: 1
259
- }, 8, ["style"]),
260
- createElementVNode("div", _hoisted_12, [
261
- (openBlock(true), createElementBlock(Fragment, null, renderList(englishKeys.value, (key, index) => {
262
- return openBlock(), createElementBlock("span", {
263
- key,
264
- class: normalizeClass(["key" + index]),
265
- onClick: ($event) => keydown(key)
266
- }, [
267
- key === "Switch" ? (openBlock(), createBlock(unref(NIcon), {
268
- key: 0,
269
- component: unref(GitCompareOutline)
270
- }, null, 8, ["component"])) : createCommentVNode("v-if", true),
271
- key === "Undo" ? (openBlock(), createBlock(unref(NIcon), {
272
- key: 1,
273
- component: unref(ArrowUndoSharp)
274
- }, null, 8, ["component"])) : createCommentVNode("v-if", true),
275
- createTextVNode(" " + toDisplayString(!ENGLISHOTHERKEY.includes(key) || key === "Enter" ? key : key === "" ? "\u7A7A\u683C" : ""), 1)
276
- ], 10, _hoisted_13);
277
- }), 128))
278
- ])
279
- ], 6)
280
- ], 2112))
281
- ], 2112);
116
+ _: 1
117
+ }, 8, ["style"]),
118
+ createElementVNode("div", _hoisted_2, [
119
+ (openBlock(true), createElementBlock(Fragment, null, renderList(englishKeys.value, (key, index) => {
120
+ return openBlock(), createElementBlock("span", {
121
+ key,
122
+ class: normalizeClass(["key" + index]),
123
+ onClick: ($event) => keydown(key)
124
+ }, [
125
+ key === "Switch" ? (openBlock(), createBlock(unref(NIcon), {
126
+ key: 0,
127
+ component: unref(GitCompareOutline)
128
+ }, null, 8, ["component"])) : createCommentVNode("v-if", true),
129
+ key === "Undo" ? (openBlock(), createBlock(unref(NIcon), {
130
+ key: 1,
131
+ component: unref(ArrowUndoSharp)
132
+ }, null, 8, ["component"])) : createCommentVNode("v-if", true),
133
+ createTextVNode(" " + toDisplayString(!ENGLISHOTHERKEY.includes(key) || key === "Enter" ? key : key === "" ? "\u7A7A\u683C" : ""), 1)
134
+ ], 10, _hoisted_3);
135
+ }), 128))
136
+ ])
137
+ ], 6));
282
138
  };
283
139
  }
284
140
  });
@@ -1,4 +1,4 @@
1
- import { PropType, Ref } from 'vue';
1
+ import { PropType } from 'vue';
2
2
  declare type IPointer = {
3
3
  x: number;
4
4
  y: number;
@@ -22,9 +22,11 @@ declare const _default: import("vue").DefineComponent<{
22
22
  defaultValue: {
23
23
  type: NumberConstructor;
24
24
  };
25
+ panel: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
25
29
  }, {
26
- NUMBERKEYS: string;
27
- DAYS: number[];
28
30
  ENGLISHKEY: string;
29
31
  ENGLISHOTHERKEY: string[];
30
32
  ENGLISHKEYS: string[];
@@ -48,58 +50,77 @@ declare const _default: import("vue").DefineComponent<{
48
50
  defaultValue: {
49
51
  type: NumberConstructor;
50
52
  };
53
+ panel: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
51
57
  }>> & {
52
58
  onChange?: ((...args: any[]) => any) | undefined;
53
59
  onKeydown?: ((...args: any[]) => any) | undefined;
54
60
  }>>;
55
61
  emit: (event: "change" | "keydown", ...args: any[]) => void;
56
- englishKeyboardRef: Ref<HTMLElement | null>;
57
- keyboardDragRef: Ref<HTMLElement | null>;
58
- numberKeys: Ref<string[]>;
59
- days: Ref<number[]>;
60
- doses: Ref<number[]>;
61
- englishKeys: Ref<string[]>;
62
- inputValue: Ref<string>;
63
- integerValue: Ref<any>;
64
- numeratorValue: Ref<any>;
65
- denominatorValue: Ref<any>;
66
- inputValueStatus: Ref<string>;
67
- numeratorValueStatus: Ref<string>;
68
- denominatorValueStatus: Ref<string>;
69
62
  isDefault: import("vue").ComputedRef<boolean>;
70
- isDay: import("vue").ComputedRef<boolean>;
71
- isDose: import("vue").ComputedRef<boolean>;
72
- history: Ref<import("@vueuse/core").UseRefHistoryRecord<string>[]>;
73
- undo: () => void;
74
- redo: () => void;
75
- x: Ref<number>;
76
- y: Ref<number>;
77
- style: import("vue").ComputedRef<string>;
63
+ englishKeys: import("vue").Ref<string[]>;
64
+ popoverRef: import("vue").Ref<null>;
65
+ englishKeyboardRef: import("vue").Ref<HTMLElement | null>;
66
+ keyboardDragRef: import("vue").Ref<HTMLElement | null>;
67
+ currentValue: import("vue").Ref<any>;
68
+ style: import("vue").ComputedRef<string> | undefined;
69
+ init: () => import("vue").ComputedRef<string> | undefined;
78
70
  keydown: (key: string | number) => void;
79
- updateFraction: (value: number) => void;
80
- calculateFraction: () => void;
81
- setInputStatus: (valueRef: Ref<string>, statusRef: Ref<string>, isInteger?: boolean) => true | undefined;
82
- setInputValueStatus: () => void;
71
+ onchange: (value: number) => void;
72
+ NPopover: any;
73
+ NInputNumber: any;
83
74
  NIcon: any;
84
75
  NSpace: any;
85
76
  ArrowUndoSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
86
77
  Close: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
87
78
  GitCompareOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
88
- InputNumber: import("vue").DefineComponent<{
89
- modelValue: {
90
- type: StringConstructor;
91
- default: string;
92
- };
93
- integer: {
94
- type: BooleanConstructor;
95
- default: boolean;
79
+ NumberPanel: import("vue").DefineComponent<{
80
+ defaultValue: {
81
+ type: NumberConstructor;
96
82
  };
97
- status: {
83
+ mode: {
98
84
  type: StringConstructor;
99
- default: string;
100
85
  };
101
86
  }, {
87
+ NUMBERKEYS: string;
88
+ DAYS: number[];
102
89
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
90
+ defaultValue: {
91
+ type: NumberConstructor;
92
+ };
93
+ mode: {
94
+ type: StringConstructor;
95
+ };
96
+ }>> & {
97
+ onChange?: ((...args: any[]) => any) | undefined;
98
+ }>>;
99
+ emit: (event: "change", ...args: any[]) => void;
100
+ isDay: import("vue").ComputedRef<boolean>;
101
+ isDose: import("vue").ComputedRef<boolean>;
102
+ numberKeys: import("vue").Ref<string[]>;
103
+ days: import("vue").Ref<number[]>;
104
+ doses: import("vue").Ref<number[]>;
105
+ inputValue: import("vue").Ref<string>;
106
+ integerValue: import("vue").Ref<any>;
107
+ numeratorValue: import("vue").Ref<any>;
108
+ denominatorValue: import("vue").Ref<any>;
109
+ inputValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
110
+ numeratorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
111
+ denominatorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
112
+ history: import("vue").Ref<import("@vueuse/core").UseRefHistoryRecord<string>[]>;
113
+ undo: () => void;
114
+ redo: () => void;
115
+ keydown: (key: string | number) => void;
116
+ updateFraction: (value: number) => void;
117
+ calculateFraction: () => void;
118
+ setInputStatus: (valueRef: import("vue").Ref<string>, statusRef: import("vue").Ref<string>, isInteger?: boolean | undefined) => true | undefined;
119
+ setInputValueStatus: () => void;
120
+ NIcon: any;
121
+ NSpace: any;
122
+ ArrowUndoSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
123
+ InputNumber: import("vue").DefineComponent<{
103
124
  modelValue: {
104
125
  type: StringConstructor;
105
126
  default: string;
@@ -109,43 +130,67 @@ declare const _default: import("vue").DefineComponent<{
109
130
  default: boolean;
110
131
  };
111
132
  status: {
133
+ type: PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
134
+ default: string;
135
+ };
136
+ }, {
137
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
138
+ modelValue: {
139
+ type: StringConstructor;
140
+ default: string;
141
+ };
142
+ integer: {
143
+ type: BooleanConstructor;
144
+ default: boolean;
145
+ };
146
+ status: {
147
+ type: PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
148
+ default: string;
149
+ };
150
+ }>> & {
151
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
152
+ "onUpdate:status"?: ((...args: any[]) => any) | undefined;
153
+ }>>;
154
+ emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
155
+ update: (value: string | [string, string]) => void;
156
+ validator: (value: string) => boolean;
157
+ calculate: (type: string) => void;
158
+ NInput: any;
159
+ NIcon: any;
160
+ NSpace: any;
161
+ CaretDown: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
162
+ CaretUp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
163
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status")[], "update:modelValue" | "update:status", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
164
+ modelValue: {
112
165
  type: StringConstructor;
113
166
  default: string;
114
167
  };
168
+ integer: {
169
+ type: BooleanConstructor;
170
+ default: boolean;
171
+ };
172
+ status: {
173
+ type: PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
174
+ default: string;
175
+ };
115
176
  }>> & {
116
177
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
117
178
  "onUpdate:status"?: ((...args: any[]) => any) | undefined;
118
- }>>;
119
- emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
120
- update: (value: string | [string, string]) => void;
121
- validator: (value: string) => boolean;
122
- calculate: (type: string) => void;
123
- NInput: any;
124
- NIcon: any;
125
- NSpace: any;
126
- CaretDown: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
127
- CaretUp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
128
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status")[], "update:modelValue" | "update:status", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
129
- modelValue: {
130
- type: StringConstructor;
131
- default: string;
132
- };
133
- integer: {
134
- type: BooleanConstructor;
135
- default: boolean;
179
+ }, {
180
+ modelValue: string;
181
+ status: import("naive-ui/es/form/src/interface").FormValidationStatus;
182
+ integer: boolean;
183
+ }>;
184
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
185
+ defaultValue: {
186
+ type: NumberConstructor;
136
187
  };
137
- status: {
188
+ mode: {
138
189
  type: StringConstructor;
139
- default: string;
140
190
  };
141
191
  }>> & {
142
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
143
- "onUpdate:status"?: ((...args: any[]) => any) | undefined;
144
- }, {
145
- modelValue: string;
146
- status: string;
147
- integer: boolean;
148
- }>;
192
+ onChange?: ((...args: any[]) => any) | undefined;
193
+ }, {}>;
149
194
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "keydown")[], "change" | "keydown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
150
195
  mode: {
151
196
  type: PropType<"day" | "dose" | "english">;
@@ -165,6 +210,10 @@ declare const _default: import("vue").DefineComponent<{
165
210
  defaultValue: {
166
211
  type: NumberConstructor;
167
212
  };
213
+ panel: {
214
+ type: BooleanConstructor;
215
+ default: boolean;
216
+ };
168
217
  }>> & {
169
218
  onChange?: ((...args: any[]) => any) | undefined;
170
219
  onKeydown?: ((...args: any[]) => any) | undefined;
@@ -172,5 +221,6 @@ declare const _default: import("vue").DefineComponent<{
172
221
  mode: "day" | "dose" | "english";
173
222
  dragable: boolean;
174
223
  positionInitialValue: IPointer;
224
+ panel: boolean;
175
225
  }>;
176
226
  export default _default;