cnhis-design-vue 3.1.34 → 3.1.35-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 (41) hide show
  1. package/es/components/big-table/index.d.ts +14 -0
  2. package/es/components/big-table/src/BigTable.vue.d.ts +17 -9
  3. package/es/components/big-table/src/BigTable.vue2.js +602 -15
  4. package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -0
  5. package/es/components/big-table/src/components/separate.vue.d.ts +1 -0
  6. package/es/components/big-table/src/hooks/useEdit.d.ts +4 -0
  7. package/es/components/big-table/src/hooks/useSeparateRow.d.ts +11 -1
  8. package/es/components/big-table/src/hooks/useSeparateRow.js +56 -12
  9. package/es/components/big-table/style/index.css +1 -1
  10. package/es/components/fabric-chart/src/hooks/useCenter.js +3 -3
  11. package/es/components/fabric-chart/src/hooks/useLeft.js +3 -3
  12. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +2 -1
  13. package/es/components/fabric-chart/src/utils/utils.d.ts +2 -0
  14. package/es/components/fabric-chart/src/utils/utils.js +7 -1
  15. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -0
  16. package/es/components/form-config/src/hooks/useConfigurationField.js +7 -1
  17. package/es/components/form-render/src/components/renderer/combination.js +11 -3
  18. package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
  19. package/es/components/form-render/src/components/renderer/formItem.js +20 -4
  20. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +7 -3
  21. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +12 -2
  22. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +7 -14
  23. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +12 -2
  24. package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +13 -0
  25. package/es/components/form-render/src/components/tooltipMessage.vue.js +37 -0
  26. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -0
  27. package/es/components/form-render/style/index.css +1 -1
  28. package/es/components/iho-table/src/IhoTable.vue.js +3 -3
  29. package/es/components/index.css +1 -1
  30. package/es/components/info-header/index.d.ts +45 -0
  31. package/es/components/info-header/src/InfoHeader.vue.d.ts +39 -6
  32. package/es/components/info-header/src/InfoHeader.vue.js +40 -29
  33. package/es/components/info-header/style/index.css +1 -1
  34. package/es/components/keyboard/index.d.ts +34 -6
  35. package/es/components/keyboard/src/Keyboard.vue.d.ts +34 -6
  36. package/es/components/keyboard/src/Keyboard.vue.js +16 -12
  37. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  38. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +14 -4
  39. package/es/components/keyboard/src/components/NumberPanel.vue.js +88 -30
  40. package/es/components/keyboard/style/index.css +1 -1
  41. package/package.json +2 -2
@@ -45,6 +45,15 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
45
45
  type: (NumberConstructor | StringConstructor)[];
46
46
  default: number;
47
47
  };
48
+ settingIcons: {
49
+ type: import("vue").PropType<(string | {
50
+ event: import("../../../es/shared/types").Func<any[], any>;
51
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
52
+ [key: string]: any;
53
+ }>[];
54
+ })[]>;
55
+ default: () => string[];
56
+ };
48
57
  }, {
49
58
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
50
59
  compact: {
@@ -92,6 +101,15 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
92
101
  type: (NumberConstructor | StringConstructor)[];
93
102
  default: number;
94
103
  };
104
+ settingIcons: {
105
+ type: import("vue").PropType<(string | {
106
+ event: import("../../../es/shared/types").Func<any[], any>;
107
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
108
+ [key: string]: any;
109
+ }>[];
110
+ })[]>;
111
+ default: () => string[];
112
+ };
95
113
  }>> & {
96
114
  onOpenPatientInfo?: ((...args: any[]) => any) | undefined;
97
115
  onFieldSet?: ((...args: any[]) => any) | undefined;
@@ -101,6 +119,18 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
101
119
  toggleCompact: () => Promise<void>;
102
120
  openPatientInfo: () => void;
103
121
  fieldSet: () => void;
122
+ settingIconMap: Record<string, {
123
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
124
+ [key: string]: any;
125
+ }>[];
126
+ event: import("../../../es/shared/types").Func<any[], any>;
127
+ }>;
128
+ settingIconList: import("vue").ComputedRef<{
129
+ event: import("../../../es/shared/types").Func<any[], any>;
130
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
131
+ [key: string]: any;
132
+ }>[];
133
+ }[]>;
104
134
  getTagColor: ({ type }: Partial<{
105
135
  type?: "warning" | "info" | undefined;
106
136
  content: string;
@@ -333,6 +363,15 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
333
363
  type: (NumberConstructor | StringConstructor)[];
334
364
  default: number;
335
365
  };
366
+ settingIcons: {
367
+ type: import("vue").PropType<(string | {
368
+ event: import("../../../es/shared/types").Func<any[], any>;
369
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
370
+ [key: string]: any;
371
+ }>[];
372
+ })[]>;
373
+ default: () => string[];
374
+ };
336
375
  }>> & {
337
376
  onOpenPatientInfo?: ((...args: any[]) => any) | undefined;
338
377
  onFieldSet?: ((...args: any[]) => any) | undefined;
@@ -357,5 +396,11 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
357
396
  valueField: string;
358
397
  minColumnWidth: string | number;
359
398
  rowHeight: string | number;
399
+ settingIcons: (string | {
400
+ event: import("../../../es/shared/types").Func<any[], any>;
401
+ render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
402
+ [key: string]: any;
403
+ }>[];
404
+ })[];
360
405
  }>>;
