@ptcwebops/ptcw-design 3.2.5 → 3.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/cjs/embedded-form_9.cjs.entry.js +47 -46
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/my-component.cjs.entry.js +1 -1
  4. package/dist/cjs/ptc-accordion-item.cjs.entry.js +2 -1
  5. package/dist/cjs/ptc-collapse-list.cjs.entry.js +1 -1
  6. package/dist/cjs/ptc-media-card.cjs.entry.js +1 -1
  7. package/dist/cjs/ptc-para.cjs.entry.js +3 -1
  8. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
  9. package/dist/cjs/ptcw-design.cjs.js +1 -1
  10. package/dist/cjs/{utils-3e282dbb.js → utils-69557901.js} +14 -2
  11. package/dist/collection/components/organism-bundles/form/embedded-form/embedded-form.js +1 -1
  12. package/dist/collection/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.js +19 -1
  13. package/dist/collection/components/ptc-para/ptc-para.js +3 -1
  14. package/dist/collection/components/ptc-textfield/ptc-textfield.js +58 -23
  15. package/dist/collection/components/ptc-title/ptc-title.js +4 -21
  16. package/dist/collection/utils/utils.js +13 -2
  17. package/dist/custom-elements/index.js +64 -50
  18. package/dist/esm/embedded-form_9.entry.js +47 -46
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/my-component.entry.js +1 -1
  21. package/dist/esm/ptc-accordion-item.entry.js +2 -1
  22. package/dist/esm/ptc-collapse-list.entry.js +1 -1
  23. package/dist/esm/ptc-media-card.entry.js +1 -1
  24. package/dist/esm/ptc-para.entry.js +3 -1
  25. package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
  26. package/dist/esm/ptcw-design.js +1 -1
  27. package/dist/esm/{utils-ff66a908.js → utils-063d1a12.js} +14 -3
  28. package/dist/ptcw-design/{p-d2a8372d.entry.js → p-43433d99.entry.js} +1 -1
  29. package/dist/ptcw-design/{p-c12853b9.entry.js → p-4ca69fb3.entry.js} +16 -16
  30. package/dist/ptcw-design/{p-ab16b22b.entry.js → p-57f477f7.entry.js} +1 -1
  31. package/dist/ptcw-design/{p-9415f40e.entry.js → p-5cf02899.entry.js} +1 -1
  32. package/dist/ptcw-design/p-6b659825.entry.js +1 -0
  33. package/dist/ptcw-design/{p-57f91d23.entry.js → p-aef21138.entry.js} +1 -1
  34. package/dist/ptcw-design/p-e5486869.entry.js +1 -0
  35. package/dist/ptcw-design/p-f118b815.js +1 -0
  36. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  37. package/dist/types/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.d.ts +2 -0
  38. package/dist/types/components/ptc-textfield/ptc-textfield.d.ts +1 -0
  39. package/dist/types/components/ptc-title/ptc-title.d.ts +1 -0
  40. package/dist/types/components.d.ts +9 -0
  41. package/dist/types/utils/utils.d.ts +1 -0
  42. package/package.json +1 -1
  43. package/readme.md +1 -1
  44. package/dist/ptcw-design/p-568103b8.entry.js +0 -1
  45. package/dist/ptcw-design/p-c3e21c68.entry.js +0 -1
  46. package/dist/ptcw-design/p-ff83c1c4.js +0 -1
@@ -35,23 +35,31 @@ export class PtcTextfield {
35
35
  inputBlurHandler() {
36
36
  // console.log(event.target)
37
37
  // this.getPhoneValidation();
38
- if (this.customValidation) {
39
- let message = this.customValidation(this.customInput);
40
- this.customInput.setCustomValidity(message);
41
- this.customInput.checkValidity();
42
- this.infoText = message;
43
- this.setErrorBackground();
44
- }
45
- else {
46
- this.setErrorBackground();
47
- setTimeout(() => {
48
- this.getPhoneValidation();
49
- }, 100);
50
- }
38
+ this.validateTextField();
51
39
  }
52
40
  async syncCountry(countryCode) {
53
41
  this.iti.setCountry(countryCode);
54
42
  }
43
+ async validateTextField() {
44
+ if (this.customInput) {
45
+ if (this.customValidation) {
46
+ let message = this.customValidation(this.customInput);
47
+ this.customInput.setCustomValidity(message);
48
+ this.customInput.checkValidity();
49
+ this.infoText = message;
50
+ this.setErrorBackground();
51
+ this.setHelperText();
52
+ }
53
+ else {
54
+ this.setErrorBackground();
55
+ this.setHelperText();
56
+ setTimeout(() => {
57
+ this.getPhoneValidation();
58
+ }, 100);
59
+ }
60
+ this.mdcTextfieldComponent.valid = this.customInput.checkValidity();
61
+ }
62
+ }
55
63
  componentWillLoad() {
56
64
  this.language = getLanguageFromURL();
57
65
  }
@@ -82,27 +90,38 @@ export class PtcTextfield {
82
90
  }
83
91
  }
84
92
  getValidationMessage(type) {
85
- // console.log("lang type: " + type);
93
+ // console.log("lang: " + this.language);
94
+ // console.log("type: " + type);
86
95
  return ValidationMessages[this.language][type];
87
96
  }
