@ibiz-template/vue3-components 0.7.4 → 0.7.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 (94) hide show
  1. package/dist/index-rHXmoO9Y.js +4 -0
  2. package/dist/index.min.css +1 -1
  3. package/dist/index.system.min.js +1 -1
  4. package/dist/{xlsx-util-UXWgtlzc.js → xlsx-util-QjtIWX97.js} +1 -1
  5. package/es/common/action-toolbar/action-toolbar.mjs +1 -1
  6. package/es/common/rawitem/rawitem.mjs +5 -3
  7. package/es/common/view-message/view-message.d.ts +1 -0
  8. package/es/common/view-message/view-message.mjs +5 -1
  9. package/es/control/app-menu/app-menu.mjs +5 -3
  10. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +25 -3
  11. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +19 -5
  12. package/es/control/dashboard/dashboard-design/dashboard-design.css +1 -1
  13. package/es/control/dashboard/dashboard-design/dashboard-design.mjs +18 -4
  14. package/es/control/dashboard/dashboard.d.ts +0 -1
  15. package/es/control/dashboard/dashboard.mjs +3 -11
  16. package/es/control/dashboard/index.d.ts +0 -1
  17. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +3 -6
  18. package/es/control/drbar/drbar.controller.mjs +2 -1
  19. package/es/control/drbar/drbar.mjs +9 -4
  20. package/es/control/drtab/drtab.controller.mjs +5 -1
  21. package/es/control/drtab/drtab.mjs +17 -5
  22. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +5 -4
  23. package/es/control/grid/grid/grid-control.util.d.ts +3 -0
  24. package/es/control/grid/grid/grid-control.util.mjs +97 -1
  25. package/es/control/grid/grid/grid.css +1 -1
  26. package/es/control/grid/grid/grid.d.ts +1 -0
  27. package/es/control/grid/grid/grid.mjs +41 -3
  28. package/es/control/grid/grid/index.d.ts +1 -0
  29. package/es/control/grid/grid/index.mjs +1 -1
  30. package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +1 -0
  31. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +14 -3
  32. package/es/control/grid/grid-column/grid-field-column/index.d.ts +1 -0
  33. package/es/control/grid/index.mjs +1 -1
  34. package/es/control/index.mjs +1 -1
  35. package/es/control/kanban/kanban.css +1 -1
  36. package/es/control/kanban/kanban.mjs +2 -1
  37. package/es/control/tree/tree.mjs +9 -4
  38. package/es/control/wizard-panel/wizard-panel.mjs +8 -9
  39. package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +1 -1
  40. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +7 -1
  41. package/es/editor/code/monaco-editor/monaco-editor.mjs +13 -1
  42. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +1 -1
  43. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +23 -9
  44. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +7 -1
  45. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +7 -1
  46. package/es/editor/span/span/span.mjs +7 -1
  47. package/es/index.mjs +1 -1
  48. package/es/panel-component/nav-pos-index/nav-pos-index.controller.d.ts +27 -0
  49. package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +43 -0
  50. package/es/panel-component/nav-pos-index/nav-pos-index.mjs +3 -0
  51. package/es/panel-component/panel-button/panel-button.controller.mjs +2 -0
  52. package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +13 -5
  53. package/es/view-engine/wizard-view-engine.mjs +2 -2
  54. package/lib/common/action-toolbar/action-toolbar.cjs +1 -1
  55. package/lib/common/rawitem/rawitem.cjs +5 -3
  56. package/lib/common/view-message/view-message.cjs +5 -1
  57. package/lib/control/app-menu/app-menu.cjs +5 -3
  58. package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +19 -5
  59. package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +18 -4
  60. package/lib/control/dashboard/dashboard-design/dashboard-design.css +1 -1
  61. package/lib/control/dashboard/dashboard.cjs +2 -10
  62. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +3 -6
  63. package/lib/control/drbar/drbar.cjs +8 -3
  64. package/lib/control/drbar/drbar.controller.cjs +2 -1
  65. package/lib/control/drtab/drtab.cjs +16 -4
  66. package/lib/control/drtab/drtab.controller.cjs +5 -1
  67. package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +5 -4
  68. package/lib/control/grid/grid/grid-control.util.cjs +97 -0
  69. package/lib/control/grid/grid/grid.cjs +40 -2
  70. package/lib/control/grid/grid/grid.css +1 -1
  71. package/lib/control/grid/grid/index.cjs +1 -0
  72. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +13 -2
  73. package/lib/control/grid/index.cjs +1 -0
  74. package/lib/control/index.cjs +1 -0
  75. package/lib/control/kanban/kanban.cjs +2 -1
  76. package/lib/control/kanban/kanban.css +1 -1
  77. package/lib/control/tree/tree.cjs +8 -3
  78. package/lib/control/wizard-panel/wizard-panel.cjs +8 -9
  79. package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +1 -1
  80. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +6 -0
  81. package/lib/editor/code/monaco-editor/monaco-editor.cjs +13 -1
  82. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +1 -1
  83. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +22 -8
  84. package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +6 -0
  85. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +6 -0
  86. package/lib/editor/span/span/span.cjs +6 -0
  87. package/lib/index.cjs +1 -0
  88. package/lib/panel-component/nav-pos-index/nav-pos-index.cjs +3 -0
  89. package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +43 -0
  90. package/lib/panel-component/panel-button/panel-button.controller.cjs +2 -0
  91. package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +13 -5
  92. package/lib/view-engine/wizard-view-engine.cjs +2 -2
  93. package/package.json +6 -6
  94. package/dist/index-36xAWDJE.js +0 -4
