@ibiz-template/mob-vue3-components 0.7.41-alpha.12 → 0.7.41-alpha.14
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-Pq2AnubY.js +76 -0
- package/dist/index-Pq2AnubY.js.map +1 -0
- package/dist/index.min.css +8 -8
- package/dist/index.system.min.js +1 -1
- package/dist/{quill-7fiycnP7.js → quill-QfnovuHC.js} +2 -2
- package/dist/{quill-7fiycnP7.js.map → quill-QfnovuHC.js.map} +1 -1
- package/dist/{quill-editor-preview-GUdcFmjn.js → quill-editor-preview-0dI65Nu7.js} +2 -2
- package/dist/{quill-editor-preview-GUdcFmjn.js.map → quill-editor-preview-0dI65Nu7.js.map} +1 -1
- package/dist/{quill-editor-Nndlb9WE.js → quill-editor-x-OFlakL.js} +2 -2
- package/dist/{quill-editor-Nndlb9WE.js.map → quill-editor-x-OFlakL.js.map} +1 -1
- package/dist/tree-4CqtwsXL.js +2 -0
- package/dist/tree-4CqtwsXL.js.map +1 -0
- package/es/_virtual/index12.mjs +2 -2
- package/es/_virtual/index13.mjs +2 -2
- package/es/common/action-group/action-group.css +1 -0
- package/es/common/action-group/action-group.d.ts +54 -0
- package/es/common/action-group/action-group.mjs +165 -0
- package/es/common/action-toolbar/action-toolbar.d.ts +1 -0
- package/es/common/action-toolbar/action-toolbar.mjs +20 -8
- package/es/common/button-list/button-list.css +1 -1
- package/es/common/button-list/button-list.d.ts +3 -2
- package/es/common/button-list/button-list.mjs +83 -63
- package/es/common/index.mjs +2 -0
- package/es/common/rawitem/rawitem.mjs +2 -2
- package/es/control/list/md-ctrl/md-ctrl.mjs +13 -15
- package/es/control/tab-exp-panel/index.d.ts +1 -0
- package/es/control/tab-exp-panel/tab-exp-panel.css +1 -0
- package/es/control/tab-exp-panel/tab-exp-panel.d.ts +2 -0
- package/es/control/tab-exp-panel/tab-exp-panel.mjs +28 -1
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.d.ts +15 -0
- package/es/control/tree/tree.mjs +14 -2
- package/es/editor/raw/ibiz-raw/ibiz-raw.d.ts +2 -2
- package/es/editor/span/span/span.d.ts +5 -3
- package/es/editor/span/span/span.mjs +5 -5
- package/es/editor/upload/use/use-van-upload.mjs +19 -1
- package/es/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.mjs +1 -1
- package/es/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.mjs +1 -1
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.controller.d.ts +54 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.controller.mjs +76 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.css +1 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.d.ts +43 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.mjs +80 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.provider.d.ts +14 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.provider.mjs +21 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.state.d.ts +10 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.state.mjs +7 -0
- package/es/panel-component/index-blank-placeholder/index.d.ts +25 -0
- package/es/panel-component/index-blank-placeholder/index.mjs +19 -0
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/panel-button-list/panel-button-list.controller.d.ts +1 -1
- package/es/panel-component/panel-button-list/panel-button-list.controller.mjs +19 -18
- package/lib/_virtual/index12.cjs +2 -2
- package/lib/_virtual/index13.cjs +2 -2
- package/lib/common/action-group/action-group.cjs +167 -0
- package/lib/common/action-group/action-group.css +1 -0
- package/lib/common/action-toolbar/action-toolbar.cjs +20 -8
- package/lib/common/button-list/button-list.cjs +82 -62
- package/lib/common/button-list/button-list.css +1 -1
- package/lib/common/index.cjs +2 -0
- package/lib/common/rawitem/rawitem.cjs +2 -2
- package/lib/control/list/md-ctrl/md-ctrl.cjs +12 -14
- package/lib/control/tab-exp-panel/tab-exp-panel.cjs +27 -0
- package/lib/control/tab-exp-panel/tab-exp-panel.css +1 -0
- package/lib/control/tree/tree.cjs +14 -2
- package/lib/control/tree/tree.css +1 -1
- package/lib/editor/span/span/span.cjs +5 -5
- package/lib/editor/upload/use/use-van-upload.cjs +19 -1
- package/lib/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.cjs +1 -1
- package/lib/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.cjs +1 -1
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.cjs +82 -0
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.controller.cjs +78 -0
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.css +1 -0
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.provider.cjs +23 -0
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.state.cjs +9 -0
- package/lib/panel-component/index-blank-placeholder/index.cjs +25 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/panel-button-list/panel-button-list.controller.cjs +18 -17
- package/package.json +6 -6
- package/dist/index-yGM1h2Ma.js +0 -76
- package/dist/index-yGM1h2Ma.js.map +0 -1
- package/dist/tree-nburezSg.js +0 -2
- package/dist/tree-nburezSg.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IndexBlankPlaceholderState } from './index-blank-placeholder.state.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
class IndexBlankPlaceholderController extends PanelItemController {
|
|
6
|
+
createState() {
|
|
7
|
+
var _a;
|
|
8
|
+
return new IndexBlankPlaceholderState((_a = this.parent) == null ? void 0 : _a.state);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @description 当前视图路由层级
|
|
12
|
+
* @exposedoc
|
|
13
|
+
* @readonly
|
|
14
|
+
* @type {(number | undefined)}
|
|
15
|
+
* @memberof IndexBlankPlaceholderController
|
|
16
|
+
*/
|
|
17
|
+
get routeDepth() {
|
|
18
|
+
return this.panel.view.modal.routeDepth;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @description 应用菜单
|
|
22
|
+
* @exposedoc
|
|
23
|
+
* @readonly
|
|
24
|
+
* @type {(AppMenuController | undefined)}
|
|
25
|
+
* @memberof IndexBlankPlaceholderController
|
|
26
|
+
*/
|
|
27
|
+
get appmenu() {
|
|
28
|
+
return this.panel.getController("appmenu");
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @description 首页导航栏
|
|
32
|
+
* @exposedoc
|
|
33
|
+
* @readonly
|
|
34
|
+
* @type {(NavPosIndexController | undefined)}
|
|
35
|
+
* @memberof IndexBlankPlaceholderController
|
|
36
|
+
*/
|
|
37
|
+
get navPos() {
|
|
38
|
+
return this.panel.panelItems.nav_pos_index;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 初始化
|
|
42
|
+
*
|
|
43
|
+
* @protected
|
|
44
|
+
* @return {*} {Promise<void>}
|
|
45
|
+
* @memberof IndexBlankPlaceholderController
|
|
46
|
+
*/
|
|
47
|
+
async onInit() {
|
|
48
|
+
await super.onInit();
|
|
49
|
+
this.state.keepAlive = true;
|
|
50
|
+
this.state.visible = false;
|
|
51
|
+
this.panel.evt.on("onMounted", async () => {
|
|
52
|
+
var _a;
|
|
53
|
+
if (this.navPos)
|
|
54
|
+
this.navPos.state.keepAlive = true;
|
|
55
|
+
const appViewId = (_a = this.appmenu) == null ? void 0 : _a.getDefaultOpenView();
|
|
56
|
+
if (appViewId) {
|
|
57
|
+
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
58
|
+
const { openMode = "INDEXVIEWTAB" } = appView;
|
|
59
|
+
this.state.visible = !openMode.startsWith("INDEXVIEWTAB");
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @description 设置显示状态
|
|
65
|
+
* @exposedoc
|
|
66
|
+
* @param {boolean} state
|
|
67
|
+
* @memberof IndexBlankPlaceholderController
|
|
68
|
+
*/
|
|
69
|
+
setVisible(state) {
|
|
70
|
+
this.state.visible = state;
|
|
71
|
+
if (this.navPos)
|
|
72
|
+
this.navPos.state.visible = !state;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { IndexBlankPlaceholderController };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-index-blank-placeholder{width:100%;height:100%}.ibiz-index-blank-placeholder>.ibiz-row{height:100%;overflow:hidden auto}.ibiz-index-blank-placeholder.is-hidden{display:none}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { IndexBlankPlaceholderController } from './index-blank-placeholder.controller';
|
|
4
|
+
import './index-blank-placeholder.scss';
|
|
5
|
+
/**
|
|
6
|
+
* 空白占位
|
|
7
|
+
* @primary
|
|
8
|
+
* @description 首页空白占位组件,当菜单未进行导航时,首页显示此容器内的内容。
|
|
9
|
+
*/
|
|
10
|
+
export declare const IndexBlankPlaceholder: import("vue").DefineComponent<{
|
|
11
|
+
/**
|
|
12
|
+
* @description 空白占位模型数据
|
|
13
|
+
*/
|
|
14
|
+
modelData: {
|
|
15
|
+
type: PropType<IPanelContainer>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @description 空白占位控制器
|
|
20
|
+
*/
|
|
21
|
+
controller: {
|
|
22
|
+
type: PropType<IndexBlankPlaceholderController>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
27
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
28
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
/**
|
|
30
|
+
* @description 空白占位模型数据
|
|
31
|
+
*/
|
|
32
|
+
modelData: {
|
|
33
|
+
type: PropType<IPanelContainer>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @description 空白占位控制器
|
|
38
|
+
*/
|
|
39
|
+
controller: {
|
|
40
|
+
type: PropType<IndexBlankPlaceholderController>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { isVNode, computed, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace, onRouteChange } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './index-blank-placeholder.css';
|
|
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 IndexBlankPlaceholder = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "IBizIndexBlankPlaceholder",
|
|
11
|
+
props: {
|
|
12
|
+
/**
|
|
13
|
+
* @description 空白占位模型数据
|
|
14
|
+
*/
|
|
15
|
+
modelData: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* @description 空白占位控制器
|
|
21
|
+
*/
|
|
22
|
+
controller: {
|
|
23
|
+
type: Object,
|
|
24
|
+
required: true
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(props) {
|
|
28
|
+
const c = props.controller;
|
|
29
|
+
const ns = useNamespace("index-blank-placeholder");
|
|
30
|
+
const {
|
|
31
|
+
id
|
|
32
|
+
} = props.modelData;
|
|
33
|
+
const classArr = computed(() => {
|
|
34
|
+
let result = [ns.b(), ns.m(id)];
|
|
35
|
+
result = [...result, ...props.controller.containerClass, ns.is("hidden", !props.controller.state.visible)];
|
|
36
|
+
return result;
|
|
37
|
+
});
|
|
38
|
+
if (c.routeDepth) {
|
|
39
|
+
onRouteChange((args) => {
|
|
40
|
+
c.setVisible(!args.currentKey);
|
|
41
|
+
}, c.routeDepth + 1);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
ns,
|
|
45
|
+
classArr
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
render() {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
let _slot;
|
|
51
|
+
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
52
|
+
const content = createVNode(resolveComponent("iBizRow"), {
|
|
53
|
+
"slot": "content",
|
|
54
|
+
"layout": this.modelData.layout
|
|
55
|
+
}, _isSlot(_slot = defaultSlots.map((slot) => {
|
|
56
|
+
const props = slot.props;
|
|
57
|
+
if (!props || !props.controller) {
|
|
58
|
+
return slot;
|
|
59
|
+
}
|
|
60
|
+
return createVNode(resolveComponent("iBizCol"), {
|
|
61
|
+
"layoutPos": props.modelData.layoutPos,
|
|
62
|
+
"state": props.controller.state
|
|
63
|
+
}, _isSlot(slot) ? slot : {
|
|
64
|
+
default: () => [slot]
|
|
65
|
+
});
|
|
66
|
+
})) ? _slot : {
|
|
67
|
+
default: () => [_slot]
|
|
68
|
+
});
|
|
69
|
+
return createVNode("div", {
|
|
70
|
+
"class": this.classArr,
|
|
71
|
+
"onClick": () => {
|
|
72
|
+
this.controller.onClick();
|
|
73
|
+
}
|
|
74
|
+
}, [this.controller.model.cssStyle ? createVNode("style", {
|
|
75
|
+
"type": "text/css"
|
|
76
|
+
}, [this.controller.model.cssStyle]) : null, content]);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export { IndexBlankPlaceholder };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
+
import { IndexBlankPlaceholderController } from './index-blank-placeholder.controller';
|
|
4
|
+
/**
|
|
5
|
+
* 首页空白占位适配器
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class IndexBlankPlaceholderProvider
|
|
9
|
+
* @implements {IPanelItemProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class IndexBlankPlaceholderProvider implements IPanelItemProvider {
|
|
12
|
+
component: string;
|
|
13
|
+
createController(panelItem: IPanelContainer, panel: PanelController, parent: PanelItemController | undefined): Promise<IndexBlankPlaceholderController>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IndexBlankPlaceholderController } from './index-blank-placeholder.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class IndexBlankPlaceholderProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizIndexBlankPlaceholder");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new IndexBlankPlaceholderController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { IndexBlankPlaceholderProvider };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IndexBlankPlaceholderController } from './index-blank-placeholder.controller';
|
|
2
|
+
export { IndexBlankPlaceholderController };
|
|
3
|
+
export declare const IBizIndexBlankPlaceholder: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
4
|
+
modelData: {
|
|
5
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
controller: {
|
|
9
|
+
type: import("vue").PropType<IndexBlankPlaceholderController>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
14
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
modelData: {
|
|
17
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
controller: {
|
|
21
|
+
type: import("vue").PropType<IndexBlankPlaceholderController>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>>, {}, {}>>;
|
|
25
|
+
export default IBizIndexBlankPlaceholder;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { IndexBlankPlaceholder } from './index-blank-placeholder.mjs';
|
|
4
|
+
import { IndexBlankPlaceholderProvider } from './index-blank-placeholder.provider.mjs';
|
|
5
|
+
export { IndexBlankPlaceholderController } from './index-blank-placeholder.controller.mjs';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizIndexBlankPlaceholder = withInstall(
|
|
9
|
+
IndexBlankPlaceholder,
|
|
10
|
+
function(v) {
|
|
11
|
+
v.component(IndexBlankPlaceholder.name, IndexBlankPlaceholder);
|
|
12
|
+
registerPanelItemProvider(
|
|
13
|
+
"CONTAINER_INDEX_BLANK_PLACEHOLDER",
|
|
14
|
+
() => new IndexBlankPlaceholderProvider()
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export { IBizIndexBlankPlaceholder, IBizIndexBlankPlaceholder as default };
|
|
@@ -15,6 +15,7 @@ import { IBizMobAsyncAction } from './async-action/index.mjs';
|
|
|
15
15
|
import { IBizPanelButtonList } from './panel-button-list/index.mjs';
|
|
16
16
|
import { IBizAuthSso } from './auth-sso/index.mjs';
|
|
17
17
|
import { IBizPanelAppTitle } from './panel-app-title/index.mjs';
|
|
18
|
+
import { IBizIndexBlankPlaceholder } from './index-blank-placeholder/index.mjs';
|
|
18
19
|
|
|
19
20
|
"use strict";
|
|
20
21
|
const IBizPanelComponents = {
|
|
@@ -49,6 +50,7 @@ const IBizPanelComponents = {
|
|
|
49
50
|
v.use(IBizAuthSso);
|
|
50
51
|
v.use(IBizAuthWxmpQrcode);
|
|
51
52
|
v.use(IBizPanelAppTitle);
|
|
53
|
+
v.use(IBizIndexBlankPlaceholder);
|
|
52
54
|
}
|
|
53
55
|
};
|
|
54
56
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PanelController,
|
|
1
|
+
import { PanelController, PanelNotifyState, PanelItemController } from '@ibiz-template/runtime';
|
|
2
2
|
import { IPanelButtonList } from '@ibiz/model-core';
|
|
3
3
|
import { PanelButtonListState } from './panel-button-list.state';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PanelItemController, ButtonContainerState, UIActionButtonState, UIActionUtil } from '@ibiz-template/runtime';
|
|
1
|
+
import { PanelItemController, ButtonContainerState, getAllUIActionItems, UIActionButtonState, UIActionUtil } from '@ibiz-template/runtime';
|
|
2
2
|
import { PanelButtonListState } from './panel-button-list.state.mjs';
|
|
3
3
|
|
|
4
4
|
"use strict";
|
|
@@ -45,20 +45,22 @@ class PanelButtonListController extends PanelItemController {
|
|
|
45
45
|
* @memberof PanelButtonListController
|
|
46
46
|
*/
|
|
47
47
|
async initButtonsState() {
|
|
48
|
-
var _a;
|
|
49
48
|
const { buttonListType, uiactionGroup, panelButtons } = this.model;
|
|
50
49
|
if (buttonListType === "UIACTIONGROUP") {
|
|
51
|
-
(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
if (uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) {
|
|
51
|
+
const actions = getAllUIActionItems(uiactionGroup.uiactionGroupDetails);
|
|
52
|
+
actions.forEach((detail) => {
|
|
53
|
+
if (detail.uiactionId) {
|
|
54
|
+
const buttonState = new UIActionButtonState(
|
|
55
|
+
detail.id,
|
|
56
|
+
detail.appId,
|
|
57
|
+
detail.uiactionId,
|
|
58
|
+
detail
|
|
59
|
+
);
|
|
60
|
+
this.state.buttonsState.addState(detail.id, buttonState);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
62
64
|
} else {
|
|
63
65
|
panelButtons == null ? void 0 : panelButtons.forEach((button) => {
|
|
64
66
|
if (button.uiactionId) {
|
|
@@ -110,12 +112,11 @@ class PanelButtonListController extends PanelItemController {
|
|
|
110
112
|
* @memberof PanelButtonListController
|
|
111
113
|
*/
|
|
112
114
|
getModelById(id) {
|
|
113
|
-
var _a;
|
|
114
115
|
const { buttonListType, uiactionGroup, panelButtons } = this.model;
|
|
115
|
-
if (buttonListType === "UIACTIONGROUP")
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
if (buttonListType === "UIACTIONGROUP") {
|
|
117
|
+
const actions = getAllUIActionItems(uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails);
|
|
118
|
+
return actions.find((detail) => detail.id === id);
|
|
119
|
+
}
|
|
119
120
|
return panelButtons == null ? void 0 : panelButtons.find((button) => button.id === id);
|
|
120
121
|
}
|
|
121
122
|
/**
|
package/lib/_virtual/index12.cjs
CHANGED
package/lib/_virtual/index13.cjs
CHANGED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('../../util/index.cjs');
|
|
6
|
+
require('./action-group.css');
|
|
7
|
+
var buttonUtil = require('../../util/button-util/button-util.cjs');
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
const IBizActionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
11
|
+
name: "IBizActionGroup",
|
|
12
|
+
props: {
|
|
13
|
+
actionDetail: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
actionsState: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
popoverClassName: {
|
|
22
|
+
type: String
|
|
23
|
+
},
|
|
24
|
+
direction: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "horizontal"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: {
|
|
30
|
+
actionClick: (detail, event) => true,
|
|
31
|
+
popoverVisibleChange: (visible) => true
|
|
32
|
+
},
|
|
33
|
+
setup(props, {
|
|
34
|
+
emit
|
|
35
|
+
}) {
|
|
36
|
+
const ns = vue3Util.useNamespace("action-group");
|
|
37
|
+
const showPopover = vue.ref(false);
|
|
38
|
+
const buttonRef = vue.ref();
|
|
39
|
+
const childPopover = vue.ref(false);
|
|
40
|
+
const details = vue.computed(() => {
|
|
41
|
+
if (props.actionDetail.detailType === "DEUIACTIONGROUP" && props.actionDetail.refUIActionGroup)
|
|
42
|
+
return props.actionDetail.refUIActionGroup.uiactionGroupDetails || [];
|
|
43
|
+
return [];
|
|
44
|
+
});
|
|
45
|
+
const visible = vue.computed(() => {
|
|
46
|
+
const visible2 = details.value.some((item) => {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
return (_b = (_a = props.actionsState) == null ? void 0 : _a[item.id]) == null ? void 0 : _b.visible;
|
|
49
|
+
});
|
|
50
|
+
return visible2;
|
|
51
|
+
});
|
|
52
|
+
const placement = vue.computed(() => {
|
|
53
|
+
if (!buttonRef.value)
|
|
54
|
+
return props.direction === "horizontal" ? "right" : "bottom";
|
|
55
|
+
const {
|
|
56
|
+
innerWidth,
|
|
57
|
+
innerHeight
|
|
58
|
+
} = window;
|
|
59
|
+
const {
|
|
60
|
+
offsetLeft: x,
|
|
61
|
+
offsetTop: y,
|
|
62
|
+
offsetWidth: width
|
|
63
|
+
} = buttonRef.value.$el;
|
|
64
|
+
const centerX = innerWidth - width - 128;
|
|
65
|
+
const centerY = details.value.length ? innerHeight - details.value.length * 44 : innerHeight / 2;
|
|
66
|
+
if (y > centerY) {
|
|
67
|
+
if (props.direction === "horizontal")
|
|
68
|
+
return x > centerX ? "left-end" : "right-end";
|
|
69
|
+
return x > centerX ? "top-end" : "top-start";
|
|
70
|
+
}
|
|
71
|
+
if (props.direction === "horizontal")
|
|
72
|
+
return x > centerX ? "left-start" : "right-start";
|
|
73
|
+
return x > centerX ? "bottom-end" : "bottom-start";
|
|
74
|
+
});
|
|
75
|
+
const handleClick = async (detail, event, closePopover = false) => {
|
|
76
|
+
if (closePopover)
|
|
77
|
+
showPopover.value = false;
|
|
78
|
+
emit("actionClick", detail, event);
|
|
79
|
+
};
|
|
80
|
+
const onPopoverVisibleChange = (visible2) => {
|
|
81
|
+
emit("popoverVisibleChange", visible2);
|
|
82
|
+
};
|
|
83
|
+
const renderSeparator = (visible2) => {
|
|
84
|
+
if (visible2)
|
|
85
|
+
return vue.createVNode("div", {
|
|
86
|
+
"class": ns.e("separator")
|
|
87
|
+
}, null);
|
|
88
|
+
};
|
|
89
|
+
const renderActions = () => {
|
|
90
|
+
var _a;
|
|
91
|
+
return (_a = details.value) == null ? void 0 : _a.map((detail) => {
|
|
92
|
+
var _a2, _b, _c;
|
|
93
|
+
if (detail.detailType === "DEUIACTIONGROUP")
|
|
94
|
+
return [renderSeparator(detail.addSeparator), vue.createVNode(vue.resolveComponent("iBizActionGroup"), {
|
|
95
|
+
"actionDetail": detail,
|
|
96
|
+
"onActionClick": handleClick,
|
|
97
|
+
"actionsState": props.actionsState,
|
|
98
|
+
"popoverClassName": props.popoverClassName,
|
|
99
|
+
"onPopoverVisibleChange": (visible2) => childPopover.value = visible2
|
|
100
|
+
}, null)];
|
|
101
|
+
if ((_b = (_a2 = props.actionsState) == null ? void 0 : _a2[detail.id]) == null ? void 0 : _b.visible)
|
|
102
|
+
return [renderSeparator(detail.addSeparator), vue.createVNode(vue.resolveComponent("van-button"), {
|
|
103
|
+
"size": "small",
|
|
104
|
+
"type": buttonUtil.convertBtnType(detail.buttonStyle),
|
|
105
|
+
"text": detail.showCaption ? detail.caption : "",
|
|
106
|
+
"onClick": (e) => handleClick(detail, e, true),
|
|
107
|
+
"disabled": props.actionsState[detail.id].disabled,
|
|
108
|
+
"class": [ns.e("item"), (_c = detail.sysCss) == null ? void 0 : _c.codeName]
|
|
109
|
+
}, {
|
|
110
|
+
icon: () => {
|
|
111
|
+
return detail.showIcon && detail.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
112
|
+
"icon": detail.sysImage
|
|
113
|
+
}, null);
|
|
114
|
+
}
|
|
115
|
+
})];
|
|
116
|
+
return null;
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
return {
|
|
120
|
+
ns,
|
|
121
|
+
visible,
|
|
122
|
+
buttonRef,
|
|
123
|
+
placement,
|
|
124
|
+
showPopover,
|
|
125
|
+
childPopover,
|
|
126
|
+
renderActions,
|
|
127
|
+
onPopoverVisibleChange
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
render() {
|
|
131
|
+
if (this.visible)
|
|
132
|
+
return vue.createVNode(vue.resolveComponent("van-popover"), {
|
|
133
|
+
"placement": this.placement,
|
|
134
|
+
"show": this.showPopover,
|
|
135
|
+
"onUpdate:show": ($event) => this.showPopover = $event,
|
|
136
|
+
"close-on-click-outside": !this.childPopover,
|
|
137
|
+
"class": [this.ns.b(), this.popoverClassName],
|
|
138
|
+
"onOpen": () => this.onPopoverVisibleChange(true),
|
|
139
|
+
"onClose": () => this.onPopoverVisibleChange(false)
|
|
140
|
+
}, {
|
|
141
|
+
reference: () => {
|
|
142
|
+
return vue.createVNode(vue.resolveComponent("van-button"), {
|
|
143
|
+
"size": "small",
|
|
144
|
+
"ref": "buttonRef",
|
|
145
|
+
"class": this.ns.e("button"),
|
|
146
|
+
"type": buttonUtil.convertBtnType(this.actionDetail.buttonStyle)
|
|
147
|
+
}, {
|
|
148
|
+
default: () => {
|
|
149
|
+
var _a, _b;
|
|
150
|
+
return [vue.createVNode("div", {
|
|
151
|
+
"class": this.ns.em("button", "text")
|
|
152
|
+
}, [((_a = this.actionDetail.refUIActionGroup) == null ? void 0 : _a.name) || ((_b = this.actionDetail.refUIActionGroup) == null ? void 0 : _b.id)]), vue.createVNode("ion-icon", {
|
|
153
|
+
"class": this.ns.em("button", "icon"),
|
|
154
|
+
"name": this.direction === "horizontal" ? "chevron-forward-outline" : "chevron-down-outline"
|
|
155
|
+
}, null)];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
default: () => {
|
|
160
|
+
return this.renderActions();
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
return void 0;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
exports.IBizActionGroup = IBizActionGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-action-group__separator{width:100%;height:.0625rem;display:inline-block;vertical-align:middle;background-color:var(--ibiz-color-border)}.ibiz-action-group__button .van-button__text{display:flex;align-items:center;gap:var(--ibiz-spacing-extra-tight)}.ibiz-action-group .van-popover__content{display:flex;flex-direction:column}.ibiz-action-group .van-popover__content .van-button{padding:0;font-size:var(--van-popover-action-font-size);line-height:var(--van-line-height-md);width:var(--van-popover-action-width);height:var(--van-popover-action-height);border-color:var(--ibiz-color-white)}.ibiz-action-group .van-popover__content .van-button:before{border-color:var(--ibiz-color-white)}.ibiz-action-group .van-popover__content .van-button .van-button__text{display:flex;align-items:center;gap:var(--ibiz-spacing-extra-tight)}
|
|
@@ -32,27 +32,40 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
|
32
32
|
event.stopPropagation();
|
|
33
33
|
emit("action-click", detail, event);
|
|
34
34
|
};
|
|
35
|
+
const renderSeparator = () => {
|
|
36
|
+
return vue.createVNode("div", {
|
|
37
|
+
"class": ns.e("separator")
|
|
38
|
+
}, null);
|
|
39
|
+
};
|
|
35
40
|
return {
|
|
36
41
|
ns,
|
|
37
|
-
handleClick
|
|
42
|
+
handleClick,
|
|
43
|
+
renderSeparator
|
|
38
44
|
};
|
|
39
45
|
},
|
|
40
46
|
render() {
|
|
41
47
|
const details = this.actionDetails || [];
|
|
42
|
-
if (this.mode === "buttons")
|
|
48
|
+
if (this.mode === "buttons")
|
|
43
49
|
return vue.createVNode("div", {
|
|
44
50
|
"class": [this.ns.b(), this.ns.m("buttons")]
|
|
45
51
|
}, [details.length > 0 && details.map((detail) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
if (detail.detailType === "DEUIACTIONGROUP")
|
|
54
|
+
return [detail.addSeparator && this.renderSeparator(), vue.createVNode(vue.resolveComponent("iBizActionGroup"), {
|
|
55
|
+
"direction": "vertical",
|
|
56
|
+
"actionDetail": detail,
|
|
57
|
+
"actionsState": this.actionsState,
|
|
58
|
+
"onActionClick": this.handleClick,
|
|
59
|
+
"popoverClassName": this.ns.b("action-group")
|
|
60
|
+
}, null)];
|
|
61
|
+
if ((_b = (_a = this.actionsState) == null ? void 0 : _a[detail.id]) == null ? void 0 : _b.visible) {
|
|
62
|
+
return [detail.addSeparator && this.renderSeparator(), vue.createVNode(vue.resolveComponent("van-button"), {
|
|
50
63
|
"size": "small",
|
|
51
64
|
"text": detail.showCaption ? detail.caption : "",
|
|
52
65
|
"type": buttonUtil.convertBtnType(detail.buttonStyle),
|
|
53
66
|
"onClick": (e) => this.handleClick(detail, e),
|
|
54
67
|
"disabled": this.actionsState[detail.id].disabled,
|
|
55
|
-
"class": [this.ns.e("item"), this.ns.is("disabled", false)]
|
|
68
|
+
"class": [this.ns.e("item"), this.ns.is("disabled", false), (_c = detail.sysCss) == null ? void 0 : _c.codeName]
|
|
56
69
|
}, {
|
|
57
70
|
icon: () => {
|
|
58
71
|
return detail.showIcon && detail.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
@@ -63,7 +76,6 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
|
63
76
|
}
|
|
64
77
|
return null;
|
|
65
78
|
})]);
|
|
66
|
-
}
|
|
67
79
|
return vue.createVNode("div", null, [ibiz.i18n.t("component.actionToolbar.noSupportDropDown")]);
|
|
68
80
|
}
|
|
69
81
|
});
|