@ibiz-template/vue3-components 0.7.41-alpha.122 → 0.7.41-alpha.124
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.
- package/dist/chart-D8ak71ob.js +1 -0
- package/dist/index-BApiCD3N.js +339 -0
- package/dist/{index.es-i_3v13Rd.js → index.es-16xILT5D.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-CgYOgqC_.js → wang-editor-BjVpWCI4.js} +1 -1
- package/dist/{xlsx-util-B2yu2RZe.js → xlsx-util-BJgXbQ94.js} +1 -1
- package/es/common/data-import/data-import.mjs +1 -1
- package/es/control/chart/chart.mjs +30 -20
- package/es/control/data-view/data-view.mjs +27 -12
- package/es/control/data-view/data-view.util.mjs +43 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +2 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.mjs +2 -1
- package/es/control/grid/grid/grid-control.util.mjs +8 -7
- package/es/control/grid/grid/grid.mjs +32 -30
- package/es/control/list/list.mjs +10 -2
- package/es/control/tree/tree.mjs +12 -3
- package/es/control/tree-grid/tree-grid.mjs +33 -29
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +32 -27
- package/es/editor/autocomplete/autocomplete-editor.controller.mjs +1 -2
- package/es/editor/data-picker/picker-editor.controller.mjs +1 -2
- package/es/editor/list-box/list-box-picker-editor.controller.mjs +2 -5
- package/es/editor/map-picker/map-picker-editor.controller.mjs +1 -1
- package/es/editor/text-box/input/input.mjs +1 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +1 -1
- package/es/panel-component/global-search/global-search.controller.mjs +1 -4
- package/es/panel-component/user-action/user-action.mjs +3 -3
- package/es/panel-component/user-message/user-message.mjs +1 -1
- package/es/util/ai-chat-util/ai-chat-util.mjs +11 -0
- package/es/view/403-view/403-view.mjs +1 -1
- package/es/view/404-view/404-view.mjs +1 -1
- package/es/view/login-view/login-view.mjs +2 -3
- package/es/view/share-view/share-view.mjs +1 -1
- package/es/view/unauthorized-view/unauthorized-view.mjs +1 -1
- package/es/web-app/guard/auth-guard/auth-guard.mjs +3 -1
- package/es/web-app/guard/auth-guard/dyna-auth-guard.mjs +7 -1
- package/lib/common/data-import/data-import.cjs +1 -1
- package/lib/control/chart/chart.cjs +29 -19
- package/lib/control/data-view/data-view.cjs +25 -10
- package/lib/control/data-view/data-view.util.cjs +45 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +2 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.cjs +2 -1
- package/lib/control/grid/grid/grid-control.util.cjs +8 -7
- package/lib/control/grid/grid/grid.cjs +32 -30
- package/lib/control/list/list.cjs +8 -0
- package/lib/control/tree/tree.cjs +11 -2
- package/lib/control/tree-grid/tree-grid.cjs +32 -28
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +31 -26
- package/lib/editor/autocomplete/autocomplete-editor.controller.cjs +1 -2
- package/lib/editor/data-picker/picker-editor.controller.cjs +1 -2
- package/lib/editor/list-box/list-box-picker-editor.controller.cjs +2 -5
- package/lib/editor/map-picker/map-picker-editor.controller.cjs +1 -1
- package/lib/editor/text-box/input/input.cjs +1 -1
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +1 -1
- package/lib/panel-component/global-search/global-search.controller.cjs +1 -4
- package/lib/panel-component/user-action/user-action.cjs +3 -3
- package/lib/panel-component/user-message/user-message.cjs +1 -1
- package/lib/util/ai-chat-util/ai-chat-util.cjs +11 -0
- package/lib/view/403-view/403-view.cjs +1 -1
- package/lib/view/404-view/404-view.cjs +1 -1
- package/lib/view/login-view/login-view.cjs +2 -3
- package/lib/view/share-view/share-view.cjs +1 -1
- package/lib/view/unauthorized-view/unauthorized-view.cjs +1 -1
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +3 -1
- package/lib/web-app/guard/auth-guard/dyna-auth-guard.cjs +7 -1
- package/package.json +5 -5
- package/src/common/data-import/data-import.tsx +1 -1
- package/src/control/chart/chart.tsx +42 -36
- package/src/control/data-view/data-view.tsx +32 -15
- package/src/control/data-view/data-view.util.ts +68 -0
- package/src/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.tsx +3 -1
- package/src/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.tsx +3 -0
- package/src/control/grid/grid/grid-control.util.ts +12 -11
- package/src/control/grid/grid/grid.tsx +46 -35
- package/src/control/list/list.tsx +20 -1
- package/src/control/tree/tree.tsx +18 -4
- package/src/control/tree-grid/tree-grid.tsx +46 -33
- package/src/control/tree-grid-ex/tree-grid-ex.tsx +45 -25
- package/src/editor/autocomplete/autocomplete-editor.controller.ts +1 -2
- package/src/editor/data-picker/picker-editor.controller.ts +1 -2
- package/src/editor/list-box/list-box-picker-editor.controller.ts +2 -6
- package/src/editor/map-picker/map-picker-editor.controller.ts +1 -1
- package/src/editor/text-box/input/input.tsx +1 -1
- package/src/panel-component/auth-userinfo/auth-userinfo.tsx +1 -1
- package/src/panel-component/global-search/global-search.controller.ts +1 -5
- package/src/panel-component/user-action/user-action.tsx +3 -3
- package/src/panel-component/user-message/user-message.tsx +1 -1
- package/src/util/ai-chat-util/ai-chat-util.ts +17 -0
- package/src/view/403-view/403-view.tsx +1 -1
- package/src/view/404-view/404-view.tsx +1 -4
- package/src/view/login-view/login-view.tsx +3 -3
- package/src/view/share-view/share-view.tsx +1 -1
- package/src/view/unauthorized-view/unauthorized-view.tsx +1 -4
- package/src/web-app/guard/auth-guard/auth-guard.ts +3 -4
- package/src/web-app/guard/auth-guard/dyna-auth-guard.ts +18 -1
- package/dist/chart-De-66DWN.js +0 -1
- package/dist/index-BXO4Omap.js +0 -339
|
@@ -134,7 +134,7 @@ const DataImport = /* @__PURE__ */ defineComponent({
|
|
|
134
134
|
"onClick": this.selectFile
|
|
135
135
|
}, [createVNode("img", {
|
|
136
136
|
"class": this.ns.be("upload", "img"),
|
|
137
|
-
"src":
|
|
137
|
+
"src": ibiz.config.imageAssets.iconImport
|
|
138
138
|
}, null), createVNode("span", {
|
|
139
139
|
"class": this.ns.be("upload", "text")
|
|
140
140
|
}, [ibiz.i18n.t("component.dataImport.clickToUpload")])]) : createVNode("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, isVNode, createVNode, resolveComponent, ref, watch, nextTick, onMounted, onBeforeUnmount } from 'vue';
|
|
1
|
+
import { defineComponent, isVNode, createVNode, resolveComponent, ref, watch, nextTick, onMounted, withDirectives, resolveDirective, onBeforeUnmount } from 'vue';
|
|
2
2
|
import { useControlController, useNamespace, useSemanticNode, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { init } from 'echarts';
|
|
4
4
|
import { createUUID } from 'qx-util';
|
|
@@ -88,6 +88,32 @@ const ChartControl = /* @__PURE__ */ defineComponent({
|
|
|
88
88
|
const drillDetailPos = ref({});
|
|
89
89
|
const drillDetailRef = ref();
|
|
90
90
|
let tempParams;
|
|
91
|
+
const childClass = [{
|
|
92
|
+
class: "".concat(ns.em("grid", "body-row"), " ").concat(semanticClass("table.body.row")),
|
|
93
|
+
selector: ".el-table__row"
|
|
94
|
+
}, {
|
|
95
|
+
class: "".concat(ns.em("grid", "header-row"), " ").concat(semanticClass("table.header.row")),
|
|
96
|
+
selector: ".el-table__header tr"
|
|
97
|
+
}, {
|
|
98
|
+
class: "".concat(ns.em("grid", "body-cell"), " ").concat(semanticClass("table.body.cell")),
|
|
99
|
+
selector: ".el-table__body .el-table__cell"
|
|
100
|
+
}, {
|
|
101
|
+
class: "".concat(ns.em("grid", "header-cell"), " ").concat(semanticClass("table.header.cell")),
|
|
102
|
+
selector: ".el-table__header .el-table__cell"
|
|
103
|
+
}];
|
|
104
|
+
const childStyle = [{
|
|
105
|
+
class: semanticStyle("table.body.row"),
|
|
106
|
+
selector: ".el-table__row"
|
|
107
|
+
}, {
|
|
108
|
+
class: semanticStyle("table.header.row"),
|
|
109
|
+
selector: ".el-table__header tr"
|
|
110
|
+
}, {
|
|
111
|
+
class: semanticStyle("table.body.cell"),
|
|
112
|
+
selector: ".el-table__body .el-table__cell"
|
|
113
|
+
}, {
|
|
114
|
+
class: semanticStyle("table.header.cell"),
|
|
115
|
+
selector: ".el-table__header .el-table__cell"
|
|
116
|
+
}];
|
|
91
117
|
const initSimpleData = () => {
|
|
92
118
|
if (!props.data) {
|
|
93
119
|
return;
|
|
@@ -216,7 +242,7 @@ const ChartControl = /* @__PURE__ */ defineComponent({
|
|
|
216
242
|
});
|
|
217
243
|
const renderGrid = () => {
|
|
218
244
|
let _slot;
|
|
219
|
-
return createVNode(resolveComponent("el-table"), {
|
|
245
|
+
return withDirectives(createVNode(resolveComponent("el-table"), {
|
|
220
246
|
"ref": "tableRef",
|
|
221
247
|
"border": true,
|
|
222
248
|
"data": getGridData(),
|
|
@@ -224,23 +250,7 @@ const ChartControl = /* @__PURE__ */ defineComponent({
|
|
|
224
250
|
width: "100%"
|
|
225
251
|
},
|
|
226
252
|
"max-height": maxHeight.value,
|
|
227
|
-
"span-method": c.spanMethod.bind(c)
|
|
228
|
-
"header-row-style": (...args) => semanticStyle("table.header.row", args),
|
|
229
|
-
"header-row-class-name": (...args) => {
|
|
230
|
-
return [ns.em("grid", "header-row"), semanticClass("table.header.row", args)].join(" ");
|
|
231
|
-
},
|
|
232
|
-
"header-cell-style": (...args) => semanticStyle("table.header.cell", args),
|
|
233
|
-
"header-cell-class-name": (...args) => {
|
|
234
|
-
return [ns.em("grid", "header-cell"), semanticClass("table.header.cell", args)].join(" ");
|
|
235
|
-
},
|
|
236
|
-
"row-style": (...args) => semanticStyle("table.body.row", args),
|
|
237
|
-
"row-class-name": (...args) => {
|
|
238
|
-
return [ns.em("grid", "body-row"), semanticClass("table.body.row", args)].join(" ");
|
|
239
|
-
},
|
|
240
|
-
"cell-style": (...args) => semanticStyle("table.body.cell", args),
|
|
241
|
-
"cell-class-name": (...args) => {
|
|
242
|
-
return [ns.em("grid", "body-cell"), semanticClass("table.body.cell", args)].join(" ");
|
|
243
|
-
}
|
|
253
|
+
"span-method": c.spanMethod.bind(c)
|
|
244
254
|
}, _isSlot(_slot = c.state.gridHeaders.map((column) => {
|
|
245
255
|
return createVNode(resolveComponent("el-table-column"), {
|
|
246
256
|
"prop": column.id,
|
|
@@ -249,7 +259,7 @@ const ChartControl = /* @__PURE__ */ defineComponent({
|
|
|
249
259
|
}, null);
|
|
250
260
|
})) ? _slot : {
|
|
251
261
|
default: () => [_slot]
|
|
252
|
-
});
|
|
262
|
+
}), [[resolveDirective("child-class"), childClass], [resolveDirective("child-style"), childStyle]]);
|
|
253
263
|
};
|
|
254
264
|
const renderNoData = () => {
|
|
255
265
|
if (c.state.items.length === 0) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { isVNode, defineComponent, createVNode, resolveComponent, ref, computed, watch, withDirectives, resolveDirective, Fragment
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent, ref, computed, watch, h, withDirectives, resolveDirective, Fragment } from 'vue';
|
|
2
2
|
import { useControlController, useNamespace, useControlPopoverzIndex, useSemanticNode, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { DataViewControlController, ControlVO, getControl } from '@ibiz-template/runtime';
|
|
3
|
+
import { DataViewControlController, ControlVO, getMDCtrlItemProvider, getControl } from '@ibiz-template/runtime';
|
|
4
4
|
import { createUUID } from 'qx-util';
|
|
5
5
|
import draggable from 'vuedraggable';
|
|
6
6
|
import '../../util/index.mjs';
|
|
7
|
+
import { useDataViewSkeleton } from './data-view.util.mjs';
|
|
7
8
|
import './data-view.css';
|
|
8
9
|
import { usePagination } from '../../util/pagination/use-pagination.mjs';
|
|
9
10
|
|
|
@@ -262,6 +263,14 @@ const DataViewControl = /* @__PURE__ */ defineComponent({
|
|
|
262
263
|
}, [renderItemAction(item)]) : null]);
|
|
263
264
|
};
|
|
264
265
|
const renderCard = (item) => {
|
|
266
|
+
const provider = getMDCtrlItemProvider(c.model);
|
|
267
|
+
if (provider)
|
|
268
|
+
return h(resolveComponent(provider.component), {
|
|
269
|
+
data: item,
|
|
270
|
+
controller: c,
|
|
271
|
+
onClick: (event) => onRowClick(item, event),
|
|
272
|
+
onDblclick: (event) => onDbRowClick(item, event)
|
|
273
|
+
});
|
|
265
274
|
const itemStyle = ns.cssVarBlock({
|
|
266
275
|
"item-bg-color": "".concat(item.bgcolor || ""),
|
|
267
276
|
"text-color": "".concat(item.fontcolor || ""),
|
|
@@ -573,6 +582,12 @@ const DataViewControl = /* @__PURE__ */ defineComponent({
|
|
|
573
582
|
return icon;
|
|
574
583
|
};
|
|
575
584
|
const ITEM_HEIGHT = 24;
|
|
585
|
+
const {
|
|
586
|
+
setSkeletonContentRef,
|
|
587
|
+
calcSkeletonCount
|
|
588
|
+
} = useDataViewSkeleton({
|
|
589
|
+
model: c.model
|
|
590
|
+
});
|
|
576
591
|
const calcSkeletonRows = () => {
|
|
577
592
|
const {
|
|
578
593
|
cardHeight
|
|
@@ -638,34 +653,34 @@ const DataViewControl = /* @__PURE__ */ defineComponent({
|
|
|
638
653
|
};
|
|
639
654
|
const renderGroupSkeleton = () => {
|
|
640
655
|
return createVNode("div", {
|
|
641
|
-
"class": ns.b("
|
|
656
|
+
"class": [ns.e("content"), ns.b("group-content")]
|
|
642
657
|
}, [Array.from({
|
|
643
658
|
length: 3
|
|
644
659
|
}, () => createVNode("div", {
|
|
645
|
-
"class": ns.
|
|
660
|
+
"class": ns.be("group-content", "item")
|
|
646
661
|
}, [createVNode("div", {
|
|
647
|
-
"class": ns.be("
|
|
662
|
+
"class": ns.be("group-content", "item-header")
|
|
648
663
|
}, [createVNode(resolveComponent("el-skeleton"), {
|
|
649
664
|
"animated": true,
|
|
650
665
|
"rows": 1
|
|
651
666
|
}, {
|
|
652
667
|
template: () => createVNode(resolveComponent("el-skeleton-item"), {
|
|
653
668
|
"variant": "rect",
|
|
654
|
-
"style": "width: 15
|
|
669
|
+
"style": "width: 15%;height: 24px;"
|
|
655
670
|
}, null)
|
|
656
671
|
})]), createVNode("div", {
|
|
657
|
-
"
|
|
658
|
-
}, [renderSkeletonCardLayout(3)])]))]);
|
|
672
|
+
"ref": setSkeletonContentRef
|
|
673
|
+
}, [renderSkeletonCardLayout(calcSkeletonCount(3))])]))]);
|
|
659
674
|
};
|
|
660
675
|
const renderSkeleton = () => {
|
|
661
676
|
if (c.state.enableGroup) {
|
|
662
677
|
return renderGroupSkeleton();
|
|
663
678
|
}
|
|
664
|
-
const count = c.state.size || 6;
|
|
679
|
+
const count = c.state.size || calcSkeletonCount(6);
|
|
665
680
|
return createVNode("div", {
|
|
666
|
-
"class": ns.
|
|
681
|
+
"class": ns.e("content")
|
|
667
682
|
}, [createVNode("div", {
|
|
668
|
-
"
|
|
683
|
+
"ref": setSkeletonContentRef
|
|
669
684
|
}, [renderSkeletonCardLayout(Math.min(count, 20))])]);
|
|
670
685
|
};
|
|
671
686
|
const renderNavIcon = () => {
|
|
@@ -732,7 +747,7 @@ const DataViewControl = /* @__PURE__ */ defineComponent({
|
|
|
732
747
|
const provider = c.view.providers[id];
|
|
733
748
|
return h(resolveComponent((provider == null ? void 0 : provider.component) || "IBizControlShell"), {
|
|
734
749
|
class: [ns.e("searchbar"), semanticClass("searchbar")],
|
|
735
|
-
style: semanticStyle(searchbar),
|
|
750
|
+
style: semanticStyle("searchbar"),
|
|
736
751
|
context: c.view.context,
|
|
737
752
|
params: c.view.params,
|
|
738
753
|
modelData: searchbar,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ref, onBeforeUnmount } from 'vue';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
const useDataViewSkeleton = ({
|
|
5
|
+
model
|
|
6
|
+
}) => {
|
|
7
|
+
let skeletonContentEl;
|
|
8
|
+
const skeletonContainerWidth = ref(0);
|
|
9
|
+
let skeletonResizeObserver;
|
|
10
|
+
const setSkeletonContentRef = (el) => {
|
|
11
|
+
skeletonResizeObserver == null ? void 0 : skeletonResizeObserver.disconnect();
|
|
12
|
+
skeletonResizeObserver = void 0;
|
|
13
|
+
skeletonContentEl = el || void 0;
|
|
14
|
+
if (skeletonContentEl) {
|
|
15
|
+
const update = () => {
|
|
16
|
+
skeletonContainerWidth.value = skeletonContentEl.clientWidth;
|
|
17
|
+
};
|
|
18
|
+
update();
|
|
19
|
+
skeletonResizeObserver = new ResizeObserver(update);
|
|
20
|
+
skeletonResizeObserver.observe(skeletonContentEl);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
onBeforeUnmount(() => {
|
|
24
|
+
skeletonResizeObserver == null ? void 0 : skeletonResizeObserver.disconnect();
|
|
25
|
+
});
|
|
26
|
+
const calcSkeletonCount = (defaultCount) => {
|
|
27
|
+
const { cardWidth, cardColXS, cardColSM, cardColMD, cardColLG } = model;
|
|
28
|
+
if (!cardWidth || !skeletonContainerWidth.value || cardColXS || cardColSM || cardColMD || cardColLG) {
|
|
29
|
+
return defaultCount;
|
|
30
|
+
}
|
|
31
|
+
let gap = 0;
|
|
32
|
+
if (skeletonContentEl) {
|
|
33
|
+
gap = Number.parseFloat(getComputedStyle(skeletonContentEl).gap) || 0;
|
|
34
|
+
}
|
|
35
|
+
const count = Math.floor(
|
|
36
|
+
(skeletonContainerWidth.value + gap) / (cardWidth + gap)
|
|
37
|
+
);
|
|
38
|
+
return Math.max(1, count);
|
|
39
|
+
};
|
|
40
|
+
return { setSkeletonContentRef, calcSkeletonCount };
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { useDataViewSkeleton };
|
package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs
CHANGED
|
@@ -277,10 +277,11 @@ const RepeaterGrid = /* @__PURE__ */ defineComponent({
|
|
|
277
277
|
"align": "center"
|
|
278
278
|
}, {
|
|
279
279
|
default: (opts) => {
|
|
280
|
+
const rowEnableDelete = this.controller.getRowEnableDelete(opts.row);
|
|
280
281
|
const {
|
|
281
282
|
$index
|
|
282
283
|
} = opts;
|
|
283
|
-
if (!this.controller.enableDelete) {
|
|
284
|
+
if (!this.controller.enableDelete || !rowEnableDelete) {
|
|
284
285
|
return createVNode("span", null, [$index + 1]);
|
|
285
286
|
}
|
|
286
287
|
return [this.renderRemoveBtn($index), createVNode("span", {
|
|
@@ -320,6 +320,7 @@ const RepeaterGrid2 = /* @__PURE__ */ defineComponent({
|
|
|
320
320
|
"align": "center"
|
|
321
321
|
}, {
|
|
322
322
|
default: (opts) => {
|
|
323
|
+
const rowEnableDelete = this.controller.getRowEnableDelete(opts.row);
|
|
323
324
|
const {
|
|
324
325
|
$index
|
|
325
326
|
} = opts;
|
|
@@ -339,7 +340,7 @@ const RepeaterGrid2 = /* @__PURE__ */ defineComponent({
|
|
|
339
340
|
"onClick": () => {
|
|
340
341
|
this.controller.create(isEmpty ? 0 : $index + 1);
|
|
341
342
|
}
|
|
342
|
-
}, null), this.controller.enableDelete && !isEmpty && this.renderRemoveBtn($index)]);
|
|
343
|
+
}, null), this.controller.enableDelete && rowEnableDelete && !isEmpty && this.renderRemoveBtn($index)]);
|
|
343
344
|
}
|
|
344
345
|
})];
|
|
345
346
|
},
|
|
@@ -72,10 +72,17 @@ function useITableEvent(c) {
|
|
|
72
72
|
}, 300);
|
|
73
73
|
}
|
|
74
74
|
const allGridColumns = [];
|
|
75
|
+
const headerCellClassNameMap = /* @__PURE__ */ new Map();
|
|
75
76
|
recursiveIterate(
|
|
76
77
|
c.model,
|
|
77
78
|
(column) => {
|
|
78
79
|
allGridColumns.push(column);
|
|
80
|
+
if (column.codeName && column.headerSysCss && column.headerSysCss.cssName) {
|
|
81
|
+
headerCellClassNameMap.set(
|
|
82
|
+
column.codeName,
|
|
83
|
+
column.headerSysCss.cssName
|
|
84
|
+
);
|
|
85
|
+
}
|
|
79
86
|
},
|
|
80
87
|
{ childrenFields: ["degridColumns"] }
|
|
81
88
|
);
|
|
@@ -379,13 +386,7 @@ function useITableEvent(c) {
|
|
|
379
386
|
_rowIndex,
|
|
380
387
|
_columnIndex
|
|
381
388
|
}) {
|
|
382
|
-
|
|
383
|
-
return gridColumn.codeName === column.property;
|
|
384
|
-
});
|
|
385
|
-
if (columnModel && columnModel.headerSysCss && columnModel.headerSysCss.cssName) {
|
|
386
|
-
return columnModel.headerSysCss.cssName;
|
|
387
|
-
}
|
|
388
|
-
return "";
|
|
389
|
+
return headerCellClassNameMap.get(column.property) || "";
|
|
389
390
|
}
|
|
390
391
|
watch(
|
|
391
392
|
() => c.state.sortQuery,
|
|
@@ -364,6 +364,32 @@ const GridControl = /* @__PURE__ */ defineComponent({
|
|
|
364
364
|
cleanup = NOOP,
|
|
365
365
|
setDragEvent
|
|
366
366
|
} = useGridDraggable(tableRef, ns, c);
|
|
367
|
+
const childClass = [{
|
|
368
|
+
class: semanticClass("body.row"),
|
|
369
|
+
selector: ".el-table__row"
|
|
370
|
+
}, {
|
|
371
|
+
class: semanticClass("header.row"),
|
|
372
|
+
selector: ".el-table__header tr"
|
|
373
|
+
}, {
|
|
374
|
+
class: semanticClass("body.cell"),
|
|
375
|
+
selector: ".el-table__body .el-table__cell"
|
|
376
|
+
}, {
|
|
377
|
+
class: semanticClass("header.cell"),
|
|
378
|
+
selector: ".el-table__header .el-table__cell"
|
|
379
|
+
}];
|
|
380
|
+
const childStyle = [{
|
|
381
|
+
class: semanticStyle("body.row"),
|
|
382
|
+
selector: ".el-table__row"
|
|
383
|
+
}, {
|
|
384
|
+
class: semanticStyle("header.row"),
|
|
385
|
+
selector: ".el-table__header tr"
|
|
386
|
+
}, {
|
|
387
|
+
class: semanticStyle("body.cell"),
|
|
388
|
+
selector: ".el-table__body .el-table__cell"
|
|
389
|
+
}, {
|
|
390
|
+
class: semanticStyle("header.cell"),
|
|
391
|
+
selector: ".el-table__header .el-table__cell"
|
|
392
|
+
}];
|
|
367
393
|
c.evt.on("onLoadSuccess", () => {
|
|
368
394
|
if (setDragEvent) {
|
|
369
395
|
setDragEvent();
|
|
@@ -562,6 +588,8 @@ const GridControl = /* @__PURE__ */ defineComponent({
|
|
|
562
588
|
isLodeMoreDisabled,
|
|
563
589
|
semanticClass,
|
|
564
590
|
semanticStyle,
|
|
591
|
+
childClass,
|
|
592
|
+
childStyle,
|
|
565
593
|
pageSemantic,
|
|
566
594
|
onRowClick,
|
|
567
595
|
spanMethod,
|
|
@@ -598,7 +626,7 @@ const GridControl = /* @__PURE__ */ defineComponent({
|
|
|
598
626
|
"controller": this.c,
|
|
599
627
|
"style": [this.headerCssVars, this.semanticStyle("root")]
|
|
600
628
|
}, {
|
|
601
|
-
default: () => [createVNode(resolveComponent("el-table"), mergeProps({
|
|
629
|
+
default: () => [withDirectives(createVNode(resolveComponent("el-table"), mergeProps({
|
|
602
630
|
"border": true,
|
|
603
631
|
"ref": "tableRef",
|
|
604
632
|
"data": this.tableData,
|
|
@@ -618,37 +646,11 @@ const GridControl = /* @__PURE__ */ defineComponent({
|
|
|
618
646
|
"onHeaderDragend": this.headerDragend,
|
|
619
647
|
"default-expand-all": defaultExpandAll,
|
|
620
648
|
"show-header": !this.c.state.hideHeader,
|
|
621
|
-
"row-class-name":
|
|
622
|
-
return [this.handleRowClassName(event), this.semanticClass("body.row", {
|
|
623
|
-
event
|
|
624
|
-
})].join(" ");
|
|
625
|
-
},
|
|
626
|
-
"header-row-class-name": (...args) => this.semanticClass("header.row", {
|
|
627
|
-
args
|
|
628
|
-
}),
|
|
629
|
-
"row-style": (...args) => this.semanticStyle("body.row", {
|
|
630
|
-
args
|
|
631
|
-
}),
|
|
632
|
-
"header-row-style": (...args) => this.semanticStyle("header.row", {
|
|
633
|
-
args
|
|
634
|
-
}),
|
|
649
|
+
"row-class-name": this.handleRowClassName,
|
|
635
650
|
"highlight-current-row": state.singleSelect,
|
|
636
651
|
"expandRowKeys": this.c.state.expandRowKeys,
|
|
637
652
|
"onSelectionChange": this.onSelectionChange,
|
|
638
|
-
"cell-class-name":
|
|
639
|
-
args
|
|
640
|
-
}),
|
|
641
|
-
"header-cell-class-name": (data) => {
|
|
642
|
-
return [this.handleHeaderCellClassName(data), this.semanticClass("header.cell", {
|
|
643
|
-
event: data
|
|
644
|
-
})].join(" ");
|
|
645
|
-
},
|
|
646
|
-
"cell-style": (...args) => this.semanticStyle("body.cell", {
|
|
647
|
-
args
|
|
648
|
-
}),
|
|
649
|
-
"header-cell-style": (...args) => this.semanticStyle("header.cell", {
|
|
650
|
-
args
|
|
651
|
-
}),
|
|
653
|
+
"header-cell-class-name": this.handleHeaderCellClassName,
|
|
652
654
|
"onExpandChange": (row, expanded) => this.c.expandChange(row, expanded)
|
|
653
655
|
}, this.$attrs, renderAttrs(this.c.model, {
|
|
654
656
|
...this.c.getEventArgs()
|
|
@@ -690,7 +692,7 @@ const GridControl = /* @__PURE__ */ defineComponent({
|
|
|
690
692
|
}, null), ibiz.i18n.t("app.add")]
|
|
691
693
|
}) : this.renderPopover()];
|
|
692
694
|
}
|
|
693
|
-
}), this.c.state.enablePagingBar && createVNode(resolveComponent("iBizPagination"), {
|
|
695
|
+
}), [[resolveDirective("child-class"), this.childClass], [resolveDirective("child-style"), this.childStyle]]), this.c.state.enablePagingBar && createVNode(resolveComponent("iBizPagination"), {
|
|
694
696
|
"class": this.semanticClass("pagination"),
|
|
695
697
|
"style": this.semanticStyle("pagination"),
|
|
696
698
|
"semantic": this.pageSemantic,
|
package/es/control/list/list.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isVNode, defineComponent, createVNode, resolveComponent, ref, computed, watch } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent, ref, computed, watch, h } from 'vue';
|
|
2
2
|
import { useControlController, useNamespace, useControlPopoverzIndex, useSemanticNode, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { isNil, debounce } from 'lodash-es';
|
|
4
|
-
import { ListController, ControlVO } from '@ibiz-template/runtime';
|
|
4
|
+
import { ListController, ControlVO, getMDCtrlItemProvider } from '@ibiz-template/runtime';
|
|
5
5
|
import draggable from 'vuedraggable';
|
|
6
6
|
import { showTitle } from '@ibiz-template/core';
|
|
7
7
|
import '../../util/index.mjs';
|
|
@@ -310,6 +310,14 @@ const ListControl = /* @__PURE__ */ defineComponent({
|
|
|
310
310
|
}, null);
|
|
311
311
|
};
|
|
312
312
|
const renderItem = (item) => {
|
|
313
|
+
const provider = getMDCtrlItemProvider(c.model);
|
|
314
|
+
if (provider)
|
|
315
|
+
return h(resolveComponent(provider.component), {
|
|
316
|
+
data: item,
|
|
317
|
+
controller: c,
|
|
318
|
+
onClick: () => c.onRowClick(item),
|
|
319
|
+
onDblclick: () => c.onDbRowClick(item)
|
|
320
|
+
});
|
|
313
321
|
const cardStyle = ns.cssVarBlock({
|
|
314
322
|
"item-bg-color": "".concat(item.bgcolor || ""),
|
|
315
323
|
"text-color": "".concat(item.fontcolor || ""),
|
package/es/control/tree/tree.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, defineComponent, createVNode, resolveComponent, mergeProps, withDirectives, resolveDirective, ref, watch, nextTick, computed, onMounted, onUnmounted } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent, mergeProps, h, withDirectives, resolveDirective, ref, watch, nextTick, computed, onMounted, onUnmounted } from 'vue';
|
|
2
2
|
import { useControlController, useSemanticNode, useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { createUUID } from 'qx-util';
|
|
4
4
|
import { cloneDeep, debounce } from 'lodash-es';
|
|
@@ -868,10 +868,19 @@ const TreeControl = /* @__PURE__ */ defineComponent({
|
|
|
868
868
|
if (this.newNodeKey === data._id)
|
|
869
869
|
return this.renderNewNode();
|
|
870
870
|
const nodeData = this.findNodeData(data._uuid, this.c);
|
|
871
|
-
if (!nodeData)
|
|
871
|
+
if (!nodeData)
|
|
872
872
|
return null;
|
|
873
|
-
}
|
|
874
873
|
const nodeModel = this.c.getNodeModel(nodeData._nodeId);
|
|
874
|
+
const provider = this.c.nodeProvider[nodeData._nodeId];
|
|
875
|
+
if (provider)
|
|
876
|
+
return h(resolveComponent(provider.component), {
|
|
877
|
+
data: nodeData,
|
|
878
|
+
model: nodeModel,
|
|
879
|
+
controller: this.c,
|
|
880
|
+
onDblclick: (evt) => this.onNodeDbClick(nodeData, evt),
|
|
881
|
+
onClick: (evt) => this.onNodeClick(nodeData, data, evt),
|
|
882
|
+
onContextmenu: (evt) => this.onNodeContextmenu(nodeData, evt)
|
|
883
|
+
});
|
|
875
884
|
if (this.editingNodeKey === nodeData._id) {
|
|
876
885
|
return createVNode("div", {
|
|
877
886
|
"class": [this.ns.b("node"), (_a = nodeModel.sysCss) == null ? void 0 : _a.cssName, nodeData._dynaClass]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, defineComponent, createVNode, resolveComponent, mergeProps, nextTick, watch, createTextVNode, renderSlot } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent, withDirectives, mergeProps, resolveDirective, nextTick, watch, createTextVNode, renderSlot } from 'vue';
|
|
2
2
|
import { useControlController, useControlPopoverzIndex, useNamespace, useSemanticNode, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { recursiveIterate } from '@ibiz-template/core';
|
|
4
4
|
import { filterPresetAttrs, ScriptFactory, TreeGridController } from '@ibiz-template/runtime';
|
|
@@ -110,6 +110,32 @@ const TreeGridControl = /* @__PURE__ */ defineComponent({
|
|
|
110
110
|
semanticClass,
|
|
111
111
|
semanticStyle
|
|
112
112
|
} = useSemanticNode(c);
|
|
113
|
+
const childClass = [{
|
|
114
|
+
class: semanticClass("body.row"),
|
|
115
|
+
selector: ".el-table__row"
|
|
116
|
+
}, {
|
|
117
|
+
class: semanticClass("header.row"),
|
|
118
|
+
selector: ".el-table__header tr"
|
|
119
|
+
}, {
|
|
120
|
+
class: semanticClass("body.cell"),
|
|
121
|
+
selector: ".el-table__body .el-table__cell"
|
|
122
|
+
}, {
|
|
123
|
+
class: semanticClass("header.cell"),
|
|
124
|
+
selector: ".el-table__header .el-table__cell"
|
|
125
|
+
}];
|
|
126
|
+
const childStyle = [{
|
|
127
|
+
class: semanticStyle("body.row"),
|
|
128
|
+
selector: ".el-table__row"
|
|
129
|
+
}, {
|
|
130
|
+
class: semanticStyle("header.row"),
|
|
131
|
+
selector: ".el-table__header tr"
|
|
132
|
+
}, {
|
|
133
|
+
class: semanticStyle("body.cell"),
|
|
134
|
+
selector: ".el-table__body .el-table__cell"
|
|
135
|
+
}, {
|
|
136
|
+
class: semanticStyle("header.cell"),
|
|
137
|
+
selector: ".el-table__header .el-table__cell"
|
|
138
|
+
}];
|
|
113
139
|
const {
|
|
114
140
|
tableRef,
|
|
115
141
|
onRowClick,
|
|
@@ -281,6 +307,8 @@ const TreeGridControl = /* @__PURE__ */ defineComponent({
|
|
|
281
307
|
semanticClass,
|
|
282
308
|
semanticStyle,
|
|
283
309
|
pageSemantic,
|
|
310
|
+
childClass,
|
|
311
|
+
childStyle,
|
|
284
312
|
loadData,
|
|
285
313
|
onRowClick,
|
|
286
314
|
renderColumn,
|
|
@@ -315,7 +343,7 @@ const TreeGridControl = /* @__PURE__ */ defineComponent({
|
|
|
315
343
|
}, {
|
|
316
344
|
default: () => {
|
|
317
345
|
var _a;
|
|
318
|
-
return [this.c.state.isLoaded && createVNode(resolveComponent("el-table"), mergeProps({
|
|
346
|
+
return [this.c.state.isLoaded && withDirectives(createVNode(resolveComponent("el-table"), mergeProps({
|
|
319
347
|
"lazy": true,
|
|
320
348
|
"border": true,
|
|
321
349
|
"ref": "tableRef",
|
|
@@ -336,32 +364,8 @@ const TreeGridControl = /* @__PURE__ */ defineComponent({
|
|
|
336
364
|
"onSelectionChange": this.onSelectionChange,
|
|
337
365
|
"highlight-current-row": state.singleSelect,
|
|
338
366
|
"onExpandChange": (row, expanded) => this.c.expandChange(row, expanded),
|
|
339
|
-
"row-class-name":
|
|
340
|
-
|
|
341
|
-
event
|
|
342
|
-
})].join(" ");
|
|
343
|
-
},
|
|
344
|
-
"header-row-class-name": (...args) => this.semanticClass("header.row", {
|
|
345
|
-
args
|
|
346
|
-
}),
|
|
347
|
-
"row-style": (...args) => this.semanticStyle("body.row", {
|
|
348
|
-
args
|
|
349
|
-
}),
|
|
350
|
-
"header-row-style": (...args) => this.semanticStyle("header.row", {
|
|
351
|
-
args
|
|
352
|
-
}),
|
|
353
|
-
"cell-class-name": (...args) => this.semanticClass("body.cell", {
|
|
354
|
-
args
|
|
355
|
-
}),
|
|
356
|
-
"header-cell-class-name": (data) => {
|
|
357
|
-
return [this.handleHeaderCellClassName(data), this.semanticClass("header.cell", {
|
|
358
|
-
event: data
|
|
359
|
-
})].join(" ");
|
|
360
|
-
},
|
|
361
|
-
"cell-style": (...args) => this.semanticStyle("body.cell", {
|
|
362
|
-
args
|
|
363
|
-
}),
|
|
364
|
-
"header-cell-style": this.semanticStyle("header.cell"),
|
|
367
|
+
"row-class-name": this.handleRowClassName,
|
|
368
|
+
"header-cell-class-name": this.handleHeaderCellClassName,
|
|
365
369
|
"tree-props": {
|
|
366
370
|
children: "children",
|
|
367
371
|
hasChildren: "hasChildren"
|
|
@@ -385,7 +389,7 @@ const TreeGridControl = /* @__PURE__ */ defineComponent({
|
|
|
385
389
|
append: () => {
|
|
386
390
|
return this.renderPopover();
|
|
387
391
|
}
|
|
388
|
-
}), enablePagingBar && createVNode(resolveComponent("iBizPagination"), {
|
|
392
|
+
}), [[resolveDirective("child-class"), this.childClass], [resolveDirective("child-style"), this.childStyle]]), enablePagingBar && createVNode(resolveComponent("iBizPagination"), {
|
|
389
393
|
"class": this.semanticClass("pagination"),
|
|
390
394
|
"style": this.semanticStyle("pagination"),
|
|
391
395
|
"semantic": this.pageSemantic,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, defineComponent, renderSlot, createVNode, resolveComponent, mergeProps, h, computed, ref, watchEffect } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, renderSlot, createVNode, resolveComponent, mergeProps, h, withDirectives, resolveDirective, computed, ref, watchEffect } from 'vue';
|
|
2
2
|
import { useControlController, useControlPopoverzIndex, useNamespace, useSemanticNode, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { filterPresetAttrs, ScriptFactory, TreeGridExController } from '@ibiz-template/runtime';
|
|
4
4
|
import { RuntimeError } from '@ibiz-template/core';
|
|
@@ -61,6 +61,32 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
semanticClass,
|
|
62
62
|
semanticStyle
|
|
63
63
|
} = useSemanticNode(c);
|
|
64
|
+
const childClass = [{
|
|
65
|
+
class: semanticClass("body.row"),
|
|
66
|
+
selector: ".el-table__row"
|
|
67
|
+
}, {
|
|
68
|
+
class: semanticClass("header.row"),
|
|
69
|
+
selector: ".el-table__header tr"
|
|
70
|
+
}, {
|
|
71
|
+
class: semanticClass("body.cell"),
|
|
72
|
+
selector: ".el-table__body .el-table__cell"
|
|
73
|
+
}, {
|
|
74
|
+
class: semanticClass("header.cell"),
|
|
75
|
+
selector: ".el-table__header .el-table__cell"
|
|
76
|
+
}];
|
|
77
|
+
const childStyle = [{
|
|
78
|
+
class: semanticStyle("body.row"),
|
|
79
|
+
selector: ".el-table__row"
|
|
80
|
+
}, {
|
|
81
|
+
class: semanticStyle("header.row"),
|
|
82
|
+
selector: ".el-table__header tr"
|
|
83
|
+
}, {
|
|
84
|
+
class: semanticStyle("body.cell"),
|
|
85
|
+
selector: ".el-table__body .el-table__cell"
|
|
86
|
+
}, {
|
|
87
|
+
class: semanticStyle("header.cell"),
|
|
88
|
+
selector: ".el-table__header .el-table__cell"
|
|
89
|
+
}];
|
|
64
90
|
const renderNoData = () => {
|
|
65
91
|
const {
|
|
66
92
|
isLoaded
|
|
@@ -213,6 +239,8 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
213
239
|
tableRefreshKey,
|
|
214
240
|
semanticClass,
|
|
215
241
|
semanticStyle,
|
|
242
|
+
childClass,
|
|
243
|
+
childStyle,
|
|
216
244
|
loadData,
|
|
217
245
|
onRowClick,
|
|
218
246
|
renderNoData,
|
|
@@ -293,7 +321,7 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
293
321
|
"class": [this.ns.b(), this.semanticClass("root")],
|
|
294
322
|
"style": this.semanticStyle("root")
|
|
295
323
|
}, {
|
|
296
|
-
default: () => [this.c.state.isLoaded && createVNode(resolveComponent("el-table"), mergeProps({
|
|
324
|
+
default: () => [this.c.state.isLoaded && withDirectives(createVNode(resolveComponent("el-table"), mergeProps({
|
|
297
325
|
"ref": "tableRef",
|
|
298
326
|
"key": this.tableRefreshKey,
|
|
299
327
|
"class": [this.ns.e("table"), this.semanticClass("content")],
|
|
@@ -308,30 +336,7 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
308
336
|
"lazy": true,
|
|
309
337
|
"onRowClick": this.onRowClick,
|
|
310
338
|
"onExpandChange": this.onExpandChange,
|
|
311
|
-
"row-class-name":
|
|
312
|
-
return [this.handleRowClassName(event), this.semanticClass("body.row", {
|
|
313
|
-
event
|
|
314
|
-
})].join(" ");
|
|
315
|
-
},
|
|
316
|
-
"header-row-class-name": (...args) => this.semanticClass("header.row", {
|
|
317
|
-
args
|
|
318
|
-
}),
|
|
319
|
-
"row-style": (...args) => this.semanticStyle("body.row", {
|
|
320
|
-
args
|
|
321
|
-
}),
|
|
322
|
-
"header-row-style": (...args) => this.semanticStyle("header.row", {
|
|
323
|
-
args
|
|
324
|
-
}),
|
|
325
|
-
"cell-class-name": (...args) => this.semanticClass("body.cell", {
|
|
326
|
-
args
|
|
327
|
-
}),
|
|
328
|
-
"header-cell-class-name": (...args) => this.semanticClass("header.cell", {
|
|
329
|
-
args
|
|
330
|
-
}),
|
|
331
|
-
"cell-style": (...args) => this.semanticStyle("body.cell", {
|
|
332
|
-
args
|
|
333
|
-
}),
|
|
334
|
-
"header-cell-style": this.semanticStyle("header.cell"),
|
|
339
|
+
"row-class-name": this.handleRowClassName,
|
|
335
340
|
"load": this.loadData
|
|
336
341
|
}, renderAttrs(this.c.model, {
|
|
337
342
|
...this.c.getEventArgs()
|
|
@@ -345,7 +350,7 @@ const TreeGridExControl = /* @__PURE__ */ defineComponent({
|
|
|
345
350
|
append: () => {
|
|
346
351
|
return this.renderPopover();
|
|
347
352
|
}
|
|
348
|
-
})]
|
|
353
|
+
}), [[resolveDirective("child-class"), this.childClass], [resolveDirective("child-style"), this.childStyle]])]
|
|
349
354
|
})]
|
|
350
355
|
});
|
|
351
356
|
}
|