@ibiz-template/vue3-util 0.7.41-alpha.2 → 0.7.41-alpha.20

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 (121) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/index.system.min.js +1 -1
  3. package/es/common/badge/badge.css +1 -1
  4. package/es/common/control-base/control-base.css +1 -1
  5. package/es/common/control-base/control-base.d.ts +1 -0
  6. package/es/common/control-base/control-base.d.ts.map +1 -1
  7. package/es/common/control-base/control-base.mjs +38 -4
  8. package/es/common/custom-render/custom-render.d.ts.map +1 -1
  9. package/es/common/custom-render/custom-render.mjs +2 -2
  10. package/es/common/index.d.ts +1 -0
  11. package/es/common/index.d.ts.map +1 -1
  12. package/es/common/index.mjs +1 -0
  13. package/es/common/signature-pad/signature-pad.css +1 -0
  14. package/es/common/signature-pad/signature-pad.d.ts +19 -0
  15. package/es/common/signature-pad/signature-pad.d.ts.map +1 -0
  16. package/es/common/signature-pad/signature-pad.mjs +165 -0
  17. package/es/common/signature-pad/util/bezier.d.ts +58 -0
  18. package/es/common/signature-pad/util/bezier.d.ts.map +1 -0
  19. package/es/common/signature-pad/util/bezier.mjs +109 -0
  20. package/es/common/signature-pad/util/point.d.ts +55 -0
  21. package/es/common/signature-pad/util/point.d.ts.map +1 -0
  22. package/es/common/signature-pad/util/point.mjs +51 -0
  23. package/es/common/signature-pad/util/signature_pad.d.ts +593 -0
  24. package/es/common/signature-pad/util/signature_pad.d.ts.map +1 -0
  25. package/es/common/signature-pad/util/signature_pad.mjs +1018 -0
  26. package/es/common/view-shell/view-shell.d.ts +8 -1
  27. package/es/common/view-shell/view-shell.d.ts.map +1 -1
  28. package/es/common/view-shell/view-shell.mjs +13 -2
  29. package/es/control/panel/panel/panel.d.ts.map +1 -1
  30. package/es/control/panel/panel/panel.mjs +12 -1
  31. package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +1 -1
  32. package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -1
  33. package/es/control/panel/view-layout-panel/view-layout-panel.mjs +12 -1
  34. package/es/index.mjs +2 -0
  35. package/es/locale/en/index.d.ts +1 -0
  36. package/es/locale/en/index.d.ts.map +1 -1
  37. package/es/locale/en/index.mjs +2 -1
  38. package/es/locale/zh-CN/index.d.ts +1 -0
  39. package/es/locale/zh-CN/index.d.ts.map +1 -1
  40. package/es/locale/zh-CN/index.mjs +2 -1
  41. package/es/panel-component/multi-data-container/multi-data-container.d.ts +1 -1
  42. package/es/panel-component/multi-data-container/multi-data-container.d.ts.map +1 -1
  43. package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts +1 -1
  44. package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts.map +1 -1
  45. package/es/panel-component/nav-pos/nav-pos.controller.d.ts +1 -1
  46. package/es/panel-component/nav-pos/nav-pos.d.ts +1 -1
  47. package/es/panel-component/panel-container/panel-container.d.ts.map +1 -1
  48. package/es/panel-component/panel-container/panel-container.mjs +30 -2
  49. package/es/panel-component/panel-field/panel-field.controller.mjs +1 -1
  50. package/es/panel-component/panel-tab-page/panel-tab-page.d.ts +1 -1
  51. package/es/panel-component/single-data-container/single-data-container.d.ts +1 -1
  52. package/es/panel-component/single-data-container/single-data-container.d.ts.map +1 -1
  53. package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts +1 -0
  54. package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts.map +1 -1
  55. package/es/panel-component/teleport-placeholder/teleport-placeholder.state.d.ts +1 -1
  56. package/es/panel-component/teleport-placeholder/teleport-placeholder.state.mjs +1 -1
  57. package/es/plugin/plugin-factory/plugin-factory.d.ts +13 -12
  58. package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
  59. package/es/plugin/plugin-factory/plugin-factory.mjs +24 -18
  60. package/es/use/index.d.ts +1 -0
  61. package/es/use/index.d.ts.map +1 -1
  62. package/es/use/index.mjs +2 -0
  63. package/es/use/storage/index.d.ts +4 -6
  64. package/es/use/storage/index.d.ts.map +1 -1
  65. package/es/use/storage/index.mjs +16 -11
  66. package/es/use/vue-use/computed-async.d.ts +51 -0
  67. package/es/use/vue-use/computed-async.d.ts.map +1 -0
  68. package/es/use/vue-use/computed-async.mjs +66 -0
  69. package/es/use/vue-use/index.d.ts +2 -0
  70. package/es/use/vue-use/index.d.ts.map +1 -0
  71. package/es/use/vue-use/index.mjs +3 -0
  72. package/es/util/install.d.ts.map +1 -1
  73. package/es/util/overlay-container/overlay-container.d.ts +1 -1
  74. package/es/util/overlay-container/overlay-container.d.ts.map +1 -1
  75. package/es/util/overlay-container/overlay-container.mjs +7 -2
  76. package/es/util/overlay-view-util/overlay-view-util.d.ts +2 -2
  77. package/es/util/overlay-view-util/overlay-view-util.d.ts.map +1 -1
  78. package/es/util/overlay-view-util/overlay-view-util.mjs +2 -1
  79. package/es/util/render/render.d.ts.map +1 -1
  80. package/es/util/render/render.mjs +4 -1
  81. package/es/util/route/route.d.ts.map +1 -1
  82. package/es/util/route/route.mjs +18 -3
  83. package/es/view/common/index.d.ts.map +1 -1
  84. package/es/view/common/index.mjs +2 -0
  85. package/es/view/common/view.d.ts.map +1 -1
  86. package/es/view/common/view.mjs +14 -1
  87. package/es/view/md-custom-view/md-custom-view.provider.d.ts +13 -0
  88. package/es/view/md-custom-view/md-custom-view.provider.d.ts.map +1 -0
  89. package/es/view/md-custom-view/md-custom-view.provider.mjs +13 -0
  90. package/lib/common/badge/badge.css +1 -1
  91. package/lib/common/control-base/control-base.cjs +37 -3
  92. package/lib/common/control-base/control-base.css +1 -1
  93. package/lib/common/custom-render/custom-render.cjs +1 -1
  94. package/lib/common/index.cjs +2 -0
  95. package/lib/common/signature-pad/signature-pad.cjs +167 -0
  96. package/lib/common/signature-pad/signature-pad.css +1 -0
  97. package/lib/common/signature-pad/util/bezier.cjs +111 -0
  98. package/lib/common/signature-pad/util/point.cjs +53 -0
  99. package/lib/common/signature-pad/util/signature_pad.cjs +1022 -0
  100. package/lib/common/view-shell/view-shell.cjs +13 -2
  101. package/lib/control/panel/panel/panel.cjs +12 -1
  102. package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +12 -1
  103. package/lib/index.cjs +4 -0
  104. package/lib/locale/en/index.cjs +2 -1
  105. package/lib/locale/zh-CN/index.cjs +2 -1
  106. package/lib/panel-component/panel-container/panel-container.cjs +29 -1
  107. package/lib/panel-component/panel-field/panel-field.controller.cjs +1 -1
  108. package/lib/panel-component/teleport-placeholder/teleport-placeholder.state.cjs +1 -1
  109. package/lib/plugin/plugin-factory/plugin-factory.cjs +24 -18
  110. package/lib/use/index.cjs +3 -0
  111. package/lib/use/storage/index.cjs +16 -11
  112. package/lib/use/vue-use/computed-async.cjs +68 -0
  113. package/lib/use/vue-use/index.cjs +7 -0
  114. package/lib/util/overlay-container/overlay-container.cjs +7 -2
  115. package/lib/util/overlay-view-util/overlay-view-util.cjs +2 -1
  116. package/lib/util/render/render.cjs +4 -1
  117. package/lib/util/route/route.cjs +18 -3
  118. package/lib/view/common/index.cjs +2 -0
  119. package/lib/view/common/view.cjs +13 -0
  120. package/lib/view/md-custom-view/md-custom-view.provider.cjs +15 -0
  121. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- import { IViewProvider, RedrawViewEvent, CTX } from '@ibiz-template/runtime';
