@ibiz-template/vue3-components 0.3.1 → 0.3.3

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 (122) hide show
  1. package/dist/ibiz-markdown-editor-BQsiQfa2.js +2 -0
  2. package/dist/ibiz-markdown-editor-BQsiQfa2.js.map +1 -0
  3. package/dist/index-zqQcb8gx.js +14 -0
  4. package/dist/index-zqQcb8gx.js.map +1 -0
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.system.min.js +1 -1
  7. package/dist/{xlsx-util-ijmoZImT.js → xlsx-util-T__pkKxV.js} +2 -2
  8. package/dist/{xlsx-util-ijmoZImT.js.map → xlsx-util-T__pkKxV.js.map} +1 -1
  9. package/es/common/data-import/data-import.d.ts +9 -1
  10. package/es/common/data-import/data-import.mjs +12 -5
  11. package/es/control/form/form/form.mjs +39 -15
  12. package/es/control/form/search-form/search-form.css +1 -1
  13. package/es/control/form/search-form/search-form.mjs +3 -32
  14. package/es/control/grid/grid/grid.mjs +0 -1
  15. package/es/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
  16. package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +2 -0
  17. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +20 -4
  18. package/es/control/grid/grid-column/grid-field-column/index.d.ts +2 -0
  19. package/es/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.d.ts +2 -0
  20. package/es/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.mjs +11 -3
  21. package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.css +1 -0
  22. package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.d.ts +3 -0
  23. package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +25 -1
  24. package/es/control/grid/grid-column/grid-field-edit-column/index.d.ts +2 -0
  25. package/es/control/panel/panel/index.d.ts +6 -0
  26. package/es/control/panel/panel/panel.d.ts +7 -1
  27. package/es/control/panel/panel/panel.mjs +4 -1
  28. package/es/control/panel/view-layout-panel/index.d.ts +6 -0
  29. package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +7 -1
  30. package/es/control/panel/view-layout-panel/view-layout-panel.mjs +4 -1
  31. package/es/editor/array/ibiz-array/ibiz-array.d.ts +8 -0
  32. package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.d.ts +8 -0
  33. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.d.ts +8 -0
  34. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.d.ts +8 -0
  35. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +8 -0
  36. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +7 -0
  37. package/es/editor/code/monaco-editor/monaco-editor.d.ts +8 -0
  38. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +8 -0
  39. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +8 -0
  40. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +9 -2
  41. package/es/editor/data-picker/ibiz-picker/ibiz-picker.d.ts +9 -0
  42. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +13 -2
  43. package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.d.ts +9 -0
  44. package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +15 -4
  45. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +8 -0
  46. package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.d.ts +8 -0
  47. package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.mjs +12 -2
  48. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +8 -0
  49. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.d.ts +8 -0
  50. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.mjs +7 -0
  51. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.d.ts +8 -0
  52. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +8 -0
  53. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +8 -0
  54. package/es/editor/html/wang-editor/wang-editor.d.ts +8 -0
  55. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.d.ts +8 -0
  56. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +3 -3
  57. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.d.ts +8 -0
  58. package/es/editor/preset/preset-rawitem/ibiz-preset-rawitem/ibiz-preset-rawitem.d.ts +8 -0
  59. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.d.ts +8 -0
  60. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +7 -0
  61. package/es/editor/rate/ibiz-rate/ibiz-rate.d.ts +8 -0
  62. package/es/editor/raw/ibiz-raw/ibiz-raw.d.ts +8 -0
  63. package/es/editor/slider/ibiz-slider/ibiz-slider.d.ts +8 -0
  64. package/es/editor/span/span/span.d.ts +6 -0
  65. package/es/editor/span/span-link/span-link.d.ts +8 -0
  66. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.d.ts +8 -0
  67. package/es/editor/switch/ibiz-switch/ibiz-switch.d.ts +8 -0
  68. package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.d.ts +8 -0
  69. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +8 -0
  70. package/es/editor/text-box/input/input.d.ts +9 -0
  71. package/es/editor/text-box/input/input.mjs +12 -4
  72. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +8 -0
  73. package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.d.ts +8 -0
  74. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +8 -0
  75. package/es/panel-component/index.mjs +4 -1
  76. package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +11 -6
  77. package/es/panel-component/searchform-buttons/index.d.ts +25 -0
  78. package/es/panel-component/searchform-buttons/index.mjs +15 -0
  79. package/es/panel-component/searchform-buttons/searchform-buttons.controller.d.ts +38 -0
  80. package/es/panel-component/searchform-buttons/searchform-buttons.controller.mjs +67 -0
  81. package/es/panel-component/searchform-buttons/searchform-buttons.css +1 -0
  82. package/es/panel-component/searchform-buttons/searchform-buttons.d.ts +28 -0
  83. package/es/panel-component/searchform-buttons/searchform-buttons.mjs +63 -0
  84. package/es/panel-component/searchform-buttons/searchform-buttons.provider.d.ts +15 -0
  85. package/es/panel-component/searchform-buttons/searchform-buttons.provider.mjs +21 -0
  86. package/es/util/notification-util/notification-util.d.ts +38 -0
  87. package/es/util/notification-util/notification-util.mjs +70 -23
  88. package/lib/common/data-import/data-import.cjs +12 -5
  89. package/lib/control/form/form/form.cjs +38 -14
  90. package/lib/control/form/search-form/search-form.cjs +2 -31
  91. package/lib/control/form/search-form/search-form.css +1 -1
  92. package/lib/control/grid/grid/grid.cjs +0 -1
  93. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +19 -3
  94. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
  95. package/lib/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.cjs +10 -2
  96. package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +24 -0
  97. package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.css +1 -0
  98. package/lib/control/panel/panel/panel.cjs +4 -1
  99. package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +4 -1
  100. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +7 -0
  101. package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +9 -2
  102. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +12 -1
  103. package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +14 -3
  104. package/lib/editor/data-picker/ibiz-picker-link/ibiz-picker-link.cjs +10 -0
  105. package/lib/editor/date-picker/ibiz-date-picker/ibiz-date-picker.cjs +7 -0
  106. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +8 -0
  107. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +3 -3
  108. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +7 -0
  109. package/lib/editor/text-box/input/input.cjs +12 -4
  110. package/lib/panel-component/index.cjs +3 -0
  111. package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +11 -6
  112. package/lib/panel-component/searchform-buttons/index.cjs +20 -0
  113. package/lib/panel-component/searchform-buttons/searchform-buttons.cjs +65 -0
  114. package/lib/panel-component/searchform-buttons/searchform-buttons.controller.cjs +69 -0
  115. package/lib/panel-component/searchform-buttons/searchform-buttons.css +1 -0
  116. package/lib/panel-component/searchform-buttons/searchform-buttons.provider.cjs +23 -0
  117. package/lib/util/notification-util/notification-util.cjs +70 -23
  118. package/package.json +8 -8
  119. package/dist/ibiz-markdown-editor-7GWpRewm.js +0 -2
  120. package/dist/ibiz-markdown-editor-7GWpRewm.js.map +0 -1
  121. package/dist/index-7GoDWDWd.js +0 -14
  122. package/dist/index-7GoDWDWd.js.map +0 -1