@@ -1,5 +1,6 @@
1
1
  import { PanelItemController, ViewMode, Modal } from '@ibiz-template/runtime';
2
2
  import { routerCallback } from '@ibiz-template/vue3-util';
3
+ import { notNilEmpty } from 'qx-util';
3
4
  import { NavPosIndexState } from './nav-pos-index.state.mjs';
4
5
 
5
6
  "use strict";
@@ -33,6 +34,23 @@ class NavPosIndexController extends PanelItemController {
33
34
  * @type {boolean}
34
35
  */
35
36
  __publicField(this, "autoGoLast", true);
37
+ /**
38
+ * 无缓存
39
+ * @author lxm
40
+ * @date 2024-04-22 04:12:41
41
+ * @readonly
42
+ * @type {boolean}
43
+ */
44
+ __publicField(this, "noCache", false);
45
+ /**
46
+ * 自定义补充参数
47
+ *
48
+ * @author zk
49
+ * @date 2023-09-27 03:09:02
50
+ * @type {IData}
51
+ * @memberof NavPosController
52
+ */
53
+ __publicField(this, "rawItemParams", {});
36
54
  }
37
55
  createState() {
38
56
  var _a;
@@ -70,6 +88,11 @@ class NavPosIndexController extends PanelItemController {
70
88
  get appmenu() {
71
89
  return this.panel.getController("appmenu");
72
90
  }
91
+ async onInit() {
92
+ await super.onInit();
93
+ this.handleRawItemParams();
94
+ this.noCache = this.rawItemParams.expcache === "NO_CACHE";
95
+ }
73
96
  /**
74
97
  * 改变显示视图
75
98
  * @author lxm
@@ -248,6 +271,26 @@ class NavPosIndexController extends PanelItemController {
248
271
  ibiz.util.setBrowserTitle("");
249
272
  }
250
273
  }
274
+ /**
275
+ * 处理自定义补充参数 [{key:'name',value:'data'}] => {name:'data'}
276
+ *
277
+ * @author zk
278
+ * @date 2023-09-27 03:09:55
279
+ * @protected
280
+ * @memberof NavPosController
281
+ */
282
+ handleRawItemParams() {
283
+ var _a;
284
+ let params = {};
285
+ const rawItemParams = (_a = this.model.rawItem) == null ? void 0 : _a.rawItemParams;
286
+ if (notNilEmpty(rawItemParams)) {
287
+ params = rawItemParams.reduce((param, item) => {
288
+ param[item.key.toLowerCase()] = item.value;
289
+ return param;
290
+ }, {});
291
+ }
292
+ Object.assign(this.rawItemParams, params);
293
+ }
251
294
  }
252
295
 
253
296
  export { NavPosIndexController };
@@ -69,6 +69,9 @@ const NavPosIndex = /* @__PURE__ */ defineComponent({
69
69
  default: ({
70
70
  Component
71
71
  }) => {
72
+ if (this.c.noCache) {
73
+ return Component ? createVNode(Component, null, null) : null;
74
+ }
72
75
  return createVNode(resolveComponent("keepAlive"), {
73
76
  "include": cacheKeys,
74
77
  "max": 30,
@@ -97,6 +97,8 @@ class PanelButtonController extends PanelItemController {
97
97
  if (actionType === "NONE") {
98
98
  return;
99
99
  }
100
+ event.stopPropagation();
101
+ event.preventDefault();
100
102
  await UIActionUtil.execAndResolved(
101
103
  uiactionId,
102
104
  {
@@ -36,10 +36,18 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
36
36
  if ((_a = model.rawItem) == null ? void 0 : _a.rawItemParams) {
37
37
  let swipeData = [];
38
38
  const imgData = model.rawItem.rawItemParams;
39
- const configItem = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
40
- if (configItem > -1) {
41
- swipeData = imgData.slice(0, -2);
42
- getSwipeConfig(imgData.slice(-2));
39
+ const autoplayIndex = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
40
+ const timespanIndex = imgData.findIndex((item) => Object.is(item.key, "timespan"));
41
+ let number = 0;
42
+ if (autoplayIndex >= 0) {
43
+ number += 1;
44
+ }
45
+ if (timespanIndex >= 0) {
46
+ number += 1;
47
+ }
48
+ if (number > 0) {
49
+ swipeData = imgData.slice(0, -number);
50
+ getSwipeConfig(imgData.slice(-number));
43
51
  } else {
44
52
  swipeData = imgData;
45
53
  getSwipeConfig(imgData);
@@ -53,7 +61,7 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
53
61
  return {
54
62
  id,
55
63
  name: key,
56
- imgUrl: sysImage == null ? void 0 : sysImage.imagePath,
64
+ imgUrl: (sysImage == null ? void 0 : sysImage.imagePath) || (sysImage == null ? void 0 : sysImage.rawContent),
57
65
  cssClass: sysImage == null ? void 0 : sysImage.cssClass,
58
66
  linkPath: item.linkPath
59
67
  };
@@ -27,8 +27,8 @@ class WizardViewEngine extends ViewEngineBase {
27
27
  this.view.slotProps.wizardpanel = {};
28
28
  }
29
29
  this.wizardPanel.initialize();
30
- this.wizardPanel.evt.on("onFinishSuccess", (_event) => {
31
- this.view.closeView({ ok: true, data: [] });
30
+ this.wizardPanel.evt.on("onFinishSuccess", (event) => {
31
+ this.view.closeView({ ok: true, data: event.data });
32
32
  });
33
33
  }
34
34
  }
@@ -151,7 +151,7 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
151
151
  "class": this.ns.e("caption")
152
152
  }, [this.caption, vue.createVNode("ion-icon", {
153
153
  "class": this.ns.e("caption-icon"),
154
- "name": "ibiz-arrow-down"
154
+ "name": "ellipsis-vertical-outline"
155
155
  }, null)]),
156
156
  dropdown: () => vue.createVNode(vue.resolveComponent("el-dropdown-menu"), null, {
157
157
  default: () => [details.length > 0 && details.map((detail) => {
@@ -31,7 +31,7 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
31
31
  }
32
32
  const rawItemType = vue.ref(props.type || contentType || "");
33
33
  const rawItemContent = vue.ref("");
34
- let sysImage = null;
34
+ let sysImage;
35
35
  if (contentType === "IMAGE") {
36
36
  sysImage = rawItem.sysImage;
37
37
  }
@@ -71,7 +71,7 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
71
71
  const rawItemText = vue.ref("");
72
72
  const convertValue = () => {
73
73
  if (rawItemType.value === "IMAGE") {
74
- if (typeof props.content === "string") {
74
+ if (props.content && typeof props.content === "string") {
75
75
  if (isImg(props.content)) {
76
76
  rawItemContent.value = {
77
77
  imagePath: props.content
@@ -81,6 +81,8 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
81
81
  cssClass: props.content
82
82
  };
83
83
  }
84
+ } else if (sysImage) {
85
+ rawItemContent.value = sysImage;
84
86
  }
85
87
  }
86
88
  if (["TEXT", "HEADING1", "HEADING2", "HEADING3", "HEADING4", "HEADING5", "HEADING6", "PARAGRAPH", "HTML", "RAW"].includes(rawItemType.value)) {
@@ -124,7 +126,7 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
124
126
  };
125
127
  convertValue();
126
128
  vue.watch(() => props.content, (newVal, oldVal) => {
127
- if (newVal !== oldVal) {
129
+ if (newVal && newVal !== oldVal) {
128
130
  rawItemContent.value = newVal;
129
131
  convertValue();
130
132
  }
@@ -69,11 +69,15 @@ const ViewMessage = /* @__PURE__ */ vue.defineComponent({
69
69
  });
70
70
  const handleAlertClose = (index) => {
71
71
  items.value[index].hidden = true;
72
- const isHiddenCarouse = items.value.every((item) => item.hidden);
72
+ const isHiddenCarouse = items.value.every((item2) => item2.hidden);
73
73
  if (isHiddenCarouse) {
74
74
  isHiddenContainer.value = true;
75
75
  }
76
76
  uuid.value = qxUtil.createUUID();
77
+ const item = items.value[index];
78
+ if (item.removeMode === 1) {
79
+ localStorage.setItem(item.key, "1");
80
+ }
77
81
  };
78
82
  const handleChange = (index) => {
79
83
  initialIndex.value = index;
@@ -192,6 +192,9 @@ const AppMenuControl = /* @__PURE__ */ vue.defineComponent({
192
192
  defaultActive.value = activeMenu ? activeMenu.id : "";
193
193
  }
194
194
  });
195
+ const fn = (data) => {
196
+ counterData.value = data;
197
+ };
195
198
  c.evt.on("onMounted", async () => {
196
199
  const allItems = c.getAllItems();
197
200
  const defaultActiveMenuItem = allItems.find((item) => {
@@ -216,13 +219,12 @@ const AppMenuControl = /* @__PURE__ */ vue.defineComponent({
216
219
  if (counterRefId) {
217
220
  counter = c.getCounter(counterRefId);
218
221
  if (counter) {
219
- counter.onChange((data) => {
220
- counterData.value = data;
221
- });
222
+ counter.onChange(fn);
222
223
  }
223
224
  }
224
225
  });
225
226
  vue.onUnmounted(() => {
227
+ counter == null ? void 0 : counter.offChange(fn);
226
228
  counter == null ? void 0 : counter.destroy();
227
229
  });
228
230
  const menuMode = vue.computed(() => {
@@ -22,7 +22,7 @@ const CustomDashboardContainer = /* @__PURE__ */ vue.defineComponent({
22
22
  emit
23
23
  }) {
24
24
  const ns = vue3Util.useNamespace("custom-dashboard-container");
25
- const customC = vue.reactive(new runtime.CustomDashboardController(props.modelData));
25
+ const customC = vue.reactive(new runtime.CustomDashboardController(props.modelData, props.dashboard));
26
26
  const isInited = vue.ref(false);
27
27
  const isShowDesign = vue.ref(false);
28
28
  const showTypeDir = vue.ref(false);
@@ -66,13 +66,27 @@ const CustomDashboardContainer = /* @__PURE__ */ vue.defineComponent({
66
66
  const isShowDefault = vue.computed(() => {
67
67
  return customC.customModelData.length === 0;
68
68
  });
69
+ const handleCustomModelChange = async (args) => {
70
+ await props.dashboard.initPortlets(args.model);
71
+ await props.dashboard.initPortletsConfig(args.config);
72
+ };
69
73
  vue.onMounted(async () => {
70
- const model = await customC.loadCustomModelData();
71
- const tempModelDatas = convertData(model);
72
- emit("changed", {
73
- model: tempModelDatas
74
+ const response = await customC.loadCustomModelData();
75
+ const tempModelDatas = convertData(response.model);
76
+ await handleCustomModelChange({
77
+ model: tempModelDatas,
78
+ config: response.config
74
79
  });
75
80
  isInited.value = true;
81
+ props.dashboard.evt.on("onConfigChange", async (eventArgs) => {
82
+ const {
83
+ name,
84
+ config
85
+ } = eventArgs;
86
+ customC.saveCustomModelData(customC.customModelData, {
87
+ [name]: config
88
+ });
89
+ });
76
90
  });
77
91
  return {
78
92
  ns,
@@ -136,6 +136,7 @@ const DashboardDesign = /* @__PURE__ */ vue.defineComponent({
136
136
  const groups = vue.ref(result.groups);
137
137
  const filterVal = vue.ref("");
138
138
  const layoutModel = vue.ref(ramda.clone(customC.customModelData));
139
+ const layoutConfig = vue.ref(ramda.clone(customC.portletConfig));
139
140
  const providers = vue.ref({});
140
141
  const portletControllers = vue.ref({});
141
142
  const designPanel = vue.ref(null);
@@ -166,6 +167,17 @@ const DashboardDesign = /* @__PURE__ */ vue.defineComponent({
166
167
  }
167
168
  }));
168
169
  };
170
+ const initPortletsConfig = async () => {
171
+ const config = layoutConfig.value || {};
172
+ Object.keys(config).forEach((key) => {
173
+ const portlet = portletControllers.value[key];
174
+ if (portlet) {
175
+ portlet.config = config[key];
176
+ portlet.state.title = portlet.config.srftitle;
177
+ Object.assign(portlet.params, portlet.config);
178
+ }
179
+ });
180
+ };
169
181
  const getPortletByCodeName = (codeName) => {
170
182
  const app = ibiz.hub.getApp(ibiz.env.appId);
171
183
  if (app.model.appPortlets) {
@@ -193,11 +205,13 @@ const DashboardDesign = /* @__PURE__ */ vue.defineComponent({
193
205
  const preparePortlet = async () => {
194
206
  const tempModelDatas = convertData(layoutModel.value);
195
207
  await initPortlets(tempModelDatas);
208
+ await initPortletsConfig();
196
209
  };
197
210
  vue.watch(() => props.isShowDesign, async (newVal) => {
198
211
  if (newVal) {
199
- const tempData = await customC.loadCustomModelData();
200
- layoutModel.value = ramda.clone(tempData);
212
+ const res = await customC.loadCustomModelData();
213
+ layoutModel.value = ramda.clone(res.model);
214
+ layoutConfig.value = ramda.clone(res.config);
201
215
  await preparePortlet();
202
216
  }
203
217
  }, {
@@ -211,9 +225,9 @@ const DashboardDesign = /* @__PURE__ */ vue.defineComponent({
211
225
  layoutModel.value = [];
212
226
  };
213
227
  const onSave = async () => {
214
- const model = await customC.saveCustomModelData(layoutModel.value);
228
+ const res = await customC.saveCustomModelData(layoutModel.value);
215
229
  emit("saved", {
216
- model
230
+ model: res.model
217
231
  });
218
232
  };
219
233
  const removeItem = async (child) => {
@@ -1 +1 @@
1
- .ibiz-dashboard-design{width:100%;height:100%}.ibiz-dashboard-design .ibiz-dashboard-design-header{height:48px;padding:var(--ibiz-spacing-tight);display:flex;align-items:center;justify-content:space-between}.ibiz-dashboard-design .ibiz-dashboard-design-header .ibiz-dashboard-design-header-utils{display:flex;align-items:center;justify-content:flex-start}.ibiz-dashboard-design-header-utils__col-num{margin-right:var(--ibiz-spacing-tight)}.ibiz-dashboard-design-header-utils__row-h{margin-right:var(--ibiz-spacing-tight)}.ibiz-dashboard-design .ibiz-dashboard-design-content{width:100%;height:calc(100% - 48px);display:flex;align-items:flex-start;justify-content:flex-start}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree{min-width:300px;height:100%;overflow-y:scroll}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-filter{width:100%;height:32px;padding:0 var(--ibiz-spacing-tight)}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content{height:calc(100% - 32px);overflow:auto}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu{height:100%;border:none}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu .el-menu-item{display:flex;flex-flow:flex nowrap;align-items:center;justify-content:space-between}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu .el-menu-item>span{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu .el-menu-item ion-icon{cursor:pointer}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu .el-menu-item ion-icon:hover{color:var(--ibiz-color-primary)}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-scroll-box{flex-grow:1;height:100%;overflow-y:scroll;background:#efefef}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel{position:relative}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout-mask{position:absolute;inset:0;height:100%;min-height:1248px;background:linear-gradient(to bottom,var(--ibiz-color-primary) 10px,transparent 10px),linear-gradient(to right,var(--ibiz-color-primary) 10px,transparent 10px)}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item{width:100%;height:100%}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .el-card__body{display:flex;flex-flow:column nowrap;height:100%;background-color:var(--ibiz-color-white)}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .ibiz-dashboard-design-grid-layout-item-header{display:flex;align-items:center;justify-content:space-between}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .ibiz-dashboard-design-grid-layout-item-header>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .ibiz-dashboard-design-grid-layout-item-header ion-icon{cursor:pointer}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .ibiz-dashboard-design-grid-layout-item-content{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
1
+ .ibiz-dashboard-design{width:100%;height:100%}.ibiz-dashboard-design .ibiz-dashboard-design-header{height:48px;padding:var(--ibiz-spacing-tight);display:flex;align-items:center;justify-content:space-between}.ibiz-dashboard-design .ibiz-dashboard-design-header .ibiz-dashboard-design-header-utils{display:flex;align-items:center;justify-content:flex-start}.ibiz-dashboard-design-header-utils__col-num{margin-right:var(--ibiz-spacing-tight)}.ibiz-dashboard-design-header-utils__row-h{margin-right:var(--ibiz-spacing-tight)}.ibiz-dashboard-design .ibiz-dashboard-design-content{width:100%;height:calc(100% - 48px);display:flex;align-items:flex-start;justify-content:flex-start}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree{min-width:300px;height:100%;overflow-y:scroll}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-filter{width:100%;height:32px;padding:0 var(--ibiz-spacing-tight)}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content{height:calc(100% - 32px);overflow:auto}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu{height:100%;border:none}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu .el-menu-item{display:flex;flex-flow:flex nowrap;align-items:center;justify-content:space-between}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu .el-menu-item>span{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu .el-menu-item ion-icon{cursor:pointer}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-tree .ibiz-dashboard-design-tree-content>.el-menu .el-menu-item ion-icon:hover{color:var(--ibiz-color-primary)}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-scroll-box{flex-grow:1;height:100%;overflow-y:scroll;background:#efefef}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel{position:relative}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout-mask{position:absolute;inset:0;height:100%;min-height:1248px;background:linear-gradient(to bottom,var(--ibiz-color-primary) 10px,transparent 10px),linear-gradient(to right,var(--ibiz-color-primary) 10px,transparent 10px)}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item{width:100%;height:100%}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .el-card__body{display:flex;flex-flow:column nowrap;height:100%;background-color:var(--ibiz-color-white)}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .ibiz-dashboard-design-grid-layout-item-header{display:flex;align-items:center;justify-content:space-between}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .ibiz-dashboard-design-grid-layout-item-header>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .ibiz-dashboard-design-grid-layout-item-header ion-icon{cursor:pointer}.ibiz-dashboard-design .ibiz-dashboard-design-content .ibiz-dashboard-design-panel .ibiz-dashboard-design-grid-layout .ibiz-dashboard-design-grid-layout-item .ibiz-dashboard-design-grid-layout-item-content{display:flex;align-items:center;justify-content:center;width:100%;height:100%;pointer-events:none}
@@ -58,7 +58,6 @@ const DashboardControl = /* @__PURE__ */ vue.defineComponent({
58
58
  },
59
59
  setup() {
60
60
  const c = vue3Util.useControlController((...args) => new runtime.DashboardController(...args));
61
- const vue$1 = vue.getCurrentInstance().proxy;
62
61
  const customModelDatas = vue.ref([]);
63
62
  const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
64
63
  c.evt.on("onCreated", () => {
@@ -66,16 +65,10 @@ const DashboardControl = /* @__PURE__ */ vue.defineComponent({
66
65
  portlet.state = vue.reactive(portlet.state);
67
66
  });
68
67
  });
69
- const handleCustomModelChange = async (args) => {
70
- customModelDatas.value = args.model;
71
- await c.initPortlets(customModelDatas.value);
72
- vue$1.$forceUpdate();
73
- };
74
68
  return {
75
69
  c,
76
70
  ns,
77
- customModelDatas,
78
- handleCustomModelChange
71
+ customModelDatas
79
72
  };
80
73
  },
81
74
  render() {
@@ -121,8 +114,7 @@ const DashboardControl = /* @__PURE__ */ vue.defineComponent({
121
114
  }, {
122
115
  default: () => [state.isCreated && (model.enableCustomized ? vue.createVNode(vue.resolveComponent("iBizCustomDashboardContainer"), {
123
116
  "modelData": this.modelData,
124
- "dashboard": this.c,
125
- "onChanged": this.handleCustomModelChange
117
+ "dashboard": this.c
126
118
  }, _isSlot(_slot2 = renderCustomSlots()) ? _slot2 : {
127
119
  default: () => [_slot2]
128
120
  }) : renderDefaultContent())]
@@ -36,10 +36,6 @@ const PortletLayout = /* @__PURE__ */ vue.defineComponent({
36
36
  model,
37
37
  state
38
38
  } = this.controller;
39
- let title = model.title;
40
- if (model.titleLanguageRes) {
41
- title = ibiz.i18n.t(model.titleLanguageRes.lanResTag, model.title);
42
- }
43
39
  return vue.createVNode("div", {
44
40
  "class": [this.ns.b(), this.ns.is("no-header", !this.isShowHeader)]
45
41
  }, [this.isShowHeader && vue.createVNode("div", {
@@ -54,13 +50,14 @@ const PortletLayout = /* @__PURE__ */ vue.defineComponent({
54
50
  "icon": model.sysImage
55
51
  }, null), vue.createVNode("span", {
56
52
  "class": this.ns.e("caption-text"),
57
- "title": title
58
- }, [title])])]), vue.createVNode("div", {
53
+ "title": state.title
54
+ }, [state.title])])]), vue.createVNode("div", {
59
55
  "class": this.ns.be("header", "right")
60
56
  }, [model.uiactionGroup && vue.createVNode(vue.resolveComponent("iBizActionToolbar"), {
61
57
  "class": this.ns.e("toolbar"),
62
58
  "action-details": model.uiactionGroup.uiactionGroupDetails,
63
59
  "actions-state": state.actionGroupState,
60
+ "mode": model.actionGroupExtractMode === "ITEMS" ? "dropdown" : "buttons",
64
61
  "onActionClick": this.onActionClick
65
62
  }, null)])]), vue.createVNode("div", {
66
63
  "key": "content",
@@ -46,13 +46,18 @@ const DRBarControl = /* @__PURE__ */ vue.defineComponent({
46
46
  const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
47
47
  const router = vueRouter.useRouter();
48
48
  const counterData = vue.reactive({});
49
+ const fn = (counter) => {
50
+ Object.assign(counterData, counter);
51
+ };
49
52
  c.evt.on("onCreated", () => {
50
53
  if (c.counter) {
51
- c.counter.onChange((counter) => {
52
- Object.assign(counterData, counter);
53
- }, true);
54
+ c.counter.onChange(fn, true);
54
55
  }
55
56
  });
57
+ vue.onUnmounted(() => {
58
+ var _a;
59
+ (_a = c.counter) == null ? void 0 : _a.offChange(fn);
60
+ });
56
61
  c.setRouter(router);
57
62
  const handleSelect = (key) => {
58
63
  c.handleSelectChange(key);
@@ -440,7 +440,8 @@ class DRBarController extends runtime.ControlController {
440
440
  if (appCounterRef) {
441
441
  this.counter = await runtime.CounterService.getCounterByRef(
442
442
  appCounterRef,
443
- this.context
443
+ this.context,
444
+ { ...this.params }
444
445
  );
445
446
  }
446
447
  }
@@ -36,13 +36,18 @@ const DRTabControl = /* @__PURE__ */ vue.defineComponent({
36
36
  const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
37
37
  const router = vueRouter.useRouter();
38
38
  const counterData = vue.reactive({});
39
+ const fn = (counter) => {
40
+ Object.assign(counterData, counter);
41
+ };
39
42
  c.evt.on("onCreated", () => {
40
43
  if (c.counter) {
41
- c.counter.onChange((counter) => {
42
- Object.assign(counterData, counter);
43
- }, true);
44
+ c.counter.onChange(fn, true);
44
45
  }
45
46
  });
47
+ vue.onUnmounted(() => {
48
+ var _a;
49
+ (_a = c.counter) == null ? void 0 : _a.offChange(fn);
50
+ });
46
51
  c.setRouter(router);
47
52
  const handleTabChange = () => {
48
53
  c.handleTabChange();
@@ -62,10 +67,17 @@ const DRTabControl = /* @__PURE__ */ vue.defineComponent({
62
67
  const {
63
68
  srfnav
64
69
  } = routePath.pathNodes[depth - 1];
70
+ const isRoutePushed = !!c.routeDepth && runtime.hasSubRoute(c.routeDepth);
65
71
  if (srfnav && c.state.activeName && c.state.activeName !== srfnav) {
66
72
  c.state.activeName = srfnav;
67
- const isRoutePushed = !!c.routeDepth && runtime.hasSubRoute(c.routeDepth);
68
73
  c.handleTabChange(isRoutePushed);
74
+ } else if (!srfnav) {
75
+ const routeNoSub = !!c.routeDepth && !runtime.hasSubRoute(c.routeDepth);
76
+ const doTabChange = c.state.activeName !== c.state.defaultName || routeNoSub;
77
+ if (doTabChange) {
78
+ c.state.activeName = c.state.defaultName;
79
+ c.handleTabChange(isRoutePushed);
80
+ }
69
81
  }
70
82
  }
71
83
  }
@@ -170,6 +170,9 @@ class DRTabController extends runtime.ControlController {
170
170
  sysImage: editItemSysImage,
171
171
  fullPath: this.routeDepth ? vue3Util.getNestedRoutePath(this.router.currentRoute.value, this.routeDepth) : ""
172
172
  });
173
+ this.state.defaultName = "";
174
+ } else {
175
+ this.state.defaultName = (dedrtabPages == null ? void 0 : dedrtabPages[0].id) || "";
173
176
  }
174
177
  dedrtabPages == null ? void 0 : dedrtabPages.forEach((item) => {
175
178
  let itemCaption = item.caption;
@@ -304,7 +307,8 @@ class DRTabController extends runtime.ControlController {
304
307
  if (appCounterRef) {
305
308
  this.counter = await runtime.CounterService.getCounterByRef(
306
309
  appCounterRef,
307
- this.context
310
+ this.context,
311
+ { ...this.params }
308
312
  );
309
313
  }
310
314
  }
@@ -38,6 +38,9 @@ const FormTabPanel = /* @__PURE__ */ vue.defineComponent({
38
38
  pageC.onClick(event);
39
39
  }
40
40
  };
41
+ const fn = (data) => {
42
+ counterData.value = data;
43
+ };
41
44
  vue.onMounted(() => {
42
45
  var _a, _b;
43
46
  const defaultSlots = ((_a = slots.default) == null ? void 0 : _a.call(slots)) || [];
@@ -52,14 +55,12 @@ const FormTabPanel = /* @__PURE__ */ vue.defineComponent({
52
55
  if (counterRefId.value) {
53
56
  counter = props.controller.getCounter(counterRefId.value);
54
57
  if (counter) {
55
- counter.onChange((data) => {
56
- counterData.value = data;
57
- });
58
+ counter.onChange(fn);
58
59
  }
59
60
  }
60
61
  });
61
62
  vue.onUnmounted(() => {
62
- counter == null ? void 0 : counter.destroy();
63
+ counter == null ? void 0 : counter.offChange(fn);
63
64
  });
64
65
  return {
65
66
  ns,
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var core = require('@ibiz-template/core');
3
4
  var runtime = require('@ibiz-template/runtime');
4
5
  var vue = require('vue');
5
6
 
@@ -92,6 +93,9 @@ function useITableEvent(c) {
92
93
  if (row.srfkey) {
93
94
  activeClassName += " id-".concat(row.srfkey);
94
95
  }
96
+ if (c.enableRowEditOrder) {
97
+ activeClassName += " enable-order";
98
+ }
95
99
  return activeClassName;
96
100
  }
97
101
  function handleHeaderCellClassName({
@@ -293,8 +297,101 @@ function useGridHeaderStyle(tableRef, ns) {
293
297
  headerCssVars
294
298
  };
295
299
  }
300
+ function useGridDraggable(tableRef, ns, c) {
301
+ if (!c.enableRowEditOrder || !c.model.orderValueAppDEFieldId) {
302
+ return {};
303
+ }
304
+ let draggingDom = null;
305
+ let dragIndex = 0;
306
+ let draggingKey = "";
307
+ let draggingData = null;
308
+ const cleanups = [];
309
+ const calcSrfKeyByClass = (classList) => {
310
+ let result = "";
311
+ classList.forEach((className) => {
312
+ if (className.startsWith("id-")) {
313
+ result = className.replace("id-", "");
314
+ }
315
+ });
316
+ return result;
317
+ };
318
+ const setRowDragEvent = (item) => {
319
+ item.setAttribute("draggable", "true");
320
+ const cleanDragStart = core.listenJSEvent(
321
+ item,
322
+ "dragstart",
323
+ (event) => {
324
+ if (event.target) {
325
+ draggingDom = event.target;
326
+ event.dataTransfer.effectAllowed = "move";
327
+ draggingKey = calcSrfKeyByClass(draggingDom.classList);
328
+ dragIndex = c.state.rows.findIndex(
329
+ (row) => row.data.srfkey === draggingKey
330
+ );
331
+ draggingData = c.state.rows[dragIndex];
332
+ }
333
+ }
334
+ );
335
+ const cleanDragEnter = core.listenJSEvent(
336
+ item,
337
+ "dragenter",
338
+ (event) => {
339
+ event.preventDefault();
340
+ const targetDom = event.currentTarget;
341
+ const targetKey = calcSrfKeyByClass(targetDom.classList);
342
+ const targetIndex = c.state.rows.findIndex(
343
+ (row) => row.data.srfkey === targetKey
344
+ );
345
+ if (draggingKey === targetKey || targetIndex === -1) {
346
+ return;
347
+ }
348
+ c.state.rows.splice(dragIndex, 1);
349
+ c.state.rows.splice(targetIndex, 0, draggingData);
350
+ dragIndex = targetIndex;
351
+ }
352
+ );
353
+ const cleanDragOver = core.listenJSEvent(
354
+ item,
355
+ "dragover",
356
+ (event) => {
357
+ event.preventDefault();
358
+ }
359
+ );
360
+ const cleanDragEnd = core.listenJSEvent(item, "dragend", (event) => {
361
+ event.preventDefault();
362
+ c.onDragChange();
363
+ });
364
+ cleanups.push(cleanDragStart);
365
+ cleanups.push(cleanDragEnter);
366
+ cleanups.push(cleanDragOver);
367
+ cleanups.push(cleanDragEnd);
368
+ };
369
+ vue.watch(
370
+ [() => tableRef.value, () => c.state.isLoaded],
371
+ (table, isLoaded) => {
372
+ if (!isLoaded || !table) {
373
+ return;
374
+ }
375
+ const grid = tableRef.value.$el;
376
+ if (grid) {
377
+ const rows = grid.getElementsByClassName("el-table__row");
378
+ rows.forEach((item) => {
379
+ setRowDragEvent(item);
380
+ });
381
+ }
382
+ }
383
+ );
384
+ return {
385
+ cleanup: () => {
386
+ cleanups.forEach((cleanup) => {
387
+ cleanup();
388
+ });
389
+ }
390
+ };
391
+ }
296
392
 
297
393
  exports.useAppGridBase = useAppGridBase;
298
394
  exports.useAppGridPagination = useAppGridPagination;
395
+ exports.useGridDraggable = useGridDraggable;
299
396
  exports.useGridHeaderStyle = useGridHeaderStyle;
300
397
  exports.useITableEvent = useITableEvent;