@ibiz-template/vue3-components 0.7.25 → 0.7.26-alpha.0

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 (49) hide show
  1. package/dist/index-WMgMgSGZ.js +4 -0
  2. package/dist/index.min.css +1 -1
  3. package/dist/index.system.min.js +1 -1
  4. package/dist/{xlsx-util-xgesm7QP.js → xlsx-util-W01Wk5pi.js} +1 -1
  5. package/es/control/dashboard/index.mjs +4 -1
  6. package/es/control/dashboard/portlet/index.d.ts +1 -0
  7. package/es/control/dashboard/portlet/index.mjs +2 -0
  8. package/es/control/dashboard/portlet/report-portlet/index.d.ts +24 -0
  9. package/es/control/dashboard/portlet/report-portlet/index.mjs +12 -0
  10. package/es/control/dashboard/portlet/report-portlet/report-portlet.d.ts +24 -0
  11. package/es/control/dashboard/portlet/report-portlet/report-portlet.mjs +64 -0
  12. package/es/control/dashboard/portlet/report-portlet/report-portlet.provider.d.ts +15 -0
  13. package/es/control/dashboard/portlet/report-portlet/report-portlet.provider.mjs +21 -0
  14. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.mjs +25 -0
  15. package/es/control/form/form-detail/form-mdctrl/index.mjs +2 -0
  16. package/es/control/form/form-detail/form-mdctrl/mdctrl-container2/icon/index.d.ts +21 -0
  17. package/es/control/form/form-detail/form-mdctrl/mdctrl-container2/icon/index.mjs +75 -0
  18. package/es/control/form/form-detail/form-mdctrl/mdctrl-container2/mdctrl-container2.css +1 -0
  19. package/es/control/form/form-detail/form-mdctrl/mdctrl-container2/mdctrl-container2.d.ts +38 -0
  20. package/es/control/form/form-detail/form-mdctrl/mdctrl-container2/mdctrl-container2.mjs +205 -0
  21. package/es/control/index.mjs +2 -0
  22. package/es/control/report-panel/report-detail/bi-report-panel/bi-report-panel.mjs +7 -1
  23. package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.mjs +33 -1
  24. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
  25. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +50 -32
  26. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +2 -0
  27. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +59 -5
  28. package/es/index.mjs +2 -0
  29. package/es/view-engine/edit-view.engine.mjs +1 -1
  30. package/lib/control/dashboard/index.cjs +5 -0
  31. package/lib/control/dashboard/portlet/index.cjs +4 -0
  32. package/lib/control/dashboard/portlet/report-portlet/index.cjs +18 -0
  33. package/lib/control/dashboard/portlet/report-portlet/report-portlet.cjs +66 -0
  34. package/lib/control/dashboard/portlet/report-portlet/report-portlet.provider.cjs +23 -0
  35. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.cjs +25 -0
  36. package/lib/control/form/form-detail/form-mdctrl/index.cjs +2 -0
  37. package/lib/control/form/form-detail/form-mdctrl/mdctrl-container2/icon/index.cjs +81 -0
  38. package/lib/control/form/form-detail/form-mdctrl/mdctrl-container2/mdctrl-container2.cjs +207 -0
  39. package/lib/control/form/form-detail/form-mdctrl/mdctrl-container2/mdctrl-container2.css +1 -0
  40. package/lib/control/index.cjs +22 -18
  41. package/lib/control/report-panel/report-detail/bi-report-panel/bi-report-panel.cjs +7 -1
  42. package/lib/editor/data-picker/ibiz-picker-link/ibiz-picker-link.cjs +32 -0
  43. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +49 -31
  44. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
  45. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +59 -5
  46. package/lib/index.cjs +52 -48
  47. package/lib/view-engine/edit-view.engine.cjs +1 -1
  48. package/package.json +5 -5
  49. package/dist/index-Kg6lkzg1.js +0 -4
@@ -14,6 +14,7 @@ import { IBizRawItemPortlet } from './portlet/rawitem-portlet/index.mjs';
14
14
  import { IBizListPortlet } from './portlet/list-portlet/index.mjs';
15
15
  import { IBizHtmlPortlet } from './portlet/html-portlet/index.mjs';
16
16
  import { IBizActionBarPortlet } from './portlet/actionbar-portlet/index.mjs';
17
+ import { IBizReportPortlet } from './portlet/report-portlet/index.mjs';
17
18
  export { ContainerPortlet } from './portlet/container-portlet/container-portlet.mjs';
18
19
  export { ViewPortlet } from './portlet/view-portlet/view-portlet.mjs';
