barsa-novin-ray-core 2.3.2 → 2.3.5

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.
@@ -1600,7 +1600,8 @@ function throwIfAlreadyLoaded(parentModule, moduleName) {
1600
1600
  }
1601
1601
  const measureTextValues = {};
1602
1602
  function measureText2(text, fontSize, fontName) {
1603
- if (measureTextValues[text]) {
1603
+ const key = `${text}${fontSize}${fontName}`;
1604
+ if (measureTextValues[key]) {
1604
1605
  return measureTextValues[text];
1605
1606
  }
1606
1607
  const measureTextDom = document.getElementById('measureText');
@@ -1612,7 +1613,7 @@ function measureText2(text, fontSize, fontName) {
1612
1613
  fontName = fontName ? fontName : 'B-Font';
1613
1614
  ctx.font = `normal ${fontSize} ${fontName}`;
1614
1615
  const x = ctx.measureText(text).width;
1615
- measureTextValues[text] = x;
1616
+ measureTextValues[key] = x;
1616
1617
  return x;
1617
1618
  }
1618
1619
  function measureText(text, fontSize) {
@@ -2641,6 +2642,9 @@ class DynamicComponentService {
2641
2642
  const moName = moduleName + 'Module';
2642
2643
  const module = this._dynamicModuleWithComponents[moName];
2643
2644
  const cmpName = componentName + 'Component';
2645
+ if (!module) {
2646
+ return;
2647
+ }
2644
2648
  let x = module.ngModuleRef.dynamicComponents.find((c) => c.name.includes(cmpName));
2645
2649
  if (!x) {
2646
2650
  module.ngModuleRef.dynamicComponents.forEach((c) => {
@@ -3952,7 +3956,7 @@ class PortalService {
3952
3956
  }
3953
3957
  // const notFoundPath = configRoute.find((c) => c.path === '**');
3954
3958
  // notFoundPath && (notFoundPath.redirectTo = defaultPage.Route.replace('/', ''));
3955
- this._router.resetConfig(portalData.IsDynamicRoute ? newConfigRoutes : configRoute);
3959
+ this._router.resetConfig(portalData.IsDynamicRoute === 'True' ? newConfigRoutes : configRoute);
3956
3960
  }
3957
3961
  }
3958
3962
  this.extractAllPages(portalData);