@ibiz-template/vue3-components 0.6.17 → 0.7.1

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 (96) hide show
  1. package/dist/chart-jfPZ04eU.js +1 -0
  2. package/dist/index-XRnHM6lw.js +4 -0
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.system.min.js +1 -1
  5. package/dist/{xlsx-util-tKOH6BvT.js → xlsx-util-X-Qzwu1f.js} +1 -1
  6. package/es/common/pagination/pagination.d.ts +9 -0
  7. package/es/common/pagination/pagination.mjs +12 -2
  8. package/es/common/view-message/view-message.css +1 -1
  9. package/es/common/view-message/view-message.d.ts +27 -1
  10. package/es/common/view-message/view-message.mjs +133 -17
  11. package/es/control/chart/chart.css +1 -1
  12. package/es/control/chart/chart.d.ts +3 -1
  13. package/es/control/chart/chart.mjs +70 -6
  14. package/es/control/data-view/data-view.mjs +1 -0
  15. package/es/control/drbar/drbar.controller.d.ts +9 -0
  16. package/es/control/drbar/drbar.controller.mjs +16 -1
  17. package/es/control/drtab/drtab.controller.d.ts +9 -0
  18. package/es/control/drtab/drtab.controller.mjs +16 -1
  19. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -1
  20. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.d.ts +2 -1
  21. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.mjs +13 -4
  22. package/es/control/form/form-detail/form-mdctrl/index.d.ts +1 -0
  23. package/es/control/form/form-detail/form-rawitem/form-rawitem.d.ts +2 -1
  24. package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +32 -1
  25. package/es/control/form/form-detail/form-rawitem/index.d.ts +1 -0
  26. package/es/control/grid/grid/grid.mjs +1 -0
  27. package/es/control/list/list.mjs +1 -0
  28. package/es/control/search-bar/filter-tree/filter-tree.d.ts +3 -3
  29. package/es/control/search-bar/filter-tree/filter-tree.mjs +98 -37
  30. package/es/control/search-bar/index.d.ts +1 -0
  31. package/es/control/search-bar/index.mjs +2 -0
  32. package/es/control/search-bar/quick-search-select/quick-search-select.css +1 -0
  33. package/es/control/search-bar/quick-search-select/quick-search-select.d.ts +16 -0
  34. package/es/control/search-bar/quick-search-select/quick-search-select.mjs +72 -0
  35. package/es/control/search-bar/search-bar.css +1 -1
  36. package/es/control/search-bar/search-bar.d.ts +1 -0
  37. package/es/control/search-bar/search-bar.mjs +14 -3
  38. package/es/control/tree-grid/tree-grid.mjs +1 -0
  39. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +11 -3
  40. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +13 -2
  41. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +13 -5
  42. package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +7 -0
  43. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs +3 -3
  44. package/es/panel-component/index.mjs +2 -0
  45. package/es/panel-component/panel-index-view-search/index.d.ts +2 -0
  46. package/es/panel-component/panel-index-view-search/panel-index-view-search.d.ts +2 -0
  47. package/es/panel-component/panel-index-view-search/panel-index-view-search.mjs +30 -3
  48. package/es/panel-component/view-msg-pos/index.d.ts +25 -0
  49. package/es/panel-component/view-msg-pos/index.mjs +16 -0
  50. package/es/panel-component/view-msg-pos/view-msg-pos.controller.d.ts +21 -0
  51. package/es/panel-component/view-msg-pos/view-msg-pos.controller.mjs +48 -0
  52. package/es/panel-component/view-msg-pos/view-msg-pos.d.ts +25 -0
  53. package/es/panel-component/view-msg-pos/view-msg-pos.mjs +47 -0
  54. package/es/panel-component/view-msg-pos/view-msg-pos.provider.d.ts +16 -0
  55. package/es/panel-component/view-msg-pos/view-msg-pos.provider.mjs +21 -0
  56. package/es/view-engine/index.mjs +4 -0
  57. package/es/view-engine/panel-view-engine.d.ts +2 -2
  58. package/es/view-engine/tab-search-view.engine.mjs +5 -0
  59. package/es/web-app/App.mjs +9 -1
  60. package/lib/common/pagination/pagination.cjs +12 -2
  61. package/lib/common/view-message/view-message.cjs +132 -16
  62. package/lib/common/view-message/view-message.css +1 -1
  63. package/lib/control/chart/chart.cjs +69 -5
  64. package/lib/control/chart/chart.css +1 -1
  65. package/lib/control/data-view/data-view.cjs +1 -0
  66. package/lib/control/drbar/drbar.controller.cjs +16 -1
  67. package/lib/control/drtab/drtab.controller.cjs +16 -1
  68. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.cjs +13 -4
  69. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -1
  70. package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +31 -0
  71. package/lib/control/grid/grid/grid.cjs +1 -0
  72. package/lib/control/list/list.cjs +1 -0
  73. package/lib/control/search-bar/filter-tree/filter-tree.cjs +98 -37
  74. package/lib/control/search-bar/index.cjs +2 -0
  75. package/lib/control/search-bar/quick-search-select/quick-search-select.cjs +74 -0
  76. package/lib/control/search-bar/quick-search-select/quick-search-select.css +1 -0
  77. package/lib/control/search-bar/search-bar.cjs +14 -3
  78. package/lib/control/search-bar/search-bar.css +1 -1
  79. package/lib/control/tree-grid/tree-grid.cjs +1 -0
  80. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +11 -3
  81. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +13 -2
  82. package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +13 -5
  83. package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +7 -0
  84. package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs +2 -2
  85. package/lib/panel-component/index.cjs +2 -0
  86. package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +29 -2
  87. package/lib/panel-component/view-msg-pos/index.cjs +22 -0
  88. package/lib/panel-component/view-msg-pos/view-msg-pos.cjs +49 -0
  89. package/lib/panel-component/view-msg-pos/view-msg-pos.controller.cjs +50 -0
  90. package/lib/panel-component/view-msg-pos/view-msg-pos.provider.cjs +23 -0
  91. package/lib/view-engine/index.cjs +4 -0
  92. package/lib/view-engine/tab-search-view.engine.cjs +5 -0
  93. package/lib/web-app/App.cjs +8 -0
  94. package/package.json +12 -12
  95. package/dist/chart-IsmrW_d0.js +0 -1
  96. package/dist/index-fN8w56IX.js +0 -4
