UNPKG

@vendasta/store

Version:

Components and data for Store

70 lines (69 loc) 4.51 kB
import { Component, EventEmitter, Input, Output } from '@angular/core'; var VaSalespersonDetailsComponent = /** @class */ (function () { function VaSalespersonDetailsComponent() { this.showGetItNow = true; this.getItNow = new EventEmitter(); } VaSalespersonDetailsComponent.prototype.onGetItNowSelected = function () { this.getItNow.emit(this.salesperson); }; Object.defineProperty(VaSalespersonDetailsComponent.prototype, "iconUrl", { get: function () { return this.salesperson && this.salesperson.photoUrlSecure ? this.salesperson.photoUrlSecure : 'https://vbc-frontend.storage-download.googleapis.com/salesperson-details/default_sales_person.jpg'; }, enumerable: true, configurable: true }); Object.defineProperty(VaSalespersonDetailsComponent.prototype, "name", { get: function () { return this.salesperson && this.salesperson.formattedName ? this.salesperson.formattedName : ''; }, enumerable: true, configurable: true }); Object.defineProperty(VaSalespersonDetailsComponent.prototype, "title", { get: function () { return this.salesperson && this.salesperson.jobTitle ? this.salesperson.jobTitle : ''; }, enumerable: true, configurable: true }); Object.defineProperty(VaSalespersonDetailsComponent.prototype, "email", { get: function () { return this.salesperson && this.salesperson.email ? this.salesperson.email : ''; }, enumerable: true, configurable: true }); Object.defineProperty(VaSalespersonDetailsComponent.prototype, "cityAndState", { get: function () { return this.salesperson && this.salesperson.city && this.salesperson.state ? this.salesperson.city + ', ' + this.salesperson.state : ''; }, enumerable: true, configurable: true }); VaSalespersonDetailsComponent.decorators = [ { type: Component, args: [{ selector: 'va-salesperson-details', template: "<div class=\"container\"> <div class=\"salesperson-contact-info\"> <div class=\"salesperson-image\" *ngIf=\"salesperson\"> <va-icon [iconUrl]=\"iconUrl\" [diameter]=\"60\"></va-icon> </div> <div> <div class=\"salesperson-name\">{{ name }}</div> <div>{{ title }}</div> <div>{{ cityAndState }}</div> <div><a href=\"mailto:{{ email }}\">{{ email }}</a></div> </div> <div *ngIf=\"!salesperson\" class=\"generic-contact\"> Contact {{ brandName ? \"your \" + brandName : \"a\" }} representative today! </div> <div class=\"pricing\"> <va-pricing [pricing]=\"packagePricing\" wrapFrequency=\"true\"></va-pricing> <div class=\"cta get-it-now-bottom-button\"> <button mat-button *ngIf=\"salesperson && showGetItNow\" (click)=\"onGetItNowSelected()\" class=\"now-button\"> Get it Now </button> </div> </div> </div> </div> ", styles: ["a { color: #1e88e5; text-decoration: none; } .container { width: 100%; margin: 0 auto; background-color: #ffffff; box-shadow: 1px 1px 1px 0 rgba(0, 0, 0, 0.2); } .salesperson-image { margin-right: 20px; } .salesperson-contact-info { display: flex; align-items: center; padding: 24px; font-size: 14px; color: #9e9e9e; } @media screen and (max-width: 600px) { .salesperson-contact-info { flex-direction: column; display: inline-block; } } .salesperson-name { font-size: 20px; font-weight: bold; color: #212121; } .generic-contact { margin-left: 20px; } .pricing { display: flex; align-items: center; flex-grow: 1; justify-content: flex-end; } .pricing ::ng-deep .price-box { flex-direction: row; } .pricing ::ng-deep .price-number { margin-right: 4px; } @media screen and (min-width: 600px) { .pricing { padding-left: 16px; } } .pricing va-pricing { margin-right: 20px; } .now-button { font-size: 14px; color: white; background-color: #4caf50; } "] },] }, ]; /** @nocollapse */ VaSalespersonDetailsComponent.ctorParameters = function () { return []; }; VaSalespersonDetailsComponent.propDecorators = { 'salesperson': [{ type: Input },], 'packagePricing': [{ type: Input },], 'brandName': [{ type: Input },], 'showGetItNow': [{ type: Input },], 'getItNow': [{ type: Output },], }; return VaSalespersonDetailsComponent; }()); export { VaSalespersonDetailsComponent };