@ibiz-template/vue3-components 0.7.41-alpha.95 → 0.7.41-alpha.97
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/ibiz-markdown-editor-CQRvKzXG.js +1 -0
- package/dist/index-CTxNNWbw.js +1 -0
- package/dist/index-DAM-lgrU.js +1 -0
- package/dist/index-YyzbGEva.js +339 -0
- package/dist/{index.es-Cvhhf-Jp.js → index.es-Bx7ry_G4.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-BnRUlcfv.js +1 -0
- package/dist/{xlsx-util-Dq_UVHCG.js → xlsx-util-DXx8himL.js} +1 -1
- package/es/common/control-navigation/provider/navigation-base.provider.mjs +3 -1
- package/es/common/high-light-code/high-light-code-util.mjs +183 -0
- package/es/common/high-light-code/high-light-code.css +1 -0
- package/es/common/high-light-code/high-light-code.mjs +31 -0
- package/es/common/index.mjs +2 -0
- package/es/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
- package/es/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.mjs +20 -3
- package/es/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.mjs +32 -7
- package/es/control/data-view/data-view.mjs +98 -2
- package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +3 -1
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.mjs +80 -2
- package/es/control/search-bar/filter-mode-select/filter-mode-select.mjs +2 -2
- package/es/control/search-bar/filter-tree/filter-tree.mjs +2 -2
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +10 -3
- package/es/editor/code/code-editor.controller.mjs +13 -3
- package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/es/editor/code/monaco-editor/monaco-editor.mjs +41 -8
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +5 -1
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +7 -1
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +3 -1
- package/es/editor/text-box/input/input.mjs +5 -1
- package/es/locale/en/index.mjs +4 -3
- package/es/locale/zh-CN/index.mjs +4 -3
- package/es/util/app-util/app-util.mjs +9 -2
- package/es/util/inline-ai-util/inline-ai-util.mjs +17 -1
- package/lib/common/control-navigation/provider/navigation-base.provider.cjs +3 -1
- package/lib/common/high-light-code/high-light-code-util.cjs +185 -0
- package/lib/common/high-light-code/high-light-code.cjs +33 -0
- package/lib/common/high-light-code/high-light-code.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.cjs +20 -3
- package/lib/control/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
- package/lib/control/dashboard/portlet/rawitem-portlet/rawitem-portlet.cjs +31 -6
- package/lib/control/data-view/data-view.cjs +97 -1
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +3 -1
- package/lib/control/list/list.cjs +80 -2
- package/lib/control/list/list.css +1 -1
- package/lib/control/search-bar/filter-mode-select/filter-mode-select.cjs +2 -2
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +2 -2
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +10 -3
- package/lib/editor/code/code-editor.controller.cjs +13 -3
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +41 -8
- package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +5 -1
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +7 -1
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +3 -1
- package/lib/editor/text-box/input/input.cjs +5 -1
- package/lib/locale/en/index.cjs +4 -3
- package/lib/locale/zh-CN/index.cjs +4 -3
- package/lib/util/app-util/app-util.cjs +9 -2
- package/lib/util/inline-ai-util/inline-ai-util.cjs +17 -1
- package/package.json +6 -6
- package/dist/ibiz-markdown-editor-8I67TTyP.js +0 -1
- package/dist/index-1KhprUjB.js +0 -339
- package/dist/index-ChKlnzfZ.js +0 -1
- package/dist/index-DiSn0c6_.js +0 -1
- package/dist/wang-editor-D7CsxIdH.js +0 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const KEYWORDS = /* @__PURE__ */ new Set([
|
|
3
|
+
"async",
|
|
4
|
+
"function",
|
|
5
|
+
"Function",
|
|
6
|
+
"return",
|
|
7
|
+
"const",
|
|
8
|
+
"let",
|
|
9
|
+
"var",
|
|
10
|
+
"await",
|
|
11
|
+
"new",
|
|
12
|
+
"this",
|
|
13
|
+
"null",
|
|
14
|
+
"undefined",
|
|
15
|
+
"true",
|
|
16
|
+
"false"
|
|
17
|
+
]);
|
|
18
|
+
function escapeHtml(s) {
|
|
19
|
+
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
20
|
+
}
|
|
21
|
+
function normalizeFunctionBody(src) {
|
|
22
|
+
const open = src.lastIndexOf("{");
|
|
23
|
+
if (open === -1)
|
|
24
|
+
return src;
|
|
25
|
+
let depth = 0;
|
|
26
|
+
let close = -1;
|
|
27
|
+
let i = open;
|
|
28
|
+
while (i < src.length) {
|
|
29
|
+
const ch = src[i];
|
|
30
|
+
if (ch === '"' || ch === "'" || ch === "`") {
|
|
31
|
+
const q = ch;
|
|
32
|
+
i++;
|
|
33
|
+
while (i < src.length && src[i] !== q) {
|
|
34
|
+
if (src[i] === "\\")
|
|
35
|
+
i++;
|
|
36
|
+
i++;
|
|
37
|
+
}
|
|
38
|
+
i++;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (ch === "/" && src[i + 1] === "/") {
|
|
42
|
+
while (i < src.length && src[i] !== "\n")
|
|
43
|
+
i++;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (ch === "/" && src[i + 1] === "*") {
|
|
47
|
+
i += 2;
|
|
48
|
+
while (i < src.length - 1 && !(src[i] === "*" && src[i + 1] === "/"))
|
|
49
|
+
i++;
|
|
50
|
+
i += 2;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (ch === "{")
|
|
54
|
+
depth++;
|
|
55
|
+
else if (ch === "}") {
|
|
56
|
+
depth--;
|
|
57
|
+
if (depth === 0) {
|
|
58
|
+
close = i;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
i++;
|
|
63
|
+
}
|
|
64
|
+
if (close === -1)
|
|
65
|
+
return src;
|
|
66
|
+
const inner = src.slice(open + 1, close);
|
|
67
|
+
if (/\n/.test(inner))
|
|
68
|
+
return src;
|
|
69
|
+
const trimmed = inner.trim();
|
|
70
|
+
const indented = trimmed ? "\n ".concat(trimmed, "\n") : "\n";
|
|
71
|
+
return src.slice(0, open + 1) + indented + src.slice(close);
|
|
72
|
+
}
|
|
73
|
+
const highlight = (src) => {
|
|
74
|
+
src = normalizeFunctionBody(src);
|
|
75
|
+
let result = "";
|
|
76
|
+
let i = 0;
|
|
77
|
+
console.log(src);
|
|
78
|
+
while (i < src.length) {
|
|
79
|
+
if (src[i] === "/" && src[i + 1] === "/") {
|
|
80
|
+
let j = i;
|
|
81
|
+
while (j < src.length && src[j] !== "\n")
|
|
82
|
+
j++;
|
|
83
|
+
result += '<span class="comment">'.concat(escapeHtml(src.slice(i, j)), "</span>");
|
|
84
|
+
i = j;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (src[i] === "/" && src[i + 1] === "*") {
|
|
88
|
+
let j = i + 2;
|
|
89
|
+
while (j < src.length - 1 && !(src[j] === "*" && src[j + 1] === "/"))
|
|
90
|
+
j++;
|
|
91
|
+
j += 2;
|
|
92
|
+
result += '<span class="comment">'.concat(escapeHtml(src.slice(i, j)), "</span>");
|
|
93
|
+
i = j;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (src[i] === '"' || src[i] === "'" || src[i] === "`") {
|
|
97
|
+
const quote = src[i];
|
|
98
|
+
let j = i + 1;
|
|
99
|
+
while (j < src.length && src[j] !== quote) {
|
|
100
|
+
if (src[j] === "\\")
|
|
101
|
+
j++;
|
|
102
|
+
j++;
|
|
103
|
+
}
|
|
104
|
+
j++;
|
|
105
|
+
result += '<span class="string">'.concat(escapeHtml(src.slice(i, j)), "</span>");
|
|
106
|
+
i = j;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (/[0-9]/.test(src[i])) {
|
|
110
|
+
let j = i;
|
|
111
|
+
while (j < src.length && /[0-9._]/.test(src[j]))
|
|
112
|
+
j++;
|
|
113
|
+
result += '<span class="number">'.concat(escapeHtml(src.slice(i, j)), "</span>");
|
|
114
|
+
i = j;
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (/[a-zA-Z_$]/.test(src[i])) {
|
|
118
|
+
let j = i;
|
|
119
|
+
while (j < src.length && /[a-zA-Z0-9_$]/.test(src[j]))
|
|
120
|
+
j++;
|
|
121
|
+
const word = src.slice(i, j);
|
|
122
|
+
let k = j;
|
|
123
|
+
while (k < src.length && src[k] === " ")
|
|
124
|
+
k++;
|
|
125
|
+
const isCall = src[k] === "(";
|
|
126
|
+
let m = j;
|
|
127
|
+
while (m < src.length && src[m] === " ")
|
|
128
|
+
m++;
|
|
129
|
+
const isTyped = src[m] === ":";
|
|
130
|
+
if (KEYWORDS.has(word)) {
|
|
131
|
+
result += '<span class="keyword">'.concat(escapeHtml(word), "</span>");
|
|
132
|
+
} else if (isTyped) {
|
|
133
|
+
result += '<span class="param">'.concat(escapeHtml(word), "</span>");
|
|
134
|
+
} else if (isCall) {
|
|
135
|
+
result += '<span class="fn-call">'.concat(escapeHtml(word), "</span>");
|
|
136
|
+
} else {
|
|
137
|
+
result += '<span class="ident">'.concat(escapeHtml(word), "</span>");
|
|
138
|
+
}
|
|
139
|
+
i = j;
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (src[i] === ":") {
|
|
143
|
+
result += '<span class="punct">:</span>';
|
|
144
|
+
i++;
|
|
145
|
+
let ws = "";
|
|
146
|
+
while (i < src.length && src[i] === " ") {
|
|
147
|
+
ws += src[i];
|
|
148
|
+
i++;
|
|
149
|
+
}
|
|
150
|
+
if (ws)
|
|
151
|
+
result += ws;
|
|
152
|
+
if (i < src.length && /[a-zA-Z_$]/.test(src[i])) {
|
|
153
|
+
let j = i;
|
|
154
|
+
while (j < src.length && /[a-zA-Z0-9_$<>[\]|&]/.test(src[j]))
|
|
155
|
+
j++;
|
|
156
|
+
result += '<span class="type">'.concat(escapeHtml(src.slice(i, j)), "</span>");
|
|
157
|
+
i = j;
|
|
158
|
+
}
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if ("(){}[]".includes(src[i])) {
|
|
162
|
+
const cls = "([{".includes(src[i]) ? "bracket-open" : "bracket-close";
|
|
163
|
+
result += '<span class="bracket '.concat(cls, '">').concat(escapeHtml(src[i]), "</span>");
|
|
164
|
+
i++;
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
if (",;.".includes(src[i])) {
|
|
168
|
+
result += '<span class="punct">'.concat(escapeHtml(src[i]), "</span>");
|
|
169
|
+
i++;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if ("=><+-*/%!&|^~".includes(src[i])) {
|
|
173
|
+
result += '<span class="operator">'.concat(escapeHtml(src[i]), "</span>");
|
|
174
|
+
i++;
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
result += escapeHtml(src[i]);
|
|
178
|
+
i++;
|
|
179
|
+
}
|
|
180
|
+
return result;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export { highlight };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-high-light-code{color:var(--ibiz-color-text-3);white-space:break-spaces}.ibiz-high-light-code .keyword{color:#7f77dd}.ibiz-high-light-code .type{color:#378add}.ibiz-high-light-code .param{color:#1d9e75}.ibiz-high-light-code .ident{color:#1d9e75}.ibiz-high-light-code .fn-call{color:#d2a8ff}.ibiz-high-light-code .string{color:#639922}.ibiz-high-light-code .number{color:#79c0ff}.ibiz-high-light-code .comment{font-style:italic;color:#8b949e}.ibiz-high-light-code .operator{color:#ff7b72}.ibiz-high-light-code .punct{color:#8b949e}.ibiz-high-light-code .bracket-open{color:#e3b341}.ibiz-high-light-code .bracket-close{color:#e3b341}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent, createVNode, computed } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { highlight } from './high-light-code-util.mjs';
|
|
4
|
+
import './high-light-code.css';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const IBizHighLightCode = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizHighLightCode",
|
|
9
|
+
props: {
|
|
10
|
+
code: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(props) {
|
|
16
|
+
const ns = useNamespace("high-light-code");
|
|
17
|
+
const highlighted = computed(() => highlight(props.code));
|
|
18
|
+
return {
|
|
19
|
+
ns,
|
|
20
|
+
highlighted
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
render() {
|
|
24
|
+
return createVNode("div", {
|
|
25
|
+
"class": this.ns.b(),
|
|
26
|
+
"innerHTML": this.highlighted
|
|
27
|
+
}, null);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export { IBizHighLightCode };
|
package/es/common/index.mjs
CHANGED
|
@@ -34,6 +34,7 @@ import { IBizNavSplit } from './nav-split/nav-split.mjs';
|
|
|
34
34
|
import { IBizCropping } from './cropping/cropping.mjs';
|
|
35
35
|
import { IBizEditorEmptyText } from './editor-empty-text/editor-empty-text.mjs';
|
|
36
36
|
import { IBizKanbanSetting } from './kanben-setting/kanben-setting.mjs';
|
|
37
|
+
import { IBizHighLightCode } from './high-light-code/high-light-code.mjs';
|
|
37
38
|
|
|
38
39
|
"use strict";
|
|
39
40
|
const IBizCommonComponents = {
|
|
@@ -92,6 +93,7 @@ const IBizCommonComponents = {
|
|
|
92
93
|
v.component(IBizGanttSetting.name, IBizGanttSetting);
|
|
93
94
|
v.component(IBizNavSplit.name, IBizNavSplit);
|
|
94
95
|
v.component(IBizSignaturePad.name, IBizSignaturePad);
|
|
96
|
+
v.component(IBizHighLightCode.name, IBizHighLightCode);
|
|
95
97
|
}
|
|
96
98
|
};
|
|
97
99
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-appmenu-portlet{--ibiz-control-appmenu-portlet-margin:var(--ibiz-spacing-base-tight);--ibiz-control-appmenu-portlet-border-color:var(--ibiz-color-primary);--ibiz-control-appmenu-portlet-bg-color:var(--ibiz-color-bg-0);--ibiz-control-appmenu-portlet-padding:var(--ibiz-spacing-base-tight);--ibiz-control-appmenu-portlet-content-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);padding:var(--ibiz-control-appmenu-portlet-content-padding)}.ibiz-control-appmenu-portlet__content{display:flex;flex-wrap:wrap;width:100%}.ibiz-control-appmenu-portlet-item{position:relative;display:flex;flex-direction:column;flex-shrink:0;align-items:flex-start;justify-content:center;width:calc(25% - var(--ibiz-control-appmenu-portlet-margin) * 2);padding:var(--ibiz-control-appmenu-portlet-padding);margin:var(--ibiz-control-appmenu-portlet-margin);cursor:pointer;background-color:var(--ibiz-control-appmenu-portlet-bg-color)}.ibiz-control-appmenu-portlet-item::before{position:absolute;left:0;width:4px;height:100%;content:"";background-color:var(--ibiz-control-appmenu-portlet-border-color)}.ibiz-control-appmenu-portlet-group{width:100%}.ibiz-control-appmenu-portlet-group .el-collapse-item__content{display:flex;flex-wrap:wrap}
|
|
1
|
+
.ibiz-control-appmenu-portlet{--ibiz-control-appmenu-portlet-margin:var(--ibiz-spacing-base-tight);--ibiz-control-appmenu-portlet-border-color:var(--ibiz-color-primary);--ibiz-control-appmenu-portlet-bg-color:var(--ibiz-color-bg-0);--ibiz-control-appmenu-portlet-padding:var(--ibiz-spacing-base-tight);--ibiz-control-appmenu-portlet-content-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-control-appmenu-portlet-counter-gap:var(--ibiz-spacing-tight);padding:var(--ibiz-control-appmenu-portlet-content-padding)}.ibiz-control-appmenu-portlet__content{display:flex;flex-wrap:wrap;width:100%}.ibiz-control-appmenu-portlet-item{position:relative;display:flex;flex-direction:column;flex-shrink:0;align-items:flex-start;justify-content:center;width:calc(25% - var(--ibiz-control-appmenu-portlet-margin) * 2);padding:var(--ibiz-control-appmenu-portlet-padding);margin:var(--ibiz-control-appmenu-portlet-margin);cursor:pointer;background-color:var(--ibiz-control-appmenu-portlet-bg-color)}.ibiz-control-appmenu-portlet-item::before{position:absolute;left:0;width:4px;height:100%;content:"";background-color:var(--ibiz-control-appmenu-portlet-border-color)}.ibiz-control-appmenu-portlet-item .ibiz-control-appmenu-portlet__counter{position:absolute;top:var(--ibiz-control-appmenu-portlet-counter-gap);right:var(--ibiz-control-appmenu-portlet-counter-gap)}.ibiz-control-appmenu-portlet-group{width:100%}.ibiz-control-appmenu-portlet-group .el-collapse-item__header .ibiz-control-appmenu-portlet__counter{margin-left:var(--ibiz-control-appmenu-portlet-counter-gap)}.ibiz-control-appmenu-portlet-group .el-collapse-item__content{display:flex;flex-wrap:wrap}
|
|
@@ -48,6 +48,9 @@ const AppMenuPortletControl = /* @__PURE__ */ defineComponent({
|
|
|
48
48
|
if (!state.visible) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
+
const {
|
|
52
|
+
counterId
|
|
53
|
+
} = item;
|
|
51
54
|
return createVNode("div", {
|
|
52
55
|
"class": [ns.b("item"), ns.is("disabled", !item.appFuncId)],
|
|
53
56
|
"title": showTitle(item.tooltip || item.caption),
|
|
@@ -59,7 +62,10 @@ const AppMenuPortletControl = /* @__PURE__ */ defineComponent({
|
|
|
59
62
|
}, [createVNode(resolveComponent("iBizIcon"), {
|
|
60
63
|
"class": ns.be("item", "icon"),
|
|
61
64
|
"icon": item.sysImage
|
|
62
|
-
}, null), createVNode("
|
|
65
|
+
}, null), counterId ? createVNode(resolveComponent("iBizBadge"), {
|
|
66
|
+
"class": ns.e("counter"),
|
|
67
|
+
"value": c.state.counterData[counterId]
|
|
68
|
+
}, null) : null, createVNode("span", {
|
|
63
69
|
"class": ns.be("item", "label")
|
|
64
70
|
}, [item.caption])]);
|
|
65
71
|
};
|
|
@@ -71,16 +77,27 @@ const AppMenuPortletControl = /* @__PURE__ */ defineComponent({
|
|
|
71
77
|
if (!item.appMenuItems) {
|
|
72
78
|
return renderItem(item);
|
|
73
79
|
}
|
|
80
|
+
const {
|
|
81
|
+
counterId
|
|
82
|
+
} = item;
|
|
74
83
|
return createVNode(resolveComponent("el-collapse-item"), {
|
|
75
84
|
"class": ns.b("group"),
|
|
76
85
|
"name": item.id,
|
|
77
86
|
"title": showTitle(item.caption)
|
|
78
87
|
}, {
|
|
88
|
+
title: () => {
|
|
89
|
+
return [createVNode("span", {
|
|
90
|
+
"class": ns.be("group", "label")
|
|
91
|
+
}, [item.caption]), counterId ? createVNode(resolveComponent("iBizBadge"), {
|
|
92
|
+
"class": ns.e("counter"),
|
|
93
|
+
"value": c.state.counterData[counterId]
|
|
94
|
+
}, null) : null];
|
|
95
|
+
},
|
|
79
96
|
default: () => {
|
|
80
97
|
var _a2;
|
|
81
|
-
return
|
|
98
|
+
return (_a2 = item.appMenuItems) == null ? void 0 : _a2.map((child) => {
|
|
82
99
|
return renderItem(child);
|
|
83
|
-
})
|
|
100
|
+
});
|
|
84
101
|
}
|
|
85
102
|
});
|
|
86
103
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { isVNode, defineComponent, createVNode, resolveComponent, h } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent, h, ref, onMounted } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { RawItemPortletController } from '@ibiz-template/runtime';
|
|
4
3
|
|
|
5
4
|
"use strict";
|
|
6
5
|
function _isSlot(s) {
|
|
@@ -14,17 +13,42 @@ const RawItemPortlet = /* @__PURE__ */ defineComponent({
|
|
|
14
13
|
required: true
|
|
15
14
|
},
|
|
16
15
|
controller: {
|
|
17
|
-
type:
|
|
16
|
+
type: Object,
|
|
18
17
|
required: true
|
|
19
18
|
}
|
|
20
19
|
},
|
|
21
20
|
setup(props) {
|
|
22
21
|
var _a;
|
|
23
|
-
const
|
|
24
|
-
const
|
|
22
|
+
const c = props.controller;
|
|
23
|
+
const ns = useNamespace("portlet-".concat((_a = c.model.portletType) == null ? void 0 : _a.toLowerCase()));
|
|
24
|
+
const content = ref();
|
|
25
|
+
const onInit = async () => {
|
|
26
|
+
const rawItemModel = c.model.rawItem;
|
|
27
|
+
if (!rawItemModel)
|
|
28
|
+
return;
|
|
29
|
+
let rawItemContent;
|
|
30
|
+
if (rawItemModel.contentType === "RAW") {
|
|
31
|
+
rawItemContent = rawItemModel.caption;
|
|
32
|
+
} else if (rawItemModel.contentType === "HTML") {
|
|
33
|
+
rawItemContent = rawItemModel.content;
|
|
34
|
+
}
|
|
35
|
+
const data = c.dashboard.view.srfactiveviewdata || {};
|
|
36
|
+
if (rawItemContent && rawItemModel.templateMode)
|
|
37
|
+
rawItemContent = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), {
|
|
38
|
+
data: {
|
|
39
|
+
...data
|
|
40
|
+
},
|
|
41
|
+
context: props.controller.context,
|
|
42
|
+
params: props.controller.params
|
|
43
|
+
});
|
|
44
|
+
content.value = rawItemContent;
|
|
45
|
+
};
|
|
46
|
+
onMounted(() => {
|
|
47
|
+
onInit();
|
|
48
|
+
});
|
|
25
49
|
return {
|
|
26
50
|
ns,
|
|
27
|
-
|
|
51
|
+
content
|
|
28
52
|
};
|
|
29
53
|
},
|
|
30
54
|
render() {
|
|
@@ -34,7 +58,8 @@ const RawItemPortlet = /* @__PURE__ */ defineComponent({
|
|
|
34
58
|
"controller": this.controller,
|
|
35
59
|
"class": classArr
|
|
36
60
|
}, _isSlot(_slot = h(resolveComponent("iBizRawItem"), {
|
|
37
|
-
rawItem: this.
|
|
61
|
+
rawItem: this.modelData,
|
|
62
|
+
content: this.content
|
|
38
63
|
})) ? _slot : {
|
|
39
64
|
default: () => [_slot]
|
|
40
65
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, defineComponent, createVNode, resolveComponent, computed, ref, watch, withDirectives, resolveDirective, h } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent, computed, ref, watch, withDirectives, resolveDirective, Fragment, h } from 'vue';
|
|
2
2
|
import { useControlController, useNamespace, useControlPopoverzIndex, hasEmptyPanelRenderer, IBizCustomRender } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { DataViewControlController, ControlVO, getControl } from '@ibiz-template/runtime';
|
|
4
4
|
import { createUUID } from 'qx-util';
|
|
@@ -524,6 +524,102 @@ const DataViewControl = /* @__PURE__ */ defineComponent({
|
|
|
524
524
|
}
|
|
525
525
|
return icon;
|
|
526
526
|
};
|
|
527
|
+
const ITEM_HEIGHT = 24;
|
|
528
|
+
const calcSkeletonRows = () => {
|
|
529
|
+
const {
|
|
530
|
+
cardHeight
|
|
531
|
+
} = c.model;
|
|
532
|
+
if (cardHeight) {
|
|
533
|
+
return Math.max(1, Math.floor((cardHeight - 32 + 4) / ITEM_HEIGHT));
|
|
534
|
+
}
|
|
535
|
+
return 2;
|
|
536
|
+
};
|
|
537
|
+
const renderSkeletonItem = () => {
|
|
538
|
+
const rows = calcSkeletonRows();
|
|
539
|
+
return createVNode(resolveComponent("el-card"), {
|
|
540
|
+
"class": [ns.b("item"), ns.e("skeleton-item")],
|
|
541
|
+
"body-style": {
|
|
542
|
+
width: c.model.cardWidth ? "".concat(c.model.cardWidth, "px") : "auto",
|
|
543
|
+
height: c.model.cardHeight ? "".concat(c.model.cardHeight, "px") : "auto",
|
|
544
|
+
overflow: "hidden"
|
|
545
|
+
}
|
|
546
|
+
}, {
|
|
547
|
+
default: () => [createVNode(resolveComponent("el-skeleton"), {
|
|
548
|
+
"animated": true,
|
|
549
|
+
"style": "min-width: 30px;"
|
|
550
|
+
}, {
|
|
551
|
+
template: () => createVNode(Fragment, null, [Array.from({
|
|
552
|
+
length: rows
|
|
553
|
+
}, () => createVNode(resolveComponent("el-skeleton-item"), {
|
|
554
|
+
"variant": "rect"
|
|
555
|
+
}, null))])
|
|
556
|
+
})]
|
|
557
|
+
});
|
|
558
|
+
};
|
|
559
|
+
const renderSkeletonCardLayout = (count) => {
|
|
560
|
+
const {
|
|
561
|
+
cardColXS,
|
|
562
|
+
cardColSM,
|
|
563
|
+
cardColMD,
|
|
564
|
+
cardColLG
|
|
565
|
+
} = c.model;
|
|
566
|
+
if (cardColXS || cardColSM || cardColMD || cardColLG) {
|
|
567
|
+
return createVNode("div", {
|
|
568
|
+
"class": ["el-row", ns.e("layout-row")]
|
|
569
|
+
}, [Array.from({
|
|
570
|
+
length: count
|
|
571
|
+
}, () => createVNode(resolveComponent("el-col"), {
|
|
572
|
+
"xs": cardColXS,
|
|
573
|
+
"sm": cardColSM,
|
|
574
|
+
"md": cardColMD,
|
|
575
|
+
"lg": cardColLG,
|
|
576
|
+
"class": ns.e("layout-col")
|
|
577
|
+
}, {
|
|
578
|
+
default: () => [createVNode("div", {
|
|
579
|
+
"class": ns.b("scroll-item")
|
|
580
|
+
}, [renderSkeletonItem()])]
|
|
581
|
+
}))]);
|
|
582
|
+
}
|
|
583
|
+
return createVNode("div", {
|
|
584
|
+
"class": ns.e("layout-flex")
|
|
585
|
+
}, [Array.from({
|
|
586
|
+
length: count
|
|
587
|
+
}, () => createVNode("div", {
|
|
588
|
+
"class": ns.b("scroll-item")
|
|
589
|
+
}, [renderSkeletonItem()]))]);
|
|
590
|
+
};
|
|
591
|
+
const renderGroupSkeleton = () => {
|
|
592
|
+
return createVNode("div", {
|
|
593
|
+
"class": ns.b("skeleton")
|
|
594
|
+
}, [Array.from({
|
|
595
|
+
length: 3
|
|
596
|
+
}, () => createVNode("div", {
|
|
597
|
+
"class": ns.b("skeleton-group")
|
|
598
|
+
}, [createVNode("div", {
|
|
599
|
+
"class": ns.be("skeleton-group", "header")
|
|
600
|
+
}, [createVNode(resolveComponent("el-skeleton"), {
|
|
601
|
+
"animated": true,
|
|
602
|
+
"rows": 1
|
|
603
|
+
}, {
|
|
604
|
+
template: () => createVNode(resolveComponent("el-skeleton-item"), {
|
|
605
|
+
"variant": "rect",
|
|
606
|
+
"style": "width: 15%"
|
|
607
|
+
}, null)
|
|
608
|
+
})]), createVNode("div", {
|
|
609
|
+
"class": [ns.be("skeleton", "content"), ns.be("skeleton-group", "content")]
|
|
610
|
+
}, [renderSkeletonCardLayout(3)])]))]);
|
|
611
|
+
};
|
|
612
|
+
const renderSkeleton = () => {
|
|
613
|
+
if (c.state.enableGroup) {
|
|
614
|
+
return renderGroupSkeleton();
|
|
615
|
+
}
|
|
616
|
+
const count = c.state.size || 6;
|
|
617
|
+
return createVNode("div", {
|
|
618
|
+
"class": ns.b("skeleton")
|
|
619
|
+
}, [createVNode("div", {
|
|
620
|
+
"class": ns.be("skeleton", "content")
|
|
621
|
+
}, [renderSkeletonCardLayout(Math.min(count, 20))])]);
|
|
622
|
+
};
|
|
527
623
|
const renderNavIcon = () => {
|
|
528
624
|
const {
|
|
529
625
|
enableNavView,
|
|
@@ -556,7 +652,7 @@ const DataViewControl = /* @__PURE__ */ defineComponent({
|
|
|
556
652
|
}, null);
|
|
557
653
|
};
|
|
558
654
|
const renderContent = () => {
|
|
559
|
-
return [c.state.items.length > 0 ? renderHasData() : renderNoData(), renderBatchToolBar(), renderNavIcon(), renderCollapseExpandIcon()];
|
|
655
|
+
return [!c.state.isLoaded ? renderSkeleton() : c.state.items.length > 0 ? renderHasData() : renderNoData(), renderBatchToolBar(), renderNavIcon(), renderCollapseExpandIcon()];
|
|
560
656
|
};
|
|
561
657
|
const renderPagingBar = () => {
|
|
562
658
|
if (c.state.enablePagingBar && c.model.pagingMode === 1)
|
|
@@ -168,7 +168,9 @@ const FormRawItem = /* @__PURE__ */ defineComponent({
|
|
|
168
168
|
rawItemContent = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), Object.assign(obj, {
|
|
169
169
|
data: {
|
|
170
170
|
...newVal
|
|
171
|
-
}
|
|
171
|
+
},
|
|
172
|
+
context: c.context,
|
|
173
|
+
params: c.params
|
|
172
174
|
}));
|
|
173
175
|
}
|
|
174
176
|
content.value = rawItemContent;
|
package/es/control/list/list.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-list-item{flex-grow:1;min-height:var(--ibiz-control-list-item-height);padding:var(--ibiz-control-list-padding);font-weight:var(--ibiz-control-list-font-weight);color:var(--ibiz-control-list-text-color);cursor:pointer;background-color:var(--ibiz-control-list-item-bg-color)}.ibiz-control-list-item__right{padding:0 var(--ibiz-spacing-extra-tight)}.ibiz-control-list-item__right--actions{display:flex;-moz-column-gap:var(--ibiz-spacing-extra-tight);column-gap:var(--ibiz-spacing-extra-tight);justify-content:center}.ibiz-control-list-item__right--actions .ibiz-action-toolbar__item{margin:0}.ibiz-control-list-item__right--actions .ibiz-action-toolbar__item--label.is-has-caption{margin:0}.ibiz-control-list-item:has(.ibiz-control-list-item__right){display:flex;justify-content:space-between}.ibiz-control-list-item:has(.ibiz-control-list-item__right) .ibiz-control-list-item__caption{flex:1}.ibiz-control-list-item__new{display:flex;align-items:center;justify-content:center;margin-top:var(--ibiz-spacing-tight);color:var(--ibiz-color-text-3);border:2px dashed var(--ibiz-color-border)}.ibiz-control-list{--ibiz-control-list-text-color:var(--ibiz-color-text-0);--ibiz-control-list-load-more-color:var(--ibiz-color-text-2);--ibiz-control-list-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-control-list-active-bg-color:var(--ibiz-color-fill-2);--ibiz-control-list-font-weight:var(--ibiz-font-weight-regular);--ibiz-control-list-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-tight);--ibiz-control-list-item-bg-color:unset;display:flex;flex-flow:column nowrap;align-items:stretch;justify-content:flex-start;position:relative;height:100%}.ibiz-control-list__drag-icon{cursor:move;visibility:hidden}.ibiz-control-list__nav-icon{position:absolute;top:18px;right:10px;color:var(--ibiz-color-primary);cursor:pointer}.ibiz-control-list__load-more{text-align:center}.ibiz-control-list__load-more i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-control-list-load-more-color);cursor:pointer}.ibiz-control-list__load-more i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-list__collapse-expand-icon{width:calc(100% - var(--ibiz-spacing-base-tight));text-align:center}.ibiz-control-list__collapse-expand-icon i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-list__collapse-expand-icon i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-list__load-more-button{padding:var(--ibiz-control-list-padding);text-align:center}.ibiz-control-list__quicktoolbar{display:flex;justify-content:center;width:100%}.ibiz-control-list__batchtoolbar{display:none;margin:var(--ibiz-spacing-tight) 0}.ibiz-control-list__batchtoolbar.is-show{display:block}.ibiz-control-list .ibiz-control-list-content{flex-grow:1}.ibiz-control-list-content.is-show-underLine .ibiz-control-list-scroll-item{border-bottom:1px solid var(--ibiz-color-border)}.ibiz-control-list-content .ibiz-row-detail:last-of-type .ibiz-control-list-scroll-item{border-bottom:none}.ibiz-control-list-scroll{height:100%;overflow:auto}.ibiz-control-list-scroll.is-reverse-scroll .ibiz-control-list__layout-flex{display:flex;flex-direction:column-reverse}.ibiz-control-list-group-content__item-header{display:flex;align-items:center;justify-content:space-between;width:100%}.ibiz-control-list-scroll-item{display:flex;align-items:center}.ibiz-control-list-scroll-item__checkbox{flex-shrink:0;margin-left:var(--ibiz-spacing-tight)}.ibiz-control-list-scroll-item__icon{flex-shrink:0;margin-left:var(--ibiz-spacing-tight);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-list-scroll-item:hover{background-color:var(--ibiz-control-list-hover-bg-color)}.ibiz-control-list-scroll-item:hover .ibiz-control-list__drag-icon{visibility:visible}.ibiz-control-list-scroll-item.is-active{background-color:var(--ibiz-control-list-active-bg-color)}.ibiz-control-list-group-style2{--ibiz-control-list-group-style2-color:var(--ibiz-color-disabled-text)}.ibiz-control-list-group-style2__header{display:flex;align-items:center;justify-content:center;width:100%}.ibiz-control-list-group-style2__header--title{padding:0 var(--ibiz-spacing-tight);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-control-list-group-style2-color)}.ibiz-control-list-group-style2__header::after,.ibiz-control-list-group-style2__header::before{display:block;flex:1;height:1px;margin-top:1px;content:"";border-top:1px var(--ibiz-color-border) solid;transform:translateY(-50%)}
|
|
1
|
+
.ibiz-control-list-item{flex-grow:1;min-height:var(--ibiz-control-list-item-height);padding:var(--ibiz-control-list-padding);font-weight:var(--ibiz-control-list-font-weight);color:var(--ibiz-control-list-text-color);cursor:pointer;background-color:var(--ibiz-control-list-item-bg-color)}.ibiz-control-list-item__right{padding:0 var(--ibiz-spacing-extra-tight)}.ibiz-control-list-item__right--actions{display:flex;-moz-column-gap:var(--ibiz-spacing-extra-tight);column-gap:var(--ibiz-spacing-extra-tight);justify-content:center}.ibiz-control-list-item__right--actions .ibiz-action-toolbar__item{margin:0}.ibiz-control-list-item__right--actions .ibiz-action-toolbar__item--label.is-has-caption{margin:0}.ibiz-control-list-item:has(.ibiz-control-list-item__right){display:flex;justify-content:space-between}.ibiz-control-list-item:has(.ibiz-control-list-item__right) .ibiz-control-list-item__caption{flex:1}.ibiz-control-list-item__new{display:flex;align-items:center;justify-content:center;margin-top:var(--ibiz-spacing-tight);color:var(--ibiz-color-text-3);border:2px dashed var(--ibiz-color-border)}.ibiz-control-list{--ibiz-control-list-text-color:var(--ibiz-color-text-0);--ibiz-control-list-load-more-color:var(--ibiz-color-text-2);--ibiz-control-list-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-control-list-active-bg-color:var(--ibiz-color-fill-2);--ibiz-control-list-font-weight:var(--ibiz-font-weight-regular);--ibiz-control-list-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-tight);--ibiz-control-list-item-bg-color:unset;display:flex;flex-flow:column nowrap;align-items:stretch;justify-content:flex-start;position:relative;height:100%}.ibiz-control-list__drag-icon{cursor:move;visibility:hidden}.ibiz-control-list__nav-icon{position:absolute;top:18px;right:10px;color:var(--ibiz-color-primary);cursor:pointer}.ibiz-control-list__load-more{text-align:center}.ibiz-control-list__load-more i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-control-list-load-more-color);cursor:pointer}.ibiz-control-list__load-more i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-list__collapse-expand-icon{width:calc(100% - var(--ibiz-spacing-base-tight));text-align:center}.ibiz-control-list__collapse-expand-icon i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-list__collapse-expand-icon i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-list__load-more-button{padding:var(--ibiz-control-list-padding);text-align:center}.ibiz-control-list__quicktoolbar{display:flex;justify-content:center;width:100%}.ibiz-control-list__batchtoolbar{display:none;margin:var(--ibiz-spacing-tight) 0}.ibiz-control-list__batchtoolbar.is-show{display:block}.ibiz-control-list .ibiz-control-list-content{flex-grow:1}.ibiz-control-list-content.is-show-underLine .ibiz-control-list-scroll-item{border-bottom:1px solid var(--ibiz-color-border)}.ibiz-control-list-content .ibiz-row-detail:last-of-type .ibiz-control-list-scroll-item{border-bottom:none}.ibiz-control-list-scroll{height:100%;overflow:auto}.ibiz-control-list-scroll.is-reverse-scroll .ibiz-control-list__layout-flex{display:flex;flex-direction:column-reverse}.ibiz-control-list-group-content__item-header{display:flex;align-items:center;justify-content:space-between;width:100%}.ibiz-control-list-scroll-item{display:flex;align-items:center}.ibiz-control-list-scroll-item__checkbox{flex-shrink:0;margin-left:var(--ibiz-spacing-tight)}.ibiz-control-list-scroll-item__icon{flex-shrink:0;margin-left:var(--ibiz-spacing-tight);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-list-scroll-item:hover{background-color:var(--ibiz-control-list-hover-bg-color)}.ibiz-control-list-scroll-item:hover .ibiz-control-list__drag-icon{visibility:visible}.ibiz-control-list-scroll-item.is-active{background-color:var(--ibiz-control-list-active-bg-color)}.ibiz-control-list-group-style2{--ibiz-control-list-group-style2-color:var(--ibiz-color-disabled-text)}.ibiz-control-list-group-style2__header{display:flex;align-items:center;justify-content:center;width:100%}.ibiz-control-list-group-style2__header--title{padding:0 var(--ibiz-spacing-tight);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-control-list-group-style2-color)}.ibiz-control-list-group-style2__header::after,.ibiz-control-list-group-style2__header::before{display:block;flex:1;height:1px;margin-top:1px;content:"";border-top:1px var(--ibiz-color-border) solid;transform:translateY(-50%)}.ibiz-control-list-skeleton-item{display:flex;padding-bottom:var(--ibiz-spacing-tight)}.ibiz-control-list-skeleton-item__avatar{flex:none;width:calc(var(--ibiz-spacing-base) * 2 + var(--ibiz-spacing-base-loose) * 3 + var(--ibiz-spacing-base-tight) * 2);padding:0 var(--ibiz-spacing-base);--el-skeleton-circle-size:calc(var(--ibiz-spacing-base-loose) * 3 + var(--ibiz-spacing-base-tight) * 2)}.ibiz-control-list-skeleton-item__avatar .el-skeleton__circle{height:var(--el-skeleton-circle-size)}.ibiz-control-list-skeleton-group__header{margin-bottom:var(--ibiz-spacing-base)}.ibiz-control-list-skeleton-group-style2__header{display:flex;justify-content:center}
|
package/es/control/list/list.mjs
CHANGED
|
@@ -525,6 +525,83 @@ const ListControl = /* @__PURE__ */ defineComponent({
|
|
|
525
525
|
}
|
|
526
526
|
return null;
|
|
527
527
|
};
|
|
528
|
+
const renderSkeletonItem = () => {
|
|
529
|
+
return createVNode("div", {
|
|
530
|
+
"class": ns.b("skeleton-item")
|
|
531
|
+
}, [createVNode(resolveComponent("el-skeleton"), {
|
|
532
|
+
"animated": true,
|
|
533
|
+
"class": ns.be("skeleton-item", "avatar")
|
|
534
|
+
}, {
|
|
535
|
+
template: () => createVNode(resolveComponent("el-skeleton-item"), {
|
|
536
|
+
"variant": "circle"
|
|
537
|
+
}, null)
|
|
538
|
+
}), createVNode(resolveComponent("el-skeleton"), {
|
|
539
|
+
"animated": true,
|
|
540
|
+
"rows": 2
|
|
541
|
+
}, null)]);
|
|
542
|
+
};
|
|
543
|
+
const renderGroupSkeleton = () => {
|
|
544
|
+
return createVNode("div", {
|
|
545
|
+
"class": ns.b("skeleton")
|
|
546
|
+
}, [Array.from({
|
|
547
|
+
length: 3
|
|
548
|
+
}, () => createVNode("div", {
|
|
549
|
+
"class": ns.b("skeleton-group")
|
|
550
|
+
}, [createVNode("div", {
|
|
551
|
+
"class": ns.be("skeleton-group", "header")
|
|
552
|
+
}, [createVNode(resolveComponent("el-skeleton"), {
|
|
553
|
+
"animated": true,
|
|
554
|
+
"rows": 1
|
|
555
|
+
}, {
|
|
556
|
+
template: () => createVNode(resolveComponent("el-skeleton-item"), {
|
|
557
|
+
"variant": "rect",
|
|
558
|
+
"style": "width: 15%"
|
|
559
|
+
}, null)
|
|
560
|
+
})]), createVNode("div", {
|
|
561
|
+
"class": [ns.be("skeleton", "content"), ns.be("skeleton-group", "content")]
|
|
562
|
+
}, [Array.from({
|
|
563
|
+
length: 3
|
|
564
|
+
}, () => renderSkeletonItem())])]))]);
|
|
565
|
+
};
|
|
566
|
+
const renderGroupStyle2Skeleton = () => {
|
|
567
|
+
return createVNode("div", {
|
|
568
|
+
"class": ns.b("skeleton")
|
|
569
|
+
}, [Array.from({
|
|
570
|
+
length: 3
|
|
571
|
+
}, () => createVNode("div", {
|
|
572
|
+
"class": [ns.b("skeleton-group"), ns.b("skeleton-group-style2")]
|
|
573
|
+
}, [createVNode("div", {
|
|
574
|
+
"class": [ns.be("skeleton-group", "header"), ns.be("skeleton-group-style2", "header")]
|
|
575
|
+
}, [createVNode(resolveComponent("el-skeleton"), {
|
|
576
|
+
"animated": true,
|
|
577
|
+
"rows": 1,
|
|
578
|
+
"style": "width: 15%"
|
|
579
|
+
}, {
|
|
580
|
+
template: () => createVNode(resolveComponent("el-skeleton-item"), {
|
|
581
|
+
"variant": "rect"
|
|
582
|
+
}, null)
|
|
583
|
+
})]), createVNode("div", {
|
|
584
|
+
"class": [ns.be("skeleton", "content"), ns.be("skeleton-group", "content"), ns.be("skeleton-group-style2", "content")]
|
|
585
|
+
}, [Array.from({
|
|
586
|
+
length: 3
|
|
587
|
+
}, () => renderSkeletonItem())])]))]);
|
|
588
|
+
};
|
|
589
|
+
const renderSkeleton = () => {
|
|
590
|
+
if (c.state.enableGroup && !c.state.isSimple) {
|
|
591
|
+
if (c.model.groupStyle === "STYLE2") {
|
|
592
|
+
return renderGroupStyle2Skeleton();
|
|
593
|
+
}
|
|
594
|
+
return renderGroupSkeleton();
|
|
595
|
+
}
|
|
596
|
+
const count = c.state.size || 6;
|
|
597
|
+
return createVNode("div", {
|
|
598
|
+
"class": ns.b("skeleton")
|
|
599
|
+
}, [createVNode("div", {
|
|
600
|
+
"class": ns.be("skeleton", "content")
|
|
601
|
+
}, [Array.from({
|
|
602
|
+
length: Math.min(count, 20)
|
|
603
|
+
}, () => renderSkeletonItem())])]);
|
|
604
|
+
};
|
|
528
605
|
return {
|
|
529
606
|
c,
|
|
530
607
|
ns,
|
|
@@ -536,13 +613,14 @@ const ListControl = /* @__PURE__ */ defineComponent({
|
|
|
536
613
|
onPageSizeChange,
|
|
537
614
|
renderListContent,
|
|
538
615
|
renderBatchToolBar,
|
|
539
|
-
renderCollapseExpandIcon
|
|
616
|
+
renderCollapseExpandIcon,
|
|
617
|
+
renderSkeleton
|
|
540
618
|
};
|
|
541
619
|
},
|
|
542
620
|
render() {
|
|
543
621
|
let content = null;
|
|
544
622
|
if (this.c.state.isCreated) {
|
|
545
|
-
content = [this.c.state.items.length > 0 ? this.renderListContent() : this.renderNoData(), this.renderBatchToolBar(), this.c.state.enablePagingBar && this.c.model.pagingMode === 1 ? createVNode(resolveComponent("iBizPagination"), {
|
|
623
|
+
content = [!this.c.state.isLoaded ? this.renderSkeleton() : this.c.state.items.length > 0 ? this.renderListContent() : this.renderNoData(), this.renderBatchToolBar(), this.c.state.enablePagingBar && this.c.model.pagingMode === 1 ? createVNode(resolveComponent("iBizPagination"), {
|
|
546
624
|
"mode": this.c.paginationMode,
|
|
547
625
|
"class": this.ns.e("pagination"),
|
|
548
626
|
"total": this.c.state.total,
|
|
@@ -52,8 +52,8 @@ const FilterModeSelect = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
valueOP: ValueOP.LIKE,
|
|
53
53
|
label: ibiz.i18n.t("control.searchBar.conditions.like")
|
|
54
54
|
}, {
|
|
55
|
-
valueOP: ValueOP.
|
|
56
|
-
label: ibiz.i18n.t("control.searchBar.conditions.
|
|
55
|
+
valueOP: ValueOP.LEFT_LIKE,
|
|
56
|
+
label: ibiz.i18n.t("control.searchBar.conditions.left_like")
|
|
57
57
|
}, {
|
|
58
58
|
valueOP: ValueOP.RIGHT_LIKE,
|
|
59
59
|
label: ibiz.i18n.t("control.searchBar.conditions.right_like")
|
|
@@ -90,8 +90,8 @@ const FilterTreeControl = /* @__PURE__ */ defineComponent({
|
|
|
90
90
|
valueOP: ValueOP.LIKE,
|
|
91
91
|
label: ibiz.i18n.t("control.searchBar.conditions.like")
|
|
92
92
|
}, {
|
|
93
|
-
valueOP: ValueOP.
|
|
94
|
-
label: ibiz.i18n.t("control.searchBar.conditions.
|
|
93
|
+
valueOP: ValueOP.LEFT_LIKE,
|
|
94
|
+
label: ibiz.i18n.t("control.searchBar.conditions.left_like")
|
|
95
95
|
}, {
|
|
96
96
|
valueOP: ValueOP.RIGHT_LIKE,
|
|
97
97
|
label: ibiz.i18n.t("control.searchBar.conditions.right_like")
|