@ptcwebops/ptcw-design 3.0.3 → 3.0.5
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/{ptc-form-checkbox_3.cjs.entry.js → embedded-form_9.cjs.entry.js} +835 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-filter-dropdown_4.cjs.entry.js +1 -1
- package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +6 -1
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/components/organism-bundles/form/embedded-form/embedded-form.css +6 -1
- package/dist/collection/components/organism-bundles/form/embedded-form/embedded-form.js +8 -1
- package/dist/collection/components/ptc-data-lookup/ptc-data-lookup.js +15 -0
- package/dist/collection/components/ptc-filter-dropdown/ptc-filter-dropdown.js +1 -1
- package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.js +27 -1
- package/dist/collection/components/ptc-select/ptc-select.css +4 -1
- package/dist/collection/components/ptc-select/ptc-select.js +21 -1
- package/dist/collection/components/ptc-textfield/ptc-textfield.css +1 -2
- package/dist/collection/utils/elq-lib.js +9 -9
- package/dist/custom-elements/index.js +64 -17
- package/dist/esm/{ptc-form-checkbox_3.entry.js → embedded-form_9.entry.js} +831 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-filter-dropdown_4.entry.js +1 -1
- package/dist/esm/ptc-filter-level-theater.entry.js +6 -1
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/p-579a6a67.entry.js +359 -0
- package/dist/ptcw-design/p-744b640e.entry.js +1 -0
- package/dist/ptcw-design/p-a5bbf47d.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-data-lookup/ptc-data-lookup.d.ts +2 -0
- package/dist/types/components/ptc-filter-level-theater/ptc-filter-level-theater.d.ts +1 -0
- package/dist/types/components/ptc-select/ptc-select.d.ts +4 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/utils/eloqua.d.ts +8 -0
- package/dist/types/utils/elq-lib.d.ts +0 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/embedded-form.cjs.entry.js +0 -108
- package/dist/cjs/max-width-container.cjs.entry.js +0 -54
- package/dist/cjs/ptc-button.cjs.entry.js +0 -52
- package/dist/cjs/ptc-data-lookup.cjs.entry.js +0 -496
- package/dist/cjs/ptc-spacer.cjs.entry.js +0 -38
- package/dist/cjs/ptc-title.cjs.entry.js +0 -78
- package/dist/esm/embedded-form.entry.js +0 -104
- package/dist/esm/max-width-container.entry.js +0 -50
- package/dist/esm/ptc-button.entry.js +0 -48
- package/dist/esm/ptc-data-lookup.entry.js +0 -492
- package/dist/esm/ptc-spacer.entry.js +0 -34
- package/dist/esm/ptc-title.entry.js +0 -74
- package/dist/ptcw-design/p-18dfffd3.entry.js +0 -359
- package/dist/ptcw-design/p-33c054ff.entry.js +0 -1
- package/dist/ptcw-design/p-3faffecb.entry.js +0 -1
- package/dist/ptcw-design/p-92bbd407.entry.js +0 -1
- package/dist/ptcw-design/p-9a36f7a3.entry.js +0 -1
- package/dist/ptcw-design/p-b2d01ad4.entry.js +0 -1
- package/dist/ptcw-design/p-d2c400e2.entry.js +0 -1
- package/dist/ptcw-design/p-e8bd06a4.entry.js +0 -1
- package/dist/ptcw-design/p-f1c77113.entry.js +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-cd9a1b1a.js');
|
|
6
|
-
|
|
7
|
-
const ptcButtonCss = "button.disabled{pointer-events:none;opacity:0.6}button{background-color:var(--color-gray-10);display:inline-block;border-style:solid;border-width:1px;white-space:normal;position:relative;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:pointer;padding:9.4px 17.5px;border-radius:var(--ptc-border-radius-standard)}button.reveal-down .content{transition:opacity var(--ptc-transition-medium) var(--ptc-ease-out);opacity:0;font-size:var(--ptc-font-size-xx-small)}button.reveal-down .icon-wrapper{position:relative;display:flex;align-items:center;justify-content:center;align-content:center;height:16px}button.reveal-down .icon-wrapper .icon{transition:top var(--ptc-transition-fast) var(--ptc-ease-out);position:absolute;display:inline-block;top:-12px}button:hover.reveal-down .content{opacity:1}button:hover.reveal-down .icon-wrapper .icon{top:4px}button.animation-right ::slotted([slot=slot-after-text]),button.animation-right ::slotted([slot=slot-before-text]),button.animation-down ::slotted([slot=slot-after-text]),button.animation-down ::slotted([slot=slot-before-text]){transition:transform var(--ptc-transition-medium) var(--ptc-ease-inout);position:relative;display:inline-block}button:hover.animation-right ::slotted([slot=slot-after-text]),button:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}button:hover.animation-down ::slotted([slot=slot-after-text]),button:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}button span{font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-small);font-weight:bold;line-height:var(--ptc-line-height-densest)}button.left{text-align:left}button.right{text-align:right}button.center{text-align:center}.icon-left ::slotted([slot=slot-before-text]){margin-right:var(--ptc-element-spacing-01)}.icon-right ::slotted([slot=slot-after-text]){margin-left:var(--ptc-element-spacing-01)}.blackgrey{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-gray-10);background-image:linear-gradient(285deg, var(--color-gray-10) 155%, var(--color-gray-07) 62%)}.blackgrey:hover{box-shadow:var(--ptc-shadow-x-large)}.blackgrey span{color:var(--color-white)}.turtlegreen{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-green-07);background-image:linear-gradient(285deg, var(--color-green-07) 155%, var(--color-green-07) 62%)}.turtlegreen:hover{box-shadow:var(--ptc-shadow-x-large)}.turtlegreen span{color:var(--color-white)}.offwhite{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-gray-10);background-image:linear-gradient(to right, var(--color-white), var(--color-gray-02), var(--color-gray-01))}.offwhite:hover{box-shadow:var(--ptc-shadow-x-large)}.offwhite span{color:var(--color-gray-10)}.legacy-green{margin-left:10px;padding:10px 20px;margin-bottom:var(--ptc-element-spacing-01);margin-top:var(--ptc-element-spacing-01);box-shadow:var(--ptc-shadow-large);border:solid 2.5px var(--color-green-08);background-image:linear-gradient(to right, var(--color-green-06), var(--color-green-08))}.legacy-green:after{position:absolute;content:\"\";top:-1px;left:0;bottom:0;right:0;width:100%;height:103%;background-image:linear-gradient(to right, var(--color-green-08), var(--color-green-06));opacity:0;transition:opacity var(--ptc-transition-x-slow) var(--ptc-ease-inout);border-radius:2px}.legacy-green:hover{box-shadow:var(--ptc-shadow-x-large)}.legacy-green:hover span{color:var(--color-white)}.legacy-green:hover:after{opacity:1}.legacy-green span{font-family:var(--ptc-font-secondary-latin);color:var(--color-white);z-index:100;position:relative;text-transform:uppercase;font-weight:var(--ptc-font-weight-bold);letter-spacing:var(--ptc-letter-spacing-normal);font-size:var(--ptc-font-size-x-small)}@media only screen and (min-width: 768px){.legacy-green span{font-size:var(--ptc-font-size-small);letter-spacing:var(--ptc-letter-spacing-loose)}}.legacy-green icon-asset{display:inline}a{border-style:solid;border-width:1px;position:relative;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding:9.4px 17.5px;border-radius:var(--ptc-border-radius-standard);display:inline-block;position:relative}a.animation-right ::slotted([slot=slot-after-text]),a.animation-right ::slotted([slot=slot-before-text]),a.animation-down ::slotted([slot=slot-after-text]),a.animation-down ::slotted([slot=slot-before-text]){transition:all var(--ptc-ease-inout) var(--ptc-transition-medium);position:relative;display:inline-block;margin-left:5px}a:hover.animation-right ::slotted([slot=slot-after-text]),a:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}a:hover.animation-down ::slotted([slot=slot-after-text]),a:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}a.left{text-align:left}a.right{text-align:right}a.center{text-align:center}.nav{font-family:var(--ptc-font-latin);background-color:var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);border:1px solid var(--color-white);border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box;color:var(--color-white);display:inline-block;font-size:var(--ptc-font-size-xx-small);font-stretch:100%;font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-loose);list-style:none;padding:3px var(--ptc-element-spacing-04);position:relative;text-align:center;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;transition:background-color var(--ptc-transition-medium) var(--ptc-ease-inout)}.nav:focus{outline:3px solid var(--color-blue-07);outline-offset:2px}.nav:hover{background-color:var(--color-gray-12)}.ptc-primary,.ptc-quaternary,.ptc-secondary,.ptc-tertiary,.icon-toggle{padding:var(--ptc-font-size-xx-small) var(--ptc-font-size-medium);transition:background-color var(--ptc-ease-inout) var(--ptc-transition-medium);line-height:20px}.ptc-primary.disabled,.ptc-quaternary.disabled,.ptc-secondary.disabled,.ptc-tertiary.disabled,.icon-toggle.disabled{pointer-events:none;border-color:var(--color-gray-03);background:var(--color-gray-02)}.ptc-primary.disabled span,.ptc-quaternary.disabled span,.ptc-secondary.disabled span,.ptc-tertiary.disabled span,.icon-toggle.disabled span{color:var(--color-gray-03)}.ptc-primary.disabled ::slotted([slot=slot-after-text]),.ptc-quaternary.disabled ::slotted([slot=slot-after-text]),.ptc-secondary.disabled ::slotted([slot=slot-after-text]),.ptc-tertiary.disabled ::slotted([slot=slot-after-text]),.icon-toggle.disabled ::slotted([slot=slot-after-text]){fill:var(--color-gray-03) !important}.ptc-primary:focus,.ptc-quaternary:focus,.ptc-secondary:focus,.ptc-tertiary:focus,.icon-toggle:focus{outline:3px solid var(--color-blue-07);outline-offset:2px}.ptc-primary span,.ptc-quaternary span,.ptc-secondary span,.ptc-tertiary span,.icon-toggle span{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-small);line-height:var(--ptc-line-height-densest);letter-spacing:normal}.ptc-primary.small,.ptc-quaternary.small,.ptc-secondary.small,.ptc-tertiary.small,.icon-toggle.small{padding:var(--ptc-element-spacing-03) var(--ptc-element-spacing-04)}.ptc-primary.small span,.ptc-quaternary.small span,.ptc-secondary.small span,.ptc-tertiary.small span,.icon-toggle.small span{font-size:var(--ptc-font-size-xx-small)}.ptc-primary.medium,.ptc-quaternary.medium,.ptc-secondary.medium,.ptc-tertiary.medium,.icon-toggle.medium{padding:14px 20px}.ptc-primary.medium span,.ptc-quaternary.medium span,.ptc-secondary.medium span,.ptc-tertiary.medium span,.icon-toggle.medium span{font-size:var(--ptc-font-size-small)}.ptc-primary.large,.ptc-quaternary.large,.ptc-secondary.large,.ptc-tertiary.large,.icon-toggle.large{padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06)}.ptc-primary.large span,.ptc-quaternary.large span,.ptc-secondary.large span,.ptc-tertiary.large span,.icon-toggle.large span{font-size:var(--ptc-font-size-large)}.ptc-primary{background:var(--color-gray-12);border:2px solid var(--color-green-07);border-radius:var(--ptc-border-radius-standard)}.ptc-primary:hover{background-color:var(--color-gray-10)}.ptc-primary:active{background-color:var(--color-black)}.ptc-primary span{color:var(--color-white)}.ptc-primary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-secondary{background:var(--color-gray-12);border:2px solid var(--color-gray-08);border-radius:var(--ptc-border-radius-standard)}.ptc-secondary:hover{background-color:var(--color-gray-10)}.ptc-secondary:active{background-color:var(--color-black)}.ptc-secondary span{color:var(--color-white)}.ptc-secondary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-tertiary{background:var(--color-white);border:2px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard)}.ptc-tertiary:hover{background-color:var(--color-gray-02)}.ptc-tertiary:active{background-color:var(--color-gray-03)}.ptc-tertiary span{color:var(--color-gray-10)}.ptc-tertiary ::slotted([slot=slot-after-text]){fill:var(--color-gray-10) !important}.ptc-quaternary{background:var(--color-green-07);border:2px solid var(--color-green-07);border-radius:var(--ptc-border-radius-standard)}.ptc-quaternary:hover{background-color:var(--color-green-08)}.ptc-quaternary:active{background-color:var(--color-green-09)}.ptc-quaternary span{color:var(--color-white)}.ptc-quaternary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.icon-toggle{background:var(--color-white);border:1px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);padding:0;height:2.125rem;width:2.125rem;box-shadow:var(--ptc-shadow-medium)}.icon-toggle:hover{background-color:var(--color-gray-02)}.icon-toggle:active{background-color:var(--color-gray-03)}.icon-toggle.active{background-color:var(--color-gray-04)}.icon-toggle.active:hover{background-color:var(--color-gray-05)}.icon-toggle.active:active{background-color:var(--color-gray-03)}.icon-toggle:focus{outline:2px solid var(--color-blue-07);outline-offset:1px}.icon-toggle span{color:var(--color-gray-10);padding:0}.icon-toggle ::slotted([slot=slot-after-text]){fill:var(--color-gray-10) !important}.icon-toggle ::slotted(icon-asset){display:block;margin:auto;height:18px;width:18px}.clear-search{border:none;padding:0px;line-height:var(----ptc-line-height-densest);background-color:transparent}.clear-search:hover{text-decoration:underline;text-decoration-color:var(--color-white)}.clear-search span{color:var(--color-white);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}";
|
|
8
|
-
|
|
9
|
-
const PtcButton = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.clickEvent = index.createEvent(this, "clickEvent", 7);
|
|
13
|
-
this.disabled = false;
|
|
14
|
-
this.active = false;
|
|
15
|
-
this.type = 'button';
|
|
16
|
-
this.color = 'ptc-primary';
|
|
17
|
-
this.iconAnimation = '';
|
|
18
|
-
this.iconPosition = 'icon-right';
|
|
19
|
-
this.linkHref = undefined;
|
|
20
|
-
this.linkTitle = undefined;
|
|
21
|
-
this.target = '_self';
|
|
22
|
-
this.rel = undefined;
|
|
23
|
-
this.tabNav = 0;
|
|
24
|
-
this.styles = undefined;
|
|
25
|
-
this.textAlign = undefined;
|
|
26
|
-
this.size = undefined;
|
|
27
|
-
}
|
|
28
|
-
clickEventHandler() {
|
|
29
|
-
this.clickEvent.emit();
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
const classMap = this.getCssClassMap();
|
|
33
|
-
const Tag = !!this.linkHref ? 'a' : 'button';
|
|
34
|
-
return (index.h(index.Host, null, this.styles && index.h("style", null, this.styles), index.h(Tag, Object.assign({ class: classMap, onClick: this.clickEventHandler.bind(this) }, (!!this.linkHref ? { href: this.linkHref } : {}), (!this.linkHref ? { type: this.type } : {}), (!!this.target && !!this.linkHref ? { target: this.target } : {}), (!!this.rel && !!this.linkHref ? { rel: this.rel } : {}), (!!this.linkHref ? { title: this.linkTitle ? this.linkTitle : this.linkHref } : {}), (!!this.tabNav ? { tabindex: -1 } : { tabindex: 0 })), this.iconAnimation == 'reveal-down' ?
|
|
35
|
-
index.h("span", null, index.h("div", { class: "content" }, index.h("slot", null)), index.h("div", { class: "icon-wrapper" }, index.h("div", { class: "icon" }, index.h("slot", { name: "slot-after-text" })))) :
|
|
36
|
-
index.h("span", null, index.h("slot", { name: "slot-before-text" }), index.h("slot", null), index.h("slot", { name: "slot-after-text" })))));
|
|
37
|
-
}
|
|
38
|
-
getCssClassMap() {
|
|
39
|
-
return {
|
|
40
|
-
[this.color]: true,
|
|
41
|
-
[this.iconAnimation]: true,
|
|
42
|
-
[this.iconPosition]: true,
|
|
43
|
-
['disabled']: this.disabled ? true : false,
|
|
44
|
-
['active']: this.active ? true : false,
|
|
45
|
-
[this.textAlign]: true,
|
|
46
|
-
[this.size]: true
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
PtcButton.style = ptcButtonCss;
|
|
51
|
-
|
|
52
|
-
exports.ptc_button = PtcButton;
|
|
@@ -1,496 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-cd9a1b1a.js');
|
|
6
|
-
|
|
7
|
-
// Define the ElqLib class
|
|
8
|
-
class ElqLib {
|
|
9
|
-
constructor(params) {
|
|
10
|
-
this.params = params;
|
|
11
|
-
this.url_vars = {};
|
|
12
|
-
this.visitor_elq_id = null;
|
|
13
|
-
this.field_mappings = [];
|
|
14
|
-
this.callback_queue = [];
|
|
15
|
-
this.fields_populated = false;
|
|
16
|
-
this.user_elq_email = '';
|
|
17
|
-
this.user_elq_firstname = '';
|
|
18
|
-
this.user_elq_lastname = '';
|
|
19
|
-
// Merge defaults with params
|
|
20
|
-
const defaults = {
|
|
21
|
-
elq_site_id: '',
|
|
22
|
-
elq_visitor_lookup_key: '',
|
|
23
|
-
elq_recipient_id_lookup_key: '',
|
|
24
|
-
elq_contact_lookup_key: '',
|
|
25
|
-
elq_field_email_rec_id: 'V_EmailRecipientID',
|
|
26
|
-
elq_field_contact_email: 'C_EmailAddress',
|
|
27
|
-
elq_field_visitor_email: 'V_Email_Address',
|
|
28
|
-
elq_field_visitor_firstname: 'V_First_Name',
|
|
29
|
-
elq_field_visitor_lastname: 'V_Last_Name',
|
|
30
|
-
notme_link_id: 'not-me-link-id',
|
|
31
|
-
notme_fields_class: null,
|
|
32
|
-
notme_message: 'Not {name}? Click here.',
|
|
33
|
-
notme_message_noname: 'Not your details below? Click here.',
|
|
34
|
-
};
|
|
35
|
-
this.params = Object.assign(Object.assign({}, defaults), this.params);
|
|
36
|
-
this.init();
|
|
37
|
-
}
|
|
38
|
-
init() {
|
|
39
|
-
// Merge defaults with user-provided params if not already done in the constructor
|
|
40
|
-
// ...
|
|
41
|
-
// Set Eloqua site ID
|
|
42
|
-
this.setEloquaSiteId();
|
|
43
|
-
// Load Eloqua scripts
|
|
44
|
-
this.async_load();
|
|
45
|
-
// Store URL variables
|
|
46
|
-
this.store_url_vars();
|
|
47
|
-
// Store visitor's Eloqua IDgit
|
|
48
|
-
this.store_visitor_elq_id();
|
|
49
|
-
// init noteme link;
|
|
50
|
-
this.init_notme();
|
|
51
|
-
// Set the global Eloqua callback function
|
|
52
|
-
window.SetElqContent = this.eloqua_callback.bind(this);
|
|
53
|
-
}
|
|
54
|
-
setEloquaSiteId() {
|
|
55
|
-
if (this.params.elq_site_id) {
|
|
56
|
-
ElqLib._elqQ.push(['elqSetSiteId', this.params.elq_site_id]);
|
|
57
|
-
ElqLib._elqQ.push(['elqUseFirstPartyCookie', 'tracking.ptc.com']);
|
|
58
|
-
ElqLib._elqQ.push(['elqTrackPageView', window.location.href]);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
fire_pageview(url) {
|
|
62
|
-
try {
|
|
63
|
-
if (typeof url === 'undefined') {
|
|
64
|
-
ElqLib._elqQ.push(['elqTrackPageView']);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
ElqLib._elqQ.push(['elqTrackPageView', url]);
|
|
68
|
-
}
|
|
69
|
-
console.log('TRACKING: Eloqua pageview fired for URL: ' + (url || 'current page'));
|
|
70
|
-
}
|
|
71
|
-
catch (e) {
|
|
72
|
-
console.log('TRACKING: Could not fire Eloqua pageview: ', e);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
find_eloqua_contact() {
|
|
76
|
-
console.log('CONTACT LOOKUP: Attempting to find Eloqua contact...');
|
|
77
|
-
// Queue callback action for the return of lookup
|
|
78
|
-
this.callback_queue.push(this.handle_visitor_lookup.bind(this));
|
|
79
|
-
// Start with a recipient lookup if ID was supplied in URL
|
|
80
|
-
if (this.visitor_elq_id !== null) {
|
|
81
|
-
this.lookup_visitor_by_recipient_id();
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
// If no visitor ID, attempt to do a visitor lookup with an Eloqua cookie
|
|
85
|
-
this.lookup_visitor_by_cookie(); //preference center
|
|
86
|
-
this.lookup_contact_by_email();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
add_field_mapping(mapping) {
|
|
90
|
-
this.field_mappings.push(mapping);
|
|
91
|
-
}
|
|
92
|
-
add_queue_action(action) {
|
|
93
|
-
this.callback_queue.push(action);
|
|
94
|
-
}
|
|
95
|
-
store_url_vars() {
|
|
96
|
-
// Clear the current url_vars
|
|
97
|
-
this.url_vars = {};
|
|
98
|
-
// Split the URL by the '?' to get the query string part
|
|
99
|
-
const queryString = window.location.search.substring(1);
|
|
100
|
-
// Split the query string by '&' to get each key-value pair
|
|
101
|
-
queryString.split('&').forEach(paramString => {
|
|
102
|
-
// Split the key-value pairs by '=' to separate keys and values
|
|
103
|
-
let [key, value] = paramString.split('=');
|
|
104
|
-
// Decode URI components to handle URL encoding
|
|
105
|
-
key = decodeURIComponent(key);
|
|
106
|
-
value = decodeURIComponent(value);
|
|
107
|
-
// Store the key-value pair in the url_vars object
|
|
108
|
-
this.url_vars[key] = value;
|
|
109
|
-
});
|
|
110
|
-
// Optionally, log the stored URL variables
|
|
111
|
-
console.log('URL variables stored:', this.url_vars);
|
|
112
|
-
}
|
|
113
|
-
store_visitor_elq_id() {
|
|
114
|
-
console.log("INIT: Looking for visitor's Eloqua ID in URL...");
|
|
115
|
-
const elqIdParam = this.url_vars['elq'];
|
|
116
|
-
if (elqIdParam) {
|
|
117
|
-
const elqId = elqIdParam.toUpperCase().replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/, '$1-$2-$3-$4-$5');
|
|
118
|
-
this.visitor_elq_id = elqId;
|
|
119
|
-
console.log(`INIT: ...visitor Eloqua ID found in URL: ${elqId}`);
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
this.visitor_elq_id = null;
|
|
123
|
-
console.log('INIT: ...no visitor Eloqua ID found in URL');
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
// private merge(root: any, ...sources: any[]): any {
|
|
127
|
-
// sources.forEach(source => {
|
|
128
|
-
// for (const key in source) {
|
|
129
|
-
// if (source.hasOwnProperty(key)) {
|
|
130
|
-
// root[key] = source[key];
|
|
131
|
-
// }
|
|
132
|
-
// }
|
|
133
|
-
// });
|
|
134
|
-
// return root;
|
|
135
|
-
// }
|
|
136
|
-
eloqua_callback() {
|
|
137
|
-
console.log('LOOKUP: Eloqua lookup finished');
|
|
138
|
-
// Process each action in the callback queue
|
|
139
|
-
let actionSucceeded = true;
|
|
140
|
-
while (actionSucceeded && this.callback_queue.length > 0) {
|
|
141
|
-
const action = this.callback_queue.shift();
|
|
142
|
-
if (action) {
|
|
143
|
-
console.log(`QUEUE: Executing action`);
|
|
144
|
-
actionSucceeded = action(); // Execute the action. It must return a boolean indicating success.
|
|
145
|
-
if (actionSucceeded) {
|
|
146
|
-
console.log('QUEUE: Action executed successfully, removed from queue');
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
console.log('QUEUE: Action failed, re-adding to queue');
|
|
150
|
-
this.callback_queue.unshift(action); // Re-add the action to the front of the queue
|
|
151
|
-
break; // Break out of the loop if an action fails
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
// After processing the queue, update user details or perform other operations
|
|
156
|
-
if (actionSucceeded) {
|
|
157
|
-
this.update_user_details();
|
|
158
|
-
this.populate_mapped_fields();
|
|
159
|
-
}
|
|
160
|
-
// ...additional code to handle the aftermath of callback processing...
|
|
161
|
-
}
|
|
162
|
-
lookup_visitor_by_cookie() {
|
|
163
|
-
if (this.params.elq_visitor_lookup_key != '') {
|
|
164
|
-
ElqLib._elqQ.push(['elqDataLookup', escape(this.params.elq_visitor_lookup_key), '']);
|
|
165
|
-
console.log('LOOKUP: Visitor lookup sent using Eloqua cookie');
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
console.log('LOOKUP: A visitor lookup cannot be performed as no lookup key was defined');
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
lookup_visitor_by_recipient_id() {
|
|
172
|
-
if (this.params.elq_recipient_id_lookup_key != '') {
|
|
173
|
-
ElqLib._elqQ.push([
|
|
174
|
-
'elqDataLookup',
|
|
175
|
-
escape(this.params.elq_recipient_id_lookup_key),
|
|
176
|
-
'<' + this.params.elq_field_email_rec_id + '>' + this.visitor_elq_id + '</' + this.params.elq_field_email_rec_id + '>',
|
|
177
|
-
]);
|
|
178
|
-
console.log('LOOKUP: Visitor lookup sent using email recipient id: ' + this.visitor_elq_id);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
console.log('LOOKUP: A visitor lookup cannot be performed as no lookup key was defined');
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
lookup_contact_by_email() {
|
|
185
|
-
if (this.params.elq_contact_lookup_key != '') {
|
|
186
|
-
ElqLib._elqQ.push([
|
|
187
|
-
'elqDataLookup',
|
|
188
|
-
escape(this.params.elq_contact_lookup_key),
|
|
189
|
-
'<' + this.params.elq_field_contact_email + '>' + this.user_elq_email + '</' + this.params.elq_field_contact_email + '>',
|
|
190
|
-
]);
|
|
191
|
-
console.log('LOOKUP: Contact lookup sent using email address: ' + this.user_elq_email);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
console.log('LOOKUP: A visitor lookup cannot be performed as no lookup key was defined');
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
handle_visitor_lookup() {
|
|
198
|
-
//console.log('Contact Email: ' + this.params.elq_field_contact_email)
|
|
199
|
-
const email = window.GetElqContentPersonalizationValue(this.params.elq_field_contact_email); //it was elq_field_visitor_email ( V_Email_Address)
|
|
200
|
-
if (email) {
|
|
201
|
-
console.log(`LOOKUP: Found contact email address: ${email}`);
|
|
202
|
-
this.user_elq_email = email.trim();
|
|
203
|
-
this.lookup_contact_by_email();
|
|
204
|
-
this.callback_queue.push(this.handle_contact_lookup.bind(this));
|
|
205
|
-
return true;
|
|
206
|
-
}
|
|
207
|
-
else {
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
handle_contact_lookup() {
|
|
212
|
-
if (window.GetElqContentPersonalizationValue(this.params.elq_field_contact_email) != '') {
|
|
213
|
-
console.log('LOOKUP: Found contact email address: ' + window.GetElqContentPersonalizationValue(this.params.elq_field_contact_email));
|
|
214
|
-
return true;
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
populate_mapped_fields() {
|
|
221
|
-
console.log('MAPPING: Starting field mapping');
|
|
222
|
-
//debugger;
|
|
223
|
-
this.field_mappings.forEach(({ elementId, elqFieldName }) => {
|
|
224
|
-
const fieldValue = window.GetElqContentPersonalizationValue(elqFieldName);
|
|
225
|
-
if (elementId !== 'contact-country') {
|
|
226
|
-
const element = document.getElementById(elementId);
|
|
227
|
-
console.log('element ID of field mappings: ' + element);
|
|
228
|
-
console.log('fieldValue ID of field mappings: ' + fieldValue);
|
|
229
|
-
if (element && fieldValue) {
|
|
230
|
-
element.value = fieldValue;
|
|
231
|
-
//element.style.display = 'none'; // Hide the field.
|
|
232
|
-
if (element.closest('ptc-textfield')) {
|
|
233
|
-
element.closest('ptc-textfield').style.display = 'none';
|
|
234
|
-
}
|
|
235
|
-
else if (element.closest('ptc-select')) {
|
|
236
|
-
element.closest('ptc-select').style.display = 'none';
|
|
237
|
-
}
|
|
238
|
-
this.fields_populated = true;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
const countryEle = document.getElementById(elementId);
|
|
243
|
-
if (countryEle && fieldValue) {
|
|
244
|
-
countryEle.textContent = fieldValue;
|
|
245
|
-
}
|
|
246
|
-
// debugger;
|
|
247
|
-
if (countryEle.closest('ptc-select')) {
|
|
248
|
-
countryEle.closest('ptc-select').style.display = 'none';
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
console.log('MAPPING: Finished ');
|
|
253
|
-
if (this.fields_populated) {
|
|
254
|
-
this.update_notme_link();
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
update_user_details() {
|
|
258
|
-
console.log('displaying user info...');
|
|
259
|
-
if (window.GetElqContentPersonalizationValue(this.params.elq_field_contact_email) !== '') {
|
|
260
|
-
document
|
|
261
|
-
.querySelectorAll('input[type=text], input[type=tel], input[name="phonenumber"], input[name="phonenumbertwo"], input[type=email], select, textarea, span.mdc-select__selected-text')
|
|
262
|
-
.forEach((element) => {
|
|
263
|
-
if (element.tagName === 'SPAN') {
|
|
264
|
-
const spanText = element;
|
|
265
|
-
const spanEloquaName = spanText.getAttribute('data-eloqua-name');
|
|
266
|
-
if (spanEloquaName !== null) {
|
|
267
|
-
const spanElqValue = window.GetElqContentPersonalizationValue(spanEloquaName);
|
|
268
|
-
if (spanElqValue !== '' && spanElqValue.length > 0) {
|
|
269
|
-
spanText.textContent = spanElqValue;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
else if (element.className.includes('intl-tel-input')) {
|
|
274
|
-
const telInput = element;
|
|
275
|
-
const eloquaName = telInput.getAttribute('data-eloqua-name');
|
|
276
|
-
if (eloquaName !== null) {
|
|
277
|
-
const elqValue = window.GetElqContentPersonalizationValue(eloquaName);
|
|
278
|
-
if (elqValue !== '' && elqValue.length > 0) {
|
|
279
|
-
setTimeout(() => {
|
|
280
|
-
telInput.placeholder = elqValue;
|
|
281
|
-
}, 1000);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
else {
|
|
286
|
-
const input = element;
|
|
287
|
-
const eloquaName = input.getAttribute('data-eloqua-name');
|
|
288
|
-
if (eloquaName !== null) {
|
|
289
|
-
const elqValue = window.GetElqContentPersonalizationValue(eloquaName);
|
|
290
|
-
if (elqValue !== '' && elqValue.length > 0) {
|
|
291
|
-
input.value = elqValue;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
if (this.user_elq_email == '' && window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_email) != '') {
|
|
298
|
-
this.user_elq_email = window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_email);
|
|
299
|
-
}
|
|
300
|
-
if (this.user_elq_firstname == '' && window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_firstname) != '') {
|
|
301
|
-
this.user_elq_firstname = window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_firstname);
|
|
302
|
-
}
|
|
303
|
-
if (this.user_elq_lastname == '' && window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_lastname) != '') {
|
|
304
|
-
this.user_elq_lastname = window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_lastname);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
update_notme_link() {
|
|
308
|
-
// Assuming the user's first and last name are available from Eloqua fields
|
|
309
|
-
const firstName = window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_firstname);
|
|
310
|
-
const lastName = window.GetElqContentPersonalizationValue(this.params.elq_field_visitor_lastname);
|
|
311
|
-
const notMeLinkElement = document.getElementById(this.params.notme_link_id);
|
|
312
|
-
const topAdditional = document.getElementById('not-me-additional-top');
|
|
313
|
-
const bottomAdditional = document.getElementById('not-me-additional-bottom');
|
|
314
|
-
if (notMeLinkElement) {
|
|
315
|
-
let message = this.params.notme_message;
|
|
316
|
-
console.log('first name: ' + firstName);
|
|
317
|
-
if (firstName && lastName) {
|
|
318
|
-
message = this.params.notme_message.replace('{name}', lastName + ' ' + firstName);
|
|
319
|
-
}
|
|
320
|
-
notMeLinkElement.innerHTML = `<a href="#">${message}</a>`;
|
|
321
|
-
topAdditional.innerHTML = "Please fill out additional information.";
|
|
322
|
-
bottomAdditional.innerHTML = "Click the button below to recieve email confirmation.";
|
|
323
|
-
topAdditional.style.display = 'block';
|
|
324
|
-
bottomAdditional.style.display = 'block';
|
|
325
|
-
notMeLinkElement.onclick = this.remove_user_details.bind(this);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
init_notme() {
|
|
329
|
-
const topAdditional = document.getElementById('not-me-additional-top');
|
|
330
|
-
const bottomAdditional = document.getElementById('not-me-additional-bottom');
|
|
331
|
-
if (topAdditional)
|
|
332
|
-
topAdditional.style.display = 'none';
|
|
333
|
-
if (bottomAdditional)
|
|
334
|
-
bottomAdditional.style.display = 'none';
|
|
335
|
-
}
|
|
336
|
-
remove_user_details(e) {
|
|
337
|
-
e.preventDefault();
|
|
338
|
-
this.user_elq_email = '';
|
|
339
|
-
this.user_elq_firstname = '';
|
|
340
|
-
this.user_elq_lastname = '';
|
|
341
|
-
// $('.' + this.params.notme_fields_class).val('');
|
|
342
|
-
const linkDiv = document.getElementById(this.params.notme_link_id);
|
|
343
|
-
const topAdditional = document.getElementById('not-me-additional-top');
|
|
344
|
-
const bottomAdditional = document.getElementById('not-me-additional-bottom');
|
|
345
|
-
linkDiv.querySelector('a').remove();
|
|
346
|
-
topAdditional.style.display = 'none';
|
|
347
|
-
bottomAdditional.style.display = 'none';
|
|
348
|
-
this.refreshForm();
|
|
349
|
-
return false;
|
|
350
|
-
}
|
|
351
|
-
refreshForm() {
|
|
352
|
-
this.field_mappings.forEach(({ elementId }) => {
|
|
353
|
-
if (elementId !== 'contact-country') {
|
|
354
|
-
const element = document.getElementById(elementId);
|
|
355
|
-
if (element) {
|
|
356
|
-
console.log('element: ' + element);
|
|
357
|
-
element.value = ''; // Reset the value
|
|
358
|
-
if (element.closest('ptc-textfield')) {
|
|
359
|
-
element.closest('ptc-textfield').style.display = '';
|
|
360
|
-
}
|
|
361
|
-
else if (element.closest('ptc-select')) {
|
|
362
|
-
element.closest('ptc-select').style.display = '';
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
else {
|
|
367
|
-
const countryEle = document.getElementById(elementId);
|
|
368
|
-
if (countryEle) {
|
|
369
|
-
countryEle.textContent = '';
|
|
370
|
-
}
|
|
371
|
-
// debugger;
|
|
372
|
-
if (countryEle.closest('ptc-select')) {
|
|
373
|
-
countryEle.closest('ptc-select').style.display = '';
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
this.clearEloquaCookie('elq-uid'); // Optionally clear the Eloqua cookie
|
|
378
|
-
this.fields_populated = false;
|
|
379
|
-
//this.update_notme_link(); // Update the 'Not Me' link if necessary
|
|
380
|
-
}
|
|
381
|
-
clearEloquaCookie(name) {
|
|
382
|
-
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
|
|
383
|
-
console.log('cookie cleared');
|
|
384
|
-
}
|
|
385
|
-
// Private Method to load Eloqua Scripts
|
|
386
|
-
async_load() {
|
|
387
|
-
const scriptUrl = 'https://img.en25.com/i/elqCfg.min.js';
|
|
388
|
-
const scriptElement = document.createElement('script');
|
|
389
|
-
scriptElement.type = 'text/javascript';
|
|
390
|
-
scriptElement.async = true;
|
|
391
|
-
scriptElement.src = scriptUrl;
|
|
392
|
-
// Error handling for script loading
|
|
393
|
-
scriptElement.onerror = errorEvent => {
|
|
394
|
-
console.log(`Error loading script: ${errorEvent}`);
|
|
395
|
-
};
|
|
396
|
-
// Append the script element to the head of the document, or before the first script tag found
|
|
397
|
-
const firstScriptTag = document.getElementsByTagName('script')[0];
|
|
398
|
-
if (firstScriptTag && firstScriptTag.parentNode) {
|
|
399
|
-
firstScriptTag.parentNode.insertBefore(scriptElement, firstScriptTag);
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
402
|
-
document.head.appendChild(scriptElement);
|
|
403
|
-
}
|
|
404
|
-
console.log(`Async loading of script ${scriptUrl} initiated.`);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
ElqLib._elqQ = window['_elqQ'] || [];
|
|
408
|
-
// Static member initialization
|
|
409
|
-
//ElqLib._elqQ = window['_elqQ'] || [];
|
|
410
|
-
|
|
411
|
-
const ptcDataLookupCss = ":host{display:block}#not-me-link-id{color:var(--color-gray-10);font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-medium);font-style:normal;font-weight:var(--ptc-font-weight-bold);line-height:normal;margin-bottom:var(--ptc-element-spacing-03);position:relative}#not-me-link-id a{color:var(--color-blue-07);font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-medium);font-style:normal;font-weight:var(--ptc-font-weight-bold);line-height:normal;text-decoration-line:underline}.not-me-additional-text{color:var(--color-gray-10);font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-medium);font-style:normal;font-weight:var(--ptc-font-weight-regular);line-height:normal;margin-bottom:var(--ptc-element-spacing-03)}.not-me-additional-text#not-me-additional-bottom{margin-bottom:unset;margin-top:var(--ptc-element-spacing-03)}.ptc-embedded-form>div{max-width:273px;overflow-wrap:break-word}.ptc-embedded-form .iti__country-name{color:var(--color-gray-12)}.ptc-embedded-form .iti--separate-dial-code.iti--show-flags .iti__selected-dial-code{color:var(--color-gray-12)}.ptc-embedded-form .mdc-menu-surface--open{z-index:99999}";
|
|
412
|
-
|
|
413
|
-
const PtcDataLookup = class {
|
|
414
|
-
constructor(hostRef) {
|
|
415
|
-
index.registerInstance(this, hostRef);
|
|
416
|
-
this.elqSiteId = undefined;
|
|
417
|
-
this.elqVisitorLookupKey = undefined;
|
|
418
|
-
this.elqRecipientIdLookupKey = undefined;
|
|
419
|
-
this.elqContactLookupKey = undefined;
|
|
420
|
-
this.elqFieldEmailRecId = 'V_EmailRecipientID';
|
|
421
|
-
this.elqFieldContactEmail = 'C_EmailAddress';
|
|
422
|
-
this.elqFieldVisitorEmail = 'V_Email_Address';
|
|
423
|
-
this.elqFieldVisitorFirstname = 'C_FirstName';
|
|
424
|
-
this.elqFieldVisitorLastname = 'C_LastName';
|
|
425
|
-
this.notmeLinkId = undefined;
|
|
426
|
-
this.notmeFieldsClass = undefined;
|
|
427
|
-
this.notmeMessage = undefined;
|
|
428
|
-
this.notmeMessageNoname = undefined;
|
|
429
|
-
this.isBlindSubmit = true;
|
|
430
|
-
this.isInitialized = false;
|
|
431
|
-
}
|
|
432
|
-
componentWillLoad() {
|
|
433
|
-
this.initializeElqLib();
|
|
434
|
-
if (this.isBlindSubmit) {
|
|
435
|
-
this.populateBlindField();
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
initializeElqLib() {
|
|
439
|
-
this.elqLib = new ElqLib({
|
|
440
|
-
elq_site_id: this.elqSiteId,
|
|
441
|
-
elq_visitor_lookup_key: this.elqVisitorLookupKey,
|
|
442
|
-
elq_recipient_id_lookup_key: this.elqRecipientIdLookupKey,
|
|
443
|
-
elq_contact_lookup_key: this.elqContactLookupKey,
|
|
444
|
-
elq_field_email_rec_id: this.elqFieldEmailRecId,
|
|
445
|
-
elq_field_contact_email: this.elqFieldContactEmail,
|
|
446
|
-
elq_field_visitor_email: this.elqFieldVisitorEmail,
|
|
447
|
-
elq_field_visitor_firstname: this.elqFieldVisitorFirstname,
|
|
448
|
-
elq_field_visitor_lastname: this.elqFieldVisitorLastname,
|
|
449
|
-
notme_link_id: this.notmeLinkId,
|
|
450
|
-
notme_fields_class: this.notmeFieldsClass,
|
|
451
|
-
notme_message: this.notmeMessage,
|
|
452
|
-
notme_message_noname: this.notmeMessageNoname,
|
|
453
|
-
});
|
|
454
|
-
this.isInitialized = true;
|
|
455
|
-
}
|
|
456
|
-
populateBlindField() {
|
|
457
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-phone', elqFieldName: 'C_BusPhone' });
|
|
458
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-email', elqFieldName: 'C_EmailAddress' });
|
|
459
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-firstname', elqFieldName: 'C_FirstName' });
|
|
460
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-lastname', elqFieldName: 'C_LastName' });
|
|
461
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-country', elqFieldName: 'C_Country' });
|
|
462
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-phone', elqFieldName: 'C_BusPhone' });
|
|
463
|
-
this.elqLib.add_field_mapping({ elementId: 'company', elqFieldName: 'C_Company' });
|
|
464
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-zipcode', elqFieldName: 'C_Zip_Postal' });
|
|
465
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-job-category', elqFieldName: 'C_Job_Role1' });
|
|
466
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-job-function', elqFieldName: 'C_Job_Function1' });
|
|
467
|
-
this.elqLib.add_field_mapping({ elementId: 'contact-jp-job-title', elqFieldName: 'C_Title' });
|
|
468
|
-
}
|
|
469
|
-
getCookie(name) {
|
|
470
|
-
let cookieValue = null;
|
|
471
|
-
if (document.cookie) {
|
|
472
|
-
const cookies = document.cookie.split(';');
|
|
473
|
-
for (let cookie of cookies) {
|
|
474
|
-
const [key, value] = cookie.trim().split('=');
|
|
475
|
-
if (key === name) {
|
|
476
|
-
cookieValue = decodeURIComponent(value);
|
|
477
|
-
break;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
return cookieValue;
|
|
482
|
-
}
|
|
483
|
-
async performDataLookup() {
|
|
484
|
-
if (this.isInitialized) {
|
|
485
|
-
this.elqLib.user_elq_email = this.getCookie('elq-uid');
|
|
486
|
-
this.elqLib.find_eloqua_contact();
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
render() {
|
|
490
|
-
return index.h("slot", null);
|
|
491
|
-
}
|
|
492
|
-
get el() { return index.getElement(this); }
|
|
493
|
-
};
|
|
494
|
-
PtcDataLookup.style = ptcDataLookupCss;
|
|
495
|
-
|
|
496
|
-
exports.ptc_data_lookup = PtcDataLookup;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-cd9a1b1a.js');
|
|
6
|
-
|
|
7
|
-
const ptcSpacerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.ptc-spacer-horizontal){display:inline-block;height:100% !important}:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.ptc-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.ptc-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.small){width:12px;min-width:12px}}:host(.ptc-spacer-horizontal.medium){height:100%}:host(.ptc-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.large){width:20px;min-width:20px}}:host(.ptc-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.ptc-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.ptc-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.ptc-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.ptc-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.ptc-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.ptc-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.ptc-spacer-vertical.small){height:12px;min-height:12px}}:host(.ptc-spacer-vertical.medium){width:100%}:host(.ptc-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.ptc-spacer-vertical.large){height:20px;min-height:20px}}:host(.ptc-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.ptc-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.ptc-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.ptc-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.ptc-spacer-vertical.space-144){width:100%;height:144px;min-height:144px}:host(.ptc-spacer-vertical.space-120){width:100%;height:120px;min-height:120px}:host(.ptc-spacer-vertical.space-128){width:100%;height:128px;min-height:128px}:host(.ptc-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.ptc-spacer-xx-small){display:block}}:host(.ptc-spacer-x-small){display:none}@media (max-width: 35.99em){:host(.ptc-spacer-x-small){display:block}}:host(.ptc-spacer-small){display:none}@media (min-width: 36em){:host(.ptc-spacer-small){display:block}}:host(.ptc-spacer-medium){display:none}@media (min-width: 48em){:host(.ptc-spacer-medium){display:block}}:host(.ptc-spacer-large){display:none}@media (min-width: 62em){:host(.ptc-spacer-large){display:block}}:host(.ptc-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.ptc-spacer-x-large){display:block}}:host(.ptc-spacer-xx-large){display:none}@media (min-width: 75em){:host(.ptc-spacer-xx-large){display:block}}:host(.ptc-spacer-xxx-large){display:none}@media (min-width: 90em){:host(.ptc-spacer-xxx-large){display:block}}";
|
|
8
|
-
|
|
9
|
-
const PtcSpacer = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.breakpoint = '';
|
|
13
|
-
this.size = 'medium';
|
|
14
|
-
this.direction = 'vertical';
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
const classMap = this.getCssClassMap();
|
|
18
|
-
return (index.h(index.Host, { class: classMap }));
|
|
19
|
-
}
|
|
20
|
-
getCssClassMap() {
|
|
21
|
-
return {
|
|
22
|
-
[this.size]: true,
|
|
23
|
-
['ptc-spacer-horizontal']: this.direction === 'horizontal',
|
|
24
|
-
['ptc-spacer-vertical']: this.direction === 'vertical',
|
|
25
|
-
['ptc-spacer-xx-small']: this.breakpoint === 'xx-small',
|
|
26
|
-
['ptc-spacer-x-small']: this.breakpoint === 'x-small',
|
|
27
|
-
['ptc-spacer-small']: this.breakpoint === 'small',
|
|
28
|
-
['ptc-spacer-medium']: this.breakpoint === 'medium',
|
|
29
|
-
['ptc-spacer-large']: this.breakpoint === 'large',
|
|
30
|
-
['ptc-spacer-x-large']: this.breakpoint === 'x-large',
|
|
31
|
-
['ptc-spacer-xx-large']: this.breakpoint === 'xx-large',
|
|
32
|
-
['ptc-spacer-xxx-large']: this.breakpoint === 'xxx-large',
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
PtcSpacer.style = ptcSpacerCss;
|
|
37
|
-
|
|
38
|
-
exports.ptc_spacer = PtcSpacer;
|