@ptcwebops/ptcw-design 2.8.4 → 2.8.6
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/dist/cjs/embedded-form.cjs.entry.js +340 -0
- package/dist/cjs/footer-form.cjs.entry.js +14 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-embedded-quiz.cjs.entry.js +1 -1
- package/dist/cjs/ptc-nav-link.cjs.entry.js +11 -15
- package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +6 -19
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/components/icon-asset/media/designer.svg +2 -2
- package/dist/collection/components/organism-bundles/form/embedded-form/embedded-form.js +24 -1
- package/dist/collection/components/organism-bundles/form/footer-form/footer-form.css +0 -4
- package/dist/collection/components/organism-bundles/form/footer-form/footer-form.js +14 -1
- package/dist/collection/components/ptc-embedded-quiz/ptc-embedded-quiz.css +144 -143
- package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.css +1 -1
- package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js +6 -18
- package/dist/collection/components/subnav/ptc-nav-link/ptc-nav-link.js +12 -16
- package/dist/collection/utils/eloqua-tracking.js +42 -0
- package/dist/collection/utils/elq-lib.js +319 -0
- package/dist/custom-elements/index.js +376 -40
- package/dist/esm/embedded-form.entry.js +340 -0
- package/dist/esm/footer-form.entry.js +14 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-embedded-quiz.entry.js +1 -1
- package/dist/esm/ptc-nav-link.entry.js +11 -15
- package/dist/esm/ptc-pricing-packaging-table.entry.js +6 -19
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/media/designer.svg +2 -2
- package/dist/ptcw-design/p-270e5fdf.entry.js +1 -0
- package/dist/ptcw-design/p-61e48f01.entry.js +1 -0
- package/dist/ptcw-design/{p-048f176c.entry.js → p-e54c51b3.entry.js} +1 -1
- package/dist/ptcw-design/p-ed2cc9da.entry.js +1 -0
- package/dist/ptcw-design/p-efdf34c5.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/organism-bundles/form/embedded-form/embedded-form.d.ts +4 -0
- package/dist/types/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.d.ts +1 -1
- package/dist/types/components/subnav/ptc-nav-link/ptc-nav-link.d.ts +12 -12
- package/dist/types/utils/eloqua-tracking.d.ts +36 -0
- package/dist/types/utils/eloqua.d.ts +8 -0
- package/dist/types/utils/elq-lib.d.ts +49 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/ptcw-design/p-28f642a0.entry.js +0 -1
- package/dist/ptcw-design/p-49d39b5f.entry.js +0 -1
- package/dist/ptcw-design/p-6d1fc569.entry.js +0 -1
- package/dist/ptcw-design/p-b2977996.entry.js +0 -1
|
@@ -1,149 +1,150 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
:
|
|
145
|
-
|
|
146
|
-
|
|
4
|
+
:host .quiz-slide-container {
|
|
5
|
+
position: relative;
|
|
6
|
+
width: 100%;
|
|
7
|
+
border: 1px solid var(--color-gray-12);
|
|
8
|
+
background-color: white;
|
|
9
|
+
z-index: 1;
|
|
10
|
+
}
|
|
11
|
+
:host .quiz-slide-container .quiz-slide-text-container {
|
|
12
|
+
max-width: calc(24 * var(--ptc-element-spacing-07));
|
|
13
|
+
}
|
|
14
|
+
:host .quiz-slide-background {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
background: url("https://www.ptc.com/-/media/Development/Embedded-Vuforia-Quiz/vuforia-background-guide-01.svg");
|
|
21
|
+
background-size: cover;
|
|
22
|
+
background-position: center;
|
|
23
|
+
opacity: 0.2;
|
|
24
|
+
z-index: -1;
|
|
25
|
+
}
|
|
26
|
+
:host .quiz-slide-initial {
|
|
27
|
+
padding: var(--ptc-element-spacing-08);
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
}
|
|
31
|
+
:host .quiz-slide-initial #initial-quiz-p {
|
|
32
|
+
padding: 0 0 calc(var(--ptc-element-spacing-08) + var(--ptc-element-spacing-04)) 0;
|
|
33
|
+
}
|
|
34
|
+
:host .quiz-slide-result .cta-container {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
align-items: center;
|
|
38
|
+
}
|
|
39
|
+
:host .quiz-slide-result .cta-container ptc-button {
|
|
40
|
+
flex: 1 0 100%;
|
|
41
|
+
margin: 0 0 var(--ptc-element-spacing-05) 0;
|
|
42
|
+
}
|
|
43
|
+
:host .right-button-container {
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: right;
|
|
46
|
+
}
|
|
47
|
+
:host .right-button-container .restart-quiz-button {
|
|
48
|
+
display: flex;
|
|
49
|
+
margin: var(--ptc-element-spacing-06) var(--ptc-element-spacing-06) 0 0;
|
|
50
|
+
transition: var(--ptc-transition-slow);
|
|
51
|
+
}
|
|
52
|
+
:host .right-button-container .restart-quiz-button #restart-arrow {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
}
|
|
56
|
+
:host .right-button-container .restart-quiz-button #restart-arrow svg {
|
|
57
|
+
z-index: 2;
|
|
58
|
+
margin-right: var(--ptc-element-spacing-03);
|
|
59
|
+
}
|
|
60
|
+
:host .right-button-container .restart-quiz-button:hover {
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
:host .right-button-container .restart-quiz-button:hover #restart-arrow svg {
|
|
64
|
+
transform: rotate(270deg);
|
|
65
|
+
}
|
|
66
|
+
:host .right-button-container .restart-quiz-button:hover ptc-para {
|
|
67
|
+
opacity: 0.7;
|
|
68
|
+
}
|
|
69
|
+
:host .center-button-container {
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
}
|
|
73
|
+
:host .previous-slide-button {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
margin: 0 0 var(--ptc-element-spacing-06) 0;
|
|
77
|
+
transition: var(--ptc-transition-slow);
|
|
78
|
+
}
|
|
79
|
+
:host .previous-slide-button icon-asset {
|
|
80
|
+
z-index: 2;
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
margin-right: var(--ptc-element-spacing-03);
|
|
84
|
+
}
|
|
85
|
+
:host .previous-slide-button:hover {
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
}
|
|
88
|
+
:host .previous-slide-button:hover icon-asset svg {
|
|
89
|
+
transform: translateX(-8px);
|
|
90
|
+
}
|
|
91
|
+
:host .previous-slide-button:hover ptc-para {
|
|
92
|
+
opacity: 0.7;
|
|
93
|
+
}
|
|
94
|
+
:host .quiz-slide-dual-layout .image-container {
|
|
95
|
+
padding-top: var(--ptc-element-spacing-06);
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
height: calc(4 * var(--ptc-element-spacing-08));
|
|
99
|
+
width: 100%;
|
|
100
|
+
}
|
|
101
|
+
:host .quiz-slide-dual-layout .image-container img {
|
|
102
|
+
height: 100%;
|
|
103
|
+
width: 100%;
|
|
104
|
+
}
|
|
105
|
+
:host .quiz-slide-dual-layout .content-container {
|
|
106
|
+
margin: var(--ptc-element-spacing-06) var(--ptc-element-spacing-08) var(--ptc-element-spacing-08) var(--ptc-element-spacing-08);
|
|
107
|
+
}
|
|
108
|
+
:host .quiz-slide-dual-layout .content-container .options-container {
|
|
109
|
+
margin-top: var(--ptc-element-spacing-06);
|
|
110
|
+
padding-left: var(--ptc-element-spacing-05);
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-wrap: wrap;
|
|
113
|
+
z-index: 2;
|
|
114
|
+
}
|
|
115
|
+
:host .quiz-slide-dual-layout .content-container .options-container .radio-input {
|
|
116
|
+
flex: 1 0 100%;
|
|
117
|
+
margin-bottom: var(--ptc-element-spacing-06);
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: start;
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: flex-start;
|
|
122
|
+
}
|
|
123
|
+
:host .quiz-slide-dual-layout .content-container .options-container .radio-input .radio {
|
|
124
|
+
width: 16px;
|
|
125
|
+
height: 16px;
|
|
126
|
+
border-radius: var(--ptc-border-radius-circle);
|
|
127
|
+
border: var(--color-gray-10) solid 1px;
|
|
128
|
+
z-index: 2;
|
|
129
|
+
padding: 3px;
|
|
130
|
+
box-sizing: border-box;
|
|
131
|
+
flex-shrink: 0;
|
|
132
|
+
margin-top: var(--ptc-element-spacing-01);
|
|
133
|
+
background-color: white;
|
|
134
|
+
}
|
|
135
|
+
:host .quiz-slide-dual-layout .content-container .options-container .radio-input .radio.clicked {
|
|
136
|
+
border: var(--color-blue-08) solid 1px;
|
|
137
|
+
background: var(--color-blue-08);
|
|
138
|
+
background-clip: content-box, padding-box;
|
|
139
|
+
}
|
|
140
|
+
:host .quiz-slide-dual-layout .content-container .options-container .radio-input ptc-para {
|
|
141
|
+
padding: 0 var(--ptc-element-spacing-02) 0 var(--ptc-element-spacing-03);
|
|
142
|
+
}
|
|
143
|
+
:host .quiz-slide-dual-layout .content-container .options-container .radio-input:hover {
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
}
|
|
146
|
+
:host .quiz-slide-dual-layout .content-container .options-container .radio-input:hover .radio {
|
|
147
|
+
box-shadow: var(--ptc-shadow-x-small);
|
|
147
148
|
}
|
|
148
149
|
@media only screen and (min-width: 768px) {
|
|
149
150
|
:host .quiz-slide-container {
|
package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js
CHANGED
|
@@ -125,26 +125,12 @@ export class PtcPricingPackagingTable {
|
|
|
125
125
|
this.el.style.setProperty('--cell-width-md', `${this.cellWidthMD}px`);
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
this.expandFillerCell = () => {
|
|
129
|
-
let pricingTable = this.el.shadowRoot.querySelector("#pricing-table");
|
|
130
|
-
let desktopHeaderFirstCell = this.el.shadowRoot.querySelector(".desktop-header-first-cell");
|
|
131
|
-
let occupiedSpace;
|
|
132
|
-
if (this.isDesktopView) {
|
|
133
|
-
occupiedSpace = desktopHeaderFirstCell.getBoundingClientRect().width + (this.dataCols * (this.cellWidthMD + this.cellLeftRightPadding));
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
occupiedSpace = this.dataCols * (this.cellWidthXXS + this.cellLeftRightPadding);
|
|
137
|
-
}
|
|
138
|
-
let fillerWidth = pricingTable.getBoundingClientRect().width - occupiedSpace;
|
|
139
|
-
this.el.style.setProperty('--filler-cell-width', `${fillerWidth - this.cellLeftRightPadding}px`);
|
|
140
|
-
this.showFillerCells = true;
|
|
141
|
-
};
|
|
142
128
|
this.handleFillEmptySpace = () => {
|
|
143
129
|
let pricingTable = this.el.shadowRoot.querySelector("#pricing-table");
|
|
144
|
-
let
|
|
145
|
-
if (
|
|
146
|
-
|
|
147
|
-
this.
|
|
130
|
+
let tableHeaderPlaceholder = this.el.shadowRoot.querySelector("#table-header-placeholder");
|
|
131
|
+
if (tableHeaderPlaceholder.getBoundingClientRect().right < pricingTable.getBoundingClientRect().right) {
|
|
132
|
+
this.hasEmptySpace = true;
|
|
133
|
+
this.expandTableCells();
|
|
148
134
|
}
|
|
149
135
|
};
|
|
150
136
|
this.resetWidthVariables = () => {
|
|
@@ -210,6 +196,7 @@ export class PtcPricingPackagingTable {
|
|
|
210
196
|
this.scrollLimit = 50;
|
|
211
197
|
this.stickyTopAt = undefined;
|
|
212
198
|
this.columnHeaderLinks = [];
|
|
199
|
+
this.hasEmptySpace = false;
|
|
213
200
|
this.showFillerCells = false;
|
|
214
201
|
this.showCtaButtonsRow = undefined;
|
|
215
202
|
this.ctaButtons = [];
|
|
@@ -460,6 +447,7 @@ export class PtcPricingPackagingTable {
|
|
|
460
447
|
"scrollLimit": {},
|
|
461
448
|
"stickyTopAt": {},
|
|
462
449
|
"columnHeaderLinks": {},
|
|
450
|
+
"hasEmptySpace": {},
|
|
463
451
|
"showFillerCells": {},
|
|
464
452
|
"showCtaButtonsRow": {},
|
|
465
453
|
"ctaButtons": {},
|
|
@@ -3,7 +3,7 @@ export class PtcNavLink {
|
|
|
3
3
|
constructor() {
|
|
4
4
|
this.href = undefined;
|
|
5
5
|
this.isOutsideLink = false;
|
|
6
|
-
this.titleText =
|
|
6
|
+
this.titleText = '';
|
|
7
7
|
}
|
|
8
8
|
handleClick(event) {
|
|
9
9
|
// Prevent the event from propagating to the underlying <a> element
|
|
@@ -13,27 +13,23 @@ export class PtcNavLink {
|
|
|
13
13
|
// Find the corresponding section
|
|
14
14
|
const section = document.querySelector(this.href);
|
|
15
15
|
section.scrollIntoView({
|
|
16
|
-
behavior: 'smooth'
|
|
16
|
+
behavior: 'smooth',
|
|
17
17
|
});
|
|
18
18
|
this.navLinkClicked.emit();
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (text.length > charLimit) {
|
|
28
|
-
// Adding link text in title
|
|
29
|
-
this.titleText = text;
|
|
30
|
-
// Trim the text to the character limit and add "..."
|
|
31
|
-
this.el.textContent = text.substring(0, charLimit) + "...";
|
|
21
|
+
trimString(inputString, maxLength) {
|
|
22
|
+
if (inputString.length > maxLength) {
|
|
23
|
+
return inputString.slice(0, maxLength) + '...';
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return inputString;
|
|
32
27
|
}
|
|
33
28
|
}
|
|
34
29
|
render() {
|
|
35
|
-
return (h(Host, null, h("a", { href: this.href, target: this.isOutsideLink ? '_blank' : '_self', title: this.titleText, onClick:
|
|
36
|
-
|
|
30
|
+
return (h(Host, null, h("a", { href: this.href, target: this.isOutsideLink ? '_blank' : '_self', title: this.trimString(this.titleText, 24), onClick: event => {
|
|
31
|
+
this.handleClick(event);
|
|
32
|
+
} }, h("slot", null), !this.href.startsWith('#') && (h("svg", { class: "icon-arrow-right", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "10", viewBox: "0 0 14 10", fill: "none" }, h("path", { d: "M8.84921 0.77792L8.81313 3.41153L0.51545 3.55584L0.515449 6.5863L8.81313 6.44199L8.81313 9.40029L13.1424 5.07107L8.84921 0.77792Z", fill: "#AEB8BD" }))))));
|
|
37
33
|
}
|
|
38
34
|
static get is() { return "ptc-nav-link"; }
|
|
39
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -100,7 +96,7 @@ export class PtcNavLink {
|
|
|
100
96
|
},
|
|
101
97
|
"attribute": "title-text",
|
|
102
98
|
"reflect": false,
|
|
103
|
-
"defaultValue": "
|
|
99
|
+
"defaultValue": "''"
|
|
104
100
|
}
|
|
105
101
|
};
|
|
106
102
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const initEloquaTracking = (trackingSettings) => {
|
|
2
|
+
var _elqQ = window._elqQ || [];
|
|
3
|
+
window._elqQ = _elqQ;
|
|
4
|
+
_elqQ.push(['elqSetSiteId', trackingSettings.setSiteId]);
|
|
5
|
+
_elqQ.push(['elqTrackPageView']);
|
|
6
|
+
const asyncLoad = () => {
|
|
7
|
+
const scriptEl = document.createElement('script');
|
|
8
|
+
scriptEl.type = 'text/javascript';
|
|
9
|
+
scriptEl.async = true;
|
|
10
|
+
scriptEl.src = '//img.en25.com/i/elqCfg.min.js';
|
|
11
|
+
const firstScriptTag = document.getElementsByTagName('script')[0];
|
|
12
|
+
firstScriptTag.parentNode.insertBefore(scriptEl, firstScriptTag);
|
|
13
|
+
};
|
|
14
|
+
// if (window.attachEvent) {
|
|
15
|
+
// window.attachEvent('onload', asyncLoad);
|
|
16
|
+
// } else {
|
|
17
|
+
window.addEventListener('DOMContentLoaded', asyncLoad, false);
|
|
18
|
+
// }
|
|
19
|
+
};
|
|
20
|
+
//Class that implements IVisitorElqIdStorage
|
|
21
|
+
export class VisitorElqIdStorage {
|
|
22
|
+
constructor() {
|
|
23
|
+
this.visitorElqId = null;
|
|
24
|
+
}
|
|
25
|
+
storeVisitorElqId(urlVars) {
|
|
26
|
+
console.log("INIT: Looking for visitor's Eloqua ID in URL...");
|
|
27
|
+
if (typeof urlVars['elq'] === 'undefined') {
|
|
28
|
+
this.visitorElqId = null;
|
|
29
|
+
console.log('INIT: ...no visitor Eloqua ID found in URL');
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
let elqId = urlVars['elq'].toUpperCase();
|
|
33
|
+
elqId = elqId.slice(0, 8) + '-' + elqId.slice(8, 12) + '-' + elqId.slice(12, 16) + '-' + elqId.slice(16, 20) + '-' + elqId.slice(20, 32);
|
|
34
|
+
this.visitorElqId = elqId;
|
|
35
|
+
console.log('INIT: ...visitor Eloqua ID found in URL: ' + elqId);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//A method to retrieve the stored ID
|
|
39
|
+
getVisitorElqId() {
|
|
40
|
+
return this.visitorElqId;
|
|
41
|
+
}
|
|
42
|
+
}
|