cnhis-design-vue 3.4.0-beta.22 → 3.4.0-beta.26

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 (25) hide show
  1. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  2. package/es/components/fabric-chart/src/interface.d.ts +1 -0
  3. package/es/components/field-set/src/FieldColor.vue2.js +2 -1
  4. package/es/components/field-set/src/FieldFilter.vue2.js +2 -1
  5. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  6. package/es/components/field-set/src/FieldSet.vue2.js +1 -0
  7. package/es/components/field-set/src/components/table-row.vue2.js +1 -0
  8. package/es/components/form-render/src/components/renderer/textarea.d.ts +2 -2
  9. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  10. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  11. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +25 -0
  12. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
  13. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
  14. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  15. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  16. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  17. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  18. package/es/components/table-export-field/index.d.ts +4 -1
  19. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -0
  20. package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +0 -1
  21. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +18 -33
  22. package/es/components/table-export-field/src/index.vue.d.ts +4 -1
  23. package/es/components/table-export-field/src/types/index.d.ts +1 -0
  24. package/es/shared/package.json.js +1 -1
  25. package/package.json +2 -2
@@ -28,7 +28,7 @@ function useOther(canvas, propItems, emits, computedX, computedY, fixedNoRisePoi
28
28
  function handleCrossDayLayout(currentTime, lastLeft, eventList) {
29
29
  const newLeft = lastLeft + xCellWidth;
30
30
  const nextTime = getXValue(newLeft);
31
- if (isCrossDay(currentTime, nextTime)) {
31
+ if (!(other == null ? void 0 : other.allowCrossDay) && isCrossDay(currentTime, nextTime)) {
32
32
  adjustEventsForCrossDay(eventList);
33
33
  return lastLeft;
34
34
  } else {
@@ -95,6 +95,7 @@ interface IOther {
95
95
  highlightColor?: string;
96
96
  eventHighlight?: boolean;
97
97
  splitLineNumber?: number;
98
+ allowCrossDay?: boolean;
98
99
  list: Array<IPoint>;
99
100
  }
100
101
  export interface IDate {
@@ -179,7 +179,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
179
179
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value = $event),
180
180
  animation: "150",
181
181
  "item-key": "id",
182
- draggable: ".item"
182
+ draggable: ".item",
183
+ handle: ".drag-icon"
183
184
  }, {
184
185
  item: withCtx(({
185
186
  element,
@@ -243,7 +243,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
243
243
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value = $event),
244
244
  animation: "150",
245
245
  "item-key": "id",
246
- draggable: ".item"
246
+ draggable: ".item",
247
+ handle: ".drag-icon"
247
248
  }, {
248
249
  item: withCtx(({
249
250
  element,
@@ -294,7 +294,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
294
294
  getShowColumn: (column: AnyObject) => boolean;
295
295
  initFields: () => (AnyObject | AnyObject[])[];
296
296
  handleGroup: (fields: AnyObject[]) => (AnyObject | AnyObject[])[];
297
- getTableFields: () => import("lodash").Omit<never, "uuid">[];
297
+ getTableFields: () => import("lodash").Omit<AnyObject, "uuid">[];
298
298
  handleSearch: () => void;
299
299
  isHighlight: (element: FieldSetItem) => boolean | undefined;
300
300
  handleAllCheck: (checked: boolean, field: string) => void;
@@ -538,6 +538,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
538
538
  "item-key": "id",
539
539
  filter: ".disabled",
540
540
  draggable: ".item",
541
+ handle: ".drag-icon",
541
542
  move: onMove,
542
543
  disabled: !__props.rowDraggable,
543
544
  key: resetKey.value
@@ -354,6 +354,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
354
354
  trigger: "hover"
355
355
  }, {
356
356
  trigger: withCtx(() => [createVNode(unref(NIcon), {
357
+ class: "drag-icon",
357
358
  style: {
358
359
  "margin-right": "5px",
359
360
  "top": "2px"
@@ -4,7 +4,7 @@ export declare const TEXTAREA: import("vue").DefineComponent<import("vue").Extra
4
4
  type: StringConstructor;
5
5
  };
6
6
  rows: {
7
- type: NumberConstructor;
7
+ type: (NumberConstructor | StringConstructor)[];
8
8
  };
9
9
  onChange: {};
10
10
  updateKey: {};
@@ -17,7 +17,7 @@ export declare const TEXTAREA: import("vue").DefineComponent<import("vue").Extra
17
17
  type: StringConstructor;
18
18
  };
19
19
  rows: {
20
- type: NumberConstructor;
20
+ type: (NumberConstructor | StringConstructor)[];
21
21
  };
22
22
  onChange: {};
23
23
  updateKey: {};
@@ -22,7 +22,7 @@ const script = /* @__PURE__ */ defineComponent({
22
22
  type: String
23
23
  },
24
24
  rows: {
25
- type: Number
25
+ type: [Number, String]
26
26
  },
27
27
  onChange: {},
28
28
  updateKey: {},
@@ -39,7 +39,7 @@ function dateRendererPlugin() {
39
39
  });
40
40
  },
41
41
  apply(hooks) {
42
- useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.DATE, ".n-input__input-el", {
42
+ useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.DATE, ".n-input__input-el", {
43
43
  after: (fieldItem) => {
44
44
  Reflect.set(fieldItem.editRender, "autoselect", true);
45
45
  return fieldItem;
@@ -4,6 +4,31 @@ function useAutoFocus(hooks) {
4
4
  after,
5
5
  focusType = "function"
6
6
  } = {}) {
7
+ hooks.fieldHooks.field.tap(pluginName, (fieldItem) => {
8
+ var _a;
9
+ function createAutoFocusFn(selector2) {
10
+ const autofocusFn = ({ cell } = {}) => {
11
+ var _a2;
12
+ const ele = cell && cell.querySelector(selector2);
13
+ ele && (ele.click(), (_a2 = ele.focus) == null ? void 0 : _a2.call(ele));
14
+ return ele;
15
+ };
16
+ autofocusFn.toString = () => selector2;
17
+ return autofocusFn;
18
+ }
19
+ if (((_a = fieldItem.editRender) == null ? void 0 : _a.name) === type) {
20
+ fieldItem = before ? before(fieldItem) : fieldItem;
21
+ if (fieldItem.editRender && !Reflect.has(fieldItem.editRender, "autofocus")) {
22
+ Reflect.set(
23
+ fieldItem.editRender,
24
+ "autofocus",
25
+ focusType === "class" ? selector : focusType === "function" ? createAutoFocusFn(selector) : void 0
26
+ );
27
+ }
28
+ return after ? after(fieldItem) : fieldItem;
29
+ }
30
+ return fieldItem;
31
+ });
7
32
  }
8
33
  return { bindAutoFocusConfig };
9
34
  }
@@ -97,7 +97,7 @@ function inputRendererPlugin() {
97
97
  });
98
98
  },
99
99
  apply(hooks) {
100
- useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.INPUT, ".n-input__input-el,.n-input__textarea-el", {
100
+ useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.INPUT, ".n-input__input-el,.n-input__textarea-el", {
101
101
  focusType: "class"
102
102
  });
103
103
  }
@@ -81,7 +81,7 @@ function levelSearchCascadePlugin() {
81
81
  });
82
82
  },
83
83
  apply(hooks) {
84
- useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.LEVEL_SEARCH_CASCADE, "input");
84
+ useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.LEVEL_SEARCH_CASCADE, "input");
85
85
  }
86
86
  });
87
87
  }
@@ -93,7 +93,7 @@ function numberRendererPlugin() {
93
93
  });
94
94
  },
95
95
  apply(hooks) {
96
- useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.NUMBER, ".n-input__input-el", {
96
+ useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.NUMBER, ".n-input__input-el", {
97
97
  focusType: "class"
98
98
  });
99
99
  }
@@ -96,7 +96,7 @@ function selectRendererPlugin() {
96
96
  });
97
97
  },