@@ -47,6 +47,13 @@ const IBizRaw = /* @__PURE__ */ defineComponent({
47
47
  ibiz.log.error("JSON\u5B57\u7B26\u4E32\u8F6C\u6362\u9519\u8BEF");
48
48
  }
49
49
  }
50
+ if (!Array.isArray(obj)) {
51
+ Object.assign(obj, {
52
+ data: {
53
+ ...props.data
54
+ }
55
+ });
56
+ }
50
57
  content.value = await ibiz.util.hbs.render(template, obj || newVal);
51
58
  }
52
59
  }
@@ -2,7 +2,7 @@ import { ref, computed, watch, resolveComponent, createVNode, mergeProps, define
2
2
  import { getInputProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
3
3
  import './ibiz-searchcond-edit.css';
4
4
  import { isNilOrEmpty } from 'qx-util';
5
- import { getOriginFilterNodes, parseFilters, calcSearchConds } from '@ibiz-template/runtime';
5
+ import { getOriginFilterNodes, SearchCondEx2filterNode, calcSearchCondExs } from '@ibiz-template/runtime';
6
6
 
7
7
  "use strict";
8
8
  const IBizSearchCondEdit = /* @__PURE__ */ defineComponent({
@@ -36,7 +36,7 @@ const IBizSearchCondEdit = /* @__PURE__ */ defineComponent({
36
36
  if (newVal) {
37
37
  try {
38
38
  const searchconds = JSON.parse(newVal);
39
- filterNodes.value = searchconds.map((item) => parseFilters(item));
39
+ filterNodes.value = searchconds.map((item) => SearchCondEx2filterNode(item));
40
40
  } catch (error) {
41
41
  ibiz.log.error("".concat(newVal, "\u503C\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u5FC5\u987B\u4E3Ajson\u5B57\u7B26\u4E32"));
42
42
  }
@@ -82,7 +82,7 @@ const IBizSearchCondEdit = /* @__PURE__ */ defineComponent({
82
82
  }
83
83
  };
84
84
  const getCurrentValByFilterNodes = () => {
85
- const searchconds = calcSearchConds(filterNodes.value);
85
+ const searchconds = calcSearchCondExs(filterNodes.value);
86
86
  if (searchconds) {
87
87
  currentVal.value = JSON.stringify(searchconds, null, 2);
88
88
  }
@@ -19,6 +19,7 @@ import { IBizSearchFormButtons } from './searchform-buttons/index.mjs';
19
19
  import { IBizViewMessage } from './view-message/index.mjs';
20
20
  import { IBizPanelStaticCarousel } from './panel-static-carousel/index.mjs';
21
21
  import { IBizCoopPos } from './coop-pos/index.mjs';
22
+ import { IBizViewMsgPos } from './view-msg-pos/index.mjs';
22
23
  export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
23
24
  export { NavPosIndexController } from './nav-pos-index/nav-pos-index.controller.mjs';
24
25
  export { PanelButtonController } from './panel-button/panel-button.controller.mjs';
@@ -63,6 +64,7 @@ const IBizPanelComponents = {
63
64
  v.use(IBizTeleportPlaceholder);
64
65
  v.use(IBizPanelContainerTabs);
65
66
  v.use(IBizCoopPos);
67
+ v.use(IBizViewMsgPos);
66
68
  }
67
69
  };
68
70
 
@@ -12,9 +12,11 @@ export declare const IBizPanelIndexViewSearch: import("@ibiz-template/vue3-util"
12
12
  classArr: import("vue").ComputedRef<(string | false)[]>;
13
13
  isCollapse: import("vue").ComputedRef<any>;
14
14
  onInput: (value: string) => void;
15
+ onSearch: () => Promise<void>;
15
16
  c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
16
17
  query: import("vue").Ref<string>;
17
18
  menuAlign: import("vue").ComputedRef<string>;
19
+ onEnter: (event: KeyboardEvent) => void;
18
20
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
21
  modelData: {
20
22
  type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
@@ -16,9 +16,11 @@ export declare const PanelIndexViewSearch: import("vue").DefineComponent<{
16
16
  classArr: import("vue").ComputedRef<(string | false)[]>;
17
17
  isCollapse: import("vue").ComputedRef<any>;
18
18
  onInput: (value: string) => void;
19
+ onSearch: () => Promise<void>;
19
20
  c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
20
21
  query: import("vue").Ref<string>;
21
22
  menuAlign: import("vue").ComputedRef<string>;
23
+ onEnter: (event: KeyboardEvent) => void;
22
24
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
25
  modelData: {
24
26
  type: PropType<IPanelRawItem>;
@@ -1,6 +1,6 @@
1
1
  import { ref, inject, computed, resolveComponent, createVNode, defineComponent } from 'vue';
2
2
  import { useNamespace } from '@ibiz-template/vue3-util';
3
- import { PanelItemController } from '@ibiz-template/runtime';
3
+ import { PanelItemController, AppFuncCommand } from '@ibiz-template/runtime';
4
4
  import { debounce } from 'lodash-es';
5
5
  import './panel-index-view-search.css';
6
6
 
@@ -45,14 +45,39 @@ const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
45
45
  result.push(...props.controller.containerClass);
46
46
  return result;
47
47
  });
48
+ const onSearch = async () => {
49
+ const id = props.modelData.id;
50
+ const menuC = c.panel.view.getController("appmenu");
51
+ if (menuC) {
52
+ const targetMenu = menuC.allAppMenuItems.find((item) => {
53
+ return item.id === id;
54
+ });
55
+ if (targetMenu) {
56
+ const tempContext = c.panel.context.clone();
57
+ const tempParam = c.panel.params;
58
+ tempContext.srfappid = targetMenu.appId || ibiz.env.appId;
59
+ await ibiz.commands.execute(AppFuncCommand.TAG, targetMenu.appFuncId, tempContext, {
60
+ ...tempParam,
61
+ srfquery: query.value
62
+ }, {});
63
+ }
64
+ }
65
+ };
66
+ const onEnter = (event) => {
67
+ if (event.key === "Enter") {
68
+ onSearch();
69
+ }
70
+ };
48
71
  return {
49
72
  ns,
50
73
  classArr,
51
74
  isCollapse,
52
75
  onInput,
76
+ onSearch,
53
77
  c,
54
78
  query,
55
- menuAlign
79
+ menuAlign,
80
+ onEnter
56
81
  };
57
82
  },
58
83
  render() {
@@ -65,7 +90,9 @@ const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
65
90
  "model-value": this.query,
66
91
  "class": this.ns.b("search"),
67
92
  "placeholder": ibiz.i18n.t("component.indexSearch.placeholder"),
68
- "onInput": this.onInput
93
+ "onInput": this.onInput,
94
+ "onChange": this.onSearch,
95
+ "onKeyup": this.onEnter
69
96
  }, {
70
97
  prefix: () => {
71
98
  return createVNode("ion-icon", {
@@ -0,0 +1,25 @@
1
+ import { ViewMsgPosController } from './view-msg-pos.controller';
2
+ export { ViewMsgPosController };
3
+ export declare const IBizViewMsgPos: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
4
+ modelData: {
5
+ type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
6
+ required: true;
7
+ };
8
+ controller: {
9
+ type: typeof ViewMsgPosController;
10
+ required: true;
11
+ };
12
+ }, {
13
+ ns: import("@ibiz-template/core").Namespace;
14
+ view: import("@ibiz-template/runtime").IViewController<import("@ibiz/model-core").IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>;
15
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16
+ modelData: {
17
+ type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
18
+ required: true;
19
+ };
20
+ controller: {
21
+ type: typeof ViewMsgPosController;
22
+ required: true;
23
+ };
24
+ }>>, {}, {}>>;
25
+ export default IBizViewMsgPos;
@@ -0,0 +1,16 @@
1
+ import { withInstall } from '@ibiz-template/vue3-util';
2
+ import { registerPanelItemProvider } from '@ibiz-template/runtime';
3
+ import { ViewMsgPos } from './view-msg-pos.mjs';
4
+ import { ViewMsgPosProvider } from './view-msg-pos.provider.mjs';
5
+ export { ViewMsgPosController } from './view-msg-pos.controller.mjs';
6
+
7
+ "use strict";
8
+ const IBizViewMsgPos = withInstall(ViewMsgPos, function(v) {
9
+ v.component(ViewMsgPos.name, ViewMsgPos);
10
+ registerPanelItemProvider(
11
+ "RAWITEM_VIEWMSG_POS",
12
+ () => new ViewMsgPosProvider()
13
+ );
14
+ });
15
+
16
+ export { IBizViewMsgPos, IBizViewMsgPos as default };
@@ -0,0 +1,21 @@
1
+ import { PanelItemController } from '@ibiz-template/runtime';
2
+ import { IPanelRawItem } from '@ibiz/model-core';
3
+ export declare class ViewMsgPosController extends PanelItemController<IPanelRawItem> {
4
+ /**
5
+ * 直接内容项参数
6
+ *
7
+ * @author zhanghengfeng
8
+ * @date 2024-04-08 19:04:15
9
+ * @type {IData}
10
+ */
11
+ rawItemParams: IData;
12
+ protected onInit(): Promise<void>;
13
+ /**
14
+ * 处理直接内容项参数
15
+ *
16
+ * @author zhanghengfeng
17
+ * @date 2024-04-08 19:04:59
18
+ * @protected
19
+ */
20
+ protected handleRawItemParams(): void;
21
+ }
@@ -0,0 +1,48 @@
1
+ import { PanelItemController } from '@ibiz-template/runtime';
2
+
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => {
7
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
+ return value;
9
+ };
10
+ class ViewMsgPosController extends PanelItemController {
11
+ constructor() {
12
+ super(...arguments);
13
+ /**
14
+ * 直接内容项参数
15
+ *
16
+ * @author zhanghengfeng
17
+ * @date 2024-04-08 19:04:15
18
+ * @type {IData}
19
+ */
20
+ __publicField(this, "rawItemParams", {});
21
+ }
22
+ async onInit() {
23
+ await super.onInit();
24
+ this.handleRawItemParams();
25
+ }
26
+ /**
27
+ * 处理直接内容项参数
28
+ *
29
+ * @author zhanghengfeng
30
+ * @date 2024-04-08 19:04:59
31
+ * @protected
32
+ */
33
+ handleRawItemParams() {
34
+ var _a;
35
+ const rawItemParams = (_a = this.model.rawItem) == null ? void 0 : _a.rawItemParams;
36
+ if (Array.isArray(rawItemParams)) {
37
+ rawItemParams.forEach((item) => {
38
+ const key = item.key;
39
+ const value = item.value;
40
+ if (key && value) {
41
+ this.rawItemParams[key.toLowerCase()] = value;
42
+ }
43
+ });
44
+ }
45
+ }
46
+ }
47
+
48
+ export { ViewMsgPosController };
@@ -0,0 +1,25 @@
1
+ import { PropType } from 'vue';
2
+ import { IPanelRawItem } from '@ibiz/model-core';
3
+ import { ViewMsgPosController } from './view-msg-pos.controller';
4
+ export declare const ViewMsgPos: import("vue").DefineComponent<{
5
+ modelData: {
6
+ type: PropType<IPanelRawItem>;
7
+ required: true;
8
+ };
9
+ controller: {
10
+ type: typeof ViewMsgPosController;
11
+ required: true;
12
+ };
13
+ }, {
14
+ ns: import("@ibiz-template/core").Namespace;
15
+ view: import("@ibiz-template/runtime").IViewController<import("@ibiz/model-core").IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>;
16
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
+ modelData: {
18
+ type: PropType<IPanelRawItem>;
19
+ required: true;
20
+ };
21
+ controller: {
22
+ type: typeof ViewMsgPosController;
23
+ required: true;
24
+ };
25
+ }>>, {}, {}>;
@@ -0,0 +1,47 @@
1
+ import { resolveComponent, createVNode, defineComponent } from 'vue';
2
+ import { useNamespace, useCtx } from '@ibiz-template/vue3-util';
3
+ import { ViewMsgPosController } from './view-msg-pos.controller.mjs';
4
+
5
+ "use strict";
6
+ const ViewMsgPos = /* @__PURE__ */ defineComponent({
7
+ name: "IBizViewMsgPos",
8
+ props: {
9
+ modelData: {
10
+ type: Object,
11
+ required: true
12
+ },
13
+ controller: {
14
+ type: ViewMsgPosController,
15
+ required: true
16
+ }
17
+ },
18
+ setup() {
19
+ const ns = useNamespace("view-msg-pos");
20
+ const ctx = useCtx();
21
+ const view = ctx.view;
22
+ return {
23
+ ns,
24
+ view
25
+ };
26
+ },
27
+ render() {
28
+ const c = this.controller;
29
+ if (!this.view.state.isCreated) {
30
+ return;
31
+ }
32
+ const position = c.rawItemParams.position || "BODY";
33
+ const scroll = c.rawItemParams.scroll === "true";
34
+ const viewMessages = this.view.state.viewMessages[position];
35
+ if (viewMessages == null ? void 0 : viewMessages.length) {
36
+ return createVNode("div", {
37
+ "class": this.ns.b()
38
+ }, [createVNode(resolveComponent("view-message"), {
39
+ "messages": viewMessages,
40
+ "scroll": scroll
41
+ }, null)]);
42
+ }
43
+ return null;
44
+ }
45
+ });
46
+
47
+ export { ViewMsgPos };
@@ -0,0 +1,16 @@
1
+ import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
2
+ import { IPanelItem } from '@ibiz/model-core';
3
+ import { ViewMsgPosController } from './view-msg-pos.controller';
4
+ /**
5
+ * 预置视图消息适配器
6
+ *
7
+ * @author zk
8
+ * @date 2024-01-25 02:01:01
9
+ * @export
10
+ * @class ViewMessageProvider
11
+ * @implements {IPanelItemProvider}
12
+ */
13
+ export declare class ViewMsgPosProvider implements IPanelItemProvider {
14
+ component: string;
15
+ createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<ViewMsgPosController>;
16
+ }
@@ -0,0 +1,21 @@
1
+ import { ViewMsgPosController } from './view-msg-pos.controller.mjs';
2
+
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => {
7
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
+ return value;
9
+ };
10
+ class ViewMsgPosProvider {
11
+ constructor() {
12
+ __publicField(this, "component", "IBizViewMsgPos");
13
+ }
14
+ async createController(panelItem, panel, parent) {
15
+ const c = new ViewMsgPosController(panelItem, panel, parent);
16
+ await c.init();
17
+ return c;
18
+ }
19
+ }
20
+
21
+ export { ViewMsgPosProvider };
@@ -180,6 +180,10 @@ const IBizViewEngine = {
180
180
  "VIEW_DEPANELVIEW",
181
181
  (c) => new PanelViewEngine(c)
182
182
  );
183
+ ibiz.engine.register(
184
+ "VIEW_APPPANELVIEW",
185
+ (c) => new PanelViewEngine(c)
186
+ );
183
187
  ibiz.engine.register(
184
188
  "VIEW_DECUSTOMVIEW",
185
189
  (c) => new CustomViewEngine(c)
@@ -1,4 +1,4 @@
1
- import { ViewEngineBase, ViewController, IWizardPanelController, IPanelViewEvent, IPanelViewState } from '@ibiz-template/runtime';
1
+ import { ViewEngineBase, ViewController, IPanelController, IPanelViewEvent, IPanelViewState } from '@ibiz-template/runtime';
2
2
  import { IAppView } from '@ibiz/model-core';
3
3
  export declare class PanelViewEngine extends ViewEngineBase {
4
4
  /**
@@ -16,6 +16,6 @@ export declare class PanelViewEngine extends ViewEngineBase {
16
16
  * @readonly
17
17
  * @memberof PanelViewEngine
18
18
  */
19
- get panel(): IWizardPanelController;
19
+ get panel(): IPanelController;
20
20
  onMounted(): Promise<void>;
21
21
  }
@@ -60,6 +60,11 @@ class TabSearchViewEngine extends TabExpViewEngine {
60
60
  this.calcViewParams();
61
61
  });
62
62
  }
63
+ if (this.tabExpPanel) {
64
+ this.tabExpPanel.evt.on("onTabChange", () => {
65
+ this.calcViewParams();
66
+ });
67
+ }
63
68
  }
64
69
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
65
70
  async call(key, args) {
@@ -1,4 +1,4 @@
1
- import { resolveComponent, createVNode, defineComponent } from 'vue';
1
+ import { onUnmounted, resolveComponent, createVNode, defineComponent } from 'vue';
2
2
  import { ViewMode, Modal } from '@ibiz-template/runtime';
3
3
  import { AppHooks } from '@ibiz-template/vue3-util';
4
4
  import './App.css';
@@ -20,6 +20,14 @@ var App = /* @__PURE__ */ defineComponent({
20
20
  }
21
21
  };
22
22
  document.addEventListener("keydown", listenDevtool);
23
+ const destroyAppHub = () => {
24
+ window.removeEventListener("unload", destroyAppHub);
25
+ ibiz.hub.destroy();
26
+ };
27
+ window.addEventListener("unload", destroyAppHub);
28
+ onUnmounted(() => {
29
+ destroyAppHub();
30
+ });
23
31
  return {
24
32
  modal
25
33
  };
@@ -2,6 +2,7 @@
2
2
 
3
3
  var vue = require('vue');
4
4
  var vue3Util = require('@ibiz-template/vue3-util');
5
+ var ramda = require('ramda');
5
6
  require('./pagination.css');
6
7
 
7
8
  "use strict";
@@ -19,6 +20,10 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
19
20
  size: {
20
21
  type: Number,
21
22
  required: true
23
+ },
24
+ totalPages: {
25
+ type: Number || void 0,
26
+ required: false
22
27
  }
23
28
  },
24
29
  emits: ["change", "pageSizeChange", "pageRefresh"],
@@ -44,6 +49,9 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
44
49
  const inputChange = (event) => {
45
50
  event.stopPropagation();
46
51
  };
52
+ const calcTotalPages = vue.computed(() => {
53
+ return Math.ceil(props.total / props.size);
54
+ });
47
55
  return {
48
56
  ns,
49
57
  start,
@@ -51,7 +59,8 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
51
59
  onPageChange,
52
60
  onPageSizeChange,
53
61
  pageRefresh,
54
- inputChange
62
+ inputChange,
63
+ calcTotalPages
55
64
  };
56
65
  },
57
66
  render() {
@@ -61,6 +70,7 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
61
70
  "layout": "slot, prev, pager, next, sizes, jumper",
62
71
  "background": true,
63
72
  "total": this.total,
73
+ "page-count": !ramda.isNil(this.totalPages) && this.calcTotalPages === this.totalPages ? this.calcTotalPages : this.totalPages,
64
74
  "current-page": this.curPage,
65
75
  "page-size": this.size,
66
76
  "page-sizes": [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
@@ -78,7 +88,7 @@ const IBizPagination = /* @__PURE__ */ vue.defineComponent({
78
88
  default: () => [vue.createVNode("ion-icon", {
79
89
  "name": "refresh"
80
90
  }, null)]
81
- })]), vue.createVNode("span", null, [ibiz.i18n.t("component.pagination.display"), vue.createTextVNode("\xA0"), this.start, vue.createTextVNode("\xA0-\xA0"), this.end, vue.createTextVNode("\xA0"), ibiz.i18n.t("component.pagination.piece"), vue.createTextVNode("\uFF0C"), ibiz.i18n.t("component.pagination.total"), vue.createTextVNode("\xA0"), this.total, vue.createTextVNode("\xA0"), ibiz.i18n.t("component.pagination.pieceData")])]
91
+ })]), ramda.isNil(this.totalPages) || this.calcTotalPages === this.totalPages ? vue.createVNode("span", null, [ibiz.i18n.t("component.pagination.display"), vue.createTextVNode("\xA0"), this.start, vue.createTextVNode("\xA0-\xA0"), this.end, vue.createTextVNode("\xA0"), ibiz.i18n.t("component.pagination.piece"), vue.createTextVNode("\uFF0C")]) : null, vue.createVNode("span", null, [ibiz.i18n.t("component.pagination.total"), vue.createTextVNode("\xA0"), this.total, vue.createTextVNode("\xA0"), ibiz.i18n.t("component.pagination.pieceData")])]
82
92
  })]);
