@ibiz-template/vue3-components 0.5.7-alpha.2 → 0.5.7-alpha.3
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/index-5ErnlgZ5.js +2 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-BE5Eyj1T.js → xlsx-util-15YjErDj.js} +1 -1
- package/es/common/view-message/view-message.css +1 -0
- package/es/common/view-message/view-message.d.ts +1 -0
- package/es/common/view-message/view-message.mjs +2 -0
- package/es/control/drbar/drbar.controller.d.ts +8 -1
- package/es/control/drbar/drbar.controller.mjs +17 -6
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.mjs +4 -3
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +6 -1
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +46 -38
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +4 -5
- package/es/editor/text-box/input/input.mjs +3 -0
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/panel-button/index.d.ts +1 -0
- package/es/panel-component/panel-button/panel-button.d.ts +1 -0
- package/es/panel-component/panel-button/panel-button.mjs +4 -1
- package/es/panel-component/user-message/user-message.mjs +2 -1
- package/es/panel-component/view-message/index.d.ts +24 -0
- package/es/panel-component/view-message/index.mjs +15 -0
- package/es/panel-component/view-message/view-message.d.ts +26 -0
- package/es/panel-component/view-message/view-message.mjs +46 -0
- package/es/panel-component/view-message/view-message.provider.d.ts +15 -0
- package/es/panel-component/view-message/view-message.provider.mjs +21 -0
- package/lib/common/view-message/view-message.cjs +2 -0
- package/lib/common/view-message/view-message.css +1 -0
- package/lib/control/drbar/drbar.controller.cjs +17 -6
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.cjs +4 -3
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +6 -1
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +45 -37
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +4 -5
- package/lib/editor/text-box/input/input.cjs +3 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/panel-button/panel-button.cjs +4 -1
- package/lib/panel-component/user-message/user-message.cjs +1 -0
- package/lib/panel-component/view-message/index.cjs +20 -0
- package/lib/panel-component/view-message/view-message.cjs +48 -0
- package/lib/panel-component/view-message/view-message.provider.cjs +23 -0
- package/package.json +5 -5
- package/dist/index-p-YChWUE.js +0 -2
|
@@ -20,6 +20,7 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
const isShowAll = vue.ref(true);
|
|
21
21
|
const isEditable = vue.ref(false);
|
|
22
22
|
const editorRef = vue.ref();
|
|
23
|
+
const isLoaded = vue.ref(false);
|
|
23
24
|
const showFormDefaultContent = vue.computed(() => {
|
|
24
25
|
if (props.controlParams && props.controlParams.editmode === "hover") {
|
|
25
26
|
return true;
|
|
@@ -109,6 +110,7 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
109
110
|
const res = await c.getServiceData(trimQuery, props.data);
|
|
110
111
|
if (res) {
|
|
111
112
|
items.value = res.data;
|
|
113
|
+
isLoaded.value = true;
|
|
112
114
|
if (cb && cb instanceof Function) {
|
|
113
115
|
cb(items.value);
|
|
114
116
|
}
|
|
@@ -161,13 +163,16 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
161
163
|
vue.onMounted(() => {
|
|
162
164
|
vue.watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
163
165
|
if (newVal !== oldVal) {
|
|
164
|
-
if (
|
|
166
|
+
if (!isLoaded.value && editorRef.value) {
|
|
165
167
|
await onSearch("");
|
|
166
168
|
}
|
|
167
169
|
const curItem = items.value.find((item) => Object.is(item[c.keyName], newVal));
|
|
168
170
|
if (curItem) {
|
|
169
171
|
curValue.value = curItem[c.textName];
|
|
170
172
|
}
|
|
173
|
+
if (newVal === null) {
|
|
174
|
+
emit("change", null);
|
|
175
|
+
}
|
|
171
176
|
}
|
|
172
177
|
}, {
|
|
173
178
|
immediate: true
|
|
@@ -24,6 +24,9 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
24
24
|
const refValue = vue.ref("");
|
|
25
25
|
const isEditable = vue.ref(false);
|
|
26
26
|
const editorRef = vue.ref();
|
|
27
|
+
const loading = vue.ref(false);
|
|
28
|
+
let waitQuery = null;
|
|
29
|
+
const isLoaded = vue.ref(false);
|
|
27
30
|
const showFormDefaultContent = vue.computed(() => {
|
|
28
31
|
if (props.controlParams && props.controlParams.editmode === "hover") {
|
|
29
32
|
return true;
|
|
@@ -57,16 +60,50 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
60
|
}, {
|
|
58
61
|
immediate: true
|
|
59
62
|
});
|
|
60
|
-
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
const onSearch = async (query) => {
|
|
64
|
+
if (!shouldLoad.value) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (c.model.appDataEntityId && loading.value === false) {
|
|
68
|
+
loading.value = true;
|
|
69
|
+
try {
|
|
70
|
+
let trimQuery = "";
|
|
71
|
+
if (query !== props.value) {
|
|
72
|
+
trimQuery = query.trim();
|
|
73
|
+
}
|
|
74
|
+
const res = await c.getServiceData(trimQuery, props.data);
|
|
75
|
+
if (res) {
|
|
76
|
+
items.value = res.data;
|
|
77
|
+
}
|
|
78
|
+
} finally {
|
|
79
|
+
loading.value = false;
|
|
80
|
+
isLoaded.value = true;
|
|
81
|
+
if (waitQuery != null) {
|
|
82
|
+
const selfQuery = waitQuery;
|
|
83
|
+
waitQuery = null;
|
|
84
|
+
await onSearch(selfQuery);
|
|
85
|
+
}
|
|
65
86
|
}
|
|
87
|
+
} else {
|
|
88
|
+
waitQuery = query;
|
|
66
89
|
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
};
|
|
91
|
+
vue.onMounted(() => {
|
|
92
|
+
vue.watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
93
|
+
if (newVal !== oldVal) {
|
|
94
|
+
if (!isLoaded.value && editorRef.value) {
|
|
95
|
+
shouldLoad.value = true;
|
|
96
|
+
await onSearch("");
|
|
97
|
+
}
|
|
98
|
+
refValue.value = newVal;
|
|
99
|
+
if (newVal === null) {
|
|
100
|
+
emit("change", null);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
immediate: true,
|
|
105
|
+
deep: true
|
|
106
|
+
});
|
|
70
107
|
});
|
|
71
108
|
const setEditable = (flag) => {
|
|
72
109
|
if (flag) {
|
|
@@ -77,7 +114,6 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
77
114
|
}, 100);
|
|
78
115
|
}
|
|
79
116
|
};
|
|
80
|
-
const loading = vue.ref(false);
|
|
81
117
|
const onACSelect = async (data) => {
|
|
82
118
|
const dataItems = await c.calcFillDataItems(data);
|
|
83
119
|
if (dataItems.length) {
|
|
@@ -107,34 +143,6 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
107
143
|
}
|
|
108
144
|
shouldLoad.value = false;
|
|
109
145
|
};
|
|
110
|
-
let waitQuery = null;
|
|
111
|
-
const onSearch = async (query) => {
|
|
112
|
-
if (!shouldLoad.value) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
if (c.model.appDataEntityId && loading.value === false) {
|
|
116
|
-
loading.value = true;
|
|
117
|
-
try {
|
|
118
|
-
let trimQuery = "";
|
|
119
|
-
if (query !== props.value) {
|
|
120
|
-
trimQuery = query.trim();
|
|
121
|
-
}
|
|
122
|
-
const res = await c.getServiceData(trimQuery, props.data);
|
|
123
|
-
if (res) {
|
|
124
|
-
items.value = res.data;
|
|
125
|
-
}
|
|
126
|
-
} finally {
|
|
127
|
-
loading.value = false;
|
|
128
|
-
if (waitQuery != null) {
|
|
129
|
-
const selfQuery = waitQuery;
|
|
130
|
-
waitQuery = null;
|
|
131
|
-
await onSearch(selfQuery);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
} else {
|
|
135
|
-
waitQuery = query;
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
146
|
const onOpenChange = (isOpen) => {
|
|
139
147
|
if (isOpen) {
|
|
140
148
|
items.value = [];
|
|
@@ -15,7 +15,6 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
15
15
|
setup(props, {
|
|
16
16
|
emit
|
|
17
17
|
}) {
|
|
18
|
-
var _a;
|
|
19
18
|
const ns = vue3Util.useNamespace("dropdown");
|
|
20
19
|
const c = props.controller;
|
|
21
20
|
const items = vue.ref([]);
|
|
@@ -25,7 +24,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
24
|
const treeNodes = vue.ref([]);
|
|
26
25
|
const isEditable = vue.ref(false);
|
|
27
26
|
const editorRef = vue.ref();
|
|
28
|
-
const editorItems =
|
|
27
|
+
const editorItems = c.model.editorItems;
|
|
29
28
|
const isLoading = vue.ref(false);
|
|
30
29
|
let editorState = "";
|
|
31
30
|
let funcs;
|
|
@@ -105,15 +104,15 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
105
104
|
};
|
|
106
105
|
const curValue = vue.computed({
|
|
107
106
|
get() {
|
|
108
|
-
var
|
|
107
|
+
var _a, _b;
|
|
109
108
|
if (!isLoadedCodeList.value) {
|
|
110
|
-
return "";
|
|
109
|
+
return c.multiple ? [] : "";
|
|
111
110
|
}
|
|
112
111
|
if (editorItems && editorItems.length > 0 && !c.multiple) {
|
|
113
112
|
return props.data[editorItems[0].id];
|
|
114
113
|
}
|
|
115
114
|
if (props.value) {
|
|
116
|
-
return c.multiple ? (
|
|
115
|
+
return c.multiple ? (_a = props.value) == null ? void 0 : _a.toString().split(",") : props.value.toString();
|
|
117
116
|
}
|
|
118
117
|
return (_b = props.value) == null ? void 0 : _b.toString();
|
|
119
118
|
},
|
|
@@ -267,6 +267,9 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
267
267
|
"type": this.type,
|
|
268
268
|
"rows": this.rows,
|
|
269
269
|
"resize": "none",
|
|
270
|
+
"maxlength": this.c.model.maxLength,
|
|
271
|
+
"minlength": this.c.model.minLength,
|
|
272
|
+
"show-word-limit": this.c.model.showMaxLength,
|
|
270
273
|
"onInput": this.handleChange,
|
|
271
274
|
"onKeyup": this.handleKeyUp,
|
|
272
275
|
"onBlur": this.onBlur,
|
|
@@ -20,6 +20,7 @@ var index$e = require('./panel-remember-me/index.cjs');
|
|
|
20
20
|
var index$7 = require('./index-actions/index.cjs');
|
|
21
21
|
var index$f = require('./user-message/index.cjs');
|
|
22
22
|
var index$g = require('./searchform-buttons/index.cjs');
|
|
23
|
+
var index$h = require('./view-message/index.cjs');
|
|
23
24
|
var navPosIndex_state = require('./nav-pos-index/nav-pos-index.state.cjs');
|
|
24
25
|
var navPosIndex_controller = require('./nav-pos-index/nav-pos-index.controller.cjs');
|
|
25
26
|
var panelButton_controller = require('./panel-button/panel-button.controller.cjs');
|
|
@@ -59,6 +60,7 @@ const IBizPanelComponents = {
|
|
|
59
60
|
v.use(vue3Util.IBizPanelContainerImage);
|
|
60
61
|
v.use(index$g.IBizSearchFormButtons);
|
|
61
62
|
v.use(vue3Util.IBizPanelItemRender);
|
|
63
|
+
v.use(index$h.IBizViewMessage);
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
|
|
@@ -29,7 +29,8 @@ const PanelButton = /* @__PURE__ */ vue.defineComponent({
|
|
|
29
29
|
showCaption,
|
|
30
30
|
sysImage,
|
|
31
31
|
codeName,
|
|
32
|
-
itemStyle
|
|
32
|
+
itemStyle,
|
|
33
|
+
tooltip
|
|
33
34
|
} = props.modelData;
|
|
34
35
|
const {
|
|
35
36
|
panel,
|
|
@@ -84,6 +85,7 @@ const PanelButton = /* @__PURE__ */ vue.defineComponent({
|
|
|
84
85
|
sysImage,
|
|
85
86
|
codeName,
|
|
86
87
|
state,
|
|
88
|
+
tooltip,
|
|
87
89
|
handleButtonClick
|
|
88
90
|
};
|
|
89
91
|
},
|
|
@@ -94,6 +96,7 @@ const PanelButton = /* @__PURE__ */ vue.defineComponent({
|
|
|
94
96
|
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
95
97
|
"type": this.buttonType,
|
|
96
98
|
"text": this.isText,
|
|
99
|
+
"title": this.tooltip,
|
|
97
100
|
"disabled": this.state.disabled,
|
|
98
101
|
"loading": this.state.loading,
|
|
99
102
|
"onClick": this.handleButtonClick
|
|
@@ -63,6 +63,7 @@ const UserMessage = /* @__PURE__ */ vue.defineComponent({
|
|
|
63
63
|
"hidden": this.noticeNum === 0
|
|
64
64
|
}, {
|
|
65
65
|
default: () => [vue.createVNode(vue.resolveComponent("i-biz-icon"), {
|
|
66
|
+
"id": runtime.PresetIdentifier.MESSAGE,
|
|
66
67
|
"class": [this.ns.e("image")],
|
|
67
68
|
"icon": this.sysImage
|
|
68
69
|
}, null)]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
+
var runtime = require('@ibiz-template/runtime');
|
|
7
|
+
var viewMessage = require('./view-message.cjs');
|
|
8
|
+
var viewMessage_provider = require('./view-message.provider.cjs');
|
|
9
|
+
|
|
10
|
+
"use strict";
|
|
11
|
+
const IBizViewMessage = vue3Util.withInstall(viewMessage.ViewMessage, function(v) {
|
|
12
|
+
v.component(viewMessage.ViewMessage.name, viewMessage.ViewMessage);
|
|
13
|
+
runtime.registerPanelItemProvider(
|
|
14
|
+
"RAWITEM_VIEW_MESSAGE",
|
|
15
|
+
() => new viewMessage_provider.ViewMessageProvider()
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
exports.IBizViewMessage = IBizViewMessage;
|
|
20
|
+
exports.default = IBizViewMessage;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var runtime = require('@ibiz-template/runtime');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const ViewMessage = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizViewMessage",
|
|
10
|
+
props: {
|
|
11
|
+
modelData: {
|
|
12
|
+
type: Object,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
controller: {
|
|
16
|
+
type: runtime.PanelItemController,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(props) {
|
|
21
|
+
const ns = vue3Util.useNamespace("view-message");
|
|
22
|
+
const c = props.controller;
|
|
23
|
+
const ctx = vue3Util.useCtx();
|
|
24
|
+
const {
|
|
25
|
+
view
|
|
26
|
+
} = ctx;
|
|
27
|
+
return {
|
|
28
|
+
ns,
|
|
29
|
+
c,
|
|
30
|
+
view
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
render() {
|
|
34
|
+
const c = this.view;
|
|
35
|
+
if (c.state.isCreated) {
|
|
36
|
+
const viewMessages = c.state.viewMessages.BODY;
|
|
37
|
+
if (viewMessages == null ? void 0 : viewMessages.length) {
|
|
38
|
+
return vue.createVNode(vue.resolveComponent("view-message"), {
|
|
39
|
+
"class": [this.ns.e("body-message")],
|
|
40
|
+
"messages": viewMessages
|
|
41
|
+
}, null);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
exports.ViewMessage = ViewMessage;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class ViewMessageProvider {
|
|
13
|
+
constructor() {
|
|
14
|
+
__publicField(this, "component", "IBizViewMessage");
|
|
15
|
+
}
|
|
16
|
+
async createController(panelItem, panel, parent) {
|
|
17
|
+
const c = new runtime.PanelItemController(panelItem, panel, parent);
|
|
18
|
+
await c.init();
|
|
19
|
+
return c;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.ViewMessageProvider = ViewMessageProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.5.7-alpha.
|
|
3
|
+
"version": "0.5.7-alpha.3",
|
|
4
4
|
"description": "使用 rollup 编译 vue 组件或者 jsx",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"@ibiz-template-plugin/ai-chat": "^0.0.1",
|
|
29
29
|
"@ibiz-template-plugin/gantt": "0.1.1",
|
|
30
30
|
"@ibiz-template/core": "^0.5.7-alpha.0",
|
|
31
|
-
"@ibiz-template/model-helper": "^0.5.7-alpha.
|
|
32
|
-
"@ibiz-template/runtime": "^0.5.7-alpha.
|
|
31
|
+
"@ibiz-template/model-helper": "^0.5.7-alpha.3",
|
|
32
|
+
"@ibiz-template/runtime": "^0.5.7-alpha.3",
|
|
33
33
|
"@ibiz-template/theme": "^0.5.0",
|
|
34
|
-
"@ibiz-template/vue3-util": "^0.5.7-alpha.
|
|
35
|
-
"@ibiz/model-core": "^0.1.
|
|
34
|
+
"@ibiz-template/vue3-util": "^0.5.7-alpha.3",
|
|
35
|
+
"@ibiz/model-core": "^0.1.8",
|
|
36
36
|
"@imengyu/vue3-context-menu": "^1.3.5",
|
|
37
37
|
"@monaco-editor/loader": "^1.4.0",
|
|
38
38
|
"@wangeditor/editor": "^5.1.23",
|