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,5 +1,6 @@
1
1
  import { ref, render, createVNode, withCtx, nextTick, defineComponent, provide } from 'vue';
2
2
  import IdentityVerification from '../components/IdentityVerification.js';
3
+ import Preview from '../components/Preview.js';
3
4
 
4
5
  class IdentityVerificationDialog {
5
6
  constructor() {
@@ -15,7 +16,7 @@ class IdentityVerificationDialog {
15
16
  this.rendered = true;
16
17
  const container = document.createElement("div");
17
18
  const visible = ref(false);
18
- const ProviderWrapper = this.createProviderWrapper(instance);
19
+ const ProviderWrapper = createProviderWrapper(instance);
19
20
  render(createVNode(ProviderWrapper, null, {
20
21
  default: withCtx(() => createVNode(IdentityVerification, {
21
22
  "to": container,
@@ -51,29 +52,70 @@ class IdentityVerificationDialog {
51
52
  }
52
53
  });
53
54
  }
54
- createProviderWrapper(instance) {
55
- return defineComponent({
56
- setup(_, {
57
- slots
58
- }) {
59
- let provides = (instance == null ? void 0 : instance.parent) && Reflect.get(instance.parent, "provides");
60
- const keys = [];
61
- while (provides) {
62
- Object.entries(provides).forEach(([k, v]) => {
63
- if (keys.includes(k))
64
- return;
65
- keys.push(k);
66
- provide(k, v);
67
- });
68
- provides = Object.getPrototypeOf(provides);
69
- }
70
- return () => {
71
- var _a;
72
- return createVNode("div", null, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
73
- };
55
+ }
56
+ class PreviewDialog {
57
+ constructor() {
58
+ this.rendered = false;
59
+ }
60
+ static createMsg(message) {
61
+ return `[PreviewDialog] ${message}`;
62
+ }
63
+ show(instance, src) {
64
+ if (this.rendered)
65
+ return Promise.reject(PreviewDialog.createMsg("\u8BF7\u52FF\u91CD\u590D\u6253\u5F00\u5F39\u7A97"));
66
+ return new Promise((resolve, reject) => {
67
+ this.rendered = true;
68
+ const container = document.createElement("div");
69
+ const visible = ref(false);
70
+ const ProviderWrapper = createProviderWrapper(instance);
71
+ render(createVNode(ProviderWrapper, null, {
72
+ default: withCtx(() => createVNode(Preview, {
73
+ "visible": visible.value,
74
+ "onUpdate:visible": ($event) => visible.value = $event,
75
+ "src": src,
76
+ "onAfterLeave": () => unmount(container)
77
+ }, null), instance)
78
+ }), container);
79
+ mount(container);
80
+ nextTick(() => {
81
+ visible.value = true;
82
+ resolve("success");
83
+ });
84
+ function mount(target) {
85
+ document.body.appendChild(target);
86
+ }
87
+ const that = this;
88
+ function unmount(target) {
89
+ if (!target.parentElement)
90
+ return;
91
+ that.rendered = false;
92
+ target.parentElement.removeChild(target);
74
93
  }
75
94
  });
76
95
  }
77
96
  }
97
+ function createProviderWrapper(instance) {
98
+ return defineComponent({
99
+ setup(_, {
100
+ slots
101
+ }) {
102
+ let provides = (instance == null ? void 0 : instance.parent) && Reflect.get(instance.parent, "provides");
103
+ const keys = [];
104
+ while (provides) {
105
+ Object.entries(provides).forEach(([k, v]) => {
106
+ if (keys.includes(k))
107
+ return;
108
+ keys.push(k);
109
+ provide(k, v);
110
+ });
111
+ provides = Object.getPrototypeOf(provides);
112
+ }
113
+ return () => {
114
+ var _a;
115
+ return createVNode("div", null, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
116
+ };
117
+ }
118
+ });
119
+ }
78
120
 
79
- export { IdentityVerificationDialog };
121
+ export { IdentityVerificationDialog, PreviewDialog };
@@ -1,9 +1,11 @@
1
1
  import { AnyObject, Func } from '../../../../../es/shared/types';
2
- import { IdentityVerificationDialog } from '../../../../../es/components/button-print/src/utils/dialog';
2
+ import { IdentityVerificationDialog, PreviewDialog } from '../../../../../es/components/button-print/src/utils/dialog';
3
3
  export declare class Print {
4
4
  private readonly webview;
5
5
  private currentMessageHandler?;
6
6
  private dialog;
7
+ private dialogPreview;
8
+ private instance;
7
9
  constructor();
8
10
  private readonly messageHandlerQueue;
9
11
  private messageHandler;
@@ -13,6 +15,7 @@ export declare class Print {
13
15
  * @desc 调用实例方法打开弹窗
14
16
  */
15
17
  show(...args: Parameters<IdentityVerificationDialog['show']>): Promise<string>;
18
+ showPreview(...args: Parameters<PreviewDialog['show']>): Promise<string>;
16
19
  _testConnection(): Promise<unknown>;
17
20
  _queryServicesPrint(params: AnyObject): Promise<any>;
18
21
  _callPrintWithFile(queryParams: AnyObject): Promise<any>;
@@ -1,7 +1,8 @@
1
1
  import axios from 'axios';
2
2
  import { isArray } from 'lodash-es';
3
- import { IdentityVerificationDialog } from './dialog.js';
3
+ import { IdentityVerificationDialog, PreviewDialog } from './dialog.js';
4
4
  import { isIReport, useBrowserPrint } from './browserPrint.js';
5
+ import { getCurrentInstance } from 'vue';
5
6
 
6
7
  const PRINT_ORIGIN = "http://127.0.0.1:11111";
7
8
  const EDIT_LOCAL_URL = `${PRINT_ORIGIN}/services/print`;
@@ -24,6 +25,8 @@ const ERRORMSG = "\u83B7\u53D6\u6587\u4EF6\u5931\u8D25\uFF01";
24
25
  class Print {
25
26
  constructor() {
26
27
  this.dialog = new IdentityVerificationDialog();
28
+ this.dialogPreview = new PreviewDialog();
29
+ this.instance = null;
27
30
  this.messageHandlerQueue = [];
28
31
  var _a;
29
32
  const _window = window;
@@ -62,6 +65,9 @@ class Print {
62
65
  show(...args) {
63
66
  return this.dialog.show(...args);
64
67
  }
68
+ showPreview(...args) {
69
+ return this.dialogPreview.show(...args);
70
+ }
65
71
  _testConnection() {
66
72
  if (this.webview)
67
73
  return Promise.resolve(true);
@@ -244,7 +250,10 @@ class Print {
244
250
  const data = await this._queryPrintFile(formatId, params);
245
251
  if (!data)
246
252
  return errorCallbackFn == null ? void 0 : errorCallbackFn(ERRORMSG);
247
- useBrowserPrint(data, "preview");
253
+ const src = useBrowserPrint(data, "preview");
254
+ if (!this.instance)
255
+ this.instance = getCurrentInstance();
256
+ this.showPreview(this.instance, src);
248
257
  successCallbackFn == null ? void 0 : successCallbackFn({ file: data });
249
258
  return;
250
259
  }
@@ -1 +1 @@
1
- .dropdown-button{border-color:#d5d5d5!important;color:#212121}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}
1
+ .dropdown-button{border-color:#d5d5d5!important;color:#212121}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.c-button-preview-modal{max-width:none}.c-button-preview-modal .n-dialog__content{height:98%}