Line | Author | Fragment | Author | Line |
---|---|---|---|---|
57 | NA | $color-quaternary: var(--color-quaternary); $color-dark: #000; $color-inverse: #fff; $color-special-primary: #e74c3c; //RED $color-special-secondary: #f39c12; //ORANGE $color-special-tertiary: #00abea; //BLUE $color-special-quaternary: #5cb85c; // GREEN // colors for product label ribbons $color-label-sale: #ea1919; // sale $color-label-topseller: #f0c; // topseller $color-label-new: #06f; // new // BORDERS $border-color-corporate: $color-corporate; $border-color-default: #222; $border-color-light: #ccc; $border-color-lighter: #ddd; $border-width-default: 1px; // BUTTONS // primary buttons $button-primary-bg: $CORPORATE-PRIMARY; $button-primary-border: $CORPORATE-SECONDARY; $button-focus-box-shadow: $CORPORATE-SHADOW; // default buttons $button-default-color: $CORPORATE-PRIMARY; $button-default-bg: #fff; $button-default-border: $CORPORATE-PRIMARY; // datepicker $datepicker-border-radius: 15px; $datepicker-today-bg: #ff9800; $datepicker-today-hover: #e65100; $datepicker-active-bg: $CORPORATE-PRIMARY; $datepicker-active-hover: $CORPORATE-SECONDARY; // input indicator color $error-color: #dc3545; $success-color: #28a745; // mobile toggler base width $toggler-width: 64px; // Header $top-header-height: 40px; $header-height-mobile: 55px; //search container $search-container-height: 38px; // Navigation $font-size-navbar-item: $font-size-corporate * 1.25; // ~18px $font-size-menu-item: $font-size-corporate * 1.05; // ~15px $font-size-sub-menu-item: $font-size-corporate; // ~14px $font-size-navbar-item-mobile: $font-size-corporate * 1.14; // ~16px $font-size-menu-item-mobile: $font-size-corporate; // ~14px $font-size-sub-menu-item-mobile: $font-size-corporate; // ~14px // filter $swatch-image-diameter: 28px; $swatch-image-padding-to-border: 2px; // toasts $toastViewBox: '0 0 512 512'; $toast-error-icon: '<path d="M256,0C114.6,0,0,114.6,0,256s114.6,256,256,256s256-114.6,256-256S397.4,0,256,0z M377,343c9.4,9.4,9.4,24.6,0,33.9c-4.7,4.7-10.8,7-17,7s-12.3-2.3-17-7l-87-87l-87,87c-4.7,4.7-10.8,7-17,7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6,0-33.9l87-87l-87-87c-9.4-9.4-9.4-24.6,0-33.9c9.4-9.4,24.6-9.4,33.9,0l87,87l87-87c9.4-9.4,24.6-9.4,33.9,0c9.4,9.4,9.4,24.6,0,33.9l-87,87L377,343z"/>'; $toast-warning-icon: '<path d="M7.5,14.967A7.467,7.467,0,1,0,.033,7.5,7.476,7.476,0,0,0,7.5,14.967Zm0-14A6.533,6.533,0,1,1,.967,7.5,6.54,6.54,0,0,1,7.5.967Z"/><circle cx="7.5" cy="11.5" r="0.5"/><path d="M8,8V3.5a.5.5,0,0,0-1,0V10H8Z"/>'; $toast-success-icon: '<path d="M437,75C388.7,26.6,324.4,0,256,0S123.3,26.6,75,75C26.6,123.3,0,187.6,0,256s26.6,132.7,75,181c48.4,48.4,112.6,75,181,75s132.7-26.6,181-75c48.4-48.4,75-112.6,75-181S485.4,123.3,437,75z M389,191L225,355c-4.5,4.5-10.6,7-17,7s-12.5-2.5-17-7l-68-68c-9.4-9.4-9.4-24.6,0-33.9c9.4-9.4,24.6-9.4,33.9,0l51,51l147-147c9.4-9.4,24.6-9.4,33.9,0C398.3,166.4,398.3,181.6,389,191z"/>'; $toast-info-icon: '<path d="M256,0C114.6,0,0,114.6,0,256s114.6,256,256,256s256-114.6,256-256S397.4,0,256,0z M280,400c0,13.3-10.7,24-24,24s-24-10.7-24-24V216c0-13.3,10.7-24,24-24s24,10.7,24,24V400z M256,160c-17.7,0-32-14.3-32-32s14.3-32,32-32c17.7,0,32,14.3,32,32S273.7,160,256,160z"/>'; /* stylelint-disable number-max-precision */ $toast-error-color: rgb(114 28 36 / 0.999999); $toast-warning-color: rgb(133 100 4 / 0.999999); $toast-success-color: rgb(21 87 36 / 0.999999); $toast-info-color: rgb(12 84 96 / 0.999999); /* stylelint-enable number-max-precision */ /////////////////////////////////////////////////////////////////////////////// // CUSTOMIZED BOOTSTRAP DEFAULT VARIABLES // theme specific customization of Bootstrap variables /////////////////////////////////////////////////////////////////////////////// // Color system $white: #fff; $gray-100: #f8f9fa; $gray-200: #e9ecef; $gray-300: #dee2e6; $gray-400: #ced4da; $gray-500: #adb5bd; $gray-600: #6c757d; $gray-700: #495057; $gray-800: #343a40; $gray-900: #212529; $black: #000; | NA | 57 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
168 | NA | $danger: $color-special-primary; $warning: $color-special-secondary; $info: $color-special-tertiary; $success: $color-special-quaternary; // Body // Settings for the `<body>` element. $body-bg: $white; $body-color: $color-primary; // Links // Style anchor elements. $link-color: $CORPORATE-PRIMARY; $link-hover-color: $CORPORATE-SECONDARY; // Components // Define common padding and border radius sizes and more. $border-radius: 0; $border-radius-lg: 0; $border-radius-sm: 0; // Fonts // Font, line-height, and color for body text, headings, and more. $font-family-sans-serif: $font-family-regular; $font-family-monospace: 'Menlo', 'Monaco', 'Consolas', 'Courier New', monospace; $font-family-base: $font-family-regular; $font-size-base: $font-size-corporate; // 14px is the bootstrap 3 default font size (1rem should be around 16px) $font-size-sm: $font-size-base * 0.85; // ~12px $h1-font-size: $font-size-base * 2.15; // ~30px $h2-font-size: $font-size-base * 1.7; // ~24px $h3-font-size: $font-size-base * 1.25; // ~18px $h4-font-size: $font-size-base * 1.05; // ~15px $h6-font-size: $font-size-base * 0.85; // ~12px $headings-font-family: $font-family-condensedbold; $headings-font-weight: normal; $headings-line-height: 1.1; $headings-color: $text-color-primary; // Buttons + Forms // Shared variables that are reassigned to `$input-` and `$btn-` specific variables. // Forms $input-placeholder-color: $text-color-quaternary; $input-accent-color: #222; // Dropdown // Dropdown menu container and contents. $dropdown-border-color: rgb(0 0 0 / 0.15); // Grid breakpoints // Define the minimum dimensions at which your layout will change, // adapting to different screen sizes, for use in media queries. $grid-breakpoints: ( xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, ); // Grid columns // Set the number of columns and specify the width of the gutters. $grid-gutter-width: 30px; // Container sizes // Define the maximum width of `.container` for different screen sizes. // to work well with our breakpoints the value for 'sm' needs to be the width of the next breakpoint // and the value of 'md' needs to be larger than the one for 'sm' $container-max-widths: ( sm: 768px, md: 770px, lg: map.get($grid-breakpoints, lg) - $grid-gutter-width, xl: map.get($grid-breakpoints, xl) - $grid-gutter-width, ); // Navbar $navbar-padding-x: 0; // Popovers $popover-max-width: 310px; $popover-border-color: rgb(0 0 0 / 0.2); // Modals $modal-content-border-color: rgb(0 0 0 / 0.2); $modal-header-border-color: $border-color-light; // Carousel $carousel-control-color: $color-secondary; $carousel-control-width: 5%; $carousel-indicator-active-bg: $CORPORATE-PRIMARY; // Close $close-text-shadow: none; | NA | 164 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
1 | NA | let ports = require('./ecosystem-ports.json'); if (process.env.ACTIVE_THEMES) { const active = process.env.ACTIVE_THEMES.split(','); ports = Object.entries(ports) .filter(([theme]) => active.includes(theme)) .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}); } pm2.connect(err1 => { if (!err1) { pm2.list((err2, list) => { if (!err2) { Object.entries(ports).forEach(([theme]) => { | NA | 1 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
1 | NA | let ports = require('./ecosystem-ports.json'); if (process.env.ACTIVE_THEMES) { const active = process.env.ACTIVE_THEMES.split(','); ports = Object.entries(ports) .filter(([theme]) => active.includes(theme)) .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}); } | NA | 23 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
1 | NA | let ports = require('./ecosystem-ports.json'); if (process.env.ACTIVE_THEMES) { const active = process.env.ACTIVE_THEMES.split(','); ports = Object.entries(ports) .filter(([theme]) => active.includes(theme)) .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}); } | NA | 1 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
13 | NA | countryCode = 'GB'; getModel(model: Partial<Address> = {}): Partial<Address> { return pick( model, 'companyName1', 'companyName2', 'title', 'firstName', 'lastName', 'addressLine1', 'addressLine2', 'addressLine3', 'postalCode', 'city', 'phoneHome' ); } getFieldConfiguration(): FormlyFieldConfig[] { return addressesFieldConfiguration([ this.businessCustomer && !this.shortForm && ['companyName1', 'companyName2'], !this.shortForm && ['title', 'firstName', 'lastName'], [ 'addressLine1', 'addressLine2', { key: 'addressLine3', props: { | NA | 13 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
118 | NA | } private addDaysToToday$(days$: Observable<number | undefined>): Observable<NgbDateStruct | undefined> { return days$.pipe( map(daysLoc => typeof daysLoc === 'number' ? this.calendar.getNext(this.calendar.getToday(), 'd', daysLoc) : undefined ) ); } get minDate$(): Observable<NgbDateStruct> { const minDays$ = toObservableNumber(this.props.minDays); return this.addDaysToToday$(minDays$); | NA | 28 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
20 | NA | export class FilterTextComponent implements OnInit { @Input({ required: true }) filterElement: Filter; @Output() applyFilter: EventEmitter<{ searchParameter: URLFormParams }> = new EventEmitter(); /** * two-way-binding (banana in a box) [(showAll)]="showAllElements[element.name]" */ @Output() showAllChange = new EventEmitter<boolean>(); private showAllValue = false; @Input() get showAll() { return this.showAllValue; } set showAll(val) { this.showAllValue = val; this.showAllChange.emit(this.showAllValue); } | NA | 20 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
137 | NA | if (this.editAddress && Object.keys(this.editAddress).length > 0) { if (this.featureToggleService.enabled('addressDoctor')) { const id = this.featureEventService.sendNotification('addressDoctor', 'check-address', { address, }); this.featureEventService .eventResultListener$('addressDoctor', 'check-address', id) .pipe(whenTruthy(), take(1), takeUntilDestroyed(this.destroyRef)) .subscribe(({ data }) => { if (data) { this.checkoutFacade.updateBasketAddress(data); this.collapse = true; | NA | 156 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
3 | NA | import { FormlyFieldConfig } from '@ngx-formly/core/lib/core'; import { BehaviorSubject, Observable, combineLatest } from 'rxjs'; import { filter, map, take } from 'rxjs/operators'; import { AccountFacade } from 'ish-core/facades/account.facade'; import { CheckoutFacade } from 'ish-core/facades/checkout.facade'; import { FeatureToggleService } from 'ish-core/feature-toggle.module'; import { Address } from 'ish-core/models/address/address.model'; import { FeatureEventService } from 'ish-core/utils/feature-event/feature-event.service'; import { whenTruthy } from 'ish-core/utils/operators'; import { FormsService } from 'ish-shared/forms/utils/forms.service'; /** * Standalone widget component for selecting and setting the basket shipping address in the checkout. | NA | 3 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
23 | NA | export class BasketShippingAddressWidgetComponent implements OnInit { @Input({ required: true }) eligibleAddresses$: Observable<Address[]>; @Input() showErrors = true; @Output() collapseChange = new BehaviorSubject(true); @Input() set collapse(value: boolean) { this.collapseChange.next(value); if (value) { this.editAddress = {}; } } | NA | 23 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
89 | NA | ]).pipe(map(([collapseChange, loggedIn, addressesEqual]) => collapseChange && (loggedIn || addressesEqual))); this.fields = [ { key: 'id', type: 'ish-select-field', props: { fieldClass: 'col-12', options: FormsService.getAddressOptions(this.addresses$), placeholder: this.emptyOptionLabel, }, hooks: { onInit: field => { field.form .get('id') .valueChanges.pipe(whenTruthy(), takeUntilDestroyed(this.destroyRef)) .subscribe(addressId => this.checkoutFacade.assignBasketAddress(addressId, 'shipping')); }, | NA | 74 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
112 | NA | combineLatest([this.addresses$, this.checkoutFacade.basket$]) .pipe( // prevent assigning the address at an anonymous basket after login filter(([addresses, basket]) => !!basket?.customerNo && !!addresses?.length), take(1), takeUntilDestroyed(this.destroyRef) ) .subscribe(([addresses, basket]) => { if (!basket.commonShipToAddress && addresses.length === 1) { this.checkoutFacade.assignBasketAddress(addresses[0].id, 'shipping'); | NA | 97 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
125 | NA | this.shippingAddress$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => (this.collapse = true)); } showAddressForm(address?: Address) { if (address) { this.editAddress = { ...address }; } else { this.editAddress = {}; } this.collapse = false; } saveAddress(address: Address) { if (this.editAddress && Object.keys(this.editAddress).length > 0) { if (this.featureToggleService.enabled('addressDoctor')) { const id = this.featureEventService.sendNotification('addressDoctor', 'check-address', { address, }); this.featureEventService .eventResultListener$('addressDoctor', 'check-address', id) .pipe(whenTruthy(), take(1), takeUntilDestroyed(this.destroyRef)) .subscribe(({ data }) => { if (data) { this.checkoutFacade.updateBasketAddress(data); this.collapse = true; } }); } else { this.checkoutFacade.updateBasketAddress(address); this.collapse = true; } } else { if (this.featureToggleService.enabled('addressDoctor')) { const id = this.featureEventService.sendNotification('addressDoctor', 'check-address', { address, }); this.featureEventService .eventResultListener$('addressDoctor', 'check-address', id) .pipe(whenTruthy(), take(1), takeUntilDestroyed(this.destroyRef)) .subscribe(({ data }) => { if (data) { this.checkoutFacade.createBasketAddress(data, 'shipping'); } | NA | 110 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
25 | NA | this.pagelet.stringParam('Page'), this.pagelet.numberParam('SubNavigationDepth', 0) ); } } showSubMenu(childCount: number) { return (this.pagelet.hasParam('SubNavigationDepth') && this.pagelet.numberParam('SubNavigationDepth') > 0 && childCount) || this.pagelet.hasParam('SubNavigationHTML') ? true : false; } subMenuShow(subMenu: HTMLElement) { subMenu.classList.add('hover'); } subMenuHide(subMenu: HTMLElement) { subMenu.classList.remove('hover'); } /** * Indicate if specific content page is expanded. */ isOpened(uniqueId: string): boolean { return this.openedPages.includes(uniqueId); } | NA | 25 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
44 | NA | <fa-icon *ngIf="isOpened(node.contentPageId); else closed" [icon]="['fas', 'minus']" /> <ng-template #closed><fa-icon [icon]="['fas', 'plus']" /></ng-template> </a> <ng-container [ngTemplateOutlet]="treeNodeTemplate" [ngTemplateOutletContext]="{ treeNode: node, depth: depth + 1 }" /> </ng-container> </li> <li *ngIf="pagelet.hasParam('SubNavigationHTML') && depth === 1" class="sub-navigation-content"> <div [ishServerHtml]="pagelet.stringParam('SubNavigationHTML')"></div> </li> </ul> </ng-template> </ng-container> </li> </ng-container> | NA | 44 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
46 | NA | */ @Input({ required: true }) paymentMethod: PaymentMethod; /** * should be set to true by the parent, if component is visible */ @Input() activated = false; @Output() cancelPayment = new EventEmitter<void>(); @Output() submitPayment = new EventEmitter<{ parameters: Attribute<string>[]; saveAllowed: boolean }>(); private destroyRef = inject(DestroyRef); | NA | 51 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
84 | NA | if (!merchantId) { return; } this.scriptLoaded = true; this.scriptLoader .load(this.getPayEngineURL()) .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe({ next: () => { PayEngine.setPublishableKey(merchantId); }, error: error => { this.scriptLoaded = false; this.errorMessage.general.message = error; this.cd.detectChanges(); }, }); } } | NA | 67 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
35 | NA | this.monthOptions = range(1, 13) .map(n => n.toString().padStart(2, '0')) .map(n => ({ label: n, value: n })); const currentYear = new Date().getFullYear(); this.yearOptions = range(currentYear, currentYear + 7).map(n => ({ label: n.toString(), value: n.toString(), })); | NA | 35 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
151 | NA | }; } ) { if (this.parameterForm.invalid) { this.formSubmitted = true; markAsDirtyRecursive(this.parameterForm); } this.resetErrors(); if (error) { this.mapErrorMessage(error.message); } else if (this.parameterForm.valid) { this.submitPayment.emit({ parameters: [ { name: 'paymentInstrumentId', value: result.paymentInstrumentId }, { name: 'accountHolder', value: result.attributes.accountHolder }, { name: 'IBAN', value: result.attributes.iban }, | NA | 138 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
14 | NA | @Input({ required: true }) category: CategoryView; @Input() deviceType: DeviceType; isCollapsed = false; ngOnInit() { this.isCollapsed = this.deviceType === 'mobile'; } ngOnChanges() { if (!SSR) { window.scroll(0, 0); } this.isCollapsed = this.deviceType === 'mobile'; } toggle() { this.isCollapsed = !this.isCollapsed; if (!SSR) { window.scroll(0, 0); } } } | NA | 11 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
14 | NA | <formly-form [form]="accountProfilePasswordForm" [fields]="fields" /> <div class="row"> <div class="offset-md-4 col-md-8"> <button type="submit" class="btn btn-primary" [disabled]="buttonDisabled"> {{ 'account.update.button.label' | translate }} </button> <a routerLink="/account/profile" class="btn btn-secondary">{{ 'account.cancel.link' | translate }}</a> </div> </div> </form> </div> </div> </div> <h4 class="form-text">{{ 'account.help.heading' | translate }}</h4> <p class="form-text"> {{ 'account.update_password.question.text' | translate }}<br />{{ 'account.update_password.answer.text' | translate }} | NA | 14 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
15 | NA | </div> <div class="row d-flex"> <!-- Invoice Address --> <ish-info-box heading="checkout.widget.billing-address.heading" class="infobox-wrapper col-md-6"> <ish-address [address]="order.invoiceToAddress" [displayEmail]="true" /> </ish-info-box> <!-- Shipping Address --> <ish-info-box heading="checkout.widget.shipping-address.heading" class="infobox-wrapper col-md-6"> <ish-address [address]="order.commonShipToAddress" /> </ish-info-box> </div> <div class="row d-flex"> <!-- Shipping Method --> <ish-info-box heading="checkout.widget.shipping_method.heading" class="infobox-wrapper col-md-6"> <ish-basket-shipping-method [data]="order" /> </ish-info-box> | NA | 62 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
137 | NA | if (this.editAddress && Object.keys(this.editAddress).length > 0) { if (this.featureToggleService.enabled('addressDoctor')) { const id = this.featureEventService.sendNotification('addressDoctor', 'check-address', { address, }); this.featureEventService .eventResultListener$('addressDoctor', 'check-address', id) .pipe(whenTruthy(), take(1), takeUntilDestroyed(this.destroyRef)) .subscribe(({ data }) => { if (data) { this.checkoutFacade.updateBasketAddress(data); this.collapse = true; | NA | 174 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
35 | NA | @Input() view: OriginalComponent['view']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('wishlists').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../wishlists.module`).then(m => m.WishlistsModule); const { WishlistsLinkComponent: originalComponent } = await import('../../shared/wishlists-link/wishlists-link.component'); const ngModuleRef = createNgModule(module, this.injector); | NA | 32 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
35 | NA | @Input() view: OriginalComponent['view']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('wishlists').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../wishlists.module`).then(m => m.WishlistsModule); const { WishlistsLinkComponent: originalComponent } = await import('../../shared/wishlists-link/wishlists-link.component'); | NA | 37 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
66 | NA | const { ProductAddToWishlistComponent: originalComponent } = await import('../../shared/product-add-to-wishlist/product-add-to-wishlist.component'); const ngModuleRef = createNgModule(module, this.injector); this.component = this.anchor.createComponent(originalComponent, { ngModuleRef }); this.ngOnChanges( ); this.component.changeDetectorRef.markForCheck(); } ngOnChanges() { if (this.component) { this.component.instance.displayType = this.displayType; | NA | 64 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
32 | NA | @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('rating').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../rating.module`).then(m => m.RatingModule); const { ProductReviewsComponent: originalComponent } = await import('../../shared/product-reviews/product-reviews.component'); | NA | 35 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
29 | NA | * */ @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('quoting').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../quoting.module`).then(m => m.QuotingModule); const { QuotingBasketLineItemsComponent: originalComponent } = await import('../../shared/quoting-basket-line-items/quoting-basket-line-items.component'); | NA | 29 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
29 | NA | * */ @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; @Input() displayType: OriginalComponent['displayType']; @Input() cssClass: OriginalComponent['cssClass']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('wishlists').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { | NA | 29 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
32 | NA | @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('quoting').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../quoting.module`).then(m => m.QuotingModule); const { QuotingBasketLineItemsComponent: originalComponent } = await import('../../shared/quoting-basket-line-items/quoting-basket-line-items.component'); | NA | 37 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
66 | NA | const { ProductAddToWishlistComponent: originalComponent } = await import('../../shared/product-add-to-wishlist/product-add-to-wishlist.component'); const ngModuleRef = createNgModule(module, this.injector); this.component = this.anchor.createComponent(originalComponent, { ngModuleRef }); this.ngOnChanges( ); this.component.changeDetectorRef.markForCheck(); } ngOnChanges() { if (this.component) { this.component.instance.displayType = this.displayType; this.component.instance.cssClass = this.cssClass; } } } | NA | 66 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
29 | NA | * */ @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('quoting').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../quoting.module`).then(m => m.QuotingModule); const { QuotingBasketLineItemsComponent: originalComponent } = await import('../../shared/quoting-basket-line-items/quoting-basket-line-items.component'); | NA | 29 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
29 | NA | * */ @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('quickorder').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../quickorder.module`).then(m => m.QuickorderModule); const { QuickorderLinkComponent: originalComponent } = await import('../../shared/quickorder-link/quickorder-link.component'); | NA | 29 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
51 | NA | openModal(modal: SelectOrderTemplateModalComponent) { this.accountFacade.isLoggedIn$.pipe(take(1), takeUntilDestroyed(this.destroyRef)).subscribe(isLoggedIn => { if (isLoggedIn) { modal.show(); } else { // stay on the same page after login const queryParams = { returnUrl: this.router.routerState.snapshot.url, messageKey: 'ordertemplates' }; this.router.navigate(['/login'], { queryParams }); } }); } | NA | 36 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
24 | NA | items = wishlistData.items.map(item => ({ sku: AttributeHelper.getAttributeValueByAttributeName(item.attributes, 'sku'), id: AttributeHelper.getAttributeValueByAttributeName(item.attributes, 'id'), creationDate: Number(AttributeHelper.getAttributeValueByAttributeName(item.attributes, 'creationDate')), desiredQuantity: { value: AttributeHelper.getAttributeValueByAttributeName<Attribute<number>>( item.attributes, 'desiredQuantity' ).value, // TBD: is the unit necessary? // unit: item.desiredQuantity.unit, }, })); } else { items = []; } return { id: wishlistId, title: wishlistData.title, itemsCount: wishlistData.itemsCount || 0, | NA | 23 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
29 | NA | * */ @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; @Input() displayType: OriginalComponent['displayType']; @Input() cssClass: OriginalComponent['cssClass']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('wishlists').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { | NA | 29 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
66 | NA | const { ProductAddToWishlistComponent: originalComponent } = await import('../../shared/product-add-to-wishlist/product-add-to-wishlist.component'); const ngModuleRef = createNgModule(module, this.injector); this.component = this.anchor.createComponent(originalComponent, { ngModuleRef }); this.ngOnChanges( ); this.component.changeDetectorRef.markForCheck(); } ngOnChanges() { if (this.component) { this.component.instance.displayType = this.displayType; this.component.instance.cssClass = this.cssClass; } } } | NA | 66 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
37 | NA | @Input() cssClass: OriginalComponent['cssClass']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('orderTemplates').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../order-templates.module`).then(m => m.OrderTemplatesModule); const { ProductAddToOrderTemplateComponent: originalComponent } = await import('../../shared/product-add-to-order-template/product-add-to-order-template.component'); const ngModuleRef = createNgModule(module, this.injector); | NA | 32 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
35 | NA | @Input() displayType: OriginalComponent['displayType']; @Input() cssClass: OriginalComponent['cssClass']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('orderTemplates').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../order-templates.module`).then(m => m.OrderTemplatesModule); const { ProductAddToOrderTemplateComponent: originalComponent } = await import('../../shared/product-add-to-order-template/product-add-to-order-template.component'); | NA | 35 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
35 | NA | @Input() displayType: OriginalComponent['displayType']; @Input() cssClass: OriginalComponent['cssClass']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('orderTemplates').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../order-templates.module`).then(m => m.OrderTemplatesModule); const { ProductAddToOrderTemplateComponent: originalComponent } = await import('../../shared/product-add-to-order-template/product-add-to-order-template.component'); | NA | 35 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
29 | NA | * */ @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; @Input() view: OriginalComponent['view']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('wishlists').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { | NA | 29 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
32 | NA | @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('compare').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../compare.module`).then(m => m.CompareModule); const { ProductSendToCompareComponent: originalComponent } = await import('../../shared/product-send-to-compare/product-send-to-compare.component'); | NA | 35 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
64 | NA | const { WishlistsLinkComponent: originalComponent } = await import('../../shared/wishlists-link/wishlists-link.component'); const ngModuleRef = createNgModule(module, this.injector); this.component = this.anchor.createComponent(originalComponent, { ngModuleRef }); this.ngOnChanges( ); this.component.changeDetectorRef.markForCheck(); } ngOnChanges() { if (this.component) { this.component.instance.view = this.view; } } } | NA | 64 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
29 | NA | * */ @ViewChild('anchor', { read: ViewContainerRef, static: true }) anchor: ViewContainerRef; @Input() displayType: OriginalComponent['displayType']; @Input() cssClass: OriginalComponent['cssClass']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('wishlists').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { | NA | 29 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
35 | NA | @Input() view: OriginalComponent['view']; private component: ComponentRef<OriginalComponent>; private destroyRef = inject(DestroyRef); constructor( private featureToggleService: FeatureToggleService, private injector: Injector ) {} ngOnInit() { this.featureToggleService.enabled$('compare').pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async enabled => { if (enabled) { await this.renderComponent(); } else { this.anchor.clear(); } }) } private async renderComponent() { const module = await import(`../../compare.module`).then(m => m.CompareModule); const { ProductCompareStatusComponent: originalComponent } = await import('../../shared/product-compare-status/product-compare-status.component'); | NA | 37 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
66 | NA | const { ProductAddToWishlistComponent: originalComponent } = await import('../../shared/product-add-to-wishlist/product-add-to-wishlist.component'); const ngModuleRef = createNgModule(module, this.injector); this.component = this.anchor.createComponent(originalComponent, { ngModuleRef }); this.ngOnChanges( ); this.component.changeDetectorRef.markForCheck(); } ngOnChanges() { if (this.component) { this.component.instance.displayType = this.displayType; this.component.instance.cssClass = this.cssClass; } } } | NA | 66 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
90 | NA | products: response.elements.map((element: ProductDataStub) => this.productMapper.fromStubData(element)), sortableAttributes: Object.values(response.sortableAttributes || {}), total: response.total ? response.total : response.elements.length, })), withLatestFrom( this.appFacade.serverSetting$<boolean>('preferences.ChannelPreferences.EnableAdvancedVariationHandling') ), map(([{ products, sortableAttributes, total }, advancedVariationHandling]) => ({ products: this.postProcessMasters(products, advancedVariationHandling), sortableAttributes, total, })) ); } | NA | 143 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
124 | NA | .set('searchTerm', searchTerm) .set('amount', amount.toString()) .set('offset', offset.toString()) .set('attrs', STUB_ATTRS) .set('attributeGroup', AttributeGroupTypes.ProductLabelAttributes) .set('returnSortKeys', 'true'); if (sortKey && sortKey !== 'default') { params = params.set('sortKey', sortKey); } return this.apiService .get<{ elements: ProductDataStub[]; sortKeys: string[]; | NA | 169 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
107 | NA | return input.filter((value, index, array) => array.indexOf(value) === index); } private static mergeEdges( current: { [id: string]: string[] }, incoming: { [id: string]: string[] } ): { [id: string]: string[] } { const edges = { ...current }; Object.keys(incoming).forEach(key => { if (current[key]) { let master: string[]; let slave: string[]; // node with more available edges is trustworthy if (incoming[key] && incoming[key].length > current[key].length) { master = incoming[key]; slave = current[key]; } else { master = current[key]; slave = incoming[key]; } // add edges from both and remove duplicates edges[key] = ContentPageTreeHelper.removeDuplicates([...master, ...slave]); } else { | NA | 147 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
156 | NA | } private static rootIdsEqual(t1: string[], t2: string[]) { return t1.length === t2.length && t1.every(e => t2.includes(e)); } private static edgesEqual(t1: { [id: string]: string[] }, t2: { [id: string]: string[] }) { return isEqual(t1, t2); } private static contentEqual( t1: { [id: string]: ContentPageTreeElement }, | NA | 176 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
168 | NA | t2: { [id: string]: ContentPageTreeElement } ) { const keys1 = Object.keys(t1); const keys2 = Object.keys(t2); return ( keys1.length === keys2.length && keys1.every(id => keys2.includes(id)) && keys1.every(id => isEqual(t1[id], t2[id])) ); } | NA | 186 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
45 | NA | : undefined, purchaseCurrency: data.purchaseCurrency, dynamicMessages: data.discounts ? data.discounts.dynamicMessages : undefined, invoiceToAddress: included?.invoiceToAddress && data.invoiceToAddress ? AddressMapper.fromData(included.invoiceToAddress[data.invoiceToAddress]) : undefined, commonShipToAddress: included?.commonShipToAddress && data.commonShipToAddress ? AddressMapper.fromData(included.commonShipToAddress[data.commonShipToAddress]) : undefined, commonShippingMethod: included?.commonShippingMethod && data.commonShippingMethod ? ShippingMethodMapper.fromData(included.commonShippingMethod[data.commonShippingMethod]) : undefined, costCenter: data.costCenter, customerNo: data.customer, email: data.user, lineItems: included?.lineItems && data.lineItems?.length ? data.lineItems.map(lineItemId => LineItemMapper.fromOrderItemData( included.lineItems[lineItemId], | NA | 26 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
66 | NA | LineItemMapper.fromOrderItemData( included.lineItems[lineItemId], included.lineItems_discounts, included.lineItems_warranty ) ) : [], totalProductQuantity: data.totalProductQuantity, payment: included?.payments && data.payments?.length && included.payments[data.payments[0]] ? PaymentMapper.fromIncludeData( included.payments[data.payments[0]], included.payments_paymentMethod?.[included.payments[data.payments[0]].paymentMethod] ? included.payments_paymentMethod[included.payments[data.payments[0]].paymentMethod] : undefined, included.payments[data.payments[0]].paymentInstrument && included.payments_paymentInstrument ? included.payments_paymentInstrument[included.payments[data.payments[0]].paymentInstrument] : undefined ) : undefined, totals, | NA | 47 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
35 | NA | lineItems?: { [id: string]: OrderItemData }; discounts?: { [id: string]: BasketRebateData }; lineItems_discounts?: { [id: string]: BasketRebateData }; lineItems_warranty?: { [id: string]: BasketWarrantyData }; commonShipToAddress?: { [urn: string]: AddressData }; commonShippingMethod?: { [id: string]: ShippingMethodData }; payments?: { [id: string]: PaymentData }; payments_paymentMethod?: { [id: string]: PaymentMethodBaseData }; payments_paymentInstrument?: { [id: string]: PaymentInstrument }; }; infos?: BasketInfo[]; | NA | 61 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
1 | NA | id: string; urn: string; type?: string; addressName: string; companyName1?: string; companyName2?: string; title?: string; firstName: string; lastName: string; addressLine1: string; addressLine2?: string; addressLine3?: string; postalCode: string; city: string; mainDivision?: string; mainDivisionCode?: string; country: string; | NA | 1 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
127 | NA | return this.accountFacade.isLoggedIn$.pipe( // wait until the user is logged out before you go to homepage to prevent unnecessary REST calls filter(loggedIn => !loggedIn), take(1), tap(() => this.tokenService.logOut()), // remove token from storage when user is logged out switchMap(() => this.store.pipe( select(selectQueryParam('returnUrl')), map(returnUrl => returnUrl || '/home'), map(returnUrl => this.router.parseUrl(returnUrl)) ) ) ); } | NA | 52 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
37 | NA | editProfile: true, }; } init() { this.apiTokenService.getCookieVanishes$().subscribe(type => { if (type === 'user') { this.accountFacade.logoutUser({ revokeApiToken: false }); } }); // OAuth Service should be configured before apiToken information are restored and the refresh token mechanism is setup this.apiTokenService.restore$(['user', 'order']).subscribe(noop); this.checkoutFacade.basket$.pipe(whenTruthy(), first()).subscribe(basketView => { window.sessionStorage.setItem('basket-id', basketView.id); }); } triggerLogin(route: ActivatedRouteSnapshot): TriggerReturnType { // check for required start parameters before doing anything with the punchout route | NA | 30 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
100 | NA | }), // punchout error after successful authentication (needs to logout) catchError(error => this.accountFacade.userLoading$.pipe( first(loading => !loading), delay(0), switchMap(() => { this.accountFacade.logoutUser(); this.apiTokenService.removeApiToken(); this.appFacade.setBusinessError(error); return of(this.router.parseUrl('/error')); }) ) ) ) ).pipe( // general punchout error handling (parameter missing, authentication error) catchError(error => { this.appFacade.setBusinessError(error); return of(this.router.parseUrl('/error')); }) ); } triggerLogout(): TriggerReturnType { window.sessionStorage.removeItem('basket-id'); this.accountFacade.logoutUser(); // user will be logged out and related refresh token is revoked on server return this.accountFacade.isLoggedIn$.pipe( // wait until the user is logged out before you go to homepage to prevent unnecessary REST calls filter(loggedIn => !loggedIn), take(1), tap(() => this.tokenService.logOut()), // remove token from storage when user is logged out | NA | 70 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
132 | NA | switchMap(() => this.store.pipe( select(selectQueryParam('returnUrl')), map(returnUrl => returnUrl || '/home'), map(returnUrl => this.router.parseUrl(returnUrl)) ) ) ); } intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> { return this.apiTokenService.intercept(req, next); } | NA | 101 |
Line | Author | Fragment | Author | Line |
---|---|---|---|---|
258 | NA | 'hasQuantityError', this.select('sku').pipe( whenTruthy(), distinctUntilChanged(), switchMap(() => this.select('children').pipe( map(children => Object.values(children)), debounceTime(300), skipWhile(children => !children?.length), map(children => !children.length || children.some(child => child.hasQuantityError)), distinctUntilChanged() | NA | 329 |