@salesforcedevs/mrkt-components 1.27.19 → 1.27.20-alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
- "name": "@salesforcedevs/mrkt-components",
3
- "version": "1.27.19",
4
- "description": "Marketing Lightning web components for DSC",
5
- "license": "MIT",
6
- "engines": {
7
- "node": "22.x"
8
- },
9
- "publishConfig": {
10
- "access": "public"
11
- },
12
- "dependencies": {
13
- "classnames": "2.5.1"
14
- },
15
- "devDependencies": {
16
- "@types/classnames": "2.3.1"
17
- },
18
- "gitHead": "100b05d78eeebe4c0e1d76afdfaa630a0fecd4c9"
19
- }
2
+ "name": "@salesforcedevs/mrkt-components",
3
+ "version": "1.27.20-alpha1",
4
+ "description": "Marketing Lightning web components for DSC",
5
+ "license": "MIT",
6
+ "engines": {
7
+ "node": "22.x"
8
+ },
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "dependencies": {
13
+ "classnames": "2.5.1"
14
+ },
15
+ "devDependencies": {
16
+ "@types/classnames": "2.3.1"
17
+ },
18
+ "stableVersion": "1.27.20"
19
+ }
@@ -20,8 +20,8 @@
20
20
  </div>
21
21
  </div>
22
22
  <div class="img-container">
23
- <img src="/assets/svg/mrkt-cta-section-img-left.svg" alt="" />
24
- <img src="/assets/svg/mrkt-cta-section-img-right.svg" alt="" />
23
+ <img src={ctaImgLeftUrl} alt="" />
24
+ <img src={ctaImgRightUrl} alt="" />
25
25
  </div>
26
26
  </div>
27
27
  </template>
@@ -21,4 +21,16 @@ export default class ThreeColListSection extends LightningElement {
21
21
  }
22
22
 
23
23
  private _items!: Item[];
24
+
25
+ // Deploy asset base path (e.g. "/PR-123"); empty in local dev. Exposed to the
26
+ // template so hardcoded /assets URLs resolve when served under a sub-path.
27
+ private get assetBasePath(): string {
28
+ return (globalThis as any)?.LWR?.env?.assetBasePath || "";
29
+ }
30
+ get ctaImgLeftUrl(): string {
31
+ return `${this.assetBasePath}/assets/svg/mrkt-cta-section-img-left.svg`;
32
+ }
33
+ get ctaImgRightUrl(): string {
34
+ return `${this.assetBasePath}/assets/svg/mrkt-cta-section-img-right.svg`;
35
+ }
24
36
  }
@@ -23,17 +23,17 @@
23
23
  </div>
24
24
  <img
25
25
  class="graphic-1"
26
- src="/assets/svg/mrkt-two-col-panel-section-graphic-1-light.svg"
26
+ src={graphic1Url}
27
27
  alt=""
28
28
  />
29
29
  <img
30
30
  class="graphic-2"
31
- src="/assets/svg/mrkt-two-col-panel-section-graphic-2-light.svg"
31
+ src={graphic2Url}
32
32
  alt=""
33
33
  />
34
34
  <img
35
35
  class="graphic-3"
36
- src="/assets/svg/mrkt-two-col-panel-section-graphic-3-light.svg"
36
+ src={graphic3Url}
37
37
  alt=""
38
38
  />
39
39
  <div class="cta-group mobile-button">
@@ -9,6 +9,20 @@ export default class TwoColPanelSection extends LightningElement {
9
9
  @api header!: string;
10
10
  @api label?: string;
11
11
 
12
+ // Deploy asset base path (e.g. "/PR-123"); empty in local dev.
13
+ private get assetBasePath(): string {
14
+ return (globalThis as any)?.LWR?.env?.assetBasePath || "";
15
+ }
16
+ get graphic1Url(): string {
17
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-1-light.svg`;
18
+ }
19
+ get graphic2Url(): string {
20
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-2-light.svg`;
21
+ }
22
+ get graphic3Url(): string {
23
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-3-light.svg`;
24
+ }
25
+
12
26
  private handleSignUpClick(e: PointerEvent) {
13
27
  if (this.buttonHref.includes("signup")) {
14
28
  const payload = {
@@ -52,37 +52,37 @@
52
52
  <img
53
53
  if:false={light}
54
54
  class="graphic-1"
55
- src="/assets/svg/mrkt-two-col-panel-section-graphic-1.svg"
55
+ src={graphic1Url}
56
56
  alt=""
57
57
  />
58
58
  <img
59
59
  if:false={light}
60
60
  class="graphic-2"
61
- src="/assets/svg/mrkt-two-col-panel-section-graphic-2.svg"
61
+ src={graphic2Url}
62
62
  alt=""
63
63
  />
64
64
  <img
65
65
  if:false={light}
66
66
  class="graphic-3"
67
- src="/assets/svg/mrkt-two-col-panel-section-graphic-3.svg"
67
+ src={graphic3Url}
68
68
  alt=""
69
69
  />
70
70
  <img
71
71
  if:true={light}
72
72
  class="graphic-1"
73
- src="/assets/svg/mrkt-two-col-panel-section-graphic-1-light.svg"
73
+ src={graphic1LightUrl}
74
74
  alt=""
75
75
  />
76
76
  <img
77
77
  if:true={light}
78
78
  class="graphic-2"
79
- src="/assets/svg/mrkt-two-col-panel-section-graphic-2-light.svg"
79
+ src={graphic2LightUrl}
80
80
  alt=""
81
81
  />
82
82
  <img
83
83
  if:true={light}
84
84
  class="graphic-3"
85
- src="/assets/svg/mrkt-two-col-panel-section-graphic-3-light.svg"
85
+ src={graphic3LightUrl}
86
86
  alt=""
87
87
  />
88
88
  <slot></slot>
@@ -91,7 +91,7 @@
91
91
  <img
92
92
  if:false={light}
93
93
  class="graphic-swoop"
94
- src="/assets/svg/mrkt-two-col-panel-section-swoop.svg"
94
+ src={graphicSwoopUrl}
95
95
  alt=""
96
96
  />
97
97
  </template>
@@ -33,6 +33,32 @@ export default class TwoColPanelSection extends LightningElement {
33
33
  return cx("two-col-panel-section", !this.light && "dark");
34
34
  }
35
35
 
36
+ // Deploy asset base path (e.g. "/PR-123"); empty in local dev.
37
+ private get assetBasePath(): string {
38
+ return (globalThis as any)?.LWR?.env?.assetBasePath || "";
39
+ }
40
+ get graphic1Url(): string {
41
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-1.svg`;
42
+ }
43
+ get graphic2Url(): string {
44
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-2.svg`;
45
+ }
46
+ get graphic3Url(): string {
47
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-3.svg`;
48
+ }
49
+ get graphic1LightUrl(): string {
50
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-1-light.svg`;
51
+ }
52
+ get graphic2LightUrl(): string {
53
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-2-light.svg`;
54
+ }
55
+ get graphic3LightUrl(): string {
56
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-graphic-3-light.svg`;
57
+ }
58
+ get graphicSwoopUrl(): string {
59
+ return `${this.assetBasePath}/assets/svg/mrkt-two-col-panel-section-swoop.svg`;
60
+ }
61
+
36
62
  private openModal() {
37
63
  this.modalOpen = true;
38
64
  }
package/LICENSE DELETED
@@ -1,12 +0,0 @@
1
- Copyright (c) 2020, Salesforce.com, Inc.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
-
6
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
-
8
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
-
10
- * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.