@ibiz-template/vue3-components 0.7.41-alpha.36 → 0.7.41-alpha.38

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 (82) hide show
  1. package/dist/ibiz-markdown-editor-qRaayafj.js +1 -0
  2. package/dist/index-BiYphJ2f.js +11 -0
  3. package/dist/{index-BFGNWF-0.js → index-C28lnh2e.js} +1 -1
  4. package/dist/{index-BiFsbM1Y.js → index-Dp8ExwuL.js} +1 -1
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.system.min.js +1 -1
  7. package/dist/wang-editor-DDVqSnRX.js +1 -0
  8. package/dist/{xlsx-util-CxXULY47.js → xlsx-util-BMANxyk-.js} +1 -1
  9. package/es/control/calendar/calendar.mjs +33 -8
  10. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.mjs +10 -0
  11. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.mjs +30 -0
  12. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +114 -85
  13. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.css +1 -0
  14. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.mjs +309 -0
  15. package/es/control/tab-exp-panel/tab-exp-panel.mjs +4 -17
  16. package/es/editor/code/code-editor.controller.mjs +176 -1
  17. package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
  18. package/es/editor/code/monaco-editor/monaco-editor.mjs +116 -6
  19. package/es/editor/html/html-editor.controller.mjs +77 -2
  20. package/es/editor/html/wang-editor/index.mjs +1 -0
  21. package/es/editor/html/wang-editor/module/index.mjs +1 -0
  22. package/es/editor/html/wang-editor/module/inline-ai-module.mjs +95 -0
  23. package/es/editor/html/wang-editor/wang-editor.css +1 -1
  24. package/es/editor/html/wang-editor/wang-editor.mjs +35 -4
  25. package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +45 -0
  26. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  27. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +109 -13
  28. package/es/editor/markdown/markdown-editor.controller.mjs +113 -1
  29. package/es/editor/text-box/input/input.css +1 -1
  30. package/es/index.mjs +1 -0
  31. package/es/locale/en/index.mjs +15 -2
  32. package/es/locale/zh-CN/index.mjs +15 -2
  33. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.mjs +1 -1
  34. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.mjs +2 -2
  35. package/es/util/ai-util/ai-util.mjs +6 -2
  36. package/es/util/app-util/app-util.mjs +41 -2
  37. package/es/util/index.mjs +1 -0
  38. package/es/util/inline-ai-util/inline-ai-textarea/icon.mjs +142 -0
  39. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -0
  40. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +162 -0
  41. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +205 -0
  42. package/es/util/inline-ai-util/inline-ai-util.mjs +145 -0
  43. package/es/web-app/main.mjs +2 -0
  44. package/lib/control/calendar/calendar.cjs +32 -7
  45. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs +10 -0
  46. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.cjs +32 -0
  47. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +113 -84
  48. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.cjs +311 -0
  49. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.css +1 -0
  50. package/lib/control/tab-exp-panel/tab-exp-panel.cjs +3 -16
  51. package/lib/editor/code/code-editor.controller.cjs +175 -0
  52. package/lib/editor/code/monaco-editor/monaco-editor.cjs +116 -6
  53. package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
  54. package/lib/editor/html/html-editor.controller.cjs +75 -0
  55. package/lib/editor/html/wang-editor/index.cjs +3 -0
  56. package/lib/editor/html/wang-editor/module/index.cjs +3 -0
  57. package/lib/editor/html/wang-editor/module/inline-ai-module.cjs +98 -0
  58. package/lib/editor/html/wang-editor/wang-editor.cjs +35 -4
  59. package/lib/editor/html/wang-editor/wang-editor.css +1 -1
  60. package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +47 -0
  61. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +109 -13
  62. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  63. package/lib/editor/markdown/markdown-editor.controller.cjs +112 -0
  64. package/lib/editor/text-box/input/input.css +1 -1
  65. package/lib/index.cjs +2 -0
  66. package/lib/locale/en/index.cjs +15 -2
  67. package/lib/locale/zh-CN/index.cjs +15 -2
  68. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.util.cjs +1 -1
  69. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.cjs +2 -2
  70. package/lib/util/ai-util/ai-util.cjs +6 -2
  71. package/lib/util/app-util/app-util.cjs +40 -1
  72. package/lib/util/index.cjs +2 -0
  73. package/lib/util/inline-ai-util/inline-ai-textarea/icon.cjs +151 -0
  74. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +207 -0
  75. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -0
  76. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +167 -0
  77. package/lib/util/inline-ai-util/inline-ai-util.cjs +147 -0
  78. package/lib/web-app/main.cjs +2 -0
  79. package/package.json +5 -5
  80. package/dist/ibiz-markdown-editor-Cs1m7gKI.js +0 -1
  81. package/dist/index-CCKb6xlM.js +0 -11
  82. package/dist/wang-editor-BIllIvre.js +0 -1
