@ibiz-template/vue3-components 0.7.6 → 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.
Files changed (54) hide show
  1. package/dist/index-FAFZUJRc.js +4 -0
  2. package/dist/index-Rqr5SnvQ.js +1 -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/{xlsx-util-QjtIWX97.js → xlsx-util-2bS-pf2I.js} +1 -1
  7. package/es/common/action-toolbar/action-toolbar.d.ts +1 -0
  8. package/es/common/action-toolbar/action-toolbar.mjs +9 -1
  9. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +4 -0
  10. package/es/control/toolbar/toolbar.mjs +13 -7
  11. package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
  12. package/es/editor/code/monaco-editor/monaco-editor.d.ts +7 -0
  13. package/es/editor/code/monaco-editor/monaco-editor.mjs +179 -16
  14. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +1 -0
  15. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +10 -3
  16. package/es/editor/text-box/input/input.d.ts +1 -0
  17. package/es/editor/text-box/input/input.mjs +9 -2
  18. package/es/ibiz-vue3.mjs +2 -0
  19. package/es/index.mjs +1 -0
  20. package/es/locale/en/index.d.ts +9 -1
  21. package/es/locale/en/index.mjs +10 -2
  22. package/es/locale/zh-CN/index.d.ts +9 -1
  23. package/es/locale/zh-CN/index.mjs +10 -2
  24. package/es/util/open-view-util/open-view-util.mjs +2 -3
  25. package/es/view/403-view/403-view.css +1 -0
  26. package/es/view/403-view/403-view.d.ts +6 -0
  27. package/es/view/403-view/403-view.mjs +45 -0
  28. package/es/view/404-view/404-view.mjs +2 -2
  29. package/es/view/index.d.ts +1 -0
  30. package/es/view/index.mjs +1 -0
  31. package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +5 -2
  32. package/es/web-app/util/unauthorized-handler/unauthorized-handler.d.ts +1 -1
  33. package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +3 -12
  34. package/lib/common/action-toolbar/action-toolbar.cjs +9 -1
  35. package/lib/control/toolbar/toolbar.cjs +13 -7
  36. package/lib/editor/code/monaco-editor/monaco-editor.cjs +178 -15
  37. package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
  38. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +10 -3
  39. package/lib/editor/text-box/input/input.cjs +9 -2
  40. package/lib/ibiz-vue3.cjs +2 -0
  41. package/lib/index.cjs +2 -0
  42. package/lib/locale/en/index.cjs +10 -2
  43. package/lib/locale/zh-CN/index.cjs +10 -2
  44. package/lib/util/open-view-util/open-view-util.cjs +2 -3
  45. package/lib/view/403-view/403-view.cjs +47 -0
  46. package/lib/view/403-view/403-view.css +1 -0
  47. package/lib/view/404-view/404-view.cjs +2 -2
  48. package/lib/view/index.cjs +2 -0
  49. package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +4 -1
  50. package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +3 -12
  51. package/package.json +7 -7
  52. package/dist/index-13Oh42A8.js +0 -1
  53. package/dist/index-ZIuDbCjc.js +0 -1
  54. package/dist/index-rHXmoO9Y.js +0 -4
@@ -39,6 +39,7 @@ export declare const IBizActionToolbar: import("vue").DefineComponent<{
39
39
  };
