imm-element-ui 0.5.8 → 0.5.9

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.
@@ -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
- if (thisArg.authLevel < 3) {
3579
- item[formTypeToProps[item.type]].disabled = true;
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
- 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
- };
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 convertCol = (col, authLevel, modelName, dragSort) => {
3657
- col.forEach((item, index) => {
3658
- item.hide = item.hideCol;
3659
- if (authLevel < 3) {
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 = {
@@ -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