@@ -15,6 +15,9 @@ export declare const IBizImageUpload: import("vue").DefineComponent<{
15
15
  type: BooleanConstructor;
16
16
  default: boolean;
17
17
  };
18
+ overflowMode: {
19
+ type: StringConstructor;
20
+ };
18
21
  }, {
19
22
  ns: import("@ibiz-template/core").Namespace;
20
23
  c: UploadEditorController;
@@ -40,6 +43,7 @@ export declare const IBizImageUpload: import("vue").DefineComponent<{
40
43
  blur: (_event?: IData | undefined) => boolean;
41
44
  focus: (_event?: IData | undefined) => boolean;
42
45
  enter: (_event?: IData | undefined) => boolean;
46
+ infoTextChange: (_text: string) => boolean;
43
47
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
48
  value: StringConstructor;
45
49
  controller: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<UploadEditorController>, undefined, undefined>;
@@ -55,10 +59,14 @@ export declare const IBizImageUpload: import("vue").DefineComponent<{
55
59
  type: BooleanConstructor;
56
60
  default: boolean;
57
61
  };
62
+ overflowMode: {
63
+ type: StringConstructor;
64
+ };
58
65
  }>> & {
59
66
  onFocus?: ((_event?: IData | undefined) => any) | undefined;
60
67
  onBlur?: ((_event?: IData | undefined) => any) | undefined;
61
68
  onChange?: ((_value: unknown, _name?: string | undefined) => any) | undefined;
69
+ onInfoTextChange?: ((_text: string) => any) | undefined;
62
70
  onEnter?: ((_event?: IData | undefined) => any) | undefined;
63
71
  }, {
64
72
  disabled: boolean;
@@ -1,4 +1,4 @@
1
- import { IBizPanelContainer, IBizPanelCtrlPos, IBizScrollContainer, IBizNavPos, IBizSingleDataContainer, IBizMultiDataContainer, IBizPanelField, IBizPanelRawItem, IBizGridContainer } from '@ibiz-template/vue3-util';
1
+ import { IBizPanelContainer, IBizPanelCtrlPos, IBizScrollContainer, IBizNavPos, IBizSingleDataContainer, IBizMultiDataContainer, IBizPanelField, IBizPanelRawItem, IBizGridContainer, IBizPanelContainerImage } from '@ibiz-template/vue3-util';
2
2
  import { IBizAuthUserinfo } from './auth-userinfo/index.mjs';
3
3
  import { IBizNavPosIndex } from './nav-pos-index/index.mjs';
4
4
  import { IBizNavTabs } from './nav-tabs/index.mjs';
@@ -17,6 +17,7 @@ import { IBizPanelRememberMe } from './panel-remember-me/index.mjs';
17
17
  import { IBizIndexActions } from './index-actions/index.mjs';
18
18
  import { IBizPanelContainerGroup } from './panel-container-group/index.mjs';
19
19
  import { IBizUserMessage } from './user-message/index.mjs';
20
+ import { IBizSearchFormButtons } from './searchform-buttons/index.mjs';
20
21
  export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
21
22
  export { NavPosIndexController } from './nav-pos-index/nav-pos-index.controller.mjs';
22
23
  export { PanelButtonController } from './panel-button/panel-button.controller.mjs';
@@ -53,6 +54,8 @@ const IBizPanelComponents = {
53
54
  v.use(IBizIndexActions);
54
55
  v.use(IBizPanelContainerGroup);
55
56
  v.use(IBizUserMessage);
57
+ v.use(IBizPanelContainerImage);
58
+ v.use(IBizSearchFormButtons);
56
59
  }
57
60
  };
58
61
 
@@ -94,16 +94,21 @@ class NavPosIndexController extends PanelItemController {
94
94
  currentKey,
95
95
  fullPath
96
96
  }) {
97
- var _a;
98
- if (this.state.currentKey !== currentKey) {
97
+ const isCurrentKeyChange = this.state.currentKey !== currentKey;
98
+ if (isCurrentKeyChange) {
99
+ if (this.state.cacheKeys.includes(currentKey) && this.router && this.router.currentRoute.value.matched.length === this.routeDepth + 1) {
100
+ const lastFullPath = this.state.navViewMsgs[currentKey].fullPath;
101
+ if (lastFullPath !== fullPath) {
102
+ setTimeout(() => {
103
+ this.router.push({ path: lastFullPath });
104
+ }, 0);
105
+ return;
106
+ }
107
+ }
99
108
  this.state.currentKey = currentKey;
100
109
  if (this.navTabs) {
101
110
  this.navTabs.state.currentKey = currentKey;
102
111
  }
103
- if (this.state.cacheKeys.includes(currentKey)) {
104
- const lastFullPath = this.state.navViewMsgs[currentKey].fullPath;
105
- (_a = this.router) == null ? void 0 : _a.push({ path: lastFullPath });
106
- }
107
112
  }
108
113
  if (currentKey === "") {
109
114
  return;
@@ -0,0 +1,25 @@
1
+ export declare const IBizSearchFormButtons: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
2
+ modelData: {
3
+ type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
4
+ required: true;
5
+ };
6
+ controller: {
7
+ type: typeof import("./searchform-buttons.controller").SearchFormButtonsController;
8
+ required: true;
9
+ };
10
+ }, {
11
+ ns: import("@ibiz-template/core").Namespace;
12
+ c: import("./searchform-buttons.controller").SearchFormButtonsController;
13
+ onSearchButtonClick: () => void;
14
+ onResetButtonClick: () => void;
15
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16
+ modelData: {
17
+ type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
18
+ required: true;
19
+ };
20
+ controller: {
21
+ type: typeof import("./searchform-buttons.controller").SearchFormButtonsController;
22
+ required: true;
23
+ };
24
+ }>>, {}, {}>>;
25
+ export default IBizSearchFormButtons;
@@ -0,0 +1,15 @@
1
+ import { registerPanelItemProvider } from '@ibiz-template/runtime';
2
+ import { withInstall } from '@ibiz-template/vue3-util';
3
+ import { SearchFormButtons } from './searchform-buttons.mjs';
4
+ import { SearchFormButtonsProvider } from './searchform-buttons.provider.mjs';
5
+
6
+ "use strict";
7
+ const IBizSearchFormButtons = withInstall(SearchFormButtons, function(v) {
8
+ v.component(SearchFormButtons.name, SearchFormButtons);
9
+ registerPanelItemProvider(
10
+ "RAWITEM_SEARCHFORM_BUTTONS",
11
+ () => new SearchFormButtonsProvider()
12
+ );
13
+ });
14
+
15
+ export { IBizSearchFormButtons, IBizSearchFormButtons as default };
@@ -0,0 +1,38 @@
1
+ import { ISearchFormController, PanelItemController } from '@ibiz-template/runtime';
2
+ /**
3
+ * 搜索表单按钮控制器
4
+ * @author lxm
5
+ * @date 2023-11-21 02:18:14
6
+ * @export
7
+ * @class SearchFormButtonsController
8
+ * @extends {PanelItemController}
9
+ */
10
+ export declare class SearchFormButtonsController extends PanelItemController {
11
+ /**
12
+ * 搜索按钮样式
13
+ * @author lxm
14
+ * @date 2023-11-21 03:25:31
15
+ * @type {(string | 'DEFAULT' | 'NONE' | 'SEARCHONLY' | 'USER' | 'USER2')}
16
+ */
17
+ get searchButtonStyle(): string;
18
+ /**
19
+ * 搜索表单控制器
20
+ * @author lxm
21
+ * @date 2023-11-21 04:32:58
22
+ * @type {ISearchFormController}
23
+ */
24
+ searchFrom: ISearchFormController;
25
+ protected onInit(): Promise<void>;
26
+ /**
27
+ * 点击搜索按钮
28
+ * @author lxm
29
+ * @date 2023-11-21 04:31:55
30
+ */
31
+ onSearchButtonClick(): void;
32
+ /**
33
+ * 点击重置按钮
34
+ * @author lxm
35
+ * @date 2023-11-21 04:32:09
36
+ */
37
+ onResetButtonClick(): void;
38
+ }
@@ -0,0 +1,67 @@
1
+ import { RuntimeError } from '@ibiz-template/core';
2
+ import { PanelItemController, UIActionUtil } from '@ibiz-template/runtime';
3
+
4
+ "use strict";
5
+ var __defProp = Object.defineProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __publicField = (obj, key, value) => {
8
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9
+ return value;
10
+ };
11
+ class SearchFormButtonsController extends PanelItemController {
12
+ constructor() {
13
+ super(...arguments);
14
+ /**
15
+ * 搜索表单控制器
16
+ * @author lxm
17
+ * @date 2023-11-21 04:32:58
18
+ * @type {ISearchFormController}
19
+ */
20
+ __publicField(this, "searchFrom");
21
+ }
22
+ /**
23
+ * 搜索按钮样式
24
+ * @author lxm
25
+ * @date 2023-11-21 03:25:31
26
+ * @type {(string | 'DEFAULT' | 'NONE' | 'SEARCHONLY' | 'USER' | 'USER2')}
27
+ */
28
+ get searchButtonStyle() {
29
+ return this.searchFrom.model.searchButtonStyle || "DEFAULT";
30
+ }
31
+ async onInit() {
32
+ await super.onInit();
33
+ const searchFrom = this.panel.container;
34
+ if (!searchFrom) {
35
+ throw new RuntimeError("\u5F53\u524D\u89C6\u56FE\u91CC\u6CA1\u6709\u627E\u5230\u53EBsearchform\u7684\u641C\u7D22\u8868\u5355");
36
+ }
37
+ this.searchFrom = searchFrom;
38
+ }
39
+ /**
40
+ * 点击搜索按钮
41
+ * @author lxm
42
+ * @date 2023-11-21 04:31:55
43
+ */
44
+ onSearchButtonClick() {
45
+ UIActionUtil.execAndResolved("search", {
46
+ context: this.panel.context,
47
+ params: this.panel.params,
48
+ data: [],
49
+ view: this.panel.view
50
+ });
51
+ }
52
+ /**
53
+ * 点击重置按钮
54
+ * @author lxm
55
+ * @date 2023-11-21 04:32:09
56
+ */
57
+ onResetButtonClick() {
58
+ UIActionUtil.execAndResolved("reset", {
59
+ context: this.panel.context,
60
+ params: this.panel.params,
61
+ data: [],
62
+ view: this.panel.view
63
+ });
64
+ }
65
+ }
66
+
67
+ export { SearchFormButtonsController };
@@ -0,0 +1 @@
1
+ .ibiz-searchform-buttons{--ibiz-searchform-buttons-height:40px;height:var(--ibiz-searchform-buttons-height);margin-top:var(--ibiz-spacing-tight);margin-left:var(--ibiz-spacing-tight)}
@@ -0,0 +1,28 @@
1
+ import { PropType } from 'vue';
2
+ import './searchform-buttons.scss';
3
+ import { IPanelRawItem } from '@ibiz/model-core';
4
+ import { SearchFormButtonsController } from './searchform-buttons.controller';
5
+ export declare const SearchFormButtons: import("vue").DefineComponent<{
6
+ modelData: {
7
+ type: PropType<IPanelRawItem>;
8
+ required: true;
9
+ };
10
+ controller: {
11
+ type: typeof SearchFormButtonsController;
12
+ required: true;
13
+ };
14
+ }, {
15
+ ns: import("@ibiz-template/core").Namespace;
16
+ c: SearchFormButtonsController;
17
+ onSearchButtonClick: () => void;
18
+ onResetButtonClick: () => void;
19
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ modelData: {
21
+ type: PropType<IPanelRawItem>;
22
+ required: true;
23
+ };
24
+ controller: {
25
+ type: typeof SearchFormButtonsController;
26
+ required: true;
27
+ };
28
+ }>>, {}, {}>;
@@ -0,0 +1,63 @@
1
+ import { resolveComponent, createTextVNode, createVNode, defineComponent } from 'vue';
2
+ import { useNamespace } from '@ibiz-template/vue3-util';
3
+ import './searchform-buttons.css';
4
+ import { SearchFormButtonsController } from './searchform-buttons.controller.mjs';
5
+
6
+ "use strict";
7
+ const SearchFormButtons = /* @__PURE__ */ defineComponent({
8
+ name: "IBizSearchFormButtons",
9
+ props: {
10
+ modelData: {
11
+ type: Object,
12
+ required: true
13
+ },
14
+ controller: {
15
+ type: SearchFormButtonsController,
16
+ required: true
17
+ }
18
+ },
19
+ setup(prop) {
20
+ const ns = useNamespace("searchform-buttons");
21
+ const c = prop.controller;
22
+ const onSearchButtonClick = () => {
23
+ c.onSearchButtonClick();
24
+ };
25
+ const onResetButtonClick = () => {
26
+ c.onResetButtonClick();
27
+ };
28
+ return {
29
+ ns,
30
+ c,
31
+ onSearchButtonClick,
32
+ onResetButtonClick
33
+ };
34
+ },
35
+ render() {
36
+ return createVNode("div", {
37
+ "class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass]
38
+ }, [this.controller.searchButtonStyle === "SEARCHONLY" ? createVNode(resolveComponent("el-button"), {
39
+ "onClick": this.onSearchButtonClick
40
+ }, {
41
+ default: () => [createTextVNode("\u641C\u7D22")]
42
+ }) : createVNode(resolveComponent("el-dropdown"), {
43
+ "split-button": true,
44
+ "type": "primary",
45
+ "onClick": this.onSearchButtonClick
46
+ }, {
47
+ default: () => createVNode("span", {
48
+ "class": this.ns.b("label")
49
+ }, [createTextVNode("\u641C\u7D22")]),
50
+ dropdown: () => {
51
+ return createVNode(resolveComponent("el-dropdown-menu"), null, {
52
+ default: () => [createVNode(resolveComponent("el-dropdown-item"), {
53
+ "onClick": this.onResetButtonClick
54
+ }, {
55
+ default: () => [createTextVNode("\u91CD\u7F6E")]
56
+ })]
57
+ });
58
+ }
59
+ })]);
60
+ }
61
+ });
62
+
63
+ export { SearchFormButtons };
@@ -0,0 +1,15 @@
1
+ import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
2
+ import { IPanelItem } from '@ibiz/model-core';
3
+ /**
4
+ * 搜索表单按钮适配器
5
+ *
6
+ * @author lxm
7
+ * @date 2022-09-19 22:09:03
8
+ * @export
9
+ * @class SearchFormButtonsProvider
10
+ * @implements {EditorProvider}
11
+ */
12
+ export declare class SearchFormButtonsProvider implements IPanelItemProvider {
13
+ component: string;
14
+ createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
15
+ }
@@ -0,0 +1,21 @@
1
+ import { SearchFormButtonsController } from './searchform-buttons.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 SearchFormButtonsProvider {
11
+ constructor() {
12
+ __publicField(this, "component", "IBizSearchFormButtons");
13
+ }
14
+ async createController(panelItem, panel, parent) {
15
+ const c = new SearchFormButtonsController(panelItem, panel, parent);
16
+ await c.init();
17
+ return c;
18
+ }
19
+ }
20
+
21
+ export { SearchFormButtonsProvider };
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { INotificationUtil, NotificationParams } from '@ibiz-template/runtime';
2
3
  /**
3
4
  * 在界面右上角显示可关闭的全局通知
@@ -9,6 +10,43 @@ import { INotificationUtil, NotificationParams } from '@ibiz-template/runtime';
9
10
  * @implements {INotificationUtil}
10
11
  */
11
12
  export declare class NotificationUtil implements INotificationUtil {
13
+ /**
14
+ * 通知调用栈
15
+ * @return {*}
16
+ * @author: zhujiamin
17
+ * @Date: 2023-11-17 15:32:07
18
+ */
19
+ callStack: Array<() => void>;
20
+ /**
21
+ * 用于存储定时器返回的标识符
22
+ * @return {*}
23
+ * @author: zhujiamin
24
+ * @Date: 2023-11-17 15:32:23
25
+ */
26
+ intervalId: NodeJS.Timeout | null;
27
+ /**
28
+ * 执行下一步
29
+ * @return {*}
30
+ * @author: zhujiamin
31
+ * @Date: 2023-11-17 15:32:45
32
+ */
33
+ private executeNext;
34
+ /**
35
+ * 处理各类型提示
36
+ * @param {NotificationParams} params
37
+ * @param {string} type
38
+ * @return {*}
39
+ * @author: zhujiamin
40
+ * @Date: 2023-11-17 16:09:40
41
+ */
42
+ private handleNotice;
43
+ /**
44
+ * 设置定时器
45
+ * @return {*}
46
+ * @author: zhujiamin
47
+ * @Date: 2023-11-17 16:08:40
48
+ */
49
+ private setTimer;
12
50
  info(params: NotificationParams): void;
13
51
  success(params: NotificationParams): void;
14
52
  warning(params: NotificationParams): void;
@@ -1,42 +1,89 @@
1
1
  import { ElNotification } from 'element-plus';
2
2
 
3
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
+ };
4
10
  class NotificationUtil {
5
- info(params) {
11
+ constructor() {
12
+ /**
13
+ * 通知调用栈
14
+ * @return {*}
15
+ * @author: zhujiamin
16
+ * @Date: 2023-11-17 15:32:07
17
+ */
18
+ __publicField(this, "callStack", []);
19
+ /**
20
+ * 用于存储定时器返回的标识符
21
+ * @return {*}
22
+ * @author: zhujiamin
23
+ * @Date: 2023-11-17 15:32:23
24
+ */
25
+ __publicField(this, "intervalId", null);
26
+ }
27
+ /**
28
+ * 执行下一步
29
+ * @return {*}
30
+ * @author: zhujiamin
31
+ * @Date: 2023-11-17 15:32:45
32
+ */
33
+ executeNext() {
34
+ const errorHandler = this.callStack.shift();
35
+ if (errorHandler) {
36
+ errorHandler();
37
+ } else {
38
+ clearInterval(this.intervalId);
39
+ this.intervalId = null;
40
+ }
41
+ }
42
+ /**
43
+ * 处理各类型提示
44
+ * @param {NotificationParams} params
45
+ * @param {string} type
46
+ * @return {*}
47
+ * @author: zhujiamin
48
+ * @Date: 2023-11-17 16:09:40
49
+ */
50
+ handleNotice(params, noticeType) {
6
51
  const duration = params.duration ? params.duration * 1e3 : 4500;
7
52
  ElNotification({
8
53
  title: params.title,
9
54
  message: params.desc,
10
- type: "info",
55
+ type: noticeType,
11
56
  duration
12
57
  });
13
58
  }
59
+ /**
60
+ * 设置定时器
61
+ * @return {*}
62
+ * @author: zhujiamin
63
+ * @Date: 2023-11-17 16:08:40
64
+ */
65
+ setTimer() {
66
+ if (!this.intervalId) {
67
+ this.intervalId = setInterval(() => {
68
+ this.executeNext();
69
+ }, 50);
70
+ }
71
+ }
72
+ info(params) {
73
+ this.callStack.push(() => this.handleNotice(params, "info"));
74
+ this.setTimer();
75
+ }
14
76
  success(params) {
15
- const duration = params.duration ? params.duration * 1e3 : 4500;
16
- ElNotification({
17
- title: params.title,
18
- message: params.desc,
19
- type: "success",
20
- duration
21
- });
77
+ this.callStack.push(() => this.handleNotice(params, "success"));
78
+ this.setTimer();
22
79
  }
23
80
  warning(params) {
24
- const duration = params.duration ? params.duration * 1e3 : 4500;
25
- ElNotification({
26
- title: params.title,
27
- message: params.desc,
28
- type: "warning",
29
- duration
30
- });
81
+ this.callStack.push(() => this.handleNotice(params, "warning"));
82
+ this.setTimer();
31
83
  }
32
84
  error(params) {
33
- const duration = params.duration ? params.duration * 1e3 : 4500;
34
- ElNotification({
35
- title: params.title,
36
- message: params.desc,
37
- type: "error",
38
- duration
39
- });
85
+ this.callStack.push(() => this.handleNotice(params, "error"));
86
+ this.setTimer();
40
87
  }
41
88
  }
42
89
 
@@ -16,6 +16,10 @@ const DataImport = /* @__PURE__ */ vue.defineComponent({
16
16
  appDataEntity: {
17
17
  type: Object,
18
18
  required: true
19
+ },
20
+ dataImport: {
21
+ type: Object,
22
+ required: false
19
23
  }
20
24
  },
21
25
  setup(props) {
@@ -40,14 +44,14 @@ const DataImport = /* @__PURE__ */ vue.defineComponent({
40
44
  isLoading.value = true;
41
45
  try {
42
46
  if (ibiz.env.enableMqtt) {
43
- runtime.asyncImportData(selectedFile, props.appDataEntity);
47
+ runtime.asyncImportData(selectedFile, props.appDataEntity, props.dataImport);
44
48
  ibiz.notification.info({
45
49
  desc: "\u5F00\u59CB\u5BFC\u5165\uFF0C\u8BE6\u7EC6\u8FDB\u5EA6\u548C\u7ED3\u679C\u8BF7\u770B\u5E94\u7528\u901A\u77E5"
46
50
  });
47
51
  onCancelButtonClick();
48
52
  return;
49
53
  }
50
- result = await runtime.importData(selectedFile, props.appDataEntity);
54
+ result = await runtime.importData(selectedFile, props.appDataEntity, props.dataImport);
51
55
  ibiz.mc.command.send({
52
56
  srfdecodename: props.appDataEntity.codeName
53
57
  }, "OBJECTCREATED");
@@ -66,13 +70,16 @@ const DataImport = /* @__PURE__ */ vue.defineComponent({
66
70
  }
67
71
  };
68
72
  const onLinkClick = async () => {
69
- var _a;
70
- const templateUrl = `${props.appDataEntity.codeName2.toLowerCase()}/importtemplate`;
73
+ var _a, _b;
74
+ let templateUrl = `${props.appDataEntity.codeName2.toLowerCase()}/importtemplate`;
75
+ if ((_a = props.dataImport) == null ? void 0 : _a.codeName) {
76
+ templateUrl += `?srfimporttag=${props.dataImport.codeName}`;
77
+ }
71
78
  const res = await ibiz.net.request(templateUrl, {
72
79
  responseType: "blob"
73
80
  });
74
81
  if (res.status === 200) {
75
- let fileName = ((_a = res.headers["content-disposition"].split(";").find((str) => str.indexOf("filename=") !== -1)) == null ? void 0 : _a.slice(9)) || "";
82
+ let fileName = ((_b = res.headers["content-disposition"].split(";").find((str) => str.indexOf("filename=") !== -1)) == null ? void 0 : _b.slice(9)) || "";
76
83
  fileName = decodeURIComponent(fileName);
77
84
  const blob = new Blob([res.data], {
78
85
  type: "application/vnd.ms-excel"
@@ -6,6 +6,9 @@ var vue3Util = require('@ibiz-template/vue3-util');
6
6
  require('./form.css');
7
7
 
8
8
  "use strict";
9
+ function _isSlot(s) {
10
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
11
+ }
9
12
  const FormControl = /* @__PURE__ */ vue.defineComponent({
10
13
  name: "IBizFormControl",
11
14
  props: {
@@ -79,23 +82,44 @@ const FormControl = /* @__PURE__ */ vue.defineComponent({
79
82
  };
80
83
  },
81
84
  render() {
85
+ const {
86
+ state,
87
+ model,
88
+ controlPanel
89
+ } = this.c;
90
+ const {
91
+ isCreated
92
+ } = state;
93
+ const slots = {};
94
+ if (isCreated) {
95
+ if (this.$slots.default) {
96
+ slots.default = () => {
97
+ return this.$slots.default({
98
+ ...this.slotProps
99
+ });
100
+ };
101
+ } else {
102
+ const key = this.c.controlPanel ? model.name : "default";
103
+ slots[key] = () => {
104
+ return vue.createVNode(vue.resolveComponent("iBizFormPage"), {
105
+ "modelData": this.c.model,
106
+ "controller": this.c
107
+ }, {
108
+ default: () => {
109
+ var _a;
110
+ return [(_a = this.c.model.deformPages) == null ? void 0 : _a.map((page) => {
111
+ return this.renderByDetailType(page);
112
+ })];
113
+ }
114
+ });
115
+ };
116
+ }
117
+ }
82
118
  return vue.createVNode(vue.resolveComponent("iBizControlBase"), {
83
119
  "class": [this.ns.b()],
84
120
  "controller": this.c
85
- }, {
86
- default: () => [this.c.state.isCreated && [this.$slots.default ? this.$slots.default({
87
- ...this.slotProps
88
- }) : vue.createVNode(vue.resolveComponent("iBizFormPage"), {
89
- "modelData": this.c.model,
90
- "controller": this.c
91
- }, {
92
- default: () => {
93
- var _a;
94
- return [(_a = this.c.model.deformPages) == null ? void 0 : _a.map((page) => {
95
- return this.renderByDetailType(page);
96
- })];
97
- }
98
- }), this.$slots.searchButtons && this.$slots.searchButtons({})]]
121
+ }, _isSlot(slots) ? slots : {
122
+ default: () => [slots]
99
123
  });
100
124
  }
101
125
  });