@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.
Files changed (44) hide show
  1. package/dist/cjs/embedded-form.cjs.entry.js +340 -0
  2. package/dist/cjs/footer-form.cjs.entry.js +14 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/ptc-embedded-quiz.cjs.entry.js +1 -1
  5. package/dist/cjs/ptc-nav-link.cjs.entry.js +11 -15
  6. package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +6 -19
  7. package/dist/cjs/ptcw-design.cjs.js +1 -1
  8. package/dist/collection/components/icon-asset/media/designer.svg +2 -2
  9. package/dist/collection/components/organism-bundles/form/embedded-form/embedded-form.js +24 -1
  10. package/dist/collection/components/organism-bundles/form/footer-form/footer-form.css +0 -4
  11. package/dist/collection/components/organism-bundles/form/footer-form/footer-form.js +14 -1
  12. package/dist/collection/components/ptc-embedded-quiz/ptc-embedded-quiz.css +144 -143
  13. package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.css +1 -1
  14. package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js +6 -18
  15. package/dist/collection/components/subnav/ptc-nav-link/ptc-nav-link.js +12 -16
  16. package/dist/collection/utils/eloqua-tracking.js +42 -0
  17. package/dist/collection/utils/elq-lib.js +319 -0
  18. package/dist/custom-elements/index.js +376 -40
  19. package/dist/esm/embedded-form.entry.js +340 -0
  20. package/dist/esm/footer-form.entry.js +14 -2
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/esm/ptc-embedded-quiz.entry.js +1 -1
  23. package/dist/esm/ptc-nav-link.entry.js +11 -15
  24. package/dist/esm/ptc-pricing-packaging-table.entry.js +6 -19
  25. package/dist/esm/ptcw-design.js +1 -1
  26. package/dist/ptcw-design/media/designer.svg +2 -2
  27. package/dist/ptcw-design/p-270e5fdf.entry.js +1 -0
  28. package/dist/ptcw-design/p-61e48f01.entry.js +1 -0
  29. package/dist/ptcw-design/{p-048f176c.entry.js → p-e54c51b3.entry.js} +1 -1
  30. package/dist/ptcw-design/p-ed2cc9da.entry.js +1 -0
  31. package/dist/ptcw-design/p-efdf34c5.entry.js +1 -0
  32. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  33. package/dist/types/components/organism-bundles/form/embedded-form/embedded-form.d.ts +4 -0
  34. package/dist/types/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.d.ts +1 -1
  35. package/dist/types/components/subnav/ptc-nav-link/ptc-nav-link.d.ts +12 -12
  36. package/dist/types/utils/eloqua-tracking.d.ts +36 -0
  37. package/dist/types/utils/eloqua.d.ts +8 -0
  38. package/dist/types/utils/elq-lib.d.ts +49 -0
  39. package/package.json +1 -1
  40. package/readme.md +1 -1
  41. package/dist/ptcw-design/p-28f642a0.entry.js +0 -1
  42. package/dist/ptcw-design/p-49d39b5f.entry.js +0 -1
  43. package/dist/ptcw-design/p-6d1fc569.entry.js +0 -1
  44. package/dist/ptcw-design/p-b2977996.entry.js +0 -1
@@ -1,149 +1,150 @@
1
1
  :host {
2
2
  display: block;
3
3
  }
