@ptcwebops/ptcw-design 3.0.2 → 3.0.3

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 (111) hide show
  1. package/dist/cjs/embedded-form.cjs.entry.js +108 -0
  2. package/dist/cjs/footer-form.cjs.entry.js +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/max-width-container.cjs.entry.js +54 -0
  5. package/dist/cjs/ptc-button.cjs.entry.js +52 -0
  6. package/dist/cjs/ptc-data-lookup.cjs.entry.js +496 -0
  7. package/dist/cjs/{embedded-form_9.cjs.entry.js → ptc-form-checkbox_3.cjs.entry.js} +12 -804
  8. package/dist/cjs/ptc-form.cjs.entry.js +1 -1
  9. package/dist/cjs/ptc-modal-quiz.cjs.entry.js +1 -1
  10. package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +7 -5
  11. package/dist/cjs/ptc-quote.cjs.entry.js +3 -2
  12. package/dist/cjs/ptc-spacer.cjs.entry.js +38 -0
  13. package/dist/cjs/ptc-title.cjs.entry.js +78 -0
  14. package/dist/cjs/ptc-value-led-card.cjs.entry.js +21 -0
  15. package/dist/cjs/ptc-value-led-content-highlight.cjs.entry.js +19 -0
  16. package/dist/cjs/ptc-value-led-content.cjs.entry.js +19 -0
  17. package/dist/cjs/ptc-value-led-intro.cjs.entry.js +20 -0
  18. package/dist/cjs/ptc-value-led-layout.cjs.entry.js +2 -2
  19. package/dist/cjs/ptc-value-led-speed-bump.cjs.entry.js +32 -0
  20. package/dist/cjs/ptcw-design.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +5 -1
  22. package/dist/collection/components/organism-bundles/form/embedded-form/embedded-form.js +1 -1
  23. package/dist/collection/components/organism-bundles/form/footer-form/footer-form.js +1 -1
  24. package/dist/collection/components/organism-bundles/form/ptc-form/ptc-form.js +1 -1
  25. package/dist/collection/components/ptc-button/ptc-button.css +42 -0
  26. package/dist/collection/components/ptc-button/ptc-button.js +20 -1
  27. package/dist/collection/components/ptc-modal-quiz/ptc-modal-quiz.css +6 -1
  28. package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js +7 -5
  29. package/dist/collection/components/ptc-quote/ptc-quote.css +28 -0
  30. package/dist/collection/components/ptc-quote/ptc-quote.js +4 -3
  31. package/dist/collection/components/ptc-select/ptc-select.js +4 -4
  32. package/dist/collection/components/ptc-textfield/ptc-textfield.js +12 -16
  33. package/dist/collection/components/ptc-value-led-card/ptc-value-led-card.css +36 -0
  34. package/dist/collection/components/ptc-value-led-card/ptc-value-led-card.js +60 -0
  35. package/dist/collection/components/ptc-value-led-content/ptc-value-led-content.css +12 -0
  36. package/dist/collection/components/ptc-value-led-content/ptc-value-led-content.js +18 -0
  37. package/dist/collection/components/ptc-value-led-content-highlight/ptc-value-led-content-highlight.css +31 -0
  38. package/dist/collection/components/ptc-value-led-content-highlight/ptc-value-led-content-highlight.js +18 -0
  39. package/dist/collection/components/ptc-value-led-intro/ptc-value-led-intro.css +16 -0
  40. package/dist/collection/components/ptc-value-led-intro/ptc-value-led-intro.js +42 -0
  41. package/dist/collection/components/ptc-value-led-layout/ptc-value-led-layout.css +22 -3
  42. package/dist/collection/components/ptc-value-led-layout/ptc-value-led-layout.js +1 -1
  43. package/dist/collection/components/ptc-value-led-speed-bump/ptc-value-led-speed-bump.css +63 -0
  44. package/dist/collection/components/ptc-value-led-speed-bump/ptc-value-led-speed-bump.js +97 -0
  45. package/dist/custom-elements/index.d.ts +30 -6
  46. package/dist/custom-elements/index.js +131 -568
  47. package/dist/esm/embedded-form.entry.js +104 -0
  48. package/dist/esm/footer-form.entry.js +1 -1
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm/max-width-container.entry.js +50 -0
  51. package/dist/esm/ptc-button.entry.js +48 -0
  52. package/dist/esm/ptc-data-lookup.entry.js +492 -0
  53. package/dist/esm/{embedded-form_9.entry.js → ptc-form-checkbox_3.entry.js} +14 -800
  54. package/dist/esm/ptc-form.entry.js +1 -1
  55. package/dist/esm/ptc-modal-quiz.entry.js +1 -1
  56. package/dist/esm/ptc-pricing-packaging-table.entry.js +7 -5
  57. package/dist/esm/ptc-quote.entry.js +3 -2
  58. package/dist/esm/ptc-spacer.entry.js +34 -0
  59. package/dist/esm/ptc-title.entry.js +74 -0
  60. package/dist/esm/ptc-value-led-card.entry.js +17 -0
  61. package/dist/esm/ptc-value-led-content-highlight.entry.js +15 -0
  62. package/dist/esm/ptc-value-led-content.entry.js +15 -0
  63. package/dist/esm/ptc-value-led-intro.entry.js +16 -0
  64. package/dist/esm/ptc-value-led-layout.entry.js +2 -2
  65. package/dist/esm/ptc-value-led-speed-bump.entry.js +28 -0
  66. package/dist/esm/ptcw-design.js +1 -1
  67. package/dist/ptcw-design/p-036234e7.entry.js +1 -0
  68. package/dist/ptcw-design/{p-ed2cc9da.entry.js → p-08ed517e.entry.js} +1 -1
  69. package/dist/ptcw-design/p-137ddeeb.entry.js +1 -0
  70. package/dist/ptcw-design/p-18dfffd3.entry.js +359 -0
  71. package/dist/ptcw-design/p-236073e1.entry.js +1 -0
  72. package/dist/ptcw-design/p-2e4af711.entry.js +1 -0
  73. package/dist/ptcw-design/p-33c054ff.entry.js +1 -0
  74. package/dist/ptcw-design/{p-f00b4b73.entry.js → p-3ca391ab.entry.js} +1 -1
  75. package/dist/ptcw-design/p-3faffecb.entry.js +1 -0
  76. package/dist/ptcw-design/p-49f06645.entry.js +1 -0
  77. package/dist/ptcw-design/p-641bd525.entry.js +1 -0
  78. package/dist/ptcw-design/p-752f779c.entry.js +1 -0
  79. package/dist/ptcw-design/p-7aa6b7e5.entry.js +1 -0
  80. package/dist/ptcw-design/p-7c079ff8.entry.js +1 -0
  81. package/dist/ptcw-design/p-92bbd407.entry.js +1 -0
  82. package/dist/ptcw-design/p-9a36f7a3.entry.js +1 -0
  83. package/dist/ptcw-design/p-d2c400e2.entry.js +1 -0
  84. package/dist/ptcw-design/p-f1c77113.entry.js +1 -0
  85. package/dist/ptcw-design/ptcw-design.css +2 -2
  86. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  87. package/dist/types/components/ptc-button/ptc-button.d.ts +4 -0
  88. package/dist/types/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.d.ts +2 -0
  89. package/dist/types/components/ptc-quote/ptc-quote.d.ts +1 -1
  90. package/dist/types/components/ptc-select/ptc-select.d.ts +1 -1
  91. package/dist/types/components/ptc-textfield/ptc-textfield.d.ts +1 -1
  92. package/dist/types/components/ptc-value-led-card/ptc-value-led-card.d.ts +5 -0
  93. package/dist/types/components/ptc-value-led-content/ptc-value-led-content.d.ts +3 -0
  94. package/dist/types/components/ptc-value-led-content-highlight/ptc-value-led-content-highlight.d.ts +3 -0
  95. package/dist/types/components/ptc-value-led-intro/ptc-value-led-intro.d.ts +4 -0
  96. package/dist/types/components/ptc-value-led-speed-bump/ptc-value-led-speed-bump.d.ts +10 -0
  97. package/dist/types/components.d.ts +91 -75
  98. package/package.json +1 -1
  99. package/readme.md +1 -1
  100. package/dist/cjs/ptc-pricing-table.cjs.entry.js +0 -536
  101. package/dist/collection/components/ptc-pricing-table/ptc-pricing-table.css +0 -278
  102. package/dist/collection/components/ptc-pricing-table/ptc-pricing-table.js +0 -680
  103. package/dist/esm/ptc-pricing-table.entry.js +0 -532
  104. package/dist/ptcw-design/p-220f86c0.entry.js +0 -1
  105. package/dist/ptcw-design/p-4a865061.entry.js +0 -1
  106. package/dist/ptcw-design/p-b0b4ebd6.entry.js +0 -359
  107. package/dist/ptcw-design/p-c20538ec.entry.js +0 -1
  108. package/dist/ptcw-design/p-f2621425.entry.js +0 -1
  109. package/dist/ptcw-design/p-f29c71fe.entry.js +0 -1
  110. package/dist/types/components/ptc-pricing-table/ptc-pricing-table.d.ts +0 -110
  111. package/dist/types/utils/eloqua.d.ts +0 -8
