@ibiz-template/vue3-util 0.7.41-alpha.0 → 0.7.41-alpha.10
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/control-base/control-base.css +1 -1
- package/es/common/control-base/control-base.d.ts +1 -0
- package/es/common/control-base/control-base.d.ts.map +1 -1
- package/es/common/control-base/control-base.mjs +38 -4
- package/es/common/custom-render/custom-render.d.ts.map +1 -1
- package/es/common/custom-render/custom-render.mjs +2 -2
- package/es/common/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +1 -0
- package/es/control/panel/panel/panel.d.ts.map +1 -1
- package/es/control/panel/panel/panel.mjs +12 -1
- 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 -1
- package/es/panel-component/panel-container/panel-container.d.ts.map +1 -1
- package/es/panel-component/panel-container/panel-container.mjs +26 -2
- package/es/panel-component/panel-field/panel-field.controller.mjs +1 -1
- package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts +1 -0
- package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts.map +1 -1
- package/es/panel-component/teleport-placeholder/teleport-placeholder.state.d.ts +1 -1
- package/es/panel-component/teleport-placeholder/teleport-placeholder.state.mjs +1 -1
- package/es/plugin/plugin-factory/plugin-factory.d.ts +17 -19
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +35 -26
- package/es/util/render/render.d.ts.map +1 -1
- package/es/util/render/render.mjs +4 -1
- package/es/util/route/route.mjs +1 -1
- package/lib/common/control-base/control-base.cjs +37 -3
- package/lib/common/control-base/control-base.css +1 -1
- package/lib/common/custom-render/custom-render.cjs +1 -1
- package/lib/common/view-shell/view-shell.cjs +1 -0
- package/lib/control/panel/panel/panel.cjs +12 -1
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +12 -1
- package/lib/panel-component/panel-container/panel-container.cjs +25 -1
- package/lib/panel-component/panel-field/panel-field.controller.cjs +1 -1
- package/lib/panel-component/teleport-placeholder/teleport-placeholder.state.cjs +1 -1
- package/lib/plugin/plugin-factory/plugin-factory.cjs +35 -26
- package/lib/util/render/render.cjs +4 -1
- package/lib/util/route/route.cjs +1 -1
- package/package.json +6 -6
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { defineComponent, reactive, createVNode, resolveComponent, computed, h } from 'vue';
|
|
2
|
-
import { ScriptFactory } from '@ibiz-template/runtime';
|
|
2
|
+
import { ScriptFactory, PredefinedControlRender } from '@ibiz-template/runtime';
|
|
3
3
|
import { fixJsonString } from '@ibiz-template/core';
|
|
4
4
|
import { isNil } from 'ramda';
|
|
5
5
|
import '../../use/index.mjs';
|
|
6
|
+
import './control-base.css';
|
|
6
7
|
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
7
8
|
|
|
8
9
|
"use strict";
|
|
@@ -72,7 +73,7 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
72
73
|
};
|
|
73
74
|
const getControlRender = (data) => {
|
|
74
75
|
var _a, _b;
|
|
75
|
-
const controlRenders = model.controlRenders ? model.controlRenders.filter((item) => item.id
|
|
76
|
+
const controlRenders = model.controlRenders ? model.controlRenders.filter((item) => !Object.values(PredefinedControlRender).includes(item.id)) : void 0;
|
|
76
77
|
if (!controlRenders || controlRenders.length === 0) {
|
|
77
78
|
return void 0;
|
|
78
79
|
}
|
|
@@ -105,6 +106,36 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
105
106
|
const data = props.controller.data || props.controller.items;
|
|
106
107
|
return getControlRender(data);
|
|
107
108
|
});
|
|
109
|
+
const disableMaskInfoRender = () => {
|
|
110
|
+
const disableRender = model.controlRenders ? model.controlRenders.find((item) => item.id === PredefinedControlRender.DISABLEPANEL) : void 0;
|
|
111
|
+
if (!disableRender) {
|
|
112
|
+
return createVNode("div", {
|
|
113
|
+
"innerHTML": props.controller.state.maskOption.maskInfo || "",
|
|
114
|
+
"class": [ns.e("disable-mask-text")]
|
|
115
|
+
}, null);
|
|
116
|
+
}
|
|
117
|
+
if (disableRender.renderType === "LAYOUTPANEL_MODEL" && disableRender.layoutPanelModel) {
|
|
118
|
+
const htmlCode = ScriptFactory.execScriptFn({
|
|
119
|
+
...props.controller.getEventArgs()
|
|
120
|
+
}, disableRender.layoutPanelModel, {
|
|
121
|
+
isAsync: false,
|
|
122
|
+
singleRowReturn: true
|
|
123
|
+
});
|
|
124
|
+
return createVNode("div", {
|
|
125
|
+
"innerHTML": htmlCode,
|
|
126
|
+
"class": [ns.e("disable-mask-text")]
|
|
127
|
+
}, null);
|
|
128
|
+
}
|
|
129
|
+
if (disableRender.renderType === "LAYOUTPANEL" && disableRender.layoutPanel) {
|
|
130
|
+
return createVNode(resolveComponent("iBizControlShell"), {
|
|
131
|
+
"class": [ns.e("disable-mask-text")],
|
|
132
|
+
"data": {},
|
|
133
|
+
"params": props.controller.params,
|
|
134
|
+
"context": props.controller.context,
|
|
135
|
+
"modelData": disableRender.layoutPanel
|
|
136
|
+
}, null);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
108
139
|
return {
|
|
109
140
|
ns,
|
|
110
141
|
typeClass,
|
|
@@ -113,6 +144,7 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
113
144
|
codeName,
|
|
114
145
|
controls,
|
|
115
146
|
customRender,
|
|
147
|
+
disableMaskInfoRender,
|
|
116
148
|
onLayoutPanelCreated
|
|
117
149
|
};
|
|
118
150
|
},
|
|
@@ -162,9 +194,11 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
162
194
|
}, slots);
|
|
163
195
|
}
|
|
164
196
|
return createVNode("div", {
|
|
165
|
-
"class": [this.ns.b(), this.ns.b(this.typeClass), this.ns.m(this.codeName), this.sysCssName],
|
|
197
|
+
"class": [this.ns.b(), this.ns.b(this.typeClass), this.ns.m(this.codeName), this.sysCssName, this.ns.is("disabled", state.disabled)],
|
|
166
198
|
"style": this.inlineStyle
|
|
167
|
-
}, [layoutPanel || this.customRender || ((_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b))
|
|
199
|
+
}, [layoutPanel || this.customRender || ((_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b)), state.disabled && createVNode("div", {
|
|
200
|
+
"class": [this.ns.e("mask-container"), this.ns.m(state.maskOption.mode.toLowerCase())]
|
|
201
|
+
}, [state.maskOption.mode === "MASK" && this.disableMaskInfoRender()])]);
|
|
168
202
|
}
|
|
169
203
|
});
|
|
170
204
|
|
|
@@ -1 +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,
|
|
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,EACL,iBAAiB,EAGlB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,sBAAsB,CAAC;AAE9B,eAAO,MAAM,gBAAgB;;;;;;;4BAiDI,KAAK,GAAG,SAAS;;;;;;YAmDhD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode, resolveComponent } from 'vue';
|
|
2
|
-
import { ScriptFactory } from '@ibiz-template/runtime';
|
|
2
|
+
import { ScriptFactory, PredefinedControlRender } from '@ibiz-template/runtime';
|
|
3
3
|
import { fixJsonString } from '@ibiz-template/core';
|
|
4
4
|
import '../../use/index.mjs';
|
|
5
5
|
import './custom-render.css';
|
|
@@ -47,7 +47,7 @@ const IBizCustomRender = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
if (!controlRenders || controlRenders.length === 0) {
|
|
48
48
|
return void 0;
|
|
49
49
|
}
|
|
50
|
-
const noDataRender = controlRenders.find((item) => item.id ===
|
|
50
|
+
const noDataRender = controlRenders.find((item) => item.id === PredefinedControlRender.EMPTYPANEL);
|
|
51
51
|
if (!noDataRender)
|
|
52
52
|
return void 0;
|
|
53
53
|
if (noDataRender.renderType === "LAYOUTPANEL_MODEL" && noDataRender.layoutPanelModel) {
|
|
@@ -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,EAEf,GAAG,EACJ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EAER,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;wBAqNW,eAAe,KAAG,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;
|
|
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,EAEf,GAAG,EACJ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,QAAQ,EAER,GAAG,EAIJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,mBAAmB,CAAC;AAE3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;wBAqNW,eAAe,KAAG,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;YAkElE,CAAC"}
|
|
@@ -196,6 +196,7 @@ const IBizViewShell = /* @__PURE__ */ defineComponent({
|
|
|
196
196
|
Object.assign(params.value, redrawData.params);
|
|
197
197
|
const modal = attrs.modal;
|
|
198
198
|
if (modal) {
|
|
199
|
+
modal.hooks.preDismiss.clear();
|
|
199
200
|
modal.hooks.shouldDismiss.clear();
|
|
200
201
|
modal.hooks.beforeDismiss.clear();
|
|
201
202
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/panel/panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAST,MAAM,KAAK,CAAC;AACb,OAAO,EACL,MAAM,EAKP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,WAAW,EAGX,eAAe,EAGhB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/panel/panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAST,MAAM,KAAK,CAAC;AACb,OAAO,EACL,MAAM,EAKP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,WAAW,EAGX,eAAe,EAGhB,MAAM,wBAAwB,CAAC;AAsHhC;;GAEG;AACH,eAAO,MAAM,YAAY;IAGrB;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;;OAGG;;;;;;;;;IA/BH;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;;OAGG;;;;;;;;MA8EL,CAAC"}
|
|
@@ -64,12 +64,23 @@ function renderPanelItem(panelItem, c, ins) {
|
|
|
64
64
|
tempStyle = panelItem.cssStyle;
|
|
65
65
|
}
|
|
66
66
|
const panelItemC = panelItems[panelItem.id];
|
|
67
|
+
const attrs = renderAttrs(panelItem, panelItemC);
|
|
68
|
+
if (attrs.dynamicstyle) {
|
|
69
|
+
if (typeof attrs.dynamicstyle === "object") {
|
|
70
|
+
tempStyle += Object.entries(attrs.dynamicstyle).map(([key, value]) => {
|
|
71
|
+
return "".concat(key, ":").concat(value, ";");
|
|
72
|
+
}).join("");
|
|
73
|
+
} else {
|
|
74
|
+
tempStyle += attrs.dynamicstyle;
|
|
75
|
+
}
|
|
76
|
+
delete attrs.dynamicstyle;
|
|
77
|
+
}
|
|
67
78
|
return h(component, {
|
|
68
79
|
modelData: panelItem,
|
|
69
80
|
controller: panelItemC,
|
|
70
81
|
key: panelItem.id,
|
|
71
82
|
style: tempStyle,
|
|
72
|
-
attrs
|
|
83
|
+
attrs
|
|
73
84
|
}, children);
|
|
74
85
|
}
|
|
75
86
|
const PanelControl = /* @__PURE__ */ defineComponent({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAKN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAIlB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AA0BhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;IAG/B;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;;iCAuCU,UAAU;;;;;;;sBASpB,KAAK,GAAG,IAAI;;IA3Ef;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;
|
|
1
|
+
{"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAKN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAIlB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AA0BhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;IAG/B;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;;iCAuCU,UAAU;;;;;;;sBASpB,KAAK,GAAG,IAAI;;IA3Ef;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;MAgLL,CAAC"}
|
|
@@ -144,12 +144,23 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
144
144
|
tempStyle = panelItem.cssStyle;
|
|
145
145
|
}
|
|
146
146
|
const panelItemC = panelItems[panelItem.id];
|
|
147
|
+
const attrs = renderAttrs(panelItem, panelItemC);
|
|
148
|
+
if (attrs.dynamicstyle) {
|
|
149
|
+
if (typeof attrs.dynamicstyle === "object") {
|
|
150
|
+
tempStyle += Object.entries(attrs.dynamicstyle).map(([key, value]) => {
|
|
151
|
+
return "".concat(key, ":").concat(value, ";");
|
|
152
|
+
}).join("");
|
|
153
|
+
} else {
|
|
154
|
+
tempStyle += attrs.dynamicstyle;
|
|
155
|
+
}
|
|
156
|
+
delete attrs.dynamicstyle;
|
|
157
|
+
}
|
|
147
158
|
return h(component, {
|
|
148
159
|
modelData: panelItem,
|
|
149
160
|
controller: panelItemC,
|
|
150
161
|
key: panelItem.id,
|
|
151
162
|
style: tempStyle,
|
|
152
|
-
attrs
|
|
163
|
+
attrs
|
|
153
164
|
}, children);
|
|
154
165
|
};
|
|
155
166
|
provide("renderPanelItem", renderPanelItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container/panel-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAGvB;;OAEG;;;;;IAEH;;OAEG;;;;;;;;;IANH;;OAEG;;;;;IAEH;;OAEG;;;;;
|
|
1
|
+
{"version":3,"file":"panel-container.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-container/panel-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAS,MAAM,KAAK,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,cAAc;IAGvB;;OAEG;;;;;IAEH;;OAEG;;;;;;;;;IANH;;OAEG;;;;;IAEH;;OAEG;;;;;YAoGL,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, defineComponent, computed, createVNode, resolveComponent } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, computed, createVNode, resolveComponent, mergeProps } from 'vue';
|
|
2
2
|
import '../../use/index.mjs';
|
|
3
3
|
import { PanelContainerController } from './panel-container.controller.mjs';
|
|
4
4
|
import './panel-container.css';
|
|
@@ -42,7 +42,7 @@ const PanelContainer = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
};
|
|
43
43
|
},
|
|
44
44
|
render() {
|
|
45
|
-
var _a, _b;
|
|
45
|
+
var _a, _b, _c;
|
|
46
46
|
let _slot;
|
|
47
47
|
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
48
48
|
const content = createVNode(resolveComponent("iBizRow"), {
|
|
@@ -62,6 +62,30 @@ const PanelContainer = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
})) ? _slot : {
|
|
63
63
|
default: () => [_slot]
|
|
64
64
|
});
|
|
65
|
+
const attrs = (_c = this.$attrs) == null ? void 0 : _c.attrs;
|
|
66
|
+
if (attrs && attrs.dynamictooltip) {
|
|
67
|
+
return createVNode(resolveComponent("el-tooltip"), {
|
|
68
|
+
"placement": "right",
|
|
69
|
+
"popper-class": this.ns.e("dynamic-tooltip")
|
|
70
|
+
}, {
|
|
71
|
+
default: () => {
|
|
72
|
+
return createVNode("div", mergeProps({
|
|
73
|
+
"class": this.classArr,
|
|
74
|
+
"onClick": () => {
|
|
75
|
+
this.controller.onClick();
|
|
76
|
+
}
|
|
77
|
+
}, this.$attrs), [this.controller.model.cssStyle ? createVNode("style", {
|
|
78
|
+
"type": "text/css"
|
|
79
|
+
}, [this.controller.model.cssStyle]) : null, content]);
|
|
80
|
+
},
|
|
81
|
+
content: () => {
|
|
82
|
+
return createVNode("div", {
|
|
83
|
+
"class": this.ns.e("dynamic-tooltip-content"),
|
|
84
|
+
"innerHTML": attrs.dynamictooltip
|
|
85
|
+
}, null);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
65
89
|
return createVNode("div", {
|
|
66
90
|
"class": this.classArr,
|
|
67
91
|
"onClick": () => {
|
|
@@ -84,7 +84,7 @@ class PanelFieldController extends PanelItemController {
|
|
|
84
84
|
*/
|
|
85
85
|
async validate() {
|
|
86
86
|
var _a;
|
|
87
|
-
if (this.state.visible &&
|
|
87
|
+
if (this.state.visible && this.state.required && !this.value) {
|
|
88
88
|
this.state.error = ((_a = this.editor) == null ? void 0 : _a.model.placeHolder) || ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty", {
|
|
89
89
|
caption: this.model.caption
|
|
90
90
|
});
|
|
@@ -6,6 +6,7 @@ import { TeleportPlaceholderController } from './teleport-placeholder.controller
|
|
|
6
6
|
* 传送占位
|
|
7
7
|
* @primary
|
|
8
8
|
* @description 使用vue的Teleport内置组件,用于绘制嵌入视图中的面板成员。
|
|
9
|
+
* @panelitemparams {name:TeleportTag,parameterType:string,description:传送占位面板项与需传送部件的关联标识,其值必须与部件参数(teleporttag)的值一致}
|
|
9
10
|
*/
|
|
10
11
|
export declare const TeleportPlaceholder: import("vue").DefineComponent<{
|
|
11
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teleport-placeholder.d.ts","sourceRoot":"","sources":["../../../src/panel-component/teleport-placeholder/teleport-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA6B,QAAQ,EAAO,MAAM,KAAK,CAAC;AAE/D,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF
|
|
1
|
+
{"version":3,"file":"teleport-placeholder.d.ts","sourceRoot":"","sources":["../../../src/panel-component/teleport-placeholder/teleport-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA6B,QAAQ,EAAO,MAAM,KAAK,CAAC;AAE/D,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;IAG5B;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;IATH;;OAEG;;;;;IAKH;;OAEG;;;;;YAuCL,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { PanelItemState } from '@ibiz-template/runtime';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class TeleportPlaceholderState extends PanelItemState {
|
|
9
9
|
/**
|
|
10
|
-
* @description
|
|
10
|
+
* @description 嵌入视图中的部件可依据该参数找到传送占位面板项进行位置替换,参数默认格式为 “当前视图标识-需传送部件标识”;也可通过面板项参数(TeleportTag)来指定
|
|
11
11
|
* @exposedoc
|
|
12
12
|
* @type {string}
|
|
13
13
|
* @memberof TeleportPlaceholderState
|
|
@@ -5,7 +5,7 @@ class TeleportPlaceholderState extends PanelItemState {
|
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
7
7
|
/**
|
|
8
|
-
* @description
|
|
8
|
+
* @description 嵌入视图中的部件可依据该参数找到传送占位面板项进行位置替换,参数默认格式为 “当前视图标识-需传送部件标识”;也可通过面板项参数(TeleportTag)来指定
|
|
9
9
|
* @exposedoc
|
|
10
10
|
* @type {string}
|
|
11
11
|
* @memberof TeleportPlaceholderState
|
|
@@ -125,23 +125,22 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
125
125
|
*/
|
|
126
126
|
protected setPluginCode(code: Plugin): void;
|
|
127
127
|
/**
|
|
128
|
-
* 加载插件
|
|
129
|
-
*
|
|
130
|
-
* @author chitanda
|
|
131
|
-
* @date 2022-10-31 14:10:13
|
|
128
|
+
* @description 加载插件
|
|
132
129
|
* @param {ISysPFPlugin} plugin
|
|
133
|
-
* @
|
|
130
|
+
* @param {string} [appId=ibiz.env.appId]
|
|
131
|
+
* @returns {*} {Promise<boolean>}
|
|
132
|
+
* @memberof PluginFactory
|
|
134
133
|
*/
|
|
135
|
-
loadPlugin(plugin: ISysPFPlugin): Promise<boolean>;
|
|
134
|
+
loadPlugin(plugin: ISysPFPlugin, appId?: string): Promise<boolean>;
|
|
136
135
|
/**
|
|
137
|
-
* 加载应用插件
|
|
138
|
-
*
|
|
139
|
-
* @
|
|
140
|
-
* @
|
|
141
|
-
* @
|
|
142
|
-
* @
|
|
136
|
+
* @description 加载应用插件
|
|
137
|
+
* @param {string} rtObjectName
|
|
138
|
+
* @param {string} rtObjectRepo
|
|
139
|
+
* @param {string} [appId=ibiz.env.appId]
|
|
140
|
+
* @returns {*} {Promise<boolean>}
|
|
141
|
+
* @memberof PluginFactory
|
|
143
142
|
*/
|
|
144
|
-
loadPluginRef(rtObjectName: string, rtObjectRepo: string): Promise<boolean>;
|
|
143
|
+
loadPluginRef(rtObjectName: string, rtObjectRepo: string, appId?: string): Promise<boolean>;
|
|
145
144
|
/**
|
|
146
145
|
* 加载插件
|
|
147
146
|
*
|
|
@@ -174,14 +173,13 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
174
173
|
*/
|
|
175
174
|
protected loadPluginExternal(config: RemotePluginConfig): Promise<void>;
|
|
176
175
|
/**
|
|
177
|
-
* 处理 systemjs importmap 配置
|
|
178
|
-
*
|
|
179
|
-
* @author chitanda
|
|
180
|
-
* @date 2024-01-11 20:01:07
|
|
176
|
+
* @description 处理 systemjs importmap 配置
|
|
181
177
|
* @protected
|
|
182
178
|
* @param {ISystemImportMap} importMap
|
|
183
|
-
* @
|
|
179
|
+
* @param {string} appId
|
|
180
|
+
* @returns {*} {(ISystemImportMap | null)}
|
|
181
|
+
* @memberof PluginFactory
|
|
184
182
|
*/
|
|
185
|
-
protected handleSystemImportMap(importMap: ISystemImportMap): ISystemImportMap | null;
|
|
183
|
+
protected handleSystemImportMap(importMap: ISystemImportMap, appId: string): ISystemImportMap | null;
|
|
186
184
|
}
|
|
187
185
|
//# sourceMappingURL=plugin-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-factory/plugin-factory.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlC;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,SAA0B;IAE1C;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAElD;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAa;IAEjE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,CAAM;IAErC;;;;;;;OAOG;IACH,SAAS,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAElE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAM;IAEhD;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAa;IAE/D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAS/C;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzC;;;;;;OAMG;IACH,wBAAwB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAInD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAMxB;;;;;;;OAOG;IACG,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvD;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM3C
|
|
1
|
+
{"version":3,"file":"plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/plugin/plugin-factory/plugin-factory.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlC;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,SAA0B;IAE1C;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAElD;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAa;IAEjE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,CAAM;IAErC;;;;;;;OAOG;IACH,SAAS,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAElE;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAM;IAEhD;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAa;IAE/D;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAS/C;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzC;;;;;;OAMG;IACH,wBAAwB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAInD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAMxB;;;;;;;OAOG;IACG,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvD;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM3C;;;;;;OAMG;IACG,UAAU,CACd,MAAM,EAAE,YAAY,EACpB,KAAK,GAAE,MAAuB,GAC7B,OAAO,CAAC,OAAO,CAAC;IA2CnB;;;;;;;OAOG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,KAAK,GAAE,MAAuB,GAC7B,OAAO,CAAC,OAAO,CAAC;IA4CnB;;;;;;;;OAQG;cACa,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA6CzE;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAA+B,GACvC,MAAM;IAwBT;;;;;;;;OAQG;cACa,kBAAkB,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,IAAI,CAAC;IAiChB;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,CAC7B,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,MAAM,GACZ,gBAAgB,GAAG,IAAI;CAkD3B"}
|
|
@@ -148,14 +148,13 @@ class PluginFactory {
|
|
|
148
148
|
AppHooks.useComponent.callSync(null, code);
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
151
|
-
* 加载插件
|
|
152
|
-
*
|
|
153
|
-
* @author chitanda
|
|
154
|
-
* @date 2022-10-31 14:10:13
|
|
151
|
+
* @description 加载插件
|
|
155
152
|
* @param {ISysPFPlugin} plugin
|
|
156
|
-
* @
|
|
153
|
+
* @param {string} [appId=ibiz.env.appId]
|
|
154
|
+
* @returns {*} {Promise<boolean>}
|
|
155
|
+
* @memberof PluginFactory
|
|
157
156
|
*/
|
|
158
|
-
async loadPlugin(plugin) {
|
|
157
|
+
async loadPlugin(plugin, appId = ibiz.env.appId) {
|
|
159
158
|
if (plugin.runtimeObject === true) {
|
|
160
159
|
const pluginRef = plugin;
|
|
161
160
|
if (pluginRef) {
|
|
@@ -179,7 +178,8 @@ class PluginFactory {
|
|
|
179
178
|
try {
|
|
180
179
|
const p = this.loadPluginRef(
|
|
181
180
|
pluginRef.rtobjectName,
|
|
182
|
-
pluginRef.rtobjectRepo
|
|
181
|
+
pluginRef.rtobjectRepo,
|
|
182
|
+
appId
|
|
183
183
|
);
|
|
184
184
|
this.loadQueue.set(rtObjectRepo, p);
|
|
185
185
|
const result = await p;
|
|
@@ -197,14 +197,14 @@ class PluginFactory {
|
|
|
197
197
|
return false;
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
* 加载应用插件
|
|
201
|
-
*
|
|
202
|
-
* @
|
|
203
|
-
* @
|
|
204
|
-
* @
|
|
205
|
-
* @
|
|
200
|
+
* @description 加载应用插件
|
|
201
|
+
* @param {string} rtObjectName
|
|
202
|
+
* @param {string} rtObjectRepo
|
|
203
|
+
* @param {string} [appId=ibiz.env.appId]
|
|
204
|
+
* @returns {*} {Promise<boolean>}
|
|
205
|
+
* @memberof PluginFactory
|
|
206
206
|
*/
|
|
207
|
-
async loadPluginRef(rtObjectName, rtObjectRepo) {
|
|
207
|
+
async loadPluginRef(rtObjectName, rtObjectRepo, appId = ibiz.env.appId) {
|
|
208
208
|
if (this.isIgnore(rtObjectRepo)) {
|
|
209
209
|
return true;
|
|
210
210
|
}
|
|
@@ -214,7 +214,7 @@ class PluginFactory {
|
|
|
214
214
|
let configData = null;
|
|
215
215
|
{
|
|
216
216
|
const pluginPath = rtObjectRepo;
|
|
217
|
-
const configUrl = this.urlReg.test(pluginPath) ? "".concat(pluginPath, "/package.json") : "".concat(ibiz.env.pluginBaseUrl, "/").concat(pathBrowserify.join(pluginPath, "package.json"));
|
|
217
|
+
const configUrl = this.urlReg.test(pluginPath) ? "".concat(pluginPath, "/package.json") : "".concat(ibiz.env.runContainer === "FULLCODE" && appId !== ibiz.env.appId ? ibiz.hub.microAppConfigCenter.getPluginBaseUrl(appId) : ibiz.env.pluginBaseUrl, "/").concat(pathBrowserify.join(pluginPath, "package.json"));
|
|
218
218
|
const res = await ibiz.net.axios({
|
|
219
219
|
method: "get",
|
|
220
220
|
headers: { "Access-Control-Allow-Origin": "*" },
|
|
@@ -227,6 +227,7 @@ class PluginFactory {
|
|
|
227
227
|
}
|
|
228
228
|
configData = res.data;
|
|
229
229
|
}
|
|
230
|
+
Object.assign(configData, { appId });
|
|
230
231
|
const remotePlugin = new RemotePluginItem(
|
|
231
232
|
rtObjectName,
|
|
232
233
|
rtObjectRepo,
|
|
@@ -255,17 +256,18 @@ class PluginFactory {
|
|
|
255
256
|
*/
|
|
256
257
|
async loadScript(remotePlugin) {
|
|
257
258
|
const pluginPath = remotePlugin.repo;
|
|
258
|
-
const { name, system, styles = [] } = remotePlugin.config;
|
|
259
|
+
const { name, appId, system, styles = [] } = remotePlugin.config;
|
|
259
260
|
let scriptUrl = "";
|
|
260
261
|
scriptUrl = pathBrowserify.join(pluginPath, system);
|
|
261
262
|
if (scriptUrl) {
|
|
262
263
|
if (this.cache.has(scriptUrl)) {
|
|
263
264
|
return;
|
|
264
265
|
}
|
|
266
|
+
const baseUrl = ibiz.env.runContainer === "FULLCODE" && appId !== ibiz.env.appId ? ibiz.hub.microAppConfigCenter.getPluginBaseUrl(appId) : ibiz.env.pluginBaseUrl;
|
|
265
267
|
let data = null;
|
|
266
|
-
const url = this.parseUrl(scriptUrl);
|
|
268
|
+
const url = this.parseUrl(scriptUrl, baseUrl);
|
|
267
269
|
const styleUrls = (typeof styles === "string" ? [styles] : styles).map(
|
|
268
|
-
(styleUrl) => this.parseUrl(path.join(pluginPath, styleUrl))
|
|
270
|
+
(styleUrl) => this.parseUrl(path.join(pluginPath, styleUrl), baseUrl)
|
|
269
271
|
);
|
|
270
272
|
System.addImportMap({
|
|
271
273
|
imports: {
|
|
@@ -339,7 +341,10 @@ class PluginFactory {
|
|
|
339
341
|
if (!config["systemjs-importmap"]) {
|
|
340
342
|
return;
|
|
341
343
|
}
|
|
342
|
-
const importMap = this.handleSystemImportMap(
|
|
344
|
+
const importMap = this.handleSystemImportMap(
|
|
345
|
+
config["systemjs-importmap"],
|
|
346
|
+
config.appId
|
|
347
|
+
);
|
|
343
348
|
if (importMap.packages) {
|
|
344
349
|
const pkgs = importMap.packages;
|
|
345
350
|
for (const key in pkgs) {
|
|
@@ -354,22 +359,26 @@ class PluginFactory {
|
|
|
354
359
|
ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad")
|
|
355
360
|
);
|
|
356
361
|
}
|
|
357
|
-
|
|
362
|
+
const result = res.data;
|
|
363
|
+
Object.assign(result, { appId: config.appId });
|
|
364
|
+
await this.loadPluginExternal(result);
|
|
358
365
|
}
|
|
359
366
|
}
|
|
360
367
|
System.addImportMap(importMap);
|
|
361
368
|
}
|
|
362
369
|
/**
|
|
363
|
-
* 处理 systemjs importmap 配置
|
|
364
|
-
*
|
|
365
|
-
* @author chitanda
|
|
366
|
-
* @date 2024-01-11 20:01:07
|
|
370
|
+
* @description 处理 systemjs importmap 配置
|
|
367
371
|
* @protected
|
|
368
372
|
* @param {ISystemImportMap} importMap
|
|
369
|
-
* @
|
|
373
|
+
* @param {string} appId
|
|
374
|
+
* @returns {*} {(ISystemImportMap | null)}
|
|
375
|
+
* @memberof PluginFactory
|
|
370
376
|
*/
|
|
371
|
-
handleSystemImportMap(importMap) {
|
|
377
|
+
handleSystemImportMap(importMap, appId) {
|
|
372
378
|
if (importMap) {
|
|
379
|
+
if (!importMap.baseUrl && ibiz.env.runContainer === "FULLCODE" && appId !== ibiz.env.appId) {
|
|
380
|
+
importMap.baseUrl = ibiz.hub.microAppConfigCenter.getPluginBaseUrl(appId);
|
|
381
|
+
}
|
|
373
382
|
if (importMap.packages) {
|
|
374
383
|
const pkgs = importMap.packages;
|
|
375
384
|
for (const key in pkgs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/util/render/render.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/util/render/render.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAiBnD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,MAAO,iBAAiB,KAAG,OAS5D,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isNil } from 'ramda';
|
|
2
|
+
import { PredefinedControlRender } from '@ibiz-template/runtime';
|
|
2
3
|
|
|
3
4
|
"use strict";
|
|
4
5
|
function renderString(value) {
|
|
@@ -24,7 +25,9 @@ const hasEmptyPanelRenderer = (c) => {
|
|
|
24
25
|
if (!controlRenders || controlRenders.length === 0) {
|
|
25
26
|
return false;
|
|
26
27
|
}
|
|
27
|
-
return !!controlRenders.find(
|
|
28
|
+
return !!controlRenders.find(
|
|
29
|
+
(item) => item.id === PredefinedControlRender.EMPTYPANEL
|
|
30
|
+
);
|
|
28
31
|
};
|
|
29
32
|
|
|
30
33
|
export { hasEmptyPanelRenderer, renderString };
|
package/es/util/route/route.mjs
CHANGED
|
@@ -36,7 +36,7 @@ function route2routePath(route, isRouteModal = false) {
|
|
|
36
36
|
params = void 0;
|
|
37
37
|
} else {
|
|
38
38
|
if (params.srfnavctx) {
|
|
39
|
-
context = JSON.parse(
|
|
39
|
+
context = JSON.parse(params.srfnavctx);
|
|
40
40
|
delete params.srfnavctx;
|
|
41
41
|
}
|
|
42
42
|
if (params.srfnav) {
|
|
@@ -5,6 +5,7 @@ var runtime = require('@ibiz-template/runtime');
|
|
|
5
5
|
var core = require('@ibiz-template/core');
|
|
6
6
|
var ramda = require('ramda');
|
|
7
7
|
require('../../use/index.cjs');
|
|
8
|
+
require('./control-base.css');
|
|
8
9
|
var namespace = require('../../use/namespace/namespace.cjs');
|
|
9
10
|
|
|
10
11
|
"use strict";
|
|
@@ -74,7 +75,7 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
|
|
|
74
75
|
};
|
|
75
76
|
const getControlRender = (data) => {
|
|
76
77
|
var _a, _b;
|
|
77
|
-
const controlRenders = model.controlRenders ? model.controlRenders.filter((item) => item.id
|
|
78
|
+
const controlRenders = model.controlRenders ? model.controlRenders.filter((item) => !Object.values(runtime.PredefinedControlRender).includes(item.id)) : void 0;
|
|
78
79
|
if (!controlRenders || controlRenders.length === 0) {
|
|
79
80
|
return void 0;
|
|
80
81
|
}
|
|
@@ -107,6 +108,36 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
|
|
|
107
108
|
const data = props.controller.data || props.controller.items;
|
|
108
109
|
return getControlRender(data);
|
|
109
110
|
});
|
|
111
|
+
const disableMaskInfoRender = () => {
|
|
112
|
+
const disableRender = model.controlRenders ? model.controlRenders.find((item) => item.id === runtime.PredefinedControlRender.DISABLEPANEL) : void 0;
|
|
113
|
+
if (!disableRender) {
|
|
114
|
+
return vue.createVNode("div", {
|
|
115
|
+
"innerHTML": props.controller.state.maskOption.maskInfo || "",
|
|
116
|
+
"class": [ns.e("disable-mask-text")]
|
|
117
|
+
}, null);
|
|
118
|
+
}
|
|
119
|
+
if (disableRender.renderType === "LAYOUTPANEL_MODEL" && disableRender.layoutPanelModel) {
|
|
120
|
+
const htmlCode = runtime.ScriptFactory.execScriptFn({
|
|
121
|
+
...props.controller.getEventArgs()
|
|
122
|
+
}, disableRender.layoutPanelModel, {
|
|
123
|
+
isAsync: false,
|
|
124
|
+
singleRowReturn: true
|
|
125
|
+
});
|
|
126
|
+
return vue.createVNode("div", {
|
|
127
|
+
"innerHTML": htmlCode,
|
|
128
|
+
"class": [ns.e("disable-mask-text")]
|
|
129
|
+
}, null);
|
|
130
|
+
}
|
|
131
|
+
if (disableRender.renderType === "LAYOUTPANEL" && disableRender.layoutPanel) {
|
|
132
|
+
return vue.createVNode(vue.resolveComponent("iBizControlShell"), {
|
|
133
|
+
"class": [ns.e("disable-mask-text")],
|
|
134
|
+
"data": {},
|
|
135
|
+
"params": props.controller.params,
|
|
136
|
+
"context": props.controller.context,
|
|
137
|
+
"modelData": disableRender.layoutPanel
|
|
138
|
+
}, null);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
110
141
|
return {
|
|
111
142
|
ns,
|
|
112
143
|
typeClass,
|
|
@@ -115,6 +146,7 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
|
|
|
115
146
|
codeName,
|
|
116
147
|
controls,
|
|
117
148
|
customRender,
|
|
149
|
+
disableMaskInfoRender,
|
|
118
150
|
onLayoutPanelCreated
|
|
119
151
|
};
|
|
120
152
|
},
|
|
@@ -164,9 +196,11 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
|
|
|
164
196
|
}, slots);
|
|
165
197
|
}
|
|
166
198
|
return vue.createVNode("div", {
|
|
167
|
-
"class": [this.ns.b(), this.ns.b(this.typeClass), this.ns.m(this.codeName), this.sysCssName],
|
|
199
|
+
"class": [this.ns.b(), this.ns.b(this.typeClass), this.ns.m(this.codeName), this.sysCssName, this.ns.is("disabled", state.disabled)],
|
|
168
200
|
"style": this.inlineStyle
|
|
169
|
-
}, [layoutPanel || this.customRender || ((_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b))
|
|
201
|
+
}, [layoutPanel || this.customRender || ((_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b)), state.disabled && vue.createVNode("div", {
|
|
202
|
+
"class": [this.ns.e("mask-container"), this.ns.m(state.maskOption.mode.toLowerCase())]
|
|
203
|
+
}, [state.maskOption.mode === "MASK" && this.disableMaskInfoRender()])]);
|
|
170
204
|
}
|
|
171
205
|
});
|
|
172
206
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control{width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}
|
|
1
|
+
.ibiz-control{--ibiz-control-base-scrollbar-width:0px;--ibiz-control-base-mask-text-color:var(--ibiz-color-primary-text);--ibiz-control-base-mask-background-color-blank:transparent;--ibiz-control-base-mask-background-color-mask:rgba(0, 0, 0, 0.5);width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}.ibiz-control.is-disabled{position:relative}.ibiz-control__mask-container{position:absolute;top:0;left:0;z-index:10;width:calc(100% - var(--ibiz-control-base-scrollbar-width));height:100%}.ibiz-control--blank{background-color:var(--ibiz-control-base-mask-background-color-blank)}.ibiz-control--mask{color:var(--ibiz-control-base-mask-text-color);background-color:var(--ibiz-control-base-mask-background-color-mask);display:flex;align-items:center;justify-content:center}
|
|
@@ -49,7 +49,7 @@ const IBizCustomRender = /* @__PURE__ */ vue.defineComponent({
|
|
|
49
49
|
if (!controlRenders || controlRenders.length === 0) {
|
|
50
50
|
return void 0;
|
|
51
51
|
}
|
|
52
|
-
const noDataRender = controlRenders.find((item) => item.id ===
|
|
52
|
+
const noDataRender = controlRenders.find((item) => item.id === runtime.PredefinedControlRender.EMPTYPANEL);
|
|
53
53
|
if (!noDataRender)
|
|
54
54
|
return void 0;
|
|
55
55
|
if (noDataRender.renderType === "LAYOUTPANEL_MODEL" && noDataRender.layoutPanelModel) {
|
|
@@ -198,6 +198,7 @@ const IBizViewShell = /* @__PURE__ */ vue.defineComponent({
|
|
|
198
198
|
Object.assign(params.value, redrawData.params);
|
|
199
199
|
const modal = attrs.modal;
|
|
200
200
|
if (modal) {
|
|
201
|
+
modal.hooks.preDismiss.clear();
|
|
201
202
|
modal.hooks.shouldDismiss.clear();
|
|
202
203
|
modal.hooks.beforeDismiss.clear();
|
|
203
204
|
}
|
|
@@ -66,12 +66,23 @@ function renderPanelItem(panelItem, c, ins) {
|
|
|
66
66
|
tempStyle = panelItem.cssStyle;
|
|
67
67
|
}
|
|
68
68
|
const panelItemC = panelItems[panelItem.id];
|
|
69
|
+
const attrs = renderAttrs(panelItem, panelItemC);
|
|
70
|
+
if (attrs.dynamicstyle) {
|
|
71
|
+
if (typeof attrs.dynamicstyle === "object") {
|
|
72
|
+
tempStyle += Object.entries(attrs.dynamicstyle).map(([key, value]) => {
|
|
73
|
+
return "".concat(key, ":").concat(value, ";");
|
|
74
|
+
}).join("");
|
|
75
|
+
} else {
|
|
76
|
+
tempStyle += attrs.dynamicstyle;
|
|
77
|
+
}
|
|
78
|
+
delete attrs.dynamicstyle;
|
|
79
|
+
}
|
|
69
80
|
return vue.h(component, {
|
|
70
81
|
modelData: panelItem,
|
|
71
82
|
controller: panelItemC,
|
|
72
83
|
key: panelItem.id,
|
|
73
84
|
style: tempStyle,
|
|
74
|
-
attrs
|
|
85
|
+
attrs
|
|
75
86
|
}, children);
|
|
76
87
|
}
|
|
77
88
|
const PanelControl = /* @__PURE__ */ vue.defineComponent({
|