cnhis-design-vue 3.1.16-beta.8 → 3.1.17-beta.0
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/index.d.ts +1 -1
- package/es/packages/big-table/src/BigTable.vue.d.ts +3 -19
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/packages/big-table/src/components/edit-form/edit-date.js +13 -3
- package/es/packages/big-table/src/components/edit-form/edit-time.js +1 -0
- package/es/packages/big-table/src/hooks/useAnchor.d.ts +1 -1
- package/es/packages/big-table/src/hooks/useAnchor.js +20 -12
- package/es/packages/big-table/src/hooks/useSeparateRow.js +5 -2
- package/es/packages/button-print/index.d.ts +4 -1
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +4 -1
- package/es/packages/button-print/src/components/IdentityVerification.js +5 -7
- package/es/packages/button-print/src/components/IdentityVerification.vue.d.ts +4 -1
- package/es/packages/fabric-chart/src/FabricChart.js +1 -1
- package/es/packages/fabric-chart/src/components/PopupTip.js +2 -2
- package/es/packages/fabric-chart/src/hooks/constant.js +1 -1
- package/es/packages/fabric-chart/src/hooks/useCenter.js +11 -2
- package/es/packages/fabric-chart/src/hooks/useOther.js +63 -13
- package/es/packages/form-config/index.d.ts +90 -3338
- package/es/packages/form-config/src/FormConfig.js +42 -34
- package/es/packages/form-config/src/FormConfig.vue.d.ts +134 -3382
- package/es/packages/form-config/src/components/FormConfigCreator.js +13 -11
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +16 -11
- package/es/packages/form-config/src/components/FormConfigEdit.js +1 -1
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +60 -29
- package/es/packages/form-config/src/constants/index.d.ts +21 -21
- package/es/packages/form-config/src/constants/index.js +27 -36
- package/es/packages/form-config/src/hooks/useConfigurationField.d.ts +2 -1
- package/es/packages/form-config/src/hooks/useConfigurationField.js +28 -42
- package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -3
- package/es/packages/form-config/src/hooks/usePresetRenderer.js +16 -19
- package/es/packages/form-config/src/hooks/useSortable.js +1 -1
- package/es/packages/form-config/src/types/index.d.ts +22 -4
- package/es/packages/form-config/src/utils/index.d.ts +2 -0
- package/es/packages/form-config/src/utils/index.js +15 -0
- package/es/packages/form-config/style/index.css +27 -3
- package/es/packages/form-render/index.d.ts +6 -4
- package/es/packages/form-render/index.js +0 -1
- package/es/packages/form-render/src/FormRender.js +8 -9
- package/es/packages/form-render/src/FormRender.vue.d.ts +6 -4
- package/es/packages/form-render/src/components/renderer/{combination/index.d.ts → combination.d.ts} +3 -3
- package/es/packages/form-render/src/components/renderer/combination.js +92 -0
- package/es/packages/form-render/src/components/renderer/date.js +12 -4
- package/es/packages/form-render/src/components/renderer/formItem.js +12 -5
- package/es/packages/form-render/src/components/renderer/index.d.ts +1 -0
- package/es/packages/form-render/src/components/renderer/index.js +2 -1
- package/es/packages/form-render/src/components/renderer/inputGroup.js +1 -1
- package/es/packages/form-render/src/components/renderer/{combination → jsonCombination}/hooks/useDeepValidate.d.ts +0 -0
- package/es/packages/form-render/src/components/renderer/{combination → jsonCombination}/hooks/useDeepValidate.js +0 -0
- package/es/packages/form-render/src/components/renderer/jsonCombination/index.d.ts +44 -0
- package/es/packages/form-render/src/components/renderer/{combination → jsonCombination}/index.js +29 -14
- package/es/packages/form-render/src/components/renderer/select.js +11 -8
- package/es/packages/form-render/src/constants/index.d.ts +2 -2
- package/es/packages/form-render/src/hooks/index.d.ts +0 -1
- package/es/packages/form-render/src/hooks/index.js +0 -1
- package/es/packages/form-render/src/hooks/useAnchor.d.ts +3 -3
- package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +2 -2
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +12 -5
- package/es/packages/form-render/src/hooks/useFieldVisitor.js +6 -5
- package/es/packages/form-render/src/hooks/useFormRenderLifeCycle.d.ts +4 -4
- package/es/packages/form-render/src/hooks/useFormRequest.d.ts +2 -2
- package/es/packages/form-render/src/hooks/useTypeNormalize.js +2 -1
- package/es/packages/form-render/src/types/fieldItem.d.ts +4 -0
- package/es/packages/form-render/src/types/index.d.ts +4 -4
- package/es/packages/form-render/src/utils/dom.d.ts +2 -2
- package/es/packages/form-render/src/utils/index.js +3 -2
- package/es/packages/form-render/src/utils/schema.d.ts +62 -2
- package/es/packages/form-render/src/utils/schema.js +5 -2
- package/es/packages/form-render/style/index.css +11 -8
- package/es/packages/index.css +38 -11
- package/es/packages/index.js +0 -1
- package/es/packages/shortcut-provider/src/hooks/useShortcuts.js +1 -0
- package/es/packages/shortcut-setter/index.d.ts +7 -4
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +7 -4
- package/es/src/types/index.d.ts +2 -2
- package/es/src/utils/index.d.ts +1 -0
- package/es/src/utils/index.js +11 -1
- package/global.d.ts +8 -8
- package/package.json +4 -4
- package/es/packages/form-render/src/hooks/useInitialData.d.ts +0 -5
- package/es/packages/form-render/src/hooks/useInitialData.js +0 -16
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { defineComponent, ref, provide, toRaw, openBlock, createElementBlock, createElementVNode, createVNode, unref, mergeProps, withCtx,
|
|
2
|
-
import SlotRender from '../../../src/components/SlotRender';
|
|
1
|
+
import { defineComponent, ref, provide, toRaw, openBlock, createElementBlock, normalizeStyle, createElementVNode, createVNode, unref, mergeProps, withCtx, toDisplayString, createBlock, resolveDynamicComponent, createTextVNode } from 'vue';
|
|
3
2
|
import { cloneDeep, isFunction } from 'lodash-es';
|
|
4
3
|
import Draggable from 'vuedraggable';
|
|
4
|
+
import { layoutWidthEnum2Column } from '../../../packages/form-config/src/utils';
|
|
5
5
|
import FormConfigEdit from './components/FormConfigEdit.js';
|
|
6
6
|
import FormConfigCreator from './components/FormConfigCreator.js';
|
|
7
7
|
import { InjectionActiveFieldItem } from '../../../packages/form-config/src/constants';
|
|
8
8
|
import { useSortable, usePresetRenderer } from '../../../packages/form-config/src/hooks';
|
|
9
9
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
10
10
|
|
|
11
|
-
const _hoisted_1 = { class: "form-
|
|
12
|
-
const _hoisted_2 = { class: "form-
|
|
13
|
-
const _hoisted_3 =
|
|
14
|
-
const _hoisted_4 = { class: "form-
|
|
15
|
-
const _hoisted_5 =
|
|
16
|
-
const _hoisted_6 =
|
|
17
|
-
const _hoisted_7 = { class: "form-
|
|
18
|
-
const _hoisted_8 =
|
|
11
|
+
const _hoisted_1 = { class: "form-config__material" };
|
|
12
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("header", { class: "form-config__materialHeader" }, "\u7269\u6599\u533A", -1);
|
|
13
|
+
const _hoisted_3 = { class: "form-config__displayWrapper" };
|
|
14
|
+
const _hoisted_4 = { class: "form-config__displayHeader" };
|
|
15
|
+
const _hoisted_5 = /* @__PURE__ */ createTextVNode(" \u5E03\u5C40\u533A ");
|
|
16
|
+
const _hoisted_6 = { class: "form-config__config" };
|
|
17
|
+
const _hoisted_7 = /* @__PURE__ */ createElementVNode("header", { class: "form-config__configHeader" }, "\u914D\u7F6E\u533A", -1);
|
|
18
|
+
const _hoisted_8 = { class: "form-config__configContent" };
|
|
19
19
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
20
|
__name: "FormConfig",
|
|
21
21
|
props: {
|
|
22
|
+
maxHeight: { type: String },
|
|
22
23
|
textFormatter: { type: Function }
|
|
23
24
|
},
|
|
24
25
|
setup(__props, { expose }) {
|
|
@@ -27,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
28
|
const fieldListRef = ref([]);
|
|
28
29
|
const materialListRef = ref([]);
|
|
29
30
|
function addItem(fieldItem) {
|
|
30
|
-
if (fieldListRef.value.some((field) => field.
|
|
31
|
+
if (fieldListRef.value.some((field) => field.key === fieldItem.key))
|
|
31
32
|
return;
|
|
32
33
|
fieldListRef.value.push(fieldItem);
|
|
33
34
|
}
|
|
@@ -41,9 +42,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
42
|
provide(InjectionActiveFieldItem, currentEditField);
|
|
42
43
|
const formConfigEditRef = ref();
|
|
43
44
|
expose({
|
|
44
|
-
loadData({ fieldList
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
loadData({ fieldList }) {
|
|
46
|
+
let _fieldList = [], _materialList = [];
|
|
47
|
+
fieldList.forEach(classification);
|
|
48
|
+
fieldListRef.value = _fieldList;
|
|
49
|
+
materialListRef.value = _materialList;
|
|
50
|
+
function classification(item) {
|
|
51
|
+
item.show === false ? _materialList.push(cloneDeep(toRaw(item))) : _fieldList.push(cloneDeep(toRaw(item)));
|
|
52
|
+
}
|
|
47
53
|
},
|
|
48
54
|
validate() {
|
|
49
55
|
var _a;
|
|
@@ -54,9 +60,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
60
|
}
|
|
55
61
|
});
|
|
56
62
|
return (_ctx, _cache) => {
|
|
57
|
-
return openBlock(), createElementBlock("section",
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
return openBlock(), createElementBlock("section", {
|
|
64
|
+
class: "form-config",
|
|
65
|
+
style: normalizeStyle({ "--max-height": __props.maxHeight })
|
|
66
|
+
}, [
|
|
67
|
+
createElementVNode("section", _hoisted_1, [
|
|
68
|
+
_hoisted_2,
|
|
60
69
|
createVNode(unref(Draggable), mergeProps(unref(commonConfig), {
|
|
61
70
|
class: "form-config__materialContent",
|
|
62
71
|
group: "__display",
|
|
@@ -65,16 +74,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
74
|
}), {
|
|
66
75
|
item: withCtx(({ element }) => [
|
|
67
76
|
createElementVNode("div", {
|
|
68
|
-
style: normalizeStyle({ "--item-column": element.
|
|
77
|
+
style: normalizeStyle({ "--item-column": unref(layoutWidthEnum2Column)(element.layoutWidthEnum) }),
|
|
69
78
|
class: "form-config__materialContentItem"
|
|
70
|
-
}, toDisplayString(element.
|
|
79
|
+
}, toDisplayString(element.name), 5)
|
|
71
80
|
]),
|
|
72
81
|
_: 1
|
|
73
82
|
}, 16, ["modelValue"])
|
|
74
83
|
]),
|
|
75
|
-
createElementVNode("section",
|
|
76
|
-
createElementVNode("header",
|
|
77
|
-
|
|
84
|
+
createElementVNode("section", _hoisted_3, [
|
|
85
|
+
createElementVNode("header", _hoisted_4, [
|
|
86
|
+
_hoisted_5,
|
|
78
87
|
createVNode(FormConfigCreator, { onSubmit: addItem })
|
|
79
88
|
]),
|
|
80
89
|
createVNode(unref(Draggable), mergeProps(unref(commonConfig), {
|
|
@@ -86,25 +95,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
86
95
|
item: withCtx(({ element }) => [
|
|
87
96
|
createElementVNode("section", {
|
|
88
97
|
class: "form-config__displayContentItem",
|
|
89
|
-
style: normalizeStyle({ "--item-column": element.
|
|
98
|
+
style: normalizeStyle({ "--item-column": unref(layoutWidthEnum2Column)(element.layoutWidthEnum) })
|
|
90
99
|
}, [
|
|
91
|
-
|
|
92
|
-
renderer: unref(getRenderer)(element),
|
|
93
|
-
fieldItem: element
|
|
94
|
-
}, null, 8, ["renderer", "fieldItem"])
|
|
100
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(getRenderer)(element)), { fieldItem: element }, null, 8, ["fieldItem"]))
|
|
95
101
|
], 4)
|
|
96
102
|
]),
|
|
97
103
|
_: 1
|
|
98
104
|
}, 16, ["modelValue"])
|
|
99
105
|
]),
|
|
100
|
-
createElementVNode("section",
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
createElementVNode("section", _hoisted_6, [
|
|
107
|
+
_hoisted_7,
|
|
108
|
+
createElementVNode("section", _hoisted_8, [
|
|
109
|
+
createVNode(FormConfigEdit, {
|
|
110
|
+
ref_key: "formConfigEditRef",
|
|
111
|
+
ref: formConfigEditRef
|
|
112
|
+
}, null, 512)
|
|
113
|
+
])
|
|
106
114
|
])
|
|
107
|
-
]);
|
|
115
|
+
], 4);
|
|
108
116
|
};
|
|
109
117
|
}
|
|
110
118
|
});
|