@ibiz-template/vue3-components 0.7.41-alpha.51 → 0.7.41-alpha.53
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-B0XiEslO.js → index-B65kCxFK.js} +1 -1
- package/dist/index-BF8huIAU.js +11 -0
- package/dist/{index-B6kaPJDO.js → index-CIEKzp7k.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-Bcmawui0.js → wang-editor-uEldtkHX.js} +1 -1
- package/dist/{xlsx-util-fU5jMSIx.js → xlsx-util-DmPcr7YV.js} +1 -1
- package/es/common/action-toolbar/action-toolbar.css +1 -1
- package/es/control/form/form-detail/form-button/form-button.css +1 -1
- package/es/control/form/form-detail/form-button/form-button.mjs +1 -1
- package/es/locale/en/index.mjs +4 -0
- package/es/locale/zh-CN/index.mjs +4 -0
- package/es/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.mjs +7 -6
- package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.mjs +3 -1
- package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.mjs +0 -1
- package/es/panel-component/user-message/internal-message/index.mjs +2 -0
- package/es/panel-component/user-message/internal-message/internal-message-group/internal-message-group.css +1 -0
- package/es/panel-component/user-message/internal-message/internal-message-group/internal-message-group.mjs +122 -0
- package/es/panel-component/user-message/internal-message/internal-message-html/internal-message-html.mjs +4 -2
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.mjs +5 -3
- package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.mjs +75 -12
- package/es/panel-component/user-message/internal-message/internal-message-text/internal-message-text.mjs +3 -1
- package/es/util/ai-chat-util/ai-chat-util.mjs +66 -16
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +29 -16
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +10 -11
- package/es/view-engine/wf-dyna-edit-view.engine.mjs +2 -2
- package/lib/common/action-toolbar/action-toolbar.css +1 -1
- package/lib/control/form/form-detail/form-button/form-button.cjs +1 -1
- package/lib/control/form/form-detail/form-button/form-button.css +1 -1
- package/lib/locale/en/index.cjs +4 -0
- package/lib/locale/zh-CN/index.cjs +4 -0
- package/lib/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.cjs +7 -6
- package/lib/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.cjs +3 -1
- package/lib/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.cjs +0 -1
- package/lib/panel-component/user-message/internal-message/index.cjs +2 -0
- package/lib/panel-component/user-message/internal-message/internal-message-group/internal-message-group.cjs +124 -0
- package/lib/panel-component/user-message/internal-message/internal-message-group/internal-message-group.css +1 -0
- package/lib/panel-component/user-message/internal-message/internal-message-html/internal-message-html.cjs +4 -2
- package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.cjs +5 -3
- package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.cjs +75 -12
- package/lib/panel-component/user-message/internal-message/internal-message-text/internal-message-text.cjs +3 -1
- package/lib/util/ai-chat-util/ai-chat-util.cjs +66 -16
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +10 -11
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +28 -15
- package/lib/view-engine/wf-dyna-edit-view.engine.cjs +2 -2
- package/package.json +8 -8
- package/dist/index-CXaTaGlg.js +0 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import qs from 'qs';
|
|
2
2
|
import { notNilEmpty } from 'qx-util';
|
|
3
3
|
import { useUIStore } from '@ibiz-template/vue3-util';
|
|
4
|
-
import { onMounted, onUnmounted, ref,
|
|
4
|
+
import { onMounted, onUnmounted, ref, watch, nextTick } from 'vue';
|
|
5
5
|
import { calcResPath } from '@ibiz-template/runtime';
|
|
6
6
|
import { RegenerateIcon, insertTextIcon, ReplaceTextIcon, CopyTextIcon, CancelIcon } from './icon.mjs';
|
|
7
7
|
|
|
@@ -24,9 +24,9 @@ const computedInLineAIParams = (props) => {
|
|
|
24
24
|
inlinecompletionmode: (_g = (_f = params.inlinecompletionmode) != null ? _f : editorParams.inlinecompletionmode) != null ? _g : "async"
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
const useInLineAIContainerClick = (props,
|
|
27
|
+
const useInLineAIContainerClick = (props, opts) => {
|
|
28
|
+
const { message, isLoading, stopAsk } = opts;
|
|
28
29
|
const handMousedown = async (evt) => {
|
|
29
|
-
var _a;
|
|
30
30
|
const target = evt.target;
|
|
31
31
|
if (!target.closest(".ibiz-inline-ai-textarea-container") && !target.closest(".ibiz-inline-ai-alert")) {
|
|
32
32
|
const isChange = props.content !== message.value.content;
|
|
@@ -40,12 +40,8 @@ const useInLineAIContainerClick = (props, message, isLoading, abortController) =
|
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
if (isClose)
|
|
44
|
-
|
|
45
|
-
(_a = abortController.value) == null ? void 0 : _a.abort();
|
|
46
|
-
}
|
|
47
|
-
props.unMountAIChat();
|
|
48
|
-
}
|
|
43
|
+
if (isClose)
|
|
44
|
+
await stopAsk();
|
|
49
45
|
}
|
|
50
46
|
};
|
|
51
47
|
onMounted(() => {
|
|
@@ -93,7 +89,6 @@ const useAI = (props, opts) => {
|
|
|
93
89
|
);
|
|
94
90
|
}
|
|
95
91
|
};
|
|
96
|
-
const abortController = ref();
|
|
97
92
|
const attachUrlParam = (url) => {
|
|
98
93
|
{
|
|
99
94
|
const urlSplit = url.split("?");
|
|
@@ -172,6 +167,8 @@ const useAI = (props, opts) => {
|
|
|
172
167
|
}
|
|
173
168
|
return { think, content, toolcalls };
|
|
174
169
|
};
|
|
170
|
+
let asyncacitonid;
|
|
171
|
+
const abortController = ref();
|
|
175
172
|
const asyncAskAI = (question, callBack, errorBack) => {
|
|
176
173
|
return new Promise((resolve) => {
|
|
177
174
|
abortController.value = new AbortController();
|
|
@@ -187,6 +184,8 @@ const useAI = (props, opts) => {
|
|
|
187
184
|
if (e.data) {
|
|
188
185
|
const msg = JSON.parse(e.data);
|
|
189
186
|
let content = msg.actionresult || "";
|
|
187
|
+
if (msg.actionstate === 20)
|
|
188
|
+
asyncacitonid = msg.asyncacitonid;
|
|
190
189
|
if (msg.actionstate === 30 && content)
|
|
191
190
|
content = (_a = JSON.parse(content).choices) == null ? void 0 : _a[0].content;
|
|
192
191
|
callBack({ state: msg.actionstate, content });
|
|
@@ -233,12 +232,28 @@ const useAI = (props, opts) => {
|
|
|
233
232
|
return answer;
|
|
234
233
|
}
|
|
235
234
|
};
|
|
235
|
+
const stopAsk = async () => {
|
|
236
|
+
var _a;
|
|
237
|
+
(_a = abortController.value) == null ? void 0 : _a.abort();
|
|
238
|
+
if (asyncacitonid) {
|
|
239
|
+
const deService = await app.deService.getService(
|
|
240
|
+
context,
|
|
241
|
+
deACMode.appDataEntityId
|
|
242
|
+
);
|
|
243
|
+
await deService.aiChatCancel(context, params, {
|
|
244
|
+
asyncacitonid,
|
|
245
|
+
sessionid
|
|
246
|
+
});
|
|
247
|
+
asyncacitonid = void 0;
|
|
248
|
+
}
|
|
249
|
+
props.unMountAIChat();
|
|
250
|
+
};
|
|
236
251
|
return {
|
|
252
|
+
stopAsk,
|
|
237
253
|
syncAskAI,
|
|
238
254
|
asyncAskAI,
|
|
239
255
|
parseContent,
|
|
240
|
-
loadAiHistory
|
|
241
|
-
abortController
|
|
256
|
+
loadAiHistory
|
|
242
257
|
};
|
|
243
258
|
};
|
|
244
259
|
const useBase = (props, element, message) => {
|
|
@@ -295,11 +310,8 @@ const useBase = (props, element, message) => {
|
|
|
295
310
|
height: options.height ? "".concat(options.height, "px") : "auto",
|
|
296
311
|
"max-height": "".concat(options.maxHeight || (options.height && options.height > 300 ? options.height : 300), "px")
|
|
297
312
|
});
|
|
298
|
-
const toolcalls = computed(() => {
|
|
299
|
-
return message.value.toolcalls || [];
|
|
300
|
-
});
|
|
301
313
|
watch(
|
|
302
|
-
() =>
|
|
314
|
+
() => message.value,
|
|
303
315
|
() => {
|
|
304
316
|
nextTick(() => {
|
|
305
317
|
if (!textareaRef.value)
|
|
@@ -310,6 +322,7 @@ const useBase = (props, element, message) => {
|
|
|
310
322
|
});
|
|
311
323
|
},
|
|
312
324
|
{
|
|
325
|
+
deep: true,
|
|
313
326
|
immediate: true
|
|
314
327
|
}
|
|
315
328
|
);
|
|
@@ -96,22 +96,21 @@ const InlineAITextArea = /* @__PURE__ */ defineComponent({
|
|
|
96
96
|
textareaRef
|
|
97
97
|
}, message);
|
|
98
98
|
const {
|
|
99
|
+
stopAsk,
|
|
99
100
|
syncAskAI,
|
|
100
101
|
asyncAskAI,
|
|
101
102
|
parseContent,
|
|
102
|
-
loadAiHistory
|
|
103
|
-
abortController
|
|
103
|
+
loadAiHistory
|
|
104
104
|
} = useAI(props, {
|
|
105
105
|
srfmode,
|
|
106
106
|
srfaiagent,
|
|
107
107
|
srfaiappendcurdata
|
|
108
108
|
});
|
|
109
|
-
useInLineAIContainerClick(props,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
};
|
|
109
|
+
useInLineAIContainerClick(props, {
|
|
110
|
+
message,
|
|
111
|
+
isLoading,
|
|
112
|
+
stopAsk
|
|
113
|
+
});
|
|
115
114
|
const handleAnswer = (answer) => {
|
|
116
115
|
switch (answer.state) {
|
|
117
116
|
case 20:
|
|
@@ -253,12 +252,12 @@ const InlineAITextArea = /* @__PURE__ */ defineComponent({
|
|
|
253
252
|
containerRef,
|
|
254
253
|
contentStyle,
|
|
255
254
|
containerStyle,
|
|
255
|
+
stopAsk,
|
|
256
256
|
onKeydown,
|
|
257
257
|
renderError,
|
|
258
258
|
sendQuestion,
|
|
259
259
|
handleAction,
|
|
260
|
-
renderLoading
|
|
261
|
-
stopQuestionAndClose
|
|
260
|
+
renderLoading
|
|
262
261
|
};
|
|
263
262
|
},
|
|
264
263
|
render() {
|
|
@@ -296,7 +295,7 @@ const InlineAITextArea = /* @__PURE__ */ defineComponent({
|
|
|
296
295
|
"class": this.ns.em("content", "suffix")
|
|
297
296
|
}, [this.isLoading && createVNode("div", {
|
|
298
297
|
"class": this.ns.em("content", "stop-icon"),
|
|
299
|
-
"onClick": () => this.
|
|
298
|
+
"onClick": () => this.stopAsk()
|
|
300
299
|
}, [StopIcon, createVNode("span", null, [ibiz.i18n.t("util.inlineAiUtil.stopEdit")])]), !this.disabled && createVNode("div", {
|
|
301
300
|
"class": this.ns.em("content", "sand-icon"),
|
|
302
301
|
"onClick": () => this.sendQuestion(this.message.content)
|
|
@@ -222,7 +222,7 @@ class WFDynaEditViewEngine extends EditViewEngine {
|
|
|
222
222
|
const submitView = getWFSubmitViewId(this.view.model, link);
|
|
223
223
|
if (!submitView) {
|
|
224
224
|
await this.form.wfSubmit({ viewParam: newParams });
|
|
225
|
-
await this.view.closeView();
|
|
225
|
+
await this.view.closeView({ ok: true, data: this.form.getData() });
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
const result = await ibiz.commands.execute(
|
|
@@ -232,7 +232,7 @@ class WFDynaEditViewEngine extends EditViewEngine {
|
|
|
232
232
|
newParams
|
|
233
233
|
);
|
|
234
234
|
if (result.ok) {
|
|
235
|
-
await this.view.closeView();
|
|
235
|
+
await this.view.closeView({ ok: true, data: this.form.getData() });
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.ibiz-action-toolbar{--ibiz-action-toolbar-item-margin:var(--ibiz-spacing-none) var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none) var(--ibiz-spacing-none);--ibiz-action-toolbar-item-padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-separator-height:var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-separator-width:var(--ibiz-spacing-super-tight);--ibiz-action-toolbar-separator-color:var(--ibiz-color-border);--ibiz-action-toolbar-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-popover-button-color:var(--ibiz-color-text-2);--ibiz-action-toolbar-popover-button-hover-bg:var(--ibiz-color-bg-0);display:flex;flex-wrap:wrap}.ibiz-action-toolbar__item{padding:var(--ibiz-action-toolbar-item-padding);margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__item--icon.is-has-icon{display:flex;align-items:baseline;justify-content:center;width:var(--ibiz-width-icon-medium);height:var(--ibiz-width-icon-medium);margin-right:var(--ibiz-spacing-extra-tight);margin-left:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-width-icon-medium)}.ibiz-action-toolbar__item--label.is-has-caption{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-action-toolbar__item+.ibiz-action-toolbar__item{margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__group-item>span{width:100%}.ibiz-action-toolbar__group-item--content{display:flex;gap:var(--ibiz-spacing-extra-tight);align-items:center;justify-content:space-between;width:100%}.ibiz-action-toolbar__group-item--caption{display:flex;align-items:center;padding:var(--ibiz-action-toolbar-item-padding);margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__separator{height:auto}.ibiz-action-toolbar__popover{--ibiz-action-toolbar-item-margin:var(--ibiz-spacing-none) var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none) var(--ibiz-spacing-none);--ibiz-action-toolbar-item-padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-separator-height:var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-separator-width:var(--ibiz-spacing-super-tight);--ibiz-action-toolbar-separator-color:var(--ibiz-color-border);--ibiz-action-toolbar-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-popover-button-color:var(--ibiz-color-text-2);--ibiz-action-toolbar-popover-button-hover-bg:var(--ibiz-color-bg-0);width:auto!important;min-width:150px;--el-popover-padding:var(--ibiz-action-toolbar-popover-padding)}.ibiz-action-toolbar__popover .el-button{--el-button-size:getCssVar("height-control", "large");display:block;width:100%;padding:var(--ibiz-action-toolbar-popover-button-padding);margin:var(--ibiz-spacing-none);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-action-toolbar-popover-button-color);text-align:left;border-radius:0}.ibiz-action-toolbar__popover .el-button:hover{background-color:var(--ibiz-action-toolbar-popover-button-hover-bg)}.ibiz-action-toolbar__popover .el-button .ibiz-icon{margin
|
|
1
|
+
@charset "UTF-8";.ibiz-action-toolbar{--ibiz-action-toolbar-item-margin:var(--ibiz-spacing-none) var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none) var(--ibiz-spacing-none);--ibiz-action-toolbar-item-padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-separator-height:var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-separator-width:var(--ibiz-spacing-super-tight);--ibiz-action-toolbar-separator-color:var(--ibiz-color-border);--ibiz-action-toolbar-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-popover-button-color:var(--ibiz-color-text-2);--ibiz-action-toolbar-popover-button-hover-bg:var(--ibiz-color-bg-0);display:flex;flex-wrap:wrap}.ibiz-action-toolbar__item{padding:var(--ibiz-action-toolbar-item-padding);margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__item--icon.is-has-icon{position:relative;display:flex;align-items:baseline;justify-content:center;width:var(--ibiz-width-icon-medium);height:var(--ibiz-width-icon-medium);margin-right:var(--ibiz-spacing-extra-tight);margin-left:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-width-icon-medium)}.ibiz-action-toolbar__item--icon.is-has-icon .ibiz-icon{position:absolute;top:50%;left:0;transform:translateY(-50%)}.ibiz-action-toolbar__item--label.is-has-caption{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-action-toolbar__item+.ibiz-action-toolbar__item{margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__group-item>span{width:100%}.ibiz-action-toolbar__group-item--content{display:flex;gap:var(--ibiz-spacing-extra-tight);align-items:center;justify-content:space-between;width:100%}.ibiz-action-toolbar__group-item--caption{display:flex;align-items:center;padding:var(--ibiz-action-toolbar-item-padding);margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__separator{height:auto}.ibiz-action-toolbar__popover{--ibiz-action-toolbar-item-margin:var(--ibiz-spacing-none) var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none) var(--ibiz-spacing-none);--ibiz-action-toolbar-item-padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-separator-height:var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-separator-width:var(--ibiz-spacing-super-tight);--ibiz-action-toolbar-separator-color:var(--ibiz-color-border);--ibiz-action-toolbar-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-popover-button-color:var(--ibiz-color-text-2);--ibiz-action-toolbar-popover-button-hover-bg:var(--ibiz-color-bg-0);width:auto!important;min-width:150px;--el-popover-padding:var(--ibiz-action-toolbar-popover-padding)}.ibiz-action-toolbar__popover .el-button{--el-button-size:getCssVar("height-control", "large");display:block;width:100%;padding:var(--ibiz-action-toolbar-popover-button-padding);margin:var(--ibiz-spacing-none);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-action-toolbar-popover-button-color);text-align:left;border-radius:0}.ibiz-action-toolbar__popover .el-button:hover{background-color:var(--ibiz-action-toolbar-popover-button-hover-bg)}.ibiz-action-toolbar__popover .el-button .ibiz-action-toolbar__item--icon.is-has-icon{margin:0 var(--ibiz-spacing-tight) 0 0}.ibiz-action-toolbar__popover .ibiz-action-toolbar__separator{margin:var(--ibiz-spacing-none)}.ibiz-action-toolbar--dropdown .ibiz-action-toolbar__caption{cursor:pointer}.ibiz-action-toolbar--dropdown .ibiz-action-toolbar__caption-icon{vertical-align:bottom}
|
|
@@ -45,7 +45,7 @@ const FormButton = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
return vue.createVNode("div", {
|
|
48
|
-
"class": [this.ns.b(), this.ns.m(this.modelData.codeName), this.ns.is("loading", this.controller.state.loading), this.modelData.detailStyle && this.ns.m(this.modelData.detailStyle.toLowerCase()), ...this.controller.containerClass]
|
|
48
|
+
"class": [this.ns.b(), this.ns.m(this.modelData.codeName), this.ns.is("loading", this.controller.state.loading), this.ns.is("readonly", this.controller.state.readonly), this.modelData.detailStyle && this.ns.m(this.modelData.detailStyle.toLowerCase()), ...this.controller.containerClass]
|
|
49
49
|
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
50
50
|
"sime": "small",
|
|
51
51
|
"onClick": this.controller.onClick.bind(this.controller),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-form-button{--ibiz-form-button-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-form-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-form-button-icon-max-height:var(--ibiz-width-icon-medium);width:100%;height:100%;padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-form-button .el-button{width:100%;height:100%}.ibiz-form-button .el-button .ibiz-form-button-content{display:flex;align-items:center;justify-content:flex-start}.ibiz-form-button .el-button .ibiz-form-button-content i,.ibiz-form-button .el-button .ibiz-form-button-content img{display:inline-block;max-width:var(--ibiz-form-button-icon-max-width);max-height:var(--ibiz-form-button-icon-max-height)}.ibiz-form-button .el-button .ibiz-form-button-content .ibiz-icon+.ibiz-form-button-content--caption{margin-left:var(--ibiz-form-button-icon-margin)}.ibiz-form-button.is-loading .el-button .ibiz-icon{display:none}
|
|
1
|
+
.ibiz-form-button{--ibiz-form-button-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-form-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-form-button-icon-max-height:var(--ibiz-width-icon-medium);width:100%;height:100%;padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-form-button .el-button{width:100%;height:100%}.ibiz-form-button .el-button .ibiz-form-button-content{display:flex;align-items:center;justify-content:flex-start}.ibiz-form-button .el-button .ibiz-form-button-content i,.ibiz-form-button .el-button .ibiz-form-button-content img{display:inline-block;max-width:var(--ibiz-form-button-icon-max-width);max-height:var(--ibiz-form-button-icon-max-height)}.ibiz-form-button .el-button .ibiz-form-button-content .ibiz-icon+.ibiz-form-button-content--caption{margin-left:var(--ibiz-form-button-icon-margin)}.ibiz-form-button.is-loading .el-button .ibiz-icon{display:none}.ibiz-form-button.is-readonly{display:none}
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -806,6 +806,10 @@ var index = {
|
|
|
806
806
|
notificationYet: "Current no notification",
|
|
807
807
|
loadMore: "Load more({length})",
|
|
808
808
|
onlyShowUnread: "Only show unread"
|
|
809
|
+
},
|
|
810
|
+
internalMessageGroup: {
|
|
811
|
+
expand: "Expand",
|
|
812
|
+
collapse: "Collapse"
|
|
809
813
|
}
|
|
810
814
|
},
|
|
811
815
|
customSetting: {
|
|
@@ -802,6 +802,10 @@ var index = {
|
|
|
802
802
|
notificationYet: "\u6682\u65E0\u901A\u77E5",
|
|
803
803
|
loadMore: "\u52A0\u8F7D\u66F4\u591A({length})",
|
|
804
804
|
onlyShowUnread: "\u53EA\u663E\u793A\u672A\u8BFB"
|
|
805
|
+
},
|
|
806
|
+
internalMessageGroup: {
|
|
807
|
+
expand: "\u5C55\u5F00",
|
|
808
|
+
collapse: "\u6536\u8D77"
|
|
805
809
|
}
|
|
806
810
|
},
|
|
807
811
|
customSetting: {
|
|
@@ -28,7 +28,8 @@ const InternalMessageContainer = /* @__PURE__ */ vue.defineComponent({
|
|
|
28
28
|
},
|
|
29
29
|
emits: {
|
|
30
30
|
toolbarClick: (_key) => true,
|
|
31
|
-
close: () => true
|
|
31
|
+
close: () => true,
|
|
32
|
+
read: () => true
|
|
32
33
|
},
|
|
33
34
|
setup(props, {
|
|
34
35
|
emit
|
|
@@ -51,7 +52,7 @@ const InternalMessageContainer = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
52
|
const onToolbarClick = (event, key) => {
|
|
52
53
|
event.stopPropagation();
|
|
53
54
|
if (key === "read") {
|
|
54
|
-
|
|
55
|
+
emit("read");
|
|
55
56
|
} else {
|
|
56
57
|
emit("toolbarClick", key);
|
|
57
58
|
}
|
|
@@ -65,18 +66,18 @@ const InternalMessageContainer = /* @__PURE__ */ vue.defineComponent({
|
|
|
65
66
|
const onClick = async (event) => {
|
|
66
67
|
if (isClickable.value && props.provider.onClick) {
|
|
67
68
|
const isClose = await props.provider.onClick(props.message, event);
|
|
68
|
-
if (isClose)
|
|
69
|
+
if (isClose)
|
|
69
70
|
emit("close");
|
|
70
|
-
}
|
|
71
71
|
}
|
|
72
|
+
emit("read");
|
|
72
73
|
};
|
|
73
74
|
return {
|
|
74
75
|
ns,
|
|
75
76
|
isUnread,
|
|
76
77
|
isClickable,
|
|
77
78
|
finalToolbarItems,
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
onClick,
|
|
80
|
+
onToolbarClick
|
|
80
81
|
};
|
|
81
82
|
},
|
|
82
83
|
render() {
|
|
@@ -36,7 +36,8 @@ const InternalMessageDefault = /* @__PURE__ */ vue.defineComponent({
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
emits: {
|
|
39
|
-
close: () => true
|
|
39
|
+
close: () => true,
|
|
40
|
+
read: () => true
|
|
40
41
|
},
|
|
41
42
|
setup() {
|
|
42
43
|
const ns = vue3Util.useNamespace("internal-message");
|
|
@@ -58,6 +59,7 @@ const InternalMessageDefault = /* @__PURE__ */ vue.defineComponent({
|
|
|
58
59
|
"class": [this.ns.b()],
|
|
59
60
|
"message": this.message,
|
|
60
61
|
"provider": this.provider,
|
|
62
|
+
"onRead": () => this.$emit("read"),
|
|
61
63
|
"onClose": () => this.$emit("close")
|
|
62
64
|
}, {
|
|
63
65
|
default: () => [vue.createVNode("div", {
|
|
@@ -25,7 +25,6 @@ class InternalMessageDefaultProvider {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
async onClick(message, _event) {
|
|
28
|
-
await ibiz.hub.notice.internalMessage.markRead(message);
|
|
29
28
|
const redirectUrl = ibiz.env.isMob ? message.mobile_url : message.url;
|
|
30
29
|
return this.openViewByUrl(redirectUrl);
|
|
31
30
|
}
|
|
@@ -10,10 +10,12 @@ var internalMessageHtml = require('./internal-message-html/internal-message-html
|
|
|
10
10
|
var internalMessageHtml_provider = require('./internal-message-html/internal-message-html.provider.cjs');
|
|
11
11
|
var internalMessageText_provider = require('./internal-message-text/internal-message-text.provider.cjs');
|
|
12
12
|
var internalMessageText = require('./internal-message-text/internal-message-text.cjs');
|
|
13
|
+
var internalMessageGroup = require('./internal-message-group/internal-message-group.cjs');
|
|
13
14
|
var internalMessageTab = require('./internal-message-tab/internal-message-tab.cjs');
|
|
14
15
|
|
|
15
16
|
"use strict";
|
|
16
17
|
function installInternalMessage(v) {
|
|
18
|
+
v.component(internalMessageGroup.InternalMessagGroup.name, internalMessageGroup.InternalMessagGroup);
|
|
17
19
|
v.component(internalMessageContainer.InternalMessageContainer.name, internalMessageContainer.InternalMessageContainer);
|
|
18
20
|
v.component(internalMessageDefault.InternalMessageDefault.name, internalMessageDefault.InternalMessageDefault);
|
|
19
21
|
v.component(internalMessageJson.InternalMessageJSON.name, internalMessageJson.InternalMessageJSON);
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var core = require('@ibiz-template/core');
|
|
6
|
+
var runtime = require('@ibiz-template/runtime');
|
|
7
|
+
require('../../../../util/index.cjs');
|
|
8
|
+
require('./internal-message-group.css');
|
|
9
|
+
var wangEditorUtil = require('../../../../util/wang-editor-util/wang-editor-util.cjs');
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
const InternalMessagGroup = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
+
name: "IBizInternalMessageGroup",
|
|
14
|
+
props: {
|
|
15
|
+
message: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
provider: {
|
|
20
|
+
type: Object,
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
emits: {
|
|
25
|
+
close: (_msg) => true,
|
|
26
|
+
read: (_msg) => true
|
|
27
|
+
},
|
|
28
|
+
setup(props, {
|
|
29
|
+
emit
|
|
30
|
+
}) {
|
|
31
|
+
const ns = vue3Util.useNamespace("internal-message-group");
|
|
32
|
+
const isExpand = vue.ref(false);
|
|
33
|
+
const onExpandChange = () => {
|
|
34
|
+
isExpand.value = !isExpand.value;
|
|
35
|
+
};
|
|
36
|
+
const html = vue.computed(() => {
|
|
37
|
+
const {
|
|
38
|
+
content_type,
|
|
39
|
+
content
|
|
40
|
+
} = props.message;
|
|
41
|
+
if (content_type === "JSON")
|
|
42
|
+
return content ? JSON.parse(content).html : content;
|
|
43
|
+
if (content === "HTML")
|
|
44
|
+
return wangEditorUtil.parseHtml(content);
|
|
45
|
+
return content;
|
|
46
|
+
});
|
|
47
|
+
const onClose = (msg) => {
|
|
48
|
+
emit("close", msg);
|
|
49
|
+
};
|
|
50
|
+
const onRead = (msg) => {
|
|
51
|
+
emit("read", msg);
|
|
52
|
+
};
|
|
53
|
+
const onClick = async (event) => {
|
|
54
|
+
if (props.provider.onClick) {
|
|
55
|
+
const isClose = await props.provider.onClick(props.message, event);
|
|
56
|
+
if (isClose)
|
|
57
|
+
onClose();
|
|
58
|
+
}
|
|
59
|
+
onRead(props.message);
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
ns,
|
|
63
|
+
html,
|
|
64
|
+
isExpand,
|
|
65
|
+
onRead,
|
|
66
|
+
onClose,
|
|
67
|
+
onClick,
|
|
68
|
+
onExpandChange
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
render() {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
return vue.createVNode("div", {
|
|
74
|
+
"class": this.ns.b()
|
|
75
|
+
}, [vue.createVNode("div", {
|
|
76
|
+
"class": this.ns.e("content")
|
|
77
|
+
}, [vue.createVNode("div", {
|
|
78
|
+
"innerHTML": this.html,
|
|
79
|
+
"onClick": this.onClick,
|
|
80
|
+
"class": this.ns.em("content", "html")
|
|
81
|
+
}, null), vue.createVNode("div", {
|
|
82
|
+
"class": this.ns.e("action")
|
|
83
|
+
}, [vue.createVNode("ion-icon", {
|
|
84
|
+
"class": this.ns.em("action", "item"),
|
|
85
|
+
"title": core.showTitle(this.isExpand ? ibiz.i18n.t("panelComponent.userMessage.internalMessageGroup.collapse") : ibiz.i18n.t("panelComponent.userMessage.internalMessageGroup.expand")),
|
|
86
|
+
"name": this.isExpand ? "chevron-down-outline" : "chevron-forward-outline",
|
|
87
|
+
"onClick": this.onExpandChange
|
|
88
|
+
}, null), vue.createVNode(vue.resolveComponent("iBizBadge"), {
|
|
89
|
+
"class": this.ns.e("badge"),
|
|
90
|
+
"value": (_a = this.message.children) == null ? void 0 : _a.length
|
|
91
|
+
}, null), vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
92
|
+
"baseDir": "iconfont",
|
|
93
|
+
"icon": {
|
|
94
|
+
imagePath: "svg/read.svg"
|
|
95
|
+
},
|
|
96
|
+
"class": [this.ns.em("action", "item"), this.ns.em("action", "read")],
|
|
97
|
+
"title": core.showTitle(ibiz.i18n.t("panelComponent.userMessage.internalMessageContainer.markAsRead")),
|
|
98
|
+
"onClick": () => this.onRead(this.message)
|
|
99
|
+
}, null)])]), this.isExpand && vue.createVNode("div", {
|
|
100
|
+
"class": this.ns.e("children")
|
|
101
|
+
}, [(_b = this.message.children) == null ? void 0 : _b.map((msg) => {
|
|
102
|
+
let provider;
|
|
103
|
+
try {
|
|
104
|
+
provider = runtime.getInternalMessageProvider(msg);
|
|
105
|
+
} catch (error) {
|
|
106
|
+
ibiz.log.error(error);
|
|
107
|
+
}
|
|
108
|
+
if (provider)
|
|
109
|
+
return provider.render({
|
|
110
|
+
message: msg,
|
|
111
|
+
class: this.ns.em("children", "item"),
|
|
112
|
+
onClose: () => this.onClose(msg),
|
|
113
|
+
onRead: () => this.onRead(msg)
|
|
114
|
+
});
|
|
115
|
+
return vue.createVNode("div", {
|
|
116
|
+
"class": this.ns.em("children", "item")
|
|
117
|
+
}, [ibiz.i18n.t("panelComponent.userMessage.internalMessageTab.noSupportType", {
|
|
118
|
+
type: msg.content_type
|
|
119
|
+
})]);
|
|
120
|
+
})])]);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
exports.InternalMessagGroup = InternalMessagGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-internal-message-group{display:flex;flex-flow:column nowrap;height:auto}.ibiz-internal-message-group__content{position:relative;flex-shrink:0;min-height:60px;padding:var(--ibiz-spacing-tight);cursor:pointer}.ibiz-internal-message-group__content:hover{background-color:var(--ibiz-color-fill-1)}.ibiz-internal-message-group__content:hover .ibiz-internal-message-group__badge{display:none}.ibiz-internal-message-group__content:hover .ibiz-internal-message-group__action--read{display:block}.ibiz-internal-message-group__badge{color:var(--ibiz-color-white)!important;background-color:var(--ibiz-color-danger)!important}.ibiz-internal-message-group__action{position:absolute;top:var(--ibiz-spacing-tight);right:var(--ibiz-spacing-tight);display:flex;gap:var(--ibiz-spacing-tight);align-items:center;width:40px;height:18px}.ibiz-internal-message-group__action--item{cursor:pointer}.ibiz-internal-message-group__action--item:hover{color:var(--ibiz-color-primary)}.ibiz-internal-message-group__action--read{display:none}.ibiz-internal-message-group__children{flex-grow:1;padding-left:var(--ibiz-spacing-loose)}.ibiz-internal-message-group__children--item{min-height:60px;padding:var(--ibiz-spacing-tight)}.ibiz-internal-message-group__children--item:hover{background-color:var(--ibiz-color-fill-1)}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
-
require('./internal-message-html.css');
|
|
6
5
|
require('../../../../util/index.cjs');
|
|
6
|
+
require('./internal-message-html.css');
|
|
7
7
|
var wangEditorUtil = require('../../../../util/wang-editor-util/wang-editor-util.cjs');
|
|
8
8
|
|
|
9
9
|
"use strict";
|
|
@@ -20,7 +20,8 @@ const InternalMessageHTML = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
emits: {
|
|
23
|
-
close: () => true
|
|
23
|
+
close: () => true,
|
|
24
|
+
read: () => true
|
|
24
25
|
},
|
|
25
26
|
setup(props) {
|
|
26
27
|
const ns = vue3Util.useNamespace("internal-message-html");
|
|
@@ -37,6 +38,7 @@ const InternalMessageHTML = /* @__PURE__ */ vue.defineComponent({
|
|
|
37
38
|
"class": [this.ns.b()],
|
|
38
39
|
"message": this.message,
|
|
39
40
|
"provider": this.provider,
|
|
41
|
+
"onRead": () => this.$emit("read"),
|
|
40
42
|
"onClose": () => this.$emit("close")
|
|
41
43
|
}, {
|
|
42
44
|
default: () => [vue.createVNode("div", {
|
|
@@ -21,7 +21,8 @@ const InternalMessageJSON = /* @__PURE__ */ vue.defineComponent({
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
emits: {
|
|
24
|
-
close: () => true
|
|
24
|
+
close: () => true,
|
|
25
|
+
read: () => true
|
|
25
26
|
},
|
|
26
27
|
setup(props, {
|
|
27
28
|
emit
|
|
@@ -60,10 +61,10 @@ const InternalMessageJSON = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
61
|
};
|
|
61
62
|
return {
|
|
62
63
|
ns,
|
|
63
|
-
jsonContent,
|
|
64
|
-
toolbarItems,
|
|
65
64
|
redirectUrl,
|
|
66
65
|
isWFMessage,
|
|
66
|
+
jsonContent,
|
|
67
|
+
toolbarItems,
|
|
67
68
|
onToolbarClick
|
|
68
69
|
};
|
|
69
70
|
},
|
|
@@ -106,6 +107,7 @@ const InternalMessageJSON = /* @__PURE__ */ vue.defineComponent({
|
|
|
106
107
|
"clickable": !!this.redirectUrl || !!this.isWFMessage,
|
|
107
108
|
"toolbarItems": this.toolbarItems,
|
|
108
109
|
"onToolbarClick": this.onToolbarClick,
|
|
110
|
+
"onRead": () => this.$emit("read"),
|
|
109
111
|
"onClose": () => this.$emit("close")
|
|
110
112
|
}, _isSlot(content) ? content : {
|
|
111
113
|
default: () => [content]
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
|
+
var dayjs = require('dayjs');
|
|
5
|
+
var ramda = require('ramda');
|
|
4
6
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
7
|
var runtime = require('@ibiz-template/runtime');
|
|
6
8
|
require('./internal-message-tab.css');
|
|
7
|
-
var ramda = require('ramda');
|
|
8
9
|
|
|
9
10
|
"use strict";
|
|
10
11
|
const InternalMessageTab = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -30,6 +31,18 @@ const InternalMessageTab = /* @__PURE__ */ vue.defineComponent({
|
|
|
30
31
|
const hiddenPopover = () => {
|
|
31
32
|
emit("hiddenPopover");
|
|
32
33
|
};
|
|
34
|
+
const onMarkRead = async (message, filter) => {
|
|
35
|
+
var _a2;
|
|
36
|
+
if ((_a2 = message.children) == null ? void 0 : _a2.length) {
|
|
37
|
+
await Promise.all(message.children.filter((child) => child.id !== (filter == null ? void 0 : filter.id)).map((child) => ibiz.hub.notice.internalMessage.markRead(child)));
|
|
38
|
+
} else {
|
|
39
|
+
await ibiz.hub.notice.internalMessage.markRead(message);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const onGroupClose = async (message, filter) => {
|
|
43
|
+
hiddenPopover();
|
|
44
|
+
await onMarkRead(message, filter);
|
|
45
|
+
};
|
|
33
46
|
const c = props.controller;
|
|
34
47
|
const unreadOnlyTag = "".concat((_a = ibiz.appData) == null ? void 0 : _a.context.srfsystemid, "-unreadOnly");
|
|
35
48
|
const hasNotice = vue.ref(false);
|
|
@@ -47,15 +60,55 @@ const InternalMessageTab = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
60
|
}
|
|
48
61
|
});
|
|
49
62
|
const allItems = vue.ref([]);
|
|
63
|
+
const messages = vue.ref([]);
|
|
50
64
|
const state = vue.reactive({
|
|
51
65
|
total: 0,
|
|
52
66
|
pageSize: 0,
|
|
53
67
|
unreadOnly: c.unreadOnly
|
|
54
68
|
});
|
|
69
|
+
const handleMessageGroup = () => {
|
|
70
|
+
const grouped = {};
|
|
71
|
+
const ungrouped = [];
|
|
72
|
+
allItems.value.forEach((item) => {
|
|
73
|
+
const key = ibiz.env.isMob ? "".concat(item.message_type).concat(item.mobile_url) : "".concat(item.message_type).concat(item.url);
|
|
74
|
+
const shouldGroup = key && item.status === "RECEIVED";
|
|
75
|
+
if (shouldGroup) {
|
|
76
|
+
if (!grouped[key])
|
|
77
|
+
grouped[key] = [];
|
|
78
|
+
grouped[key].push({
|
|
79
|
+
...item
|
|
80
|
+
});
|
|
81
|
+
} else {
|
|
82
|
+
ungrouped.push({
|
|
83
|
+
...item
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const finalResult = [...ungrouped];
|
|
88
|
+
Object.values(grouped).forEach((group) => {
|
|
89
|
+
if (group.length === 1) {
|
|
90
|
+
finalResult.push({
|
|
91
|
+
...group[0]
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
const parent = {
|
|
95
|
+
...group[0]
|
|
96
|
+
};
|
|
97
|
+
parent.children = group.map((item) => ({
|
|
98
|
+
...item
|
|
99
|
+
}));
|
|
100
|
+
finalResult.push(parent);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
messages.value = finalResult.sort((a, b) => {
|
|
104
|
+
return dayjs(a.update_time).isAfter(b.update_time) ? -1 : 1;
|
|
105
|
+
});
|
|
106
|
+
};
|
|
55
107
|
const updateData = () => {
|
|
56
|
-
allItems.value = ramda.clone(c.messages);
|
|
57
108
|
state.total = c.total;
|
|
58
109
|
state.pageSize = c.size;
|
|
110
|
+
allItems.value = ramda.clone(c.messages);
|
|
111
|
+
handleMessageGroup();
|
|
59
112
|
};
|
|
60
113
|
updateData();
|
|
61
114
|
const updateUnreadOnlyChange = (val) => {
|
|
@@ -92,11 +145,14 @@ const InternalMessageTab = /* @__PURE__ */ vue.defineComponent({
|
|
|
92
145
|
});
|
|
93
146
|
return {
|
|
94
147
|
ns,
|
|
95
|
-
allItems,
|
|
96
148
|
state,
|
|
97
|
-
|
|
149
|
+
allItems,
|
|
150
|
+
messages,
|
|
98
151
|
showMore,
|
|
99
|
-
|
|
152
|
+
onMarkRead,
|
|
153
|
+
onGroupClose,
|
|
154
|
+
switchChange,
|
|
155
|
+
hiddenPopover
|
|
100
156
|
};
|
|
101
157
|
},
|
|
102
158
|
render() {
|
|
@@ -105,20 +161,27 @@ const InternalMessageTab = /* @__PURE__ */ vue.defineComponent({
|
|
|
105
161
|
"class": [this.ns.b()]
|
|
106
162
|
}, [vue.createVNode("div", {
|
|
107
163
|
"class": this.ns.b("content")
|
|
108
|
-
}, [this.allItems.length > 0 && this.
|
|
164
|
+
}, [this.allItems.length > 0 && this.messages.map((msg) => {
|
|
165
|
+
var _a;
|
|
109
166
|
let provider;
|
|
110
167
|
try {
|
|
111
168
|
provider = runtime.getInternalMessageProvider(msg);
|
|
112
169
|
} catch (error) {
|
|
113
170
|
ibiz.log.error(error);
|
|
114
171
|
}
|
|
115
|
-
if (provider)
|
|
116
|
-
return
|
|
117
|
-
|
|
172
|
+
if (provider)
|
|
173
|
+
return ((_a = msg.children) == null ? void 0 : _a.length) ? vue.createVNode(vue.resolveComponent("iBizInternalMessageGroup"), {
|
|
174
|
+
"message": msg,
|
|
175
|
+
"provider": provider,
|
|
176
|
+
"class": this.ns.e("group"),
|
|
177
|
+
"onRead": this.onMarkRead,
|
|
178
|
+
"onClose": (filter) => this.onGroupClose(msg, filter)
|
|
179
|
+
}, null) : provider.render({
|
|
118
180
|
message: msg,
|
|
119
|
-
|
|
181
|
+
class: this.ns.e("item"),
|
|
182
|
+
onClose: this.hiddenPopover,
|
|
183
|
+
onRead: () => this.onMarkRead(msg)
|
|
120
184
|
});
|
|
121
|
-
}
|
|
122
185
|
return vue.createVNode("div", {
|
|
123
186
|
"class": this.ns.e("item")
|
|
124
187
|
}, [ibiz.i18n.t("panelComponent.userMessage.internalMessageTab.noSupportType", {
|
|
@@ -137,7 +200,7 @@ const InternalMessageTab = /* @__PURE__ */ vue.defineComponent({
|
|
|
137
200
|
"value": this.state.unreadOnly,
|
|
138
201
|
"onChange": this.switchChange,
|
|
139
202
|
"class": this.ns.be("footer", "switch")
|
|
140
|
-
}, null),
|
|
203
|
+
}, null), ibiz.i18n.t("panelComponent.userMessage.internalMessageTab.onlyShowUnread")])]);
|
|
141
204
|
}
|
|
142
205
|
});
|
|
143
206
|
|