98
98
  apply(hooks) {
99
- useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.SELECT, ".n-base-selection-input,.n-base-selection-tags");
99
+ useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.SELECT, ".n-base-selection-input,.n-base-selection-tags");
100
100
  hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, {
101
101
  uuid
102
102
  }) => {
@@ -96,7 +96,7 @@ function separateRendererPlugins() {
96
96
  });
97
97
  },
98
98
  apply(hooks) {
99
- useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.SEPARATE, ".iho-table__separateText");
99
+ useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.SEPARATE, ".iho-table__separateText,.n-input__input-el,.n-input__textarea-el");
100
100
  hooks.eventHooks.onEditClosed.tap(pluginName, ({
101
101
  row,
102
102
  column,
@@ -36,7 +36,7 @@ function timeRendererPlugin() {
36
36
  });
37
37
  },
38
38
  apply(hooks) {
39
- useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.TIME, ".n-input__input-el", {
39
+ useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.TIME, ".n-input__input-el", {
40
40
  after: (fieldItem) => {
41
41
  Reflect.set(fieldItem.editRender, "autoselect", true);
42
42
  return fieldItem;
@@ -50,22 +50,26 @@ declare const TableExportField: SFCWithInstall<import("vue").DefineComponent<imp
50
50
  schemeName: string;
51
51
  fieldKeys: string[];
52
52
  updatedTime?: string | undefined;
53
+ exportPath?: string | undefined;
53
54
  }, import("./src/types").IExportSchemeType | {
54
55
  schemeId: string;
55
56
  schemeName: string;
56
57
  fieldKeys: string[];
57
58
  updatedTime?: string | undefined;
59
+ exportPath?: string | undefined;
58
60
  }>;
59
61
  programOptions: import("vue").Ref<{
60
62
  schemeId: string;
61
63
  schemeName: string;
62
64
  fieldKeys: string[];
63
65
  updatedTime?: string | undefined;
66
+ exportPath?: string | undefined;
64
67
  }[], import("./src/types").IExportSchemeType[] | {
65
68
  schemeId: string;
66
69
  schemeName: string;
67
70
  fieldKeys: string[];
68
71
  updatedTime?: string | undefined;
72
+ exportPath?: string | undefined;
69
73
  }[]>;
70
74
  downLoadFieldList: import("vue").Ref<any[], any[]>;
71
75
  showAllFieldList: import("vue").Ref<any[], any[]>;
@@ -371,7 +375,6 @@ declare const TableExportField: SFCWithInstall<import("vue").DefineComponent<imp
371
375
  selectProject: import("vue").Ref<any, any>;
372
376
  projectList: import("vue").Ref<any[], any[]>;
373
377
  exportApiConfig: import("../../shared/types").AnyObject;
374
- isHoEdge: import("vue").ComputedRef<any>;
375
378
  handleRadioChange: (value: string | number | boolean) => void;
376
379
  validateProjectName: () => boolean;
377
380
  getParams: () => {
@@ -116,6 +116,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
116
116
  lastUsedSchemeName: curOption ? curOption.schemeName : "",
117
117
  schemeId: curOption ? curOption.schemeId : "",
118
118
  schemeName: curOption ? curOption.schemeName : "",
119
+ exportPath: (curOption == null ? void 0 : curOption.exportPath) || "",
119
120
  tableListId: props.tableListId
120
121
  };
121
122
  let res = await exportTableListScheme(params, exportApiConfig);
@@ -69,7 +69,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
69
69
  selectProject: import("vue").Ref<any, any>;
70
70
  projectList: import("vue").Ref<any[], any[]>;
71
71
  exportApiConfig: import("../../../../shared/types").AnyObject;
72
- isHoEdge: import("vue").ComputedRef<any>;
73
72
  handleRadioChange: (value: string | number | boolean) => void;
74
73
  validateProjectName: () => boolean;
75
74
  getParams: () => {
@@ -1,12 +1,11 @@
1
1
  import { i18n } from '../../../../_virtual/_virtual_i18n-methods.js';
2
- import { defineComponent, ref, reactive, inject, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createTextVNode, createElementBlock, Fragment, renderList, toDisplayString, createCommentVNode } from 'vue';
2
+ import { defineComponent, ref, reactive, inject, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createTextVNode, createElementBlock, Fragment, renderList, toDisplayString } from 'vue';
3
3
  import { useMessage, NModal, NCard, NIcon, NButton, NRadioGroup, NRadio, NForm, NFormItem, NInput } from 'naive-ui';
4
4
  import { CloseOutline } from '@vicons/ionicons5';
5
5
  import { InjectionExportApiConfig } from '../constants/index.js';
6
6
  import useAsyncData from '../hooks/useAsyncData.js';
7
7
  import { dragFieldCheckList } from '../tool.js';
8
8
  import { cloneDeep } from 'lodash-es';
9
- import { hoEdge } from '../../../../shared/utils/ho-edge.js';
10
9
 
11
10
  const _hoisted_1 = {
12
11
  class: "svg-wrap"
@@ -17,6 +16,13 @@ const _hoisted_2 = {
17
16
  const _hoisted_3 = {
18
17
  class: "save-project-content"
19
18
  };
19
+ const _hoisted_4 = {
20
+ style: {
21
+ "width": "100%",
22
+ "display": "flex",
23
+ "flex-direction": "column"
24
+ }
25
+ };
20
26
  const defaultKey = "default";
21
27
  var _sfc_main = /* @__PURE__ */ defineComponent({
22
28
  __name: "SaveProjectModal",
@@ -74,10 +80,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
74
80
  const selectProject = ref();
75
81
  const projectList = ref([]);
76
82
  const exportApiConfig = inject(InjectionExportApiConfig);
77
- const isHoEdge = computed(() => {
78
- var _a;
79
- return (_a = hoEdge) == null ? void 0 : _a.webview;
80
- });
81
83
  function handleRadioChange(value) {
82
84
  selectProject.value = value;
83
85
  }
@@ -128,18 +130,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
128
130
  if (validateProjectName()) {
129
131
  return;
130
132
  }
131
- const exportPath = formValue.exportPath.trim();
132
- const {
133
- schemeId
134
- } = props.curProgram;
135
- const hoEdgeParams = {
136
- "exec": "saveconf",
137
- "data": {
138
- "key": selectProject.value === "updateProject" ? schemeId : `${defaultKey}_schemeId`,
139
- "value": exportPath
140
- }
141
- };
142
- await hoEdge.postMsg(hoEdgeParams);
143
133
  const params = getParams();
144
134
  let res = await saveTableListExportScheme(params, exportApiConfig);
145
135
  if (res) {
@@ -156,6 +146,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
156
146
  watch(() => props.visible, async (isShow) => {
157
147
  if (isShow) {
158
148
  const program = props.curProgram;
149
+ formValue.exportPath = (program == null ? void 0 : program.exportPath) || "";
159
150
  switch (program.schemeId) {
160
151
  case defaultKey:
161
152
  projectList.value = modeList.filter((mode) => mode.value === "addProject");
@@ -168,16 +159,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
168
159
  formValue.projectName = program.schemeName;
169
160
  break;
170
161
  }
171
- const hoEdgeParams = {
172
- "exec": "getconf",
173
- "data": {
174
- "key": selectProject.value === "updateProject" ? program.schemeId : `${defaultKey}_schemeId`
175
- }
176
- };
177
- const getHoEdgeData = await hoEdge.postMsg(hoEdgeParams);
178
- if (getHoEdgeData == null ? void 0 : getHoEdgeData.result) {
179
- formValue.exportPath = (getHoEdgeData == null ? void 0 : getHoEdgeData.res) || "";
180
- }
181
162
  }
182
163
  }, {
183
164
  immediate: true
@@ -253,19 +234,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
253
234
  maxlength: "100"
254
235
  }, null, 8, ["value"])]),
255
236
  _: 1
256
- }), isHoEdge.value ? (openBlock(), createBlock(unref(NFormItem), {
257
- key: 0,
237
+ }), createVNode(unref(NFormItem), {
258
238
  label: i18n("10010.1.683", "\u5BFC\u51FA\u8DEF\u5F84"),
259
239
  path: "exportPath"
260
240
  }, {
261
- default: withCtx(() => [createVNode(unref(NInput), {
241
+ default: withCtx(() => [createElementVNode("div", _hoisted_4, [createVNode(unref(NInput), {
262
242
  value: formValue.exportPath,
263
243
  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => formValue.exportPath = $event),
264
244
  placeholder: i18n("10010.1.684", "\u8BF7\u8F93\u5165\u5BFC\u51FA\u8DEF\u5F84"),
265
245
  clearable: ""
266
- }, null, 8, ["value"])]),
246
+ }, null, 8, ["value"]), _cache[5] || (_cache[5] = createElementVNode("span", {
247
+ style: {
248
+ "margin-top": "3px",
249
+ "color": "#d03050"
250
+ }
251
+ }, "\u5F53\u524D\u914D\u7F6E\u4EC5\u7528\u4E8E\u5C01\u88C5\u6D4F\u89C8\u5668", -1))])]),
267
252
  _: 1
268
- })) : createCommentVNode("v-if", true)]),
253
+ })]),
269
254
  _: 1