@@ -1,7 +1,8 @@
1
- import { isVNode, defineComponent, createVNode, resolveComponent, ref, watch } from 'vue';
1
+ import { isVNode, defineComponent, createVNode, resolveComponent, ref, computed, watch } from 'vue';
2
2
  import { hasEmptyPanelRenderer, IBizCustomRender, useControlController, useNamespace, useUIStore } from '@ibiz-template/vue3-util';
3
3
  import { CalendarController } from '@ibiz-template/runtime';
4
4
  import dayjs from 'dayjs';
5
+ import { debounce } from 'lodash-es';
5
6
  import { showTitle } from '@ibiz-template/core';
6
7
  import { IBizCustomCalendar } from './components/custom-calendar/index.mjs';
7
8
  import { isTimeBetween, useCalendarLegend, getWeekRange } from './calendar-util.mjs';
@@ -80,6 +81,13 @@ const CalendarControl = /* @__PURE__ */ defineComponent({
80
81
  const curPopover = ref();
81
82
  const showDateRange = ref(c.controlParams.showmode === "daterange");
82
83
  const showDateList = ref(c.controlParams.showmode === "expand");
84
+ const infiniteScroll = ref();
85
+ const disabledLodeMore = computed(() => {
86
+ if (c.model.calendarStyle !== "TIMELINE" || c.state.isLoading)
87
+ return true;
88
+ const result = !Object.values(c.loadMoreItems).some((item) => item.curPage < item.totalPage);
89
+ return result;
90
+ });
83
91
  const monthLegendClick = (_item) => {
84
92
  Object.assign(_item, {
85
93
  isShow: !_item.isShow
@@ -116,6 +124,17 @@ const CalendarControl = /* @__PURE__ */ defineComponent({
116
124
  watch(() => UIStore.theme, () => {
117
125
  calcLegend();
118
126
  });
127
+ const handleScrollLoad = async () => {
128
+ if (!infiniteScroll.value || disabledLodeMore.value)
129
+ return;
130
+ const scrollTop = infiniteScroll.value.scrollTop;
131
+ const scrollHeight = infiniteScroll.value.scrollHeight;
132
+ const clientHeight = infiniteScroll.value.clientHeight;
133
+ if (scrollHeight - scrollTop - clientHeight < 10)
134
+ await c.load({
135
+ isLoadMore: true
136
+ });
137
+ };
119
138
  const popoverValue = ref("");
120
139
  const selectDate = (tag) => {
121
140
  if (!calendarRef.value)
@@ -372,15 +391,18 @@ const CalendarControl = /* @__PURE__ */ defineComponent({
372
391
  ns,
373
392
  curPopover,
374
393
  calendarRef,
375
- showDateRange,
376
- showDateList,
377
- popoverValue,
378
394
  legendItems,
395
+ popoverValue,
396
+ showDateList,
397
+ showDateRange,
398
+ infiniteScroll,
399
+ disabledLodeMore,
379
400
  selectDate,
380
401
  calcItemStyle,
402
+ handleScrollLoad,
403
+ monthLegendClick,
381
404
  calcCalendarItems,
382
- onNodeContextmenu,
383
- monthLegendClick
405
+ onNodeContextmenu
384
406
  };
385
407
  },
386
408
  render() {
@@ -648,14 +670,17 @@ const CalendarControl = /* @__PURE__ */ defineComponent({
648
670
  };
649
671
  const renderTimeLine = () => {
650
672
  return createVNode("div", {
651
- "class": this.ns.b("timeline-content")
673
+ "ref": "infiniteScroll",
674
+ "class": this.ns.b("timeline-content"),
675
+ "onScroll": debounce(this.handleScrollLoad, 300)
652
676
  }, [createVNode(resolveComponent("el-timeline"), null, {
653
677
  default: () => [this.c.state.items.length > 0 ? this.c.state.items.map((item) => {
654
678
  var _a;
655
679
  const model = (_a = this.c.model.sysCalendarItems) == null ? void 0 : _a.find((calendarItems) => {
656
680
  return item.itemType === calendarItems.itemType;
657
681
  });
658
- const temptime = item.beginTime ? dayjs(item.beginTime).format(this.c.timelineCaptionFormat) : item.beginTime;
682
+ const time = item[this.c.groupTimeField];
683
+ const temptime = time ? dayjs(time).format(this.c.timelineCaptionFormat) : time;
659
684
  return createVNode(resolveComponent("el-timeline-item"), {
660
685
  "key": item.id,
661
686
  "placement": "top",
@@ -4,6 +4,7 @@ import { useNamespace } from '@ibiz-template/vue3-util';
4
4
  import { RepeaterSingleForm } from './repeater-single-form/repeater-single-form.mjs';
5
5
  import { RepeaterMultiForm } from './repeater-multi-form/repeater-multi-form.mjs';
6
6
  import { RepeaterGrid } from './repeater-grid/repeater-grid.mjs';
7
+ import { RepeaterGrid2 } from './repeater-grid2/repeater-grid2.mjs';
7
8
 
8
9
  "use strict";
9
10
  const FormMDCtrlRepeater = /* @__PURE__ */ defineComponent({
@@ -25,6 +26,7 @@ const FormMDCtrlRepeater = /* @__PURE__ */ defineComponent({
25
26
  };
26
27
  },
27
28
  render() {
29
+ var _a;
28
30
  const classNames = [this.ns.b()];
29
31
  switch (this.controller.repeaterStyle) {
30
32
  case "MultiForm":
@@ -34,6 +36,14 @@ const FormMDCtrlRepeater = /* @__PURE__ */ defineComponent({
34
36
  "controller": this.controller
35
37
  }, null);
36
38
  case "Grid":
39
+ const gridStyle = (_a = this.controller.model.ctrlParams) == null ? void 0 : _a.gridStyle;
40
+ if (gridStyle === "style2") {
41
+ return createVNode(RepeaterGrid2, {
42
+ "class": classNames,
43
+ "controller": this.controller,
44
+ "onChange": this.onDataChange
45
+ }, null);
46
+ }
37
47
  return createVNode(RepeaterGrid, {
38
48
  "class": classNames,
39
49
  "controller": this.controller,
@@ -0,0 +1,30 @@
1
+ import { ref } from 'vue';
2
+
3
+ "use strict";
4
+ function useLoadMore(initItems, chunkSize) {
5
+ let totalItems = [];
6
+ let page = 1;
7
+ const renderItems = ref([]);
8
+ const updateTotalItems = (items) => {
9
+ page = 1;
10
+ totalItems = items != null ? items : [];
11
+ renderItems.value = totalItems.slice(0, chunkSize);
12
+ };
13
+ updateTotalItems(initItems);
14
+ const loadMore = () => {
15
+ if (renderItems.value.length >= totalItems.length) {
16
+ return;
17
+ }
18
+ page += 1;
19
+ const start = (page - 1) * chunkSize;
20
+ const end = page * chunkSize;
21
+ renderItems.value.push(...totalItems.slice(start, end));
22
+ };
23
+ return {
24
+ renderItems,
25
+ loadMore,
26
+ updateTotalItems
27
+ };
28
+ }
29
+
30
+ export { useLoadMore };
@@ -1,9 +1,10 @@
1
- import { isVNode, defineComponent, createVNode, resolveComponent, toRaw, h, ref, reactive, watch, onUnmounted } from 'vue';
1
+ import { isVNode, defineComponent, createVNode, resolveComponent, mergeProps, withDirectives, resolveDirective, toRaw, h, ref, reactive, watch, onUnmounted } from 'vue';
2
2
  import Sortable from '../../../../../../node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.mjs';
3
3
  import { EditFormController, ControlVO, FormMDCtrlRepeaterController } from '@ibiz-template/runtime';
4
4
  import { createUUID } from 'qx-util';
5
5
  import { useNamespace, useCtx } from '@ibiz-template/vue3-util';
6
6
  import { recursiveIterate, showTitle } from '@ibiz-template/core';
7
+ import { useLoadMore } from '../form-mdctrl-repeater.util.mjs';
7
8
  import './repeater-grid.css';
8
9
 
9
10
  "use strict";
@@ -24,14 +25,21 @@ const RepeaterGrid = /* @__PURE__ */ defineComponent({
24
25
  setup(props, {
25
26
  emit
26
27
  }) {
28
+ var _a, _b;
27
29
  const ns = useNamespace("repeater-grid");
28
30
  const formItems = [];
29
31
  const tableRef = ref();
30
32
  const tableKey = ref(createUUID());
33
+ const chunkSize = ((_a = props.controller.model.ctrlParams) == null ? void 0 : _a.chunkSize) ? Number((_b = props.controller.model.ctrlParams) == null ? void 0 : _b.chunkSize) : 100;
34
+ const {
35
+ renderItems,
36
+ loadMore,
37
+ updateTotalItems
38
+ } = useLoadMore(props.controller.value, chunkSize);
31
39
  recursiveIterate(props.controller.repeatedForm, (item) => {
32
- var _a;
40
+ var _a2;
33
41
  if (item.detailType === "FORMITEM") {
34
- if (((_a = item.editor) == null ? void 0 : _a.editorType) !== "HIDDEN") {
42
+ if (((_a2 = item.editor) == null ? void 0 : _a2.editorType) !== "HIDDEN") {
35
43
  formItems.push(item);
36
44
  }
37
45
  }
@@ -85,14 +93,15 @@ const RepeaterGrid = /* @__PURE__ */ defineComponent({
85
93
  });
86
94
  }
87
95
  }
96
+ updateTotalItems(newVal || []);
88
97
  }, {
89
98
  immediate: true,
90
99
  deep: true
91
100
  });
92
101
  let sortable;
93
102
  const rowDrop = () => {
94
- var _a, _b;
95
- const wrapper = (_b = (_a = tableRef.value) == null ? void 0 : _a.$el) == null ? void 0 : _b.querySelector(".el-table__body-wrapper tbody");
103
+ var _a2, _b2;
104
+ const wrapper = (_b2 = (_a2 = tableRef.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b2.querySelector(".el-table__body-wrapper tbody");
96
105
  if (!wrapper || !props.controller.enableSort)
97
106
  return;
98
107
  sortable = Sortable.create(wrapper, {
@@ -152,12 +161,19 @@ const RepeaterGrid = /* @__PURE__ */ defineComponent({
152
161
  tableRef,
153
162
  tableKey,
154
163
  formItems,
164
+ renderItems,
155
165
  formControllers,
156
- renderRemoveBtn
166
+ renderRemoveBtn,
167
+ loadMore
157
168
  };
158
169
  },
159
170
  render() {
171
+ var _a;
160
172
  let _slot3;
173
+ const tableHeight = (_a = this.controller.model.layoutPos) == null ? void 0 : _a.height;
174
+ const heightObject = tableHeight ? {
175
+ height: tableHeight
176
+ } : {};
161
177
  return createVNode("div", {
162
178
  "class": this.ns.b()
163
179
  }, [this.controller.enableCreate && createVNode(resolveComponent("el-button"), {
@@ -167,104 +183,117 @@ const RepeaterGrid = /* @__PURE__ */ defineComponent({
167
183
  }
168
184
  }, _isSlot(_slot3 = ibiz.i18n.t("app.add")) ? _slot3 : {
169
185
  default: () => [_slot3]
170
- }), createVNode(resolveComponent("el-table"), {
186
+ }), createVNode(resolveComponent("el-table"), mergeProps({
171
187
  "ref": "tableRef",
172
188
  "key": this.tableKey,
173
189
  "show-header": true,
174
190
  "class": this.ns.e("table"),
175
- "data": this.controller.value,
191
+ "data": this.renderItems,
176
192
  "cell-class-name": ({
177
193
  columnIndex
178
194
  }) => {
179
195
  const shouldShowIndex = this.controller.enableSort ? columnIndex === 1 : columnIndex === 0;
180
196
  return shouldShowIndex ? this.ns.b("index") : "";
181
197
  }
182
- }, {
183
- default: () => [this.controller.enableSort && createVNode(resolveComponent("el-table-column"), {
184
- "width": 26,
185
- "type": "default"
186
- }, {
187
- default: () => createVNode("svg", {
188
- "viewBox": "0 0 16 16",
189
- "xmlns": "http://www.w3.org/2000/svg",
190
- "height": "1em",
191
- "width": "1em",
192
- "class": this.ns.e("drag-icon"),
193
- "preserveAspectRatio": "xMidYMid meet",
194
- "focusable": "false"
195
- }, [createVNode("g", {
196
- "stroke-width": "1",
197
- "fill-rule": "evenodd"
198
- }, [createVNode("g", {
199
- "transform": "translate(5 1)",
200
- "fill-rule": "nonzero"
201
- }, [createVNode("path", {
202
- "d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"
203
- }, null)])])])
204
- }), createVNode(resolveComponent("el-table-column"), {
205
- "type": "index",
206
- "width": 66,
207
- "align": "center"
208
- }, {
209
- default: (opts) => {
210
- const {
211
- $index
212
- } = opts;
213
- if (!this.controller.enableDelete) {
214
- return createVNode("span", null, [$index + 1]);
215
- }
216
- return [this.renderRemoveBtn($index), createVNode("span", {
217
- "class": this.ns.be("index", "text")
218
- }, [$index + 1])];
219
- }
220
- }), this.formItems.length > 0 && this.formItems.map((item) => {
221
- const width = item.labelWidth;
222
- let columnWidth = "";
223
- if (typeof width === "number") {
224
- columnWidth = "".concat(width, "px");
225
- }
226
- return createVNode(resolveComponent("el-table-column"), {
227
- "label": item.caption,
228
- "prop": item.id,
229
- "width": columnWidth,
198
+ }, heightObject), {
199
+ default: () => {
200
+ return [this.controller.enableSort && createVNode(resolveComponent("el-table-column"), {
201
+ "width": 26,
202
+ "type": "default"
203
+ }, {
204
+ default: () => createVNode("svg", {
205
+ "viewBox": "0 0 16 16",
206
+ "xmlns": "http://www.w3.org/2000/svg",
207
+ "height": "1em",
208
+ "width": "1em",
209
+ "class": this.ns.e("drag-icon"),
210
+ "preserveAspectRatio": "xMidYMid meet",
211
+ "focusable": "false"
212
+ }, [createVNode("g", {
213
+ "stroke-width": "1",
214
+ "fill-rule": "evenodd"
215
+ }, [createVNode("g", {
216
+ "transform": "translate(5 1)",
217
+ "fill-rule": "nonzero"
218
+ }, [createVNode("path", {
219
+ "d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"
220
+ }, null)])])])
221
+ }), createVNode(resolveComponent("el-table-column"), {
222
+ "type": "index",
223
+ "width": 66,
230
224
  "align": "center"
231
225
  }, {
232
226
  default: (opts) => {
233
227
  const {
234
228
  $index
235
229
  } = opts;
236
- const formC = toRaw(this.formControllers[$index]);
237
- if (!formC || !formC.state.isLoaded) {
238
- return createVNode("div", null, [ibiz.i18n.t("control.form.repeaterGrid.absentOrLoad")]);
230
+ if (!this.controller.enableDelete) {
231
+ return createVNode("span", null, [$index + 1]);
239
232
  }
240
- const formItemC = formC.formItems.find((x) => x.name === item.id);
241
- let editor = null;
242
- if (!formItemC.editorProvider) {
243
- editor = createVNode(resolveComponent("not-supported-editor"), {
244
- "modelData": item.editor
245
- }, null);
246
- } else {
247
- const component = resolveComponent(formItemC.editorProvider.formEditor);
248
- editor = h(component, {
249
- value: formItemC.value,
250
- data: formItemC.data,
251
- controller: formItemC.editor,
252
- disabled: formItemC.state.disabled,
253
- readonly: formItemC.state.readonly,
254
- onChange: (val, name) => {
255
- formItemC.setDataValue(val, name);
256
- }
257
- });
233
+ return [this.renderRemoveBtn($index), createVNode("span", {
234
+ "class": this.ns.be("index", "text")
235
+ }, [$index + 1])];
236
+ }
237
+ }), this.formItems.length > 0 && this.formItems.map((item) => {
238
+ const width = item.labelWidth;
239
+ let widthName = "width";
240
+ let columnWidth = "";
241
+ if (typeof width === "number") {
242
+ if (width === 1) {
243
+ widthName = "min-width";
258
244
  }
259
- return createVNode(resolveComponent("iBizGridEditItem"), {
260
- "error": formItemC.state.error,
261
- "required": formItemC.state.required
262
- }, _isSlot(editor) ? editor : {
263
- default: () => [editor]
264
- });
245
+ columnWidth = "".concat(width, "px");
265
246
  }
266
- });
267
- })]
247
+ return createVNode(resolveComponent("el-table-column"), mergeProps({
248
+ "label": item.caption,
249
+ "prop": item.id
250
+ }, {
251
+ [widthName]: columnWidth
252
+ }, {
253
+ "align": "center"
254
+ }), {
255
+ default: (opts) => {
256
+ const {
257
+ $index
258
+ } = opts;
259
+ const formC = toRaw(this.formControllers[$index]);
260
+ if (!formC || !formC.state.isLoaded) {
261
+ return createVNode("div", null, [ibiz.i18n.t("control.form.repeaterGrid.absentOrLoad")]);
262
+ }
263
+ const formItemC = formC.formItems.find((x) => x.name === item.id);
264
+ let editor = null;
265
+ if (!formItemC.editorProvider) {
266
+ editor = createVNode(resolveComponent("not-supported-editor"), {
267
+ "modelData": item.editor
268
+ }, null);
269
+ } else {
270
+ const component = resolveComponent(formItemC.editorProvider.formEditor);
271
+ editor = h(component, {
272
+ value: formItemC.value,
273
+ data: formItemC.data,
274
+ controller: formItemC.editor,
275
+ disabled: formItemC.state.disabled,
276
+ readonly: formItemC.state.readonly,
277
+ onChange: (val, name) => {
278
+ formItemC.setDataValue(val, name);
279
+ }
280
+ });
281
+ }
282
+ return createVNode(resolveComponent("iBizGridEditItem"), {
283
+ "error": formItemC.state.error,
284
+ "required": formItemC.state.required
285
+ }, _isSlot(editor) ? editor : {
286
+ default: () => [editor]
287
+ });
288
+ }
289
+ });
290
+ })];
291
+ },
292
+ append: () => {
293
+ return [tableHeight && withDirectives(createVNode("div", {
294
+ "infinite-scroll-distance": 20
295
+ }, null), [[resolveDirective("infinite-scroll"), () => this.loadMore()]])];
296
+ }
268
297
  })]);
269
298
  }
270
299
  });
@@ -0,0 +1 @@
1
+ .ibiz-repeater-grid2{--ibiz-repeater-grid2-row-height:57px;--ibiz-repeater-grid2-index-cell-padding:var(--ibiz-spacing-extra-tight);--ibiz-repeater-grid2-btn-size:var(--ibiz-width-icon-large);--ibiz-repeater-grid2-btn-color:var(--ibiz-color-text-2);--ibiz-repeater-grid2-btn-border:1px solid var(--ibiz-color-border);--ibiz-repeater-grid2-btn-margin-left:var(--ibiz-spacing-tight);--ibiz-repeater-grid2-btn-hover-color:var(--ibiz-color-primary-hover);--ibiz-repeater-grid2-btn-hover-border:1px solid var(--ibiz-color-primary-hover);position:relative;width:100%;--ibiz-grid-column-justify-content:center}.ibiz-repeater-grid2__drag-icon{cursor:move}.ibiz-repeater-grid2__sortable-ghost{opacity:.5}.ibiz-repeater-grid2 .el-table__row{height:var(--ibiz-repeater-grid2-row-height)}.ibiz-repeater-grid2-index .cell{padding:var(--ibiz-repeater-grid2-index-cell-padding)}.ibiz-repeater-grid2-action-group{display:flex;align-items:center;justify-content:center}.ibiz-repeater-grid2-action-group ion-icon{font-size:var(--ibiz-repeater-grid2-btn-size);color:var(--ibiz-repeater-grid2-btn-color);cursor:pointer;border:var(--ibiz-repeater-grid2-btn-border)}.ibiz-repeater-grid2-action-group ion-icon+ion-icon{margin-left:var(--ibiz-repeater-grid2-btn-margin-left)}.ibiz-repeater-grid2-action-group ion-icon:hover{color:var(--ibiz-repeater-grid2-btn-hover-color);border:var(--ibiz-repeater-grid2-btn-hover-border)}