barsa-novin-ray-core 2.0.96 → 2.0.97

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.
@@ -1399,6 +1399,7 @@ var TableHeaderWidthMode;
1399
1399
  TableHeaderWidthMode[TableHeaderWidthMode["FitToRowContent"] = 1] = "FitToRowContent";
1400
1400
  TableHeaderWidthMode[TableHeaderWidthMode["FitToContainer"] = 2] = "FitToContainer";
1401
1401
  TableHeaderWidthMode[TableHeaderWidthMode["FreeColumnSize"] = 3] = "FreeColumnSize";
1402
+ TableHeaderWidthMode[TableHeaderWidthMode["ColumnWidth"] = 4] = "ColumnWidth";
1402
1403
  })(TableHeaderWidthMode || (TableHeaderWidthMode = {}));
1403
1404
  function setTableThWidth(tableHeaderMode, columns, thList, renderer2) {
1404
1405
  let propName = '';
@@ -1412,8 +1413,11 @@ function setTableThWidth(tableHeaderMode, columns, thList, renderer2) {
1412
1413
  case TableHeaderWidthMode.FreeColumnSize:
1413
1414
  propName = '$Width';
1414
1415
  break;
1416
+ case TableHeaderWidthMode.ColumnWidth:
1417
+ propName = '$ColumnWidth';
1418
+ break;
1415
1419
  }
1416
- thList.forEach((c, i) => renderer2.setStyle(c, 'width', columns[i].$IsImageOricon ? '42px' : columns[i][propName]));
1420
+ thList.forEach((c, i) => renderer2.setStyle(c, 'width', columns[i].$IsImageOricon && i < thList.length - 1 ? '42px' : columns[i][propName]));
1417
1421
  }
1418
1422
  function calculateColumnContent(columns, moDataList) {
1419
1423
  columns.forEach((column) => {
@@ -1430,8 +1434,12 @@ function calculateColumnWidth(container, columns, moDataList, disableContextMenu
1430
1434
  return { columns: [...columns], contextMenuWidth };
1431
1435
  }
1432
1436
  function setColumnCaptionWidth(column) {
1437
+ if (column.$ColumnWidthNum) {
1438
+ return column.$ColumnWidthNum;
1439
+ }
1433
1440
  const colCaptionWidth = measureText(column.Alias) + 16 + 10;
1434
- column.$ColumnWidth = `${Math.ceil(colCaptionWidth)}px`;
1441
+ column.$ColumnWidthNum = Math.ceil(colCaptionWidth);
1442
+ column.$ColumnWidth = `${column.$ColumnWidthNum}px`;
1435
1443
  return colCaptionWidth;
1436
1444
  }
1437
1445
  function setColumnWidthByMaxMoContentWidth(moDataList, column) {
@@ -1453,7 +1461,8 @@ function calculateFreeColumnSize(columns) {
1453
1461
  let allColWidth = 0;
1454
1462
  const visibleColumns = columns.filter((c) => !c.Hidden);
1455
1463
  visibleColumns.forEach((col, index) => {
1456
- const w = col.Width && col.Width > 0 ? col.Width : setColumnCaptionWidth(col);
1464
+ const x = setColumnCaptionWidth(col);
1465
+ const w = col.Width && col.Width > 0 ? col.Width : x;
1457
1466
  allColWidth += w;
1458
1467
  col.$Width = index === visibleColumns.length - 1 ? '100%' : `${w}px`;
1459
1468
  });
@@ -1466,7 +1475,8 @@ function calculateColumnWidthFitToContainer(container, canView, disableContextMe
1466
1475
  columns
1467
1476
  .filter((c) => !c.Hidden)
1468
1477
  .forEach((col, index) => {
1469
- const w = col.Width && col.Width > 0 ? col.Width : setColumnCaptionWidth(col);
1478
+ const x = setColumnCaptionWidth(col);
1479
+ const w = col.Width && col.Width > 0 ? col.Width : x;
1470
1480
  allColWidth += w;
1471
1481
  const percent = (w / containerWidth) * 100;
1472
1482
  col.$FitContainerWidth = isMobile ? '100%' : `${percent}%`;
@@ -3379,11 +3389,19 @@ class PortalService {
3379
3389
  }, 5000);
3380
3390
  }));
3381
3391
  }
3392
+ ReportExecuteById(reportId) {
3393
+ const ulvParams = this._getUlvParamsBy('', reportId);
3394
+ return from(this._reportExecutePromise(ulvParams));
3395
+ }
3382
3396
  ReportExecute(reportName) {
3383
3397
  return from(this.ReportExecutePromise(reportName));
3384
3398
  }
3385
3399
  ReportExecutePromise(reportName) {
3386
- const ulvParams = {
3400
+ const ulvParams = this._getUlvParamsBy(reportName);
3401
+ return this._reportExecutePromise(ulvParams);
3402
+ }
3403
+ _getUlvParamsBy(reportName, reportId) {
3404
+ return {
3387
3405
  Flags: {
3388
3406
  Data: 'True',
3389
3407
  Extra: 'False',
@@ -3392,8 +3410,11 @@ class PortalService {
3392
3410
  // General:"False", // ulvmainctrl does not craete ui control raise error
3393
3411
  },
3394
3412
  ReportName: reportName,
3413
+ ReportId: reportId,
3395
3414
  UsageEnum: 'SystemContainer'
3396
3415
  };
3416
+ }
3417
+ _reportExecutePromise(ulvParams) {
3397
3418
  return new Promise((resolve, reject) => {
3398
3419
  BarsaApi.Bw.ExecuteReport({ ulvParams }, (result) => {
3399
3420
  resolve(result.Data);
@@ -3657,7 +3678,7 @@ class PortalService {
3657
3678
  }
3658
3679
  get loginRoute$() {
3659
3680
  return this.portalData$.pipe(map((portalData) => {
3660
- const loginPage = portalData?.ChildPageList.MoDataList.find((c) => c.IsLoginRoute);
3681
+ const loginPage = portalData?.ChildPageList.MoDataList.find((c) => c.IsLoginRoute === 'True');
3661
3682
  return loginPage?.Route || 'login';
3662
3683
  }));
3663
3684
  }