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
|
@@ -44,6 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
notes?: string | undefined;
|
|
45
45
|
desc?: string | undefined;
|
|
46
46
|
children?: any[] | undefined;
|
|
47
|
+
__new?: boolean | undefined;
|
|
47
48
|
}[]>;
|
|
48
49
|
materialListRef: import("vue").Ref<{
|
|
49
50
|
key: string;
|
|
@@ -59,9 +60,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
60
|
notes?: string | undefined;
|
|
60
61
|
desc?: string | undefined;
|
|
61
62
|
children?: any[] | undefined;
|
|
63
|
+
__new?: boolean | undefined;
|
|
62
64
|
}[]>;
|
|
63
65
|
addItem: (fieldItem: FormConfigItem) => void;
|
|
64
|
-
|
|
66
|
+
parsedTextFormatter: FormConfigTextFormatter;
|
|
65
67
|
getRenderer: (fieldItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
66
68
|
currentEditField: import("vue").Ref<FormConfigItem | undefined>;
|
|
67
69
|
formConfigEditRef: import("vue").Ref<{
|
|
@@ -140,6 +142,116 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
140
142
|
modelValue: unknown[];
|
|
141
143
|
componentData: Record<string, any>;
|
|
142
144
|
}>;
|
|
145
|
+
FormConfigDragDisplay: import("vue").DefineComponent<{
|
|
146
|
+
fieldItem: {
|
|
147
|
+
type: PropType<FormConfigItem>;
|
|
148
|
+
};
|
|
149
|
+
getRenderer: {
|
|
150
|
+
type: Func<any[], any>;
|
|
151
|
+
require: boolean;
|
|
152
|
+
};
|
|
153
|
+
textFormatter: {
|
|
154
|
+
type: PropType<FormConfigTextFormatter>;
|
|
155
|
+
required: true;
|
|
156
|
+
};
|
|
157
|
+
}, {
|
|
158
|
+
getItemColumnStyle: (fieldItem?: FormConfigItem | undefined) => {
|
|
159
|
+
'--item-column': number;
|
|
160
|
+
};
|
|
161
|
+
commonConfig: {
|
|
162
|
+
onMove: ({ to, from }: import("sortablejs").SortableEvent) => void;
|
|
163
|
+
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
164
|
+
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
165
|
+
tag: string;
|
|
166
|
+
animation: string;
|
|
167
|
+
'item-key': string;
|
|
168
|
+
};
|
|
169
|
+
Draggable: import("vue").DefineComponent<{
|
|
170
|
+
list: {
|
|
171
|
+
type: ArrayConstructor;
|
|
172
|
+
required: boolean;
|
|
173
|
+
default: any;
|
|
174
|
+
};
|
|
175
|
+
modelValue: {
|
|
176
|
+
type: ArrayConstructor;
|
|
177
|
+
required: boolean;
|
|
178
|
+
default: any;
|
|
179
|
+
};
|
|
180
|
+
itemKey: {
|
|
181
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
182
|
+
required: boolean;
|
|
183
|
+
};
|
|
184
|
+
clone: {
|
|
185
|
+
type: FunctionConstructor;
|
|
186
|
+
default: (original: any) => any;
|
|
187
|
+
};
|
|
188
|
+
tag: {
|
|
189
|
+
type: StringConstructor;
|
|
190
|
+
default: string;
|
|
191
|
+
};
|
|
192
|
+
move: {
|
|
193
|
+
type: FunctionConstructor;
|
|
194
|
+
default: any;
|
|
195
|
+
};
|
|
196
|
+
componentData: {
|
|
197
|
+
type: ObjectConstructor;
|
|
198
|
+
required: boolean;
|
|
199
|
+
default: any;
|
|
200
|
+
};
|
|
201
|
+
}, unknown, {
|
|
202
|
+
error: boolean;
|
|
203
|
+
}, {
|
|
204
|
+
realList(): any;
|
|
205
|
+
getKey(): any;
|
|
206
|
+
}, {
|
|
207
|
+
getUnderlyingVm(domElement: any): any;
|
|
208
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
209
|
+
emitChanges(evt: any): void;
|
|
210
|
+
alterList(onList: any): void;
|
|
211
|
+
spliceList(): void;
|
|
212
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
213
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
214
|
+
to: any;
|
|
215
|
+
related: any;
|
|
216
|
+
}): any;
|
|
217
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
218
|
+
onDragStart(evt: any): void;
|
|
219
|
+
onDragAdd(evt: any): void;
|
|
220
|
+
onDragRemove(evt: any): void;
|
|
221
|
+
onDragUpdate(evt: any): void;
|
|
222
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
223
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
224
|
+
onDragEnd(): void;
|
|
225
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
226
|
+
move: Function;
|
|
227
|
+
tag: string;
|
|
228
|
+
clone: Function;
|
|
229
|
+
list: unknown[];
|
|
230
|
+
modelValue: unknown[];
|
|
231
|
+
componentData: Record<string, any>;
|
|
232
|
+
} & {
|
|
233
|
+
itemKey?: string | Function | undefined;
|
|
234
|
+
}>, {
|
|
235
|
+
move: Function;
|
|
236
|
+
tag: string;
|
|
237
|
+
clone: Function;
|
|
238
|
+
list: unknown[];
|
|
239
|
+
modelValue: unknown[];
|
|
240
|
+
componentData: Record<string, any>;
|
|
241
|
+
}>;
|
|
242
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
243
|
+
fieldItem: {
|
|
244
|
+
type: PropType<FormConfigItem>;
|
|
245
|
+
};
|
|
246
|
+
getRenderer: {
|
|
247
|
+
type: Func<any[], any>;
|
|
248
|
+
require: boolean;
|
|
249
|
+
};
|
|
250
|
+
textFormatter: {
|
|
251
|
+
type: PropType<FormConfigTextFormatter>;
|
|
252
|
+
required: true;
|
|
253
|
+
};
|
|
254
|
+
}>>, {}>;
|
|
143
255
|
layoutWidthEnum2Column: typeof layoutWidthEnum2Column;
|
|
144
256
|
FormConfigEdit: import("vue").DefineComponent<{}, {
|
|
145
257
|
key: import("vue").Ref<number>;
|
|
@@ -1826,7 +1938,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1826
1938
|
notes?: string | undefined;
|
|
1827
1939
|
desc?: string | undefined;
|
|
1828
1940
|
children?: any[] | undefined;
|
|
1941
|
+
__new?: boolean | undefined;
|
|
1829
1942
|
}[] | undefined;
|
|
1943
|
+
__new?: boolean | undefined;
|
|
1830
1944
|
}>;
|
|
1831
1945
|
generateFieldListByFieldItem: (fieldItem: FormConfigItem) => import("../..").FieldItem[];
|
|
1832
1946
|
showModal: import("vue").Ref<boolean>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent, inject, openBlock, createBlock, unref, withModifiers, withCtx, createVNode } from 'vue';
|
|
2
|
+
import { CloseCircle } from '@vicons/ionicons5';
|
|
3
|
+
import { isArray } from 'lodash-es';
|
|
4
|
+
import { NButton, NIcon } from 'naive-ui';
|
|
5
|
+
import { InjectionFieldList, InjectionMaterialList } from '../../../../packages/form-config/src/constants';
|
|
6
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
7
|
+
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "CloseButton",
|
|
10
|
+
props: {
|
|
11
|
+
fieldItem: { type: Object, required: true }
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const fieldList = inject(InjectionFieldList);
|
|
16
|
+
const materialList = inject(InjectionMaterialList);
|
|
17
|
+
const remove = () => {
|
|
18
|
+
traverse(fieldList.value);
|
|
19
|
+
function traverse(_fieldItem) {
|
|
20
|
+
return isArray(_fieldItem) && _fieldItem.some((_fieldItem2, idx, arr) => {
|
|
21
|
+
if (_fieldItem2 !== props.fieldItem)
|
|
22
|
+
return traverse(_fieldItem2.children);
|
|
23
|
+
!_fieldItem2.__new && materialList.value.push(_fieldItem2);
|
|
24
|
+
return arr.splice(idx, 1);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
return openBlock(), createBlock(unref(NButton), {
|
|
30
|
+
text: "",
|
|
31
|
+
class: "form-config__renderer--closeButton",
|
|
32
|
+
"text-color": "#a5a5a5",
|
|
33
|
+
onClick: withModifiers(remove, ["stop"])
|
|
34
|
+
}, {
|
|
35
|
+
icon: withCtx(() => [
|
|
36
|
+
createVNode(unref(NIcon), { component: unref(CloseCircle) }, null, 8, ["component"])
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
}, 8, ["onClick"]);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
var CloseButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "CloseButton.vue"]]);
|
|
44
|
+
|
|
45
|
+
export { CloseButton as default };
|