@ibiz-template/vue3-components 0.7.4 → 0.7.5

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 (61) hide show
  1. package/dist/index-QdhEqiEH.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-iqcGVBHE.js} +1 -1
  5. package/es/common/rawitem/rawitem.mjs +5 -3
  6. package/es/common/view-message/view-message.d.ts +1 -0
  7. package/es/common/view-message/view-message.mjs +5 -1
  8. package/es/control/app-menu/app-menu.mjs +5 -3
  9. package/es/control/drbar/drbar.mjs +9 -4
  10. package/es/control/drtab/drtab.controller.mjs +3 -0
  11. package/es/control/drtab/drtab.mjs +17 -5
  12. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +5 -4
  13. package/es/control/grid/grid/grid-control.util.d.ts +3 -0
  14. package/es/control/grid/grid/grid-control.util.mjs +97 -1
  15. package/es/control/grid/grid/grid.mjs +8 -1
  16. package/es/control/grid/grid/index.mjs +1 -1
  17. package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +1 -0
  18. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +14 -3
  19. package/es/control/grid/grid-column/grid-field-column/index.d.ts +1 -0
  20. package/es/control/grid/index.mjs +1 -1
  21. package/es/control/index.mjs +1 -1
  22. package/es/control/tree/tree.mjs +9 -4
  23. package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +1 -1
  24. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +7 -1
  25. package/es/editor/code/monaco-editor/monaco-editor.mjs +13 -1
  26. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +1 -1
  27. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +7 -1
  28. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +7 -1
  29. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +7 -1
  30. package/es/editor/span/span/span.mjs +7 -1
  31. package/es/index.mjs +1 -1
  32. package/es/panel-component/nav-pos-index/nav-pos-index.controller.d.ts +27 -0
  33. package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +43 -0
  34. package/es/panel-component/nav-pos-index/nav-pos-index.mjs +3 -0
  35. package/lib/common/rawitem/rawitem.cjs +5 -3
  36. package/lib/common/view-message/view-message.cjs +5 -1
  37. package/lib/control/app-menu/app-menu.cjs +5 -3
  38. package/lib/control/drbar/drbar.cjs +8 -3
  39. package/lib/control/drtab/drtab.cjs +16 -4
  40. package/lib/control/drtab/drtab.controller.cjs +3 -0
  41. package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +5 -4
  42. package/lib/control/grid/grid/grid-control.util.cjs +97 -0
  43. package/lib/control/grid/grid/grid.cjs +7 -0
  44. package/lib/control/grid/grid/index.cjs +1 -0
  45. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +13 -2
  46. package/lib/control/grid/index.cjs +1 -0
  47. package/lib/control/index.cjs +1 -0
  48. package/lib/control/tree/tree.cjs +8 -3
  49. package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +1 -1
  50. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +6 -0
  51. package/lib/editor/code/monaco-editor/monaco-editor.cjs +13 -1
  52. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +1 -1
  53. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +6 -0
  54. package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +6 -0
  55. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +6 -0
  56. package/lib/editor/span/span/span.cjs +6 -0
  57. package/lib/index.cjs +1 -0
  58. package/lib/panel-component/nav-pos-index/nav-pos-index.cjs +3 -0
  59. package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +43 -0
  60. package/package.json +6 -6
  61. package/dist/index-36xAWDJE.js +0 -4
