barsa-novin-ray-core 2.3.1 → 2.3.2

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.
@@ -2637,10 +2637,20 @@ class DynamicComponentService {
2637
2637
  };
2638
2638
  }
2639
2639
  }
2640
- getComponentType(componentName, moduleName) {
2640
+ getComponentType(componentSelector, componentName, moduleName) {
2641
2641
  const moName = moduleName + 'Module';
2642
2642
  const module = this._dynamicModuleWithComponents[moName];
2643
- return module.ngModuleRef.dynamicComponents.find((c) => c.name === componentName + 'Component');
2643
+ const cmpName = componentName + 'Component';
2644
+ let x = module.ngModuleRef.dynamicComponents.find((c) => c.name.includes(cmpName));
2645
+ if (!x) {
2646
+ module.ngModuleRef.dynamicComponents.forEach((c) => {
2647
+ if (!x) {
2648
+ const cmp = c['ɵcmp'];
2649
+ cmp?.selectors?.length && (x = cmp.selectors[0].includes(componentSelector) ? c : null);
2650
+ }
2651
+ });
2652
+ }
2653
+ return x;
2644
2654
  }
2645
2655
  getComponentBySelector(selector, moduleName, injector) {
2646
2656
  const moName = moduleName + 'Module';
@@ -3599,8 +3609,8 @@ class PortalService {
3599
3609
  }
3600
3610
  this.setValueOnObject(path, index + 1, modules, object[prop]);
3601
3611
  }
3602
- getComponentType(moduleName, componentName, _selector) {
3603
- return this.dcm.getComponentType(componentName, moduleName);
3612
+ getComponentType(moduleName, componentName, selector) {
3613
+ return this.dcm.getComponentType(selector, componentName, moduleName);
3604
3614
  }
3605
3615
  getComponent(moduleName, _modulePath, _componentName, selector, parentInjector) {
3606
3616
  return this.dcm.getComponentBySelector(selector, moduleName, parentInjector);