@ibiz-template/runtime 0.5.7-alpha.1 → 0.5.7-alpha.3
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.esm.js +1840 -78
- package/dist/index.system.min.js +1 -1
- package/out/application.d.ts +7 -0
- package/out/application.d.ts.map +1 -1
- package/out/application.js +23 -10
- package/out/constant/index.d.ts +1 -0
- package/out/constant/index.d.ts.map +1 -1
- package/out/constant/index.js +1 -0
- package/out/constant/preset-identifier.d.ts +15 -0
- package/out/constant/preset-identifier.d.ts.map +1 -0
- package/out/constant/preset-identifier.js +16 -0
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +4 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts +23 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +56 -4
- package/out/global/global-util/global-util.d.ts +9 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +9 -1
- package/out/interface/common/i-app-service/i-app-service.d.ts +16 -1
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/util/i-animation-util/i-animation-options.d.ts +31 -0
- package/out/interface/util/i-animation-util/i-animation-options.d.ts.map +1 -0
- package/out/interface/util/i-animation-util/i-animation-options.js +1 -0
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +11 -0
- package/out/service/mqtt/mqtt.service.d.ts.map +1 -1
- package/out/service/mqtt/mqtt.service.js +1 -0
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +4 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +4 -4
- package/out/service/utils/de-cache/de-cache.d.ts +2 -4
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +4 -8
- package/out/service/utils/dyna-sys-params/dyna-sys-params.d.ts +21 -0
- package/out/service/utils/dyna-sys-params/dyna-sys-params.d.ts.map +1 -0
- package/out/service/utils/dyna-sys-params/dyna-sys-params.js +48 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +9 -5
- package/out/service/utils/index.d.ts +1 -0
- package/out/service/utils/index.d.ts.map +1 -1
- package/out/service/utils/index.js +1 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +8 -0
- package/out/ui-action/uiaction-util.d.ts +23 -0
- package/out/ui-action/uiaction-util.d.ts.map +1 -1
- package/out/ui-action/uiaction-util.js +39 -1
- package/out/utils/anime/anime-element-util.d.ts +44 -0
- package/out/utils/anime/anime-element-util.d.ts.map +1 -0
- package/out/utils/anime/anime-element-util.js +108 -0
- package/out/utils/anime/anime-util/anime-util.d.ts +60 -0
- package/out/utils/anime/anime-util/anime-util.d.ts.map +1 -0
- package/out/utils/anime/anime-util/anime-util.js +96 -0
- package/out/utils/anime/anime.d.ts +27 -0
- package/out/utils/anime/anime.d.ts.map +1 -0
- package/out/utils/anime/anime.js +86 -0
- package/out/utils/anime/index.d.ts +2 -0
- package/out/utils/anime/index.d.ts.map +1 -0
- package/out/utils/anime/index.js +1 -0
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/package.json +8 -4
- package/src/application.ts +31 -16
- package/src/constant/index.ts +1 -0
- package/src/constant/preset-identifier.ts +15 -0
- package/src/controller/common/editor/editor.controller.ts +11 -1
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +68 -4
- package/src/global/global-util/global-util.ts +10 -0
- package/src/interface/common/i-app-service/i-app-service.ts +18 -0
- package/src/interface/util/i-animation-util/i-animation-options.ts +34 -0
- package/src/interface/util/index.ts +1 -0
- package/src/service/dto/method.dto.ts +16 -0
- package/src/service/mqtt/mqtt.service.ts +1 -0
- package/src/service/service/auth/v7-auth.service.ts +5 -0
- package/src/service/service/entity/method/de-action.ts +2 -12
- package/src/service/utils/de-cache/de-cache.ts +4 -18
- package/src/service/utils/dyna-sys-params/dyna-sys-params.ts +66 -0
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +9 -6
- package/src/service/utils/index.ts +1 -0
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +8 -0
- package/src/ui-action/uiaction-util.ts +48 -1
- package/src/utils/anime/anime-element-util.ts +141 -0
- package/src/utils/anime/anime-util/anime-util.ts +123 -0
- package/src/utils/anime/anime.ts +111 -0
- package/src/utils/anime/index.ts +1 -0
- package/src/utils/index.ts +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 计算动态系统接口参数
|
|
3
|
+
* @author lxm
|
|
4
|
+
* @date 2024-01-25 03:30:18
|
|
5
|
+
* @export
|
|
6
|
+
* @param {string} appDataEntityId 实体id
|
|
7
|
+
* @param {IContext} context 视图上下文
|
|
8
|
+
* @param {{
|
|
9
|
+
* viewParams?: IParams; 视图参数
|
|
10
|
+
* appId?: string; 应用id
|
|
11
|
+
* }} [opts={}]
|
|
12
|
+
*/
|
|
13
|
+
export declare function calcDynaSysParams(appDataEntityId: string, context: IContext, opts?: {
|
|
14
|
+
viewParams?: IParams;
|
|
15
|
+
appId?: string;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
srfkey?: string | undefined;
|
|
18
|
+
srfparentkey?: string | undefined;
|
|
19
|
+
srfparentdeanme?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=dyna-sys-params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dyna-sys-params.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dyna-sys-params/dyna-sys-params.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,GAAE;IACJ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CACX,GACL,OAAO,CAAC;IACT,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,CAAC,CAwCD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getMatchResPath } from '../res-path/res-path';
|
|
2
|
+
/**
|
|
3
|
+
* 计算动态系统接口参数
|
|
4
|
+
* @author lxm
|
|
5
|
+
* @date 2024-01-25 03:30:18
|
|
6
|
+
* @export
|
|
7
|
+
* @param {string} appDataEntityId 实体id
|
|
8
|
+
* @param {IContext} context 视图上下文
|
|
9
|
+
* @param {{
|
|
10
|
+
* viewParams?: IParams; 视图参数
|
|
11
|
+
* appId?: string; 应用id
|
|
12
|
+
* }} [opts={}]
|
|
13
|
+
*/
|
|
14
|
+
export async function calcDynaSysParams(appDataEntityId, context, opts = {}) {
|
|
15
|
+
const appId = opts.appId || context.srfappid;
|
|
16
|
+
const viewParams = opts.viewParams || {};
|
|
17
|
+
const loadModelParams = {};
|
|
18
|
+
const appDe = await ibiz.hub.getAppDataEntity(appDataEntityId, appId);
|
|
19
|
+
// *计算srfkey
|
|
20
|
+
if (viewParams.srfkey) {
|
|
21
|
+
loadModelParams.srfkey = viewParams.srfkey;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
// * 计算资源路径上下文参数
|
|
25
|
+
// 主键
|
|
26
|
+
const srfkey = context[appDe.codeName.toLowerCase()];
|
|
27
|
+
if (srfkey) {
|
|
28
|
+
loadModelParams.srfkey = srfkey;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// *计算上层父实体主键和name
|
|
32
|
+
if (viewParams.srfparentkey && viewParams.srfparentdeanme) {
|
|
33
|
+
loadModelParams.srfparentkey = viewParams.srfparentkey;
|
|
34
|
+
loadModelParams.srfparentdeanme = viewParams.srfparentdeanme;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
// 上层资源路径主实体名称和主键
|
|
38
|
+
const match = getMatchResPath(context, appDe);
|
|
39
|
+
if (match && match.keys.length > 1) {
|
|
40
|
+
const parentDeKey = match.keys[match.keys.length - 2];
|
|
41
|
+
loadModelParams.srfparentkey =
|
|
42
|
+
viewParams.srfparentkey || context[parentDeKey];
|
|
43
|
+
loadModelParams.srfparentdeanme =
|
|
44
|
+
viewParams.srfparentdeanme || parentDeKey;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return loadModelParams;
|
|
48
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-code-list.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dynamic-code-list/dynamic-code-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;;;;GAMG;AACH,KAAK,SAAS,GAAG;IACf;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,GAAG,EAAG,WAAW,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,yBAAgC;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,EAAE,OAAO,CAAS;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1B,QAAQ,EAAE,YAAY;IAIlC;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB3B;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,YAAY;IAwEhD;;;;;;;;;OASG;cACa,IAAI,CAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"dynamic-code-list.d.ts","sourceRoot":"","sources":["../../../../src/service/utils/dynamic-code-list/dynamic-code-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;;;;GAMG;AACH,KAAK,SAAS,GAAG;IACf;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,GAAG,EAAG,WAAW,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,yBAAgC;IAE/C;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,EAAE,OAAO,CAAS;IAExC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;gBAE1B,QAAQ,EAAE,YAAY;IAIlC;;;;;;OAMG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB3B;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,YAAY;IAwEhD;;;;;;;;;OASG;cACa,IAAI,CAClB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC;IA+E1B;;;;OAIG;IACH,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG,SAAS;IAmBrE;;;;;;;;OAQG;IACG,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAE,OAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAyC5E"}
|
|
@@ -44,7 +44,7 @@ export class DynamicCodeListCache {
|
|
|
44
44
|
const { predefinedType } = this.codeList;
|
|
45
45
|
if (predefinedType) {
|
|
46
46
|
this.isPredefined = true;
|
|
47
|
-
if (!['OPERATOR', 'RUNTIME'].includes(predefinedType)) {
|
|
47
|
+
if (!['OPERATOR', 'RUNTIME', 'DEMAINSTATE'].includes(predefinedType)) {
|
|
48
48
|
throw new ModelError(this.codeList, `预定义类型${predefinedType}暂不支持`);
|
|
49
49
|
}
|
|
50
50
|
return;
|
|
@@ -149,10 +149,14 @@ export class DynamicCodeListCache {
|
|
|
149
149
|
}
|
|
150
150
|
// *预定义加载
|
|
151
151
|
if (this.isPredefined && this.codeList.codeName) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
let tag = this.codeList.codeName;
|
|
153
|
+
if (this.codeList.predefinedType === 'OPERATOR') {
|
|
154
|
+
const index = this.codeList.codeName.indexOf('__');
|
|
155
|
+
tag =
|
|
156
|
+
index !== -1
|
|
157
|
+
? this.codeList.codeName.substring(index + 2)
|
|
158
|
+
: this.codeList.codeName;
|
|
159
|
+
}
|
|
156
160
|
const res = await app.net.get(`/dictionaries/codelist/${tag}`, tempParams);
|
|
157
161
|
return Object.freeze(res.data.items);
|
|
158
162
|
}
|
|
@@ -6,4 +6,5 @@ export { DECache } from './de-cache/de-cache';
|
|
|
6
6
|
export { getMatchResPath, calcResPath } from './res-path/res-path';
|
|
7
7
|
export { SearchFilter } from './search-filter/search-filter';
|
|
8
8
|
export { fieldValueToBoolean } from './util/util';
|
|
9
|
+
export { calcDynaSysParams } from './dyna-sys-params/dyna-sys-params';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -6,3 +6,4 @@ export { DECache } from './de-cache/de-cache';
|
|
|
6
6
|
export { getMatchResPath, calcResPath } from './res-path/res-path';
|
|
7
7
|
export { SearchFilter } from './search-filter/search-filter';
|
|
8
8
|
export { fieldValueToBoolean } from './util/util';
|
|
9
|
+
export { calcDynaSysParams } from './dyna-sys-params/dyna-sys-params';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-data-set-node-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/tree-node-data/tree-data-set-node-data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG3E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,aAAa;IACpE,KAAK,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,KAAK,CAAC;IAEvB;;;;OAIG;IACK,KAAK,EAAE,MAAM,mBAAmB,CAAC;gBAGvC,KAAK,EAAE,kBAAkB,EACzB,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,OAAO,CAAC;QACd,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;
|
|
1
|
+
{"version":3,"file":"tree-data-set-node-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/tree-node-data/tree-data-set-node-data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG3E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,aAAa;IACpE,KAAK,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,KAAK,CAAC;IAEvB;;;;OAIG;IACK,KAAK,EAAE,MAAM,mBAAmB,CAAC;gBAGvC,KAAK,EAAE,kBAAkB,EACzB,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,OAAO,CAAC;QACd,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;IA4MH,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,GAAG,KAAK,GAAG,SAAS;IAiBhE;;;;;;;OAOG;IACH,SAAS,CAAC,kBAAkB,CAC1B,QAAQ,EAAE,mBAAmB,GAC5B,MAAM,GAAG,SAAS;IAYrB;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS;CAStE"}
|
|
@@ -82,6 +82,10 @@ export class TreeDataSetNodeData extends TreeNodeData {
|
|
|
82
82
|
const dataItemKeyMap = new Map();
|
|
83
83
|
const dataItemDefaultMap = new Map();
|
|
84
84
|
(_a = model.detreeNodeDataItems) === null || _a === void 0 ? void 0 : _a.forEach(dataItem => {
|
|
85
|
+
// 没有实体的数据项不处理,如操作列的数据项
|
|
86
|
+
if (!dataItem.appDEFieldId) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
85
89
|
const dataItemKey = dataItem.id.toLowerCase();
|
|
86
90
|
// *后台实体属性
|
|
87
91
|
const deFieldKey = dataItem.appDEFieldId.toLowerCase();
|
|
@@ -94,6 +98,10 @@ export class TreeDataSetNodeData extends TreeNodeData {
|
|
|
94
98
|
/** 表格列和数据项的映射 */
|
|
95
99
|
const nodeColumnKeyMap = new Map();
|
|
96
100
|
(_b = model.detreeNodeColumns) === null || _b === void 0 ? void 0 : _b.forEach(column => {
|
|
101
|
+
// 只映射属性列
|
|
102
|
+
if (column.columnType !== 'DEFGRIDCOLUMN') {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
97
105
|
const columnKey = column.detreeColumnId; // 不配树表格列不会有这个模型
|
|
98
106
|
const dataItemKey = column.dataItemName; // 配了就一定有数据项名称
|
|
99
107
|
if (!columnKey || !dataItemKey) {
|
|
@@ -28,5 +28,28 @@ export declare class UIActionUtil {
|
|
|
28
28
|
* @param {IUILogicParams} params 界面行为参数
|
|
29
29
|
*/
|
|
30
30
|
static execAndResolved(actionId: string, params: IUILogicParams, appId: string): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* 处理异步行为
|
|
33
|
+
*
|
|
34
|
+
* @author zk
|
|
35
|
+
* @date 2024-01-23 11:01:58
|
|
36
|
+
* @static
|
|
37
|
+
* @param {(Event | undefined)} event
|
|
38
|
+
* @return {*} {Promise<void>}
|
|
39
|
+
* @memberof UIActionUtil
|
|
40
|
+
*/
|
|
41
|
+
private static handleAsyncAction;
|
|
42
|
+
/**
|
|
43
|
+
* 处理异步行为动画
|
|
44
|
+
*
|
|
45
|
+
* @author zk
|
|
46
|
+
* @date 2024-01-24 04:01:29
|
|
47
|
+
* @private
|
|
48
|
+
* @static
|
|
49
|
+
* @param {(Event | undefined)} event
|
|
50
|
+
* @return {*} {Promise<void>}
|
|
51
|
+
* @memberof UIActionUtil
|
|
52
|
+
*/
|
|
53
|
+
private static handleAsyncActionAnime;
|
|
31
54
|
}
|
|
32
55
|
//# sourceMappingURL=uiaction-util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiaction-util.d.ts","sourceRoot":"","sources":["../../src/ui-action/uiaction-util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/D;;;;;;;GAOG;AACH,qBAAa,YAAY;IACvB;;;;;;;;;OASG;WACU,IAAI,CACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,eAAe,CAAC;IAgB3B;;;;;;;OAOG;WACU,eAAe,CAC1B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"uiaction-util.d.ts","sourceRoot":"","sources":["../../src/ui-action/uiaction-util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/D;;;;;;;GAOG;AACH,qBAAa,YAAY;IACvB;;;;;;;;;OASG;WACU,IAAI,CACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,eAAe,CAAC;IAgB3B;;;;;;;OAOG;WACU,eAAe,CAC1B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;IA6BhB;;;;;;;;;OASG;mBACkB,iBAAiB;IAMtC;;;;;;;;;;OAUG;mBACkB,sBAAsB;CAW5C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RuntimeError } from '@ibiz-template/core';
|
|
2
|
-
import { SysUIActionTag, ViewCallTag } from '../constant';
|
|
2
|
+
import { PresetIdentifier, SysUIActionTag, ViewCallTag } from '../constant';
|
|
3
3
|
import { getUIActionById } from '../model';
|
|
4
4
|
import { getUIActionProvider } from '../register';
|
|
5
5
|
/**
|
|
@@ -65,5 +65,43 @@ export class UIActionUtil {
|
|
|
65
65
|
default:
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
const action = await getUIActionById(actionId, appId);
|
|
69
|
+
// 异步行为模型配置方式:
|
|
70
|
+
// 1、配置实体行为 返回值类型选择为 异步操作对象
|
|
71
|
+
// 2、配置界面行为 界面行为类型选择 后台调用 、配置实体行为
|
|
72
|
+
// 界面行为模型基于选择的实体行为的返回值类型计算异步行为(asyncAction)模型
|
|
73
|
+
if (action.asyncAction && !result.cancel) {
|
|
74
|
+
this.handleAsyncAction(params.event);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 处理异步行为
|
|
79
|
+
*
|
|
80
|
+
* @author zk
|
|
81
|
+
* @date 2024-01-23 11:01:58
|
|
82
|
+
* @static
|
|
83
|
+
* @param {(Event | undefined)} event
|
|
84
|
+
* @return {*} {Promise<void>}
|
|
85
|
+
* @memberof UIActionUtil
|
|
86
|
+
*/
|
|
87
|
+
static async handleAsyncAction(event) {
|
|
88
|
+
this.handleAsyncActionAnime(event);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* 处理异步行为动画
|
|
92
|
+
*
|
|
93
|
+
* @author zk
|
|
94
|
+
* @date 2024-01-24 04:01:29
|
|
95
|
+
* @private
|
|
96
|
+
* @static
|
|
97
|
+
* @param {(Event | undefined)} event
|
|
98
|
+
* @return {*} {Promise<void>}
|
|
99
|
+
* @memberof UIActionUtil
|
|
100
|
+
*/
|
|
101
|
+
static async handleAsyncActionAnime(event) {
|
|
102
|
+
if (!event || !event.target) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
await ibiz.util.anime.moveAndResize(event.target, `#${PresetIdentifier.MESSAGE}`);
|
|
68
106
|
}
|
|
69
107
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare function cloneElement(clone: string | HTMLElement, teleport?: HTMLElement, isRemoveChild?: boolean): HTMLElement;
|
|
2
|
+
/**
|
|
3
|
+
* 获取元素属性
|
|
4
|
+
*
|
|
5
|
+
* @author zk
|
|
6
|
+
* @date 2024-01-25 11:01:06
|
|
7
|
+
* @export
|
|
8
|
+
* @param {HTMLElement} element
|
|
9
|
+
* @return {*} {{
|
|
10
|
+
* width: number;
|
|
11
|
+
* height: number;
|
|
12
|
+
* min: number;
|
|
13
|
+
* padding: number;
|
|
14
|
+
* boundingLeft: number;
|
|
15
|
+
* boundingTop: number;
|
|
16
|
+
* }}
|
|
17
|
+
*/
|
|
18
|
+
export declare function getElementAttribute(element: HTMLElement): {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
padding: number;
|
|
22
|
+
boundingLeft: number;
|
|
23
|
+
boundingTop: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 获取事件动画元素
|
|
27
|
+
*
|
|
28
|
+
* @author zk
|
|
29
|
+
* @date 2024-01-23 11:01:16
|
|
30
|
+
* @param {string} tag
|
|
31
|
+
* @return {*} {(HTMLElement | undefined)}
|
|
32
|
+
* @memberof AnimeElementUtil
|
|
33
|
+
*/
|
|
34
|
+
export declare function getAnimationElement(element: string | HTMLElement): HTMLElement | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* 销毁事件动画元素
|
|
37
|
+
*
|
|
38
|
+
* @author zk
|
|
39
|
+
* @date 2024-01-23 10:01:39
|
|
40
|
+
* @param {HTMLElement} ele
|
|
41
|
+
* @memberof AnimeElementUtil
|
|
42
|
+
*/
|
|
43
|
+
export declare function destroyElement(ele: HTMLElement): void;
|
|
44
|
+
//# sourceMappingURL=anime-element-util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anime-element-util.d.ts","sourceRoot":"","sources":["../../../src/utils/anime/anime-element-util.ts"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,GAAG,WAAW,EAC3B,QAAQ,GAAE,WAA2B,EACrC,aAAa,GAAE,OAAc,GAC5B,WAAW,CAiBb;AA2CD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB,CAeA;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,GAAG,WAAW,GAC5B,WAAW,GAAG,SAAS,CAMzB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAIrD"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// 基础样式
|
|
2
|
+
const baseStyle = {
|
|
3
|
+
position: 'fixed',
|
|
4
|
+
zIndex: '10000',
|
|
5
|
+
};
|
|
6
|
+
export function cloneElement(clone, teleport = document.body, isRemoveChild = true) {
|
|
7
|
+
const element = getAnimationElement(clone);
|
|
8
|
+
if (element == null) {
|
|
9
|
+
throw new Error('Cannot clone a null or undefined element.');
|
|
10
|
+
}
|
|
11
|
+
// 使用 DOM 的 cloneNode 方法深复制元素
|
|
12
|
+
const clonedElement = element.cloneNode(true);
|
|
13
|
+
if (isRemoveChild) {
|
|
14
|
+
while (clonedElement.firstChild) {
|
|
15
|
+
clonedElement.removeChild(clonedElement.firstChild);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const styles = getElementAttribute(element);
|
|
19
|
+
setElementStyle(clonedElement, styles);
|
|
20
|
+
teleport.appendChild(clonedElement);
|
|
21
|
+
// 返回克隆后的元素
|
|
22
|
+
return clonedElement;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 设置元素样式
|
|
26
|
+
*
|
|
27
|
+
* @author zk
|
|
28
|
+
* @date 2024-01-25 11:01:37
|
|
29
|
+
* @param {HTMLElement} element
|
|
30
|
+
* @param {{
|
|
31
|
+
* width: number;
|
|
32
|
+
* height: number;
|
|
33
|
+
* padding: number;
|
|
34
|
+
* boundingLeft: number;
|
|
35
|
+
* boundingTop: number;
|
|
36
|
+
* }} {
|
|
37
|
+
* width,
|
|
38
|
+
* height,
|
|
39
|
+
* boundingLeft,
|
|
40
|
+
* boundingTop,
|
|
41
|
+
* }
|
|
42
|
+
*/
|
|
43
|
+
function setElementStyle(element, { width, height, boundingLeft, boundingTop, }) {
|
|
44
|
+
element.style.left = `${boundingLeft}px`;
|
|
45
|
+
element.style.top = `${boundingTop}px`;
|
|
46
|
+
element.style.width = `${width}px`;
|
|
47
|
+
element.style.height = `${height}px`;
|
|
48
|
+
Object.assign(element.style, baseStyle);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 获取元素属性
|
|
52
|
+
*
|
|
53
|
+
* @author zk
|
|
54
|
+
* @date 2024-01-25 11:01:06
|
|
55
|
+
* @export
|
|
56
|
+
* @param {HTMLElement} element
|
|
57
|
+
* @return {*} {{
|
|
58
|
+
* width: number;
|
|
59
|
+
* height: number;
|
|
60
|
+
* min: number;
|
|
61
|
+
* padding: number;
|
|
62
|
+
* boundingLeft: number;
|
|
63
|
+
* boundingTop: number;
|
|
64
|
+
* }}
|
|
65
|
+
*/
|
|
66
|
+
export function getElementAttribute(element) {
|
|
67
|
+
const width = element.offsetWidth;
|
|
68
|
+
const height = element.offsetHeight;
|
|
69
|
+
const styles = window.getComputedStyle(element);
|
|
70
|
+
const padding = parseFloat(styles.padding);
|
|
71
|
+
const { left: boundingLeft, top: boundingTop } = element.getBoundingClientRect();
|
|
72
|
+
return {
|
|
73
|
+
width,
|
|
74
|
+
height,
|
|
75
|
+
padding,
|
|
76
|
+
boundingLeft,
|
|
77
|
+
boundingTop,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 获取事件动画元素
|
|
82
|
+
*
|
|
83
|
+
* @author zk
|
|
84
|
+
* @date 2024-01-23 11:01:16
|
|
85
|
+
* @param {string} tag
|
|
86
|
+
* @return {*} {(HTMLElement | undefined)}
|
|
87
|
+
* @memberof AnimeElementUtil
|
|
88
|
+
*/
|
|
89
|
+
export function getAnimationElement(element) {
|
|
90
|
+
if (typeof element === 'string') {
|
|
91
|
+
return document.querySelector(element);
|
|
92
|
+
}
|
|
93
|
+
// 参数本身是HTMLElement类型
|
|
94
|
+
return element;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 销毁事件动画元素
|
|
98
|
+
*
|
|
99
|
+
* @author zk
|
|
100
|
+
* @date 2024-01-23 10:01:39
|
|
101
|
+
* @param {HTMLElement} ele
|
|
102
|
+
* @memberof AnimeElementUtil
|
|
103
|
+
*/
|
|
104
|
+
export function destroyElement(ele) {
|
|
105
|
+
if (ele) {
|
|
106
|
+
ele.remove();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IAnimationOptions } from '../../../interface';
|
|
2
|
+
type AnimeTarget = string | HTMLElement;
|
|
3
|
+
/**
|
|
4
|
+
* 动画工具类
|
|
5
|
+
*
|
|
6
|
+
* @author zk
|
|
7
|
+
* @date 2024-01-24 09:01:05
|
|
8
|
+
* @export
|
|
9
|
+
* @class AnimeUtil
|
|
10
|
+
*/
|
|
11
|
+
export declare class AnimeUtil {
|
|
12
|
+
/**
|
|
13
|
+
* 元素移动到指定位置 移动点至指定元素
|
|
14
|
+
*
|
|
15
|
+
* @author zk
|
|
16
|
+
* @date 2024-01-24 09:01:37
|
|
17
|
+
* @param {Event} event
|
|
18
|
+
* @param {HTMLElement} toElement
|
|
19
|
+
* @param {anime.AnimeParams} [options={}]
|
|
20
|
+
* @return {*} {Promise<boolean>}
|
|
21
|
+
* @memberof AnimeUtil
|
|
22
|
+
*/
|
|
23
|
+
movePoint(element: AnimeTarget, tElement: AnimeTarget, options?: IAnimationOptions): Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* 元素移动动画 元素a 移动到元素b
|
|
26
|
+
*
|
|
27
|
+
* @author zk
|
|
28
|
+
* @date 2024-01-24 06:01:35\
|
|
29
|
+
* @param {HTMLElement} element
|
|
30
|
+
* @param {HTMLElement} toElement
|
|
31
|
+
* @param {IAnimationOptions} [options={}]
|
|
32
|
+
* @return {*} {Promise<boolean>}
|
|
33
|
+
* @memberof AnimeUtil
|
|
34
|
+
*/
|
|
35
|
+
moveToTarget(element: HTMLElement, toElement: HTMLElement, options?: IAnimationOptions): Promise<boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* 目标调整大小
|
|
38
|
+
*
|
|
39
|
+
* @author zk
|
|
40
|
+
* @date 2024-01-22 03:01:42
|
|
41
|
+
* @param {HTMLElement} target
|
|
42
|
+
* @param {anime.AnimeParams} [options={}]
|
|
43
|
+
* @param {IData} [builtInParams={}]
|
|
44
|
+
*/
|
|
45
|
+
resize(targets: AnimeTarget | AnimeTarget[], options?: IAnimationOptions): Promise<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* 目标移动和调整大小
|
|
48
|
+
*
|
|
49
|
+
* @author zk
|
|
50
|
+
* @date 2024-01-24 06:01:15
|
|
51
|
+
* @param {HTMLElement} element
|
|
52
|
+
* @param {HTMLElement} toElement
|
|
53
|
+
* @param {IAnimationOptions} [options={}]
|
|
54
|
+
* @return {*} {Promise<boolean>}
|
|
55
|
+
* @memberof AnimeUtil
|
|
56
|
+
*/
|
|
57
|
+
moveAndResize(element: AnimeTarget, toElement: AnimeTarget, options?: IAnimationOptions): Promise<boolean>;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=anime-util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anime-util.d.ts","sourceRoot":"","sources":["../../../../src/utils/anime/anime-util/anime-util.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,KAAK,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AAExC;;;;;;;GAOG;AACH,qBAAa,SAAS;IACpB;;;;;;;;;;OAUG;IACU,SAAS,CACpB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,WAAW,EACrB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC;IA8BnB;;;;;;;;;;OAUG;IACI,YAAY,CACjB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC;IAInB;;;;;;;;OAQG;IACI,MAAM,CACX,OAAO,EAAE,WAAW,GAAG,WAAW,EAAE,EACpC,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC;IAInB;;;;;;;;;;OAUG;IACU,aAAa,CACxB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,WAAW,EACtB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,OAAO,CAAC;CAOpB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { cloneElement, destroyElement, getAnimationElement, getElementAttribute, } from '../anime-element-util';
|
|
2
|
+
import { moveToTarget, resize } from '../anime';
|
|
3
|
+
/**
|
|
4
|
+
* 动画工具类
|
|
5
|
+
*
|
|
6
|
+
* @author zk
|
|
7
|
+
* @date 2024-01-24 09:01:05
|
|
8
|
+
* @export
|
|
9
|
+
* @class AnimeUtil
|
|
10
|
+
*/
|
|
11
|
+
export class AnimeUtil {
|
|
12
|
+
/**
|
|
13
|
+
* 元素移动到指定位置 移动点至指定元素
|
|
14
|
+
*
|
|
15
|
+
* @author zk
|
|
16
|
+
* @date 2024-01-24 09:01:37
|
|
17
|
+
* @param {Event} event
|
|
18
|
+
* @param {HTMLElement} toElement
|
|
19
|
+
* @param {anime.AnimeParams} [options={}]
|
|
20
|
+
* @return {*} {Promise<boolean>}
|
|
21
|
+
* @memberof AnimeUtil
|
|
22
|
+
*/
|
|
23
|
+
async movePoint(element, tElement, options = {}) {
|
|
24
|
+
// 获取移动终点元素
|
|
25
|
+
const targetElement = getAnimationElement(tElement);
|
|
26
|
+
if (!targetElement) {
|
|
27
|
+
ibiz.log.debug('终点元素不存在');
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
// 创建移动动画元素
|
|
31
|
+
const moveElement = cloneElement(element, document.body);
|
|
32
|
+
if (!moveElement) {
|
|
33
|
+
ibiz.log.debug('动画元素不存在');
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
const { padding, width, height } = getElementAttribute(moveElement);
|
|
37
|
+
// 移动点元素内置option
|
|
38
|
+
const option = {
|
|
39
|
+
borderRadius: ['0%', '50%'],
|
|
40
|
+
maxWidth: [width, '6px'],
|
|
41
|
+
maxHeight: [height, '6px'],
|
|
42
|
+
minWidth: [width, '6px'],
|
|
43
|
+
minHeight: [height, '6px'],
|
|
44
|
+
padding: [padding, '6px'],
|
|
45
|
+
duration: 700,
|
|
46
|
+
};
|
|
47
|
+
Object.assign(option, options);
|
|
48
|
+
const result = await moveToTarget(moveElement, targetElement, option);
|
|
49
|
+
destroyElement(moveElement);
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 元素移动动画 元素a 移动到元素b
|
|
54
|
+
*
|
|
55
|
+
* @author zk
|
|
56
|
+
* @date 2024-01-24 06:01:35\
|
|
57
|
+
* @param {HTMLElement} element
|
|
58
|
+
* @param {HTMLElement} toElement
|
|
59
|
+
* @param {IAnimationOptions} [options={}]
|
|
60
|
+
* @return {*} {Promise<boolean>}
|
|
61
|
+
* @memberof AnimeUtil
|
|
62
|
+
*/
|
|
63
|
+
moveToTarget(element, toElement, options = {}) {
|
|
64
|
+
return moveToTarget(element, toElement, options);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 目标调整大小
|
|
68
|
+
*
|
|
69
|
+
* @author zk
|
|
70
|
+
* @date 2024-01-22 03:01:42
|
|
71
|
+
* @param {HTMLElement} target
|
|
72
|
+
* @param {anime.AnimeParams} [options={}]
|
|
73
|
+
* @param {IData} [builtInParams={}]
|
|
74
|
+
*/
|
|
75
|
+
resize(targets, options = {}) {
|
|
76
|
+
return resize(targets, options);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 目标移动和调整大小
|
|
80
|
+
*
|
|
81
|
+
* @author zk
|
|
82
|
+
* @date 2024-01-24 06:01:15
|
|
83
|
+
* @param {HTMLElement} element
|
|
84
|
+
* @param {HTMLElement} toElement
|
|
85
|
+
* @param {IAnimationOptions} [options={}]
|
|
86
|
+
* @return {*} {Promise<boolean>}
|
|
87
|
+
* @memberof AnimeUtil
|
|
88
|
+
*/
|
|
89
|
+
async moveAndResize(element, toElement, options = {}) {
|
|
90
|
+
const result = await this.movePoint(element, toElement, options);
|
|
91
|
+
if (result) {
|
|
92
|
+
await this.resize(toElement, { duration: 500 });
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import anime from 'animejs';
|
|
2
|
+
type AnimeTarget = string | object | HTMLElement | SVGElement | NodeList | null;
|
|
3
|
+
/**
|
|
4
|
+
* 元素移动动画
|
|
5
|
+
*
|
|
6
|
+
* @author zk
|
|
7
|
+
* @date 2024-01-24 03:01:17
|
|
8
|
+
* @export
|
|
9
|
+
* @param {HTMLElement} moveElement
|
|
10
|
+
* @param {HTMLElement} toElement
|
|
11
|
+
* @param {anime.AnimeParams} [extraOpts={}]
|
|
12
|
+
* @return {*} {Promise<boolean>}
|
|
13
|
+
*/
|
|
14
|
+
export declare function moveToTarget(moveElement: HTMLElement, targetElement: HTMLElement, extraOpts?: anime.AnimeParams): Promise<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* 目标调整大小
|
|
17
|
+
*
|
|
18
|
+
* @author zk
|
|
19
|
+
* @date 2024-01-24 03:01:09
|
|
20
|
+
* @export
|
|
21
|
+
* @param {HTMLElement} targets
|
|
22
|
+
* @param {anime.AnimeParams} [extraOpts={}]
|
|
23
|
+
* @return {*} {Promise<boolean>}
|
|
24
|
+
*/
|
|
25
|
+
export declare function resize(targets: AnimeTarget | readonly AnimeTarget[], extraOpts?: anime.AnimeParams): Promise<boolean>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=anime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anime.d.ts","sourceRoot":"","sources":["../../../src/utils/anime/anime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,IAAI,CAAC;AA6ChF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,WAAW,EAC1B,SAAS,GAAE,KAAK,CAAC,WAAgB,GAChC,OAAO,CAAC,OAAO,CAAC,CAmBlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CACpB,OAAO,EAAE,WAAW,GAAG,SAAS,WAAW,EAAE,EAC7C,SAAS,GAAE,KAAK,CAAC,WAAgB,GAChC,OAAO,CAAC,OAAO,CAAC,CAclB"}
|