@ibiz-template/vue3-components 0.2.15 → 0.2.17
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-Zu7Tav62.js +14 -0
- package/dist/index-Zu7Tav62.js.map +1 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -13
- package/dist/index.system.min.js.map +1 -1
- package/dist/{xlsx-util-lMYhU4qD.js → xlsx-util-ShOHD7Yn.js} +25 -25
- package/dist/{xlsx-util-lMYhU4qD.js.map → xlsx-util-ShOHD7Yn.js.map} +1 -1
- package/es/_virtual/customParseFormat.mjs +3 -0
- package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.mjs +2 -8
- package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.mjs +2 -8
- package/es/editor/span/span/span.mjs +9 -1
- package/es/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/customParseFormat.mjs +13 -0
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/panel-button/panel-button.css +1 -1
- package/es/panel-component/panel-container-group/index.d.ts +28 -0
- package/es/panel-component/panel-container-group/index.mjs +20 -0
- package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts +31 -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 +28 -0
- package/es/panel-component/panel-container-group/panel-container-group.mjs +107 -0
- package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts +15 -0
- package/es/panel-component/panel-container-group/panel-container-group.provider.mjs +21 -0
- package/es/panel-component/panel-container-group/panel-container-group.state.d.ts +12 -0
- package/es/panel-component/panel-container-group/panel-container-group.state.mjs +7 -0
- package/lib/_virtual/customParseFormat.cjs +5 -0
- package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.cjs +2 -8
- package/lib/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.cjs +2 -8
- package/lib/editor/span/span/span.cjs +9 -1
- package/lib/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/customParseFormat.cjs +17 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/panel-button/panel-button.css +1 -1
- package/lib/panel-component/panel-container-group/index.cjs +27 -0
- package/lib/panel-component/panel-container-group/panel-container-group.cjs +109 -0
- package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +37 -0
- package/lib/panel-component/panel-container-group/panel-container-group.css +1 -0
- package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +23 -0
- package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +9 -0
- package/package.json +6 -6
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var panelContainerGroup_controller = require('./panel-container-group.controller.cjs');
|
|
6
|
+
require('./panel-container-group.css');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
function _isSlot(s) {
|
|
10
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
11
|
+
}
|
|
12
|
+
const PanelContainerGroup = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
+
name: "IBizPanelContainerGroup",
|
|
14
|
+
props: {
|
|
15
|
+
modelData: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
controller: {
|
|
20
|
+
type: panelContainerGroup_controller.PanelContainerGroupController,
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(props) {
|
|
25
|
+
const ns = vue3Util.useNamespace("panel-container-group");
|
|
26
|
+
const isCollapse = vue.ref(!props.controller.defaultExpansion);
|
|
27
|
+
const changeCollapse = () => {
|
|
28
|
+
if (!props.controller.disableClose) {
|
|
29
|
+
isCollapse.value = !isCollapse.value;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const captionText = vue.computed(() => {
|
|
33
|
+
const {
|
|
34
|
+
captionItemName,
|
|
35
|
+
caption,
|
|
36
|
+
capLanguageRes
|
|
37
|
+
} = props.modelData;
|
|
38
|
+
if (captionItemName) {
|
|
39
|
+
return props.controller.data[captionItemName];
|
|
40
|
+
}
|
|
41
|
+
let text = caption;
|
|
42
|
+
if (capLanguageRes) {
|
|
43
|
+
text = ibiz.i18n.t(capLanguageRes.lanResTag, caption);
|
|
44
|
+
}
|
|
45
|
+
return text;
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
ns,
|
|
49
|
+
captionText,
|
|
50
|
+
changeCollapse,
|
|
51
|
+
isCollapse
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
render() {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
let _slot;
|
|
57
|
+
const classArr = [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass, this.ns.is("hidden", !this.controller.state.visible)];
|
|
58
|
+
if (this.modelData.showCaption === true) {
|
|
59
|
+
classArr.push(this.ns.m("show-header"));
|
|
60
|
+
classArr.push(this.ns.b("collapse"));
|
|
61
|
+
classArr.push(this.ns.is("collapse", this.isCollapse));
|
|
62
|
+
if (this.controller.disableClose) {
|
|
63
|
+
classArr.push(this.ns.bm("collapse", "disable-close"));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
67
|
+
const content = vue.createVNode(vue.resolveComponent("iBizRow"), {
|
|
68
|
+
"slot": "content",
|
|
69
|
+
"layout": this.modelData.layout
|
|
70
|
+
}, _isSlot(_slot = defaultSlots.map((slot) => {
|
|
71
|
+
const props = slot.props;
|
|
72
|
+
if (!props || !props.controller) {
|
|
73
|
+
return slot;
|
|
74
|
+
}
|
|
75
|
+
return vue.createVNode(vue.resolveComponent("iBizCol"), {
|
|
76
|
+
"layoutPos": props.modelData.layoutPos,
|
|
77
|
+
"state": props.controller.state
|
|
78
|
+
}, _isSlot(slot) ? slot : {
|
|
79
|
+
default: () => [slot]
|
|
80
|
+
});
|
|
81
|
+
})) ? _slot : {
|
|
82
|
+
default: () => [_slot]
|
|
83
|
+
});
|
|
84
|
+
let header = null;
|
|
85
|
+
if (this.modelData.showCaption) {
|
|
86
|
+
header = vue.createVNode("div", {
|
|
87
|
+
"class": [this.ns.b("header")],
|
|
88
|
+
"onClick": this.changeCollapse
|
|
89
|
+
}, [vue.createVNode("div", {
|
|
90
|
+
"class": [this.ns.be("header", "left")]
|
|
91
|
+
}, [vue.createVNode("div", {
|
|
92
|
+
"class": [this.ns.e("caption"), ...this.controller.labelClass]
|
|
93
|
+
}, [this.captionText])]), vue.createVNode("div", {
|
|
94
|
+
"class": [this.ns.be("header", "right")]
|
|
95
|
+
}, [this.modelData.titleBarCloseMode !== void 0 && this.modelData.titleBarCloseMode !== 0 && (this.isCollapse ? vue.createVNode("ion-icon", {
|
|
96
|
+
"name": "caret-forward-sharp"
|
|
97
|
+
}, null) : vue.createVNode("ion-icon", {
|
|
98
|
+
"name": "caret-down-sharp"
|
|
99
|
+
}, null))])]);
|
|
100
|
+
}
|
|
101
|
+
return vue.createVNode("div", {
|
|
102
|
+
"class": classArr
|
|
103
|
+
}, [header, vue.createVNode("div", {
|
|
104
|
+
"class": [this.ns.b("content")]
|
|
105
|
+
}, [content])]);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
exports.PanelContainerGroup = PanelContainerGroup;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
var panelContainerGroup_state = require('./panel-container-group.state.cjs');
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
class PanelContainerGroupController extends runtime.PanelItemController {
|
|
8
|
+
createState() {
|
|
9
|
+
var _a;
|
|
10
|
+
return new panelContainerGroup_state.PanelContainerGroupState((_a = this.parent) == null ? void 0 : _a.state);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 禁用关闭
|
|
14
|
+
*
|
|
15
|
+
* @author chitanda
|
|
16
|
+
* @date 2022-09-14 14:09:51
|
|
17
|
+
* @readonly
|
|
18
|
+
* @type {boolean}
|
|
19
|
+
*/
|
|
20
|
+
get disableClose() {
|
|
21
|
+
const { titleBarCloseMode: mode } = this.model;
|
|
22
|
+
return mode === 0 || mode === void 0;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 是否默认展开分组
|
|
26
|
+
*
|
|
27
|
+
* @author chitanda
|
|
28
|
+
* @date 2022-09-14 14:09:09
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
get defaultExpansion() {
|
|
32
|
+
const { titleBarCloseMode: mode } = this.model;
|
|
33
|
+
return this.disableClose || mode === 1;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
exports.PanelContainerGroupController = 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,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var panelContainerGroup_controller = require('./panel-container-group.controller.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class PanelContainerGroupProvider {
|
|
13
|
+
constructor() {
|
|
14
|
+
__publicField(this, "component", "IBizPanelContainerGroup");
|
|
15
|
+
}
|
|
16
|
+
async createController(panelItem, panel, parent) {
|
|
17
|
+
const c = new panelContainerGroup_controller.PanelContainerGroupController(panelItem, panel, parent);
|
|
18
|
+
await c.init();
|
|
19
|
+
return c;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.PanelContainerGroupProvider = PanelContainerGroupProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "使用 rollup 编译 vue 组件或者 jsx",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@floating-ui/dom": "^1.5.3",
|
|
27
27
|
"@ibiz-template-plugin/ai-chat": "^0.0.1",
|
|
28
28
|
"@ibiz-template/core": "^0.2.15",
|
|
29
|
-
"@ibiz-template/model-helper": "^0.2.
|
|
30
|
-
"@ibiz-template/runtime": "^0.2.
|
|
29
|
+
"@ibiz-template/model-helper": "^0.2.17",
|
|
30
|
+
"@ibiz-template/runtime": "^0.2.17",
|
|
31
31
|
"@ibiz-template/theme": "^0.2.13",
|
|
32
|
-
"@ibiz-template/vue3-util": "^0.2.
|
|
32
|
+
"@ibiz-template/vue3-util": "^0.2.17",
|
|
33
33
|
"@ibiz/model-core": "^0.0.20",
|
|
34
34
|
"@imengyu/vue3-context-menu": "^1.3.3",
|
|
35
35
|
"@monaco-editor/loader": "^1.4.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"xlsx": "^0.18.5"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@commitlint/cli": "^18.4.
|
|
58
|
+
"@commitlint/cli": "^18.4.1",
|
|
59
59
|
"@commitlint/config-conventional": "^18.4.0",
|
|
60
60
|
"@ibiz-template/cli": "0.3.2",
|
|
61
61
|
"@types/lodash-es": "^4.17.11",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/qs": "^6.9.10",
|
|
64
64
|
"@types/ramda": "^0.29.8",
|
|
65
65
|
"husky": "^8.0.3",
|
|
66
|
-
"lint-staged": "^15.0
|
|
66
|
+
"lint-staged": "^15.1.0",
|
|
67
67
|
"stylelint": "^15.11.0",
|
|
68
68
|
"typescript": "^5.2.2",
|
|
69
69
|
"vite": "^4.5.0",
|