@@ -1,680 +0,0 @@
1
- import { Host, h, Fragment } from '@stencil/core';
2
- export class PtcPricingTable {
3
- constructor() {
4
- this.scrollTopClipperHeightOptions = {
5
- withSubNav: {
6
- desktop: "104px",
7
- mobile: "80px"
8
- },
9
- withoutSubNav: {
10
- desktop: "40px",
11
- mobile: "24px"
12
- }
13
- };
14
- this.verticalEdgePixelComparator = (edge1, edge2) => {
15
- let delta = 2;
16
- if ((edge1 == edge2) || ((edge1 >= (edge2 - delta)) && (edge1 <= (edge2 + delta)))) {
17
- return 0;
18
- }
19
- if (edge1 < (edge2 - delta)) {
20
- return -1;
21
- }
22
- if (edge1 > (edge2 + delta)) {
23
- return 1;
24
- }
25
- };
26
- this.handleHorizontalScroll = () => {
27
- var _a, _b, _c, _d, _e, _f, _g, _h;
28
- this.targetElements = this.getTargetElements();
29
- this.targetElements["sticky-header-container"].scrollLeft = (_a = this.targetElements["table-container"]) === null || _a === void 0 ? void 0 : _a.scrollLeft;
30
- // Scroll the button containers in sync with the table's scrolling
31
- if ([-1, 0].includes(this.verticalEdgePixelComparator((_b = this.targetElements["table-container"]) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().right, (_c = this.targetElements["table"]) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect().right))) {
32
- this.targetElements["normal-scroll-buttons-container"].style.left = `${((_d = this.targetElements["table-container"]) === null || _d === void 0 ? void 0 : _d.scrollLeft) + this.desktopHeaderFirstCellWidth}px`;
33
- this.targetElements["sticky-scroll-buttons-container"].style.left = `${((_e = this.targetElements["table-container"]) === null || _e === void 0 ? void 0 : _e.scrollLeft) + this.desktopHeaderFirstCellWidth}px`;
34
- }
35
- // Scroll the mobile row headers along with the table in the mobile view
36
- if (this.targetElements["mobile-table-row-headers"].length > 0) {
37
- for (let i = 0; i < this.dataRows; i++) {
38
- this.targetElements["mobile-table-row-headers"][i].style.paddingLeft = `${(_f = this.targetElements["table-container"]) === null || _f === void 0 ? void 0 : _f.scrollLeft}px`;
39
- }
40
- }
41
- // Managing the visibility of the next scroll buttons in both the sticky and normal headers, depending on whether the table can scroll further to the right or not
42
- if ([0, 1].includes(this.verticalEdgePixelComparator((_g = this.targetElements["table-container"]) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect().right, this.targetElements["table"].getBoundingClientRect().right))) {
43
- this.targetElements["normal-next-scroll-button"].style.visibility = 'hidden';
44
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
45
- this.targetElements["sticky-next-scroll-button"].style.visibility = 'hidden';
46
- }
47
- }
48
- else {
49
- this.targetElements["normal-next-scroll-button"].style.visibility = 'visible';
50
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
51
- this.targetElements["sticky-next-scroll-button"].style.visibility = 'visible';
52
- }
53
- }
54
- // Adjusting the visibility of the previous scroll buttons in both the sticky and normal headers, as well as the box shadow in desktop view, depending on whether the table can scroll further to the left or not
55
- if (this.targetElements["table-container"].scrollLeft === 0) {
56
- this.targetElements["horizontal-scroll-box-shadow"].style.left = '0';
57
- this.targetElements["horizontal-scroll-box-shadow"].style.visibility = 'hidden';
58
- this.targetElements["normal-previous-scroll-button"].style.visibility = 'hidden';
59
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
60
- this.targetElements["sticky-previous-scroll-button"].style.visibility = 'hidden';
61
- }
62
- }
63
- else {
64
- this.targetElements["horizontal-scroll-box-shadow"].style.left = `${((_h = this.targetElements["table-container"]) === null || _h === void 0 ? void 0 : _h.scrollLeft) + this.desktopHeaderFirstCellWidth}px`;
65
- this.targetElements["horizontal-scroll-box-shadow"].style.visibility = 'visible';
66
- this.targetElements["normal-previous-scroll-button"].style.visibility = 'visible';
67
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
68
- this.targetElements["sticky-previous-scroll-button"].style.visibility = 'visible';
69
- }
70
- }
71
- };
72
- this.handleVerticalScroll = () => {
73
- this.targetElements = this.getTargetElements();
74
- const scrollTopPosition = window.scrollY || document.documentElement.scrollTop;
75
- if (scrollTopPosition < this.lastScrollTop) {
76
- // Scrolling Up
77
- if (this.targetElements["table-container"].getBoundingClientRect().bottom > 0) {
78
- if (this.targetElements["sticky-header-container"].getBoundingClientRect().top < 0) {
79
- // Scroll the sticky header back into view along with the table
80
- this.targetElements["vertical-scroll-content-clipper"].style.display = 'block';
81
- this.targetElements["sticky-scroll-buttons-container"].style.opacity = '1';
82
- this.targetElements["sticky-header-container"].style.visibility = 'visible';
83
- this.targetElements["sticky-header-container"].style.top = `${this.targetElements["table-container"].getBoundingClientRect().bottom - this.targetElements["sticky-header-container"].getBoundingClientRect().height}px`;
84
- }
85
- else {
86
- // Make the sticky header fixed once it is entirely within the window
87
- this.targetElements["sticky-header-container"].style.top = this.scrollTopClipperHeight;
88
- }
89
- }
90
- if (this.targetElements["table-header"].getBoundingClientRect().top > this.targetElements["sticky-header-container"].getBoundingClientRect().top) {
91
- // Conceal the sticky header and reveal the normal header
92
- this.targetElements["sticky-scroll-buttons-container"].style.opacity = '0';
93
- this.targetElements["sticky-header-container"].style.visibility = 'hidden';
94
- this.targetElements["table-header"].style.visibility = 'visible';
95
- this.targetElements["vertical-scroll-content-clipper"].style.display = 'none';
96
- }
97
- }
98
- else if (scrollTopPosition > this.lastScrollTop) {
99
- // Scrolling down
100
- if (this.targetElements["sticky-header-container"].getBoundingClientRect().bottom <= 0) {
101
- // Reset and hide the sticky header when it scrolls out of the top of the window
102
- this.targetElements["sticky-header-container"].style.top = `${-this.targetElements["sticky-header-container"].getBoundingClientRect().height}px`;
103
- this.targetElements["sticky-scroll-buttons-container"].style.opacity = '0';
104
- this.targetElements["sticky-header-container"].style.visibility = 'hidden';
105
- this.targetElements["vertical-scroll-content-clipper"].style.display = 'none';
106
- }
107
- else if (this.targetElements["table-header"].getBoundingClientRect().top <= this.targetElements["sticky-header-container"].getBoundingClientRect().top) {
108
- if (this.targetElements["table-container"].getBoundingClientRect().bottom <= this.targetElements["sticky-header-container"].getBoundingClientRect().bottom) {
109
- // Scroll the sticky header out of the window along with the table
110
- this.targetElements["sticky-header-container"].style.top = `${(this.targetElements["table-container"].getBoundingClientRect().bottom - this.targetElements["sticky-header-container"].clientHeight)}px`;
111
- }
112
- else {
113
- // Conceal the normal header and reveal the sticky header
114
- this.targetElements["vertical-scroll-content-clipper"].style.display = 'block';
115
- this.targetElements["sticky-scroll-buttons-container"].style.opacity = '1';
116
- this.targetElements["sticky-header-container"].style.visibility = 'visible';
117
- this.targetElements["table-header"].style.visibility = 'hidden';
118
- this.targetElements["sticky-previous-scroll-button"].style.visibility = this.targetElements["normal-previous-scroll-button"].style.visibility;
119
- this.targetElements["sticky-next-scroll-button"].style.visibility = this.targetElements["normal-next-scroll-button"].style.visibility;
120
- if (getComputedStyle(this.targetElements["sticky-next-scroll-button"]).visibility === "visible") {
121
- this.targetElements["table-filler-sticky-header-cell"].style.boxSizing = "content-box";
122
- }
123
- }
124
- }
125
- }
126
- this.lastScrollTop = scrollTopPosition <= 0 ? 0 : scrollTopPosition;
127
- };
128
- this.handleResize = () => {
129
- this.targetElements["table-container"].scrollLeft = 0;
130
- this.handleHorizontalScroll();
131
- this.configureStickyHeader();
132
- this.configureScrollButtonsContainers();
133
- this.configureTableFillerCells();
134
- };
135
- this.pageWithSubnav = false;
136
- this.tableTitle = undefined;
137
- this.tableSubTitle = "";
138
- this.tableDescription = "";
139
- this.dataRows = undefined;
140
- this.dataCols = undefined;
141
- this.disclaimerCount = 0;
142
- this.scrollTopClipperHeight = undefined;
143
- this.desktopHeaderFirstCellWidth = 0;
144
- this.targetElements = {};
145
- this.columnHeaderLinks = [];
146
- this.lastScrollTop = undefined;
147
- this.scrollTimeInterval = 35;
148
- this.scrollAmount = 5;
149
- this.scrollLimit = 50;
150
- this.mobileHeaderRowColSpan = this.dataCols;
151
- this.showCtaButtonsRow = undefined;
152
- this.ctaButtons = [];
153
- this.disclaimers = [];
154
- }
155
- // Provides an object containing frequently accessed HTML elements for table-related operations
156
- getTargetElements() {
157
- let pricingTable = this.el.shadowRoot;
158
- let verticalScrollContentClipper = pricingTable === null || pricingTable === void 0 ? void 0 : pricingTable.querySelector('#vertical-scroll-content-clipper');
159
- let tableContainer = pricingTable === null || pricingTable === void 0 ? void 0 : pricingTable.querySelector('#table-container');
160
- let table = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('table');
161
- let tableHeader = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('table thead');
162
- let desktopHeaderFirstCell = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('.desktop-header-first-cell');
163
- let tableHeaderCells = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelectorAll('th');
164
- let desktopTableBody = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('.desktop-table-body');
165
- let mobileTableBody = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('.mobile-table-body');
166
- let stickyHeaderContainer = pricingTable === null || pricingTable === void 0 ? void 0 : pricingTable.querySelector('#sticky-header-container');
167
- let stickyHeaderCells = stickyHeaderContainer === null || stickyHeaderContainer === void 0 ? void 0 : stickyHeaderContainer.querySelectorAll('th');
168
- let verticalScrollBoxShadow = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector("#vertical-scroll-box-shadow");
169
- let tableFillerStickyHeaderCell = stickyHeaderContainer === null || stickyHeaderContainer === void 0 ? void 0 : stickyHeaderContainer.querySelector('.table-filler-header-cell');
170
- let tableFillerHeaderCell = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.querySelector('.table-filler-header-cell');
171
- let tableFillerBodyCells = table === null || table === void 0 ? void 0 : table.querySelectorAll('.table-filler-body-cell');
172
- let tableFillerButtonCell = table === null || table === void 0 ? void 0 : table.querySelector('.table-filler-button-cell');
173
- let mobileTableRowHeaders = pricingTable === null || pricingTable === void 0 ? void 0 : pricingTable.querySelectorAll('.mobile-table-row-header');
174
- let normalScrollButtonsContainer = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('.scroll-buttons-container');
175
- let stickyScrollButtonsContainer = stickyHeaderContainer === null || stickyHeaderContainer === void 0 ? void 0 : stickyHeaderContainer.querySelector('.scroll-buttons-container');
176
- let normalPreviousScrollButton = normalScrollButtonsContainer === null || normalScrollButtonsContainer === void 0 ? void 0 : normalScrollButtonsContainer.querySelector('.prev-button');
177
- let normalPreviousScrollButtonText = normalPreviousScrollButton === null || normalPreviousScrollButton === void 0 ? void 0 : normalPreviousScrollButton.querySelector('ptc-para');
178
- let stickyPreviousScrollButton = stickyScrollButtonsContainer === null || stickyScrollButtonsContainer === void 0 ? void 0 : stickyScrollButtonsContainer.querySelector('.prev-button');
179
- let stickyPreviousScrollButtonText = stickyPreviousScrollButton === null || stickyPreviousScrollButton === void 0 ? void 0 : stickyPreviousScrollButton.querySelector('ptc-para');
180
- let normalNextScrollButton = normalScrollButtonsContainer === null || normalScrollButtonsContainer === void 0 ? void 0 : normalScrollButtonsContainer.querySelector('.next-button');
181
- let normalNextScrollButtonText = normalNextScrollButton === null || normalNextScrollButton === void 0 ? void 0 : normalNextScrollButton.querySelector('ptc-para');
182
- let stickyNextScrollButton = stickyScrollButtonsContainer === null || stickyScrollButtonsContainer === void 0 ? void 0 : stickyScrollButtonsContainer.querySelector('.next-button');
183
- let stickyNextScrollButtonText = stickyNextScrollButton === null || stickyNextScrollButton === void 0 ? void 0 : stickyNextScrollButton.querySelector('ptc-para');
184
- let horizontalScrollBoxShadow = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('#horizontal-scroll-box-shadow');
185
- let targetElements = {
186
- "vertical-scroll-content-clipper": verticalScrollContentClipper,
187
- "pricing-table": pricingTable,
188
- "table-container": tableContainer,
189
- "table": table,
190
- "table-header": tableHeader,
191
- "desktop-header-first-cell": desktopHeaderFirstCell,
192
- "table-header-cells": tableHeaderCells,
193
- "desktop-table-body": desktopTableBody,
194
- "mobile-table-body": mobileTableBody,
195
- "sticky-header-container": stickyHeaderContainer,
196
- "sticky-header-cells": stickyHeaderCells,
197
- "vertical-scroll-box-shadow": verticalScrollBoxShadow,
198
- "table-filler-sticky-header-cell": tableFillerStickyHeaderCell,
199
- "table-filler-header-cell": tableFillerHeaderCell,
200
- "table-filler-body-cells": tableFillerBodyCells,
201
- "table-filler-button-cell": tableFillerButtonCell,
202
- "mobile-table-row-headers": mobileTableRowHeaders,
203
- "normal-scroll-buttons-container": normalScrollButtonsContainer,
204
- "sticky-scroll-buttons-container": stickyScrollButtonsContainer,
205
- "normal-previous-scroll-button": normalPreviousScrollButton,
206
- "normal-previous-scroll-button-text": normalPreviousScrollButtonText,
207
- "sticky-previous-scroll-button": stickyPreviousScrollButton,
208
- "sticky-previous-scroll-button-text": stickyPreviousScrollButtonText,
209
- "normal-next-scroll-button": normalNextScrollButton,
210
- "normal-next-scroll-button-text": normalNextScrollButtonText,
211
- "sticky-next-scroll-button": stickyNextScrollButton,
212
- "sticky-next-scroll-button-text": stickyNextScrollButtonText,
213
- "horizontal-scroll-box-shadow": horizontalScrollBoxShadow,
214
- };
215
- return targetElements;
216
- }
217
- // Sets up the scroll buttons container for both the sticky and normal headers
218
- configureScrollButtonsContainers() {
219
- this.targetElements = this.getTargetElements();
220
- // Defines the dimensions
221
- this.targetElements["normal-scroll-buttons-container"].style.width = `${this.targetElements["table-container"].clientWidth}px`;
222
- this.targetElements["normal-scroll-buttons-container"].style.height = `${this.targetElements["table-header"].clientHeight}px`;
223
- this.targetElements["sticky-scroll-buttons-container"].style.width = `${this.targetElements["table-container"].clientWidth}px`;
224
- this.targetElements["sticky-scroll-buttons-container"].style.height = `${this.targetElements["table-header"].clientHeight}px`;
225
- // For desktop screens, scroll buttons are positioned after the first column of the table
226
- if (this.targetElements["desktop-header-first-cell"]) {
227
- this.targetElements["normal-scroll-buttons-container"].style.width = `${this.targetElements["normal-scroll-buttons-container"].getBoundingClientRect().width - this.desktopHeaderFirstCellWidth}px`;
228
- this.targetElements["sticky-scroll-buttons-container"].style.width = `${this.targetElements["sticky-scroll-buttons-container"].getBoundingClientRect().width - this.desktopHeaderFirstCellWidth}px`;
229
- }
230
- // Controlling the visibility of the previous scroll buttons, of the sticky and normal headers, based on whether table can scroll further to the left or not
231
- if (this.targetElements["table-container"].scrollLeft === 0) {
232
- this.targetElements["normal-previous-scroll-button"].style.visibility = 'hidden';
233
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
234
- this.targetElements["sticky-previous-scroll-button"].style.visibility = 'hidden';
235
- }
236
- }
237
- else {
238
- this.targetElements["normal-previous-scroll-button"].style.visibility = 'visible';
239
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
240
- this.targetElements["sticky-previous-scroll-button"].style.visibility = 'visible';
241
- }
242
- }
243
- // Managing the visibility of the next scroll buttons in both the sticky and normal headers, depending on whether the table can be scrolled further to the right or not
244
- if (this.targetElements["table-container"].getBoundingClientRect().width >= this.targetElements["table"].getBoundingClientRect().width) {
245
- this.targetElements["normal-next-scroll-button"].style.visibility = 'hidden';
246
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
247
- this.targetElements["sticky-next-scroll-button"].style.visibility = 'hidden';
248
- }
249
- }
250
- else {
251
- this.targetElements["normal-next-scroll-button"].style.visibility = 'visible';
252
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
253
- this.targetElements["sticky-next-scroll-button"].style.visibility = 'visible';
254
- }
255
- }
256
- }
257
- // Configures the sticky header based on the dimensions of the table header
258
- configureStickyHeader() {
259
- var _a, _b, _c, _d, _e, _f;
260
- const targetElements = this.getTargetElements();
261
- // Expanding the content clipper by an additional 10px on each side to accommodate the table's box-shadow
262
- targetElements["vertical-scroll-content-clipper"].style.width = `${targetElements["table-container"].clientWidth + 20}px`;
263
- // Aligns the background color of the element with the body's background color
264
- const bodyBackgroundColor = window.getComputedStyle(document.body, null).getPropertyValue('background-color');
265
- if (bodyBackgroundColor === ("rgba(0, 0, 0, 0)" || "transparent" || "white")) {
266
- targetElements["vertical-scroll-content-clipper"].style.backgroundColor = "white";
267
- }
268
- else {
269
- targetElements["vertical-scroll-content-clipper"].style.backgroundColor = bodyBackgroundColor;
270
- }
271
- // Establishing the width of the sticky header to be in line with the table's width
272
- targetElements["sticky-header-container"].style.width = `${targetElements["table-container"].clientWidth}px`;
273
- // Adjusts the table's sticky behavior, making it adhere at varying positions below the top, contingent on factors like the device type (mobile or desktop) and the presence of a subnav in the page
274
- if (this.pageWithSubnav) {
275
- if (window.innerWidth >= 1200) {
276
- this.scrollTopClipperHeight = this.scrollTopClipperHeightOptions.withSubNav.desktop;
277
- }
278
- else {
279
- this.scrollTopClipperHeight = this.scrollTopClipperHeightOptions.withSubNav.mobile;
280
- }
281
- }
282
- else {
283
- if (window.innerWidth >= 1200) {
284
- this.scrollTopClipperHeight = this.scrollTopClipperHeightOptions.withoutSubNav.desktop;
285
- }
286
- else {
287
- this.scrollTopClipperHeight = this.scrollTopClipperHeightOptions.withoutSubNav.mobile;
288
- }
289
- }
290
- targetElements["vertical-scroll-content-clipper"].style.height = this.scrollTopClipperHeight;
291
- targetElements["sticky-header-container"].style.top = this.scrollTopClipperHeight;
292
- // Align the widths of sticky header cells with those of the normal header cells
293
- for (let i = 0; i < targetElements["table-header-cells"].length; i++) {
294
- targetElements["sticky-header-cells"][i].style.width = `${targetElements["table-header-cells"][i].getBoundingClientRect().width}px`;
295
- if (targetElements["table-header-cells"][i].classList.contains('desktop-header-first-cell')) {
296
- this.desktopHeaderFirstCellWidth = targetElements["table-header-cells"][i].getBoundingClientRect().width;
297
- }
298
- }
299
- // Box-sizing
300
- if (targetElements["table"].clientWidth <= targetElements["table-container"].clientWidth) {
301
- if (targetElements["desktop-table-body"]) {
302
- for (let i = 0; i < targetElements["sticky-header-cells"].length; i++) {
303
- (_b = (_a = targetElements["sticky-header-cells"][i]) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.add('border-box-header-cell');
304
- }
305
- }
306
- }
307
- else {
308
- for (let i = 0; i < targetElements["sticky-header-cells"].length; i++) {
309
- if ((_d = (_c = targetElements["sticky-header-cells"][i]) === null || _c === void 0 ? void 0 : _c.classList) === null || _d === void 0 ? void 0 : _d.contains('border-box-header-cell')) {
310
- (_f = (_e = targetElements["sticky-header-cells"][i]) === null || _e === void 0 ? void 0 : _e.classList) === null || _f === void 0 ? void 0 : _f.remove('border-box-header-cell');
311
- }
312
- }
313
- }
314
- }
315
- configureTableFillerCells() {
316
- var _a, _b, _c, _d;
317
- this.targetElements = this.getTargetElements();
318
- this.targetElements["table-filler-sticky-header-cell"].style.width = this.targetElements["table-filler-header-cell"].getBoundingClientRect().width;
319
- if (this.targetElements['table'].getBoundingClientRect().width < this.targetElements['table-container'].getBoundingClientRect().width) {
320
- // If the table is smaller than the container, insert fillers
321
- this.targetElements["table-filler-sticky-header-cell"].style.display = 'table-cell';
322
- this.targetElements["table-filler-header-cell"].style.display = 'table-cell';
323
- for (let i = 0; i < this.dataRows; i++) {
324
- this.targetElements["table-filler-body-cells"][i].style.display = 'table-cell';
325
- }
326
- if (this.targetElements["table-filler-button-cell"]) {
327
- this.targetElements["table-filler-button-cell"].style.display = 'table-cell';
328
- }
329
- this.mobileHeaderRowColSpan = this.dataCols + 1;
330
- }
331
- else {
332
- // If the table is equal to or larger than the container, remove fillers
333
- this.targetElements["table-filler-sticky-header-cell"].style.width = '99%';
334
- if (getComputedStyle(this.targetElements["sticky-next-scroll-button"]).visibility === 'hidden') {
335
- for (let i = 0; i < this.targetElements["sticky-header-cells"].length + 1; i++) {
336
- if ((_b = (_a = this.targetElements["sticky-header-cells"][i]) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains('border-box-header-cell')) {
337
- (_d = (_c = this.targetElements["sticky-header-cells"][i]) === null || _c === void 0 ? void 0 : _c.classList) === null || _d === void 0 ? void 0 : _d.remove('border-box-header-cell');
338
- }
339
- }
340
- }
341
- }
342
- }
343
- handleStickyHeaderHorizontalScroll() {
344
- var _a;
345
- this.targetElements["table-container"].scrollLeft = (_a = this.targetElements["sticky-header-container"]) === null || _a === void 0 ? void 0 : _a.scrollLeft;
346
- }
347
- handleScrollForwardHover() {
348
- if (this.targetElements["normal-next-scroll-button"].getAttribute("data-clicked") !== "true") {
349
- document.body.style.cursor = 'pointer';
350
- this.targetElements["normal-next-scroll-button-text"].style.display = "block";
351
- this.targetElements["sticky-next-scroll-button-text"].style.display = "block";
352
- }
353
- }
354
- handleScrollForwardHoverOut() {
355
- if (this.targetElements["normal-next-scroll-button"].getAttribute("data-clicked") !== "true") {
356
- document.body.style.cursor = 'auto';
357
- this.targetElements["normal-next-scroll-button-text"].style.display = "none";
358
- this.targetElements["sticky-next-scroll-button-text"].style.display = "none";
359
- }
360
- }
361
- handleScrollForward() {
362
- this.targetElements = this.getTargetElements();
363
- // Display the "See more" text when clicked
364
- document.body.style.cursor = 'pointer';
365
- this.targetElements["normal-next-scroll-button"].setAttribute("data-clicked", "true");
366
- this.targetElements["normal-next-scroll-button-text"].style.display = "block";
367
- this.targetElements["sticky-next-scroll-button-text"].style.display = "block";
368
- let scrollAdded = 0;
369
- let intervalId = setInterval(() => {
370
- scrollAdded += this.scrollAmount;
371
- let tableContainerRight = this.targetElements["table-container"].getBoundingClientRect().right;
372
- let tableRight = this.targetElements["table"].getBoundingClientRect().right;
373
- if ((scrollAdded == this.scrollLimit) || ([0, 1].includes(this.verticalEdgePixelComparator(tableContainerRight, tableRight)))) {
374
- clearInterval(intervalId);
375
- this.targetElements["normal-next-scroll-button"].setAttribute("data-clicked", "false");
376
- // Remove the "See more" text if the mouse is not hovering over the button after scrolling
377
- if (!this.targetElements["normal-next-scroll-button"].matches(':hover') && !this.targetElements["sticky-next-scroll-button"].matches(':hover')) {
378
- document.body.style.cursor = 'auto';
379
- this.targetElements["normal-next-scroll-button-text"].style.display = "none";
380
- this.targetElements["sticky-next-scroll-button-text"].style.display = "none";
381
- }
382
- }
383
- this.targetElements["table-container"].scrollLeft += scrollAdded;
384
- }, this.scrollTimeInterval);
385
- }
386
- handleScrollBackwardHover() {
387
- document.body.style.cursor = 'pointer';
388
- if (this.targetElements["normal-previous-scroll-button"].getAttribute("data-clicked") !== "true") {
389
- this.targetElements["normal-previous-scroll-button-text"].style.display = "block";
390
- this.targetElements["sticky-previous-scroll-button-text"].style.display = "block";
391
- }
392
- }
393
- handleScrollBackwardHoverOut() {
394
- document.body.style.cursor = 'auto';
395
- if (this.targetElements["normal-previous-scroll-button"].getAttribute("data-clicked") !== "true") {
396
- this.targetElements["normal-previous-scroll-button-text"].style.display = "none";
397
- this.targetElements["sticky-previous-scroll-button-text"].style.display = "none";
398
- }
399
- }
400
- handleScrollBackward() {
401
- this.targetElements = this.getTargetElements();
402
- // Display the "See more" text when clicked
403
- document.body.style.cursor = 'pointer';
404
- this.targetElements["normal-previous-scroll-button"].setAttribute("data-clicked", "true");
405
- this.targetElements["normal-previous-scroll-button-text"].style.display = "block";
406
- this.targetElements["sticky-previous-scroll-button-text"].style.display = "block";
407
- let scrollReduced = 0;
408
- let intervalId = setInterval(() => {
409
- scrollReduced += this.scrollAmount;
410
- let tableContainerLeft = this.targetElements["table-container"].getBoundingClientRect().left;
411
- let tableLeft = this.targetElements["table"].getBoundingClientRect().left;
412
- if ((scrollReduced == this.scrollLimit) || [-1, 0].includes(this.verticalEdgePixelComparator(tableContainerLeft, tableLeft))) {
413
- clearInterval(intervalId);
414
- this.targetElements["normal-previous-scroll-button"].setAttribute("data-clicked", "false");
415
- // Remove the "See more" text if the mouse is not hovering over the button after scrolling
416
- if (!this.targetElements["normal-previous-scroll-button"].matches(':hover') && !this.targetElements["sticky-previous-scroll-button"].matches(':hover')) {
417
- document.body.style.cursor = 'auto';
418
- this.targetElements["normal-previous-scroll-button-text"].style.display = "none";
419
- this.targetElements["sticky-previous-scroll-button-text"].style.display = "none";
420
- }
421
- return;
422
- }
423
- this.targetElements["table-container"].scrollLeft -= scrollReduced;
424
- }, this.scrollTimeInterval);
425
- }
426
- componentWillLoad() {
427
- let desktopHeaderFirstCellSlot = this.el.querySelector('[slot="desktop-header-first-cell"]');
428
- let desktopHeaderFirstCellText = desktopHeaderFirstCellSlot.innerHTML;
429
- this.el.insertAdjacentHTML('afterbegin', `<span slot="normal-desktop-header-first-cell">${desktopHeaderFirstCellText}</span><span slot="sticky-desktop-header-first-cell">${desktopHeaderFirstCellText}</span>`);
430
- desktopHeaderFirstCellSlot.remove();
431
- let columnHeaders = this.el.querySelectorAll('[slot^="column-header"]');
432
- for (let i = 0; i < this.dataCols; i++) {
433
- let slotValue = columnHeaders[i].getAttribute('slot');
434
- let headerText = columnHeaders[i].innerHTML;
435
- this.el.insertAdjacentHTML('afterbegin', `<span slot="normal-${slotValue}">${headerText}</span><span slot="sticky-${slotValue}">${headerText}</span>`);
436
- columnHeaders[i].remove();
437
- }
438
- let headerLinks = this.el.querySelectorAll('[slot^="header-link"]');
439
- if (headerLinks.length > 0) {
440
- for (let i = 0; i < this.dataCols; i++) {
441
- let linkHref = headerLinks[i].getAttribute('href');
442
- let linkText = headerLinks[i].innerHTML;
443
- this.columnHeaderLinks.push({ linkHref, linkText });
444
- headerLinks[i].remove();
445
- }
446
- }
447
- let ctaButtons = this.el.querySelectorAll('[slot^="cta-button"]');
448
- this.showCtaButtonsRow = (ctaButtons.length !== 0);
449
- for (let i = 0; i < this.dataCols; i++) {
450
- this.ctaButtons.push({
451
- linkHref: ctaButtons[i].getAttribute('href'),
452
- linkText: ctaButtons[i].innerHTML
453
- });
454
- ctaButtons[i].remove();
455
- }
456
- let disclaimers = this.el.querySelectorAll('[slot^="disclaimer"]');
457
- for (let i = 0; i < this.disclaimerCount; i++) {
458
- this.disclaimers.push(disclaimers[i].innerHTML);
459
- disclaimers[i].remove();
460
- }
461
- }
462
- componentDidLoad() {
463
- this.configureTableFillerCells();
464
- this.configureStickyHeader();
465
- this.configureScrollButtonsContainers();
466
- window.addEventListener('scroll', this.handleVerticalScroll);
467
- window.addEventListener('resize', this.handleResize);
468
- }
469
- disconnectedCallback() {
470
- window.removeEventListener('scroll', this.handleVerticalScroll);
471
- window.removeEventListener('resize', this.handleResize);
472
- }
473
- render() {
474
- const getTableTitle = () => {
475
- return (this.tableTitle && h(Fragment, null, h("div", { class: "table-descriptor" }, h("ptc-title", { type: "h2", "text-align": "center", "title-size": "xx-large", upperline: "no-upperline", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-8" }, this.tableTitle)), (this.tableSubTitle)
476
- ? h(Fragment, null, h("ptc-spacer", { breakpoint: "small", size: "x-small" }), h("ptc-spacer", { breakpoint: "x-small", size: "small" }))
477
- : (this.tableDescription)
478
- ? h(Fragment, null, h("ptc-spacer", { breakpoint: "small", size: "small" }), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }))
479
- : null));
480
- };
481
- const getTableSubTitle = () => {
482
- return (this.tableSubTitle && h(Fragment, null, h("div", { class: "table-descriptor" }, h("ptc-title", { type: "h3", "text-align": "center", "title-size": "large", upperline: "no-upperline", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-7" }, this.tableSubTitle)), h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" })));
483
- };
484
- const getTableDescription = () => {
485
- return (this.tableDescription && h(Fragment, null, h("div", { class: "table-descriptor" }, h("ptc-para", { "font-size": "small", "font-weight": "w-4", "para-align": "center", "para-line-h": "line-height-p", "para-margin": "margin-flush" }, (this.tableDescription.length <= 500) ? this.tableDescription : h("ptc-readmore", { "more-text": "See more" }, this.tableDescription)))));
486
- };
487
- const getScrollButtonsContainer = () => {
488
- return h("div", { class: "scroll-buttons-container" }, h("div", { class: "scroll-buttons prev-button", "data-clicked": "false", onClick: () => this.handleScrollBackward(), onMouseOver: () => this.handleScrollBackwardHover(), onMouseOut: () => this.handleScrollBackwardHoverOut() }, h("icon-asset", { type: "solid", size: "medium", name: "chevron-left", color: "primary-gray" }), h("ptc-para", { "font-size": "small", "font-weight": "w-6", "para-align": "justify", "para-color": "primary-grey", "para-line-h": "line-height-p", "para-margin": "margin-flush" }, "See More")), h("div", { class: "scroll-buttons next-button", "data-clicked": "false", onClick: () => this.handleScrollForward(), onMouseOver: () => this.handleScrollForwardHover(), onMouseOut: () => this.handleScrollForwardHoverOut() }, h("ptc-para", { "font-size": "small", "font-weight": "w-6", "para-align": "justify", "para-color": "primary-grey", "para-line-h": "line-height-p", "para-margin": "margin-flush" }, "See More"), h("icon-asset", { type: "solid", size: "medium", name: "chevron-right", color: "primary-gray" })));
489
- };
490
- const getTableHeader = (headerType) => {
491
- return h("thead", null, h("tr", null, h("th", { class: "desktop-header-first-cell" }, h("ptc-para", { "font-size": "medium", "font-weight": "w-7", "para-align": "left", "para-color": "white", "para-line-h": "line-height-p", "para-margin": "margin-flush" }, h("slot", { name: `${headerType}-desktop-header-first-cell` }))), ([...Array(this.dataCols).keys()]).map(col => {
492
- return h("th", null, h("ptc-para", { "font-size": "medium", "font-weight": "w-7", "para-align": "center", "para-color": "white", "para-line-h": "line-height-p", "para-margin": "margin-flush" }, h("slot", { name: `${headerType}-column-header-${col + 1}` })), (this.columnHeaderLinks.length === this.dataCols) ? h(Fragment, null, h("ptc-spacer", { breakpoint: 'small', size: "small" }), h("ptc-spacer", { breakpoint: 'x-small', size: "medium" }), h("ptc-link", { "font-size": "medium", "font-weight": "w-extrabold", href: `${this.columnHeaderLinks[col].linkHref}`, "link-area": "undefined", target: "_blank", theme: "d-green-underline" }, h("ptc-tooltip", { class: (col === (this.dataCols - 1)) ? "last-column-tooltip" : "", "text-display": "inline", "max-length": "30", "z-index": "z-2", description: this.columnHeaderLinks[col].linkText, position: "top" }))) : null);
493
- }), h("th", { class: "table-filler-header-cell" })));
494
- };
495
- const getMobileTableBody = () => {
496
- return h("tbody", { class: "mobile-table-body" }, ([...Array(this.dataRows).keys()]).map(row => {
497
- return h(Fragment, null, h("tr", null, h("td", { colSpan: this.mobileHeaderRowColSpan }, h("div", { class: "mobile-table-row-header" }, h("ptc-para", { "font-size": "small", "font-weight": "w-6", "para-align": "left", "para-color": "primary-grey", "para-line-h": "line-height-p", "para-margin": "margin-1" }, h("slot", { name: `row-header-${row + 1}` }))))), h("tr", null, ([...Array(this.dataCols).keys()]).map(col => {
498
- return h("td", null, h("slot", { name: `cell-r${row + 1}-c${col + 1}` }));
499
- }), h("td", { class: "table-filler-body-cell" })));
500
- }), (this.showCtaButtonsRow) ?
501
- h("tr", { class: "table-button-row" }, ([...Array(this.dataCols).keys()]).map(col => {
502
- return h("td", null, h("ptc-button", { type: "link", color: "ptc-tertiary", "link-href": this.ctaButtons[col].linkHref, target: "_blank" }, this.ctaButtons[col].linkText));
503
- }), (this.mobileHeaderRowColSpan > this.dataCols) ? h("td", { class: "table-filler-button-cell" }) : null) : null);
504
- };
505
- const getDesktopTableBody = () => {
506
- return h("tbody", { class: "desktop-table-body" }, ([...Array(this.dataRows).keys()]).map(row => {
507
- return h("tr", null, h("td", { class: "first-column-cell" }, h("ptc-para", { "font-size": "small", "font-weight": "w-6", "para-align": "left", "para-color": "primary-grey", "para-line-h": "line-height-p", "para-margin": "margin-1" }, h("slot", { name: `row-header-${row + 1}` }))), ([...Array(this.dataCols).keys()]).map(col => {
508
- return h("td", null, h("slot", { name: `cell-r${row + 1}-c${col + 1}` }));
509
- }), h("td", { class: "table-filler-body-cell" }));
510
- }), (this.showCtaButtonsRow) ?
511
- h("tr", { class: "table-button-row" }, h("td", null), ([...Array(this.dataCols).keys()]).map(col => {
512
- return h("td", null, h("ptc-button", { type: "link", color: "ptc-tertiary", "link-href": this.ctaButtons[col].linkHref, target: "_blank" }, h("ptc-tooltip", { class: (col === (this.dataCols - 1)) ? "last-column-tooltip" : "", "text-display": "inline", "max-length": "30", "z-index": "z-2", description: this.ctaButtons[col].linkText, position: "top" })));
513
- }), h("td", { class: "table-filler-button-cell" })) : null);
514
- };
515
- const getDisclaimers = () => {
516
- return ((this.disclaimerCount > 0) && h(Fragment, null, h("ptc-spacer", { breakpoint: "small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "large" }), this.disclaimers.map((disclaimer, ind) => {
517
- return h(Fragment, null, h("ptc-para", { "font-size": "xx-small", "font-weight": "w-6", "para-align": "center", "para-color": "primary-grey", "para-line-h": "line-height-p", "para-margin": "margin-flush" }, disclaimer), (ind != (this.disclaimerCount - 1)) ? h("ptc-spacer", { size: "xx-small" }) : null);
518
- })));
519
- };
520
- return (h(Host, null, h("div", { id: "vertical-scroll-content-clipper" }), h("div", { id: "sticky-header-container", onScroll: () => this.handleStickyHeaderHorizontalScroll() }, getScrollButtonsContainer(), getTableHeader("sticky")), h("ptc-spacer", { breakpoint: "small", size: "xxx-large" }), h("ptc-spacer", { breakpoint: "x-small", size: "xxxx-large" }), getTableTitle(), getTableSubTitle(), getTableDescription(), h("ptc-spacer", { breakpoint: "small", size: "xx-large" }), h("ptc-spacer", { breakpoint: "small", size: "xx-small" }), h("ptc-spacer", { breakpoint: "x-small", size: "xxx-large" }), h("ptc-spacer", { breakpoint: "x-small", size: "xx-small" }), h("div", { id: "table-container", onScroll: () => this.handleHorizontalScroll() }, getScrollButtonsContainer(), h("table", null, h("div", { id: "horizontal-scroll-box-shadow" }), getTableHeader("normal"), (window.innerWidth >= 992)
521
- ? getDesktopTableBody()
522
- : getMobileTableBody())), getDisclaimers(), h("ptc-spacer", { breakpoint: "small", size: "xxx-large" }), h("ptc-spacer", { breakpoint: "x-small", size: "xxxx-large" })));
523
- }
524
- static get is() { return "ptc-pricing-table"; }
525
- static get encapsulation() { return "shadow"; }
526
- static get originalStyleUrls() {
527
- return {
528
- "$": ["ptc-pricing-table.scss"]
529
- };
530
- }
531
- static get styleUrls() {
532
- return {
533
- "$": ["ptc-pricing-table.css"]
534
- };
535
- }
536
- static get properties() {
537
- return {
538
- "pageWithSubnav": {
539
- "type": "boolean",
540
- "mutable": false,
541
- "complexType": {
542
- "original": "boolean",
543
- "resolved": "boolean",
544
- "references": {}
545
- },
546
- "required": false,
547
- "optional": true,
548
- "docs": {
549
- "tags": [],
550
- "text": "[True/False] If the page containing this table has a sticky sub-nav"
551
- },
552
- "attribute": "page-with-subnav",
553
- "reflect": false,
554
- "defaultValue": "false"
555
- },
556
- "tableTitle": {
557
- "type": "string",
558
- "mutable": false,
559
- "complexType": {
560
- "original": "string",
561
- "resolved": "string",
562
- "references": {}
563
- },
564
- "required": false,
565
- "optional": true,
566
- "docs": {
567
- "tags": [],
568
- "text": "Table title (H2)"
569
- },
570
- "attribute": "table-title",
571
- "reflect": false
572
- },
573
- "tableSubTitle": {
574
- "type": "string",
575
- "mutable": false,
576
- "complexType": {
577
- "original": "string",
578
- "resolved": "string",
579
- "references": {}
580
- },
581
- "required": false,
582
- "optional": true,
583
- "docs": {
584
- "tags": [],
585
- "text": "Table title (H3)"
586
- },
587
- "attribute": "table-sub-title",
588
- "reflect": false,
589
- "defaultValue": "\"\""
590
- },
591
- "tableDescription": {
592
- "type": "string",
593
- "mutable": false,
594
- "complexType": {
595
- "original": "string",
596
- "resolved": "string",
597
- "references": {}
598
- },
599
- "required": false,
600
- "optional": true,
601
- "docs": {
602
- "tags": [],
603
- "text": "Table description"
604
- },
605
- "attribute": "table-description",
606
- "reflect": false,
607
- "defaultValue": "\"\""
608
- },
609
- "dataRows": {
610
- "type": "number",
611
- "mutable": false,
612
- "complexType": {
613
- "original": "number",
614
- "resolved": "number",
615
- "references": {}
616
- },
617
- "required": false,
618
- "optional": true,
619
- "docs": {
620
- "tags": [],
621
- "text": "Number of data rows in the table"
622
- },
623
- "attribute": "data-rows",
624
- "reflect": false
625
- },
626
- "dataCols": {
627
- "type": "number",
628
- "mutable": false,
629
- "complexType": {
630
- "original": "number",
631
- "resolved": "number",
632
- "references": {}
633
- },
634
- "required": false,
635
- "optional": true,
636
- "docs": {
637
- "tags": [],
638
- "text": "Number of data columns in the table"
639
- },
640
- "attribute": "data-cols",
641
- "reflect": false
642
- },
643
- "disclaimerCount": {
644
- "type": "number",
645
- "mutable": false,
646
- "complexType": {
647
- "original": "number",
648
- "resolved": "number",
649
- "references": {}
650
- },
651
- "required": false,
652
- "optional": true,
653
- "docs": {
654
- "tags": [],
655
- "text": "Number of disclaimers below the table"
656
- },
657
- "attribute": "disclaimer-count",
658
- "reflect": false,
659
- "defaultValue": "0"
660
- }
661
- };
662
- }
663
- static get states() {
664
- return {
665
- "scrollTopClipperHeight": {},
666
- "desktopHeaderFirstCellWidth": {},
667
- "targetElements": {},
668
- "columnHeaderLinks": {},
669
- "lastScrollTop": {},
670
- "scrollTimeInterval": {},
671
- "scrollAmount": {},
672
- "scrollLimit": {},
673
- "mobileHeaderRowColSpan": {},
674
- "showCtaButtonsRow": {},
675
- "ctaButtons": {},
676
- "disclaimers": {}
677
- };
678
- }
679
- static get elementRef() { return "el"; }
680
- }