@ibiz-template/vue3-components 0.5.7-alpha.3 → 0.5.7-alpha.5

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 (124) hide show
  1. package/dist/ibiz-markdown-editor-anJxfRF1.js +1 -0
  2. package/dist/index--KqYDzjn.js +2 -0
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.system.min.js +1 -1
  5. package/dist/wang-editor-R2mUYWuB.js +1 -0
  6. package/dist/{xlsx-util-15YjErDj.js → xlsx-util-74o5wGKy.js} +1 -1
  7. package/es/common/data-import2/data-import2.mjs +7 -1
  8. package/es/common/doing-notice/doing-notice.css +1 -0
  9. package/es/common/doing-notice/doing-notice.d.ts +19 -0
  10. package/es/common/doing-notice/doing-notice.mjs +38 -0
  11. package/es/common/index.d.ts +1 -0
  12. package/es/common/index.mjs +3 -1
  13. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +236 -0
  14. package/es/control/dashboard/dashboard-design/dashboard-design.d.ts +2 -0
  15. package/es/control/form/form-detail/form-button/form-button.mjs +2 -1
  16. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +2124 -0
  17. package/es/control/grid/grid/grid-control.util.mjs +4 -0
  18. package/es/control/search-bar/filter-tree/filter-tree.d.ts +45 -14
  19. package/es/control/search-bar/filter-tree/filter-tree.mjs +42 -21
  20. package/es/control/search-bar/search-bar.mjs +8 -2
  21. package/es/editor/html/html-editor.controller.d.ts +0 -26
  22. package/es/editor/html/html-editor.controller.mjs +1 -64
  23. package/es/editor/html/wang-editor/wang-editor.mjs +1 -1
  24. package/es/editor/index.mjs +8 -0
  25. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +5 -17
  26. package/es/editor/markdown/markdown-editor.controller.d.ts +0 -26
  27. package/es/editor/markdown/markdown-editor.controller.mjs +2 -64
  28. package/es/editor/span/span/span.d.ts +2 -0
  29. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +2 -2
  30. package/es/editor/upload/upload-editor.controller.d.ts +0 -26
  31. package/es/editor/upload/upload-editor.controller.mjs +2 -64
  32. package/es/editor/upload/use/use-ibiz-upload.mjs +6 -1
  33. package/es/editor/upload/use/use-iview-upload.mjs +7 -2
  34. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.controller.d.ts +46 -0
  35. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.controller.mjs +93 -0
  36. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.css +1 -0
  37. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.d.ts +81 -0
  38. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.mjs +187 -0
  39. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.d.ts +17 -0
  40. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.mjs +22 -0
  41. package/es/editor/user/ibiz-searchcond-edit/index.d.ts +3 -0
  42. package/es/editor/user/ibiz-searchcond-edit/index.mjs +5 -0
  43. package/es/editor/user/index.d.ts +1 -0
  44. package/es/editor/user/index.mjs +6 -0
  45. package/es/index.mjs +2 -0
  46. package/es/panel-component/user-message/async-action/async-action/async-action.d.ts +18 -4
  47. package/es/panel-component/user-message/async-action/async-action/async-action.mjs +34 -15
  48. package/es/panel-component/user-message/async-action/async-action/async-action.provider.d.ts +35 -2
  49. package/es/panel-component/user-message/async-action/async-action/async-action.provider.mjs +9 -2
  50. package/es/panel-component/user-message/async-action/async-action-tab/async-action-tab.d.ts +11 -51
  51. package/es/panel-component/user-message/async-action/async-action-tab/async-action-tab.mjs +22 -44
  52. package/es/panel-component/user-message/index.d.ts +1 -0
  53. package/es/panel-component/user-message/index.mjs +7 -0
  54. package/es/panel-component/user-message/internal-message/index.d.ts +2 -0
  55. package/es/panel-component/user-message/internal-message/index.mjs +2 -0
  56. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.css +1 -1
  57. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.mjs +6 -5
  58. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.d.ts +19 -3
  59. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.mjs +9 -3
  60. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.css +1 -0
  61. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.d.ts +35 -0
  62. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.mjs +80 -0
  63. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.d.ts +40 -0
  64. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.mjs +55 -0
  65. package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.css +1 -1
  66. package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.d.ts +10 -1
  67. package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.mjs +18 -34
  68. package/es/panel-component/user-message/user-message.d.ts +1 -0
  69. package/es/panel-component/user-message/user-message.mjs +4 -0
  70. package/es/util/app-popover/app-popover-component.d.ts +4 -2
  71. package/es/util/app-popover/app-popover-component.mjs +6 -2
  72. package/es/util/index.d.ts +1 -0
  73. package/es/util/index.mjs +1 -0
  74. package/es/util/notice-util/notice-util.d.ts +13 -0
  75. package/es/util/notice-util/notice-util.mjs +62 -0
  76. package/es/util/open-view-util/open-view-util.d.ts +10 -9
  77. package/es/util/open-view-util/open-view-util.mjs +6 -6
  78. package/es/util/overlay-controller/overlay-controller.d.ts +3 -2
  79. package/lib/common/data-import2/data-import2.cjs +7 -1
  80. package/lib/common/doing-notice/doing-notice.cjs +40 -0
  81. package/lib/common/doing-notice/doing-notice.css +1 -0
  82. package/lib/common/index.cjs +3 -0
  83. package/lib/control/form/form-detail/form-button/form-button.cjs +2 -1
  84. package/lib/control/grid/grid/grid-control.util.cjs +4 -0
  85. package/lib/control/search-bar/filter-tree/filter-tree.cjs +41 -20
  86. package/lib/control/search-bar/search-bar.cjs +8 -2
  87. package/lib/editor/html/html-editor.controller.cjs +0 -63
  88. package/lib/editor/html/wang-editor/wang-editor.cjs +1 -1
  89. package/lib/editor/index.cjs +8 -0
  90. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +5 -17
  91. package/lib/editor/markdown/markdown-editor.controller.cjs +0 -62
  92. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +2 -2
  93. package/lib/editor/upload/upload-editor.controller.cjs +0 -62
  94. package/lib/editor/upload/use/use-ibiz-upload.cjs +6 -1
  95. package/lib/editor/upload/use/use-iview-upload.cjs +7 -2
  96. package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs +189 -0
  97. package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.controller.cjs +95 -0
  98. package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.css +1 -0
  99. package/lib/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.cjs +24 -0
  100. package/lib/editor/user/ibiz-searchcond-edit/index.cjs +11 -0
  101. package/lib/editor/user/index.cjs +12 -0
  102. package/lib/index.cjs +4 -0
  103. package/lib/panel-component/user-message/async-action/async-action/async-action.cjs +34 -15
  104. package/lib/panel-component/user-message/async-action/async-action/async-action.provider.cjs +9 -2
  105. package/lib/panel-component/user-message/async-action/async-action-tab/async-action-tab.cjs +20 -42
  106. package/lib/panel-component/user-message/index.cjs +7 -0
  107. package/lib/panel-component/user-message/internal-message/index.cjs +4 -0
  108. package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.cjs +6 -5
  109. package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.css +1 -1
  110. package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.cjs +9 -3
  111. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.cjs +82 -0
  112. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.css +1 -0
  113. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.cjs +57 -0
  114. package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.cjs +17 -33
  115. package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.css +1 -1
  116. package/lib/panel-component/user-message/user-message.cjs +4 -0
  117. package/lib/util/app-popover/app-popover-component.cjs +6 -2
  118. package/lib/util/index.cjs +2 -0
  119. package/lib/util/notice-util/notice-util.cjs +64 -0
  120. package/lib/util/open-view-util/open-view-util.cjs +6 -6
  121. package/package.json +6 -6
  122. package/dist/ibiz-markdown-editor-RaswfMqH.js +0 -1
  123. package/dist/index-5ErnlgZ5.js +0 -2
  124. package/dist/wang-editor-8iEE3iXJ.js +0 -1
