@eui/showcase 15.0.0-rc.3 → 15.0.0-rc.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.
@@ -648,6 +648,7 @@ class DocPageComponent {
648
648
  setTimeout(() => {
649
649
  this.asService.isBlockDocumentActive = true;
650
650
  });
651
+ this.appMetadata = this.asService.state.appMetadata;
651
652
  if (this.id && !this.label) {
652
653
  this.label = this.id;
653
654
  }
@@ -673,7 +674,6 @@ class DocPageComponent {
673
674
  // construct cmp module import string
674
675
  // eslint-disable-next-line
675
676
  this.cmpModuleImport = `import { ${this.cmp.metadata?.moduleName} } from '@eui/${this.cmp.metadata?.subEntryName}';`;
676
- console.log(this.cmpModuleImport);
677
677
  }
678
678
  }
679
679
  catch (e) {
@@ -689,15 +689,10 @@ class DocPageComponent {
689
689
  console.log(`Fetching API url from : ${this.apiUrl}`);
690
690
  setTimeout(() => {
691
691
  this.apiUrlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(this.apiUrl);
692
- // setTimeout(() => {
693
- // const iFrame: HTMLIFrameElement = <HTMLIFrameElement>document.getElementById('iframe_api');
694
- // console.log(iFrame);
695
- // const iFrameContent = iFrame.contentWindow;
696
- // console.log(iFrameContent);
697
- // });
698
692
  });
699
693
  }
700
694
  catch (e) {
695
+ console.log(e);
701
696
  }
702
697
  setTimeout(() => {
703
698
  let tab = this.TABS_DEF.filter(t => t.id === this.fragmentId)[0];
@@ -728,7 +723,6 @@ class DocPageComponent {
728
723
  this.isNavClicked = false;
729
724
  }
730
725
  _scrollToFragment(fragmentId, tabIndex, init, changeTab) {
731
- // console.log(`Navigating to fragment: ${fragmentId} - tabIndex: ${tabIndex}`);
732
726
  if (init) {
733
727
  if (this.tabsContent) {
734
728
  this.tabsContent.changeTab(tabIndex);
@@ -793,20 +787,12 @@ class DocPageComponent {
793
787
  const name = pathNameArray[pathNameArray.length - 1];
794
788
  let category = pathNameArray[pathNameArray.length - 2];
795
789
  let protocolGen = protocol, hostGen = host;
796
- let docTypeRoot;
797
790
  if (host.indexOf('localhost') > -1) {
798
791
  protocolGen = 'https:';
799
792
  hostGen = 'euidev.ecdevops.eu';
800
793
  }
801
- if (name.indexOf('ux-') > -1) {
802
- docTypeRoot = 'eui-docs-eui-13.x';
803
- }
804
- else if (name.indexOf('eui-') > -1) {
805
- docTypeRoot = 'eui-docs-eui-13.x';
806
- }
807
- else if (name.indexOf('ecl-') > -1) {
808
- docTypeRoot = 'eui-docs-ecl-13.x';
809
- }
794
+ const appVersionNumber = this.appMetadata.appVersion.split('.')[0];
795
+ const docTypeRoot = `eui-docs-eui-${appVersionNumber}.x`;
810
796
  if (category === 'layout-components' || category === 'externals') {
811
797
  category = 'components';
812
798
  }
@@ -816,6 +802,7 @@ class DocPageComponent {
816
802
  }
817
803
  const formattedName = this._camelCaseString(name + '-' + category.slice(0, -1), '-', true);
818
804
  const docPath = `${protocolGen}//${hostGen}/${docTypeRoot}/${category}/${formattedName}.html`;
805
+ console.log(`fetching API from: ${docPath}`);
819
806
  return docPath;
820
807
  }
821
808
  _camelCaseString(string, separator, first) {