@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.
Files changed (91) 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-iqcGVBHE.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 +10 -2
  9. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +25 -3
  10. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +19 -5
  11. package/es/control/dashboard/dashboard-design/dashboard-design.css +1 -1
  12. package/es/control/dashboard/dashboard-design/dashboard-design.mjs +18 -4
  13. package/es/control/dashboard/dashboard.d.ts +0 -1
  14. package/es/control/dashboard/dashboard.mjs +3 -11
  15. package/es/control/dashboard/index.d.ts +0 -1
  16. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +3 -6
  17. package/es/control/drbar/drbar.controller.mjs +2 -1
  18. package/es/control/drtab/drtab.controller.mjs +2 -1
  19. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +4 -0
  20. package/es/control/grid/grid/grid.css +1 -1
  21. package/es/control/grid/grid/grid.d.ts +1 -0
  22. package/es/control/grid/grid/grid.mjs +33 -2
  23. package/es/control/grid/grid/index.d.ts +1 -0
  24. package/es/control/kanban/kanban.css +1 -1
  25. package/es/control/kanban/kanban.mjs +2 -1
  26. package/es/control/toolbar/toolbar.mjs +13 -7
  27. package/es/control/wizard-panel/wizard-panel.mjs +8 -9
  28. package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
  29. package/es/editor/code/monaco-editor/monaco-editor.d.ts +7 -0
  30. package/es/editor/code/monaco-editor/monaco-editor.mjs +179 -16
  31. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +16 -8
  32. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +1 -0
  33. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +10 -3
  34. package/es/editor/text-box/input/input.d.ts +1 -0
  35. package/es/editor/text-box/input/input.mjs +9 -2
  36. package/es/ibiz-vue3.mjs +2 -0
  37. package/es/index.mjs +1 -0
  38. package/es/locale/en/index.d.ts +9 -1
  39. package/es/locale/en/index.mjs +10 -2
  40. package/es/locale/zh-CN/index.d.ts +9 -1
  41. package/es/locale/zh-CN/index.mjs +10 -2
  42. package/es/panel-component/panel-button/panel-button.controller.mjs +2 -0
  43. package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +13 -5
  44. package/es/util/open-view-util/open-view-util.mjs +2 -3
  45. package/es/view/403-view/403-view.css +1 -0
  46. package/es/view/403-view/403-view.d.ts +6 -0
  47. package/es/view/403-view/403-view.mjs +45 -0
  48. package/es/view/404-view/404-view.mjs +2 -2
  49. package/es/view/index.d.ts +1 -0
  50. package/es/view/index.mjs +1 -0
  51. package/es/view-engine/wizard-view-engine.mjs +2 -2
  52. package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +5 -2
  53. package/es/web-app/util/unauthorized-handler/unauthorized-handler.d.ts +1 -1
  54. package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +3 -12
  55. package/lib/common/action-toolbar/action-toolbar.cjs +10 -2
  56. package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +19 -5
  57. package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +18 -4
  58. package/lib/control/dashboard/dashboard-design/dashboard-design.css +1 -1
  59. package/lib/control/dashboard/dashboard.cjs +2 -10
  60. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +3 -6
  61. package/lib/control/drbar/drbar.controller.cjs +2 -1
  62. package/lib/control/drtab/drtab.controller.cjs +2 -1
  63. package/lib/control/grid/grid/grid.cjs +33 -2
  64. package/lib/control/grid/grid/grid.css +1 -1
  65. package/lib/control/kanban/kanban.cjs +2 -1
  66. package/lib/control/kanban/kanban.css +1 -1
  67. package/lib/control/toolbar/toolbar.cjs +13 -7
  68. package/lib/control/wizard-panel/wizard-panel.cjs +8 -9
  69. package/lib/editor/code/monaco-editor/monaco-editor.cjs +178 -15
  70. package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
  71. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +16 -8
  72. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +10 -3
  73. package/lib/editor/text-box/input/input.cjs +9 -2
  74. package/lib/ibiz-vue3.cjs +2 -0
  75. package/lib/index.cjs +2 -0
  76. package/lib/locale/en/index.cjs +10 -2
  77. package/lib/locale/zh-CN/index.cjs +10 -2
  78. package/lib/panel-component/panel-button/panel-button.controller.cjs +2 -0
  79. package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +13 -5
  80. package/lib/util/open-view-util/open-view-util.cjs +2 -3
  81. package/lib/view/403-view/403-view.cjs +47 -0
  82. package/lib/view/403-view/403-view.css +1 -0
  83. package/lib/view/404-view/404-view.cjs +2 -2
  84. package/lib/view/index.cjs +2 -0
  85. package/lib/view-engine/wizard-view-engine.cjs +2 -2
  86. package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +4 -1
  87. package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +3 -12
  88. package/package.json +7 -7
  89. package/dist/index-13Oh42A8.js +0 -1
  90. package/dist/index-QdhEqiEH.js +0 -4
  91. package/dist/index-ZIuDbCjc.js +0 -1
