imm-element-ui 0.5.8 → 0.6.0
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/esm2022/lib/am/am.component.mjs +2 -2
- package/esm2022/lib/grid/cell-render/chip-render.mjs +5 -5
- package/esm2022/lib/share/utils.mjs +124 -36
- package/fesm2022/imm-element-ui.mjs +129 -41
- package/fesm2022/imm-element-ui.mjs.map +1 -1
- package/lib/crumb-action/crumb-action.component.d.ts +1 -1
- package/lib/share/utils.d.ts +2 -0
- package/package.json +1 -1
|
@@ -126,7 +126,7 @@ class AmComponent {
|
|
|
126
126
|
}));
|
|
127
127
|
}
|
|
128
128
|
webget(param) {
|
|
129
|
-
return this.http.post(apiPath + "webget", param)
|
|
129
|
+
return this.http.post(apiPath + "/goam/api/webget", param)
|
|
130
130
|
.pipe(map((response) => {
|
|
131
131
|
return response;
|
|
132
132
|
}), finalize(() => {
|
|
@@ -3574,21 +3574,117 @@ const changeContent = (content, thisArg) => {
|
|
|
3574
3574
|
let fiterPreloads = [];
|
|
3575
3575
|
// gridList = parseFunctions(gridList, thisArg);
|
|
3576
3576
|
// let groupArr = parseFunctions(groups, thisArg);
|
|
3577
|
-
groups.forEach((item) => {
|
|
3578
|
-
|
|
3579
|
-
|
|
3577
|
+
// groups.forEach((item: any) => {
|
|
3578
|
+
// if (thisArg.authLevel < 3) {
|
|
3579
|
+
// item[formTypeToProps[item.type]].disabled = true;
|
|
3580
|
+
// }
|
|
3581
|
+
// });
|
|
3582
|
+
// thisArg.formOptions = {
|
|
3583
|
+
// fields: [
|
|
3584
|
+
// {
|
|
3585
|
+
// groupClass: 'flex flex-row flex-wrap',
|
|
3586
|
+
// group: groups,
|
|
3587
|
+
// },
|
|
3588
|
+
// ],
|
|
3589
|
+
// form: new FormGroup({}),
|
|
3590
|
+
// mainField: content.sourceData.model.mainFields,
|
|
3591
|
+
// };
|
|
3592
|
+
convertForm(thisArg, groups, content.sourceData);
|
|
3593
|
+
convertGrid(thisArg, gridList, fiterPreloads);
|
|
3594
|
+
// gridList.forEach(async (item: any) => {
|
|
3595
|
+
// !item.type && (item.type = 'grid')
|
|
3596
|
+
// let grid:any = {type:item.type}
|
|
3597
|
+
// if(item.fiterPreloads instanceof Array){
|
|
3598
|
+
// fiterPreloads = [...fiterPreloads, ...item.fiterPreloads]
|
|
3599
|
+
// }
|
|
3600
|
+
// if(item.type == 'grid'){
|
|
3601
|
+
// let {
|
|
3602
|
+
// gridOptions: { columnDefs, ...restGridOptions },
|
|
3603
|
+
// subTableSource,
|
|
3604
|
+
// subDataKey,
|
|
3605
|
+
// title,
|
|
3606
|
+
// selectDataCb,
|
|
3607
|
+
// fk,
|
|
3608
|
+
// mainField,
|
|
3609
|
+
// uniqueField,
|
|
3610
|
+
// addDataCb,
|
|
3611
|
+
// showDelete = true,
|
|
3612
|
+
// scrollHeight,
|
|
3613
|
+
// dragSort
|
|
3614
|
+
// } = item;
|
|
3615
|
+
// grid = { subTableSource, subDataKey, title,showDelete, ...grid};
|
|
3616
|
+
// let gridOptions = {
|
|
3617
|
+
// ...restGridOptions,
|
|
3618
|
+
// fk,
|
|
3619
|
+
// subTableSource,
|
|
3620
|
+
// subDataKey,
|
|
3621
|
+
// mainField,
|
|
3622
|
+
// };
|
|
3623
|
+
// if(scrollHeight){
|
|
3624
|
+
// gridOptions.scrollHeight = `${scrollHeight}px`
|
|
3625
|
+
// }
|
|
3626
|
+
// if(dragSort){
|
|
3627
|
+
// gridOptions.rowDragManaged = true
|
|
3628
|
+
// gridOptions.dragSort = dragSort
|
|
3629
|
+
// }
|
|
3630
|
+
// convertCol(columnDefs,thisArg.authLevel, gridOptions.modelName,dragSort);
|
|
3631
|
+
// gridOptions.columnDefs = columnDefs;
|
|
3632
|
+
// if (subTableSource === 'select') {
|
|
3633
|
+
// thisArg.webget({ code: item.selectModelCode }).subscribe((res:any) => {
|
|
3634
|
+
// let selectContent = JSON.parse(res.content);
|
|
3635
|
+
// grid.selectOptions = parseFunctions(selectContent, thisArg)?.gridOptions;
|
|
3636
|
+
// grid.selectOptions.rowModelType = grid.selectOptions.rowModelType || 'serverSide';
|
|
3637
|
+
// if (grid.selectOptions.rowModelType == 'serverSide') {
|
|
3638
|
+
// grid.selectOptions.serverFunc = grid.selectOptions.serverFunc || thisArg.web_search.bind(thisArg);
|
|
3639
|
+
// } else {
|
|
3640
|
+
// grid.selectOptions.clientFunc = grid.selectOptions.clientFunc || thisArg.web_search.bind(thisArg);
|
|
3641
|
+
// }
|
|
3642
|
+
// grid.uniqueField = uniqueField;
|
|
3643
|
+
// grid.selectDataCb = selectDataCb;
|
|
3644
|
+
// grid.selectOptions.scrollHeight = '300px';
|
|
3645
|
+
// gridOptionsHooker(grid.selectOptions, selectContent);
|
|
3646
|
+
// });
|
|
3647
|
+
// grid.searchPrm = { ...thisArg.searchPrm };
|
|
3648
|
+
// } else {
|
|
3649
|
+
// addDataCb && (gridOptions.addDataCb = addDataCb);
|
|
3650
|
+
// }
|
|
3651
|
+
// grid.gridOptions = gridOptions;
|
|
3652
|
+
// } else {
|
|
3653
|
+
// item.interactiveLabel = true
|
|
3654
|
+
// grid = {
|
|
3655
|
+
// ...item
|
|
3656
|
+
// }
|
|
3657
|
+
// grid.form = new FormGroup({})
|
|
3658
|
+
// }
|
|
3659
|
+
// thisArg.grids.push(grid);
|
|
3660
|
+
// });
|
|
3661
|
+
thisArg.formDetail = content.formDetail;
|
|
3662
|
+
thisArg.saveFunc = content.saveFunc;
|
|
3663
|
+
thisArg.isLog = content.sourceData.model.log;
|
|
3664
|
+
thisArg.getPrm['getLog'] = content.sourceData.model.log;
|
|
3665
|
+
thisArg.getPrm['fiterPreloads'] = fiterPreloads;
|
|
3666
|
+
thisArg.hrefBtnList = hrefBtnList;
|
|
3667
|
+
};
|
|
3668
|
+
const convertCol = (col, authLevel, modelName, dragSort) => {
|
|
3669
|
+
col.forEach((item, index) => {
|
|
3670
|
+
item.hide = item.hideCol;
|
|
3671
|
+
if (authLevel < 3) {
|
|
3672
|
+
item.editable = false;
|
|
3673
|
+
}
|
|
3674
|
+
if (dragSort && index === 0) {
|
|
3675
|
+
item.rowDrag = true;
|
|
3580
3676
|
}
|
|
3581
3677
|
});
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3678
|
+
};
|
|
3679
|
+
const gridOptionsHooker = (gridOptions, selectContent) => {
|
|
3680
|
+
gridOptions?.columnDefs?.forEach((col) => {
|
|
3681
|
+
if (col.hideCol) {
|
|
3682
|
+
col.hide = col.hideCol;
|
|
3683
|
+
delete col.hideCol;
|
|
3684
|
+
}
|
|
3685
|
+
});
|
|
3686
|
+
};
|
|
3687
|
+
const convertGrid = (thisArg, gridList, fiterPreloads) => {
|
|
3592
3688
|
gridList.forEach(async (item) => {
|
|
3593
3689
|
!item.type && (item.type = 'grid');
|
|
3594
3690
|
let grid = { type: item.type };
|
|
@@ -3646,31 +3742,23 @@ const changeContent = (content, thisArg) => {
|
|
|
3646
3742
|
}
|
|
3647
3743
|
thisArg.grids.push(grid);
|
|
3648
3744
|
});
|
|
3649
|
-
thisArg.formDetail = content.formDetail;
|
|
3650
|
-
thisArg.saveFunc = content.saveFunc;
|
|
3651
|
-
thisArg.isLog = content.sourceData.model.log;
|
|
3652
|
-
thisArg.getPrm['getLog'] = content.sourceData.model.log;
|
|
3653
|
-
thisArg.getPrm['fiterPreloads'] = fiterPreloads;
|
|
3654
|
-
thisArg.hrefBtnList = hrefBtnList;
|
|
3655
3745
|
};
|
|
3656
|
-
const
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
item.editable = false;
|
|
3661
|
-
}
|
|
3662
|
-
if (dragSort && index === 0) {
|
|
3663
|
-
item.rowDrag = true;
|
|
3664
|
-
}
|
|
3665
|
-
});
|
|
3666
|
-
};
|
|
3667
|
-
const gridOptionsHooker = (gridOptions, selectContent) => {
|
|
3668
|
-
gridOptions?.columnDefs?.forEach((col) => {
|
|
3669
|
-
if (col.hideCol) {
|
|
3670
|
-
col.hide = col.hideCol;
|
|
3671
|
-
delete col.hideCol;
|
|
3746
|
+
const convertForm = (thisArg, groupArr, sourceData) => {
|
|
3747
|
+
groupArr.forEach((item) => {
|
|
3748
|
+
if (thisArg.authLevel < 3) {
|
|
3749
|
+
item[formTypeToProps[item.type]].disabled = true;
|
|
3672
3750
|
}
|
|
3673
3751
|
});
|
|
3752
|
+
thisArg.formOptions = {
|
|
3753
|
+
fields: [
|
|
3754
|
+
{
|
|
3755
|
+
groupClass: 'flex flex-row flex-wrap',
|
|
3756
|
+
group: groupArr,
|
|
3757
|
+
},
|
|
3758
|
+
],
|
|
3759
|
+
form: new FormGroup({}),
|
|
3760
|
+
mainField: sourceData.model.mainFields,
|
|
3761
|
+
};
|
|
3674
3762
|
};
|
|
3675
3763
|
|
|
3676
3764
|
const _gridUtils = {
|
|
@@ -4401,15 +4489,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
4401
4489
|
|
|
4402
4490
|
const ColorMap = {
|
|
4403
4491
|
emerald: '#10B981',
|
|
4404
|
-
green: '#
|
|
4492
|
+
green: '#22c55e',
|
|
4405
4493
|
lime: '#84CC16',
|
|
4406
|
-
orange: '#
|
|
4494
|
+
orange: '#f97316',
|
|
4407
4495
|
amber: '#F59E0B',
|
|
4408
4496
|
sky: '#0EA5E9',
|
|
4409
|
-
blue: '#
|
|
4497
|
+
blue: '#0ea5e9',
|
|
4410
4498
|
violet: '#6B26C1',
|
|
4411
4499
|
pink: '#EC4899',
|
|
4412
|
-
purple: '
|
|
4500
|
+
purple: '##f97316',
|
|
4413
4501
|
red: '#EF4444',
|
|
4414
4502
|
yellow: '#F59E0B',
|
|
4415
4503
|
gray: '#4B5563',
|
|
@@ -7788,5 +7876,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
7788
7876
|
* Generated bundle index. Do not edit.
|
|
7789
7877
|
*/
|
|
7790
7878
|
|
|
7791
|
-
export { ActionService, ActionsComponent, AmComponent, AsyncRenderer, CellEditAutoCompleteComponent, CellEditDatePickerComponent, CellEditInputNumberCompoent, CellEditInputTextCompoent, CellEditSelectComponent, CrumbActionComponent, FormComponent, GridComponent, HeadComponent, HrefBtnListComponent, I18N_Token, I18nService, ImportComponent, LANGS, LinkRenderer, LogComponent, PageActionService, PageFormComponent, PageGridListComponent, PagerComponent, PopActionService, RowSelectorComponent$1 as RowSelectorComponent, SearchComponent, StepsComponent, ThemeConfigComponent, ThemeConfigService, UserHistoryService, changeContent, compileTsToJs, convertAct, convertCol, createCircularIterator, filterObjectByKeys, formTypeToProps, generateUniqueId, gridOptionsHooker, gridUtils, isJSONParsable, parseFunctions, toPascalCase };
|
|
7879
|
+
export { ActionService, ActionsComponent, AmComponent, AsyncRenderer, CellEditAutoCompleteComponent, CellEditDatePickerComponent, CellEditInputNumberCompoent, CellEditInputTextCompoent, CellEditSelectComponent, CrumbActionComponent, FormComponent, GridComponent, HeadComponent, HrefBtnListComponent, I18N_Token, I18nService, ImportComponent, LANGS, LinkRenderer, LogComponent, PageActionService, PageFormComponent, PageGridListComponent, PagerComponent, PopActionService, RowSelectorComponent$1 as RowSelectorComponent, SearchComponent, StepsComponent, ThemeConfigComponent, ThemeConfigService, UserHistoryService, changeContent, compileTsToJs, convertAct, convertCol, convertForm, convertGrid, createCircularIterator, filterObjectByKeys, formTypeToProps, generateUniqueId, gridOptionsHooker, gridUtils, isJSONParsable, parseFunctions, toPascalCase };
|
|
7792
7880
|
//# sourceMappingURL=imm-element-ui.mjs.map
|