cnhis-design-vue 3.1.18-beta.3 → 3.1.18-beta.6

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 (33) hide show
  1. package/es/components/big-table/index.js +2 -1
  2. package/es/components/big-table/src/BigTable.vue.d.ts +1 -4
  3. package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +8 -6
  4. package/es/{packages/components → components}/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  5. package/es/{packages/components → components}/bpmn-workflow/types/BpmnViewer.d.ts +0 -0
  6. package/es/{packages/components → components}/bpmn-workflow/types/ModelingModule.d.ts +0 -0
  7. package/es/{packages/components → components}/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -0
  8. package/es/{packages/components → components}/fabric-chart/src/utils/index.d.ts +0 -0
  9. package/es/components/field-set/src/FieldSet.js +26 -19
  10. package/es/components/form-config/src/components/renderer/DefaultNode.js +2 -2
  11. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +1 -1
  12. package/es/components/form-render/src/FormRender.js +2 -12
  13. package/es/components/form-render/src/components/renderer/cascader.js +2 -2
  14. package/es/components/form-render/src/components/renderer/checkbox.js +2 -2
  15. package/es/components/form-render/src/components/renderer/date.js +2 -2
  16. package/es/components/form-render/src/components/renderer/input.d.ts +10 -2
  17. package/es/components/form-render/src/components/renderer/input.js +19 -3
  18. package/es/components/form-render/src/components/renderer/inputNumber.js +2 -0
  19. package/es/components/form-render/src/components/renderer/radio.js +2 -2
  20. package/es/components/form-render/src/components/renderer/select.js +2 -2
  21. package/es/components/form-render/src/components/renderer/slider.js +3 -3
  22. package/es/components/form-render/src/components/renderer/switch.js +2 -2
  23. package/es/components/form-render/src/components/renderer/textarea.d.ts +8 -845
  24. package/es/components/form-render/src/components/renderer/textarea.js +29 -6
  25. package/es/components/form-render/src/hooks/useCommonInjection.d.ts +1 -0
  26. package/es/components/form-render/src/hooks/useCommonInjection.js +11 -2
  27. package/es/components/form-render/src/utils/index.js +1 -1
  28. package/es/components/form-render/src/utils/schema.d.ts +3 -0
  29. package/es/components/form-render/src/utils/schema.js +8 -1
  30. package/es/{packages/shared → shared}/utils/tapable/index.d.ts +0 -0
  31. package/es/shared/utils/utilExpand.d.ts +1 -1
  32. package/es/shared/utils/utilExpand.js +1 -0
  33. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import { COMPONENT_NAMESPACE } from '../../shared/global/variable.js';
2
2
  import { safeComponentRegister } from '../../shared/utils/index.js';
3
3
  import { loadVxeTable } from '../../shared/utils/loadVxe.js';
4
- import '../../shared/utils/utilExpand.js';
4
+ import { expandXEUtils } from '../../shared/utils/utilExpand.js';
5
5
  import '../index.js';
6
6
  import script from './src/BigTable.js';
7
7
  export { useColumnConfigAdaptor } from './src/hooks/useColumnConfigAdaptor.js';
@@ -12,6 +12,7 @@ BigTable.install = function(app) {
12
12
  safeComponentRegister(app, BigTable, COMPONENT_NAMESPACE + "BigTable");
13
13
  safeComponentRegister(app, Grid, COMPONENT_NAMESPACE + "Grid");
14
14
  loadVxeTable(app);
15
+ return expandXEUtils();
15
16
  };
16
17
 
17
18
  export { BigTable as default };
