@ibiz-template/vue3-components 0.7.6 → 0.7.7

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.
Files changed (62) hide show
  1. package/dist/index-Rqr5SnvQ.js +1 -0
  2. package/dist/index-ntRuv0hC.js +4 -0
  3. package/dist/index-x-jLCilD.js +1 -0
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/wang-editor-0uYWEddj.js +1 -0
  7. package/dist/{xlsx-util-QjtIWX97.js → xlsx-util-2u3vZn2l.js} +1 -1
  8. package/es/common/action-toolbar/action-toolbar.d.ts +3 -0
  9. package/es/common/action-toolbar/action-toolbar.mjs +13 -3
  10. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +5 -0
  11. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.d.ts +1 -0
  12. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +4 -0
  13. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +45 -0
  14. package/es/control/toolbar/toolbar.mjs +14 -8
  15. package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
  16. package/es/editor/code/monaco-editor/monaco-editor.d.ts +7 -0
  17. package/es/editor/code/monaco-editor/monaco-editor.mjs +179 -16
  18. package/es/editor/html/wang-editor/wang-editor.mjs +7 -3
  19. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +1 -0
  20. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +10 -3
  21. package/es/editor/text-box/input/input.d.ts +1 -0
  22. package/es/editor/text-box/input/input.mjs +9 -2
  23. package/es/ibiz-vue3.mjs +2 -0
  24. package/es/index.mjs +1 -0
  25. package/es/locale/en/index.d.ts +9 -1
  26. package/es/locale/en/index.mjs +10 -2
  27. package/es/locale/zh-CN/index.d.ts +9 -1
  28. package/es/locale/zh-CN/index.mjs +10 -2
  29. package/es/util/open-view-util/open-view-util.mjs +2 -3
  30. package/es/view/403-view/403-view.css +1 -0
  31. package/es/view/403-view/403-view.d.ts +6 -0
  32. package/es/view/403-view/403-view.mjs +45 -0
  33. package/es/view/404-view/404-view.mjs +2 -2
  34. package/es/view/index.d.ts +1 -0
  35. package/es/view/index.mjs +1 -0
  36. package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +5 -2
  37. package/es/web-app/util/unauthorized-handler/unauthorized-handler.d.ts +1 -1
  38. package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +3 -12
  39. package/lib/common/action-toolbar/action-toolbar.cjs +13 -3
  40. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +4 -0
  41. package/lib/control/toolbar/toolbar.cjs +14 -8
  42. package/lib/editor/code/monaco-editor/monaco-editor.cjs +178 -15
  43. package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
  44. package/lib/editor/html/wang-editor/wang-editor.cjs +6 -2
  45. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +10 -3
  46. package/lib/editor/text-box/input/input.cjs +9 -2
  47. package/lib/ibiz-vue3.cjs +2 -0
  48. package/lib/index.cjs +2 -0
  49. package/lib/locale/en/index.cjs +10 -2
  50. package/lib/locale/zh-CN/index.cjs +10 -2
  51. package/lib/util/open-view-util/open-view-util.cjs +2 -3
  52. package/lib/view/403-view/403-view.cjs +47 -0
  53. package/lib/view/403-view/403-view.css +1 -0
  54. package/lib/view/404-view/404-view.cjs +2 -2
  55. package/lib/view/index.cjs +2 -0
  56. package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +4 -1
  57. package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +3 -12
  58. package/package.json +7 -7
  59. package/dist/index-13Oh42A8.js +0 -1
  60. package/dist/index-ZIuDbCjc.js +0 -1
  61. package/dist/index-rHXmoO9Y.js +0 -4
  62. package/dist/wang-editor-Zc_Y0dGt.js +0 -1
@@ -33,12 +33,15 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
33
33
  zIndex: {
34
34
  type: Number,
35
35
  required: true
36
- }
36
+ },
37
+ popperClass: String
37
38
  },
38
39
  setup(props, {
39
40
  emit
40
41
  }) {
41
42
  const ns = vue3Util.useNamespace("action-toolbar");
43
+ const dropdownRef = vue.ref();
44
+ const popoverVisible = vue.ref(false);
42
45
  props.actionDetails.forEach((detail) => {
43
46
  if (detail.capLanguageRes && detail.capLanguageRes.lanResTag) {
44
47
  detail.caption = ibiz.i18n.t(detail.capLanguageRes.lanResTag, detail.caption);
@@ -49,6 +52,11 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
49
52
  });
50
53
  const handleClick = async (detail, e) => {
51
54
  e.stopPropagation();
55
+ if (props.mode === "buttons") {
56
+ popoverVisible.value = false;
57
+ } else if (dropdownRef.value) {
58
+ dropdownRef.value.handleClose();
59
+ }
52
60
  emit("action-click", detail, e);
53
61
  };
54
62
  const expandDetails = vue.ref([]);
@@ -63,7 +71,6 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
63
71
  });