40
40
  }, {
41
41
  ns: import("@ibiz-template/core").Namespace;
42
+ dropdownRef: Ref<any>;
42
43
  popoverIndex: number;
43
44
  expandDetails: Ref<IAppDEUIActionGroupDetail[]>;
44
45
  groupDetails: Ref<IAppDEUIActionGroupDetail[]>;
@@ -37,6 +37,8 @@ const IBizActionToolbar = /* @__PURE__ */ defineComponent({
37
37
  emit
38
38
  }) {
39
39
  const ns = useNamespace("action-toolbar");
40
+ const dropdownRef = ref();
41
+ const popoverVisible = ref(false);
40
42
  props.actionDetails.forEach((detail) => {
41
43
  if (detail.capLanguageRes && detail.capLanguageRes.lanResTag) {
42
44
  detail.caption = ibiz.i18n.t(detail.capLanguageRes.lanResTag, detail.caption);
@@ -47,6 +49,11 @@ const IBizActionToolbar = /* @__PURE__ */ defineComponent({
47
49
  });
48
50
  const handleClick = async (detail, e) => {
49
51
  e.stopPropagation();
52
+ if (props.mode === "buttons") {
53
+ popoverVisible.value = false;
54
+ } else if (dropdownRef.value) {
55
+ dropdownRef.value.handleClose();
56
+ }
50
57
  emit("action-click", detail, e);
51
58
  };
52
59
  const expandDetails = ref([]);
@@ -61,7 +68,6 @@ const IBizActionToolbar = /* @__PURE__ */ defineComponent({
61
68
  });
62
69
  }
63
70
  const groupButtonRef = ref();
64
- const popoverVisible = ref(false);
65
71
  const calcActionItemClass = (item) => {
66
72
  const {
67
73
  actionLevel
@@ -71,6 +77,7 @@ const IBizActionToolbar = /* @__PURE__ */ defineComponent({
71
77
  const popoverIndex = props.zIndex;
72
78
  return {
73
79
  ns,
80
+ dropdownRef,
74
81
  popoverIndex,
75
82
  expandDetails,
76
83
  groupDetails,
@@ -142,6 +149,7 @@ const IBizActionToolbar = /* @__PURE__ */ defineComponent({
142
149
  })]]);
143
150
  }
144
151
  return createVNode(resolveComponent("el-dropdown"), {
152
+ "ref": "dropdownRef",
145
153
  "onCommand": (command) => this.handleClick(command, new MouseEvent("click")),
146
154
  "class": [this.ns.b(), this.ns.m("dropdown")]
147
155
  }, {
@@ -72,6 +72,7 @@ export declare const RepeaterGrid: import("vue").DefineComponent<{
72
72
  };
73
73
  dismiss: (data?: import("@ibiz-template/runtime").IModalData | undefined) => Promise<boolean>;
74
74
  };
75
+ error: IData;
75
76
  slotProps: {
76
77
  [key: string]: IData;
77
78
  };
@@ -3099,6 +3100,7 @@ export declare const RepeaterGrid: import("vue").DefineComponent<{
3099
3100
  readonly id: string;
3100
3101
  state: {
3101
3102
  activated: boolean;
3103
+ hasError: boolean;
3102
3104
  caption: string;
3103
3105
  isLoading: boolean;
3104
3106
  noLoadDefault: boolean;
@@ -7244,6 +7246,7 @@ export declare const RepeaterGrid: import("vue").DefineComponent<{
7244
7246
  };
7245
7247
  dismiss: (data?: import("@ibiz-template/runtime").IModalData | undefined) => Promise<boolean>;
7246
7248
  };
7249
+ error: IData;
7247
7250
  slotProps: {
7248
7251
  [key: string]: IData;
7249
7252
  };
@@ -7274,6 +7277,7 @@ export declare const RepeaterGrid: import("vue").DefineComponent<{
7274
7277
  readonly id: string;
7275
7278
  state: {
7276
7279
  activated: boolean;
7280
+ hasError: boolean;
7277
7281
  caption: string;
7278
7282
  isLoading: boolean;
7279
7283
  noLoadDefault: boolean;
@@ -58,6 +58,10 @@ const ToolbarControl = /* @__PURE__ */ defineComponent({
58
58
  const handleClick = async (item, event, params) => {
59
59
  await c.onItemClick(item, event, params);
60
60
  };
61
+ const calcCssName = (item) => {
62
+ var _a2;
63
+ return (_a2 = item == null ? void 0 : item.sysCss) == null ? void 0 : _a2.cssName;
64
+ };
61
65
  const renderExtraButtons = (extraButtons) => {
62
66
  return extraButtons.map((button) => {
63
67
  let _slot;
@@ -80,11 +84,11 @@ const ToolbarControl = /* @__PURE__ */ defineComponent({
80
84
  "class": ns.b("submenu"),
81
85
  "index": item.id,
82
86
  "title": item.tooltip,
83
- "popper-class": [ns.b("submenu-popper"), ns.bm("submenu-popper", toolbarStyle)]
87
+ "popper-class": [ns.b("submenu-popper"), ns.bm("submenu-popper", toolbarStyle), ns.bm("submenu-popper", calcCssName(item))]
84
88
  }, {
85
89
  default: () => {
86
90
  return detoolbarItems.map((item2) => {
87
- var _a2;
91
+ var _a2, _b;
88
92
  const actionId = item2.uiactionId;
89
93
  const visible = (_a2 = c.state.buttonsState[item2.id]) == null ? void 0 : _a2.visible;
90
94
  if (!visible) {
@@ -106,9 +110,10 @@ const ToolbarControl = /* @__PURE__ */ defineComponent({
106
110
  }
107
111
  if (item2.itemType === "DEUIACTION") {
108
112
  let _slot2;
113
+ const buttonType = (_b = item2.buttonStyle) == null ? void 0 : _b.toLowerCase();
109
114
  if (actionId === "exportexcel") {
110
115
  return createVNode(IBizExportExcel, {
111
- "class": [ns.e("menu-exportexcel")],
116
+ "class": [ns.e("menu-exportexcel"), ns.em("item", buttonType), calcCssName(item2)],
112
117
  "mode": "menu",
113
118
  "item": item2,
114
119
  "btnContent": btnContent,
@@ -120,7 +125,7 @@ const ToolbarControl = /* @__PURE__ */ defineComponent({
120
125
  }, null);
121
126
  }
122
127
  return createVNode(resolveComponent("el-menu-item"), {
123
- "class": [ns.is("loading", c.state.buttonsState[item2.id].loading)],
128
+ "class": [ns.is("loading", c.state.buttonsState[item2.id].loading), ns.em("item", buttonType), calcCssName(item2)],
124
129
  "index": "menuitem".concat(item2.id),
125
130
  "disabled": c.state.buttonsState[item2.id].disabled,
126
131
  "title": item2.tooltip,
@@ -142,6 +147,7 @@ const ToolbarControl = /* @__PURE__ */ defineComponent({
142
147
  title: () => {
143
148
  let _slot3;
144
149
  return createVNode(resolveComponent("el-button"), {
150
+ "class": calcCssName(item),
145
151
  "loading": loading
146
152
  }, _isSlot(_slot3 = btnContent(item)) ? _slot3 : {
147
153
  default: () => [_slot3]
@@ -173,9 +179,10 @@ const ToolbarControl = /* @__PURE__ */ defineComponent({
173
179
  if (item.itemType === "DEUIACTION") {
174
180
  let _slot4;
175
181
  const actionId = item.uiactionId;
182
+ const buttonType = (_b = item.buttonStyle) == null ? void 0 : _b.toLowerCase();
176
183
  if (actionId === "exportexcel") {
177
184
  return createVNode(IBizExportExcel, {
178
- "class": [ns.e("item"), ns.e("item-deuiaction")],
185
+ "class": [ns.e("item"), ns.e("item-deuiaction"), ns.em("item", buttonType), calcCssName(item)],
179
186
  "item": item,
180
187
  "btnContent": btnContent,
181
188
  "size": btnSize.value,
@@ -185,10 +192,9 @@ const ToolbarControl = /* @__PURE__ */ defineComponent({
185
192
  }
186
193
  }, null);
187
194
  }
188
- const buttonType = (_b = item.buttonStyle) == null ? void 0 : _b.toLowerCase();
189
195
  return createVNode("div", {
190
196
  "key": itemId,
191
- "class": [ns.e("item"), ns.e("item-deuiaction"), ns.em("item", buttonType), ns.is("loading", c.state.buttonsState[itemId].loading)]
197
+ "class": [ns.e("item"), ns.e("item-deuiaction"), ns.em("item", buttonType), calcCssName(item), ns.is("loading", c.state.buttonsState[itemId].loading)]
192
198
  }, [createVNode(resolveComponent("el-button"), {
193
199
  "title": item.tooltip,
194
200
  "size": btnSize.value,
@@ -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}
@@ -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, createVNode, defineComponent } from 'vue';
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
- watch(() => props.readonly, (newVal) => {
37
- if (editor) {
38
- editor.updateOptions({
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: "\u5F53\u524D\u4E3A\u53EA\u8BFB\u6A21\u5F0F\uFF0C\u4E0D\u53EF\u7F16\u8F91"
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
- currentVal.value = editor.getValue();
87
- emit("change", currentVal.value);
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
- "ref": "codeEditBox",
110
- "class": this.ns.b()
111
- }, null);
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
 
@@ -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.currentVal);
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.currentVal : "-"]);
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.currentVal : "-"]);
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';
@@ -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: "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 };
@@ -22,7 +22,7 @@ class OpenViewUtil {
22
22
  } else {
23
23
  this.router.push({ path });
24
24
  }
25
- return { ok: true };
25
+ return { ok: false };
26
26
  }
27
27
  async rootByModal(appViewId, context, params) {
28
28
  const appView = await ibiz.hub.config.view.get(appViewId);
@@ -32,8 +32,7 @@ class OpenViewUtil {
32
32
  context,
33
33
  params
34
34
  );
35
- this.router.push({ path });
36
- return { ok: true };
35
+ return this.push(path);
37
36
  }
38
37
  /**
39
38
  * 模态打开视图