@ibiz-template/vue3-util 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -2
- package/es/index.mjs +4 -0
- package/es/panel-component/index.d.ts +2 -0
- package/es/panel-component/index.d.ts.map +1 -1
- package/es/panel-component/index.mjs +4 -0
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts +10 -0
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +35 -17
- package/es/panel-component/panel-container-group/index.d.ts +29 -0
- package/es/panel-component/panel-container-group/index.d.ts.map +1 -0
- package/es/panel-component/panel-container-group/index.mjs +21 -0
- package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts +32 -0
- package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts.map +1 -0
- package/es/panel-component/panel-container-group/panel-container-group.controller.mjs +35 -0
- package/es/panel-component/panel-container-group/panel-container-group.css +1 -0
- package/es/panel-component/panel-container-group/panel-container-group.d.ts +29 -0
- package/es/panel-component/panel-container-group/panel-container-group.d.ts.map +1 -0
- package/es/panel-component/panel-container-group/panel-container-group.mjs +108 -0
- package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts +16 -0
- package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts.map +1 -0
- package/es/panel-component/panel-container-group/panel-container-group.provider.mjs +15 -0
- package/es/panel-component/panel-container-group/panel-container-group.state.d.ts +13 -0
- package/es/panel-component/panel-container-group/panel-container-group.state.d.ts.map +1 -0
- package/es/panel-component/panel-container-group/panel-container-group.state.mjs +7 -0
- package/es/panel-component/panel-rawitem/index.d.ts.map +1 -1
- package/es/panel-component/panel-rawitem/index.mjs +8 -0
- package/es/panel-component/panel-tab-page/index.d.ts +24 -0
- package/es/panel-component/panel-tab-page/index.d.ts.map +1 -0
- package/es/panel-component/panel-tab-page/index.mjs +13 -0
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts +26 -0
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts.map +1 -0
- package/es/panel-component/panel-tab-page/panel-tab-page.mjs +63 -0
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.d.ts +14 -0
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.d.ts.map +1 -0
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.mjs +15 -0
- package/es/plugin/plugin-factory/plugin-factory.d.ts +36 -17
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +84 -53
- package/lib/index.cjs +21 -13
- package/package.json +6 -6
- package/src/panel-component/index.ts +2 -0
- package/src/panel-component/nav-pos/nav-pos.controller.ts +37 -17
- package/src/panel-component/panel-container-group/index.ts +22 -0
- package/src/panel-component/panel-container-group/panel-container-group.controller.ts +43 -0
- package/src/panel-component/panel-container-group/panel-container-group.provider.ts +30 -0
- package/src/panel-component/panel-container-group/panel-container-group.scss +91 -0
- package/src/panel-component/panel-container-group/panel-container-group.state.ts +12 -0
- package/src/panel-component/panel-container-group/panel-container-group.tsx +112 -0
- package/src/panel-component/panel-rawitem/index.ts +8 -0
- package/src/panel-component/panel-tab-page/index.ts +12 -0
- package/src/panel-component/panel-tab-page/panel-tab-page.provider.ts +27 -0
- package/src/panel-component/panel-tab-page/panel-tab-page.tsx +55 -0
- package/src/plugin/plugin-factory/plugin-factory.ts +87 -55
- package/dist/index.system.min.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container-group/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAInF,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,CAAC;AAEnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;aASnC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
export { PanelContainerGroupState } from './panel-container-group.state.mjs';
|
|
3
|
+
import { PanelContainerGroupProvider } from './panel-container-group.provider.mjs';
|
|
4
|
+
export { PanelContainerGroupController } from './panel-container-group.controller.mjs';
|
|
5
|
+
import { PanelContainerGroup } from './panel-container-group.mjs';
|
|
6
|
+
import '../../util/index.mjs';
|
|
7
|
+
import { withInstall } from '../../util/install.mjs';
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
const IBizPanelContainerGroup = withInstall(
|
|
11
|
+
PanelContainerGroup,
|
|
12
|
+
function(v) {
|
|
13
|
+
v.component(PanelContainerGroup.name, PanelContainerGroup);
|
|
14
|
+
registerPanelItemProvider(
|
|
15
|
+
"CONTAINER_CONTAINER_GROUP",
|
|
16
|
+
() => new PanelContainerGroupProvider()
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export { IBizPanelContainerGroup, IBizPanelContainerGroup as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
+
import { PanelContainerGroupState } from './panel-container-group.state';
|
|
4
|
+
/**
|
|
5
|
+
* 面板分组容器控制器
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class PanelContainerGroupController
|
|
9
|
+
* @extends {PanelItemController}
|
|
10
|
+
*/
|
|
11
|
+
export declare class PanelContainerGroupController extends PanelItemController<IPanelContainer> {
|
|
12
|
+
state: PanelContainerGroupState;
|
|
13
|
+
protected createState(): PanelContainerGroupState;
|
|
14
|
+
/**
|
|
15
|
+
* 禁用关闭
|
|
16
|
+
*
|
|
17
|
+
* @author chitanda
|
|
18
|
+
* @date 2022-09-14 14:09:51
|
|
19
|
+
* @readonly
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
*/
|
|
22
|
+
get disableClose(): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 是否默认展开分组
|
|
25
|
+
*
|
|
26
|
+
* @author chitanda
|
|
27
|
+
* @date 2022-09-14 14:09:09
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
get defaultExpansion(): boolean;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=panel-container-group.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-container-group.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container-group/panel-container-group.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;GAMG;AACH,qBAAa,6BAA8B,SAAQ,mBAAmB,CAAC,eAAe,CAAC;IAC7E,KAAK,EAAE,wBAAwB,CAAC;IAExC,SAAS,CAAC,WAAW,IAAI,wBAAwB;IAIjD;;;;;;;OAOG;IACH,IAAI,YAAY,IAAI,OAAO,CAG1B;IAED;;;;;;OAMG;IACH,IAAI,gBAAgB,IAAI,OAAO,CAG9B;CACF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { PanelContainerGroupState } from './panel-container-group.state.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
class PanelContainerGroupController extends PanelItemController {
|
|
6
|
+
createState() {
|
|
7
|
+
var _a;
|
|
8
|
+
return new PanelContainerGroupState((_a = this.parent) == null ? void 0 : _a.state);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 禁用关闭
|
|
12
|
+
*
|
|
13
|
+
* @author chitanda
|
|
14
|
+
* @date 2022-09-14 14:09:51
|
|
15
|
+
* @readonly
|
|
16
|
+
* @type {boolean}
|
|
17
|
+
*/
|
|
18
|
+
get disableClose() {
|
|
19
|
+
const { titleBarCloseMode: mode } = this.model;
|
|
20
|
+
return mode === 0 || mode === void 0;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 是否默认展开分组
|
|
24
|
+
*
|
|
25
|
+
* @author chitanda
|
|
26
|
+
* @date 2022-09-14 14:09:09
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
get defaultExpansion() {
|
|
30
|
+
const { titleBarCloseMode: mode } = this.model;
|
|
31
|
+
return this.disableClose || mode === 1;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { PanelContainerGroupController };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-panel-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content__row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { PanelContainerGroupController } from './panel-container-group.controller';
|
|
4
|
+
import './panel-container-group.scss';
|
|
5
|
+
export declare const PanelContainerGroup: import("vue").DefineComponent<{
|
|
6
|
+
modelData: {
|
|
7
|
+
type: PropType<IPanelContainer>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
controller: {
|
|
11
|
+
type: typeof PanelContainerGroupController;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
16
|
+
captionText: import("vue").ComputedRef<any>;
|
|
17
|
+
changeCollapse: () => void;
|
|
18
|
+
isCollapse: import("vue").Ref<boolean>;
|
|
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<IPanelContainer>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
controller: {
|
|
25
|
+
type: typeof PanelContainerGroupController;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>>, {}, {}>;
|
|
29
|
+
//# sourceMappingURL=panel-container-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-container-group.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container-group/panel-container-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAc,MAAM,KAAK,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,8BAA8B,CAAC;AAGtC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;0BAiBD,IAAI;;;;;;;;;;;YAwFjC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { isVNode, ref, computed, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { PanelContainerGroupController } from './panel-container-group.controller.mjs';
|
|
3
|
+
import './panel-container-group.css';
|
|
4
|
+
import '../../use/index.mjs';
|
|
5
|
+
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
function _isSlot(s) {
|
|
9
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
10
|
+
}
|
|
11
|
+
const PanelContainerGroup = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "IBizPanelContainerGroup",
|
|
13
|
+
props: {
|
|
14
|
+
modelData: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
controller: {
|
|
19
|
+
type: PanelContainerGroupController,
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(props) {
|
|
24
|
+
const ns = useNamespace("panel-container-group");
|
|
25
|
+
const isCollapse = ref(!props.controller.defaultExpansion);
|
|
26
|
+
const changeCollapse = () => {
|
|
27
|
+
if (!props.controller.disableClose) {
|
|
28
|
+
isCollapse.value = !isCollapse.value;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const captionText = computed(() => {
|
|
32
|
+
const {
|
|
33
|
+
captionItemName,
|
|
34
|
+
caption,
|
|
35
|
+
capLanguageRes
|
|
36
|
+
} = props.modelData;
|
|
37
|
+
if (captionItemName) {
|
|
38
|
+
return props.controller.data[captionItemName];
|
|
39
|
+
}
|
|
40
|
+
let text = caption;
|
|
41
|
+
if (capLanguageRes) {
|
|
42
|
+
text = ibiz.i18n.t(capLanguageRes.lanResTag, caption);
|
|
43
|
+
}
|
|
44
|
+
return text;
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
ns,
|
|
48
|
+
captionText,
|
|
49
|
+
changeCollapse,
|
|
50
|
+
isCollapse
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
render() {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
let _slot;
|
|
56
|
+
const classArr = [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass, this.ns.is("hidden", !this.controller.state.visible)];
|
|
57
|
+
if (this.modelData.showCaption === true) {
|
|
58
|
+
classArr.push(this.ns.m("show-header"));
|
|
59
|
+
classArr.push(this.ns.b("collapse"));
|
|
60
|
+
classArr.push(this.ns.is("collapse", this.isCollapse));
|
|
61
|
+
if (this.controller.disableClose) {
|
|
62
|
+
classArr.push(this.ns.bm("collapse", "disable-close"));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
66
|
+
const content = createVNode(resolveComponent("iBizRow"), {
|
|
67
|
+
"slot": "content",
|
|
68
|
+
"layout": this.modelData.layout
|
|
69
|
+
}, _isSlot(_slot = defaultSlots.map((slot) => {
|
|
70
|
+
const props = slot.props;
|
|
71
|
+
if (!props || !props.controller) {
|
|
72
|
+
return slot;
|
|
73
|
+
}
|
|
74
|
+
return createVNode(resolveComponent("iBizCol"), {
|
|
75
|
+
"layoutPos": props.modelData.layoutPos,
|
|
76
|
+
"state": props.controller.state
|
|
77
|
+
}, _isSlot(slot) ? slot : {
|
|
78
|
+
default: () => [slot]
|
|
79
|
+
});
|
|
80
|
+
})) ? _slot : {
|
|
81
|
+
default: () => [_slot]
|
|
82
|
+
});
|
|
83
|
+
let header = null;
|
|
84
|
+
if (this.modelData.showCaption) {
|
|
85
|
+
header = createVNode("div", {
|
|
86
|
+
"class": [this.ns.b("header")],
|
|
87
|
+
"onClick": this.changeCollapse
|
|
88
|
+
}, [createVNode("div", {
|
|
89
|
+
"class": [this.ns.be("header", "left")]
|
|
90
|
+
}, [createVNode("div", {
|
|
91
|
+
"class": [this.ns.e("caption"), ...this.controller.labelClass]
|
|
92
|
+
}, [this.captionText])]), createVNode("div", {
|
|
93
|
+
"class": [this.ns.be("header", "right")]
|
|
94
|
+
}, [this.modelData.titleBarCloseMode !== void 0 && this.modelData.titleBarCloseMode !== 0 && (this.isCollapse ? createVNode("ion-icon", {
|
|
95
|
+
"name": "caret-forward-sharp"
|
|
96
|
+
}, null) : createVNode("ion-icon", {
|
|
97
|
+
"name": "caret-down-sharp"
|
|
98
|
+
}, null))])]);
|
|
99
|
+
}
|
|
100
|
+
return createVNode("div", {
|
|
101
|
+
"class": classArr
|
|
102
|
+
}, [header, createVNode("div", {
|
|
103
|
+
"class": [this.ns.b("content")]
|
|
104
|
+
}, [content])]);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export { PanelContainerGroup };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* 面板分组容器适配器
|
|
5
|
+
*
|
|
6
|
+
* @author lxm
|
|
7
|
+
* @date 2022-09-19 22:09:03
|
|
8
|
+
* @export
|
|
9
|
+
* @class PanelContainerGroupProvider
|
|
10
|
+
* @implements {EditorProvider}
|
|
11
|
+
*/
|
|
12
|
+
export declare class PanelContainerGroupProvider implements IPanelItemProvider {
|
|
13
|
+
component: string;
|
|
14
|
+
createController(panelItem: IPanelContainer, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=panel-container-group.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-container-group.provider.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container-group/panel-container-group.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD;;;;;;;;GAQG;AACH,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,SAAS,EAAE,MAAM,CAA6B;IAExC,gBAAgB,CACpB,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACtC,OAAO,CAAC,mBAAmB,CAAC;CAKhC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PanelContainerGroupController } from './panel-container-group.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class PanelContainerGroupProvider {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.component = "IBizPanelContainerGroup";
|
|
7
|
+
}
|
|
8
|
+
async createController(panelItem, panel, parent) {
|
|
9
|
+
const c = new PanelContainerGroupController(panelItem, panel, parent);
|
|
10
|
+
await c.init();
|
|
11
|
+
return c;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { PanelContainerGroupProvider };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 面板分组容器状态
|
|
4
|
+
*
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2023-02-07 06:04:27
|
|
7
|
+
* @export
|
|
8
|
+
* @class PanelContainerGroupState
|
|
9
|
+
* @extends {PanelItemState}
|
|
10
|
+
*/
|
|
11
|
+
export declare class PanelContainerGroupState extends PanelItemState {
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=panel-container-group.state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-container-group.state.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container-group/panel-container-group.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;;;;;GAQG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-rawitem/index.ts"],"names":[],"mappings":"AAMA,cAAc,4BAA4B,CAAC;AAE3C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-rawitem/index.ts"],"names":[],"mappings":"AAMA,cAAc,4BAA4B,CAAC;AAE3C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;aAe3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -13,6 +13,14 @@ const IBizPanelRawItem = withInstall(PanelRawItem, function(v) {
|
|
|
13
13
|
"RAWITEM_STATIC_IMAGE",
|
|
14
14
|
() => new PanelRawItemProvider()
|
|
15
15
|
);
|
|
16
|
+
registerPanelItemProvider(
|
|
17
|
+
"RAWITEM_STATIC_LABEL",
|
|
18
|
+
() => new PanelRawItemProvider()
|
|
19
|
+
);
|
|
20
|
+
registerPanelItemProvider(
|
|
21
|
+
"RAWITEM_STATIC_TEXT",
|
|
22
|
+
() => new PanelRawItemProvider()
|
|
23
|
+
);
|
|
16
24
|
});
|
|
17
25
|
|
|
18
26
|
export { IBizPanelRawItem, IBizPanelRawItem as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const IBizPanelTabPage: import("../../util").TypeWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
modelData: {
|
|
3
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
controller: {
|
|
7
|
+
type: typeof import("@ibiz-template/runtime").PanelItemController;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
13
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
modelData: {
|
|
15
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
controller: {
|
|
19
|
+
type: typeof import("@ibiz-template/runtime").PanelItemController;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
}>>, {}, {}>>;
|
|
23
|
+
export default IBizPanelTabPage;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-tab-page/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;aAG3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { PanelTabPage } from './panel-tab-page.mjs';
|
|
3
|
+
import { PanelTabPageProvider } from './panel-tab-page.provider.mjs';
|
|
4
|
+
import '../../util/index.mjs';
|
|
5
|
+
import { withInstall } from '../../util/install.mjs';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizPanelTabPage = withInstall(PanelTabPage, function(v) {
|
|
9
|
+
v.component(PanelTabPage.name, PanelTabPage);
|
|
10
|
+
registerPanelItemProvider("TABPAGE", () => new PanelTabPageProvider());
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { IBizPanelTabPage, IBizPanelTabPage as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
|
+
export declare const PanelTabPage: import("vue").DefineComponent<{
|
|
5
|
+
modelData: {
|
|
6
|
+
type: PropType<IPanelContainer>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
controller: {
|
|
10
|
+
type: typeof PanelItemController;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
15
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
16
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
modelData: {
|
|
18
|
+
type: PropType<IPanelContainer>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
controller: {
|
|
22
|
+
type: typeof PanelItemController;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>>, {}, {}>;
|
|
26
|
+
//# sourceMappingURL=panel-tab-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-tab-page.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-tab-page/panel-tab-page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG7D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;YAiDvB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { isVNode, computed, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
3
|
+
import '../../use/index.mjs';
|
|
4
|
+
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
function _isSlot(s) {
|
|
8
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
9
|
+
}
|
|
10
|
+
const PanelTabPage = /* @__PURE__ */ defineComponent({
|
|
11
|
+
name: "IBizPanelTabPage",
|
|
12
|
+
props: {
|
|
13
|
+
modelData: {
|
|
14
|
+
// IPanelTabPage 不能使用 IPanelTabPage模型 否则会类型报错
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
controller: {
|
|
19
|
+
type: PanelItemController,
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(props) {
|
|
24
|
+
const ns = useNamespace("panel-tab-page");
|
|
25
|
+
const classArr = computed(() => {
|
|
26
|
+
const {
|
|
27
|
+
id
|
|
28
|
+
} = props.modelData;
|
|
29
|
+
const result = [ns.b(), ns.m(id)];
|
|
30
|
+
result.push(...props.controller.containerClass);
|
|
31
|
+
return result;
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
ns,
|
|
35
|
+
classArr
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
render() {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
let _slot;
|
|
41
|
+
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
42
|
+
return createVNode(resolveComponent("iBizRow"), {
|
|
43
|
+
"class": [this.ns.b(), this.ns.m(this.modelData.codeName), this.classArr],
|
|
44
|
+
"layout": this.modelData.layout
|
|
45
|
+
}, _isSlot(_slot = defaultSlots.map((slot) => {
|
|
46
|
+
const props = slot.props;
|
|
47
|
+
if (!props || !props.controller) {
|
|
48
|
+
return slot;
|
|
49
|
+
}
|
|
50
|
+
const c = props.controller;
|
|
51
|
+
return createVNode(resolveComponent("iBizCol"), {
|
|
52
|
+
"layoutPos": c.model.layoutPos,
|
|
53
|
+
"state": c.state
|
|
54
|
+
}, _isSlot(slot) ? slot : {
|
|
55
|
+
default: () => [slot]
|
|
56
|
+
});
|
|
57
|
+
})) ? _slot : {
|
|
58
|
+
default: () => [_slot]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export { PanelTabPage };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* 面板分页适配器
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @class PanelTabPageController
|
|
8
|
+
* @implements {IPanelItemProvider}
|
|
9
|
+
*/
|
|
10
|
+
export declare class PanelTabPageProvider implements IPanelItemProvider {
|
|
11
|
+
component: string;
|
|
12
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=panel-tab-page.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-tab-page.provider.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-tab-page/panel-tab-page.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;GAMG;AACH,qBAAa,oBAAqB,YAAW,kBAAkB;IAC7D,SAAS,EAAE,MAAM,CAAsB;IAEjC,gBAAgB,CACpB,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACtC,OAAO,CAAC,mBAAmB,CAAC;CAKhC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class PanelTabPageProvider {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.component = "IBizPanelTabPage";
|
|
7
|
+
}
|
|
8
|
+
async createController(panelItem, panel, parent) {
|
|
9
|
+
const c = new PanelItemController(panelItem, panel, parent);
|
|
10
|
+
await c.init();
|
|
11
|
+
return c;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { PanelTabPageProvider };
|
|
@@ -27,14 +27,6 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
27
27
|
* @type {Map<string, boolean>}
|
|
28
28
|
*/
|
|
29
29
|
protected cache: Map<string, boolean>;
|
|
30
|
-
/**
|
|
31
|
-
* 本地开发测试包,只在本地开发生效
|
|
32
|
-
*
|
|
33
|
-
* @author chitanda
|
|
34
|
-
* @date 2022-11-02 21:11:41
|
|
35
|
-
* @protected
|
|
36
|
-
*/
|
|
37
|
-
protected devPackages: Map<string, () => Promise<unknown>>;
|
|
38
30
|
/**
|
|
39
31
|
* 插件缓存
|
|
40
32
|
*
|
|
@@ -62,6 +54,42 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
62
54
|
* @type {Map<string, IPluginItem>}
|
|
63
55
|
*/
|
|
64
56
|
protected predefinedPlugins: Map<string, IPluginItem>;
|
|
57
|
+
/**
|
|
58
|
+
* 忽略加载的插件规则,支持正则。配配规则为插件包地址,如:@ibiz-template-vue/vue3-plugin-*
|
|
59
|
+
*
|
|
60
|
+
* @author chitanda
|
|
61
|
+
* @date 2023-12-04 15:12:58
|
|
62
|
+
* @protected
|
|
63
|
+
* @type {((string | RegExp)[])}
|
|
64
|
+
*/
|
|
65
|
+
protected ignoreRules: (string | RegExp)[];
|
|
66
|
+
/**
|
|
67
|
+
* 插件加载队列
|
|
68
|
+
*
|
|
69
|
+
* @author chitanda
|
|
70
|
+
* @date 2023-12-05 16:12:04
|
|
71
|
+
* @protected
|
|
72
|
+
* @type {Map<string, Promise<boolean>>}
|
|
73
|
+
*/
|
|
74
|
+
protected loadQueue: Map<string, Promise<boolean>>;
|
|
75
|
+
/**
|
|
76
|
+
* 是否忽略插件加载
|
|
77
|
+
*
|
|
78
|
+
* @author chitanda
|
|
79
|
+
* @date 2023-12-04 16:12:48
|
|
80
|
+
* @protected
|
|
81
|
+
* @param {string} pluginPath
|
|
82
|
+
* @return {*} {boolean}
|
|
83
|
+
*/
|
|
84
|
+
protected isIgnore(pluginPath: string): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* 设置本地开发忽略远程加载的插件
|
|
87
|
+
*
|
|
88
|
+
* @author chitanda
|
|
89
|
+
* @date 2023-12-04 17:12:49
|
|
90
|
+
* @param {(string | RegExp)} rule
|
|
91
|
+
*/
|
|
92
|
+
setDevIgnore(rule: string | RegExp): void;
|
|
65
93
|
/**
|
|
66
94
|
* 注册视图默认插件
|
|
67
95
|
*
|
|
@@ -96,15 +124,6 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
96
124
|
* @param {Plugin} code
|
|
97
125
|
*/
|
|
98
126
|
protected setPluginCode(code: Plugin): void;
|
|
99
|
-
/**
|
|
100
|
-
* 设置开发插件,用于本地调试
|
|
101
|
-
*
|
|
102
|
-
* @author chitanda
|
|
103
|
-
* @date 2022-11-02 21:11:56
|
|
104
|
-
* @param {string} name
|
|
105
|
-
* @param {() => Promise<unknown>} fn
|
|
106
|
-
*/
|
|
107
|
-
setDevPlugin(name: string, fn: () => Promise<unknown>): void;
|
|
108
127
|
/**
|
|
109
128
|
* 加载插件
|
|
110
129
|
*
|
|
@@ -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,EAEX,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC;;;;;;;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
|
|
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,EAEX,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC;;;;;;;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;IAO3C;;;;;;;OAOG;IACG,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAuCxD;;;;;;;OAOG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC;IAwCnB;;;;;;;;OAQG;cACa,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCzE;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAuB3C"}
|