@salesforcedevs/mrkt-components
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -9,3 +9,2 @@ { | ||
"mrkt/fullImgSection", | ||
"mrkt/noCodeSection", | ||
"mrkt/rectangularHeading", | ||
@@ -12,0 +11,0 @@ "mrkt/sectionHeader", |
{ | ||
"name": "@salesforcedevs/mrkt-components", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "Marketing Lightning web components for DSC", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "28224ddff4bbcb00044ecca05aea6f6511b4eccc" | ||
"gitHead": "deaeb3bcc945d1193082f046ec6cf97ace568302" | ||
} |
import { api, LightningElement } from "lwc"; | ||
import cx from "classnames"; | ||
import { track } from "dxUtils/analytics"; | ||
import { ButtonSize, ButtonTarget } from "typings/custom"; | ||
export const ANALYTICS_EVENT_NAME = "custEv_ctaButtonClick"; | ||
export const ANALYTICS_BASE_PAYLOAD = { | ||
elementType: "button", | ||
destinationType: "internal", | ||
ctaClick: true | ||
}; | ||
export default class CTASection extends LightningElement { | ||
@api buttonHref!: string; | ||
@api buttonTarget: ButtonTarget = null; | ||
@api buttonText!: string; | ||
@api buttonSize: ButtonSize = "small"; | ||
@api dark?: boolean; | ||
@@ -20,3 +15,3 @@ @api subtitle?: string; | ||
@api imgSrcRight?: string; | ||
@api title!: string; | ||
@api header!: string; | ||
@@ -36,11 +31,10 @@ private get hasImages(): boolean { | ||
private handleCtaClick(e: PointerEvent) { | ||
const payload = { | ||
...ANALYTICS_BASE_PAYLOAD, | ||
itemTitle: this.title, | ||
clickText: this.buttonText, | ||
clickUrl: this.buttonHref | ||
}; | ||
track(e.currentTarget!, ANALYTICS_EVENT_NAME, payload); | ||
track(e.currentTarget!, "custEv_ctaButtonClick", { | ||
click_text: this.buttonText, | ||
click_url: this.buttonHref, | ||
element_type: "button", | ||
element_title: this.header, | ||
content_category: "cta" | ||
}); | ||
} | ||
} |
@@ -15,3 +15,3 @@ import { api, LightningElement } from "lwc"; | ||
@api subtitle?: string; | ||
@api title?: string; | ||
@api header!: string; | ||
@@ -23,3 +23,3 @@ private get hasPageMarginGraphics(): boolean { | ||
private get hasIcon(): boolean { | ||
return !!this.title && !!this.iconSymbol; | ||
return !!this.header && !!this.iconSymbol; | ||
} | ||
@@ -26,0 +26,0 @@ |
@@ -6,3 +6,3 @@ import { api, LightningElement } from "lwc"; | ||
export default class Socials extends LightningElement { | ||
@api title: string = "Our Socials"; | ||
@api header: string = "Our Socials"; | ||
@@ -9,0 +9,0 @@ @api |
@@ -18,3 +18,3 @@ import { api } from "lwc"; | ||
get navItems() { | ||
return this._navItems.map(this.normalizeItem); | ||
return this._navItems.map(this.normalizeItem) as any[]; | ||
} | ||
@@ -84,3 +84,3 @@ set navItems(value) { | ||
"nav-item", | ||
"dx-text-heading-6", | ||
"dx-text-display-8", | ||
this.activeHash === item?.link?.href && "active" | ||
@@ -87,0 +87,0 @@ ) |
import { api, LightningElement } from "lwc"; | ||
export default class TdxSection extends LightningElement { | ||
@api title!: string; | ||
@api header!: string; | ||
@api subtitle!: string; | ||
@@ -6,0 +6,0 @@ @api body!: string; |
import { api, LightningElement } from "lwc"; | ||
import cx from "classnames"; | ||
import { track } from "dxUtils/analytics"; | ||
@@ -7,4 +9,50 @@ export default class TwoColPanelSection extends LightningElement { | ||
@api buttonText!: string; | ||
@api modalButtonText?: string; | ||
@api subtitle!: string; | ||
@api title!: string; | ||
@api header!: string; | ||
@api light?: boolean = false; | ||
@api modalBadgeBackgroundColor?: string; | ||
@api modalBadgeSprite?: string; | ||
@api modalBadgeSymbol?: string; | ||
@api modalTitle?: string; | ||
@api modalBody?: string; | ||
@api modalHref?: string; | ||
@api modalDetails?: string; | ||
@api modalLabel?: string; | ||
@api modalTerms?: string; | ||
@api modalTwoColTitle?: string; | ||
@api modalTwoColDetails?: string; | ||
@api modalButtonCta?: string; | ||
@api modalButtonHref?: string; | ||
@api modalButtonIcon?: string; | ||
@api modalButtonIconSize?: string; | ||
private modalOpen: boolean = false; | ||
private get className(): string { | ||
return cx("two-col-panel-section", !this.light && "dark"); | ||
} | ||
private openModal() { | ||
this.modalOpen = true; | ||
} | ||
private closeModal() { | ||
this.modalOpen = false; | ||
} | ||
private handleSignUpClick(e: PointerEvent) { | ||
if (this.buttonHref.includes("signup")) { | ||
const payload = { | ||
click_text: this.buttonText, | ||
element_title: this.header, | ||
element_type: "card", | ||
click_url: `${window.location.origin}${this.buttonHref}`, | ||
content_category: "cta" | ||
}; | ||
track(e.currentTarget!, "custEv_signupStart", payload); | ||
track(e.currentTarget!, "custEv_linkClick", payload); | ||
} | ||
} | ||
} |
@@ -9,3 +9,3 @@ import { api, LightningElement } from "lwc"; | ||
@api imgSrc!: string; | ||
@api title!: string; | ||
@api header!: string; | ||
@@ -12,0 +12,0 @@ private get className(): string { |
import { LightningElement, api } from "lwc"; | ||
export default class VideoPlayerSection extends LightningElement { | ||
@api title!: string; | ||
@api header!: string; | ||
@api videoId!: number; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
638445
49
1377