@ibiz-template/vue3-components 0.7.40 → 0.7.41-alpha.1

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 (104) hide show
  1. package/dist/{index-8ZkS4CI0.js → index-4CBJktLS.js} +1 -1
  2. package/dist/{index-WNFQFxQd.js → index-QL7Ukex9.js} +1 -1
  3. package/dist/index-eIKUlAq_.js +4 -0
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/{map-chart-user-bTKfT7VH.js → map-chart-user-xOSZGbF2.js} +1 -1
  7. package/dist/{wang-editor-f_OOMd4x.js → wang-editor-6EirGFoh.js} +1 -1
  8. package/dist/{xlsx-util-3T0fByLw.js → xlsx-util-J1RHk00u.js} +1 -1
  9. package/es/common/map-chart-user/map-chart-user.util.mjs +1 -1
  10. package/es/control/app-menu/app-menu.d.ts +2 -2
  11. package/es/control/app-menu/app-menu.mjs +17 -9
  12. package/es/control/calendar/calendar.mjs +6 -2
  13. package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +1 -1
  14. package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +3 -3
  15. package/es/control/drbar/drbar.controller.mjs +4 -3
  16. package/es/control/drtab/drtab-control.util.mjs +1 -1
  17. package/es/control/grid/grid/grid-control.util.mjs +48 -2
  18. package/es/control/grid/row-edit-popover/row-edit-popover.css +1 -1
  19. package/es/control/kanban/kanban.mjs +6 -1
  20. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +1 -0
  21. package/es/editor/data-picker/ibiz-transfer-picker/components/index.d.ts +1 -0
  22. package/es/editor/data-picker/ibiz-transfer-picker/components/index.mjs +3 -0
  23. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/icon.d.ts +2 -0
  24. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/icon.mjs +19 -0
  25. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/interface.d.ts +99 -0
  26. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/interface.mjs +89 -0
  27. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer-util.d.ts +17 -0
  28. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer-util.mjs +103 -0
  29. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer.css +1 -0
  30. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer.d.ts +182 -0
  31. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer.mjs +146 -0
  32. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/icon.d.ts +1 -0
  33. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/icon.mjs +12 -0
  34. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/interface.d.ts +60 -0
  35. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/interface.mjs +52 -0
  36. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/transfer-panel-util.d.ts +14 -0
  37. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/transfer-panel-util.mjs +130 -0
  38. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/transfer-panel.css +1 -0
  39. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/transfer-panel.d.ts +108 -0
  40. package/es/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/transfer-panel.mjs +116 -0
  41. package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.css +1 -0
  42. package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.d.ts +97 -0
  43. package/es/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.mjs +279 -0
  44. package/es/editor/data-picker/index.d.ts +1 -0
  45. package/es/editor/data-picker/index.mjs +1 -0
  46. package/es/editor/data-picker/picker-editor.provider.mjs +3 -0
  47. package/es/editor/dropdown-list/dropdown-list-editor.provider.mjs +3 -0
  48. package/es/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.css +1 -0
  49. package/es/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.d.ts +93 -0
  50. package/es/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.mjs +292 -0
  51. package/es/editor/dropdown-list/index.d.ts +1 -0
  52. package/es/editor/dropdown-list/index.mjs +1 -0
  53. package/es/editor/index.mjs +12 -0
  54. package/es/editor/rate/ibiz-rate/ibiz-rate.d.ts +3 -0
  55. package/es/locale/en/index.d.ts +10 -0
  56. package/es/locale/en/index.mjs +10 -0
  57. package/es/locale/zh-CN/index.d.ts +10 -0
  58. package/es/locale/zh-CN/index.mjs +10 -0
  59. package/es/panel-component/app-switch/app-switch.controller.mjs +11 -1
  60. package/es/panel-component/panel-tab-panel/panel-tab-panel.css +1 -1
  61. package/es/panel-component/searchform-buttons/searchform-buttons.css +1 -1
  62. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  63. package/es/web-app/components/router-shell/router-shell.mjs +6 -4
  64. package/lib/common/map-chart-user/map-chart-user.util.cjs +1 -1
  65. package/lib/control/app-menu/app-menu.cjs +16 -8
  66. package/lib/control/calendar/calendar.cjs +6 -2
  67. package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +1 -1
  68. package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +3 -3
  69. package/lib/control/drbar/drbar.controller.cjs +4 -3
  70. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  71. package/lib/control/grid/grid/grid-control.util.cjs +48 -2
  72. package/lib/control/grid/row-edit-popover/row-edit-popover.css +1 -1
  73. package/lib/control/kanban/kanban.cjs +6 -1
  74. package/lib/editor/data-picker/ibiz-transfer-picker/components/index.cjs +7 -0
  75. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer/icon.cjs +22 -0
  76. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer/interface.cjs +99 -0
  77. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer-util.cjs +108 -0
  78. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer.cjs +148 -0
  79. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer/transfer.css +1 -0
  80. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/icon.cjs +14 -0
  81. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/interface.cjs +58 -0
  82. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/transfer-panel-util.cjs +133 -0
  83. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/transfer-panel.cjs +118 -0
  84. package/lib/editor/data-picker/ibiz-transfer-picker/components/transfer-panel/transfer-panel.css +1 -0
  85. package/lib/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.cjs +281 -0
  86. package/lib/editor/data-picker/ibiz-transfer-picker/ibiz-transfer-picker.css +1 -0
  87. package/lib/editor/data-picker/index.cjs +2 -0
  88. package/lib/editor/data-picker/picker-editor.provider.cjs +3 -0
  89. package/lib/editor/dropdown-list/dropdown-list-editor.provider.cjs +3 -0
  90. package/lib/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.cjs +294 -0
  91. package/lib/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.css +1 -0
  92. package/lib/editor/dropdown-list/index.cjs +2 -0
  93. package/lib/editor/index.cjs +12 -0
  94. package/lib/locale/en/index.cjs +10 -0
  95. package/lib/locale/zh-CN/index.cjs +10 -0
  96. package/lib/panel-component/app-switch/app-switch.controller.cjs +11 -1
  97. package/lib/panel-component/panel-tab-panel/panel-tab-panel.css +1 -1
  98. package/lib/panel-component/searchform-buttons/searchform-buttons.css +1 -1
  99. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  100. package/lib/web-app/components/router-shell/router-shell.cjs +6 -4
  101. package/package.json +5 -5
  102. package/dist/index-azhHVxuV.js +0 -4
  103. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.40_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.1_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  104. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.40_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.1_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -57,7 +57,7 @@ const getCssVarByName = (name) => {
57
57
  const getPointStaticOption = (params) => {
58
58
  const { pointSymbol } = params;
59
59
  const ns = useNamespace("map-chart-user");
60
- const textColor = getCssVarByName(ns.cssVarName("color-text-1"));
60
+ const textColor = getCssVarByName(ns.cssVarName("color-danger"));
61
61
  const fontSize = getCssVarByName(ns.cssVarName("font-size-header-4"));
62
62
  const options = {
63
63
  type: "scatter",
@@ -1,7 +1,7 @@
1
1
  import { Namespace } from '@ibiz-template/core';
2
2
  import { IAppMenu } from '@ibiz/model-core';
3
- import { PropType, Ref } from 'vue';
4
- import { AppMenuController, IControlProvider } from '@ibiz-template/runtime';
3
+ import { Ref, PropType } from 'vue';
4
+ import { IControlProvider, AppMenuController } from '@ibiz-template/runtime';
5
5
  import './app-menu.scss';
6
6
  export declare const AppMenuControl: import("vue").DefineComponent<{
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import { isVNode, resolveComponent, createVNode, ref, watch, onUnmounted, computed, onMounted, nextTick, mergeProps, defineComponent } from 'vue';
2
2
  import { RuntimeError, showTitle, findRecursiveChild } from '@ibiz-template/core';
3
- import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
3
+ import { useControlController, useNamespace, route2routePath } from '@ibiz-template/vue3-util';
4
4
  import { createUUID } from 'qx-util';
5
5
  import { AppMenuController, formatSeparator, ViewCallTag } from '@ibiz-template/runtime';
6
6
  import { useRoute } from 'vue-router';
@@ -259,24 +259,32 @@ const AppMenuControl = /* @__PURE__ */ defineComponent({
259
259
  const calcCurMenu = () => {
260
260
  const allItems = c.getAllItems();
261
261
  return allItems.find((item) => {
262
- if (item.itemType === "MENUITEM" && item.appFuncId) {
262
+ var _a;
263
+ if (item.itemType !== "MENUITEM" || !item.appFuncId)
264
+ return false;
265
+ if (ibiz.config.appMenu.echoMode === "VIEW") {
263
266
  const app = ibiz.hub.getApp(item.appId);
264
- if (!app) {
267
+ if (!app)
265
268
  return false;
266
- }
267
269
  const func = app.getAppFunc(item.appFuncId);
268
- if (func && func.appViewId && route.params.view2) {
270
+ if (func && func.appViewId && (route == null ? void 0 : route.params.view2)) {
269
271
  return func.appViewId.split(".")[1] === route.params.view2;
270
272
  }
273
+ } else {
274
+ if (!route) {
275
+ return false;
276
+ }
277
+ const routePath = route2routePath(route);
278
+ if (routePath.pathNodes.length > 1)
279
+ return item.id === ((_a = routePath.pathNodes[1].params) == null ? void 0 : _a.srfmenuitem);
271
280
  }
272
281
  return false;
273
282
  });
274
283
  };
275
284
  const onClick = async (id, event) => {
276
285
  const activeMenu = calcCurMenu();
277
- if (activeMenu && activeMenu.id === id) {
286
+ if (activeMenu && activeMenu.id === id)
278
287
  return;
279
- }
280
288
  defaultActive.value = id;
281
289
  const menu = c.getAllItems().find((m) => m.id === id);
282
290
  if ((menu == null ? void 0 : menu.itemType) === "RAWITEM" || c.runMode === "DESIGN") {
@@ -285,7 +293,7 @@ const AppMenuControl = /* @__PURE__ */ defineComponent({
285
293
  await c.onClickMenuItem(id, event);
286
294
  };
287
295
  if (c.runMode !== "DESIGN") {
288
- watch(() => route.params.view2, (newVal, oldVal) => {
296
+ watch(() => route == null ? void 0 : route.params.view2, (newVal, oldVal) => {
289
297
  if (newVal !== oldVal && ibiz.config.appMenu.enableEcho) {
290
298
  const activeMenu = calcCurMenu();
291
299
  defaultActive.value = activeMenu ? activeMenu.id : "";
@@ -301,7 +309,7 @@ const AppMenuControl = /* @__PURE__ */ defineComponent({
301
309
  const defaultActiveMenuItem = allItems.find((item) => {
302
310
  return item.openDefault && !item.hidden;
303
311
  });
304
- if (defaultActiveMenuItem && !route.params.view2 && !route.fullPath.includes("404")) {
312
+ if (defaultActiveMenuItem && !(route == null ? void 0 : route.params.view2) && !(route == null ? void 0 : route.fullPath.includes("404"))) {
305
313
  defaultActive.value = defaultActiveMenuItem.id;
306
314
  onClick(defaultActive.value);
307
315
  } else if (ibiz.config.appMenu.enableEcho) {
@@ -546,13 +546,17 @@ const CalendarControl = /* @__PURE__ */ defineComponent({
546
546
  const {
547
547
  data
548
548
  } = value;
549
- this.c.onRowClick(data[0]);
549
+ const item = data[0];
550
+ if (item)
551
+ this.c.onRowClick(item);
550
552
  },
551
553
  "onEventDblClick": (value) => {
552
554
  const {
553
555
  data
554
556
  } = value;
555
- this.c.onDbRowClick(data[0]);
557
+ const item = data[0];
558
+ if (item)
559
+ this.c.onDbRowClick(item);
556
560
  }
557
561
  }, _isSlot(slots) ? slots : {
558
562
  default: () => [slots]
@@ -125,7 +125,7 @@ const useCalendarDaily = (props, emit) => {
125
125
  const difference = new Date(endTime).getTime() - new Date(startTime).getTime();
126
126
  height = Math.floor(difference / (1e3 * 60));
127
127
  }
128
- if (height < 3) {
128
+ if (height < 30) {
129
129
  height = "auto";
130
130
  }
131
131
  return height;
@@ -151,7 +151,7 @@ const useCalendarWeek = (props, emit) => {
151
151
  const width = "".concat(percentage, "%");
152
152
  const styleLeft = "".concat(index * percentage, "%");
153
153
  Object.assign(tempEventContent, { width, styleLeft });
154
- let height = 3;
154
+ let height = "auto";
155
155
  let styleTop = 60;
156
156
  let timeRange = "";
157
157
  if (isToday(event.beginTime, event.endTime)) {
@@ -299,8 +299,8 @@ const useCalendarWeek = (props, emit) => {
299
299
  const difference = new Date(endTime).getTime() - new Date(startTime).getTime();
300
300
  height = Math.floor(difference / (1e3 * 60));
301
301
  }
302
- if (height < 3) {
303
- height = 3;
302
+ if (height < 30) {
303
+ height = "auto";
304
304
  }
305
305
  return height;
306
306
  };
@@ -301,6 +301,7 @@ class DRBarController extends ControlController {
301
301
  * @memberof DRBarController
302
302
  */
303
303
  initDRBarItems() {
304
+ var _a;
304
305
  const { dedrctrlItems, dedrbarGroups } = this.model;
305
306
  const drBarItems = [];
306
307
  if (!this.state.hideEditItem) {
@@ -322,7 +323,7 @@ class DRBarController extends ControlController {
322
323
  caption,
323
324
  disabled: false,
324
325
  sysImage: editItemSysImage,
325
- fullPath: this.router.currentRoute.value.fullPath
326
+ fullPath: (_a = this.router) == null ? void 0 : _a.currentRoute.value.fullPath
326
327
  });
327
328
  this.state.defaultItem = uniqueTag;
328
329
  }
@@ -354,11 +355,11 @@ class DRBarController extends ControlController {
354
355
  });
355
356
  } else {
356
357
  dedrbarGroups.forEach((group) => {
357
- var _a;
358
+ var _a2;
358
359
  const groupItems = dedrctrlItems.filter(
359
360
  (item) => item.dedrbarGroupId === group.id
360
361
  );
361
- if (groupItems.length > 1 || ((_a = this.controlParams) == null ? void 0 : _a.singleitemgroup) === "true" && groupItems.length === 1) {
362
+ if (groupItems.length > 1 || ((_a2 = this.controlParams) == null ? void 0 : _a2.singleitemgroup) === "true" && groupItems.length === 1) {
362
363
  let itemCaption = group.caption;
363
364
  if (group.capLanguageRes) {
364
365
  itemCaption = ibiz.i18n.t(
@@ -1,5 +1,5 @@
1
1
  import { ref, watch, watchEffect, onUnmounted } from 'vue';
2
- import { defaultNamespace } from '../../node_modules/.pnpm/@ibiz-template_core@0.7.40_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs';
2
+ import { defaultNamespace } from '../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.1_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs';
3
3
 
4
4
  "use strict";
5
5
  function useAppDRTab(c, controlRef, counterData) {
@@ -509,11 +509,57 @@ function useAppGridBase(c, props) {
509
509
  }
510
510
  return state.rows.map((row) => row.data);
511
511
  });
512
+ const calcGroupColumns = (groupColumn) => {
513
+ const result = { ...groupColumn };
514
+ const columns = [];
515
+ const degridColumns = groupColumn.degridColumns || [];
516
+ degridColumns.forEach((column) => {
517
+ var _a, _b;
518
+ if (column.columnType === "GROUPGRIDCOLUMN") {
519
+ const children = calcGroupColumns(column);
520
+ if (children.degridColumns && children.degridColumns.length) {
521
+ columns.push(children);
522
+ }
523
+ } else {
524
+ const columnState = c.state.columnStates.find(
525
+ (item) => item.key === column.codeName
526
+ );
527
+ if (columnState && !columnState.hidden) {
528
+ const columnModel = ((_a = c.fieldColumns[columnState.key]) == null ? void 0 : _a.model) || ((_b = c.uaColumns[columnState.key]) == null ? void 0 : _b.model);
529
+ if (columnModel) {
530
+ columns.push(columnModel);
531
+ }
532
+ }
533
+ }
534
+ });
535
+ result.degridColumns = columns;
536
+ return result;
537
+ };
512
538
  const renderColumns = computed(() => {
539
+ const columns = [];
513
540
  if (c.isMultistageHeader) {
514
- return c.model.degridColumns || [];
541
+ const degridColumns = c.model.degridColumns || [];
542
+ degridColumns.forEach((column) => {
543
+ var _a, _b;
544
+ if (column.columnType === "GROUPGRIDCOLUMN") {
545
+ const groupColumn = calcGroupColumns(column);
546
+ if (groupColumn.degridColumns && groupColumn.degridColumns.length) {
547
+ columns.push(groupColumn);
548
+ }
549
+ } else {
550
+ const columnState = c.state.columnStates.find(
551
+ (item) => item.key === column.codeName
552
+ );
553
+ if (columnState && !columnState.hidden) {
554
+ const columnModel = ((_a = c.fieldColumns[columnState.key]) == null ? void 0 : _a.model) || ((_b = c.uaColumns[columnState.key]) == null ? void 0 : _b.model);
555
+ if (columnModel) {
556
+ columns.push(columnModel);
557
+ }
558
+ }
559
+ }
560
+ });
561
+ return columns;
515
562
  }
516
- const columns = [];
517
563
  c.state.columnStates.forEach((item) => {
518
564
  var _a, _b;
519
565
  if (item.hidden) {
@@ -1 +1 @@
1
- .ibiz-row-edit-popover{position:absolute;z-index:2;padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);background-color:var(--ibiz-control-grid-row-edit-bg-color)}.ibiz-row-edit-popover.is-hidden{top:-9999px;left:-9999px;z-index:-9999}.ibiz-row-edit-popover::before{position:absolute;top:0;left:-50px;width:0;height:0;content:"";border-color:transparent var(--ibiz-control-grid-row-edit-bg-color) transparent transparent;border-style:solid;border-width:0 50px 50px 0}.ibiz-row-edit-popover::after{position:absolute;top:0;right:-50px;width:0;height:0;content:"";border-color:transparent transparent transparent var(--ibiz-control-grid-row-edit-bg-color);border-style:solid;border-width:0 0 50px 50px}.row-edit-popover__placeholder{height:50px}
1
+ .ibiz-row-edit-popover{position:absolute;z-index:2;padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);white-space:nowrap;background-color:var(--ibiz-control-grid-row-edit-bg-color)}.ibiz-row-edit-popover.is-hidden{top:-9999px;left:-9999px;z-index:-9999}.ibiz-row-edit-popover::before{position:absolute;top:0;left:-50px;width:0;height:0;content:"";border-color:transparent var(--ibiz-control-grid-row-edit-bg-color) transparent transparent;border-style:solid;border-width:0 50px 50px 0}.ibiz-row-edit-popover::after{position:absolute;top:0;right:-50px;width:0;height:0;content:"";border-color:transparent transparent transparent var(--ibiz-control-grid-row-edit-bg-color);border-style:solid;border-width:0 0 50px 50px}.row-edit-popover__placeholder{height:50px}
@@ -235,7 +235,12 @@ const KanbanControl = /* @__PURE__ */ defineComponent({
235
235
  const findIndex = c.state.selectedData.findIndex((data) => {
236
236
  return data.srfkey === item.srfkey;
237
237
  });
238
- const cardClass = [ns.b("item"), ns.is("selected", findIndex !== -1), ns.is("disabled", disabled.value)];
238
+ const cardClass = [
239
+ ns.b("item"),
240
+ ns.is("selected", findIndex !== -1),
241
+ // 数据更新时不允许拖拽,鼠标变为禁用
242
+ ns.is("disabled", c.state.draggable && c.state.updating)
243
+ ];
239
244
  const cardStyle = {};
240
245
  if (c.model.cardWidth) {
241
246
  cardStyle.width = "".concat(c.model.cardWidth, "px");
@@ -5,6 +5,7 @@ import './ibiz-checkbox-list.scss';
5
5
  *
6
6
  * @description 使用el-checkbox-group组件,通过选项框组选择多项数据,该组件通常用于绘制代码表。支持编辑器类型包含:`选项框列表`
7
7
  * @primary
8
+ * @editorparams {name:rowNumber,parameterType:number | undefined,description:设置每行呈现的多选框个数}
8
9
  * @ignoreprops autoFocus | overflowMode
9
10
  * @ignoreemits blur | focus | enter
10
11
  */
@@ -0,0 +1 @@
1
+ export * from './transfer/transfer';
@@ -0,0 +1,3 @@
1
+ export { TransferSelect } from './transfer/transfer.mjs';
2
+
3
+ "use strict";
@@ -0,0 +1,2 @@
1
+ export declare const arrowLeft: () => JSX.Element;
2
+ export declare const arrowRight: () => JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { createVNode } from 'vue';
2
+
3
+ "use strict";
4
+ const arrowLeft = () => createVNode("svg", {
5
+ "xmlns": "http://www.w3.org/2000/svg",
6
+ "viewBox": "0 0 1024 1024"
7
+ }, [createVNode("path", {
8
+ "fill": "currentColor",
9
+ "d": "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"
10
+ }, null)]);
11
+ const arrowRight = () => createVNode("svg", {
12
+ "xmlns": "http://www.w3.org/2000/svg",
13
+ "viewBox": "0 0 1024 1024"
14
+ }, [createVNode("path", {
15
+ "fill": "currentColor",
16
+ "d": "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
17
+ }, null)]);
18
+
19
+ export { arrowLeft, arrowRight };
@@ -0,0 +1,99 @@
1
+ import type { ExtractPropTypes, h as H, PropType, VNode } from 'vue';
2
+ export declare const UPDATE_MODEL_EVENT = "update:modelValue";
3
+ export declare const CHANGE_EVENT = "change";
4
+ export declare const INPUT_EVENT = "input";
5
+ export declare const LEFT_CHECK_CHANGE_EVENT = "leftCheckChange";
6
+ export declare const RIGHT_CHECK_CHANGE_EVENT = "rightCheckChange";
7
+ export declare const LEFT_AC_SEARCH = "leftAcSearch";
8
+ export type TransferKey = string | number;
9
+ export type TransferDirection = 'left' | 'right';
10
+ export type renderContent = (h: typeof H, option: IData) => VNode | VNode[];
11
+ export interface TransferFormat {
12
+ noChecked?: string;
13
+ hasChecked?: string;
14
+ }
15
+ export interface TransferPropsAlias {
16
+ label?: string;
17
+ key?: string;
18
+ disabled?: string;
19
+ }
20
+ export interface TransferCheckedState {
21
+ leftChecked: TransferKey[];
22
+ rightChecked: TransferKey[];
23
+ }
24
+ export declare const transferCheckedChangeFn: (value: TransferKey[], movedKeys?: TransferKey[]) => boolean;
25
+ export declare const transferProps: {
26
+ data: {
27
+ type: PropType<import("@ibiz-template/core").IApiData>;
28
+ default: () => IData;
29
+ };
30
+ titles: {
31
+ type: PropType<string[]>;
32
+ default: () => Array<string>;
33
+ };
34
+ buttonTexts: {
35
+ type: PropType<string[]>;
36
+ default: () => Array<string>;
37
+ };
38
+ filterPlaceholder: StringConstructor;
39
+ filterMethod: {
40
+ type: PropType<(query: string, item: IData) => boolean>;
41
+ };
42
+ rightSearchMethod: {
43
+ type: PropType<(query: string) => IData[]>;
44
+ };
45
+ leftDefaultChecked: {
46
+ type: PropType<TransferKey[]>;
47
+ default: () => Array<TransferKey>;
48
+ };
49
+ rightDefaultChecked: {
50
+ type: PropType<TransferKey[]>;
51
+ default: () => Array<TransferKey>;
52
+ };
53
+ renderContent: {
54
+ type: PropType<renderContent>;
55
+ };
56
+ modelValue: {
57
+ type: PropType<TransferKey[]>;
58
+ default: () => Array<TransferKey>;
59
+ };
60
+ format: {
61
+ type: PropType<TransferFormat>;
62
+ default: () => TransferFormat;
63
+ };
64
+ filterable: BooleanConstructor;
65
+ props: {
66
+ type: PropType<TransferPropsAlias>;
67
+ default: () => TransferPropsAlias;
68
+ };
69
+ targetOrder: {
70
+ type: StringConstructor;
71
+ values: string[];
72
+ default: string;
73
+ };
74
+ enableRemoteSearch: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ validateEvent: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ loading: {
83
+ type: BooleanConstructor;
84
+ default: boolean;
85
+ };
86
+ readonly: {
87
+ type: BooleanConstructor;
88
+ default: boolean;
89
+ };
90
+ };
91
+ export type TransferProps = ExtractPropTypes<typeof transferProps>;
92
+ export declare const transferEmits: {
93
+ change: (value: TransferKey[], direction: TransferDirection, movedKeys: TransferKey[]) => boolean;
94
+ "update:modelValue": (value: TransferKey[]) => boolean;
95
+ leftCheckChange: (value: TransferKey[], movedKeys?: TransferKey[]) => boolean;
96
+ rightCheckChange: (value: TransferKey[], movedKeys?: TransferKey[]) => boolean;
97
+ leftAcSearch: (query: string) => string;
98
+ };
99
+ export type TransferEmits = typeof transferEmits;
@@ -0,0 +1,89 @@
1
+ import { isArray, isNil } from 'lodash-es';
2
+
3
+ "use strict";
4
+ const UPDATE_MODEL_EVENT = "update:modelValue";
5
+ const CHANGE_EVENT = "change";
6
+ const INPUT_EVENT = "input";
7
+ const LEFT_CHECK_CHANGE_EVENT = "leftCheckChange";
8
+ const RIGHT_CHECK_CHANGE_EVENT = "rightCheckChange";
9
+ const LEFT_AC_SEARCH = "leftAcSearch";
10
+ const transferCheckedChangeFn = (value, movedKeys) => [value, movedKeys].every(isArray) || isArray(value) && isNil(movedKeys);
11
+ const transferProps = {
12
+ data: {
13
+ type: Array,
14
+ default: () => []
15
+ },
16
+ titles: {
17
+ type: Array,
18
+ default: () => []
19
+ },
20
+ buttonTexts: {
21
+ type: Array,
22
+ default: () => []
23
+ },
24
+ filterPlaceholder: String,
25
+ filterMethod: {
26
+ type: Function
27
+ },
28
+ rightSearchMethod: {
29
+ type: Function
30
+ },
31
+ leftDefaultChecked: {
32
+ type: Array,
33
+ default: () => []
34
+ },
35
+ rightDefaultChecked: {
36
+ type: Array,
37
+ default: () => []
38
+ },
39
+ renderContent: {
40
+ type: Function
41
+ },
42
+ modelValue: {
43
+ type: Array,
44
+ default: () => []
45
+ },
46
+ format: {
47
+ type: Object,
48
+ default: () => ({})
49
+ },
50
+ filterable: Boolean,
51
+ props: {
52
+ type: Object,
53
+ default: () => ({
54
+ label: "label",
55
+ key: "key",
56
+ disabled: "disabled"
57
+ })
58
+ },
59
+ targetOrder: {
60
+ type: String,
61
+ values: ["original", "push", "unshift"],
62
+ default: "original"
63
+ },
64
+ enableRemoteSearch: {
65
+ type: Boolean,
66
+ default: false
67
+ },
68
+ validateEvent: {
69
+ type: Boolean,
70
+ default: true
71
+ },
72
+ loading: {
73
+ type: Boolean,
74
+ default: false
75
+ },
76
+ readonly: {
77
+ type: Boolean,
78
+ default: false
79
+ }
80
+ };
81
+ const transferEmits = {
82
+ [CHANGE_EVENT]: (value, direction, movedKeys) => [value, movedKeys].every(isArray) && ["left", "right"].includes(direction),
83
+ [UPDATE_MODEL_EVENT]: (value) => isArray(value),
84
+ [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,
85
+ [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,
86
+ [LEFT_AC_SEARCH]: (query) => query
87
+ };
88
+
89
+ export { CHANGE_EVENT, INPUT_EVENT, LEFT_AC_SEARCH, LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, UPDATE_MODEL_EVENT, transferCheckedChangeFn, transferEmits, transferProps };
@@ -0,0 +1,17 @@
1
+ import type { ComputedRef, SetupContext } from 'vue';
2
+ import type { TransferCheckedState, TransferEmits, TransferKey, TransferProps, TransferPropsAlias } from './interface';
3
+ export declare const usePropsAlias: (props: {
4
+ props: TransferPropsAlias;
5
+ }) => ComputedRef;
6
+ export declare const useComputedData: (props: TransferProps) => {
7
+ sourceData: ComputedRef;
8
+ targetData: ComputedRef;
9
+ };
10
+ export declare const useCheckedChange: (checkedState: TransferCheckedState, emit: SetupContext<TransferEmits>['emit']) => {
11
+ onSourceCheckedChange: (val: TransferKey[], movedKeys?: TransferKey[]) => void;
12
+ onTargetCheckedChange: (val: TransferKey[], movedKeys?: TransferKey[]) => void;
13
+ };
14
+ export declare const useMove: (props: TransferProps, checkedState: TransferCheckedState, emit: SetupContext<TransferEmits>['emit']) => {
15
+ addToLeft: () => void;
16
+ addToRight: () => void;
17
+ };
@@ -0,0 +1,103 @@
1
+ import { computed } from 'vue';
2
+ import { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, UPDATE_MODEL_EVENT, CHANGE_EVENT } from './interface.mjs';
3
+
4
+ "use strict";
5
+ const usePropsAlias = (props) => {
6
+ const initProps = {
7
+ label: "label",
8
+ key: "key",
9
+ disabled: "disabled"
10
+ };
11
+ return computed(() => ({
12
+ ...initProps,
13
+ ...props.props
14
+ }));
15
+ };
16
+ const useComputedData = (props) => {
17
+ const propsAlias = usePropsAlias(props);
18
+ const dataObj = computed(
19
+ () => props.data.reduce(
20
+ // eslint-disable-next-line no-return-assign, no-param-reassign
21
+ (o, cur) => (o[cur[propsAlias.value.key]] = cur) && o,
22
+ {}
23
+ )
24
+ );
25
+ const sourceData = computed(
26
+ () => props.data.filter(
27
+ (item) => !props.modelValue.includes(item[propsAlias.value.key])
28
+ )
29
+ );
30
+ const targetData = computed(() => {
31
+ if (props.targetOrder === "original") {
32
+ return props.data.filter(
33
+ (item) => props.modelValue.includes(item[propsAlias.value.key])
34
+ );
35
+ }
36
+ return props.modelValue.reduce((arr, cur) => {
37
+ const val = dataObj.value[cur];
38
+ if (val) {
39
+ arr.push(val);
40
+ }
41
+ return arr;
42
+ }, []);
43
+ });
44
+ return {
45
+ sourceData,
46
+ targetData
47
+ };
48
+ };
49
+ const useCheckedChange = (checkedState, emit) => {
50
+ const onSourceCheckedChange = (val, movedKeys) => {
51
+ checkedState.leftChecked = val;
52
+ if (!movedKeys)
53
+ return;
54
+ emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys);
55
+ };
56
+ const onTargetCheckedChange = (val, movedKeys) => {
57
+ checkedState.rightChecked = val;
58
+ if (!movedKeys)
59
+ return;
60
+ emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys);
61
+ };
62
+ return {
63
+ onSourceCheckedChange,
64
+ onTargetCheckedChange
65
+ };
66
+ };
67
+ const useMove = (props, checkedState, emit) => {
68
+ const propsAlias = usePropsAlias(props);
69
+ const _emit = (value, direction, movedKeys) => {
70
+ emit(UPDATE_MODEL_EVENT, value);
71
+ emit(CHANGE_EVENT, value, direction, movedKeys);
72
+ };
73
+ const addToLeft = () => {
74
+ const currentValue = props.modelValue.slice();
75
+ checkedState.rightChecked.forEach((item) => {
76
+ const index = currentValue.indexOf(item);
77
+ if (index > -1) {
78
+ currentValue.splice(index, 1);
79
+ }
80
+ });
81
+ _emit(currentValue, "left", checkedState.rightChecked);
82
+ };
83
+ const addToRight = () => {
84
+ let currentValue = props.modelValue.slice();
85
+ const itemsToBeMoved = props.data.filter((item) => {
86
+ const itemKey = item[propsAlias.value.key];
87
+ return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey);
88
+ }).map((item) => item[propsAlias.value.key]);
89
+ currentValue = props.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved);
90
+ if (props.targetOrder === "original") {
91
+ currentValue = props.data.filter(
92
+ (item) => currentValue.includes(item[propsAlias.value.key])
93
+ ).map((item) => item[propsAlias.value.key]);
94
+ }
95
+ _emit(currentValue, "right", checkedState.leftChecked);
96
+ };
97
+ return {
98
+ addToLeft,
99
+ addToRight
100
+ };
101
+ };
102
+
103
+ export { useCheckedChange, useComputedData, useMove, usePropsAlias };
@@ -0,0 +1 @@
1
+ .ibiz-transfer__buttons{display:inline-block;padding:0 1.875rem;vertical-align:middle}.ibiz-transfer__button{vertical-align:top}.ibiz-transfer__button:nth-child(2){margin:0 0 0 10px}.ibiz-transfer__button i,.ibiz-transfer__button span{font-size:var(--ibiz-font-size-header-6)}.ibiz-transfer__button .el-icon{font-size:var(--ibiz-font-size-regular)}