64
72
  }
65
73
  const groupButtonRef = vue.ref();
66
- const popoverVisible = vue.ref(false);
67
74
  const calcActionItemClass = (item) => {
68
75
  const {
69
76
  actionLevel
@@ -73,6 +80,7 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
73
80
  const popoverIndex = props.zIndex;
74
81
  return {
75
82
  ns,
83
+ dropdownRef,
76
84
  popoverIndex,
77
85
  expandDetails,
78
86
  groupDetails,
@@ -144,8 +152,10 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
144
152
  })]]);
145
153
  }
146
154
  return vue.createVNode(vue.resolveComponent("el-dropdown"), {
155
+ "ref": "dropdownRef",
147
156
  "onCommand": (command) => this.handleClick(command, new MouseEvent("click")),
148
- "class": [this.ns.b(), this.ns.m("dropdown")]
157
+ "class": [this.ns.b(), this.ns.m("dropdown")],
158
+ "popper-class": this.popperClass
149
159
  }, {
150
160
  default: () => vue.createVNode("span", {
151
161
  "class": this.ns.e("caption")
@@ -15,7 +15,9 @@ const PortletLayout = /* @__PURE__ */ vue.defineComponent({
15
15
  }
16
16
  },
17
17
  setup(props) {
18
+ var _a;
18
19
  const ns = vue3Util.useNamespace("portlet-layout");
20
+ const portletType = "portlet-".concat((_a = props.controller.model.portletType) == null ? void 0 : _a.toLowerCase());
19
21
  const c = props.controller;
20
22
  const isShowHeader = vue.computed(() => {
21
23
  return c.model.showTitleBar && (c.model.title || c.model.sysImage) || c.model.uiactionGroup;
@@ -26,6 +28,7 @@ const PortletLayout = /* @__PURE__ */ vue.defineComponent({
26
28
  return {
27
29
  c,
28
30
  ns,
31
+ portletType,
29
32
  isShowHeader,
30
33
  onActionClick
31
34
  };
@@ -58,6 +61,7 @@ const PortletLayout = /* @__PURE__ */ vue.defineComponent({
58
61
  "action-details": model.uiactionGroup.uiactionGroupDetails,
59
62
  "actions-state": state.actionGroupState,
60
63
  "mode": model.actionGroupExtractMode === "ITEMS" ? "dropdown" : "buttons",
64
+ "popperClass": this.ns.em("toolbar", "".concat(this.portletType, "-").concat(model.id)),
61
65
  "onActionClick": this.onActionClick
62
66
  }, null)])]), vue.createVNode("div", {
63
67
  "key": "content",
@@ -28,6 +28,10 @@ const btnContent = (item) => {
28
28
  }
29
29
  return result;
30
30
  };
31
+ const calcCssName = (item) => {
32
+ var _a;
33
+ return (_a = item == null ? void 0 : item.sysCss) == null ? void 0 : _a.cssName;
34
+ };
31
35
  const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
32
36
  name: "IBizToolbarControl",
33
37
  props: {
@@ -78,15 +82,16 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
78
82
  const renderSubmenu = (item) => {
79
83
  const detoolbarItems = item.detoolbarItems || [];
80
84
  const loading = detoolbarItems.findIndex((item2) => c.state.buttonsState[item2.id].loading) !== -1;
85
+ const groupButtonStyle = item.buttonStyle || "";
81
86
  return vue.createVNode(vue.resolveComponent("el-sub-menu"), {
82
- "class": ns.b("submenu"),
87
+ "class": [ns.b("submenu"), ns.em("item", groupButtonStyle.toLowerCase()), calcCssName(item)],
83
88
  "index": item.id,
84
89
  "title": item.tooltip,
85
- "popper-class": [ns.b("submenu-popper"), ns.bm("submenu-popper", toolbarStyle)]
90
+ "popper-class": [ns.b("submenu-popper"), ns.bm("submenu-popper", toolbarStyle), ns.em("submenu-popper", groupButtonStyle.toLowerCase()), ns.bm("submenu-popper", calcCssName(item))]
86
91
  }, {
87
92
  default: () => {
88
93
  return detoolbarItems.map((item2) => {
89
- var _a2;
94
+ var _a2, _b;
90
95
  const actionId = item2.uiactionId;
91
96
  const visible = (_a2 = c.state.buttonsState[item2.id]) == null ? void 0 : _a2.visible;
92
97
  if (!visible) {
@@ -108,9 +113,10 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
108
113
  }
109
114
  if (item2.itemType === "DEUIACTION") {
110
115
  let _slot2;
116
+ const buttonType = (_b = item2.buttonStyle) == null ? void 0 : _b.toLowerCase();
111
117
  if (actionId === "exportexcel") {
112
118
  return vue.createVNode(exportExcel.IBizExportExcel, {
113
- "class": [ns.e("menu-exportexcel")],
119
+ "class": [ns.e("menu-exportexcel"), ns.em("item", buttonType), calcCssName(item2)],
114
120
  "mode": "menu",
115
121
  "item": item2,
116
122
  "btnContent": btnContent,
@@ -122,7 +128,7 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
122
128
  }, null);
123
129
  }
124
130
  return vue.createVNode(vue.resolveComponent("el-menu-item"), {
125
- "class": [ns.is("loading", c.state.buttonsState[item2.id].loading)],
131
+ "class": [ns.is("loading", c.state.buttonsState[item2.id].loading), ns.em("item", buttonType), calcCssName(item2)],
126
132
  "index": "menuitem".concat(item2.id),
127
133
  "disabled": c.state.buttonsState[item2.id].disabled,
128
134
  "title": item2.tooltip,
@@ -175,9 +181,10 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
175
181
  if (item.itemType === "DEUIACTION") {
176
182
  let _slot4;
177
183
  const actionId = item.uiactionId;
184
+ const buttonType = (_b = item.buttonStyle) == null ? void 0 : _b.toLowerCase();
178
185
  if (actionId === "exportexcel") {
179
186
  return vue.createVNode(exportExcel.IBizExportExcel, {
180
- "class": [ns.e("item"), ns.e("item-deuiaction")],
187
+ "class": [ns.e("item"), ns.e("item-deuiaction"), ns.em("item", buttonType), calcCssName(item)],
181
188
  "item": item,
182
189
  "btnContent": btnContent,
183
190
  "size": btnSize.value,
@@ -187,10 +194,9 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
187
194
  }
188
195
  }, null);
189
196
  }
190
- const buttonType = (_b = item.buttonStyle) == null ? void 0 : _b.toLowerCase();
191
197
  return vue.createVNode("div", {
192
198
  "key": itemId,
193
- "class": [ns.e("item"), ns.e("item-deuiaction"), ns.em("item", buttonType), ns.is("loading", c.state.buttonsState[itemId].loading)]
199
+ "class": [ns.e("item"), ns.e("item-deuiaction"), ns.em("item", buttonType), calcCssName(item), ns.is("loading", c.state.buttonsState[itemId].loading)]
194
200
  }, [vue.createVNode(vue.resolveComponent("el-button"), {
195
201
  "title": item.tooltip,
196
202
  "size": btnSize.value,
@@ -3,6 +3,7 @@
3
3
  var vue = require('vue');
4
4
  require('./monaco-editor.css');
5
5
  var vue3Util = require('@ibiz-template/vue3-util');
6
+ var ElementPlus = require('element-plus');
6
7
  require('../../../node_modules/.pnpm/@monaco-editor_loader@1.4.0_monaco-editor@0.45.0/node_modules/@monaco-editor/loader/lib/es/index.cjs');
7
8
  var index = require('../../../node_modules/.pnpm/@monaco-editor_loader@1.4.0_monaco-editor@0.45.0/node_modules/@monaco-editor/loader/lib/es/loader/index.cjs');
8
9
 
@@ -15,7 +16,24 @@ const IBizCode = /* @__PURE__ */ vue.defineComponent({
15
16
  emit
16
17
  }) {
17
18
  const ns = vue3Util.useNamespace("code");
19
+ const c = props.controller;
18
20
  const currentVal = vue.ref("");
21
+ const enableEdit = vue.ref(true);
22
+ const hasEnableEdit = vue.ref(false);
23
+ const readonlyState = vue.ref(false);
24
+ const enableFullScreen = vue.ref(false);
25
+ const isFullScreen = vue.ref(false);
26
+ const editorModel = c.model;
27
+ if (editorModel.editorParams) {
28
+ if (editorModel.editorParams.enableEdit) {
29
+ hasEnableEdit.value = true;
30
+ readonlyState.value = true;
31
+ enableEdit.value = c.toBoolean(editorModel.editorParams.enableEdit) && !props.readonly && !props.disabled;
32
+ }
33
+ if (editorModel.editorParams.enableFullScreen) {
34
+ enableFullScreen.value = c.toBoolean(editorModel.editorParams.enableFullScreen);
35
+ }
36
+ }
19
37
  let editor;
20
38
  let monacoEditor;
21
39
  const {
@@ -35,13 +53,22 @@ const IBizCode = /* @__PURE__ */ vue.defineComponent({
35
53
  }, {
36
54
  immediate: true
37
55
  });
38
- vue.watch(() => props.readonly, (newVal) => {
39
- if (editor) {
40
- editor.updateOptions({
41
- readOnly: newVal
42
- });
56
+ const updateEditorOptions = () => {
57
+ if (!editor) {
58
+ return;
43
59
  }
44
- }, {
60
+ if (props.readonly || props.disabled) {
61
+ hasEnableEdit.value = false;
62
+ readonlyState.value = true;
63
+ }
64
+ editor.updateOptions({
65
+ readOnly: hasEnableEdit.value ? readonlyState.value : props.readonly || props.disabled
66
+ });
67
+ };
68
+ vue.watch(() => props.readonly, updateEditorOptions, {
69
+ immediate: true
70
+ });
71
+ vue.watch(() => props.disabled, updateEditorOptions, {
45
72
  immediate: true
46
73
  });
47
74
  const codeEditBox = vue.ref();
@@ -67,10 +94,10 @@ const IBizCode = /* @__PURE__ */ vue.defineComponent({
67
94
  minimap: {
68
95
  enabled: true
69
96
  },
70
- readOnly: props.readonly,
97
+ readOnly: hasEnableEdit.value ? readonlyState.value : props.readonly || props.disabled,
71
98
  // 只读
72
99
  readOnlyMessage: {
73
- value: "\u5F53\u524D\u4E3A\u53EA\u8BFB\u6A21\u5F0F\uFF0C\u4E0D\u53EF\u7F16\u8F91"
100
+ value: ibiz.i18n.t("editor.code.readOnlyPrompt")
74
101
  },
75
102
  fontSize: 16,
76
103
  // 字体大小
@@ -85,8 +112,10 @@ const IBizCode = /* @__PURE__ */ vue.defineComponent({
85
112
  editor.setValue(currentVal.value);
86
113
  });
87
114
  editor.onDidChangeModelContent(() => {
88
- currentVal.value = editor.getValue();
89
- emit("change", currentVal.value);
115
+ if (!hasEnableEdit.value) {
116
+ currentVal.value = editor.getValue();
117
+ emit("change", currentVal.value);
118
+ }
90
119
  });
91
120
  window.addEventListener("resize", () => {
92
121
  editor.layout();
@@ -94,6 +123,115 @@ const IBizCode = /* @__PURE__ */ vue.defineComponent({
94
123
  });
95
124
  });
96
125
  };
126
+ const changeEditState = () => {
127
+ readonlyState.value = !readonlyState.value;
128
+ if (!editor)
129
+ return;
130
+ if (!readonlyState.value) {
131
+ editor.updateOptions({
132
+ readOnly: false
133
+ });
134
+ } else {
135
+ editor.updateOptions({
136
+ readOnly: true
137
+ });
138
+ }
139
+ };
140
+ const changeFullScreenState = async () => {
141
+ currentVal.value = String(editor == null ? void 0 : editor.getValue());
142
+ editor == null ? void 0 : editor.dispose();
143
+ editor = null;
144
+ isFullScreen.value = !isFullScreen.value;
145
+ editorInit();
146
+ };
147
+ const isAllowRenderFullScreen = () => {
148
+ if (enableFullScreen.value) {
149
+ if (isFullScreen.value) {
150
+ return vue.createVNode("i", {
151
+ "class": "fa fa-compress",
152
+ "aria-hidden": "true",
153
+ "onClick": () => changeFullScreenState()
154
+ }, null);
155
+ }
156
+ return vue.createVNode("i", {
157
+ "class": "fa fa-expand",
158
+ "aria-hidden": "true",
159
+ "onClick": () => changeFullScreenState()
160
+ }, null);
161
+ }
162
+ return null;
163
+ };
164
+ const renderCancelMessage = () => {
165
+ return vue.createVNode("div", {
166
+ "class": ns.be("message", "message-content")
167
+ }, [vue.createVNode("p", null, [ibiz.i18n.t("editor.code.confirmCancelPrompt")]), vue.createVNode("p", {
168
+ "class": ns.bem("message", "message-content", "message-tip")
169
+ }, [ibiz.i18n.t("editor.code.cancelEditPrompt")])]);
170
+ };
171
+ const cancelEdit = () => {
172
+ if (props.value !== (editor == null ? void 0 : editor.getValue())) {
173
+ ElementPlus.ElMessageBox({
174
+ title: ibiz.i18n.t("editor.code.confirmCancel"),
175
+ type: "warning",
176
+ customClass: ns.b("message"),
177
+ message: renderCancelMessage(),
178
+ showCancelButton: true,
179
+ cancelButtonClass: ns.be("message", "message-cancel"),
180
+ confirmButtonClass: ns.be("message", "message-comfire")
181
+ }).then(() => {
182
+ editor == null ? void 0 : editor.setValue(String(props.value || ""));
183
+ changeEditState();
184
+ }).catch(() => {
185
+ editor == null ? void 0 : editor.focus();
186
+ });
187
+ } else {
188
+ changeEditState();
189
+ }
190
+ };
191
+ const save = () => {
192
+ changeEditState();
193
+ if (editor) {
194
+ currentVal.value = editor.getValue();
195
+ emit("change", currentVal.value);
196
+ }
197
+ if (isFullScreen.value) {
198
+ changeFullScreenState();
199
+ }
200
+ };
201
+ const renderFooter = () => {
202
+ if (hasEnableEdit.value) {
203
+ return vue.createVNode("div", {
204
+ "class": [ns.b("footer"), {
205
+ [ns.b("footer-dialog")]: isFullScreen.value
206
+ }]
207
+ }, [vue.createVNode("div", {
208
+ "class": ns.be("footer", "cancel"),
209
+ "onClick": () => cancelEdit()
210
+ }, [ibiz.i18n.t("app.cancel")]), vue.createVNode("div", {
211
+ "class": ns.be("footer", "save"),
212
+ "onClick": () => save()
213
+ }, [ibiz.i18n.t("app.save")])]);
214
+ }
215
+ return null;
216
+ };
217
+ const renderHeaderToolbar = () => {
218
+ if (hasEnableEdit.value || enableFullScreen.value) {
219
+ return vue.createVNode("div", {
220
+ "class": ns.b("toolbar")
221
+ }, [hasEnableEdit.value && enableEdit.value && readonlyState.value ? vue.createVNode("i", {
222
+ "class": "fa fa-edit",
223
+ "aria-hidden": "true",
224
+ "onClick": () => changeEditState()
225
+ }, null) : null, isAllowRenderFullScreen()]);
226
+ }
227
+ return null;
228
+ };
229
+ const renderCodeContent = () => {
230
+ return vue.createVNode("div", {
231
+ "ref": codeEditBox,
232
+ "class": ns.e("box")
233
+ }, null);
234
+ };
97
235
  vue.onMounted(() => {
98
236
  editorInit();
99
237
  });
@@ -103,14 +241,39 @@ const IBizCode = /* @__PURE__ */ vue.defineComponent({
103
241
  return {
104
242
  ns,
105
243
  currentVal,
106
- codeEditBox
244
+ codeEditBox,
245
+ isFullScreen,
246
+ hasEnableEdit,
247
+ readonlyState,
248
+ renderFooter,
249
+ renderHeaderToolbar,
250
+ renderCodeContent,
251
+ changeFullScreenState
107
252
  };
108
253
  },
109
254
  render() {
110
- return vue.createVNode("div", {
111
- "ref": "codeEditBox",
112
- "class": this.ns.b()
113
- }, null);
255
+ return !this.isFullScreen ? vue.createVNode("div", {
256
+ "class": [this.ns.b(), {
257
+ [this.ns.b("editor-readonly")]: this.readonlyState
258
+ }, {
259
+ [this.ns.b("editor-enable")]: !this.readonlyState
260
+ }]
261
+ }, [this.renderHeaderToolbar(), this.renderCodeContent(), this.hasEnableEdit && !this.readonlyState ? this.renderFooter() : null]) : vue.createVNode(vue.resolveComponent("el-dialog"), {
262
+ "modelValue": this.isFullScreen,
263
+ "onUpdate:modelValue": ($event) => this.isFullScreen = $event,
264
+ "width": "80%",
265
+ "top": "10vh",
266
+ "class": this.ns.b("dialog-full-screen"),
267
+ "onClose": () => this.changeFullScreenState()
268
+ }, {
269
+ default: () => [vue.createVNode("div", {
270
+ "class": [this.ns.b(), {
271
+ [this.ns.b("editor-readonly")]: this.readonlyState
272
+ }, {
273
+ [this.ns.b("editor-enable")]: !this.readonlyState
274
+ }]
275
+ }, [this.renderHeaderToolbar(), this.renderCodeContent(), this.hasEnableEdit && !this.readonlyState ? this.renderFooter() : null])]
276
+ });
114
277
  }
115
278
  });
116
279
 
@@ -1 +1 @@
1
- .ibiz-code{display:inline-block;width:100%;height:100%;min-height:200px}
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}
@@ -202,9 +202,13 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
202
202
  vue.watch(() => props.value, (newVal, oldVal) => {
203
203
  if (newVal !== oldVal && (typeof props.value === "string" || newVal == null)) {
204
204
  if (newVal == null) {
205
- valueHtml.value = "";
205
+ vue.nextTick(() => {
206
+ valueHtml.value = "";
207
+ });
206
208
  } else {
207
- valueHtml.value = newVal;
209
+ vue.nextTick(() => {
210
+ valueHtml.value = newVal;
211
+ });
208
212
  }
209
213
  }
210
214
  }, {
@@ -44,6 +44,12 @@ const IBizInputNumber = /* @__PURE__ */ vue.defineComponent({
44
44
  }, {
45
45
  immediate: true
46
46
  });
47
+ const currentFormatVal = vue.computed(() => {
48
+ if (currentVal.value || currentVal.value === 0) {
49
+ return props.controller.formatValue(currentVal.value);
50
+ }
51
+ return "";
52
+ });
47
53
  const setEditable = (flag) => {
48
54
  if (flag) {
49
55
  isEditable.value = flag;
@@ -88,7 +94,8 @@ const IBizInputNumber = /* @__PURE__ */ vue.defineComponent({
88
94
  setEditable,
89
95
  showFormDefaultContent,
90
96
  max,
91
- min
97
+ min,
98
+ currentFormatVal
92
99
  };
93
100
  },
94
101
  render() {
@@ -97,7 +104,7 @@ const IBizInputNumber = /* @__PURE__ */ vue.defineComponent({
97
104
  } = this.c.parent;
98
105
  let content = null;
99
106
  if (this.readonly) {
100
- content = qxUtil.isNilOrEmpty(this.currentVal) ? "" : "".concat(this.currentVal);
107
+ content = qxUtil.isNilOrEmpty(this.currentVal) ? "" : "".concat(this.currentFormatVal);
101
108
  if (content && unitName) {
102
109
  content += unitName;
103
110
  }
@@ -122,7 +129,7 @@ const IBizInputNumber = /* @__PURE__ */ vue.defineComponent({
122
129
  }
123
130
  const formDefaultContent = vue.createVNode("div", {
124
131
  "class": this.ns.b("form-default-content")
125
- }, [this.currentVal || this.currentVal === 0 ? this.currentVal : "-"]);
132
+ }, [this.currentVal || this.currentVal === 0 ? this.currentFormatVal : "-"]);
126
133
  return vue.createVNode("div", {
127
134
  "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)]
128
135
  }, [this.showFormDefaultContent && formDefaultContent, content]);
@@ -66,6 +66,12 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
66
66
  }, {
67
67
  immediate: true
68
68
  });
69
+ const currentFormatVal = vue.computed(() => {
70
+ if (currentVal.value) {
71
+ return props.controller.formatValue(currentVal.value);
72
+ }
73
+ return "";
74
+ });
69
75
  const setEditable = (flag) => {
70
76
  if (flag) {
71
77
  isEditable.value = flag;
@@ -218,7 +224,8 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
218
224
  setEditable,
219
225
  showLimit,
220
226
  isAuto,
221
- showFormDefaultContent
227
+ showFormDefaultContent,
228
+ currentFormatVal
222
229
  };
223
230
  },
224
231
  render() {
@@ -278,7 +285,7 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
278
285
  }
279
286
  const formDefaultContent = vue.createVNode("div", {
280
287
  "class": this.ns.b("form-default-content")
281
- }, [this.currentVal ? this.type === "password" ? this.currentVal.split("").map((_item) => "\u2022") : this.currentVal : "-"]);
288
+ }, [this.currentVal ? this.type === "password" ? this.currentVal.split("").map((_item) => "\u2022") : this.currentFormatVal : "-"]);
282
289
  return vue.createVNode("div", {
283
290
  "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)],
284
291
  "style": {
package/lib/ibiz-vue3.cjs CHANGED
@@ -12,6 +12,7 @@ require('./view/index.cjs');
12
12
  var index = require('./locale/index.cjs');
13
13
  var index$3 = require('./view-engine/index.cjs');
14
14
  var _404View = require('./view/404-view/404-view.cjs');
15
+ var _403View = require('./view/403-view/403-view.cjs');
15
16
  var index$4 = require('./view/wf-step-trace-view/index.cjs');
16
17
  var index$5 = require('./view/sub-app-ref-view/index.cjs');
17
18
  var index$6 = require('./control/data-view/index.cjs');
@@ -55,6 +56,7 @@ var IBizVue3 = {
55
56
  ibiz.i18n = index.iBizI18n;
56
57
  ibiz.util.getExcelUtil = () => Promise.resolve().then(function () { return require('./util/xlsx-util/xlsx-util.cjs'); });
57
58
  runtime.registerErrorViewProvider("404", () => ({ component: _404View.View404 }));
59
+ runtime.registerErrorViewProvider("403", () => ({ component: _403View.View403 }));
58
60
  v.use(index$1.IBizCommonComponents);
59
61
  v.use(index$2.IBizPanelComponents);
60
62
  v.use(index$3.IBizViewEngine);
package/lib/index.cjs CHANGED
@@ -102,6 +102,7 @@ var index$10 = require('./panel-component/panel-index-view-search/index.cjs');
102
102
  var index$11 = require('./panel-component/index-actions/index.cjs');
103
103
  var index$12 = require('./panel-component/user-action/index.cjs');
104
104
  var _404View = require('./view/404-view/404-view.cjs');
105
+ var _403View = require('./view/403-view/403-view.cjs');
105
106
  var loginView = require('./view/login-view/login-view.cjs');
106
107
  var index$14 = require('./view/wf-step-trace-view/index.cjs');
107
108
  var index$15 = require('./view/sub-app-ref-view/index.cjs');
@@ -229,6 +230,7 @@ exports.IBizPanelIndexViewSearch = index$10.IBizPanelIndexViewSearch;
229
230
  exports.IBizIndexActions = index$11.IBizIndexActions;
230
231
  exports.IBizUserAction = index$12.IBizUserAction;
231
232
  exports.View404 = _404View.View404;
233
+ exports.View403 = _403View.View403;
232
234
  exports.LoginView = loginView.LoginView;
233
235
  exports.IBizWFStepTraceView = index$14.IBizWFStepTraceView;
234
236
  exports.IBizSubAppRefView = index$15.IBizSubAppRefView;
@@ -16,7 +16,8 @@ var index = {
16
16
  refresh: "Refresh",
17
17
  noSupport: "Not supported currently",
18
18
  add: "Add",
19
- delete: "Delete"
19
+ delete: "Delete",
20
+ save: "Save"
20
21
  },
21
22
  // 视图
22
23
  view: {},
@@ -113,7 +114,14 @@ var index = {
113
114
  }
114
115
  },
115
116
  // 编辑器
116
- editor: {}
117
+ editor: {
118
+ code: {
119
+ readOnlyPrompt: "Currently in read-only mode, not editable",
120
+ confirmCancelPrompt: "Are you sure you want to cancel editing?",
121
+ cancelEditPrompt: "Canceling editing will prevent the modified content from being saved and cannot be retrieved.",
122
+ confirmCancel: "Confirm cancel"
123
+ }
124
+ }
117
125
  };
118
126
 
119
127
  exports.default = index;
@@ -16,7 +16,8 @@ var index = {
16
16
  refresh: "\u5237\u65B0",
17
17
  noSupport: "\u6682\u672A\u652F\u6301",
18
18
  add: "\u6DFB\u52A0",
19
- delete: "\u5220\u9664"
19
+ delete: "\u5220\u9664",
20
+ save: "\u4FDD\u5B58"
20
21
  },
21
22
  // 视图
22
23
  view: {},
@@ -113,7 +114,14 @@ var index = {
113
114
  }
114
115
  },
115
116
  // 编辑器
116
- editor: {}
117
+ editor: {
118
+ code: {
119
+ readOnlyPrompt: "\u5F53\u524D\u4E3A\u53EA\u8BFB\u6A21\u5F0F\uFF0C\u4E0D\u53EF\u7F16\u8F91",
120
+ confirmCancelPrompt: "\u786E\u5B9A\u8981\u53D6\u6D88\u7F16\u8F91\u5417\uFF1F",
121
+ cancelEditPrompt: "\u53D6\u6D88\u7F16\u8F91\u5C06\u65E0\u6CD5\u4FDD\u5B58\u4FEE\u6539\u7684\u5185\u5BB9\uFF0C\u4E14\u4E0D\u80FD\u627E\u56DE\u3002",
122
+ confirmCancel: "\u786E\u8BA4\u53D6\u6D88"
123
+ }
124
+ }
117
125
  };
118
126
 
119
127
  exports.default = index;
@@ -24,7 +24,7 @@ class OpenViewUtil {
24
24
  } else {
25
25
  this.router.push({ path });
26
26
  }
27
- return { ok: true };
27
+ return { ok: false };
28
28
  }
29
29
  async rootByModal(appViewId, context, params) {
30
30
  const appView = await ibiz.hub.config.view.get(appViewId);
@@ -34,8 +34,7 @@ class OpenViewUtil {
34
34
  context,
35
35
  params
36
36
  );
37
- this.router.push({ path });
38
- return { ok: true };
37
+ return this.push(path);
39
38
  }
40
39
  /**
41
40
  * 模态打开视图
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ var vueRouter = require('vue-router');
6
+ require('./403-view.css');
7
+
8
+ "use strict";
9
+ const View403 = /* @__PURE__ */ vue.defineComponent({
10
+ name: "IBizView403",
11
+ setup() {
12
+ const ns = vue3Util.useNamespace("403-view");
13
+ const router = vueRouter.useRouter();
14
+ const route = vueRouter.useRoute();
15
+ const gotoIndexView = async () => {
16
+ await router.push("/");
17
+ window.location.reload();
18
+ };
19
+ vue.onMounted(() => ibiz.util.hiddenAppLoading());
20
+ const isTop = vue.computed(() => {
21
+ return route && !route.params.view1;
22
+ });
23
+ return {
24
+ ns,
25
+ isTop,
26
+ gotoIndexView
27
+ };
28
+ },
29
+ render() {
30
+ return vue.createVNode("div", {
31
+ "class": [this.ns.b(), this.ns.is("top", this.isTop)]
32
+ }, [vue.createVNode("img", {
33
+ "class": this.ns.b("img"),
34
+ "src": "./assets/images/404.png"
35
+ }, null), vue.createVNode("div", {
36
+ "class": this.ns.b("text")
37
+ }, [vue.createVNode("div", {
38
+ "class": this.ns.be("text", "text1")
39
+ }, [vue.createTextVNode("\u62B1\u6B49\uFF0C\u60A8\u6CA1\u6709\u8BBF\u95EE\u8BE5\u9875\u9762\u7684\u6743\u9650")]), this.isTop ? vue.createVNode("div", {
40
+ "class": this.ns.be("text", "text2")
41
+ }, [vue.createTextVNode("\u60A8\u6CA1\u6709\u8BBF\u95EE\u8BE5\u9875\u9762\u7684\u6743\u9650\uFF0C\u8BF7"), vue.createVNode("a", {
42
+ "onClick": this.gotoIndexView
43
+ }, [vue.createTextVNode("\u8FD4\u56DE\u9996\u9875")]), vue.createTextVNode("\u7EE7\u7EED\u6D4F\u89C8")]) : null])]);
44
+ }
45
+ });
46
+
47
+ exports.View403 = View403;
@@ -0,0 +1 @@
1
+ .ibiz-403-view{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px}.ibiz-403-view .ibiz-403-view-text{margin-top:40px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center}.ibiz-403-view-text__text1{margin-bottom:20px}.ibiz-403-view-text__text2 a{color:#557da5;cursor:pointer}.ibiz-403-view.is-top{width:100vw;height:100vh}