@ptcwebops/ptcw-design 2.9.2 → 2.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/embedded-form_9.cjs.entry.js +123 -32
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-filter-dropdown_4.cjs.entry.js +3 -3
- package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +2 -2
- package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +96 -51
- package/dist/cjs/ptc-square-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-theater-video-modal.cjs.entry.js +2 -2
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/components/ptc-data-lookup/ptc-data-lookup.css +10 -0
- package/dist/collection/components/ptc-data-lookup/ptc-data-lookup.js +58 -6
- package/dist/collection/components/ptc-filter-dropdown/ptc-filter-dropdown.css +6 -1
- package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.css +104 -0
- package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.js +1 -1
- package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js +96 -51
- package/dist/collection/components/ptc-select/ptc-select.js +19 -1
- package/dist/collection/components/ptc-square-card/ptc-square-card.css +3 -2
- package/dist/collection/components/ptc-theater-video/ptc-theater-video.css +7 -0
- package/dist/collection/components/ptc-theater-video-modal/ptc-theater-video-modal.css +7 -0
- package/dist/collection/components/ptc-theater-video-modal/ptc-theater-video-modal.js +1 -1
- package/dist/collection/components/ptc-theater-video-playlist/ptc-theater-video-playlist.css +1 -1
- package/dist/collection/utils/elq-lib.js +82 -26
- package/dist/custom-elements/index.js +229 -93
- package/dist/esm/embedded-form_9.entry.js +123 -32
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-filter-dropdown_4.entry.js +3 -3
- package/dist/esm/ptc-filter-level-theater.entry.js +2 -2
- package/dist/esm/ptc-pricing-packaging-table.entry.js +96 -51
- package/dist/esm/ptc-square-card.entry.js +1 -1
- package/dist/esm/ptc-theater-video-modal.entry.js +2 -2
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/p-220f86c0.entry.js +1 -0
- package/dist/ptcw-design/p-97f90896.entry.js +359 -0
- package/dist/ptcw-design/p-9d8f290c.entry.js +1 -0
- package/dist/ptcw-design/p-a70bc10e.entry.js +1 -0
- package/dist/ptcw-design/p-b2d01ad4.entry.js +1 -0
- package/dist/ptcw-design/p-e8bd06a4.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-data-lookup/ptc-data-lookup.d.ts +4 -0
- package/dist/types/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.d.ts +7 -0
- package/dist/types/components/ptc-select/ptc-select.d.ts +1 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/types/utils/elq-lib.d.ts +2 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/ptcw-design/p-4c1bc7f2.entry.js +0 -1
- package/dist/ptcw-design/p-5698fc6b.entry.js +0 -1
- package/dist/ptcw-design/p-58c140ab.entry.js +0 -1
- package/dist/ptcw-design/p-6faf3ced.entry.js +0 -359
- package/dist/ptcw-design/p-94b48312.entry.js +0 -1
- package/dist/ptcw-design/p-aee89482.entry.js +0 -1
package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js
CHANGED
|
@@ -174,6 +174,87 @@ export class PtcPricingPackagingTable {
|
|
|
174
174
|
this.handleScrollButtonsVisibility();
|
|
175
175
|
this.handleFillEmptySpace();
|
|
176
176
|
};
|
|
177
|
+
this.preProcessTableDescription = () => {
|
|
178
|
+
let tableDescription = this.el.querySelector('[slot="table-description"]');
|
|
179
|
+
if (tableDescription) {
|
|
180
|
+
this.tableDescription = tableDescription;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
this.preProcessdesktopHeaderFirstCell = () => {
|
|
184
|
+
let desktopHeaderFirstCellSlot = this.el.querySelector('[slot="desktop-header-first-cell"]');
|
|
185
|
+
let desktopHeaderFirstCellText = desktopHeaderFirstCellSlot.innerHTML;
|
|
186
|
+
this.el.insertAdjacentHTML('afterbegin', `<span slot="placeholder-desktop-header-first-cell">${desktopHeaderFirstCellText}</span>`);
|
|
187
|
+
};
|
|
188
|
+
this.preProcessColumnHeaders = () => {
|
|
189
|
+
let columnHeaders = this.el.querySelectorAll('[slot^="column-header"]');
|
|
190
|
+
for (let i = 0; i < this.dataCols; i++) {
|
|
191
|
+
let slotValue = columnHeaders[i].getAttribute('slot');
|
|
192
|
+
let headerText = columnHeaders[i].innerHTML;
|
|
193
|
+
this.el.insertAdjacentHTML('afterbegin', `<span slot="placeholder-${slotValue}">${headerText}</span>`);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
this.preProcessHeaderLinks = () => {
|
|
197
|
+
let headerLink;
|
|
198
|
+
for (let i = 0; i < this.dataCols; i++) {
|
|
199
|
+
headerLink = this.el.querySelector(`[slot^="header-link-${i + 1}"]`);
|
|
200
|
+
if (headerLink) {
|
|
201
|
+
let linkHref = headerLink.getAttribute('href');
|
|
202
|
+
let linkText = headerLink.innerHTML;
|
|
203
|
+
let linkTarget = headerLink.getAttribute('target');
|
|
204
|
+
this.columnHeaderLinks.push({ linkHref, linkText, linkTarget });
|
|
205
|
+
headerLink.remove();
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
this.columnHeaderLinks.push(null);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
this.preProcessRowHeaders = () => {
|
|
213
|
+
let rowHeader;
|
|
214
|
+
for (let i = 0; i < this.dataRows; i++) {
|
|
215
|
+
rowHeader = this.el.querySelector(`[slot^="row-header-${i + 1}"]`);
|
|
216
|
+
let tableRowHeaderP = rowHeader.querySelectorAll('.table-row-header-p');
|
|
217
|
+
for (let i = 0; i < tableRowHeaderP.length; i++) {
|
|
218
|
+
let ptcPara = document.createElement('ptc-para');
|
|
219
|
+
ptcPara.setAttribute("font-size", "small");
|
|
220
|
+
ptcPara.setAttribute("font-weight", "w-6");
|
|
221
|
+
ptcPara.setAttribute("para-align", "left");
|
|
222
|
+
ptcPara.setAttribute("para-color", "primary-grey");
|
|
223
|
+
ptcPara.setAttribute("para-line-h", "line-height-p");
|
|
224
|
+
ptcPara.setAttribute("para-margin", "margin-flush");
|
|
225
|
+
ptcPara.innerHTML = tableRowHeaderP[i].innerHTML;
|
|
226
|
+
tableRowHeaderP[i].replaceWith(ptcPara);
|
|
227
|
+
}
|
|
228
|
+
let slotValue = rowHeader.getAttribute('slot');
|
|
229
|
+
let headerContent = rowHeader.innerHTML;
|
|
230
|
+
this.el.insertAdjacentHTML('afterbegin', `<div slot="desktop-${slotValue}">${headerContent}</div><div slot="mobile-${slotValue}">${headerContent}</div>`);
|
|
231
|
+
rowHeader.remove();
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
this.preProcessCtaButtons = () => {
|
|
235
|
+
let ctaButton;
|
|
236
|
+
this.showCtaButtonsRow = false;
|
|
237
|
+
for (let i = 0; i < this.dataCols; i++) {
|
|
238
|
+
ctaButton = this.el.querySelector(`[slot^="cta-button-${i + 1}"]`);
|
|
239
|
+
if (ctaButton) {
|
|
240
|
+
let linkHref = ctaButton.getAttribute('href');
|
|
241
|
+
let linkText = ctaButton.innerHTML;
|
|
242
|
+
let linkTarget = ctaButton.getAttribute('target');
|
|
243
|
+
this.ctaButtons.push({ linkHref, linkText, linkTarget });
|
|
244
|
+
ctaButton.remove();
|
|
245
|
+
this.showCtaButtonsRow = true;
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.ctaButtons.push(null);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
this.preProcessDisclaimers = () => {
|
|
253
|
+
let disclaimers = this.el.querySelectorAll('[slot^="disclaimer"]');
|
|
254
|
+
for (let i = 0; i < this.disclaimerCount; i++) {
|
|
255
|
+
this.disclaimers.push(disclaimers[i].innerHTML);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
177
258
|
this.pageWithSubnav = false;
|
|
178
259
|
this.tableTitle = undefined;
|
|
179
260
|
this.tableSubTitle = "";
|
|
@@ -199,50 +280,13 @@ export class PtcPricingPackagingTable {
|
|
|
199
280
|
this.tableDescription = undefined;
|
|
200
281
|
}
|
|
201
282
|
componentWillLoad() {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
this.
|
|
209
|
-
let columnHeaders = this.el.querySelectorAll('[slot^="column-header"]');
|
|
210
|
-
for (let i = 0; i < this.dataCols; i++) {
|
|
211
|
-
let slotValue = columnHeaders[i].getAttribute('slot');
|
|
212
|
-
let headerText = columnHeaders[i].innerHTML;
|
|
213
|
-
this.el.insertAdjacentHTML('afterbegin', `<span slot="placeholder-${slotValue}">${headerText}</span>`);
|
|
214
|
-
}
|
|
215
|
-
let headerLinks = this.el.querySelectorAll('[slot^="header-link"]');
|
|
216
|
-
if (headerLinks.length > 0) {
|
|
217
|
-
for (let i = 0; i < this.dataCols; i++) {
|
|
218
|
-
let linkHref = headerLinks[i].getAttribute('href');
|
|
219
|
-
let linkText = headerLinks[i].innerHTML;
|
|
220
|
-
let linkTarget = headerLinks[i].getAttribute('target');
|
|
221
|
-
this.columnHeaderLinks.push({ linkHref, linkText, linkTarget });
|
|
222
|
-
headerLinks[i].remove();
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
let rowHeaders = this.el.querySelectorAll('[slot^="row-header"]');
|
|
226
|
-
for (let i = 0; i < this.dataRows; i++) {
|
|
227
|
-
let slotValue = rowHeaders[i].getAttribute('slot');
|
|
228
|
-
let headerText = rowHeaders[i].innerHTML;
|
|
229
|
-
this.el.insertAdjacentHTML('afterbegin', `<span slot="desktop-${slotValue}">${headerText}</span><span slot="mobile-${slotValue}">${headerText}</span>`);
|
|
230
|
-
rowHeaders[i].remove();
|
|
231
|
-
}
|
|
232
|
-
let ctaButtons = this.el.querySelectorAll('[slot^="cta-button"]');
|
|
233
|
-
this.showCtaButtonsRow = (ctaButtons.length !== 0);
|
|
234
|
-
for (let i = 0; i < this.dataCols; i++) {
|
|
235
|
-
this.ctaButtons.push({
|
|
236
|
-
linkHref: ctaButtons[i].getAttribute('href'),
|
|
237
|
-
linkText: ctaButtons[i].innerHTML,
|
|
238
|
-
linkTarget: ctaButtons[i].getAttribute('target')
|
|
239
|
-
});
|
|
240
|
-
ctaButtons[i].remove();
|
|
241
|
-
}
|
|
242
|
-
let disclaimers = this.el.querySelectorAll('[slot^="disclaimer"]');
|
|
243
|
-
for (let i = 0; i < this.disclaimerCount; i++) {
|
|
244
|
-
this.disclaimers.push(disclaimers[i].innerHTML);
|
|
245
|
-
}
|
|
283
|
+
this.preProcessTableDescription();
|
|
284
|
+
this.preProcessdesktopHeaderFirstCell();
|
|
285
|
+
this.preProcessColumnHeaders();
|
|
286
|
+
this.preProcessHeaderLinks();
|
|
287
|
+
this.preProcessRowHeaders();
|
|
288
|
+
this.preProcessCtaButtons();
|
|
289
|
+
this.preProcessDisclaimers();
|
|
246
290
|
}
|
|
247
291
|
componentDidLoad() {
|
|
248
292
|
this.handleTableReset();
|
|
@@ -269,7 +313,7 @@ export class PtcPricingPackagingTable {
|
|
|
269
313
|
return h("div", { id: "table-header", class: this.headerType, onScroll: () => this.handleHorizontalScroll() }, h("div", { class: `desktop-header-first-cell` }, (this.isDesktopView) ?
|
|
270
314
|
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: "desktop-header-first-cell" }))
|
|
271
315
|
: null, h("div", { class: "scroll-button", id: "previous-scroll-button" }, h("div", { onClick: () => this.handleBackwardScroll() }, 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" }, "More"))), h("div", { class: "scroll-button", id: "next-scroll-button" }, h("div", { onClick: () => this.handleForwardScroll() }, 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" }, "More"), h("icon-asset", { type: "solid", size: "medium", name: "chevron-right", color: "primary-gray" })))), ([...Array(this.dataCols).keys()]).map(col => {
|
|
272
|
-
return h("div", { class: `table-cell ${(col + 1) === this.dataCols ? "table-last-cell" : ""}` }, h("ptc-para", { "font-size": "medium", "font-weight": "w-7", "para-align": "center", "para-color": "white", "para-line-h": "line-height-densest", "para-margin": "margin-flush", "para-z-index": "z-1" }, h("slot", { name: `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: `${this.columnHeaderLinks[col].linkTarget}`, theme: "d-green-underline", styles: "a.ptc-link {line-height: var(--ptc-line-height-p);}" }, this.isDesktopView ?
|
|
316
|
+
return h("div", { class: `table-cell ${(col + 1) === this.dataCols ? "table-last-cell" : ""}` }, h("ptc-para", { "font-size": "medium", "font-weight": "w-7", "para-align": "center", "para-color": "white", "para-line-h": "line-height-densest", "para-margin": "margin-flush", "para-z-index": "z-1" }, h("slot", { name: `column-header-${col + 1}` })), ((this.columnHeaderLinks.length === this.dataCols) && (this.columnHeaderLinks[col])) ? 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: `${this.columnHeaderLinks[col].linkTarget}`, theme: "d-green-underline", styles: "a.ptc-link {line-height: var(--ptc-line-height-p);}" }, this.isDesktopView ?
|
|
273
317
|
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" })
|
|
274
318
|
: this.columnHeaderLinks[col].linkText)) : null);
|
|
275
319
|
}), h("div", { class: `table-filler-cell ${this.showFillerCells ? "show" : ""}` }));
|
|
@@ -278,15 +322,15 @@ export class PtcPricingPackagingTable {
|
|
|
278
322
|
return h("div", { id: "table-header-placeholder", class: this.headerType }, h("div", { class: `desktop-header-first-cell` }, (this.isDesktopView) ?
|
|
279
323
|
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: "placeholder-desktop-header-first-cell" }))
|
|
280
324
|
: null), ([...Array(this.dataCols).keys()]).map(col => {
|
|
281
|
-
return h("div", { class: `table-cell ${(col + 1) === this.dataCols ? "table-last-cell" : ""}` }, h("ptc-para", { "font-size": "medium", "font-weight": "w-7", "para-align": "center", "para-color": "white", "para-line-h": "line-height-densest", "para-margin": "margin-flush", "para-z-index": "z-1" }, h("slot", { name: `placeholder-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: `${this.columnHeaderLinks[col].linkTarget}`, theme: "d-green-underline", styles: "a.ptc-link {line-height: var(--ptc-line-height-p);}" }, this.isDesktopView ?
|
|
325
|
+
return h("div", { class: `table-cell ${(col + 1) === this.dataCols ? "table-last-cell" : ""}` }, h("ptc-para", { "font-size": "medium", "font-weight": "w-7", "para-align": "center", "para-color": "white", "para-line-h": "line-height-densest", "para-margin": "margin-flush", "para-z-index": "z-1" }, h("slot", { name: `placeholder-column-header-${col + 1}` })), ((this.columnHeaderLinks.length === this.dataCols) && (this.columnHeaderLinks[col])) ? 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: `${this.columnHeaderLinks[col].linkTarget}`, theme: "d-green-underline", styles: "a.ptc-link {line-height: var(--ptc-line-height-p);}" }, this.isDesktopView ?
|
|
282
326
|
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" })
|
|
283
327
|
: this.columnHeaderLinks[col].linkText)) : null);
|
|
284
328
|
}), h("div", { class: `table-filler-cell ${this.showFillerCells ? "show" : ""}` }));
|
|
285
329
|
};
|
|
286
330
|
const TableDataRows = () => {
|
|
287
331
|
return ([...Array(this.dataRows).keys()]).map(row => {
|
|
288
|
-
return h(Fragment, null, h("div", { class: "mobile-sticky-row-header" }, h("
|
|
289
|
-
h("div", { class: `desktop-sticky-row-header ${(this.isDesktopView && (row % 2 != 0)) ? "desktop-alternate-row" : ""}` }, h("
|
|
332
|
+
return h(Fragment, null, h("div", { class: "mobile-sticky-row-header" }, h("slot", { name: `mobile-row-header-${row + 1}` })), h("div", { class: `table-row ${(this.isDesktopView && (row % 2 != 0)) ? "desktop-alternate-row" : ""}` }, (this.isDesktopView) ?
|
|
333
|
+
h("div", { class: `desktop-sticky-row-header ${(this.isDesktopView && (row % 2 != 0)) ? "desktop-alternate-row" : ""}` }, h("slot", { name: `desktop-row-header-${row + 1}` })) : null, ([...Array(this.dataCols).keys()]).map(col => {
|
|
290
334
|
return h("div", { class: `table-cell ${(col + 1) === this.dataCols ? "table-last-cell" : ""}` }, h("slot", { name: `cell-r${row + 1}-c${col + 1}` }));
|
|
291
335
|
}), h("div", { class: `table-filler-cell ${this.showFillerCells ? "show" : ""}` })));
|
|
292
336
|
});
|
|
@@ -296,9 +340,10 @@ export class PtcPricingPackagingTable {
|
|
|
296
340
|
h("div", { class: "table-cta-row" }, (this.isDesktopView) ?
|
|
297
341
|
h("div", { class: "desktop-sticky-row-header" })
|
|
298
342
|
: null, ([...Array(this.dataCols).keys()]).map(col => {
|
|
299
|
-
return h("div", { class: `table-cell ${(col + 1) === this.dataCols ? "table-last-cell" : ""}` },
|
|
300
|
-
h("ptc-
|
|
301
|
-
|
|
343
|
+
return h("div", { class: `table-cell ${(col + 1) === this.dataCols ? "table-last-cell" : ""}` }, (this.ctaButtons[col]) ?
|
|
344
|
+
h("ptc-button", { type: "link", color: "ptc-tertiary", "link-href": this.ctaButtons[col].linkHref, target: `${this.ctaButtons[col].linkTarget}` }, this.isDesktopView ?
|
|
345
|
+
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" })
|
|
346
|
+
: this.ctaButtons[col].linkText) : null);
|
|
302
347
|
}), h("div", { class: `table-filler-cell ${this.showFillerCells ? "show" : ""}` })) : null;
|
|
303
348
|
};
|
|
304
349
|
const TableDisclaimers = () => {
|
|
@@ -3,6 +3,7 @@ import { MDCSelect } from '@material/select';
|
|
|
3
3
|
// import { MDCSelectHelperText } from '@material/select/helper-text';
|
|
4
4
|
export class PtcSelect {
|
|
5
5
|
constructor() {
|
|
6
|
+
this.fieldId = undefined;
|
|
6
7
|
this.label = undefined;
|
|
7
8
|
this.isRequired = true;
|
|
8
9
|
this.helpertext = 'Please select a value!';
|
|
@@ -28,7 +29,7 @@ export class PtcSelect {
|
|
|
28
29
|
return className;
|
|
29
30
|
}
|
|
30
31
|
render() {
|
|
31
|
-
return (h(Host, { class: "ptc-select" }, h("label", { class: "ptc-label-select" }, this.label), h("div", { class: this.getSelectClassName() }, h("div", Object.assign({ class: "mdc-select__anchor", "aria-labelledby": "outlined-select-label" }, (this.isRequired ? { ariaRequired: true } : null)), h("span", { class: "mdc-notched-outline" }, h("span", { class: "mdc-notched-outline__leading" }), h("span", { class: "mdc-notched-outline__trailing" })), h("span", { class: "mdc-select__selected-text-container" }, h("span", { id:
|
|
32
|
+
return (h(Host, { class: "ptc-select" }, h("label", { class: "ptc-label-select" }, this.label), h("div", { class: this.getSelectClassName() }, h("div", Object.assign({ class: "mdc-select__anchor", "aria-labelledby": "outlined-select-label" }, (this.isRequired ? { ariaRequired: true } : null)), h("span", { class: "mdc-notched-outline" }, h("span", { class: "mdc-notched-outline__leading" }), h("span", { class: "mdc-notched-outline__trailing" })), h("span", { class: "mdc-select__selected-text-container" }, h("span", { id: this.fieldId, class: "mdc-select__selected-text", "aria-controls": this.name, "aria-describedby": this.name, "data-eloqua-name": this.ptcDataEloquaName })), h("span", { class: "mdc-select__dropdown-icon" }, h("svg", { class: "", width: "20", height: "12", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1.375 1.875L5 5.5L8.625 1.875L9.9375 3.1875L5 8.125L0.0625 3.1875L1.375 1.875Z" })))), h("div", { class: "mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth" }, h("slot", null))), h("p", { id: this.name, class: "mdc-select-helper-text mdc-select-helper-text--validation-msg" }, h("svg", { class: "select-error-svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { "clip-path": "url(#clip0_12_1424)" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.3156 0L16 4.68444V11.3156L11.3156 16H4.68444L0 11.3156V4.68444L4.68444 0H11.3156ZM8 10.4C7.36 10.4 6.84444 10.9156 6.84444 11.5556C6.84444 12.1956 7.36 12.7111 8 12.7111C8.64 12.7111 9.15556 12.1956 9.15556 11.5556C9.15556 10.9156 8.64 10.4 8 10.4ZM8.88889 3.55556H7.11111V8.88889H8.88889V3.55556Z", fill: "#AF3231" })), h("defs", null, h("clipPath", { id: "clip0_12_1424" }, h("rect", { width: "16", height: "16", fill: "white" })))), this.helpertext)));
|
|
32
33
|
}
|
|
33
34
|
static get is() { return "ptc-select"; }
|
|
34
35
|
static get originalStyleUrls() {
|
|
@@ -43,6 +44,23 @@ export class PtcSelect {
|
|
|
43
44
|
}
|
|
44
45
|
static get properties() {
|
|
45
46
|
return {
|
|
47
|
+
"fieldId": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "string",
|
|
52
|
+
"resolved": "string",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": ""
|
|
60
|
+
},
|
|
61
|
+
"attribute": "field-id",
|
|
62
|
+
"reflect": false
|
|
63
|
+
},
|
|
46
64
|
"label": {
|
|
47
65
|
"type": "string",
|
|
48
66
|
"mutable": false,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:host .card-layout {
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
|
-
justify-content:
|
|
30
|
+
justify-content: flex-start;
|
|
31
31
|
align-items: center;
|
|
32
32
|
}
|
|
33
33
|
:host .icon {
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
white-space: nowrap;
|
|
47
47
|
max-width: 160px;
|
|
48
48
|
}
|
|
49
|
-
:host slot[name=before-icon],
|
|
49
|
+
:host slot[name=before-icon],
|
|
50
|
+
:host slot[name=after-icon] {
|
|
50
51
|
text-align: center;
|
|
51
52
|
line-height: var(--ptc-line-height-densest);
|
|
52
53
|
font-size: var(--ptc-font-size-x-small);
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
@media only screen and (min-width: 768px) {
|
|
14
14
|
:host {
|
|
15
15
|
min-width: auto;
|
|
16
|
+
min-width: 205px;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
@media only screen and (min-width: 1200px) {
|
|
19
20
|
:host {
|
|
20
21
|
max-width: 260px;
|
|
22
|
+
min-width: 260px;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
:host .img-wrap {
|
|
@@ -62,6 +64,11 @@
|
|
|
62
64
|
font-size: 16px;
|
|
63
65
|
font-weight: 700;
|
|
64
66
|
color: var(--color-white);
|
|
67
|
+
word-break: break-word;
|
|
68
|
+
-webkit-hyphens: auto;
|
|
69
|
+
-moz-hyphens: auto;
|
|
70
|
+
-ms-hyphens: auto;
|
|
71
|
+
hyphens: auto;
|
|
65
72
|
}
|
|
66
73
|
:host .hidden {
|
|
67
74
|
display: none;
|
|
@@ -5617,6 +5617,13 @@ Credits to Dave Berning
|
|
|
5617
5617
|
overflow-x: hidden;
|
|
5618
5618
|
color: var(--color-white);
|
|
5619
5619
|
}
|
|
5620
|
+
.modal .modal-container p, .modal .modal-container ul, .modal .modal-container li, .modal .modal-container ptc-title .sc-ptc-title, .modal .modal-container span {
|
|
5621
|
+
word-break: break-word;
|
|
5622
|
+
-webkit-hyphens: auto;
|
|
5623
|
+
-moz-hyphens: auto;
|
|
5624
|
+
-ms-hyphens: auto;
|
|
5625
|
+
hyphens: auto;
|
|
5626
|
+
}
|
|
5620
5627
|
@media only screen and (min-width: 992px) {
|
|
5621
5628
|
.modal .modal-container {
|
|
5622
5629
|
width: 100%;
|
|
@@ -75,7 +75,7 @@ export class PtcTheaterVideoModal {
|
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
77
|
return (h(Host, null, h("slot", null), this.showModal &&
|
|
78
|
-
(this.modalType != 'only-video' ? (h("div", { class: "modal" }, h("div", { class: "modal-container ptc-container" }, h("div", { onClick: () => this.closeCardModal(), class: 'vm-close' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, h("g", { "clip-path": "url(#clip0_214_927)" }, h("path", { d: "M18 2.8125L15.1875 0L9 6.1875L2.8125 0L0 2.8125L6.1875 9L0 15.1875L2.8125 18L9 11.8125L15.1875 18L18 15.1875L11.8125 9L18 2.8125Z", fill: "white" })), h("defs", null, h("clipPath", { id: "clip0_214_927" }, h("rect", { width: "18", height: "18", fill: "white" }))))), h("div", { class: "is-grid has-col-gap-xl has-row-gap-lg" }, h("div", { class: 'is-col is-col-7-lg' }, h("div", { class: "v-modal-left" }, h("div", { class: 'v-nav' }, h("button", { onClick: () => this.showPrevCard(), disabled: this.currentCardIndex === 0 }, "Previous Video"), h("div", { class: 'v-number' }, ' ', this.currentCardIndex + 1, " of ", this.cards.length), h("button", { onClick: () => this.showNextCard(), disabled: this.currentCardIndex === this.cards.length - 1 }, "Next Video")), h("div", { class: 'aspect-ratio-container ' }, h("div", { class: 'video-container' }, h("video-js", { id: "bcPlayer", "data-account": "1532789042001", "data-player": "HknUe20R", "data-embed": "default", "data-video-id": this.cards[this.currentCardIndex].videoId, controls: "", "data-application-id": "", class: `dpm-vj-${this.currentCardIndex} video-js vjs-fills` }))), h("div", { class: "card-description-content" }, h("ptc-title", { type: "h3", "title-size": "large", "title-color": "white", upperline: "no-upperline", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-7", styles: ".is-standard{margin-top:14px !important}" }, this.cards[this.currentCardIndex].title), h("ptc-para", { "font-size": "medium", "font-weight": "w-4", "para-color": "white", "para-margin": "margin-3", "para-line-h": "line-height-p"
|
|
78
|
+
(this.modalType != 'only-video' ? (h("div", { class: "modal" }, h("div", { class: "modal-container ptc-container" }, h("div", { onClick: () => this.closeCardModal(), class: 'vm-close' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, h("g", { "clip-path": "url(#clip0_214_927)" }, h("path", { d: "M18 2.8125L15.1875 0L9 6.1875L2.8125 0L0 2.8125L6.1875 9L0 15.1875L2.8125 18L9 11.8125L15.1875 18L18 15.1875L11.8125 9L18 2.8125Z", fill: "white" })), h("defs", null, h("clipPath", { id: "clip0_214_927" }, h("rect", { width: "18", height: "18", fill: "white" }))))), h("div", { class: "is-grid has-col-gap-xl has-row-gap-lg" }, h("div", { class: 'is-col is-col-7-lg' }, h("div", { class: "v-modal-left" }, h("div", { class: 'v-nav' }, h("button", { onClick: () => this.showPrevCard(), disabled: this.currentCardIndex === 0 }, "Previous Video"), h("div", { class: 'v-number' }, ' ', this.currentCardIndex + 1, " of ", this.cards.length), h("button", { onClick: () => this.showNextCard(), disabled: this.currentCardIndex === this.cards.length - 1 }, "Next Video")), h("div", { class: 'aspect-ratio-container ' }, h("div", { class: 'video-container' }, h("video-js", { id: "bcPlayer", "data-account": "1532789042001", "data-player": "HknUe20R", "data-embed": "default", "data-video-id": this.cards[this.currentCardIndex].videoId, controls: "", "data-application-id": "", class: `dpm-vj-${this.currentCardIndex} video-js vjs-fills` }))), h("div", { class: "card-description-content" }, h("ptc-title", { type: "h3", "title-size": "large", "title-color": "white", upperline: "no-upperline", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-7", styles: ".is-standard{margin-top:14px !important}" }, this.cards[this.currentCardIndex].title), h("ptc-para", { "font-size": "medium", "font-weight": "w-4", "para-color": "white", "para-margin": "margin-3", "para-line-h": "line-height-p", innerHTML: this.cards[this.currentCardIndex].cardDescription })))), h("div", { class: 'is-col is-col-5-lg' }, h("div", { class: "video-modal-description" }, h("div", { innerHTML: this.cards[this.currentCardIndex].descriptionModal }))))))) : (h("div", { class: "modal modal-only-video" }, h("div", { class: "modal-wrapper" }, h("div", { onClick: () => this.closeCardModal(), class: 'vm-close' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, h("g", { "clip-path": "url(#clip0_214_927)" }, h("path", { d: "M18 2.8125L15.1875 0L9 6.1875L2.8125 0L0 2.8125L6.1875 9L0 15.1875L2.8125 18L9 11.8125L15.1875 18L18 15.1875L11.8125 9L18 2.8125Z", fill: "white" })), h("defs", null, h("clipPath", { id: "clip0_214_927" }, h("rect", { width: "18", height: "18", fill: "white" }))))), h("div", { class: 'aspect-ratio-container ' }, h("div", { class: 'video-container' }, h("video-js", { id: "bcPlayer", "data-account": "1532789042001", "data-player": "HknUe20R", "data-embed": "default", "data-video-id": this.cards[this.currentCardIndex].videoId, controls: "", "data-application-id": "", class: `dpm-vj-${this.currentCardIndex} video-js vjs-fills` })))))))));
|
|
79
79
|
}
|
|
80
80
|
static get is() { return "ptc-theater-video-modal"; }
|
|
81
81
|
static get encapsulation() { return "scoped"; }
|
|
@@ -22,7 +22,7 @@ export class ElqLib {
|
|
|
22
22
|
elq_field_visitor_email: 'V_Email_Address',
|
|
23
23
|
elq_field_visitor_firstname: 'V_First_Name',
|
|
24
24
|
elq_field_visitor_lastname: 'V_Last_Name',
|
|
25
|
-
notme_link_id:
|
|
25
|
+
notme_link_id: 'not-me-link-id',
|
|
26
26
|
notme_fields_class: null,
|
|
27
27
|
notme_message: 'Not {name}? Click here.',
|
|
28
28
|
notme_message_noname: 'Not your details below? Click here.',
|
|
@@ -212,13 +212,34 @@ export class ElqLib {
|
|
|
212
212
|
}
|
|
213
213
|
populate_mapped_fields() {
|
|
214
214
|
console.log('MAPPING: Starting field mapping');
|
|
215
|
+
//debugger;
|
|
215
216
|
this.field_mappings.forEach(({ elementId, elqFieldName }) => {
|
|
216
|
-
const element = document.getElementById(elementId);
|
|
217
217
|
const fieldValue = window.GetElqContentPersonalizationValue(elqFieldName);
|
|
218
|
-
if (
|
|
219
|
-
element
|
|
220
|
-
element
|
|
221
|
-
|
|
218
|
+
if (elementId !== 'contact-country') {
|
|
219
|
+
const element = document.getElementById(elementId);
|
|
220
|
+
console.log('element ID of field mappings: ' + element);
|
|
221
|
+
console.log('fieldValue ID of field mappings: ' + fieldValue);
|
|
222
|
+
if (element && fieldValue) {
|
|
223
|
+
element.value = fieldValue;
|
|
224
|
+
//element.style.display = 'none'; // Hide the field.
|
|
225
|
+
if (element.closest('ptc-textfield')) {
|
|
226
|
+
element.closest('ptc-textfield').style.display = 'none';
|
|
227
|
+
}
|
|
228
|
+
else if (element.closest('ptc-select')) {
|
|
229
|
+
element.closest('ptc-select').style.display = 'none';
|
|
230
|
+
}
|
|
231
|
+
this.fields_populated = true;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
const countryEle = document.getElementById(elementId);
|
|
236
|
+
if (countryEle && fieldValue) {
|
|
237
|
+
countryEle.textContent = fieldValue;
|
|
238
|
+
}
|
|
239
|
+
// debugger;
|
|
240
|
+
if (countryEle.closest('ptc-select')) {
|
|
241
|
+
countryEle.closest('ptc-select').style.display = 'none';
|
|
242
|
+
}
|
|
222
243
|
}
|
|
223
244
|
});
|
|
224
245
|
console.log('MAPPING: Finished ');
|
|
@@ -311,37 +332,72 @@ export class ElqLib {
|
|
|
311
332
|
// }
|
|
312
333
|
update_notme_link() {
|
|
313
334
|
// Assuming the user's first and last name are available from Eloqua fields
|
|
314
|
-
const firstName = window.GetElqContentPersonalizationValue(
|
|
315
|
-
const lastName = window.GetElqContentPersonalizationValue(
|
|
316
|
-
const notMeLinkElement = document.getElementById(
|
|
335
|
+
const firstName = window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_firstname);
|
|
336
|
+
const lastName = window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_lastname);
|
|
337
|
+
const notMeLinkElement = document.getElementById(this.params.notme_link_id);
|
|
338
|
+
const topAdditional = document.getElementById('not-me-additional-top');
|
|
339
|
+
const bottomAdditional = document.getElementById('not-me-additional-bottom');
|
|
317
340
|
if (notMeLinkElement) {
|
|
318
|
-
let message = this.params.
|
|
341
|
+
let message = this.params.notme_message;
|
|
342
|
+
console.log('first name: ' + firstName);
|
|
319
343
|
if (firstName && lastName) {
|
|
320
|
-
|
|
321
|
-
message = this.params.notme_message.replace('{name}', `${firstName} ${lastName}`);
|
|
344
|
+
message = this.params.notme_message.replace('{name}', lastName + ' ' + firstName);
|
|
322
345
|
}
|
|
323
|
-
notMeLinkElement.innerHTML = `<a href="#"
|
|
346
|
+
notMeLinkElement.innerHTML = `<a href="#">${message}</a>`;
|
|
347
|
+
topAdditional.innerHTML = "Please fill out additional information.";
|
|
348
|
+
bottomAdditional.innerHTML = "Click the button below to recieve email confirmation.";
|
|
324
349
|
notMeLinkElement.onclick = this.remove_user_details.bind(this);
|
|
325
350
|
}
|
|
326
351
|
}
|
|
327
|
-
remove_user_details() {
|
|
352
|
+
remove_user_details(e) {
|
|
353
|
+
e.preventDefault();
|
|
328
354
|
this.user_elq_email = '';
|
|
329
355
|
this.user_elq_firstname = '';
|
|
330
356
|
this.user_elq_lastname = '';
|
|
331
|
-
$('.' + this.params.notme_fields_class).val('');
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
357
|
+
// $('.' + this.params.notme_fields_class).val('');
|
|
358
|
+
const linkDiv = document.getElementById(this.params.notme_link_id);
|
|
359
|
+
const topAdditional = document.getElementById('not-me-additional-top');
|
|
360
|
+
const bottomAdditional = document.getElementById('not-me-additional-bottom');
|
|
361
|
+
linkDiv.querySelector('a').remove();
|
|
362
|
+
topAdditional.style.display = 'none';
|
|
363
|
+
bottomAdditional.style.display = 'none';
|
|
364
|
+
this.refreshForm();
|
|
338
365
|
return false;
|
|
339
366
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
367
|
+
refreshForm() {
|
|
368
|
+
this.field_mappings.forEach(({ elementId }) => {
|
|
369
|
+
if (elementId !== 'contact-country') {
|
|
370
|
+
const element = document.getElementById(elementId);
|
|
371
|
+
if (element) {
|
|
372
|
+
console.log('element: ' + element);
|
|
373
|
+
element.value = ''; // Reset the value
|
|
374
|
+
if (element.closest('ptc-textfield')) {
|
|
375
|
+
element.closest('ptc-textfield').style.display = '';
|
|
376
|
+
}
|
|
377
|
+
else if (element.closest('ptc-select')) {
|
|
378
|
+
element.closest('ptc-select').style.display = '';
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
const countryEle = document.getElementById(elementId);
|
|
384
|
+
if (countryEle) {
|
|
385
|
+
countryEle.textContent = '';
|
|
386
|
+
}
|
|
387
|
+
// debugger;
|
|
388
|
+
if (countryEle.closest('ptc-select')) {
|
|
389
|
+
countryEle.closest('ptc-select').style.display = '';
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
this.clearEloquaCookie('elq-uid'); // Optionally clear the Eloqua cookie
|
|
394
|
+
this.fields_populated = false;
|
|
395
|
+
//this.update_notme_link(); // Update the 'Not Me' link if necessary
|
|
396
|
+
}
|
|
397
|
+
clearEloquaCookie(name) {
|
|
398
|
+
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
|
|
399
|
+
console.log('cookie cleared');
|
|
400
|
+
}
|
|
345
401
|
// Private Method to load Eloqua Scripts
|
|
346
402
|
async_load() {
|
|
347
403
|
const scriptUrl = 'https://img.en25.com/i/elqCfg.min.js';
|