pr360-questionnaire 2.3.2 → 2.3.4
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/build/questionnaire-test.js +19 -3
- package/css/questionnaire.lit.scss +17 -0
- package/dist/index.js +16 -1
- package/js/questionnaire.ts +2 -1
- package/package.json +1 -1
- package/test/questionnaire-test.ts +3 -2
|
@@ -16995,6 +16995,21 @@ meter::-webkit-meter-optimum-value {
|
|
|
16995
16995
|
margin-bottom: 10px;
|
|
16996
16996
|
}
|
|
16997
16997
|
}
|
|
16998
|
+
.button--booking {
|
|
16999
|
+
background-color: #3B6A8B;
|
|
17000
|
+
color: #FFFFFF;
|
|
17001
|
+
text-decoration: none;
|
|
17002
|
+
display: inline-block;
|
|
17003
|
+
width: auto;
|
|
17004
|
+
min-width: 200px;
|
|
17005
|
+
padding: 12px 40px;
|
|
17006
|
+
margin: 20px 0;
|
|
17007
|
+
text-align: center;
|
|
17008
|
+
}
|
|
17009
|
+
.button--booking:hover {
|
|
17010
|
+
background-color: #2d5270;
|
|
17011
|
+
color: #FFFFFF;
|
|
17012
|
+
}
|
|
16998
17013
|
.button--link {
|
|
16999
17014
|
background-color: transparent;
|
|
17000
17015
|
border: 0px;
|
|
@@ -17453,8 +17468,8 @@ meter::-webkit-meter-optimum-value {
|
|
|
17453
17468
|
<vimeo-video controls src=${this.currentStep.url} class="questionnaire--video"></vimeo-video>
|
|
17454
17469
|
${this.canSelfBook ? x`
|
|
17455
17470
|
<div data-test-id="questionnaire-info"><h4>Thank you for completing the assessment. Based on your results ${this.siteSource || "we"} would like to help you set up an initial call with a professional.</h4></div>
|
|
17471
|
+
<a class="button button--booking" href=${this.currentStep.bookingUrl} target="_blank">Book Appointment</a>
|
|
17456
17472
|
<div data-test-id="site-phone-number"><h4>Or if you'd like to speak with ${this.siteSource || "us"}, </br> please feel free to</h4><a href="tel:${this.phoneNumber}"><h1>Call ${this.siteSource || "Us"}</h1></a></div>
|
|
17457
|
-
<a class="button button--primary" href=${this.bookingUrl} target="_blank">Book Appointment</a>
|
|
17458
17473
|
` : x`
|
|
17459
17474
|
<div data-test-id="questionnaire-info"><h4>Thank you for completing the assessment. ${this.siteSource || "We"} will be calling you within 24 hours with more information.</h4></div>
|
|
17460
17475
|
<div data-test-id="site-phone-number"><h4>If you'd like to speak with ${this.siteSource || "us"} sooner, </br> please feel free to</h4><a href="tel:${this.phoneNumber}"><h1>Call ${this.siteSource || "Us"}</h1></a></div>
|
|
@@ -32223,10 +32238,10 @@ ${inspect(response)}
|
|
|
32223
32238
|
id: "video_123",
|
|
32224
32239
|
type: "Video",
|
|
32225
32240
|
text: "Based on your assessment, you are likely still losing too much blood.",
|
|
32226
|
-
url: "https://vimeo.com/123456"
|
|
32241
|
+
url: "https://vimeo.com/123456",
|
|
32242
|
+
bookingUrl: "https://booking.example.com/appointment?prospect_id=abc123"
|
|
32227
32243
|
};
|
|
32228
32244
|
questionnaireElement.canSelfBook = true;
|
|
32229
|
-
questionnaireElement.bookingUrl = "https://booking.example.com/appointment?prospect_id=abc123";
|
|
32230
32245
|
questionnaireElement.phoneNumber = "555-123-4567";
|
|
32231
32246
|
questionnaireElement.links = {
|
|
32232
32247
|
contact_info_image: "/images/contact.jpg"
|
|
@@ -32239,6 +32254,7 @@ ${inspect(response)}
|
|
|
32239
32254
|
f3(bookingLink?.textContent).to.contain("Book Appointment");
|
|
32240
32255
|
f3(bookingLink?.getAttribute("target")).to.equal("_blank");
|
|
32241
32256
|
f3(bookingLink?.classList.contains("button")).to.be.true;
|
|
32257
|
+
f3(bookingLink?.classList.contains("button--booking")).to.be.true;
|
|
32242
32258
|
const infoDiv = questionnaireElement.shadowRoot?.querySelector('[data-test-id="questionnaire-info"]');
|
|
32243
32259
|
f3(infoDiv).to.exist;
|
|
32244
32260
|
f3(infoDiv?.textContent).to.contain("set up an initial call with a professional");
|
|
@@ -255,6 +255,23 @@ meter::-webkit-meter-optimum-value {
|
|
|
255
255
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
&--booking {
|
|
259
|
+
background-color: #3B6A8B;
|
|
260
|
+
color: #FFFFFF;
|
|
261
|
+
text-decoration: none;
|
|
262
|
+
display: inline-block;
|
|
263
|
+
width: auto;
|
|
264
|
+
min-width: 200px;
|
|
265
|
+
padding: 12px 40px;
|
|
266
|
+
margin: 20px 0;
|
|
267
|
+
text-align: center;
|
|
268
|
+
|
|
269
|
+
&:hover {
|
|
270
|
+
background-color: #2d5270;
|
|
271
|
+
color: #FFFFFF;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
258
275
|
&--link {
|
|
259
276
|
background-color: transparent;
|
|
260
277
|
border: 0px;
|
package/dist/index.js
CHANGED
|
@@ -7190,6 +7190,21 @@ meter::-webkit-meter-optimum-value {
|
|
|
7190
7190
|
margin-bottom: 10px;
|
|
7191
7191
|
}
|
|
7192
7192
|
}
|
|
7193
|
+
.button--booking {
|
|
7194
|
+
background-color: #3B6A8B;
|
|
7195
|
+
color: #FFFFFF;
|
|
7196
|
+
text-decoration: none;
|
|
7197
|
+
display: inline-block;
|
|
7198
|
+
width: auto;
|
|
7199
|
+
min-width: 200px;
|
|
7200
|
+
padding: 12px 40px;
|
|
7201
|
+
margin: 20px 0;
|
|
7202
|
+
text-align: center;
|
|
7203
|
+
}
|
|
7204
|
+
.button--booking:hover {
|
|
7205
|
+
background-color: #2d5270;
|
|
7206
|
+
color: #FFFFFF;
|
|
7207
|
+
}
|
|
7193
7208
|
.button--link {
|
|
7194
7209
|
background-color: transparent;
|
|
7195
7210
|
border: 0px;
|
|
@@ -7642,8 +7657,8 @@ meter::-webkit-meter-optimum-value {
|
|
|
7642
7657
|
<vimeo-video controls src=${this.currentStep.url} class="questionnaire--video"></vimeo-video>
|
|
7643
7658
|
${this.canSelfBook ? x`
|
|
7644
7659
|
<div data-test-id="questionnaire-info"><h4>Thank you for completing the assessment. Based on your results ${this.siteSource || "we"} would like to help you set up an initial call with a professional.</h4></div>
|
|
7660
|
+
<a class="button button--booking" href=${this.currentStep.bookingUrl} target="_blank">Book Appointment</a>
|
|
7645
7661
|
<div data-test-id="site-phone-number"><h4>Or if you'd like to speak with ${this.siteSource || "us"}, </br> please feel free to</h4><a href="tel:${this.phoneNumber}"><h1>Call ${this.siteSource || "Us"}</h1></a></div>
|
|
7646
|
-
<a class="button button--primary" href=${this.bookingUrl} target="_blank">Book Appointment</a>
|
|
7647
7662
|
` : x`
|
|
7648
7663
|
<div data-test-id="questionnaire-info"><h4>Thank you for completing the assessment. ${this.siteSource || "We"} will be calling you within 24 hours with more information.</h4></div>
|
|
7649
7664
|
<div data-test-id="site-phone-number"><h4>If you'd like to speak with ${this.siteSource || "us"} sooner, </br> please feel free to</h4><a href="tel:${this.phoneNumber}"><h1>Call ${this.siteSource || "Us"}</h1></a></div>
|
package/js/questionnaire.ts
CHANGED
|
@@ -21,6 +21,7 @@ export type Video = {
|
|
|
21
21
|
type: "Video";
|
|
22
22
|
url: string;
|
|
23
23
|
text: string;
|
|
24
|
+
bookingUrl?: string;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export type ContactInfo = {
|
|
@@ -243,8 +244,8 @@ export class QuestionnaireElement extends LitElement {
|
|
|
243
244
|
${this.canSelfBook ?
|
|
244
245
|
html`
|
|
245
246
|
<div data-test-id="questionnaire-info"><h4>Thank you for completing the assessment. Based on your results ${this.siteSource || 'we'} would like to help you set up an initial call with a professional.</h4></div>
|
|
247
|
+
<a class="button button--booking" href=${(this.currentStep as Video).bookingUrl} target="_blank">Book Appointment</a>
|
|
246
248
|
<div data-test-id="site-phone-number"><h4>Or if you'd like to speak with ${this.siteSource || 'us'}, </br> please feel free to</h4><a href="tel:${this.phoneNumber}"><h1>Call ${this.siteSource || 'Us'}</h1></a></div>
|
|
247
|
-
<a class="button button--primary" href=${this.bookingUrl} target="_blank">Book Appointment</a>
|
|
248
249
|
` :
|
|
249
250
|
html`
|
|
250
251
|
<div data-test-id="questionnaire-info"><h4>Thank you for completing the assessment. ${this.siteSource || 'We'} will be calling you within 24 hours with more information.</h4></div>
|
package/package.json
CHANGED
|
@@ -137,10 +137,10 @@ describe('questionnaire test', async () => {
|
|
|
137
137
|
id: "video_123",
|
|
138
138
|
type: "Video",
|
|
139
139
|
text: "Based on your assessment, you are likely still losing too much blood.",
|
|
140
|
-
url: "https://vimeo.com/123456"
|
|
140
|
+
url: "https://vimeo.com/123456",
|
|
141
|
+
bookingUrl: "https://booking.example.com/appointment?prospect_id=abc123"
|
|
141
142
|
};
|
|
142
143
|
questionnaireElement.canSelfBook = true;
|
|
143
|
-
questionnaireElement.bookingUrl = "https://booking.example.com/appointment?prospect_id=abc123";
|
|
144
144
|
questionnaireElement.phoneNumber = "555-123-4567";
|
|
145
145
|
questionnaireElement.links = {
|
|
146
146
|
contact_info_image: '/images/contact.jpg'
|
|
@@ -157,6 +157,7 @@ describe('questionnaire test', async () => {
|
|
|
157
157
|
expect(bookingLink?.getAttribute('target')).to.equal('_blank');
|
|
158
158
|
// Should have button styling
|
|
159
159
|
expect(bookingLink?.classList.contains('button')).to.be.true;
|
|
160
|
+
expect(bookingLink?.classList.contains('button--booking')).to.be.true;
|
|
160
161
|
|
|
161
162
|
// The message about professional should appear
|
|
162
163
|
const infoDiv = questionnaireElement.shadowRoot?.querySelector('[data-test-id="questionnaire-info"]');
|