@ibiz-template/vue3-util 0.7.37-alpha.3 → 0.7.38-alpha.12
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 -1
- package/es/common/code-list/code-list.d.ts +9 -0
- package/es/common/code-list/code-list.d.ts.map +1 -1
- package/es/common/code-list/code-list.mjs +6 -2
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +12 -4
- package/es/index.mjs +4 -0
- package/es/locale/en/index.mjs +1 -1
- package/es/panel-component/index.d.ts +1 -0
- package/es/panel-component/index.d.ts.map +1 -1
- package/es/panel-component/index.mjs +3 -0
- package/es/panel-component/multi-data-container-raw/index.d.ts +37 -0
- package/es/panel-component/multi-data-container-raw/index.d.ts.map +1 -0
- package/es/panel-component/multi-data-container-raw/index.mjs +21 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts +118 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts.map +1 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.mjs +351 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.css +1 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts +36 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts.map +1 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.mjs +82 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.provider.d.ts +16 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.provider.d.ts.map +1 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.provider.mjs +15 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.d.ts +20 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.d.ts.map +1 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.mjs +17 -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 +5 -0
- package/es/use/click-outside/click-outside.d.ts.map +1 -1
- package/es/util/store/ui-store/ui-store.d.ts.map +1 -1
- package/es/util/store/ui-store/ui-store.mjs +8 -1
- package/es/view/common/index.d.ts +2 -2
- package/es/view/common/view.d.ts +2 -2
- package/es/view/common/view.d.ts.map +1 -1
- package/es/view/common/view.mjs +7 -6
- package/es/view/html-view/html-view.css +1 -0
- package/es/view/html-view/html-view.d.ts +48 -0
- package/es/view/html-view/html-view.d.ts.map +1 -0
- package/es/view/html-view/html-view.mjs +94 -0
- package/es/view/html-view/html-view.provider.d.ts +14 -0
- package/es/view/html-view/html-view.provider.d.ts.map +1 -0
- package/es/view/html-view/html-view.provider.mjs +8 -0
- package/es/view/html-view/index.d.ts +44 -0
- package/es/view/html-view/index.d.ts.map +1 -0
- package/es/view/html-view/index.mjs +13 -0
- package/es/view/index.d.ts +1 -0
- package/es/view/index.d.ts.map +1 -1
- package/es/view/index.mjs +1 -0
- package/lib/common/code-list/code-list.cjs +6 -2
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +11 -3
- package/lib/index.cjs +45 -37
- package/lib/locale/en/index.cjs +1 -1
- package/lib/panel-component/index.cjs +22 -16
- package/lib/panel-component/multi-data-container-raw/index.cjs +28 -0
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.cjs +84 -0
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.controller.cjs +353 -0
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.css +1 -0
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.provider.cjs +17 -0
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.state.cjs +19 -0
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +5 -0
- package/lib/util/store/ui-store/ui-store.cjs +8 -1
- package/lib/view/common/view.cjs +7 -6
- package/lib/view/html-view/html-view.cjs +96 -0
- package/lib/view/html-view/html-view.css +1 -0
- package/lib/view/html-view/html-view.provider.cjs +10 -0
- package/lib/view/html-view/index.cjs +15 -0
- package/lib/view/index.cjs +2 -0
- package/package.json +4 -4
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { isVNode, defineComponent, watch, reactive, inject, computed, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import '../../use/index.mjs';
|
|
3
|
+
import { MultiDataContainerRawController } from './multi-data-container-raw.controller.mjs';
|
|
4
|
+
import './multi-data-container-raw.css';
|
|
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 MultiDataContainerRaw = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "IBizMultiDataContainerRaw",
|
|
13
|
+
props: {
|
|
14
|
+
modelData: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
controller: {
|
|
19
|
+
type: MultiDataContainerRawController,
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(props) {
|
|
24
|
+
const ns = useNamespace("multi-data-container-raw");
|
|
25
|
+
const {
|
|
26
|
+
id
|
|
27
|
+
} = props.modelData;
|
|
28
|
+
watch(() => props.controller.state.items, () => {
|
|
29
|
+
const keys = Object.keys(props.controller.panelItems);
|
|
30
|
+
keys.forEach((key) => {
|
|
31
|
+
const panelItem = props.controller.panelItems[key];
|
|
32
|
+
panelItem.state = reactive(panelItem.state);
|
|
33
|
+
});
|
|
34
|
+
}, {
|
|
35
|
+
immediate: true,
|
|
36
|
+
deep: true
|
|
37
|
+
});
|
|
38
|
+
const renderPanelItem = inject("renderPanelItem");
|
|
39
|
+
const classArr = computed(() => {
|
|
40
|
+
const result = [ns.b(), ns.m(id), ...props.controller.containerClass];
|
|
41
|
+
return result;
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
ns,
|
|
45
|
+
classArr,
|
|
46
|
+
renderPanelItem
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
render() {
|
|
50
|
+
let content;
|
|
51
|
+
if (this.$slots.default) {
|
|
52
|
+
content = this.$slots.default();
|
|
53
|
+
} else {
|
|
54
|
+
content = createVNode(resolveComponent("iBizRow"), {
|
|
55
|
+
"class": this.ns.b("content"),
|
|
56
|
+
"layout": this.modelData.layout
|
|
57
|
+
}, {
|
|
58
|
+
default: () => {
|
|
59
|
+
var _a;
|
|
60
|
+
return [(_a = this.modelData.panelItems) == null ? void 0 : _a.map((panelItem) => {
|
|
61
|
+
let _slot;
|
|
62
|
+
const childController = this.controller.panelItems[panelItem.id];
|
|
63
|
+
return createVNode(resolveComponent("iBizCol"), {
|
|
64
|
+
"layoutPos": panelItem.layoutPos,
|
|
65
|
+
"state": childController.state
|
|
66
|
+
}, _isSlot(_slot = this.renderPanelItem(panelItem, {
|
|
67
|
+
providers: this.controller.providers,
|
|
68
|
+
panelItems: this.controller.panelItems
|
|
69
|
+
})) ? _slot : {
|
|
70
|
+
default: () => [_slot]
|
|
71
|
+
});
|
|
72
|
+
})];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return createVNode("div", {
|
|
77
|
+
"class": this.classArr
|
|
78
|
+
}, [content]);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export { MultiDataContainerRaw };
|
|
@@ -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 zzq
|
|
7
|
+
* @date 2024-09-09 16:04:27
|
|
8
|
+
* @export
|
|
9
|
+
* @class MultiDataContainerProvider
|
|
10
|
+
* @implements {EditorProvider}
|
|
11
|
+
*/
|
|
12
|
+
export declare class MultiDataContainerRawProvider implements IPanelItemProvider {
|
|
13
|
+
component: string;
|
|
14
|
+
createController(panelItem: IPanelContainer, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=multi-data-container-raw.provider.d.ts.map
|
package/es/panel-component/multi-data-container-raw/multi-data-container-raw.provider.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-data-container-raw.provider.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container-raw/multi-data-container-raw.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,6BAA8B,YAAW,kBAAkB;IACtE,SAAS,EAAE,MAAM,CAA+B;IAE1C,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 { MultiDataContainerRawController } from './multi-data-container-raw.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class MultiDataContainerRawProvider {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.component = "IBizMultiDataContainerRaw";
|
|
7
|
+
}
|
|
8
|
+
async createController(panelItem, panel, parent) {
|
|
9
|
+
const c = new MultiDataContainerRawController(panelItem, panel, parent);
|
|
10
|
+
await c.init();
|
|
11
|
+
return c;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { MultiDataContainerRawProvider };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 多项数据容器状态
|
|
4
|
+
*
|
|
5
|
+
* @author zzq
|
|
6
|
+
* @date 2024-09-09 16:04:27
|
|
7
|
+
* @export
|
|
8
|
+
* @class MultiDataContainerRawState
|
|
9
|
+
* @extends {PanelItemState}
|
|
10
|
+
*/
|
|
11
|
+
export declare class MultiDataContainerRawState extends PanelItemState {
|
|
12
|
+
/**
|
|
13
|
+
* 多项数据容器数据
|
|
14
|
+
* @author zzq
|
|
15
|
+
* @date 2024-09-09 16:04:27
|
|
16
|
+
* @type {(IData | IData[])}
|
|
17
|
+
*/
|
|
18
|
+
items: IData[];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=multi-data-container-raw.state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-data-container-raw.state.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container-raw/multi-data-container-raw.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;;;;;GAQG;AACH,qBAAa,0BAA2B,SAAQ,cAAc;IAC5D;;;;;OAKG;IACH,KAAK,EAAE,KAAK,EAAE,CAAM;CACrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class MultiDataContainerRawState extends PanelItemState {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
/**
|
|
8
|
+
* 多项数据容器数据
|
|
9
|
+
* @author zzq
|
|
10
|
+
* @date 2024-09-09 16:04:27
|
|
11
|
+
* @type {(IData | IData[])}
|
|
12
|
+
*/
|
|
13
|
+
this.items = [];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { MultiDataContainerRawState };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-pos.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EAGN,0BAA0B,EAE1B,WAAW,EAEX,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;;;;;GAMG;AACH,qBAAa,gBACX,SAAQ,mBAAmB,CAAC,aAAa,CACzC,YAAW,0BAA0B;IAErC;;;;;OAKG;IACK,KAAK,EAAE,WAAW,CAAC;IAE3B;;;;;OAKG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C;;;;;OAKG;IACH,aAAa,EAAG,WAAW,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,EAAG,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3B;;;;;;;OAOG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAS;IAEhC;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,6BAA6B,CAEzC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO;IAUnD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;cAIf,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDvC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,WAAW;IAIpC;;;;;;OAMG;IACH,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAEnC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM;IAOhD;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;IAazD;;;;;;;OAOG;IACH,cAAc,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAiC7C;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"nav-pos.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EAGN,0BAA0B,EAE1B,WAAW,EAEX,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;;;;;GAMG;AACH,qBAAa,gBACX,SAAQ,mBAAmB,CAAC,aAAa,CACzC,YAAW,0BAA0B;IAErC;;;;;OAKG;IACK,KAAK,EAAE,WAAW,CAAC;IAE3B;;;;;OAKG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C;;;;;OAKG;IACH,aAAa,EAAG,WAAW,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,EAAG,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3B;;;;;;;OAOG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAS;IAEhC;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,6BAA6B,CAEzC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO;IAUnD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;cAIf,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDvC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,WAAW;IAIpC;;;;;;OAMG;IACH,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAEnC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM;IAOhD;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;IAazD;;;;;;;OAOG;IACH,cAAc,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAiC7C;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IASrC,YAAY,IAAI,IAAI;IAKpB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAiBxC;;;;;OAKG;IACG,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA0E7D;;;;;OAKG;IACH,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAM/C;;;;;;;OAOG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAWtC"}
|
|
@@ -210,6 +210,11 @@ class NavPosController extends PanelItemController {
|
|
|
210
210
|
* @memberof NavPosController
|
|
211
211
|
*/
|
|
212
212
|
onViewCreated(event) {
|
|
213
|
+
this.panel.evt.emit("onPresetPanelItemEvent", {
|
|
214
|
+
panelItemName: this.model.id,
|
|
215
|
+
panelItemEventName: "onViewCreated",
|
|
216
|
+
presetParams: event
|
|
217
|
+
});
|
|
213
218
|
ibiz.log.debug(this.constructor.name, "onViewCreated", event);
|
|
214
219
|
}
|
|
215
220
|
toBlankRoute() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"click-outside.d.ts","sourceRoot":"","sources":["../../../src/use/click-outside/click-outside.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"click-outside.d.ts","sourceRoot":"","sources":["../../../src/use/click-outside/click-outside.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAmB,GAAG,EAAS,MAAM,KAAK,CAAC;AAElD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,GAAG,EACV,OAAO,EAAE,qBAAqB,EAC9B,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CA8CtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-store.d.ts","sourceRoot":"","sources":["../../../../src/util/store/ui-store/ui-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ui-store.d.ts","sourceRoot":"","sources":["../../../../src/util/store/ui-store/ui-store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,GAAG,EAAE,MAAM,KAAK,CAAC;AAGpC,MAAM,WAAW,QAAQ;IACvB;;;;;;OAMG;IACH,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAEpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,UAAU;;;eAHd,MAAM;;;;;;eAAN,MAAM;;;;;;eAAN,MAAM;;;UAqBb,CAAC"}
|
|
@@ -5,9 +5,16 @@ import { useZIndexStore } from './z-index.mjs';
|
|
|
5
5
|
"use strict";
|
|
6
6
|
const useUIStore = defineStore("uiStore", () => {
|
|
7
7
|
const zIndex = useZIndexStore();
|
|
8
|
+
const getTheme = () => {
|
|
9
|
+
const themeTag = ibiz.util.theme.getTheme();
|
|
10
|
+
return themeTag.includes("dark") ? "dark" : "light";
|
|
11
|
+
};
|
|
8
12
|
const UIStore = reactive({
|
|
9
13
|
zIndex: zIndex.zIndex,
|
|
10
|
-
theme:
|
|
14
|
+
theme: getTheme()
|
|
15
|
+
});
|
|
16
|
+
ibiz.util.theme.evt.on("onChange", () => {
|
|
17
|
+
UIStore.theme = getTheme();
|
|
11
18
|
});
|
|
12
19
|
return { UIStore, zIndex };
|
|
13
20
|
});
|
|
@@ -24,8 +24,8 @@ export declare const IBizView: import("../../util").TypeWithInstall<import("vue"
|
|
|
24
24
|
teleportControls: import("@ibiz/model-core").IControl[];
|
|
25
25
|
viewClassNames: import("vue").ComputedRef<(string | undefined)[]>;
|
|
26
26
|
onLayoutPanelCreated: (controller: import("@ibiz-template/runtime").IViewLayoutPanelController) => void;
|
|
27
|
-
getCtrlProps: (ctrl: import("@ibiz/model-core").IControl) => IParams;
|
|
28
|
-
renderControl: (ctrl: import("@ibiz/model-core").IControl) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
getCtrlProps: (ctrl: import("@ibiz/model-core").IControl, slotProps?: IData) => IParams;
|
|
28
|
+
renderControl: (ctrl: import("@ibiz/model-core").IControl, slotProps?: IData) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
29
29
|
[key: string]: any;
|
|
30
30
|
}>;
|
|
31
31
|
getCtrlTeleportTag: (ctrl: import("@ibiz/model-core").IControl) => string | undefined;
|
package/es/view/common/view.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ export declare const View: import("vue").DefineComponent<{
|
|
|
28
28
|
teleportControls: IControl[];
|
|
29
29
|
viewClassNames: import("vue").ComputedRef<(string | undefined)[]>;
|
|
30
30
|
onLayoutPanelCreated: (controller: IViewLayoutPanelController) => void;
|
|
31
|
-
getCtrlProps: (ctrl: IControl) => IParams;
|
|
32
|
-
renderControl: (ctrl: IControl) => VNode;
|
|
31
|
+
getCtrlProps: (ctrl: IControl, slotProps?: IData) => IParams;
|
|
32
|
+
renderControl: (ctrl: IControl, slotProps?: IData) => VNode;
|
|
33
33
|
getCtrlTeleportTag: (ctrl: IControl) => string | undefined;
|
|
34
34
|
getControlStyle: () => {};
|
|
35
35
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/view/common/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EACN,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAGL,QAAQ,EAER,KAAK,EAIN,MAAM,KAAK,CAAC;AACb,OAAO,aAAa,CAAC;AAGrB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;uCAsDC,0BAA0B,KACrC,IAAI;yBAmBqB,QAAQ,
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/view/common/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EACN,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAGL,QAAQ,EAER,KAAK,EAIN,MAAM,KAAK,CAAC;AACb,OAAO,aAAa,CAAC;AAGrB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;uCAsDC,0BAA0B,KACrC,IAAI;yBAmBqB,QAAQ,cAAa,KAAK,KAAQ,OAAO;0BAkBxC,QAAQ,cAAa,KAAK,KAAQ,KAAK;+BA9DlC,QAAQ,KAAG,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;MAsLjE,CAAC"}
|
package/es/view/common/view.mjs
CHANGED
|
@@ -81,18 +81,19 @@ const View = /* @__PURE__ */ defineComponent({
|
|
|
81
81
|
});
|
|
82
82
|
return result;
|
|
83
83
|
};
|
|
84
|
-
const getCtrlProps = (ctrl) => {
|
|
84
|
+
const getCtrlProps = (ctrl, slotProps = {}) => {
|
|
85
85
|
const slotKey = ctrl.name || ctrl.id;
|
|
86
86
|
return {
|
|
87
87
|
context: c.context,
|
|
88
88
|
params: c.params,
|
|
89
89
|
modelData: ctrl,
|
|
90
|
-
...c.slotProps[slotKey] || {}
|
|
90
|
+
...c.slotProps[slotKey] || {},
|
|
91
|
+
...slotProps
|
|
91
92
|
};
|
|
92
93
|
};
|
|
93
|
-
const renderControl = (ctrl) => {
|
|
94
|
+
const renderControl = (ctrl, slotProps = {}) => {
|
|
94
95
|
const slotKey = ctrl.name || ctrl.id;
|
|
95
|
-
const ctrlProps = getCtrlProps(ctrl);
|
|
96
|
+
const ctrlProps = getCtrlProps(ctrl, slotProps);
|
|
96
97
|
if (slots[slotKey]) {
|
|
97
98
|
return renderSlot(slots, slotKey, ctrlProps);
|
|
98
99
|
}
|
|
@@ -133,8 +134,8 @@ const View = /* @__PURE__ */ defineComponent({
|
|
|
133
134
|
if ((_a = this.controls) == null ? void 0 : _a.length) {
|
|
134
135
|
this.controls.forEach((ctrl) => {
|
|
135
136
|
const slotKey = ctrl.name || ctrl.id;
|
|
136
|
-
slots[slotKey] = () => {
|
|
137
|
-
return this.renderControl(ctrl);
|
|
137
|
+
slots[slotKey] = (slotProps) => {
|
|
138
|
+
return this.renderControl(ctrl, slotProps);
|
|
138
139
|
};
|
|
139
140
|
});
|
|
140
141
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-view-dehtmlview>iframe{width:100%;height:100%;border:0}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IModal, ViewController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IAppPortalView } from '@ibiz/model-core';
|
|
3
|
+
import { PropType } from 'vue';
|
|
4
|
+
import './html-view.scss';
|
|
5
|
+
export declare const HtmlView: import("vue").DefineComponent<{
|
|
6
|
+
context: PropType<IContext>;
|
|
7
|
+
params: {
|
|
8
|
+
type: PropType<IParams>;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
modelData: {
|
|
12
|
+
type: PropType<IAppPortalView>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
modal: {
|
|
16
|
+
type: PropType<IModal>;
|
|
17
|
+
};
|
|
18
|
+
state: {
|
|
19
|
+
type: PropType<IData>;
|
|
20
|
+
};
|
|
21
|
+
}, {
|
|
22
|
+
c: ViewController<import("@ibiz/model-core").IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>;
|
|
23
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
24
|
+
controls: import("@ibiz/model-core").IControl[] | undefined;
|
|
25
|
+
viewClassNames: (string | undefined)[];
|
|
26
|
+
url: import("vue").ComputedRef<any>;
|
|
27
|
+
isLoading: import("vue").Ref<boolean>;
|
|
28
|
+
onLoad: () => void;
|
|
29
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
context: PropType<IContext>;
|
|
31
|
+
params: {
|
|
32
|
+
type: PropType<IParams>;
|
|
33
|
+
default: () => {};
|
|
34
|
+
};
|
|
35
|
+
modelData: {
|
|
36
|
+
type: PropType<IAppPortalView>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
modal: {
|
|
40
|
+
type: PropType<IModal>;
|
|
41
|
+
};
|
|
42
|
+
state: {
|
|
43
|
+
type: PropType<IData>;
|
|
44
|
+
};
|
|
45
|
+
}>>, {
|
|
46
|
+
params: IParams;
|
|
47
|
+
}, {}>;
|
|
48
|
+
//# sourceMappingURL=html-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-view.d.ts","sourceRoot":"","sources":["../../../src/view/html-view/html-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAEL,QAAQ,EAMT,MAAM,KAAK,CAAC;AAEb,OAAO,kBAAkB,CAAC;AAE1B,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmEnB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, onBeforeMount, withDirectives, createVNode, resolveDirective, h, resolveComponent } from 'vue';
|
|
2
|
+
import { ViewController, getErrorViewProvider } from '@ibiz-template/runtime';
|
|
3
|
+
import '../../use/index.mjs';
|
|
4
|
+
import './html-view.css';
|
|
5
|
+
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
6
|
+
import { useViewController } from '../../use/view/use-view-controller/use-view-controller.mjs';
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const HtmlView = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "IBizHtmlView",
|
|
11
|
+
props: {
|
|
12
|
+
context: Object,
|
|
13
|
+
params: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => ({})
|
|
16
|
+
},
|
|
17
|
+
modelData: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
modal: {
|
|
22
|
+
type: Object
|
|
23
|
+
},
|
|
24
|
+
state: {
|
|
25
|
+
type: Object
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setup() {
|
|
29
|
+
var _a;
|
|
30
|
+
const ns = useNamespace("view");
|
|
31
|
+
const c = useViewController((...args) => new ViewController(...args));
|
|
32
|
+
const controls = ((_a = c.model.viewLayoutPanel) == null ? void 0 : _a.controls) || c.model.controls;
|
|
33
|
+
const {
|
|
34
|
+
viewType,
|
|
35
|
+
sysCss,
|
|
36
|
+
codeName
|
|
37
|
+
} = c.model;
|
|
38
|
+
const typeClass = viewType.toLowerCase();
|
|
39
|
+
const sysCssName = sysCss == null ? void 0 : sysCss.cssName;
|
|
40
|
+
const viewClassNames = [ns.b(), ns.b(typeClass), ns.m(codeName), sysCssName];
|
|
41
|
+
const isLoading = ref(false);
|
|
42
|
+
const url = computed(() => {
|
|
43
|
+
if (c.model) {
|
|
44
|
+
const {
|
|
45
|
+
htmlUrl
|
|
46
|
+
} = c.model;
|
|
47
|
+
if (htmlUrl) {
|
|
48
|
+
return htmlUrl;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return "";
|
|
52
|
+
});
|
|
53
|
+
onBeforeMount(() => {
|
|
54
|
+
if (url.value) {
|
|
55
|
+
isLoading.value = true;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const onLoad = () => {
|
|
59
|
+
isLoading.value = false;
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
c,
|
|
63
|
+
ns,
|
|
64
|
+
controls,
|
|
65
|
+
viewClassNames,
|
|
66
|
+
url,
|
|
67
|
+
isLoading,
|
|
68
|
+
onLoad
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
render() {
|
|
72
|
+
if (this.url) {
|
|
73
|
+
return withDirectives(createVNode("div", {
|
|
74
|
+
"class": this.viewClassNames
|
|
75
|
+
}, [createVNode("iframe", {
|
|
76
|
+
"src": this.url,
|
|
77
|
+
"onLoad": () => this.onLoad()
|
|
78
|
+
}, null)]), [[resolveDirective("loading"), this.isLoading]]);
|
|
79
|
+
}
|
|
80
|
+
let Content = null;
|
|
81
|
+
const provider = getErrorViewProvider("404");
|
|
82
|
+
if (provider) {
|
|
83
|
+
if (typeof provider.component === "string") {
|
|
84
|
+
Content = h(resolveComponent(provider.component));
|
|
85
|
+
}
|
|
86
|
+
Content = h(provider.component);
|
|
87
|
+
}
|
|
88
|
+
return createVNode("div", {
|
|
89
|
+
"class": this.viewClassNames
|
|
90
|
+
}, [Content]);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export { HtmlView };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IViewProvider } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 实体html视图适配器
|
|
4
|
+
*
|
|
5
|
+
* @author fzh
|
|
6
|
+
* @date 2024-08-21 18:00:57
|
|
7
|
+
* @export
|
|
8
|
+
* @class HtmlViewProvider
|
|
9
|
+
* @implements {IViewProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class HtmlViewProvider implements IViewProvider {
|
|
12
|
+
component: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=html-view.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-view.provider.d.ts","sourceRoot":"","sources":["../../../src/view/html-view/html-view.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;;;;;;;GAQG;AACH,qBAAa,gBAAiB,YAAW,aAAa;IACpD,SAAS,EAAE,MAAM,CAAkB;CACpC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const IBizHtmlView: import("../../util").TypeWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
context: import("vue").PropType<IContext>;
|
|
3
|
+
params: {
|
|
4
|
+
type: import("vue").PropType<IParams>;
|
|
5
|
+
default: () => {};
|
|
6
|
+
};
|
|
7
|
+
modelData: {
|
|
8
|
+
type: import("vue").PropType<import("@ibiz/model-core").IAppPortalView>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
modal: {
|
|
12
|
+
type: import("vue").PropType<import("@ibiz-template/runtime").IModal>;
|
|
13
|
+
};
|
|
14
|
+
state: {
|
|
15
|
+
type: import("vue").PropType<IData>;
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
c: import("@ibiz-template/runtime").ViewController<import("@ibiz/model-core").IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>;
|
|
19
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
20
|
+
controls: import("@ibiz/model-core").IControl[] | undefined;
|
|
21
|
+
viewClassNames: (string | undefined)[];
|
|
22
|
+
url: import("vue").ComputedRef<any>;
|
|
23
|
+
isLoading: import("vue").Ref<boolean>;
|
|
24
|
+
onLoad: () => void;
|
|
25
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
context: import("vue").PropType<IContext>;
|
|
27
|
+
params: {
|
|
28
|
+
type: import("vue").PropType<IParams>;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
modelData: {
|
|
32
|
+
type: import("vue").PropType<import("@ibiz/model-core").IAppPortalView>;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
modal: {
|
|
36
|
+
type: import("vue").PropType<import("@ibiz-template/runtime").IModal>;
|
|
37
|
+
};
|
|
38
|
+
state: {
|
|
39
|
+
type: import("vue").PropType<IData>;
|
|
40
|
+
};
|
|
41
|
+
}>>, {
|
|
42
|
+
params: IParams;
|
|
43
|
+
}, {}>>;
|
|
44
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/view/html-view/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAGvB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { registerViewProvider, ViewType } from '@ibiz-template/runtime';
|
|
2
|
+
import '../../util/index.mjs';
|
|
3
|
+
import { HtmlViewProvider } from './html-view.provider.mjs';
|
|
4
|
+
import { HtmlView } from './html-view.mjs';
|
|
5
|
+
import { withInstall } from '../../util/install.mjs';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizHtmlView = withInstall(HtmlView, function(v) {
|
|
9
|
+
v.component(HtmlView.name, HtmlView);
|
|
10
|
+
registerViewProvider(ViewType.DE_HTML_VIEW, () => new HtmlViewProvider());
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { IBizHtmlView };
|
package/es/view/index.d.ts
CHANGED
package/es/view/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
|
package/es/view/index.mjs
CHANGED
|
@@ -3,5 +3,6 @@ export { IBizView } from './common/index.mjs';
|
|
|
3
3
|
export { TodoRedirect } from './todo-redirect/todo-redirect.mjs';
|
|
4
4
|
export { IBizPortalView } from './portal-view/index.mjs';
|
|
5
5
|
export { IBizDeRedirectView } from './de-redirect-view/index.mjs';
|
|
6
|
+
export { IBizHtmlView } from './html-view/index.mjs';
|
|
6
7
|
|
|
7
8
|
"use strict";
|
|
@@ -31,6 +31,10 @@ const IBizCodeList = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
31
|
},
|
|
32
32
|
unitName: {
|
|
33
33
|
type: String
|
|
34
|
+
},
|
|
35
|
+
showMode: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "DEFAULT"
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
40
|
emits: {
|
|
@@ -138,9 +142,9 @@ const IBizCodeList = /* @__PURE__ */ vue.defineComponent({
|
|
|
138
142
|
"style": item.color ? this.ns.cssVarBlock({
|
|
139
143
|
"item-color": "".concat(item.color)
|
|
140
144
|
}) : null
|
|
141
|
-
}, [item.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
145
|
+
}, [this.showMode !== "TEXT" && item.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
142
146
|
"icon": item.sysImage
|
|
143
|
-
}, null), item.text])];
|
|
147
|
+
}, null), this.showMode !== "ICON" && item.text])];
|
|
144
148
|
})]);
|
|
145
149
|
}
|
|
146
150
|
});
|
|
@@ -93,9 +93,17 @@ const ViewLayoutPanelControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
93
93
|
const component = vue.resolveComponent(provider.component);
|
|
94
94
|
let children;
|
|
95
95
|
if (panelItem.itemType === "CTRLPOS" && slots[panelItem.id]) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
const panelItemC2 = panelItems[panelItem.id];
|
|
97
|
+
if (panelItemC2.parent && runtime.isSimpleDataContainer(panelItemC2.parent.model)) {
|
|
98
|
+
children = () => {
|
|
99
|
+
return slots[panelItem.id]({
|
|
100
|
+
isSimple: true,
|
|
101
|
+
data: panelItemC2.data
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
} else {
|
|
105
|
+
children = () => slots[panelItem.id]();
|
|
106
|
+
}
|
|
99
107
|
} else if (panelItem.itemType === "TABPANEL" && ((_a = panelItem.panelTabPages) == null ? void 0 : _a.length)) {
|
|
100
108
|
children = () => {
|
|
101
109
|
return panelItem.panelTabPages.map((child) => {
|