@ibiz-template/vue3-util 0.7.41-alpha.2 → 0.7.41-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/common/badge/badge.css +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/index.d.ts +1 -0
- package/es/common/index.d.ts.map +1 -1
- package/es/common/index.mjs +1 -0
- package/es/common/signature-pad/signature-pad.css +1 -0
- package/es/common/signature-pad/signature-pad.d.ts +19 -0
- package/es/common/signature-pad/signature-pad.d.ts.map +1 -0
- package/es/common/signature-pad/signature-pad.mjs +165 -0
- package/es/common/signature-pad/util/bezier.d.ts +58 -0
- package/es/common/signature-pad/util/bezier.d.ts.map +1 -0
- package/es/common/signature-pad/util/bezier.mjs +109 -0
- package/es/common/signature-pad/util/point.d.ts +55 -0
- package/es/common/signature-pad/util/point.d.ts.map +1 -0
- package/es/common/signature-pad/util/point.mjs +51 -0
- package/es/common/signature-pad/util/signature_pad.d.ts +593 -0
- package/es/common/signature-pad/util/signature_pad.d.ts.map +1 -0
- package/es/common/signature-pad/util/signature_pad.mjs +1018 -0
- package/es/common/view-shell/view-shell.d.ts +8 -1
- package/es/common/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +13 -2
- 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 +1 -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/index.mjs +2 -0
- package/es/locale/en/index.d.ts +1 -0
- package/es/locale/en/index.d.ts.map +1 -1
- package/es/locale/en/index.mjs +2 -1
- package/es/locale/zh-CN/index.d.ts +1 -0
- package/es/locale/zh-CN/index.d.ts.map +1 -1
- package/es/locale/zh-CN/index.mjs +2 -1
- package/es/panel-component/multi-data-container/multi-data-container.d.ts +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts +1 -1
- package/es/panel-component/nav-pos/nav-pos.d.ts +1 -1
- package/es/panel-component/panel-container/panel-container.d.ts.map +1 -1
- package/es/panel-component/panel-container/panel-container.mjs +30 -2
- package/es/panel-component/panel-field/panel-field.controller.mjs +1 -1
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts +1 -1
- package/es/panel-component/single-data-container/single-data-container.d.ts +1 -1
- package/es/panel-component/single-data-container/single-data-container.d.ts.map +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 +13 -12
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +24 -18
- package/es/use/index.d.ts +1 -0
- package/es/use/index.d.ts.map +1 -1
- package/es/use/index.mjs +2 -0
- package/es/use/storage/index.d.ts +4 -6
- package/es/use/storage/index.d.ts.map +1 -1
- package/es/use/storage/index.mjs +16 -11
- package/es/use/vue-use/computed-async.d.ts +51 -0
- package/es/use/vue-use/computed-async.d.ts.map +1 -0
- package/es/use/vue-use/computed-async.mjs +66 -0
- package/es/use/vue-use/index.d.ts +2 -0
- package/es/use/vue-use/index.d.ts.map +1 -0
- package/es/use/vue-use/index.mjs +3 -0
- package/es/util/install.d.ts.map +1 -1
- package/es/util/overlay-container/overlay-container.d.ts +1 -1
- package/es/util/overlay-container/overlay-container.d.ts.map +1 -1
- package/es/util/overlay-container/overlay-container.mjs +7 -2
- package/es/util/overlay-view-util/overlay-view-util.d.ts +2 -2
- package/es/util/overlay-view-util/overlay-view-util.d.ts.map +1 -1
- package/es/util/overlay-view-util/overlay-view-util.mjs +2 -1
- 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 +18 -3
- package/es/view/common/index.d.ts.map +1 -1
- package/es/view/common/index.mjs +2 -0
- package/es/view/common/view.d.ts.map +1 -1
- package/es/view/common/view.mjs +14 -1
- package/es/view/md-custom-view/md-custom-view.provider.d.ts +13 -0
- package/es/view/md-custom-view/md-custom-view.provider.d.ts.map +1 -0
- package/es/view/md-custom-view/md-custom-view.provider.mjs +13 -0
- package/lib/common/badge/badge.css +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/index.cjs +2 -0
- package/lib/common/signature-pad/signature-pad.cjs +167 -0
- package/lib/common/signature-pad/signature-pad.css +1 -0
- package/lib/common/signature-pad/util/bezier.cjs +111 -0
- package/lib/common/signature-pad/util/point.cjs +53 -0
- package/lib/common/signature-pad/util/signature_pad.cjs +1022 -0
- package/lib/common/view-shell/view-shell.cjs +13 -2
- package/lib/control/panel/panel/panel.cjs +12 -1
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +12 -1
- package/lib/index.cjs +4 -0
- package/lib/locale/en/index.cjs +2 -1
- package/lib/locale/zh-CN/index.cjs +2 -1
- package/lib/panel-component/panel-container/panel-container.cjs +29 -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 +24 -18
- package/lib/use/index.cjs +3 -0
- package/lib/use/storage/index.cjs +16 -11
- package/lib/use/vue-use/computed-async.cjs +68 -0
- package/lib/use/vue-use/index.cjs +7 -0
- package/lib/util/overlay-container/overlay-container.cjs +7 -2
- package/lib/util/overlay-view-util/overlay-view-util.cjs +2 -1
- package/lib/util/render/render.cjs +4 -1
- package/lib/util/route/route.cjs +18 -3
- package/lib/view/common/index.cjs +2 -0
- package/lib/view/common/view.cjs +13 -0
- package/lib/view/md-custom-view/md-custom-view.provider.cjs +15 -0
- package/package.json +7 -7
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 获取本地缓存key函数
|
|
3
|
-
*
|
|
4
|
-
* @author zhanghengfeng
|
|
5
|
-
* @date 2024-05-29 21:05:53
|
|
2
|
+
* @description 获取本地缓存key函数
|
|
6
3
|
* @export
|
|
7
4
|
* @param {IContext} context
|
|
8
5
|
* @param {string} type
|
|
9
6
|
* @param {number} [routeDepth]
|
|
10
7
|
* @param {string} [splitter='@']
|
|
11
|
-
* @
|
|
8
|
+
* @param {string} [noRouteTag='']
|
|
9
|
+
* @returns {*} {(() => string | undefined)}
|
|
12
10
|
*/
|
|
13
|
-
export declare function useLocalCacheKey(context: IContext, type: string, routeDepth?: number, splitter?: string): () => string | undefined;
|
|
11
|
+
export declare function useLocalCacheKey(context: IContext, type: string, routeDepth?: number, splitter?: string, noRouteTag?: string): () => string | undefined;
|
|
14
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/use/storage/index.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/use/storage/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,GAAE,MAAY,EACtB,UAAU,GAAE,MAAW,GACtB,MAAM,MAAM,GAAG,SAAS,CA0B1B"}
|
package/es/use/storage/index.mjs
CHANGED
|
@@ -3,24 +3,29 @@ import '../../util/index.mjs';
|
|
|
3
3
|
import { route2routePath, routePath2string } from '../../util/route/route.mjs';
|
|
4
4
|
|
|
5
5
|
"use strict";
|
|
6
|
-
function useLocalCacheKey(context, type, routeDepth, splitter = "@") {
|
|
6
|
+
function useLocalCacheKey(context, type, routeDepth, splitter = "@", noRouteTag = "") {
|
|
7
7
|
const router = useRouter();
|
|
8
8
|
return () => {
|
|
9
9
|
if (!router) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
const userId = context.srfuserid;
|
|
13
|
-
const routePath = route2routePath(router.currentRoute.value);
|
|
14
13
|
routeDepth = context.srfdefaulttoroutedepth || routeDepth;
|
|
15
|
-
if (
|
|
16
|
-
routePath
|
|
17
|
-
routePath.pathNodes
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
if (routeDepth) {
|
|
15
|
+
const routePath = route2routePath(router.currentRoute.value);
|
|
16
|
+
if (userId && routePath.pathNodes[routeDepth - 2]) {
|
|
17
|
+
routePath.pathNodes = routePath.pathNodes.slice(0, routeDepth - 1);
|
|
18
|
+
routePath.pathNodes.forEach((pathNode) => {
|
|
19
|
+
if (pathNode.context) {
|
|
20
|
+
delete pathNode.context.srfnavctrlid;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const url = routePath2string(routePath);
|
|
24
|
+
return "".concat(type).concat(splitter).concat(userId).concat(splitter).concat(url);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (noRouteTag) {
|
|
28
|
+
return "".concat(type).concat(splitter).concat(userId).concat(splitter).concat(noRouteTag);
|
|
24
29
|
}
|
|
25
30
|
};
|
|
26
31
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Handle overlapping async evaluations.
|
|
4
|
+
*
|
|
5
|
+
* @param cancelCallback The provided callback is invoked when a re-evaluation of the computed value is triggered before the previous one finished
|
|
6
|
+
*/
|
|
7
|
+
export type AsyncComputedOnCancel = (cancelCallback: () => void) => void;
|
|
8
|
+
export interface AsyncComputedOptions<Lazy = boolean> {
|
|
9
|
+
/**
|
|
10
|
+
* Should value be evaluated lazily
|
|
11
|
+
*
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
lazy?: Lazy;
|
|
15
|
+
/**
|
|
16
|
+
* Ref passed to receive the updated of async evaluation
|
|
17
|
+
*/
|
|
18
|
+
evaluating?: Ref<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Use shallowRef
|
|
21
|
+
*
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
shallow?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The flush option allows for greater control over the timing of a history point, default to `pre`
|
|
27
|
+
*
|
|
28
|
+
* Possible values: `pre`, `post`, `sync`
|
|
29
|
+
*
|
|
30
|
+
* It works in the same way as the flush option in watch and watch effect in vue reactivity
|
|
31
|
+
* @default 'pre'
|
|
32
|
+
*/
|
|
33
|
+
flush?: 'pre' | 'post' | 'sync';
|
|
34
|
+
/**
|
|
35
|
+
* Callback when error is caught.
|
|
36
|
+
*/
|
|
37
|
+
onError?: (e: unknown) => void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Create an asynchronous computed dependency.
|
|
41
|
+
*
|
|
42
|
+
* @see https://vueuse.org/computedAsync
|
|
43
|
+
* @param evaluationCallback The promise-returning callback which generates the computed value
|
|
44
|
+
* @param initialState The initial state, used until the first evaluation finishes
|
|
45
|
+
* @param optionsOrRef Additional options or a ref passed to receive the updates of the async evaluation
|
|
46
|
+
*/
|
|
47
|
+
export declare function computedAsync<T>(evaluationCallback: (onCancel: AsyncComputedOnCancel) => T | Promise<T>, initialState: T, optionsOrRef: AsyncComputedOptions<true>): ComputedRef<T>;
|
|
48
|
+
export declare function computedAsync<T>(evaluationCallback: (onCancel: AsyncComputedOnCancel) => T | Promise<T>, initialState: undefined, optionsOrRef: AsyncComputedOptions<true>): ComputedRef<T | undefined>;
|
|
49
|
+
export declare function computedAsync<T>(evaluationCallback: (onCancel: AsyncComputedOnCancel) => T | Promise<T>, initialState: T, optionsOrRef?: Ref<boolean> | AsyncComputedOptions): Ref<T>;
|
|
50
|
+
export declare function computedAsync<T>(evaluationCallback: (onCancel: AsyncComputedOnCancel) => T | Promise<T>, initialState?: undefined, optionsOrRef?: Ref<boolean> | AsyncComputedOptions): Ref<T | undefined>;
|
|
51
|
+
//# sourceMappingURL=computed-async.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computed-async.d.ts","sourceRoot":"","sources":["../../../src/use/vue-use/computed-async.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG5C;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,cAAc,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;AAEzE,MAAM,WAAW,oBAAoB,CAAC,IAAI,GAAG,OAAO;IAClD;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAE1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,kBAAkB,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACvE,YAAY,EAAE,CAAC,EACf,YAAY,EAAE,oBAAoB,CAAC,IAAI,CAAC,GACvC,WAAW,CAAC,CAAC,CAAC,CAAC;AAClB,wBAAgB,aAAa,CAAC,CAAC,EAC7B,kBAAkB,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACvE,YAAY,EAAE,SAAS,EACvB,YAAY,EAAE,oBAAoB,CAAC,IAAI,CAAC,GACvC,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AAC9B,wBAAgB,aAAa,CAAC,CAAC,EAC7B,kBAAkB,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACvE,YAAY,EAAE,CAAC,EACf,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,oBAAoB,GACjD,GAAG,CAAC,CAAC,CAAC,CAAC;AACV,wBAAgB,aAAa,CAAC,CAAC,EAC7B,kBAAkB,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACvE,YAAY,CAAC,EAAE,SAAS,EACxB,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,oBAAoB,GACjD,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { NOOP } from '@ibiz-template/core';
|
|
2
|
+
import { isRef, shallowRef, ref, watchEffect, computed } from 'vue';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
function computedAsync(evaluationCallback, initialState, optionsOrRef) {
|
|
6
|
+
let options;
|
|
7
|
+
if (isRef(optionsOrRef)) {
|
|
8
|
+
options = {
|
|
9
|
+
evaluating: optionsOrRef
|
|
10
|
+
};
|
|
11
|
+
} else {
|
|
12
|
+
options = optionsOrRef || {};
|
|
13
|
+
}
|
|
14
|
+
const {
|
|
15
|
+
lazy = false,
|
|
16
|
+
flush = "pre",
|
|
17
|
+
evaluating = void 0,
|
|
18
|
+
shallow = true,
|
|
19
|
+
onError = NOOP
|
|
20
|
+
} = options;
|
|
21
|
+
const started = shallowRef(!lazy);
|
|
22
|
+
const current = shallow ? shallowRef(initialState) : ref(initialState);
|
|
23
|
+
let counter = 0;
|
|
24
|
+
watchEffect(
|
|
25
|
+
async (onInvalidate) => {
|
|
26
|
+
if (!started.value)
|
|
27
|
+
return;
|
|
28
|
+
counter++;
|
|
29
|
+
const counterAtBeginning = counter;
|
|
30
|
+
let hasFinished = false;
|
|
31
|
+
if (evaluating) {
|
|
32
|
+
Promise.resolve().then(() => {
|
|
33
|
+
evaluating.value = true;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const result = await evaluationCallback((cancelCallback) => {
|
|
38
|
+
onInvalidate(() => {
|
|
39
|
+
if (evaluating)
|
|
40
|
+
evaluating.value = false;
|
|
41
|
+
if (!hasFinished)
|
|
42
|
+
cancelCallback();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
if (counterAtBeginning === counter)
|
|
46
|
+
current.value = result;
|
|
47
|
+
} catch (e) {
|
|
48
|
+
onError(e);
|
|
49
|
+
} finally {
|
|
50
|
+
if (evaluating && counterAtBeginning === counter)
|
|
51
|
+
evaluating.value = false;
|
|
52
|
+
hasFinished = true;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{ flush }
|
|
56
|
+
);
|
|
57
|
+
if (lazy) {
|
|
58
|
+
return computed(() => {
|
|
59
|
+
started.value = true;
|
|
60
|
+
return current.value;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return current;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { computedAsync };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/use/vue-use/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
package/es/util/install.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/util/install.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAEvC,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAE5C,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/util/install.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAEvC,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAE5C,eAAO,MAAM,WAAW,YAChB,CAAC,WACE,CAAC,EAAE,EAAE,GAAG,KAAK,IAAI,KACzB,gBAAgB,CAAC,CAKnB,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { App, Component, VNode } from 'vue';
|
|
|
9
9
|
* @export
|
|
10
10
|
* @class OverlayContainer
|
|
11
11
|
*/
|
|
12
|
-
export declare class OverlayContainer<O> implements IOverlayContainer {
|
|
12
|
+
export declare class OverlayContainer<O extends IData = IData> implements IOverlayContainer {
|
|
13
13
|
protected component: unknown;
|
|
14
14
|
protected render: (...args: any[]) => VNode;
|
|
15
15
|
protected opts?: O | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-container.d.ts","sourceRoot":"","sources":["../../../src/util/overlay-container/overlay-container.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,SAAS,EAAK,KAAK,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"overlay-container.d.ts","sourceRoot":"","sources":["../../../src/util/overlay-container/overlay-container.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,SAAS,EAAK,KAAK,EAAE,MAAM,KAAK,CAAC;AAI/C;;;;;;;GAOG;AACH,qBAAa,gBAAgB,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,CACnD,YAAW,iBAAiB;IA2C1B,SAAS,CAAC,SAAS,EAAE,OAAO;IAC5B,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK;IAC3C,SAAS,CAAC,IAAI,CAAC;IA3CjB,SAAS,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC;IAEnB;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC;IAErB;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;OAMG;IACH,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC,CAAiB;IAE9E;;;;;;;;OAQG;gBAES,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,EACjC,IAAI,CAAC,eAAG;IAKpB,MAAM,CAAC,YAAY,CACjB,cAAc,EAAE,SAAS,EACzB,UAAU,CAAC,EAAE,KAAK,GACjB,GAAG,CAAC,OAAO,CAAC;IAIf;;;;;;;OAOG;IACH,SAAS,CAAC,IAAI,IAAI,IAAI;IAsCtB;;;;;;;OAOG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B;;;;;;;OAOG;IACG,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5C;;;;;;;OAOG;IACG,aAAa,CAAC,CAAC,GAAG,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;CAS/C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { QXEvent } from 'qx-util';
|
|
2
2
|
import { h } from 'vue';
|
|
3
3
|
import { RuntimeError } from '@ibiz-template/core';
|
|
4
|
+
import { isElement } from 'lodash-es';
|
|
4
5
|
|
|
5
6
|
"use strict";
|
|
6
7
|
class OverlayContainer {
|
|
@@ -42,13 +43,17 @@ class OverlayContainer {
|
|
|
42
43
|
const self = this;
|
|
43
44
|
const { render, opts } = this;
|
|
44
45
|
const container = document.createElement("div");
|
|
45
|
-
document.body
|
|
46
|
+
let appendTo = document.body;
|
|
47
|
+
if (isElement(opts == null ? void 0 : opts.appendTo)) {
|
|
48
|
+
appendTo = opts == null ? void 0 : opts.appendTo;
|
|
49
|
+
}
|
|
50
|
+
appendTo.appendChild(container);
|
|
46
51
|
const vm = OverlayContainer.createVueApp({
|
|
47
52
|
mounted() {
|
|
48
53
|
self.modal = this.$refs.root;
|
|
49
54
|
},
|
|
50
55
|
unmounted() {
|
|
51
|
-
|
|
56
|
+
appendTo.removeChild(container);
|
|
52
57
|
self.evt.emit("dismiss", self.result);
|
|
53
58
|
},
|
|
54
59
|
render() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IDrawerOptions, IFloatWindowOptions, IModal, IModalData, IModalOptions, IPopoverOptions } from '@ibiz-template/runtime';
|
|
1
|
+
import { IDrawerOptions, IFloatWindowOptions, IModal, IModalData, IModalOptions, IPopoverOptions, IViewShellHooks } from '@ibiz-template/runtime';
|
|
2
2
|
import { VNode } from 'vue';
|
|
3
|
-
export declare function createOverlayView(props?: IParams): (modal: IModal) => VNode;
|
|
3
|
+
export declare function createOverlayView(props?: IParams): (modal: IModal, viewShellHooks?: IViewShellHooks) => VNode;
|
|
4
4
|
export declare function openViewModal(props?: IParams, opts?: IModalOptions): Promise<IModalData>;
|
|
5
5
|
export declare function openViewFloatWindow(props?: IParams, opts?: IFloatWindowOptions): Promise<IModalData>;
|
|
6
6
|
export declare function openViewDrawer(props?: IParams, opts?: IDrawerOptions): Promise<IModalData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-view-util.d.ts","sourceRoot":"","sources":["../../../src/util/overlay-view-util/overlay-view-util.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,UAAU,EACV,aAAa,EACb,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAuB,KAAK,EAAE,MAAM,KAAK,CAAC;AAEjD,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"overlay-view-util.d.ts","sourceRoot":"","sources":["../../../src/util/overlay-view-util/overlay-view-util.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAuB,KAAK,EAAE,MAAM,KAAK,CAAC;AAEjD,wBAAgB,iBAAiB,CAC/B,KAAK,CAAC,EAAE,OAAO,GACd,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,eAAe,KAAK,KAAK,CAS5D;AAED,wBAAsB,aAAa,CACjC,KAAK,CAAC,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,aAAa,GACnB,OAAO,CAAC,UAAU,CAAC,CASrB;AAED,wBAAsB,mBAAmB,CACvC,KAAK,CAAC,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,mBAAmB,GACzB,OAAO,CAAC,UAAU,CAAC,CASrB;AAED,wBAAsB,cAAc,CAClC,KAAK,CAAC,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,UAAU,CAAC,CASrB;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,UAAU,EACjB,KAAK,CAAC,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,eAAe,GACrB,OAAO,CAAC,UAAU,CAAC,CASrB;AASD,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,GACf,cAAc,CAAC,WAAW,CAAC,CAE7B"}
|
|
@@ -2,10 +2,11 @@ import { resolveComponent, h } from 'vue';
|
|
|
2
2
|
|
|
3
3
|
"use strict";
|
|
4
4
|
function createOverlayView(props) {
|
|
5
|
-
return (modal) => {
|
|
5
|
+
return (modal, viewShellHooks) => {
|
|
6
6
|
const viewShell = resolveComponent("IBizViewShell");
|
|
7
7
|
return h(viewShell, {
|
|
8
8
|
...props,
|
|
9
|
+
viewShellHooks,
|
|
9
10
|
modal
|
|
10
11
|
});
|
|
11
12
|
};
|
|
@@ -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,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,CAiC7D;AA+BD;;;;;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,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA4E3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAkC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,OAAe,GAC5B,OAAO,CAAC,cAAc,CAAC,CAoEzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,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,CAcN"}
|
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
|
});
|
|
@@ -174,6 +179,7 @@ async function calcResRoutePath(routePath, context, appDataEntityId, appId) {
|
|
|
174
179
|
}
|
|
175
180
|
}
|
|
176
181
|
async function generateRoutePath(appView, route, context, params) {
|
|
182
|
+
var _a;
|
|
177
183
|
const routePath = route2routePath(route);
|
|
178
184
|
let depth = context.srfdefaulttoroutedepth || 2;
|
|
179
185
|
if (context.toRouteDepth) {
|
|
@@ -186,6 +192,10 @@ async function generateRoutePath(appView, route, context, params) {
|
|
|
186
192
|
};
|
|
187
193
|
}
|
|
188
194
|
}
|
|
195
|
+
let srfmenuitem = params == null ? void 0 : params.srfmenuitem;
|
|
196
|
+
if (!srfmenuitem && routePath.pathNodes.length > 1) {
|
|
197
|
+
srfmenuitem = (_a = routePath.pathNodes[1].params) == null ? void 0 : _a.srfmenuitem;
|
|
198
|
+
}
|
|
189
199
|
routePath.pathNodes.splice(depth - 1, routePath.pathNodes.length - depth + 1);
|
|
190
200
|
if (context.currentSrfNav) {
|
|
191
201
|
const currentNode = routePath.pathNodes[routePath.pathNodes.length - 1];
|
|
@@ -219,6 +229,10 @@ async function generateRoutePath(appView, route, context, params) {
|
|
|
219
229
|
delete routePath.pathNodes[0].context[deName];
|
|
220
230
|
}
|
|
221
231
|
}
|
|
232
|
+
if (srfmenuitem && routePath.pathNodes.length > 1) {
|
|
233
|
+
const tempParams = routePath.pathNodes[1].params || {};
|
|
234
|
+
routePath.pathNodes[1].params = { ...tempParams, srfmenuitem };
|
|
235
|
+
}
|
|
222
236
|
return { path: routePath2string(routePath) };
|
|
223
237
|
}
|
|
224
238
|
async function generateRoutePathByModal(appView, route, context, params) {
|
|
@@ -319,7 +333,8 @@ function onRouteChange(callback, depth) {
|
|
|
319
333
|
throw new RuntimeError(ibiz.i18n.t("vue3Util.util.routeCorrectly"));
|
|
320
334
|
}
|
|
321
335
|
watch(
|
|
322
|
-
|
|
336
|
+
// fix: odoo脚本触发路径query变更未触发路由变更事件
|
|
337
|
+
() => route == null ? void 0 : route.fullPath,
|
|
323
338
|
() => {
|
|
324
339
|
const currentKey = getNestedRoutePath(route, depth);
|
|
325
340
|
callback({ currentKey, fullPath: route.fullPath });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/view/common/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/view/common/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAUnB,CAAC"}
|
package/es/view/common/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import '../../util/index.mjs';
|
|
|
3
3
|
import { ViewProvider } from './view.provider.mjs';
|
|
4
4
|
import { View } from './view.mjs';
|
|
5
5
|
import { AppDataUploadViewProvider } from '../app-data-upload-view/app-data-upload-view.provider.mjs';
|
|
6
|
+
import { MDCustomViewProvider } from '../md-custom-view/md-custom-view.provider.mjs';
|
|
6
7
|
import { withInstall } from '../../util/install.mjs';
|
|
7
8
|
|
|
8
9
|
"use strict";
|
|
@@ -13,6 +14,7 @@ const IBizView = withInstall(View, function(v) {
|
|
|
13
14
|
"APPDATAUPLOADVIEW",
|
|
14
15
|
() => new AppDataUploadViewProvider()
|
|
15
16
|
);
|
|
17
|
+
registerViewProvider("DEMDCUSTOMVIEW", () => new MDCustomViewProvider());
|
|
16
18
|
});
|
|
17
19
|
|
|
18
20
|
export { IBizView };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/view/common/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EACN,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAGL,QAAQ,EAER,KAAK,
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/view/common/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EACN,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAGL,QAAQ,EAER,KAAK,EAON,MAAM,KAAK,CAAC;AACb,OAAO,aAAa,CAAC;AAGrB,eAAO,MAAM,IAAI;IAGb;;OAEG;;;;IAEH;;;OAGG;;;;;IAEH;;OAEG;;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;;;;;uCAkDW,0BAA0B,KACrC,IAAI;yBAmBqB,QAAQ,cAAa,KAAK,KAAQ,OAAO;0BAkBxC,QAAQ,cAAa,KAAK,KAAQ,KAAK;+BA/DlC,QAAQ,KAAG,MAAM,GAAG,SAAS;;;IAhD/D;;OAEG;;;;IAEH;;;OAGG;;;;;IAEH;;OAEG;;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;MAuOL,CAAC"}
|
package/es/view/common/view.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, defineComponent, computed, renderSlot, resolveComponent, h, createVNode, Teleport, withDirectives, resolveDirective } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, computed, renderSlot, resolveComponent, h, onMounted, nextTick, onBeforeUnmount, createVNode, Teleport, withDirectives, resolveDirective } from 'vue';
|
|
2
2
|
import { ViewController, getControlsByView, getCtrlTeleportParams, getErrorViewProvider } from '@ibiz-template/runtime';
|
|
3
3
|
import './view.css';
|
|
4
4
|
import '../../use/index.mjs';
|
|
@@ -127,6 +127,19 @@ const View = /* @__PURE__ */ defineComponent({
|
|
|
127
127
|
}
|
|
128
128
|
return h(comp, ctrlProps);
|
|
129
129
|
};
|
|
130
|
+
let watermarkDestroy;
|
|
131
|
+
onMounted(() => {
|
|
132
|
+
nextTick(async () => {
|
|
133
|
+
const container = document.getElementById(c.id);
|
|
134
|
+
const appView = await ibiz.hub.config.view.get(c.model.id);
|
|
135
|
+
if (!container || !(appView == null ? void 0 : appView.waterMarkOption))
|
|
136
|
+
return;
|
|
137
|
+
watermarkDestroy = ibiz.util.watermark.mount(appView.waterMarkOption, container, c.context, c.params, c.state.srfactiveviewdata || {});
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
onBeforeUnmount(() => {
|
|
141
|
+
watermarkDestroy == null ? void 0 : watermarkDestroy();
|
|
142
|
+
});
|
|
130
143
|
return {
|
|
131
144
|
c,
|
|
132
145
|
ns,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CTX, IMDCustomViewState, IViewController, IViewEvent, IViewProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { IAppDECustomView } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* @description 实体多数据自定义视图适配器
|
|
5
|
+
* @export
|
|
6
|
+
* @class MDCustomViewProvider
|
|
7
|
+
* @implements {IViewProvider}
|
|
8
|
+
*/
|
|
9
|
+
export declare class MDCustomViewProvider implements IViewProvider {
|
|
10
|
+
component: string;
|
|
11
|
+
createController(model: IAppDECustomView, context: IContext, params?: IParams | undefined, ctx?: CTX<IViewController<IAppDECustomView, IMDCustomViewState, IViewEvent>> | undefined): IViewController<IAppDECustomView, IMDCustomViewState, IViewEvent>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=md-custom-view.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md-custom-view.provider.d.ts","sourceRoot":"","sources":["../../../src/view/md-custom-view/md-custom-view.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,aAAa;IACxD,SAAS,EAAE,MAAM,CAAc;IAE/B,gBAAgB,CACd,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,EAC5B,GAAG,CAAC,EACA,GAAG,CAAC,eAAe,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC,GACtE,SAAS,GACZ,eAAe,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,UAAU,CAAC;CAGrE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MDCustomViewController } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class MDCustomViewProvider {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.component = "IBizView";
|
|
7
|
+
}
|
|
8
|
+
createController(model, context, params, ctx) {
|
|
9
|
+
return new MDCustomViewController(model, context, params, ctx);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { MDCustomViewProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-badge{display:inline-
|
|
1
|
+
.ibiz-badge{--ibiz-badge-bg-color:var(--ibiz-color-danger);--ibiz-badge-height:18px;--ibiz-badge-border-radius:10px;display:inline-flex;align-items:center;justify-content:center;width:auto;height:var(--ibiz-badge-height);padding:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-small);line-height:normal;color:var(--ibiz-color-danger-text);white-space:nowrap;background-color:var(--ibiz-badge-bg-color);border:1px solid transparent;border-radius:var(--ibiz-badge-border-radius)}.ibiz-badge--danger{--ibiz-badge-bg-color:var(--ibiz-color-danger)}.ibiz-badge--success{--ibiz-badge-bg-color:var(--ibiz-color-success)}.ibiz-badge--warning{--ibiz-badge-bg-color:var(--ibiz-color-warning)}.ibiz-badge--info{--ibiz-badge-bg-color:var(--ibiz-color-info)}.ibiz-badge--primary{--ibiz-badge-bg-color:var(--ibiz-color-primary)}
|
|
@@ -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) {
|
package/lib/common/index.cjs
CHANGED
|
@@ -9,6 +9,7 @@ var codeList = require('./code-list/code-list.cjs');
|
|
|
9
9
|
var controlLoadingPlaceholder = require('./control-loading-placeholder/control-loading-placeholder.cjs');
|
|
10
10
|
var badge = require('./badge/badge.cjs');
|
|
11
11
|
var customRender = require('./custom-render/custom-render.cjs');
|
|
12
|
+
var signaturePad = require('./signature-pad/signature-pad.cjs');
|
|
12
13
|
|
|
13
14
|
"use strict";
|
|
14
15
|
|
|
@@ -21,3 +22,4 @@ exports.IBizCodeList = codeList.IBizCodeList;
|
|
|
21
22
|
exports.ControlLoadingPlaceholder = controlLoadingPlaceholder.ControlLoadingPlaceholder;
|
|
22
23
|
exports.IBizBadge = badge.IBizBadge;
|
|
23
24
|
exports.IBizCustomRender = customRender.IBizCustomRender;
|
|
25
|
+
exports.IBizSignaturePad = signaturePad.IBizSignaturePad;
|