@ibiz-template/vue3-components 0.7.38-alpha.12 → 0.7.38-alpha.21

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 (185) hide show
  1. package/dist/index-3cxXHoLs.js +4 -0
  2. package/dist/{index-B_Fo_3Rt.js → index-CiEIUSX9.js} +1 -1
  3. package/dist/{index-BvI3oZGL.js → index-HW5stxcy.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-XDKOLzzW.js → xlsx-util-BlkeQIMu.js} +1 -1
  7. package/es/common/action-toolbar/action-toolbar.mjs +6 -3
  8. package/es/common/control-navigation/control-navigation.css +1 -0
  9. package/es/common/control-navigation/control-navigation.d.ts +32 -0
  10. package/es/common/control-navigation/control-navigation.mjs +116 -0
  11. package/es/common/control-navigation/provider/calendar-navigation.provider.d.ts +17 -0
  12. package/es/common/control-navigation/provider/calendar-navigation.provider.mjs +55 -0
  13. package/es/common/control-navigation/provider/index.d.ts +10 -0
  14. package/es/common/control-navigation/provider/index.mjs +17 -0
  15. package/es/common/control-navigation/provider/navigation-base.provider.d.ts +84 -0
  16. package/es/common/control-navigation/provider/navigation-base.provider.mjs +142 -0
  17. package/es/common/control-navigation/provider/tree-navigation.provider.d.ts +30 -0
  18. package/es/common/control-navigation/provider/tree-navigation.provider.mjs +81 -0
  19. package/es/common/custom-theme/custom-theme-model.mjs +5 -13
  20. package/es/common/gantt-setting/gantt-setting.css +1 -0
  21. package/es/common/gantt-setting/gantt-setting.d.ts +53 -0
  22. package/es/common/gantt-setting/gantt-setting.mjs +217 -0
  23. package/es/common/grid-setting/grid-setting.css +1 -1
  24. package/es/common/grid-setting/grid-setting.d.ts +2 -1
  25. package/es/common/grid-setting/grid-setting.mjs +20 -4
  26. package/es/common/index.mjs +6 -0
  27. package/es/common/nav-split/nav-split.css +1 -0
  28. package/es/common/nav-split/nav-split.d.ts +57 -0
  29. package/es/common/nav-split/nav-split.mjs +209 -0
  30. package/es/common/pql-editor/utils/index.mjs +30 -40
  31. package/es/common/split/split.css +1 -1
  32. package/es/control/app-menu/app-menu.css +1 -1
  33. package/es/control/app-menu/app-menu.d.ts +3 -0
  34. package/es/control/app-menu/app-menu.mjs +54 -16
  35. package/es/control/app-menu/custom-menu-design/custom-menu-design.mjs +11 -3
  36. package/es/control/app-menu/index.d.ts +3 -0
  37. package/es/control/calendar/calendar.css +1 -1
  38. package/es/control/calendar/calendar.d.ts +12 -1
  39. package/es/control/calendar/calendar.mjs +42 -10
  40. package/es/control/calendar/index.d.ts +12 -1
  41. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +3 -0
  42. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.mjs +2 -1
  43. package/es/control/data-view/data-view.css +1 -1
  44. package/es/control/data-view/data-view.d.ts +1 -0
  45. package/es/control/data-view/data-view.mjs +21 -3
  46. package/es/control/data-view/index.d.ts +1 -0
  47. package/es/control/drbar/drbar.controller.mjs +1 -1
  48. package/es/control/drtab/drtab-control.util.mjs +1 -1
  49. package/es/control/drtab/drtab.controller.d.ts +9 -1
  50. package/es/control/drtab/drtab.controller.mjs +26 -2
  51. package/es/control/drtab/drtab.css +1 -1
  52. package/es/control/drtab/drtab.d.ts +3 -1
  53. package/es/control/drtab/drtab.mjs +68 -9
  54. package/es/control/drtab/index.d.ts +3 -1
  55. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +4 -0
  56. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
  57. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +1 -1
  58. package/es/control/gantt/gantt.css +1 -1
  59. package/es/control/gantt/gantt.d.ts +2 -4
  60. package/es/control/gantt/gantt.mjs +82 -25
  61. package/es/control/gantt/index.d.ts +2 -4
  62. package/es/control/grid/grid/grid-control.util.mjs +2 -2
  63. package/es/control/grid/grid/grid.css +1 -1
  64. package/es/control/grid/grid/grid.mjs +75 -71
  65. package/es/control/list/index.d.ts +1 -0
  66. package/es/control/list/list.css +1 -1
  67. package/es/control/list/list.d.ts +1 -0
  68. package/es/control/list/list.mjs +23 -5
  69. package/es/control/map/map.d.ts +9 -0
  70. package/es/control/map/map.mjs +4 -0
  71. package/es/control/search-bar/search-groups/search-groups.mjs +2 -2
  72. package/es/control/toolbar/toolbar.mjs +3 -0
  73. package/es/control/tree/el-tree-util.d.ts +39 -1
  74. package/es/control/tree/el-tree-util.mjs +70 -2
  75. package/es/control/tree/index.d.ts +16 -14
  76. package/es/control/tree/tree.css +1 -1
  77. package/es/control/tree/tree.d.ts +16 -14
  78. package/es/control/tree/tree.mjs +60 -31
  79. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.css +1 -1
  80. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +3 -8
  81. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.mjs +22 -23
  82. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +1 -0
  83. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.mjs +3 -1
  84. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
  85. package/es/locale/en/index.d.ts +17 -0
  86. package/es/locale/en/index.mjs +18 -1
  87. package/es/locale/zh-CN/index.d.ts +17 -0
  88. package/es/locale/zh-CN/index.mjs +18 -1
  89. package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
  90. package/es/panel-component/index-actions/index-actions.css +1 -1
  91. package/es/panel-component/index.mjs +2 -1
  92. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.mjs +8 -31
  93. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.d.ts +1 -1
  94. package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.mjs +1 -1
  95. package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +7 -2
  96. package/es/panel-component/panel-app-title/index.mjs +4 -0
  97. package/es/panel-component/panel-app-title/panel-app-title.controller.mjs +8 -0
  98. package/es/panel-component/panel-app-title/panel-app-title.css +1 -1
  99. package/es/panel-component/panel-app-title/panel-app-title.mjs +112 -108
  100. package/es/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
  101. package/es/util/fullscreen/fullscreen-util.mjs +1 -1
  102. package/es/util/notification-util/notification-util.d.ts +10 -1
  103. package/es/util/notification-util/notification-util.mjs +36 -0
  104. package/es/util/notification-util/upload-manager/file-type.d.ts +8 -0
  105. package/es/util/notification-util/upload-manager/file-type.mjs +207 -0
  106. package/es/util/notification-util/upload-manager/upload-manager.css +1 -0
  107. package/es/util/notification-util/upload-manager/upload-manager.d.ts +64 -0
  108. package/es/util/notification-util/upload-manager/upload-manager.mjs +159 -0
  109. package/es/util/pagination/use-pagination.mjs +5 -4
  110. package/es/view-engine/tab-exp-view.engine.d.ts +9 -0
  111. package/es/view-engine/tab-exp-view.engine.mjs +20 -1
  112. package/lib/common/action-toolbar/action-toolbar.cjs +6 -3
  113. package/lib/common/control-navigation/control-navigation.cjs +118 -0
  114. package/lib/common/control-navigation/control-navigation.css +1 -0
  115. package/lib/common/control-navigation/provider/calendar-navigation.provider.cjs +57 -0
  116. package/lib/common/control-navigation/provider/index.cjs +19 -0
  117. package/lib/common/control-navigation/provider/navigation-base.provider.cjs +144 -0
  118. package/lib/common/control-navigation/provider/tree-navigation.provider.cjs +83 -0
  119. package/lib/common/custom-theme/custom-theme-model.cjs +5 -13
  120. package/lib/common/gantt-setting/gantt-setting.cjs +219 -0
  121. package/lib/common/gantt-setting/gantt-setting.css +1 -0
  122. package/lib/common/grid-setting/grid-setting.cjs +20 -4
  123. package/lib/common/grid-setting/grid-setting.css +1 -1
  124. package/lib/common/index.cjs +6 -0
  125. package/lib/common/nav-split/nav-split.cjs +211 -0
  126. package/lib/common/nav-split/nav-split.css +1 -0
  127. package/lib/common/pql-editor/utils/index.cjs +30 -40
  128. package/lib/common/split/split.css +1 -1
  129. package/lib/control/app-menu/app-menu.cjs +52 -14
  130. package/lib/control/app-menu/app-menu.css +1 -1
  131. package/lib/control/app-menu/custom-menu-design/custom-menu-design.cjs +10 -2
  132. package/lib/control/calendar/calendar.cjs +42 -10
  133. package/lib/control/calendar/calendar.css +1 -1
  134. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.cjs +2 -1
  135. package/lib/control/data-view/data-view.cjs +21 -3
  136. package/lib/control/data-view/data-view.css +1 -1
  137. package/lib/control/drbar/drbar.controller.cjs +1 -1
  138. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  139. package/lib/control/drtab/drtab.cjs +67 -8
  140. package/lib/control/drtab/drtab.controller.cjs +26 -2
  141. package/lib/control/drtab/drtab.css +1 -1
  142. package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +1 -1
  143. package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
  144. package/lib/control/gantt/gantt.cjs +80 -23
  145. package/lib/control/gantt/gantt.css +1 -1
  146. package/lib/control/grid/grid/grid-control.util.cjs +2 -2
  147. package/lib/control/grid/grid/grid.cjs +75 -71
  148. package/lib/control/grid/grid/grid.css +1 -1
  149. package/lib/control/list/list.cjs +23 -5
  150. package/lib/control/list/list.css +1 -1
  151. package/lib/control/map/map.cjs +4 -0
  152. package/lib/control/search-bar/search-groups/search-groups.cjs +2 -2
  153. package/lib/control/toolbar/toolbar.cjs +3 -0
  154. package/lib/control/tree/el-tree-util.cjs +70 -0
  155. package/lib/control/tree/tree.cjs +58 -29
  156. package/lib/control/tree/tree.css +1 -1
  157. package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.cjs +21 -22
  158. package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.css +1 -1
  159. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +1 -0
  160. package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.cjs +3 -1
  161. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
  162. package/lib/locale/en/index.cjs +18 -1
  163. package/lib/locale/zh-CN/index.cjs +18 -1
  164. package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
  165. package/lib/panel-component/index-actions/index-actions.css +1 -1
  166. package/lib/panel-component/index.cjs +1 -0
  167. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.controller.cjs +7 -30
  168. package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.service.cjs +1 -1
  169. package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +7 -2
  170. package/lib/panel-component/panel-app-title/index.cjs +4 -0
  171. package/lib/panel-component/panel-app-title/panel-app-title.cjs +112 -108
  172. package/lib/panel-component/panel-app-title/panel-app-title.controller.cjs +8 -0
  173. package/lib/panel-component/panel-app-title/panel-app-title.css +1 -1
  174. package/lib/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
  175. package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
  176. package/lib/util/notification-util/notification-util.cjs +36 -0
  177. package/lib/util/notification-util/upload-manager/file-type.cjs +209 -0
  178. package/lib/util/notification-util/upload-manager/upload-manager.cjs +161 -0
  179. package/lib/util/notification-util/upload-manager/upload-manager.css +1 -0
  180. package/lib/util/pagination/use-pagination.cjs +5 -4
  181. package/lib/view-engine/tab-exp-view.engine.cjs +19 -0
  182. package/package.json +10 -10
  183. package/dist/index-VQ3FT6ih.js +0 -4
  184. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.35-alpha.1_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.38-alpha.16_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  185. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.35-alpha.1_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.38-alpha.16_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -40,10 +40,11 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
