@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,536 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-cd9a1b1a.js');
6
-
7
- const ptcPricingTableCss = ":host{display:block;position:relative}:host #vertical-scroll-content-clipper{position:fixed;top:0;left:0;right:0;margin:auto;background-color:white;z-index:25;display:none}:host .last-column-tooltip .tooltip{right:-48px}:host #sticky-header-container{position:fixed;z-index:20;background-color:white;overflow-x:scroll;overflow-y:visible;-ms-overflow-style:none;scrollbar-width:none;visibility:hidden;border-top-left-radius:var(--ptc-border-radius-standard);border-top-right-radius:var(--ptc-border-radius-standard);box-shadow:var(--ptc-shadow-x-large)}:host #sticky-header-container::-webkit-scrollbar{display:none}:host #sticky-header-container th{background:var(--color-gray-10);color:white;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06) var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);min-width:168px;max-width:180px;vertical-align:middle}:host #sticky-header-container th:not(:last-child){border-right:1px solid var(--color-gray-07)}:host #sticky-header-container th.desktop-header-first-cell{display:none}:host #sticky-header-container th.border-box-header-cell{box-sizing:border-box}:host #sticky-header-container th.table-filler-header-cell{width:99%;box-sizing:content-box}:host .scroll-buttons-container{position:absolute;top:0;right:0;display:flex;align-items:center;box-sizing:border-box}:host .scroll-buttons-container .scroll-buttons{z-index:15;position:absolute;display:inline-block;width:36px;width:fit-content;height:36px;background-color:white;box-shadow:var(--ptc-shadow-x-medium);display:flex;justify-content:center;align-items:center}:host .scroll-buttons-container .scroll-buttons icon-asset{z-index:15;display:flex;justify-content:center;align-items:center;width:36px;height:100%}:host .scroll-buttons-container .scroll-buttons.prev-button{z-index:15;left:0;border-radius:0px var(--ptc-element-spacing-01) var(--ptc-element-spacing-01) 0px}:host .scroll-buttons-container .scroll-buttons.prev-button ptc-para{z-index:15;margin-right:var(--ptc-element-spacing-04);display:none}:host .scroll-buttons-container .scroll-buttons.next-button{z-index:15;right:0;border-radius:var(--ptc-element-spacing-01) 0px 0px var(--ptc-element-spacing-01)}:host .scroll-buttons-container .scroll-buttons.next-button ptc-para{z-index:15;margin-left:var(--ptc-element-spacing-04);display:none}:host #table-container{border-radius:var(--ptc-border-radius-standard);box-shadow:var(--ptc-shadow-x-small);overflow-x:scroll;position:relative}:host #table-container #horizontal-scroll-box-shadow{display:none}:host #table-container table{border-spacing:0}:host #table-container th{background:var(--color-gray-10);color:white;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06) var(--ptc-element-spacing-04) var(--ptc-element-spacing-06)}:host #table-container th:not(:last-child){border-right:1px solid var(--color-gray-07)}:host #table-container th.desktop-header-first-cell{display:none}:host #table-container th.table-filler-header-cell{width:99%;display:none}:host #table-container tbody.mobile-table-body{display:contents;width:100%}:host #table-container tbody.desktop-table-body{display:none}:host #table-container tr{background-color:white;width:100%;overflow-x:scroll}:host #table-container tr:nth-child(odd){background-color:var(--color-gray-01)}:host #table-container tr:nth-child(even){background-color:white}:host #table-container tr.table-button-row{background-color:white}:host #table-container tr.table-button-row td{border-top:1px solid var(--color-gray-02)}:host #table-container tr.table-button-row td ptc-tooltip .text-ellipsis{font-size:var(--ptc-font-size-x-small)}:host #table-container td{text-align:center;min-width:168px;max-width:180px;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06) var(--ptc-element-spacing-04) var(--ptc-element-spacing-06)}:host #table-container td:not(:last-child){border-right:1px solid var(--color-gray-02)}:host #table-container td.table-filler-body-cell{width:99%;display:none}@media only screen and (min-width: 768px){:host .table-descriptor{width:768px;margin:auto}}@media only screen and (min-width: 992px){:host #sticky-header-container{box-shadow:none}:host #sticky-header-container th{max-width:275px}:host #sticky-header-container th.desktop-header-first-cell{display:table-cell;min-width:275px;box-sizing:content-box}:host #sticky-header-container th:first-of-type{position:-webkit-sticky;position:sticky;left:0;z-index:5}:host #sticky-header-container th.table-filler-header-cell{width:99%;display:none;max-width:fit-content;box-sizing:border-box}:host #table-container #horizontal-scroll-box-shadow{display:block;position:absolute;top:0;left:0;height:100%;width:var(--ptc-element-spacing-06);background:linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0) 100%);z-index:10;visibility:hidden}:host #table-container th{max-width:275px}:host #table-container th.desktop-header-first-cell{display:table-cell;min-width:275px}:host #table-container th:first-of-type{position:-webkit-sticky;position:sticky;left:0;z-index:5}:host #table-container th.table-filler-header-cell{width:99%;display:none}:host #table-container tbody.mobile-table-body{display:none}:host #table-container tbody.desktop-table-body{display:contents;width:100%}:host #table-container tr:nth-child(odd){background-color:white}:host #table-container tr:nth-child(even){background-color:var(--color-gray-01)}:host #table-container tr.table-button-row{background-color:white}:host #table-container tr.table-button-row td{border-top:1px solid var(--color-gray-02)}:host #table-container td{max-width:275px}:host #table-container td:first-of-type{position:-webkit-sticky;position:sticky;left:0;z-index:5;background:inherit;min-width:275px}:host #table-container td:not(:first-child){text-align:center}:host #table-container td.first-column-cell.scroll-shadow{box-shadow:var(--ptc-shadow-x-large)}:host #table-container td.first-column-cell.no-shadow{box-shadow:none}:host #table-container td.table-filler-body-cell{width:99%;display:none}:host #table-container td.table-filler-button-cell{width:99%;display:none}}";
8
-
9
- const PtcPricingTable = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.scrollTopClipperHeightOptions = {
13
- withSubNav: {
14
- desktop: "104px",
15
- mobile: "80px"
16
- },
17
- withoutSubNav: {
18
- desktop: "40px",
19
- mobile: "24px"
20
- }
21
- };
22
- this.verticalEdgePixelComparator = (edge1, edge2) => {
23
- let delta = 2;
24
- if ((edge1 == edge2) || ((edge1 >= (edge2 - delta)) && (edge1 <= (edge2 + delta)))) {
25
- return 0;
26
- }
27
- if (edge1 < (edge2 - delta)) {
28
- return -1;
29
- }
30
- if (edge1 > (edge2 + delta)) {
31
- return 1;
32
- }
33
- };
34
- this.handleHorizontalScroll = () => {
35
- var _a, _b, _c, _d, _e, _f, _g, _h;
36
- this.targetElements = this.getTargetElements();
37
- this.targetElements["sticky-header-container"].scrollLeft = (_a = this.targetElements["table-container"]) === null || _a === void 0 ? void 0 : _a.scrollLeft;
38
- // Scroll the button containers in sync with the table's scrolling
39
- 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))) {
40
- this.targetElements["normal-scroll-buttons-container"].style.left = `${((_d = this.targetElements["table-container"]) === null || _d === void 0 ? void 0 : _d.scrollLeft) + this.desktopHeaderFirstCellWidth}px`;
41
- this.targetElements["sticky-scroll-buttons-container"].style.left = `${((_e = this.targetElements["table-container"]) === null || _e === void 0 ? void 0 : _e.scrollLeft) + this.desktopHeaderFirstCellWidth}px`;
42
- }
43
- // Scroll the mobile row headers along with the table in the mobile view
44
- if (this.targetElements["mobile-table-row-headers"].length > 0) {
45
- for (let i = 0; i < this.dataRows; i++) {
46
- this.targetElements["mobile-table-row-headers"][i].style.paddingLeft = `${(_f = this.targetElements["table-container"]) === null || _f === void 0 ? void 0 : _f.scrollLeft}px`;
47
- }
48
- }
49
- // 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
50
- 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))) {
51
- this.targetElements["normal-next-scroll-button"].style.visibility = 'hidden';
52
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
53
- this.targetElements["sticky-next-scroll-button"].style.visibility = 'hidden';
54
- }
55
- }
56
- else {
57
- this.targetElements["normal-next-scroll-button"].style.visibility = 'visible';
58
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
59
- this.targetElements["sticky-next-scroll-button"].style.visibility = 'visible';
60
- }
61
- }
62
- // 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
63
- if (this.targetElements["table-container"].scrollLeft === 0) {
64
- this.targetElements["horizontal-scroll-box-shadow"].style.left = '0';
65
- this.targetElements["horizontal-scroll-box-shadow"].style.visibility = 'hidden';
66
- this.targetElements["normal-previous-scroll-button"].style.visibility = 'hidden';
67
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
68
- this.targetElements["sticky-previous-scroll-button"].style.visibility = 'hidden';
69
- }
70
- }
71
- else {
72
- this.targetElements["horizontal-scroll-box-shadow"].style.left = `${((_h = this.targetElements["table-container"]) === null || _h === void 0 ? void 0 : _h.scrollLeft) + this.desktopHeaderFirstCellWidth}px`;
73
- this.targetElements["horizontal-scroll-box-shadow"].style.visibility = 'visible';
74
- this.targetElements["normal-previous-scroll-button"].style.visibility = 'visible';
75
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
76
- this.targetElements["sticky-previous-scroll-button"].style.visibility = 'visible';
77
- }
78
- }
79
- };
80
- this.handleVerticalScroll = () => {
81
- this.targetElements = this.getTargetElements();
82
- const scrollTopPosition = window.scrollY || document.documentElement.scrollTop;
83
- if (scrollTopPosition < this.lastScrollTop) {
84
- // Scrolling Up
85
- if (this.targetElements["table-container"].getBoundingClientRect().bottom > 0) {
86
- if (this.targetElements["sticky-header-container"].getBoundingClientRect().top < 0) {
87
- // Scroll the sticky header back into view along with the table
88
- this.targetElements["vertical-scroll-content-clipper"].style.display = 'block';
89
- this.targetElements["sticky-scroll-buttons-container"].style.opacity = '1';
90
- this.targetElements["sticky-header-container"].style.visibility = 'visible';
91
- this.targetElements["sticky-header-container"].style.top = `${this.targetElements["table-container"].getBoundingClientRect().bottom - this.targetElements["sticky-header-container"].getBoundingClientRect().height}px`;
92
- }
93
- else {
94
- // Make the sticky header fixed once it is entirely within the window
95
- this.targetElements["sticky-header-container"].style.top = this.scrollTopClipperHeight;
96
- }
97
- }
98
- if (this.targetElements["table-header"].getBoundingClientRect().top > this.targetElements["sticky-header-container"].getBoundingClientRect().top) {
99
- // Conceal the sticky header and reveal the normal header
100
- this.targetElements["sticky-scroll-buttons-container"].style.opacity = '0';
101
- this.targetElements["sticky-header-container"].style.visibility = 'hidden';
102
- this.targetElements["table-header"].style.visibility = 'visible';
103
- this.targetElements["vertical-scroll-content-clipper"].style.display = 'none';
104
- }
105
- }
106
- else if (scrollTopPosition > this.lastScrollTop) {
107
- // Scrolling down
108
- if (this.targetElements["sticky-header-container"].getBoundingClientRect().bottom <= 0) {
109
- // Reset and hide the sticky header when it scrolls out of the top of the window
110
- this.targetElements["sticky-header-container"].style.top = `${-this.targetElements["sticky-header-container"].getBoundingClientRect().height}px`;
111
- this.targetElements["sticky-scroll-buttons-container"].style.opacity = '0';
112
- this.targetElements["sticky-header-container"].style.visibility = 'hidden';
113
- this.targetElements["vertical-scroll-content-clipper"].style.display = 'none';
114
- }
115
- else if (this.targetElements["table-header"].getBoundingClientRect().top <= this.targetElements["sticky-header-container"].getBoundingClientRect().top) {
116
- if (this.targetElements["table-container"].getBoundingClientRect().bottom <= this.targetElements["sticky-header-container"].getBoundingClientRect().bottom) {
117
- // Scroll the sticky header out of the window along with the table
118
- this.targetElements["sticky-header-container"].style.top = `${(this.targetElements["table-container"].getBoundingClientRect().bottom - this.targetElements["sticky-header-container"].clientHeight)}px`;
119
- }
120
- else {
121
- // Conceal the normal header and reveal the sticky header
122
- this.targetElements["vertical-scroll-content-clipper"].style.display = 'block';
123
- this.targetElements["sticky-scroll-buttons-container"].style.opacity = '1';
124
- this.targetElements["sticky-header-container"].style.visibility = 'visible';
125
- this.targetElements["table-header"].style.visibility = 'hidden';
126
- this.targetElements["sticky-previous-scroll-button"].style.visibility = this.targetElements["normal-previous-scroll-button"].style.visibility;
127
- this.targetElements["sticky-next-scroll-button"].style.visibility = this.targetElements["normal-next-scroll-button"].style.visibility;
128
- if (getComputedStyle(this.targetElements["sticky-next-scroll-button"]).visibility === "visible") {
129
- this.targetElements["table-filler-sticky-header-cell"].style.boxSizing = "content-box";
130
- }
131
- }
132
- }
133
- }
134
- this.lastScrollTop = scrollTopPosition <= 0 ? 0 : scrollTopPosition;
135
- };
136
- this.handleResize = () => {
137
- this.targetElements["table-container"].scrollLeft = 0;
138
- this.handleHorizontalScroll();
139
- this.configureStickyHeader();
140
- this.configureScrollButtonsContainers();
141
- this.configureTableFillerCells();
142
- };
143
- this.pageWithSubnav = false;
144
- this.tableTitle = undefined;
145
- this.tableSubTitle = "";
146
- this.tableDescription = "";
147
- this.dataRows = undefined;
148
- this.dataCols = undefined;
149
- this.disclaimerCount = 0;
150
- this.scrollTopClipperHeight = undefined;
151
- this.desktopHeaderFirstCellWidth = 0;
152
- this.targetElements = {};
153
- this.columnHeaderLinks = [];
154
- this.lastScrollTop = undefined;
155
- this.scrollTimeInterval = 35;
156
- this.scrollAmount = 5;
157
- this.scrollLimit = 50;
158
- this.mobileHeaderRowColSpan = this.dataCols;
159
- this.showCtaButtonsRow = undefined;
160
- this.ctaButtons = [];
161
- this.disclaimers = [];
162
- }
163
- // Provides an object containing frequently accessed HTML elements for table-related operations
164
- getTargetElements() {
165
- let pricingTable = this.el.shadowRoot;
166
- let verticalScrollContentClipper = pricingTable === null || pricingTable === void 0 ? void 0 : pricingTable.querySelector('#vertical-scroll-content-clipper');
167
- let tableContainer = pricingTable === null || pricingTable === void 0 ? void 0 : pricingTable.querySelector('#table-container');
168
- let table = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('table');
169
- let tableHeader = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('table thead');
170
- let desktopHeaderFirstCell = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('.desktop-header-first-cell');
171
- let tableHeaderCells = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelectorAll('th');
172
- let desktopTableBody = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('.desktop-table-body');
173
- let mobileTableBody = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('.mobile-table-body');
174
- let stickyHeaderContainer = pricingTable === null || pricingTable === void 0 ? void 0 : pricingTable.querySelector('#sticky-header-container');
175
- let stickyHeaderCells = stickyHeaderContainer === null || stickyHeaderContainer === void 0 ? void 0 : stickyHeaderContainer.querySelectorAll('th');
176
- let verticalScrollBoxShadow = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector("#vertical-scroll-box-shadow");
177
- let tableFillerStickyHeaderCell = stickyHeaderContainer === null || stickyHeaderContainer === void 0 ? void 0 : stickyHeaderContainer.querySelector('.table-filler-header-cell');
178
- let tableFillerHeaderCell = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.querySelector('.table-filler-header-cell');
179
- let tableFillerBodyCells = table === null || table === void 0 ? void 0 : table.querySelectorAll('.table-filler-body-cell');
180
- let tableFillerButtonCell = table === null || table === void 0 ? void 0 : table.querySelector('.table-filler-button-cell');
181
- let mobileTableRowHeaders = pricingTable === null || pricingTable === void 0 ? void 0 : pricingTable.querySelectorAll('.mobile-table-row-header');
182
- let normalScrollButtonsContainer = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('.scroll-buttons-container');
183
- let stickyScrollButtonsContainer = stickyHeaderContainer === null || stickyHeaderContainer === void 0 ? void 0 : stickyHeaderContainer.querySelector('.scroll-buttons-container');
184
- let normalPreviousScrollButton = normalScrollButtonsContainer === null || normalScrollButtonsContainer === void 0 ? void 0 : normalScrollButtonsContainer.querySelector('.prev-button');
185
- let normalPreviousScrollButtonText = normalPreviousScrollButton === null || normalPreviousScrollButton === void 0 ? void 0 : normalPreviousScrollButton.querySelector('ptc-para');
186
- let stickyPreviousScrollButton = stickyScrollButtonsContainer === null || stickyScrollButtonsContainer === void 0 ? void 0 : stickyScrollButtonsContainer.querySelector('.prev-button');
187
- let stickyPreviousScrollButtonText = stickyPreviousScrollButton === null || stickyPreviousScrollButton === void 0 ? void 0 : stickyPreviousScrollButton.querySelector('ptc-para');
188
- let normalNextScrollButton = normalScrollButtonsContainer === null || normalScrollButtonsContainer === void 0 ? void 0 : normalScrollButtonsContainer.querySelector('.next-button');
189
- let normalNextScrollButtonText = normalNextScrollButton === null || normalNextScrollButton === void 0 ? void 0 : normalNextScrollButton.querySelector('ptc-para');
190
- let stickyNextScrollButton = stickyScrollButtonsContainer === null || stickyScrollButtonsContainer === void 0 ? void 0 : stickyScrollButtonsContainer.querySelector('.next-button');
191
- let stickyNextScrollButtonText = stickyNextScrollButton === null || stickyNextScrollButton === void 0 ? void 0 : stickyNextScrollButton.querySelector('ptc-para');
192
- let horizontalScrollBoxShadow = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.querySelector('#horizontal-scroll-box-shadow');
193
- let targetElements = {
194
- "vertical-scroll-content-clipper": verticalScrollContentClipper,
195
- "pricing-table": pricingTable,
196
- "table-container": tableContainer,
197
- "table": table,
198
- "table-header": tableHeader,
199
- "desktop-header-first-cell": desktopHeaderFirstCell,
200
- "table-header-cells": tableHeaderCells,
201
- "desktop-table-body": desktopTableBody,
202
- "mobile-table-body": mobileTableBody,
203
- "sticky-header-container": stickyHeaderContainer,
204
- "sticky-header-cells": stickyHeaderCells,
205
- "vertical-scroll-box-shadow": verticalScrollBoxShadow,
206
- "table-filler-sticky-header-cell": tableFillerStickyHeaderCell,
207
- "table-filler-header-cell": tableFillerHeaderCell,
208
- "table-filler-body-cells": tableFillerBodyCells,
209
- "table-filler-button-cell": tableFillerButtonCell,
210
- "mobile-table-row-headers": mobileTableRowHeaders,
211
- "normal-scroll-buttons-container": normalScrollButtonsContainer,
212
- "sticky-scroll-buttons-container": stickyScrollButtonsContainer,
213
- "normal-previous-scroll-button": normalPreviousScrollButton,
214
- "normal-previous-scroll-button-text": normalPreviousScrollButtonText,
215
- "sticky-previous-scroll-button": stickyPreviousScrollButton,
216
- "sticky-previous-scroll-button-text": stickyPreviousScrollButtonText,
217
- "normal-next-scroll-button": normalNextScrollButton,
218
- "normal-next-scroll-button-text": normalNextScrollButtonText,
219
- "sticky-next-scroll-button": stickyNextScrollButton,
220
- "sticky-next-scroll-button-text": stickyNextScrollButtonText,
221
- "horizontal-scroll-box-shadow": horizontalScrollBoxShadow,
222
- };
223
- return targetElements;
224
- }
225
- // Sets up the scroll buttons container for both the sticky and normal headers
226
- configureScrollButtonsContainers() {
227
- this.targetElements = this.getTargetElements();
228
- // Defines the dimensions
229
- this.targetElements["normal-scroll-buttons-container"].style.width = `${this.targetElements["table-container"].clientWidth}px`;
230
- this.targetElements["normal-scroll-buttons-container"].style.height = `${this.targetElements["table-header"].clientHeight}px`;
231
- this.targetElements["sticky-scroll-buttons-container"].style.width = `${this.targetElements["table-container"].clientWidth}px`;
232
- this.targetElements["sticky-scroll-buttons-container"].style.height = `${this.targetElements["table-header"].clientHeight}px`;
233
- // For desktop screens, scroll buttons are positioned after the first column of the table
234
- if (this.targetElements["desktop-header-first-cell"]) {
235
- this.targetElements["normal-scroll-buttons-container"].style.width = `${this.targetElements["normal-scroll-buttons-container"].getBoundingClientRect().width - this.desktopHeaderFirstCellWidth}px`;
236
- this.targetElements["sticky-scroll-buttons-container"].style.width = `${this.targetElements["sticky-scroll-buttons-container"].getBoundingClientRect().width - this.desktopHeaderFirstCellWidth}px`;
237
- }
238
- // 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
239
- if (this.targetElements["table-container"].scrollLeft === 0) {
240
- this.targetElements["normal-previous-scroll-button"].style.visibility = 'hidden';
241
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
242
- this.targetElements["sticky-previous-scroll-button"].style.visibility = 'hidden';
243
- }
244
- }
245
- else {
246
- this.targetElements["normal-previous-scroll-button"].style.visibility = 'visible';
247
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
248
- this.targetElements["sticky-previous-scroll-button"].style.visibility = 'visible';
249
- }
250
- }
251
- // 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
252
- if (this.targetElements["table-container"].getBoundingClientRect().width >= this.targetElements["table"].getBoundingClientRect().width) {
253
- this.targetElements["normal-next-scroll-button"].style.visibility = 'hidden';
254
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
255
- this.targetElements["sticky-next-scroll-button"].style.visibility = 'hidden';
256
- }
257
- }
258
- else {
259
- this.targetElements["normal-next-scroll-button"].style.visibility = 'visible';
260
- if (this.targetElements["sticky-header-container"].style.visibility === 'visible') {
261
- this.targetElements["sticky-next-scroll-button"].style.visibility = 'visible';
262
- }
263
- }
264
- }
265
- // Configures the sticky header based on the dimensions of the table header
266
- configureStickyHeader() {
267
- var _a, _b, _c, _d, _e, _f;
268
- const targetElements = this.getTargetElements();
269
- // Expanding the content clipper by an additional 10px on each side to accommodate the table's box-shadow
270
- targetElements["vertical-scroll-content-clipper"].style.width = `${targetElements["table-container"].clientWidth + 20}px`;
271
- // Aligns the background color of the element with the body's background color
272
- const bodyBackgroundColor = window.getComputedStyle(document.body, null).getPropertyValue('background-color');
273
- if (bodyBackgroundColor === ("rgba(0, 0, 0, 0)" )) {
274
- targetElements["vertical-scroll-content-clipper"].style.backgroundColor = "white";
275
- }
276
- else {
277
- targetElements["vertical-scroll-content-clipper"].style.backgroundColor = bodyBackgroundColor;
278
- }
279
- // Establishing the width of the sticky header to be in line with the table's width
280
- targetElements["sticky-header-container"].style.width = `${targetElements["table-container"].clientWidth}px`;
281
- // 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
282
- if (this.pageWithSubnav) {
283
- if (window.innerWidth >= 1200) {
284
- this.scrollTopClipperHeight = this.scrollTopClipperHeightOptions.withSubNav.desktop;
285
- }
286
- else {
287
- this.scrollTopClipperHeight = this.scrollTopClipperHeightOptions.withSubNav.mobile;
288
- }
289
- }
290
- else {
291
- if (window.innerWidth >= 1200) {
292
- this.scrollTopClipperHeight = this.scrollTopClipperHeightOptions.withoutSubNav.desktop;
293
- }
294
- else {
295
- this.scrollTopClipperHeight = this.scrollTopClipperHeightOptions.withoutSubNav.mobile;
296
- }
297
- }
298
- targetElements["vertical-scroll-content-clipper"].style.height = this.scrollTopClipperHeight;
299
- targetElements["sticky-header-container"].style.top = this.scrollTopClipperHeight;
300
- // Align the widths of sticky header cells with those of the normal header cells
301
- for (let i = 0; i < targetElements["table-header-cells"].length; i++) {
302
- targetElements["sticky-header-cells"][i].style.width = `${targetElements["table-header-cells"][i].getBoundingClientRect().width}px`;
303
- if (targetElements["table-header-cells"][i].classList.contains('desktop-header-first-cell')) {
304
- this.desktopHeaderFirstCellWidth = targetElements["table-header-cells"][i].getBoundingClientRect().width;
305
- }
306
- }
307
- // Box-sizing
308
- if (targetElements["table"].clientWidth <= targetElements["table-container"].clientWidth) {
309
- if (targetElements["desktop-table-body"]) {
310
- for (let i = 0; i < targetElements["sticky-header-cells"].length; i++) {
311
- (_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');
312
- }
313
- }
314
- }
315
- else {
316
- for (let i = 0; i < targetElements["sticky-header-cells"].length; i++) {
317
- 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')) {
318
- (_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');
319
- }
320
- }
321
- }
322
- }
323
- configureTableFillerCells() {
324
- var _a, _b, _c, _d;
325
- this.targetElements = this.getTargetElements();
326
- this.targetElements["table-filler-sticky-header-cell"].style.width = this.targetElements["table-filler-header-cell"].getBoundingClientRect().width;
327
- if (this.targetElements['table'].getBoundingClientRect().width < this.targetElements['table-container'].getBoundingClientRect().width) {
328
- // If the table is smaller than the container, insert fillers
329
- this.targetElements["table-filler-sticky-header-cell"].style.display = 'table-cell';
330
- this.targetElements["table-filler-header-cell"].style.display = 'table-cell';
331
- for (let i = 0; i < this.dataRows; i++) {
332
- this.targetElements["table-filler-body-cells"][i].style.display = 'table-cell';
333
- }
334
- if (this.targetElements["table-filler-button-cell"]) {
335
- this.targetElements["table-filler-button-cell"].style.display = 'table-cell';
336
- }
337
- this.mobileHeaderRowColSpan = this.dataCols + 1;
338
- }
339
- else {
340
- // If the table is equal to or larger than the container, remove fillers
341
- this.targetElements["table-filler-sticky-header-cell"].style.width = '99%';
342
- if (getComputedStyle(this.targetElements["sticky-next-scroll-button"]).visibility === 'hidden') {
343
- for (let i = 0; i < this.targetElements["sticky-header-cells"].length + 1; i++) {
344
- 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')) {
345
- (_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');
346
- }
347
- }
348
- }
349
- }
350
- }
351
- handleStickyHeaderHorizontalScroll() {
352
- var _a;
353
- this.targetElements["table-container"].scrollLeft = (_a = this.targetElements["sticky-header-container"]) === null || _a === void 0 ? void 0 : _a.scrollLeft;
354
- }
355
- handleScrollForwardHover() {
356
- if (this.targetElements["normal-next-scroll-button"].getAttribute("data-clicked") !== "true") {
357
- document.body.style.cursor = 'pointer';
358
- this.targetElements["normal-next-scroll-button-text"].style.display = "block";
359
- this.targetElements["sticky-next-scroll-button-text"].style.display = "block";
360
- }
361
- }
362
- handleScrollForwardHoverOut() {
363
- if (this.targetElements["normal-next-scroll-button"].getAttribute("data-clicked") !== "true") {
364
- document.body.style.cursor = 'auto';
365
- this.targetElements["normal-next-scroll-button-text"].style.display = "none";
366
- this.targetElements["sticky-next-scroll-button-text"].style.display = "none";
367
- }
368
- }
369
- handleScrollForward() {
370
- this.targetElements = this.getTargetElements();
371
- // Display the "See more" text when clicked
372
- document.body.style.cursor = 'pointer';
373
- this.targetElements["normal-next-scroll-button"].setAttribute("data-clicked", "true");
374
- this.targetElements["normal-next-scroll-button-text"].style.display = "block";
375
- this.targetElements["sticky-next-scroll-button-text"].style.display = "block";
376
- let scrollAdded = 0;
377
- let intervalId = setInterval(() => {
378
- scrollAdded += this.scrollAmount;
379
- let tableContainerRight = this.targetElements["table-container"].getBoundingClientRect().right;
380
- let tableRight = this.targetElements["table"].getBoundingClientRect().right;
381
- if ((scrollAdded == this.scrollLimit) || ([0, 1].includes(this.verticalEdgePixelComparator(tableContainerRight, tableRight)))) {
382
- clearInterval(intervalId);
383
- this.targetElements["normal-next-scroll-button"].setAttribute("data-clicked", "false");
384
- // Remove the "See more" text if the mouse is not hovering over the button after scrolling
385
- if (!this.targetElements["normal-next-scroll-button"].matches(':hover') && !this.targetElements["sticky-next-scroll-button"].matches(':hover')) {
386
- document.body.style.cursor = 'auto';
387
- this.targetElements["normal-next-scroll-button-text"].style.display = "none";
388
- this.targetElements["sticky-next-scroll-button-text"].style.display = "none";
389
- }
390
- }
391
- this.targetElements["table-container"].scrollLeft += scrollAdded;
392
- }, this.scrollTimeInterval);
393
- }
394
- handleScrollBackwardHover() {
395
- document.body.style.cursor = 'pointer';
396
- if (this.targetElements["normal-previous-scroll-button"].getAttribute("data-clicked") !== "true") {
397
- this.targetElements["normal-previous-scroll-button-text"].style.display = "block";
398
- this.targetElements["sticky-previous-scroll-button-text"].style.display = "block";
399
- }
400
- }
401
- handleScrollBackwardHoverOut() {
402
- document.body.style.cursor = 'auto';
403
- if (this.targetElements["normal-previous-scroll-button"].getAttribute("data-clicked") !== "true") {
404
- this.targetElements["normal-previous-scroll-button-text"].style.display = "none";
405
- this.targetElements["sticky-previous-scroll-button-text"].style.display = "none";
406
- }
407
- }
408
- handleScrollBackward() {
409
- this.targetElements = this.getTargetElements();
410
- // Display the "See more" text when clicked
411
- document.body.style.cursor = 'pointer';
412
- this.targetElements["normal-previous-scroll-button"].setAttribute("data-clicked", "true");
413
- this.targetElements["normal-previous-scroll-button-text"].style.display = "block";
414
- this.targetElements["sticky-previous-scroll-button-text"].style.display = "block";
415
- let scrollReduced = 0;
416
- let intervalId = setInterval(() => {
417
- scrollReduced += this.scrollAmount;
418
- let tableContainerLeft = this.targetElements["table-container"].getBoundingClientRect().left;
419
- let tableLeft = this.targetElements["table"].getBoundingClientRect().left;
420
- if ((scrollReduced == this.scrollLimit) || [-1, 0].includes(this.verticalEdgePixelComparator(tableContainerLeft, tableLeft))) {
421
- clearInterval(intervalId);
422
- this.targetElements["normal-previous-scroll-button"].setAttribute("data-clicked", "false");
423
- // Remove the "See more" text if the mouse is not hovering over the button after scrolling
424
- if (!this.targetElements["normal-previous-scroll-button"].matches(':hover') && !this.targetElements["sticky-previous-scroll-button"].matches(':hover')) {
425
- document.body.style.cursor = 'auto';
426
- this.targetElements["normal-previous-scroll-button-text"].style.display = "none";
427
- this.targetElements["sticky-previous-scroll-button-text"].style.display = "none";
428
- }
429
- return;
430
- }
431
- this.targetElements["table-container"].scrollLeft -= scrollReduced;
432
- }, this.scrollTimeInterval);
433
- }
434
- componentWillLoad() {
435
- let desktopHeaderFirstCellSlot = this.el.querySelector('[slot="desktop-header-first-cell"]');
436
- let desktopHeaderFirstCellText = desktopHeaderFirstCellSlot.innerHTML;
437
- this.el.insertAdjacentHTML('afterbegin', `<span slot="normal-desktop-header-first-cell">${desktopHeaderFirstCellText}</span><span slot="sticky-desktop-header-first-cell">${desktopHeaderFirstCellText}</span>`);
438
- desktopHeaderFirstCellSlot.remove();
439
- let columnHeaders = this.el.querySelectorAll('[slot^="column-header"]');
440
- for (let i = 0; i < this.dataCols; i++) {
441
- let slotValue = columnHeaders[i].getAttribute('slot');
442
- let headerText = columnHeaders[i].innerHTML;
443
- this.el.insertAdjacentHTML('afterbegin', `<span slot="normal-${slotValue}">${headerText}</span><span slot="sticky-${slotValue}">${headerText}</span>`);
444
- columnHeaders[i].remove();
445
- }
446
- let headerLinks = this.el.querySelectorAll('[slot^="header-link"]');
447
- if (headerLinks.length > 0) {
448
- for (let i = 0; i < this.dataCols; i++) {
449
- let linkHref = headerLinks[i].getAttribute('href');
450
- let linkText = headerLinks[i].innerHTML;
451
- this.columnHeaderLinks.push({ linkHref, linkText });
452
- headerLinks[i].remove();
453
- }
454
- }
455
- let ctaButtons = this.el.querySelectorAll('[slot^="cta-button"]');
456
- this.showCtaButtonsRow = (ctaButtons.length !== 0);
457
- for (let i = 0; i < this.dataCols; i++) {
458
- this.ctaButtons.push({
459
- linkHref: ctaButtons[i].getAttribute('href'),
460
- linkText: ctaButtons[i].innerHTML
461
- });
462
- ctaButtons[i].remove();
463
- }
464
- let disclaimers = this.el.querySelectorAll('[slot^="disclaimer"]');
465
- for (let i = 0; i < this.disclaimerCount; i++) {
466
- this.disclaimers.push(disclaimers[i].innerHTML);
467
- disclaimers[i].remove();
468
- }
469
- }
470
- componentDidLoad() {
471
- this.configureTableFillerCells();
472
- this.configureStickyHeader();
473
- this.configureScrollButtonsContainers();
474
- window.addEventListener('scroll', this.handleVerticalScroll);
475
- window.addEventListener('resize', this.handleResize);
476
- }
477
- disconnectedCallback() {
478
- window.removeEventListener('scroll', this.handleVerticalScroll);
479
- window.removeEventListener('resize', this.handleResize);
480
- }
481
- render() {
482
- const getTableTitle = () => {
483
- return (this.tableTitle && index.h(index.Fragment, null, index.h("div", { class: "table-descriptor" }, index.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)
484
- ? index.h(index.Fragment, null, index.h("ptc-spacer", { breakpoint: "small", size: "x-small" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "small" }))
485
- : (this.tableDescription)
486
- ? index.h(index.Fragment, null, index.h("ptc-spacer", { breakpoint: "small", size: "small" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "medium" }))
487
- : null));
488
- };
489
- const getTableSubTitle = () => {
490
- return (this.tableSubTitle && index.h(index.Fragment, null, index.h("div", { class: "table-descriptor" }, index.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)), index.h("ptc-spacer", { breakpoint: "small", size: "medium" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "large" })));
491
- };
492
- const getTableDescription = () => {
493
- return (this.tableDescription && index.h(index.Fragment, null, index.h("div", { class: "table-descriptor" }, index.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 : index.h("ptc-readmore", { "more-text": "See more" }, this.tableDescription)))));
494
- };
495
- const getScrollButtonsContainer = () => {
496
- return index.h("div", { class: "scroll-buttons-container" }, index.h("div", { class: "scroll-buttons prev-button", "data-clicked": "false", onClick: () => this.handleScrollBackward(), onMouseOver: () => this.handleScrollBackwardHover(), onMouseOut: () => this.handleScrollBackwardHoverOut() }, index.h("icon-asset", { type: "solid", size: "medium", name: "chevron-left", color: "primary-gray" }), index.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")), index.h("div", { class: "scroll-buttons next-button", "data-clicked": "false", onClick: () => this.handleScrollForward(), onMouseOver: () => this.handleScrollForwardHover(), onMouseOut: () => this.handleScrollForwardHoverOut() }, index.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"), index.h("icon-asset", { type: "solid", size: "medium", name: "chevron-right", color: "primary-gray" })));
497
- };
498
- const getTableHeader = (headerType) => {
499
- return index.h("thead", null, index.h("tr", null, index.h("th", { class: "desktop-header-first-cell" }, index.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" }, index.h("slot", { name: `${headerType}-desktop-header-first-cell` }))), ([...Array(this.dataCols).keys()]).map(col => {
500
- return index.h("th", null, index.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" }, index.h("slot", { name: `${headerType}-column-header-${col + 1}` })), (this.columnHeaderLinks.length === this.dataCols) ? index.h(index.Fragment, null, index.h("ptc-spacer", { breakpoint: 'small', size: "small" }), index.h("ptc-spacer", { breakpoint: 'x-small', size: "medium" }), index.h("ptc-link", { "font-size": "medium", "font-weight": "w-extrabold", href: `${this.columnHeaderLinks[col].linkHref}`, "link-area": "undefined", target: "_blank", theme: "d-green-underline" }, index.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);
501
- }), index.h("th", { class: "table-filler-header-cell" })));
502
- };
503
- const getMobileTableBody = () => {
504
- return index.h("tbody", { class: "mobile-table-body" }, ([...Array(this.dataRows).keys()]).map(row => {
505
- return index.h(index.Fragment, null, index.h("tr", null, index.h("td", { colSpan: this.mobileHeaderRowColSpan }, index.h("div", { class: "mobile-table-row-header" }, index.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" }, index.h("slot", { name: `row-header-${row + 1}` }))))), index.h("tr", null, ([...Array(this.dataCols).keys()]).map(col => {
506
- return index.h("td", null, index.h("slot", { name: `cell-r${row + 1}-c${col + 1}` }));
507
- }), index.h("td", { class: "table-filler-body-cell" })));
508
- }), (this.showCtaButtonsRow) ?
509
- index.h("tr", { class: "table-button-row" }, ([...Array(this.dataCols).keys()]).map(col => {
510
- return index.h("td", null, index.h("ptc-button", { type: "link", color: "ptc-tertiary", "link-href": this.ctaButtons[col].linkHref, target: "_blank" }, this.ctaButtons[col].linkText));
511
- }), (this.mobileHeaderRowColSpan > this.dataCols) ? index.h("td", { class: "table-filler-button-cell" }) : null) : null);
512
- };
513
- const getDesktopTableBody = () => {
514
- return index.h("tbody", { class: "desktop-table-body" }, ([...Array(this.dataRows).keys()]).map(row => {
515
- return index.h("tr", null, index.h("td", { class: "first-column-cell" }, index.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" }, index.h("slot", { name: `row-header-${row + 1}` }))), ([...Array(this.dataCols).keys()]).map(col => {
516
- return index.h("td", null, index.h("slot", { name: `cell-r${row + 1}-c${col + 1}` }));
517
- }), index.h("td", { class: "table-filler-body-cell" }));
518
- }), (this.showCtaButtonsRow) ?
519
- index.h("tr", { class: "table-button-row" }, index.h("td", null), ([...Array(this.dataCols).keys()]).map(col => {
520
- return index.h("td", null, index.h("ptc-button", { type: "link", color: "ptc-tertiary", "link-href": this.ctaButtons[col].linkHref, target: "_blank" }, index.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" })));
521
- }), index.h("td", { class: "table-filler-button-cell" })) : null);
522
- };
523
- const getDisclaimers = () => {
524
- return ((this.disclaimerCount > 0) && index.h(index.Fragment, null, index.h("ptc-spacer", { breakpoint: "small", size: "medium" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "large" }), this.disclaimers.map((disclaimer, ind) => {
525
- return index.h(index.Fragment, null, index.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)) ? index.h("ptc-spacer", { size: "xx-small" }) : null);
526
- })));
527
- };
528
- return (index.h(index.Host, null, index.h("div", { id: "vertical-scroll-content-clipper" }), index.h("div", { id: "sticky-header-container", onScroll: () => this.handleStickyHeaderHorizontalScroll() }, getScrollButtonsContainer(), getTableHeader("sticky")), index.h("ptc-spacer", { breakpoint: "small", size: "xxx-large" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "xxxx-large" }), getTableTitle(), getTableSubTitle(), getTableDescription(), index.h("ptc-spacer", { breakpoint: "small", size: "xx-large" }), index.h("ptc-spacer", { breakpoint: "small", size: "xx-small" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "xxx-large" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "xx-small" }), index.h("div", { id: "table-container", onScroll: () => this.handleHorizontalScroll() }, getScrollButtonsContainer(), index.h("table", null, index.h("div", { id: "horizontal-scroll-box-shadow" }), getTableHeader("normal"), (window.innerWidth >= 992)
529
- ? getDesktopTableBody()
530
- : getMobileTableBody())), getDisclaimers(), index.h("ptc-spacer", { breakpoint: "small", size: "xxx-large" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "xxxx-large" })));
531
- }
532
- get el() { return index.getElement(this); }
533
- };
534
- PtcPricingTable.style = ptcPricingTableCss;
535
-
536
- exports.ptc_pricing_table = PtcPricingTable;