@ibiz-template/vue3-util 0.7.38-alpha.33 → 0.7.38-alpha.57
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/badge/badge.d.ts +9 -0
- package/es/common/badge/badge.d.ts.map +1 -1
- package/es/common/badge/badge.mjs +5 -1
- package/es/common/code-list/code-list.d.ts +1 -1
- package/es/common/code-list/code-list.d.ts.map +1 -1
- package/es/common/code-list/code-list.mjs +1 -1
- package/es/common/control-base/control-base.css +1 -1
- package/es/common/control-base/control-base.d.ts.map +1 -1
- package/es/common/control-base/control-base.mjs +65 -2
- package/es/common/custom-render/custom-render.css +1 -0
- package/es/common/custom-render/custom-render.d.ts +18 -0
- package/es/common/custom-render/custom-render.d.ts.map +1 -0
- package/es/common/custom-render/custom-render.mjs +85 -0
- package/es/common/icon/icon.d.ts.map +1 -1
- package/es/common/icon/icon.mjs +5 -0
- package/es/common/index.d.ts +1 -0
- package/es/common/index.d.ts.map +1 -1
- package/es/common/index.mjs +1 -0
- package/es/common/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +63 -62
- package/es/index.mjs +4 -1
- package/es/locale/en/index.d.ts +2 -0
- package/es/locale/en/index.d.ts.map +1 -1
- package/es/locale/en/index.mjs +3 -1
- package/es/locale/zh-CN/index.d.ts +2 -0
- package/es/locale/zh-CN/index.d.ts.map +1 -1
- package/es/locale/zh-CN/index.mjs +3 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.d.ts +126 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.mjs +193 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.css +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts +27 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.mjs +68 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.d.ts +15 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.mjs +15 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.d.ts +54 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.mjs +7 -0
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts +24 -0
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts.map +1 -0
- package/es/panel-component/auth-wxmp-qrcode/index.mjs +19 -0
- 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 +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts +9 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +15 -2
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts +8 -0
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.mjs +14 -2
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +4 -2
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +8 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +14 -2
- package/es/props/editor/common.d.ts +2 -2
- package/es/props/editor/common.d.ts.map +1 -1
- package/es/props/editor/common.mjs +2 -2
- package/es/use/index.mjs +1 -0
- package/es/use/view/index.d.ts +1 -0
- package/es/use/view/index.d.ts.map +1 -1
- package/es/use/view/index.mjs +1 -0
- package/es/use/view/use-view-operation/use-view-operation.d.ts +11 -0
- package/es/use/view/use-view-operation/use-view-operation.d.ts.map +1 -0
- package/es/use/view/use-view-operation/use-view-operation.mjs +27 -0
- package/es/util/index.mjs +1 -1
- package/es/util/render/render.d.ts +10 -0
- package/es/util/render/render.d.ts.map +1 -1
- package/es/util/render/render.mjs +8 -1
- package/es/util/route/route.d.ts.map +1 -1
- package/es/util/route/route.mjs +10 -4
- package/es/view/common/view.d.ts.map +1 -1
- package/es/view/common/view.mjs +2 -0
- package/lib/common/badge/badge.cjs +5 -1
- package/lib/common/code-list/code-list.cjs +1 -1
- package/lib/common/control-base/control-base.cjs +64 -1
- package/lib/common/control-base/control-base.css +1 -1
- package/lib/common/custom-render/custom-render.cjs +87 -0
- package/lib/common/custom-render/custom-render.css +1 -0
- package/lib/common/icon/icon.cjs +5 -0
- package/lib/common/index.cjs +2 -0
- package/lib/common/view-shell/view-shell.cjs +63 -62
- package/lib/index.cjs +30 -23
- package/lib/locale/en/index.cjs +3 -1
- package/lib/locale/zh-CN/index.cjs +3 -1
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.cjs +70 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.cjs +195 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.css +1 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.cjs +17 -0
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.cjs +9 -0
- package/lib/panel-component/auth-wxmp-qrcode/index.cjs +24 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +14 -1
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.controller.cjs +13 -1
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +4 -2
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +13 -1
- package/lib/props/editor/common.cjs +2 -2
- package/lib/use/index.cjs +2 -0
- package/lib/use/view/index.cjs +2 -0
- package/lib/use/view/use-view-operation/use-view-operation.cjs +29 -0
- package/lib/util/index.cjs +1 -0
- package/lib/util/render/render.cjs +8 -0
- package/lib/util/route/route.cjs +10 -4
- package/lib/view/common/view.cjs +2 -0
- package/package.json +5 -5
|
@@ -9,6 +9,10 @@ export declare const IBizBadge: import("vue").DefineComponent<{
|
|
|
9
9
|
type: PropType<"primary" | "success" | "warning" | "danger" | "info">;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
|
+
max: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
12
16
|
counterMode: {
|
|
13
17
|
type: NumberConstructor;
|
|
14
18
|
};
|
|
@@ -23,10 +27,15 @@ export declare const IBizBadge: import("vue").DefineComponent<{
|
|
|
23
27
|
type: PropType<"primary" | "success" | "warning" | "danger" | "info">;
|
|
24
28
|
default: string;
|
|
25
29
|
};
|
|
30
|
+
max: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
26
34
|
counterMode: {
|
|
27
35
|
type: NumberConstructor;
|
|
28
36
|
};
|
|
29
37
|
}>>, {
|
|
30
38
|
type: "primary" | "success" | "warning" | "danger" | "info";
|
|
39
|
+
max: number;
|
|
31
40
|
}, {}>;
|
|
32
41
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/common/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/common/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsCpB,CAAC"}
|
|
@@ -15,6 +15,10 @@ const IBizBadge = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
type: String,
|
|
16
16
|
default: "danger"
|
|
17
17
|
},
|
|
18
|
+
max: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 99
|
|
21
|
+
},
|
|
18
22
|
counterMode: {
|
|
19
23
|
type: Number
|
|
20
24
|
}
|
|
@@ -34,7 +38,7 @@ const IBizBadge = /* @__PURE__ */ defineComponent({
|
|
|
34
38
|
}
|
|
35
39
|
return createVNode("div", {
|
|
36
40
|
"class": [this.ns.b(), this.ns.m(this.type)]
|
|
37
|
-
}, [this.value]);
|
|
41
|
+
}, [this.value > this.max ? "".concat(this.max, "+") : this.value]);
|
|
38
42
|
}
|
|
39
43
|
});
|
|
40
44
|
|
|
@@ -43,7 +43,7 @@ export declare const IBizCodeList: import("vue").DefineComponent<{
|
|
|
43
43
|
}, {
|
|
44
44
|
items: import("vue").Ref<IData[]>;
|
|
45
45
|
ns: import("@ibiz-template/core").Namespace;
|
|
46
|
-
emptyText: string
|
|
46
|
+
emptyText: string;
|
|
47
47
|
textSeparator: string;
|
|
48
48
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
49
|
infoTextChange: (_text: string) => true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-list.d.ts","sourceRoot":"","sources":["../../../src/common/code-list/code-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAmB,QAAQ,EAAwB,MAAM,KAAK,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,kBAAkB,CAAC;AAG1B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6BG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"code-list.d.ts","sourceRoot":"","sources":["../../../src/common/code-list/code-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAmB,QAAQ,EAAwB,MAAM,KAAK,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,kBAAkB,CAAC;AAG1B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6BG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6IhC,CAAC"}
|
|
@@ -123,7 +123,7 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
123
123
|
}, {
|
|
124
124
|
immediate: true
|
|
125
125
|
});
|
|
126
|
-
const emptyText = props.codeList.emptyText === ibiz.i18n.t("vue3Util.common.undefined")
|
|
126
|
+
const emptyText = props.codeList.emptyText === ibiz.i18n.t("vue3Util.common.undefined") || !props.codeList.emptyText ? ibiz.config.common.emptyText : props.codeList.emptyText;
|
|
127
127
|
return {
|
|
128
128
|
items,
|
|
129
129
|
ns,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control{width:100%;height:100%}
|
|
1
|
+
.ibiz-control{width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-base.d.ts","sourceRoot":"","sources":["../../../src/common/control-base/control-base.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"control-base.d.ts","sourceRoot":"","sources":["../../../src/common/control-base/control-base.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,eAAe,EAAE,GA2N5B,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { defineComponent, reactive, resolveComponent,
|
|
1
|
+
import { defineComponent, reactive, createVNode, resolveComponent, computed, h } from 'vue';
|
|
2
|
+
import { ScriptFactory } from '@ibiz-template/runtime';
|
|
3
|
+
import { fixJsonString } from '@ibiz-template/core';
|
|
2
4
|
import { isNil } from 'ramda';
|
|
3
5
|
import '../../use/index.mjs';
|
|
4
6
|
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
@@ -43,6 +45,66 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
}
|
|
48
|
+
const handleHtmlEvent = async (e, eventName) => {
|
|
49
|
+
e.stopPropagation();
|
|
50
|
+
const scriptCode = e.target.getAttribute(eventName);
|
|
51
|
+
const data = e.target.getAttribute("data");
|
|
52
|
+
const context = props.controller.context.clone();
|
|
53
|
+
const _context = e.target.getAttribute("context");
|
|
54
|
+
if (_context) {
|
|
55
|
+
Object.assign(context, fixJsonString(_context));
|
|
56
|
+
}
|
|
57
|
+
const params = {
|
|
58
|
+
...props.controller.params
|
|
59
|
+
};
|
|
60
|
+
const _params = e.target.getAttribute("params");
|
|
61
|
+
if (_params) {
|
|
62
|
+
Object.assign(params, fixJsonString(_params));
|
|
63
|
+
}
|
|
64
|
+
if (scriptCode) {
|
|
65
|
+
await ScriptFactory.asyncExecScriptFn({
|
|
66
|
+
...props.controller.getEventArgs(),
|
|
67
|
+
context,
|
|
68
|
+
params,
|
|
69
|
+
data: data ? fixJsonString(data) : null
|
|
70
|
+
}, scriptCode);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const getControlRender = (data) => {
|
|
74
|
+
var _a, _b;
|
|
75
|
+
const controlRenders = model.controlRenders ? model.controlRenders.filter((item) => item.id !== "emptypanel") : void 0;
|
|
76
|
+
if (!controlRenders || controlRenders.length === 0) {
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
79
|
+
const controlRender = controlRenders[0];
|
|
80
|
+
if (controlRender.renderType === "LAYOUTPANEL_MODEL" && controlRender.layoutPanelModel) {
|
|
81
|
+
const htmlCode = ScriptFactory.execScriptFn({
|
|
82
|
+
...props.controller.getEventArgs(),
|
|
83
|
+
data
|
|
84
|
+
}, controlRender.layoutPanelModel, {
|
|
85
|
+
isAsync: false
|
|
86
|
+
});
|
|
87
|
+
return createVNode("div", {
|
|
88
|
+
"innerHTML": htmlCode,
|
|
89
|
+
"onClick": (e) => handleHtmlEvent(e, "click"),
|
|
90
|
+
"onDblclick": (e) => handleHtmlEvent(e, "dbclick"),
|
|
91
|
+
"class": [ns.e("control-render"), ns.e((_a = controlRender.renderName) == null ? void 0 : _a.toLowerCase())]
|
|
92
|
+
}, null);
|
|
93
|
+
}
|
|
94
|
+
if (controlRender.renderType === "LAYOUTPANEL" && controlRender.layoutPanel) {
|
|
95
|
+
return createVNode(resolveComponent("iBizControlShell"), {
|
|
96
|
+
"class": [ns.e("control-render"), ns.e((_b = controlRender.renderName) == null ? void 0 : _b.toLowerCase())],
|
|
97
|
+
"data": data,
|
|
98
|
+
"params": props.controller.params,
|
|
99
|
+
"context": props.controller.context,
|
|
100
|
+
"modelData": controlRender.layoutPanel
|
|
101
|
+
}, null);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const customRender = computed(() => {
|
|
105
|
+
const data = props.controller.data || props.controller.items;
|
|
106
|
+
return getControlRender(data);
|
|
107
|
+
});
|
|
46
108
|
return {
|
|
47
109
|
ns,
|
|
48
110
|
typeClass,
|
|
@@ -50,6 +112,7 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
50
112
|
inlineStyle,
|
|
51
113
|
codeName,
|
|
52
114
|
controls,
|
|
115
|
+
customRender,
|
|
53
116
|
onLayoutPanelCreated
|
|
54
117
|
};
|
|
55
118
|
},
|
|
@@ -101,7 +164,7 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
101
164
|
return createVNode("div", {
|
|
102
165
|
"class": [this.ns.b(), this.ns.b(this.typeClass), this.ns.m(this.codeName), this.sysCssName],
|
|
103
166
|
"style": this.inlineStyle
|
|
104
|
-
}, [layoutPanel || ((_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b))]);
|
|
167
|
+
}, [layoutPanel || this.customRender || ((_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b))]);
|
|
105
168
|
}
|
|
106
169
|
});
|
|
107
170
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-custom-render{width:100%;height:100%}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { ControlController } from '@ibiz-template/runtime';
|
|
3
|
+
import './custom-render.scss';
|
|
4
|
+
export declare const IBizCustomRender: import("vue").DefineComponent<{
|
|
5
|
+
controller: {
|
|
6
|
+
type: PropType<ControlController<import("@ibiz/model-core").IControl, import("@ibiz-template/runtime").IControlState, import("@ibiz-template/runtime").IControlEvent>>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}, {
|
|
10
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
11
|
+
getControlRender: () => VNode | undefined;
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
controller: {
|
|
14
|
+
type: PropType<ControlController<import("@ibiz/model-core").IControl, import("@ibiz-template/runtime").IControlState, import("@ibiz-template/runtime").IControlEvent>>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>>, {}, {}>;
|
|
18
|
+
//# sourceMappingURL=custom-render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-render.d.ts","sourceRoot":"","sources":["../../../src/common/custom-render/custom-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAiB,MAAM,wBAAwB,CAAC;AAG1E,OAAO,sBAAsB,CAAC;AAE9B,eAAO,MAAM,gBAAgB;;;;;;;4BAiDI,KAAK,GAAG,SAAS;;;;;;YAmDhD,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { ScriptFactory } from '@ibiz-template/runtime';
|
|
3
|
+
import { fixJsonString } from '@ibiz-template/core';
|
|
4
|
+
import '../../use/index.mjs';
|
|
5
|
+
import './custom-render.css';
|
|
6
|
+
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const IBizCustomRender = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "IBizCustomRender",
|
|
11
|
+
props: {
|
|
12
|
+
controller: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(props) {
|
|
18
|
+
const ns = useNamespace("custom-render");
|
|
19
|
+
const handleHtmlEvent = async (e, eventName) => {
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
const scriptCode = e.target.getAttribute(eventName);
|
|
22
|
+
const data = e.target.getAttribute("data");
|
|
23
|
+
const context = props.controller.context.clone();
|
|
24
|
+
const _context = e.target.getAttribute("context");
|
|
25
|
+
if (_context) {
|
|
26
|
+
Object.assign(context, fixJsonString(_context));
|
|
27
|
+
}
|
|
28
|
+
const params = {
|
|
29
|
+
...props.controller.params
|
|
30
|
+
};
|
|
31
|
+
const _params = e.target.getAttribute("params");
|
|
32
|
+
if (_params) {
|
|
33
|
+
Object.assign(params, fixJsonString(_params));
|
|
34
|
+
}
|
|
35
|
+
if (scriptCode) {
|
|
36
|
+
await ScriptFactory.asyncExecScriptFn({
|
|
37
|
+
...props.controller.getEventArgs(),
|
|
38
|
+
context,
|
|
39
|
+
params,
|
|
40
|
+
data: data ? fixJsonString(data) : null
|
|
41
|
+
}, scriptCode);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const getControlRender = () => {
|
|
45
|
+
var _a, _b, _c;
|
|
46
|
+
const controlRenders = (_a = props.controller) == null ? void 0 : _a.model.controlRenders;
|
|
47
|
+
if (!controlRenders || controlRenders.length === 0) {
|
|
48
|
+
return void 0;
|
|
49
|
+
}
|
|
50
|
+
const noDataRender = controlRenders.find((item) => item.id === "emptypanel");
|
|
51
|
+
if (!noDataRender)
|
|
52
|
+
return void 0;
|
|
53
|
+
if (noDataRender.renderType === "LAYOUTPANEL_MODEL" && noDataRender.layoutPanelModel) {
|
|
54
|
+
const htmlCode = ScriptFactory.execScriptFn({
|
|
55
|
+
...props.controller.getEventArgs()
|
|
56
|
+
}, noDataRender.layoutPanelModel, {
|
|
57
|
+
isAsync: false
|
|
58
|
+
});
|
|
59
|
+
return createVNode("div", {
|
|
60
|
+
"innerHTML": htmlCode,
|
|
61
|
+
"onClick": (e) => handleHtmlEvent(e, "click"),
|
|
62
|
+
"onDblclick": (e) => handleHtmlEvent(e, "dbclick"),
|
|
63
|
+
"class": [ns.b(), ns.e((_b = noDataRender.renderName) == null ? void 0 : _b.toLowerCase())]
|
|
64
|
+
}, null);
|
|
65
|
+
}
|
|
66
|
+
if (noDataRender.renderType === "LAYOUTPANEL" && noDataRender.layoutPanel) {
|
|
67
|
+
return createVNode(resolveComponent("iBizControlShell"), {
|
|
68
|
+
"class": [ns.b(), ns.e((_c = noDataRender.renderName) == null ? void 0 : _c.toLowerCase())],
|
|
69
|
+
"params": props.controller.params,
|
|
70
|
+
"context": props.controller.context,
|
|
71
|
+
"modelData": noDataRender.layoutPanel
|
|
72
|
+
}, null);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
ns,
|
|
77
|
+
getControlRender
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
render() {
|
|
81
|
+
return this.getControlRender();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export { IBizCustomRender };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/common/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,KAAK,EAAY,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAQ/C,OAAO,aAAa,CAAC;AAErB,eAAO,MAAM,QAAQ;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/common/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,QAAQ,EAAE,KAAK,EAAY,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAQ/C,OAAO,aAAa,CAAC;AAErB,eAAO,MAAM,QAAQ;;;;;;;;;;;SAoFN,KAAK,GAAG,IAAI;;;;;;;;;;;;;MAEzB,CAAC"}
|
package/es/common/icon/icon.mjs
CHANGED
|
@@ -36,6 +36,11 @@ const IBizIcon = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
"class": [ns.b(), icon.cssClass]
|
|
37
37
|
}, null);
|
|
38
38
|
}
|
|
39
|
+
if (icon.cssClass.indexOf("theme-icon") !== -1) {
|
|
40
|
+
return createVNode("i", {
|
|
41
|
+
"class": [ns.b(), icon.cssClass]
|
|
42
|
+
}, null);
|
|
43
|
+
}
|
|
39
44
|
return createVNode("ion-icon", {
|
|
40
45
|
"class": ns.b(),
|
|
41
46
|
"name": icon.cssClass
|
package/es/common/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export * from './view-shell/view-shell';
|
|
|
6
6
|
export * from './code-list/code-list';
|
|
7
7
|
export * from './control-loading-placeholder/control-loading-placeholder';
|
|
8
8
|
export * from './badge/badge';
|
|
9
|
+
export * from './custom-render/custom-render';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/es/common/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2DAA2D,CAAC;AAC1E,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2DAA2D,CAAC;AAC1E,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC"}
|
package/es/common/index.mjs
CHANGED
|
@@ -6,5 +6,6 @@ export { IBizViewShell } from './view-shell/view-shell.mjs';
|
|
|
6
6
|
export { IBizCodeList } from './code-list/code-list.mjs';
|
|
7
7
|
export { ControlLoadingPlaceholder } from './control-loading-placeholder/control-loading-placeholder.mjs';
|
|
8
8
|
export { IBizBadge } from './badge/badge.mjs';
|
|
9
|
+
export { IBizCustomRender } from './custom-render/custom-render.mjs';
|
|
9
10
|
|
|
10
11
|
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-shell.d.ts","sourceRoot":"","sources":["../../../src/common/view-shell/view-shell.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,aAAa,EAGb,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EACR,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"view-shell.d.ts","sourceRoot":"","sources":["../../../src/common/view-shell/view-shell.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,aAAa,EAGb,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EACR,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;wBA8MW,eAAe,KAAG,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;YAiElE,CAAC"}
|
|
@@ -94,77 +94,78 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
const init = async () => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
hasAuthority.value = await checkViewAuthority(viewModel);
|
|
102
|
-
if (!hasAuthority.value) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (viewModel.dynaSysMode === 1) {
|
|
106
|
-
const appDataEntityId = viewModel.appDataEntityId;
|
|
107
|
-
if (!appDataEntityId) {
|
|
108
|
-
throw new RuntimeError(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic", {
|
|
109
|
-
codeName: viewModel.codeName
|
|
110
|
-
}));
|
|
97
|
+
try {
|
|
98
|
+
await initViewModel();
|
|
99
|
+
if (!viewModel) {
|
|
100
|
+
throw new RuntimeError(ibiz.i18n.t("vue3Util.common.noFoundViewModel"));
|
|
111
101
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
if (params.value.srfdatatype) {
|
|
117
|
-
loadModelParams.srfdatatype = params.value.srfdatatype;
|
|
102
|
+
hasAuthority.value = await checkViewAuthority(viewModel);
|
|
103
|
+
if (!hasAuthority.value) {
|
|
104
|
+
return;
|
|
118
105
|
}
|
|
119
|
-
if (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
106
|
+
if (viewModel.dynaSysMode === 1) {
|
|
107
|
+
const appDataEntityId = viewModel.appDataEntityId;
|
|
108
|
+
if (!appDataEntityId) {
|
|
109
|
+
throw new RuntimeError(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic", {
|
|
110
|
+
codeName: viewModel.codeName
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
const loadModelParams = await calcDynaSysParams(appDataEntityId, context.value, {
|
|
114
|
+
viewParams: params.value,
|
|
115
|
+
appId: viewModel.appId
|
|
116
|
+
});
|
|
117
|
+
if (params.value.srfdatatype) {
|
|
118
|
+
loadModelParams.srfdatatype = params.value.srfdatatype;
|
|
119
|
+
}
|
|
120
|
+
if (params.value.srfwftag) {
|
|
121
|
+
loadModelParams.srfwftag = params.value.srfwftag;
|
|
122
|
+
} else if (appDataEntityId && viewModel.enableWF) {
|
|
123
|
+
if (loadModelParams.srfkey) {
|
|
124
|
+
const noSrfSessionId = isNil(context.value.srfsessionid) || isEmpty(context.value.srfsessionid);
|
|
125
|
+
const id = createUUID();
|
|
126
|
+
if (noSrfSessionId) {
|
|
127
|
+
const domain = ibiz.uiDomainManager.create(id);
|
|
128
|
+
context.value.srfsessionid = domain.id;
|
|
140
129
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
130
|
+
const app = ibiz.hub.getApp(viewModel.appId);
|
|
131
|
+
const service = await app.deService.getService(context.value, appDataEntityId);
|
|
132
|
+
const res = await service.get(context.value, params.value || {});
|
|
133
|
+
if (res.ok && res.data) {
|
|
134
|
+
const {
|
|
135
|
+
srfwftag,
|
|
136
|
+
processdefinitionkey,
|
|
137
|
+
taskdefinitionkey
|
|
138
|
+
} = res.data;
|
|
139
|
+
if (srfwftag) {
|
|
140
|
+
loadModelParams.srfwftag = srfwftag;
|
|
144
141
|
}
|
|
145
|
-
if (
|
|
146
|
-
params.value.
|
|
142
|
+
if (["DEWFDYNAEDITVIEW3", "DEWFDYNAEDITVIEW"].includes(viewModel.viewType)) {
|
|
143
|
+
if (isNil(params.value.processDefinitionKey)) {
|
|
144
|
+
params.value.processDefinitionKey = processdefinitionkey;
|
|
145
|
+
}
|
|
146
|
+
if (isNil(params.value.taskDefinitionKey)) {
|
|
147
|
+
params.value.taskDefinitionKey = taskdefinitionkey;
|
|
148
|
+
}
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
if (noSrfSessionId) {
|
|
152
|
+
ibiz.uiDomainManager.destroy(id);
|
|
153
|
+
context.value.srfsessionid = "";
|
|
154
|
+
}
|
|
152
155
|
}
|
|
153
156
|
}
|
|
157
|
+
const curDynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
158
|
+
if (curDynaViewCacheKey === dynaViewCacheKey) {
|
|
159
|
+
setTimeout(() => {
|
|
160
|
+
isComplete.value = true;
|
|
161
|
+
});
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
viewModelData.value = await ibiz.hub.loadAppView(viewModel.appId, viewModel.id, loadModelParams);
|
|
165
|
+
dynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
166
|
+
} else {
|
|
167
|
+
viewModelData.value = viewModel;
|
|
154
168
|
}
|
|
155
|
-
const curDynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
156
|
-
if (curDynaViewCacheKey === dynaViewCacheKey) {
|
|
157
|
-
setTimeout(() => {
|
|
158
|
-
isComplete.value = true;
|
|
159
|
-
});
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
viewModelData.value = await ibiz.hub.loadAppView(viewModel.appId, viewModel.id, loadModelParams);
|
|
163
|
-
dynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
164
|
-
} else {
|
|
165
|
-
viewModelData.value = viewModel;
|
|
166
|
-
}
|
|
167
|
-
try {
|
|
168
169
|
provider.value = await getViewProvider(viewModel);
|
|
169
170
|
} catch (error) {
|
|
170
171
|
ibiz.log.error(error);
|
package/es/index.mjs
CHANGED
|
@@ -18,6 +18,7 @@ export { IBizViewShell } from './common/view-shell/view-shell.mjs';
|
|
|
18
18
|
export { IBizCodeList } from './common/code-list/code-list.mjs';
|
|
19
19
|
export { ControlLoadingPlaceholder } from './common/control-loading-placeholder/control-loading-placeholder.mjs';
|
|
20
20
|
export { IBizBadge } from './common/badge/badge.mjs';
|
|
21
|
+
export { IBizCustomRender } from './common/custom-render/custom-render.mjs';
|
|
21
22
|
export { PanelContainerState } from './panel-component/panel-container/panel-container.state.mjs';
|
|
22
23
|
export { PanelContainerController } from './panel-component/panel-container/panel-container.controller.mjs';
|
|
23
24
|
export { IBizPanelContainer } from './panel-component/panel-container/index.mjs';
|
|
@@ -59,6 +60,7 @@ export { TeleportPlaceholderProvider } from './panel-component/teleport-placehol
|
|
|
59
60
|
export { IBizTeleportPlaceholder } from './panel-component/teleport-placeholder/index.mjs';
|
|
60
61
|
export { IBizPanelContainerTabs } from './panel-component/panel-container-tabs/index.mjs';
|
|
61
62
|
export { IBizPanelCtrlViewPageCaption } from './panel-component/panel-ctrl-view-page-caption/index.mjs';
|
|
63
|
+
export { IBizAuthWxmpQrcode } from './panel-component/auth-wxmp-qrcode/index.mjs';
|
|
62
64
|
export { AppRedirectView } from './view/app-redirect-view/app-redirect-view.mjs';
|
|
63
65
|
export { IBizView } from './view/common/index.mjs';
|
|
64
66
|
export { TodoRedirect } from './view/todo-redirect/todo-redirect.mjs';
|
|
@@ -76,6 +78,7 @@ export { useNamespace } from './use/namespace/namespace.mjs';
|
|
|
76
78
|
export { useRouteKey, useRouterQuery } from './use/route/route.mjs';
|
|
77
79
|
export { useCtx, useMobCtx } from './use/util/index.mjs';
|
|
78
80
|
export { useViewController } from './use/view/use-view-controller/use-view-controller.mjs';
|
|
81
|
+
export { useViewOperation } from './use/view/use-view-operation/use-view-operation.mjs';
|
|
79
82
|
export { EmptyVNode, getOrigin, isEmptyVNode, useController, useForce, useForceTogether, useProps, usePropsWatch } from './use/vue/vue.mjs';
|
|
80
83
|
export { useCodeListListen } from './use/codeList-listen/codelist-listen.mjs';
|
|
81
84
|
export { useLocalCacheKey } from './use/storage/index.mjs';
|
|
@@ -87,7 +90,7 @@ export { calcResRoutePath, excludeViewTypes, generateRoutePath, generateRoutePat
|
|
|
87
90
|
export { RouteListener } from './util/route/route-listener.mjs';
|
|
88
91
|
export { withInstall } from './util/install.mjs';
|
|
89
92
|
export { prepareControl } from './util/control/prepare-control.mjs';
|
|
90
|
-
export { renderString } from './util/render/render.mjs';
|
|
93
|
+
export { hasEmptyPanelRenderer, renderString } from './util/render/render.mjs';
|
|
91
94
|
export { createOverlayView, getDrawerPlacement, openViewDrawer, openViewFloatWindow, openViewModal, openViewPopover } from './util/overlay-view-util/overlay-view-util.mjs';
|
|
92
95
|
export { useAppStore } from './util/store/app-store/app-store.mjs';
|
|
93
96
|
export { useUIStore } from './util/store/ui-store/ui-store.mjs';
|
package/es/locale/en/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEd,CAAC"}
|
package/es/locale/en/index.mjs
CHANGED
|
@@ -25,7 +25,9 @@ const en = {
|
|
|
25
25
|
noProvidedSlot: "No {id} slot provided",
|
|
26
26
|
cannotEmpty: "{caption} cannot be empty",
|
|
27
27
|
unadaptedLayout: "Unadapted layout placeholder {layoutPos}",
|
|
28
|
-
placeholderIdentifier: "The placeholder identifier for panel member {id} of view {viewCodeName} is:"
|
|
28
|
+
placeholderIdentifier: "The placeholder identifier for panel member {id} of view {viewCodeName} is:",
|
|
29
|
+
refresh: "Refresh",
|
|
30
|
+
wxQrcodeCaption: "Please use wechat to scan the QR code to log in"
|
|
29
31
|
},
|
|
30
32
|
plugin: {
|
|
31
33
|
failureConfigurationLoad: "Configuration load failure",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEhB,CAAC"}
|
|
@@ -25,7 +25,9 @@ const zhCn = {
|
|
|
25
25
|
noProvidedSlot: "\u672A\u63D0\u4F9B{id}\u63D2\u69FD",
|
|
26
26
|
cannotEmpty: "{caption} \u4E0D\u80FD\u4E3A\u7A7A",
|
|
27
27
|
unadaptedLayout: "\u672A\u9002\u914D\u7684\u5E03\u5C40\u5360\u4F4D{layoutPos}",
|
|
28
|
-
placeholderIdentifier: "\u89C6\u56FE{viewCodeName}\u7684\u9762\u677F\u6210\u5458{id}\u7684\u5360\u4F4D\u6807\u8BC6\u662F\uFF1A"
|
|
28
|
+
placeholderIdentifier: "\u89C6\u56FE{viewCodeName}\u7684\u9762\u677F\u6210\u5458{id}\u7684\u5360\u4F4D\u6807\u8BC6\u662F\uFF1A",
|
|
29
|
+
refresh: "\u5237\u65B0",
|
|
30
|
+
wxQrcodeCaption: "\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801\u767B\u5F55"
|
|
29
31
|
},
|
|
30
32
|
plugin: {
|
|
31
33
|
failureConfigurationLoad: "\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25",
|