UNPKG

4.91 kBJavaScriptView Raw
1import { Component, EventEmitter, Input, Output } from '@angular/core';
2var VaHeaderContainerComponent = (function () {
3 function VaHeaderContainerComponent() {
4 this.prerequisiteSelected = new EventEmitter();
5 this.actionSelected = new EventEmitter();
6 }
7 VaHeaderContainerComponent.prototype.onActionSelected = function () {
8 this.actionSelected.emit();
9 };
10 VaHeaderContainerComponent.prototype.onPrerequisiteSelected = function () {
11 this.prerequisiteSelected.emit();
12 };
13 VaHeaderContainerComponent.decorators = [
14 { type: Component, args: [{
15 selector: 'va-header-container',
16 template: "<div class=\"header-container\"> <mat-card class=\"va-mat-card\"> <div class=\"product-overview\"> <div class=\"product-id\"> <va-icon [iconUrl]=\"iconUrl\" [name]=\"title\" [diameter]=\"120\"></va-icon> <div class=\"product-id-text\"> <h1 [ngClass]=\"{'stencil-title shimmer': !title, 'product-title': title}\"> {{ title }} </h1> <span [ngClass]=\"{'stencil-tagline shimmer': !title && !tagline, 'tagline': tagline}\"> {{ tagline }} </span> <mat-chip-list> <mat-chip *ngFor=\"let chip of chipLabels\">{{ chip }}</mat-chip> </mat-chip-list> </div> </div> <div class=\"pricing\"> <button *ngIf=\"showAction\" mat-raised-button class=\"app-enable-button\" [disabled]=\"!actionEnabled\" (click)=\"onActionSelected()\"> {{ actionLabel }} </button> <mat-card *ngIf=\"prerequisiteLabel\" class=\"addon-enable\" (click)=\"onPrerequisiteSelected()\"> Enabled with {{prerequisiteLabel}} </mat-card> <div *ngIf=\"showPricing\" class=\"price-box\"> <div *ngIf=\"pricing?.prices?.length\" class=\"wholesale-price\">{{ pricingLabel }}</div> <va-pricing [pricing]=\"pricing\"></va-pricing> </div> </div> </div> </mat-card> </div> ",
17 styles: [":host { font-size: 16px; } .product-title { font-size: 24px; } @media screen and (min-width: 600px) { .product-title { font-size: 32px; } } va-mat-card { margin-bottom: 24px; } .product-overview { display: flex; flex-wrap: wrap; border-bottom: 1px solid #e0e0e0; } .product-overview h1 { margin: 0; font-weight: normal; line-height: 1.2; } .product-overview mat-chip { margin-bottom: 3px; } .product-id { display: flex; width: 100%; padding: 24px; flex-grow: 1; } .product-id va-icon { margin-right: 20px; } @media screen and (max-width: 600px) { .product-id va-icon ::ng-deep .va-icon-container { width: 40px !important; height: 40px !important; } .product-id va-icon ::ng-deep .va-icon-container span { line-height: 40px !important; font-size: 15px !important; } } .product-id .product-id-text { display: flex; flex-direction: column; justify-content: center; } .product-id span { display: block; overflow: hidden; } .product-id .tagline { color: #616161; margin: 0.5em 0 1em; font-size: 16px; } @media screen and (min-width: 600px) { .product-id .tagline { font-size: 20px; } } @media screen and (min-width: 600px) { .product-id { width: 66%; padding-right: 20px; } } .inline-link { display: inline-flex !important; color: #1e88e5; cursor: pointer; padding-top: 5px; } .pricing { display: flex; flex-direction: column; width: 100%; padding: 0 24px 24px; color: #616161; } @media screen and (min-width: 600px) { .pricing { width: 34%; padding-top: 24px; padding-left: 20px; } } .pricing span { display: block; } .pricing span:nth-child(2) { margin: 0.5em 0 1em; } .pricing .price { font-size: 24px; font-weight: bold; line-height: 1; color: #4caf50; } .pricing .price-box { padding-top: 10px; } .app-enable-button { height: inherit; color: #ffffff; background-color: #4caf50; font-size: 20px; padding: 14px 16px; line-height: 1; } .addon-enable { height: inherit; background-color: #e0e0e0; font-size: 14px; padding: 14px 16px; line-height: 1; color: #1e88e5; cursor: pointer; text-align: center; } .wholesale-price { margin-top: 0; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid #e0e0e0; } .stencil-title { height: 32px; width: 200px; margin-bottom: 5px !important; } .stencil-tagline { height: 32px; width: 250px; } "]
18 },] },
19 ];
20 /** @nocollapse */
21 VaHeaderContainerComponent.ctorParameters = function () { return []; };
22 VaHeaderContainerComponent.propDecorators = {
23 'iconUrl': [{ type: Input },],
24 'title': [{ type: Input },],
25 'tagline': [{ type: Input },],
26 'chipLabels': [{ type: Input },],
27 'pricing': [{ type: Input },],
28 'pricingLabel': [{ type: Input },],
29 'actionEnabled': [{ type: Input },],
30 'actionLabel': [{ type: Input },],
31 'showAction': [{ type: Input },],
32 'showPricing': [{ type: Input },],
33 'prerequisiteLabel': [{ type: Input },],
34 'prerequisiteSelected': [{ type: Output },],
35 'actionSelected': [{ type: Output },],
36 };
37 return VaHeaderContainerComponent;
38}());
39export { VaHeaderContainerComponent };