@ptcwebops/ptcw-design 4.2.0 → 4.2.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.
- package/dist/cjs/{component-4dd13907.js → component-06dda623.js} +1494 -3305
- package/dist/cjs/component-5b5b6a98.js +1819 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-back-to-top.cjs.entry.js +2 -1
- package/dist/cjs/ptc-data-lookup.cjs.entry.js +2 -1
- package/dist/cjs/{ptc-form-checkbox_3.cjs.entry.js → ptc-form-checkbox_2.cjs.entry.js} +1 -329
- package/dist/cjs/ptc-media-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-multi-select_2.cjs.entry.js +428 -0
- package/dist/cjs/ptc-product-sidebar.cjs.entry.js +8 -2
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/ptc-back-to-top/ptc-back-to-top.js +24 -1
- package/dist/collection/components/ptc-media-card/ptc-media-card.css +12 -6
- package/dist/collection/components/ptc-product-sidebar/ptc-product-sidebar.js +116 -2
- package/dist/custom-elements/index.d.ts +0 -6
- package/dist/custom-elements/index.js +14 -92
- package/dist/esm/{component-9c921cc6.js → component-274da230.js} +1482 -3281
- package/dist/esm/component-341e4eaa.js +1802 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-back-to-top.entry.js +2 -1
- package/dist/esm/ptc-data-lookup.entry.js +2 -1
- package/dist/esm/{ptc-form-checkbox_3.entry.js → ptc-form-checkbox_2.entry.js} +2 -329
- package/dist/esm/ptc-media-card.entry.js +1 -1
- package/dist/esm/ptc-multi-select_2.entry.js +423 -0
- package/dist/esm/ptc-product-sidebar.entry.js +8 -2
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/p-00dd636c.entry.js +1 -0
- package/dist/ptcw-design/p-1b458d58.entry.js +1 -0
- package/dist/ptcw-design/{p-d87e7a4d.entry.js → p-644fa438.entry.js} +1 -1
- package/dist/ptcw-design/p-8e266d2b.entry.js +68 -0
- package/dist/ptcw-design/p-ad7d81ba.entry.js +1 -0
- package/dist/ptcw-design/p-be533f0d.js +134 -0
- package/dist/ptcw-design/p-c1513c3f.js +203 -0
- package/dist/ptcw-design/p-c9c99539.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-back-to-top/ptc-back-to-top.d.ts +1 -0
- package/dist/types/components/ptc-product-sidebar/ptc-product-sidebar.d.ts +6 -0
- package/dist/types/components.d.ts +14 -13
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/generic-form.cjs.entry.js +0 -89
- package/dist/cjs/ptc-multi-select.cjs.entry.js +0 -98
- package/dist/collection/components/organism-bundles/form/generic-form/generic-form-test.css +0 -84
- package/dist/collection/components/organism-bundles/form/generic-form/generic-form-test.js +0 -94
- package/dist/esm/generic-form.entry.js +0 -85
- package/dist/esm/ptc-multi-select.entry.js +0 -94
- package/dist/ptcw-design/p-02945b6e.entry.js +0 -1
- package/dist/ptcw-design/p-07605149.entry.js +0 -1
- package/dist/ptcw-design/p-2cabc5f2.entry.js +0 -1
- package/dist/ptcw-design/p-3ff53151.entry.js +0 -1
- package/dist/ptcw-design/p-81885909.entry.js +0 -68
- package/dist/ptcw-design/p-bcab66bf.js +0 -336
- package/dist/ptcw-design/p-cfa95c83.entry.js +0 -1
- package/dist/types/components/organism-bundles/form/generic-form/generic-form-test.d.ts +0 -25
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5,
|
|
6
|
-
h6,
|
|
7
|
-
p,
|
|
8
|
-
ul,
|
|
9
|
-
li,
|
|
10
|
-
ptc-subnav,
|
|
11
|
-
ptc-tab-list,
|
|
12
|
-
ptc-link, ptc-square-card {
|
|
13
|
-
word-break: break-word;
|
|
14
|
-
hyphens: manual;
|
|
15
|
-
-webkit-hyphens: manual;
|
|
16
|
-
-moz-hyphens: manual;
|
|
17
|
-
-ms-hyphens: manual;
|
|
18
|
-
}
|
|
19
|
-
@supports (hyphenate-limit-chars: 12 3 3) {
|
|
20
|
-
h1,
|
|
21
|
-
h2,
|
|
22
|
-
h3,
|
|
23
|
-
h4,
|
|
24
|
-
h5,
|
|
25
|
-
h6,
|
|
26
|
-
p,
|
|
27
|
-
ul,
|
|
28
|
-
li,
|
|
29
|
-
ptc-subnav,
|
|
30
|
-
ptc-tab-list,
|
|
31
|
-
ptc-link, ptc-square-card {
|
|
32
|
-
hyphens: auto;
|
|
33
|
-
-webkit-hyphenate-limit-before: 3;
|
|
34
|
-
/* For Safari */
|
|
35
|
-
-webkit-hyphenate-limit-after: 3;
|
|
36
|
-
/* For Safari */
|
|
37
|
-
hyphenate-limit-chars: 12 3 3;
|
|
38
|
-
hyphenate-limit-lines: 2;
|
|
39
|
-
hyphenate-limit-last: always;
|
|
40
|
-
hyphenate-limit-zone: 6%;
|
|
41
|
-
-webkit-hyphens: auto;
|
|
42
|
-
-webkit-hyphenate-limit-before: 3;
|
|
43
|
-
-webkit-hyphenate-limit-after: 3;
|
|
44
|
-
-webkit-hyphenate-limit-chars: 12 3 3;
|
|
45
|
-
-webkit-hyphenate-limit-lines: 2;
|
|
46
|
-
-moz-hyphens: auto;
|
|
47
|
-
-moz-hyphenate-limit-chars: 12 3 3;
|
|
48
|
-
-moz-hyphenate-limit-lines: 2;
|
|
49
|
-
-ms-hyphens: auto;
|
|
50
|
-
-ms-hyphenate-limit-chars: 12 3 3;
|
|
51
|
-
-ms-hyphenate-limit-lines: 2;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:host {
|
|
56
|
-
display: block;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.form-wrapper {
|
|
60
|
-
width: 337px;
|
|
61
|
-
display: flex;
|
|
62
|
-
border-radius: 3px;
|
|
63
|
-
background: #FFF;
|
|
64
|
-
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.16);
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
align-items: center;
|
|
67
|
-
padding: 24px 0px;
|
|
68
|
-
}
|
|
69
|
-
.form-wrapper > form {
|
|
70
|
-
max-width: 277px;
|
|
71
|
-
}
|
|
72
|
-
.form-wrapper > ptc-button {
|
|
73
|
-
align-items: center;
|
|
74
|
-
}
|
|
75
|
-
.form-wrapper .ptc-label {
|
|
76
|
-
display: block;
|
|
77
|
-
font-size: var(--ptc-font-size-x-small);
|
|
78
|
-
font-weight: var(--ptc-font-weight-bold);
|
|
79
|
-
line-height: normal;
|
|
80
|
-
margin-bottom: var(--ptc-element-spacing-04);
|
|
81
|
-
position: relative;
|
|
82
|
-
z-index: 1;
|
|
83
|
-
color: var(--color-gray-13);
|
|
84
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { Host, h } from '@stencil/core';
|
|
2
|
-
export class GenericForm {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.formData = {
|
|
5
|
-
email: '',
|
|
6
|
-
firstName: '',
|
|
7
|
-
lastName: '',
|
|
8
|
-
company: '',
|
|
9
|
-
country: '',
|
|
10
|
-
phone: '',
|
|
11
|
-
inquiryReason: '',
|
|
12
|
-
howhearselfreport: '',
|
|
13
|
-
policyChecked: false,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
// private countryEle: HTMLPtcSelectElement;
|
|
17
|
-
// private inquiryreasonEle: HTMLPtcTextfieldElement;
|
|
18
|
-
// private howhearselfreport: HTMLPtcTextfieldElement;
|
|
19
|
-
componentDidLoad() {
|
|
20
|
-
this.formButton = this.el.querySelector('.form-submit');
|
|
21
|
-
this.formButton.addEventListener('click', this.handleSubmit.bind(this));
|
|
22
|
-
//get Email
|
|
23
|
-
this.emailEle = this.el.querySelector('ptc-textfield[field-id="contact-email"]');
|
|
24
|
-
this.firstNameEle = this.el.querySelector('ptc-textfield[field-id="contact-firstname"]');
|
|
25
|
-
this.lastNameEle = this.el.querySelector('ptc-textfield[field-id="contact-lastname"]');
|
|
26
|
-
this.companyEle = this.el.querySelector('ptc-textfield[field-id="company"]');
|
|
27
|
-
this.phoneEle = this.el.querySelector('ptc-textfield[field-id="contact-phone"]');
|
|
28
|
-
// this.countryEle = this.el.querySelector('ptc-select[field-id="contact-country"]')
|
|
29
|
-
// this.inquiryreasonEle = this.el.querySelector('ptc-textfield[field-id="contact-inquiry"]')
|
|
30
|
-
// this.howhearselfreport = this.el.querySelector('ptc-textfield[field-id="self-reporting"]')
|
|
31
|
-
}
|
|
32
|
-
handleInputChange(field, value) {
|
|
33
|
-
this.formData = Object.assign(Object.assign({}, this.formData), { [field]: value });
|
|
34
|
-
}
|
|
35
|
-
handleSubmit(event) {
|
|
36
|
-
event.preventDefault();
|
|
37
|
-
this.formData.email = this.emailEle.inputValue;
|
|
38
|
-
this.formData.firstName = this.firstNameEle.inputValue;
|
|
39
|
-
this.formData.lastName = this.lastNameEle.inputValue;
|
|
40
|
-
this.formData.company = this.companyEle.inputValue;
|
|
41
|
-
this.formData.phone = this.phoneEle.inputValue;
|
|
42
|
-
// this.formData.country = this.countryEle.inputValue;
|
|
43
|
-
// this.formData.inquiryReason= this.inquiryreasonEle.inputValue;
|
|
44
|
-
// this.formData.howhearselfreport = this.howhearselfreport.inputValue;
|
|
45
|
-
// console.log("get form Data: " + this.formData.email)
|
|
46
|
-
if (this.isValid()) {
|
|
47
|
-
const formSubmitEvent = new CustomEvent('formSubmit', {
|
|
48
|
-
detail: this.formData,
|
|
49
|
-
bubbles: true,
|
|
50
|
-
});
|
|
51
|
-
this.el.dispatchEvent(formSubmitEvent);
|
|
52
|
-
console.log('Form Submitted: ' + this.formData);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
console.log('Form validation failed');
|
|
56
|
-
console.log('Form Submitted: ' + this.formData.email, this.formData.firstName, this.formData.lastName, this.formData.company, this.formData.phone);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
isValid() {
|
|
60
|
-
const { email, firstName, lastName, company, country, phone, inquiryReason, howhearselfreport, policyChecked } = this.formData;
|
|
61
|
-
const invalidLength = document.querySelectorAll('.invalid-field').length;
|
|
62
|
-
// console.log('invalid fields length: ' + invalidLength), check the select field
|
|
63
|
-
return (email !== '' &&
|
|
64
|
-
phone !== '' &&
|
|
65
|
-
firstName !== '' &&
|
|
66
|
-
lastName !== '' &&
|
|
67
|
-
company !== '' &&
|
|
68
|
-
country !== '' &&
|
|
69
|
-
inquiryReason !== '' &&
|
|
70
|
-
howhearselfreport != '' &&
|
|
71
|
-
policyChecked &&
|
|
72
|
-
invalidLength === 0);
|
|
73
|
-
}
|
|
74
|
-
render() {
|
|
75
|
-
return (h(Host, null, h("div", { class: "ptc-container ptc-section-standard u-flex u-flex-justify-center" }, h("div", { class: "form-wrapper" }, h("max-width-container", { "max-width": "277", breakpoint: 480 }, h("ptc-title", { type: "h2", "text-align": "center", "title-size": "x-small", "title-color": "gray", upperline: "no-upperline", "title-display": "inline-block", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-6", "is-plm-hub": "false" }, "Please fill out the form and a PTC sales representative will be in touch."), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-spacer", { breakpoint: "small", size: "small" }), h("ptc-spacer", { breakpoint: "small", size: "small" })), h("form", { onSubmit: event => this.handleSubmit(event) }, h("ptc-textfield", { "field-id": "contact-firstname", "label-text": "First Name*", type: "text", "ptc-data-eloqua-name": "C_FirstName", "field-name": "firstname" }), h("ptc-textfield", { "field-id": "contact-lastname", "label-text": "Last Name*", type: "text", "ptc-data-eloqua-name": "C_LastName", "field-name": "lastname" }), h("ptc-textfield", { "field-id": "contact-email", "label-text": "Email*", type: "email", "alert-text": "Minimum Age Required", "alert-text-content": "If you are under the age of 14 years old, you must use your parent/guardian email address.", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "email" }), h("ptc-textfield", { "field-id": "confirm-email", "label-text": "Confirm your Email*", type: "email", "ptc-data-eloqua-name": "emailconfirmation", "field-name": "confirm-email", "custom-validation": "Email addresses must match." }), h("ptc-textfield", { "field-id": "contact-phone", "label-text": "Phone*", type: "tel", "ptc-data-eloqua-name": "C_BusPhone", "field-name": "phone" }), h("ptc-textfield", { "field-id": "contact-city", "label-text": "City*", type: "text", "ptc-data-eloqua-name": "C_City", "field-name": "contact-city" }), h("ptc-textfield", { "field-id": "contact-zipcode", "label-text": "Zip Code*", type: "text", "ptc-data-eloqua-name": "C_Zip_Postal", "field-name": "zipcode-field" }), h("ptc-select", { "field-id": "contact-country", label: "Country*", "ptc-data-eloqua-name": "C_Country", "field-name": "country" }, h("ul", { class: "mdc-list" }, h("li", { class: "mdc-list-item", "data-value": "" }, h("span", { class: "mdc-list-item__ripple" })), h("li", { class: "mdc-list-item", "data-value": "USA" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "USA")), h("li", { class: "mdc-list-item", "data-value": "Canada" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Canada")), h("li", { class: "mdc-list-item", "data-value": "China" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "China")))), h("ptc-textfield", { "field-id": "contact-city", "label-text": "Purpose of use*", type: "text", "ptc-data-eloqua-name": "C_City", "field-name": "contact-city" }), h("ptc-form-checkbox", { label: "I acknowledge that my personal details will be processed in accordance with PTC\u2019s privacy policy and that they may be shared with PTC Inc\u2019s subsidiaries for\r\n the promotion of PTC\u2019s products and associated services. ", "checkbox-id": "test" }), h("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; margin-top: 48px; display:block; float: right; width: fit-content;}" }, "Submit"))))));
|
|
76
|
-
}
|
|
77
|
-
static get is() { return "generic-form"; }
|
|
78
|
-
static get originalStyleUrls() {
|
|
79
|
-
return {
|
|
80
|
-
"$": ["generic-form-test.scss"]
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
static get styleUrls() {
|
|
84
|
-
return {
|
|
85
|
-
"$": ["generic-form-test.css"]
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
static get states() {
|
|
89
|
-
return {
|
|
90
|
-
"formData": {}
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
static get elementRef() { return "el"; }
|
|
94
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-c83db688.js';
|
|
2
|
-
|
|
3
|
-
const genericFormTestCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}.form-wrapper{width:337px;display:flex;border-radius:3px;background:#FFF;box-shadow:0px 2px 6px 0px rgba(0, 0, 0, 0.16);flex-direction:column;align-items:center;padding:24px 0px}.form-wrapper>form{max-width:277px}.form-wrapper>ptc-button{align-items:center}.form-wrapper .ptc-label{display:block;font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-bold);line-height:normal;margin-bottom:var(--ptc-element-spacing-04);position:relative;z-index:1;color:var(--color-gray-13)}";
|
|
4
|
-
|
|
5
|
-
const GenericForm = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.formData = {
|
|
9
|
-
email: '',
|
|
10
|
-
firstName: '',
|
|
11
|
-
lastName: '',
|
|
12
|
-
company: '',
|
|
13
|
-
country: '',
|
|
14
|
-
phone: '',
|
|
15
|
-
inquiryReason: '',
|
|
16
|
-
howhearselfreport: '',
|
|
17
|
-
policyChecked: false,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
// private countryEle: HTMLPtcSelectElement;
|
|
21
|
-
// private inquiryreasonEle: HTMLPtcTextfieldElement;
|
|
22
|
-
// private howhearselfreport: HTMLPtcTextfieldElement;
|
|
23
|
-
componentDidLoad() {
|
|
24
|
-
this.formButton = this.el.querySelector('.form-submit');
|
|
25
|
-
this.formButton.addEventListener('click', this.handleSubmit.bind(this));
|
|
26
|
-
//get Email
|
|
27
|
-
this.emailEle = this.el.querySelector('ptc-textfield[field-id="contact-email"]');
|
|
28
|
-
this.firstNameEle = this.el.querySelector('ptc-textfield[field-id="contact-firstname"]');
|
|
29
|
-
this.lastNameEle = this.el.querySelector('ptc-textfield[field-id="contact-lastname"]');
|
|
30
|
-
this.companyEle = this.el.querySelector('ptc-textfield[field-id="company"]');
|
|
31
|
-
this.phoneEle = this.el.querySelector('ptc-textfield[field-id="contact-phone"]');
|
|
32
|
-
// this.countryEle = this.el.querySelector('ptc-select[field-id="contact-country"]')
|
|
33
|
-
// this.inquiryreasonEle = this.el.querySelector('ptc-textfield[field-id="contact-inquiry"]')
|
|
34
|
-
// this.howhearselfreport = this.el.querySelector('ptc-textfield[field-id="self-reporting"]')
|
|
35
|
-
}
|
|
36
|
-
handleInputChange(field, value) {
|
|
37
|
-
this.formData = Object.assign(Object.assign({}, this.formData), { [field]: value });
|
|
38
|
-
}
|
|
39
|
-
handleSubmit(event) {
|
|
40
|
-
event.preventDefault();
|
|
41
|
-
this.formData.email = this.emailEle.inputValue;
|
|
42
|
-
this.formData.firstName = this.firstNameEle.inputValue;
|
|
43
|
-
this.formData.lastName = this.lastNameEle.inputValue;
|
|
44
|
-
this.formData.company = this.companyEle.inputValue;
|
|
45
|
-
this.formData.phone = this.phoneEle.inputValue;
|
|
46
|
-
// this.formData.country = this.countryEle.inputValue;
|
|
47
|
-
// this.formData.inquiryReason= this.inquiryreasonEle.inputValue;
|
|
48
|
-
// this.formData.howhearselfreport = this.howhearselfreport.inputValue;
|
|
49
|
-
// console.log("get form Data: " + this.formData.email)
|
|
50
|
-
if (this.isValid()) {
|
|
51
|
-
const formSubmitEvent = new CustomEvent('formSubmit', {
|
|
52
|
-
detail: this.formData,
|
|
53
|
-
bubbles: true,
|
|
54
|
-
});
|
|
55
|
-
this.el.dispatchEvent(formSubmitEvent);
|
|
56
|
-
console.log('Form Submitted: ' + this.formData);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
console.log('Form validation failed');
|
|
60
|
-
console.log('Form Submitted: ' + this.formData.email, this.formData.firstName, this.formData.lastName, this.formData.company, this.formData.phone);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
isValid() {
|
|
64
|
-
const { email, firstName, lastName, company, country, phone, inquiryReason, howhearselfreport, policyChecked } = this.formData;
|
|
65
|
-
const invalidLength = document.querySelectorAll('.invalid-field').length;
|
|
66
|
-
// console.log('invalid fields length: ' + invalidLength), check the select field
|
|
67
|
-
return (email !== '' &&
|
|
68
|
-
phone !== '' &&
|
|
69
|
-
firstName !== '' &&
|
|
70
|
-
lastName !== '' &&
|
|
71
|
-
company !== '' &&
|
|
72
|
-
country !== '' &&
|
|
73
|
-
inquiryReason !== '' &&
|
|
74
|
-
howhearselfreport != '' &&
|
|
75
|
-
policyChecked &&
|
|
76
|
-
invalidLength === 0);
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
return (h(Host, null, h("div", { class: "ptc-container ptc-section-standard u-flex u-flex-justify-center" }, h("div", { class: "form-wrapper" }, h("max-width-container", { "max-width": "277", breakpoint: 480 }, h("ptc-title", { type: "h2", "text-align": "center", "title-size": "x-small", "title-color": "gray", upperline: "no-upperline", "title-display": "inline-block", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-6", "is-plm-hub": "false" }, "Please fill out the form and a PTC sales representative will be in touch."), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-spacer", { breakpoint: "small", size: "small" }), h("ptc-spacer", { breakpoint: "small", size: "small" })), h("form", { onSubmit: event => this.handleSubmit(event) }, h("ptc-textfield", { "field-id": "contact-firstname", "label-text": "First Name*", type: "text", "ptc-data-eloqua-name": "C_FirstName", "field-name": "firstname" }), h("ptc-textfield", { "field-id": "contact-lastname", "label-text": "Last Name*", type: "text", "ptc-data-eloqua-name": "C_LastName", "field-name": "lastname" }), h("ptc-textfield", { "field-id": "contact-email", "label-text": "Email*", type: "email", "alert-text": "Minimum Age Required", "alert-text-content": "If you are under the age of 14 years old, you must use your parent/guardian email address.", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "email" }), h("ptc-textfield", { "field-id": "confirm-email", "label-text": "Confirm your Email*", type: "email", "ptc-data-eloqua-name": "emailconfirmation", "field-name": "confirm-email", "custom-validation": "Email addresses must match." }), h("ptc-textfield", { "field-id": "contact-phone", "label-text": "Phone*", type: "tel", "ptc-data-eloqua-name": "C_BusPhone", "field-name": "phone" }), h("ptc-textfield", { "field-id": "contact-city", "label-text": "City*", type: "text", "ptc-data-eloqua-name": "C_City", "field-name": "contact-city" }), h("ptc-textfield", { "field-id": "contact-zipcode", "label-text": "Zip Code*", type: "text", "ptc-data-eloqua-name": "C_Zip_Postal", "field-name": "zipcode-field" }), h("ptc-select", { "field-id": "contact-country", label: "Country*", "ptc-data-eloqua-name": "C_Country", "field-name": "country" }, h("ul", { class: "mdc-list" }, h("li", { class: "mdc-list-item", "data-value": "" }, h("span", { class: "mdc-list-item__ripple" })), h("li", { class: "mdc-list-item", "data-value": "USA" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "USA")), h("li", { class: "mdc-list-item", "data-value": "Canada" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Canada")), h("li", { class: "mdc-list-item", "data-value": "China" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "China")))), h("ptc-textfield", { "field-id": "contact-city", "label-text": "Purpose of use*", type: "text", "ptc-data-eloqua-name": "C_City", "field-name": "contact-city" }), h("ptc-form-checkbox", { label: "I acknowledge that my personal details will be processed in accordance with PTC\u2019s privacy policy and that they may be shared with PTC Inc\u2019s subsidiaries for\r\n the promotion of PTC\u2019s products and associated services. ", "checkbox-id": "test" }), h("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; margin-top: 48px; display:block; float: right; width: fit-content;}" }, "Submit"))))));
|
|
80
|
-
}
|
|
81
|
-
get el() { return getElement(this); }
|
|
82
|
-
};
|
|
83
|
-
GenericForm.style = genericFormTestCss;
|
|
84
|
-
|
|
85
|
-
export { GenericForm as generic_form };
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-c83db688.js';
|
|
2
|
-
import { V as ValidationMessages } from './validation-messages-ffe89594.js';
|
|
3
|
-
import { c as getLanguageFromURL } from './utils-2595f251.js';
|
|
4
|
-
|
|
5
|
-
const ptcMultiSelectCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}.ptc-multi-select{position:relative;display:block;margin-bottom:var(--ptc-element-spacing-04)}.ptc-multi-select.invalid::before{content:\"\";position:absolute;width:calc(100% + 16px);height:calc(100% + 8px);background:#FEF3F3;display:flex;flex-direction:column;justify-content:center;z-index:0;left:50%;top:50%;transform:translate(-50%, -50%)}.ptc-multi-select.invalid .mdc-select-helper-text--validation-msg{z-index:2;opacity:1;position:relative;color:#AF3231;font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-xx-small);font-style:normal;font-weight:var(--ptc-font-weight-semibold);line-height:var(--ptc-line-height-densest);opacity:1;height:auto;margin-left:8px;margin-top:var(--ptc-element-spacing-02)}.ptc-multi-select.invalid .mdc-select-helper-text--validation-msg svg{transform:translate(-8px, 3px)}.ptc-multi-select .multi-select-label{display:block;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold);line-height:normal;margin-bottom:var(--ptc-element-spacing-01);z-index:1;position:relative;color:#40434A}.ptc-multi-select .selected-items{cursor:pointer;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.38);padding:8px;border-radius:0px;position:relative;user-select:none;color:rgba(0, 0, 0, 0.87);font-weight:400;font-size:16px;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif))}.ptc-multi-select .multi-select-icon{fill:rgba(0, 0, 0, 0.54);position:absolute;right:var(--ptc-element-spacing-03)}.ptc-multi-select .dropdown{display:block;list-style:none;padding:0;margin:0;border:1px solid #ccc;max-height:200px;overflow-y:auto;position:absolute;width:100%;background-color:#fff;z-index:1000;}.ptc-multi-select .dropdown li{display:flex;align-items:center;padding:8px 10px;cursor:pointer}.ptc-multi-select .dropdown li:hover{background-color:var(--color-gray-02)}.ptc-multi-select .dropdown li.selected{background-color:var(--color-gray-02)}.ptc-multi-select .dropdown li.selected:hover{background-color:var(--color-gray-04)}.ptc-multi-select .dropdown li label{margin-left:8px;font-size:var(--ptc-font-size-xx-small);position:relative;padding-left:25px;cursor:pointer}.ptc-multi-select .dropdown li:last-child{border-bottom:none}.ptc-multi-select .dropdown input[type=checkbox]{position:absolute;opacity:0;cursor:pointer}.ptc-multi-select .dropdown input[type=checkbox]:checked{background-color:var(--color-green-07)}.ptc-multi-select .dropdown label::before{content:\"\";position:absolute;left:0;top:0;width:14px;height:14px;background-color:#fff;border:1px solid #ccc;box-sizing:border-box}.ptc-multi-select .dropdown input[type=checkbox]:checked+label::before{background-color:var(--color-green-07);border-color:var(--color-green-07)}.ptc-multi-select .dropdown input[type=checkbox]:checked+label::after{content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 1 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0z'/%3E%3C/svg%3E\");position:absolute;left:1px;top:1px;font-size:var(--ptc-font-size-xxx-small);color:white}.ptc-multi-select button.ddl-click-text{all:unset;cursor:pointer;color:var(--color-gray-7);padding-left:8px;text-decoration:underline;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold)}";
|
|
6
|
-
|
|
7
|
-
const PtcMultiSelect = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.handleBlur = () => {
|
|
11
|
-
this.updateValidity();
|
|
12
|
-
};
|
|
13
|
-
this.updateValidity = () => {
|
|
14
|
-
if (this.isRequired) {
|
|
15
|
-
this.isValid = this.selectedItemsCount > 0;
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
this.isValid = true;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
this.selectAllItems = (event) => {
|
|
22
|
-
event.preventDefault();
|
|
23
|
-
event.stopPropagation();
|
|
24
|
-
this.items = this.items.map(item => (Object.assign(Object.assign({}, item), { selected: true })));
|
|
25
|
-
// this.selectedItemsCount = this.items.filter(item => item.selected).length;
|
|
26
|
-
// this.updateValidity();
|
|
27
|
-
};
|
|
28
|
-
this.clearSelectedItems = (event) => {
|
|
29
|
-
event.preventDefault();
|
|
30
|
-
event.stopPropagation();
|
|
31
|
-
this.items = this.items.map(item => (Object.assign(Object.assign({}, item), { selected: false })));
|
|
32
|
-
// this.selectedItemsCount = this.items.filter(item => item.selected).length;
|
|
33
|
-
// this.updateValidity();
|
|
34
|
-
};
|
|
35
|
-
this.items = [
|
|
36
|
-
// Initialize with your items, setting 'selected' to false
|
|
37
|
-
{ text: 'Lorem Ipsum dolor sit amet', selected: false, ptcDataEloquaName: 'data-elqua-name', ptcDataTargetEloquaName: 'data-target-eloqua-name' },
|
|
38
|
-
];
|
|
39
|
-
this.label = 'label';
|
|
40
|
-
this.selectAllText = 'Select All';
|
|
41
|
-
this.clearAllText = 'Clear Selected Items';
|
|
42
|
-
this.isRequired = false;
|
|
43
|
-
this.helpertext = 'This field is required';
|
|
44
|
-
this.showDropdown = false;
|
|
45
|
-
this.language = 'en';
|
|
46
|
-
this.isValid = true;
|
|
47
|
-
this.selectedItemsCount = 0;
|
|
48
|
-
}
|
|
49
|
-
componentWillLoad() {
|
|
50
|
-
this.language = getLanguageFromURL();
|
|
51
|
-
// this.selectedItemsCount = this.items.filter(item => item.selected).length;
|
|
52
|
-
// this.updateValidity();
|
|
53
|
-
}
|
|
54
|
-
handleDocumentClick(event) {
|
|
55
|
-
const clickedInside = this.el.contains(event.target);
|
|
56
|
-
if (!clickedInside) {
|
|
57
|
-
this.showDropdown = false;
|
|
58
|
-
this.selectedItemsCount = this.items.filter(item => item.selected).length;
|
|
59
|
-
this.updateValidity();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
toggleDropdown() {
|
|
63
|
-
this.showDropdown = !this.showDropdown;
|
|
64
|
-
}
|
|
65
|
-
toggleItemSelection(index) {
|
|
66
|
-
this.items = [...this.items.slice(0, index), Object.assign(Object.assign({}, this.items[index]), { selected: !this.items[index].selected }), ...this.items.slice(index + 1)];
|
|
67
|
-
// this.selectedItemsCount = this.items.filter(item => item.selected).length;
|
|
68
|
-
// this.updateValidity();
|
|
69
|
-
}
|
|
70
|
-
getValidationMessage(type) {
|
|
71
|
-
return ValidationMessages[this.language][type];
|
|
72
|
-
}
|
|
73
|
-
setHelperText() {
|
|
74
|
-
this.helpertext = this.getValidationMessage('required');
|
|
75
|
-
}
|
|
76
|
-
render() {
|
|
77
|
-
const selectedItems = this.items.filter(item => item.selected);
|
|
78
|
-
const selectedItemsCount = selectedItems.length;
|
|
79
|
-
const buttonLabel = selectedItemsCount > 0 ? this.clearAllText : this.selectAllText;
|
|
80
|
-
const buttonAction = selectedItemsCount > 0 ? this.clearSelectedItems : this.selectAllItems;
|
|
81
|
-
let displayText = `${selectedItemsCount} selected`;
|
|
82
|
-
if (selectedItemsCount === 1) {
|
|
83
|
-
displayText = selectedItems[0].text;
|
|
84
|
-
}
|
|
85
|
-
return (h(Host, { class: { 'ptc-multi-select': true, 'invalid': !this.isValid } }, h("label", { class: "multi-select-label" }, this.label), h("div", { class: "selected-items", onClick: () => this.toggleDropdown() }, displayText, h("span", { class: "multi-select-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" })))), this.showDropdown && (h("ul", { class: "dropdown" }, h("li", null, h("button", { onClick: event => buttonAction(event), class: "ddl-click-text" }, buttonLabel)), this.items.map((item, index) => (h("li", { key: index, class: { selected: item.selected } }, h("input", { class: "multi-checkbox", type: "checkbox", id: `checkbox-${index}`, checked: item.selected, "data-eloqua-name": item.ptcDataEloquaName, "data-target-eloqua-name": item.ptcDataTargetEloquaName, required: this.isRequired, onClick: event => {
|
|
86
|
-
event.stopPropagation(); // Prevents the dropdown from closing
|
|
87
|
-
this.toggleItemSelection(index);
|
|
88
|
-
} }), h("label", { htmlFor: `checkbox-${index}` }, item.text)))))), h("div", { id: "tbd", 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)));
|
|
89
|
-
}
|
|
90
|
-
get el() { return getElement(this); }
|
|
91
|
-
};
|
|
92
|
-
PtcMultiSelect.style = ptcMultiSelectCss;
|
|
93
|
-
|
|
94
|
-
export { PtcMultiSelect as ptc_multi_select };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as s,g as a}from"./p-ac75c7ad.js";const r=class{constructor(i){t(this,i),this.selectedResult=e(this,"selectedResult",7),this.clearsearch=e(this,"clearsearch",7),this.inputChanged=e(this,"inputChanged",7),this.emptyResult=e(this,"emptyResult",7),this.searchTerm="",this.suggestions=[],this.suggestionList=[]}componentWillLoad(){this.getDomData()}componentDidLoad(){this.productListWrap=this.hostElement.shadowRoot.querySelector(".product-list-wrap"),this.clearBtn=this.hostElement.shadowRoot.querySelector(".clear-cta")}getDomData(){document.querySelectorAll("ptc-product-category").forEach((t=>{let e={categoryName:t.getAttribute("category-title"),products:[]};this.suggestionList.push(e),t.querySelectorAll("ptc-product-card").forEach((t=>{let i=t.getAttribute("card-title");e.products.push(i)}))}))}handleInputChange(t){this.searchTerm=t.target.value.toLocaleLowerCase(),this.clearBtn.classList.add("show"),this.getSuggestions(),this.inputChanged.emit({sender:this,event:t})}getSuggestions(){const t=this.searchTerm.toLowerCase(),e=this.suggestionList.reduce(((e,i)=>{i.categoryName.toLowerCase().includes(t)&&e.push(i.categoryName);const s=i.products.filter((e=>e.toLowerCase().includes(t)));return s.length>0&&e.push(...s),e}),[]);this.suggestions=e}handleSelectSuggestion(t,e){this.searchTerm=t,this.productListWrap.classList.add("hide"),this.selectedResult.emit({sender:this,event:e,searchTerm:this.searchTerm})}handleKeyUp(t){this.searchTerm=t.target.value.toLocaleLowerCase(),13===t.keyCode&&0==this.suggestions.length&&this.emptyResult.emit({sender:this,event:t})}clearSearch(t){let e=this.hostElement.shadowRoot.querySelector("input");this.productListWrap.classList.remove("hide"),this.clearBtn.classList.remove("show"),e&&(e.value=""),this.suggestions=[],this.clearsearch.emit({sender:this,event:t,searchTerm:e.value})}handleDropdownTouched(t){const{sender:e,isOpen:i}=t.detail;if(e&&i){let t=this.hostElement.shadowRoot.querySelector("input");t&&(t.value="")}}handleClick(){this.suggestions=[]}handleclearCtaClicked(t){const{sender:e,event:i}=t.detail;e&&this.clearSearch(i)}handleSelectedValues(t){const{sender:e,selectedOptions:i}=t.detail;e&&(i.length>0?(this.clearBtn.classList.add("show"),this.productListWrap.classList.add("hide")):(this.clearBtn.classList.remove("show"),this.productListWrap.classList.remove("hide")))}render(){return i(s,{class:"search-box"},i("div",{class:"filter-result-wrap white-box"},i("div",{class:"result-header"},i("ptc-title",{type:"h3","title-margin":"margin-flush",upperline:"no-upperline","title-size":"medium","title-height":"densest"},"Filter Results"),i("span",{class:"clear-cta",onClick:t=>this.clearSearch(t)},"Clear")),i("div",{class:"sort-wrap"},i("div",{class:"typeahead-input"},i("label",{htmlFor:"searchBox"},"Filter"),i("div",{class:"input-wrap"},i("svg",{width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M0.208984 0V1.2375L6.95898 7.65V14.2875L11.5715 17.8875V7.65L18.209 1.35V0H0.208984Z",fill:"#323B42"})),i("input",{type:"text",value:this.searchTerm,onInput:t=>this.handleInputChange(t),onKeyUp:t=>this.handleKeyUp(t),id:"searchBox"})),this.suggestions.length>0&&i("div",{class:"suggestion-wrap"},i("ul",{class:"suggestions"},this.suggestions.map((t=>i("li",{onClick:e=>this.handleSelectSuggestion(t,e)},t)))))),i("div",{class:"dropdwon-filter"},i("label",{htmlFor:"tech-dropdown"},"Technology"),i("ptc-product-dropdown",{placeholder:"Select a technology",id:"tech-dropdown"},this.suggestionList.map((t=>i("span",null,t.categoryName))))))),i("ptc-spacer",{size:"large"}),i("ptc-spacer",{size:"large"}),i("div",{class:"product-list-wrap white-box"},i("ptc-title",{type:"h3","title-margin":"margin-flush",upperline:"no-upperline","title-size":"medium","title-height":"densest"},"Jump to Product"),this.suggestionList.map((t=>i("div",{class:"category-list"},i("ptc-para",{"font-size":"x-small","font-weight":"w-7","para-line-h":"line-height-densest","para-margin":"margin-flush"},i("list-item",{"list-type":"list-underline","link-href":"#"+t.categoryName},i("ptc-tooltip",{"text-display":"inline","text-lines":"4","z-index":"z-2",description:t.categoryName,position:"bottom"}))),i("div",{class:"product-list"},i("ul",null,t.products.map((t=>i("list-item",{"list-type":"list-underline","link-href":"#"+t},t))))))))))}get hostElement(){return a(this)}};r.style="h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block;position:relative}:host .hide{display:none !important}:host .white-box{padding:12px;background-color:var(--color-white);border-radius:var(--ptc-border-radius-standard)}:host .sort-wrap{display:block}@media only screen and (min-width: 768px){:host .sort-wrap{display:flex;justify-content:space-between}}@media only screen and (min-width: 992px){:host .sort-wrap{display:block}}:host .filter-result-wrap label{font-size:var(--ptc-font-size-xx-small);font-weight:600}@media only screen and (min-width: 992px){:host .filter-result-wrap label{font-size:var(--ptc-font-size-x-small)}}:host .filter-result-wrap .result-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}@media only screen and (min-width: 992px){:host .filter-result-wrap .result-header{margin-bottom:26px}}:host .filter-result-wrap .result-header .clear-cta{cursor:pointer;display:none;color:var(--color-gray-07);font-size:var(--ptc-font-size-x-small);text-decoration:underline}:host .filter-result-wrap .result-header .clear-cta.show{display:block}:host .filter-result-wrap .typeahead-input{box-sizing:border-box;margin-bottom:14px;width:100%;margin-right:0}@media only screen and (min-width: 768px){:host .filter-result-wrap .typeahead-input{margin-right:40px}}@media only screen and (min-width: 992px){:host .filter-result-wrap .typeahead-input{margin-right:0}}:host .filter-result-wrap .typeahead-input .input-wrap{position:relative}:host .filter-result-wrap .typeahead-input .input-wrap svg{position:absolute;left:8px;top:8px}:host .filter-result-wrap .typeahead-input .input-wrap input{margin-top:4px;padding:8px 8px 8px 34px;display:block;width:100%;box-sizing:border-box;border:1px solid var(--color-gray-03);font-size:14px}:host .filter-result-wrap .typeahead-input .suggestion-wrap{position:relative;width:100%}:host .filter-result-wrap .typeahead-input .suggestion-wrap .suggestions{border:1px solid var(--color-gray-03);box-shadow:0px 2px 4px rgba(35, 43, 45, 0.3);background-color:var(--color-white);position:absolute;z-index:105;top:0;margin:0;width:100%;box-sizing:border-box;padding:0;max-height:400px;overflow-y:auto}:host .filter-result-wrap .typeahead-input .suggestion-wrap .suggestions::-webkit-scrollbar{width:5px}:host .filter-result-wrap .typeahead-input .suggestion-wrap .suggestions::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0, 0, 0, 0.3)}:host .filter-result-wrap .typeahead-input .suggestion-wrap .suggestions::-webkit-scrollbar-thumb{background-color:var(--color-gray-05);outline:1px solid var(--color-gray-05)}:host .filter-result-wrap .typeahead-input .suggestion-wrap .suggestions li{list-style:none;padding:10px 16px;cursor:pointer;display:block;font-size:14px}:host .filter-result-wrap .typeahead-input .suggestion-wrap .suggestions li:first-child{padding-top:20px}:host .filter-result-wrap .typeahead-input .suggestion-wrap .suggestions li:last-child{padding-bottom:20px}:host .filter-result-wrap .dropdwon-filter{margin-bottom:10px;width:100%}:host .product-list-wrap{display:none}@media only screen and (min-width: 992px){:host .product-list-wrap{display:block}}:host .product-list-wrap .category-list{display:block;padding:12px 4px;font-size:var(--ptc-font-size-x-small)}:host .product-list-wrap .category-list ptc-para{padding-bottom:4px;display:block}:host .product-list-wrap .category-list ul{padding-left:20px;margin:0}";export{r as ptc_product_sidebar}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as o,H as i,g as e}from"./p-ac75c7ad.js";const a=class{constructor(o){t(this,o),this.handleScroll=()=>{const t=window.pageYOffset||document.documentElement.scrollTop,o=document.querySelector(".ptc-container-relative");if(this.showButton=t>1*window.innerHeight,o){if(this.showButton&&t<=o.clientHeight-window.innerHeight){const t=this.el.shadowRoot.querySelector(".back-to-top-button");t&&(t.classList.contains("back-to-top-button-fixed")||t.classList.add("back-to-top-button-fixed"),t.classList.contains("back-to-top-button-absolute")&&t.classList.remove("back-to-top-button-absolute"))}else if(this.showButton&&t>o.clientHeight-window.innerHeight){const t=this.el.shadowRoot.querySelector(".back-to-top-button");t&&(t.classList.contains("back-to-top-button-fixed")&&t.classList.remove("back-to-top-button-fixed"),t.classList.contains("back-to-top-button-absolute")||t.classList.add("back-to-top-button-absolute"))}}else if(this.showButton){const t=this.el.shadowRoot.querySelector(".back-to-top-button");t&&(t.classList.contains("back-to-top-button-fixed")||t.classList.add("back-to-top-button-fixed"))}},this.showButton=!1}componentDidLoad(){window.addEventListener("scroll",this.handleScroll)}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll)}handleClick(){this.scrollToTop()}scrollToTop(){"scrollBehavior"in document.documentElement.style?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0)}render(){return o(i,null,this.showButton&&o("button",{class:"back-to-top-button",title:"Back to Top"},o("span",{class:"arrow"},o("svg",{width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M15.5248 11.625L8.9998 5.1L2.4748 11.625L0.112305 9.2625L8.9998 0.375L17.8873 9.2625L15.5248 11.625Z",fill:"#323B42"}))),o("span",{class:"text"},"Back to Top")))}get el(){return e(this)}};a.style="h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}:host .back-to-top-button{right:24px;width:64px;height:58px;border:1px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);background-color:var(--color-white);color:var(--color-gray-10);font-size:12px;font-weight:var(--ptc-font-weight-semibold);outline:none;cursor:pointer;transition:opacity 0.3s ease-in-out;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:var(--ptc-shadow-small)}:host .back-to-top-button:hover{opacity:1}:host .back-to-top-button-fixed{position:fixed;bottom:140px}:host .back-to-top-button-absolute{position:absolute;bottom:150px}:host .arrow{margin-bottom:5px}";export{a as ptc_back_to_top}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,g as l}from"./p-ac75c7ad.js";import{V as o}from"./p-af3bb40d.js";import{c as s}from"./p-515f6adb.js";const a=class{constructor(e){t(this,e),this.handleBlur=()=>{this.updateValidity()},this.updateValidity=()=>{this.isValid=!this.isRequired||this.selectedItemsCount>0},this.selectAllItems=t=>{t.preventDefault(),t.stopPropagation(),this.items=this.items.map((t=>Object.assign(Object.assign({},t),{selected:!0})))},this.clearSelectedItems=t=>{t.preventDefault(),t.stopPropagation(),this.items=this.items.map((t=>Object.assign(Object.assign({},t),{selected:!1})))},this.items=[{text:"Lorem Ipsum dolor sit amet",selected:!1,ptcDataEloquaName:"data-elqua-name",ptcDataTargetEloquaName:"data-target-eloqua-name"}],this.label="label",this.selectAllText="Select All",this.clearAllText="Clear Selected Items",this.isRequired=!1,this.helpertext="This field is required",this.showDropdown=!1,this.language="en",this.isValid=!0,this.selectedItemsCount=0}componentWillLoad(){this.language=s()}handleDocumentClick(t){this.el.contains(t.target)||(this.showDropdown=!1,this.selectedItemsCount=this.items.filter((t=>t.selected)).length,this.updateValidity())}toggleDropdown(){this.showDropdown=!this.showDropdown}toggleItemSelection(t){this.items=[...this.items.slice(0,t),Object.assign(Object.assign({},this.items[t]),{selected:!this.items[t].selected}),...this.items.slice(t+1)]}getValidationMessage(t){return o[this.language][t]}setHelperText(){this.helpertext=this.getValidationMessage("required")}render(){const t=this.items.filter((t=>t.selected)),l=t.length,o=l>0?this.clearAllText:this.selectAllText,s=l>0?this.clearSelectedItems:this.selectAllItems;let a=`${l} selected`;return 1===l&&(a=t[0].text),e(i,{class:{"ptc-multi-select":!0,invalid:!this.isValid}},e("label",{class:"multi-select-label"},this.label),e("div",{class:"selected-items",onClick:()=>this.toggleDropdown()},a,e("span",{class:"multi-select-icon"},e("svg",{class:"",width:"20",height:"12",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M1.375 1.875L5 5.5L8.625 1.875L9.9375 3.1875L5 8.125L0.0625 3.1875L1.375 1.875Z"})))),this.showDropdown&&e("ul",{class:"dropdown"},e("li",null,e("button",{onClick:t=>s(t),class:"ddl-click-text"},o)),this.items.map(((t,i)=>e("li",{key:i,class:{selected:t.selected}},e("input",{class:"multi-checkbox",type:"checkbox",id:`checkbox-${i}`,checked:t.selected,"data-eloqua-name":t.ptcDataEloquaName,"data-target-eloqua-name":t.ptcDataTargetEloquaName,required:this.isRequired,onClick:t=>{t.stopPropagation(),this.toggleItemSelection(i)}}),e("label",{htmlFor:`checkbox-${i}`},t.text))))),e("div",{id:"tbd",class:"mdc-select-helper-text mdc-select-helper-text--validation-msg"},e("svg",{class:"select-error-svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{"clip-path":"url(#clip0_12_1424)"},e("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"})),e("defs",null,e("clipPath",{id:"clip0_12_1424"},e("rect",{width:"16",height:"16",fill:"white"})))),this.helpertext))}get el(){return l(this)}};a.style="h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}.ptc-multi-select{position:relative;display:block;margin-bottom:var(--ptc-element-spacing-04)}.ptc-multi-select.invalid::before{content:\"\";position:absolute;width:calc(100% + 16px);height:calc(100% + 8px);background:#FEF3F3;display:flex;flex-direction:column;justify-content:center;z-index:0;left:50%;top:50%;transform:translate(-50%, -50%)}.ptc-multi-select.invalid .mdc-select-helper-text--validation-msg{z-index:2;opacity:1;position:relative;color:#AF3231;font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-xx-small);font-style:normal;font-weight:var(--ptc-font-weight-semibold);line-height:var(--ptc-line-height-densest);opacity:1;height:auto;margin-left:8px;margin-top:var(--ptc-element-spacing-02)}.ptc-multi-select.invalid .mdc-select-helper-text--validation-msg svg{transform:translate(-8px, 3px)}.ptc-multi-select .multi-select-label{display:block;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold);line-height:normal;margin-bottom:var(--ptc-element-spacing-01);z-index:1;position:relative;color:#40434A}.ptc-multi-select .selected-items{cursor:pointer;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.38);padding:8px;border-radius:0px;position:relative;user-select:none;color:rgba(0, 0, 0, 0.87);font-weight:400;font-size:16px;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif))}.ptc-multi-select .multi-select-icon{fill:rgba(0, 0, 0, 0.54);position:absolute;right:var(--ptc-element-spacing-03)}.ptc-multi-select .dropdown{display:block;list-style:none;padding:0;margin:0;border:1px solid #ccc;max-height:200px;overflow-y:auto;position:absolute;width:100%;background-color:#fff;z-index:1000;}.ptc-multi-select .dropdown li{display:flex;align-items:center;padding:8px 10px;cursor:pointer}.ptc-multi-select .dropdown li:hover{background-color:var(--color-gray-02)}.ptc-multi-select .dropdown li.selected{background-color:var(--color-gray-02)}.ptc-multi-select .dropdown li.selected:hover{background-color:var(--color-gray-04)}.ptc-multi-select .dropdown li label{margin-left:8px;font-size:var(--ptc-font-size-xx-small);position:relative;padding-left:25px;cursor:pointer}.ptc-multi-select .dropdown li:last-child{border-bottom:none}.ptc-multi-select .dropdown input[type=checkbox]{position:absolute;opacity:0;cursor:pointer}.ptc-multi-select .dropdown input[type=checkbox]:checked{background-color:var(--color-green-07)}.ptc-multi-select .dropdown label::before{content:\"\";position:absolute;left:0;top:0;width:14px;height:14px;background-color:#fff;border:1px solid #ccc;box-sizing:border-box}.ptc-multi-select .dropdown input[type=checkbox]:checked+label::before{background-color:var(--color-green-07);border-color:var(--color-green-07)}.ptc-multi-select .dropdown input[type=checkbox]:checked+label::after{content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 1 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0z'/%3E%3C/svg%3E\");position:absolute;left:1px;top:1px;font-size:var(--ptc-font-size-xxx-small);color:white}.ptc-multi-select button.ddl-click-text{all:unset;cursor:pointer;color:var(--color-gray-7);padding-left:8px;text-decoration:underline;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold)}";export{a as ptc_multi_select}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,g as i}from"./p-ac75c7ad.js";import{M as o}from"./p-bcab66bf.js";class n{constructor(t){this.params=t,this.url_vars={},this.visitor_elq_id=null,this.field_mappings=[],this.callback_queue=[],this.fields_populated=!1,this.user_elq_email="",this.user_elq_firstname="",this.user_elq_lastname="",this.params=Object.assign(Object.assign({},{elq_site_id:"",elq_visitor_lookup_key:"",elq_recipient_id_lookup_key:"",elq_contact_lookup_key:"",elq_subscription_lookup_key:"",elq_field_email_rec_id:"V_EmailRecipientID",elq_field_contact_email:"C_EmailAddress",elq_field_visitor_email:"V_Email_Address",elq_field_visitor_firstname:"V_First_Name",elq_field_visitor_lastname:"V_Last_Name",notme_link_id:"not-me-link-id",notme_fields_class:null,notme_message:"Not {name}? Click here.",notme_message_noname:"Not your details below? Click here."}),this.params),this.init()}init(){this.setEloquaSiteId(),this.async_load(),this.store_url_vars(),this.store_visitor_elq_id(),window.SetElqContent=this.eloqua_callback.bind(this)}setEloquaSiteId(){this.params.elq_site_id&&(n._elqQ.push(["elqSetSiteId",this.params.elq_site_id]),n._elqQ.push(["elqUseFirstPartyCookie","tracking.ptc.com"]),n._elqQ.push(["elqTrackPageView",window.location.href]))}fire_pageview(t){try{n._elqQ.push(void 0===t?["elqTrackPageView"]:["elqTrackPageView",t]),console.log("TRACKING: Eloqua pageview fired for URL: "+(t||"current page"))}catch(t){console.log("TRACKING: Could not fire Eloqua pageview: ",t)}}find_eloqua_contact(){console.log("CONTACT LOOKUP: Attempting to find Eloqua contact..."),this.callback_queue.push(this.handle_contact_lookup.bind(this)),null!==this.visitor_elq_id?this.lookup_visitor_by_recipient_id():this.lookup_contact_by_email()}add_field_mapping(t){this.field_mappings.push(t)}add_queue_action(t){this.callback_queue.push(t)}find_eloqua_subscription_info(){console.log("CONTACT LOOKUP: Attempting to find Eloqua subscription..."),this.callback_queue.push(this.handle_visitor_lookup.bind(this)),null!==this.visitor_elq_id&&this.lookup_visitor_by_recipient_id(),this.lookup_visitor_by_cookie()}store_url_vars(){this.url_vars={},window.location.search.substring(1).split("&").forEach((t=>{let[e,i]=t.split("=");e=decodeURIComponent(e),i=decodeURIComponent(i),this.url_vars[e]=i})),console.log("URL variables stored:",this.url_vars)}store_visitor_elq_id(){console.log("INIT: Looking for visitor's Eloqua ID in URL...");const t=this.url_vars.elq;if(t){const e=t.toUpperCase().replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5");this.visitor_elq_id=e,console.log(`INIT: ...visitor Eloqua ID found in URL: ${e}`)}else this.visitor_elq_id=null,console.log("INIT: ...no visitor Eloqua ID found in URL")}eloqua_callback(){console.log("LOOKUP: Eloqua lookup finished");let t=!0;for(;t&&this.callback_queue.length>0;){const e=this.callback_queue.shift();if(e){if(console.log("QUEUE: Executing action"),t=e(),!t){console.log("QUEUE: Action failed, re-adding to queue"),this.callback_queue.unshift(e);break}console.log("QUEUE: Action executed successfully, removed from queue")}}t&&null===this.visitor_elq_id&&(this.update_user_details(),this.populate_mapped_fields()),t&&"function"==typeof window.GetElqGroupMembershipStatus&&this.populateCheckboxes()}lookup_visitor_by_cookie(){""!=this.params.elq_visitor_lookup_key?(n._elqQ.push(["elqDataLookup",escape(this.params.elq_visitor_lookup_key),""]),console.log("LOOKUP: Visitor lookup sent using Eloqua cookie")):console.log("LOOKUP: A visitor lookup cannot be performed as no lookup key was defined")}lookup_visitor_by_recipient_id(){""!=this.params.elq_recipient_id_lookup_key?(n._elqQ.push(["elqDataLookup",escape(this.params.elq_recipient_id_lookup_key),"<"+this.params.elq_field_email_rec_id+">"+this.visitor_elq_id+"</"+this.params.elq_field_email_rec_id+">"]),console.log("LOOKUP: Visitor lookup sent using email recipient id: "+this.visitor_elq_id)):console.log("LOOKUP: A visitor lookup cannot be performed as no lookup key was defined")}lookup_contact_by_email(){""!=this.params.elq_contact_lookup_key?(n._elqQ.push(["elqDataLookup",escape(this.params.elq_contact_lookup_key),"<"+this.params.elq_field_contact_email+">"+this.user_elq_email+"</"+this.params.elq_field_contact_email+">"]),console.log("LOOKUP: Contact lookup sent using email address: "+this.user_elq_email)):console.log("LOOKUP: A Contact lookup cannot be performed as no lookup key was defined")}lookup_subscription_by_email(){this.params.elq_subscription_lookup_key?(n._elqQ.push(["elqDataLookup",escape(this.params.elq_subscription_lookup_key),`<${this.params.elq_field_contact_email}>${this.user_elq_email}</${this.params.elq_field_contact_email}>`]),console.log("LOOKUP: Subscription lookup sent using email address: "+this.user_elq_email)):console.log("LOOKUP: A Subscription lookup cannot be performed as no subscription lookup key or email was defined")}handle_visitor_lookup(){if("function"==typeof window.GetElqContentPersonalizationValue){const o=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_email);if(o){console.log(`LOOKUP: Found contact email address: ${o}`),this.user_elq_email=o.trim(),this.lookup_subscription_by_email();var t=this.user_elq_email,e=new Date;e.setTime(e.getTime()+12096e5);var i="expires="+e.toUTCString();return document.cookie="elq-uid="+encodeURIComponent(t)+";"+i+";path=/;SameSite=Strict;Secure",!0}return!1}}handle_contact_lookup(){return""!=window.GetElqContentPersonalizationValue(this.params.elq_field_contact_email)&&(console.log("LOOKUP: Found contact email address: "+window.GetElqContentPersonalizationValue(this.params.elq_field_contact_email)),!0)}populate_mapped_fields(){console.log("MAPPING: Starting field mapping"),this.field_mappings.forEach((({elementId:t,elqFieldName:e})=>{const i=window.GetElqContentPersonalizationValue(e);if("contact-country"!==t){const e=document.getElementById(t);console.log("element ID of field mappings: "+t),console.log("fieldValue ID of field mappings: "+i),e&&i&&(e.value=i,e.closest("ptc-textfield")?(e.closest("ptc-textfield").style.display="none",e.closest("ptc-textfield").inputValue=i):e.closest("ptc-select")&&(e.closest("ptc-select").style.display="none",e.closest("ptc-select").selectedValue=i),this.fields_populated=!0)}else{const e=document.getElementById(t),n=document.querySelector(".mdc-select"),s=new o(n);e&&i&&(e.textContent=i,e.closest("ptc-select").selectedValue=i,s.value=i),e.closest("ptc-select")&&(e.closest("ptc-select").style.display="none")}})),console.log("MAPPING: Finished "),this.fields_populated&&this.update_notme_link()}update_user_details(){console.log("displaying user info..."),""!==window.GetElqContentPersonalizationValue(this.params.elq_field_contact_email)&&document.querySelectorAll('input[type=text], input[type=tel], input[name="phonenumber"], input[name="phonenumbertwo"], input[type=email], select, textarea, span.mdc-select__selected-text').forEach((t=>{if("SPAN"===t.tagName){const e=t,i=e.getAttribute("data-eloqua-name"),n=e.closest("ptc-select"),s=new o(n.querySelector(".mdc-select"));if(null!==i){const t=window.GetElqContentPersonalizationValue(i);""!==t&&t.length>0&&(e.textContent=t,n.selectedValue=t,s.value=t)}}else if(t.className.includes("intl-tel-input")){const e=t,i=e.getAttribute("data-eloqua-name");if(null!==i){const t=window.GetElqContentPersonalizationValue(i);""!==t&&t.length>0&&setTimeout((()=>{e.placeholder=t,e.value=t,e.closest("ptc-textfield").inputValue=t}),1e3)}}else{const e=t,i=e.getAttribute("data-eloqua-name");if(null!==i){const t=window.GetElqContentPersonalizationValue(i);""!==t&&t.length>0&&(e.value=t,e.closest("ptc-textfield").inputValue=t)}}})),""==this.user_elq_email&&""!=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_email)&&(this.user_elq_email=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_email)),""==this.user_elq_firstname&&""!=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_firstname)&&(this.user_elq_firstname=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_firstname)),""==this.user_elq_lastname&&""!=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_lastname)&&(this.user_elq_lastname=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_lastname))}populateCheckboxes(){"function"==typeof window.GetElqGroupMembershipStatus?(console.log("populating checkboxes..."),document.querySelector(".cookie-email").innerHTML=this.user_elq_email?this.user_elq_email:"email information is not available",document.querySelectorAll("input.groupId").forEach((t=>{const e=t.getAttribute("data-sub-groupid"),i=t.getAttribute("data-unsub-groupid"),o=window.GetElqGroupMembershipStatus(e),n=window.GetElqGroupMembershipStatus(i);null==o||void 0===o||o?t.checked=!0:n&&(t.checked=!1),this.fields_populated=!0})),this.fields_populated&&this.update_notme_link()):console.log("No result from group membership web look up, cannot display membership info")}disable_submit_button(){$("#btnSubmit").prop("disabled",!0)}update_notme_link(){const t=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_firstname),e=window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_lastname),i=document.getElementById("not-me-additional-top"),o=document.getElementById("not-me-additional-bottom");if(i){let o=i.innerHTML;o=t&&e?o.replace("{name}",t+" "+e):this.params.notme_message_noname,i.innerHTML=o,i.style.display="block"}o&&(o.style.display="block");const n=document.getElementById(this.params.notme_link_id);n&&(n.style.display="block",n.onclick=this.remove_user_details.bind(this))}remove_user_details(t){t.preventDefault(),this.user_elq_email="",this.user_elq_firstname="",this.user_elq_lastname="";const e=document.getElementById("not-me-additional-top"),i=document.getElementById("not-me-additional-bottom");return e.style.display="none",i.style.display="none",this.refreshForm(),!1}refreshForm(){this.field_mappings.forEach((({elementId:t})=>{if("contact-country"!==t){const e=document.getElementById(t);e&&(console.log("element: "+e),e.value="",e.closest("ptc-textfield")?"true"!=e.closest("ptc-textfield").getAttribute("ignore-blind-submit")&&(e.closest("ptc-textfield").style.display=""):e.closest("ptc-select")?e.closest("ptc-select").style.display="none":e.closest("ptc-form-checkbox")&&"true"==e.closest("ptc-form-checkbox").getAttribute("ignore-blind-submit")&&(e.closest("ptc-form-checkbox").style.display="none"))}else{const e=document.getElementById(t);e&&(e.textContent=""),e.closest("ptc-select")&&(e.closest("ptc-select").style.display="")}})),this.clearEloquaCookie("elq-uid"),this.fields_populated=!1}clearEloquaCookie(t){document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",console.log("cookie cleared")}async_load(){const t="https://img.en25.com/i/elqCfg.min.js",e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=t,e.onerror=t=>{console.log(`Error loading script: ${t}`)};const i=document.getElementsByTagName("script")[0];i&&i.parentNode?i.parentNode.insertBefore(e,i):document.head.appendChild(e),console.log(`Async loading of script ${t} initiated.`)}}n._elqQ=window._elqQ||[];const s=class{constructor(e){t(this,e),this.elqSiteId=void 0,this.elqVisitorLookupKey=void 0,this.elqRecipientIdLookupKey=void 0,this.elqContactLookupKey=void 0,this.elqSubscriptionLookupKey=void 0,this.elqFieldEmailRecId="V_EmailRecipientID",this.elqFieldContactEmail="C_EmailAddress",this.elqFieldVisitorEmail="V_Email_Address",this.elqFieldVisitorFirstname="C_FirstName",this.elqFieldVisitorLastname="C_LastName",this.notmeLinkId=void 0,this.notmeFieldsClass=void 0,this.notmeMessage=void 0,this.notmeMessageNoname=void 0,this.isBlindSubmit=!0,this.isInitialized=!1}componentWillLoad(){this.initializeElqLib(),this.isBlindSubmit&&this.populateBlindField()}componentDidLoad(){this.init_notme()}initializeElqLib(){this.elqLib=new n({elq_site_id:this.elqSiteId,elq_visitor_lookup_key:this.elqVisitorLookupKey,elq_recipient_id_lookup_key:this.elqRecipientIdLookupKey,elq_contact_lookup_key:this.elqContactLookupKey,elq_subscription_lookup_key:this.elqSubscriptionLookupKey,elq_field_email_rec_id:this.elqFieldEmailRecId,elq_field_contact_email:this.elqFieldContactEmail,elq_field_visitor_email:this.elqFieldVisitorEmail,elq_field_visitor_firstname:this.elqFieldVisitorFirstname,elq_field_visitor_lastname:this.elqFieldVisitorLastname,notme_link_id:this.notmeLinkId,notme_fields_class:this.notmeFieldsClass,notme_message:this.notmeMessage,notme_message_noname:this.notmeMessageNoname}),this.isInitialized=!0}populateBlindField(){this.elqLib.add_field_mapping({elementId:"contact-phone",elqFieldName:"C_BusPhone"}),this.elqLib.add_field_mapping({elementId:"contact-email",elqFieldName:"C_EmailAddress"}),this.elqLib.add_field_mapping({elementId:"contact-firstname",elqFieldName:"C_FirstName"}),this.elqLib.add_field_mapping({elementId:"contact-lastname",elqFieldName:"C_LastName"}),this.elqLib.add_field_mapping({elementId:"contact-country",elqFieldName:"C_Country"}),this.elqLib.add_field_mapping({elementId:"contact-phone",elqFieldName:"C_BusPhone"}),this.elqLib.add_field_mapping({elementId:"company",elqFieldName:"C_Company"}),this.elqLib.add_field_mapping({elementId:"contact-state",elqFieldName:"C_State_Prov"}),this.elqLib.add_field_mapping({elementId:"contact-zipcode",elqFieldName:"C_Zip_Postal"}),this.elqLib.add_field_mapping({elementId:"contact-job-category",elqFieldName:"C_Job_Role1"}),this.elqLib.add_field_mapping({elementId:"contact-job-function",elqFieldName:"C_Job_Function1"}),this.elqLib.add_field_mapping({elementId:"contact-jp-job-title",elqFieldName:"C_Title"})}getCookie(t){let e=null;if(document.cookie){const i=document.cookie.split(";");for(let o of i){const[i,n]=o.trim().split("=");if(i===t){e=decodeURIComponent(n);break}}}return e}init_notme(){const t=document.getElementById("not-me-additional-top"),e=document.getElementById("not-me-additional-bottom");console.log("top: "+t),t&&(t.style.display="none"),e&&(e.style.display="none")}async performDataLookup(){this.isInitialized&&(this.elqLib.user_elq_email=this.getCookie("elq-uid"),console.log("elqlib.user_elq_email: "+this.elqLib.user_elq_email),this.elqLib.find_eloqua_contact())}async performSubscriptionLookup(){this.isInitialized&&(this.elqLib.user_elq_email=this.getCookie("elq-uid"),this.elqLib.find_eloqua_subscription_info())}render(){return e("slot",null)}get el(){return i(this)}};s.style="h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}#not-me-link-id{color:var(--color-gray-10);font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-medium);font-style:normal;font-weight:var(--ptc-font-weight-bold);line-height:normal;margin-bottom:var(--ptc-element-spacing-03);position:relative}#not-me-link-id a{color:var(--color-hyperlink);font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-medium);font-style:normal;font-weight:var(--ptc-font-weight-bold);line-height:normal;text-decoration-line:underline}.not-me-additional-text{color:var(--color-gray-10);font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-medium);font-style:normal;font-weight:var(--ptc-font-weight-regular);line-height:normal;margin-bottom:var(--ptc-element-spacing-03)}.not-me-additional-text p{font-size:var(--ptc-font-size-medium)}.not-me-additional-text#not-me-additional-bottom{margin-bottom:unset;margin-top:var(--ptc-element-spacing-03)}.ptc-embedded-form>div{max-width:273px;overflow-wrap:break-word}.ptc-embedded-form .iti__country-name{color:var(--color-gray-12)}.ptc-embedded-form .iti--separate-dial-code.iti--show-flags .iti__selected-dial-code{color:var(--color-gray-12)}.ptc-embedded-form .mdc-menu-surface--open{z-index:99999}";export{s as ptc_data_lookup}
|