@@ -1,12 +1,17 @@
1
- import { ref, reactive, resolveComponent, h, createVNode, createTextVNode, defineComponent } from 'vue';
1
+ import { ref, reactive, createVNode, createTextVNode, defineComponent } from 'vue';
2
2
  import { useNamespace } from '@ibiz-template/vue3-util';
3
3
  import { getInternalMessageProvider } from '@ibiz-template/runtime';
4
4
  import './internal-message-tab.css';
5
+ import { clone } from 'ramda';
5
6
 
6
7
  "use strict";
7
8
  const InternalMessageTab = /* @__PURE__ */ defineComponent({
8
9
  name: "IBizInternalMessageTab",
9
10
  props: {
11
+ controller: {
12
+ type: Object,
13
+ required: true
14
+ },
10
15
  showPopover: {
11
16
  type: Boolean,
12
17
  required: true
@@ -22,38 +27,22 @@ const InternalMessageTab = /* @__PURE__ */ defineComponent({
22
27
  const hiddenPopover = () => {
23
28
  emit("hiddenPopover");
24
29
  };
30
+ const c = props.controller;
25
31
  const allItems = ref([]);
26
32
  const state = reactive({
27
33
  total: 0,
28
- curPage: 0,
29
- pageSize: 20
34
+ pageSize: 0
30
35
  });
31
- const load = async (params) => {
32
- const res = await ibiz.internalMessage.fetch({
33
- page: 0,
34
- size: state.pageSize,
35
- ...params
36
- });
37
- if (res.ok) {
38
- if (typeof res.total === "number") {
39
- state.total = res.total;
40
- }
41
- if (typeof res.page === "number") {
42
- state.curPage = res.page;
43
- }
44
- if (state.curPage === 0) {
45
- allItems.value = res.data;
46
- } else {
47
- allItems.value.push(...res.data);
48
- }
49
- }
36
+ const updateData = () => {
37
+ allItems.value = clone(c.messages);
38
+ state.total = c.total;
39
+ state.pageSize = c.size;
50
40
  };
41
+ updateData();
42
+ c.evt.on("dataChange", updateData);
51
43
  const showMore = () => {
52
- load({
53
- page: state.curPage + 1
54
- });
44
+ c.loadMore();
55
45
  };
56
- load();
57
46
  return {
58
47
  ns,
59
48
  allItems,
@@ -74,15 +63,10 @@ const InternalMessageTab = /* @__PURE__ */ defineComponent({
74
63
  ibiz.log.error(error);
75
64
  }
76
65
  if (provider) {
77
- return h(resolveComponent(provider.component), {
66
+ return provider.render({
78
67
  class: this.ns.e("item"),
79
- onClick: (event) => {
80
- const isClose = provider.onClick(msg, event);
81
- if (isClose) {
82
- this.hiddenPopover();
83
- }
84
- },
85
- message: msg
68
+ message: msg,
69
+ onClose: this.hiddenPopover
86
70
  });
87
71
  }
88
72
  return createVNode("div", {
@@ -14,6 +14,7 @@ export declare const UserMessage: import("vue").DefineComponent<{
14
14
  }, {
15
15
  ns: import("@ibiz-template/core").Namespace;
16
16
  c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
17
+ noticeController: import("@ibiz-template/runtime").INoticeController;
17
18
  noticeNum: import("vue").Ref<number>;
18
19
  popoverRef: import("vue").Ref<any>;
19
20
  showPopover: import("vue").Ref<boolean>;
@@ -22,6 +22,7 @@ const UserMessage = /* @__PURE__ */ defineComponent({
22
22
  setup(props) {
23
23
  const ns = useNamespace("user-message");
24
24
  const c = props.controller;
25
+ const noticeController = ibiz.hub.notice;
25
26
  const showPopover = ref(false);
26
27
  const currentTab = ref("notification");
27
28
  const sysImage = props.modelData.sysImage || {
@@ -35,6 +36,7 @@ const UserMessage = /* @__PURE__ */ defineComponent({
35
36
  return {
36
37
  ns,
37
38
  c,
39
+ noticeController,
38
40
  noticeNum,
39
41
  popoverRef,
40
42
  showPopover,
@@ -78,6 +80,7 @@ const UserMessage = /* @__PURE__ */ defineComponent({
78
80
  "name": "notification"
79
81
  }, {
80
82
  default: () => [createVNode(InternalMessageTab, {
83
+ "controller": this.noticeController.internalMessage,
81
84
  "showPopover": this.showPopover,
82
85
  "onHiddenPopover": this.hiddenPopover
83
86
  }, null)]
@@ -86,6 +89,7 @@ const UserMessage = /* @__PURE__ */ defineComponent({
86
89
  "name": "async-action"
87
90
  }, {
88
91
  default: () => [createVNode(AsyncActionTab, {
92
+ "controller": this.noticeController.asyncAction,
89
93
  "showPopover": this.showPopover,
90
94
  "onHiddenPopover": this.hiddenPopover
91
95
  }, null)]
@@ -1,7 +1,9 @@
1
+ import { ComputePositionConfig } from '@floating-ui/dom';
1
2
  import { IPopoverOptions } from '@ibiz-template/runtime';
2
3
  import { OverlayPopoverContainer } from '@ibiz-template/vue3-util';
3
4
  import { VNode } from 'vue';
4
5
  import './app-popover-component.scss';
6
+ export type FloatingUIConfig = Partial<ComputePositionConfig>;
5
7
  /**
6
8
  * 创建飘窗
7
9
  *
@@ -9,7 +11,7 @@ import './app-popover-component.scss';
9
11
  * @date 2022-12-29 15:12:59
10
12
  * @export
11
13
  * @param {() => VNode} render
12
- * @param {IPopoverOptions} [opts]
14
+ * @param {IPopoverOptions<FloatingUIConfig>} [opts]
13
15
  * @return {*} {OverlayPopoverContainer}
14
16
  */
15
- export declare function createPopover(render: () => VNode, opts?: IPopoverOptions): OverlayPopoverContainer;
17
+ export declare function createPopover(render: () => VNode, opts?: IPopoverOptions<FloatingUIConfig>): OverlayPopoverContainer;
@@ -12,11 +12,15 @@ async function computePos(element, el, arrEl, opts) {
12
12
  element: arrEl
13
13
  }));
14
14
  }
15
- const options = await computePosition(element, el, {
15
+ const config = {
16
16
  placement: opts.placement,
17
17
  strategy: "absolute",
18
18
  middleware: middlewareArr
19
- });
19
+ };
20
+ if (opts.options) {
21
+ Object.assign(config, opts.options);
22
+ }
23
+ const options = await computePosition(element, el, config);
20
24
  {
21
25
  const {
22
26
  x,
@@ -6,3 +6,4 @@ export { NotificationUtil } from './notification-util/notification-util';
6
6
  export { OpenViewUtil } from './open-view-util/open-view-util';
7
7
  export { OverlayController } from './overlay-controller/overlay-controller';
8
8
  export { usePagination } from './pagination/use-pagination';
9
+ export { NoticeUtil } from './notice-util/notice-util';
package/es/util/index.mjs CHANGED
@@ -6,5 +6,6 @@ export { NotificationUtil } from './notification-util/notification-util.mjs';
6
6
  export { OpenViewUtil } from './open-view-util/open-view-util.mjs';
7
7
  export { OverlayController } from './overlay-controller/overlay-controller.mjs';
8
8
  export { usePagination } from './pagination/use-pagination.mjs';
9
+ export { NoticeUtil } from './notice-util/notice-util.mjs';
9
10
 
10
11
  "use strict";
@@ -0,0 +1,13 @@
1
+ import { IPortalAsyncAction } from '@ibiz-template/core';
2
+ import { INoticeUtil } from '@ibiz-template/runtime';
3
+ export declare class NoticeUtil implements INoticeUtil {
4
+ doingNotice?: {
5
+ info: IData;
6
+ close: () => void;
7
+ };
8
+ showAsyncAction(asyncAction: IPortalAsyncAction): Promise<void>;
9
+ showDoingNotice(info: {
10
+ num: number;
11
+ }): void;
12
+ closeDoingNotice(): void;
13
+ }
@@ -0,0 +1,62 @@
1
+ import { getAsyncActionProvider } from '@ibiz-template/runtime';
2
+ import { ElNotification } from 'element-plus';
3
+ import { reactive, h } from 'vue';
4
+ import { useNamespace } from '@ibiz-template/vue3-util';
5
+ import '../../common/index.mjs';
6
+ import { DoingNotice } from '../../common/doing-notice/doing-notice.mjs';
7
+
8
+ "use strict";
9
+ var __defProp = Object.defineProperty;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __publicField = (obj, key, value) => {
12
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
13
+ return value;
14
+ };
15
+ class NoticeUtil {
16
+ constructor() {
17
+ __publicField(this, "doingNotice");
18
+ }
19
+ async showAsyncAction(asyncAction) {
20
+ const ns = useNamespace("async-action-notice");
21
+ const porvider = await getAsyncActionProvider(asyncAction);
22
+ if (porvider.render) {
23
+ const ins = ElNotification({
24
+ customClass: ns.b(),
25
+ message: porvider.render({
26
+ action: asyncAction,
27
+ onClose: () => {
28
+ ins.close();
29
+ }
30
+ }),
31
+ position: "bottom-right",
32
+ duration: 0
33
+ });
34
+ }
35
+ }
36
+ showDoingNotice(info) {
37
+ if (!this.doingNotice) {
38
+ const reactiveInfo = reactive(info);
39
+ const ins = ElNotification({
40
+ message: h(DoingNotice, {
41
+ info: reactiveInfo
42
+ }),
43
+ onClose: () => {
44
+ this.closeDoingNotice();
45
+ },
46
+ position: "bottom-right",
47
+ duration: 0
48
+ });
49
+ this.doingNotice = { info: reactiveInfo, close: () => ins.close() };
50
+ } else {
51
+ Object.assign(this.doingNotice.info, info);
52
+ }
53
+ }
54
+ closeDoingNotice() {
55
+ if (this.doingNotice) {
56
+ this.doingNotice.close();
57
+ this.doingNotice = void 0;
58
+ }
59
+ }
60
+ }
61
+
62
+ export { NoticeUtil };
@@ -1,5 +1,6 @@
1
- import { IModalData, IOpenViewUtil } from '@ibiz-template/runtime';
1
+ import { IModalData, IOpenViewUtil, IPopoverOptions } from '@ibiz-template/runtime';
2
2
  import { Router } from 'vue-router';
3
+ import { FloatingUIConfig } from '../app-popover/app-popover-component';
3
4
  /**
4
5
  * 打开视图方式工具类
5
6
  *
@@ -22,22 +23,22 @@ export declare class OpenViewUtil implements IOpenViewUtil {
22
23
  * @author lxm
23
24
  * @date 2022-09-12 01:09:06
24
25
  * @param {string} appViewId
25
- * @param {(IContext | undefined)} [context]
26
- * @param {(IParams | undefined)} [params]
26
+ * @param {(IContext)} [context]
27
+ * @param {(IParams)} [params]
27
28
  * @returns {*} {Promise<IModalData>}
28
29
  */
29
- modal(appViewId: string, context: IContext, params?: IParams | undefined): Promise<IModalData>;
30
- popover(appViewId: string, event: MouseEvent, context: IContext, params?: IParams | undefined): Promise<IModalData>;
30
+ modal(appViewId: string, context: IContext, params?: IParams): Promise<IModalData>;
31
+ popover(appViewId: string, event: MouseEvent, context: IContext, params?: IParams, options?: IPopoverOptions<FloatingUIConfig>): Promise<IModalData>;
31
32
  /**
32
33
  * 抽屉打开视图
33
34
  *
34
35
  * @author lxm
35
36
  * @date 2022-09-15 15:09:50
36
37
  * @param {string} appViewId
37
- * @param {(IContext | undefined)} [context]
38
- * @param {(IParams | undefined)} [params]
38
+ * @param {(IContext)} [context]
39
+ * @param {(IParams)} [params]
39
40
  * @returns {*} {Promise<IModalData>}
40
41
  */
41
- drawer(appViewId: string, context: IContext, params?: IParams | undefined): Promise<IModalData>;
42
- custom(appViewId: string, context: IContext, params?: IParams | undefined): Promise<IModalData>;
42
+ drawer(appViewId: string, context: IContext, params?: IParams): Promise<IModalData>;
43
+ custom(appViewId: string, context: IContext, params?: IParams): Promise<IModalData>;
43
44
  }
@@ -35,8 +35,8 @@ class OpenViewUtil {
35
35
  * @author lxm
36
36
  * @date 2022-09-12 01:09:06
37
37
  * @param {string} appViewId
38
- * @param {(IContext | undefined)} [context]
39
- * @param {(IParams | undefined)} [params]
38
+ * @param {(IContext)} [context]
39
+ * @param {(IParams)} [params]
40
40
  * @returns {*} {Promise<IModalData>}
41
41
  */
42
42
  async modal(appViewId, context, params) {
@@ -55,7 +55,7 @@ class OpenViewUtil {
55
55
  opts
56
56
  );
57
57
  }
58
- async popover(appViewId, event, context, params) {
58
+ async popover(appViewId, event, context, params, options = {}) {
59
59
  const appView = await ibiz.hub.config.view.get(appViewId);
60
60
  return openViewPopover(
61
61
  event,
@@ -64,7 +64,7 @@ class OpenViewUtil {
64
64
  params,
65
65
  viewId: appView.id
66
66
  },
67
- { autoClose: true, placement: "bottom" }
67
+ { autoClose: true, placement: "bottom", ...options }
68
68
  );
69
69
  }
70
70
  /**
@@ -73,8 +73,8 @@ class OpenViewUtil {
73
73
  * @author lxm
74
74
  * @date 2022-09-15 15:09:50
75
75
  * @param {string} appViewId
76
- * @param {(IContext | undefined)} [context]
77
- * @param {(IParams | undefined)} [params]
76
+ * @param {(IContext)} [context]
77
+ * @param {(IParams)} [params]
78
78
  * @returns {*} {Promise<IModalData>}
79
79
  */
80
80
  async drawer(appViewId, context, params) {
@@ -1,4 +1,5 @@
1
1
  import { IOverlayController, IDrawerOptions, IPopoverOptions, IModalOptions, IOverlayContainer, IOverlayPopoverContainer, IFloatWindowOptions } from '@ibiz-template/runtime';
2
+ import { FloatingUIConfig } from '../app-popover/app-popover-component';
2
3
  /**
3
4
  * 用不同呈现方式绘制组件的通用工具类
4
5
  *
@@ -9,8 +10,8 @@ import { IOverlayController, IDrawerOptions, IPopoverOptions, IModalOptions, IOv
9
10
  * @implements {IOverlayController}
10
11
  */
11
12
  export declare class OverlayController implements IOverlayController {
12
- popover<T = void>(element: HTMLElement, component: unknown, props?: IParams, opts?: IPopoverOptions): Promise<T>;
13
- createPopover(component: unknown, props?: IParams, opts?: IPopoverOptions): IOverlayPopoverContainer;
13
+ popover<T = void>(element: HTMLElement, component: unknown, props?: IParams, opts?: IPopoverOptions<FloatingUIConfig>): Promise<T>;
14
+ createPopover(component: unknown, props?: IParams, opts?: IPopoverOptions<FloatingUIConfig>): IOverlayPopoverContainer;
14
15
  drawer<T = void>(component: unknown, props?: IParams, opts?: IDrawerOptions): Promise<T>;
15
16
  createDrawer(component: unknown, props?: IParams, opts?: IDrawerOptions): IOverlayContainer;
16
17
  modal<T = void>(component: unknown, props?: IParams, opts?: IModalOptions): Promise<T>;
@@ -282,7 +282,13 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
282
282
  Authorization: "Bearer ".concat(qxUtil.getCookie(core.CoreConst.TOKEN))
283
283
  });
284
284
  const UploadUrl = vue.computed(() => {
285
- let uploadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.uploadFileUrl, "/temp");
285
+ let uploadFileUrl;
286
+ if (ibiz.env.uploadFileUrl.indexOf("{cat}") !== -1) {
287
+ uploadFileUrl = ibiz.env.uploadFileUrl.replace("/{cat}", "/temp");
288
+ } else {
289
+ uploadFileUrl = "".concat(ibiz.env.uploadFileUrl, "/temp");
290
+ }
291
+ let uploadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(uploadFileUrl);
286
292
  uploadUrl += qs.stringify({
287
293
  preview: true
288
294
  }, {
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ require('./doing-notice.css');
6
+
7
+ "use strict";
8
+ const DoingNotice = /* @__PURE__ */ vue.defineComponent({
9
+ name: "DoingNotice",
10
+ props: {
11
+ info: {
12
+ type: Object,
13
+ required: true
14
+ }
15
+ },
16
+ setup() {
17
+ const ns = vue3Util.useNamespace("doing-notice");
18
+ return {
19
+ ns
20
+ };
21
+ },
22
+ render() {
23
+ return vue.createVNode("div", {
24
+ "class": [this.ns.b()]
25
+ }, [vue.createVNode("span", {
26
+ "class": this.ns.e("text")
27
+ }, [vue.createTextVNode("\u6709"), vue.createVNode("span", {
28
+ "class": this.ns.e("num")
29
+ }, [this.info.num]), vue.createTextVNode("\u4E2A\u5F02\u6B65\u64CD\u4F5C\u6B63\u5728\u6267\u884C\uFF0C\u8BF7\u7A0D\u540E")]), vue.createVNode("svg", {
30
+ "class": this.ns.e("loading-icon"),
31
+ "viewBox": "-10, -10, 50, 50"
32
+ }, [vue.createVNode("path", {
33
+ "class": "path",
34
+ "d": "M 30 15 L 28 17 M 25.61 25.61 A 15 15, 0, 0, 1, 15 30 A 15 15, 0, 1, 1, 27.99 7.5 L 15 15",
35
+ "style": "stroke-width: 4px; fill: rgba(0, 0, 0, 0)"
36
+ }, null)])]);
37
+ }
38
+ });
39
+
40
+ exports.DoingNotice = DoingNotice;
@@ -0,0 +1 @@
1
+ .ibiz-async-action-notice.el-notification{width:auto}.ibiz-async-action-notice.el-notification .el-notification__group{margin:0}.ibiz-async-action-notice.el-notification .el-notification__closeBtn{top:5px;right:5px}.ibiz-doing-notice__text{margin-right:8px}.ibiz-doing-notice__num{margin:0 8px;font-size:18px;font-weight:700;color:var(--ibiz-color-danger)}.ibiz-doing-notice__loading-icon{width:18px;height:18px;margin-right:6px;vertical-align:middle;animation:loading-rotate 2s linear infinite}.ibiz-doing-notice__loading-icon .path{stroke:var(--ibiz-color-primary);stroke-dasharray:90,150;stroke-dashoffset:0;stroke-linecap:round;stroke-width:2;animation:loading-dash 1.5s ease-in-out infinite}
@@ -20,12 +20,14 @@ var dataImport2 = require('./data-import2/data-import2.cjs');
20
20
  var dataImport2Table = require('./data-import2-table/data-import2-table.cjs');
21
21
  var dataImport2Select = require('./data-import2-select/data-import2-select.cjs');
22
22
  var gridSetting = require('./grid-setting/grid-setting.cjs');
23
+ var doingNotice = require('./doing-notice/doing-notice.cjs');
23
24
 
24
25
  "use strict";
25
26
  const IBizCommonComponents = {
26
27
  install: (v) => {
27
28
  v.component(vue3Util.IBizControlBase.name, vue3Util.IBizControlBase);
28
29
  v.component(vue3Util.IBizIcon.name, vue3Util.IBizIcon);
30
+ v.component(doingNotice.DoingNotice.name, doingNotice.DoingNotice);
29
31
  v.component(row.IBizRow.name, row.IBizRow);
30
32
  v.component(col.IBizCol.name, col.IBizCol);
31
33
  v.component(vue3Util.IBizRouterView.name, vue3Util.IBizRouterView);
@@ -63,5 +65,6 @@ exports.IBizRawItem = rawitem.IBizRawItem;
63
65
  exports.IBizSplit = split.IBizSplit;
64
66
  exports.IBizSplitTrigger = splitTrigger.IBizSplitTrigger;
65
67
  exports.IBizSortBar = sortBar.IBizSortBar;
68
+ exports.DoingNotice = doingNotice.DoingNotice;
66
69
  exports.IBizCommonComponents = IBizCommonComponents;
67
70
  exports.default = IBizCommonComponents;
@@ -47,7 +47,8 @@ const FormButton = /* @__PURE__ */ vue.defineComponent({
47
47
  "sime": "small",
48
48
  "onClick": this.controller.onClick.bind(this.controller),
49
49
  "loading": this.controller.state.loading,
50
- "disabled": this.controller.state.disabled
50
+ "disabled": this.controller.state.disabled,
51
+ "title": this.modelData.tooltip
51
52
  }, {
52
53
  default: () => [vue.createVNode("div", {
53
54
  "class": this.ns.b("content")
@@ -58,6 +58,10 @@ function useITableEvent(c) {
58
58
  } else if (order === "descending") {
59
59
  order1 = "desc";
60
60
  }
61
+ const sortQuery = "".concat(fieldName, ",").concat(order1);
62
+ if (sortQuery === c.state.sortQuery) {
63
+ return;
64
+ }
61
65
  c.setSort(fieldName, order1);
62
66
  c.load();
63
67
  }
@@ -52,23 +52,41 @@ const FilterModes = [{
52
52
  const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
53
53
  name: "IBizFilterTreeControl",
54
54
  props: {
55
- controller: {
56
- type: Object,
55
+ /**
56
+ * 过滤项控制器集合
57
+ */
58
+ filterControllers: {
59
+ type: Array,
57
60
  required: true
58
61
  },
59
- provider: {
60
- type: Object
62
+ /**
63
+ * 过滤项树节点数据集合
64
+ */
65
+ filterNodes: {
66
+ type: Array,
67
+ required: true
68
+ },
69
+ /**
70
+ * 父容器
71
+ */
72
+ parent: {
73
+ type: String,
74
+ required: true
61
75
  }
62
76
  },
63
- emits: {
64
- close: () => true
65
- },
77
+ emits: ["confirm", "cancel", "change"],
66
78
  setup(props, {
67
79
  emit
68
80
  }) {
69
81
  const ns = vue3Util.useNamespace("filter-tree");
82
+ const isInSearchBar = vue.computed(() => {
83
+ return props.parent === "search-bar";
84
+ });
85
+ const UiFilterNodes = vue.computed(() => {
86
+ return props.filterNodes;
87
+ });
70
88
  const findFilterController = (fieldName, valueOP) => {
71
- return props.controller.filterControllers.find((item) => {
89
+ return props.filterControllers.find((item) => {
72
90
  if (item.fieldName === fieldName) {
73
91
  return item.valueOP ? item.valueOP === valueOP : true;
74
92
  }
@@ -86,7 +104,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
86
104
  }
87
105
  return field.valueOPs;
88
106
  };
89
- props.controller.filterControllers.forEach((filterC) => {
107
+ props.filterControllers.forEach((filterC) => {
90
108
  let find = allFields.find((x) => x.name === filterC.fieldName);
91
109
  if (find === void 0) {
92
110
  find = {
@@ -141,6 +159,7 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
141
159
  editor = vue.h(component, {
142
160
  value: node.value,
143
161
  controller: filterC.editor,
162
+ data: {},
144
163
  onChange: (val) => {
145
164
  node.value = val;
146
165
  }
@@ -240,23 +259,26 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
240
259
  }, null)]);
241
260
  })])]);
242
261
  };
243
- const onClose = () => {
244
- emit("close");
262
+ const onConfirm = () => {
263
+ emit("confirm");
264
+ };
265
+ const onCancel = () => {
266
+ emit("cancel");
245
267
  };
246
268
  return {
247
269
  ns,
248
270
  renderFilterGroup,
249
271
  renderFilterItem,
250
- onClose
272
+ onConfirm,
273
+ onCancel,
274
+ isInSearchBar,
275
+ UiFilterNodes
251
276
  };
252
277
  },
253
278
  render() {
254
- const {
255
- state
256
- } = this.controller;
257
279
  return vue.createVNode("div", {
258
280
  "class": [this.ns.b()]
259
- }, [state.filterNodes.length > 0 && state.filterNodes.map((node) => {
281
+ }, [this.UiFilterNodes.length > 0 && this.UiFilterNodes.map((node) => {
260
282
  if (node.leaf) {
261
283
  return this.renderFilterItem(node);
262
284
  }
@@ -265,14 +287,13 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
265
287
  "class": this.ns.b("footer")
266
288
  }, [vue.createVNode(vue.resolveComponent("el-button"), {
267
289
  "onClick": () => {
268
- this.controller.onSearch();
269
- this.onClose();
290
+ this.onConfirm();
270
291
  }
271
292
  }, {
272
- default: () => [vue.createTextVNode("\u641C\u7D22")]
293
+ default: () => [this.isInSearchBar ? "\u641C\u7D22" : "\u786E\u5B9A"]
273
294
  }), vue.createVNode(vue.resolveComponent("el-button"), {
274
295
  "onClick": () => {
275
- this.controller.resetFilter();
296
+ this.onCancel();
276
297
  }
277
298
  }, {
278
299
  default: () => [vue.createTextVNode("\u91CD\u7F6E")]
@@ -57,12 +57,18 @@ const SearchBarControl = /* @__PURE__ */ vue.defineComponent({
57
57
  const showFilter = async () => {
58
58
  popover = ibiz.overlay.createPopover(() => {
59
59
  return vue.createVNode(vue.resolveComponent("iBizFilterTreeControl"), {
60
- "onClose": () => {
60
+ "filterControllers": c.filterControllers,
61
+ "filterNodes": c.state.filterNodes,
62
+ "parent": "search-bar",
63
+ "onConfirm": () => {
64
+ c.onSearch();
61
65
  if (popover) {
62
66
  popover.dismiss();
63
67
  }
64
68
  },
65
- "controller": c
69
+ "onCancel": () => {
70
+ c.resetFilter();
71
+ }
66
72
  }, null);
67
73
  }, void 0, {
68
74
  placement: "bottom-end",