@ibiz-template/vue3-components 0.7.5 → 0.7.7-dev.0
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-FAFZUJRc.js +4 -0
- package/dist/index-Rqr5SnvQ.js +1 -0
- package/dist/index-x-jLCilD.js +1 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-iqcGVBHE.js → xlsx-util-2bS-pf2I.js} +1 -1
- package/es/common/action-toolbar/action-toolbar.d.ts +1 -0
- package/es/common/action-toolbar/action-toolbar.mjs +10 -2
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +25 -3
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +19 -5
- package/es/control/dashboard/dashboard-design/dashboard-design.css +1 -1
- package/es/control/dashboard/dashboard-design/dashboard-design.mjs +18 -4
- package/es/control/dashboard/dashboard.d.ts +0 -1
- package/es/control/dashboard/dashboard.mjs +3 -11
- package/es/control/dashboard/index.d.ts +0 -1
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +3 -6
- package/es/control/drbar/drbar.controller.mjs +2 -1
- package/es/control/drtab/drtab.controller.mjs +2 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +4 -0
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.d.ts +1 -0
- package/es/control/grid/grid/grid.mjs +33 -2
- package/es/control/grid/grid/index.d.ts +1 -0
- package/es/control/kanban/kanban.css +1 -1
- package/es/control/kanban/kanban.mjs +2 -1
- package/es/control/toolbar/toolbar.mjs +13 -7
- package/es/control/wizard-panel/wizard-panel.mjs +8 -9
- package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/es/editor/code/monaco-editor/monaco-editor.d.ts +7 -0
- package/es/editor/code/monaco-editor/monaco-editor.mjs +179 -16
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +16 -8
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +1 -0
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +10 -3
- package/es/editor/text-box/input/input.d.ts +1 -0
- package/es/editor/text-box/input/input.mjs +9 -2
- package/es/ibiz-vue3.mjs +2 -0
- package/es/index.mjs +1 -0
- package/es/locale/en/index.d.ts +9 -1
- package/es/locale/en/index.mjs +10 -2
- package/es/locale/zh-CN/index.d.ts +9 -1
- package/es/locale/zh-CN/index.mjs +10 -2
- package/es/panel-component/panel-button/panel-button.controller.mjs +2 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +13 -5
- package/es/util/open-view-util/open-view-util.mjs +2 -3
- package/es/view/403-view/403-view.css +1 -0
- package/es/view/403-view/403-view.d.ts +6 -0
- package/es/view/403-view/403-view.mjs +45 -0
- package/es/view/404-view/404-view.mjs +2 -2
- package/es/view/index.d.ts +1 -0
- package/es/view/index.mjs +1 -0
- package/es/view-engine/wizard-view-engine.mjs +2 -2
- package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +5 -2
- package/es/web-app/util/unauthorized-handler/unauthorized-handler.d.ts +1 -1
- package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +3 -12
- package/lib/common/action-toolbar/action-toolbar.cjs +10 -2
- package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +19 -5
- package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +18 -4
- package/lib/control/dashboard/dashboard-design/dashboard-design.css +1 -1
- package/lib/control/dashboard/dashboard.cjs +2 -10
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +3 -6
- package/lib/control/drbar/drbar.controller.cjs +2 -1
- package/lib/control/drtab/drtab.controller.cjs +2 -1
- package/lib/control/grid/grid/grid.cjs +33 -2
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/kanban/kanban.cjs +2 -1
- package/lib/control/kanban/kanban.css +1 -1
- package/lib/control/toolbar/toolbar.cjs +13 -7
- package/lib/control/wizard-panel/wizard-panel.cjs +8 -9
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +178 -15
- package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +16 -8
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +10 -3
- package/lib/editor/text-box/input/input.cjs +9 -2
- package/lib/ibiz-vue3.cjs +2 -0
- package/lib/index.cjs +2 -0
- package/lib/locale/en/index.cjs +10 -2
- package/lib/locale/zh-CN/index.cjs +10 -2
- package/lib/panel-component/panel-button/panel-button.controller.cjs +2 -0
- package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +13 -5
- package/lib/util/open-view-util/open-view-util.cjs +2 -3
- package/lib/view/403-view/403-view.cjs +47 -0
- package/lib/view/403-view/403-view.css +1 -0
- package/lib/view/404-view/404-view.cjs +2 -2
- package/lib/view/index.cjs +2 -0
- package/lib/view-engine/wizard-view-engine.cjs +2 -2
- package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +4 -1
- package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +3 -12
- package/package.json +7 -7
- package/dist/index-13Oh42A8.js +0 -1
- package/dist/index-QdhEqiEH.js +0 -4
- package/dist/index-ZIuDbCjc.js +0 -1
|
@@ -35,16 +35,15 @@ const WizardPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
37
|
render() {
|
|
38
|
-
var _a, _b;
|
|
38
|
+
var _a, _b, _c, _d, _e;
|
|
39
39
|
const {
|
|
40
|
-
activeFormTag
|
|
40
|
+
activeFormTag,
|
|
41
|
+
buttonsState
|
|
41
42
|
} = this.c.state;
|
|
42
43
|
let stepsTitle = null;
|
|
43
44
|
let formComponent = null;
|
|
44
45
|
let footer = null;
|
|
45
46
|
if (activeFormTag && this.c.activeWizardForm) {
|
|
46
|
-
const wizardForm = this.c.activeWizardForm;
|
|
47
|
-
const supportActions = wizardForm.stepActions;
|
|
48
47
|
if (this.c.providers[activeFormTag]) {
|
|
49
48
|
const component = resolveComponent(this.c.providers[activeFormTag].component);
|
|
50
49
|
const editForm = (_a = this.c.model.deeditForms) == null ? void 0 : _a.find((_editForm) => {
|
|
@@ -64,22 +63,22 @@ const WizardPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
64
63
|
const {
|
|
65
64
|
dewizard
|
|
66
65
|
} = this.c.model;
|
|
67
|
-
footer =
|
|
66
|
+
footer = dewizard && createVNode("div", {
|
|
68
67
|
"key": "".concat(activeFormTag, "footer"),
|
|
69
68
|
"class": this.ns.b("footer")
|
|
70
|
-
}, [
|
|
69
|
+
}, [((_b = buttonsState["".concat(activeFormTag, "@PREV")]) == null ? void 0 : _b.visible) && createVNode(resolveComponent("el-button"), {
|
|
71
70
|
"onClick": () => {
|
|
72
71
|
this.c.onPrevClick();
|
|
73
72
|
}
|
|
74
73
|
}, {
|
|
75
74
|
default: () => [dewizard.prevCaption ? dewizard.prevCaption : "\u540E\u9000"]
|
|
76
|
-
}),
|
|
75
|
+
}), ((_c = buttonsState["".concat(activeFormTag, "@NEXT")]) == null ? void 0 : _c.visible) && createVNode(resolveComponent("el-button"), {
|
|
77
76
|
"onClick": () => {
|
|
78
77
|
this.c.onNextClick();
|
|
79
78
|
}
|
|
80
79
|
}, {
|
|
81
80
|
default: () => [dewizard.nextCaption ? dewizard.nextCaption : "\u524D\u8FDB"]
|
|
82
|
-
}),
|
|
81
|
+
}), ((_d = buttonsState["".concat(activeFormTag, "@FINISH")]) == null ? void 0 : _d.visible) && createVNode(resolveComponent("el-button"), {
|
|
83
82
|
"onClick": () => {
|
|
84
83
|
this.c.onFinishClick();
|
|
85
84
|
}
|
|
@@ -91,7 +90,7 @@ const WizardPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
91
90
|
} = dewizard;
|
|
92
91
|
if (this.c.model.showStepBar && dewizardSteps && dewizardSteps.length > 0) {
|
|
93
92
|
let _slot;
|
|
94
|
-
const active = this.c.steps.indexOf(this.c.stepTags["".concat(this.c.model.name, "_form_").concat((
|
|
93
|
+
const active = this.c.steps.indexOf(this.c.stepTags["".concat(this.c.model.name, "_form_").concat((_e = this.c.state.activeFormTag) == null ? void 0 : _e.toLowerCase())]) + 1;
|
|
95
94
|
stepsTitle = createVNode(resolveComponent("el-steps"), {
|
|
96
95
|
"class": this.ns.b("header"),
|
|
97
96
|
"align-center": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-code{display:
|
|
1
|
+
.ibiz-code{display:flex;flex-direction:column;width:100%;height:100%}.ibiz-code__box{width:100%;height:100%;min-height:200px;overflow:hidden}.ibiz-code-toolbar{display:flex;align-items:center;justify-content:end;width:100%;min-height:32px;padding-right:var(--ibiz-spacing-base);font-size:var(--ibiz-font-size-header-6)}.ibiz-code-toolbar>*+*{margin-left:var(--ibiz-spacing-base-loose)}.ibiz-code-toolbar i{cursor:pointer}.ibiz-code-toolbar i:hover{color:var(--ibiz-color-primary)}.ibiz-code-footer{display:flex;align-items:center;justify-content:end;width:100%;min-height:36px;margin-top:var(--ibiz-spacing-base-tight);margin-right:var(--ibiz-spacing-tight)}.ibiz-code-footer>*+*{margin-left:var(--ibiz-spacing-base)}.ibiz-code-footer__cancel{height:36px;line-height:36px;color:var(--ibiz-color-text-1);cursor:pointer;opacity:.7}.ibiz-code-footer__cancel:hover{color:var(--ibiz-color-primary);opacity:1}.ibiz-code-footer__save{width:96px;height:36px;line-height:36px;color:var(--ibiz-color-primary-active-text);text-align:center;cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:5px}.ibiz-code-footer__save:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-primary)}.ibiz-code-message{width:500px;max-width:unset}.ibiz-code-message__message-content--message-tip{color:var(--ibiz-color-text-3)}.ibiz-code-message__message-cancel{color:var(--ibiz-color-text-1);background-color:transparent}.ibiz-code-message__message-cancel:hover{color:var(--ibiz-color-primary);background-color:transparent}.ibiz-code-message__message-comfire{background-color:var(--ibiz-color-danger)!important}.ibiz-code-message__message-comfire:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-danger)}.ibiz-code-editor-enable .ibiz-code__box{height:calc(100% - 68px)}.ibiz-code-dialog-full-screen{height:80%!important}.ibiz-code-dialog-full-screen .ibiz-code{gap:0;padding:0 var(--ibiz-spacing-extra-loose);--w-e-toolbar-bg-color:var(--ibiz-color-bg-0)}.ibiz-code-dialog-full-screen .ibiz-code .ibiz-code__box{height:calc(100% - 124px)}.ibiz-code-dialog-full-screen .ibiz-code .ibiz-code-toolbar{min-height:56px}.ibiz-code-footer-dialog{min-height:68px;margin-top:0}
|
|
@@ -32,6 +32,13 @@ export declare const IBizCode: import("vue").DefineComponent<{
|
|
|
32
32
|
ns: import("@ibiz-template/core").Namespace;
|
|
33
33
|
currentVal: import("vue").Ref<string>;
|
|
34
34
|
codeEditBox: import("vue").Ref<any>;
|
|
35
|
+
isFullScreen: import("vue").Ref<boolean>;
|
|
36
|
+
hasEnableEdit: import("vue").Ref<boolean>;
|
|
37
|
+
readonlyState: import("vue").Ref<boolean>;
|
|
38
|
+
renderFooter: () => JSX.Element | null;
|
|
39
|
+
renderHeaderToolbar: () => JSX.Element | null;
|
|
40
|
+
renderCodeContent: () => JSX.Element;
|
|
41
|
+
changeFullScreenState: () => Promise<void>;
|
|
35
42
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
43
|
change: (_value: unknown, _name?: string | undefined) => boolean;
|
|
37
44
|
blur: (_event?: IData | undefined) => boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ref, watch, nextTick, onMounted, onUnmounted,
|
|
1
|
+
import { ref, watch, nextTick, createVNode, onMounted, onUnmounted, resolveComponent, defineComponent } from 'vue';
|
|
2
2
|
import './monaco-editor.css';
|
|
3
3
|
import { getCodeProps, getEditorEmits, useNamespace, useUIStore } from '@ibiz-template/vue3-util';
|
|
4
|
+
import { ElMessageBox } from 'element-plus';
|
|
4
5
|
import '../../../node_modules/.pnpm/@monaco-editor_loader@1.4.0_monaco-editor@0.45.0/node_modules/@monaco-editor/loader/lib/es/index.mjs';
|
|
5
6
|
import loader from '../../../node_modules/.pnpm/@monaco-editor_loader@1.4.0_monaco-editor@0.45.0/node_modules/@monaco-editor/loader/lib/es/loader/index.mjs';
|
|
6
7
|
|
|
@@ -13,7 +14,24 @@ const IBizCode = /* @__PURE__ */ defineComponent({
|
|
|
13
14
|
emit
|
|
14
15
|
}) {
|
|
15
16
|
const ns = useNamespace("code");
|
|
17
|
+
const c = props.controller;
|
|
16
18
|
const currentVal = ref("");
|
|
19
|
+
const enableEdit = ref(true);
|
|
20
|
+
const hasEnableEdit = ref(false);
|
|
21
|
+
const readonlyState = ref(false);
|
|
22
|
+
const enableFullScreen = ref(false);
|
|
23
|
+
const isFullScreen = ref(false);
|
|
24
|
+
const editorModel = c.model;
|
|
25
|
+
if (editorModel.editorParams) {
|
|
26
|
+
if (editorModel.editorParams.enableEdit) {
|
|
27
|
+
hasEnableEdit.value = true;
|
|
28
|
+
readonlyState.value = true;
|
|
29
|
+
enableEdit.value = c.toBoolean(editorModel.editorParams.enableEdit) && !props.readonly && !props.disabled;
|
|
30
|
+
}
|
|
31
|
+
if (editorModel.editorParams.enableFullScreen) {
|
|
32
|
+
enableFullScreen.value = c.toBoolean(editorModel.editorParams.enableFullScreen);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
17
35
|
let editor;
|
|
18
36
|
let monacoEditor;
|
|
19
37
|
const {
|
|
@@ -33,13 +51,22 @@ const IBizCode = /* @__PURE__ */ defineComponent({
|
|
|
33
51
|
}, {
|
|
34
52
|
immediate: true
|
|
35
53
|
});
|
|
36
|
-
|
|
37
|
-
if (editor) {
|
|
38
|
-
|
|
39
|
-
readOnly: newVal
|
|
40
|
-
});
|
|
54
|
+
const updateEditorOptions = () => {
|
|
55
|
+
if (!editor) {
|
|
56
|
+
return;
|
|
41
57
|
}
|
|
42
|
-
|
|
58
|
+
if (props.readonly || props.disabled) {
|
|
59
|
+
hasEnableEdit.value = false;
|
|
60
|
+
readonlyState.value = true;
|
|
61
|
+
}
|
|
62
|
+
editor.updateOptions({
|
|
63
|
+
readOnly: hasEnableEdit.value ? readonlyState.value : props.readonly || props.disabled
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
watch(() => props.readonly, updateEditorOptions, {
|
|
67
|
+
immediate: true
|
|
68
|
+
});
|
|
69
|
+
watch(() => props.disabled, updateEditorOptions, {
|
|
43
70
|
immediate: true
|
|
44
71
|
});
|
|
45
72
|
const codeEditBox = ref();
|
|
@@ -65,10 +92,10 @@ const IBizCode = /* @__PURE__ */ defineComponent({
|
|
|
65
92
|
minimap: {
|
|
66
93
|
enabled: true
|
|
67
94
|
},
|
|
68
|
-
readOnly: props.readonly,
|
|
95
|
+
readOnly: hasEnableEdit.value ? readonlyState.value : props.readonly || props.disabled,
|
|
69
96
|
// 只读
|
|
70
97
|
readOnlyMessage: {
|
|
71
|
-
value: "
|
|
98
|
+
value: ibiz.i18n.t("editor.code.readOnlyPrompt")
|
|
72
99
|
},
|
|
73
100
|
fontSize: 16,
|
|
74
101
|
// 字体大小
|
|
@@ -83,8 +110,10 @@ const IBizCode = /* @__PURE__ */ defineComponent({
|
|
|
83
110
|
editor.setValue(currentVal.value);
|
|
84
111
|
});
|
|
85
112
|
editor.onDidChangeModelContent(() => {
|
|
86
|
-
|
|
87
|
-
|
|
113
|
+
if (!hasEnableEdit.value) {
|
|
114
|
+
currentVal.value = editor.getValue();
|
|
115
|
+
emit("change", currentVal.value);
|
|
116
|
+
}
|
|
88
117
|
});
|
|
89
118
|
window.addEventListener("resize", () => {
|
|
90
119
|
editor.layout();
|
|
@@ -92,6 +121,115 @@ const IBizCode = /* @__PURE__ */ defineComponent({
|
|
|
92
121
|
});
|
|
93
122
|
});
|
|
94
123
|
};
|
|
124
|
+
const changeEditState = () => {
|
|
125
|
+
readonlyState.value = !readonlyState.value;
|
|
126
|
+
if (!editor)
|
|
127
|
+
return;
|
|
128
|
+
if (!readonlyState.value) {
|
|
129
|
+
editor.updateOptions({
|
|
130
|
+
readOnly: false
|
|
131
|
+
});
|
|
132
|
+
} else {
|
|
133
|
+
editor.updateOptions({
|
|
134
|
+
readOnly: true
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const changeFullScreenState = async () => {
|
|
139
|
+
currentVal.value = String(editor == null ? void 0 : editor.getValue());
|
|
140
|
+
editor == null ? void 0 : editor.dispose();
|
|
141
|
+
editor = null;
|
|
142
|
+
isFullScreen.value = !isFullScreen.value;
|
|
143
|
+
editorInit();
|
|
144
|
+
};
|
|
145
|
+
const isAllowRenderFullScreen = () => {
|
|
146
|
+
if (enableFullScreen.value) {
|
|
147
|
+
if (isFullScreen.value) {
|
|
148
|
+
return createVNode("i", {
|
|
149
|
+
"class": "fa fa-compress",
|
|
150
|
+
"aria-hidden": "true",
|
|
151
|
+
"onClick": () => changeFullScreenState()
|
|
152
|
+
}, null);
|
|
153
|
+
}
|
|
154
|
+
return createVNode("i", {
|
|
155
|
+
"class": "fa fa-expand",
|
|
156
|
+
"aria-hidden": "true",
|
|
157
|
+
"onClick": () => changeFullScreenState()
|
|
158
|
+
}, null);
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
161
|
+
};
|
|
162
|
+
const renderCancelMessage = () => {
|
|
163
|
+
return createVNode("div", {
|
|
164
|
+
"class": ns.be("message", "message-content")
|
|
165
|
+
}, [createVNode("p", null, [ibiz.i18n.t("editor.code.confirmCancelPrompt")]), createVNode("p", {
|
|
166
|
+
"class": ns.bem("message", "message-content", "message-tip")
|
|
167
|
+
}, [ibiz.i18n.t("editor.code.cancelEditPrompt")])]);
|
|
168
|
+
};
|
|
169
|
+
const cancelEdit = () => {
|
|
170
|
+
if (props.value !== (editor == null ? void 0 : editor.getValue())) {
|
|
171
|
+
ElMessageBox({
|
|
172
|
+
title: ibiz.i18n.t("editor.code.confirmCancel"),
|
|
173
|
+
type: "warning",
|
|
174
|
+
customClass: ns.b("message"),
|
|
175
|
+
message: renderCancelMessage(),
|
|
176
|
+
showCancelButton: true,
|
|
177
|
+
cancelButtonClass: ns.be("message", "message-cancel"),
|
|
178
|
+
confirmButtonClass: ns.be("message", "message-comfire")
|
|
179
|
+
}).then(() => {
|
|
180
|
+
editor == null ? void 0 : editor.setValue(String(props.value || ""));
|
|
181
|
+
changeEditState();
|
|
182
|
+
}).catch(() => {
|
|
183
|
+
editor == null ? void 0 : editor.focus();
|
|
184
|
+
});
|
|
185
|
+
} else {
|
|
186
|
+
changeEditState();
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const save = () => {
|
|
190
|
+
changeEditState();
|
|
191
|
+
if (editor) {
|
|
192
|
+
currentVal.value = editor.getValue();
|
|
193
|
+
emit("change", currentVal.value);
|
|
194
|
+
}
|
|
195
|
+
if (isFullScreen.value) {
|
|
196
|
+
changeFullScreenState();
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
const renderFooter = () => {
|
|
200
|
+
if (hasEnableEdit.value) {
|
|
201
|
+
return createVNode("div", {
|
|
202
|
+
"class": [ns.b("footer"), {
|
|
203
|
+
[ns.b("footer-dialog")]: isFullScreen.value
|
|
204
|
+
}]
|
|
205
|
+
}, [createVNode("div", {
|
|
206
|
+
"class": ns.be("footer", "cancel"),
|
|
207
|
+
"onClick": () => cancelEdit()
|
|
208
|
+
}, [ibiz.i18n.t("app.cancel")]), createVNode("div", {
|
|
209
|
+
"class": ns.be("footer", "save"),
|
|
210
|
+
"onClick": () => save()
|
|
211
|
+
}, [ibiz.i18n.t("app.save")])]);
|
|
212
|
+
}
|
|
213
|
+
return null;
|
|
214
|
+
};
|
|
215
|
+
const renderHeaderToolbar = () => {
|
|
216
|
+
if (hasEnableEdit.value || enableFullScreen.value) {
|
|
217
|
+
return createVNode("div", {
|
|
218
|
+
"class": ns.b("toolbar")
|
|
219
|
+
}, [hasEnableEdit.value && enableEdit.value && readonlyState.value ? createVNode("i", {
|
|
220
|
+
"class": "fa fa-edit",
|
|
221
|
+
"aria-hidden": "true",
|
|
222
|
+
"onClick": () => changeEditState()
|
|
223
|
+
}, null) : null, isAllowRenderFullScreen()]);
|
|
224
|
+
}
|
|
225
|
+
return null;
|
|
226
|
+
};
|
|
227
|
+
const renderCodeContent = () => {
|
|
228
|
+
return createVNode("div", {
|
|
229
|
+
"ref": codeEditBox,
|
|
230
|
+
"class": ns.e("box")
|
|
231
|
+
}, null);
|
|
232
|
+
};
|
|
95
233
|
onMounted(() => {
|
|
96
234
|
editorInit();
|
|
97
235
|
});
|
|
@@ -101,14 +239,39 @@ const IBizCode = /* @__PURE__ */ defineComponent({
|
|
|
101
239
|
return {
|
|
102
240
|
ns,
|
|
103
241
|
currentVal,
|
|
104
|
-
codeEditBox
|
|
242
|
+
codeEditBox,
|
|
243
|
+
isFullScreen,
|
|
244
|
+
hasEnableEdit,
|
|
245
|
+
readonlyState,
|
|
246
|
+
renderFooter,
|
|
247
|
+
renderHeaderToolbar,
|
|
248
|
+
renderCodeContent,
|
|
249
|
+
changeFullScreenState
|
|
105
250
|
};
|
|
106
251
|
},
|
|
107
252
|
render() {
|
|
108
|
-
return createVNode("div", {
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
253
|
+
return !this.isFullScreen ? createVNode("div", {
|
|
254
|
+
"class": [this.ns.b(), {
|
|
255
|
+
[this.ns.b("editor-readonly")]: this.readonlyState
|
|
256
|
+
}, {
|
|
257
|
+
[this.ns.b("editor-enable")]: !this.readonlyState
|
|
258
|
+
}]
|
|
259
|
+
}, [this.renderHeaderToolbar(), this.renderCodeContent(), this.hasEnableEdit && !this.readonlyState ? this.renderFooter() : null]) : createVNode(resolveComponent("el-dialog"), {
|
|
260
|
+
"modelValue": this.isFullScreen,
|
|
261
|
+
"onUpdate:modelValue": ($event) => this.isFullScreen = $event,
|
|
262
|
+
"width": "80%",
|
|
263
|
+
"top": "10vh",
|
|
264
|
+
"class": this.ns.b("dialog-full-screen"),
|
|
265
|
+
"onClose": () => this.changeFullScreenState()
|
|
266
|
+
}, {
|
|
267
|
+
default: () => [createVNode("div", {
|
|
268
|
+
"class": [this.ns.b(), {
|
|
269
|
+
[this.ns.b("editor-readonly")]: this.readonlyState
|
|
270
|
+
}, {
|
|
271
|
+
[this.ns.b("editor-enable")]: !this.readonlyState
|
|
272
|
+
}]
|
|
273
|
+
}, [this.renderHeaderToolbar(), this.renderCodeContent(), this.hasEnableEdit && !this.readonlyState ? this.renderFooter() : null])]
|
|
274
|
+
});
|
|
112
275
|
}
|
|
113
276
|
});
|
|
114
277
|
|
|
@@ -26,6 +26,7 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
const isLoading = ref(false);
|
|
27
27
|
let editorState = "";
|
|
28
28
|
let funcs;
|
|
29
|
+
const codeItemValueNumber = ref(false);
|
|
29
30
|
const showFormDefaultContent = computed(() => {
|
|
30
31
|
if (props.controlParams && props.controlParams.editmode === "hover" && !props.readonly) {
|
|
31
32
|
return true;
|
|
@@ -64,6 +65,13 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
64
65
|
return list;
|
|
65
66
|
};
|
|
66
67
|
const loadCodeList = async () => {
|
|
68
|
+
if (c.model.appCodeListId) {
|
|
69
|
+
const app = ibiz.hub.getApp(c.context.srfappid);
|
|
70
|
+
const codeListModel = app.codeList.getCodeList(c.model.appCodeListId);
|
|
71
|
+
if (codeListModel) {
|
|
72
|
+
codeItemValueNumber.value = codeListModel.codeItemValueNumber || false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
67
75
|
isLoading.value = true;
|
|
68
76
|
const codeList = await c.loadCodeList(props.data);
|
|
69
77
|
isLoadedCodeList.value = true;
|
|
@@ -102,20 +110,20 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
102
110
|
};
|
|
103
111
|
const curValue = computed({
|
|
104
112
|
get() {
|
|
105
|
-
var _a, _b;
|
|
113
|
+
var _a, _b, _c;
|
|
106
114
|
if (!isLoadedCodeList.value) {
|
|
107
115
|
return c.multiple ? [] : "";
|
|
108
116
|
}
|
|
109
117
|
if (editorItems && editorItems.length > 0 && !c.multiple) {
|
|
110
|
-
return props.data[editorItems[0].id];
|
|
118
|
+
return (_a = props.data[editorItems[0].id]) == null ? void 0 : _a.toString();
|
|
111
119
|
}
|
|
112
120
|
if (props.value && typeof props.value === "string") {
|
|
113
|
-
return c.multiple ? (
|
|
121
|
+
return c.multiple ? (_b = props.value) == null ? void 0 : _b.toString().split(",") : props.value.toString();
|
|
114
122
|
}
|
|
115
123
|
if (props.value && Array.isArray(props.value)) {
|
|
116
124
|
return c.multiple ? props.value : props.value.toString();
|
|
117
125
|
}
|
|
118
|
-
return (
|
|
126
|
+
return (_c = props.value) == null ? void 0 : _c.toString();
|
|
119
127
|
},
|
|
120
128
|
set(select) {
|
|
121
129
|
if (Array.isArray(select)) {
|
|
@@ -129,13 +137,13 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
129
137
|
}
|
|
130
138
|
emit("change", selectArr);
|
|
131
139
|
} else if (editorItems && editorItems.length > 0) {
|
|
132
|
-
emit("change", select, editorItems[0].id);
|
|
133
|
-
const selectItem = getCodeListItemByValue(select);
|
|
140
|
+
emit("change", codeItemValueNumber.value ? Number(select) : select, editorItems[0].id);
|
|
141
|
+
const selectItem = getCodeListItemByValue(codeItemValueNumber.value ? Number(select) : select);
|
|
134
142
|
if (selectItem) {
|
|
135
143
|
emit("change", selectItem.text);
|
|
136
144
|
}
|
|
137
145
|
} else {
|
|
138
|
-
emit("change", select);
|
|
146
|
+
emit("change", codeItemValueNumber.value ? Number(select) : select);
|
|
139
147
|
}
|
|
140
148
|
setEditable(false);
|
|
141
149
|
}
|
|
@@ -146,7 +154,7 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
146
154
|
const textArr = [];
|
|
147
155
|
valueArr.forEach((item) => {
|
|
148
156
|
list.forEach((codeItem) => {
|
|
149
|
-
if (codeItem.value === item) {
|
|
157
|
+
if (codeItemValueNumber.value ? codeItem.value === Number(item) : codeItem.value === item) {
|
|
150
158
|
textArr.push(codeItem.text);
|
|
151
159
|
}
|
|
152
160
|
});
|
|
@@ -36,6 +36,7 @@ export declare const IBizInputNumber: import("vue").DefineComponent<{
|
|
|
36
36
|
showFormDefaultContent: import("vue").ComputedRef<boolean>;
|
|
37
37
|
max: number;
|
|
38
38
|
min: number;
|
|
39
|
+
currentFormatVal: import("vue").ComputedRef<string>;
|
|
39
40
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
41
|
change: (_value: unknown, _name?: string | undefined) => boolean;
|
|
41
42
|
blur: (_event?: IData | undefined) => boolean;
|
|
@@ -42,6 +42,12 @@ const IBizInputNumber = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
}, {
|
|
43
43
|
immediate: true
|
|
44
44
|
});
|
|
45
|
+
const currentFormatVal = computed(() => {
|
|
46
|
+
if (currentVal.value || currentVal.value === 0) {
|
|
47
|
+
return props.controller.formatValue(currentVal.value);
|
|
48
|
+
}
|
|
49
|
+
return "";
|
|
50
|
+
});
|
|
45
51
|
const setEditable = (flag) => {
|
|
46
52
|
if (flag) {
|
|
47
53
|
isEditable.value = flag;
|
|
@@ -86,7 +92,8 @@ const IBizInputNumber = /* @__PURE__ */ defineComponent({
|
|
|
86
92
|
setEditable,
|
|
87
93
|
showFormDefaultContent,
|
|
88
94
|
max,
|
|
89
|
-
min
|
|
95
|
+
min,
|
|
96
|
+
currentFormatVal
|
|
90
97
|
};
|
|
91
98
|
},
|
|
92
99
|
render() {
|
|
@@ -95,7 +102,7 @@ const IBizInputNumber = /* @__PURE__ */ defineComponent({
|
|
|
95
102
|
} = this.c.parent;
|
|
96
103
|
let content = null;
|
|
97
104
|
if (this.readonly) {
|
|
98
|
-
content = isNilOrEmpty(this.currentVal) ? "" : "".concat(this.
|
|
105
|
+
content = isNilOrEmpty(this.currentVal) ? "" : "".concat(this.currentFormatVal);
|
|
99
106
|
if (content && unitName) {
|
|
100
107
|
content += unitName;
|
|
101
108
|
}
|
|
@@ -120,7 +127,7 @@ const IBizInputNumber = /* @__PURE__ */ defineComponent({
|
|
|
120
127
|
}
|
|
121
128
|
const formDefaultContent = createVNode("div", {
|
|
122
129
|
"class": this.ns.b("form-default-content")
|
|
123
|
-
}, [this.currentVal || this.currentVal === 0 ? this.
|
|
130
|
+
}, [this.currentVal || this.currentVal === 0 ? this.currentFormatVal : "-"]);
|
|
124
131
|
return createVNode("div", {
|
|
125
132
|
"class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.ns.is("editable", this.isEditable), this.ns.is("show-default", this.showFormDefaultContent)]
|
|
126
133
|
}, [this.showFormDefaultContent && formDefaultContent, content]);
|
|
@@ -41,6 +41,7 @@ export declare const IBizInput: import("vue").DefineComponent<{
|
|
|
41
41
|
showLimit: import("vue").Ref<boolean>;
|
|
42
42
|
isAuto: import("vue").Ref<boolean>;
|
|
43
43
|
showFormDefaultContent: import("vue").ComputedRef<boolean>;
|
|
44
|
+
currentFormatVal: import("vue").ComputedRef<string>;
|
|
44
45
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
46
|
change: (_value: unknown, _name?: string | undefined) => boolean;
|
|
46
47
|
blur: (_event?: IData | undefined) => boolean;
|
|
@@ -64,6 +64,12 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
64
64
|
}, {
|
|
65
65
|
immediate: true
|
|
66
66
|
});
|
|
67
|
+
const currentFormatVal = computed(() => {
|
|
68
|
+
if (currentVal.value) {
|
|
69
|
+
return props.controller.formatValue(currentVal.value);
|
|
70
|
+
}
|
|
71
|
+
return "";
|
|
72
|
+
});
|
|
67
73
|
const setEditable = (flag) => {
|
|
68
74
|
if (flag) {
|
|
69
75
|
isEditable.value = flag;
|
|
@@ -216,7 +222,8 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
216
222
|
setEditable,
|
|
217
223
|
showLimit,
|
|
218
224
|
isAuto,
|
|
219
|
-
showFormDefaultContent
|
|
225
|
+
showFormDefaultContent,
|
|
226
|
+
currentFormatVal
|
|
220
227
|
};
|
|
221
228
|
},
|
|
222
229
|
render() {
|
|
@@ -276,7 +283,7 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
276
283
|
}
|
|
277
284
|
const formDefaultContent = createVNode("div", {
|
|
278
285
|
"class": this.ns.b("form-default-content")
|
|
279
|
-
}, [this.currentVal ? this.type === "password" ? this.currentVal.split("").map((_item) => "\u2022") : this.
|
|
286
|
+
}, [this.currentVal ? this.type === "password" ? this.currentVal.split("").map((_item) => "\u2022") : this.currentFormatVal : "-"]);
|
|
280
287
|
return createVNode("div", {
|
|
281
288
|
"class": [this.ns.b(), this.ns.is("textarea", Object.is(this.type, "textarea")), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.ns.is("editable", this.isEditable), this.ns.is("show-default", this.showFormDefaultContent)],
|
|
282
289
|
"style": {
|
package/es/ibiz-vue3.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import './view/index.mjs';
|
|
|
8
8
|
import { iBizI18n } from './locale/index.mjs';
|
|
9
9
|
import { IBizViewEngine } from './view-engine/index.mjs';
|
|
10
10
|
import { View404 } from './view/404-view/404-view.mjs';
|
|
11
|
+
import { View403 } from './view/403-view/403-view.mjs';
|
|
11
12
|
import { IBizWFStepTraceView } from './view/wf-step-trace-view/index.mjs';
|
|
12
13
|
import { IBizSubAppRefView } from './view/sub-app-ref-view/index.mjs';
|
|
13
14
|
import { IBizDataViewControl } from './control/data-view/index.mjs';
|
|
@@ -51,6 +52,7 @@ var IBizVue3 = {
|
|
|
51
52
|
ibiz.i18n = iBizI18n;
|
|
52
53
|
ibiz.util.getExcelUtil = () => import('./util/xlsx-util/xlsx-util.mjs');
|
|
53
54
|
registerErrorViewProvider("404", () => ({ component: View404 }));
|
|
55
|
+
registerErrorViewProvider("403", () => ({ component: View403 }));
|
|
54
56
|
v.use(IBizCommonComponents);
|
|
55
57
|
v.use(IBizPanelComponents);
|
|
56
58
|
v.use(IBizViewEngine);
|
package/es/index.mjs
CHANGED
|
@@ -100,6 +100,7 @@ export { IBizPanelIndexViewSearch } from './panel-component/panel-index-view-sea
|
|
|
100
100
|
export { IBizIndexActions } from './panel-component/index-actions/index.mjs';
|
|
101
101
|
export { IBizUserAction } from './panel-component/user-action/index.mjs';
|
|
102
102
|
export { View404 } from './view/404-view/404-view.mjs';
|
|
103
|
+
export { View403 } from './view/403-view/403-view.mjs';
|
|
103
104
|
export { LoginView } from './view/login-view/login-view.mjs';
|
|
104
105
|
export { IBizWFStepTraceView } from './view/wf-step-trace-view/index.mjs';
|
|
105
106
|
export { IBizSubAppRefView } from './view/sub-app-ref-view/index.mjs';
|
package/es/locale/en/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ declare const _default: {
|
|
|
11
11
|
noSupport: string;
|
|
12
12
|
add: string;
|
|
13
13
|
delete: string;
|
|
14
|
+
save: string;
|
|
14
15
|
};
|
|
15
16
|
view: {};
|
|
16
17
|
control: {
|
|
@@ -103,6 +104,13 @@ declare const _default: {
|
|
|
103
104
|
more: string;
|
|
104
105
|
};
|
|
105
106
|
};
|
|
106
|
-
editor: {
|
|
107
|
+
editor: {
|
|
108
|
+
code: {
|
|
109
|
+
readOnlyPrompt: string;
|
|
110
|
+
confirmCancelPrompt: string;
|
|
111
|
+
cancelEditPrompt: string;
|
|
112
|
+
confirmCancel: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
107
115
|
};
|
|
108
116
|
export default _default;
|
package/es/locale/en/index.mjs
CHANGED
|
@@ -12,7 +12,8 @@ var index = {
|
|
|
12
12
|
refresh: "Refresh",
|
|
13
13
|
noSupport: "Not supported currently",
|
|
14
14
|
add: "Add",
|
|
15
|
-
delete: "Delete"
|
|
15
|
+
delete: "Delete",
|
|
16
|
+
save: "Save"
|
|
16
17
|
},
|
|
17
18
|
// 视图
|
|
18
19
|
view: {},
|
|
@@ -109,7 +110,14 @@ var index = {
|
|
|
109
110
|
}
|
|
110
111
|
},
|
|
111
112
|
// 编辑器
|
|
112
|
-
editor: {
|
|
113
|
+
editor: {
|
|
114
|
+
code: {
|
|
115
|
+
readOnlyPrompt: "Currently in read-only mode, not editable",
|
|
116
|
+
confirmCancelPrompt: "Are you sure you want to cancel editing?",
|
|
117
|
+
cancelEditPrompt: "Canceling editing will prevent the modified content from being saved and cannot be retrieved.",
|
|
118
|
+
confirmCancel: "Confirm cancel"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
113
121
|
};
|
|
114
122
|
|
|
115
123
|
export { index as default };
|
|
@@ -11,6 +11,7 @@ declare const _default: {
|
|
|
11
11
|
noSupport: string;
|
|
12
12
|
add: string;
|
|
13
13
|
delete: string;
|
|
14
|
+
save: string;
|
|
14
15
|
};
|
|
15
16
|
view: {};
|
|
16
17
|
control: {
|
|
@@ -103,6 +104,13 @@ declare const _default: {
|
|
|
103
104
|
more: string;
|
|
104
105
|
};
|
|
105
106
|
};
|
|
106
|
-
editor: {
|
|
107
|
+
editor: {
|
|
108
|
+
code: {
|
|
109
|
+
readOnlyPrompt: string;
|
|
110
|
+
confirmCancelPrompt: string;
|
|
111
|
+
cancelEditPrompt: string;
|
|
112
|
+
confirmCancel: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
107
115
|
};
|
|
108
116
|
export default _default;
|
|
@@ -12,7 +12,8 @@ var index = {
|
|
|
12
12
|
refresh: "\u5237\u65B0",
|
|
13
13
|
noSupport: "\u6682\u672A\u652F\u6301",
|
|
14
14
|
add: "\u6DFB\u52A0",
|
|
15
|
-
delete: "\u5220\u9664"
|
|
15
|
+
delete: "\u5220\u9664",
|
|
16
|
+
save: "\u4FDD\u5B58"
|
|
16
17
|
},
|
|
17
18
|
// 视图
|
|
18
19
|
view: {},
|
|
@@ -109,7 +110,14 @@ var index = {
|
|
|
109
110
|
}
|
|
110
111
|
},
|
|
111
112
|
// 编辑器
|
|
112
|
-
editor: {
|
|
113
|
+
editor: {
|
|
114
|
+
code: {
|
|
115
|
+
readOnlyPrompt: "\u5F53\u524D\u4E3A\u53EA\u8BFB\u6A21\u5F0F\uFF0C\u4E0D\u53EF\u7F16\u8F91",
|
|
116
|
+
confirmCancelPrompt: "\u786E\u5B9A\u8981\u53D6\u6D88\u7F16\u8F91\u5417\uFF1F",
|
|
117
|
+
cancelEditPrompt: "\u53D6\u6D88\u7F16\u8F91\u5C06\u65E0\u6CD5\u4FDD\u5B58\u4FEE\u6539\u7684\u5185\u5BB9\uFF0C\u4E14\u4E0D\u80FD\u627E\u56DE\u3002",
|
|
118
|
+
confirmCancel: "\u786E\u8BA4\u53D6\u6D88"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
113
121
|
};
|
|
114
122
|
|
|
115
123
|
export { index as default };
|
|
@@ -36,10 +36,18 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
if ((_a = model.rawItem) == null ? void 0 : _a.rawItemParams) {
|
|
37
37
|
let swipeData = [];
|
|
38
38
|
const imgData = model.rawItem.rawItemParams;
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
const autoplayIndex = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
|
|
40
|
+
const timespanIndex = imgData.findIndex((item) => Object.is(item.key, "timespan"));
|
|
41
|
+
let number = 0;
|
|
42
|
+
if (autoplayIndex >= 0) {
|
|
43
|
+
number += 1;
|
|
44
|
+
}
|
|
45
|
+
if (timespanIndex >= 0) {
|
|
46
|
+
number += 1;
|
|
47
|
+
}
|
|
48
|
+
if (number > 0) {
|
|
49
|
+
swipeData = imgData.slice(0, -number);
|
|
50
|
+
getSwipeConfig(imgData.slice(-number));
|
|
43
51
|
} else {
|
|
44
52
|
swipeData = imgData;
|
|
45
53
|
getSwipeConfig(imgData);
|
|
@@ -53,7 +61,7 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
|
|
|
53
61
|
return {
|
|
54
62
|
id,
|
|
55
63
|
name: key,
|
|
56
|
-
imgUrl: sysImage == null ? void 0 : sysImage.imagePath,
|
|
64
|
+
imgUrl: (sysImage == null ? void 0 : sysImage.imagePath) || (sysImage == null ? void 0 : sysImage.rawContent),
|
|
57
65
|
cssClass: sysImage == null ? void 0 : sysImage.cssClass,
|
|
58
66
|
linkPath: item.linkPath
|
|
59
67
|
};
|