@@ -1247,9 +1247,7 @@ declare const _default: import("vue").DefineComponent<{
1247
1247
  textColorTextHoverPrimary: string;
1248
1248
  textColorTextPressedPrimary: string;
1249
1249
  textColorTextFocusPrimary: string;
1250
- textColorTextDisabledPrimary: string; /**
1251
- * tsx渲染表格
1252
- */
1250
+ textColorTextDisabledPrimary: string;
1253
1251
  textColorGhostPrimary: string;
1254
1252
  textColorGhostHoverPrimary: string;
1255
1253
  textColorGhostPressedPrimary: string;
@@ -1328,7 +1326,6 @@ declare const _default: import("vue").DefineComponent<{
1328
1326
  textColorTextPressedWarning: string;
1329
1327
  textColorTextFocusWarning: string;
1330
1328
  textColorTextDisabledWarning: string;
1331
- /** string */
1332
1329
  textColorGhostWarning: string;
1333
1330
  textColorGhostHoverWarning: string;
1334
1331
  textColorGhostPressedWarning: string;
@@ -1318,8 +1318,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1318
1318
  };
1319
1319
  const handlerClickRow = (data) => {
1320
1320
  var _a;
1321
- if (((_a = attr.checkboxConfig) == null ? void 0 : _a.trigger) === "default")
1321
+ let {
1322
+ row,
1323
+ $event = {},
1324
+ $rowIndex
1325
+ } = data;
1326
+ if (((_a = attr.checkboxConfig) == null ? void 0 : _a.trigger) === "default") {
1327
+ emit("handlerClickRow", row, $rowIndex);
1322
1328
  return false;
1329
+ }
1323
1330
  if (isScanMultiTable.value || props.isInlineOperating)
1324
1331
  return false;
1325
1332
  if (XEUtils.has(data == null ? void 0 : data.row, GROUP_TITLE_KEY))
@@ -1328,11 +1335,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1328
1335
  return false;
1329
1336
  let table = xGrid.value;
1330
1337
  isAboutNestTable.value && emit("resetNestLastClickTable", table);
1331
- let {
1332
- row,
1333
- $event = {},
1334
- $rowIndex
1335
- } = data;
1336
1338
  let {
1337
1339
  className,
1338
1340
  tagName
@@ -36,15 +36,15 @@ const _hoisted_18 = /* @__PURE__ */ createElementVNode("span", {
36
36
  const _hoisted_19 = /* @__PURE__ */ createElementVNode("span", null, "\u62D6\u62FD\u8C03\u6574\u987A\u5E8F", -1);
37
37
  const _hoisted_20 = /* @__PURE__ */ createElementVNode("span", { style: { "width": "14px", "margin-right": "6px" } }, null, -1);
38
38
  const _hoisted_21 = { class: "width-show" };
39
- const _hoisted_22 = { class: "width-show" };
40
- const _hoisted_23 = {
39
+ const _hoisted_22 = {
41
40
  key: 0,
42
41
  class: "width-show"
43
42
  };
44
- const _hoisted_24 = {
43
+ const _hoisted_23 = {
45
44
  key: 1,
46
45
  class: "width-show"
47
46
  };
47
+ const _hoisted_24 = { class: "width-show" };
48
48
  const _hoisted_25 = { class: "width-showed" };
49
49
  const _hoisted_26 = { class: "width-word" };
50
50
  const _hoisted_27 = { class: "width-showed" };
@@ -86,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
86
  columnName: "name",
87
87
  isShow: "show",
88
88
  isSort: "sort",
89
- isFixed: "fixedShow",
89
+ isFixed: "fixedWay",
90
90
  colWidth: "columnWidth"
91
91
  };
92
92
  const selectOptions = [
@@ -110,11 +110,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
110
110
  result.forEach((item) => {
111
111
  if (props.type == "old") {
112
112
  if (Reflect.has(item, key)) {
113
- item[fieldsMapping[key]] = item[key];
113
+ if (key == "isFixed") {
114
+ item["fixedWay"] = item[key] == 1 ? "LEFT" : item[key] == 2 ? "RIGHT" : "NONE";
115
+ } else {
116
+ item[fieldsMapping[key]] = item[key];
117
+ }
114
118
  Reflect.deleteProperty(item, key);
115
119
  }
116
120
  }
117
- item.columnWidth = Number(item.columnWidth);
121
+ item.columnWidth = +item.columnWidth;
122
+ if (!Reflect.has(item, "alias")) {
123
+ item.alias = "";
124
+ }
118
125
  });
119
126
  });
120
127
  return result;
@@ -151,7 +158,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
151
158
  visible: item.show,
152
159
  sequence: i,
153
160
  sortable: item.sort,
154
- title: item.alias || item.title,
161
+ title: item.alias,
155
162
  fixed: item.fixedWay,
156
163
  minWidth: item.columnWidth,
157
164
  ...props.isEdit ? {
@@ -317,18 +324,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
317
324
  [vShow, element.id != "0001"]
318
325
  ])
319
326
  ]),
320
- createCommentVNode(" \u6392\u5E8F "),
321
- createElementVNode("span", _hoisted_22, [
322
- withDirectives(createVNode(unref(NCheckbox), {
323
- checked: element.sort,
324
- "onUpdate:checked": ($event) => element.sort = $event,
325
- disabled: element.notParticipatingSort == 1
326
- }, null, 8, ["checked", "onUpdate:checked", "disabled"]), [
327
- [vShow, element.id != "0001"]
328
- ])
329
- ]),
330
327
  createCommentVNode(" \u662F\u5426\u53EF\u7F16\u8F91 "),
331
- __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_23, [
328
+ __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_22, [
332
329
  withDirectives(createVNode(unref(NCheckbox), {
333
330
  checked: element.editable,
334
331
  "onUpdate:checked": ($event) => element.editable = $event
@@ -337,7 +334,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
337
334
  ])
338
335
  ])) : createCommentVNode("v-if", true),
339
336
  createCommentVNode(" \u662F\u5426\u5FC5\u586B "),
340
- __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_24, [
337
+ __props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_23, [
341
338
  withDirectives(createVNode(unref(NCheckbox), {
342
339
  checked: element.required,
343
340
  "onUpdate:checked": ($event) => element.required = $event
@@ -345,6 +342,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
345
342
  [vShow, element.id != "0001"]
346
343
  ])
347
344
  ])) : createCommentVNode("v-if", true),
345
+ createCommentVNode(" \u6392\u5E8F "),
346
+ createElementVNode("span", _hoisted_24, [
347
+ withDirectives(createVNode(unref(NCheckbox), {
348
+ checked: element.sort,
349
+ "onUpdate:checked": ($event) => element.sort = $event,
350
+ disabled: element.notParticipatingSort == 1
351
+ }, null, 8, ["checked", "onUpdate:checked", "disabled"]), [
352
+ [vShow, element.id != "0001"]
353
+ ])
354
+ ]),
348
355
  createCommentVNode(" \u56FA\u5B9A "),
349
356
  createElementVNode("span", _hoisted_25, [
350
357
  createVNode(unref(NSelect), {
@@ -14,7 +14,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  setup(__props) {
15
15
  const props = __props;
16
16
  const currentActiveEditField = inject(InjectionActiveFieldItem);
17
- function active() {
17
+ function setActiveField() {
18
18
  currentActiveEditField.value = props.fieldItem;
19
19
  }
20
20
  const classList = computed(() => {
@@ -35,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
35
  secondary: !unref(disabled),
36
36
  dashed: unref(disabled)
37
37
  }, unref(bindHover)(__props.fieldItem), {
38
- onClick: withModifiers(active, ["stop"]),
38
+ onClick: withModifiers(setActiveField, ["stop"]),
39
39
  class: unref(classList)
40
40
  }), {
41
41
  default: withCtx(() => [
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
24
24
  [x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
25
25
  }>>;
26
26
  currentActiveEditField: import("vue").Ref<import("../../../../../shared/types").UndefinedAble<FormConfigItem>>;
27
- active: () => void;
27
+ setActiveField: () => void;
28
28
  classList: import("vue").ComputedRef<(string | {
29
29
  'is-active': boolean;
30
30
  })[]>;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createElementBlock, createVNode, isRef, Fragment, renderList, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, nextTick } from 'vue';
2
- import { createForm, onFieldValueChange, isField } from '@formily/core';
2
+ import { createForm, onFieldValueChange } from '@formily/core';
3
3
  import { FormProvider, FormConsumer } from '@formily/vue';
4
4
  import { isObject } from '@vue/shared';
5
5
  import { cloneDeep, isArray } from 'lodash-es';
@@ -146,17 +146,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
146
146
  formModel.setFieldState(path, handler);
147
147
  },
148
148
  resetFields(path = "*") {
149
- formModel.setFieldState(path, (field) => {
150
- var _a;
151
- if (isField(field)) {
152
- field.modified = false;
153
- field.visited = false;
154
- field.feedbacks = [];
155
- field.selfModified = false;
156
- field.caches = {};
157
- field.value = (_a = field.initialValue) != null ? _a : null;
158
- }
159
- });
149
+ formModel.reset(path);
160
150
  },
161
151
  async queryWidget(key) {
162
152
  return scrollbarRef.value ? await queryWidget(key, scrollbarRef.value, props.fieldList || []) : null;
@@ -8,7 +8,7 @@ import '../../../index.js';
8
8
  import '@formily/path';
9
9
  import '@vue/shared';
10
10
  import 'date-fns';
11
- import { assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
11
+ import { assignUpdateValue, assignValueBindKey, traverseDependKey } from '../../utils/schema.js';
12
12
  import { useFormField } from '../../hooks/useFormField.js';
13
13
  import '../../../../../shared/utils/tapable/SyncHook.js';
14
14
  import '../../../../../shared/utils/tapable/SyncBailHook.js';
@@ -203,6 +203,6 @@ const script = defineComponent({
203
203
  });
204
204
  const SEARCH_CASCADE = connect(script, mapProps({
205
205
  dataSource: "options"
206
- }, assignUpdateValue));
206
+ }, assignUpdateValue, assignValueBindKey));
207
207
 
208
208
  export { SEARCH_CASCADE };
@@ -3,7 +3,7 @@ import '@formily/path';
3
3
  import '@vue/shared';
4
4
  import 'lodash-es';
5
5
  import 'date-fns';
6
- import { assignUpdateValue } from '../../utils/schema.js';
6
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
7
7
  import { connect, mapProps } from '@formily/vue';
8
8
  import { NCheckboxGroup, NSpace, NCheckbox } from 'naive-ui';
9
9
 
@@ -40,6 +40,6 @@ const script = defineComponent({
40
40
  });
41
41
  const CHECKBOX = connect(script, mapProps({
42
42
  dataSource: "options"
43
- }, assignUpdateValue));
43
+ }, assignUpdateValue, assignValueBindKey));
44
44
 
45
45
  export { CHECKBOX };
@@ -8,7 +8,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection.js';
8
8
  import '@formily/path';
9
9
  import '@vue/shared';
10
10
  import 'lodash-es';
11
- import { assignUpdateValue } from '../../utils/schema.js';
11
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
12
12
 
13
13
  const script = defineComponent({
14
14
  props: {
@@ -112,6 +112,6 @@ const script = defineComponent({
112
112
  }), null);
113
113
  }
114
114
  });
115
- const DATE = connect(script, mapProps(assignUpdateValue));
115
+ const DATE = connect(script, mapProps(assignUpdateValue, assignValueBindKey));
116
116
 
117
117
  export { DATE };
@@ -1,15 +1,23 @@
1
1
  export declare const INPUT: import("vue").DefineComponent<{
2
+ value: {
3
+ type: StringConstructor;
4
+ };
2
5
  prefix: {
3
6
  type: StringConstructor;
4
7
  };
5
8
  suffix: {
6
9
  type: StringConstructor;
7
10
  };
8
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
+ value: {
13
+ type: StringConstructor;
14
+ };
9
15
  prefix: {
10
16
  type: StringConstructor;
11
17
  };
12
18
  suffix: {
13
19
  type: StringConstructor;
14
20
  };
15
- }>>, {}>;
21
+ }>> & {
22
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
23
+ }, {}>;
@@ -1,4 +1,5 @@
1
- import { defineComponent, createVNode } from 'vue';
1
+ import { defineComponent, computed, createVNode } from 'vue';
2
+ import { useCommonInjection } from '../../hooks/useCommonInjection.js';
2
3
  import { createInputSlot } from '../../utils/index.js';
3
4
  import { connect, mapProps } from '@formily/vue';
4
5
  import { NInput } from 'naive-ui';
@@ -7,6 +8,9 @@ import { assignUpdateValue } from '../../utils/schema.js';
7
8
  const script = defineComponent({
8
9
  name: "FormInput",
9
10
  props: {
11
+ value: {
12
+ type: String
13
+ },
10
14
  prefix: {
11
15
  type: String
12
16
  },
@@ -14,10 +18,22 @@ const script = defineComponent({
14
18
  type: String
15
19
  }
16
20
  },
17
- setup(props) {
21
+ emits: ["update:value"],
22
+ setup(props, {
23
+ emit
24
+ }) {
25
+ const valueRef = computed({
26
+ get: () => props.value,
27
+ set: (v) => emit("update:value", v)
28
+ });
29
+ const key = useCommonInjection().injectValueBindKey(valueRef);
18
30
  const _slots = createInputSlot(props);
19
31
  return () => {
20
- return createVNode(NInput, null, _slots.value);
32
+ return createVNode(NInput, {
33
+ "key": key.value,
34
+ "value": valueRef.value,
35
+ "onUpdate:value": ($event) => valueRef.value = $event
36
+ }, _slots.value);
21
37
  };
22
38
  }
23
39
  });
@@ -39,8 +39,10 @@ const script = defineComponent({
39
39
  return (_a = props.onChange) == null ? void 0 : _a.call(props, v);
40
40
  }
41
41
  });
42
+ const key = useCommonInjection().injectValueBindKey(valueRef);
42
43
  return () => {
43
44
  return createVNode(NInputNumber, {
45
+ "key": key.value,
44
46
  "value": valueRef.value,
45
47
  "onUpdate:value": ($event) => valueRef.value = $event,
46
48
  "show-button": false
@@ -5,7 +5,7 @@ import { NRadioGroup, NSpace, NRadio } from 'naive-ui';
5
5
  import '@formily/path';
6
6
  import '@vue/shared';
7
7
  import 'date-fns';
8
- import { assignUpdateValue } from '../../utils/schema.js';
8
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
9
9
 
10
10
  const script = defineComponent({
11
11
  props: {
@@ -64,6 +64,6 @@ const script = defineComponent({
64
64
  });
65
65
  const RADIO = connect(script, mapProps({
66
66
  dataSource: "options"
67
- }, assignUpdateValue));
67
+ }, assignUpdateValue, assignValueBindKey));
68
68
 
69
69
  export { RADIO };
@@ -37,7 +37,7 @@ import './slider.js';
37
37
  import './complex.js';
38
38
  import './simpleComponent.js';
39
39
  import { NSelect } from 'naive-ui';
40
- import { assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
40
+ import { assignUpdateValue, assignValueBindKey, traverseDependKey } from '../../utils/schema.js';
41
41
 
42
42
  const script = defineComponent({
43
43
  name: "FormSelect",
@@ -190,6 +190,6 @@ const script = defineComponent({
190
190
  });
191
191
  const SELECT = connect(script, mapProps({
192
192
  dataSource: "options"
193
- }, assignUpdateValue));
193
+ }, assignUpdateValue, assignValueBindKey));
194
194
 
195
195
  export { SELECT };
@@ -2,7 +2,7 @@ import { defineComponent, computed, createVNode } from 'vue';
2
2
  import { connect, mapProps } from '@formily/vue';
3
3
  import { NSlider } from 'naive-ui';
4
4
  import { parseNumberFromMaybeString } from '../../utils/index.js';
5
- import { assignUpdateValue } from '../../utils/schema.js';
5
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
6
6
 
7
7
  const script = defineComponent({
8
8
  props: {
@@ -24,7 +24,7 @@ const script = defineComponent({
24
24
  }, null);
25
25
  }
26
26
  });
27
- const SLIDER = connect(script, mapProps((props, field) => {
27
+ const SLIDER = connect(script, mapProps(assignUpdateValue, (props, field) => {
28
28
  const _props = assignUpdateValue(props, field);
29
29
  if (Array.isArray(_props.option)) {
30
30
  _props.marks = _props.option.reduce((fin, option) => {
@@ -33,6 +33,6 @@ const SLIDER = connect(script, mapProps((props, field) => {
33
33
  }, {});
34
34
  }
35
35
  return _props;
36
- }));
36
+ }, assignValueBindKey));
37
37
 
38
38
  export { SLIDER };
@@ -4,7 +4,7 @@ import '@formily/path';
4
4
  import '@vue/shared';
5
5
  import 'lodash-es';
6
6
  import 'date-fns';
7
- import { assignUpdateValue } from '../../utils/schema.js';
7
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
8
8
  import { connect, mapProps } from '@formily/vue';
9
9
 
10
10
  const script = defineComponent({
@@ -46,6 +46,6 @@ const script = defineComponent({
46
46
  };
47
47
  }
48
48
  });
49
- const SWITCH = connect(script, mapProps(assignUpdateValue));
49
+ const SWITCH = connect(script, mapProps(assignUpdateValue, assignValueBindKey));
50
50
 
51
51
  export { SWITCH };