@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
@@ -23,7 +23,12 @@ function useIBizUploadInit(props) {
23
23
  props.data,
24
24
  (newVal) => {
25
25
  if (newVal) {
26
- const urls = props.controller.value.calcBaseUrl(newVal);
26
+ const urls = ibiz.util.file.calcFileUpDownUrl(
27
+ props.controller.value.context,
28
+ props.controller.value.params,
29
+ newVal,
30
+ props.controller.value.editorParams
31
+ );
27
32
  uploadUrl.value = urls.uploadUrl;
28
33
  downloadUrl.value = urls.downloadUrl;
29
34
  }
@@ -26,7 +26,12 @@ function useIViewUpload(props, valueChange, c) {
26
26
  () => props.data,
27
27
  (newVal) => {
28
28
  if (newVal) {
29
- const urls = c.calcBaseUrl(newVal);
29
+ const urls = ibiz.util.file.calcFileUpDownUrl(
30
+ c.context,
31
+ c.params,
32
+ newVal,
33
+ c.editorParams
34
+ );
30
35
  uploadUrl.value = urls.uploadUrl;
31
36
  downloadUrl.value = urls.downloadUrl;
32
37
  }
@@ -96,7 +101,7 @@ function useIViewUpload(props, valueChange, c) {
96
101
  };
97
102
  const onDownload = (file) => {
98
103
  const url = file.url || downloadUrl.value.replace("%fileId%", file.id);
99
- c.fileDownload({ url, name: file.name });
104
+ ibiz.util.file.fileDownload(url, file.name);
100
105
  };
101
106
  const limit = computed(() => {
102
107
  return c.multiple ? 9999 : 1;
@@ -0,0 +1,46 @@
1
+ import { EditorController, SearchBarFilterController } from '@ibiz-template/runtime';
2
+ import { IAppDataEntity, IPicker, ISearchBarFilter } from '@ibiz/model-core';
3
+ /**
4
+ * 搜索过滤项编辑器控制器
5
+ *
6
+ * @author lxm
7
+ * @date 2022-08-24 20:08:25
8
+ * @export
9
+ * @class SearchCondEditEditorController
10
+ * @extends {EditorController}
11
+ */
12
+ export declare class SearchCondEditEditorController extends EditorController<IPicker> {
13
+ protected onInit(): Promise<void>;
14
+ /**
15
+ * 过滤项集合
16
+ *
17
+ */
18
+ searchBarFilters: ISearchBarFilter[];
19
+ /**
20
+ * 过滤项控制器集合
21
+ *
22
+ */
23
+ filterControllers: SearchBarFilterController[];
24
+ /**
25
+ * 实体模型
26
+ * @author lxm
27
+ * @date 2023-10-13 02:49:59
28
+ * @type {IAppDataEntity}
29
+ */
30
+ appDataEntity: IAppDataEntity | null;
31
+ /**
32
+ * 根据实体jsonschema初始化
33
+ * @author lxm
34
+ * @date 2023-12-29 04:21:31
35
+ * @return {*} {Promise<void>}
36
+ */
37
+ initByEntitySchema(): Promise<void>;
38
+ /**
39
+ * 初始化过滤项控制器
40
+ * @author lxm
41
+ * @date 2023-10-13 03:33:17
42
+ * @protected
43
+ * @return {*} {Promise<void>}
44
+ */
45
+ protected initSearchBarFilters(): Promise<void>;
46
+ }
@@ -0,0 +1,93 @@
1
+ import { EditorController, getEntitySchema, calcFilterModelBySchema, SearchBarFilterController } 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 SearchCondEditEditorController extends EditorController {
11
+ constructor() {
12
+ super(...arguments);
13
+ /**
14
+ * 过滤项集合
15
+ *
16
+ */
17
+ __publicField(this, "searchBarFilters", []);
18
+ /**
19
+ * 过滤项控制器集合
20
+ *
21
+ */
22
+ __publicField(this, "filterControllers", []);
23
+ /**
24
+ * 实体模型
25
+ * @author lxm
26
+ * @date 2023-10-13 02:49:59
27
+ * @type {IAppDataEntity}
28
+ */
29
+ __publicField(this, "appDataEntity", null);
30
+ }
31
+ async onInit() {
32
+ await super.onInit();
33
+ await this.initByEntitySchema();
34
+ await this.initSearchBarFilters();
35
+ }
36
+ /**
37
+ * 根据实体jsonschema初始化
38
+ * @author lxm
39
+ * @date 2023-12-29 04:21:31
40
+ * @return {*} {Promise<void>}
41
+ */
42
+ async initByEntitySchema() {
43
+ if (!this.model.appDataEntityId) {
44
+ return;
45
+ }
46
+ const appDataEntity = await ibiz.hub.getAppDataEntity(
47
+ this.model.appDataEntityId,
48
+ this.context.srfappid
49
+ );
50
+ if (appDataEntity) {
51
+ this.appDataEntity = appDataEntity;
52
+ }
53
+ const json = await getEntitySchema(
54
+ this.model.appDataEntityId,
55
+ this.context
56
+ );
57
+ if (!json) {
58
+ return;
59
+ }
60
+ const addSearchBarFilters = await calcFilterModelBySchema(
61
+ json,
62
+ this.model.appDataEntityId,
63
+ this.model.appId
64
+ );
65
+ this.searchBarFilters = addSearchBarFilters;
66
+ }
67
+ /**
68
+ * 初始化过滤项控制器
69
+ * @author lxm
70
+ * @date 2023-10-13 03:33:17
71
+ * @protected
72
+ * @return {*} {Promise<void>}
73
+ */
74
+ async initSearchBarFilters() {
75
+ var _a;
76
+ if (((_a = this.searchBarFilters) == null ? void 0 : _a.length) && this.appDataEntity) {
77
+ this.searchBarFilters.forEach((item) => {
78
+ const filterController = new SearchBarFilterController(
79
+ item,
80
+ this.appDataEntity,
81
+ this.context,
82
+ this.params
83
+ );
84
+ this.filterControllers.push(filterController);
85
+ });
86
+ await Promise.all(
87
+ this.filterControllers.map((controller) => controller.init())
88
+ );
89
+ }
90
+ }
91
+ }
92
+
93
+ export { SearchCondEditEditorController };
@@ -0,0 +1 @@
1
+ .ibiz-searchcond-edit{position:relative;width:100%;height:100%;font-size:var(--ibiz-form-item-font-size);font-weight:var(--ibiz-form-item-regular)}.ibiz-searchcond-edit .ibiz-searchcond-edit-filter{position:absolute;top:var(--ibiz-spacing-tight);right:var(--ibiz-spacing-tight)}
@@ -0,0 +1,81 @@
1
+ import { Ref } from 'vue';
2
+ import './ibiz-searchcond-edit.scss';
3
+ import { IFilterNode } from '@ibiz-template/runtime';
4
+ import { SearchCondEditEditorController } from './ibiz-searchcond-edit.controller';
5
+ export declare const IBizSearchCondEdit: import("vue").DefineComponent<{
6
+ value: (StringConstructor | NumberConstructor)[];
7
+ controller: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<SearchCondEditEditorController>, undefined, undefined>;
8
+ data: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<IData>, undefined, undefined>;
9
+ disabled: {
10
+ type: BooleanConstructor;
11
+ };
12
+ readonly: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ autoFocus: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
19
+ };
20
+ overflowMode: {
21
+ type: StringConstructor;
22
+ };
23
+ controlParams: {
24
+ type: ObjectConstructor;
25
+ required: boolean;
26
+ };
27
+ }, {
28
+ ns: import("@ibiz-template/core").Namespace;
29
+ c: SearchCondEditEditorController;
30
+ currentVal: Ref<string | null>;
31
+ handleChange: (e: number | null) => void;
32
+ onFocus: (e: IData) => void;
33
+ onBlur: (e: IData) => void;
34
+ editorRef: Ref<any>;
35
+ handleKeyUp: (e: KeyboardEvent) => void;
36
+ isEditable: Ref<boolean>;
37
+ setEditable: (flag: boolean) => void;
38
+ showFormDefaultContent: import("vue").ComputedRef<boolean>;
39
+ filterNodes: Ref<IFilterNode[]>;
40
+ triggerFilter: () => void;
41
+ filterButtonRef: Ref<any>;
42
+ resetFilter: () => void;
43
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
+ change: (_value: unknown, _name?: string | undefined) => boolean;
45
+ blur: (_event?: IData | undefined) => boolean;
46
+ focus: (_event?: IData | undefined) => boolean;
47
+ enter: (_event?: IData | undefined) => boolean;
48
+ infoTextChange: (_text: string) => boolean;
49
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
+ value: (StringConstructor | NumberConstructor)[];
51
+ controller: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<SearchCondEditEditorController>, undefined, undefined>;
52
+ data: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<IData>, undefined, undefined>;
53
+ disabled: {
54
+ type: BooleanConstructor;
55
+ };
56
+ readonly: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ autoFocus: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
64
+ overflowMode: {
65
+ type: StringConstructor;
66
+ };
67
+ controlParams: {
68
+ type: ObjectConstructor;
69
+ required: boolean;
70
+ };
71
+ }>> & {
72
+ onFocus?: ((_event?: IData | undefined) => any) | undefined;
73
+ onBlur?: ((_event?: IData | undefined) => any) | undefined;
74
+ onChange?: ((_value: unknown, _name?: string | undefined) => any) | undefined;
75
+ onInfoTextChange?: ((_text: string) => any) | undefined;
76
+ onEnter?: ((_event?: IData | undefined) => any) | undefined;
77
+ }, {
78
+ disabled: boolean;
79
+ autoFocus: boolean;
80
+ readonly: boolean;
81
+ }, {}>;
@@ -0,0 +1,187 @@
1
+ import { ref, computed, watch, resolveComponent, createVNode, defineComponent } from 'vue';
2
+ import { getInputProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
3
+ import './ibiz-searchcond-edit.css';
4
+ import { isNilOrEmpty } from 'qx-util';
5
+ import { getOriginFilterNodes, parseFilters, calcSearchConds } from '@ibiz-template/runtime';
6
+
7
+ "use strict";
8
+ const IBizSearchCondEdit = /* @__PURE__ */ defineComponent({
9
+ name: "IBizSearchCondEdit",
10
+ props: getInputProps(),
11
+ emits: getEditorEmits(),
12
+ setup(props, {
13
+ emit
14
+ }) {
15
+ const ns = useNamespace("searchcond-edit");
16
+ const c = props.controller;
17
+ const currentVal = ref(null);
18
+ const isEditable = ref(false);
19
+ const editorRef = ref();
20
+ const filterNodes = ref([]);
21
+ const filterButtonRef = ref();
22
+ let popover;
23
+ const showFormDefaultContent = computed(() => {
24
+ if (props.controlParams && props.controlParams.editmode === "hover") {
25
+ return true;
26
+ }
27
+ return false;
28
+ });
29
+ watch(() => props.value, (newVal, oldVal) => {
30
+ if (newVal !== oldVal) {
31
+ if (newVal == null) {
32
+ currentVal.value = "";
33
+ filterNodes.value = getOriginFilterNodes();
34
+ } else if (typeof newVal === "string") {
35
+ currentVal.value = newVal;
36
+ if (newVal) {
37
+ try {
38
+ const searchconds = JSON.parse(newVal);
39
+ filterNodes.value = searchconds.map((item) => parseFilters(item));
40
+ } catch (error) {
41
+ ibiz.log.error("".concat(newVal, "\u503C\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u5FC5\u987B\u4E3Ajson\u5B57\u7B26\u4E32"));
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }, {
47
+ immediate: true
48
+ });
49
+ const resetFilter = () => {
50
+ filterNodes.value = getOriginFilterNodes();
51
+ };
52
+ resetFilter();
53
+ const setEditable = (flag) => {
54
+ if (flag) {
55
+ isEditable.value = flag;
56
+ } else {
57
+ setTimeout(() => {
58
+ isEditable.value = flag;
59
+ }, 100);
60
+ }
61
+ };
62
+ const handleChange = (e) => {
63
+ emit("change", e);
64
+ };
65
+ if (props.autoFocus) {
66
+ watch(editorRef, (newVal) => {
67
+ if (newVal) {
68
+ const input = newVal.$el.getElementsByTagName("input")[0];
69
+ input.focus();
70
+ }
71
+ });
72
+ }
73
+ const onFocus = (e) => {
74
+ emit("focus", e);
75
+ setEditable(true);
76
+ };
77
+ const onBlur = (e) => {
78
+ emit("blur", e);
79
+ setEditable(false);
80
+ };
81
+ const handleKeyUp = (e) => {
82
+ if (e && e.code === "Enter") {
83
+ emit("enter", e);
84
+ }
85
+ };
86
+ const getCurrentValByFilterNodes = () => {
87
+ const searchconds = calcSearchConds(filterNodes.value);
88
+ if (searchconds) {
89
+ currentVal.value = JSON.stringify(searchconds, null, 2);
90
+ }
91
+ };
92
+ const onConfirm = () => {
93
+ getCurrentValByFilterNodes();
94
+ if (popover) {
95
+ popover.dismiss();
96
+ }
97
+ emit("change", currentVal.value);
98
+ };
99
+ const onCancel = () => {
100
+ resetFilter();
101
+ getCurrentValByFilterNodes();
102
+ emit("change", "");
103
+ };
104
+ const showFilter = async () => {
105
+ popover = ibiz.overlay.createPopover(() => {
106
+ return createVNode(resolveComponent("iBizFilterTreeControl"), {
107
+ "filterControllers": c.filterControllers,
108
+ "filterNodes": filterNodes.value,
109
+ "parent": "searchcond-edit",
110
+ "onConfirm": () => {
111
+ onConfirm();
112
+ },
113
+ "onCancel": () => {
114
+ onCancel();
115
+ }
116
+ }, null);
117
+ }, void 0, {
118
+ placement: "bottom-end",
119
+ autoClose: true
120
+ });
121
+ popover.present(filterButtonRef.value.$el);
122
+ await popover.onWillDismiss();
123
+ popover = void 0;
124
+ };
125
+ const triggerFilter = () => {
126
+ if (popover) {
127
+ popover.dismiss();
128
+ } else {
129
+ showFilter();
130
+ }
131
+ };
132
+ return {
133
+ ns,
134
+ c,
135
+ currentVal,
136
+ handleChange,
137
+ onFocus,
138
+ onBlur,
139
+ editorRef,
140
+ handleKeyUp,
141
+ isEditable,
142
+ setEditable,
143
+ showFormDefaultContent,
144
+ filterNodes,
145
+ triggerFilter,
146
+ filterButtonRef,
147
+ resetFilter
148
+ };
149
+ },
150
+ render() {
151
+ let content = null;
152
+ if (this.readonly) {
153
+ content = isNilOrEmpty(this.currentVal) ? "" : "".concat(this.currentVal);
154
+ } else {
155
+ content = [createVNode(resolveComponent("el-input"), {
156
+ "ref": "editorRef",
157
+ "class": [this.ns.b("input")],
158
+ "model-value": this.currentVal,
159
+ "type": "textarea",
160
+ "rows": 10,
161
+ "placeholder": this.c.placeHolder,
162
+ "disabled": this.disabled,
163
+ "controls": false,
164
+ "onFocus": this.onFocus,
165
+ "onBlur": this.onBlur,
166
+ "onKeyup": this.handleKeyUp
167
+ }, null), createVNode(resolveComponent("el-button"), {
168
+ "ref": "filterButtonRef",
169
+ "type": "primary",
170
+ "title": "\u7F16\u8F91",
171
+ "class": this.ns.b("filter"),
172
+ "onClick": () => this.triggerFilter()
173
+ }, {
174
+ default: () => [createVNode(resolveComponent("iBizIcon"), {
175
+ "icon": {
176
+ cssClass: "fa fa-edit"
177
+ }
178
+ }, null)]
179
+ })];
180
+ }
181
+ return createVNode("div", {
182
+ "class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.ns.is("editable", this.isEditable), this.ns.is("show-default", this.showFormDefaultContent)]
183
+ }, [content]);
184
+ }
185
+ });
186
+
187
+ export { IBizSearchCondEdit };
@@ -0,0 +1,17 @@
1
+ import { IEditorContainerController, IEditorProvider } from '@ibiz-template/runtime';
2
+ import { IPicker } from '@ibiz/model-core';
3
+ import { SearchCondEditEditorController } from './ibiz-searchcond-edit.controller';
4
+ /**
5
+ * 搜索过滤项编辑器适配器
6
+ *
7
+ * @author lxm
8
+ * @date 2022-09-19 22:09:03
9
+ * @export
10
+ * @class SearchCondEditEditorProvider
11
+ * @implements {EditorProvider}
12
+ */
13
+ export declare class SearchCondEditEditorProvider implements IEditorProvider {
14
+ formEditor: string;
15
+ gridEditor: string;
16
+ createController(editorModel: IPicker, parentController: IEditorContainerController): Promise<SearchCondEditEditorController>;
17
+ }
@@ -0,0 +1,22 @@
1
+ import { SearchCondEditEditorController } from './ibiz-searchcond-edit.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 SearchCondEditEditorProvider {
11
+ constructor() {
12
+ __publicField(this, "formEditor", "IBizSearchCondEdit");
13
+ __publicField(this, "gridEditor", "IBizSearchCondEdit");
14
+ }
15
+ async createController(editorModel, parentController) {
16
+ const c = new SearchCondEditEditorController(editorModel, parentController);
17
+ await c.init();
18
+ return c;
19
+ }
20
+ }
21
+
22
+ export { SearchCondEditEditorProvider };
@@ -0,0 +1,3 @@
1
+ export * from './ibiz-searchcond-edit.controller';
2
+ export * from './ibiz-searchcond-edit.provider';
3
+ export { IBizSearchCondEdit } from './ibiz-searchcond-edit';
@@ -0,0 +1,5 @@
1
+ export { SearchCondEditEditorController } from './ibiz-searchcond-edit.controller.mjs';
2
+ export { SearchCondEditEditorProvider } from './ibiz-searchcond-edit.provider.mjs';
3
+ export { IBizSearchCondEdit } from './ibiz-searchcond-edit.mjs';
4
+
5
+ "use strict";
@@ -0,0 +1 @@
1
+ export * from './ibiz-searchcond-edit';
@@ -0,0 +1,6 @@
1
+ import './ibiz-searchcond-edit/index.mjs';
2
+ export { IBizSearchCondEdit } from './ibiz-searchcond-edit/ibiz-searchcond-edit.mjs';
3
+ export { SearchCondEditEditorController } from './ibiz-searchcond-edit/ibiz-searchcond-edit.controller.mjs';
4
+ export { SearchCondEditEditorProvider } from './ibiz-searchcond-edit/ibiz-searchcond-edit.provider.mjs';
5
+
6
+ "use strict";
package/es/index.mjs CHANGED
@@ -45,6 +45,7 @@ import { IBizMapControl } from './control/map/index.mjs';
45
45
  import { IBizReportPanelControl } from './control/report-panel/index.mjs';
46
46
  import { IBizGanttControl } from './control/gantt/index.mjs';
47
47
  import { IBizContextMenuControl } from './control/context-menu/index.mjs';
48
+ export { DoingNotice } from './common/doing-notice/doing-notice.mjs';
48
49
  export { IBizCol } from './common/col/col.mjs';
49
50
  export { IBizRow } from './common/row/row.mjs';
50
51
  export { IBizActionToolbar } from './common/action-toolbar/action-toolbar.mjs';
@@ -117,6 +118,7 @@ export { NotificationUtil } from './util/notification-util/notification-util.mjs
117
118
  export { OpenViewUtil } from './util/open-view-util/open-view-util.mjs';
118
119
  export { OverlayController } from './util/overlay-controller/overlay-controller.mjs';
119
120
  export { usePagination } from './util/pagination/use-pagination.mjs';
121
+ export { NoticeUtil } from './util/notice-util/notice-util.mjs';
120
122
 
121
123
  "use strict";
122
124
  var index = {
@@ -1,20 +1,34 @@
1
1
  import { PropType } from 'vue';
2
2
  import { IPortalAsyncAction } from '@ibiz-template/core';
3
3
  import './async-action.scss';
4
+ import { IAsyncActionProvider } from '@ibiz-template/runtime';
4
5
  export declare const AsyncAction: import("vue").DefineComponent<{
5
- message: {
6
+ action: {
6
7
  type: PropType<IPortalAsyncAction>;
7
8
  required: true;
8
9
  };
10
+ provider: {
11
+ type: PropType<IAsyncActionProvider>;
12
+ required: true;
13
+ };
9
14
  }, {
10
15
  ns: import("@ibiz-template/core").Namespace;
11
16
  showErrorInfo: import("vue").ComputedRef<boolean | "">;
12
17
  clickable: import("vue").ComputedRef<boolean>;
13
18
  actionstate: import("vue").ComputedRef<10 | 20 | 30 | 40>;
14
19
  progressText: import("vue").ComputedRef<string>;
15
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16
- message: {
20
+ onClick: (event: MouseEvent) => Promise<void>;
21
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ close: () => true;
23
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
+ action: {
17
25
  type: PropType<IPortalAsyncAction>;
18
26
  required: true;
19
27
  };
20
- }>>, {}, {}>;
28
+ provider: {
29
+ type: PropType<IAsyncActionProvider>;
30
+ required: true;
31
+ };
32
+ }>> & {
33
+ onClose?: (() => any) | undefined;
34
+ }, {}, {}>;
@@ -19,40 +19,58 @@ const stateType = {
19
19
  const AsyncAction = /* @__PURE__ */ defineComponent({
20
20
  name: "IBizAsyncAction",
21
21
  props: {
22
- message: {
22
+ action: {
23
+ type: Object,
24
+ required: true
25
+ },
26
+ provider: {
23
27
  type: Object,
24
28
  required: true
25
29
  }
26
30
  },
27
- setup(props) {
31
+ emits: {
32
+ close: () => true
33
+ },
34
+ setup(props, {
35
+ emit
36
+ }) {
28
37
  const ns = useNamespace("async-action");
29
- const hasObjResult = computed(() => isObject(props.message.actionresult));
38
+ const hasObjResult = computed(() => isObject(props.action.actionresult));
30
39
  const clickable = computed(() => {
31
- return !props.message.actiontype || hasObjResult.value;
40
+ return !props.action.actiontype || hasObjResult.value;
32
41
  });
33
42
  const showErrorInfo = computed(() => {
34
- return props.message.actiontype && isString(props.message.actionresult);
43
+ return props.action.actiontype && isString(props.action.actionresult);
35
44
  });
36
45
  const actionstate = computed(() => {
37
46
  if (hasObjResult.value) {
38
- const result = props.message.actionresult;
47
+ const result = props.action.actionresult;
39
48
  const errorNum = result.total - result.success;
40
49
  if (errorNum > 0) {
41
50
  return 40;
42
51
  }
43
52
  return 30;
44
53
  }
45
- return props.message.actionstate;
54
+ return props.action.actionstate;
46
55
  });
47
56
  const progressText = computed(() => {
48
- return !props.message.completionrate ? "" : "(".concat(props.message.completionrate, "%)");
57
+ return !props.action.completionrate ? "" : "(".concat(props.action.completionrate, "%)");
49
58
  });
59
+ const onClick = async (event) => {
60
+ if (props.provider.onClick) {
61
+ const isClose = await props.provider.onClick(props.action, event);
62
+ if (isClose) {
63
+ emit("close");
64
+ }
65
+ }
66
+ };
50
67
  return {
51
68
  ns,
52
69
  showErrorInfo,
53
70
  clickable,
54
71
  actionstate,
55
- progressText
72
+ progressText,
73
+ onClick
56
74
  };
57
75
  },
58
76
  render() {
@@ -60,9 +78,10 @@ const AsyncAction = /* @__PURE__ */ defineComponent({
60
78
  asyncacitonname,
61
79
  begintime,
62
80
  stepinfo = "\u8FDB\u884C\u4E2D"
63
- } = this.message;
81
+ } = this.action;
64
82
  return createVNode("div", {
65
- "class": [this.ns.b(), this.clickable ? this.ns.m("clickable") : ""]
83
+ "class": [this.ns.b(), this.clickable ? this.ns.m("clickable") : ""],
84
+ "onClick": this.onClick
66
85
  }, [createVNode("div", {
67
86
  "class": this.ns.b("left")
68
87
  }, [createVNode("ion-icon", {
@@ -72,9 +91,9 @@ const AsyncAction = /* @__PURE__ */ defineComponent({
72
91
  }, [createVNode("div", {
73
92
  "class": this.ns.e("caption")
74
93
  }, [asyncacitonname]), this.showErrorInfo && createVNode("div", {
75
- "title": this.message.actionresult,
94
+ "title": this.action.actionresult,
76
95
  "class": this.ns.e("error-info")
77
- }, [this.message.actionresult]), this.actionstate === 20 ? createVNode("div", {
96
+ }, [this.action.actionresult]), this.actionstate === 20 ? createVNode("div", {
78
97
  "class": this.ns.e("progress")
79
98
  }, [stepinfo, this.progressText]) : createVNode("div", {
80
99
  "class": this.ns.e("begin-time")
@@ -84,11 +103,11 @@ const AsyncAction = /* @__PURE__ */ defineComponent({
84
103
  "type": stateType[this.actionstate]
85
104
  }, {
86
105
  default: () => [stateTexts[this.actionstate]]
87
- })]), this.actionstate === 20 && !!this.message.completionrate && createVNode("div", {
106
+ })]), this.actionstate === 20 && !!this.action.completionrate && createVNode("div", {
88
107
  "class": this.ns.b("loading-warp")
89
108
  }, [createVNode("div", {
90
109
  "class": this.ns.be("loading-warp", "inner"),
91
- "style": "width:".concat(this.message.completionrate, "%;")
110
+ "style": "width:".concat(this.action.completionrate, "%;")
92
111
  }, null)])]);
93
112
  }
94
113
  });