@ibiz-template/vue3-util 0.7.41-alpha.1 → 0.7.41-alpha.11
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 +29 -30
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +55 -40
- package/es/util/render/render.d.ts.map +1 -1
- package/es/util/render/render.mjs +4 -1
- package/es/util/route/route.d.ts.map +1 -1
- package/es/util/route/route.mjs +7 -2
- 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 +55 -40
- package/lib/util/render/render.cjs +4 -1
- package/lib/util/route/route.cjs +7 -2
- 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
|
|
@@ -37,14 +37,15 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
37
37
|
*/
|
|
38
38
|
protected pluginCache: Map<string, RemotePluginItem>;
|
|
39
39
|
/**
|
|
40
|
-
* 所有的插件
|
|
41
|
-
*
|
|
42
|
-
* @author chitanda
|
|
43
|
-
* @date 2023-02-02 16:02:55
|
|
40
|
+
* @description 所有的插件
|
|
44
41
|
* @protected
|
|
45
|
-
* @type {Plugin[]}
|
|
42
|
+
* @type {{ code: Plugin; extraParams: IParams }[]}
|
|
43
|
+
* @memberof PluginFactory
|
|
46
44
|
*/
|
|
47
|
-
protected pluginCodes:
|
|
45
|
+
protected pluginCodes: {
|
|
46
|
+
code: Plugin;
|
|
47
|
+
extraParams: IParams;
|
|
48
|
+
}[];
|
|
48
49
|
/**
|
|
49
50
|
* 预定义插件集合
|
|
50
51
|
*
|
|
@@ -116,32 +117,31 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
116
117
|
*/
|
|
117
118
|
loadPredefinedPlugin(name: string): Promise<void>;
|
|
118
119
|
/**
|
|
119
|
-
* 插件刚加载完成回来,设置到目前所有的 vue 实例当中
|
|
120
|
-
*
|
|
121
|
-
* @author chitanda
|
|
122
|
-
* @date 2023-02-02 17:02:38
|
|
120
|
+
* @description 插件刚加载完成回来,设置到目前所有的 vue 实例当中
|
|
123
121
|
* @protected
|
|
124
122
|
* @param {Plugin} code
|
|
123
|
+
* @param {IParams} [extraParams={}]
|
|
124
|
+
* @memberof PluginFactory
|
|
125
125
|
*/
|
|
126
|
-
protected setPluginCode(code: Plugin): void;
|
|
126
|
+
protected setPluginCode(code: Plugin, extraParams?: IParams): 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
|
-
* @param {
|
|
142
|
-
* @
|
|
136
|
+
* @description 加载应用插件
|
|
137
|
+
* @param {string} rtObjectName
|
|
138
|
+
* @param {string} rtObjectRepo
|
|
139
|
+
* @param {string} [appId=ibiz.env.appId]
|
|
140
|
+
* @param {IParams} [params={}]
|
|
141
|
+
* @returns {*} {Promise<boolean>}
|
|
142
|
+
* @memberof PluginFactory
|
|
143
143
|
*/
|
|
144
|
-
loadPluginRef(rtObjectName: string, rtObjectRepo: string): Promise<boolean>;
|
|
144
|
+
loadPluginRef(rtObjectName: string, rtObjectRepo: string, appId?: string, extraParams?: IParams): Promise<boolean>;
|
|
145
145
|
/**
|
|
146
146
|
* 加载插件
|
|
147
147
|
*
|
|
@@ -174,14 +174,13 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
174
174
|
*/
|
|
175
175
|
protected loadPluginExternal(config: RemotePluginConfig): Promise<void>;
|
|
176
176
|
/**
|
|
177
|
-
* 处理 systemjs importmap 配置
|
|
178
|
-
*
|
|
179
|
-
* @author chitanda
|
|
180
|
-
* @date 2024-01-11 20:01:07
|
|
177
|
+
* @description 处理 systemjs importmap 配置
|
|
181
178
|
* @protected
|
|
182
179
|
* @param {ISystemImportMap} importMap
|
|
183
|
-
* @
|
|
180
|
+
* @param {string} appId
|
|
181
|
+
* @returns {*} {(ISystemImportMap | null)}
|
|
182
|
+
* @memberof PluginFactory
|
|
184
183
|
*/
|
|
185
|
-
protected handleSystemImportMap(importMap: ISystemImportMap): ISystemImportMap | null;
|
|
184
|
+
protected handleSystemImportMap(importMap: ISystemImportMap, appId: string): ISystemImportMap | null;
|
|
186
185
|
}
|
|
187
186
|
//# 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;;;;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|
34
34
|
*/
|
|
35
35
|
this.pluginCache = /* @__PURE__ */ new Map();
|
|
36
36
|
/**
|
|
37
|
-
* 所有的插件
|
|
38
|
-
*
|
|
39
|
-
* @author chitanda
|
|
40
|
-
* @date 2023-02-02 16:02:55
|
|
37
|
+
* @description 所有的插件
|
|
41
38
|
* @protected
|
|
42
|
-
* @type {Plugin[]}
|
|
39
|
+
* @type {{ code: Plugin; extraParams: IParams }[]}
|
|
40
|
+
* @memberof PluginFactory
|
|
43
41
|
*/
|
|
44
42
|
this.pluginCodes = [];
|
|
45
43
|
/**
|
|
@@ -116,7 +114,7 @@ class PluginFactory {
|
|
|
116
114
|
*/
|
|
117
115
|
register(app) {
|
|
118
116
|
this.pluginCodes.forEach((plugin) => {
|
|
119
|
-
app.use(plugin);
|
|
117
|
+
app.use(plugin.code, plugin.extraParams);
|
|
120
118
|
});
|
|
121
119
|
}
|
|
122
120
|
/**
|
|
@@ -136,31 +134,30 @@ class PluginFactory {
|
|
|
136
134
|
}
|
|
137
135
|
}
|
|
138
136
|
/**
|
|
139
|
-
* 插件刚加载完成回来,设置到目前所有的 vue 实例当中
|
|
140
|
-
*
|
|
141
|
-
* @author chitanda
|
|
142
|
-
* @date 2023-02-02 17:02:38
|
|
137
|
+
* @description 插件刚加载完成回来,设置到目前所有的 vue 实例当中
|
|
143
138
|
* @protected
|
|
144
139
|
* @param {Plugin} code
|
|
140
|
+
* @param {IParams} [extraParams={}]
|
|
141
|
+
* @memberof PluginFactory
|
|
145
142
|
*/
|
|
146
|
-
setPluginCode(code) {
|
|
147
|
-
this.pluginCodes.push(code);
|
|
148
|
-
AppHooks.useComponent.callSync(null, code);
|
|
143
|
+
setPluginCode(code, extraParams = {}) {
|
|
144
|
+
this.pluginCodes.push({ code, extraParams });
|
|
145
|
+
AppHooks.useComponent.callSync(null, code, extraParams);
|
|
149
146
|
}
|
|
150
147
|
/**
|
|
151
|
-
* 加载插件
|
|
152
|
-
*
|
|
153
|
-
* @author chitanda
|
|
154
|
-
* @date 2022-10-31 14:10:13
|
|
148
|
+
* @description 加载插件
|
|
155
149
|
* @param {ISysPFPlugin} plugin
|
|
156
|
-
* @
|
|
150
|
+
* @param {string} [appId=ibiz.env.appId]
|
|
151
|
+
* @returns {*} {Promise<boolean>}
|
|
152
|
+
* @memberof PluginFactory
|
|
157
153
|
*/
|
|
158
|
-
async loadPlugin(plugin) {
|
|
154
|
+
async loadPlugin(plugin, appId = ibiz.env.appId) {
|
|
159
155
|
if (plugin.runtimeObject === true) {
|
|
160
156
|
const pluginRef = plugin;
|
|
161
157
|
if (pluginRef) {
|
|
162
158
|
const rtObjectName = pluginRef.rtobjectName;
|
|
163
159
|
const rtObjectRepo = pluginRef.rtobjectRepo;
|
|
160
|
+
const replaceDefault = pluginRef.replaceDefault;
|
|
164
161
|
if (this.isIgnore(rtObjectRepo)) {
|
|
165
162
|
return true;
|
|
166
163
|
}
|
|
@@ -179,7 +176,9 @@ class PluginFactory {
|
|
|
179
176
|
try {
|
|
180
177
|
const p = this.loadPluginRef(
|
|
181
178
|
pluginRef.rtobjectName,
|
|
182
|
-
pluginRef.rtobjectRepo
|
|
179
|
+
pluginRef.rtobjectRepo,
|
|
180
|
+
appId,
|
|
181
|
+
{ replaceDefault }
|
|
183
182
|
);
|
|
184
183
|
this.loadQueue.set(rtObjectRepo, p);
|
|
185
184
|
const result = await p;
|
|
@@ -197,14 +196,15 @@ class PluginFactory {
|
|
|
197
196
|
return false;
|
|
198
197
|
}
|
|
199
198
|
/**
|
|
200
|
-
* 加载应用插件
|
|
201
|
-
*
|
|
202
|
-
* @
|
|
203
|
-
* @
|
|
204
|
-
* @param {
|
|
205
|
-
* @
|
|
199
|
+
* @description 加载应用插件
|
|
200
|
+
* @param {string} rtObjectName
|
|
201
|
+
* @param {string} rtObjectRepo
|
|
202
|
+
* @param {string} [appId=ibiz.env.appId]
|
|
203
|
+
* @param {IParams} [params={}]
|
|
204
|
+
* @returns {*} {Promise<boolean>}
|
|
205
|
+
* @memberof PluginFactory
|
|
206
206
|
*/
|
|
207
|
-
async loadPluginRef(rtObjectName, rtObjectRepo) {
|
|
207
|
+
async loadPluginRef(rtObjectName, rtObjectRepo, appId = ibiz.env.appId, extraParams = {}) {
|
|
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, extraParams });
|
|
230
231
|
const remotePlugin = new RemotePluginItem(
|
|
231
232
|
rtObjectName,
|
|
232
233
|
rtObjectRepo,
|
|
@@ -255,17 +256,24 @@ class PluginFactory {
|
|
|
255
256
|
*/
|
|
256
257
|
async loadScript(remotePlugin) {
|
|
257
258
|
const pluginPath = remotePlugin.repo;
|
|
258
|
-
const {
|
|
259
|
+
const {
|
|
260
|
+
name,
|
|
261
|
+
appId,
|
|
262
|
+
system,
|
|
263
|
+
styles = [],
|
|
264
|
+
extraParams = {}
|
|
265
|
+
} = remotePlugin.config;
|
|
259
266
|
let scriptUrl = "";
|
|
260
267
|
scriptUrl = pathBrowserify.join(pluginPath, system);
|
|
261
268
|
if (scriptUrl) {
|
|
262
269
|
if (this.cache.has(scriptUrl)) {
|
|
263
270
|
return;
|
|
264
271
|
}
|
|
272
|
+
const baseUrl = ibiz.env.runContainer === "FULLCODE" && appId !== ibiz.env.appId ? ibiz.hub.microAppConfigCenter.getPluginBaseUrl(appId) : ibiz.env.pluginBaseUrl;
|
|
265
273
|
let data = null;
|
|
266
|
-
const url = this.parseUrl(scriptUrl);
|
|
274
|
+
const url = this.parseUrl(scriptUrl, baseUrl);
|
|
267
275
|
const styleUrls = (typeof styles === "string" ? [styles] : styles).map(
|
|
268
|
-
(styleUrl) => this.parseUrl(path.join(pluginPath, styleUrl))
|
|
276
|
+
(styleUrl) => this.parseUrl(path.join(pluginPath, styleUrl), baseUrl)
|
|
269
277
|
);
|
|
270
278
|
System.addImportMap({
|
|
271
279
|
imports: {
|
|
@@ -279,7 +287,7 @@ class PluginFactory {
|
|
|
279
287
|
data = await System.import(name);
|
|
280
288
|
if (data) {
|
|
281
289
|
if (data.default) {
|
|
282
|
-
this.setPluginCode(data.default);
|
|
290
|
+
this.setPluginCode(data.default, extraParams);
|
|
283
291
|
} else {
|
|
284
292
|
throw new RuntimeError(
|
|
285
293
|
ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad")
|
|
@@ -339,7 +347,10 @@ class PluginFactory {
|
|
|
339
347
|
if (!config["systemjs-importmap"]) {
|
|
340
348
|
return;
|
|
341
349
|
}
|
|
342
|
-
const importMap = this.handleSystemImportMap(
|
|
350
|
+
const importMap = this.handleSystemImportMap(
|
|
351
|
+
config["systemjs-importmap"],
|
|
352
|
+
config.appId
|
|
353
|
+
);
|
|
343
354
|
if (importMap.packages) {
|
|
344
355
|
const pkgs = importMap.packages;
|
|
345
356
|
for (const key in pkgs) {
|
|
@@ -354,22 +365,26 @@ class PluginFactory {
|
|
|
354
365
|
ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad")
|
|
355
366
|
);
|
|
356
367
|
}
|
|
357
|
-
|
|
368
|
+
const result = res.data;
|
|
369
|
+
Object.assign(result, { appId: config.appId });
|
|
370
|
+
await this.loadPluginExternal(result);
|
|
358
371
|
}
|
|
359
372
|
}
|
|
360
373
|
System.addImportMap(importMap);
|
|
361
374
|
}
|
|
362
375
|
/**
|
|
363
|
-
* 处理 systemjs importmap 配置
|
|
364
|
-
*
|
|
365
|
-
* @author chitanda
|
|
366
|
-
* @date 2024-01-11 20:01:07
|
|
376
|
+
* @description 处理 systemjs importmap 配置
|
|
367
377
|
* @protected
|
|
368
378
|
* @param {ISystemImportMap} importMap
|
|
369
|
-
* @
|
|
379
|
+
* @param {string} appId
|
|
380
|
+
* @returns {*} {(ISystemImportMap | null)}
|
|
381
|
+
* @memberof PluginFactory
|
|
370
382
|
*/
|
|
371
|
-
handleSystemImportMap(importMap) {
|
|
383
|
+
handleSystemImportMap(importMap, appId) {
|
|
372
384
|
if (importMap) {
|
|
385
|
+
if (!importMap.baseUrl && ibiz.env.runContainer === "FULLCODE" && appId !== ibiz.env.appId) {
|
|
386
|
+
importMap.baseUrl = ibiz.hub.microAppConfigCenter.getPluginBaseUrl(appId);
|
|
387
|
+
}
|
|
373
388
|
if (importMap.packages) {
|
|
374
389
|
const pkgs = importMap.packages;
|
|
375
390
|
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 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/util/route/route.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,IAAI,KAAK,EAAY,MAAM,YAAY,CAAC;AAE9E,OAAO,EAGL,WAAW,EAGZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,EACZ,YAAY,GAAE,OAAe,GAC5B,UAAU,CAsEZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAuD9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/util/route/route.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,IAAI,KAAK,EAAY,MAAM,YAAY,CAAC;AAE9E,OAAO,EAGL,WAAW,EAGZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,UAAU,E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ACZ,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,OAAc,GACvB,MAAM,CA4BR;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,EAClE,KAAK,EAAE,MAAM,GACZ,IAAI,CAaN"}
|
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) {
|
|
@@ -117,8 +117,13 @@ function getOwnRouteContext(context) {
|
|
|
117
117
|
}
|
|
118
118
|
delete ownContext.attributekeys;
|
|
119
119
|
}
|
|
120
|
+
let srfKeepNull = false;
|
|
121
|
+
if (Object.prototype.hasOwnProperty.call(ownContext, "srfkeepnull")) {
|
|
122
|
+
srfKeepNull = ownContext.srfkeepnull === true || ownContext.srfkeepnull === "true";
|
|
123
|
+
delete ownContext.srfkeepnull;
|
|
124
|
+
}
|
|
120
125
|
Object.keys(ownContext).forEach((key) => {
|
|
121
|
-
if (excludeKeys.includes(key) || isNil(ownContext[key])) {
|
|
126
|
+
if (excludeKeys.includes(key) || !srfKeepNull && isNil(ownContext[key])) {
|
|
122
127
|
delete ownContext[key];
|
|
123
128
|
}
|
|
124
129
|
});
|