cnhis-design-vue 3.1.17-beta.0 → 3.1.17-beta.3

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 (79) hide show
  1. package/es/packages/big-table/src/components/separate.js +1 -1
  2. package/es/packages/big-table/src/hooks/useSeparateRow.js +2 -2
  3. package/es/packages/fabric-chart/index.d.ts +2 -0
  4. package/es/packages/fabric-chart/src/FabricChart.js +20 -5
  5. package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +2 -0
  6. package/es/packages/fabric-chart/src/hooks/useCenter.js +19 -18
  7. package/es/packages/fabric-chart/src/hooks/useLeft.d.ts +3 -1
  8. package/es/packages/fabric-chart/src/hooks/useLeft.js +30 -12
  9. package/es/packages/fabric-chart/src/hooks/useRight.d.ts +1 -1
  10. package/es/packages/fabric-chart/src/hooks/useRight.js +11 -69
  11. package/es/packages/fabric-chart/src/interface.d.ts +3 -0
  12. package/es/packages/form-config/index.d.ts +115 -1
  13. package/es/packages/form-config/src/FormConfig.js +11 -17
  14. package/es/packages/form-config/src/FormConfig.vue.d.ts +115 -1
  15. package/es/packages/form-config/src/components/CloseButton.js +45 -0
  16. package/es/packages/form-config/src/components/CloseButton.vue.d.ts +1499 -0
  17. package/es/packages/form-config/src/components/ComplexNode.js +45 -0
  18. package/es/packages/form-config/src/components/ComplexNode.vue.d.ts +1661 -0
  19. package/es/packages/form-config/src/components/DefaultNode.js +54 -0
  20. package/es/packages/form-config/src/components/DefaultNode.vue.d.ts +1543 -0
  21. package/es/packages/form-config/src/components/FormConfigCreator.js +3 -1
  22. package/es/packages/form-config/src/components/FormConfigDragDisplay.js +43 -0
  23. package/es/packages/form-config/src/components/FormConfigDragDisplay.vue.d.ts +114 -0
  24. package/es/packages/form-config/src/components/FormConfigEdit.js +1 -0
  25. package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +2 -0
  26. package/es/packages/form-config/src/constants/index.d.ts +2 -0
  27. package/es/packages/form-config/src/constants/index.js +5 -2
  28. package/es/packages/form-config/src/hooks/useConfigurationField.js +9 -9
  29. package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -2
  30. package/es/packages/form-config/src/hooks/usePresetRenderer.js +6 -84
  31. package/es/packages/form-config/src/hooks/useSortable.js +3 -7
  32. package/es/packages/form-config/src/types/index.d.ts +2 -1
  33. package/es/packages/form-config/src/utils/index.d.ts +8 -1
  34. package/es/packages/form-config/src/utils/index.js +23 -9
  35. package/es/packages/form-config/style/index.css +26 -5
  36. package/es/packages/form-render/index.js +1 -1
  37. package/es/packages/form-render/src/hooks/index.d.ts +1 -1
  38. package/es/packages/form-render/src/hooks/index.js +1 -1
  39. package/es/packages/form-render/src/hooks/useBusinessBinding.d.ts +5 -6
  40. package/es/packages/form-render/src/hooks/useBusinessBinding.js +22 -20
  41. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +4 -4
  42. package/es/packages/form-render/src/hooks/useFieldNormalize.d.ts +5 -0
  43. package/es/packages/form-render/src/hooks/useFieldNormalize.js +58 -0
  44. package/es/packages/form-render/src/hooks/useFieldVisitor.js +1 -5
  45. package/es/packages/index.css +26 -5
  46. package/es/packages/index.js +1 -1
  47. package/es/src/utils/tapable/AsyncParallelBailHook.d.ts +3 -0
  48. package/es/src/utils/tapable/AsyncParallelBailHook.js +78 -0
  49. package/es/src/utils/tapable/AsyncParallelHook.d.ts +3 -0
  50. package/es/src/utils/tapable/AsyncParallelHook.js +27 -0
  51. package/es/src/utils/tapable/AsyncSeriesBailHook.d.ts +3 -0
  52. package/es/src/utils/tapable/AsyncSeriesBailHook.js +33 -0
  53. package/es/src/utils/tapable/AsyncSeriesHook.d.ts +3 -0
  54. package/es/src/utils/tapable/AsyncSeriesHook.js +27 -0
  55. package/es/src/utils/tapable/AsyncSeriesLoopHook.d.ts +3 -0
  56. package/es/src/utils/tapable/AsyncSeriesLoopHook.js +27 -0
  57. package/es/src/utils/tapable/AsyncSeriesWaterfallHook.d.ts +3 -0
  58. package/es/src/utils/tapable/AsyncSeriesWaterfallHook.js +40 -0
  59. package/es/src/utils/tapable/Hook.d.ts +50 -0
  60. package/es/src/utils/tapable/Hook.js +140 -0
  61. package/es/src/utils/tapable/HookCodeFactory.d.ts +58 -0
  62. package/es/src/utils/tapable/HookCodeFactory.js +444 -0
  63. package/es/src/utils/tapable/HookMap.d.ts +11 -0
  64. package/es/src/utils/tapable/HookMap.js +32 -0
  65. package/es/src/utils/tapable/MultiHook.d.ts +12 -0
  66. package/es/src/utils/tapable/MultiHook.js +38 -0
  67. package/es/src/utils/tapable/SyncBailHook.d.ts +3 -0
  68. package/es/src/utils/tapable/SyncBailHook.js +40 -0
  69. package/es/src/utils/tapable/SyncHook.d.ts +3 -0
  70. package/es/src/utils/tapable/SyncHook.js +34 -0
  71. package/es/src/utils/tapable/SyncLoopHook.d.ts +3 -0
  72. package/es/src/utils/tapable/SyncLoopHook.js +34 -0
  73. package/es/src/utils/tapable/SyncWaterfallHook.d.ts +3 -0
  74. package/es/src/utils/tapable/SyncWaterfallHook.js +48 -0
  75. package/es/src/utils/tapable/index.d.ts +139 -0
  76. package/es/src/utils/tapable/index.js +12 -0
  77. package/package.json +1 -1
  78. package/es/packages/form-render/src/hooks/useTypeNormalize.d.ts +0 -4
  79. package/es/packages/form-render/src/hooks/useTypeNormalize.js +0 -46
