-
-
- {{ 'common.product.detail.information.value.implementedBy' | translate }}
-
-
-
-
-
-
-
-
- {{ 'common.product.detail.information.value.version' | translate }}
-
-
- {{ displayVersion }}
-
-
- @if(productDetail.compatibility) {
+@if (!(productDetail | emptyProductDetailPipe)) {
+
+ {{ 'common.product.detail.information.label' | translate }}
+
+
+
+
+
+ {{
+ 'common.product.detail.information.value.implementedBy' | translate
+ }}
+
+
+
+
+
- {{ 'common.product.detail.information.value.compatibility' | translate }}
+ {{ 'common.product.detail.information.value.version' | translate }}
- {{ productDetail.compatibility }}
+ {{ displayVersion }}
- }
-
-
-
- {{ 'common.product.detail.information.value.cost' | translate }}
-
- {{ productDetail.cost }}
-
-
-
-
- {{ 'common.product.detail.information.value.language' | translate }}
-
- {{ productDetail.language }}
-
- @if (externalDocumentLink !== '') {
-
-
- }
-
-
-
- {{ 'common.product.detail.type' | translate }}
-
- {{ productDetail.type }}
-
-
-
-
- {{ 'common.product.detail.information.value.tag' | translate }}
-
-
- {{ productDetail.tags ? productDetail.tags!.join(', ') : '' }}
-
-
- @if(productDetail.sourceUrl) {
+ @if (productDetail.compatibility) {
+
+
+
+ {{
+ 'common.product.detail.information.value.compatibility' | translate
+ }}
+
+
+ {{ productDetail.compatibility }}
+
+
+ }
- {{ 'common.product.detail.information.value.source' | translate }}
+ {{ 'common.product.detail.information.value.cost' | translate }}
-
-
- github.com
+ {{ productDetail.cost }}
+
+
+
+
+ {{ 'common.product.detail.information.value.language' | translate }}
+
+ {{ productDetail.language }}
+
+ @if (externalDocumentLink !== '') {
+
+
+ }
+
+
+
+ {{ 'common.product.detail.type' | translate }}
+ {{ productDetail.type }}
- }
- @if(productDetail.statusBadgeUrl) {
- {{ 'common.product.detail.information.value.status' | translate }}
+ {{ 'common.product.detail.information.value.tag' | translate }}
+
+
+ {{ productDetail.tags ? productDetail.tags!.join(', ') : '' }}
+
+
+ @if (productDetail.sourceUrl) {
+
+
+
+ {{ 'common.product.detail.information.value.source' | translate }}
+
+
+
+ github.com
+
+
+
+ }
+ @if (productDetail.statusBadgeUrl) {
+
+
+
+ {{ 'common.product.detail.information.value.status' | translate }}
+
+
+
+ }
+
+
+
+ {{
+ 'common.product.detail.information.value.moreInformation' | translate
+ }}
+
+
+
+ {{ 'common.product.detail.information.value.contactUs' | translate }}
+
-
- }
-
-
-
- {{
- 'common.product.detail.information.value.moreInformation' | translate
- }}
-
-
-
- {{ 'common.product.detail.information.value.contactUs' | translate }}
-
-
-
+}
diff --git a/marketplace-ui/src/app/modules/product/product-detail/product-detail-information-tab/product-detail-information-tab.component.ts b/marketplace-ui/src/app/modules/product/product-detail/product-detail-information-tab/product-detail-information-tab.component.ts
index 9c102cfae..4862f8b39 100644
--- a/marketplace-ui/src/app/modules/product/product-detail/product-detail-information-tab/product-detail-information-tab.component.ts
+++ b/marketplace-ui/src/app/modules/product/product-detail/product-detail-information-tab/product-detail-information-tab.component.ts
@@ -1,5 +1,12 @@
import { CommonModule } from '@angular/common';
-import { Component, inject, Input, OnChanges, SimpleChange, SimpleChanges } from '@angular/core';
+import {
+ Component,
+ inject,
+ Input,
+ OnChanges,
+ SimpleChange,
+ SimpleChanges
+} from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
import { ProductDetail } from '../../../../shared/models/product-detail.model';
import { LanguageService } from '../../../../core/services/language/language.service';
@@ -7,13 +14,19 @@ import { ProductDetailService } from '../product-detail.service';
import { VERSION } from '../../../../shared/constants/common.constant';
import { LoadingService } from '../../../../core/services/loading/loading.service';
import { ThemeService } from '../../../../core/services/theme/theme.service';
+import { EmptyProductDetailPipe } from '../../../../shared/pipes/empty-product-detail.pipe';
+import { LoadingComponentId } from '../../../../shared/enums/loading-component-id';
const SELECTED_VERSION = 'selectedVersion';
const PRODUCT_DETAIL = 'productDetail';
@Component({
selector: 'app-product-detail-information-tab',
standalone: true,
- imports: [CommonModule, TranslateModule],
+ imports: [
+ CommonModule,
+ TranslateModule,
+ EmptyProductDetailPipe
+],
templateUrl: './product-detail-information-tab.component.html',
styleUrl: './product-detail-information-tab.component.scss'
})
@@ -22,6 +35,7 @@ export class ProductDetailInformationTabComponent implements OnChanges {
productDetail!: ProductDetail;
@Input()
selectedVersion!: string;
+ protected LoadingComponentId = LoadingComponentId;
externalDocumentLink = '';
displayVersion = '';
displayExternalDocName: string | null = '';
@@ -33,7 +47,10 @@ export class ProductDetailInformationTabComponent implements OnChanges {
ngOnChanges(changes: SimpleChanges): void {
let version = '';
const changedSelectedVersion = changes[SELECTED_VERSION];
- if (changedSelectedVersion && changedSelectedVersion.currentValue === changedSelectedVersion.previousValue) {
+ if ( changedSelectedVersion &&
+ changedSelectedVersion.currentValue ===
+ changedSelectedVersion.previousValue
+ ) {
return;
}
const changedProduct = changes[PRODUCT_DETAIL];
@@ -47,7 +64,11 @@ export class ProductDetailInformationTabComponent implements OnChanges {
return;
}
- this.productDetailService.getExternalDocumentForProductByVersion(this.productDetail.id, this.extractVersionValue(version))
+ this.productDetailService
+ .getExternalDocumentForProductByVersion(
+ this.productDetail.id,
+ this.extractVersionValue(version)
+ )
.subscribe({
next: response => {
if (response) {
@@ -56,11 +77,9 @@ export class ProductDetailInformationTabComponent implements OnChanges {
} else {
this.resetValues();
}
- this.loadingService.hide();
},
error: () => {
this.resetValues();
- this.loadingService.hide();
}
});
this.displayVersion = this.extractVersionValue(this.selectedVersion);
@@ -80,7 +99,7 @@ export class ProductDetailInformationTabComponent implements OnChanges {
isProductChanged(changedProduct: SimpleChange) {
return !!(changedProduct?.previousValue &&
Object.keys(changedProduct.previousValue).length > 0 &&
- changedProduct.currentValue !== changedProduct.previousValue);
+ changedProduct.currentValue !== changedProduct.previousValue
+ );
}
-
}
diff --git a/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.html b/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.html
index 4fb9bca6c..3369b6960 100644
--- a/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.html
+++ b/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.html
@@ -47,7 +47,6 @@
@if (isDropDownDisplayed()) {
}
@@ -127,14 +126,18 @@
[matomoClickName]="installButton.name + ' - ' + getTrackingEnvironmentBasedOnActionType()"
[lang]="languageService.selectedLanguage()"
class="btn btn__install flex-grow-1 install-designer-button m-0 col-4" id="install-button"
- (click)="onUpdateInstallationCountForDesigner()" onClick="function installInDesigner() {
+ (click)="onUpdateInstallationCountForDesigner()" onClick="function installInDesigner(event) {
const selectedItemElement = document.querySelector('.install-designer-dropdown');
if (selectedItemElement) {
const metaDataJsonUrl = selectedItemElement.getAttribute('metaDataJsonUrl');
- install(metaDataJsonUrl);
+ try {
+ install(metaDataJsonUrl);
+ } catch (error) {
+ event.stopImmediatePropagation();
+ }
}
}
- installInDesigner();" [ngClass]="themeService.isDarkMode() ? 'btn-light' : 'btn-primary'">
+ installInDesigner(event);" [ngClass]="themeService.isDarkMode() ? 'btn-light' : 'btn-primary'">
{{ 'common.product.detail.install.buttonLabelInDesigner' | translate }}
@@ -154,4 +157,6 @@
{{ 'common.product.detail.contactUs.label' | translate }}
}
+ @default {
+ }
}
diff --git a/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.scss b/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.scss
index 57941337e..c12556917 100644
--- a/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.scss
+++ b/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.scss
@@ -11,22 +11,23 @@
justify-content: space-between;
box-shadow: 0px 4px 30px 0px #0000001a;
border: 0.5px solid var(--ivy-secondary-border-color);
- top: 0.8rem !important;
+ top: 1rem !important;
.tooltip-arrow {
- top: -0.8rem !important;
+ top: -1rem !important;
width: 0;
height: 0;
border-left: 13px solid transparent;
border-right: 13px solid transparent;
- border-bottom: 13px solid var(--ivy-secondary-border-color);
&::before {
+ box-sizing: border-box !important;
width: 0;
height: 0;
- border-left: 12px solid transparent !important;
- border-right: 12px solid transparent !important;
- border-bottom: 12px solid var(--bs-body-bg) !important;
- top: 0.15rem !important;
+ transform: rotate(45deg);
+ border-top-left-radius: 5px !important;
+ border: 1rem solid var(--bs-body-bg) !important;
+ box-shadow: -0.05em -0.05em 0em var(--ivy-secondary-border-color-up-arrow);
+ top: 0.05rem !important;
left: -0.75rem;
}
}
@@ -89,6 +90,7 @@
.btn__install {
border: 0px;
}
+
.primary-color {
color: var(--ivy-primary-bg);
}
diff --git a/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.spec.ts b/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.spec.ts
index d5d74968e..f1c431ff1 100644
--- a/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.spec.ts
+++ b/marketplace-ui/src/app/modules/product/product-detail/product-detail-version-action/product-detail-version-action.component.spec.ts
@@ -10,7 +10,6 @@ import { CookieService } from 'ngx-cookie-service';
import { ActivatedRoute, provideRouter, Router } from '@angular/router';
import { CommonUtils } from '../../../../shared/utils/common.utils';
import { ROUTER } from '../../../../shared/constants/router.constant';
-import { MatomoConfiguration, MatomoModule, MatomoRouterModule } from 'ngx-matomo-client';
import { MatomoTestingModule } from 'ngx-matomo-client/testing';
import { ProductDetailActionType } from '../../../../shared/enums/product-detail-action-type';
import { MATOMO_TRACKING_ENVIRONMENT } from '../../../../shared/constants/matomo.constant';
@@ -31,10 +30,11 @@ describe('ProductDetailVersionActionComponent', () => {
beforeEach(() => {
productServiceMock = jasmine.createSpyObj('ProductService', [
- 'sendRequestToProductDetailVersionAPI', 'sendRequestToUpdateInstallationCount', 'sendRequestToGetProductVersionsForDesigner'
+ 'sendRequestToProductDetailVersionAPI',
+ 'sendRequestToUpdateInstallationCount',
+ 'sendRequestToGetProductVersionsForDesigner'
]);
- const commonUtilsSpy = jasmine.createSpyObj('CommonUtils', ['getCookieValue']);
- // const cookieServiceSpy = jasmine.createSpyObj('CookieService', ['get', 'set']);
+ const commonUtilsSpy = jasmine.createSpyObj('CommonUtils', [ 'getCookieValue' ]);
const activatedRouteSpy = jasmine.createSpyObj('ActivatedRoute', [], {
snapshot: {
queryParams: {}
@@ -43,7 +43,7 @@ describe('ProductDetailVersionActionComponent', () => {
TestBed.configureTestingModule({
imports: [
- ProductDetailVersionActionComponent,
+ ProductDetailVersionActionComponent,
TranslateModule.forRoot(),
MatomoTestingModule.forRoot()
],
@@ -67,9 +67,7 @@ describe('ProductDetailVersionActionComponent', () => {
fixture.detectChanges();
});
- it('should create', () => {
- expect(component).toBeTruthy();
- });
+ it('should create', () => { expect(component).toBeTruthy(); });
it('first artifact should be chosen when select corresponding version', () => {
const selectedVersion = 'Version 10.0.2';
@@ -91,11 +89,13 @@ describe('ProductDetailVersionActionComponent', () => {
it('should update selectedVersion, artifacts, selectedArtifactName, and selectedArtifact, and call addVersionParamToRoute', () => {
const version = '1.0';
- const artifacts = [{
- name: 'Example Artifact',
- downloadUrl: 'https://example.com/download',
- isProductArtifact: true
- } as ItemDropdown];
+ const artifacts = [
+ {
+ name: 'Example Artifact',
+ downloadUrl: 'https://example.com/download',
+ isProductArtifact: true
+ } as ItemDropdown
+ ];
const versionMap = new Map