@ptcwebops/ptcw-design 6.3.44-beta → 6.3.46-beta
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/global-92142fb4.js +28 -0
- package/dist/cjs/loader.cjs.js +1 -0
- package/dist/cjs/ptc-filter-dropdown_4.cjs.entry.js +23 -5
- package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +1 -1
- package/dist/cjs/ptc-product-list.cjs.entry.js +4 -0
- package/dist/cjs/ptc-quote.cjs.entry.js +1 -1
- package/dist/cjs/ptc-theater-video-modal.cjs.entry.js +1 -1
- package/dist/cjs/ptcw-design.cjs.js +1 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ptc-filter-dropdown/ptc-filter-dropdown.js +22 -4
- package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.css +1 -0
- package/dist/collection/components/ptc-product-list/ptc-product-list.js +4 -0
- package/dist/collection/components/ptc-quote/ptc-quote.js +1 -1
- package/dist/collection/components/ptc-theater-video/ptc-theater-video.css +2 -0
- package/dist/collection/components/ptc-theater-video-modal/ptc-theater-video-modal.css +3 -0
- package/dist/collection/global/global.js +3 -0
- package/dist/collection/utils/fef-logger.js +23 -0
- package/dist/custom-elements/index.js +57 -8
- package/dist/esm/global-c58db4a9.js +26 -0
- package/dist/esm/loader.js +1 -0
- package/dist/esm/ptc-filter-dropdown_4.entry.js +23 -5
- package/dist/esm/ptc-filter-level-theater.entry.js +1 -1
- package/dist/esm/ptc-product-list.entry.js +4 -0
- package/dist/esm/ptc-quote.entry.js +1 -1
- package/dist/esm/ptc-theater-video-modal.entry.js +1 -1
- package/dist/esm/ptcw-design.js +1 -0
- package/dist/ptcw-design/p-1feb2812.entry.js +1 -0
- package/dist/ptcw-design/{p-f8b34e78.entry.js → p-410f98c6.entry.js} +1 -1
- package/dist/ptcw-design/p-66ecd7b9.entry.js +1 -0
- package/dist/ptcw-design/p-a36f147a.js +1 -0
- package/dist/ptcw-design/{p-ad673338.entry.js → p-d9ee43ba.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-filter-dropdown/ptc-filter-dropdown.d.ts +1 -1
- package/dist/types/components/ptc-mobile-select/mobile-select/dist/mobile-select.d.ts +209 -0
- package/dist/types/global/global.d.ts +4 -0
- package/dist/types/utils/eloqua.d.ts +9 -0
- package/dist/types/utils/fef-logger.d.ts +10 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/ptcw-design/p-3ee2a531.entry.js +0 -1
- package/dist/ptcw-design/p-ad1bd6fe.entry.js +0 -1
|
@@ -31,8 +31,16 @@ export class PtcFilterDropdown {
|
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
toggleDropdown() {
|
|
34
|
+
toggleDropdown(focusInput = false) {
|
|
35
35
|
this.isOpen = !this.isOpen;
|
|
36
|
+
if (focusInput) {
|
|
37
|
+
requestAnimationFrame(() => {
|
|
38
|
+
var _a;
|
|
39
|
+
const selected = this.hostElement.shadowRoot.querySelector('.filter-list input:checked');
|
|
40
|
+
const firstInput = this.hostElement.shadowRoot.querySelector('.filter-list input');
|
|
41
|
+
(_a = (selected || firstInput)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
42
|
+
});
|
|
43
|
+
}
|
|
36
44
|
}
|
|
37
45
|
clearFilter() {
|
|
38
46
|
this.selectedOptions = [];
|
|
@@ -48,6 +56,7 @@ export class PtcFilterDropdown {
|
|
|
48
56
|
this.emitSelectedOptions('clearButton');
|
|
49
57
|
}
|
|
50
58
|
emitSelectedOptions(clickedButton) {
|
|
59
|
+
var _a;
|
|
51
60
|
// debugger
|
|
52
61
|
this.selectedOptions = this.internalOptions
|
|
53
62
|
.filter((option) => {
|
|
@@ -67,7 +76,7 @@ export class PtcFilterDropdown {
|
|
|
67
76
|
this.toggleDropdown();
|
|
68
77
|
}
|
|
69
78
|
if (this.dropdownPlaceholder) {
|
|
70
|
-
this.dropdownPlaceholder.textContent = this.selectedOptions[0].value;
|
|
79
|
+
this.dropdownPlaceholder.textContent = (_a = this.selectedOptions[0]) === null || _a === void 0 ? void 0 : _a.value;
|
|
71
80
|
}
|
|
72
81
|
}
|
|
73
82
|
componentWillRender() {
|
|
@@ -75,11 +84,20 @@ export class PtcFilterDropdown {
|
|
|
75
84
|
}
|
|
76
85
|
handleKeyDown(e) {
|
|
77
86
|
if (e.key === 'Enter') {
|
|
78
|
-
this.toggleDropdown();
|
|
87
|
+
this.toggleDropdown(true); // Focus after Enter
|
|
88
|
+
}
|
|
89
|
+
else if (e.key === 'Tab' && this.isOpen) {
|
|
90
|
+
// Let browser do default tabbing, but also guide focus inside dropdown
|
|
91
|
+
requestAnimationFrame(() => {
|
|
92
|
+
var _a;
|
|
93
|
+
const selected = this.hostElement.shadowRoot.querySelector('.filter-list input:checked');
|
|
94
|
+
const firstInput = this.hostElement.shadowRoot.querySelector('.filter-list input');
|
|
95
|
+
(_a = (selected || firstInput)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
96
|
+
});
|
|
79
97
|
}
|
|
80
98
|
}
|
|
81
99
|
render() {
|
|
82
|
-
return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: "dropdown" }, h("div", { class: "dropdown-toggle mf-listen", onClick: () => this.toggleDropdown(), tabIndex: 0, onKeyDown: (e) => { this.handleKeyDown(e); } }, h("span", { class: "dropdown-placeholder" }, h("strong", null, "Filter: "), h("span", { class: "dropdown-filter-name" }, this.placeholder)), h("span", { class: "caret" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "7", viewBox: "0 0 12 7", fill: "none" }, h("path", { d: "M10.2426 1.24264L6 5.48528L1.75736 1.24264", stroke: "#20262A", "stroke-width": "2", "stroke-linecap": "round" })))), this.isOpen && (h("div", { class: "dropdown-menu" }, h("ul", { class: "filter-list" }, this.internalOptions.map((option) => (h("li", { key: option.tabId }, h("label", { class: "radio-label", htmlFor: option.value.replace(/\s+/g, '') }, h("input", { type: "radio", id: option.value.replace(/\s+/g, ''), name: "theater-filter", value: option.value, checked: this.selectedOptions.some((item) => item.value === option.value), "tab-id": option.tabId, "tag-name": option.tagName }), option.value))))), h("div", { class: "filter-btns" }, h("span", { class: "clear-btn mf-listen", onClick: () => this.clearFilter(), tabIndex: 0, onKeyDown: (e) => {
|
|
100
|
+
return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: "dropdown" }, h("div", { class: "dropdown-toggle mf-listen", onClick: () => this.toggleDropdown(true), tabIndex: 0, onKeyDown: (e) => { this.handleKeyDown(e); } }, h("span", { class: "dropdown-placeholder" }, h("strong", null, "Filter: "), h("span", { class: "dropdown-filter-name" }, this.placeholder)), h("span", { class: "caret" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "7", viewBox: "0 0 12 7", fill: "none" }, h("path", { d: "M10.2426 1.24264L6 5.48528L1.75736 1.24264", stroke: "#20262A", "stroke-width": "2", "stroke-linecap": "round" })))), this.isOpen && (h("div", { class: "dropdown-menu" }, h("ul", { class: "filter-list" }, this.internalOptions.map((option) => (h("li", { key: option.tabId }, h("label", { class: "radio-label", htmlFor: option.value.replace(/\s+/g, '') }, h("input", { type: "radio", id: option.value.replace(/\s+/g, ''), name: "theater-filter", value: option.value, checked: this.selectedOptions.some((item) => item.value === option.value), "tab-id": option.tabId, "tag-name": option.tagName }), option.value))))), h("div", { class: "filter-btns" }, h("span", { class: "clear-btn mf-listen", onClick: () => this.clearFilter(), tabIndex: 0, onKeyDown: (e) => {
|
|
83
101
|
if (e.key === 'Enter')
|
|
84
102
|
this.clearFilter();
|
|
85
103
|
} }, "Clear"), h("ptc-button", { "tracker-id": "filter-apply-cta", type: "link", color: "ptc-secondary", onClick: () => this.emitSelectedOptions('applyButton'), styles: ' a span { font-size: 16px !important; } a{ padding: 10px 16px !important; }' }, "Apply"))))), h("div", { class: "hidden" }, h("slot", null))));
|
|
@@ -326,6 +326,7 @@ a:focus-visible {
|
|
|
326
326
|
}
|
|
327
327
|
:host .flt-wrapper .back-button:focus-visible {
|
|
328
328
|
border-radius: var(--ptc-border-radius-standard);
|
|
329
|
+
border: 2px solid white;
|
|
329
330
|
outline: 5px solid var(--keyboard-nav-outline);
|
|
330
331
|
}
|
|
331
332
|
:host .flt-wrapper .filter-section {
|
|
@@ -89,6 +89,10 @@ export class PtcProductList {
|
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
componentDidLoad() {
|
|
92
|
+
// ptcLogger.log('Component loaded!');
|
|
93
|
+
// ptcLogger.info('Component loaded!');
|
|
94
|
+
// ptcLogger.warn('Component loaded!');
|
|
95
|
+
// ptcLogger.error('Component loaded!');
|
|
92
96
|
this.addIds();
|
|
93
97
|
this.noresultSection = this.hostElement.shadowRoot.querySelector('.no-result-wrap');
|
|
94
98
|
this.productList = this.hostElement.shadowRoot.querySelector('.product-list');
|
|
@@ -15,7 +15,7 @@ export class PtcQuote {
|
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
17
|
const classMap = this.getCssClassMap();
|
|
18
|
-
return (h(Host, { class: classMap }, this.imgSrc ? (h("div", { class: "quote-media" }, this.imgSrc ? h("img", { src: this.imgSrc, alt: this.imgTitle ? this.imgTitle : 'quote Image' }) : null, this.imgTitle ? this.getImageTitle() : null)) : null, h("div", { class: "quote-content" }, this.quoteType == 'image-quote' ? h("div", { class: 'quotemarks', innerHTML: QuotationMark }) : null, h("blockquote", null, this.quoteType == 'value-led-quote' &&
|
|
18
|
+
return (h(Host, { class: classMap }, this.imgSrc ? (h("div", { class: "quote-media" }, this.imgSrc ? h("img", { src: this.imgSrc, alt: this.imgTitle ? this.imgTitle : 'quote Image' }) : null, this.imgTitle ? this.getImageTitle() : null)) : null, h("div", { class: "quote-content" }, this.quoteType == 'image-quote' ? h("div", { class: 'quotemarks', innerHTML: QuotationMark }) : null, h("blockquote", null, this.quoteType == 'value-led-quote' && this.quoteImage &&
|
|
19
19
|
h("ptc-picture", { alt: "quote", src: this.quoteImage }), h("p", null, h("slot", null)), h("span", { class: "quote-name" }, this.quoteName ? this.quoteName : null), this.ctaText && this.ctaUrl ? (h("ptc-button", { type: "link", color: "ptc-secondary", "link-href": this.ctaUrl }, this.ctaText)) : null))));
|
|
20
20
|
}
|
|
21
21
|
getCssClassMap() {
|
|
@@ -82,10 +82,12 @@ ptc-link, ptc-square-card,
|
|
|
82
82
|
position: relative;
|
|
83
83
|
border-radius: 12px;
|
|
84
84
|
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.24);
|
|
85
|
+
margin-top: 5px;
|
|
85
86
|
cursor: pointer;
|
|
86
87
|
}
|
|
87
88
|
:host .img-wrap:focus-visible {
|
|
88
89
|
border-radius: var(--ptc-border-radius-standard);
|
|
90
|
+
border: 2px solid white;
|
|
89
91
|
outline: 5px solid var(--keyboard-nav-outline);
|
|
90
92
|
}
|
|
91
93
|
:host .img-wrap img {
|
|
@@ -5714,6 +5714,7 @@ Credits to Dave Berning
|
|
|
5714
5714
|
}
|
|
5715
5715
|
.modal .modal-container .vm-close:focus-visible {
|
|
5716
5716
|
border-radius: var(--ptc-border-radius-standard);
|
|
5717
|
+
border: 2px solid white;
|
|
5717
5718
|
outline: 5px solid var(--keyboard-nav-outline);
|
|
5718
5719
|
}
|
|
5719
5720
|
@media only screen and (min-width: 1200px) {
|
|
@@ -5746,6 +5747,7 @@ Credits to Dave Berning
|
|
|
5746
5747
|
}
|
|
5747
5748
|
.modal .modal-container .v-nav button:focus-visible {
|
|
5748
5749
|
border-radius: var(--ptc-border-radius-standard);
|
|
5750
|
+
border: 2px solid white;
|
|
5749
5751
|
outline: 5px solid var(--keyboard-nav-outline);
|
|
5750
5752
|
}
|
|
5751
5753
|
.modal .modal-container .card-description-content p {
|
|
@@ -5800,6 +5802,7 @@ Credits to Dave Berning
|
|
|
5800
5802
|
}
|
|
5801
5803
|
.modal.modal-only-video .modal-wrapper .vm-close:focus-visible {
|
|
5802
5804
|
border-radius: var(--ptc-border-radius-standard);
|
|
5805
|
+
border: 2px solid white;
|
|
5803
5806
|
outline: 5px solid var(--keyboard-nav-outline);
|
|
5804
5807
|
}
|
|
5805
5808
|
.modal.modal-only-video .modal-wrapper .aspect-ratio-container {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class PTCLogger {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.prefix = '[PTC FEF LOG]';
|
|
4
|
+
}
|
|
5
|
+
format(level, message, ...args) {
|
|
6
|
+
const timestamp = new Date().toISOString();
|
|
7
|
+
return [`${this.prefix} [${level.toUpperCase()}] ${timestamp}:`, message, ...args];
|
|
8
|
+
}
|
|
9
|
+
log(message, ...args) {
|
|
10
|
+
console.log(...this.format('log', message, ...args));
|
|
11
|
+
}
|
|
12
|
+
info(message, ...args) {
|
|
13
|
+
console.info(...this.format('info', message, ...args));
|
|
14
|
+
}
|
|
15
|
+
warn(message, ...args) {
|
|
16
|
+
console.warn(...this.format('warn', message, ...args));
|
|
17
|
+
}
|
|
18
|
+
error(message, ...args) {
|
|
19
|
+
console.error(...this.format('error', message, ...args));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// Singleton
|
|
23
|
+
export const ptcLogger = new PTCLogger();
|