1
+ import { IViewProvider, RedrawViewEvent, CTX, EventBase, IViewShellHooks } from '@ibiz-template/runtime';
2
2
  import { PropType, Ref } from 'vue';
3
3
  import { IAppView } from '@ibiz/model-core';
4
4
  import './view-shell.scss';
@@ -19,6 +19,9 @@ export declare const IBizViewShell: import("vue").DefineComponent<{
19
19
  ctx: {
20
20
  type: PropType<CTX<import("@ibiz-template/runtime").IViewController<IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>>>;
21
21
  };
22
+ viewShellHooks: {
23
+ type: PropType<IViewShellHooks>;
24
+ };
22
25
  }, {
23
26
  ns: import("@ibiz-template/core").Namespace;
24
27
  errMsg: Ref<string>;
@@ -27,6 +30,7 @@ export declare const IBizViewShell: import("vue").DefineComponent<{
27
30
  hasAuthority: Ref<boolean>;
28
31
  viewModelData: Ref<IAppView | undefined>;
29
32
  redrawView: (event: RedrawViewEvent) => Promise<void>;
33
+ onCreated: (event: EventBase) => void;
30
34
  curContext: Ref<import("@ibiz-template/core").IApiContext>;
31
35
  curParams: Ref<import("@ibiz-template/core").IApiParams>;
32
36
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -46,5 +50,8 @@ export declare const IBizViewShell: import("vue").DefineComponent<{
46
50
  ctx: {
47
51
  type: PropType<CTX<import("@ibiz-template/runtime").IViewController<IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>>>;
48
52
  };
53
+ viewShellHooks: {
54
+ type: PropType<IViewShellHooks>;
55
+ };
49
56
  }>>, {}, {}>;
50
57
  //# sourceMappingURL=view-shell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"view-shell.d.ts","sourceRoot":"","sources":["../../../src/common/view-shell/view-shell.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,aAAa,EAGb,eAAe,EAEf,GAAG,EACJ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EAER,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;wBAqNW,eAAe,KAAG,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;YAiElE,CAAC"}
1
+ {"version":3,"file":"view-shell.d.ts","sourceRoot":"","sources":["../../../src/common/view-shell/view-shell.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,aAAa,EAGb,eAAe,EAEf,GAAG,EACH,SAAS,EACT,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EAER,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsNW,eAAe,KAAG,QAAQ,IAAI,CAAC;uBAwBtC,SAAS,KAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;YAmD5C,CAAC"}
@@ -27,6 +27,9 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
27
27
  // 解决打开浮动容器(模态、抽屉、弹出框)ctx丢失问题
28
28
  ctx: {
29
29
  type: Object
30
+ },
31
+ viewShellHooks: {
32
+ type: Object
30
33
  }
31
34
  },
32
35
  setup(props, {
@@ -131,7 +134,7 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
131
134
  const noSrfSessionId = isNil(context.value.srfsessionid) || isEmpty(context.value.srfsessionid);
132
135
  const id = createUUID();
133
136
  if (noSrfSessionId) {
134
- const domain = ibiz.uiDomainManager.create(id);
137
+ const domain = ibiz.uiDomainManager.create(id, appDataEntityId);
135
138
  context.value.srfsessionid = domain.id;
136
139
  }
137
140
  const app = ibiz.hub.getApp(viewModel.appId);
@@ -196,6 +199,7 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
196
199
  Object.assign(params.value, redrawData.params);
197
200
  const modal = attrs.modal;
198
201
  if (modal) {
202
+ modal.hooks.preDismiss.clear();
199
203
  modal.hooks.shouldDismiss.clear();
200
204
  modal.hooks.beforeDismiss.clear();
201
205
  }
@@ -207,6 +211,11 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
207
211
  });
208
212
  }
209
213
  };