19
20
  export { MenuPortlet } from './portlet/menu-portlet/menu-portlet.mjs';
@@ -22,6 +23,7 @@ export { RawItemPortlet } from './portlet/rawitem-portlet/rawitem-portlet.mjs';
22
23
  export { ListPortlet } from './portlet/list-portlet/list-portlet.mjs';
23
24
  export { HtmlPortlet } from './portlet/html-portlet/html-portlet.mjs';
24
25
  export { ActionBarPortlet } from './portlet/actionbar-portlet/actionbar-portlet.mjs';
26
+ export { ReportPortlet } from './portlet/report-portlet/report-portlet.mjs';
25
27
 
26
28
  "use strict";
27
29
  const IBizDashboardControl = withInstall(
@@ -43,7 +45,8 @@ const IBizDashboardControl = withInstall(
43
45
  v.use(IBizListPortlet);
44
46
  v.use(IBizHtmlPortlet);
45
47
  v.use(IBizActionBarPortlet);
48
+ v.use(IBizReportPortlet);
46
49
  }
47
50
  );
48
51
 
49
- export { IBizActionBarPortlet, IBizChartPortlet, IBizContainerPortlet, IBizDashboardControl, IBizHtmlPortlet, IBizListPortlet, IBizMenuPortlet, IBizRawItemPortlet, IBizViewPortlet, PortletLayout, IBizDashboardControl as default };
52
+ export { IBizActionBarPortlet, IBizChartPortlet, IBizContainerPortlet, IBizDashboardControl, IBizHtmlPortlet, IBizListPortlet, IBizMenuPortlet, IBizRawItemPortlet, IBizReportPortlet, IBizViewPortlet, PortletLayout, IBizDashboardControl as default };
@@ -7,3 +7,4 @@ export * from './rawitem-portlet';
7
7
  export * from './list-portlet';
8
8
  export * from './html-portlet';
9
9
  export * from './actionbar-portlet';
10
+ export * from './report-portlet';
@@ -7,6 +7,7 @@ export { IBizRawItemPortlet } from './rawitem-portlet/index.mjs';
7
7
  export { IBizListPortlet } from './list-portlet/index.mjs';
8
8
  export { IBizHtmlPortlet } from './html-portlet/index.mjs';
9
9
  export { IBizActionBarPortlet } from './actionbar-portlet/index.mjs';
10
+ export { IBizReportPortlet } from './report-portlet/index.mjs';
10
11
  export { ContainerPortlet } from './container-portlet/container-portlet.mjs';
11
12
  export { ViewPortlet } from './view-portlet/view-portlet.mjs';
12
13
  export { MenuPortlet } from './menu-portlet/menu-portlet.mjs';
@@ -15,5 +16,6 @@ export { RawItemPortlet } from './rawitem-portlet/rawitem-portlet.mjs';
15
16
  export { ListPortlet } from './list-portlet/list-portlet.mjs';
16
17
  export { HtmlPortlet } from './html-portlet/html-portlet.mjs';
17
18
  export { ActionBarPortlet } from './actionbar-portlet/actionbar-portlet.mjs';
19
+ export { ReportPortlet } from './report-portlet/report-portlet.mjs';
18
20
 
19
21
  "use strict";
