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.
- package/es/packages/big-table/src/components/separate.js +1 -1
- package/es/packages/big-table/src/hooks/useSeparateRow.js +2 -2
- package/es/packages/fabric-chart/index.d.ts +2 -0
- package/es/packages/fabric-chart/src/FabricChart.js +20 -5
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +2 -0
- package/es/packages/fabric-chart/src/hooks/useCenter.js +19 -18
- package/es/packages/fabric-chart/src/hooks/useLeft.d.ts +3 -1
- package/es/packages/fabric-chart/src/hooks/useLeft.js +30 -12
- package/es/packages/fabric-chart/src/hooks/useRight.d.ts +1 -1
- package/es/packages/fabric-chart/src/hooks/useRight.js +11 -69
- package/es/packages/fabric-chart/src/interface.d.ts +3 -0
- package/es/packages/form-config/index.d.ts +115 -1
- package/es/packages/form-config/src/FormConfig.js +11 -17
- package/es/packages/form-config/src/FormConfig.vue.d.ts +115 -1
- package/es/packages/form-config/src/components/CloseButton.js +45 -0
- package/es/packages/form-config/src/components/CloseButton.vue.d.ts +1499 -0
- package/es/packages/form-config/src/components/ComplexNode.js +45 -0
- package/es/packages/form-config/src/components/ComplexNode.vue.d.ts +1661 -0
- package/es/packages/form-config/src/components/DefaultNode.js +54 -0
- package/es/packages/form-config/src/components/DefaultNode.vue.d.ts +1543 -0
- package/es/packages/form-config/src/components/FormConfigCreator.js +3 -1
- package/es/packages/form-config/src/components/FormConfigDragDisplay.js +43 -0
- package/es/packages/form-config/src/components/FormConfigDragDisplay.vue.d.ts +114 -0
- package/es/packages/form-config/src/components/FormConfigEdit.js +1 -0
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +2 -0
- package/es/packages/form-config/src/constants/index.d.ts +2 -0
- package/es/packages/form-config/src/constants/index.js +5 -2
- package/es/packages/form-config/src/hooks/useConfigurationField.js +9 -9
- package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -2
- package/es/packages/form-config/src/hooks/usePresetRenderer.js +6 -84
- package/es/packages/form-config/src/hooks/useSortable.js +3 -7
- package/es/packages/form-config/src/types/index.d.ts +2 -1
- package/es/packages/form-config/src/utils/index.d.ts +8 -1
- package/es/packages/form-config/src/utils/index.js +23 -9
- package/es/packages/form-config/style/index.css +26 -5
- package/es/packages/form-render/index.js +1 -1
- package/es/packages/form-render/src/hooks/index.d.ts +1 -1
- package/es/packages/form-render/src/hooks/index.js +1 -1
- package/es/packages/form-render/src/hooks/useBusinessBinding.d.ts +5 -6
- package/es/packages/form-render/src/hooks/useBusinessBinding.js +22 -20
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +4 -4
- package/es/packages/form-render/src/hooks/useFieldNormalize.d.ts +5 -0
- package/es/packages/form-render/src/hooks/useFieldNormalize.js +58 -0
- package/es/packages/form-render/src/hooks/useFieldVisitor.js +1 -5
- package/es/packages/index.css +26 -5
- package/es/packages/index.js +1 -1
- package/es/src/utils/tapable/AsyncParallelBailHook.d.ts +3 -0
- package/es/src/utils/tapable/AsyncParallelBailHook.js +78 -0
- package/es/src/utils/tapable/AsyncParallelHook.d.ts +3 -0
- package/es/src/utils/tapable/AsyncParallelHook.js +27 -0
- package/es/src/utils/tapable/AsyncSeriesBailHook.d.ts +3 -0
- package/es/src/utils/tapable/AsyncSeriesBailHook.js +33 -0
- package/es/src/utils/tapable/AsyncSeriesHook.d.ts +3 -0
- package/es/src/utils/tapable/AsyncSeriesHook.js +27 -0
- package/es/src/utils/tapable/AsyncSeriesLoopHook.d.ts +3 -0
- package/es/src/utils/tapable/AsyncSeriesLoopHook.js +27 -0
- package/es/src/utils/tapable/AsyncSeriesWaterfallHook.d.ts +3 -0
- package/es/src/utils/tapable/AsyncSeriesWaterfallHook.js +40 -0
- package/es/src/utils/tapable/Hook.d.ts +50 -0
- package/es/src/utils/tapable/Hook.js +140 -0
- package/es/src/utils/tapable/HookCodeFactory.d.ts +58 -0
- package/es/src/utils/tapable/HookCodeFactory.js +444 -0
- package/es/src/utils/tapable/HookMap.d.ts +11 -0
- package/es/src/utils/tapable/HookMap.js +32 -0
- package/es/src/utils/tapable/MultiHook.d.ts +12 -0
- package/es/src/utils/tapable/MultiHook.js +38 -0
- package/es/src/utils/tapable/SyncBailHook.d.ts +3 -0
- package/es/src/utils/tapable/SyncBailHook.js +40 -0
- package/es/src/utils/tapable/SyncHook.d.ts +3 -0
- package/es/src/utils/tapable/SyncHook.js +34 -0
- package/es/src/utils/tapable/SyncLoopHook.d.ts +3 -0
- package/es/src/utils/tapable/SyncLoopHook.js +34 -0
- package/es/src/utils/tapable/SyncWaterfallHook.d.ts +3 -0
- package/es/src/utils/tapable/SyncWaterfallHook.js +48 -0
- package/es/src/utils/tapable/index.d.ts +139 -0
- package/es/src/utils/tapable/index.js +12 -0
- package/package.json +1 -1
- package/es/packages/form-render/src/hooks/useTypeNormalize.d.ts +0 -4
- 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 };
|