214
+ const onCreated = (event) => {
215
+ if (props.viewShellHooks) {
216
+ props.viewShellHooks.hooks.viewCreated.call(event);
217
+ }
218
+ };
210
219
  return {
211
220
  ns,
212
221
  errMsg,
@@ -215,6 +224,7 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
215
224
  hasAuthority,
216
225
  viewModelData,
217
226
  redrawView,
227
+ onCreated,
218
228
  curContext: context,
219
229
  curParams: params
220
230
  };
@@ -227,7 +237,8 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
227
237
  modelData: clone(this.viewModelData),
228
238
  ...this.$attrs,
229
239
  provider: this.provider,
230
- onRedrawView: this.redrawView
240
+ onRedrawView: this.redrawView,
241
+ onCreated: this.onCreated
231
242
  }, this.$slots);
232
243
  }
233
244
  if (!this.hasAuthority) {
@@ -1 +1 @@
1
- {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/panel/panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAST,MAAM,KAAK,CAAC;AACb,OAAO,EACL,MAAM,EAKP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,WAAW,EAGX,eAAe,EAGhB,MAAM,wBAAwB,CAAC;AAsGhC;;GAEG;AACH,eAAO,MAAM,YAAY;IAGrB;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;;OAGG;;;;;;;;;IA/BH;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;;OAGG;;;;;;;;MA8EL,CAAC"}
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/panel/panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAST,MAAM,KAAK,CAAC;AACb,OAAO,EACL,MAAM,EAKP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,WAAW,EAGX,eAAe,EAGhB,MAAM,wBAAwB,CAAC;AAsHhC;;GAEG;AACH,eAAO,MAAM,YAAY;IAGrB;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;;OAGG;;;;;;;;;IA/BH;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;;OAGG;;;;;;;;MA8EL,CAAC"}
@@ -64,12 +64,23 @@ function renderPanelItem(panelItem, c, ins) {
64
64
  tempStyle = panelItem.cssStyle;
65
65
  }
66
66
  const panelItemC = panelItems[panelItem.id];
67
+ const attrs = renderAttrs(panelItem, panelItemC);
68
+ if (attrs.dynamicstyle) {
69
+ if (typeof attrs.dynamicstyle === "object") {
70
+ tempStyle += Object.entries(attrs.dynamicstyle).map(([key, value]) => {
71
+ return "".concat(key, ":").concat(value, ";");
72
+ }).join("");
73
+ } else {
74
+ tempStyle += attrs.dynamicstyle;
75
+ }
76
+ delete attrs.dynamicstyle;
77
+ }
67
78
  return h(component, {
68
79
  modelData: panelItem,
69
80
  controller: panelItemC,
70
81
  key: panelItem.id,
71
82
  style: tempStyle,
72
- attrs: renderAttrs(panelItem, panelItemC)
83
+ attrs
73
84
  }, children);
74
85
  }
75
86
  const PanelControl = /* @__PURE__ */ defineComponent({
@@ -57,7 +57,7 @@ export declare const ViewLayoutPanelControl: import("vue").DefineComponent<{
57
57
  panelItems: {
58
58
  [key: string]: IPanelItemController;
59
59
  };
60
- } | undefined) => VNode | null;
60
+ }) => VNode | null;
61
61
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
62
62
  /**
63
63
  * @description 视图布局面板模型
@@ -1 +1 @@
1
- {"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAKN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAIlB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AA0BhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;IAG/B;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;;iCAuCU,UAAU;;;;;;;sBASpB,KAAK,GAAG,IAAI;;IA3Ef;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;MAgKL,CAAC"}
1
+ {"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAKN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAIlB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AA0BhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;IAG/B;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;;iCAuCU,UAAU,YACX;QACR,SAAS,EAAE;YACT,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAC;SACnC,CAAC;QACF,UAAU,EAAE;YACV,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;SACrC,CAAC;KACH,KACA,KAAK,GAAG,IAAI;;IA3Ef;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;MAgLL,CAAC"}
@@ -144,12 +144,23 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
144
144
  tempStyle = panelItem.cssStyle;
145
145
  }
146
146
  const panelItemC = panelItems[panelItem.id];
147
+ const attrs = renderAttrs(panelItem, panelItemC);
148
+ if (attrs.dynamicstyle) {
149
+ if (typeof attrs.dynamicstyle === "object") {
150
+ tempStyle += Object.entries(attrs.dynamicstyle).map(([key, value]) => {
151
+ return "".concat(key, ":").concat(value, ";");
152
+ }).join("");
153
+ } else {
154
+ tempStyle += attrs.dynamicstyle;
155
+ }
156
+ delete attrs.dynamicstyle;
157
+ }
147
158
  return h(component, {
148
159
  modelData: panelItem,
149
160
  controller: panelItemC,
150
161
  key: panelItem.id,
151
162
  style: tempStyle,
152
- attrs: renderAttrs(panelItem, panelItemC)
163
+ attrs
153
164
  }, children);
154
165
  };
155
166
  provide("renderPanelItem", renderPanelItem);
package/es/index.mjs CHANGED
@@ -19,6 +19,7 @@ export { IBizCodeList } from './common/code-list/code-list.mjs';
19
19
  export { ControlLoadingPlaceholder } from './common/control-loading-placeholder/control-loading-placeholder.mjs';
20
20
  export { IBizBadge } from './common/badge/badge.mjs';
21
21
  export { IBizCustomRender } from './common/custom-render/custom-render.mjs';
22
+ export { IBizSignaturePad } from './common/signature-pad/signature-pad.mjs';
22
23
  export { PanelContainerState } from './panel-component/panel-container/panel-container.state.mjs';
23
24
  export { PanelContainerController } from './panel-component/panel-container/panel-container.controller.mjs';
24
25
  export { IBizPanelContainer } from './panel-component/panel-container/index.mjs';
@@ -84,6 +85,7 @@ export { useCodeListListen } from './use/codeList-listen/codelist-listen.mjs';
84
85
  export { useLocalCacheKey } from './use/storage/index.mjs';
85
86
  export { useAutoFocusBlur } from './use/autofocus-blur/autofocus-blur.mjs';
86
87
  export { shareCommonAncestor, usePopoverVisible, usePopoverzIndex } from './use/popover/popover.mjs';
88
+ export { computedAsync } from './use/vue-use/computed-async.mjs';
87
89
  export { OverlayContainer } from './util/overlay-container/overlay-container.mjs';
88
90
  export { OverlayPopoverContainer } from './util/overlay-popover-container/overlay-popover-container.mjs';
89
91
  export { routerCallback } from './util/router-callback/router-callback.mjs';
@@ -5,6 +5,7 @@ export declare const en: {
5
5
  onFoundCorrespondingPart: string;
6
6
  noFoundViewModel: string;
7
7
  noSupportLoadingDynamic: string;
8
+ invalidPointCoordinates: string;
8
9
  };
9
10
  control: {
10
11
  unsupportedPanel: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEd,CAAC"}
@@ -5,7 +5,8 @@ const en = {
5
5
  undefined: "undefined",
6
6
  onFoundCorrespondingPart: "Undefined adapter with no corresponding part found",
7
7
  noFoundViewModel: "View model not found",
8
- noSupportLoadingDynamic: "{codeName}No entity, do not support loading dynamic models at this time"
8
+ noSupportLoadingDynamic: "{codeName}No entity, do not support loading dynamic models at this time",
9
+ invalidPointCoordinates: "Invalid point coordinates: ({x}, {y})"
9
10
  },
10
11
  control: {
11
12
  unsupportedPanel: "Unsupported panel items: {id} - {itemType}"
@@ -5,6 +5,7 @@ export declare const zhCn: {
5
5
  onFoundCorrespondingPart: string;
6
6
  noFoundViewModel: string;
7
7
  noSupportLoadingDynamic: string;
8
+ invalidPointCoordinates: string;
8
9
  };
9
10
  control: {
10
11
  unsupportedPanel: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEhB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEhB,CAAC"}
@@ -5,7 +5,8 @@ const zhCn = {
5
5
  undefined: "\u672A\u5B9A\u4E49",
6
6
  onFoundCorrespondingPart: "\u672A\u5B9A\u4E49\u672A\u627E\u5230\u5BF9\u5E94\u90E8\u4EF6\u7684\u9002\u914D\u5668",
7
7
  noFoundViewModel: "\u672A\u627E\u5230\u89C6\u56FE\u6A21\u578B",
8
- noSupportLoadingDynamic: "{codeName}\u65E0\u5B9E\u4F53,\u6682\u4E0D\u652F\u6301\u52A0\u8F7D\u52A8\u6001\u6A21\u578B"
8
+ noSupportLoadingDynamic: "{codeName}\u65E0\u5B9E\u4F53,\u6682\u4E0D\u652F\u6301\u52A0\u8F7D\u52A8\u6001\u6A21\u578B",
9
+ invalidPointCoordinates: "\u70B9\u5750\u6807\u65E0\u6548: ({x}, {y})"
9
10
  },
10
11
  control: {
11
12
  unsupportedPanel: "\u6682\u672A\u652F\u6301\u7684\u9762\u677F\u9879: {id} - {itemType}"
@@ -33,7 +33,7 @@ export declare const MultiDataContainer: import("vue").DefineComponent<{
33
33
  panelItems: {
34
34
  [key: string]: IPanelItemController;
35
35
  };
36
- } | undefined) => VNode | null;
36
+ }) => VNode | null;
37
37
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
38
  /**
39
39
  * @description 多项数据容器模型
@@ -1 +1 @@
1
- {"version":3,"file":"multi-data-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container/multi-data-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAIL,QAAQ,EAER,KAAK,EAEN,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,6BAA6B,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;IAG3B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;iCA8BY,UAAU;;;;;;;sBASlB,KAAK,GAAG,IAAI;;IAhDnB;;OAEG;;;;;IAKH;;OAEG;;;;;YAoFL,CAAC"}
1
+ {"version":3,"file":"multi-data-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container/multi-data-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAIL,QAAQ,EAER,KAAK,EAEN,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,6BAA6B,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;IAG3B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;iCA8BY,UAAU,YACX;QACR,SAAS,EAAE;YACT,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAC;SACnC,CAAC;QACF,UAAU,EAAE;YACV,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;SACrC,CAAC;KACH,KACE,KAAK,GAAG,IAAI;;IAhDnB;;OAEG;;;;;IAKH;;OAEG;;;;;YAoFL,CAAC"}
@@ -33,7 +33,7 @@ export declare const MultiDataContainerRaw: import("vue").DefineComponent<{
33
33
  panelItems: {
34
34
  [key: string]: IPanelItemController;
35
35
  };
36
- } | undefined) => VNode | null;
36
+ }) => VNode | null;
37
37
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
38
  /**
39
39
  * @description 多项数据容器(仅数据)模型
@@ -1 +1 @@
1
- {"version":3,"file":"multi-data-container-raw.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container-raw/multi-data-container-raw.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAIL,QAAQ,EAER,KAAK,EAEN,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;IAG9B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;iCA0BY,UAAU;;;;;;;sBASlB,KAAK,GAAG,IAAI;;IA5CnB;;OAEG;;;;;IAKH;;OAEG;;;;;YA6EL,CAAC"}
1
+ {"version":3,"file":"multi-data-container-raw.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container-raw/multi-data-container-raw.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAIL,QAAQ,EAER,KAAK,EAEN,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;IAG9B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;iCA0BY,UAAU,YACX;QACR,SAAS,EAAE;YACT,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAC;SACnC,CAAC;QACF,UAAU,EAAE;YACV,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;SACrC,CAAC;KACH,KACE,KAAK,GAAG,IAAI;;IA5CnB;;OAEG;;;;;IAKH;;OAEG;;;;;YA6EL,CAAC"}
@@ -11,7 +11,7 @@ import { NavPosState } from './nav-pos.state';
11
11
  */
