@ptcwebops/ptcw-design 6.3.8-beta → 6.3.8
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-1b8ad4d2.js +1819 -0
- package/dist/cjs/{component-4dd13907.js → component-35540bfb.js} +1494 -3305
- package/dist/cjs/event-jumbotron-example.cjs.entry.js +36 -3
- package/dist/cjs/featured-list.cjs.entry.js +1 -1
- package/dist/cjs/innovator-toggle-container.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-bio-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-card_2.cjs.entry.js +3 -4
- package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1 -1
- package/dist/cjs/ptc-close-icon_2.cjs.entry.js +6 -12
- package/dist/cjs/ptc-countdown.cjs.entry.js +32 -28
- package/dist/cjs/ptc-data-lookup.cjs.entry.js +2 -1
- package/dist/cjs/ptc-featured-list.cjs.entry.js +1 -1
- package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +1 -1
- package/dist/cjs/{ptc-form-checkbox_4.cjs.entry.js → ptc-form-checkbox_2.cjs.entry.js} +5 -789
- package/dist/cjs/ptc-icon-card-slider-example.cjs.entry.js +82 -0
- package/dist/cjs/ptc-jumbotron.cjs.entry.js +3 -2
- package/dist/cjs/ptc-multi-select_2.cjs.entry.js +672 -0
- package/dist/cjs/ptc-office-locations.cjs.entry.js +13 -3
- package/dist/cjs/ptc-para.cjs.entry.js +1 -1
- package/dist/cjs/ptc-podcast-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-previous-url.cjs.entry.js +2 -10
- package/dist/cjs/ptc-product-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-product-category.cjs.entry.js +1 -1
- package/dist/cjs/ptc-product-highlight-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-readmore-char.cjs.entry.js +1 -1
- package/dist/cjs/ptc-readmore-v3.cjs.entry.js +1 -1
- package/dist/cjs/ptc-tooltip-v2.cjs.entry.js +1 -1
- package/dist/cjs/ptc-value-led-speed-bump.cjs.entry.js +1 -1
- package/dist/cjs/ptc-white-paper.cjs.entry.js +4 -10
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/cjs/validation-messages-33a4f26b.js +126 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/icon-asset/media/designer-v6.0.6.svg +2 -30
- package/dist/collection/components/innovator-toggle-container/innovator-toggle-container.css +6 -6
- package/dist/collection/components/organism-bundles/bundle-featured-list/featured-list.css +3 -3
- package/dist/collection/components/organism-bundles/event-jumbotron-example/event-jumbotron-example.css +8 -4
- package/dist/collection/components/organism-bundles/event-jumbotron-example/event-jumbotron-example.js +35 -2
- package/dist/collection/components/organism-bundles/ptc-icon-card-slider-example/ptc-icon-card-slider-example.css +1143 -0
- package/dist/collection/components/organism-bundles/ptc-icon-card-slider-example/ptc-icon-card-slider-example.js +77 -0
- package/dist/collection/components/ptc-bio-card/ptc-bio-card.css +6 -6
- package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +6 -6
- package/dist/collection/components/ptc-countdown/ptc-countdown.css +1 -1
- package/dist/collection/components/ptc-countdown/ptc-countdown.js +33 -28
- package/dist/collection/components/ptc-featured-list/ptc-featured-list.css +6 -6
- package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.css +6 -6
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +24 -6
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +20 -1
- package/dist/collection/components/ptc-modal/ptc-modal.css +4 -8
- package/dist/collection/components/ptc-modal/ptc-modal.js +7 -31
- package/dist/collection/components/ptc-office-locations/ptc-office-locations.js +15 -4
- package/dist/collection/components/ptc-para/ptc-para.css +0 -3
- package/dist/collection/components/ptc-para/ptc-para.js +2 -2
- package/dist/collection/components/ptc-podcast-card/ptc-podcast-card.css +6 -6
- package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.js +3 -4
- package/dist/collection/components/ptc-previous-url/ptc-previous-url.css +0 -16
- package/dist/collection/components/ptc-previous-url/ptc-previous-url.js +1 -27
- package/dist/collection/components/ptc-product-card/ptc-product-card.css +6 -6
- package/dist/collection/components/ptc-product-category/ptc-product-category.css +6 -6
- package/dist/collection/components/ptc-product-highlight-card/ptc-product-highlight-card.css +6 -6
- package/dist/collection/components/ptc-readmore-char/ptc-readmore-char.css +6 -6
- package/dist/collection/components/ptc-readmore-v3/ptc-readmore-v3.css +6 -6
- package/dist/collection/components/ptc-textfield/ptc-textfield.js +1 -1
- package/dist/collection/components/ptc-tooltip-v2/ptc-tooltip-v2.css +6 -6
- package/dist/collection/components/ptc-value-led-speed-bump/ptc-value-led-speed-bump.css +6 -6
- package/dist/collection/components/ptc-white-paper/ptc-white-paper.css +6 -6
- package/dist/collection/components/ptc-white-paper/ptc-white-paper.js +3 -9
- package/dist/custom-elements/index.d.ts +6 -6
- package/dist/custom-elements/index.js +195 -184
- package/dist/esm/{component-9c921cc6.js → component-8c53e377.js} +1482 -3281
- package/dist/esm/component-9beac35b.js +1802 -0
- package/dist/esm/event-jumbotron-example.entry.js +36 -3
- package/dist/esm/featured-list.entry.js +1 -1
- package/dist/esm/innovator-toggle-container.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-bio-card.entry.js +1 -1
- package/dist/esm/ptc-card_2.entry.js +3 -4
- package/dist/esm/ptc-case-studies-slider.entry.js +1 -1
- package/dist/esm/ptc-close-icon_2.entry.js +6 -12
- package/dist/esm/ptc-countdown.entry.js +32 -28
- package/dist/esm/ptc-data-lookup.entry.js +2 -1
- package/dist/esm/ptc-featured-list.entry.js +1 -1
- package/dist/esm/ptc-filter-level-theater.entry.js +1 -1
- package/dist/esm/{ptc-form-checkbox_4.entry.js → ptc-form-checkbox_2.entry.js} +4 -786
- package/dist/esm/ptc-icon-card-slider-example.entry.js +78 -0
- package/dist/esm/ptc-jumbotron.entry.js +3 -2
- package/dist/esm/ptc-multi-select_2.entry.js +667 -0
- package/dist/esm/ptc-office-locations.entry.js +13 -3
- package/dist/esm/ptc-para.entry.js +1 -1
- package/dist/esm/ptc-podcast-card.entry.js +1 -1
- package/dist/esm/ptc-previous-url.entry.js +2 -10
- package/dist/esm/ptc-product-card.entry.js +1 -1
- package/dist/esm/ptc-product-category.entry.js +1 -1
- package/dist/esm/ptc-product-highlight-card.entry.js +1 -1
- package/dist/esm/ptc-readmore-char.entry.js +1 -1
- package/dist/esm/ptc-readmore-v3.entry.js +1 -1
- package/dist/esm/ptc-tooltip-v2.entry.js +1 -1
- package/dist/esm/ptc-value-led-speed-bump.entry.js +1 -1
- package/dist/esm/ptc-white-paper.entry.js +5 -11
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/esm/validation-messages-adbb6518.js +124 -0
- package/dist/ptcw-design/media/designer-v6.0.6.svg +2 -30
- package/dist/ptcw-design/p-00e21489.entry.js +1 -0
- package/dist/ptcw-design/p-15758793.entry.js +1 -0
- package/dist/ptcw-design/p-18a5a338.js +1 -0
- package/dist/ptcw-design/{p-d73cc053.entry.js → p-18ac526f.entry.js} +1 -1
- package/dist/ptcw-design/p-2b32297b.entry.js +1 -0
- package/dist/ptcw-design/p-2cb2de0f.entry.js +1 -0
- package/dist/ptcw-design/p-38b782e8.entry.js +1 -0
- package/dist/ptcw-design/{p-445329ed.entry.js → p-4d8f6f46.entry.js} +1 -1
- package/dist/ptcw-design/p-51a45b13.entry.js +1 -0
- package/dist/ptcw-design/p-593b8eff.entry.js +1 -0
- package/dist/ptcw-design/p-5dae4f30.entry.js +1 -0
- package/dist/ptcw-design/p-73a853fc.entry.js +1 -0
- package/dist/ptcw-design/p-752bba1c.entry.js +1 -0
- package/dist/ptcw-design/{p-0de4cd11.entry.js → p-75988f52.entry.js} +1 -1
- package/dist/ptcw-design/{p-072aa896.entry.js → p-7fb155da.entry.js} +1 -1
- package/dist/ptcw-design/p-98426799.js +203 -0
- package/dist/ptcw-design/p-98844b50.js +134 -0
- package/dist/ptcw-design/{p-21aa746d.entry.js → p-9f194554.entry.js} +1 -1
- package/dist/ptcw-design/p-a58698ca.entry.js +1 -0
- package/dist/ptcw-design/{p-0b515839.entry.js → p-a791c53a.entry.js} +1 -1
- package/dist/ptcw-design/p-ab3d2934.entry.js +1 -0
- package/dist/ptcw-design/p-acdd9a1d.entry.js +1 -0
- package/dist/ptcw-design/p-ad821a01.entry.js +1 -0
- package/dist/ptcw-design/p-bab5bb88.entry.js +1 -0
- package/dist/ptcw-design/p-c8f68292.entry.js +1 -0
- package/dist/ptcw-design/{p-3dd0ded9.entry.js → p-d089dc37.entry.js} +1 -1
- package/dist/ptcw-design/p-d66debb3.entry.js +1 -0
- package/dist/ptcw-design/p-dd02e4d6.entry.js +68 -0
- package/dist/ptcw-design/p-e5369c4d.entry.js +1 -0
- package/dist/ptcw-design/p-f9256e3d.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +2 -2
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/organism-bundles/event-jumbotron-example/event-jumbotron-example.d.ts +2 -0
- package/dist/types/components/organism-bundles/ptc-icon-card-slider-example/ptc-icon-card-slider-example.d.ts +10 -0
- package/dist/types/components/ptc-jumbotron/ptc-jumbotron.d.ts +1 -0
- package/dist/types/components/ptc-modal/ptc-modal.d.ts +1 -2
- package/dist/types/components/ptc-office-locations/ptc-office-locations.d.ts +1 -0
- package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
- package/dist/types/components/ptc-previous-url/ptc-previous-url.d.ts +0 -2
- package/dist/types/components/ptc-white-paper/ptc-white-paper.d.ts +0 -1
- package/dist/types/components.d.ts +19 -21
- package/package.json +1 -1
- package/readme.md +1 -5
- package/dist/cjs/modal-form-example.cjs.entry.js +0 -94
- package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.css +0 -26
- package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.js +0 -99
- package/dist/collection/stories/organisms/eSupport/CaseTracker/preview.stories.js +0 -45
- package/dist/collection/stories/organisms/eSupport/SupportArticle/preview.stories.js +0 -47
- package/dist/collection/stories/organisms/eSupport/SupportPage/preview.stories.js +0 -157
- package/dist/esm/modal-form-example.entry.js +0 -90
- package/dist/ptcw-design/p-045a9460.entry.js +0 -1
- package/dist/ptcw-design/p-08b281d1.entry.js +0 -68
- package/dist/ptcw-design/p-0d223232.entry.js +0 -1
- package/dist/ptcw-design/p-32f64f48.entry.js +0 -1
- package/dist/ptcw-design/p-42992202.entry.js +0 -1
- package/dist/ptcw-design/p-67c248ec.entry.js +0 -1
- package/dist/ptcw-design/p-75390f63.entry.js +0 -1
- package/dist/ptcw-design/p-799afee5.entry.js +0 -1
- package/dist/ptcw-design/p-94f99d2d.entry.js +0 -1
- package/dist/ptcw-design/p-9501995f.entry.js +0 -1
- package/dist/ptcw-design/p-a3b57ede.entry.js +0 -1
- package/dist/ptcw-design/p-b83be524.entry.js +0 -1
- package/dist/ptcw-design/p-baff4d44.entry.js +0 -1
- package/dist/ptcw-design/p-bcab66bf.js +0 -336
- package/dist/ptcw-design/p-bd6af63e.entry.js +0 -1
- package/dist/ptcw-design/p-de960790.entry.js +0 -1
- package/dist/ptcw-design/p-e4295b30.entry.js +0 -1
- package/dist/ptcw-design/p-e6a272d9.entry.js +0 -1
- package/dist/ptcw-design/p-f4eb6d0a.entry.js +0 -1
- package/dist/ptcw-design/p-fe40421e.entry.js +0 -1
- package/dist/types/components/organism-bundles/form/modal-from-example/modal-form-example.d.ts +0 -25
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-63ddc79c.js');
|
|
6
|
-
|
|
7
|
-
const modalFormExampleCss = ":host {\r\n display: block;\r\n}\r\n\r\n.form-wrapper {\r\n width: 371px;\r\n display: flex;\r\n border-radius: 3px;\r\n background: #FFF;\r\n flex-direction: column;\r\n align-items: center;\r\n padding: 0px 32px;\r\n\r\n @media only screen and (min-width: 360px) and (max-width: 479.55px) {\r\n max-width: 360px;\r\n width: 360px;\r\n }\r\n\r\n .button-wrapper {\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 20px;\r\n margin-top: 48px;\r\n flex-wrap: wrap;\r\n }\r\n}\r\n";
|
|
8
|
-
|
|
9
|
-
const PtcForm = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.formData = {
|
|
13
|
-
email: '',
|
|
14
|
-
firstName: '',
|
|
15
|
-
lastName: '',
|
|
16
|
-
company: '',
|
|
17
|
-
country: '',
|
|
18
|
-
phone: '',
|
|
19
|
-
inquiryReason: '',
|
|
20
|
-
howhearselfreport: '',
|
|
21
|
-
policyChecked: false,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
// private countryEle: HTMLPtcSelectElement;
|
|
25
|
-
// private inquiryreasonEle: HTMLPtcTextfieldElement;
|
|
26
|
-
// private howhearselfreport: HTMLPtcTextfieldElement;
|
|
27
|
-
componentDidLoad() {
|
|
28
|
-
this.formButton = this.el.querySelector('.form-submit');
|
|
29
|
-
this.formButton.addEventListener('click', this.handleSubmit.bind(this));
|
|
30
|
-
//get Email
|
|
31
|
-
this.emailEle = this.el.querySelector('ptc-textfield[field-id="contact-email"]');
|
|
32
|
-
this.firstNameEle = this.el.querySelector('ptc-textfield[field-id="contact-firstname"]');
|
|
33
|
-
this.lastNameEle = this.el.querySelector('ptc-textfield[field-id="contact-lastname"]');
|
|
34
|
-
this.companyEle = this.el.querySelector('ptc-textfield[field-id="company"]');
|
|
35
|
-
this.phoneEle = this.el.querySelector('ptc-textfield[field-id="contact-phone"]');
|
|
36
|
-
// this.countryEle = this.el.querySelector('ptc-select[field-id="contact-country"]')
|
|
37
|
-
// this.inquiryreasonEle = this.el.querySelector('ptc-textfield[field-id="contact-inquiry"]')
|
|
38
|
-
// this.howhearselfreport = this.el.querySelector('ptc-textfield[field-id="self-reporting"]')
|
|
39
|
-
}
|
|
40
|
-
handleInputChange(field, value) {
|
|
41
|
-
this.formData = Object.assign(Object.assign({}, this.formData), { [field]: value });
|
|
42
|
-
}
|
|
43
|
-
handleSubmit(event) {
|
|
44
|
-
event.preventDefault();
|
|
45
|
-
this.formData.email = this.emailEle.inputValue;
|
|
46
|
-
this.formData.firstName = this.firstNameEle.inputValue;
|
|
47
|
-
this.formData.lastName = this.lastNameEle.inputValue;
|
|
48
|
-
this.formData.company = this.companyEle.inputValue;
|
|
49
|
-
this.formData.phone = this.phoneEle.inputValue;
|
|
50
|
-
// this.formData.country = this.countryEle.inputValue;
|
|
51
|
-
// this.formData.inquiryReason= this.inquiryreasonEle.inputValue;
|
|
52
|
-
// this.formData.howhearselfreport = this.howhearselfreport.inputValue;
|
|
53
|
-
// console.log("get form Data: " + this.formData.email)
|
|
54
|
-
if (this.isValid()) {
|
|
55
|
-
const formSubmitEvent = new CustomEvent('formSubmit', {
|
|
56
|
-
detail: this.formData,
|
|
57
|
-
bubbles: true,
|
|
58
|
-
});
|
|
59
|
-
this.el.dispatchEvent(formSubmitEvent);
|
|
60
|
-
console.log('Form Submitted: ' + this.formData);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
console.log('Form validation failed');
|
|
64
|
-
console.log('Form Submitted: ' + this.formData.email, this.formData.firstName, this.formData.lastName, this.formData.company, this.formData.phone);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
isValid() {
|
|
68
|
-
const { email, firstName, lastName, company, country, phone, inquiryReason, howhearselfreport, policyChecked } = this.formData;
|
|
69
|
-
const invalidLength = document.querySelectorAll('.invalid-field').length;
|
|
70
|
-
// console.log('invalid fields length: ' + invalidLength), check the select field
|
|
71
|
-
return (email !== '' &&
|
|
72
|
-
phone !== '' &&
|
|
73
|
-
firstName !== '' &&
|
|
74
|
-
lastName !== '' &&
|
|
75
|
-
company !== '' &&
|
|
76
|
-
country !== '' &&
|
|
77
|
-
inquiryReason !== '' &&
|
|
78
|
-
howhearselfreport != '' &&
|
|
79
|
-
policyChecked &&
|
|
80
|
-
invalidLength === 0);
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
const multiSelectItems = [
|
|
84
|
-
{ text: 'Item 1', selected: false, ptcDataEloquaName: 'item_1', ptcDataTargetEloquaName: 'item_target-1' },
|
|
85
|
-
{ text: 'Item 2', selected: false, ptcDataEloquaName: 'item_2', ptcDataTargetEloquaName: 'item_target-2' },
|
|
86
|
-
{ text: 'Item 3', selected: false, ptcDataEloquaName: 'item_3', ptcDataTargetEloquaName: 'item_target-3' }
|
|
87
|
-
];
|
|
88
|
-
return (index.h(index.Host, null, index.h("div", { class: "ptc-container u-flex u-flex-justify-center" }, index.h("div", { class: "form-wrapper" }, index.h("ptc-title", { "seo-compatibility-mode": true, "text-align": "left", "title-color": "gray", upperline: "no-upperline", "title-display": "inline-block", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-7", "is-plm-hub": "false", "title-size": "medium" }, index.h("h2", null, "PTC\u2019s PLM application suite combines the power of Windchill, the industry\u2019s #1 PLM software with Thingworx")), index.h("ptc-spacer", { size: "x-small", breakpoint: "small" }), index.h("ptc-spacer", { size: "small", breakpoint: "x-small" }), index.h("ptc-para", { "seo-compatibility-mode": true, "font-size": "x-small", "font-weight": "w-4", "para-margin": "margin-flush", "para-style": "main", "para-line-h": "line-height-densest" }, "PTC\u2019s market-leading, purpose-built IIoT platform. The suite offers a mix of Packages, Add-Ons, and Apps to best suit your business needs:"), index.h("ptc-spacer", { size: "x-small", breakpoint: "small" }), index.h("ptc-spacer", { size: "small", breakpoint: "x-small" }), index.h("max-width-container", { "max-width": "277", breakpoint: 480 }, index.h("ptc-title", { type: "h2", "text-align": "", "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."), index.h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), index.h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), index.h("ptc-spacer", { breakpoint: "small", size: "small" }), index.h("ptc-spacer", { breakpoint: "small", size: "small" })), index.h("form", { onSubmit: event => this.handleSubmit(event) }, index.h("ptc-textfield", { "field-id": "contact-firstname", "label-text": "First Name*", type: "text", "ptc-data-eloqua-name": "C_FirstName", "field-name": "firstname" }), index.h("ptc-textfield", { "field-id": "contact-lastname", "label-text": "Last Name*", type: "text", "ptc-data-eloqua-name": "C_LastName", "field-name": "lastname" }), index.h("ptc-textfield", { "field-id": "company", "label-text": "Company*", type: "text", "ptc-data-eloqua-name": "C_Company", "field-name": "company" }), index.h("ptc-textfield", { "field-id": "contact-email", "label-text": "Email*", type: "email", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "email" }), index.h("ptc-textfield", { "field-id": "company-email", "label-text": "Company Email*", type: "email", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "companyemail" }), index.h("ptc-select", { "field-id": "contact-country", label: "Country*", "ptc-data-eloqua-name": "C_Country", "field-name": "country" }, index.h("ul", { class: "mdc-list" }, index.h("li", { class: "mdc-list-item placehoder-li", "data-value": "" }, index.h("span", { class: "mdc-list-item__ripple" }), index.h("span", { class: "mdc-list-item__text" }, "Select a country")), index.h("li", { class: "mdc-list-item", "data-value": "USA" }, index.h("span", { class: "mdc-list-item__ripple" }), index.h("span", { class: "mdc-list-item__text" }, "USA")), index.h("li", { class: "mdc-list-item", "data-value": "Canada" }, index.h("span", { class: "mdc-list-item__ripple" }), index.h("span", { class: "mdc-list-item__text" }, "Canada")), index.h("li", { class: "mdc-list-item", "data-value": "China" }, index.h("span", { class: "mdc-list-item__ripple" }), index.h("span", { class: "mdc-list-item__text" }, "China")))), index.h("ptc-textfield", { "field-id": "contact-phone", "label-text": "Phone*", type: "tel", "ptc-data-eloqua-name": "C_BusPhone", "field-name": "phone" }), index.h("ptc-select", { label: "What information are you interested in?*", "ptc-data-eloqua-name": "Inquiry_Reason", "field-name": "inquiryreason", "field-id": "contact-inquiry" }, index.h("ul", { class: "mdc-list" }, index.h("li", { class: "mdc-list-item", "data-value": "Please select a value" }, index.h("span", { class: "mdc-list-item__ripple" })), index.h("li", { class: "mdc-list-item", "data-value": "Augmented Reality (AR)" }, index.h("span", { class: "mdc-list-item__ripple" }), index.h("span", { class: "mdc-list-item__text" }, "Augmented Reality (AR)")), index.h("li", { class: "mdc-list-item", "data-value": "CAD" }, index.h("span", { class: "mdc-list-item__ripple" }), index.h("span", { class: "mdc-list-item__text" }, "Computer Aided Design")), index.h("li", { class: "mdc-list-item", "data-value": "Retail(FlexPLM)" }, index.h("span", { class: "mdc-list-item__ripple" }), index.h("span", { class: "mdc-list-item__text" }, "Fashion and Retail Product Lifecycle Management")))), index.h("ptc-multi-select", { items: multiSelectItems, "is-required": 'true' }), index.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" }), index.h("ptc-form-checkbox", { label: "I agree to the policy", "checkbox-id": "test" }), index.h("div", { class: "button-wrapper" }, index.h("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; display:block; float: left; width: fit-content;}" }, "Submit"), index.h("ptc-button", { class: "form-close", color: "ptc-tertiary", type: "button", styles: ":host{align-self:flex-end; display:block; float: left; width: fit-content;}" }, "Cancel")))))));
|
|
89
|
-
}
|
|
90
|
-
get el() { return index.getElement(this); }
|
|
91
|
-
};
|
|
92
|
-
PtcForm.style = modalFormExampleCss;
|
|
93
|
-
|
|
94
|
-
exports.modal_form_example = PtcForm;
|
package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.css
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.form-wrapper {
|
|
6
|
-
width: 371px;
|
|
7
|
-
display: flex;
|
|
8
|
-
border-radius: 3px;
|
|
9
|
-
background: #FFF;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
padding: 0px 32px;
|
|
13
|
-
|
|
14
|
-
@media only screen and (min-width: 360px) and (max-width: 479.55px) {
|
|
15
|
-
max-width: 360px;
|
|
16
|
-
width: 360px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.button-wrapper {
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: flex-end;
|
|
22
|
-
gap: 20px;
|
|
23
|
-
margin-top: 48px;
|
|
24
|
-
flex-wrap: wrap;
|
|
25
|
-
}
|
|
26
|
-
}
|
package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { Host, h } from '@stencil/core';
|
|
2
|
-
export class PtcForm {
|
|
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
|
-
const multiSelectItems = [
|
|
76
|
-
{ text: 'Item 1', selected: false, ptcDataEloquaName: 'item_1', ptcDataTargetEloquaName: 'item_target-1' },
|
|
77
|
-
{ text: 'Item 2', selected: false, ptcDataEloquaName: 'item_2', ptcDataTargetEloquaName: 'item_target-2' },
|
|
78
|
-
{ text: 'Item 3', selected: false, ptcDataEloquaName: 'item_3', ptcDataTargetEloquaName: 'item_target-3' }
|
|
79
|
-
];
|
|
80
|
-
return (h(Host, null, h("div", { class: "ptc-container u-flex u-flex-justify-center" }, h("div", { class: "form-wrapper" }, h("ptc-title", { "seo-compatibility-mode": true, "text-align": "left", "title-color": "gray", upperline: "no-upperline", "title-display": "inline-block", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-7", "is-plm-hub": "false", "title-size": "medium" }, h("h2", null, "PTC\u2019s PLM application suite combines the power of Windchill, the industry\u2019s #1 PLM software with Thingworx")), h("ptc-spacer", { size: "x-small", breakpoint: "small" }), h("ptc-spacer", { size: "small", breakpoint: "x-small" }), h("ptc-para", { "seo-compatibility-mode": true, "font-size": "x-small", "font-weight": "w-4", "para-margin": "margin-flush", "para-style": "main", "para-line-h": "line-height-densest" }, "PTC\u2019s market-leading, purpose-built IIoT platform. The suite offers a mix of Packages, Add-Ons, and Apps to best suit your business needs:"), h("ptc-spacer", { size: "x-small", breakpoint: "small" }), h("ptc-spacer", { size: "small", breakpoint: "x-small" }), h("max-width-container", { "max-width": "277", breakpoint: 480 }, h("ptc-title", { type: "h2", "text-align": "", "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": "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" }), h("ptc-textfield", { "field-id": "company-email", "label-text": "Company Email*", type: "email", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "companyemail" }), 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 placehoder-li", "data-value": "" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Select a country")), 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" }, h("ul", { class: "mdc-list" }, h("li", { class: "mdc-list-item", "data-value": "Please select a 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-multi-select", { items: multiSelectItems, "is-required": 'true' }), 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-form-checkbox", { label: "I agree to the policy", "checkbox-id": "test" }), h("div", { class: "button-wrapper" }, h("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; display:block; float: left; width: fit-content;}" }, "Submit"), h("ptc-button", { class: "form-close", color: "ptc-tertiary", type: "button", styles: ":host{align-self:flex-end; display:block; float: left; width: fit-content;}" }, "Cancel")))))));
|
|
81
|
-
}
|
|
82
|
-
static get is() { return "modal-form-example"; }
|
|
83
|
-
static get originalStyleUrls() {
|
|
84
|
-
return {
|
|
85
|
-
"$": ["modal-form-example.css"]
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
static get styleUrls() {
|
|
89
|
-
return {
|
|
90
|
-
"$": ["modal-form-example.css"]
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
static get states() {
|
|
94
|
-
return {
|
|
95
|
-
"formData": {}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
static get elementRef() { return "el"; }
|
|
99
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Organisms/E-Support Organisms/Case Tracker'
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
const CaseTracker = args => {
|
|
8
|
-
return html `
|
|
9
|
-
|
|
10
|
-
<ptc-spacer></ptc-spacer>
|
|
11
|
-
<ptc-spacer></ptc-spacer>
|
|
12
|
-
<ptc-spacer></ptc-spacer>
|
|
13
|
-
<div class="ptc-container is-grid">
|
|
14
|
-
<div class="is-col-12 is-col-6-md">
|
|
15
|
-
<ptc-title upperline="none">Case Tracker - Authorized Use Only</ptc-title>
|
|
16
|
-
<ptc-spacer></ptc-spacer>
|
|
17
|
-
<ptc-spacer></ptc-spacer>
|
|
18
|
-
<ptc-para>If you want to use this application on behalf of a customer use this search from to lookup the customer record. When you have found the customer hit the Next > button</ptc-para>
|
|
19
|
-
<ptc-textfield field-id="contact-email" label-text="Customer Name" type="text" ptc-data-eloqua-name="C_EmailAddress" field-name="email"></ptc-textfield>
|
|
20
|
-
<ptc-textfield field-id="contact-email" label-text="Customer Number" type="text" ptc-data-eloqua-name="C_EmailAddress" field-name="email"></ptc-textfield>
|
|
21
|
-
<ptc-button color="ptc-quaternary" disabled="false" link-href="https://www.ptc.com" link-title="PTC" rel="undefined" tab-nav="0" target="_self" text-align="undefined" type="button">Search</ptc-button>
|
|
22
|
-
<ptc-button color="ptc-quaternary" disabled="false" link-href="https://www.ptc.com" link-title="PTC" rel="undefined" tab-nav="0" target="_self" text-align="undefined" type="button">Next</ptc-button>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="is-col-12 is-col-2-md">
|
|
25
|
-
|
|
26
|
-
</div>
|
|
27
|
-
<div class="is-col-12 is-col-3-md">
|
|
28
|
-
<ptc-spacer></ptc-spacer>
|
|
29
|
-
<ptc-spacer></ptc-spacer>
|
|
30
|
-
<ptc-spacer></ptc-spacer>
|
|
31
|
-
<ptc-spacer></ptc-spacer>
|
|
32
|
-
<div style="border: solid; padding: 5px;">
|
|
33
|
-
<ptc-title upperline="none" type="h3">search tips</ptc-title>
|
|
34
|
-
<ul>
|
|
35
|
-
<li>You can use this search form to use this application on behalf of a customer.</li>
|
|
36
|
-
<li>You can use this search form to use this application on behalf of a customer.</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</div>
|
|
43
|
-
`;}
|
|
44
|
-
|
|
45
|
-
export const Preview = CaseTracker.bind();
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Organisms/E-Support Organisms/Support Article'
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
const ArticlePage = args => {
|
|
8
|
-
return html `
|
|
9
|
-
|
|
10
|
-
<div class="ptc-container">
|
|
11
|
-
|
|
12
|
-
<ptc-title upperline="" type="h4" title-color="grey">How to run Apache, Tomcat, Windchill Directory Server </ptc-title>
|
|
13
|
-
<ptc-para>Modified: 23-Nov-2023 | LastSeen: 17-Jun-2024
|
|
14
|
-
<ptc-dropdown label="Available in:" listitems="" theme="support">
|
|
15
|
-
<item selected="" label="English"></item>
|
|
16
|
-
<item label="English"></item>
|
|
17
|
-
<item label="English"></item>
|
|
18
|
-
|
|
19
|
-
</ptc-dropdown>
|
|
20
|
-
|
|
21
|
-
</ptc-para>
|
|
22
|
-
|
|
23
|
-
<div style="background-color: rgb(238, 238, 238);; padding:2px">
|
|
24
|
-
<ptc-title type="h5" upperline="">Public</ptc-title>
|
|
25
|
-
<ptc-para >
|
|
26
|
-
Created by Steven Jin and improved by Mi Yeon Grace Jin, Amit Deshpande, Hideyuki Akiyama, Lily Liu, Arshad Imam, Luis Barbosa, Feng Xiang Cliff Tian, Swapnil Deshmukh, Kellan Chen, Teresa Man, Chao Max Wang, Saurabh Ghewande, Mahesh Lomate, Aditya Chaure, Tsutomu Seki, Salesforce Data Manipulation User, Steven Jin, Shirley Yang
|
|
27
|
-
Customer Views: 24559 | Useful Ratings (Customers): 118 | Useful Ratings (PTC): 45 | Cases Solved: 154
|
|
28
|
-
</ptc-para>
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
<ptc-spacer></ptc-spacer>
|
|
32
|
-
<ptc-spacer></ptc-spacer>
|
|
33
|
-
<div>
|
|
34
|
-
<ptc-title upperline="" type="h4">Description</ptc-title>
|
|
35
|
-
<hr style="color:green">
|
|
36
|
-
<ptc-para>
|
|
37
|
-
<ul>
|
|
38
|
-
<li>How to run Apache HTTP Server, Tomcat, WindchillDS and, Windchill as a Windows service</li>
|
|
39
|
-
<li>How to run Apache HTTP Server, Tomcat, WindchillDS and, Windchill as a Windows service</li>
|
|
40
|
-
<li>How to run Apache HTTP Server, Tomcat, WindchillDS and, Windchill as a Windows service</li>
|
|
41
|
-
</ul>
|
|
42
|
-
</ptc-para>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
`;}
|
|
46
|
-
|
|
47
|
-
export const Preview = ArticlePage.bind();
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Organisms/E-Support Organisms/Support Page'
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
const SupportPage = args => {
|
|
8
|
-
return html `
|
|
9
|
-
|
|
10
|
-
<ptc-spacer></ptc-spacer>
|
|
11
|
-
<ptc-spacer></ptc-spacer>
|
|
12
|
-
<ptc-spacer></ptc-spacer>
|
|
13
|
-
<ptc-spacer></ptc-spacer>
|
|
14
|
-
<div class="ptc-container is-grid has-col-gap green-container">
|
|
15
|
-
<div class="is-col-12 is-col-7-md search-container">
|
|
16
|
-
|
|
17
|
-
<ptc-spacer></ptc-spacer>
|
|
18
|
-
<ptc-spacer></ptc-spacer>
|
|
19
|
-
<ptc-spacer></ptc-spacer>
|
|
20
|
-
<ptc-title type="h2" text-align="center" title-size="x-large" title-color="white" upperline="no-upperline" title-display="inline-block" title-shadow="" title-height="densest" title-margin="margin-3" title-weight="w-8" is-plm-hub="false">
|
|
21
|
-
Search the Knowledge Base
|
|
22
|
-
</ptc-title>
|
|
23
|
-
<ptc-search-field placeholder-label="Search Technical Support Documentation and Articles" ></ptc-search-field>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="is-col-12 is-col-5-md form-section">
|
|
26
|
-
<ptc-title upperline="none">Popular Tasks</ptc-title>
|
|
27
|
-
<!-- <ul> -->
|
|
28
|
-
<ptc-link>Product Pages</ptc-link>
|
|
29
|
-
<ptc-link>Product Pages</ptc-link>
|
|
30
|
-
<ptc-link>Product Pages</ptc-link>
|
|
31
|
-
<ptc-link>Product Pages</ptc-link>
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<ptc-spacer></ptc-spacer>
|
|
37
|
-
<ptc-spacer></ptc-spacer>
|
|
38
|
-
|
|
39
|
-
<div class="ptc-container is-grid has-col-gap link-container ">
|
|
40
|
-
<div class="is-col-1"></div>
|
|
41
|
-
<div class="is-col-2 links"><ptc-link>Support</ptc-link>
|
|
42
|
-
<button class="btn" role="button" >
|
|
43
|
-
<span class="arrow">
|
|
44
|
-
<icon-asset slot="icon" type="solid" size="large" name="arrow-down" color="ptc-green"></icon-asset>
|
|
45
|
-
</span>
|
|
46
|
-
</button>
|
|
47
|
-
</div>
|
|
48
|
-
<div class="is-col-2 llinks"><ptc-link>Manage and monitor software</ptc-link>
|
|
49
|
-
<button class="btn" role="button" >
|
|
50
|
-
<span class="arrow">
|
|
51
|
-
<icon-asset slot="icon" type="solid" size="large" name="arrow-down" color="ptc-green"></icon-asset>
|
|
52
|
-
</span>
|
|
53
|
-
</button>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="is-col-2 llinks"><ptc-link>Learn</ptc-link>
|
|
56
|
-
<button class="btn" role="button" >
|
|
57
|
-
<span class="arrow">
|
|
58
|
-
<icon-asset slot="icon" type="solid" size="large" name="arrow-down" color="ptc-green"></icon-asset>
|
|
59
|
-
</span>
|
|
60
|
-
</button>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="is-col-2 llinks"><ptc-link>Service and Expertise</ptc-link>
|
|
63
|
-
<button class="btn" role="button" >
|
|
64
|
-
<span class="arrow">
|
|
65
|
-
<icon-asset slot="icon" type="solid" size="large" name="arrow-down" color="ptc-green"></icon-asset>
|
|
66
|
-
</span>
|
|
67
|
-
</button>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="is-col-2 llinks"><ptc-link>PTC Partner Network</ptc-link>
|
|
70
|
-
<button class="btn" role="button" >
|
|
71
|
-
<span class="arrow">
|
|
72
|
-
<icon-asset slot="icon" type="solid" size="large" name="arrow-down" color="ptc-green"></icon-asset>
|
|
73
|
-
</span>
|
|
74
|
-
</button>
|
|
75
|
-
</div>
|
|
76
|
-
<div class="is-col-1 links"></div>
|
|
77
|
-
</div>
|
|
78
|
-
<style>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
.btn {
|
|
82
|
-
display: none;
|
|
83
|
-
padding: 10px;
|
|
84
|
-
font-size: 16px;
|
|
85
|
-
font-weight: 500;
|
|
86
|
-
border: none;
|
|
87
|
-
background-color: transparent;
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
align-items: center;
|
|
90
|
-
span {
|
|
91
|
-
margin-right: 8px;
|
|
92
|
-
align-items: center;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.llinks:hover .btn {
|
|
100
|
-
display: block;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.links:hover .btn {
|
|
106
|
-
display: flex;
|
|
107
|
-
}
|
|
108
|
-
.green-container {
|
|
109
|
-
background-color:#b3dda4 ;
|
|
110
|
-
padding: 10px;
|
|
111
|
-
.search-container{
|
|
112
|
-
background-color: #00890B;
|
|
113
|
-
padding:10px;
|
|
114
|
-
align-items: center;
|
|
115
|
-
}
|
|
116
|
-
.form-section {
|
|
117
|
-
background-color: white;
|
|
118
|
-
padding: 10px;
|
|
119
|
-
|
|
120
|
-
ptc-link {
|
|
121
|
-
padding: 5px;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
.links {
|
|
126
|
-
align-content: center;
|
|
127
|
-
text-align: center;
|
|
128
|
-
padding-bottom: 16px;
|
|
129
|
-
align-items: center;
|
|
130
|
-
display: flex;
|
|
131
|
-
flex-direction: column;
|
|
132
|
-
align-items: center;
|
|
133
|
-
justify-content: space-between;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.llinks {
|
|
137
|
-
align-content: center;
|
|
138
|
-
text-align: center;
|
|
139
|
-
padding-bottom: 16px;
|
|
140
|
-
border-left: solid 2px #b3dda4;
|
|
141
|
-
padding: 10px;
|
|
142
|
-
display: flex;
|
|
143
|
-
flex-direction: column;
|
|
144
|
-
align-items: center;
|
|
145
|
-
justify-content: space-between;
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
.link-container {
|
|
149
|
-
border-bottom: solid 2px #b3dda4;
|
|
150
|
-
/* margin: 15px; */
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</style>
|
|
155
|
-
`;}
|
|
156
|
-
|
|
157
|
-
export const Preview = SupportPage.bind();
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-c83db688.js';
|
|
2
|
-
|
|
3
|
-
const modalFormExampleCss = ":host {\r\n display: block;\r\n}\r\n\r\n.form-wrapper {\r\n width: 371px;\r\n display: flex;\r\n border-radius: 3px;\r\n background: #FFF;\r\n flex-direction: column;\r\n align-items: center;\r\n padding: 0px 32px;\r\n\r\n @media only screen and (min-width: 360px) and (max-width: 479.55px) {\r\n max-width: 360px;\r\n width: 360px;\r\n }\r\n\r\n .button-wrapper {\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 20px;\r\n margin-top: 48px;\r\n flex-wrap: wrap;\r\n }\r\n}\r\n";
|
|
4
|
-
|
|
5
|
-
const PtcForm = 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
|
-
const multiSelectItems = [
|
|
80
|
-
{ text: 'Item 1', selected: false, ptcDataEloquaName: 'item_1', ptcDataTargetEloquaName: 'item_target-1' },
|
|
81
|
-
{ text: 'Item 2', selected: false, ptcDataEloquaName: 'item_2', ptcDataTargetEloquaName: 'item_target-2' },
|
|
82
|
-
{ text: 'Item 3', selected: false, ptcDataEloquaName: 'item_3', ptcDataTargetEloquaName: 'item_target-3' }
|
|
83
|
-
];
|
|
84
|
-
return (h(Host, null, h("div", { class: "ptc-container u-flex u-flex-justify-center" }, h("div", { class: "form-wrapper" }, h("ptc-title", { "seo-compatibility-mode": true, "text-align": "left", "title-color": "gray", upperline: "no-upperline", "title-display": "inline-block", "title-height": "densest", "title-margin": "margin-flush", "title-weight": "w-7", "is-plm-hub": "false", "title-size": "medium" }, h("h2", null, "PTC\u2019s PLM application suite combines the power of Windchill, the industry\u2019s #1 PLM software with Thingworx")), h("ptc-spacer", { size: "x-small", breakpoint: "small" }), h("ptc-spacer", { size: "small", breakpoint: "x-small" }), h("ptc-para", { "seo-compatibility-mode": true, "font-size": "x-small", "font-weight": "w-4", "para-margin": "margin-flush", "para-style": "main", "para-line-h": "line-height-densest" }, "PTC\u2019s market-leading, purpose-built IIoT platform. The suite offers a mix of Packages, Add-Ons, and Apps to best suit your business needs:"), h("ptc-spacer", { size: "x-small", breakpoint: "small" }), h("ptc-spacer", { size: "small", breakpoint: "x-small" }), h("max-width-container", { "max-width": "277", breakpoint: 480 }, h("ptc-title", { type: "h2", "text-align": "", "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": "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" }), h("ptc-textfield", { "field-id": "company-email", "label-text": "Company Email*", type: "email", "ptc-data-eloqua-name": "C_EmailAddress", "field-name": "companyemail" }), 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 placehoder-li", "data-value": "" }, h("span", { class: "mdc-list-item__ripple" }), h("span", { class: "mdc-list-item__text" }, "Select a country")), 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" }, h("ul", { class: "mdc-list" }, h("li", { class: "mdc-list-item", "data-value": "Please select a 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-multi-select", { items: multiSelectItems, "is-required": 'true' }), 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-form-checkbox", { label: "I agree to the policy", "checkbox-id": "test" }), h("div", { class: "button-wrapper" }, h("ptc-button", { class: "form-submit", color: "ptc-quaternary", type: "submit", styles: ":host{align-self:flex-end; display:block; float: left; width: fit-content;}" }, "Submit"), h("ptc-button", { class: "form-close", color: "ptc-tertiary", type: "button", styles: ":host{align-self:flex-end; display:block; float: left; width: fit-content;}" }, "Cancel")))))));
|
|
85
|
-
}
|
|
86
|
-
get el() { return getElement(this); }
|
|
87
|
-
};
|
|
88
|
-
PtcForm.style = modalFormExampleCss;
|
|
89
|
-
|
|
90
|
-
export { PtcForm as modal_form_example };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as n}from"./p-ac75c7ad.js";import{c as e,a as i}from"./p-112455b1.js";var r=e((function(t){t.exports=function(){var t=6e4,n=36e5,e="millisecond",i="second",r="minute",s="hour",a="day",h="week",u="month",o="quarter",c="year",d="date",l="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],e=t%100;return"["+t+(n[(e-20)%10]||n[e]||n[0])+"]"}},v=function(t,n,e){var i=String(t);return!i||i.length>=n?t:""+Array(n+1-i.length).join(e)+t},y={s:v,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),i=Math.floor(e/60),r=e%60;return(n<=0?"+":"-")+v(i,2,"0")+":"+v(r,2,"0")},m:function t(n,e){if(n.date()<e.date())return-t(e,n);var i=12*(e.year()-n.year())+(e.month()-n.month()),r=n.clone().add(i,u),s=e-r<0,a=n.clone().add(i+(s?-1:1),u);return+(-(i+(e-r)/(s?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:h,d:a,D:d,h:s,m:r,s:i,ms:e,Q:o}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",w={};w[g]=m;var x="$isDayjsObject",b=function(t){return t instanceof S||!(!t||!t[x])},M=function t(n,e,i){var r;if(!n)return g;if("string"==typeof n){var s=n.toLowerCase();w[s]&&(r=s),e&&(w[s]=e,r=s);var a=n.split("-");if(!r&&a.length>1)return t(a[0])}else{var h=n.name;w[h]=n,r=h}return!i&&r&&(g=r),r||!i&&g},D=function(t,n){if(b(t))return t.clone();var e="object"==typeof n?n:{};return e.date=t,e.args=arguments,new S(e)},T=y;T.l=M,T.i=b,T.w=function(t,n){return D(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var S=function(){function m(t){this.$L=M(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[x]=!0}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(T.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var i=n.match(f);if(i){var r=i[2]-1||0,s=(i[7]||"0").substring(0,3);return e?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(n)}(t),this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return T},v.isValid=function(){return!(this.$d.toString()===l)},v.isSame=function(t,n){var e=D(t);return this.startOf(n)<=e&&e<=this.endOf(n)},v.isAfter=function(t,n){return D(t)<this.startOf(n)},v.isBefore=function(t,n){return this.endOf(n)<D(t)},v.$g=function(t,n,e){return T.u(t)?this[n]:this.set(e,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,n){var e=this,o=!!T.u(n)||n,l=T.p(t),f=function(t,n){var i=T.w(e.$u?Date.UTC(e.$y,n,t):new Date(e.$y,n,t),e);return o?i:i.endOf(a)},p=function(t,n){return T.w(e.toDate()[t].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(n)),e)},m=this.$W,v=this.$M,y=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case c:return o?f(1,0):f(31,11);case u:return o?f(1,v):f(0,v+1);case h:var w=this.$locale().weekStart||0,x=(m<w?m+7:m)-w;return f(o?y-x:y+(6-x),v);case a:case d:return p(g+"Hours",0);case s:return p(g+"Minutes",1);case r:return p(g+"Seconds",2);case i:return p(g+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,n){var h,o=T.p(t),l="set"+(this.$u?"UTC":""),f=(h={},h[a]=l+"Date",h[d]=l+"Date",h[u]=l+"Month",h[c]=l+"FullYear",h[s]=l+"Hours",h[r]=l+"Minutes",h[i]=l+"Seconds",h[e]=l+"Milliseconds",h)[o],p=o===a?this.$D+(n-this.$W):n;if(o===u||o===c){var m=this.clone().set(d,1);m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(t,n){return this.clone().$set(t,n)},v.get=function(t){return this[T.p(t)]()},v.add=function(e,o){var d,l=this;e=Number(e);var f=T.p(o),p=function(t){var n=D(l);return T.w(n.date(n.date()+Math.round(t*e)),l)};if(f===u)return this.set(u,this.$M+e);if(f===c)return this.set(c,this.$y+e);if(f===a)return p(1);if(f===h)return p(7);var m=(d={},d[r]=t,d[s]=n,d[i]=1e3,d)[f]||1,v=this.$d.getTime()+e*m;return T.w(v,this)},v.subtract=function(t,n){return this.add(-1*t,n)},v.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||l;var i=t||"YYYY-MM-DDTHH:mm:ssZ",r=T.z(this),s=this.$H,a=this.$m,h=this.$M,u=e.weekdays,o=e.months,c=function(t,e,r,s){return t&&(t[e]||t(n,i))||r[e].slice(0,s)},d=function(t){return T.s(s%12||12,t,"0")},f=e.meridiem||function(t,n,e){var i=t<12?"AM":"PM";return e?i.toLowerCase():i};return i.replace(p,(function(t,i){return i||function(t){switch(t){case"YY":return String(n.$y).slice(-2);case"YYYY":return T.s(n.$y,4,"0");case"M":return h+1;case"MM":return T.s(h+1,2,"0");case"MMM":return c(e.monthsShort,h,o,3);case"MMMM":return c(o,h);case"D":return n.$D;case"DD":return T.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return c(e.weekdaysMin,n.$W,u,2);case"ddd":return c(e.weekdaysShort,n.$W,u,3);case"dddd":return u[n.$W];case"H":return String(s);case"HH":return T.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return f(s,a,!0);case"A":return f(s,a,!1);case"m":return String(a);case"mm":return T.s(a,2,"0");case"s":return String(n.$s);case"ss":return T.s(n.$s,2,"0");case"SSS":return T.s(n.$ms,3,"0");case"Z":return r}return null}(t)||r.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(e,d,l){var f,p=this,m=T.p(d),v=D(e),y=(v.utcOffset()-this.utcOffset())*t,g=this-v,w=function(){return T.m(p,v)};switch(m){case c:f=w()/12;break;case u:f=w();break;case o:f=w()/3;break;case h:f=(g-y)/6048e5;break;case a:f=(g-y)/864e5;break;case s:f=g/n;break;case r:f=g/t;break;case i:f=g/1e3;break;default:f=g}return l?f:T.a(f)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),i=M(t,n,!0);return i&&(e.$L=i),e},v.clone=function(){return T.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),Y=S.prototype;return D.prototype=Y,[["$ms",e],["$s",i],["$m",r],["$H",s],["$W",a],["$M",u],["$y",c],["$D",d]].forEach((function(t){Y[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),D.extend=function(t,n){return t.$i||(t(n,S,D),t.$i=!0),D},D.locale=M,D.isDayjs=b,D.unix=function(t){return D(1e3*t)},D.en=w[g],D.Ls=w,D.p={},D}()})),s=e((function(t){var n,e,i;t.exports=(n="minute",e=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g,function(t,r,s){var a=r.prototype;s.utc=function(t){return new r({date:t,utc:!0,args:arguments})},a.utc=function(t){var e=s(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),n):e},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var h=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),h.call(this,t)};var u=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else u.call(this)};var o=a.utcOffset;a.utcOffset=function(t,r){var s=this.$utils().u;if(s(t))return this.$u?0:s(this.$offset)?o.call(this):this.$offset;if("string"==typeof t&&(t=function(t){void 0===t&&(t="");var n=t.match(e);if(!n)return null;var r=(""+n[0]).match(i)||["-",0,0],s=60*+r[1]+ +r[2];return 0===s?0:"+"===r[0]?s:-s}(t),null===t))return this;var a=Math.abs(t)<=16?60*t:t,h=this;if(r)return h.$offset=a,h.$u=0===t,h;if(0!==t){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(a+u,n)).$offset=a,h.$x.$localOffset=u}else h=this.utc();return h};var c=a.format;a.format=function(t){return c.call(this,t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":""))},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(t){return"s"===t&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var l=a.diff;a.diff=function(t,n,e){if(t&&this.$u===t.$u)return l.call(this,t,n,e);var i=this.local(),r=s(t).local();return l.call(i,r,n,e)}})}));r.extend(s);const a=class{constructor(n){t(this,n),this.countdownTitle="",this.eventTime="",this.eventTimeZone="EST",this.expiredText="This event has started on",this.daysText="days",this.hoursText="hours",this.minutesText="minutes",this.secondsText="seconds",this.useHourFormat=void 0,this.timeLeft={days:0,hours:0,minutes:0,seconds:0},this.isExpired=!1,this.displayLocale="en"}componentWillLoad(){this.eventTime&&this.eventTimeZone?(this.detectLocaleFromURL(),this.startCountdown()):console.error("Both eventTime and eventTimeZone are required.")}disconnectedCallback(){clearInterval(this.timer)}getOffsetFromAbbr(t){const n={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AKDT:-480,AKST:-540,AST:-240,AWST:480,BST:60,CDT:-300,CEST:120,CET:60,CST:-360,CST_CN:480,EDT:-240,EEST:180,EET:120,EST:-300,GMT:0,HKT:480,IST:330,JST:540,MDT:-360,MST:-420,PDT:-420,PST:-480,UTC:0};return void 0!==n[t]?n[t]:0}transformDate(t){return t.includes("T")?t:r(t,"M/D/YYYY h:mm:ss A").format("YYYY-MM-DDTHH:mm:ss")}calculateTimeLeft(){const t=this.getOffsetFromAbbr(this.eventTimeZone),n=r(this.transformDate(this.eventTime)).utcOffset(t,!0).utc(),e=r.utc(),i=n.diff(e);i>0?this.timeLeft={days:Math.floor(i/864e5),hours:Math.floor(i/36e5%24),minutes:Math.floor(i/6e4%60),seconds:Math.floor(i/1e3%60)}:(this.isExpired=!0,clearInterval(this.timer))}startCountdown(){this.calculateTimeLeft(),this.timer=window.setInterval((()=>this.calculateTimeLeft()),1e3)}shouldUse12HourFormat(){return void 0!==this.useHourFormat?this.useHourFormat:/^en-(US|CA)$/.test(this.displayLocale)}detectLocaleFromURL(){const t=window.location.href;this.displayLocale=t.includes("/cn")?"zh-CN":t.includes("/tw")?"zh-TW":t.includes("/fr")?"fr":t.includes("/de")?"de":t.includes("/it")?"it":t.includes("/ja")?"ja":t.includes("/ko")?"ko":"en"}render(){const{days:t,hours:e,minutes:i,seconds:s}=this.timeLeft,a=r(this.transformDate(this.eventTime)).utcOffset(this.getOffsetFromAbbr(this.eventTimeZone),!0).format("YYYY-MM-DD HH:mm"),h=this.shouldUse12HourFormat();return n("div",{class:"countdown-outer"},this.countdownTitle&&n("div",{class:"event-name"},this.countdownTitle),this.isExpired?n("div",{class:"expired"},`${this.expiredText} ${a} ${this.eventTimeZone}`):n("div",{id:"CDOutput",class:"countdown"},n("div",{class:"day"},n("div",null,t),n("span",null,this.daysText)),n("div",{class:"hours"},n("div",null,e),n("span",null,this.hoursText)),n("div",{class:"minutes"},n("div",null,i),n("span",null,this.minutesText)),n("div",{class:"seconds"},n("div",null,s),n("span",null,this.secondsText))),n("div",{class:"cd-event-date"},new Date(this.eventTime).toLocaleDateString(this.displayLocale,{month:"long",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:h})," ","(",this.eventTimeZone,")"))}};a.style='h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{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,.hyphenate-text,ptc-footer{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;z-index:10;display:flex;align-items:center;justify-content:flex-start;margin-left:0px;margin-bottom:32px}@media only screen and (min-width: 992px){:host{margin-left:var(--ptc-element-spacing-05);margin-bottom:0px}}.countdown-outer{padding:16px 4px;display:block;max-width:450px;min-width:330px;border-radius:4px;box-shadow:0 12px 16px 0 rgba(0, 0, 0, 0.32);background-color:#20262a}@media only screen and (min-width: 480px){.countdown-outer{padding:16px 32px;min-width:380px}}.event-name{display:flex;justify-content:center;align-items:center;margin-bottom:24px;color:white;font-family:"Raleway", sans-serif;font-size:24px;letter-spacing:0.48px;text-align:center}.cd-event-date{display:flex;justify-content:center;align-items:center;margin-top:32px;color:white;font-family:"Raleway", sans-serif;font-size:16px;letter-spacing:0.32px}.countdown{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;color:white;font-size:16px;margin:12px 0px}.day,.hours,.minutes,.seconds{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;padding:4px 4px;border-right:1px #6d707b solid}@media only screen and (min-width: 480px){.day,.hours,.minutes,.seconds{padding:4px 16px}}.day div,.hours div,.minutes div,.seconds div{line-height:56px;letter-spacing:0.96px;font-weight:600;font-size:48px;color:#fff}.day span,.hours span,.minutes span,.seconds span{display:block;font-size:16px;line-height:1.63;letter-spacing:0.32px;text-align:center;color:#fff;margin-bottom:0}.seconds{border-right:none}.expired{min-height:90px;display:flex;justify-content:center;align-items:center;text-align:center;font-weight:bold;padding:0 0px;color:var(--color-white)}';export{a as ptc_countdown}
|