40
40
  setup(props, {
41
41
  emit
42
42
  }) {
43
+ var _a;
43
44
  const ns = vue3Util.useNamespace("action-toolbar");
44
45
  const dropdownRef = vue.ref();
45
46
  const popoverVisible = vue.ref(false);
46
- props.actionDetails.forEach((detail) => {
47
+ (_a = props.actionDetails) == null ? void 0 : _a.forEach((detail) => {
47
48
  if (detail.capLanguageRes && detail.capLanguageRes.lanResTag) {
48
49
  detail.caption = ibiz.i18n.t(detail.capLanguageRes.lanResTag, detail.caption);
49
50
  }
@@ -92,6 +93,7 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
92
93
  };
93
94
  },
94
95
  render() {
96
+ var _a;
95
97
  const details = this.actionDetails || [];
96
98
  const renderDivider = (isExpand) => {
97
99
  return vue.createVNode(vue.resolveComponent("el-divider"), {
@@ -102,7 +104,8 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
102
104
  };
103
105
  const renderActions = (items, isExpand = true) => {
104
106
  return items.map((detail) => {
105
- if (this.actionsState[detail.id].visible) {
107
+ var _a2;
108
+ if ((_a2 = this.actionsState[detail.id]) == null ? void 0 : _a2.visible) {
106
109
  return [detail.addSeparator && renderDivider(isExpand), vue.createVNode(vue.resolveComponent("el-button"), {
107
110
  "text": true,
108
111
  "size": "small",
@@ -162,7 +165,7 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
162
165
  default: () => [_slot]
163
166
  })];
164
167
  };
165
- if (!this.actionsState.visible) {
168
+ if (!((_a = this.actionsState) == null ? void 0 : _a.visible)) {
166
169
  return;
167
170
  }
168
171
  if (this.mode === "buttons") {
@@ -0,0 +1,118 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ var index = require('./provider/index.cjs');
6
+ require('./control-navigation.css');
7
+
8
+ "use strict";
9
+ const IBizControlNavigation = /* @__PURE__ */ vue.defineComponent({
10
+ name: "IBizControlNavigation",
11
+ props: {
12
+ controller: {
13
+ type: Object,
14
+ required: true
15
+ }
16
+ },
17
+ setup(props) {
18
+ var _a;
19
+ const ns = vue3Util.useNamespace("control-navigation");
20
+ const provider = index.getNavigationProvider(props.controller);
21
+ const outerWrapper = vue.ref(null);
22
+ const {
23
+ navViewPos,
24
+ controlParam,
25
+ navViewWidth,
26
+ navViewHeight,
27
+ navViewMinWidth,
28
+ navViewMaxWidth,
29
+ navViewMinHeight,
30
+ navViewMaxHeight
31
+ } = props.controller.model;
32
+ const navStyle = {
33
+ minWidth: navViewMinWidth ? navViewMinWidth > 0 ? "".concat(navViewMinWidth, "px") : navViewMinWidth : void 0,
34
+ maxWidth: navViewMaxWidth ? navViewMaxWidth > 0 ? "".concat(navViewMaxWidth, "px") : navViewMaxWidth : void 0,
35
+ minHeight: navViewMinHeight ? navViewMinHeight > 0 ? "".concat(navViewMinHeight, "px") : navViewMinHeight : void 0,
36
+ maxHeight: navViewMaxHeight ? navViewMaxHeight > 0 ? "".concat(navViewMaxHeight, "px") : navViewMaxHeight : void 0
37
+ };
38
+ const navViewMsg = vue.ref();
39
+ const navRenderMode = ((_a = controlParam == null ? void 0 : controlParam.ctrlParams) == null ? void 0 : _a.navRenderMode) ? controlParam.ctrlParams.navRenderMode : "RELOAD";
40
+ const splitValue = vue.ref(0.5);
41
+ const splitMode = vue.ref(["BOTTOM", "ANY_BOTTOM"].includes(navViewPos) ? "vertical" : "horizontal");
42
+ vue.watch(() => provider.navViewMsg.value, (newVal, oldVal) => {
43
+ if (navRenderMode === "REDRAW" || !newVal || oldVal && newVal.viewId !== oldVal.viewId) {
44
+ navViewMsg.value = newVal;
45
+ } else {
46
+ navViewMsg.value = {
47
+ context: newVal.context,
48
+ params: newVal.params,
49
+ viewId: newVal.viewId
50
+ };
51
+ }
52
+ }, {
53
+ deep: true,
54
+ immediate: true
55
+ });
56
+ vue.onMounted(() => {
57
+ if (outerWrapper.value) {
58
+ const offsetSize = splitMode.value === "horizontal" ? "offsetWidth" : "offsetHeight";
59
+ const size = outerWrapper.value[offsetSize];
60
+ const viewSize = splitMode.value === "horizontal" ? navViewWidth : navViewHeight;
61
+ if (viewSize) {
62
+ if (viewSize > 0 && viewSize < 1) {
63
+ splitValue.value = 1 - viewSize;
64
+ } else {
65
+ splitValue.value = "".concat(size - viewSize, "px");
66
+ }
67
+ }
68
+ }
69
+ });
70
+ const renderNavView = () => {
71
+ if (navViewMsg.value) {
72
+ return vue.h(vue.resolveComponent("IBizViewShell"), {
73
+ ...navViewMsg.value,
74
+ class: ns.e("nav-view")
75
+ });
76
+ }
77
+ };
78
+ return {
79
+ ns,
80
+ navStyle,
81
+ provider,
82
+ splitMode,
83
+ splitValue,
84
+ outerWrapper,
85
+ renderNavView
86
+ };
87
+ },
88
+ render() {
89
+ var _a, _b, _c, _d, _e;
90
+ const {
91
+ state,
92
+ model
93
+ } = this.controller;
94
+ return vue.createVNode("div", {
95
+ "ref": "outerWrapper",
96
+ "class": [this.ns.b(), this.ns.e((_a = model.controlType) == null ? void 0 : _a.toLowerCase())]
97
+ }, [state.enableNavView ? state.showNavView ? vue.createVNode(vue.resolveComponent("iBizNavSplit"), {
98
+ "modelValue": this.splitValue,
99
+ "onUpdate:modelValue": ($event) => this.splitValue = $event,
100
+ "mode": this.splitMode,
101
+ "min": this.splitMode === "horizontal" ? this.navStyle.minWidth : this.navStyle.minHeight,
102
+ "max": this.splitMode === "horizontal" ? this.navStyle.maxWidth : this.navStyle.maxHeight
103
+ }, {
104
+ left: () => {
105
+ var _a2, _b2;
106
+ return (_b2 = (_a2 = this.$slots).default) == null ? void 0 : _b2.call(_a2);
107
+ },
108
+ right: () => this.renderNavView(),
109
+ top: () => {
110
+ var _a2, _b2;
111
+ return (_b2 = (_a2 = this.$slots).default) == null ? void 0 : _b2.call(_a2);
112
+ },
113
+ bottom: () => this.renderNavView()
114
+ }) : (_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b) : (_e = (_d = this.$slots).default) == null ? void 0 : _e.call(_d)]);
115
+ }
116
+ });
117
+
118
+ exports.IBizControlNavigation = IBizControlNavigation;
@@ -0,0 +1 @@
1
+ .ibiz-control-navigation{width:100%;height:100%}.ibiz-control-navigation__nav-control{width:100%;height:100%;position:relative}
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ var navigationBase_provider = require('./navigation-base.provider.cjs');
4
+
5
+ "use strict";
6
+ var __defProp = Object.defineProperty;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __publicField = (obj, key, value) => {
9
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
10
+ return value;
11
+ };
12
+ class CalendarNavigationProvider extends navigationBase_provider.NavgationBaseProvider {
13
+ constructor() {
14
+ super(...arguments);
15
+ __publicField(this, "keyName", "navId");
16
+ }
17
+ onNavDataByStack() {
18
+ const { items } = this.controller.state;
19
+ const navData = this.navStack.map((key) => items.find((item) => item.navId === key)).find((item) => item !== void 0) || items[0];
20
+ if (navData) {
21
+ const date = new Date(navData.beginTime);
22
+ this.controller.setSelectDate(date);
23
+ this.controller.setNavData(navData);
24
+ } else {
25
+ this.navStack = [];
26
+ this.controller.setSelectDate(/* @__PURE__ */ new Date());
27
+ this.navViewMsg.value = void 0;
28
+ }
29
+ }
30
+ getNavViewMsg(item) {
31
+ const { sysCalendarItems } = this.model;
32
+ const itemModel = sysCalendarItems == null ? void 0 : sysCalendarItems.find(
33
+ (_item) => _item.itemType === item.itemType
34
+ );
35
+ if (itemModel) {
36
+ const { context, params } = this.prepareParams(
37
+ itemModel,
38
+ item.deData ? item.deData : item,
39
+ this.controller.context,
40
+ this.controller.params
41
+ );
42
+ return {
43
+ key: item.navId,
44
+ context,
45
+ params,
46
+ viewId: itemModel.navAppViewId
47
+ };
48
+ }
49
+ return {
50
+ key: item.navId,
51
+ context: this.controller.context,
52
+ params: this.controller.params
53
+ };
54
+ }
55
+ }
56
+
57
+ exports.CalendarNavigationProvider = CalendarNavigationProvider;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var navigationBase_provider = require('./navigation-base.provider.cjs');
4
+ var calendarNavigation_provider = require('./calendar-navigation.provider.cjs');
5
+ var treeNavigation_provider = require('./tree-navigation.provider.cjs');
6
+
7
+ "use strict";
8
+ function getNavigationProvider(controller) {
9
+ const { controlType } = controller.model;
10
+ if (controlType === "CALENDAR") {
11
+ return new calendarNavigation_provider.CalendarNavigationProvider(controller);
12
+ }
13
+ if (controlType === "TREEVIEW") {
14
+ return new treeNavigation_provider.TreeNavigationProvider(controller);
15
+ }
16
+ return new navigationBase_provider.NavgationBaseProvider(controller);
17
+ }
18
+
19
+ exports.getNavigationProvider = getNavigationProvider;
@@ -0,0 +1,144 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var runtime = require('@ibiz-template/runtime');
5
+
6
+ "use strict";
7
+ var __defProp = Object.defineProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __publicField = (obj, key, value) => {
10
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
11
+ return value;
12
+ };
13
+ class NavgationBaseProvider {
14
+ /**
15
+ * Creates an instance of NavgationBaseProvider.
16
+ * @param {MDControlController} controller
17
+ * @memberof NavgationBaseProvider
18
+ */
19
+ constructor(controller) {
20
+ this.controller = controller;
21
+ /**
22
+ * 导航栈数据
23
+ *
24
+ * @type {string[]}
25
+ * @memberof NavgationBaseProvider
26
+ */
27
+ __publicField(this, "navStack", []);
28
+ /**
29
+ * 主键名称
30
+ *
31
+ * @memberof NavgationBaseProvider
32
+ */
33
+ __publicField(this, "keyName", "srfkey");
34
+ /**
35
+ * 模型
36
+ *
37
+ * @type {IMDControl}
38
+ * @memberof NavgationBaseProvider
39
+ */
40
+ __publicField(this, "model");
41
+ /**
42
+ * 导航视图信息
43
+ *
44
+ * @type {(Ref<INavViewMsg | undefined>)}
45
+ * @memberof NavgationBaseProvider
46
+ */
47
+ __publicField(this, "navViewMsg", vue.ref());
48
+ this.model = controller.model;
49
+ if (controller.state.enableNavView) {
50
+ controller.evt.on("onNavDataChange", (evt) => {
51
+ this.onNavDataChange(evt);
52
+ });
53
+ controller.evt.on("onLoadSuccess", () => {
54
+ this.onNavDataByStack();
55
+ });
56
+ }
57
+ }
58
+ /**
59
+ * 解析参数
60
+ *
61
+ * @param {(INavigatable & { appDataEntityId?: string })} XDataModel
62
+ * @param {IData} data
63
+ * @param {IContext} context
64
+ * @param {IParams} params
65
+ * @return {*} {{ context: IContext; params: IParams }}
66
+ * @memberof NavgationBaseProvider
67
+ */
68
+ prepareParams(XDataModel, data, context, params) {
69
+ const {
70
+ navDER,
71
+ navFilter,
72
+ navigateContexts,
73
+ navigateParams,
74
+ appDataEntityId
75
+ } = XDataModel;
76
+ const model = {
77
+ deName: appDataEntityId ? runtime.calcDeCodeNameById(appDataEntityId) : void 0,
78
+ navFilter,
79
+ pickupDEFName: navDER == null ? void 0 : navDER.pickupDEFName,
80
+ navContexts: navigateContexts,
81
+ navParams: navigateParams
82
+ };
83
+ const originParams = {
84
+ context,
85
+ params,
86
+ data
87
+ };
88
+ const { resultContext, resultParams } = runtime.calcNavParams(model, originParams);
89
+ const tempContext = Object.assign(context.clone(), resultContext);
90
+ const tempParams = { ...resultParams };
91
+ return { context: tempContext, params: tempParams };
92
+ }
93
+ /**
94
+ * 通过栈数据导航
95
+ *
96
+ * @memberof NavgationBaseProvider
97
+ */
98
+ onNavDataByStack() {
99
+ const { items } = this.controller.state;
100
+ const navData = this.navStack.map((key) => items.find((item) => item[this.keyName] === key)).find((item) => item !== void 0) || items[0];
101
+ setTimeout(() => {
102
+ if (navData) {
103
+ this.controller.setNavData(navData);
104
+ this.controller.setSelection([navData]);
105
+ } else {
106
+ this.navStack = [];
107
+ this.controller.setSelection([]);
108
+ this.navViewMsg.value = void 0;
109
+ }
110
+ });
111
+ }
112
+ /**
113
+ * 导航数据变化
114
+ *
115
+ * @param {IMDControlEvent['onNavDataChange']['event']} event
116
+ * @memberof NavgationBaseProvider
117
+ */
118
+ onNavDataChange(event) {
119
+ const { navData, context, params } = event;
120
+ this.navStack.unshift(navData[this.keyName]);
121
+ this.navViewMsg.value = this.getNavViewMsg(navData, context, params);
122
+ }
123
+ /**
124
+ * 获取导航视图信息
125
+ *
126
+ * @param {IData} data
127
+ * @param {IContext} context
128
+ * @param {IParams} params
129
+ * @return {*} {INavViewMsg}
130
+ * @memberof NavgationBaseProvider
131
+ */
132
+ getNavViewMsg(data, context, params) {
133
+ const viewModelId = this.model.navAppViewId;
134
+ const result = this.prepareParams(this.model, data, context, params);
135
+ return {
136
+ key: data[this.keyName],
137
+ context: result.context,
138
+ params: result.params,
139
+ viewId: viewModelId
140
+ };
141
+ }
142
+ }
143
+
144
+ exports.NavgationBaseProvider = NavgationBaseProvider;
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ var navigationBase_provider = require('./navigation-base.provider.cjs');
4
+
5
+ "use strict";
6
+ var __defProp = Object.defineProperty;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __publicField = (obj, key, value) => {
9
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
10
+ return value;
11
+ };
12
+ class TreeNavigationProvider extends navigationBase_provider.NavgationBaseProvider {
13
+ /**
14
+ * Creates an instance of TreeNavigationProvider.
15
+ * @param {MDControlController} controller
16
+ * @memberof TreeNavigationProvider
17
+ */
18
+ constructor(controller) {
19
+ super(controller);
20
+ __publicField(this, "keyName", "_id");
21
+ /**
22
+ * 有导航视图的节点标识
23
+ *
24
+ * @type {string[]}
25
+ * @memberof TreeNavigationProvider
26
+ */
27
+ __publicField(this, "navNodeModelIds", []);
28
+ const { detreeNodes } = this.model;
29
+ detreeNodes == null ? void 0 : detreeNodes.forEach((node) => {
30
+ if (node.navAppViewId) {
31
+ this.navNodeModelIds.push(node.id);
32
+ }
33
+ });
34
+ }
35
+ onNavDataByStack() {
36
+ const { items, rootNodes } = this.controller.state;
37
+ const defaultNav = items.find((node) => {
38
+ if (!this.model.rootVisible && rootNodes.includes(node)) {
39
+ return false;
40
+ }
41
+ return this.navNodeModelIds.includes(node._nodeId);
42
+ });
43
+ const navData = this.navStack.map((key) => items.find((item) => item._id === key)).find((item) => item !== void 0) || defaultNav;
44
+ if (navData) {
45
+ this.controller.setSelection([navData]);
46
+ this.controller.setNavData(navData);
47
+ } else {
48
+ this.navStack = [];
49
+ this.controller.setSelection([]);
50
+ this.navViewMsg.value = void 0;
51
+ }
52
+ }
53
+ getNavViewMsg(item) {
54
+ const { detreeNodes } = this.model;
55
+ const nodeModel = detreeNodes == null ? void 0 : detreeNodes.find((node) => node.id === item._nodeId);
56
+ const _context = Object.assign(
57
+ this.controller.context.clone(),
58
+ item._context || {}
59
+ );
60
+ const _params = { ...this.controller.params, ...item._params || {} };
61
+ if (nodeModel) {
62
+ const { context, params } = this.prepareParams(
63
+ nodeModel,
64
+ item._deData ? item._deData : item,
65
+ _context,
66
+ _params
67
+ );
68
+ return {
69
+ key: item._id,
70
+ context,
71
+ params,
72
+ viewId: nodeModel.navAppViewId
73
+ };
74
+ }
75
+ return {
76
+ key: item._id,
77
+ context: _context,
78
+ params: _params
79
+ };
80
+ }
81
+ }
82
+
83
+ exports.TreeNavigationProvider = TreeNavigationProvider;
@@ -386,17 +386,9 @@ const predefineThemeVars = [
386
386
  className: "ibiz-panel-app-header"
387
387
  },
388
388
  {
389
- label: "\u60AC\u6D6E\u8272",
389
+ label: "\u9009\u4E2D\u8272",
390
390
  value: "--ibiz-panel-app-header-horizontal-hover-bg-color",
391
391
  defaultValue: "--ibiz-color-primary-hover",
392
- labelLang: "topHoverBgColor",
393
- descLang: "topHoverBgColorDesc",
394
- className: "ibiz-panel-app-header"
395
- },
396
- {
397
- label: "\u9009\u4E2D\u8272",
398
- value: "--ibiz-panel-app-header-horizontal-select-bg-color",
399
- defaultValue: "--ibiz-color-primary-active",
400
392
  labelLang: "topSelectBgColor",
401
393
  descLang: "topSelectBgColorDesc",
402
394
  className: "ibiz-panel-app-header"
@@ -425,16 +417,16 @@ const predefineThemeVars = [
425
417
  },
426
418
  {
427
419
  label: "\u60AC\u6D6E\u8272",
428
- value: "--ibiz-panel-app-header-hover-bg-color",
429
- defaultValue: "--ibiz-color-primary-hover",
420
+ value: "--ibiz-panel-app-header-select-bg-color",
421
+ defaultValue: "--ibiz-color-primary-active",
430
422
  labelLang: "sidebarHoverBgColor",
431
423
  descLang: "sidebarHoverBgColorDesc",
432
424
  className: "ibiz-panel-app-header"
433
425
  },
434
426
  {
435
427
  label: "\u9009\u4E2D\u8272",
436
- value: "--ibiz-panel-app-header-select-bg-color",
437
- defaultValue: "--ibiz-color-primary-active",
428
+ value: "--ibiz-panel-app-header-hover-bg-color",
429
+ defaultValue: "--ibiz-color-primary-hover",
438
430
  labelLang: "sidebarSelectBgColor",
439
431
  descLang: "sidebarSelectBgColorDesc",
440
432
  className: "ibiz-panel-app-header"