12
12
  export declare class NavPosController extends PanelItemController<IPanelRawItem> implements IPanelItemNavPosController {
13
13
  /**
14
- * 导航占位状态
14
+ * @description 导航占位状态
15
15
  * @exposedoc
16
16
  * @type {NavPosState}
17
17
  * @memberof NavPosController
@@ -7,7 +7,7 @@ import './nav-pos.scss';
7
7
  * 导航占位
8
8
  * @primary
9
9
  * @description 面板中的导航视图占位组件,用于绘制导航视图,并存储导航视图信息与缓存。
10
- * @panelitemparams {name:expcache,parameterType:string,defaultvalue:-,description:当值为NO_CACHE时禁用缓存,即每次导航切换时都是重新绘制新的视图,否则使用keepAlive包裹绘制的导航视图}
10
+ * @panelitemparams {name:expcache,parameterType:'CACHE' | 'NO_CACHE',defaultvalue:-,description:当值为NO_CACHE时禁用缓存,即每次导航切换时都是重新绘制新的视图,否则使用keepAlive包裹绘制的导航视图}
11
11
  * @panelitemparams {name:ignoreembedkey,parameterType:boolean,defaultvalue:-,description:忽略嵌入视图key参数}
12
12
  * @panelitemparams {name:expmode,parameterType:'ROUTE' | 'NO_ROUTE',defaultvalue:-,description:导航模式,ROUTE为路由模式,NO_ROUTE为非路由模式,在路由模式下会通过路由打开视图,在非路由的模式下,则会通过视图模型去绘制视图}
13
13
  * @panelitemparams {"name":"routeattributekeys","parameterType":"string","defaultvalue":"-","description":"路由透传参数,参数值为上下文对象的key,多个值用竖线`|`分隔,透传的参数将会在路由组件进行解析,并显示声明在路由上进行传递"}
@@ -1 +1 @@
1
- {"version":3,"file":"panel-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container/panel-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAGvB;;OAEG;;;;;IAEH;;OAEG;;;;;;;;;IANH;;OAEG;;;;;IAEH;;OAEG;;;;;YA2DL,CAAC"}
1
+ {"version":3,"file":"panel-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container/panel-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAGvB;;OAEG;;;;;IAEH;;OAEG;;;;;;;;;IANH;;OAEG;;;;;IAEH;;OAEG;;;;;YAuGL,CAAC"}
@@ -1,4 +1,4 @@
1
- import { isVNode, defineComponent, computed, createVNode, resolveComponent } from 'vue';
1
+ import { isVNode, defineComponent, computed, createVNode, resolveComponent, mergeProps } from 'vue';
2
2
  import '../../use/index.mjs';
3
3
  import { PanelContainerController } from './panel-container.controller.mjs';
4
4
  import './panel-container.css';
@@ -42,7 +42,7 @@ const PanelContainer = /* @__PURE__ */ defineComponent({
42
42
  };
43
43
  },
44
44
  render() {
45
- var _a, _b;
45
+ var _a, _b, _c;
46
46
  let _slot;
47
47
  const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
48
48
  const content = createVNode(resolveComponent("iBizRow"), {
@@ -62,6 +62,34 @@ const PanelContainer = /* @__PURE__ */ defineComponent({
62
62
  })) ? _slot : {
63
63
  default: () => [_slot]
64
64
  });
65
+ const attrs = (_c = this.$attrs) == null ? void 0 : _c.attrs;
66
+ if (attrs && attrs.dynamictooltip) {
67
+ const attributes = {
68
+ ...attrs.dynamictooltip
69
+ };
70
+ delete attributes.content;
71
+ return createVNode(resolveComponent("el-tooltip"), mergeProps({
72
+ "placement": "right",
73
+ "popper-class": this.ns.e("dynamic-tooltip")
74
+ }, attributes), {
75
+ default: () => {
76
+ return createVNode("div", mergeProps({
77
+ "class": this.classArr,
78
+ "onClick": () => {
79
+ this.controller.onClick();
80
+ }
81
+ }, this.$attrs), [this.controller.model.cssStyle ? createVNode("style", {
82
+ "type": "text/css"
83
+ }, [this.controller.model.cssStyle]) : null, content]);
84
+ },
85
+ content: () => {
86
+ return createVNode("div", {
87
+ "class": this.ns.e("dynamic-tooltip-content"),
88
+ "innerHTML": attrs.dynamictooltip.content
89
+ }, null);
90
+ }
91
+ });
92
+ }
65
93
  return createVNode("div", {
66
94
  "class": this.classArr,
67
95
  "onClick": () => {
@@ -84,7 +84,7 @@ class PanelFieldController extends PanelItemController {
84
84
  */
85
85
  async validate() {
86
86
  var _a;
87
- if (this.state.visible && !this.model.allowEmpty && !this.value) {
87
+ if (this.state.visible && this.state.required && !this.value) {
88
88
  this.state.error = ((_a = this.editor) == null ? void 0 : _a.model.placeHolder) || ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty", {
89
89
  caption: this.model.caption
90
90
  });
@@ -4,7 +4,7 @@ import { PanelItemController } from '@ibiz-template/runtime';
4
4
  /**
5
5
  * 面板分页
6
6
  * @primary
7
- * @description 为分页容器下的分页子容器,此容器下才是面板成员
7
+ * @description 为分页面板下的分页子容器,此容器下才是面板成员。
8
8
  */
9
9
  export declare const PanelTabPage: import("vue").DefineComponent<{
10
10
  /**
@@ -35,7 +35,7 @@ export declare const SingleDataContainer: import("vue").DefineComponent<{
35
35
  panelItems: {
36
36
  [key: string]: IPanelItemController;
37
37
  };
38
- } | undefined) => VNode | null;
38
+ }) => VNode | null;
39
39
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
40
40
  /**
41
41
  * @description 单项数据容器模型
@@ -1 +1 @@
1
- {"version":3,"file":"single-data-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/single-data-container/single-data-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAIL,QAAQ,EAER,KAAK,EACN,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,8BAA8B,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;IAG5B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;iCAoBY,UAAU;;;;;;;sBASlB,KAAK,GAAG,IAAI;;IAtCnB;;OAEG;;;;;IAKH;;OAEG;;;;;YAuEL,CAAC"}
1
+ {"version":3,"file":"single-data-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/single-data-container/single-data-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAIL,QAAQ,EAER,KAAK,EACN,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,8BAA8B,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;IAG5B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;iCAoBY,UAAU,YACX;QACR,SAAS,EAAE;YACT,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAC;SACnC,CAAC;QACF,UAAU,EAAE;YACV,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;SACrC,CAAC;KACH,KACE,KAAK,GAAG,IAAI;;IAtCnB;;OAEG;;;;;IAKH;;OAEG;;;;;YAuEL,CAAC"}
@@ -6,6 +6,7 @@ import { TeleportPlaceholderController } from './teleport-placeholder.controller
6
6
  * 传送占位
7
7
  * @primary
8
8
  * @description 使用vue的Teleport内置组件,用于绘制嵌入视图中的面板成员。
9
+ * @panelitemparams {name:TeleportTag,parameterType:string,description:传送占位面板项与需传送部件的关联标识,其值必须与部件参数(teleporttag)的值一致}
9
10
  */
10
11
  export declare const TeleportPlaceholder: import("vue").DefineComponent<{
11
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"teleport-placeholder.d.ts","sourceRoot":"","sources":["../../../src/panel-component/teleport-placeholder/teleport-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA6B,QAAQ,EAAO,MAAM,KAAK,CAAC;AAE/D,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAG5B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YAuCL,CAAC"}
1
+ {"version":3,"file":"teleport-placeholder.d.ts","sourceRoot":"","sources":["../../../src/panel-component/teleport-placeholder/teleport-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA6B,QAAQ,EAAO,MAAM,KAAK,CAAC;AAE/D,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;IAG5B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YAuCL,CAAC"}
@@ -7,7 +7,7 @@ import { PanelItemState } from '@ibiz-template/runtime';
7
7
  */
8
8
  export declare class TeleportPlaceholderState extends PanelItemState {
9
9
  /**
10
- * @description 可根据该参数从嵌入视图里找到占位面板成员用于渲染,通过自定义补充参数配置
10
+ * @description 嵌入视图中的部件可依据该参数找到传送占位面板项进行位置替换,参数默认格式为 “当前视图标识-需传送部件标识”;也可通过面板项参数(TeleportTag)来指定
11
11
  * @exposedoc
12
12
  * @type {string}
13
13
  * @memberof TeleportPlaceholderState
@@ -5,7 +5,7 @@ class TeleportPlaceholderState extends PanelItemState {
5
5
  constructor() {
6
6
  super(...arguments);
7
7
  /**
8
- * @description 可根据该参数从嵌入视图里找到占位面板成员用于渲染,通过自定义补充参数配置
8
+ * @description 嵌入视图中的部件可依据该参数找到传送占位面板项进行位置替换,参数默认格式为 “当前视图标识-需传送部件标识”;也可通过面板项参数(TeleportTag)来指定
9
9
  * @exposedoc
10
10
  * @type {string}
11
11
  * @memberof TeleportPlaceholderState
@@ -37,14 +37,15 @@ export declare class PluginFactory implements IPluginFactory {
37
37
  */
38
38
  protected pluginCache: Map<string, RemotePluginItem>;
39
39
  /**
40
- * 所有的插件
41
- *
42
- * @author chitanda
43
- * @date 2023-02-02 16:02:55
40
+ * @description 所有的插件
44
41
  * @protected
45
- * @type {Plugin[]}
42
+ * @type {{ code: Plugin; extraParams: IParams }[]}
43
+ * @memberof PluginFactory
46
44
  */
47
- protected pluginCodes: Plugin[];
45
+ protected pluginCodes: {
46
+ code: Plugin;
47
+ extraParams: IParams;
48
+ }[];
48
49
  /**
49
50
  * 预定义插件集合
50
51
  *
@@ -116,14 +117,13 @@ export declare class PluginFactory implements IPluginFactory {
116
117
  */
117
118
  loadPredefinedPlugin(name: string): Promise<void>;
118
119
  /**
119
- * 插件刚加载完成回来,设置到目前所有的 vue 实例当中
120
- *
121
- * @author chitanda
122
- * @date 2023-02-02 17:02:38
120
+ * @description 插件刚加载完成回来,设置到目前所有的 vue 实例当中
123
121
  * @protected
124
122
  * @param {Plugin} code
123
+ * @param {IParams} [extraParams={}]
124
+ * @memberof PluginFactory
125
125
  */
126
- protected setPluginCode(code: Plugin): void;
126
+ protected setPluginCode(code: Plugin, extraParams?: IParams): void;
127
127
  /**
128
128
  * @description 加载插件
129
129
  * @param {ISysPFPlugin} plugin
@@ -137,10 +137,11 @@ export declare class PluginFactory implements IPluginFactory {
137
137
  * @param {string} rtObjectName
138
138
  * @param {string} rtObjectRepo
139
139
  * @param {string} [appId=ibiz.env.appId]
140
+ * @param {IParams} [params={}]
140
141
  * @returns {*} {Promise<boolean>}
141
142
  * @memberof PluginFactory
142
143
  */
143
- loadPluginRef(rtObjectName: string, rtObjectRepo: string, appId?: string): Promise<boolean>;
144
+ loadPluginRef(rtObjectName: string, rtObjectRepo: string, appId?: string, extraParams?: IParams): Promise<boolean>;
144
145
  /**
145
146
  * 加载插件
146
147
  *
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-factory/plugin-factory.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlC;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,SAA0B;IAE1C;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAElD;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAa;IAEjE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,CAAM;IAErC;;;;;;;OAOG;IACH,SAAS,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAElE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAM;IAEhD;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAa;IAE/D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAS/C;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzC;;;;;;OAMG;IACH,wBAAwB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAInD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAMxB;;;;;;;OAOG;IACG,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvD;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM3C;;;;;;OAMG;IACG,UAAU,CACd,MAAM,EAAE,YAAY,EACpB,KAAK,GAAE,MAAuB,GAC7B,OAAO,CAAC,OAAO,CAAC;IA2CnB;;;;;;;OAOG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,KAAK,GAAE,MAAuB,GAC7B,OAAO,CAAC,OAAO,CAAC;IA4CnB;;;;;;;;OAQG;cACa,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA6CzE;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAA+B,GACvC,MAAM;IAwBT;;;;;;;;OAQG;cACa,kBAAkB,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,IAAI,CAAC;IAiChB;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,CAC7B,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,MAAM,GACZ,gBAAgB,GAAG,IAAI;CAkD3B"}
1
+ {"version":3,"file":"plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-factory/plugin-factory.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlC;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,SAA0B;IAE1C;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAElD;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAa;IAEjE;;;;;OAKG;IACH,SAAS,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,EAAE,CAAM;IAErE;;;;;;;OAOG;IACH,SAAS,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAElE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAM;IAEhD;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAa;IAE/D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAS/C;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzC;;;;;;OAMG;IACH,wBAAwB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAInD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAMxB;;;;;;;OAOG;IACG,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvD;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,GAAE,OAAY,GAAG,IAAI;IAMtE;;;;;;OAMG;IACG,UAAU,CACd,MAAM,EAAE,YAAY,EACpB,KAAK,GAAE,MAAuB,GAC7B,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;;;;;;OAQG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,KAAK,GAAE,MAAuB,EAC9B,WAAW,GAAE,OAAY,GACxB,OAAO,CAAC,OAAO,CAAC;IA4CnB;;;;;;;;OAQG;cACa,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmDzE;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAA+B,GACvC,MAAM;IAwBT;;;;;;;;OAQG;cACa,kBAAkB,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,IAAI,CAAC;IAiChB;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,CAC7B,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,MAAM,GACZ,gBAAgB,GAAG,IAAI;CAkD3B"}
@@ -34,12 +34,10 @@ class PluginFactory {
34
34
  */
35
35
  this.pluginCache = /* @__PURE__ */ new Map();
36
36
  /**
37
- * 所有的插件
38
- *
39
- * @author chitanda
40
- * @date 2023-02-02 16:02:55
37
+ * @description 所有的插件
41
38
  * @protected
42
- * @type {Plugin[]}
39
+ * @type {{ code: Plugin; extraParams: IParams }[]}
40
+ * @memberof PluginFactory
43
41
  */
44
42
  this.pluginCodes = [];
45
43
  /**
@@ -116,7 +114,7 @@ class PluginFactory {
116
114
  */
117
115
  register(app) {
118
116
  this.pluginCodes.forEach((plugin) => {
119
- app.use(plugin);
117
+ app.use(plugin.code, plugin.extraParams);
120
118
  });
121
119
  }
122
120
  /**
@@ -136,16 +134,15 @@ class PluginFactory {
136
134
  }
137
135
  }
138
136
  /**
139
- * 插件刚加载完成回来,设置到目前所有的 vue 实例当中
140
- *
141
- * @author chitanda
142
- * @date 2023-02-02 17:02:38
137
+ * @description 插件刚加载完成回来,设置到目前所有的 vue 实例当中
143
138
  * @protected
144
139
  * @param {Plugin} code
140
+ * @param {IParams} [extraParams={}]
141
+ * @memberof PluginFactory
145
142
  */
146
- setPluginCode(code) {
147
- this.pluginCodes.push(code);
148
- AppHooks.useComponent.callSync(null, code);
143
+ setPluginCode(code, extraParams = {}) {
144
+ this.pluginCodes.push({ code, extraParams });
145
+ AppHooks.useComponent.callSync(null, code, extraParams);
149
146
  }
150
147
  /**
151
148
  * @description 加载插件
@@ -160,6 +157,7 @@ class PluginFactory {
160
157
  if (pluginRef) {
161
158
  const rtObjectName = pluginRef.rtobjectName;
162
159
  const rtObjectRepo = pluginRef.rtobjectRepo;
160
+ const pluginParams = pluginRef.pluginParams || {};
163
161
  if (this.isIgnore(rtObjectRepo)) {
164
162
  return true;
165
163
  }
@@ -179,7 +177,8 @@ class PluginFactory {
179
177
  const p = this.loadPluginRef(
180
178
  pluginRef.rtobjectName,
181
179
  pluginRef.rtobjectRepo,
182
- appId
180
+ appId,
181
+ { ...pluginParams }
183
182
  );
184
183
  this.loadQueue.set(rtObjectRepo, p);
185
184
  const result = await p;
@@ -201,10 +200,11 @@ class PluginFactory {
201
200
  * @param {string} rtObjectName
202
201
  * @param {string} rtObjectRepo
203
202
  * @param {string} [appId=ibiz.env.appId]
203
+ * @param {IParams} [params={}]
204
204
  * @returns {*} {Promise<boolean>}
205
205
  * @memberof PluginFactory
206
206
  */
207
- async loadPluginRef(rtObjectName, rtObjectRepo, appId = ibiz.env.appId) {
207
+ async loadPluginRef(rtObjectName, rtObjectRepo, appId = ibiz.env.appId, extraParams = {}) {
208
208
  if (this.isIgnore(rtObjectRepo)) {
209
209
  return true;
210
210
  }
@@ -227,7 +227,7 @@ class PluginFactory {
227
227
  }
228
228
  configData = res.data;
229
229
  }
230
- Object.assign(configData, { appId });
230
+ Object.assign(configData, { appId, extraParams });
231
231
  const remotePlugin = new RemotePluginItem(
232
232
  rtObjectName,
233
233
  rtObjectRepo,
@@ -256,7 +256,13 @@ class PluginFactory {
256
256
  */
257
257
  async loadScript(remotePlugin) {
258
258
  const pluginPath = remotePlugin.repo;
259
- const { name, appId, system, styles = [] } = remotePlugin.config;
259
+ const {
260
+ name,
261
+ appId,
262
+ system,
263
+ styles = [],
264
+ extraParams = {}
265
+ } = remotePlugin.config;
260
266
  let scriptUrl = "";
261
267
  scriptUrl = pathBrowserify.join(pluginPath, system);
262
268
  if (scriptUrl) {
@@ -281,7 +287,7 @@ class PluginFactory {
281
287
  data = await System.import(name);
282
288
  if (data) {
283
289
  if (data.default) {
284
- this.setPluginCode(data.default);
290
+ this.setPluginCode(data.default, extraParams);
285
291
  } else {
286
292
  throw new RuntimeError(
287
293
  ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad")
package/es/use/index.d.ts CHANGED
@@ -11,4 +11,5 @@ export * from './codeList-listen/codelist-listen';
11
11
  export * from './storage';
12
12
  export * from './autofocus-blur/autofocus-blur';
13
13
  export * from './popover/popover';
14
+ export * from './vue-use';
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/use/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,iCAAiC,CAAC;AAChD,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/use/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,iCAAiC,CAAC;AAChD,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
package/es/use/index.mjs CHANGED
@@ -11,8 +11,10 @@ export { useCodeListListen } from './codeList-listen/codelist-listen.mjs';
11
11
  export { useLocalCacheKey } from './storage/index.mjs';
12
12
  export { useAutoFocusBlur } from './autofocus-blur/autofocus-blur.mjs';
13
13
  export { shareCommonAncestor, usePopoverVisible, usePopoverzIndex } from './popover/popover.mjs';
14
+ import './vue-use/index.mjs';
14
15
  export { useControlController } from './control/use-control-controller/use-control-controller.mjs';
15
16
  export { useViewController } from './view/use-view-controller/use-view-controller.mjs';
16
17
  export { useViewOperation } from './view/use-view-operation/use-view-operation.mjs';
18
+ export { computedAsync } from './vue-use/computed-async.mjs';
17
19
 
18
20
  "use strict";