361
406
  export default InfoHeader;
@@ -1,5 +1,5 @@
1
- import { AnyObject } from '../../../../es/shared/types';
2
- import { CSSProperties, PropType } from 'vue';
1
+ import { AnyObject, Func } from '../../../../es/shared/types';
2
+ import { CSSProperties, PropType, VNode } from 'vue';
3
3
  declare type PatientTag = Partial<{
4
4
  type?: 'warning' | 'info';
5
5
  content: string;
@@ -54,6 +54,13 @@ declare const _default: import("vue").DefineComponent<{
54
54
  type: (NumberConstructor | StringConstructor)[];
55
55
  default: number;
56
56
  };
57
+ settingIcons: {
58
+ type: PropType<(string | {
59
+ event: Func;
60
+ render: () => VNode[];
61
+ })[]>;
62
+ default: () => string[];
63
+ };
57
64
  }, {
58
65
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
59
66
  compact: {
@@ -101,6 +108,13 @@ declare const _default: import("vue").DefineComponent<{
101
108
  type: (NumberConstructor | StringConstructor)[];
102
109
  default: number;
103
110
  };
111
+ settingIcons: {
112
+ type: PropType<(string | {
113
+ event: Func;
114
+ render: () => VNode[];
115
+ })[]>;
116
+ default: () => string[];
117
+ };
104
118
  }>> & {
105
119
  onOpenPatientInfo?: ((...args: any[]) => any) | undefined;
106
120
  onFieldSet?: ((...args: any[]) => any) | undefined;
@@ -110,6 +124,14 @@ declare const _default: import("vue").DefineComponent<{
110
124
  toggleCompact: () => Promise<void>;
111
125
  openPatientInfo: () => void;
112
126
  fieldSet: () => void;
127
+ settingIconMap: Record<string, {
128
+ render: () => VNode[];
129
+ event: Func;
130
+ }>;
131
+ settingIconList: import("vue").ComputedRef<{
132
+ event: Func;
133
+ render: () => VNode[];
134
+ }[]>;
113
135
  getTagColor: ({ type }: PatientTag) => {
114
136
  color: string;
115
137
  textColor: string;
@@ -159,19 +181,19 @@ declare const _default: import("vue").DefineComponent<{
159
181
  NScrollbar: any;
160
182
  SlotRender: import("vue").DefineComponent<{
161
183
  renderer: {
162
- type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../es/shared/types").Func<any[], any>>;
184
+ type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | Func<any[], any>>;
163
185
  required: true;
164
186
  };
165
187
  rootSlots: {
166
- type: PropType<Record<string, import("../../../../es/shared/types").Func<any[], any>>>;
188
+ type: PropType<Record<string, Func<any[], any>>>;
167
189
  };
168
190
  }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
169
191
  renderer: {
170
- type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../es/shared/types").Func<any[], any>>;
192
+ type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | Func<any[], any>>;
171
193
  required: true;
172
194
  };
173
195
  rootSlots: {
174
- type: PropType<Record<string, import("../../../../es/shared/types").Func<any[], any>>>;
196
+ type: PropType<Record<string, Func<any[], any>>>;
175
197
  };
176
198
  }>>, {}>;
177
199
  InfoEllipsis: import("vue").DefineComponent<{
@@ -335,6 +357,13 @@ declare const _default: import("vue").DefineComponent<{
335
357
  type: (NumberConstructor | StringConstructor)[];
336
358
  default: number;
337
359
  };
360
+ settingIcons: {
361
+ type: PropType<(string | {
362
+ event: Func;
363
+ render: () => VNode[];
364
+ })[]>;
365
+ default: () => string[];
366
+ };
338
367
  }>> & {
339
368
  onOpenPatientInfo?: ((...args: any[]) => any) | undefined;
340
369
  onFieldSet?: ((...args: any[]) => any) | undefined;
@@ -359,5 +388,9 @@ declare const _default: import("vue").DefineComponent<{
359
388
  valueField: string;
360
389
  minColumnWidth: string | number;
361
390
  rowHeight: string | number;
391
+ settingIcons: (string | {
392
+ event: Func;
393
+ render: () => VNode[];
394
+ })[];
362
395
  }>;
363
396
  export default _default;
@@ -1,4 +1,5 @@
1
- import { defineComponent, ref, nextTick, onMounted, watch, onBeforeUnmount, onDeactivated, onActivated, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode, Fragment, toDisplayString, renderList, withDirectives, createBlock, unref, mergeProps, withCtx, createTextVNode, vShow, createVNode } from 'vue';
1
+ import { defineComponent, computed, ref, nextTick, onMounted, watch, onBeforeUnmount, onDeactivated, onActivated, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode, Fragment, toDisplayString, renderList, withDirectives, createBlock, unref, mergeProps, withCtx, createTextVNode, vShow, createVNode, resolveDynamicComponent, h } from 'vue';
2
+ import { isString } from 'lodash-es';
2
3
  import { NTag, NScrollbar, NDescriptions, NDescriptionsItem } from 'naive-ui';
3
4
  import { useThrottleFn, useEventListener } from '@vueuse/core';
4
5
  import script$1 from '../../../shared/components/SlotRender/SlotRender.js';
@@ -28,9 +29,7 @@ const _hoisted_7 = {
28
29
  const _hoisted_8 = /* @__PURE__ */ createElementVNode("section", { style: { "height": "10px" } }, null, -1);
29
30
  const _hoisted_9 = /* @__PURE__ */ createElementVNode("section", { style: { "height": "12px" } }, null, -1);
30
31
  const _hoisted_10 = { class: "c-info-header__setting" };
31
- const _hoisted_11 = /* @__PURE__ */ createElementVNode("i", { class: "iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji" }, null, -1);
32
- const _hoisted_12 = /* @__PURE__ */ createElementVNode("i", { class: "iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi" }, null, -1);
33
- const _hoisted_13 = /* @__PURE__ */ createElementVNode("i", { class: "iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia" }, null, -1);
32
+ const _hoisted_11 = ["onClick"];
34
33
  const _sfc_main = /* @__PURE__ */ defineComponent({
35
34
  __name: "InfoHeader",
36
35
  props: {
@@ -41,7 +40,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
40
  labelField: { type: String, default: "label" },
42
41
  valueField: { type: String, default: "value" },
43
42
  minColumnWidth: { type: [String, Number], default: 180 },
44
- rowHeight: { type: [String, Number], default: 32 }
43
+ rowHeight: { type: [String, Number], default: 32 },
44
+ settingIcons: {
45
+ type: Array,
46
+ default: () => ["patientInfo", "fieldSet", "compact"]
47
+ }
45
48
  },
46
49
  emits: [
47
50
  "openPatientInfo",
@@ -61,6 +64,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
64
  function fieldSet() {
62
65
  emit("fieldSet");
63
66
  }
67
+ const settingIconMap = {
68
+ patientInfo: {
69
+ event: openPatientInfo,
70
+ render() {
71
+ return [h("i", { class: "iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaobianji" })];
72
+ }
73
+ },
74
+ fieldSet: {
75
+ event: fieldSet,
76
+ render() {
77
+ return [h("i", { class: "iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi" })];
78
+ }
79
+ },
80
+ compact: {
81
+ event: toggleCompact,
82
+ render() {
83
+ return [h("i", { class: "iconfont info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia" })];
84
+ }
85
+ }
86
+ };
87
+ const settingIconList = computed(() => {
88
+ return props.settingIcons.map((setting) => {
89
+ return (isString(setting) ? settingIconMap[setting] : setting) || {};
90
+ });
91
+ });
64
92
  function getTagColor({ type = "warning" }) {
65
93
  const colorMap = { warning: "#fcc200", info: "rgba(45, 122, 255, 0.1)" };
66
94
  const textColorMap = { warning: "#fff", info: "#2563F4" };
@@ -223,32 +251,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
223
251
  ], 512),
224
252
  createElementVNode("section", _hoisted_10, [
225
253
  renderSlot(_ctx.$slots, "setting"),
226
- !_ctx.$slots.setting ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
227
- createElementVNode("div", {
254
+ !_ctx.$slots.setting ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(settingIconList), (item) => {
255
+ return openBlock(), createElementBlock("div", {
256
+ key: item,
228
257
  class: "c-info-header__settingIcon",
229
- onClick: openPatientInfo
258
+ onClick: item.event
230
259
  }, [
231
- renderSlot(_ctx.$slots, "patientInfoIcon", {}, () => [
232
- _hoisted_11
233
- ])
234
- ]),
235
- createElementVNode("div", {
236
- class: "c-info-header__settingIcon",
237
- onClick: fieldSet
238
- }, [
239
- renderSlot(_ctx.$slots, "fieldSetIcon", {}, () => [
240
- _hoisted_12
241
- ])
242
- ]),
243
- createElementVNode("div", {
244
- class: "c-info-header__settingIcon",
245
- onClick: toggleCompact
246
- }, [
247
- renderSlot(_ctx.$slots, "compactIcon", {}, () => [
248
- _hoisted_13
249
- ])
250
- ])
251
- ], 64)) : createCommentVNode("v-if", true)
260
+ (openBlock(), createBlock(resolveDynamicComponent(item.render)))
261
+ ], 8, _hoisted_11);
262
+ }), 128)) : createCommentVNode("v-if", true)
252
263
  ])
253
264
  ], 6);