@@ -0,0 +1,24 @@
1
+ export * from './report-portlet';
2
+ export declare const IBizReportPortlet: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
3
+ modelData: {
4
+ type: import("vue").PropType<import("@ibiz/model-core").IDBSysPortletPart>;
5
+ required: true;
6
+ };
7
+ controller: {
8
+ type: typeof import("@ibiz-template/runtime").ReportPortletController;
9
+ required: true;
10
+ };
11
+ }, {
12
+ ns: import("@ibiz-template/core").Namespace;
13
+ report: import("@ibiz/model-core").IControl | undefined;
14
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ modelData: {
16
+ type: import("vue").PropType<import("@ibiz/model-core").IDBSysPortletPart>;
17
+ required: true;
18
+ };
19
+ controller: {
20
+ type: typeof import("@ibiz-template/runtime").ReportPortletController;
21
+ required: true;
22
+ };
23
+ }>>, {}, {}>>;
24
+ export default IBizReportPortlet;
@@ -0,0 +1,12 @@
1
+ import { registerPortletProvider } from '@ibiz-template/runtime';
2
+ import { withInstall } from '@ibiz-template/vue3-util';
3
+ import { ReportPortlet } from './report-portlet.mjs';
4
+ import { ReportPortletProvider } from './report-portlet.provider.mjs';
5
+
6
+ "use strict";
7
+ const IBizReportPortlet = withInstall(ReportPortlet, function(v) {
8
+ v.component(ReportPortlet.name, ReportPortlet);
9
+ registerPortletProvider("REPORT", () => new ReportPortletProvider());
10
+ });
11
+
12
+ export { IBizReportPortlet, ReportPortlet, IBizReportPortlet as default };
@@ -0,0 +1,24 @@
1
+ import { PropType } from 'vue';
2
+ import { ReportPortletController } from '@ibiz-template/runtime';
3
+ export declare const ReportPortlet: import("vue").DefineComponent<{
4
+ modelData: {
5
+ type: PropType<import("@ibiz/model-core").IDBSysPortletPart>;
6
+ required: true;
7
+ };
8
+ controller: {
9
+ type: typeof ReportPortletController;
10
+ required: true;
11
+ };
12
+ }, {
13
+ ns: import("@ibiz-template/core").Namespace;
14
+ report: import("@ibiz/model-core").IControl | undefined;
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: PropType<import("@ibiz/model-core").IDBSysPortletPart>;
18
+ required: true;
19
+ };
20
+ controller: {
21
+ type: typeof ReportPortletController;
22
+ required: true;
23
+ };
24
+ }>>, {}, {}>;
@@ -0,0 +1,64 @@
1
+ import { isVNode, onMounted, onBeforeUnmount, resolveComponent, h, createVNode, defineComponent } from 'vue';
2
+ import { useNamespace } from '@ibiz-template/vue3-util';
3
+ import { ReportPortletController, ControlType } from '@ibiz-template/runtime';
4
+
5
+ "use strict";
6
+ function _isSlot(s) {
7
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
8
+ }
9
+ const ReportPortlet = /* @__PURE__ */ defineComponent({
10
+ name: "IBizReportPortlet",
11
+ props: {
12
+ modelData: {
13
+ type: Object,
14
+ required: true
15
+ },
16
+ controller: {
17
+ type: ReportPortletController,
18
+ required: true
19
+ }
20
+ },
21
+ setup(props) {
22
+ var _a, _b;
23
+ const ns = useNamespace("portlet-".concat((_a = props.modelData.portletType) == null ? void 0 : _a.toLowerCase()));
24
+ const report = (_b = props.modelData.controls) == null ? void 0 : _b.find((item) => {
25
+ return item.controlType === ControlType.REPORT_PANEL;
26
+ });
27
+ let timerTag;
28
+ onMounted(() => {
29
+ const timer = props.controller.model.timer;
30
+ if (timer && timer > 0) {
31
+ timerTag = setInterval(() => {
32
+ props.controller.refresh();
33
+ }, timer);
34
+ }
35
+ });
36
+ onBeforeUnmount(() => {
37
+ clearInterval(timerTag);
38
+ });
39
+ return {
40
+ ns,
41
+ report
42
+ };
43
+ },
44
+ render() {
45
+ let _slot;
46
+ const classArr = [this.ns.b(), this.ns.m(this.modelData.codeName), ...this.controller.containerClass];
47
+ const {
48
+ context,
49
+ params
50
+ } = this.controller;
51
+ return createVNode(resolveComponent("iBizPortletLayout"), {
52
+ "controller": this.controller,
53
+ "class": classArr
54
+ }, _isSlot(_slot = h(resolveComponent("IBizControlShell"), {
55
+ context,
56
+ params,
57
+ modelData: this.report
58
+ })) ? _slot : {
59
+ default: () => [_slot]
60
+ });
61
+ }
62
+ });
63
+
64
+ export { ReportPortlet };
@@ -0,0 +1,15 @@
1
+ import { IDashboardController, IPortletContainerController, IPortletProvider, ReportPortletController } from '@ibiz-template/runtime';
2
+ import { IDBReportPortlet } from '@ibiz/model-core';
3
+ /**
4
+ * 报表门户部件适配器
5
+ *
6
+ * @author tony001
7
+ * @date 2024-06-19 17:06:17
8
+ * @export
9
+ * @class ReportPortletProvider
10
+ * @implements {IPortletProvider}
11
+ */
12
+ export declare class ReportPortletProvider implements IPortletProvider {
13
+ component: string;
14
+ createController(portletModel: IDBReportPortlet, dashboard: IDashboardController, parent?: IPortletContainerController): Promise<ReportPortletController>;
15
+ }
@@ -0,0 +1,21 @@
1
+ import { ReportPortletController } 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 ReportPortletProvider {
11
+ constructor() {
12
+ __publicField(this, "component", "IBizReportPortlet");
13
+ }
14
+ async createController(portletModel, dashboard, parent) {
15
+ const c = new ReportPortletController(portletModel, dashboard, parent);
16
+ await c.init();
17
+ return c;
18
+ }
19
+ }
20
+
21
+ export { ReportPortletProvider };
@@ -45,6 +45,31 @@ const FormMDCtrlForm = /* @__PURE__ */ defineComponent({
45
45
  formProvider,
46
46
  model
47
47
  } = this.controller;
48
+ if (model.detailStyle === "STYLE2") {
49
+ return createVNode(resolveComponent("iBizMDCtrlContainer2"), {
50
+ "controller": this.controller,
51
+ "items": state.items
52
+ }, {
53
+ item: ({
54
+ data
55
+ }) => {
56
+ if (!formProvider) {
57
+ return createVNode("div", null, [ibiz.i18n.t("control.form.formMDctrlForm.noFindProvider")]);
58
+ }
59
+ const formComponent = h(resolveComponent(formProvider.component), {
60
+ class: this.ns.be("item", "form"),
61
+ key: data.id,
62
+ modelData: model.contentControl,
63
+ context: data.context,
64
+ params: data.params,
65
+ onCreated: (event) => {
66
+ this.onCreated(data.id, event);
67
+ }
68
+ });
69
+ return formComponent;
70
+ }
71
+ });
72
+ }
48
73
  return createVNode(resolveComponent("iBizMDCtrlContainer"), {
49
74
  "class": this.ns.b(),
50
75
  "items": state.items,
@@ -6,6 +6,7 @@ import { FormMDCtrlMD } from './form-mdctrl-md/form-mdctrl-md.mjs';
6
6
  import { FormMDCtrlRepeater } from './form-mdctrl-repeater/form-mdctrl-repeater.mjs';
7
7
  import { FormMDCtrlProvider } from './form-mdctrl.provider.mjs';
8
8
  import { MDCtrlContainer } from './mdctrl-container/mdctrl-container.mjs';
9
+ import { MDCtrlContainer2 } from './mdctrl-container2/mdctrl-container2.mjs';
9
10
 
10
11
  "use strict";
11
12
  const IBizFormMDCtrl = withInstall(FormMDCtrl, function(v) {
@@ -14,6 +15,7 @@ const IBizFormMDCtrl = withInstall(FormMDCtrl, function(v) {
14
15
  v.component(FormMDCtrlMD.name, FormMDCtrlMD);
15
16
  v.component(FormMDCtrlRepeater.name, FormMDCtrlRepeater);
16
17
  v.component(MDCtrlContainer.name, MDCtrlContainer);
18
+ v.component(MDCtrlContainer2.name, MDCtrlContainer2);
17
19
  registerFormDetailProvider("MDCTRL", () => new FormMDCtrlProvider());
18
20
  });
19
21
 
@@ -0,0 +1,21 @@
1
+ import { VNode } from 'vue';
2
+ /**
3
+ * 拖拽图标
4
+ */
5
+ export declare const dragIcon: () => VNode;
6
+ /**
7
+ * 删除图标
8
+ */
9
+ export declare const removeIcon: () => VNode;
10
+ /**
11
+ * 添加图标
12
+ */
13
+ export declare const addIcon: () => VNode;
14
+ /**
15
+ * 左箭头图标
16
+ */
17
+ export declare const leftArrowIcon: () => VNode;
18
+ /**
19
+ * 右箭头图标
20
+ */
21
+ export declare const rightArrowIcon: () => VNode;
@@ -0,0 +1,75 @@
1
+ import { createVNode } from 'vue';
2
+
3
+ "use strict";
4
+ const dragIcon = () => createVNode("svg", {
5
+ "viewBox": "0 0 16 16",
6
+ "xmlns": "http://www.w3.org/2000/svg",
7
+ "height": "1em",
8
+ "width": "1em",
9
+ "preserveAspectRatio": "xMidYMid meet",
10
+ "focusable": "false"
11
+ }, [createVNode("g", {
12
+ "stroke-width": "1",
13
+ "fill-rule": "evenodd"
14
+ }, [createVNode("g", {
15
+ "transform": "translate(5 1)",
16
+ "fill-rule": "nonzero"
17
+ }, [createVNode("path", {
18
+ "d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"
19
+ }, null)])])]);
20
+ const removeIcon = () => createVNode("svg", {
21
+ "viewBox": "0 0 16 16",
22
+ "xmlns": "http://www.w3.org/2000/svg",
23
+ "height": "1em",
24
+ "width": "1em",
25
+ "preserveAspectRatio": "xMidYMid meet",
26
+ "focusable": "false"
27
+ }, [createVNode("g", {
28
+ "stroke-width": "1",
29
+ "fill-rule": "evenodd"
30
+ }, [createVNode("path", {
31
+ "d": "M4.002 3.403V1a1 1 0 0 1 1-1h6.003a1 1 0 0 1 1 1v2.403h3.396a.6.6 0 1 1 0 1.2h-1.395V15a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4.603H.6a.6.6 0 1 1 0-1.2h3.4zm8.804 1.205H3.2V14.8h9.605V4.608zM5.202 1.2v2.155h5.603V1.2H5.202zm.6 6.417a.6.6 0 0 1 1.201 0v4.758a.6.6 0 0 1-1.2 0V7.617zm3.202 0a.6.6 0 0 1 1.2 0v4.758a.6.6 0 0 1-1.2 0V7.617z"
32
+ }, null)])]);
33
+ const addIcon = () => createVNode("svg", {
34
+ "viewBox": "0 0 16 16",
35
+ "xmlns": "http://www.w3.org/2000/svg",
36
+ "height": "1em",
37
+ "width": "1em",
38
+ "preserveAspectRatio": "xMidYMid meet",
39
+ "focusable": "false"
40
+ }, [createVNode("g", {
41
+ "stroke-width": "1",
42
+ "fill-rule": "evenodd"
43
+ }, [createVNode("path", {
44
+ "d": "M8.578 7.383V1.602a.601.601 0 1 0-1.2 0v5.781H1.6a.601.601 0 0 0 0 1.203h5.777v5.812a.601.601 0 1 0 1.2 0V8.586H14.4a.601.601 0 0 0 0-1.203H8.578z"
45
+ }, null)])]);
46
+ const leftArrowIcon = () => createVNode("svg", {
47
+ "viewBox": "0 0 16 16",
48
+ "xmlns": "http://www.w3.org/2000/svg",
49
+ "height": "1em",
50
+ "width": "1em",
51
+ "preserveAspectRatio": "xMidYMid meet",
52
+ "focusable": "false"
53
+ }, [createVNode("g", {
54
+ "stroke-width": "1",
55
+ "fill-rule": "evenodd"
56
+ }, [createVNode("path", {
57
+ "d": "M7.028 10.976l5.951-5.952a.6.6 0 0 1 1.024.425V11.4a.6.6 0 0 1-.6.6H7.452a.6.6 0 0 1-.424-1.024z",
58
+ "transform": "scale(-1 1) rotate(-45 0 32.15)"
59
+ }, null)])]);
60
+ const rightArrowIcon = () => createVNode("svg", {
61
+ "viewBox": "0 0 16 16",
62
+ "xmlns": "http://www.w3.org/2000/svg",
63
+ "height": "1em",
64
+ "width": "1em",
65
+ "preserveAspectRatio": "xMidYMid meet",
66
+ "focusable": "false"
67
+ }, [createVNode("g", {
68
+ "stroke-width": "1",
69
+ "fill-rule": "evenodd"
70
+ }, [createVNode("path", {
71
+ "d": "M3.028 10.976l5.951-5.952a.6.6 0 0 1 1.024.425V11.4a.6.6 0 0 1-.6.6H3.452a.6.6 0 0 1-.424-1.024z",
72
+ "transform": "rotate(-45 6.003 8)"
73
+ }, null)])]);
74
+
75
+ export { addIcon, dragIcon, leftArrowIcon, removeIcon, rightArrowIcon };
@@ -0,0 +1 @@
1
+ .ibiz-mdctrl-container2-header{position:relative;display:flex;overflow:hidden}.ibiz-mdctrl-container2-header-content{display:flex;flex:1;height:var(--ibiz-height-control-large);overflow:auto hidden;background:var(--ibiz-color-bg-0);border:1px solid var(--ibiz-color-border);scrollbar-width:none;-ms-overflow-style:none}.ibiz-mdctrl-container2-header-content::-webkit-scrollbar{display:none;width:0;height:0}.ibiz-mdctrl-container2-header-left-arrow{position:absolute;top:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;width:var(--ibiz-spacing-base-loose);cursor:pointer;background:var(--ibiz-color-disabled-border)}.ibiz-mdctrl-container2-header-left-arrow>svg{fill:var(--ibiz-color-text-3)}.ibiz-mdctrl-container2-header-right-arrow{position:absolute;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;width:var(--ibiz-spacing-base-loose);cursor:pointer;background:var(--ibiz-color-disabled-border)}.ibiz-mdctrl-container2-header-right-arrow>svg{fill:var(--ibiz-color-text-3)}.ibiz-mdctrl-container2-header-item{position:relative;display:flex;flex:0 0 auto;align-items:center;justify-content:center;width:calc((100% - var(--ibiz-height-control-large))/ 5);height:var(--ibiz-height-control-large);padding:0 var(--ibiz-spacing-base-loose);line-height:var(--ibiz-height-control-large);text-align:center;cursor:pointer;border-right:1px solid var(--ibiz-color-border)}.ibiz-mdctrl-container2-header-item__drag-icon{position:absolute;left:0;display:none}.ibiz-mdctrl-container2-header-item__drag-icon>svg{fill:var(--ibiz-color-text-3)}.ibiz-mdctrl-container2-header-item__icon{display:flex;flex:0 0 auto;align-items:center;justify-content:center;margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-mdctrl-container2-header-item__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-mdctrl-container2-header-item__btn{position:absolute;top:0;right:var(--ibiz-spacing-extra-tight);display:none}.ibiz-mdctrl-container2-header-item__btn>svg{fill:var(--ibiz-color-text-3)}.ibiz-mdctrl-container2-header-item__btn:hover>svg{fill:var(--ibiz-color-danger)}.ibiz-mdctrl-container2-header-item--hidden-border{border-right:none}.ibiz-mdctrl-container2-header-item--active{background:var(--ibiz-color-bg-1)}.ibiz-mdctrl-container2-header-item--drag{background:var(--ibiz-color-bg-1);border:1px solid var(--ibiz-color-border)}.ibiz-mdctrl-container2-header-item--ghost{background:var(--ibiz-color-border);border:none}.ibiz-mdctrl-container2-header-item--ghost .ibiz-mdctrl-container2-header-item__text{opacity:0}.ibiz-mdctrl-container2-header-item:hover:not(.ibiz-mdctrl-container2-header-item--dragging):not(.ibiz-mdctrl-container2-header-item--drag):not(.ibiz-mdctrl-container2-header-item--ghost){background:var(--ibiz-color-bg-1)}.ibiz-mdctrl-container2-header-item:hover:not(.ibiz-mdctrl-container2-header-item--dragging):not(.ibiz-mdctrl-container2-header-item--drag):not(.ibiz-mdctrl-container2-header-item--ghost) .ibiz-mdctrl-container2-header-item__btn,.ibiz-mdctrl-container2-header-item:hover:not(.ibiz-mdctrl-container2-header-item--dragging):not(.ibiz-mdctrl-container2-header-item--drag):not(.ibiz-mdctrl-container2-header-item--ghost) .ibiz-mdctrl-container2-header-item__drag-icon{display:block}
@@ -0,0 +1,38 @@
1
+ import { FormMDCtrlFormController } from '@ibiz-template/runtime';
2
+ import { PropType } from 'vue';
3
+ import './mdctrl-container2.scss';
4
+ export declare const MDCtrlContainer2: import("vue").DefineComponent<{
5
+ controller: {
6
+ type: typeof FormMDCtrlFormController;
7
+ required: true;
8
+ };
9
+ items: {
10
+ type: PropType<IData[]>;
11
+ default: () => never[];
12
+ };
13
+ }, {
14
+ ns: import("@ibiz-template/core").Namespace;
15
+ currentItem: import("vue").Ref<string>;
16
+ draggingKey: import("vue").Ref<string>;
17
+ container: import("vue").Ref<IData | undefined>;
18
+ isShowLeftArrow: import("vue").Ref<boolean>;
19
+ isShowRightArrow: import("vue").Ref<boolean>;
20
+ isShowBorder: import("vue").Ref<boolean>;
21
+ handleSelect: (e: MouseEvent, item: IData) => void;
22
+ handleAdd: (e: MouseEvent) => void;
23
+ handleRemove: (e: MouseEvent, item: IData) => Promise<void>;
24
+ handleArrowClick: (e: MouseEvent, direction: 'left' | 'right') => void;
25
+ handleDragStart: (item: IData) => void;
26
+ handleDragEnd: () => void;
27
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
28
+ controller: {
29
+ type: typeof FormMDCtrlFormController;
30
+ required: true;
31
+ };
32
+ items: {
33
+ type: PropType<IData[]>;
34
+ default: () => never[];
35
+ };
36
+ }>>, {
37
+ items: IData[];
38
+ }, {}>;
@@ -0,0 +1,205 @@
1
+ import { ref, watch, onMounted, onUnmounted, createVNode, defineComponent } from 'vue';
2
+ import { FormMDCtrlFormController } from '@ibiz-template/runtime';
3
+ import { useNamespace } from '@ibiz-template/vue3-util';
4
+ import draggable from 'vuedraggable';
5
+ import './mdctrl-container2.css';
6
+ import { dragIcon, removeIcon, addIcon, leftArrowIcon, rightArrowIcon } from './icon/index.mjs';
7
+
8
+ "use strict";
9
+ const MDCtrlContainer2 = /* @__PURE__ */ defineComponent({
10
+ name: "IBizMDCtrlContainer2",
11
+ components: {
12
+ draggable
13
+ },
14
+ props: {
15
+ controller: {
16
+ type: FormMDCtrlFormController,
17
+ required: true
18
+ },
19
+ items: {
20
+ type: Array,
21
+ default: () => []
22
+ }
23
+ },
24
+ setup(props) {
25
+ const ns = useNamespace("mdctrl-container2");
26
+ const currentItem = ref("");
27
+ watch(() => props.items, () => {
28
+ var _a;
29
+ if (!currentItem.value) {
30
+ currentItem.value = ((_a = props.items[0]) == null ? void 0 : _a.id) || "";
31
+ }
32
+ }, {
33
+ immediate: true
34
+ });
35
+ const draggingKey = ref("");
36
+ const container = ref();
37
+ const isShowLeftArrow = ref(false);
38
+ const isShowRightArrow = ref(false);
39
+ const isShowBorder = ref(true);
40
+ let resizeObserver;
41
+ const updateArrowVisible = () => {
42
+ if (container.value) {
43
+ const el = container.value.$el;
44
+ if (el) {
45
+ isShowLeftArrow.value = el.scrollLeft > 0;
46
+ isShowRightArrow.value = el.scrollLeft < el.scrollWidth - el.offsetWidth;
47
+ isShowBorder.value = el.offsetWidth > el.scrollWidth;
48
+ }
49
+ }
50
+ };
51
+ onMounted(() => {
52
+ if (container.value && container.value.$el) {
53
+ resizeObserver = new ResizeObserver((entries) => {
54
+ entries.forEach(() => {
55
+ updateArrowVisible();
56
+ });
57
+ });
58
+ resizeObserver.observe(container.value.$el);
59
+ }
60
+ });
61
+ onUnmounted(() => {
62
+ if (resizeObserver) {
63
+ resizeObserver.disconnect();
64
+ }
65
+ });
66
+ const handleSelect = (e, item) => {
67
+ e.stopPropagation();
68
+ currentItem.value = item.id;
69
+ };
70
+ const handleAdd = (e) => {
71
+ var _a;
72
+ e.stopPropagation();
73
+ props.controller.create();
74
+ currentItem.value = ((_a = props.items[props.items.length - 1]) == null ? void 0 : _a.id) || "";
75
+ };
76
+ const handleRemove = async (e, item) => {
77
+ var _a;
78
+ e.stopPropagation();
79
+ await props.controller.remove(item.id);
80
+ if (currentItem.value === item.id) {
81
+ currentItem.value = ((_a = props.items[0]) == null ? void 0 : _a.id) || "";
82
+ }
83
+ updateArrowVisible();
84
+ };
85
+ const handleArrowClick = (e, direction) => {
86
+ e.stopPropagation();
87
+ if (container.value) {
88
+ const el = container.value.$el;
89
+ if (el) {
90
+ const children = Array.from(el.children || []);
91
+ const child = children.find((item) => item.classList.contains(ns.b("header-item")));
92
+ if (child) {
93
+ const width = child.offsetWidth;
94
+ if (direction === "right") {
95
+ el.scrollLeft += width;
96
+ }
97
+ if (direction === "left") {
98
+ el.scrollLeft -= width;
99
+ }
100
+ }
101
+ updateArrowVisible();
102
+ }
103
+ }
104
+ };
105
+ const handleDragStart = (item) => {
106
+ draggingKey.value = item.id;
107
+ };
108
+ const handleDragEnd = () => {
109
+ draggingKey.value = "";
110
+ updateArrowVisible();
111
+ };
112
+ return {
113
+ ns,
114
+ currentItem,
115
+ draggingKey,
116
+ container,
117
+ isShowLeftArrow,
118
+ isShowRightArrow,
119
+ isShowBorder,
120
+ handleSelect,
121
+ handleAdd,
122
+ handleRemove,
123
+ handleArrowClick,
124
+ handleDragStart,
125
+ handleDragEnd
126
+ };
127
+ },
128
+ render() {
129
+ return createVNode("div", {
130
+ "class": this.ns.b()
131
+ }, [createVNode("div", {
132
+ "class": [this.ns.b("header")]
133
+ }, [createVNode(draggable, {
134
+ "ref": "container",
135
+ "class": [this.ns.b("header-content")],
136
+ "list": this.items,
137
+ "ghostClass": this.ns.bm("header-item", "ghost"),
138
+ "itemKey": "id"
139
+ }, {
140
+ item: ({
141
+ element
142
+ }) => {
143
+ return createVNode("div", {
144
+ "class": [this.ns.b("header-item"), this.draggingKey && this.ns.bm("header-item", "dragging"), this.draggingKey === element.id && this.ns.bm("header-item", "drag"), this.currentItem === element.id && this.ns.bm("header-item", "active")],
145
+ "onDragstart": () => {
146
+ this.handleDragStart(element);
147
+ },
148
+ "onDragend": () => {
149
+ this.handleDragEnd();
150
+ },
151
+ "onClick": (e) => {
152
+ this.handleSelect(e, element);
153
+ }
154
+ }, [createVNode("div", {
155
+ "class": this.ns.be("header-item", "drag-icon")
156
+ }, [dragIcon()]), createVNode("div", {
157
+ "class": this.ns.be("header-item", "text")
158
+ }, [element.title]), this.controller.enableDelete && createVNode("div", {
159
+ "class": this.ns.be("header-item", "btn"),
160
+ "title": ibiz.i18n.t("app.delete"),
161
+ "onClick": (e) => {
162
+ this.handleRemove(e, element);
163
+ }
164
+ }, [removeIcon()])]);
165
+ },
166
+ footer: () => {
167
+ return [this.controller.enableCreate && createVNode("div", {
168
+ "class": [this.ns.b("header-item"), !this.isShowBorder && this.ns.bm("header-item", "hidden-border")],
169
+ "onClick": (e) => {
170
+ this.handleAdd(e);
171
+ }
172
+ }, [createVNode("div", {
173
+ "class": this.ns.be("header-item", "icon")
174
+ }, [addIcon()]), createVNode("div", {
175
+ "class": this.ns.be("header-item", "text")
176
+ }, [ibiz.i18n.t("app.add")])]), this.isShowLeftArrow && createVNode("div", {
177
+ "class": this.ns.b("header-left-arrow"),
178
+ "onClick": (e) => {
179
+ this.handleArrowClick(e, "left");
180
+ }
181
+ }, [leftArrowIcon()]), this.isShowRightArrow && createVNode("div", {
182
+ "class": this.ns.b("header-right-arrow"),
183
+ "onClick": (e) => {
184
+ this.handleArrowClick(e, "right");
185
+ }
186
+ }, [rightArrowIcon()])];
187
+ }
188
+ })]), createVNode("div", {
189
+ "class": this.ns.b("content")
190
+ }, [this.items.map((item) => {
191
+ var _a, _b;
192
+ return createVNode("div", {
193
+ "key": item.id,
194
+ "class": this.ns.b("content-item"),
195
+ "style": {
196
+ display: item.id !== this.currentItem ? "none" : ""
197
+ }
198
+ }, [(_b = (_a = this.$slots).item) == null ? void 0 : _b.call(_a, {
199
+ data: item
200
+ })]);
201
+ })])]);
202
+ }
203
+ });
204
+
205
+ export { MDCtrlContainer2 };
@@ -71,5 +71,7 @@ export { HtmlPortlet } from './dashboard/portlet/html-portlet/html-portlet.mjs';
71
71
  export { IBizHtmlPortlet } from './dashboard/portlet/html-portlet/index.mjs';
72
72
  export { ActionBarPortlet } from './dashboard/portlet/actionbar-portlet/actionbar-portlet.mjs';
73
73
  export { IBizActionBarPortlet } from './dashboard/portlet/actionbar-portlet/index.mjs';
74
+ export { ReportPortlet } from './dashboard/portlet/report-portlet/report-portlet.mjs';
75
+ export { IBizReportPortlet } from './dashboard/portlet/report-portlet/index.mjs';
74
76
 
75
77
  "use strict";
@@ -30,7 +30,13 @@ const BIReportPanel = /* @__PURE__ */ defineComponent({
30
30
  "mode": "CONTENT",
31
31
  "context": this.c.context,
32
32
  "viewParams": this.c.params,
33
- "config": this.generator && this.generator.config
33
+ "config": this.generator && this.generator.config,
34
+ "onInit": (args) => {
35
+ this.generator && this.generator.init(args);
36
+ },
37
+ "onReportChartChange": (args) => {
38
+ this.generator && this.generator.init(args);
39
+ }
34
40
  }, null)]);
35
41
  }
36
42
  });