@@ -60,6 +60,10 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
60
60
  const handleClick = async (item, event, params) => {
61
61
  await c.onItemClick(item, event, params);
62
62
  };
63
+ const calcCssName = (item) => {
64
+ var _a2;
65
+ return (_a2 = item == null ? void 0 : item.sysCss) == null ? void 0 : _a2.cssName;
66
+ };
63
67
  const renderExtraButtons = (extraButtons) => {
64
68
  return extraButtons.map((button) => {
65
69
  let _slot;
@@ -82,11 +86,11 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
82
86
  "class": ns.b("submenu"),
83
87
  "index": item.id,
84
88
  "title": item.tooltip,
85
- "popper-class": [ns.b("submenu-popper"), ns.bm("submenu-popper", toolbarStyle)]
89
+ "popper-class": [ns.b("submenu-popper"), ns.bm("submenu-popper", toolbarStyle), ns.bm("submenu-popper", calcCssName(item))]
86
90
  }, {
87
91
  default: () => {
88
92
  return detoolbarItems.map((item2) => {
89
- var _a2;
93
+ var _a2, _b;
90
94
  const actionId = item2.uiactionId;
91
95
  const visible = (_a2 = c.state.buttonsState[item2.id]) == null ? void 0 : _a2.visible;
92
96
  if (!visible) {
@@ -108,9 +112,10 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
108
112
  }
109
113
  if (item2.itemType === "DEUIACTION") {
110
114
  let _slot2;
115
+ const buttonType = (_b = item2.buttonStyle) == null ? void 0 : _b.toLowerCase();
111
116
  if (actionId === "exportexcel") {
112
117
  return vue.createVNode(exportExcel.IBizExportExcel, {
113
- "class": [ns.e("menu-exportexcel")],
118
+ "class": [ns.e("menu-exportexcel"), ns.em("item", buttonType), calcCssName(item2)],
114
119
  "mode": "menu",
115
120
  "item": item2,
116
121
  "btnContent": btnContent,
@@ -122,7 +127,7 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
122
127
  }, null);
123
128
  }
124
129
  return vue.createVNode(vue.resolveComponent("el-menu-item"), {
125
- "class": [ns.is("loading", c.state.buttonsState[item2.id].loading)],
130
+ "class": [ns.is("loading", c.state.buttonsState[item2.id].loading), ns.em("item", buttonType), calcCssName(item2)],
126
131
  "index": "menuitem".concat(item2.id),
127
132
  "disabled": c.state.buttonsState[item2.id].disabled,
128
133
  "title": item2.tooltip,
@@ -144,6 +149,7 @@ const ToolbarControl = /* @__PURE__ */ vue.defineComponent({
144
149
  title: () => {
145
150
  let _slot3;
146
151
  return vue.createVNode(vue.resolveComponent("el-button"), {
152
+ "class": calcCssName(item),
147
153
  "loading": loading
148
154
  }, _isSlot(_slot3 = btnContent(item)) ? _slot3 : {
149
155
  default: () => [_slot3]
@@ -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,
@@ -37,16 +37,15 @@ const WizardPanelControl = /* @__PURE__ */ vue.defineComponent({
37
37
  };
38
38
  },
39
39
  render() {
40
- var _a, _b;
40
+ var _a, _b, _c, _d, _e;
41
41
  const {
42
- activeFormTag
42
+ activeFormTag,
43
+ buttonsState
43
44
  } = this.c.state;
44
45
  let stepsTitle = null;
45
46
  let formComponent = null;
46
47
  let footer = null;
47
48
  if (activeFormTag && this.c.activeWizardForm) {
48
- const wizardForm = this.c.activeWizardForm;
49
- const supportActions = wizardForm.stepActions;
50
49
  if (this.c.providers[activeFormTag]) {
51
50
  const component = vue.resolveComponent(this.c.providers[activeFormTag].component);
52
51
  const editForm = (_a = this.c.model.deeditForms) == null ? void 0 : _a.find((_editForm) => {
@@ -66,22 +65,22 @@ const WizardPanelControl = /* @__PURE__ */ vue.defineComponent({
66
65
  const {
67
66
  dewizard
68
67
  } = this.c.model;
69
- footer = supportActions && dewizard && vue.createVNode("div", {
68
+ footer = dewizard && vue.createVNode("div", {
70
69
  "key": "".concat(activeFormTag, "footer"),
71
70
  "class": this.ns.b("footer")
72
- }, [supportActions.includes("PREV") && vue.createVNode(vue.resolveComponent("el-button"), {
71
+ }, [((_b = buttonsState["".concat(activeFormTag, "@PREV")]) == null ? void 0 : _b.visible) && vue.createVNode(vue.resolveComponent("el-button"), {
73
72
  "onClick": () => {
74
73
  this.c.onPrevClick();
75
74
  }
76
75
  }, {
77
76
  default: () => [dewizard.prevCaption ? dewizard.prevCaption : "\u540E\u9000"]
78
- }), supportActions.includes("NEXT") && vue.createVNode(vue.resolveComponent("el-button"), {
77
+ }), ((_c = buttonsState["".concat(activeFormTag, "@NEXT")]) == null ? void 0 : _c.visible) && vue.createVNode(vue.resolveComponent("el-button"), {
79
78
  "onClick": () => {
80
79
  this.c.onNextClick();
81
80
  }
82
81
  }, {
83
82
  default: () => [dewizard.nextCaption ? dewizard.nextCaption : "\u524D\u8FDB"]
84
- }), supportActions.includes("FINISH") && vue.createVNode(vue.resolveComponent("el-button"), {
83
+ }), ((_d = buttonsState["".concat(activeFormTag, "@FINISH")]) == null ? void 0 : _d.visible) && vue.createVNode(vue.resolveComponent("el-button"), {
85
84
  "onClick": () => {
86
85
  this.c.onFinishClick();
87
86
  }
@@ -93,7 +92,7 @@ const WizardPanelControl = /* @__PURE__ */ vue.defineComponent({
93
92
  } = dewizard;
94
93
  if (this.c.model.showStepBar && dewizardSteps && dewizardSteps.length > 0) {
95
94
  let _slot;
96
- const active = this.c.steps.indexOf(this.c.stepTags["".concat(this.c.model.name, "_form_").concat((_b = this.c.state.activeFormTag) == null ? void 0 : _b.toLowerCase())]) + 1;
95
+ 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;
97
96
  stepsTitle = vue.createVNode(vue.resolveComponent("el-steps"), {
98
97
  "class": this.ns.b("header"),
99
98
  "align-center": true,
@@ -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}
@@ -28,6 +28,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
28
28
  const isLoading = vue.ref(false);
29
29
  let editorState = "";
30
30
  let funcs;
31
+ const codeItemValueNumber = vue.ref(false);
31
32
  const showFormDefaultContent = vue.computed(() => {
32
33
  if (props.controlParams && props.controlParams.editmode === "hover" && !props.readonly) {
33
34
  return true;
@@ -66,6 +67,13 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
66
67
  return list;
67
68
  };
68
69
  const loadCodeList = async () => {
70
+ if (c.model.appCodeListId) {
71
+ const app = ibiz.hub.getApp(c.context.srfappid);
72
+ const codeListModel = app.codeList.getCodeList(c.model.appCodeListId);
73
+ if (codeListModel) {
74
+ codeItemValueNumber.value = codeListModel.codeItemValueNumber || false;
75
+ }
76
+ }
69
77
  isLoading.value = true;
70
78
  const codeList = await c.loadCodeList(props.data);
71
79
  isLoadedCodeList.value = true;
@@ -104,20 +112,20 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
104
112
  };
105
113
  const curValue = vue.computed({
106
114
  get() {
107
- var _a, _b;
115
+ var _a, _b, _c;
108
116
  if (!isLoadedCodeList.value) {
109
117
  return c.multiple ? [] : "";
110
118
  }
111
119
  if (editorItems && editorItems.length > 0 && !c.multiple) {
112
- return props.data[editorItems[0].id];
120
+ return (_a = props.data[editorItems[0].id]) == null ? void 0 : _a.toString();
113
121
  }
114
122
  if (props.value && typeof props.value === "string") {
115
- return c.multiple ? (_a = props.value) == null ? void 0 : _a.toString().split(",") : props.value.toString();
123
+ return c.multiple ? (_b = props.value) == null ? void 0 : _b.toString().split(",") : props.value.toString();
116
124
  }
117
125
  if (props.value && Array.isArray(props.value)) {
118
126
  return c.multiple ? props.value : props.value.toString();
119
127
  }
120
- return (_b = props.value) == null ? void 0 : _b.toString();
128
+ return (_c = props.value) == null ? void 0 : _c.toString();
121
129
  },
122
130
  set(select) {
123
131
  if (Array.isArray(select)) {
@@ -131,13 +139,13 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
131
139
  }
132
140
  emit("change", selectArr);
133
141
  } else if (editorItems && editorItems.length > 0) {
134
- emit("change", select, editorItems[0].id);
135
- const selectItem = getCodeListItemByValue(select);
142
+ emit("change", codeItemValueNumber.value ? Number(select) : select, editorItems[0].id);
143
+ const selectItem = getCodeListItemByValue(codeItemValueNumber.value ? Number(select) : select);
136
144
  if (selectItem) {
137
145
  emit("change", selectItem.text);
138
146
  }
139
147
  } else {
140
- emit("change", select);
148
+ emit("change", codeItemValueNumber.value ? Number(select) : select);
141
149
  }
142
150
  setEditable(false);
143
151
  }
@@ -148,7 +156,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
148
156
  const textArr = [];
149
157
  valueArr.forEach((item) => {
150
158
  list.forEach((codeItem) => {
151
- if (codeItem.value === item) {
159
+ if (codeItemValueNumber.value ? codeItem.value === Number(item) : codeItem.value === item) {
152
160
  textArr.push(codeItem.text);
153
161
  }
154
162
  });
@@ -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;
@@ -99,6 +99,8 @@ class PanelButtonController extends runtime.PanelItemController {
99
99
  if (actionType === "NONE") {
100
100
  return;
101
101
  }
102
+ event.stopPropagation();
103
+ event.preventDefault();
102
104
  await runtime.UIActionUtil.execAndResolved(
103
105
  uiactionId,
104
106
  {
@@ -38,10 +38,18 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
38
38
  if ((_a = model.rawItem) == null ? void 0 : _a.rawItemParams) {
39
39
  let swipeData = [];
40
40
  const imgData = model.rawItem.rawItemParams;
41
- const configItem = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
42
- if (configItem > -1) {
43
- swipeData = imgData.slice(0, -2);
44
- getSwipeConfig(imgData.slice(-2));
41
+ const autoplayIndex = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
42
+ const timespanIndex = imgData.findIndex((item) => Object.is(item.key, "timespan"));
43
+ let number = 0;
44
+ if (autoplayIndex >= 0) {
45
+ number += 1;
46
+ }
47
+ if (timespanIndex >= 0) {
48
+ number += 1;
49
+ }
50
+ if (number > 0) {
51
+ swipeData = imgData.slice(0, -number);
52
+ getSwipeConfig(imgData.slice(-number));
45
53
  } else {
46
54
  swipeData = imgData;
47
55
  getSwipeConfig(imgData);
@@ -55,7 +63,7 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
55
63
  return {
56
64
  id,
57
65
  name: key,
58
- imgUrl: sysImage == null ? void 0 : sysImage.imagePath,
66
+ imgUrl: (sysImage == null ? void 0 : sysImage.imagePath) || (sysImage == null ? void 0 : sysImage.rawContent),
59
67
  cssClass: sysImage == null ? void 0 : sysImage.cssClass,
60
68
  linkPath: item.linkPath
61
69
  };