254
265
  };
@@ -1 +1 @@
1
- .c-info-header{align-items:center;background:#fff;box-shadow:0 2px 4px 0 hsla(0,0%,69%,.46);display:flex;gap:18px;justify-content:space-between;padding:8px 16px}@font-face{font-family:iconfont;src:url(iconfont.ttf) format("truetype")}.c-info-header .iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iconfont!important;font-size:16px;font-style:normal}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia:before{content:"\c1003"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantoushang:before{content:"\c1004"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi:before{content:"\c1005"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaobianji:before{content:"\c1006"}.c-info-header .info-header--icon-guanbi-yanjing:before{content:"\c1001"}.c-info-header .info-header--icon-faxian-yanjing:before{content:"\c1002"}.c-info-header__divider{align-self:stretch;background:#d5d5d566;width:1px}.c-info-header__patient{align-items:center;display:flex;flex-wrap:nowrap;gap:12px;margin-right:34px}.c-info-header__patientHeader{align-items:center;display:flex;gap:6px}.c-info-header__patientHeader--name{font-size:20px;font-weight:700;margin-right:6px}.c-info-header__patientHeader .n-tag{border-radius:2px;height:20px}.c-info-header__patientHeader .n-tag .n-tag__content{font-size:12px}.c-info-header__info{display:flex;flex:1;flex-wrap:wrap;font-size:14px;justify-content:flex-start;width:100%}.c-info-header__infoWrapper{box-sizing:border-box;height:calc((var(--row-height)*var(--row-num) + 16)*1px);margin:-8px 0;max-height:calc((var(--row-height)*var(--row-num) + 16)*1px)}.c-info-header__info td{text-align:left}.c-info-header__info .n-descriptions-table-content{height:calc(var(--row-height)*1px);max-width:calc(var(--column-width)*1px);padding-bottom:0!important;vertical-align:middle!important}.c-info-header__info .n-descriptions-table-content__label{display:inline-block}.c-info-header__setting{align-self:flex-start;display:flex;gap:8px}.c-info-header__settingIcon{cursor:pointer}.c-info-header__setting .iconfont{color:#000;display:inline-block;font-size:20px;transition:all .2s ease-in-out}.c-info-header.is-compact [compact-hidden]{display:none!important}.c-info-header.is-compact .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(0deg)}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(180deg)}.c-info-header__hidden{align-items:center;display:inline-flex;font-size:14px;gap:8px;vertical-align:middle}.c-info-header__hidden--icon{color:inherit!important;cursor:pointer;font-size:14px;text-decoration:none!important}
1
+ .c-info-header{align-items:center;background:#fff;box-shadow:0 2px 4px 0 hsla(0,0%,69%,.46);display:flex;gap:18px;justify-content:space-between;padding:8px 16px}@font-face{font-family:iconfont;src:url(iconfont.ttf) format("truetype")}.c-info-header .iconfont{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iconfont!important;font-size:16px;font-style:normal}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia:before{content:"\c1003"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantoushang:before{content:"\c1004"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaoshezhi:before{content:"\c1005"}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaobianji:before{content:"\c1006"}.c-info-header .info-header--icon-guanbi-yanjing:before{content:"\c1001"}.c-info-header .info-header--icon-faxian-yanjing:before{content:"\c1002"}.c-info-header__divider{align-self:stretch;background:#d5d5d566;width:1px}.c-info-header__patient{align-items:center;display:flex;flex-wrap:nowrap;gap:12px;margin-right:34px}.c-info-header__patientHeader{align-items:center;display:flex;gap:6px}.c-info-header__patientHeader--name{font-size:20px;font-weight:700;margin-right:6px}.c-info-header__patientHeader .n-tag{border-radius:2px;height:20px}.c-info-header__patientHeader .n-tag .n-tag__content{font-size:12px}.c-info-header__info{display:flex;flex:1;flex-wrap:wrap;font-size:14px;justify-content:flex-start;width:100%}.c-info-header__infoWrapper{box-sizing:border-box;height:calc((var(--row-height)*var(--row-num) + 16)*1px);margin:-8px 0;max-height:calc((var(--row-height)*var(--row-num) + 16)*1px)}.c-info-header__info td{text-align:left}.c-info-header__info .n-descriptions-table-content{height:calc(var(--row-height)*1px);max-width:calc(var(--column-width)*1px);padding-bottom:0!important;vertical-align:middle!important}.c-info-header__info .n-descriptions-table-content__label{display:inline-block}.c-info-header__setting{align-self:flex-start;display:flex;gap:8px}.c-info-header__settingIcon{align-items:center;cursor:pointer;display:inline-flex}.c-info-header__setting .iconfont{color:#000;display:inline-block;font-size:20px;transition:all .2s ease-in-out}.c-info-header.is-compact [compact-hidden]{display:none!important}.c-info-header.is-compact .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(0deg)}.c-info-header .info-header--icon-a-menzhenyishengzhanxitongtubiaojiantouxia{transform:rotate(180deg)}.c-info-header__hidden{align-items:center;display:inline-flex;font-size:14px;gap:8px;vertical-align:middle}.c-info-header__hidden--icon{color:inherit!important;cursor:pointer;font-size:14px;text-decoration:none!important}
@@ -18,6 +18,9 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
18
18
  defaultValue: {
19
19
  type: NumberConstructor;
20
20
  };
21
+ value: {
22
+ type: NumberConstructor;
23
+ };
21
24
  panel: {
22
25
  type: BooleanConstructor;
23
26
  default: boolean;
@@ -53,6 +56,9 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
53
56
  defaultValue: {
54
57
  type: NumberConstructor;
55
58
  };
59
+ value: {
60
+ type: NumberConstructor;
61
+ };
56
62
  panel: {
57
63
  type: BooleanConstructor;
58
64
  default: boolean;
@@ -70,6 +76,15 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
70
76
  }>>;
71
77
  emit: (event: "change" | "keydown", ...args: any[]) => void;
72
78
  isDefault: import("vue").ComputedRef<boolean>;
79
+ moveNumberPaneOptions: import("vue").ComputedRef<{
80
+ mode: "number" | "day" | "dose" | "english";
81
+ defaultValue: number | undefined;
82
+ value: number | undefined;
83
+ positionInitialValue: import("@vueuse/core").Position;
84
+ moveOffset: import("@vueuse/core").Position;
85
+ drag: boolean;
86
+ onChange: (value: number) => void;
87
+ }>;
73
88
  englishKeys: import("vue").Ref<string[]>;
74
89
  popoverRef: import("vue").Ref<null>;
75
90
  englishKeyboardRef: import("vue").Ref<HTMLElement | null>;
@@ -78,7 +93,7 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
78
93
  style: import("vue").ComputedRef<string> | undefined;
79
94
  init: () => import("vue").ComputedRef<string> | undefined;
80
95
  keydown: (key: string | number) => void;
81
- onchange: (value: number) => void;
96
+ onChange: (value: number) => void;
82
97
  NPopover: any;
83
98
  NInputNumber: any;
84
99
  NIcon: any;
@@ -90,6 +105,9 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
90
105
  defaultValue: {
91
106
  type: NumberConstructor;
92
107
  };
108
+ value: {
109
+ type: NumberConstructor;
110
+ };
93
111
  mode: {
94
112
  type: StringConstructor;
95
113
  };
@@ -114,10 +132,15 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
114
132
  }, {
115
133
  NUMBERKEYS: string;
116
134
  DAYS: number[];
135
+ DOSENUMBERKEYS: string;
136
+ CALCULATIONSYMBOLS: string[];
117
137
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
118
138
  defaultValue: {
119
139
  type: NumberConstructor;
120
140
  };
141
+ value: {
142
+ type: NumberConstructor;
143
+ };
121
144
  mode: {
122
145
  type: StringConstructor;
123
146
  };
@@ -146,7 +169,7 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
146
169
  isNumber: import("vue").ComputedRef<boolean>;
147
170
  isDay: import("vue").ComputedRef<boolean>;
148
171
  isDose: import("vue").ComputedRef<boolean>;
149
- numberKeys: import("vue").Ref<string[]>;
172
+ numberKeys: import("vue").ComputedRef<string[]>;
150
173
  days: import("vue").Ref<number[]>;
151
174
  doses: import("vue").Ref<number[]>;
152
175
  inputValue: import("vue").Ref<string>;
@@ -157,12 +180,11 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
157
180
  numeratorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
158
181
  denominatorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
159
182
  keyboardRef: import("vue").Ref<HTMLElement | null>;
160
- history: import("vue").Ref<import("@vueuse/core").UseRefHistoryRecord<string>[]>;
161
- undo: () => void;
162
- redo: () => void;
163
183
  style: import("vue").ComputedRef<string> | undefined;
164
184
  init: () => import("vue").ComputedRef<string> | undefined;
165
185
  keydown: (key: string | number) => void;
186
+ validator: () => boolean;
187
+ doDelete: () => void;
166
188
  updateFraction: (value: number) => void;
167
189
  calculateFraction: () => void;
168
190
  setInputStatus: (valueRef: import("vue").Ref<string>, statusRef: import("vue").Ref<string>, isInteger?: boolean | undefined) => true | undefined;
@@ -235,6 +257,9 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
235
257
  defaultValue: {
236
258
  type: NumberConstructor;
237
259
  };
260
+ value: {
261
+ type: NumberConstructor;
262
+ };
238
263
  mode: {
239
264
  type: StringConstructor;
240
265
  };
@@ -282,6 +307,9 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
282
307
  defaultValue: {
283
308
  type: NumberConstructor;
284
309
  };
310
+ value: {
311
+ type: NumberConstructor;
312
+ };
285
313
  panel: {
286
314
  type: BooleanConstructor;
287
315
  default: boolean;
@@ -297,8 +325,8 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
297
325
  onChange?: ((...args: any[]) => any) | undefined;
298
326
  onKeydown?: ((...args: any[]) => any) | undefined;
299
327
  }, {
300
- drag: boolean;
301
328
  mode: "number" | "day" | "dose" | "english";
329
+ drag: boolean;
302
330
  positionInitialValue: import("@vueuse/core").Position;
303
331
  panel: boolean;
304
332
  moveOffset: import("@vueuse/core").Position;
@@ -19,6 +19,9 @@ declare const _default: import("vue").DefineComponent<{
19
19
  defaultValue: {
20
20
  type: NumberConstructor;
21
21
  };
22
+ value: {
23
+ type: NumberConstructor;
24
+ };
22
25
  panel: {
23
26
  type: BooleanConstructor;
24
27
  default: boolean;
@@ -54,6 +57,9 @@ declare const _default: import("vue").DefineComponent<{
54
57
  defaultValue: {
55
58
  type: NumberConstructor;
56
59
  };
60
+ value: {
61
+ type: NumberConstructor;
62
+ };
57
63
  panel: {
58
64
  type: BooleanConstructor;
59
65
  default: boolean;
@@ -71,6 +77,15 @@ declare const _default: import("vue").DefineComponent<{
71
77
  }>>;
72
78
  emit: (event: "change" | "keydown", ...args: any[]) => void;
73
79
  isDefault: import("vue").ComputedRef<boolean>;
80
+ moveNumberPaneOptions: import("vue").ComputedRef<{
81
+ mode: "number" | "day" | "dose" | "english";
82
+ defaultValue: number | undefined;
83
+ value: number | undefined;
84
+ positionInitialValue: Position;
85
+ moveOffset: Position;
86
+ drag: boolean;
87
+ onChange: (value: number) => void;
88
+ }>;
74
89
  englishKeys: import("vue").Ref<string[]>;
75
90
  popoverRef: import("vue").Ref<null>;
76
91
  englishKeyboardRef: import("vue").Ref<HTMLElement | null>;
@@ -79,7 +94,7 @@ declare const _default: import("vue").DefineComponent<{
79
94
  style: import("vue").ComputedRef<string> | undefined;
80
95
  init: () => import("vue").ComputedRef<string> | undefined;
81
96
  keydown: (key: string | number) => void;
82
- onchange: (value: number) => void;
97
+ onChange: (value: number) => void;
83
98
  NPopover: any;
84
99
  NInputNumber: any;
85
100
  NIcon: any;
@@ -91,6 +106,9 @@ declare const _default: import("vue").DefineComponent<{
91
106
  defaultValue: {
92
107
  type: NumberConstructor;
93
108
  };
109
+ value: {
110
+ type: NumberConstructor;
111
+ };
94
112
  mode: {
95
113
  type: StringConstructor;
96
114
  };
@@ -115,10 +133,15 @@ declare const _default: import("vue").DefineComponent<{
115
133
  }, {
116
134
  NUMBERKEYS: string;
117
135
  DAYS: number[];
136
+ DOSENUMBERKEYS: string;
137
+ CALCULATIONSYMBOLS: string[];
118
138
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
119
139
  defaultValue: {
120
140
  type: NumberConstructor;
121
141
  };
142
+ value: {
143
+ type: NumberConstructor;
144
+ };
122
145
  mode: {
123
146
  type: StringConstructor;
124
147
  };
@@ -147,7 +170,7 @@ declare const _default: import("vue").DefineComponent<{
147
170
  isNumber: import("vue").ComputedRef<boolean>;
148
171
  isDay: import("vue").ComputedRef<boolean>;
149
172
  isDose: import("vue").ComputedRef<boolean>;
150
- numberKeys: import("vue").Ref<string[]>;
173
+ numberKeys: import("vue").ComputedRef<string[]>;
151
174
  days: import("vue").Ref<number[]>;
152
175
  doses: import("vue").Ref<number[]>;
153
176
  inputValue: import("vue").Ref<string>;
@@ -158,12 +181,11 @@ declare const _default: import("vue").DefineComponent<{
158
181
  numeratorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
159
182
  denominatorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
160
183
  keyboardRef: import("vue").Ref<HTMLElement | null>;
161
- history: import("vue").Ref<import("@vueuse/core").UseRefHistoryRecord<string>[]>;
162
- undo: () => void;
163
- redo: () => void;
164
184
  style: import("vue").ComputedRef<string> | undefined;
165
185
  init: () => import("vue").ComputedRef<string> | undefined;
166
186
  keydown: (key: string | number) => void;
187
+ validator: () => boolean;
188
+ doDelete: () => void;
167
189
  updateFraction: (value: number) => void;
168
190
  calculateFraction: () => void;
169
191
  setInputStatus: (valueRef: import("vue").Ref<string>, statusRef: import("vue").Ref<string>, isInteger?: boolean | undefined) => true | undefined;
@@ -236,6 +258,9 @@ declare const _default: import("vue").DefineComponent<{
236
258
  defaultValue: {
237
259
  type: NumberConstructor;
238
260
  };
261
+ value: {
262
+ type: NumberConstructor;
263
+ };
239
264
  mode: {
240
265
  type: StringConstructor;
241
266
  };
@@ -283,6 +308,9 @@ declare const _default: import("vue").DefineComponent<{
283
308
  defaultValue: {
284
309
  type: NumberConstructor;
285
310
  };
311
+ value: {
312
+ type: NumberConstructor;
313
+ };
286
314
  panel: {
287
315
  type: BooleanConstructor;
288
316
  default: boolean;
@@ -298,8 +326,8 @@ declare const _default: import("vue").DefineComponent<{
298
326
  onChange?: ((...args: any[]) => any) | undefined;
299
327
  onKeydown?: ((...args: any[]) => any) | undefined;
300
328
  }, {
301
- drag: boolean;
302
329
  mode: "number" | "day" | "dose" | "english";
330
+ drag: boolean;
303
331
  positionInitialValue: Position;
304
332
  panel: boolean;
305
333
  moveOffset: Position;
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, ref, unref, openBlock, createBlock, withCtx, createVNode, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
1
+ import { defineComponent, computed, ref, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, mergeProps, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
2
2
  import { NPopover, NInputNumber, NSpace, NIcon } from 'naive-ui';
3
3
  import { Close, GitCompareOutline, ArrowUndoSharp } from '@vicons/ionicons5';
4
4
  import NumberPanel from './components/NumberPanel.vue.js';
@@ -15,6 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  drag: { type: Boolean, default: false },
16
16
  positionInitialValue: { type: Object, default: () => ({ x: 0, y: 0 }) },
17
17
  defaultValue: { type: Number },
18
+ value: { type: Number },
18
19
  panel: { type: Boolean, default: true },
19
20
  moveOffset: { type: Object, default: () => ({ x: 0, y: 0 }) }
20
21
  },
@@ -29,6 +30,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
30
  const ENGLISHKEYS = ENGLISHKEY.split("").concat(ENGLISHOTHERKEY);
30
31
  const ENGLISHKEYS_ = ENGLISHKEY.split(".")[0].split("").sort().concat(["."], ENGLISHOTHERKEY);
31
32
  const isDefault = computed(() => props.mode === "english");
33
+ const moveNumberPaneOptions = computed(() => {
34
+ return {
35
+ mode: props.mode,
36
+ defaultValue: props.defaultValue,
37
+ value: props.value,
38
+ positionInitialValue: props.positionInitialValue,
39
+ moveOffset: props.moveOffset,
40
+ drag: props.drag,
41
+ onChange
42
+ };
43
+ });
32
44
  const englishKeys = ref(ENGLISHKEYS.slice());
33
45
  const popoverRef = ref(null);
34
46
  const englishKeyboardRef = ref(null);
@@ -60,7 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
72
  englishKeys.value = englishKeys.value[0] === "Q" ? ENGLISHKEYS_.slice() : ENGLISHKEYS.slice();
61
73
  }
62
74
  }
63
- function onchange(value) {
75
+ function onChange(value) {
64
76
  var _a, _b;
65
77
  (_b = (_a = popoverRef.value) == null ? void 0 : _a.setShow) == null ? void 0 : _b.call(_a, false);
66
78
  currentValue.value = value;
@@ -88,19 +100,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
100
  createVNode(NumberPanel, {
89
101
  mode: __props.mode,
90
102
  defaultValue: __props.defaultValue,
91
- onChange: onchange
103
+ onChange
92
104
  }, null, 8, ["mode", "defaultValue"])
93
105
  ]),
94
106
  _: 1
95
- }, 512)) : !unref(isDefault) && __props.panel ? (openBlock(), createBlock(NumberPanel, {
96
- key: 1,
97
- mode: __props.mode,
98
- defaultValue: __props.defaultValue,
99
- positionInitialValue: __props.positionInitialValue,
100
- moveOffset: __props.moveOffset,
101
- drag: __props.drag,
102
- onChange: onchange
103
- }, null, 8, ["mode", "defaultValue", "positionInitialValue", "moveOffset", "drag"])) : (openBlock(), createElementBlock("div", {
107
+ }, 512)) : !unref(isDefault) && __props.panel ? (openBlock(), createBlock(NumberPanel, normalizeProps(mergeProps({ key: 1 }, unref(moveNumberPaneOptions))), null, 16)) : (openBlock(), createElementBlock("div", {
104
108
  key: 2,
105
109
  class: normalizeClass(["c-keyboard-english", { isFixed: __props.drag }]),
106
110
  ref_key: "englishKeyboardRef",
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  if (props.integer) {
24
24
  return /(^[1-9]\d*$)/.test(value) || !value;
25
25
  }
26
- return /^\d+\.?\d*$/.test(value) || !value;
26
+ return /^\d*(.\d+)?$/.test(value) || !value;
27
27
  }
28
28
  function calculate(type) {
29
29
  const value = getNumber(props.modelValue);
@@ -5,6 +5,9 @@ declare const _default: import("vue").DefineComponent<{
5
5
  defaultValue: {
6
6
  type: NumberConstructor;
7
7
  };
8
+ value: {
9
+ type: NumberConstructor;
10
+ };
8
11
  mode: {
9
12
  type: StringConstructor;
10
13
  };
@@ -29,10 +32,15 @@ declare const _default: import("vue").DefineComponent<{
29
32
  }, {
30
33
  NUMBERKEYS: string;
31
34
  DAYS: number[];
35
+ DOSENUMBERKEYS: string;
36
+ CALCULATIONSYMBOLS: string[];
32
37
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
33
38
  defaultValue: {
34
39
  type: NumberConstructor;
35
40
  };
41
+ value: {
42
+ type: NumberConstructor;
43
+ };
36
44
  mode: {
37
45
  type: StringConstructor;
38
46
  };
@@ -61,7 +69,7 @@ declare const _default: import("vue").DefineComponent<{
61
69
  isNumber: import("vue").ComputedRef<boolean>;
62
70
  isDay: import("vue").ComputedRef<boolean>;
63
71
  isDose: import("vue").ComputedRef<boolean>;
64
- numberKeys: Ref<string[]>;
72
+ numberKeys: import("vue").ComputedRef<string[]>;
65
73
  days: Ref<number[]>;
66
74
  doses: Ref<number[]>;
67
75
  inputValue: Ref<string>;
@@ -72,12 +80,11 @@ declare const _default: import("vue").DefineComponent<{
72
80
  numeratorValueStatus: Ref<FormValidationStatus>;
73
81
  denominatorValueStatus: Ref<FormValidationStatus>;
74
82
  keyboardRef: Ref<HTMLElement | null>;
75
- history: Ref<import("@vueuse/core").UseRefHistoryRecord<string>[]>;
76
- undo: () => void;
77
- redo: () => void;
78
83
  style: import("vue").ComputedRef<string> | undefined;
79
84
  init: () => import("vue").ComputedRef<string> | undefined;
80
85
  keydown: (key: string | number) => void;
86
+ validator: () => boolean;
87
+ doDelete: () => void;
81
88
  updateFraction: (value: number) => void;
82
89
  calculateFraction: () => void;
83
90
  setInputStatus: (valueRef: Ref<string>, statusRef: Ref<string>, isInteger?: boolean) => true | undefined;
@@ -150,6 +157,9 @@ declare const _default: import("vue").DefineComponent<{
150
157
  defaultValue: {
151
158
  type: NumberConstructor;
152
159
  };
160
+ value: {
161
+ type: NumberConstructor;
162
+ };
153
163
  mode: {
154
164
  type: StringConstructor;
155
165
  };