@@ -0,0 +1,54 @@
1
+ import { defineComponent, inject, computed, resolveComponent, openBlock, createElementBlock, mergeProps, unref, withModifiers, createVNode, normalizeClass, withCtx, createTextVNode, toDisplayString } from 'vue';
2
+ import { InjectionActiveFieldItem, WidgetTextMap } from '../../../../packages/form-config/src/constants';
3
+ import { bindHover } from '../../../../packages/form-config/src/utils';
4
+ import CloseButton from '../../../../packages/form-config/src/components/CloseButton';
5
+ import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
6
+
7
+ const _hoisted_1 = ["onClick"];
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "DefaultNode",
10
+ props: {
11
+ fieldItem: { type: Object, required: true },
12
+ textFormatter: { type: Function, required: true }
13
+ },
14
+ setup(__props) {
15
+ const props = __props;
16
+ const currentActiveEditField = inject(InjectionActiveFieldItem);
17
+ function active() {
18
+ currentActiveEditField.value = props.fieldItem;
19
+ }
20
+ const classList = computed(() => {
21
+ return [{ "is-active": currentActiveEditField.value === props.fieldItem }, "form-config__renderer"];
22
+ });
23
+ const ellipsisClassList = computed(() => {
24
+ return [
25
+ "form-config__renderer--default",
26
+ { "is-required": props.fieldItem.required, "is-disabled": props.fieldItem.editable === false }
27
+ ];
28
+ });
29
+ function getDisplayText() {
30
+ const type = WidgetTextMap.get(props.fieldItem.type);
31
+ return props.textFormatter(props.fieldItem, `${props.fieldItem.name}${type ? `(${type})` : ""}`);
32
+ }
33
+ return (_ctx, _cache) => {
34
+ const _component_n_ellipsis = resolveComponent("n-ellipsis");
35
+ return openBlock(), createElementBlock("section", mergeProps(unref(bindHover)(__props.fieldItem), {
36
+ onClick: withModifiers(active, ["stop"]),
37
+ class: unref(classList)
38
+ }), [
39
+ createVNode(_component_n_ellipsis, {
40
+ class: normalizeClass(unref(ellipsisClassList))
41
+ }, {
42
+ default: withCtx(() => [
43
+ createTextVNode(toDisplayString(getDisplayText()), 1)
44
+ ]),
45
+ _: 1
46
+ }, 8, ["class"]),
47
+ createVNode(CloseButton, { "field-item": __props.fieldItem }, null, 8, ["field-item"])
48
+ ], 16, _hoisted_1);
49
+ };
50
+ }
51
+ });
52
+ var DefaultNode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "DefaultNode.vue"]]);
53
+
54
+ export { DefaultNode as default };