88
97
  getPhoneValidation() {
89
98
  if (this.fieldId === 'contact-phone' && this.fieldName === 'phone') {
90
- if (this.iti.isValidNumber()) {
99
+ if (!this.required && this.inputValue === '') {
91
100
  if (this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
92
101
  this.mdcTextfield.classList.remove('mdc-text-field--invalid');
93
102
  }
94
103
  if (this.el.classList.contains('invalid-field')) {
95
104
  this.el.classList.remove('invalid-field');
96
105
  }
97
- this.inputValue = this.iti.getNumber();
98
- // console.log('sending phone number: ' + this.inputValue);
99
106
  }
100
- else if (!this.iti.isValidNumber()) {
101
- if (!this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
102
- this.mdcTextfield.classList.add('mdc-text-field--invalid');
107
+ else {
108
+ if (this.iti.isValidNumber()) {
109
+ if (this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
110
+ this.mdcTextfield.classList.remove('mdc-text-field--invalid');
111
+ }
112
+ if (this.el.classList.contains('invalid-field')) {
113
+ this.el.classList.remove('invalid-field');
114
+ }
115
+ this.inputValue = this.iti.getNumber();
116
+ // console.log('sending phone number: ' + this.inputValue);
103
117
  }
104
- if (!this.el.classList.contains('invalid-field')) {
105
- this.el.classList.add('invalid-field');
118
+ else if (!this.iti.isValidNumber()) {
119
+ if (!this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
120
+ this.mdcTextfield.classList.add('mdc-text-field--invalid');
121
+ }
122
+ if (!this.el.classList.contains('invalid-field')) {
123
+ this.el.classList.add('invalid-field');
124
+ }
106
125
  }
107
126
  }
108
127
  }
@@ -168,7 +187,7 @@ export class PtcTextfield {
168
187
  }
169
188
  else if (this.fieldId === 'contact-phone') {
170
189
  if (this.iti) {
171
- if (this.inputValue === '') {
190
+ if (this.inputValue === '' && this.required) {
172
191
  this.helpertext = this.getValidationMessage('tel');
173
192
  }
174
193
  else if (!this.iti.isValidNumber()) {
@@ -461,6 +480,22 @@ export class PtcTextfield {
461
480
  "text": "",
462
481
  "tags": []
463
482
  }
483
+ },
484
+ "validateTextField": {
485
+ "complexType": {
486
+ "signature": "() => Promise<void>",
487
+ "parameters": [],
488
+ "references": {
489
+ "Promise": {
490
+ "location": "global"
491
+ }
492
+ },
493
+ "return": "Promise<void>"
494
+ },
495
+ "docs": {
496
+ "text": "",
497
+ "tags": []
498
+ }
464
499
  }
465
500
  };
466
501
  }
@@ -1,4 +1,5 @@
1
1
  import { Host, h } from '@stencil/core';
2
+ import { getSeoTagType } from '../../utils/utils';
2
3
  export class PtcTitle {
3
4
  constructor() {
4
5
  this.isPlmHub = false;
@@ -18,27 +19,8 @@ export class PtcTitle {
18
19
  render() {
19
20
  const classMap = this.getCssClassMap();
20
21
  const cutOff = this.getLineCuttoff();
21
- let TagType;
22
- switch (this.type) {
23
- case 'h1':
24
- TagType = 'h1';
25
- break;
26
- case 'h3':
27
- TagType = 'h3';
28
- break;
29
- case 'h4':
30
- TagType = 'h4';
31
- break;
32
- case 'h5':
33
- TagType = 'h5';
34
- break;
35
- case 'h6':
36
- TagType = 'h6';
37
- break;
38
- default:
39
- TagType = 'h2';
40
- }
41
- return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap }, h(TagType, { style: cutOff }, h("slot", null)))));
22
+ const [TagType, firstChild] = getSeoTagType(this.el);
23
+ return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap }, h(TagType, { innerHTML: firstChild.innerHTML, style: cutOff }, h("slot", null)))));
42
24
  }
43
25
  getCssClassMap() {
44
26
  return {
@@ -307,4 +289,5 @@ export class PtcTitle {
307
289
  }
308
290
  };
309
291
  }
292
+ static get elementRef() { return "el"; }
310
293
  }
@@ -89,6 +89,17 @@ export function getFileExtension(filePath) {
89
89
  }
90
90
  export function getLanguageFromURL() {
91
91
  const urlPath = window.location.pathname;
92
- const languageCode = urlPath.split('/')[1];
93
- return languageCode || 'en';
92
+ const parts = urlPath.split('/');
93
+ const supportedLanguages = ['en', 'cn', 'tw', 'fr', 'de', 'it', 'ja', 'ko', 'es', 'pt'];
94
+ const languageCode = parts[1];
95
+ if (supportedLanguages.includes(languageCode)) {
96
+ return languageCode;
97
+ }
98
+ return 'en';
99
+ }
100
+ export function getSeoTagType(element) {
101
+ let firstChild = element.children[0];
102
+ let TagType = firstChild.tagName.toLowerCase();
103
+ element.removeChild(firstChild);
104
+ return [TagType, firstChild];
94
105
  }
@@ -481,7 +481,7 @@ const EmbeddedForm$1 = class extends HTMLElement$1 {
481
481
  }
