@ibiz-template/vue3-components 0.7.13-alpha.0 → 0.7.14

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 (95) hide show
  1. package/dist/{index-WP6TUdg-.js → index-8Lu2Ax-_.js} +1 -1
  2. package/dist/index-8tvyarHw.js +4 -0
  3. package/dist/{index-kgWpXafW.js → index-Hg_8xCYx.js} +1 -1
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/{xlsx-util-OSsMvylt.js → xlsx-util-OfvrEAre.js} +1 -1
  7. package/es/common/carousel/carousel.d.ts +8 -0
  8. package/es/common/carousel/carousel.mjs +9 -1
  9. package/es/common/carousel-card/carousel-card.css +1 -0
  10. package/es/common/carousel-card/carousel-card.d.ts +41 -0
  11. package/es/common/carousel-card/carousel-card.mjs +218 -0
  12. package/es/common/index.mjs +2 -0
  13. package/es/control/app-menu/app-menu.mjs +1 -1
  14. package/es/control/context-menu/context-menu.css +1 -1
  15. package/es/control/context-menu/context-menu.d.ts +1 -0
  16. package/es/control/context-menu/context-menu.mjs +64 -7
  17. package/es/control/context-menu/index.d.ts +1 -0
  18. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +76 -1
  19. package/es/control/form/form/form.css +1 -1
  20. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +74 -0
  21. package/es/control/form/form-detail/form-page/form-page.css +1 -1
  22. package/es/control/form/form-detail/form-page/form-page.d.ts +1 -0
  23. package/es/control/form/form-detail/form-page/form-page.mjs +10 -4
  24. package/es/control/form/form-detail/form-page/index.d.ts +1 -0
  25. package/es/control/search-bar/filter-tree/filter-tree.mjs +19 -20
  26. package/es/control/toolbar/short-cut-button/short-cut-button.css +0 -0
  27. package/es/control/toolbar/short-cut-button/short-cut-button.d.ts +48 -0
  28. package/es/control/toolbar/short-cut-button/short-cut-button.mjs +71 -0
  29. package/es/control/toolbar/toolbar.mjs +38 -2
  30. package/es/control/tree/tree.css +1 -1
  31. package/es/control/tree/tree.mjs +2 -1
  32. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  33. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +1 -0
  34. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +25 -13
  35. package/es/index.mjs +1 -0
  36. package/es/locale/en/index.d.ts +1 -0
  37. package/es/locale/en/index.mjs +2 -1
  38. package/es/locale/zh-CN/index.d.ts +1 -0
  39. package/es/locale/zh-CN/index.mjs +2 -1
  40. package/es/panel-component/auth-captcha/auth-captcha.controller.d.ts +13 -0
  41. package/es/panel-component/auth-captcha/auth-captcha.controller.mjs +15 -11
  42. package/es/panel-component/auth-userinfo/auth-userinfo.d.ts +1 -1
  43. package/es/panel-component/auth-userinfo/auth-userinfo.mjs +2 -7
  44. package/es/panel-component/auth-userinfo/index.d.ts +1 -1
  45. package/es/panel-component/panel-button/panel-button.controller.d.ts +1 -1
  46. package/es/panel-component/panel-button/panel-button.controller.mjs +6 -9
  47. package/es/panel-component/panel-static-carousel/index.d.ts +1 -0
  48. package/es/panel-component/panel-static-carousel/panel-static-carousel.d.ts +1 -0
  49. package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +13 -2
  50. package/es/panel-component/short-cut/index.d.ts +21 -4
  51. package/es/panel-component/short-cut/short-cut.css +1 -1
  52. package/es/panel-component/short-cut/short-cut.d.ts +21 -4
  53. package/es/panel-component/short-cut/short-cut.mjs +62 -42
  54. package/es/util/app-util/app-util.d.ts +90 -0
  55. package/es/util/app-util/app-util.mjs +152 -0
  56. package/es/util/index.d.ts +1 -0
  57. package/es/util/index.mjs +1 -0
  58. package/es/view-engine/login-view.engine.d.ts +31 -3
  59. package/es/view-engine/login-view.engine.mjs +32 -12
  60. package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +19 -5
  61. package/es/web-app/main.mjs +2 -0
  62. package/lib/common/carousel/carousel.cjs +9 -1
  63. package/lib/common/carousel-card/carousel-card.cjs +220 -0
  64. package/lib/common/carousel-card/carousel-card.css +1 -0
  65. package/lib/common/index.cjs +2 -0
  66. package/lib/control/app-menu/app-menu.cjs +1 -1
  67. package/lib/control/context-menu/context-menu.cjs +63 -6
  68. package/lib/control/context-menu/context-menu.css +1 -1
  69. package/lib/control/form/form/form.css +1 -1
  70. package/lib/control/form/form-detail/form-page/form-page.cjs +10 -4
  71. package/lib/control/form/form-detail/form-page/form-page.css +1 -1
  72. package/lib/control/search-bar/filter-tree/filter-tree.cjs +19 -20
  73. package/lib/control/toolbar/short-cut-button/short-cut-button.cjs +73 -0
  74. package/lib/control/toolbar/short-cut-button/short-cut-button.css +0 -0
  75. package/lib/control/toolbar/toolbar.cjs +37 -1
  76. package/lib/control/tree/tree.cjs +2 -1
  77. package/lib/control/tree/tree.css +1 -1
  78. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +24 -12
  79. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  80. package/lib/index.cjs +2 -0
  81. package/lib/locale/en/index.cjs +2 -1
  82. package/lib/locale/zh-CN/index.cjs +2 -1
  83. package/lib/panel-component/auth-captcha/auth-captcha.controller.cjs +15 -11
  84. package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +2 -7
  85. package/lib/panel-component/panel-button/panel-button.controller.cjs +6 -9
  86. package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +13 -2
  87. package/lib/panel-component/short-cut/short-cut.cjs +61 -41
  88. package/lib/panel-component/short-cut/short-cut.css +1 -1
  89. package/lib/util/app-util/app-util.cjs +154 -0
  90. package/lib/util/index.cjs +2 -0
  91. package/lib/view-engine/login-view.engine.cjs +32 -12
  92. package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +17 -3
  93. package/lib/web-app/main.cjs +2 -0
  94. package/package.json +7 -7
  95. package/dist/index-Ky5xo5V5.js +0 -4