270
255
  }, 8, ["model"])])]),
271
256
  _: 1
@@ -51,22 +51,26 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
51
51
  schemeName: string;
52
52
  fieldKeys: string[];
53
53
  updatedTime?: string | undefined;
54
+ exportPath?: string | undefined;
54
55
  }, IExportSchemeType | {
55
56
  schemeId: string;
56
57
  schemeName: string;
57
58
  fieldKeys: string[];
58
59
  updatedTime?: string | undefined;
60
+ exportPath?: string | undefined;
59
61
  }>;
60
62
  programOptions: import("vue").Ref<{
61
63
  schemeId: string;
62
64
  schemeName: string;
63
65
  fieldKeys: string[];
64
66
  updatedTime?: string | undefined;
67
+ exportPath?: string | undefined;
65
68
  }[], IExportSchemeType[] | {
66
69
  schemeId: string;
67
70
  schemeName: string;
68
71
  fieldKeys: string[];
69
72
  updatedTime?: string | undefined;
73
+ exportPath?: string | undefined;
70
74
  }[]>;
71
75
  downLoadFieldList: import("vue").Ref<any[], any[]>;
72
76
  showAllFieldList: import("vue").Ref<any[], any[]>;
@@ -372,7 +376,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
372
376
  selectProject: import("vue").Ref<any, any>;
