@ptcwebops/ptcw-design 3.8.7 → 3.8.9
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/icon-asset_12.cjs.entry.js +1063 -0
- package/dist/cjs/interfaces-574e6df7.js +15 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/max-width-container.cjs.entry.js +54 -0
- package/dist/cjs/ptc-background-video.cjs.entry.js +68 -0
- package/dist/cjs/ptc-breadcrumb_2.cjs.entry.js +164 -0
- package/dist/cjs/ptc-data-lookup.cjs.entry.js +15 -2
- package/dist/cjs/ptc-img.cjs.entry.js +133 -0
- package/dist/cjs/ptc-modal.cjs.entry.js +194 -0
- package/dist/cjs/ptc-office-location-card.cjs.entry.js +63 -0
- package/dist/cjs/ptc-office-locations.cjs.entry.js +224 -0
- package/dist/cjs/ptc-picture.cjs.entry.js +163 -0
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/cjs/show-map-icon-c1cca913.js +10 -0
- package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js +15 -3
- package/dist/collection/utils/elq-lib.js +15 -2
- package/dist/custom-elements/index.js +30 -5
- package/dist/esm/icon-asset_12.entry.js +1048 -0
- package/dist/esm/interfaces-4caedd26.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/max-width-container.entry.js +50 -0
- package/dist/esm/ptc-background-video.entry.js +64 -0
- package/dist/esm/ptc-breadcrumb_2.entry.js +159 -0
- package/dist/esm/ptc-data-lookup.entry.js +15 -2
- package/dist/esm/ptc-img.entry.js +129 -0
- package/dist/esm/ptc-modal.entry.js +190 -0
- package/dist/esm/ptc-office-location-card.entry.js +59 -0
- package/dist/esm/ptc-office-locations.entry.js +220 -0
- package/dist/esm/ptc-picture.entry.js +159 -0
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/esm/show-map-icon-6d9dce32.js +8 -0
- package/dist/ptcw-design/p-02c5454e.entry.js +1 -0
- package/dist/ptcw-design/p-197d3724.entry.js +1 -0
- package/dist/ptcw-design/p-2f4f6ccd.js +1 -0
- package/dist/ptcw-design/p-3bbfda70.entry.js +1 -0
- package/dist/ptcw-design/p-6a3d3888.entry.js +1 -0
- package/dist/ptcw-design/p-711bcdad.js +1 -0
- package/dist/ptcw-design/p-85f20e16.entry.js +1 -0
- package/dist/ptcw-design/p-875723ce.entry.js +1 -0
- package/dist/ptcw-design/p-99d44b9b.entry.js +1 -0
- package/dist/ptcw-design/p-a6a66ea0.entry.js +1 -0
- package/dist/ptcw-design/p-afa09845.entry.js +1 -0
- package/dist/ptcw-design/p-bd5c5010.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/icon-asset_16.cjs.entry.js +0 -1479
- package/dist/cjs/ptc-link.cjs.entry.js +0 -91
- package/dist/cjs/ptc-pricing-add-on-card.cjs.entry.js +0 -28
- package/dist/cjs/ptc-pricing-add-on-section.cjs.entry.js +0 -50
- package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +0 -370
- package/dist/cjs/ptc-readmore.cjs.entry.js +0 -93
- package/dist/esm/icon-asset_16.entry.js +0 -1460
- package/dist/esm/ptc-link.entry.js +0 -87
- package/dist/esm/ptc-pricing-add-on-card.entry.js +0 -24
- package/dist/esm/ptc-pricing-add-on-section.entry.js +0 -46
- package/dist/esm/ptc-pricing-packaging-table.entry.js +0 -366
- package/dist/esm/ptc-readmore.entry.js +0 -89
- package/dist/ptcw-design/p-25fbffd9.entry.js +0 -1
- package/dist/ptcw-design/p-33a7506c.entry.js +0 -1
- package/dist/ptcw-design/p-55637af9.entry.js +0 -1
- package/dist/ptcw-design/p-b18b5261.entry.js +0 -1
- package/dist/ptcw-design/p-b81a6576.entry.js +0 -1
- package/dist/ptcw-design/p-e28086c9.entry.js +0 -1
- package/dist/ptcw-design/p-f0329b38.entry.js +0 -1
|
@@ -77,7 +77,7 @@ class ElqLib {
|
|
|
77
77
|
find_eloqua_contact() {
|
|
78
78
|
console.log('CONTACT LOOKUP: Attempting to find Eloqua contact...');
|
|
79
79
|
// Queue callback action for the return of lookup
|
|
80
|
-
this.callback_queue.push(this.
|
|
80
|
+
this.callback_queue.push(this.handle_contact_lookup.bind(this));
|
|
81
81
|
// Start with a recipient lookup if ID was supplied in URL
|
|
82
82
|
if (this.visitor_elq_id !== null) {
|
|
83
83
|
this.lookup_visitor_by_recipient_id();
|
|
@@ -98,6 +98,18 @@ class ElqLib {
|
|
|
98
98
|
//Fires a lookups to get membership info
|
|
99
99
|
find_eloqua_subscription_info() {
|
|
100
100
|
//disable_submit_button();
|
|
101
|
+
//this.lookup_subscription_by_email();
|
|
102
|
+
console.log('CONTACT LOOKUP: Attempting to find Eloqua subscription...');
|
|
103
|
+
// Queue callback action for the return of lookup
|
|
104
|
+
this.callback_queue.push(this.handle_visitor_lookup.bind(this));
|
|
105
|
+
if (this.visitor_elq_id !== null) {
|
|
106
|
+
this.lookup_visitor_by_recipient_id();
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// If no visitor ID, attempt to do a visitor lookup with an Eloqua cookie
|
|
110
|
+
this.lookup_visitor_by_cookie(); //preference center
|
|
111
|
+
}
|
|
112
|
+
// Start with a recipient lookup if ID was supplied in URL
|
|
101
113
|
this.lookup_subscription_by_email();
|
|
102
114
|
}
|
|
103
115
|
store_url_vars() {
|
|
@@ -184,6 +196,7 @@ class ElqLib {
|
|
|
184
196
|
'<' + this.params.elq_field_email_rec_id + '>' + this.visitor_elq_id + '</' + this.params.elq_field_email_rec_id + '>',
|
|
185
197
|
]);
|
|
186
198
|
console.log('LOOKUP: Visitor lookup sent using email recipient id: ' + this.visitor_elq_id);
|
|
199
|
+
console.log('find visitor email' + window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_email));
|
|
187
200
|
}
|
|
188
201
|
else {
|
|
189
202
|
console.log('LOOKUP: A visitor lookup cannot be performed as no lookup key was defined');
|
|
@@ -218,7 +231,7 @@ class ElqLib {
|
|
|
218
231
|
}
|
|
219
232
|
handle_visitor_lookup() {
|
|
220
233
|
//console.log('Contact Email: ' + this.params.elq_field_contact_email)
|
|
221
|
-
const email = window.GetElqContentPersonalizationValue(this.params.
|
|
234
|
+
const email = window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_email); //it was elq_field_visitor_email ( V_Email_Address)
|
|
222
235
|
if (email) {
|
|
223
236
|
console.log(`LOOKUP: Found contact email address: ${email}`);
|
|
224
237
|
this.user_elq_email = email.trim();
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-4b85b38a.js');
|
|
6
|
+
const interfaces = require('./interfaces-574e6df7.js');
|
|
7
|
+
|
|
8
|
+
const ptcImgCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}.smart-bg{width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.smart-img{position:absolute;display:block;width:100%;height:100%;top:0;left:0;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.radius-standard{border-radius:var(--ptc-border-radius-standard)}.radius-standard-top{border-top-left-radius:var(--ptc-border-radius-standard);border-top-right-radius:var(--ptc-border-radius-standard)}.radius-large{border-radius:var(--ptc-border-radius-large)}.radius-large-top{border-top-left-radius:var(--ptc-border-radius-large);border-top-right-radius:var(--ptc-border-radius-large)}.lazy-bg{background-image:none !important;background-color:var(--color-gray-03)}@media only screen and (min-width: 768px){.hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.hidden-md{display:none !important}}@media only screen and (min-width: 768px){.hidden-lg{display:none !important}}";
|
|
9
|
+
|
|
10
|
+
const PtcImg = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.sizeXs = '510x340';
|
|
14
|
+
this.sizeSm = '1240x496';
|
|
15
|
+
this.sizeMd = '1366x500';
|
|
16
|
+
this.sizeLg = '1920x1080';
|
|
17
|
+
this.imgUrl = undefined;
|
|
18
|
+
this.imageType = 'smart-bg';
|
|
19
|
+
this.borderRadius = '';
|
|
20
|
+
this.loadMode = 'lazy-bg';
|
|
21
|
+
this.styles = undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Image Z Index
|
|
25
|
+
*/
|
|
26
|
+
// @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
|
|
27
|
+
WindowResize() {
|
|
28
|
+
this.setResponsiveBg();
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
const classMap = this.getCssClassMap();
|
|
32
|
+
return (index.h(index.Host, null, this.styles && index.h("style", null, this.styles), index.h("div", { class: classMap, "data-xs": `${this.imgUrl}`, "data-sm": `${this.imgUrl}`, "data-md": `${this.imgUrl}`, "data-lg": `${this.imgUrl}` }, this.imageType == 'smart-bg' ? index.h("slot", null) : null)));
|
|
33
|
+
}
|
|
34
|
+
componentDidLoad() {
|
|
35
|
+
this.addIntersectionObserver();
|
|
36
|
+
this.setResponsiveBg();
|
|
37
|
+
}
|
|
38
|
+
componentWillUpdate() {
|
|
39
|
+
this.addIntersectionObserver();
|
|
40
|
+
this.setResponsiveBg();
|
|
41
|
+
}
|
|
42
|
+
//responsive image
|
|
43
|
+
setResponsiveBg() {
|
|
44
|
+
// Define local variables
|
|
45
|
+
let backgrounds = (this.el || document).querySelectorAll(interfaces.ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
46
|
+
// Loop through all target elements
|
|
47
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
48
|
+
// Set current variables
|
|
49
|
+
el = backgrounds[i];
|
|
50
|
+
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
51
|
+
// If the data attribute exists, set the background
|
|
52
|
+
if (elData !== null) {
|
|
53
|
+
el.style.backgroundImage = "url('" + elData + "')";
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (typeof console == 'object') {
|
|
57
|
+
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//lazy loading
|
|
63
|
+
addIntersectionObserver() {
|
|
64
|
+
if (!this.imgUrl) {
|
|
65
|
+
console.log('no image!');
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if ('IntersectionObserver' in window) {
|
|
69
|
+
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
70
|
+
let bgObserver = new IntersectionObserver(entries => {
|
|
71
|
+
entries.forEach(entry => {
|
|
72
|
+
if (entry.isIntersecting) {
|
|
73
|
+
const image = entry.target;
|
|
74
|
+
image.classList.remove('lazy-bg');
|
|
75
|
+
bgObserver.unobserve(image);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
lazyLoadBgs.forEach(image => {
|
|
80
|
+
bgObserver.observe(image);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
getCssClassMap() {
|
|
85
|
+
return {
|
|
86
|
+
[this.imageType]: true,
|
|
87
|
+
'ptc-img': true,
|
|
88
|
+
[this.borderRadius]: true,
|
|
89
|
+
[this.loadMode]: true,
|
|
90
|
+
// [this.imageZIndex] : true
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
getCurrentBreakPoints() {
|
|
94
|
+
// Define local variables
|
|
95
|
+
let doc = window.document, temp = doc.createElement('div'), env;
|
|
96
|
+
// Append test node
|
|
97
|
+
doc.body.appendChild(temp);
|
|
98
|
+
// Loop through breakpoints
|
|
99
|
+
for (let i = interfaces.ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
100
|
+
env = interfaces.ResponsiveBgVariables.envs[i];
|
|
101
|
+
// Add classes
|
|
102
|
+
temp.className = 'hidden-' + env;
|
|
103
|
+
// Found breakpoint
|
|
104
|
+
if (temp.offsetParent === null) {
|
|
105
|
+
// Remove our test node
|
|
106
|
+
doc.body.removeChild(temp);
|
|
107
|
+
// Return current breakpoint
|
|
108
|
+
return env;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Breakpoint not found, try fallback
|
|
112
|
+
doc.body.removeChild(temp);
|
|
113
|
+
return this.getFallbackBreakpoint();
|
|
114
|
+
}
|
|
115
|
+
getFallbackBreakpoint() {
|
|
116
|
+
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
117
|
+
return 'lg';
|
|
118
|
+
}
|
|
119
|
+
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
120
|
+
return 'md';
|
|
121
|
+
}
|
|
122
|
+
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
123
|
+
return 'sm';
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return 'xs';
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
get el() { return index.getElement(this); }
|
|
130
|
+
};
|
|
131
|
+
PtcImg.style = ptcImgCss;
|
|
132
|
+
|
|
133
|
+
exports.ptc_img = PtcImg;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-4b85b38a.js');
|
|
6
|
+
|
|
7
|
+
const ptcModalCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}.wrapper{position:absolute;width:100vw;height:100%;top:0;left:0;z-index:500001;display:none}.wrapper.fixed{position:fixed}.wrapper .modal-popup{margin:7.5rem auto 1rem;background-color:var(--color-white);box-shadow:var(--ptc-shadow-large);max-width:22.5625rem;width:80%;display:flex;flex-direction:column;align-items:flex-end;align-content:flex-end;z-index:50020;transform:translateY(-100%)}@media only screen and (min-width: 992px){.wrapper .modal-popup{max-width:29.125rem}}.wrapper .modal-popup.md{max-width:44.125rem}.wrapper .modal-popup.lg{max-width:56.25rem}.wrapper .modal-popup.xl{max-width:64.0625rem}.wrapper .modal-popup.max{width:calc(100% - 4rem);max-width:75rem;height:80vh;margin:auto;overflow:hidden}.wrapper .modal-popup.max .close{margin:var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}.wrapper .modal-popup.max .modal-body iframe{height:100%}.wrapper .modal-popup .modal-body{width:100%}.wrapper .modal-popup .modal-body iframe{opacity:0;overflow:hidden;width:100%;border:0;transition:opacity var(--ptc-ease-inout) var(--ptc-transition-medium)}.wrapper .modal-popup .modal-body iframe.ready{opacity:1}.wrapper .modal-popup .modal-body.frame{overflow:hidden;overflow-y:hidden;overflow-x:hidden}.wrapper .modal-popup .modal-body.html{overflow:hidden}.wrapper .modal-popup.frame .modal-body{display:flex;flex:1;height:100%}.wrapper .modal-popup .close{margin-right:var(--ptc-element-spacing-03);margin-top:var(--ptc-element-spacing-03)}.wrapper .modal-popup.shadow-scroller{max-height:calc(100vh - 220px)}@media only screen and (min-width: 992px){.wrapper .modal-popup.shadow-scroller{max-height:756px}}.wrapper .modal-popup.shadow-scroller .modal-header{transition:box-shadow ease-in-out 250ms;position:relative;min-height:57px;border-bottom:1px solid var(--color-gray-02);width:100%}.wrapper .modal-popup.shadow-scroller .modal-header .close{position:absolute;top:var(--spacing-md);right:var(--spacing-md);margin:0}.wrapper .modal-popup.shadow-scroller .modal-body{min-height:200px;overflow-x:hidden}.wrapper .modal-popup.shadow-scroller .modal-footer{transition:box-shadow ease-in-out 250ms;width:100%;min-height:60px;border-top:1px solid var(--color-gray-02);padding-top:1rem}.wrapper .modal-popup.shadow-scroller.scroll-top .modal-header{box-shadow:0px 4px 12px rgba(0, 0, 0, 0.12)}.wrapper .modal-popup.shadow-scroller.scroll-bottom .modal-footer{box-shadow:0px -8px 12px rgba(0, 0, 0, 0.12)}.wrapper.show{display:flex;align-items:flex-start}.wrapper.show .modal-popup{transform:translateY(0)}.wrapper.show .modal-popup.rounded{border-radius:var(--ptc-border-radius-standard)}.overlay{width:100vw;height:100vh;position:fixed;top:0;left:0;z-index:50010;display:block;background-color:rgba(0, 0, 0, 0.6)}:host(.standard) .modal-popup{border-radius:var(--ptc-border-radius-standard)}:host(.large) .modal-popup{border-radius:var(--ptc-border-radius-large)}:host(.pill) .modal-popup{border-radius:var(--ptc-border-radius-pill)}:host(.circle) .modal-popup{border-radius:var(--ptc-border-radius-circle)}:host(.enclose-modal) .modal-popup{max-height:calc(100vh - 180px)}:host(.enclose-modal) .modal-popup:not(.frame){overflow-y:auto}:host(.bio-modal) .wrapper.show{align-items:flex-start}@media only screen and (min-width: 768px){:host(.bio-modal) .wrapper.show{align-items:center}}:host(.bio-modal) .modal-popup{padding:30px 15px 30px 0;max-width:1200px;margin:20px auto 0 auto;max-height:calc(100vh - 180px);width:90%;height:100%}:host(.bio-modal) .modal-popup .modal-body{height:100%}@media only screen and (min-width: 768px){:host(.bio-modal) .modal-popup .modal-body{height:auto}}@media (max-height: 450px){:host(.bio-modal) .modal-popup .modal-body{height:100%}}@media only screen and (min-width: 768px){:host(.bio-modal) .modal-popup{max-height:none;width:80%;margin-top:0px;height:auto}}@media only screen and (min-width: 1440px){:host(.bio-modal) .modal-popup{max-width:1400px}}@media (max-height: 450px){:host(.bio-modal) .modal-popup{max-height:calc(100vh - 180px);height:100%}}:host(.bio-modal) .close{position:absolute;margin:0;right:15px;top:30px}:host(.bio-modal) .close svg .cls-1,:host(.bio-modal) .close svg .cls-2{fill:none;stroke-width:2px}:host(.bio-modal) .close svg .cls-1{stroke:#1c2439;stroke-linecap:square}:host(.bio-modal) .close svg .cls-2{stroke:#74c34d}:host(.bio-modal) .close svg path{transition:all ease-in-out 250ms}:host(.bio-modal) .close svg .cls-1:nth-child(1){transform:translate(175.5px, 135.5px)}:host(.bio-modal) .close svg .cls-1:nth-child(2){transform:translate(175.5px, 174.985px)}:host(.bio-modal) .close svg .cls-1:nth-child(3){transform:translate(215.5px, 141.393px)}:host(.bio-modal) .close svg .cls-1:nth-child(4){transform:translate(175.5px, 135.5px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(1){transform:translate(175.5px, 162px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(2){transform:translate(149px, 174.985px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(3){transform:translate(215.5px, 174px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(4){transform:translate(152.5px, 135.5px)}:host(.no-container) .wrapper .modal-popup.xl{max-width:80rem !important;background:transparent;box-shadow:none}:host(.no-container) .wrapper .modal-popup .close{display:none}";
|
|
8
|
+
|
|
9
|
+
const PtcModal = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.closed = index.createEvent(this, "closed", 7);
|
|
13
|
+
this.opened = index.createEvent(this, "opened", 7);
|
|
14
|
+
this.iframeUrl = undefined;
|
|
15
|
+
this.size = 'sm';
|
|
16
|
+
this.show = false;
|
|
17
|
+
this.overlay = true;
|
|
18
|
+
this.fixed = false;
|
|
19
|
+
this.keepInViewport = false;
|
|
20
|
+
this.closeOnBlur = false;
|
|
21
|
+
this.rounded = false;
|
|
22
|
+
this.hideContainer = false;
|
|
23
|
+
this.showHeaderFooter = false;
|
|
24
|
+
this.overlayHeight = undefined;
|
|
25
|
+
this.borderRadius = 'standard';
|
|
26
|
+
this.isBioModal = false;
|
|
27
|
+
this.styles = undefined;
|
|
28
|
+
this.bodyOverflowSetting = undefined;
|
|
29
|
+
}
|
|
30
|
+
fireOnClosed(modal) {
|
|
31
|
+
this.closed.emit(modal);
|
|
32
|
+
}
|
|
33
|
+
fireOnOpened(modal) {
|
|
34
|
+
this.opened.emit(modal);
|
|
35
|
+
}
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
let body = document.querySelector('body');
|
|
38
|
+
this.bodyOverflowSetting = {
|
|
39
|
+
//overflow: body.style['overflow'],
|
|
40
|
+
overflowY: body.style['overflowY'],
|
|
41
|
+
overflowX: body.style['overflowX'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
componentWillRender() {
|
|
45
|
+
let body = document.querySelector('body');
|
|
46
|
+
if (body) {
|
|
47
|
+
if (this.show) {
|
|
48
|
+
//body.style['overflow'] = 'hidden';
|
|
49
|
+
if (this.fixed) {
|
|
50
|
+
body.style['overflowY'] = 'hidden';
|
|
51
|
+
body.style['overflowX'] = 'hidden';
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
body.style['overflowY'] = 'scroll';
|
|
55
|
+
body.style['overflowX'] = 'hidden';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
//body.style['overflow'] = this.bodyOverflowSetting.overflow;
|
|
60
|
+
body.style['overflowY'] = this.bodyOverflowSetting.overflowY;
|
|
61
|
+
body.style['overflowX'] = this.bodyOverflowSetting.overflowX;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
componentDidLoad() {
|
|
66
|
+
if (this.show) {
|
|
67
|
+
this.fireOnOpened(this);
|
|
68
|
+
}
|
|
69
|
+
if (this.showHeaderFooter) {
|
|
70
|
+
this.handleScroll();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
componentDidUpdate() {
|
|
74
|
+
if (this.show) {
|
|
75
|
+
this.fireOnOpened(this);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.fireOnClosed(this);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
resizeIframe(e) {
|
|
82
|
+
let iFrame = e.target;
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
try {
|
|
85
|
+
if (iFrame.contentDocument) {
|
|
86
|
+
iFrame.height = `${iFrame.contentDocument.body.scrollHeight}px`;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
iFrame.height = '616px'; //default
|
|
90
|
+
iFrame.removeAttribute('scrolling');
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
console.log(error);
|
|
95
|
+
iFrame.height = '616px'; //default
|
|
96
|
+
iFrame.removeAttribute('scrolling');
|
|
97
|
+
}
|
|
98
|
+
iFrame.classList.add('ready');
|
|
99
|
+
}, 50);
|
|
100
|
+
}
|
|
101
|
+
handleScroll() {
|
|
102
|
+
let modal = this.el.shadowRoot.querySelector('.shadow-scroller');
|
|
103
|
+
if (modal) {
|
|
104
|
+
let body = modal.querySelector('.modal-body');
|
|
105
|
+
var height = body.clientHeight;
|
|
106
|
+
var scrollHeight = body.scrollHeight;
|
|
107
|
+
var scrollTop = body.scrollTop;
|
|
108
|
+
var offset = body.offsetHeight;
|
|
109
|
+
if (height < scrollHeight) { //has scrollbar
|
|
110
|
+
if (scrollTop > 0) { //can scroll up
|
|
111
|
+
modal.classList.add('scroll-top');
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
modal.classList.remove('scroll-top');
|
|
115
|
+
}
|
|
116
|
+
if (offset + scrollTop < scrollHeight) { //can scroll down
|
|
117
|
+
modal.classList.add('scroll-bottom');
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
modal.classList.remove('scroll-bottom');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
close() {
|
|
126
|
+
this.show = false;
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
let content;
|
|
130
|
+
let overlay;
|
|
131
|
+
let type = this.iframeUrl ? 'frame' : 'html';
|
|
132
|
+
let closebtn = (index.h("div", { class: "close" }, index.h("a", { href: "#", onClick: (e) => { e.preventDefault(); this.close(); } }, this.isBioModal
|
|
133
|
+
?
|
|
134
|
+
index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "42", height: "41.485", viewBox: "0 0 42 41.485" }, index.h("g", { "data-name": "Group 1042", transform: "rotate(180 108.25 87.993)" }, index.h("path", { d: "M0 0v39.486", class: "cls-1", "data-name": "Line 446" }), index.h("path", { d: "M0 0h40", class: "cls-1", "data-name": "Line 447" }), index.h("path", { d: "M0 33.592V0", class: "cls-1", "data-name": "Line 448" }), index.h("path", { d: "M23.994 0H0", class: "cls-1", "data-name": "Line 449" }), index.h("path", { d: "M0 0l17.596 17.596", class: "cls-2", "data-name": "Line 450", transform: "translate(187.229 147.226)" }), index.h("path", { d: "M0 7.198L7.199 0", class: "cls-2", "data-name": "Line 451", transform: "translate(197.55 147.312)" }), index.h("path", { d: "M0 7.2L7.2 0", class: "cls-2", "data-name": "Path 114", transform: "translate(187.313 157.549)" })))
|
|
135
|
+
:
|
|
136
|
+
index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { d: "M1 1L13 13", stroke: "black" }), index.h("path", { d: "M13 1L1 13", stroke: "black" })))));
|
|
137
|
+
if (this.iframeUrl) {
|
|
138
|
+
content = (index.h("iframe", { src: this.iframeUrl, frameBorder: 0, allowFullScreen: false, height: "100%", width: "100%", scrolling: "no", onLoad: this.resizeIframe }));
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
if (this.showHeaderFooter) {
|
|
142
|
+
content = (index.h("slot", { name: "body" }));
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
content = (index.h("slot", null));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (this.overlay) {
|
|
149
|
+
if (this.closeOnBlur) {
|
|
150
|
+
overlay = index.h("div", { class: "overlay", onClick: (_) => this.close() });
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
overlay = index.h("div", { class: "overlay" });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return (index.h(index.Host, { class: this.getCssClassMap() }, this.styles && index.h("style", null, this.styles), index.h("div", { class: `wrapper ${this.show ? "show" : "hide"} ${this.fixed ? 'fixed' : ''} ` }, overlay, index.h("div", { class: `modal-popup ${this.size} ${type} ${this.rounded ? 'rounded' : ''} ${this.showHeaderFooter ? 'shadow-scroller' : ''} ` }, this.showHeaderFooter ? [
|
|
157
|
+
index.h("div", { class: "modal-header" }, index.h("slot", { name: "header" }), closebtn),
|
|
158
|
+
index.h("div", { class: "modal-body", onScroll: () => this.handleScroll() }, content),
|
|
159
|
+
index.h("div", { class: "modal-footer" }, index.h("slot", { name: "footer" }))
|
|
160
|
+
] : [
|
|
161
|
+
closebtn,
|
|
162
|
+
index.h("div", { class: "modal-body" }, content)
|
|
163
|
+
]))));
|
|
164
|
+
}
|
|
165
|
+
getCssClassMap() {
|
|
166
|
+
return {
|
|
167
|
+
["no-container"]: this.hideContainer,
|
|
168
|
+
["bio-modal"]: this.isBioModal,
|
|
169
|
+
["enclose-modal"]: !this.isBioModal && this.keepInViewport,
|
|
170
|
+
[this.borderRadius]: true
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
async showModal() {
|
|
174
|
+
this.show = true;
|
|
175
|
+
}
|
|
176
|
+
async hideModal() {
|
|
177
|
+
this.show = false;
|
|
178
|
+
}
|
|
179
|
+
async toggleModal() {
|
|
180
|
+
this.show = !this.show;
|
|
181
|
+
}
|
|
182
|
+
async reloadIframe() {
|
|
183
|
+
if (this.iframeUrl) {
|
|
184
|
+
let iframe = this.el.shadowRoot.querySelector('iframe');
|
|
185
|
+
if (iframe) {
|
|
186
|
+
iframe.src = iframe.src;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
get el() { return index.getElement(this); }
|
|
191
|
+
};
|
|
192
|
+
PtcModal.style = ptcModalCss;
|
|
193
|
+
|
|
194
|
+
exports.ptc_modal = PtcModal;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-4b85b38a.js');
|
|
6
|
+
const showMapIcon = require('./show-map-icon-c1cca913.js');
|
|
7
|
+
|
|
8
|
+
const phone = `
|
|
9
|
+
<svg width="16" height="20" viewBox="0 0 16 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
+
<path d="M15.9902 16.6115C15.9672 16.448 15.6893 16.163 15.1565 15.7565C15.0145 15.6335 12.6694 13.5744 12.559 13.4924C12.4485 13.4104 12.3345 13.3585 12.2177 13.3373C12.0513 13.3071 11.822 13.3915 11.5297 13.5904C11.2369 13.7907 10.9611 14.0162 10.7055 14.2646C10.5444 14.4209 10.212 14.705 10.212 14.705L9.84109 14.9888C9.59663 15.1585 9.40545 15.2308 9.26754 15.2056C9.1924 15.1919 8.29273 14.5193 8.27776 14.5077C7.24698 13.648 6.37687 12.7367 5.70389 11.7471C5.03092 10.7576 4.49606 9.60254 4.06403 8.3109C4.05882 8.29161 4.02462 8.20179 3.962 8.04012C3.89938 7.87844 3.75234 7.1916 3.76559 7.11459C3.78959 6.97451 3.91815 6.81662 4.15017 6.64077L4.53583 6.37819C4.72177 6.26033 4.91515 6.14922 5.11598 6.04487C5.42974 5.88223 5.72956 5.6925 6.01221 5.47772C6.29477 5.26306 6.45049 5.06975 6.47938 4.8978C6.49974 4.77807 6.49158 4.64997 6.45453 4.51516C6.41724 4.37965 5.34032 1.4061 5.27662 1.2267C5.17083 0.861105 5.07258 0.585353 4.98186 0.39945C4.91025 0.252936 4.84323 0.162222 4.78081 0.127311C4.75216 0.108083 4.71438 0.0908609 4.66746 0.0756436C4.6208 0.0608755 4.57324 0.0492726 4.52511 0.0409101C4.30025 0.000202494 3.999 -0.0101256 3.62135 0.00992609C3.24371 0.0299777 2.94267 0.0682131 2.71823 0.124632C2.60239 0.151743 2.48103 0.201406 2.35414 0.273619C2.32869 0.28815 2.30301 0.303559 2.27708 0.319847L1.90066 0.607067C1.6583 0.821784 1.3991 1.10462 1.12306 1.45558C1.03738 1.56652 0.956681 1.67822 0.880955 1.79068C0.458524 2.41695 0.189921 3.06519 0.0751441 3.73541C0.0358113 3.9615 0.0116542 4.19011 0.00284494 4.41961C-0.00547723 4.64394 0.00445899 4.90045 0.032653 5.18914C0.0606603 5.47734 0.0862267 5.6921 0.109353 5.83342C0.132479 5.97474 0.177157 6.22857 0.243388 6.59491C0.309805 6.96112 0.348735 7.18468 0.360098 7.26696C0.508457 8.16162 0.725847 8.97588 1.01227 9.70974C1.48239 10.9277 2.18658 12.2265 3.12482 13.6059C3.63237 14.3522 4.14183 15.0243 4.65322 15.6224C5.08653 16.129 5.52131 16.5823 5.95756 16.9824C6.00291 17.0243 6.04877 17.066 6.09516 17.1074C6.63551 17.5885 7.25834 18.0358 7.96364 18.4492C8.0342 18.4883 8.22538 18.6026 8.53719 18.7921C8.84797 18.9813 9.06402 19.1112 9.18536 19.1819C9.30699 19.2533 9.49432 19.3508 9.74783 19.4775C10.0015 19.6029 10.2322 19.7 10.44 19.7686C10.6521 19.8388 10.8687 19.8939 11.0882 19.9334C11.8558 20.0728 12.6689 19.9946 13.5275 19.6989C13.9475 19.5497 14.2978 19.3934 14.5782 19.23L14.9674 18.9624C15.1049 18.8482 15.2114 18.7308 15.2868 18.6102C15.2879 18.6086 15.2889 18.607 15.2899 18.6055C15.4179 18.4077 15.5543 18.1312 15.7011 17.7755C15.8485 17.4169 15.9422 17.1218 15.9822 16.8902C16.0029 16.7695 16.0055 16.677 15.9902 16.6115Z" fill="#40434A"/>
|
|
11
|
+
</svg>
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const showAll = `<svg class="ol-full-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
15
|
+
<path
|
|
16
|
+
d="M7.51557e-07 5.8973C7.45775e-07 6.09464 0.0783039 6.2839 0.217689 6.42346C0.357075 6.56302 0.546129 6.64145 0.743274 6.64149H0.758399C0.955544 6.64145 1.1446 6.56302 1.28398 6.42346C1.42337 6.2839 1.50167 6.09464 1.50167 5.8973V2.56619L4.93013 5.99805C5.06957 6.13756 5.25865 6.21592 5.4558 6.21592C5.65295 6.21592 5.84203 6.13756 5.98148 5.99805L5.9921 5.98742C6.13146 5.84784 6.20975 5.65857 6.20975 5.46122C6.20975 5.26388 6.13146 5.07461 5.9921 4.93503L2.56365 1.50316H5.84067C5.93833 1.50323 6.03505 1.48404 6.1253 1.44669C6.21555 1.40933 6.29757 1.35454 6.36666 1.28545C6.43575 1.21636 6.49056 1.13432 6.52797 1.04401C6.56538 0.953708 6.58464 0.856911 6.58467 0.759152V0.744012C6.58462 0.546672 6.50627 0.35743 6.36685 0.217906C6.22743 0.0783817 6.03836 7.46516e-07 5.84121 7.52304e-07H0.54107C0.469983 -0.000117944 0.399571 0.0138101 0.333872 0.0409864C0.268173 0.0681627 0.208479 0.108053 0.158212 0.158369C0.107945 0.208686 0.068095 0.268439 0.0409457 0.334204C0.0137964 0.399968 -0.000117827 0.47045 7.51557e-07 0.541608V5.8973Z"
|
|
17
|
+
fill="#40434A" />
|
|
18
|
+
<path
|
|
19
|
+
d="M9.3584 0.744087V0.759227C9.35845 0.956505 9.43675 1.14569 9.57609 1.28521C9.71543 1.42472 9.90441 1.50314 10.1015 1.50324H13.3785L9.95096 4.9351C9.8116 5.07469 9.73331 5.26395 9.73331 5.4613C9.73331 5.65864 9.8116 5.84791 9.95096 5.9875L9.96159 5.99813C10.101 6.13763 10.2901 6.216 10.4873 6.216C10.6844 6.216 10.8735 6.13763 11.0129 5.99813L14.4409 2.56627V5.89738C14.4409 5.99511 14.4601 6.09188 14.4974 6.18217C14.5348 6.27246 14.5896 6.3545 14.6586 6.4236C14.7276 6.49271 14.8096 6.54752 14.8998 6.58492C14.99 6.62232 15.0867 6.64157 15.1843 6.64157H15.1993C15.2969 6.64157 15.3936 6.62232 15.4838 6.58492C15.574 6.54752 15.6559 6.49271 15.725 6.4236C15.794 6.3545 15.8488 6.27246 15.8861 6.18217C15.9235 6.09188 15.9427 5.99511 15.9427 5.89738V0.541683C15.9427 0.398279 15.8858 0.260748 15.7845 0.159346C15.6832 0.0579437 15.5458 0.000976563 15.4025 0.000976562H10.1015C9.90457 0.00107184 9.71572 0.0793713 9.5764 0.21869C9.43709 0.358009 9.35868 0.546965 9.3584 0.744087Z"
|
|
20
|
+
fill="#40434A" />
|
|
21
|
+
<path
|
|
22
|
+
d="M5.9921 10.0125L5.98148 10.0018C5.84203 9.86234 5.65295 9.78397 5.4558 9.78397C5.25865 9.78397 5.06957 9.86234 4.93013 10.0018L1.50167 13.4337V10.1026C1.50167 9.90525 1.42337 9.71599 1.28398 9.57643C1.1446 9.43687 0.955543 9.35845 0.758398 9.3584H0.743273C0.546128 9.35845 0.357074 9.43687 0.217689 9.57643C0.0783032 9.71599 -5.78131e-09 9.90525 0 10.1026L0 15.4583C-9.86272e-08 15.5294 0.0140016 15.5998 0.0412039 15.6654C0.0684062 15.7311 0.108275 15.7907 0.15853 15.8409C0.208785 15.8912 0.268439 15.931 0.334079 15.9581C0.39972 15.9852 0.470058 15.9991 0.54107 15.999H5.84121C6.03836 15.999 6.22743 15.9206 6.36685 15.7811C6.50627 15.6416 6.58462 15.4523 6.58467 15.255V15.2398C6.58462 15.0425 6.50627 14.8533 6.36685 14.7137C6.22743 14.5742 6.03836 14.4958 5.84121 14.4958H2.56418L5.9921 11.0649C6.13146 10.9253 6.20975 10.736 6.20975 10.5387C6.20975 10.3413 6.13146 10.1521 5.9921 10.0125Z"
|
|
23
|
+
fill="#40434A" />
|
|
24
|
+
<path
|
|
25
|
+
d="M14.4983 13.4337L11.0698 10.0027C10.9304 9.86324 10.7413 9.78487 10.5442 9.78487C10.347 9.78487 10.1579 9.86324 10.0185 10.0027L10.0079 10.0134C9.8685 10.153 9.79021 10.3422 9.79021 10.5396C9.79021 10.7369 9.8685 10.9262 10.0079 11.0658L13.4363 14.4967H10.1593C9.96216 14.4967 9.77311 14.5751 9.63372 14.7146C9.49432 14.8542 9.41602 15.0434 9.41602 15.2407V15.2559C9.41602 15.4532 9.49432 15.6424 9.63372 15.782C9.77311 15.9215 9.96216 15.9999 10.1593 15.9999H15.4589C15.6022 15.9999 15.7395 15.9429 15.8408 15.8415C15.9422 15.7401 15.9991 15.6026 15.9991 15.4592V10.1026C15.9991 9.90525 15.9208 9.71599 15.7814 9.57643C15.642 9.43687 15.4529 9.35845 15.2558 9.3584H15.2407C15.0435 9.35845 14.8545 9.43687 14.7151 9.57643C14.5757 9.71599 14.4974 9.90525 14.4974 10.1026L14.4983 13.4337Z"
|
|
26
|
+
fill="#40434A" />
|
|
27
|
+
</svg>
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const ptcOfficeLocationCardCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block;position:relative}:host .ofc-card-wrapper{padding:2rem;border:1px solid var(--color-gray-02);cursor:pointer;color:var(--color-gray-10);height:100%;box-sizing:border-box;border-radius:var(--ptc-border-radius-standard)}:host .ofc-card-wrapper:hover{border-color:var(--color-gray-10)}:host .map-link,:host .contact-number{margin-top:20px;display:flex;align-items:center;color:var(--color-gray-10)}:host .map-link a,:host .contact-number a{color:#2bad56 !important}:host .ofc-icon{margin-right:1rem}:host .show-full-cta{position:absolute;top:12px;right:12px;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-densest);display:flex}:host .show-full-cta span{margin-left:8px}:host .ofc-title{color:var(--color-gray-10);font-size:var(--ptc-font-size-large);font-weight:var(--ptc-font-weight-extrabold);line-height:var(--ptc-line-height-densest)}";
|
|
31
|
+
|
|
32
|
+
const PtcOfficeLocationCard = class {
|
|
33
|
+
constructor(hostRef) {
|
|
34
|
+
index.registerInstance(this, hostRef);
|
|
35
|
+
this.officeCardClicked = index.createEvent(this, "officeCardClicked", 7);
|
|
36
|
+
this.region = undefined;
|
|
37
|
+
this.country = undefined;
|
|
38
|
+
this.address = undefined;
|
|
39
|
+
this.isContactEmpty = false;
|
|
40
|
+
this.officeName = undefined;
|
|
41
|
+
this.showFullAddressModal = false;
|
|
42
|
+
}
|
|
43
|
+
handleClick() {
|
|
44
|
+
// Emit the addressClicked event with the address as the detail
|
|
45
|
+
this.officeCardClicked.emit(this.address);
|
|
46
|
+
}
|
|
47
|
+
showFullAddress(event) {
|
|
48
|
+
event.stopPropagation();
|
|
49
|
+
const modal = this.hostElement.shadowRoot.querySelector('#show-full-add');
|
|
50
|
+
modal.show = true;
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return (index.h(index.Host, null, index.h("div", { class: 'ofc-card-wrapper', onClick: () => this.handleClick() }, this.showFullAddressModal &&
|
|
54
|
+
index.h("div", { class: 'show-full-cta', onClick: (e) => { this.showFullAddress(e); } }, "Show Full Address", index.h("span", { innerHTML: showAll })), index.h("div", { class: 'ofc-title' }, this.officeName), index.h("div", { class: 'map-link' }, index.h("span", { class: "ofc-icon", innerHTML: showMapIcon.showMapSVG }), index.h("slot", { name: "map-link" })), index.h("div", { class: 'contact-number' }, !this.isContactEmpty &&
|
|
55
|
+
index.h("span", { class: "ofc-icon", innerHTML: phone }), index.h("slot", { name: "contact-number" })), index.h("slot", null)), this.showFullAddressModal &&
|
|
56
|
+
index.h("ptc-modal", { id: "show-full-add", show: false, size: "md", fixed: true, rounded: true, overlay: true, "keep-in-viewport": true, styles: ".modal-body{padding: 0 32px 32px 32px;box-sizing: border-box;}" }, index.h("div", { class: 'ofc-title' }, this.officeName), index.h("div", { class: 'map-link' }, index.h("span", { class: "ofc-icon", innerHTML: showMapIcon.showMapSVG }), index.h("slot", { name: 'map-link-modal' })), index.h("div", { class: 'contact-number' }, !this.isContactEmpty &&
|
|
57
|
+
index.h("span", { class: "ofc-icon", innerHTML: phone }), index.h("slot", { name: 'contact-number-modal' })))));
|
|
58
|
+
}
|
|
59
|
+
get hostElement() { return index.getElement(this); }
|
|
60
|
+
};
|
|
61
|
+
PtcOfficeLocationCard.style = ptcOfficeLocationCardCss;
|
|
62
|
+
|
|
63
|
+
exports.ptc_office_location_card = PtcOfficeLocationCard;
|