@@ -9,6 +9,12 @@ import { AuthCaptchaState } from './auth-captcha.state';
9
9
  * @extends {PanelItemController<IPanelRawItem>}
10
10
  */
11
11
  export declare class AuthCaptchaController extends PanelItemController<IPanelRawItem> {
12
+ /**
13
+ * 人机识别状态对象
14
+ *
15
+ * @type {AuthCaptchaState}
16
+ * @memberof AuthCaptchaController
17
+ */
12
18
  state: AuthCaptchaState;
13
19
  /**
14
20
  * 验证码数据
@@ -17,6 +23,13 @@ export declare class AuthCaptchaController extends PanelItemController<IPanelRaw
17
23
  * @memberof AuthCaptchaController
18
24
  */
19
25
  private captcha;
26
+ /**
27
+ * 创建人机识别状态对象
28
+ *
29
+ * @protected
30
+ * @return {*} {AuthCaptchaState}
31
+ * @memberof AuthCaptchaController
32
+ */
20
33
  protected createState(): AuthCaptchaState;
21
34
  /**
22
35
  * 面板状态变更通知
@@ -24,6 +24,13 @@ class AuthCaptchaController extends PanelItemController {
24
24
  "Captcha-Code": ""
25
25
  }));
26
26
  }
27
+ /**
28
+ * 创建人机识别状态对象
29
+ *
30
+ * @protected
31
+ * @return {*} {AuthCaptchaState}
32
+ * @memberof AuthCaptchaController
33
+ */
27
34
  createState() {
28
35
  var _a;
29
36
  return new AuthCaptchaState((_a = this.parent) == null ? void 0 : _a.state);
@@ -49,18 +56,15 @@ class AuthCaptchaController extends PanelItemController {
49
56
  async onInit() {
50
57
  super.onInit();
51
58
  await this.loadCaptcha();
52
- const view = this.panel.view;
53
- view.hooks.beforeLogin.tapPromise(async (context) => {
54
- if (!context.parentId || context.parentId === this.dataParent.model.id) {
55
- context.validate = context.validate && await this.validate();
56
- }
57
- });
58
- view.hooks.afterLogin.tap((context) => {
59
- if (!context.ok) {
60
- this.loadCaptcha();
61
- this.state.code = "";
59
+ this.panel.view.evt.on(
60
+ "onAfterLogin",
61
+ (evt) => {
62
+ if (!evt.ok && (!evt.panelDataParent || evt.panelDataParent === this.dataParent.model.id)) {
63
+ this.loadCaptcha();
64
+ this.state.code = "";
65
+ }
62
66
  }
63
- });
67
+ );
64
68
  }
65
69
  /**
66
70
  * 值校验
@@ -14,7 +14,7 @@ export declare const AuthUserinfo: import("vue").DefineComponent<{
14
14
  }, {
15
15
  ns: import("@ibiz-template/core").Namespace;
16
16
  c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
17
- onClick: () => Promise<void>;
17
+ onClick: () => void;
18
18
  srfusername: any;
19
19
  srfpersonname: any;
20
20
  router: import("vue-router").Router;
@@ -33,13 +33,8 @@ const AuthUserinfo = /* @__PURE__ */ defineComponent({
33
33
  }
34
34
  return "LEFT";
35
35
  });
36
- const onClick = async () => {
37
- const bol = await ibiz.hub.controller.logout();
38
- if (bol) {
39
- await router.push("/login?ru=".concat(encodeURIComponent(window.location.hash.replace("#/", "/"))));
40
- ibiz.util.showAppLoading();
41
- window.location.reload();
42
- }
36
+ const onClick = () => {
37
+ ibiz.hub.controller.logout();
43
38
  };
44
39
  const isCollapse = computed(() => {
45
40
  return c.panel.view.state.isCollapse;
@@ -10,7 +10,7 @@ export declare const IBizAuthUserinfo: import("@ibiz-template/vue3-util").TypeWi
10
10
  }, {
11
11
  ns: import("@ibiz-template/core").Namespace;
12
12
  c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
13
- onClick: () => Promise<void>;
13
+ onClick: () => void;
14
14
  srfusername: any;
15
15
  srfpersonname: any;
16
16
  router: import("vue-router").Router;
@@ -71,7 +71,7 @@ export declare class PanelButtonController extends PanelItemController<IPanelBut
71
71
  updateButtonState(): Promise<void>;
72
72
  /**
73
73
  * 行为点击
74
- *
74
+ * - 在行为参数中传递panelDataParent(面板项数据父容器标识)
75
75
  * @param {MouseEvent} event
76
76
  * @return {*} {Promise<void>}
77
77
  * @memberof PanelButtonController
@@ -87,7 +87,7 @@ class PanelButtonController extends PanelItemController {
87
87
  }
88
88
  /**
89
89
  * 行为点击
90
- *
90
+ * - 在行为参数中传递panelDataParent(面板项数据父容器标识)
91
91
  * @param {MouseEvent} event
92
92
  * @return {*} {Promise<void>}
93
93
  * @memberof PanelButtonController
@@ -99,19 +99,16 @@ class PanelButtonController extends PanelItemController {
99
99
  }
100
100
  event.stopPropagation();
101
101
  event.preventDefault();
102
- const view = this.panel.view;
103
- if (actionType === "UIACTION" && uiactionId === "login" && view.model.viewType === "APPLOGINVIEW" && !await view.validate(
104
- this.dataParent.model.id
105
- )) {
106
- return;
107
- }
108
102
  await UIActionUtil.execAndResolved(
109
103
  uiactionId,
110
104
  {
111
105
  context: this.panel.context,
112
- params: this.panel.params,
106
+ params: {
107
+ panelDataParent: this.dataParent.model.id,
108
+ ...this.panel.params
109
+ },
113
110
  data: [this.data],
114
- view,
111
+ view: this.panel.view,
115
112
  event,
116
113
  noWaitRoute: true
117
114
  },
@@ -18,6 +18,7 @@ export declare const IBizPanelStaticCarousel: import("@ibiz-template/vue3-util")
18
18
  }[]>;
19
19
  isAuto: import("vue").Ref<boolean>;
20
20
  timeSpan: import("vue").Ref<number>;
21
+ carouselMode: import("vue").Ref<string>;
21
22
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
23
  modelData: {
23
24
  type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
@@ -22,6 +22,7 @@ export declare const PanelStaticCarousel: import("vue").DefineComponent<{
22
22
  }[]>;
23
23
  isAuto: Ref<boolean>;
24
24
  timeSpan: Ref<number>;
25
+ carouselMode: Ref<string>;
25
26
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
27
  modelData: {
27
28
  type: PropType<IPanelRawItem>;
@@ -23,6 +23,7 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
23
23
  const carouselData = ref([]);
24
24
  const isAuto = ref(true);
25
25
  const timeSpan = ref(3e3);
26
+ const carouselMode = ref("default");
26
27
  const getSwipeConfig = (swipeData) => {
27
28
  const autoPlay = swipeData.find((item) => Object.is(item.key, "autoplay"));
28
29
  if (autoPlay) {
@@ -32,12 +33,17 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
32
33
  if (span) {
33
34
  timeSpan.value = Number(span.value) || 0;
34
35
  }
36
+ const carouselModeItem = swipeData.find((item) => Object.is(item.key, "carouselMode"));
37
+ if (carouselModeItem && carouselModeItem.value) {
38
+ carouselMode.value = carouselModeItem.value;
39
+ }
35
40
  };
36
41
  if ((_a = model.rawItem) == null ? void 0 : _a.rawItemParams) {
37
42
  let swipeData = [];
38
43
  const imgData = model.rawItem.rawItemParams;
39
44
  const autoplayIndex = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
40
45
  const timespanIndex = imgData.findIndex((item) => Object.is(item.key, "timespan"));
46
+ const carouselModeIndex = imgData.findIndex((item) => Object.is(item.key, "carouselMode"));
41
47
  let number = 0;
42
48
  if (autoplayIndex >= 0) {
43
49
  number += 1;
@@ -45,6 +51,9 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
45
51
  if (timespanIndex >= 0) {
46
52
  number += 1;
47
53
  }
54
+ if (carouselModeIndex >= 0) {
55
+ number += 1;
56
+ }
48
57
  if (number > 0) {
49
58
  swipeData = imgData.slice(0, -number);
50
59
  getSwipeConfig(imgData.slice(-number));
@@ -71,7 +80,8 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
71
80
  ns,
72
81
  carouselData,
73
82
  isAuto,
74
- timeSpan
83
+ timeSpan,
84
+ carouselMode
75
85
  };
76
86
  },
77
87
  render() {
@@ -80,7 +90,8 @@ const PanelStaticCarousel = /* @__PURE__ */ defineComponent({
80
90
  }, [createVNode(resolveComponent("iBizCarouselComponent"), {
81
91
  "carouselData": this.carouselData,
82
92
  "isAuto": this.isAuto,
83
- "timeSpan": this.timeSpan
93
+ "timeSpan": this.timeSpan,
94
+ "carouselMode": this.carouselMode
84
95
  }, null)]);
85
96
  }
86
97
  });
@@ -9,9 +9,9 @@ export declare const IBizShortCut: import("@ibiz-template/vue3-util").TypeWithIn
9
9
  };
10
10
  }, {
11
11
  ns: import("@ibiz-template/core").Namespace;
12
- data: import("vue").Ref<{
12
+ data: {
13
13
  key: string;
14
- name: string;
14
+ caption: string;
15
15
  appViewId: string;
16
16
  context: {
17
17
  [x: string]: any;
@@ -23,8 +23,25 @@ export declare const IBizShortCut: import("@ibiz-template/vue3-util").TypeWithIn
23
23
  };
24
24
  params: IParams;
25
25
  openMode: string;
26
- icon?: string | undefined;
27
- }[]>;
26
+ fullPath: string;
27
+ icon?: {
28
+ codeName?: string | undefined;
29
+ cssClass?: string | undefined;
30
+ cssClassX?: string | undefined;
31
+ glyph?: string | undefined;
32
+ height?: number | undefined;
33
+ imagePath?: string | undefined;
34
+ imagePathX?: string | undefined;
35
+ rawContent?: string | undefined;
36
+ width?: number | undefined;
37
+ appId: string;
38
+ id?: string | undefined;
39
+ name?: string | undefined;
40
+ userParam?: Record<string, string> | undefined;
41
+ modelId?: string | undefined;
42
+ modelType?: string | undefined;
43
+ } | undefined;
44
+ }[];
28
45
  isShowToolbar: import("vue").Ref<boolean>;
29
46
  onChange: (evt: IData) => void;
30
47
  onShowChange: () => void;
@@ -1 +1 @@
1
- .ibiz-short-cut{bottom:4px;right:4px;z-index:2;position:fixed;display:flex;align-items:center;border-radius:4px;box-shadow:0 0 16px rgba(0,0,0,.0784313725);border:1px solid var(--ibiz-color-border);background:var(--ibiz-color-bg-1)}.ibiz-short-cut.is-hidden{display:none}.ibiz-short-cut__more{padding:2px;cursor:pointer}.ibiz-short-cut__more .el-tooltip__trigger{padding:8px;line-height:18px}.ibiz-short-cut__more .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__more--icon{margin-left:8px}.ibiz-short-cut__recover{padding:2px;display:flex;cursor:pointer;align-items:center}.ibiz-short-cut__recover .el-tooltip__trigger{padding:8px;line-height:18px}.ibiz-short-cut__recover .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__item{display:flex;cursor:pointer;position:relative;align-items:center;flex-flow:row nowrap;place-content:center flex-start}.ibiz-short-cut__item .icon{flex-shrink:0}.ibiz-short-cut__item .icon.caption{margin-right:8px}.ibiz-short-cut__item .drag-icon{visibility:hidden}.ibiz-short-cut__item .close-icon{visibility:hidden;font-size:18px}.ibiz-short-cut__item .close-icon:hover{color:var(--ibiz-color-danger-hover)}.ibiz-short-cut__item--caption{flex-grow:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ibiz-short-cut__item:hover .close-icon,.ibiz-short-cut__item:hover .drag-icon{visibility:visible}.ibiz-short-cut .is-horizontal{display:flex;padding:8px}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item{max-width:165px;border-right:1px solid var(--ibiz-color-border)}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item--caption{margin:0 8px}.ibiz-short-cut__popover.el-popover.el-popper{padding:10px 0}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item{width:225px;height:44px;padding:9px 20px}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item .drag-icon{left:5px;position:absolute}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item:hover{background-color:var(--ibiz-color-fill-1)}
1
+ .ibiz-short-cut{z-index:2;bottom:26px;display:flex;position:fixed;border-radius:4px;align-items:center;box-shadow:0 0 16px rgba(0,0,0,.0784313725);background:var(--ibiz-color-bg-1);right:var(--ibiz-spacing-base-loose);border:1px solid var(--ibiz-color-border)}.ibiz-short-cut.is-conceal{visibility:hidden}.ibiz-short-cut__more{padding:2px;cursor:pointer}.ibiz-short-cut__more .el-tooltip__trigger{padding:8px;line-height:16px}.ibiz-short-cut__more .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__more .recover-icon{font-size:16px;margin-left:8px}.ibiz-short-cut__recover{padding:2px;display:flex;cursor:pointer;align-items:center}.ibiz-short-cut__recover .el-tooltip__trigger{padding:8px;line-height:16px}.ibiz-short-cut__recover .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__action{display:flex;cursor:pointer;position:relative;align-items:center;flex-flow:row nowrap;place-content:center flex-start;width:225px;height:44px;padding:9px 20px}.ibiz-short-cut__action .expand-icon{font-size:16px;margin-right:8px}.ibiz-short-cut__item{display:flex;cursor:pointer;position:relative;align-items:center;flex-flow:row nowrap;place-content:center flex-start}.ibiz-short-cut__item .icon{flex-shrink:0;font-size:16px}.ibiz-short-cut__item .drag-icon{display:none;margin-right:8px}.ibiz-short-cut__item .caption-icon{margin-right:8px}.ibiz-short-cut__item .close-icon{visibility:hidden}.ibiz-short-cut__item .close-icon:hover{color:var(--ibiz-color-danger-hover)}.ibiz-short-cut__item--caption{flex-grow:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ibiz-short-cut__item:hover .drag-icon{display:block}.ibiz-short-cut__item:hover .caption-icon{display:none}.ibiz-short-cut__item:hover .close-icon{visibility:visible}.ibiz-short-cut .is-horizontal{display:flex;padding:8px 0}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item{max-width:168px;min-width:84px;padding:0 12px;border-right:1px solid var(--ibiz-color-border)}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item .close-icon{right:0;position:absolute;padding-right:4px;background-color:var(--ibiz-color-white);box-shadow:-10px 0 20px 8px var(--ibiz-color-white)}.ibiz-short-cut__popover .is-hidden{display:none}.ibiz-short-cut__popover.el-popover.el-popper{padding:10px 0}.ibiz-short-cut__popover .is-vertical{max-height:400px;overflow-y:auto}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item{width:225px;height:44px;padding:9px 20px}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item:hover{background-color:var(--ibiz-color-fill-1)}
@@ -13,9 +13,9 @@ export declare const ShortCut: import("vue").DefineComponent<{
13
13
  };
14
14
  }, {
15
15
  ns: import("@ibiz-template/core").Namespace;
16
- data: import("vue").Ref<{
16
+ data: {
17
17
  key: string;
18
- name: string;
18
+ caption: string;
19
19
  appViewId: string;
20
20
  context: {
21
21
  [x: string]: any;
@@ -27,8 +27,25 @@ export declare const ShortCut: import("vue").DefineComponent<{
27
27
  };
28
28
  params: IParams;
29
29
  openMode: string;
30
- icon?: string | undefined;
31
- }[]>;
30
+ fullPath: string;
31
+ icon?: {
32
+ codeName?: string | undefined;
33
+ cssClass?: string | undefined;
34
+ cssClassX?: string | undefined;
35
+ glyph?: string | undefined;
36
+ height?: number | undefined;
37
+ imagePath?: string | undefined;
38
+ imagePathX?: string | undefined;
39
+ rawContent?: string | undefined;
40
+ width?: number | undefined;
41
+ appId: string;
42
+ id?: string | undefined;
43
+ name?: string | undefined;
44
+ userParam?: Record<string, string> | undefined;
45
+ modelId?: string | undefined;
46
+ modelType?: string | undefined;
47
+ } | undefined;
48
+ }[];
32
49
  isShowToolbar: import("vue").Ref<boolean>;
33
50
  onChange: (evt: IData) => void;
34
51
  onShowChange: () => void;
@@ -1,9 +1,10 @@
1
- import { getCurrentInstance, ref, createVNode, resolveComponent, defineComponent } from 'vue';
1
+ import { getCurrentInstance, ref, reactive, onMounted, onUnmounted, createVNode, resolveComponent, defineComponent } from 'vue';
2
+ import { useRouter } from 'vue-router';
2
3
  import { PanelItemController, OpenAppViewCommand } from '@ibiz-template/runtime';
3
4
  import { useNamespace } from '@ibiz-template/vue3-util';
4
5
  import draggable from 'vuedraggable';
5
- import './short-cut.css';
6
6
  import { IBizContext } from '@ibiz-template/core';
7
+ import './short-cut.css';
7
8
 
8
9
  "use strict";
9
10
  const ShortCut = /* @__PURE__ */ defineComponent({
@@ -24,35 +25,52 @@ const ShortCut = /* @__PURE__ */ defineComponent({
24
25
  setup(props) {
25
26
  const ns = useNamespace("short-cut");
26
27
  const vue = getCurrentInstance().proxy;
27
- const isShowToolbar = ref(false);
28
+ const router = useRouter();
29
+ const shortCutUtil = ibiz.util.shortCut;
30
+ const isShowToolbar = ref(true);
28
31
  const isShowMore = ref(false);
29
- const data = ref(ibiz.util.shortCut.data);
32
+ const data = reactive(shortCutUtil.data);
30
33
  const dragCache = {
31
34
  newIndex: 0,
32
35
  oldIndex: 0
33
36
  };
37
+ const openModeMap = /* @__PURE__ */ new Map([["ROUTE_MODAL", "INDEXVIEWTAB_POPUPMODAL"], ["MODAL", "POPUPMODAL"], ["DRAWER", "DRAWER_RIGHT"]]);
38
+ const onShortCutChange = (items) => {
39
+ if (data.length === 0 && isShowMore.value) {
40
+ isShowMore.value = false;
41
+ }
42
+ vue.$forceUpdate();
43
+ };
44
+ onMounted(() => {
45
+ isShowToolbar.value = shortCutUtil.mode !== "vertical";
46
+ ibiz.util.shortCut.onChange(onShortCutChange);
47
+ });
48
+ onUnmounted(() => {
49
+ ibiz.util.shortCut.offChange(onShortCutChange);
50
+ });
34
51
  const onShowChange = () => {
35
52
  isShowToolbar.value = !isShowToolbar.value;
36
53
  if (isShowToolbar.value) {
37
54
  isShowMore.value = false;
38
- }
39
- };
40
- const getOpenMode = (openMode) => {
41
- switch (openMode) {
42
- case "ROUTE_MODAL":
43
- return "INDEXVIEWTAB_POPUPMODAL";
44
- case "MODAL":
45
- return "POPUPMODAL";
46
- case "DRAWER":
47
- return "DRAWER_RIGHT";
48
- default:
55
+ shortCutUtil.setShortCutMode("horizontal");
56
+ } else {
57
+ shortCutUtil.setShortCutMode("vertical");
49
58
  }
50
59
  };
51
60
  const onClick = (item) => {
52
61
  isShowMore.value = false;
53
- ibiz.commands.execute(OpenAppViewCommand.TAG, item.appViewId, IBizContext.create(item.context), item.params, {
54
- openMode: getOpenMode(item.openMode)
55
- });
62
+ if (item.openMode === "ROUTE") {
63
+ const fullPath = item.fullPath.substring(1);
64
+ if (router.currentRoute.value.fullPath !== fullPath) {
65
+ router.push({
66
+ path: item.fullPath.substring(1)
67
+ });
68
+ }
69
+ } else {
70
+ ibiz.commands.execute(OpenAppViewCommand.TAG, item.appViewId, IBizContext.create(item.context), item.params, {
71
+ openMode: openModeMap.get(item.openMode)
72
+ });
73
+ }
56
74
  };
57
75
  const onChange = (evt) => {
58
76
  if (evt.moved) {
@@ -63,18 +81,16 @@ const ShortCut = /* @__PURE__ */ defineComponent({
63
81
  dragCache.oldIndex = evt.removed.oldIndex;
64
82
  ibiz.util.shortCut.changeIndex(dragCache.newIndex, dragCache.oldIndex);
65
83
  }
66
- vue.$forceUpdate();
67
84
  };
68
85
  const onDelete = (event, key) => {
69
86
  event.stopPropagation();
70
87
  ibiz.util.shortCut.removeShortCut(key);
71
- vue.$forceUpdate();
72
88
  };
73
89
  const renderDraggable = (isVertical) => {
74
90
  return createVNode(draggable, {
75
91
  "itemKey": "key",
76
92
  "class": [ns.e("draggable"), ns.is("vertical", isVertical), ns.is("horizontal", !isVertical)],
77
- "modelValue": data.value,
93
+ "modelValue": data,
78
94
  "group": props.controller.model.id,
79
95
  "onChange": (evt) => onChange(evt)
80
96
  }, {
@@ -85,13 +101,14 @@ const ShortCut = /* @__PURE__ */ defineComponent({
85
101
  if (isVertical && !isShowToolbar.value || isVertical && isShowToolbar.value && index > 5 || !isVertical && index < 6) {
86
102
  return createVNode("div", {
87
103
  "class": ns.e("item"),
104
+ "title": element.caption,
88
105
  "onClick": () => onClick(element)
89
106
  }, [createVNode("svg", {
90
107
  "viewBox": "0 0 16 16",
91
108
  "class": ["drag-icon", "icon"],
92
109
  "xmlns": "http://www.w3.org/2000/svg",
93
- "height": "14px",
94
- "width": "14px",
110
+ "height": "16px",
111
+ "width": "16px",
95
112
  "focusable": "false"
96
113
  }, [createVNode("g", {
97
114
  "id": "drag-icon/drag--",
@@ -104,32 +121,34 @@ const ShortCut = /* @__PURE__ */ defineComponent({
104
121
  }, [createVNode("path", {
105
122
  "d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z",
106
123
  "id": "drag-icon-air"
107
- }, null)])])]), createVNode("ion-icon", {
108
- "class": ["icon", "caption"],
124
+ }, null)])])]), element.icon ? createVNode(resolveComponent("iBizIcon"), {
125
+ "class": ["caption-icon", "icon"],
126
+ "icon": element.icon
127
+ }, null) : createVNode("ion-icon", {
128
+ "class": ["caption-icon", "icon"],
109
129
  "name": "ellipsis-horizontal-circle-outline"
110
130
  }, null), createVNode("div", {
111
131
  "class": ns.em("item", "caption")
112
- }, [element.name]), createVNode("ion-icon", {
113
- "class": ["close-icon", "icon"],
132
+ }, [element.caption]), createVNode("ion-icon", {
114
133
  "name": "close-outline",
134
+ "class": ["close-icon", "icon"],
115
135
  "onClick": (event) => onDelete(event, element.key)
116
136
  }, null)]);
117
137
  }
118
- },
119
- footer: () => {
120
- if (isVertical && !isShowToolbar.value) {
121
- return createVNode("div", {
122
- "class": [ns.e("item"), ns.e("action")],
123
- "onClick": onShowChange
124
- }, [createVNode("ion-icon", {
125
- "name": "chevron-back-outline"
126
- }, null), createVNode("div", {
127
- "class": ns.em("item", "caption")
128
- }, [ibiz.i18n.t("panelComponent.shortCut.expandToolbar")])]);
129
- }
130
138
  }
131
139
  });
132
140
  };
141
+ const renderFoolterToolbar = () => {
142
+ return createVNode("div", {
143
+ "class": [ns.e("action"), ns.is("hidden", isShowToolbar.value)],
144
+ "onClick": onShowChange
145
+ }, [createVNode("ion-icon", {
146
+ "class": ["expand-icon", "icon"],
147
+ "name": "chevron-back-outline"
148
+ }, null), createVNode("div", {
149
+ "class": ns.em("item", "caption")
150
+ }, [ibiz.i18n.t("panelComponent.shortCut.expandToolbar")])]);
151
+ };
133
152
  const renderMoreToolbar = () => {
134
153
  return createVNode(resolveComponent("el-popover"), {
135
154
  "visible": isShowMore.value,
@@ -148,14 +167,14 @@ const ShortCut = /* @__PURE__ */ defineComponent({
148
167
  }, {
149
168
  default: () => [createVNode("div", null, [createVNode("span", {
150
169
  "class": ns.em("more", "caption")
151
- }, [isShowToolbar.value ? "6/".concat(data.value.length) : data.value.length]), createVNode("i", {
170
+ }, [isShowToolbar.value ? "6/".concat(data.length) : data.length]), createVNode("i", {
152
171
  "class": ["fa", ns.em("more", "icon"), isShowMore.value ? "fa-angle-double-down" : "fa-angle-double-up"],
153
172
  "aria-hidden": "true"
154
173
  }, null)])]
155
174
  })]);
156
175
  },
157
176
  default: () => {
158
- return renderDraggable(true);
177
+ return [renderDraggable(true), renderFoolterToolbar()];
159
178
  }
160
179
  });
161
180
  };
@@ -171,7 +190,7 @@ const ShortCut = /* @__PURE__ */ defineComponent({
171
190
  },
172
191
  render() {
173
192
  return createVNode("div", {
174
- "class": [this.ns.b(), ...this.controller.containerClass, this.ns.is("hidden", this.data.length === 0)]
193
+ "class": [this.ns.b(), ...this.controller.containerClass, this.ns.is("conceal", this.data.length === 0)]
175
194
  }, [this.isShowToolbar && this.renderDraggable(false), (!this.isShowToolbar || this.data.length > 6) && this.renderMoreToolbar(), this.isShowToolbar && createVNode("div", {
176
195
  "class": this.ns.e("recover"),
177
196
  "onClick": this.onShowChange
@@ -181,6 +200,7 @@ const ShortCut = /* @__PURE__ */ defineComponent({
181
200
  "placement": "top"
182
201
  }, {
183
202
  default: () => [createVNode("ion-icon", {
203
+ "class": ["recover-icon", "icon"],
184
204
  "name": "chevron-forward-outline"
185
205
  }, null)]
186
206
  })])]);
@@ -0,0 +1,90 @@
1
+ import { Router } from 'vue-router';
2
+ import { IAppUtil } from '@ibiz-template/runtime';
3
+ export declare class AppUtil implements IAppUtil {
4
+ protected router: Router;
5
+ /**
6
+ * Creates an instance of AppUtil.
7
+ * @author tony001
8
+ * @date 2024-05-14 17:05:00
9
+ * @param {Router} router
10
+ */
11
+ constructor(router: Router);
12
+ /**
13
+ * 登录
14
+ *
15
+ * @author tony001
16
+ * @date 2024-05-14 16:05:41
17
+ * @param {string} loginName
18
+ * @param {string} password
19
+ * @param {(boolean | undefined)} [remember]
20
+ * @param {(IData | undefined)} [headers]
21
+ * @param {(IData | undefined)} [opts]
22
+ * @return {*} {Promise<boolean>}
23
+ */
24
+ login(loginName: string, password: string, remember?: boolean | undefined, headers?: IData | undefined, opts?: IData | undefined): Promise<boolean>;
25
+ /**
26
+ * 登出
27
+ *
28
+ * @author tony001
29
+ * @date 2024-05-14 16:05:02
30
+ * @param {(IData | undefined)} [opts]
31
+ * @return {*} {Promise<boolean>}
32
+ */
33
+ logout(opts?: IData | undefined): Promise<boolean>;
34
+ /**
35
+ * 变更密码
36
+ *
37
+ * @author tony001
38
+ * @date 2024-05-14 16:05:11
39
+ * @param {string} oldPwd
40
+ * @param {string} newPwd
41
+ * @param {(IData | undefined)} [opts]
42
+ * @return {*} {Promise<boolean>}
43
+ */
44
+ changePwd(oldPwd: string, newPwd: string, opts?: IData | undefined): Promise<boolean>;
45
+ /**
46
+ * 切换组织
47
+ *
48
+ * @author tony001
49
+ * @date 2024-05-14 16:05:20
50
+ * @param {string} oldOrgId
51
+ * @param {string} newOrgId
52
+ * @param {(IData | undefined)} [opts]
53
+ * @return {*} {Promise<boolean>}
54
+ */
55
+ switchOrg(oldOrgId: string, newOrgId: string, opts?: IData | undefined): Promise<boolean>;
56
+ /**
57
+ * 切换主题
58
+ *
59
+ * @author tony001
60
+ * @date 2024-05-14 16:05:30
61
+ * @param {string} oldTheme
62
+ * @param {string} newTheme
63
+ * @param {(IData | undefined)} [opts]
64
+ * @return {*} {Promise<boolean>}
65
+ */
66
+ switchTheme(oldTheme: string, newTheme: string, opts?: IData | undefined): Promise<boolean>;
67
+ /**
68
+ * 切换语言
69
+ *
70
+ * @author tony001
71
+ * @date 2024-05-14 16:05:42
72
+ * @param {string} oldLanguage
73
+ * @param {string} newLanguage
74
+ * @param {(IData | undefined)} [opts]
75
+ * @return {*} {Promise<boolean>}
76
+ */
77
+ switchLanguage(oldLanguage: string, newLanguage: string, opts?: IData | undefined): Promise<boolean>;
78
+ /**
79
+ * 校验密码
80
+ *
81
+ * @author tony001
82
+ * @date 2024-05-14 17:05:31
83
+ * @protected
84
+ * @param {string} oldPwd
85
+ * @param {string} newPwd
86
+ * @param {IData} [opts={}]
87
+ * @return {*} {boolean}
88
+ */
89
+ protected validatePwd(oldPwd: string, newPwd: string, opts?: IData): boolean;
90
+ }