@@ -29,7 +29,7 @@ const IBizRawItem = /* @__PURE__ */ defineComponent({
29
29
  }
30
30
  const rawItemType = ref(props.type || contentType || "");
31
31
  const rawItemContent = ref("");
32
- let sysImage = null;
32
+ let sysImage;
33
33
  if (contentType === "IMAGE") {
34
34
  sysImage = rawItem.sysImage;
35
35
  }
@@ -69,7 +69,7 @@ const IBizRawItem = /* @__PURE__ */ defineComponent({
69
69
  const rawItemText = ref("");
70
70
  const convertValue = () => {
71
71
  if (rawItemType.value === "IMAGE") {
72
- if (typeof props.content === "string") {
72
+ if (props.content && typeof props.content === "string") {
73
73
  if (isImg(props.content)) {
74
74
  rawItemContent.value = {
75
75
  imagePath: props.content
@@ -79,6 +79,8 @@ const IBizRawItem = /* @__PURE__ */ defineComponent({
79
79
  cssClass: props.content
80
80
  };
81
81
  }
82
+ } else if (sysImage) {
83
+ rawItemContent.value = sysImage;
82
84
  }
83
85
  }
84
86
  if (["TEXT", "HEADING1", "HEADING2", "HEADING3", "HEADING4", "HEADING5", "HEADING6", "PARAGRAPH", "HTML", "RAW"].includes(rawItemType.value)) {
@@ -122,7 +124,7 @@ const IBizRawItem = /* @__PURE__ */ defineComponent({
122
124
  };
123
125
  convertValue();
124
126
  watch(() => props.content, (newVal, oldVal) => {
125
- if (newVal !== oldVal) {
127
+ if (newVal && newVal !== oldVal) {
126
128
  rawItemContent.value = newVal;
127
129
  convertValue();
128
130
  }
@@ -25,6 +25,7 @@ export declare const ViewMessage: import("vue").DefineComponent<{
25
25
  ns: import("@ibiz-template/core").Namespace;
26
26
  getType: (messageType?: string) => string;
27
27
  items: import("vue").Ref<{
28
+ key: string;
28
29
  position: string | undefined;
29
30
  messageType?: string | undefined;
30
31
  removeMode?: number | undefined;
@@ -67,11 +67,15 @@ const ViewMessage = /* @__PURE__ */ defineComponent({
67
67
  });
68
68
  const handleAlertClose = (index) => {
69
69
  items.value[index].hidden = true;
70
- const isHiddenCarouse = items.value.every((item) => item.hidden);
70
+ const isHiddenCarouse = items.value.every((item2) => item2.hidden);
71
71
  if (isHiddenCarouse) {
72
72
  isHiddenContainer.value = true;
73
73
  }
74
74
  uuid.value = createUUID();
75
+ const item = items.value[index];
76
+ if (item.removeMode === 1) {
77
+ localStorage.setItem(item.key, "1");
78
+ }
75
79
  };
76
80
  const handleChange = (index) => {
77
81
  initialIndex.value = index;
@@ -190,6 +190,9 @@ const AppMenuControl = /* @__PURE__ */ defineComponent({
190
190
  defaultActive.value = activeMenu ? activeMenu.id : "";
191
191
  }
192
192
  });
193
+ const fn = (data) => {
194
+ counterData.value = data;
195
+ };
193
196
  c.evt.on("onMounted", async () => {
194
197
  const allItems = c.getAllItems();
195
198
  const defaultActiveMenuItem = allItems.find((item) => {
@@ -214,13 +217,12 @@ const AppMenuControl = /* @__PURE__ */ defineComponent({
214
217
  if (counterRefId) {
215
218
  counter = c.getCounter(counterRefId);
216
219
  if (counter) {
217
- counter.onChange((data) => {
218
- counterData.value = data;
219
- });
220
+ counter.onChange(fn);
220
221
  }
221
222
  }
222
223
  });
223
224
  onUnmounted(() => {
225
+ counter == null ? void 0 : counter.offChange(fn);
224
226
  counter == null ? void 0 : counter.destroy();
225
227
  });
226
228
  const menuMode = computed(() => {
@@ -1,4 +1,4 @@
1
- import { isVNode, reactive, watch, resolveComponent, createVNode, defineComponent } from 'vue';
1
+ import { isVNode, reactive, onUnmounted, watch, resolveComponent, createVNode, defineComponent } from 'vue';
2
2
  import { useControlController, useNamespace, getNestedRoutePath, route2routePath } from '@ibiz-template/vue3-util';
3
3
  import { useRouter, useRoute } from 'vue-router';
4
4
  import { DRBarController } from './drbar.controller.mjs';
@@ -44,13 +44,18 @@ const DRBarControl = /* @__PURE__ */ defineComponent({
44
44
  const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
45
45
  const router = useRouter();
46
46
  const counterData = reactive({});
47
+ const fn = (counter) => {
48
+ Object.assign(counterData, counter);
49
+ };
47
50
  c.evt.on("onCreated", () => {
48
51
  if (c.counter) {
49
- c.counter.onChange((counter) => {
50
- Object.assign(counterData, counter);
51
- }, true);
52
+ c.counter.onChange(fn, true);
52
53
  }
53
54
  });
55
+ onUnmounted(() => {
56
+ var _a;
57
+ (_a = c.counter) == null ? void 0 : _a.offChange(fn);
58
+ });
54
59
  c.setRouter(router);
55
60
  const handleSelect = (key) => {
56
61
  c.handleSelectChange(key);
@@ -168,6 +168,9 @@ class DRTabController extends ControlController {
168
168
  sysImage: editItemSysImage,
169
169
  fullPath: this.routeDepth ? getNestedRoutePath(this.router.currentRoute.value, this.routeDepth) : ""
170
170
  });
171
+ this.state.defaultName = "";
172
+ } else {
173
+ this.state.defaultName = (dedrtabPages == null ? void 0 : dedrtabPages[0].id) || "";
171
174
  }
172
175
  dedrtabPages == null ? void 0 : dedrtabPages.forEach((item) => {
173
176
  let itemCaption = item.caption;
@@ -1,4 +1,4 @@
1
- import { isVNode, reactive, watch, resolveComponent, createVNode, defineComponent } from 'vue';
1
+ import { isVNode, reactive, onUnmounted, watch, resolveComponent, createVNode, defineComponent } from 'vue';
2
2
  import { useControlController, useNamespace, getNestedRoutePath, route2routePath } from '@ibiz-template/vue3-util';
3
3
  import { useRouter, useRoute } from 'vue-router';
4
4
  import { hasSubRoute } from '@ibiz-template/runtime';
@@ -34,13 +34,18 @@ const DRTabControl = /* @__PURE__ */ defineComponent({
34
34
  const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
35
35
  const router = useRouter();
36
36
  const counterData = reactive({});
37
+ const fn = (counter) => {
38
+ Object.assign(counterData, counter);
39
+ };
37
40
  c.evt.on("onCreated", () => {
38
41
  if (c.counter) {
39
- c.counter.onChange((counter) => {
40
- Object.assign(counterData, counter);
41
- }, true);
42
+ c.counter.onChange(fn, true);
42
43
  }
43
44
  });
45
+ onUnmounted(() => {
46
+ var _a;
47
+ (_a = c.counter) == null ? void 0 : _a.offChange(fn);
48
+ });
44
49
  c.setRouter(router);
45
50
  const handleTabChange = () => {
46
51
  c.handleTabChange();
@@ -60,10 +65,17 @@ const DRTabControl = /* @__PURE__ */ defineComponent({
60
65
  const {
61
66
  srfnav
62
67
  } = routePath.pathNodes[depth - 1];
68
+ const isRoutePushed = !!c.routeDepth && hasSubRoute(c.routeDepth);
63
69
  if (srfnav && c.state.activeName && c.state.activeName !== srfnav) {
64
70
  c.state.activeName = srfnav;
65
- const isRoutePushed = !!c.routeDepth && hasSubRoute(c.routeDepth);
66
71
  c.handleTabChange(isRoutePushed);
72
+ } else if (!srfnav) {
73
+ const routeNoSub = !!c.routeDepth && !hasSubRoute(c.routeDepth);
74
+ const doTabChange = c.state.activeName !== c.state.defaultName || routeNoSub;
75
+ if (doTabChange) {
76
+ c.state.activeName = c.state.defaultName;
77
+ c.handleTabChange(isRoutePushed);
78
+ }
67
79
  }
68
80
  }
69
81
  }
@@ -34,6 +34,9 @@ const FormTabPanel = /* @__PURE__ */ defineComponent({
34
34
  pageC.onClick(event);
35
35
  }
36
36
  };
37
+ const fn = (data) => {
38
+ counterData.value = data;
39
+ };
37
40
  onMounted(() => {
38
41
  var _a, _b;
39
42
  const defaultSlots = ((_a = slots.default) == null ? void 0 : _a.call(slots)) || [];
@@ -48,14 +51,12 @@ const FormTabPanel = /* @__PURE__ */ defineComponent({
48
51
  if (counterRefId.value) {
49
52
  counter = props.controller.getCounter(counterRefId.value);
50
53
  if (counter) {
51
- counter.onChange((data) => {
52
- counterData.value = data;
53
- });
54
+ counter.onChange(fn);
54
55
  }
55
56
  }
56
57
  });
57
58
  onUnmounted(() => {
58
- counter == null ? void 0 : counter.destroy();
59
+ counter == null ? void 0 : counter.offChange(fn);
59
60
  });
60
61
  return {
61
62
  ns,
@@ -81,3 +81,6 @@ export declare function useAppGridBase(c: GridController, props: IGridProps): {
81
81
  export declare function useGridHeaderStyle(tableRef: IData, ns: Namespace): {
82
82
  headerCssVars: IData;
83
83
  };
84
+ export declare function useGridDraggable(tableRef: IData, ns: Namespace, c: GridController): {
85
+ cleanup?: () => void;
86
+ };
@@ -1,3 +1,4 @@
1
+ import { listenJSEvent } from '@ibiz-template/core';
1
2
  import { Srfuf, ControlVO, GridRowState } from '@ibiz-template/runtime';
2
3
  import { ref, watch, nextTick, computed, watchEffect, onUnmounted } from 'vue';
3
4
 
@@ -90,6 +91,9 @@ function useITableEvent(c) {
90
91
  if (row.srfkey) {
91
92
  activeClassName += " id-".concat(row.srfkey);
92
93
  }
94
+ if (c.enableRowEditOrder) {
95
+ activeClassName += " enable-order";
96
+ }
93
97
  return activeClassName;
94
98
  }
95
99
  function handleHeaderCellClassName({
@@ -291,5 +295,97 @@ function useGridHeaderStyle(tableRef, ns) {
291
295
  headerCssVars
292
296
  };
293
297
  }
298
+ function useGridDraggable(tableRef, ns, c) {
299
+ if (!c.enableRowEditOrder || !c.model.orderValueAppDEFieldId) {
300
+ return {};
301
+ }
302
+ let draggingDom = null;
303
+ let dragIndex = 0;
304
+ let draggingKey = "";
305
+ let draggingData = null;
306
+ const cleanups = [];
307
+ const calcSrfKeyByClass = (classList) => {
308
+ let result = "";
309
+ classList.forEach((className) => {
310
+ if (className.startsWith("id-")) {
311
+ result = className.replace("id-", "");
312
+ }
313
+ });
314
+ return result;
315
+ };
316
+ const setRowDragEvent = (item) => {
317
+ item.setAttribute("draggable", "true");
318
+ const cleanDragStart = listenJSEvent(
319
+ item,
320
+ "dragstart",
321
+ (event) => {
322
+ if (event.target) {
323
+ draggingDom = event.target;
324
+ event.dataTransfer.effectAllowed = "move";
325
+ draggingKey = calcSrfKeyByClass(draggingDom.classList);
326
+ dragIndex = c.state.rows.findIndex(
327
+ (row) => row.data.srfkey === draggingKey
328
+ );
329
+ draggingData = c.state.rows[dragIndex];
330
+ }
331
+ }
332
+ );
333
+ const cleanDragEnter = listenJSEvent(
334
+ item,
335
+ "dragenter",
336
+ (event) => {
337
+ event.preventDefault();
338
+ const targetDom = event.currentTarget;
339
+ const targetKey = calcSrfKeyByClass(targetDom.classList);
340
+ const targetIndex = c.state.rows.findIndex(
341
+ (row) => row.data.srfkey === targetKey
342
+ );
343
+ if (draggingKey === targetKey || targetIndex === -1) {
344
+ return;
345
+ }
346
+ c.state.rows.splice(dragIndex, 1);
347
+ c.state.rows.splice(targetIndex, 0, draggingData);
348
+ dragIndex = targetIndex;
349
+ }
350
+ );
351
+ const cleanDragOver = listenJSEvent(
352
+ item,
353
+ "dragover",
354
+ (event) => {
355
+ event.preventDefault();
356
+ }
357
+ );
358
+ const cleanDragEnd = listenJSEvent(item, "dragend", (event) => {
359
+ event.preventDefault();
360
+ c.onDragChange();
361
+ });
362
+ cleanups.push(cleanDragStart);
363
+ cleanups.push(cleanDragEnter);
364
+ cleanups.push(cleanDragOver);
365
+ cleanups.push(cleanDragEnd);
366
+ };
367
+ watch(
368
+ [() => tableRef.value, () => c.state.isLoaded],
369
+ (table, isLoaded) => {
370
+ if (!isLoaded || !table) {
371
+ return;
372
+ }
373
+ const grid = tableRef.value.$el;
374
+ if (grid) {
375
+ const rows = grid.getElementsByClassName("el-table__row");
376
+ rows.forEach((item) => {
377
+ setRowDragEvent(item);
378
+ });
379
+ }
380
+ }
381
+ );
382
+ return {
383
+ cleanup: () => {
384
+ cleanups.forEach((cleanup) => {
385
+ cleanup();
386
+ });
387
+ }
388
+ };
389
+ }
294
390
 
295
- export { useAppGridBase, useAppGridPagination, useGridHeaderStyle, useITableEvent };
391
+ export { useAppGridBase, useAppGridPagination, useGridDraggable, useGridHeaderStyle, useITableEvent };
@@ -1,7 +1,8 @@
1
1
  import { resolveComponent, mergeProps, h, createVNode, createTextVNode, renderSlot, onUnmounted, defineComponent } from 'vue';
2
2
  import { useControlController, useNamespace, useUIStore } from '@ibiz-template/vue3-util';
3
3
  import { ScriptFactory, GridController } from '@ibiz-template/runtime';
4
- import { useITableEvent, useGridHeaderStyle, useAppGridBase } from './grid-control.util.mjs';
4
+ import { NOOP } from '@ibiz-template/core';
5
+ import { useITableEvent, useGridHeaderStyle, useGridDraggable, useAppGridBase } from './grid-control.util.mjs';
5
6
  import './grid.css';
6
7
  import { useRowEditPopover } from '../row-edit-popover/use-row-edit-popover.mjs';
7
8
  import '../../../util/index.mjs';
@@ -164,6 +165,9 @@ const GridControl = /* @__PURE__ */ defineComponent({
164
165
  const {
165
166
  headerCssVars
166
167
  } = useGridHeaderStyle(tableRef, ns);
168
+ const {
169
+ cleanup = NOOP
170
+ } = useGridDraggable(tableRef, ns, c);
167
171
  const renderNoData = () => {
168
172
  var _a;
169
173
  const {
@@ -229,6 +233,9 @@ const GridControl = /* @__PURE__ */ defineComponent({
229
233
  };
230
234
  onUnmounted(() => {
231
235
  zIndex.decrement();
236
+ if (cleanup !== NOOP) {
237
+ cleanup();
238
+ }
232
239
  });
233
240
  return {
234
241
  c,
@@ -4,7 +4,7 @@ import '../grid-column/index.mjs';
4
4
  import { IBizRowEditPopover } from '../row-edit-popover/row-edit-popover.mjs';
5
5
  import { GridControl } from './grid.mjs';
6
6
  import { GridProvider } from './grid.provider.mjs';
7
- export { useAppGridBase, useAppGridPagination, useGridHeaderStyle, useITableEvent } from './grid-control.util.mjs';
7
+ export { useAppGridBase, useAppGridPagination, useGridDraggable, useGridHeaderStyle, useITableEvent } from './grid-control.util.mjs';
8
8
  import { IBizGridFieldColumn } from '../grid-column/grid-field-column/index.mjs';
9
9
  import { IBizGridUAColumn } from '../grid-column/grid-ua-column/index.mjs';
10
10
  import { IBizGridFieldEditColumn } from '../grid-column/grid-field-edit-column/index.mjs';
@@ -22,6 +22,7 @@ export declare const GridFieldColumn: import("vue").DefineComponent<{
22
22
  codeListValue: import("vue").ComputedRef<string>;
23
23
  tooltip: import("vue").ComputedRef<string | undefined>;
24
24
  zIndex: number | undefined;
25
+ items: import("vue").Ref<readonly IData[]>;
25
26
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
27
  controller: {
27
28
  type: typeof GridFieldColumnController;
@@ -1,5 +1,5 @@
1
1
  import { computed, ref, resolveComponent, createVNode, defineComponent } from 'vue';
2
- import { useNamespace } from '@ibiz-template/vue3-util';
2
+ import { useNamespace, useCodeListListen } from '@ibiz-template/vue3-util';
3
3
  import './grid-field-column.css';
4
4
  import { GridFieldColumnController, GridRowState, ValueExUtil } from '@ibiz-template/runtime';
5
5
  import { isNotNil } from 'ramda';
@@ -51,6 +51,16 @@ const GridFieldColumn = /* @__PURE__ */ defineComponent({
51
51
  const onActionClick = async (detail, event) => {
52
52
  await props.controller.onActionClick(detail, props.row, event);
53
53
  };
54
+ const items = ref([]);
55
+ if (props.controller.codeList) {
56
+ items.value = props.controller.codeListItems;
57
+ }
58
+ const fn = (data) => {
59
+ if (data) {
60
+ items.value = data;
61
+ }
62
+ };
63
+ useCodeListListen(props.controller.model.appCodeListId, props.controller.context.srfappid, fn);
54
64
  return {
55
65
  ns,
56
66
  onCellClick,
@@ -62,7 +72,8 @@ const GridFieldColumn = /* @__PURE__ */ defineComponent({
62
72
  formatValue,
63
73
  codeListValue,
64
74
  tooltip,
65
- zIndex
75
+ zIndex,
76
+ items
66
77
  };
67
78
  },
68
79
  render() {
@@ -85,7 +96,7 @@ const GridFieldColumn = /* @__PURE__ */ defineComponent({
85
96
  } else if (c.codeList) {
86
97
  content = createVNode(resolveComponent("iBizCodeList"), {
87
98
  "class": this.ns.e("text"),
88
- "codeListItems": c.codeListItems,
99
+ "codeListItems": this.items,
89
100
  "codeList": c.codeList,
90
101
  "value": this.codeListValue,
91
102
  "onClick": this.onTextClick,
@@ -19,6 +19,7 @@ export declare const IBizGridFieldColumn: import("@ibiz-template/vue3-util").Typ
19
19
  codeListValue: import("vue").ComputedRef<string>;
20
20
  tooltip: import("vue").ComputedRef<string | undefined>;
21
21
  zIndex: number | undefined;
22
+ items: import("vue").Ref<readonly IData[]>;
22
23
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
24
  controller: {
24
25
  type: typeof import("@ibiz-template/runtime").GridFieldColumnController;
@@ -1,6 +1,6 @@
1
1
  export { IBizGridControl } from './grid/index.mjs';
2
2
  import './grid-column/index.mjs';
3
- export { useAppGridBase, useAppGridPagination, useGridHeaderStyle, useITableEvent } from './grid/grid-control.util.mjs';
3
+ export { useAppGridBase, useAppGridPagination, useGridDraggable, useGridHeaderStyle, useITableEvent } from './grid/grid-control.util.mjs';
4
4
  export { IBizGridFieldColumn } from './grid-column/grid-field-column/index.mjs';
5
5
  export { IBizGridUAColumn } from './grid-column/grid-ua-column/index.mjs';
6
6
  export { IBizGridFieldEditColumn } from './grid-column/grid-field-edit-column/index.mjs';
@@ -25,7 +25,7 @@ export { IBizMapControl } from './map/index.mjs';
25
25
  export { IBizReportPanelControl } from './report-panel/index.mjs';
26
26
  export { IBizGanttControl } from './gantt/index.mjs';
27
27
  export { IBizContextMenuControl } from './context-menu/index.mjs';
28
- export { useAppGridBase, useAppGridPagination, useGridHeaderStyle, useITableEvent } from './grid/grid/grid-control.util.mjs';
28
+ export { useAppGridBase, useAppGridPagination, useGridDraggable, useGridHeaderStyle, useITableEvent } from './grid/grid/grid-control.util.mjs';
29
29
  export { IBizGridControl } from './grid/grid/index.mjs';
30
30
  export { IBizGridFieldColumn } from './grid/grid-column/grid-field-column/index.mjs';
31
31
  export { IBizGridUAColumn } from './grid/grid-column/grid-ua-column/index.mjs';
@@ -1,4 +1,4 @@
1
- import { isVNode, ref, reactive, watch, computed, nextTick, resolveComponent, createVNode, onMounted, onUnmounted, resolveDirective, withDirectives, defineComponent } from 'vue';
1
+ import { isVNode, ref, reactive, onUnmounted, watch, computed, nextTick, resolveComponent, createVNode, onMounted, resolveDirective, withDirectives, defineComponent } from 'vue';
2
2
  import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
3
3
  import { createUUID } from 'qx-util';
4
4
  import { debounce } from 'lodash-es';
@@ -69,16 +69,21 @@ const TreeControl = /* @__PURE__ */ defineComponent({
69
69
  const c = useControlController((...args) => new TreeController(...args));
70
70
  const cascadeSelect = ref(false);
71
71
  const counterData = reactive({});
72
+ const fn = (counter) => {
73
+ Object.assign(counterData, counter);
74
+ };
72
75
  c.evt.on("onCreated", () => {
73
76
  if (c.counter) {
74
- c.counter.onChange((counter) => {
75
- Object.assign(counterData, counter);
76
- }, true);
77
+ c.counter.onChange(fn, true);
77
78
  }
78
79
  if (c.controlParams.cascadeselect) {
79
80
  cascadeSelect.value = true;
80
81
  }
81
82
  });
83
+ onUnmounted(() => {
84
+ var _a;
85
+ (_a = c.counter) == null ? void 0 : _a.offChange(fn);
86
+ });
82
87
  const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
83
88
  const treeRef = ref(null);
84
89
  const treeviewRef = ref(null);
@@ -166,7 +166,7 @@ const IBizAutoComplete = /* @__PURE__ */ defineComponent({
166
166
  "placeholder": this.c.placeHolder,
167
167
  "placement": "bottom",
168
168
  "clearable": this.autoCompleteClearable,
169
- "popper-class": [this.ns.e("transfer")],
169
+ "popper-class": this.ns.e("transfer"),
170
170
  "teleported": !this.showFormDefaultContent,
171
171
  "fetch-suggestions": this.onSearch,
172
172
  "onClear": this.onClear,
@@ -1,5 +1,5 @@
1
1
  import { isVNode, computed, ref, watch, resolveComponent, mergeProps, createVNode, defineComponent } from 'vue';
2
- import { getCheckboxListProps, getEditorEmits, useNamespace, useFocusAndBlur } from '@ibiz-template/vue3-util';
2
+ import { getCheckboxListProps, getEditorEmits, useNamespace, useCodeListListen, useFocusAndBlur } from '@ibiz-template/vue3-util';
3
3
  import { isNil } from 'ramda';
4
4
  import './ibiz-checkbox-list.css';
5
5
 
@@ -38,6 +38,12 @@ const IBizCheckboxList = /* @__PURE__ */ defineComponent({
38
38
  }
39
39
  return "str";
40
40
  });
41
+ const fn = (data) => {
42
+ if (data) {
43
+ items.value = data;
44
+ }
45
+ };
46
+ useCodeListListen(c.model.appCodeListId, c.context.srfappid, fn);
41
47
  let valueSeparator = ",";
42
48
  if (codeList && codeList.valueSeparator) {
43
49
  valueSeparator = codeList.valueSeparator;
@@ -33,6 +33,15 @@ const IBizCode = /* @__PURE__ */ defineComponent({
33
33
  }, {
34
34
  immediate: true
35
35
  });
36
+ watch(() => props.readonly, (newVal) => {
37
+ if (editor) {
38
+ editor.updateOptions({
39
+ readOnly: newVal
40
+ });
41
+ }
42
+ }, {
43
+ immediate: true
44
+ });
36
45
  const codeEditBox = ref();
37
46
  const editorInit = () => {
38
47
  nextTick(() => {
@@ -56,8 +65,11 @@ const IBizCode = /* @__PURE__ */ defineComponent({
56
65
  minimap: {
57
66
  enabled: true
58
67
  },
59
- readOnly: false,
68
+ readOnly: props.readonly,
60
69
  // 只读
70
+ readOnlyMessage: {
71
+ value: "\u5F53\u524D\u4E3A\u53EA\u8BFB\u6A21\u5F0F\uFF0C\u4E0D\u53EF\u7F16\u8F91"
72
+ },
61
73
  fontSize: 16,
62
74
  // 字体大小
63
75
  scrollBeyondLastLine: false,
@@ -259,7 +259,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
259
259
  "value-key": this.c.textName,
260
260
  "placeholder": this.c.placeHolder,
261
261
  "clearable": true,
262
- "popper-class": [this.ns.e("transfer")],
262
+ "popper-class": this.ns.e("transfer"),
263
263
  "fetch-suggestions": this.onSearch,
264
264
  "onClear": this.onClear,
265
265
  "onBlur": this.onBlur,
@@ -1,5 +1,5 @@
1
1
  import { isVNode, ref, computed, watch, nextTick, onMounted, onUnmounted, resolveComponent, mergeProps, createVNode, defineComponent } from 'vue';
2
- import { getDropdownProps, getEditorEmits, useNamespace, useClickOutside } from '@ibiz-template/vue3-util';
2
+ import { getDropdownProps, getEditorEmits, useNamespace, useCodeListListen, useClickOutside } from '@ibiz-template/vue3-util';
3
3
  import './ibiz-dropdown.css';
4
4
 
5
5
  "use strict";
@@ -197,6 +197,12 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
197
197
  }
198
198
  }
199
199
  };
200
+ const fn = (data) => {
201
+ if (data) {
202
+ items.value = data;
203
+ }
204
+ };
205
+ useCodeListListen(c.model.appCodeListId, c.context.srfappid, fn);
200
206
  onMounted(() => {
201
207
  if (editorRef.value) {
202
208
  funcs = useClickOutside(editorRef, async (_evt) => {
@@ -1,5 +1,5 @@
1
1
  import { isVNode, computed, ref, watch, resolveComponent, mergeProps, createVNode, defineComponent } from 'vue';
2
- import { getListBoxProps, getEditorEmits, useNamespace, useFocusAndBlur } from '@ibiz-template/vue3-util';
2
+ import { getListBoxProps, getEditorEmits, useNamespace, useCodeListListen, useFocusAndBlur } from '@ibiz-template/vue3-util';
3
3
  import { isNil } from 'ramda';
4
4
  import './ibiz-list-box.css';
5
5
 
@@ -52,6 +52,12 @@ const IBizListBox = /* @__PURE__ */ defineComponent({
52
52
  }
53
53
  };
54
54
  loadListBoxItems();
55
+ const fn = (data) => {
56
+ if (data) {
57
+ items.value = data;
58
+ }
59
+ };
60
+ useCodeListListen(c.model.appCodeListId, c.context.srfappid, fn);
55
61
  const currentMode = computed(() => {
56
62
  if (codeList && codeList.orMode) {
57
63
  return codeList.orMode.toLowerCase();
@@ -1,5 +1,5 @@
1
1
  import { isVNode, ref, watch, computed, resolveComponent, mergeProps, createVNode, defineComponent } from 'vue';
2
- import { getRadioProps, getEditorEmits, useNamespace, useFocusAndBlur } from '@ibiz-template/vue3-util';
2
+ import { getRadioProps, getEditorEmits, useNamespace, useCodeListListen, useFocusAndBlur } from '@ibiz-template/vue3-util';
3
3
  import './ibiz-radio.css';
4
4
  import { notNilEmpty } from 'qx-util';
5
5
 
@@ -39,6 +39,12 @@ const IBizRadio = /* @__PURE__ */ defineComponent({
39
39
  immediate: true,
40
40
  deep: true
41
41
  });
42
+ const fn = (data) => {
43
+ if (data) {
44
+ items.value = data;
45
+ }
46
+ };
47
+ useCodeListListen(c.model.appCodeListId, c.context.srfappid, fn);
42
48
  const valueText = computed(() => {
43
49
  var _a;
44
50
  return ((_a = items.value.find((item) => item.value == props.value)) == null ? void 0 : _a.text) || "";
@@ -1,5 +1,5 @@
1
1
  import { ref, watch, computed, resolveComponent, createVNode, defineComponent } from 'vue';
2
- import { getSpanProps, useNamespace, useFocusAndBlur } from '@ibiz-template/vue3-util';
2
+ import { getSpanProps, useNamespace, useCodeListListen, useFocusAndBlur } from '@ibiz-template/vue3-util';
3
3
  import './span.css';
4
4
  import { isNil } from 'ramda';
5
5
  import { DataTypes } from '@ibiz-template/core';
@@ -95,6 +95,12 @@ const IBizSpan = /* @__PURE__ */ defineComponent({
95
95
  deep: true
96
96
  });
97
97
  }
98
+ const fn = (data) => {
99
+ if (data) {
100
+ items.value = data;
101
+ }
102
+ };
103
+ useCodeListListen(c.model.appCodeListId, c.context.srfappid, fn);
98
104
  const {
99
105
  componentRef: editorRef
100
106
  } = useFocusAndBlur(() => emit("focus"), () => emit("blur"));
package/es/index.mjs CHANGED
@@ -17,7 +17,7 @@ export { IBizSplitTrigger } from './common/split-trigger/split-trigger.mjs';
17
17
  export { IBizSortBar } from './common/sort-bar/sort-bar.mjs';
18
18
  export { IBizAppMenuControl } from './control/app-menu/index.mjs';
19
19
  export { IBizAppMenuIconViewControl } from './control/app-menu-icon-view/index.mjs';
20
- export { useAppGridBase, useAppGridPagination, useGridHeaderStyle, useITableEvent } from './control/grid/grid/grid-control.util.mjs';
20
+ export { useAppGridBase, useAppGridPagination, useGridDraggable, useGridHeaderStyle, useITableEvent } from './control/grid/grid/grid-control.util.mjs';
21
21
  export { IBizGridControl } from './control/grid/grid/index.mjs';
22
22
  export { IBizGridFieldColumn } from './control/grid/grid-column/grid-field-column/index.mjs';
23
23
  export { IBizGridUAColumn } from './control/grid/grid-column/grid-ua-column/index.mjs';