83
93
  }
84
94
  });
@@ -2,17 +2,25 @@
2
2
 
3
3
  var vue = require('vue');
4
4
  var vue3Util = require('@ibiz-template/vue3-util');
5
+ var qxUtil = require('qx-util');
5
6
  require('./view-message.css');
6
7
 
7
8
  "use strict";
9
+ function _isSlot(s) {
10
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
11
+ }
8
12
  const ViewMessage = /* @__PURE__ */ vue.defineComponent({
9
13
  name: "ViewMessage",
10
14
  props: {
11
15
  messages: {
12
16
  type: Array
17
+ },
18
+ scroll: {
19
+ type: Boolean,
20
+ default: false
13
21
  }
14
22
  },
15
- setup() {
23
+ setup(props) {
16
24
  const ns = vue3Util.useNamespace("view-message");
17
25
  const getType = (messageType) => {
18
26
  switch (messageType) {
@@ -24,27 +32,135 @@ const ViewMessage = /* @__PURE__ */ vue.defineComponent({
24
32
  return "info";
25
33
  }
26
34
  };
35
+ const items = vue.ref([]);
36
+ const initialIndex = vue.ref(0);
37
+ const uuid = vue.ref("");
38
+ const isHiddenContainer = vue.ref(false);
39
+ vue.watch(() => props.messages, () => {
40
+ initialIndex.value = 0;
41
+ uuid.value = qxUtil.createUUID();
42
+ if (Array.isArray(props.messages)) {
43
+ items.value = props.messages.filter((item) => item.title || item.message).map((item) => {
44
+ return {
45
+ ...item
46
+ };
47
+ });
48
+ isHiddenContainer.value = false;
49
+ } else {
50
+ items.value = [];
51
+ isHiddenContainer.value = true;
52
+ }
53
+ }, {
54
+ immediate: true
55
+ });
56
+ const container = vue.ref(null);
57
+ const carouselHeight = vue.ref("");
58
+ vue.onMounted(() => {
59
+ vue.nextTick(() => {
60
+ const el = container.value;
61
+ if (!el) {
62
+ return;
63
+ }
64
+ const alertEl = el.querySelector(".el-alert");
65
+ if (alertEl) {
66
+ carouselHeight.value = "".concat(alertEl.offsetHeight, "px");
67
+ }
68
+ });
69
+ });
70
+ const handleAlertClose = (index) => {
71
+ items.value[index].hidden = true;
72
+ const isHiddenCarouse = items.value.every((item) => item.hidden);
73
+ if (isHiddenCarouse) {
74
+ isHiddenContainer.value = true;
75
+ }
76
+ uuid.value = qxUtil.createUUID();
77
+ };
78
+ const handleChange = (index) => {
79
+ initialIndex.value = index;
80
+ };
27
81
  return {
28
82
  ns,
29
- getType
83
+ getType,
84
+ items,
85
+ container,
86
+ carouselHeight,
87
+ initialIndex,
88
+ uuid,
89
+ isHiddenContainer,
90
+ handleAlertClose,
91
+ handleChange
30
92
  };
31
93
  },
32
94
  render() {
33
- var _a, _b;
34
- if (!((_a = this.messages) == null ? void 0 : _a.length)) {
35
- return null;
95
+ const renderScrollMessages = () => {
96
+ let _slot;
97
+ return vue.createVNode("div", {
98
+ "class": [this.ns.b(), this.isHiddenContainer && this.ns.m("hidden")],
99
+ "ref": "container"
100
+ }, [vue.createVNode(vue.resolveComponent("el-carousel"), {
101
+ "key": this.uuid,
102
+ "indicatorPosition": "none",
103
+ "arrow": "never",
104
+ "height": this.carouselHeight,
105
+ "initialIndex": this.initialIndex,
106
+ "onChange": this.handleChange
107
+ }, _isSlot(_slot = this.items.map((item, i) => {
108
+ if (item.hidden) {
109
+ return;
110
+ }
111
+ return vue.createVNode(vue.resolveComponent("el-carousel-item"), null, {
112
+ default: () => [vue.createVNode(vue.resolveComponent("el-alert"), {
113
+ "type": this.getType(item.messageType),
114
+ "class": this.ns.b("carousel-alert"),
115
+ "closable": item.removeMode !== 0,
116
+ "onClose": () => this.handleAlertClose(i)
117
+ }, {
118
+ title: () => {
119
+ return vue.createVNode("div", {
120
+ "class": this.ns.be("carousel-alert", "title")
121
+ }, [item.title || ""]);
122
+ },
123
+ default: () => {
124
+ return vue.createVNode("div", {
125
+ "class": this.ns.be("carousel-alert", "message")
126
+ }, [item.message || ""]);
127
+ }
128
+ })]
129
+ });
130
+ })) ? _slot : {
131
+ default: () => [_slot]
132
+ })]);
133
+ };
134
+ const renderMessages = () => {
135
+ return vue.createVNode("div", {
136
+ "class": [this.ns.b(), this.isHiddenContainer && this.ns.m("hidden")]
137
+ }, [this.items.map((item, i) => {
138
+ return vue.createVNode(vue.resolveComponent("el-alert"), {
139
+ "type": this.getType(item.messageType),
140
+ "class": [this.ns.b("alert"), this.ns.bm("alert", item.title && item.message ? "" : "single"), this.ns.bm("alert", !item.title && item.message ? "single-message" : "")],
141
+ "closable": item.removeMode !== 0,
142
+ "onClose": () => this.handleAlertClose(i)
143
+ }, {
144
+ title: () => {
145
+ return vue.createVNode("div", {
146
+ "class": this.ns.be("alert", "title")
147
+ }, [item.title || ""]);
148
+ },
149
+ default: () => {
150
+ return vue.createVNode("div", {
151
+ "class": this.ns.be("alert", "message")
152
+ }, [item.message || ""]);
153
+ }
154
+ });
155
+ })]);
156
+ };
157
+ if (!this.items.length) {
158
+ return;
159
+ }
160
+ if (this.items.length > 1 && this.scroll) {
161
+ return renderScrollMessages();
36
162
  }
37
- return vue.createVNode("div", {
38
- "class": [this.ns.b()]
39
- }, [(_b = this.messages) == null ? void 0 : _b.map((message) => {
40
- return vue.createVNode(vue.resolveComponent("el-alert"), {
41
- "type": this.getType(message.messageType),
42
- "title": message.title,
43
- "class": [this.ns.e("alert"), this.ns.is("no-title", !message.title)],
44
- "description": message.message,
45
- "closable": message.removeMode !== 0
46
- }, null);
47
- })]);
163
+ return renderMessages();
48
164
  }
49
165
  });
50
166