@ibiz-template/vue3-components 0.7.13 → 0.7.15

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 (70) hide show
  1. package/dist/{index-WP6TUdg-.js → index-8Lu2Ax-_.js} +1 -1
  2. package/dist/{index-kgWpXafW.js → index-Hg_8xCYx.js} +1 -1
  3. package/dist/index-vUHyK4p8.js +4 -0
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/{wang-editor-PQvDXaA9.js → wang-editor-XpJH4SXt.js} +1 -1
  7. package/dist/{xlsx-util-8i01yifN.js → xlsx-util-5nNxB32e.js} +1 -1
  8. package/es/common/carousel/carousel.d.ts +9 -1
  9. package/es/common/carousel/carousel.mjs +9 -1
  10. package/es/common/carousel-card/carousel-card.css +1 -0
  11. package/es/common/carousel-card/carousel-card.d.ts +41 -0
  12. package/es/common/carousel-card/carousel-card.mjs +218 -0
  13. package/es/common/index.mjs +2 -0
  14. package/es/control/context-menu/context-menu.mjs +25 -6
  15. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +76 -1
  16. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +74 -0
  17. package/es/control/search-bar/filter-tree/filter-tree.mjs +19 -20
  18. package/es/control/toolbar/toolbar.mjs +27 -2
  19. package/es/control/tree/tree.css +1 -1
  20. package/es/control/tree/tree.mjs +2 -1
  21. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  22. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +11 -12
  23. package/es/editor/html/wang-editor/wang-editor.css +1 -1
  24. package/es/editor/html/wang-editor/wang-editor.mjs +2 -2
  25. package/es/editor/text-box/input/input.css +1 -1
  26. package/es/locale/en/index.d.ts +1 -0
  27. package/es/locale/en/index.mjs +2 -1
  28. package/es/locale/zh-CN/index.d.ts +1 -0
  29. package/es/locale/zh-CN/index.mjs +2 -1
  30. package/es/panel-component/auth-captcha/auth-captcha.controller.d.ts +13 -0
  31. package/es/panel-component/auth-captcha/auth-captcha.controller.mjs +15 -11
  32. package/es/panel-component/panel-button/panel-button.controller.d.ts +1 -1
  33. package/es/panel-component/panel-button/panel-button.controller.mjs +6 -9
  34. package/es/panel-component/panel-static-carousel/index.d.ts +1 -0
  35. package/es/panel-component/panel-static-carousel/panel-static-carousel.css +1 -0
  36. package/es/panel-component/panel-static-carousel/panel-static-carousel.d.ts +1 -0
  37. package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +13 -2
  38. package/es/panel-component/short-cut/index.d.ts +2 -2
  39. package/es/panel-component/short-cut/short-cut.css +1 -1
  40. package/es/panel-component/short-cut/short-cut.d.ts +2 -2
  41. package/es/panel-component/short-cut/short-cut.mjs +42 -36
  42. package/es/view-engine/login-view.engine.d.ts +31 -3
  43. package/es/view-engine/login-view.engine.mjs +32 -12
  44. package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +19 -5
  45. package/lib/common/carousel/carousel.cjs +9 -1
  46. package/lib/common/carousel-card/carousel-card.cjs +220 -0
  47. package/lib/common/carousel-card/carousel-card.css +1 -0
  48. package/lib/common/index.cjs +2 -0
  49. package/lib/control/context-menu/context-menu.cjs +25 -6
  50. package/lib/control/search-bar/filter-tree/filter-tree.cjs +19 -20
  51. package/lib/control/toolbar/toolbar.cjs +26 -1
  52. package/lib/control/tree/tree.cjs +2 -1
  53. package/lib/control/tree/tree.css +1 -1
  54. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +11 -12
  55. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  56. package/lib/editor/html/wang-editor/wang-editor.cjs +2 -2
  57. package/lib/editor/html/wang-editor/wang-editor.css +1 -1
  58. package/lib/editor/text-box/input/input.css +1 -1
  59. package/lib/locale/en/index.cjs +2 -1
  60. package/lib/locale/zh-CN/index.cjs +2 -1
  61. package/lib/panel-component/auth-captcha/auth-captcha.controller.cjs +15 -11
  62. package/lib/panel-component/panel-button/panel-button.controller.cjs +6 -9
  63. package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +13 -2
  64. package/lib/panel-component/panel-static-carousel/panel-static-carousel.css +1 -0
  65. package/lib/panel-component/short-cut/short-cut.cjs +42 -36
  66. package/lib/panel-component/short-cut/short-cut.css +1 -1
  67. package/lib/view-engine/login-view.engine.cjs +32 -12
  68. package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +17 -3
  69. package/package.json +7 -7
  70. package/dist/index-5IjaPupj.js +0 -4
