@ibiz-template/vue3-util 0.5.3-beta.0 → 0.5.3-beta.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/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +50 -44
- package/es/index.mjs +1 -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/nav-pos/nav-pos.mjs +1 -1
- package/es/panel-component/panel-item-render/index.d.ts +25 -0
- package/es/panel-component/panel-item-render/index.d.ts.map +1 -0
- package/es/panel-component/panel-item-render/index.mjs +19 -0
- package/es/panel-component/panel-item-render/panel-item-render.controller.d.ts +32 -0
- package/es/panel-component/panel-item-render/panel-item-render.controller.d.ts.map +1 -0
- package/es/panel-component/panel-item-render/panel-item-render.controller.mjs +29 -0
- package/es/panel-component/panel-item-render/panel-item-render.d.ts +27 -0
- package/es/panel-component/panel-item-render/panel-item-render.d.ts.map +1 -0
- package/es/panel-component/panel-item-render/panel-item-render.mjs +47 -0
- package/es/panel-component/panel-item-render/panel-item-render.provider.d.ts +17 -0
- package/es/panel-component/panel-item-render/panel-item-render.provider.d.ts.map +1 -0
- package/es/panel-component/panel-item-render/panel-item-render.provider.mjs +15 -0
- package/es/plugin/plugin-factory/plugin-factory.d.ts +15 -4
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +58 -10
- package/es/util/route/route.d.ts.map +1 -1
- package/es/util/route/route.mjs +8 -3
- package/es/util/store/async-action/async-action.d.ts.map +1 -1
- package/es/util/store/async-action/async-action.mjs +10 -2
- package/lib/index.cjs +17 -15
- package/package.json +6 -6
- package/src/common/view-shell/view-shell.tsx +74 -55
- package/src/panel-component/index.ts +1 -0
- package/src/panel-component/nav-pos/nav-pos.tsx +1 -1
- package/src/panel-component/panel-item-render/index.ts +18 -0
- package/src/panel-component/panel-item-render/panel-item-render.controller.ts +52 -0
- package/src/panel-component/panel-item-render/panel-item-render.provider.ts +30 -0
- package/src/panel-component/panel-item-render/panel-item-render.tsx +50 -0
- package/src/plugin/plugin-factory/plugin-factory.ts +67 -10
- package/src/util/route/route.ts +10 -5
- package/src/util/store/async-action/async-action.ts +14 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;aAS/B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import '../../util/index.mjs';
|
|
3
|
+
import { PanelItemRender } from './panel-item-render.mjs';
|
|
4
|
+
import { PanelItemRenderProvider } from './panel-item-render.provider.mjs';
|
|
5
|
+
import { withInstall } from '../../util/install.mjs';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizPanelItemRender = withInstall(
|
|
9
|
+
PanelItemRender,
|
|
10
|
+
function(v) {
|
|
11
|
+
v.component(PanelItemRender.name, PanelItemRender);
|
|
12
|
+
registerPanelItemProvider(
|
|
13
|
+
"PREDEFINE_RENDER",
|
|
14
|
+
() => new PanelItemRenderProvider()
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export { IBizPanelItemRender, IBizPanelItemRender as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IControlRender, IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import { PanelItemController, ViewLayoutPanelController } from '@ibiz-template/runtime';
|
|
3
|
+
/**
|
|
4
|
+
* 面板绘制器控制器
|
|
5
|
+
*
|
|
6
|
+
* @author zk
|
|
7
|
+
* @date 2024-01-15 06:01:08
|
|
8
|
+
* @export
|
|
9
|
+
* @class PanelItemRenderController
|
|
10
|
+
* @extends {PanelItemController<IPanelContainer>}
|
|
11
|
+
*/
|
|
12
|
+
export declare class PanelItemRenderController extends PanelItemController<IPanelContainer> {
|
|
13
|
+
/**
|
|
14
|
+
* 面板控制器
|
|
15
|
+
*
|
|
16
|
+
* @author lxm
|
|
17
|
+
* @date 2022-08-24 22:08:59
|
|
18
|
+
* @type {PanelController}
|
|
19
|
+
*/
|
|
20
|
+
panel: ViewLayoutPanelController;
|
|
21
|
+
/**
|
|
22
|
+
* 获取面板绘制器自定义html
|
|
23
|
+
*
|
|
24
|
+
* @author zk
|
|
25
|
+
* @date 2024-01-15 01:01:11
|
|
26
|
+
* @export
|
|
27
|
+
* @param {IControlRender[]} controlRenders
|
|
28
|
+
* @return {*} {(string | undefined)}
|
|
29
|
+
*/
|
|
30
|
+
getPanelItemCustomHtml(controlRenders: IControlRender[], data: IData | undefined): string | undefined;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=panel-item-render.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-item-render.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/panel-item-render.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EACL,mBAAmB,EAEnB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;GAQG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,eAAe,CAAC;IACjF;;;;;;OAMG;IACK,KAAK,EAAE,yBAAyB,CAAC;IAEzC;;;;;;;;OAQG;IACH,sBAAsB,CACpB,cAAc,EAAE,cAAc,EAAE,EAChC,IAAI,EAAE,KAAK,GAAG,SAAS,GACtB,MAAM,GAAG,SAAS;CAatB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PanelItemController, ScriptFactory } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class PanelItemRenderController extends PanelItemController {
|
|
5
|
+
/**
|
|
6
|
+
* 获取面板绘制器自定义html
|
|
7
|
+
*
|
|
8
|
+
* @author zk
|
|
9
|
+
* @date 2024-01-15 01:01:11
|
|
10
|
+
* @export
|
|
11
|
+
* @param {IControlRender[]} controlRenders
|
|
12
|
+
* @return {*} {(string | undefined)}
|
|
13
|
+
*/
|
|
14
|
+
getPanelItemCustomHtml(controlRenders, data) {
|
|
15
|
+
if (controlRenders.length === 0) {
|
|
16
|
+
return void 0;
|
|
17
|
+
}
|
|
18
|
+
const controlRender = controlRenders[0];
|
|
19
|
+
if (controlRender.layoutPanelModel) {
|
|
20
|
+
return ScriptFactory.execScriptFn(
|
|
21
|
+
{ data: data || {} },
|
|
22
|
+
controlRender.layoutPanelModel,
|
|
23
|
+
{ singleRowReturn: true, isAsync: false }
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { PanelItemRenderController };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { PanelItemRenderController } from './panel-item-render.controller';
|
|
4
|
+
export declare const PanelItemRender: import("vue").DefineComponent<{
|
|
5
|
+
modelData: {
|
|
6
|
+
type: PropType<IPanelContainer>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
controller: {
|
|
10
|
+
type: typeof PanelItemRenderController;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
15
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
16
|
+
htmlCode: import("vue").ComputedRef<string | undefined>;
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
modelData: {
|
|
19
|
+
type: PropType<IPanelContainer>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
controller: {
|
|
23
|
+
type: typeof PanelItemRenderController;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
}>>, {}, {}>;
|
|
27
|
+
//# sourceMappingURL=panel-item-render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-item-render.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/panel-item-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;YA4C1B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { computed, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import '../../use/index.mjs';
|
|
3
|
+
import { PanelItemRenderController } from './panel-item-render.controller.mjs';
|
|
4
|
+
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const PanelItemRender = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizPanelItemRender",
|
|
9
|
+
props: {
|
|
10
|
+
modelData: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
controller: {
|
|
15
|
+
type: PanelItemRenderController,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
var _a;
|
|
21
|
+
const ns = useNamespace("panel-item-render");
|
|
22
|
+
const nsType = useNamespace("panel-".concat((_a = props.modelData.itemType) == null ? void 0 : _a.toLowerCase()));
|
|
23
|
+
const {
|
|
24
|
+
id
|
|
25
|
+
} = props.modelData;
|
|
26
|
+
const classArr = computed(() => {
|
|
27
|
+
const result = [ns.b(), ns.m(id), nsType.b(), ns.is("hidden", !props.controller.state.visible)];
|
|
28
|
+
return result;
|
|
29
|
+
});
|
|
30
|
+
const htmlCode = computed(() => {
|
|
31
|
+
return props.controller.getPanelItemCustomHtml(props.modelData.controlRenders, props.controller.data);
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
ns,
|
|
35
|
+
classArr,
|
|
36
|
+
htmlCode
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
render() {
|
|
40
|
+
return createVNode("div", {
|
|
41
|
+
"class": this.classArr,
|
|
42
|
+
"innerHTML": this.htmlCode
|
|
43
|
+
}, null);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { PanelItemRender };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
+
import { PanelItemRenderController } from './panel-item-render.controller';
|
|
4
|
+
/**
|
|
5
|
+
* 面板绘制器适配器
|
|
6
|
+
*
|
|
7
|
+
* @author zk
|
|
8
|
+
* @date 2024-01-15 06:01:32
|
|
9
|
+
* @export
|
|
10
|
+
* @class PanelItemRenderProvider
|
|
11
|
+
* @implements {IPanelItemProvider}
|
|
12
|
+
*/
|
|
13
|
+
export declare class PanelItemRenderProvider implements IPanelItemProvider {
|
|
14
|
+
component: string;
|
|
15
|
+
createController(panelItem: IPanelContainer, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemRenderController>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=panel-item-render.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-item-render.provider.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/panel-item-render.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E;;;;;;;;GAQG;AACH,qBAAa,uBAAwB,YAAW,kBAAkB;IAChE,SAAS,EAAE,MAAM,CAAyB;IAEpC,gBAAgB,CACpB,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACtC,OAAO,CAAC,yBAAyB,CAAC;CAKtC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PanelItemRenderController } from './panel-item-render.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class PanelItemRenderProvider {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.component = "IBizPanelItemRender";
|
|
7
|
+
}
|
|
8
|
+
async createController(panelItem, panel, parent) {
|
|
9
|
+
const c = new PanelItemRenderController(panelItem, panel, parent);
|
|
10
|
+
await c.init();
|
|
11
|
+
return c;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { PanelItemRenderProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPluginFactory, IPluginItem, RemotePluginItem } from '@ibiz-template/runtime';
|
|
1
|
+
import { IPluginFactory, IPluginItem, ISystemImportMap, RemotePluginItem } from '@ibiz-template/runtime';
|
|
2
2
|
import { ISysPFPlugin } from '@ibiz/model-core';
|
|
3
3
|
import { App, Plugin } from 'vue';
|
|
4
4
|
/**
|
|
@@ -156,11 +156,22 @@ export declare class PluginFactory implements IPluginFactory {
|
|
|
156
156
|
* 编译请求文件地址
|
|
157
157
|
*
|
|
158
158
|
* @author chitanda
|
|
159
|
-
* @date
|
|
159
|
+
* @date 2024-01-11 16:01:19
|
|
160
160
|
* @protected
|
|
161
|
-
* @param {string}
|
|
161
|
+
* @param {string} pathUrl
|
|
162
|
+
* @param {string} [baseUrl=ibiz.env.pluginBaseUrl]
|
|
162
163
|
* @return {*} {string}
|
|
163
164
|
*/
|
|
164
|
-
protected parseUrl(
|
|
165
|
+
protected parseUrl(pathUrl: string, baseUrl?: string): string;
|
|
166
|
+
/**
|
|
167
|
+
* 处理 systemjs importmap 配置
|
|
168
|
+
*
|
|
169
|
+
* @author chitanda
|
|
170
|
+
* @date 2024-01-11 20:01:07
|
|
171
|
+
* @protected
|
|
172
|
+
* @param {ISystemImportMap} importMap
|
|
173
|
+
* @return {*} {IParams}
|
|
174
|
+
*/
|
|
175
|
+
protected handleSystemImportMap(importMap: ISystemImportMap): ISystemImportMap | null;
|
|
165
176
|
}
|
|
166
177
|
//# 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,
|
|
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,EAEhB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC;;;;;;;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;IAO3C;;;;;;;OAOG;IACG,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAuCxD;;;;;;;OAOG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,CAAC;IAgDnB;;;;;;;;OAQG;cACa,UAAU,CAAC,YAAY,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCzE;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAA+B,GACvC,MAAM;IAwBT;;;;;;;;OAQG;IACH,SAAS,CAAC,qBAAqB,CAC7B,SAAS,EAAE,gBAAgB,GAC1B,gBAAgB,GAAG,IAAI;CAgC3B"}
|
|
@@ -228,6 +228,14 @@ class PluginFactory {
|
|
|
228
228
|
configData
|
|
229
229
|
);
|
|
230
230
|
if (remotePlugin) {
|
|
231
|
+
if (remotePlugin.config["systemjs-importmap"]) {
|
|
232
|
+
const importMap = this.handleSystemImportMap(
|
|
233
|
+
remotePlugin.config["systemjs-importmap"]
|
|
234
|
+
);
|
|
235
|
+
if (importMap) {
|
|
236
|
+
System.addImportMap(importMap);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
231
239
|
try {
|
|
232
240
|
await this.loadScript(remotePlugin);
|
|
233
241
|
this.pluginCache.set(rtObjectName, remotePlugin);
|
|
@@ -291,24 +299,25 @@ class PluginFactory {
|
|
|
291
299
|
* 编译请求文件地址
|
|
292
300
|
*
|
|
293
301
|
* @author chitanda
|
|
294
|
-
* @date
|
|
302
|
+
* @date 2024-01-11 16:01:19
|
|
295
303
|
* @protected
|
|
296
|
-
* @param {string}
|
|
304
|
+
* @param {string} pathUrl
|
|
305
|
+
* @param {string} [baseUrl=ibiz.env.pluginBaseUrl]
|
|
297
306
|
* @return {*} {string}
|
|
298
307
|
*/
|
|
299
|
-
parseUrl(
|
|
300
|
-
if (this.urlReg.test(
|
|
301
|
-
return
|
|
308
|
+
parseUrl(pathUrl, baseUrl = ibiz.env.pluginBaseUrl) {
|
|
309
|
+
if (this.urlReg.test(pathUrl)) {
|
|
310
|
+
return pathUrl;
|
|
302
311
|
}
|
|
303
312
|
let url = "";
|
|
304
|
-
if (this.urlReg.test(
|
|
305
|
-
if (
|
|
306
|
-
url =
|
|
313
|
+
if (this.urlReg.test(baseUrl)) {
|
|
314
|
+
if (pathUrl.startsWith("/")) {
|
|
315
|
+
url = baseUrl + pathUrl;
|
|
307
316
|
} else {
|
|
308
|
-
url = "".concat(
|
|
317
|
+
url = "".concat(baseUrl, "/").concat(pathUrl);
|
|
309
318
|
}
|
|
310
319
|
} else {
|
|
311
|
-
url = "".concat(pathBrowserify.join(
|
|
320
|
+
url = "".concat(pathBrowserify.join(baseUrl, pathUrl));
|
|
312
321
|
}
|
|
313
322
|
const { origin, pathname } = window.location;
|
|
314
323
|
if (pathname.endsWith("/") && url.startsWith("/")) {
|
|
@@ -319,6 +328,45 @@ class PluginFactory {
|
|
|
319
328
|
}
|
|
320
329
|
return url;
|
|
321
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* 处理 systemjs importmap 配置
|
|
333
|
+
*
|
|
334
|
+
* @author chitanda
|
|
335
|
+
* @date 2024-01-11 20:01:07
|
|
336
|
+
* @protected
|
|
337
|
+
* @param {ISystemImportMap} importMap
|
|
338
|
+
* @return {*} {IParams}
|
|
339
|
+
*/
|
|
340
|
+
handleSystemImportMap(importMap) {
|
|
341
|
+
if (importMap) {
|
|
342
|
+
if (importMap.imports) {
|
|
343
|
+
const imps = importMap.imports;
|
|
344
|
+
for (const key in imps) {
|
|
345
|
+
if (Object.prototype.hasOwnProperty.call(imps, key)) {
|
|
346
|
+
const url = imps[key];
|
|
347
|
+
imps[key] = this.parseUrl(url, importMap.baseUrl);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (importMap.styles) {
|
|
352
|
+
const styles = importMap.styles;
|
|
353
|
+
for (const key in styles) {
|
|
354
|
+
if (Object.prototype.hasOwnProperty.call(styles, key)) {
|
|
355
|
+
const urls = styles[key];
|
|
356
|
+
if (typeof urls === "string") {
|
|
357
|
+
styles[key] = this.parseUrl(urls, importMap.baseUrl);
|
|
358
|
+
} else {
|
|
359
|
+
styles[key] = urls.map(
|
|
360
|
+
(url) => this.parseUrl(url, importMap.baseUrl)
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return importMap;
|
|
367
|
+
}
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
322
370
|
}
|
|
323
371
|
|
|
324
372
|
export { PluginFactory };
|
|
@@ -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,EAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CA+DxD;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,EAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CA+DxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAuD9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAc7D;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAYpC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,QAAQ,EACjB,eAAe,CAAC,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAC3B,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA6D3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,cAAc,CAAC,CAqDzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,OAAc,GACvB,MAAM,CAwBR;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
|
@@ -93,7 +93,12 @@ function routePath2string(routePath) {
|
|
|
93
93
|
}
|
|
94
94
|
function getOwnRouteContext(context) {
|
|
95
95
|
const ownContext = context.getOwnContext();
|
|
96
|
-
const excludeKeys = [
|
|
96
|
+
const excludeKeys = [
|
|
97
|
+
"srfsessionid",
|
|
98
|
+
"srfappid",
|
|
99
|
+
"currentSrfNav",
|
|
100
|
+
"toRouteDepth"
|
|
101
|
+
];
|
|
97
102
|
Object.keys(ownContext).forEach((key) => {
|
|
98
103
|
if (excludeKeys.includes(key)) {
|
|
99
104
|
delete ownContext[key];
|
|
@@ -143,7 +148,7 @@ async function generateRoutePath(appView, route, context, params) {
|
|
|
143
148
|
let depth = context.srfdefaulttoroutedepth || 2;
|
|
144
149
|
if (context.toRouteDepth) {
|
|
145
150
|
depth = context.toRouteDepth;
|
|
146
|
-
|
|
151
|
+
context.toRouteDepth = void 0;
|
|
147
152
|
} else if (ibiz.env.isMob) {
|
|
148
153
|
routePath.pathNodes[0] = {
|
|
149
154
|
viewName: "home"
|
|
@@ -154,7 +159,7 @@ async function generateRoutePath(appView, route, context, params) {
|
|
|
154
159
|
const currentNode = routePath.pathNodes[routePath.pathNodes.length - 1];
|
|
155
160
|
currentNode.params = currentNode.params || {};
|
|
156
161
|
currentNode.srfnav = context.currentSrfNav;
|
|
157
|
-
|
|
162
|
+
context.currentSrfNav = void 0;
|
|
158
163
|
}
|
|
159
164
|
if (route.fullPath.startsWith("/appredirectview")) {
|
|
160
165
|
if (params == null ? void 0 : params.srfindexname) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-action.d.ts","sourceRoot":"","sources":["../../../../src/util/store/async-action/async-action.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async-action.d.ts","sourceRoot":"","sources":["../../../../src/util/store/async-action/async-action.ts"],"names":[],"mappings":"AAwCA;;;;;;GAMG;AACH,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6D7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
import { isNumber } from 'lodash-es';
|
|
2
|
+
import { isNumber, isNil } from 'lodash-es';
|
|
3
3
|
import { ref, computed, onUnmounted } from 'vue';
|
|
4
4
|
|
|
5
5
|
"use strict";
|
|
@@ -15,6 +15,13 @@ function formatAsyncAction(data) {
|
|
|
15
15
|
data[key] = dayjs(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
if (!isNil(data.actionresult)) {
|
|
19
|
+
try {
|
|
20
|
+
const json = JSON.parse(data.actionresult);
|
|
21
|
+
data.actionresult = json;
|
|
22
|
+
} catch (error) {
|
|
23
|
+
}
|
|
24
|
+
}
|
|
18
25
|
return data;
|
|
19
26
|
}
|
|
20
27
|
function useAsyncAction() {
|
|
@@ -27,6 +34,7 @@ function useAsyncAction() {
|
|
|
27
34
|
});
|
|
28
35
|
const load = async () => {
|
|
29
36
|
const res = await ibiz.asyncAction.fetch();
|
|
37
|
+
res.data.forEach(formatAsyncAction);
|
|
30
38
|
allAsyncActions.value = res.data;
|
|
31
39
|
};
|
|
32
40
|
const asyncActionCallBack = (msg) => {
|
|
@@ -37,7 +45,7 @@ function useAsyncAction() {
|
|
|
37
45
|
const findIndex = allAsyncActions.value.findIndex(
|
|
38
46
|
(item) => item.asyncacitonid === asyncAction.asyncacitonid
|
|
39
47
|
);
|
|
40
|
-
if (findIndex
|
|
48
|
+
if (findIndex === -1) {
|
|
41
49
|
allAsyncActions.value.unshift(asyncAction);
|
|
42
50
|
showLength.value += 1;
|
|
43
51
|
} else {
|
package/lib/index.cjs
CHANGED
|
@@ -49,13 +49,14 @@ var panelContainerGroup_state = require('./panel-component/panel-container-group
|
|
|
49
49
|
var panelContainerGroup_controller = require('./panel-component/panel-container-group/panel-container-group.controller.cjs');
|
|
50
50
|
var index$a = require('./panel-component/panel-container-group/index.cjs');
|
|
51
51
|
var index$b = require('./panel-component/panel-tab-page/index.cjs');
|
|
52
|
+
var index$c = require('./panel-component/panel-item-render/index.cjs');
|
|
52
53
|
var appRedirectView = require('./view/app-redirect-view/app-redirect-view.cjs');
|
|
53
|
-
var index$
|
|
54
|
+
var index$d = require('./view/common/index.cjs');
|
|
54
55
|
var todoRedirect = require('./view/todo-redirect/todo-redirect.cjs');
|
|
55
|
-
var index$
|
|
56
|
-
var index$
|
|
57
|
-
var index$
|
|
58
|
-
var index$
|
|
56
|
+
var index$e = require('./view/portal-view/index.cjs');
|
|
57
|
+
var index$f = require('./view/de-redirect-view/index.cjs');
|
|
58
|
+
var index$g = require('./control/panel/view-layout-panel/index.cjs');
|
|
59
|
+
var index$h = require('./control/panel/panel/index.cjs');
|
|
59
60
|
var pluginFactory = require('./plugin/plugin-factory/plugin-factory.cjs');
|
|
60
61
|
var clickOutside = require('./use/click-outside/click-outside.cjs');
|
|
61
62
|
var useControlController = require('./use/control/use-control-controller/use-control-controller.cjs');
|
|
@@ -63,7 +64,7 @@ var event = require('./use/event/event.cjs');
|
|
|
63
64
|
var focusBlur = require('./use/focus-blur/focus-blur.cjs');
|
|
64
65
|
var namespace = require('./use/namespace/namespace.cjs');
|
|
65
66
|
var route = require('./use/route/route.cjs');
|
|
66
|
-
var index$
|
|
67
|
+
var index$i = require('./use/util/index.cjs');
|
|
67
68
|
var useViewController = require('./use/view/use-view-controller/use-view-controller.cjs');
|
|
68
69
|
var vue = require('./use/vue/vue.cjs');
|
|
69
70
|
var overlayContainer = require('./util/overlay-container/overlay-container.cjs');
|
|
@@ -77,7 +78,7 @@ var render = require('./util/render/render.cjs');
|
|
|
77
78
|
var overlayViewUtil = require('./util/overlay-view-util/overlay-view-util.cjs');
|
|
78
79
|
var appStore = require('./util/store/app-store/app-store.cjs');
|
|
79
80
|
var uiStore = require('./util/store/ui-store/ui-store.cjs');
|
|
80
|
-
var index$
|
|
81
|
+
var index$j = require('./util/store/index.cjs');
|
|
81
82
|
var common = require('./props/common.cjs');
|
|
82
83
|
var textBox = require('./props/editor/text-box.cjs');
|
|
83
84
|
var span = require('./props/editor/span.cjs');
|
|
@@ -147,13 +148,14 @@ exports.PanelContainerGroupState = panelContainerGroup_state.PanelContainerGroup
|
|
|
147
148
|
exports.PanelContainerGroupController = panelContainerGroup_controller.PanelContainerGroupController;
|
|
148
149
|
exports.IBizPanelContainerGroup = index$a.IBizPanelContainerGroup;
|
|
149
150
|
exports.IBizPanelTabPage = index$b.IBizPanelTabPage;
|
|
151
|
+
exports.IBizPanelItemRender = index$c.IBizPanelItemRender;
|
|
150
152
|
exports.AppRedirectView = appRedirectView.AppRedirectView;
|
|
151
|
-
exports.IBizView = index$
|
|
153
|
+
exports.IBizView = index$d.IBizView;
|
|
152
154
|
exports.TodoRedirect = todoRedirect.TodoRedirect;
|
|
153
|
-
exports.IBizPortalView = index$
|
|
154
|
-
exports.IBizDeRedirectView = index$
|
|
155
|
-
exports.IBizViewLayoutPanelControl = index$
|
|
156
|
-
exports.IBizPanelControl = index$
|
|
155
|
+
exports.IBizPortalView = index$e.IBizPortalView;
|
|
156
|
+
exports.IBizDeRedirectView = index$f.IBizDeRedirectView;
|
|
157
|
+
exports.IBizViewLayoutPanelControl = index$g.IBizViewLayoutPanelControl;
|
|
158
|
+
exports.IBizPanelControl = index$h.IBizPanelControl;
|
|
157
159
|
exports.PluginFactory = pluginFactory.PluginFactory;
|
|
158
160
|
exports.useClickOutside = clickOutside.useClickOutside;
|
|
159
161
|
exports.useControlController = useControlController.useControlController;
|
|
@@ -162,8 +164,8 @@ exports.useFocusAndBlur = focusBlur.useFocusAndBlur;
|
|
|
162
164
|
exports.useNamespace = namespace.useNamespace;
|
|
163
165
|
exports.useRouteKey = route.useRouteKey;
|
|
164
166
|
exports.useRouterQuery = route.useRouterQuery;
|
|
165
|
-
exports.useCtx = index$
|
|
166
|
-
exports.useMobCtx = index$
|
|
167
|
+
exports.useCtx = index$i.useCtx;
|
|
168
|
+
exports.useMobCtx = index$i.useMobCtx;
|
|
167
169
|
exports.useViewController = useViewController.useViewController;
|
|
168
170
|
exports.EmptyVNode = vue.EmptyVNode;
|
|
169
171
|
exports.getOrigin = vue.getOrigin;
|
|
@@ -197,7 +199,7 @@ exports.openViewModal = overlayViewUtil.openViewModal;
|
|
|
197
199
|
exports.openViewPopover = overlayViewUtil.openViewPopover;
|
|
198
200
|
exports.useAppStore = appStore.useAppStore;
|
|
199
201
|
exports.useUIStore = uiStore.useUIStore;
|
|
200
|
-
exports.piniaInstance = index$
|
|
202
|
+
exports.piniaInstance = index$j.piniaInstance;
|
|
201
203
|
exports.RequiredProp = common.RequiredProp;
|
|
202
204
|
exports.getGridInputIpProps = textBox.getGridInputIpProps;
|
|
203
205
|
exports.getGridInputNumberProps = textBox.getGridInputNumberProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.5.3-beta.
|
|
3
|
+
"version": "0.5.3-beta.10",
|
|
4
4
|
"description": "vue3 工具包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@ibiz-template/cli": "^0.3.10",
|
|
34
|
-
"@ibiz-template/core": "^0.5.
|
|
35
|
-
"@ibiz-template/runtime": "^0.5.3-beta.
|
|
34
|
+
"@ibiz-template/core": "^0.5.3-beta.7",
|
|
35
|
+
"@ibiz-template/runtime": "^0.5.3-beta.10",
|
|
36
36
|
"@ibiz-template/theme": "^0.5.0",
|
|
37
|
-
"@ibiz/model-core": "^0.1.
|
|
37
|
+
"@ibiz/model-core": "^0.1.4",
|
|
38
38
|
"@types/path-browserify": "^1.0.2",
|
|
39
39
|
"@types/qs": "^6.9.11",
|
|
40
40
|
"@types/systemjs": "^6.13.5",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@ibiz-template/core": "^0.5.0-beta.0",
|
|
53
53
|
"@ibiz-template/runtime": "^0.5.0-beta.0",
|
|
54
|
-
"@ibiz/model-core": "^0.1.
|
|
54
|
+
"@ibiz/model-core": "^0.1.4",
|
|
55
55
|
"dayjs": "^1.11.10",
|
|
56
56
|
"path-browserify": "^1.0.1",
|
|
57
57
|
"pinia": "^2.1.7",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"vue": "^3.3.4",
|
|
62
62
|
"vue-router": "^4.2.4"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "6997100aac867fbbc4d41f5685825df5531facef"
|
|
65
65
|
}
|