cnhis-design-vue 3.1.18-beta.0 → 3.1.18-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.
@@ -3,12 +3,12 @@ import { cloneDeep, isFunction } from 'lodash-es';
3
3
  import { NButton } from 'naive-ui';
4
4
  import Draggable from 'vuedraggable';
5
5
  import FormConfigCreator from './components/FormConfigCreator.js';
6
- import FormConfigEdit from './components/FormConfigEdit.js';
7
6
  import FormConfigDragDisplay from './components/FormConfigDragDisplay.js';
8
- import '@vicons/ionicons5';
7
+ import FormConfigEdit from './components/FormConfigEdit.js';
8
+ import { layoutWidthEnum2Column } from './utils/index.js';
9
9
  import { InjectionFieldList, InjectionMaterialList, InjectionActiveFieldItem } from './constants/index.js';
10
+ import '@vicons/ionicons5';
10
11
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
11
- import { layoutWidthEnum2Column } from './utils/index.js';
12
12
  import { useSortableConfig } from './hooks/useSortalbeConfig.js';
13
13
 
14
14
  const _hoisted_1 = { class: "form-config__material" };
@@ -94,9 +94,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
94
94
  createElementVNode("section", _hoisted_3, [
95
95
  createElementVNode("header", _hoisted_4, [
96
96
  _hoisted_5,
97
- createVNode(unref(FormConfigCreator), { onSubmit: addItem })
97
+ createVNode(FormConfigCreator, { onSubmit: addItem })
98
98
  ]),
99
- createVNode(unref(FormConfigDragDisplay), {
99
+ createVNode(FormConfigDragDisplay, {
100
100
  class: "form-config__displayContent",
101
101
  "text-formatter": parsedTextFormatter,
102
102
  modelValue: fieldListRef.value,
@@ -106,7 +106,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
106
106
  createElementVNode("section", _hoisted_6, [
107
107
  _hoisted_7,
108
108
  createElementVNode("section", _hoisted_8, [
109
- createVNode(unref(FormConfigEdit), {
109
+ createVNode(FormConfigEdit, {
110
110
  ref_key: "formConfigEditRef",
111
111
  ref: formConfigEditRef
112
112
  }, null, 512)
@@ -1,13 +1,13 @@
1
1
  import { defineComponent, ref, inject, watch, toRaw, openBlock, createElementBlock, Fragment, createBlock, unref, createVNode, nextTick } from 'vue';
2
2
  import { cloneDeep } from 'lodash-es';
3
3
  import { InjectionActiveFieldItem } from '../constants/index.js';
4
- import { NModal } from 'naive-ui';
5
- import { useConfigurationField } from '../hooks/useConfigurationField.js';
6
- import '../../../index.js';
7
- import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
8
4
  import 'vuedraggable';
9
5
  import '../utils/index.js';
6
+ import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
10
7
  import '@vicons/ionicons5';
8
+ import { NModal } from 'naive-ui';
9
+ import { useConfigurationField } from '../hooks/useConfigurationField.js';
10
+ import '../../../index.js';
11
11
  import FormRender from '../../../form-render/index.js';
12
12
 
13
13
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,12 +1,9 @@
1
1
  import { defineComponent, inject, computed, openBlock, createElementBlock, createElementVNode, mergeProps, unref, withModifiers, createTextVNode, toDisplayString, createVNode } from 'vue';
2
- import 'lodash-es';
3
- import 'naive-ui';
4
- import { InjectionActiveFieldItem } from '../../constants/index.js';
5
- import '../../../../index.js';
6
- import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
7
2
  import FormConfigDragDisplay from '../FormConfigDragDisplay.js';
8
3
  import CloseButton from './CloseButton.js';
4
+ import { InjectionActiveFieldItem } from '../../constants/index.js';
9
5
  import { bindHover } from '../../utils/index.js';
6
+ import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
10
7
 
11
8
  const _hoisted_1 = { class: "form-config__renderer--complex form-config__renderer" };
12
9
  const _hoisted_2 = ["onClick"];
@@ -32,9 +29,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
29
  onClick: withModifiers(active, ["stop"])
33
30
  }), [
34
31
  createTextVNode(toDisplayString(props.fieldItem.name) + " ", 1),
35
- createVNode(unref(CloseButton), { "field-item": __props.fieldItem }, null, 8, ["field-item"])
32
+ createVNode(CloseButton, { "field-item": __props.fieldItem }, null, 8, ["field-item"])
36
33
  ], 16, _hoisted_2),
37
- createVNode(unref(FormConfigDragDisplay), mergeProps(_ctx.$props, {
34
+ createVNode(FormConfigDragDisplay, mergeProps(_ctx.$props, {
38
35
  modelValue: __props.fieldItem.children,
39
36
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.fieldItem.children = $event),
40
37
  class: "form-config__renderer--complex--grid"
@@ -28,6 +28,109 @@ declare const _default: import("vue").DefineComponent<{
28
28
  headerClassList: import("vue").ComputedRef<(string | {
29
29
  'is-active': boolean;
30
30
  })[]>;
31
+ FormConfigDragDisplay: import("vue").DefineComponent<{
32
+ fieldItem: {
33
+ type: PropType<FormConfigItem>;
34
+ };
35
+ textFormatter: {
36
+ type: PropType<FormConfigTextFormatter>;
37
+ required: true;
38
+ };
39
+ }, {
40
+ getItemColumnStyle: (fieldItem?: FormConfigItem | undefined) => {
41
+ '--item-column': number;
42
+ };
43
+ getRenderer: (fieldItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
44
+ getCommonConfig: () => {
45
+ onMove: ({ to, from }: import("sortablejs").SortableEvent) => void;
46
+ onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
47
+ onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
48
+ tag: string;
49
+ animation: string;
50
+ 'item-key': string;
51
+ };
52
+ Draggable: import("vue").DefineComponent<{
53
+ list: {
54
+ type: ArrayConstructor;
55
+ required: boolean;
56
+ default: any;
57
+ };
58
+ modelValue: {
59
+ type: ArrayConstructor;
60
+ required: boolean;
61
+ default: any;
62
+ };
63
+ itemKey: {
64
+ type: (StringConstructor | FunctionConstructor)[];
65
+ required: boolean;
66
+ };
67
+ clone: {
68
+ type: FunctionConstructor;
69
+ default: (original: any) => any;
70
+ };
71
+ tag: {
72
+ type: StringConstructor;
73
+ default: string;
74
+ };
75
+ move: {
76
+ type: FunctionConstructor;
77
+ default: any;
78
+ };
79
+ componentData: {
80
+ type: ObjectConstructor;
81
+ required: boolean;
82
+ default: any;
83
+ };
84
+ }, unknown, {
85
+ error: boolean;
86
+ }, {
87
+ realList(): any;
88
+ getKey(): any;
89
+ }, {
90
+ getUnderlyingVm(domElement: any): any;
91
+ getUnderlyingPotencialDraggableComponent(htmElement: any): any;
92
+ emitChanges(evt: any): void;
93
+ alterList(onList: any): void;
94
+ spliceList(): void;
95
+ updatePosition(oldIndex: any, newIndex: any): void;
96
+ getRelatedContextFromMoveEvent({ to, related }: {
97
+ to: any;
98
+ related: any;
99
+ }): any;
100
+ getVmIndexFromDomIndex(domIndex: any): any;
101
+ onDragStart(evt: any): void;
102
+ onDragAdd(evt: any): void;
103
+ onDragRemove(evt: any): void;
104
+ onDragUpdate(evt: any): void;
105
+ computeFutureIndex(relatedContext: any, evt: any): any;
106
+ onDragMove(evt: any, originalEvent: any): any;
107
+ onDragEnd(): void;
108
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
109
+ move: Function;
110
+ tag: string;
111
+ clone: Function;
112
+ list: unknown[];
113
+ modelValue: unknown[];
114
+ componentData: Record<string, any>;
115
+ } & {
116
+ itemKey?: string | Function | undefined;
117
+ }>, {
118
+ move: Function;
119
+ tag: string;
120
+ clone: Function;
121
+ list: unknown[];
122
+ modelValue: unknown[];
123
+ componentData: Record<string, any>;
124
+ }>;
125
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
126
+ fieldItem: {
127
+ type: PropType<FormConfigItem>;
128
+ };
129
+ textFormatter: {
130
+ type: PropType<FormConfigTextFormatter>;
131
+ required: true;
132
+ };
133
+ }>>, {}>;
31
134
  CloseButton: import("vue").DefineComponent<{
32
135
  fieldItem: {
33
136
  type: PropType<FormConfigItem>;
@@ -1524,109 +1627,6 @@ declare const _default: import("vue").DefineComponent<{
1524
1627
  required: true;
1525
1628
  };
1526
1629
  }>>, {}>;
1527
- FormConfigDragDisplay: import("vue").DefineComponent<{
1528
- fieldItem: {
1529
- type: PropType<FormConfigItem>;
1530
- };
1531
- textFormatter: {
1532
- type: PropType<FormConfigTextFormatter>;
1533
- required: true;
1534
- };
1535
- }, {
1536
- getItemColumnStyle: (fieldItem?: FormConfigItem | undefined) => {
1537
- '--item-column': number;
1538
- };
1539
- getRenderer: (fieldItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
1540
- getCommonConfig: () => {
1541
- onMove: ({ to, from }: import("sortablejs").SortableEvent) => void;
1542
- onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
1543
- onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
1544
- tag: string;
1545
- animation: string;
1546
- 'item-key': string;
1547
- };
1548
- Draggable: import("vue").DefineComponent<{
1549
- list: {
1550
- type: ArrayConstructor;
1551
- required: boolean;
1552
- default: any;
1553
- };
1554
- modelValue: {
1555
- type: ArrayConstructor;
1556
- required: boolean;
1557
- default: any;
1558
- };
1559
- itemKey: {
1560
- type: (StringConstructor | FunctionConstructor)[];
1561
- required: boolean;
1562
- };
1563
- clone: {
1564
- type: FunctionConstructor;
1565
- default: (original: any) => any;
1566
- };
1567
- tag: {
1568
- type: StringConstructor;
1569
- default: string;
1570
- };
1571
- move: {
1572
- type: FunctionConstructor;
1573
- default: any;
1574
- };
1575
- componentData: {
1576
- type: ObjectConstructor;
1577
- required: boolean;
1578
- default: any;
1579
- };
1580
- }, unknown, {
1581
- error: boolean;
1582
- }, {
1583
- realList(): any;
1584
- getKey(): any;
1585
- }, {
1586
- getUnderlyingVm(domElement: any): any;
1587
- getUnderlyingPotencialDraggableComponent(htmElement: any): any;
1588
- emitChanges(evt: any): void;
1589
- alterList(onList: any): void;
1590
- spliceList(): void;
1591
- updatePosition(oldIndex: any, newIndex: any): void;
1592
- getRelatedContextFromMoveEvent({ to, related }: {
1593
- to: any;
1594
- related: any;
1595
- }): any;
1596
- getVmIndexFromDomIndex(domIndex: any): any;
1597
- onDragStart(evt: any): void;
1598
- onDragAdd(evt: any): void;
1599
- onDragRemove(evt: any): void;
1600
- onDragUpdate(evt: any): void;
1601
- computeFutureIndex(relatedContext: any, evt: any): any;
1602
- onDragMove(evt: any, originalEvent: any): any;
1603
- onDragEnd(): void;
1604
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
1605
- move: Function;
1606
- tag: string;
1607
- clone: Function;
1608
- list: unknown[];
1609
- modelValue: unknown[];
1610
- componentData: Record<string, any>;
1611
- } & {
1612
- itemKey?: string | Function | undefined;
1613
- }>, {
1614
- move: Function;
1615
- tag: string;
1616
- clone: Function;
1617
- list: unknown[];
1618
- modelValue: unknown[];
1619
- componentData: Record<string, any>;
1620
- }>;
1621
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1622
- fieldItem: {
1623
- type: PropType<FormConfigItem>;
1624
- };
1625
- textFormatter: {
1626
- type: PropType<FormConfigTextFormatter>;
1627
- required: true;
1628
- };
1629
- }>>, {}>;
1630
1630
  bindHover: typeof bindHover;
1631
1631
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1632
1632
  fieldItem: {
@@ -1,12 +1,9 @@
1
1
  import { defineComponent, inject, computed, openBlock, createBlock, unref, mergeProps, withModifiers, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString } from 'vue';
2
2
  import { NButton, NEllipsis } from 'naive-ui';
3
- import 'lodash-es';
3
+ import CloseButton from './CloseButton.js';
4
4
  import { InjectionActiveFieldItem, WidgetTextMap } from '../../constants/index.js';
5
- import '../../../../index.js';
6
- import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
7
- import 'vuedraggable';
8
5
  import { bindHover } from '../../utils/index.js';
9
- import CloseButton from './CloseButton.js';
6
+ import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
10
7
 
11
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
9
  __name: "DefaultNode",
@@ -50,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
47
  ]),
51
48
  _: 1
52
49
  }, 8, ["class"]),
53
- createVNode(unref(CloseButton), { "field-item": __props.fieldItem }, null, 8, ["field-item"])
50
+ createVNode(CloseButton, { "field-item": __props.fieldItem }, null, 8, ["field-item"])
54
51
  ]),
55
52
  _: 1
56
53
  }, 16, ["secondary", "dashed", "onClick", "class"]);
@@ -1,10 +1,5 @@
1
1
  import { isString, isArray, isFunction } from 'lodash-es';
2
2
  import { computed } from 'vue';
3
- import 'naive-ui';
4
- import '../../../index.js';
5
- import 'vuedraggable';
6
- import '../utils/index.js';
7
- import '@vicons/ionicons5';
8
3
  import ComplexNode from '../components/renderer/ComplexNode.js';
9
4
  import DefaultNode from '../components/renderer/DefaultNode.js';
10
5
 
@@ -1,5 +1,5 @@
1
- import { defineComponent, ref, computed, inject, createVNode } from 'vue';
2
- import { isNumber } from 'lodash-es';
1
+ import { defineComponent, ref, computed, watch, inject, createVNode } from 'vue';
2
+ import { isNumber, isArray } from 'lodash-es';
3
3
  import '../../../index.js';
4
4
  import { useField, RecursionField, connect } from '@formily/vue';
5
5
  import { NButton, NIcon } from 'naive-ui';
@@ -43,6 +43,13 @@ const script = defineComponent({
43
43
  return 0;
44
44
  return ~~props.maxGroupNum;
45
45
  });
46
+ watch(() => props.value, (value) => {
47
+ if (!isArray(value))
48
+ return;
49
+ currentGroupNum.value = Math.min(Math.max(value.length, 1), maxGroupNum.value);
50
+ }, {
51
+ immediate: true
52
+ });
46
53
  function addGroup() {
47
54
  currentGroupNum.value++;
48
55
  }
@@ -0,0 +1 @@
1
+ declare module 'bpmn-js/lib/Viewer';
@@ -0,0 +1 @@
1
+ declare module 'bpmn-js/lib/features/modeling';
@@ -0,0 +1 @@
1
+ declare module 'diagram-js/lib/navigation/movecanvas';