373
377
  projectList: import("vue").Ref<any[], any[]>;
374
378
  exportApiConfig: import("../../../shared/types").AnyObject;
375
- isHoEdge: import("vue").ComputedRef<any>;
376
379
  handleRadioChange: (value: string | number | boolean) => void;
377
380
  validateProjectName: () => boolean;
378
381
  getParams: () => {
@@ -3,4 +3,5 @@ export type IExportSchemeType = {
3
3
  schemeName: string;
4
4
  fieldKeys: string[];
5
5
  updatedTime?: string;
6
+ exportPath?: string;
6
7
  };
@@ -1,5 +1,5 @@
1
1
  var name = "@cnhis-design-vue/shared";
2
- var version = "3.4.0-beta.22";
2
+ var version = "3.4.0-beta.26";
3
3
  var main = "index.ts";
4
4
  var peerDependencies = {
5
5
  "naive-ui": "^2.30.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.4.0-beta.22",
3
+ "version": "3.4.0-beta.26",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -73,5 +73,5 @@
73
73
  "iOS 7",
74
74
  "last 3 iOS versions"
75
75
  ],
76
- "gitHead": "10bb1fa64ad98cbec8b8fdfbdbca6b4ed52dd771"
76
+ "gitHead": "684368874b6abd15ad635b0eeb8188ad82e230a8"
77
77
  }