4
- @media only screen and (min-width: 360px) {
5
- :host .quiz-slide-container {
6
- position: relative;
7
- width: 100%;
8
- border: 1px solid var(--color-gray-12);
9
- background-color: white;
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.25;
24
- }
25
- :host .quiz-slide-initial {
26
- padding: var(--ptc-element-spacing-08);
27
- display: flex;
28
- justify-content: center;
29
- }
30
- :host .quiz-slide-initial #initial-quiz-p {
31
- padding: 0 0 calc(var(--ptc-element-spacing-08) + var(--ptc-element-spacing-04)) 0;
32
- }
33
- :host .quiz-slide-result .cta-container {
34
- display: flex;
35
- flex-direction: column;
36
- align-items: center;
37
- }
38
- :host .quiz-slide-result .cta-container ptc-button {
39
- flex: 1 0 100%;
40
- margin: 0 0 var(--ptc-element-spacing-05) 0;
41
- }
42
- :host .right-button-container {
43
- display: flex;
44
- justify-content: right;
45
- }
46
- :host .right-button-container .restart-quiz-button {
47
- display: flex;
48
- margin: var(--ptc-element-spacing-06) var(--ptc-element-spacing-06) 0 0;
49
- transition: var(--ptc-transition-slow);
50
- }
51
- :host .right-button-container .restart-quiz-button #restart-arrow {
52
- display: flex;
53
- align-items: center;
54
- }
55
- :host .right-button-container .restart-quiz-button #restart-arrow svg {
56
- z-index: 2;
57
- margin-right: var(--ptc-element-spacing-03);
58
- }
59
- :host .right-button-container .restart-quiz-button:hover {
60
- cursor: pointer;
61
- }
62
- :host .right-button-container .restart-quiz-button:hover #restart-arrow svg {
63
- transform: rotate(270deg);
64
- }
65
- :host .right-button-container .restart-quiz-button:hover ptc-para {
66
- opacity: 0.7;
67
- }
68
- :host .center-button-container {
69
- display: flex;
70
- justify-content: center;
71
- }
72
- :host .previous-slide-button {
73
- display: flex;
74
- align-items: center;
75
- margin: 0 0 var(--ptc-element-spacing-06) 0;
76
- transition: var(--ptc-transition-slow);
77
- }
78
- :host .previous-slide-button icon-asset {
79
- z-index: 2;
80
- display: flex;
81
- align-items: center;
82
- margin-right: var(--ptc-element-spacing-03);
83
- }
84
- :host .previous-slide-button:hover {
85
- cursor: pointer;
86
- }
87
- :host .previous-slide-button:hover icon-asset svg {
88
- transform: translateX(-8px);
89
- }
90
- :host .previous-slide-button:hover ptc-para {
91
- opacity: 0.7;
92
- }
93
- :host .quiz-slide-dual-layout .image-container {
94
- padding-top: var(--ptc-element-spacing-06);
95
- display: flex;
96
- justify-content: center;
97
- height: calc(4 * var(--ptc-element-spacing-08));
98
- width: 100%;
99
- }
100
- :host .quiz-slide-dual-layout .image-container img {
101
- height: 100%;
102
- width: 100%;
103
- }
104
- :host .quiz-slide-dual-layout .content-container {
105
- margin: var(--ptc-element-spacing-06) var(--ptc-element-spacing-08) var(--ptc-element-spacing-08) var(--ptc-element-spacing-08);
106
- }
107
- :host .quiz-slide-dual-layout .content-container .options-container {
108
- margin-top: var(--ptc-element-spacing-06);
109
- padding-left: var(--ptc-element-spacing-05);
110
- display: flex;
111
- flex-wrap: wrap;
112
- z-index: 2;
113
- }
114
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input {
115
- flex: 1 0 100%;
116
- margin-bottom: var(--ptc-element-spacing-06);
117
- display: flex;
118
- align-items: start;
119
- display: flex;
120
- align-items: flex-start;
121
- }
122
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input .radio {
123
- width: 16px;
124
- height: 16px;
125
- border-radius: var(--ptc-border-radius-circle);
126
- border: var(--color-gray-10) solid 1px;
127
- z-index: 2;
128
- padding: 2.5px;
129
- box-sizing: border-box;
130
- flex-shrink: 0;
131
- margin-top: var(--ptc-element-spacing-01);
132
- }
133
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input .radio.clicked {
134
- border: var(--color-blue-08) solid 1px;
135
- background: var(--color-blue-08);
136
- background-clip: content-box, padding-box;
137
- }
138
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input ptc-para {
139
- padding: 0 var(--ptc-element-spacing-02) 0 var(--ptc-element-spacing-03);
140
- }
141
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input:hover {
142
- cursor: pointer;
143
- }
144
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input:hover .radio {
145
- box-shadow: var(--ptc-shadow-x-small);
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 {
@@ -103,7 +103,7 @@
103
103
  overflow-x: hidden;
104
104
  -ms-overflow-style: none;
105
105
  scrollbar-width: none;
106
- box-shadow: var(--ptc-shadow-x-large);
106
+ box-shadow: 0 16px 16px -16px grey;
107
107
  }
108
108
  :host #table-header.sticky::-webkit-scrollbar {
109
109
  display: none;
@@ -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 tableHeader = this.el.shadowRoot.querySelector("#table-header");
145
- if (tableHeader.getBoundingClientRect().right < pricingTable.getBoundingClientRect().right) {
146
- // this.expandTableCells();
147
- this.expandFillerCell();
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
- componentWillLoad() {
22
- // Get the text content of the <slot> tag
23
- const text = this.el.textContent;
24
- // Set the maximum number of characters to display
25
- const charLimit = 32;
26
- // Check if the text content is longer than the character limit
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: (event) => { this.handleClick(event); } }, h("slot", null), !(this.href.startsWith('#')) &&
36
- 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" })))));
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
+ }