@ibiz-template/runtime 0.7.41-alpha.6 → 0.7.41-alpha.7
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 +775 -467
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +1 -0
- 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/predefined-control-render.d.ts +16 -0
- package/out/constant/predefined-control-render.d.ts.map +1 -0
- package/out/constant/predefined-control-render.js +17 -0
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +4 -1
- package/out/controller/common/editor/editor.controller.d.ts +8 -0
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +12 -0
- package/out/controller/control/chart/generator/index.d.ts +12 -0
- package/out/controller/control/chart/generator/index.d.ts.map +1 -0
- package/out/controller/control/chart/generator/index.js +11 -0
- package/out/controller/control/chart/index.d.ts +1 -0
- package/out/controller/control/chart/index.d.ts.map +1 -1
- package/out/controller/control/chart/index.js +1 -0
- package/out/controller/control/kanban/kanban.controller.d.ts +9 -1
- package/out/controller/control/kanban/kanban.controller.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.controller.js +22 -3
- package/out/controller/control/tree/tree.controller.d.ts +17 -2
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +79 -3
- package/out/controller/control/tree/tree.service.d.ts +75 -0
- package/out/controller/control/tree/tree.service.d.ts.map +1 -1
- package/out/controller/control/tree/tree.service.js +145 -8
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +7 -0
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
- package/out/interface/api/controller/common/i-api-mask-option.d.ts +1 -1
- package/out/locale/en/index.d.ts +1 -0
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +1 -0
- package/out/locale/zh-CN/index.d.ts +1 -0
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +1 -0
- package/out/model/utils/util.d.ts.map +1 -1
- package/out/model/utils/util.js +2 -1
- 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 +1 -1
- package/out/utils/handlebars/helpers/abs/abs.d.ts +14 -0
- package/out/utils/handlebars/helpers/abs/abs.d.ts.map +1 -0
- package/out/utils/handlebars/helpers/abs/abs.js +19 -0
- package/out/utils/handlebars/helpers/index.d.ts.map +1 -1
- package/out/utils/handlebars/helpers/index.js +2 -0
- package/out/utils/handlebars/utils/helper/helper.d.ts.map +1 -1
- package/out/utils/handlebars/utils/helper/helper.js +1 -0
- package/package.json +3 -3
|
@@ -12,6 +12,17 @@ import { execDELogicAction } from '../../../de-logic';
|
|
|
12
12
|
* @extends {MDControlService<IDETree>}
|
|
13
13
|
*/
|
|
14
14
|
export class TreeService extends MDControlService {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* @description 加载更多信息项映射
|
|
19
|
+
* @type {{
|
|
20
|
+
* [parentDataId: string]: LoadMoreInfoItem[];
|
|
21
|
+
* }}
|
|
22
|
+
* @memberof TreeService
|
|
23
|
+
*/
|
|
24
|
+
this.loadMoreMap = {};
|
|
25
|
+
}
|
|
15
26
|
/**
|
|
16
27
|
* 获取子节点数据
|
|
17
28
|
*
|
|
@@ -205,6 +216,7 @@ export class TreeService extends MDControlService {
|
|
|
205
216
|
};
|
|
206
217
|
// 设置查询长度
|
|
207
218
|
params.size = nodeModel.maxSize || 1000;
|
|
219
|
+
this.initPageParams(nodeModel, parentNodeData, opts, params);
|
|
208
220
|
// 排序属性
|
|
209
221
|
if (nodeModel.sortAppDEFieldId) {
|
|
210
222
|
Object.assign(params, {
|
|
@@ -258,6 +270,7 @@ export class TreeService extends MDControlService {
|
|
|
258
270
|
defaultExpand,
|
|
259
271
|
});
|
|
260
272
|
});
|
|
273
|
+
this.updatePageItems(nodeModel, parentNodeData, opts, dataSourceType, nodeDatas);
|
|
261
274
|
return nodeDatas;
|
|
262
275
|
}
|
|
263
276
|
return [];
|
|
@@ -399,12 +412,14 @@ export class TreeService extends MDControlService {
|
|
|
399
412
|
* @memberof TreeService
|
|
400
413
|
*/
|
|
401
414
|
async getDENodeDatasByDEDataset(nodeModel, parentNodeData, opts) {
|
|
415
|
+
var _a;
|
|
402
416
|
const { appDEDataSetId, appDataEntityId } = nodeModel;
|
|
403
417
|
const { context, params } = opts;
|
|
404
418
|
let result = [];
|
|
405
419
|
if (appDEDataSetId && appDataEntityId) {
|
|
406
420
|
const response = await this.app.deService.exec(appDataEntityId, appDEDataSetId, context, params);
|
|
407
421
|
if (response.ok && response.data) {
|
|
422
|
+
this.updatePageInfo(nodeModel, parentNodeData, opts, Number((_a = response.headers) === null || _a === void 0 ? void 0 : _a['x-total-pages']) || 0);
|
|
408
423
|
result = response.data;
|
|
409
424
|
}
|
|
410
425
|
}
|
|
@@ -434,14 +449,25 @@ export class TreeService extends MDControlService {
|
|
|
434
449
|
const items = await this.app.codeList.get(nodeModel.codeListId, context, params);
|
|
435
450
|
if (items.length) {
|
|
436
451
|
const nodeDatas = items.map((item, index) => {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
452
|
+
// 处理多层级代码表,递归填充子节点数据
|
|
453
|
+
const fillChildren = (codeListItem, parent, i) => {
|
|
454
|
+
var _a;
|
|
455
|
+
const defaultExpand = this.calcExpand(nodeModel, i);
|
|
456
|
+
const node = new TreeCodeListNodeData(nodeModel, parent, {
|
|
457
|
+
data: codeListItem,
|
|
458
|
+
leaf: !!opts.leaf && !((_a = codeListItem.children) === null || _a === void 0 ? void 0 : _a.length),
|
|
459
|
+
navContext,
|
|
460
|
+
navParams,
|
|
461
|
+
defaultExpand,
|
|
462
|
+
});
|
|
463
|
+
if (codeListItem.children && codeListItem.children.length) {
|
|
464
|
+
node._children = codeListItem.children.map((child, j) => {
|
|
465
|
+
return fillChildren(child, node, j);
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
return node;
|
|
469
|
+
};
|
|
470
|
+
return fillChildren(item, parentNodeData, index);
|
|
445
471
|
});
|
|
446
472
|
return nodeDatas;
|
|
447
473
|
}
|
|
@@ -500,4 +526,115 @@ export class TreeService extends MDControlService {
|
|
|
500
526
|
const { expandFirstOnly, expanded } = nodeModel;
|
|
501
527
|
return !!expanded || !!expandFirstOnly;
|
|
502
528
|
}
|
|
529
|
+
/**
|
|
530
|
+
* @description 初始化分页参数
|
|
531
|
+
* @param {IDETreeDataSetNode} nodeModel
|
|
532
|
+
* @param {(ITreeNodeData | undefined)} parentNodeData
|
|
533
|
+
* @param {TreeFetchOpts} opts
|
|
534
|
+
* @param {IParams} params
|
|
535
|
+
* @memberof TreeService
|
|
536
|
+
*/
|
|
537
|
+
initPageParams(nodeModel, parentNodeData, opts, params) {
|
|
538
|
+
if (nodeModel.enablePaging && nodeModel.pagingSize) {
|
|
539
|
+
params.size = nodeModel.pagingSize;
|
|
540
|
+
}
|
|
541
|
+
if (parentNodeData) {
|
|
542
|
+
if (!this.loadMoreMap[parentNodeData._id]) {
|
|
543
|
+
this.loadMoreMap[parentNodeData._id] = [];
|
|
544
|
+
}
|
|
545
|
+
if (opts.isLoadMore) {
|
|
546
|
+
let info = this.loadMoreMap[parentNodeData._id].find(item => item.nodeModelId === nodeModel.id);
|
|
547
|
+
if (!info) {
|
|
548
|
+
info = {
|
|
549
|
+
nodeModelId: nodeModel.id,
|
|
550
|
+
curPage: 0,
|
|
551
|
+
totalPage: 0,
|
|
552
|
+
items: [],
|
|
553
|
+
};
|
|
554
|
+
this.loadMoreMap[parentNodeData._id].push(info);
|
|
555
|
+
}
|
|
556
|
+
params.page = info.curPage + 1;
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
const index = this.loadMoreMap[parentNodeData._id].findIndex(item => item.nodeModelId === nodeModel.id);
|
|
560
|
+
if (index === -1) {
|
|
561
|
+
this.loadMoreMap[parentNodeData._id].push({
|
|
562
|
+
nodeModelId: nodeModel.id,
|
|
563
|
+
curPage: 0,
|
|
564
|
+
totalPage: 0,
|
|
565
|
+
items: [],
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
569
|
+
this.loadMoreMap[parentNodeData._id][index] = {
|
|
570
|
+
nodeModelId: nodeModel.id,
|
|
571
|
+
curPage: 0,
|
|
572
|
+
totalPage: 0,
|
|
573
|
+
items: [],
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* @description 更新分页节点数据
|
|
581
|
+
* @param {IDETreeDataSetNode} nodeModel
|
|
582
|
+
* @param {(ITreeNodeData | undefined)} parentNodeData
|
|
583
|
+
* @param {TreeFetchOpts} opts
|
|
584
|
+
* @param {(string | undefined)} dataSourceType
|
|
585
|
+
* @param {TreeDataSetNodeData[]} nodeDatas
|
|
586
|
+
* @memberof TreeService
|
|
587
|
+
*/
|
|
588
|
+
updatePageItems(nodeModel, parentNodeData, opts, dataSourceType, nodeDatas) {
|
|
589
|
+
if (parentNodeData) {
|
|
590
|
+
if (!this.loadMoreMap[parentNodeData._id]) {
|
|
591
|
+
this.loadMoreMap[parentNodeData._id] = [];
|
|
592
|
+
}
|
|
593
|
+
let info = this.loadMoreMap[parentNodeData._id].find(item => item.nodeModelId === nodeModel.id);
|
|
594
|
+
if (!info) {
|
|
595
|
+
info = {
|
|
596
|
+
nodeModelId: nodeModel.id,
|
|
597
|
+
curPage: 0,
|
|
598
|
+
totalPage: 0,
|
|
599
|
+
items: [],
|
|
600
|
+
};
|
|
601
|
+
this.loadMoreMap[parentNodeData._id].push(info);
|
|
602
|
+
}
|
|
603
|
+
if (dataSourceType === 'DEDATASET' && opts.isLoadMore) {
|
|
604
|
+
info.items.push(...nodeDatas);
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
info.items = [...nodeDatas];
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* @description 更新分页信息
|
|
613
|
+
* @param {IDETreeDataSetNode} nodeModel
|
|
614
|
+
* @param {(ITreeNodeData | undefined)} parentNodeData
|
|
615
|
+
* @param {TreeFetchOpts} opts
|
|
616
|
+
* @param {number} totalPage
|
|
617
|
+
* @memberof TreeService
|
|
618
|
+
*/
|
|
619
|
+
updatePageInfo(nodeModel, parentNodeData, opts, totalPage) {
|
|
620
|
+
if (parentNodeData && nodeModel.enablePaging && nodeModel.pagingSize) {
|
|
621
|
+
if (!this.loadMoreMap[parentNodeData._id]) {
|
|
622
|
+
this.loadMoreMap[parentNodeData._id] = [];
|
|
623
|
+
}
|
|
624
|
+
let info = this.loadMoreMap[parentNodeData._id].find(item => item.nodeModelId === nodeModel.id);
|
|
625
|
+
if (!info) {
|
|
626
|
+
info = {
|
|
627
|
+
nodeModelId: nodeModel.id,
|
|
628
|
+
curPage: 0,
|
|
629
|
+
totalPage: 0,
|
|
630
|
+
items: [],
|
|
631
|
+
};
|
|
632
|
+
this.loadMoreMap[parentNodeData._id].push(info);
|
|
633
|
+
}
|
|
634
|
+
if (opts.isLoadMore) {
|
|
635
|
+
info.curPage += 1;
|
|
636
|
+
}
|
|
637
|
+
info.totalPage = totalPage;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
503
640
|
}
|
|
@@ -11,6 +11,13 @@ export interface IApiGlobalCommonConfig {
|
|
|
11
11
|
* @memberof IApiGlobalCommonConfig
|
|
12
12
|
*/
|
|
13
13
|
emptyText: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description 无值显示模式,值为 'PLACEHOLDER' 时显示占位文本内容,值为 'DEFAULT' 或占位文本无值时显示`emptyText`
|
|
16
|
+
* @type {'DEFAULT' | 'PLACEHOLDER'}
|
|
17
|
+
* @default 'DEFAULT'
|
|
18
|
+
* @memberof IApiGlobalCommonConfig
|
|
19
|
+
*/
|
|
20
|
+
emptyShowMode: 'DEFAULT' | 'PLACEHOLDER';
|
|
14
21
|
/**
|
|
15
22
|
* @description 模态参数,打开模态弹框时默认配置,pc端为element-plus 的dialog配置,移动端为vant的dialog配置
|
|
16
23
|
* @type {string}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-api-global-common-config.d.ts","sourceRoot":"","sources":["../../../../../src/interface/api/common/global-config/i-api-global-common-config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
1
|
+
{"version":3,"file":"i-api-global-common-config.d.ts","sourceRoot":"","sources":["../../../../../src/interface/api/common/global-config/i-api-global-common-config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,aAAa,EAAE,SAAS,GAAG,aAAa,CAAC;IAEzC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
package/out/locale/en/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA41Bd,CAAC"}
|
package/out/locale/en/index.js
CHANGED
|
@@ -145,6 +145,7 @@ export const en = {
|
|
|
145
145
|
groupedOn: 'Kanban components must be grouped on',
|
|
146
146
|
adjustmentsGroup: 'The current Kanban does not allow adjustments to the grouping!',
|
|
147
147
|
noAllowReorder: 'Current Kanban does not allow reordering!',
|
|
148
|
+
invalidSortType: 'Sorting property is not a numeric type',
|
|
148
149
|
},
|
|
149
150
|
meditViewPanel: {
|
|
150
151
|
DraftNew: 'Draft - New',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6rBhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/model/utils/util.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,MAAM,EACN,YAAY,EACb,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/model/utils/util.ts"],"names":[],"mappings":"AACA,OAAO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js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RuntimeModelError } from '@ibiz-template/core';
|
|
2
|
+
import { PredefinedControlRender } from '../../constant';
|
|
2
3
|
/**
|
|
3
4
|
* 在数据模型中查找对应 id 模型
|
|
4
5
|
*
|
|
@@ -132,7 +133,7 @@ export function getControlPanel(control) {
|
|
|
132
133
|
// 排除空数据显示内容绘制器
|
|
133
134
|
const panelRender = control.controlRenders.find(item => item.renderType === 'LAYOUTPANEL' &&
|
|
134
135
|
!!item.layoutPanel &&
|
|
135
|
-
item.id
|
|
136
|
+
!Object.values(PredefinedControlRender).includes(item.id));
|
|
136
137
|
layoutPanel = panelRender === null || panelRender === void 0 ? void 0 : panelRender.layoutPanel;
|
|
137
138
|
}
|
|
138
139
|
return layoutPanel;
|
|
@@ -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;AAChD,OAAO,EAEL,cAAc,EAGf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,OAAO,EAAe,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAe,MAAM,oBAAoB,CAAC;AAM/D;;;;;;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,C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AAI,OAAO,CAAC,IAAI,CAAC;IAS9B;;;;;;;OAOG;IACH,QAAQ,CACN,EAAE,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,IAAI,EAClC,SAAS,GAAE,OAAc,GACxB,IAAI;IASP;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,IAAI,GAAG,IAAI;IAInD;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAMhB"}
|
|
@@ -382,7 +382,7 @@ export class DynamicCodeListCache {
|
|
|
382
382
|
// 需要缓存的先找,在判断是否过期,是否正在加载等情况
|
|
383
383
|
const key = this.isOperatorType
|
|
384
384
|
? this.codeList.codeListTag
|
|
385
|
-
: JSON.stringify(context) + JSON.stringify(params);
|
|
385
|
+
: JSON.stringify(context.getTempContext()) + JSON.stringify(params);
|
|
386
386
|
if (this.cache.has(key)) {
|
|
387
387
|
const cacheData = this.cache.get(key);
|
|
388
388
|
// 没过期的返回cacheData的promise或items
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 数字绝对值
|
|
4
|
+
*
|
|
5
|
+
* @description 用法 {{abs string }}。效果: 获取数值字符串的绝对值
|
|
6
|
+
* @export
|
|
7
|
+
* @class HelperAbs
|
|
8
|
+
* @extends {HelperBase}
|
|
9
|
+
*/
|
|
10
|
+
export declare class HelperAbs extends HelperBase {
|
|
11
|
+
constructor(hbs: IData);
|
|
12
|
+
onExecute(str: string): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=abs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abs.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/abs/abs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;GAOG;AACH,qBAAa,SAAU,SAAQ,UAAU;gBAC3B,GAAG,EAAE,KAAK;IAItB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAI/B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HelperBase } from '../helper-base';
|
|
2
|
+
/**
|
|
3
|
+
* 数字绝对值
|
|
4
|
+
*
|
|
5
|
+
* @description 用法 {{abs string }}。效果: 获取数值字符串的绝对值
|
|
6
|
+
* @export
|
|
7
|
+
* @class HelperAbs
|
|
8
|
+
* @extends {HelperBase}
|
|
9
|
+
*/
|
|
10
|
+
export class HelperAbs extends HelperBase {
|
|
11
|
+
constructor(hbs) {
|
|
12
|
+
super(hbs, 'abs');
|
|
13
|
+
}
|
|
14
|
+
onExecute(str) {
|
|
15
|
+
if (!str)
|
|
16
|
+
return '';
|
|
17
|
+
return Math.abs(Number(str)).toString();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/handlebars/helpers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/handlebars/helpers/index.ts"],"names":[],"mappings":"AAqBA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,CAqB/C"}
|
|
@@ -17,6 +17,7 @@ import { HelperPascalCase } from './pascal-case/pascal-case';
|
|
|
17
17
|
import { HelperSnakeCase } from './snake-case/snake-case';
|
|
18
18
|
import { HelperSpinalCase } from './spinal-case/spinal-case';
|
|
19
19
|
import { HelperUpperCase } from './upper-case/upper-case';
|
|
20
|
+
import { HelperAbs } from './abs/abs';
|
|
20
21
|
/**
|
|
21
22
|
* 安装自定义助手
|
|
22
23
|
*
|
|
@@ -25,6 +26,7 @@ import { HelperUpperCase } from './upper-case/upper-case';
|
|
|
25
26
|
* @export
|
|
26
27
|
*/
|
|
27
28
|
export function installHelpers(hsb) {
|
|
29
|
+
new HelperAbs(hsb);
|
|
28
30
|
new HelperAnd(hsb);
|
|
29
31
|
new HelperCamelCase(hsb);
|
|
30
32
|
new HelperConcat(hsb);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/utils/helper/helper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,UAAU;IACrB;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/utils/helper/helper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,UAAU;IACrB;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,CAqBpC;IAEF;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,qBAAqB,CAC1B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,UAAU,CAAC,aAAa,GAChC,MAAM,GAAG,OAAO;CAOpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.7",
|
|
4
4
|
"description": "运行时逻辑库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"jsencrypt": "^3.3.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@ibiz-template/core": "^0.7.41-alpha.
|
|
40
|
+
"@ibiz-template/core": "^0.7.41-alpha.7",
|
|
41
41
|
"@ibiz/model-core": "^0.1.77",
|
|
42
42
|
"@types/animejs": "^3.1.12",
|
|
43
43
|
"@types/path-browserify": "^1.0.2",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"qx-util": "^0.4.8",
|
|
69
69
|
"ramda": "^0.29.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "79a6a1ef6d1b814b2a2b19e85bf1238d14a9d026"
|
|
72
72
|
}
|