482
482
  render() {
483
483
  const formClass = this.isSubmitted ? "ptc-form-roll-up" : "";
484
- return (h$1(Host, null, h$1("div", { class: "ptc-container ptc-section-standard flex-adjustments" }, h$1("div", { class: "form-wrapper ptc-embedded-form" }, h$1("max-width-container", { "max-width": "277", breakpoint: 480 }, h$1("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$1("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "small", size: "small" }), h$1("ptc-spacer", { breakpoint: "small", size: "small" })), h$1("form", { onSubmit: event => this.handleSubmit(event), class: formClass }, h$1("div", { id: "not-me-link-id" }), h$1("div", { id: "not-me-additional-top", class: "not-me-additional-text" }), h$1("ptc-textfield", { "field-id": "contact-firstname", "label-text": "First Name*", type: "text", "ptc-data-eloqua-name": "C_FirstName", "field-name": "firstname" }), h$1("ptc-textfield", { "field-id": "contact-lastname", "label-text": "Last Name*", type: "text", "ptc-data-eloqua-name": "C_LastName", "field-name": "lastname" }), h$1("ptc-textfield", { "field-id": "company", "label-text": "Company*", type: "text", "ptc-data-eloqua-name": "C_Company", "field-name": "company" }), h$1("ptc-textfield", { "field-id": "contact-email", "label-text": "Email*", type: "email", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "email", "info-text": "Please include @ in the email address" }), h$1("ptc-select", { "field-id": "contact-country", label: "Country*", "ptc-data-eloqua-name": "C_Country", "field-name": "country", "default-value": "USA" }, h$1("ul", { class: "mdc-list" }, h$1("li", { class: "mdc-list-item", "data-value": "" }, h$1("span", { class: "mdc-list-item__ripple" })), h$1("li", { class: "mdc-list-item", "data-value": "USA" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "USA")), h$1("li", { class: "mdc-list-item", "data-value": "Canada" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "Canada")), h$1("li", { class: "mdc-list-item", "data-value": "China" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "China")))), h$1("ptc-textfield", { "field-id": "contact-phone", "label-text": "Phone*", type: "tel", "ptc-data-eloqua-name": "C_BusPhone", "field-name": "phone" }), h$1("ptc-select", { label: "What information are you interested in?*", "ptc-data-eloqua-name": "Inquiry_Reason", "field-name": "inquiryreason", "field-id": "contact-inquiry", "info-text": "info text example." }, h$1("ul", { class: "mdc-list" }, h$1("li", { class: "mdc-list-item", "data-value": "" }, h$1("span", { class: "mdc-list-item__ripple" })), h$1("li", { class: "mdc-list-item", "data-value": "Augmented Reality (AR)" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "Augmented Reality (AR)")), h$1("li", { class: "mdc-list-item", "data-value": "CAD" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "Computer Aided Design")), h$1("li", { class: "mdc-list-item", "data-value": "Retail(FlexPLM)" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "Fashion and Retail Product Lifecycle Management")))), h$1("ptc-textfield", { "field-id": "self-reporting", "label-text": "How can we help you?*", type: "text", "ptc-data-eloqua-name": "HowHearSelfReport", "ptc-max-length": "100", "field-name": "howhearselfreport" }), h$1("ptc-textfield", { type: "hidden", "ptc-data-eloqua-name": "test", "input-value": "test" }), h$1("ptc-form-checkbox", { label: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nec ultricies risus. Praesent suscipit mauris vel augue facilisis, nec consequat ipsum placerat. Curabitur nisi elit, dignissim tincidunt tincidunt at, vehicula sit amet nisl. Maecenas sodales est vulputate ex feugiat tincidunt.", "checkbox-id": "policy1" }), h$1("div", { id: "not-me-additional-bottom", class: "not-me-additional-text" }), h$1("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; margin-top: 12px; display:block; text-align:right;}" }, "Submit"))))));
484
+ return (h$1(Host, null, h$1("div", { class: "ptc-container ptc-section-standard flex-adjustments" }, h$1("div", { class: "form-wrapper ptc-embedded-form" }, h$1("max-width-container", { "max-width": "277", breakpoint: 480 }, h$1("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" }, h$1("h2", null, "Please fill out the form and a PTC sales representative will be in touch.")), h$1("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h$1("ptc-spacer", { breakpoint: "small", size: "small" }), h$1("ptc-spacer", { breakpoint: "small", size: "small" })), h$1("form", { onSubmit: event => this.handleSubmit(event), class: formClass }, h$1("div", { id: "not-me-link-id" }), h$1("div", { id: "not-me-additional-top", class: "not-me-additional-text" }), h$1("ptc-textfield", { "field-id": "contact-firstname", "label-text": "First Name*", type: "text", "ptc-data-eloqua-name": "C_FirstName", "field-name": "firstname" }), h$1("ptc-textfield", { "field-id": "contact-lastname", "label-text": "Last Name*", type: "text", "ptc-data-eloqua-name": "C_LastName", "field-name": "lastname" }), h$1("ptc-textfield", { "field-id": "company", "label-text": "Company*", type: "text", "ptc-data-eloqua-name": "C_Company", "field-name": "company" }), h$1("ptc-textfield", { "field-id": "contact-email", "label-text": "Email*", type: "email", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "email", "info-text": "Please include @ in the email address" }), h$1("ptc-select", { "field-id": "contact-country", label: "Country*", "ptc-data-eloqua-name": "C_Country", "field-name": "country", "default-value": "USA" }, h$1("ul", { class: "mdc-list" }, h$1("li", { class: "mdc-list-item", "data-value": "" }, h$1("span", { class: "mdc-list-item__ripple" })), h$1("li", { class: "mdc-list-item", "data-value": "USA" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "USA")), h$1("li", { class: "mdc-list-item", "data-value": "Canada" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "Canada")), h$1("li", { class: "mdc-list-item", "data-value": "China" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "China")))), h$1("ptc-textfield", { "field-id": "contact-phone", "label-text": "Phone*", type: "tel", "ptc-data-eloqua-name": "C_BusPhone", "field-name": "phone" }), h$1("ptc-select", { label: "What information are you interested in?*", "ptc-data-eloqua-name": "Inquiry_Reason", "field-name": "inquiryreason", "field-id": "contact-inquiry", "info-text": "info text example." }, h$1("ul", { class: "mdc-list" }, h$1("li", { class: "mdc-list-item", "data-value": "" }, h$1("span", { class: "mdc-list-item__ripple" })), h$1("li", { class: "mdc-list-item", "data-value": "Augmented Reality (AR)" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "Augmented Reality (AR)")), h$1("li", { class: "mdc-list-item", "data-value": "CAD" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "Computer Aided Design")), h$1("li", { class: "mdc-list-item", "data-value": "Retail(FlexPLM)" }, h$1("span", { class: "mdc-list-item__ripple" }), h$1("span", { class: "mdc-list-item__text" }, "Fashion and Retail Product Lifecycle Management")))), h$1("ptc-textfield", { "field-id": "self-reporting", "label-text": "How can we help you?*", type: "text", "ptc-data-eloqua-name": "HowHearSelfReport", "ptc-max-length": "100", "field-name": "howhearselfreport" }), h$1("ptc-textfield", { type: "hidden", "ptc-data-eloqua-name": "test", "input-value": "test" }), h$1("ptc-form-checkbox", { label: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nec ultricies risus. Praesent suscipit mauris vel augue facilisis, nec consequat ipsum placerat. Curabitur nisi elit, dignissim tincidunt tincidunt at, vehicula sit amet nisl. Maecenas sodales est vulputate ex feugiat tincidunt.", "checkbox-id": "policy1" }), h$1("div", { id: "not-me-additional-bottom", class: "not-me-additional-text" }), h$1("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; margin-top: 12px; display:block; text-align:right;}" }, "Submit"))))));
485
485
  }
486
486
  get el() { return this; }
487
487
  static get style() { return embeddedFormCss; }
@@ -947,8 +947,19 @@ function getFileExtension(filePath) {
947
947
  }
948
948
  function getLanguageFromURL() {
949
949
  const urlPath = window.location.pathname;
950
- const languageCode = urlPath.split('/')[1];
951
- return languageCode || 'en';
950
+ const parts = urlPath.split('/');
951
+ const supportedLanguages = ['en', 'cn', 'tw', 'fr', 'de', 'it', 'ja', 'ko', 'es', 'pt'];
952
+ const languageCode = parts[1];
953
+ if (supportedLanguages.includes(languageCode)) {
954
+ return languageCode;
955
+ }
956
+ return 'en';
957
+ }
958
+ function getSeoTagType(element) {
959
+ let firstChild = element.children[0];
960
+ let TagType = firstChild.tagName.toLowerCase();
961
+ element.removeChild(firstChild);
962
+ return [TagType, firstChild];
952
963
  }
953
964
 
954
965
  const myComponentCss = ":host{display:block}";
@@ -1036,6 +1047,7 @@ const PtcAccordionItem$1 = class extends HTMLElement$1 {
1036
1047
  this.autoHeight = false;
1037
1048
  this.active = false;
1038
1049
  this.theme = "standard";
1050
+ this.styles = undefined;
1039
1051
  this.hasHeadingSlot = true;
1040
1052
  this.hasArrowSlot = true;
1041
1053
  }
@@ -1102,7 +1114,7 @@ const PtcAccordionItem$1 = class extends HTMLElement$1 {
1102
1114
  }
1103
1115
  render() {
1104
1116
  const { active, autoHeight, theme, headingTag: HeadingTag } = this;
1105
- return (h$1(Host, { class: { active, autoHeight } }, h$1("button", { class: { "heading": true, [theme]: true }, role: "button", onClick: () => this.toggle() }, h$1("span", { class: "arrow" }, this.hasArrowSlot ? (h$1("slot", { name: "arrow" })) : (h$1("svg", { focusable: "false", viewBox: "0 0 24 24", "aria-hidden": "true" }, h$1("path", { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" })))), this.hasHeadingSlot ? (h$1("slot", { name: "heading" })) : (h$1(HeadingTag, { class: "heading-text" }, this.heading))), h$1("div", { class: "body-container", ref: el => (this.bodyEl = el) }, h$1("div", { class: "body" }, h$1("slot", null)))));
1117
+ return (h$1(Host, { class: { active, autoHeight } }, this.styles && h$1("style", null, this.styles), h$1("button", { class: { "heading": true, [theme]: true }, role: "button", onClick: () => this.toggle() }, h$1("span", { class: "arrow" }, this.hasArrowSlot ? (h$1("slot", { name: "arrow" })) : (h$1("svg", { focusable: "false", viewBox: "0 0 24 24", "aria-hidden": "true" }, h$1("path", { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" })))), this.hasHeadingSlot ? (h$1("slot", { name: "heading" })) : (h$1(HeadingTag, { class: "heading-text" }, this.heading))), h$1("div", { class: "body-container", ref: el => (this.bodyEl = el) }, h$1("div", { class: "body" }, h$1("slot", null)))));
1106
1118
  }
1107
1119
  get el() { return this; }
1108
1120
  static get style() { return ptcAccordionItemCss; }
@@ -13366,7 +13378,8 @@ const PtcPara$1 = class extends HTMLElement$1 {
13366
13378
  const classMap = this.getCssClassMap();
13367
13379
  const colorClass = this.addWhiteClass();
13368
13380
  const cutOff = this.getLineCuttoff();
13369
- return (h$1(Host, { class: `${colorClass} ${this.paraZIndex}` }, this.styles && h$1("style", null, this.styles), h$1("p", { class: classMap, part: "part-para", style: cutOff }, h$1("slot", null))));
13381
+ const [TagType, firstChild] = getSeoTagType(this.el);
13382
+ return (h$1(Host, { class: `${colorClass} ${this.paraZIndex}` }, this.styles && h$1("style", null, this.styles), h$1(TagType, { class: classMap, innerHTML: firstChild.innerHTML, part: "part-para", style: cutOff }, h$1("slot", null))));
13370
13383
  }
13371
13384
  getCssClassMap() {
13372
13385
  return {
@@ -24902,23 +24915,31 @@ const PtcTextfield$1 = class extends HTMLElement$1 {
24902
24915
  inputBlurHandler() {
24903
24916
  // console.log(event.target)
24904
24917
  // this.getPhoneValidation();
24905
- if (this.customValidation) {
24906
- let message = this.customValidation(this.customInput);
24907
- this.customInput.setCustomValidity(message);
24908
- this.customInput.checkValidity();
24909
- this.infoText = message;
24910
- this.setErrorBackground();
24911
- }
24912
- else {
24913
- this.setErrorBackground();
24914
- setTimeout(() => {
24915
- this.getPhoneValidation();
24916
- }, 100);
24917
- }
24918
+ this.validateTextField();
24918
24919
  }
24919
24920
  async syncCountry(countryCode) {
24920
24921
  this.iti.setCountry(countryCode);
24921
24922
  }
24923
+ async validateTextField() {
24924
+ if (this.customInput) {
24925
+ if (this.customValidation) {
24926
+ let message = this.customValidation(this.customInput);
24927
+ this.customInput.setCustomValidity(message);
24928
+ this.customInput.checkValidity();
24929
+ this.infoText = message;
24930
+ this.setErrorBackground();
24931
+ this.setHelperText();
24932
+ }
24933
+ else {
24934
+ this.setErrorBackground();
24935
+ this.setHelperText();
24936
+ setTimeout(() => {
24937
+ this.getPhoneValidation();
24938
+ }, 100);
24939
+ }
24940
+ this.mdcTextfieldComponent.valid = this.customInput.checkValidity();
24941
+ }
24942
+ }
24922
24943
  componentWillLoad() {
24923
24944
  this.language = getLanguageFromURL();
24924
24945
  }
@@ -24949,27 +24970,38 @@ const PtcTextfield$1 = class extends HTMLElement$1 {
24949
24970
  }
24950
24971
  }
24951
24972
  getValidationMessage(type) {
24952
- // console.log("lang type: " + type);
24973
+ // console.log("lang: " + this.language);
24974
+ // console.log("type: " + type);
24953
24975
  return ValidationMessages[this.language][type];
24954
24976
  }
24955
24977
  getPhoneValidation() {
24956
24978
  if (this.fieldId === 'contact-phone' && this.fieldName === 'phone') {
24957
- if (this.iti.isValidNumber()) {
24979
+ if (!this.required && this.inputValue === '') {
24958
24980
  if (this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
24959
24981
  this.mdcTextfield.classList.remove('mdc-text-field--invalid');
24960
24982
  }
24961
24983
  if (this.el.classList.contains('invalid-field')) {
24962
24984
  this.el.classList.remove('invalid-field');
24963
24985
  }
24964
- this.inputValue = this.iti.getNumber();
24965
- // console.log('sending phone number: ' + this.inputValue);
24966
24986
  }
24967
- else if (!this.iti.isValidNumber()) {
24968
- if (!this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
24969
- this.mdcTextfield.classList.add('mdc-text-field--invalid');
24987
+ else {
24988
+ if (this.iti.isValidNumber()) {
24989
+ if (this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
24990
+ this.mdcTextfield.classList.remove('mdc-text-field--invalid');
24991
+ }
24992
+ if (this.el.classList.contains('invalid-field')) {
24993
+ this.el.classList.remove('invalid-field');
24994
+ }
24995
+ this.inputValue = this.iti.getNumber();
24996
+ // console.log('sending phone number: ' + this.inputValue);
24970
24997
  }
24971
- if (!this.el.classList.contains('invalid-field')) {
24972
- this.el.classList.add('invalid-field');
24998
+ else if (!this.iti.isValidNumber()) {
24999
+ if (!this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
25000
+ this.mdcTextfield.classList.add('mdc-text-field--invalid');
25001
+ }
25002
+ if (!this.el.classList.contains('invalid-field')) {
25003
+ this.el.classList.add('invalid-field');
25004
+ }
24973
25005
  }
24974
25006
  }
24975
25007
  }
@@ -25035,7 +25067,7 @@ const PtcTextfield$1 = class extends HTMLElement$1 {
25035
25067
  }
25036
25068
  else if (this.fieldId === 'contact-phone') {
25037
25069
  if (this.iti) {
25038
- if (this.inputValue === '') {
25070
+ if (this.inputValue === '' && this.required) {
25039
25071
  this.helpertext = this.getValidationMessage('tel');
25040
25072
  }
25041
25073
  else if (!this.iti.isValidNumber()) {
@@ -25321,27 +25353,8 @@ const PtcTitle$1 = class extends HTMLElement$1 {
25321
25353
  render() {
25322
25354
  const classMap = this.getCssClassMap();
25323
25355
  const cutOff = this.getLineCuttoff();
25324
- let TagType;
25325
- switch (this.type) {
25326
- case 'h1':
25327
- TagType = 'h1';
25328
- break;
25329
- case 'h3':
25330
- TagType = 'h3';
25331
- break;
25332
- case 'h4':
25333
- TagType = 'h4';
25334
- break;
25335
- case 'h5':
25336
- TagType = 'h5';
25337
- break;
25338
- case 'h6':
25339
- TagType = 'h6';
25340
- break;
25341
- default:
25342
- TagType = 'h2';
25343
- }
25344
- return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1("div", { class: classMap }, h$1(TagType, { style: cutOff }, h$1("slot", null)))));
25356
+ const [TagType, firstChild] = getSeoTagType(this.el);
25357
+ return (h$1(Host, null, this.styles && h$1("style", null, this.styles), h$1("div", { class: classMap }, h$1(TagType, { innerHTML: firstChild.innerHTML, style: cutOff }, h$1("slot", null)))));
25345
25358
  }
25346
25359
  getCssClassMap() {
25347
25360
  return {
@@ -25367,6 +25380,7 @@ const PtcTitle$1 = class extends HTMLElement$1 {
25367
25380
  }
25368
25381
  return result;
25369
25382
  }
25383
+ get el() { return this; }
25370
25384
  static get style() { return ptcTitleCss; }
25371
25385
  };
25372
25386
 
@@ -26360,7 +26374,7 @@ const ListItem = /*@__PURE__*/proxyCustomElement(ListItem$2, [1,"list-item",{"li
26360
26374
  const MaxWidthContainer = /*@__PURE__*/proxyCustomElement(MaxWidthContainer$1, [1,"max-width-container",{"maxWidthP":[2,"max-width-p"],"maxWidth":[2,"max-width"],"breakpoint":[2],"contentAlign":[1,"content-align"],"styles":[1]}]);
26361
26375
  const MyComponent = /*@__PURE__*/proxyCustomElement(MyComponent$1, [1,"my-component",{"first":[1],"middle":[1],"last":[1]}]);
26362
26376
  const PtcAccordion = /*@__PURE__*/proxyCustomElement(PtcAccordion$1, [1,"ptc-accordion",{"multiple":[4],"theme":[1]},[[0,"opened","openHandler"]]]);
26363
- const PtcAccordionItem = /*@__PURE__*/proxyCustomElement(PtcAccordionItem$1, [1,"ptc-accordion-item",{"heading":[1],"headingTag":[1,"heading-tag"],"autoHeight":[4,"auto-height"],"active":[1540],"theme":[1537],"hasHeadingSlot":[32],"hasArrowSlot":[32]}]);
26377
+ const PtcAccordionItem = /*@__PURE__*/proxyCustomElement(PtcAccordionItem$1, [1,"ptc-accordion-item",{"heading":[1],"headingTag":[1,"heading-tag"],"autoHeight":[4,"auto-height"],"active":[1540],"theme":[1537],"styles":[1],"hasHeadingSlot":[32],"hasArrowSlot":[32]}]);
26364
26378
  const PtcAnnouncement = /*@__PURE__*/proxyCustomElement(PtcAnnouncement$1, [1,"ptc-announcement",{"barTitle":[1025,"bar-title"],"description":[1025],"linkText":[513,"link-text"],"linkTitle":[513,"link-title"],"visible":[1540],"linkUrl":[1537,"link-url"],"insideContainer":[4,"inside-container"],"target":[1025],"customMaxLines":[2,"custom-max-lines"],"moreText":[1,"more-text"],"windowSize":[32]},[[9,"resize","handleResize"]]]);
26365
26379
  const PtcBackToTop = /*@__PURE__*/proxyCustomElement(PtcBackToTop$1, [1,"ptc-back-to-top",{"showButton":[32]},[[0,"click","handleClick"]]]);
26366
26380
  const PtcBackgroundVideo = /*@__PURE__*/proxyCustomElement(PtcBackgroundVideo$1, [1,"ptc-background-video",{"videoSrc":[1,"video-src"],"posterSrc":[1,"poster-src"],"overlay":[4],"playButtonTitle":[1,"play-button-title"],"pauseButtonTitle":[1,"pause-button-title"],"type":[1],"isIframe":[4,"is-iframe"],"paused":[32]}]);
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-62587d0b.js';
2
- import { g as getLanguageFromURL } from './utils-ff66a908.js';
2
+ import { g as getLanguageFromURL, a as getSeoTagType } from './utils-063d1a12.js';
3
3
 
4
4
  const embeddedFormCss = ":host{display:block}.flex-adjustments{display:flex;justify-content:center}@media only screen and (min-width: 768px){.flex-adjustments{justify-content:flex-end}}.embedded-form-container{background-color:#142D48}.ptc-embedded-form.form-wrapper{max-width:361px;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;justify-content:center}@media only screen and (min-width: 480px){.ptc-embedded-form.form-wrapper{width:361px}}@keyframes rollUp{from{height:auto;opacity:1}to{height:0;opacity:0}}.ptc-form-roll-up{animation:rollUp 1s forwards;}";
5
5
 
@@ -102,7 +102,7 @@ const EmbeddedForm = class {
102
102
  }
103
103
  render() {
104
104
  const formClass = this.isSubmitted ? "ptc-form-roll-up" : "";
105
- return (h(Host, null, h("div", { class: "ptc-container ptc-section-standard flex-adjustments" }, h("div", { class: "form-wrapper ptc-embedded-form" }, 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), class: formClass }, h("div", { id: "not-me-link-id" }), h("div", { id: "not-me-additional-top", class: "not-me-additional-text" }), 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": "company", "label-text": "Company*", type: "text", "ptc-data-eloqua-name": "C_Company", "field-name": "company" }), h("ptc-textfield", { "field-id": "contact-email", "label-text": "Email*", type: "email", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "email", "info-text": "Please include @ in the email address" }), h("ptc-select", { "field-id": "contact-country", label: "Country*", "ptc-data-eloqua-name": "C_Country", "field-name": "country", "default-value": "USA" }, 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-phone", "label-text": "Phone*", type: "tel", "ptc-data-eloqua-name": "C_BusPhone", "field-name": "phone" }), h("ptc-select", { label: "What information are you interested in?*", "ptc-data-eloqua-name": "Inquiry_Reason", "field-name": "inquiryreason", "field-id": "contact-inquiry", "info-text": "info text example." }, 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": "Augmented Reality (AR)" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Augmented Reality (AR)")), h("li", { class: "mdc-list-item", "data-value": "CAD" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Computer Aided Design")), h("li", { class: "mdc-list-item", "data-value": "Retail(FlexPLM)" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Fashion and Retail Product Lifecycle Management")))), h("ptc-textfield", { "field-id": "self-reporting", "label-text": "How can we help you?*", type: "text", "ptc-data-eloqua-name": "HowHearSelfReport", "ptc-max-length": "100", "field-name": "howhearselfreport" }), h("ptc-textfield", { type: "hidden", "ptc-data-eloqua-name": "test", "input-value": "test" }), h("ptc-form-checkbox", { label: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nec ultricies risus. Praesent suscipit mauris vel augue facilisis, nec consequat ipsum placerat. Curabitur nisi elit, dignissim tincidunt tincidunt at, vehicula sit amet nisl. Maecenas sodales est vulputate ex feugiat tincidunt.", "checkbox-id": "policy1" }), h("div", { id: "not-me-additional-bottom", class: "not-me-additional-text" }), h("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; margin-top: 12px; display:block; text-align:right;}" }, "Submit"))))));
105
+ return (h(Host, null, h("div", { class: "ptc-container ptc-section-standard flex-adjustments" }, h("div", { class: "form-wrapper ptc-embedded-form" }, 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" }, h("h2", null, "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), class: formClass }, h("div", { id: "not-me-link-id" }), h("div", { id: "not-me-additional-top", class: "not-me-additional-text" }), 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": "company", "label-text": "Company*", type: "text", "ptc-data-eloqua-name": "C_Company", "field-name": "company" }), h("ptc-textfield", { "field-id": "contact-email", "label-text": "Email*", type: "email", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "email", "info-text": "Please include @ in the email address" }), h("ptc-select", { "field-id": "contact-country", label: "Country*", "ptc-data-eloqua-name": "C_Country", "field-name": "country", "default-value": "USA" }, 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-phone", "label-text": "Phone*", type: "tel", "ptc-data-eloqua-name": "C_BusPhone", "field-name": "phone" }), h("ptc-select", { label: "What information are you interested in?*", "ptc-data-eloqua-name": "Inquiry_Reason", "field-name": "inquiryreason", "field-id": "contact-inquiry", "info-text": "info text example." }, 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": "Augmented Reality (AR)" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Augmented Reality (AR)")), h("li", { class: "mdc-list-item", "data-value": "CAD" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Computer Aided Design")), h("li", { class: "mdc-list-item", "data-value": "Retail(FlexPLM)" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Fashion and Retail Product Lifecycle Management")))), h("ptc-textfield", { "field-id": "self-reporting", "label-text": "How can we help you?*", type: "text", "ptc-data-eloqua-name": "HowHearSelfReport", "ptc-max-length": "100", "field-name": "howhearselfreport" }), h("ptc-textfield", { type: "hidden", "ptc-data-eloqua-name": "test", "input-value": "test" }), h("ptc-form-checkbox", { label: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nec ultricies risus. Praesent suscipit mauris vel augue facilisis, nec consequat ipsum placerat. Curabitur nisi elit, dignissim tincidunt tincidunt at, vehicula sit amet nisl. Maecenas sodales est vulputate ex feugiat tincidunt.", "checkbox-id": "policy1" }), h("div", { id: "not-me-additional-bottom", class: "not-me-additional-text" }), h("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; margin-top: 12px; display:block; text-align:right;}" }, "Submit"))))));
106
106
  }
107
107
  get el() { return getElement(this); }
108
108
  };
@@ -11699,23 +11699,31 @@ const PtcTextfield = class {
11699
11699
  inputBlurHandler() {
11700
11700
  // console.log(event.target)
11701
11701
  // this.getPhoneValidation();
11702
- if (this.customValidation) {
11703
- let message = this.customValidation(this.customInput);
11704
- this.customInput.setCustomValidity(message);
11705
- this.customInput.checkValidity();
11706
- this.infoText = message;
11707
- this.setErrorBackground();
11708
- }
11709
- else {
11710
- this.setErrorBackground();
11711
- setTimeout(() => {
11712
- this.getPhoneValidation();
11713
- }, 100);
11714
- }
11702
+ this.validateTextField();
11715
11703
  }
11716
11704
  async syncCountry(countryCode) {
11717
11705
  this.iti.setCountry(countryCode);
11718
11706
  }
11707
+ async validateTextField() {
11708
+ if (this.customInput) {
11709
+ if (this.customValidation) {
11710
+ let message = this.customValidation(this.customInput);
11711
+ this.customInput.setCustomValidity(message);
11712
+ this.customInput.checkValidity();
11713
+ this.infoText = message;
11714
+ this.setErrorBackground();
11715
+ this.setHelperText();
11716
+ }
11717
+ else {
11718
+ this.setErrorBackground();
11719
+ this.setHelperText();
11720
+ setTimeout(() => {
11721
+ this.getPhoneValidation();
11722
+ }, 100);
11723
+ }
11724
+ this.mdcTextfieldComponent.valid = this.customInput.checkValidity();
11725
+ }
11726
+ }
11719
11727
  componentWillLoad() {
11720
11728
  this.language = getLanguageFromURL();
11721
11729
  }
@@ -11746,27 +11754,38 @@ const PtcTextfield = class {
11746
11754
  }
11747
11755
  }
11748
11756
  getValidationMessage(type) {
11749
- // console.log("lang type: " + type);
11757
+ // console.log("lang: " + this.language);
11758
+ // console.log("type: " + type);
11750
11759
  return ValidationMessages[this.language][type];
11751
11760
  }
11752
11761
  getPhoneValidation() {
11753
11762
  if (this.fieldId === 'contact-phone' && this.fieldName === 'phone') {
11754
- if (this.iti.isValidNumber()) {
11763
+ if (!this.required && this.inputValue === '') {
11755
11764
  if (this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
11756
11765
  this.mdcTextfield.classList.remove('mdc-text-field--invalid');
11757
11766
  }
11758
11767
  if (this.el.classList.contains('invalid-field')) {
11759
11768
  this.el.classList.remove('invalid-field');
11760
11769
  }
11761
- this.inputValue = this.iti.getNumber();
11762
- // console.log('sending phone number: ' + this.inputValue);
11763
11770
  }
11764
- else if (!this.iti.isValidNumber()) {
11765
- if (!this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
11766
- this.mdcTextfield.classList.add('mdc-text-field--invalid');
11771
+ else {
11772
+ if (this.iti.isValidNumber()) {
11773
+ if (this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
11774
+ this.mdcTextfield.classList.remove('mdc-text-field--invalid');
11775
+ }
11776
+ if (this.el.classList.contains('invalid-field')) {
11777
+ this.el.classList.remove('invalid-field');
11778
+ }
11779
+ this.inputValue = this.iti.getNumber();
11780
+ // console.log('sending phone number: ' + this.inputValue);
11767
11781
  }
11768
- if (!this.el.classList.contains('invalid-field')) {
11769
- this.el.classList.add('invalid-field');
11782
+ else if (!this.iti.isValidNumber()) {
11783
+ if (!this.mdcTextfield.classList.contains('mdc-text-field--invalid')) {
11784
+ this.mdcTextfield.classList.add('mdc-text-field--invalid');
11785
+ }
11786
+ if (!this.el.classList.contains('invalid-field')) {
11787
+ this.el.classList.add('invalid-field');
11788
+ }
11770
11789
  }
11771
11790
  }
11772
11791
  }
@@ -11832,7 +11851,7 @@ const PtcTextfield = class {
11832
11851
  }
11833
11852
  else if (this.fieldId === 'contact-phone') {
11834
11853
  if (this.iti) {
11835
- if (this.inputValue === '') {
11854
+ if (this.inputValue === '' && this.required) {
11836
11855
  this.helpertext = this.getValidationMessage('tel');
11837
11856
  }
11838
11857
  else if (!this.iti.isValidNumber()) {
@@ -11881,27 +11900,8 @@ const PtcTitle = class {
11881
11900
  render() {
11882
11901
  const classMap = this.getCssClassMap();
11883
11902
  const cutOff = this.getLineCuttoff();
11884
- let TagType;
11885
- switch (this.type) {
11886
- case 'h1':
11887
- TagType = 'h1';
11888
- break;
11889
- case 'h3':
11890
- TagType = 'h3';
11891
- break;
11892
- case 'h4':
11893
- TagType = 'h4';
11894
- break;
11895
- case 'h5':
11896
- TagType = 'h5';
11897
- break;
11898
- case 'h6':
11899
- TagType = 'h6';
11900
- break;
11901
- default:
11902
- TagType = 'h2';
11903
- }
11904
- return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap }, h(TagType, { style: cutOff }, h("slot", null)))));
11903
+ const [TagType, firstChild] = getSeoTagType(this.el);
11904
+ return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap }, h(TagType, { innerHTML: firstChild.innerHTML, style: cutOff }, h("slot", null)))));
11905
11905
  }
11906
11906
  getCssClassMap() {
11907
11907
  return {
@@ -11927,6 +11927,7 @@ const PtcTitle = class {
11927
11927
  }
11928
11928
  return result;
11929
11929
  }
11930
+ get el() { return getElement(this); }
11930
11931
  };
11931
11932
  PtcTitle.style = ptcTitleCss;
11932
11933