@@ -14,14 +14,21 @@ var __publicField = (obj, key, value) => {
14
14
  class LoginViewEngine extends runtime.ViewEngineBase {
15
15
  constructor() {
16
16
  super(...arguments);
17
+ /**
18
+ * 路由对象
19
+ *
20
+ * @type {RouteLocationNormalizedLoaded}
21
+ * @memberof LoginViewEngine
22
+ */
17
23
  __publicField(this, "route", vueRouter.useRoute());
18
24
  __publicField(this, "enterKeyListener", async (event) => {
19
- if (event.key === "Enter" && this.AppLoginView.layoutPanel) {
25
+ if (event.key === "Enter" && this.view.layoutPanel) {
20
26
  const args = {
21
27
  data: [
22
28
  {
23
- username: this.AppLoginView.layoutPanel.data.username,
24
- password: this.AppLoginView.layoutPanel.data.password
29
+ username: this.view.layoutPanel.data.username,
30
+ password: this.view.layoutPanel.data.password,
31
+ captcha: this.view.layoutPanel.data.captcha
25
32
  }
26
33
  ]
27
34
  };
@@ -29,13 +36,22 @@ class LoginViewEngine extends runtime.ViewEngineBase {
29
36
  }
30
37
  });
31
38
  }
32
- get AppLoginView() {
33
- return this.view.getController("AppLoginView");
34
- }
39
+ /**
40
+ * 视图mounted生命周期执行逻辑
41
+ *
42
+ * @return {*} {Promise<void>}
43
+ * @memberof LoginViewEngine
44
+ */
35
45
  async onMounted() {
36
46
  super.onMounted();
37
47
  document.addEventListener("keydown", this.enterKeyListener);
38
48
  }
49
+ /**
50
+ * 视图destroyed生命周期执行逻辑
51
+ *
52
+ * @return {*} {Promise<void>}
53
+ * @memberof LoginViewEngine
54
+ */
39
55
  async onDestroyed() {
40
56
  super.onDestroyed();
41
57
  document.removeEventListener("keydown", this.enterKeyListener);
@@ -53,8 +69,12 @@ class LoginViewEngine extends runtime.ViewEngineBase {
53
69
  let rememberme;
54
70
  const headers = {};
55
71
  const data = args.data[0] || {};
56
- if (this.AppLoginView.layoutPanel) {
57
- const panelData = this.AppLoginView.layoutPanel.data;
72
+ const panelDataParent = args.params.panelDataParent;
73
+ if (this.view.layoutPanel) {
74
+ if (!await this.view.layoutPanel.validate(panelDataParent)) {
75
+ return;
76
+ }
77
+ const panelData = this.view.layoutPanel.data;
58
78
  if (typeof panelData.isRemember === "boolean") {
59
79
  rememberme = panelData.isRemember;
60
80
  }
@@ -75,16 +95,16 @@ class LoginViewEngine extends runtime.ViewEngineBase {
75
95
  rememberme,
76
96
  headers
77
97
  );
78
- this.view.hooks.afterLogin.call({ ok: bol });
98
+ this.view.evt.emit("onAfterLogin", { ok: bol, panelDataParent });
79
99
  if (bol === true) {
80
100
  window.location.hash = this.route.query.ru || "/";
81
101
  window.location.reload();
82
102
  }
83
103
  }
84
104
  async cancelChanges() {
85
- if (this.AppLoginView.layoutPanel) {
86
- Object.keys(this.AppLoginView.layoutPanel.panelItems).forEach((key) => {
87
- const controller = this.AppLoginView.layoutPanel.panelItems[key];
105
+ if (this.view.layoutPanel) {
106
+ Object.keys(this.view.layoutPanel.panelItems).forEach((key) => {
107
+ const controller = this.view.layoutPanel.panelItems[key];
88
108
  const { viewFieldName } = controller.model;
89
109
  if (viewFieldName) {
90
110
  controller.setDataValue("", viewFieldName);
@@ -20,10 +20,11 @@ const ModalRouterShell = /* @__PURE__ */ vue.defineComponent({
20
20
  }
21
21
  },
22
22
  setup(props) {
23
- const route = vueRouter.useRoute();
23
+ const routeObj = vueRouter.useRoute();
24
24
  const router = vueRouter.useRouter();
25
25
  const isDestroyed = vue.ref(false);
26
26
  const viewData = vue.ref({});
27
+ const pathHistory = [];
27
28
  const destroyContext = () => {
28
29
  if (viewData.value.context) {
29
30
  const {
@@ -43,9 +44,12 @@ const ModalRouterShell = /* @__PURE__ */ vue.defineComponent({
43
44
  }
44
45
  destroyContext();
45
46
  });
46
- const openView = async () => {
47
+ const openView = async (route) => {
47
48
  var _a;
48
49
  viewData.value = await vue3Util.parseRouteViewData(route, routeDepth, true);
50
+ if (isDestroyed.value) {
51
+ return;
52
+ }
49
53
  if (!(viewData.value.context instanceof core.IBizContext)) {
50
54
  viewData.value.context = core.IBizContext.create(viewData.value.context);
51
55
  }
@@ -99,6 +103,7 @@ const ModalRouterShell = /* @__PURE__ */ vue.defineComponent({
99
103
  };
100
104
  overlay = ibiz.overlay.createModal(component, void 0, opts);
101
105
  overlay.present();
106
+ pathHistory.push(route.fullPath);
102
107
  const result = await overlay.onWillDismiss();
103
108
  overlay = null;
104
109
  if (isDestroyed.value === false) {
@@ -114,7 +119,16 @@ const ModalRouterShell = /* @__PURE__ */ vue.defineComponent({
114
119
  });
115
120
  }
116
121
  };
117
- openView();
122
+ vueRouter.onBeforeRouteUpdate((to, from) => {
123
+ if (!isDestroyed.value && pathHistory.length > 0 && pathHistory.indexOf(from.fullPath) !== -1 && pathHistory.indexOf(to.fullPath) === -1) {
124
+ const pathNodes = vue3Util.route2routePath(to).pathNodes;
125
+ const lastNode = pathNodes[pathNodes.length - 1];
126
+ if (lastNode && lastNode.viewName === runtime.RouteConst.ROUTE_MODAL_TAG) {
127
+ openView(to);
128
+ }
129
+ }
130
+ });
131
+ openView(routeObj);
118
132
  return {};
119
133
  },
120
134
  render() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.13",
3
+ "version": "0.7.15",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -32,12 +32,12 @@
32
32
  "@ibiz-template-plugin/gantt": "0.1.4",
33
33
  "@ibiz-template/core": "0.7.7-dev.0",
34
34
  "@ibiz-template/devtool": "0.0.1-dev.6",
35
- "@ibiz-template/model-helper": "0.7.13",
36
- "@ibiz-template/runtime": "0.7.13",
35
+ "@ibiz-template/model-helper": "0.7.15",
36
+ "@ibiz-template/runtime": "0.7.15",
37
37
  "@ibiz-template/theme": "^0.7.0",
38
- "@ibiz-template/vue3-util": "0.7.13",
39
- "@ibiz-template/web-theme": "^1.1.16",
40
- "@ibiz/model-core": "^0.1.25",
38
+ "@ibiz-template/vue3-util": "0.7.15",
39
+ "@ibiz-template/web-theme": "^1.1.17",
40
+ "@ibiz/model-core": "^0.1.27",
41
41
  "@imengyu/vue3-context-menu": "^1.3.5",
42
42
  "@monaco-editor/loader": "^1.4.0",
43
43
  "@wangeditor/editor": "^5.1.23",
@@ -101,7 +101,7 @@
101
101
  "@ibiz-template/runtime": "^0.7.0",
102
102
  "@ibiz-template/theme": "^0.7.0",
103
103
  "@ibiz-template/vue3-util": "^0.7.0",
104
- "@ibiz/model-core": "^0.1.25",
104
+ "@ibiz/model-core": "^0.1.27",
105
105
  "@imengyu/vue3-context-menu": "^1.3.3",
106
106
  "@monaco-editor/loader": "^1.3.3",
107
107
  "@wangeditor/editor": "^5.1.23",