pushfeedback 0.1.42 → 0.1.44

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.
@@ -1,659 +1,671 @@
1
- import { Host, h } from '@stencil/core';
2
- export class FeedbackButton {
3
- constructor() {
4
- this.sessionId = "";
5
- this.customFont = false;
6
- this.errorMessage = "Please try again later.";
7
- this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
8
- this.errorMessage404 = "We could not find the provided project id in PushFeedback.";
9
- this.modalTitle = 'Share your feedback';
10
- this.modalTitleSuccess = 'Thanks for your feedback!';
11
- this.modalTitleError = "Oops!";
12
- this.modalPosition = 'center';
13
- this.sendButtonText = 'Send';
14
- this.successMessage = "";
15
- this.project = '';
16
- this.screenshotButtonText = 'Add a screenshot';
17
- this.screenshotTopbarText = 'Select an element on this page';
18
- this.hideEmail = false;
19
- this.emailAddress = '';
20
- this.emailPlaceholder = 'Email address (optional)';
21
- this.messagePlaceholder = 'Comments';
22
- this.hideRating = false;
23
- this.rating = undefined;
24
- this.ratingMode = 'thumbs';
25
- this.ratingPlaceholder = 'Was this page helpful?';
26
- this.ratingStarsPlaceholder = 'How would you rate this page?';
27
- this.buttonStyle = 'default';
28
- this.buttonPosition = 'default';
29
- this.hideIcon = false;
30
- this.hideScreenshotButton = false;
31
- this.hidePrivacyPolicy = true;
32
- this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
33
- this.fetchData = true;
34
- }
35
- connectedCallback() {
36
- this.feedbackModal = document.createElement('feedback-modal');
37
- const props = [
38
- 'sessionId',
39
- 'customFont',
40
- 'errorMessage',
41
- 'errorMessage403',
42
- 'errorMessage404',
43
- 'modalTitle',
44
- 'modalTitleSuccess',
45
- 'modalTitleError',
46
- 'modalPosition',
47
- 'sendButtonText',
48
- 'successMessage',
49
- 'project',
50
- 'screenshotButtonText',
51
- 'screenshotTopbarText',
52
- 'hideEmail',
53
- 'emailAddress',
54
- 'emailPlaceholder',
55
- 'messagePlaceholder',
56
- 'hideRating',
57
- 'rating',
58
- 'ratingMode',
59
- 'ratingPlaceholder',
60
- 'ratingStarsPlaceholder',
61
- 'hideScreenshotButton',
62
- 'hidePrivacyPolicy',
63
- 'privacyPolicyText',
64
- 'fetchData'
65
- ];
66
- props.forEach(prop => {
67
- this.feedbackModal[prop] = this[prop];
68
- });
69
- document.body.appendChild(this.feedbackModal);
70
- }
71
- disconnectedCallback() {
72
- document.body.removeChild(this.feedbackModal);
73
- }
74
- isSafariBrowser() {
75
- const isSafari = /safari/i.test(navigator.userAgent) && !/chrome/i.test(navigator.userAgent);
76
- return isSafari;
77
- }
78
- componentDidLoad() {
79
- if (this.buttonPosition === 'center-right') {
80
- const buttonContent = this.el.shadowRoot.querySelector('.feedback-button-content');
81
- let adjustement = 0;
82
- if (this.isSafariBrowser()) {
83
- adjustement = 10;
84
- }
85
- buttonContent.style.right = `${(buttonContent.offsetWidth + adjustement) / 2 * -1}px`;
86
- }
87
- if (!this.customFont) {
88
- this.loadInterFont();
89
- }
90
- }
91
- loadInterFont() {
92
- const link = document.createElement('link');
93
- link.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap';
94
- link.rel = 'stylesheet';
95
- document.head.appendChild(link);
96
- }
97
- showModal() {
98
- this.feedbackModal.showModal = true;
99
- }
100
- render() {
101
- return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, onClick: () => this.showModal() }, !this.hideIcon && this.buttonStyle === 'dark' && (h("span", { class: "feedback-button-content-icon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-edit-3" }, h("path", { d: "M12 20h9" }), h("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })))), !this.hideIcon && this.buttonStyle === 'light' && (h("span", { class: "feedback-button-content-icon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#0070F4", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-edit-3" }, h("path", { d: "M12 20h9" }), h("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })))), h("slot", null))));
102
- }
103
- static get is() { return "feedback-button"; }
104
- static get encapsulation() { return "shadow"; }
105
- static get originalStyleUrls() {
106
- return {
107
- "$": ["feedback-button.css"]
108
- };
109
- }
110
- static get styleUrls() {
111
- return {
112
- "$": ["feedback-button.css"]
113
- };
114
- }
115
- static get properties() {
116
- return {
117
- "sessionId": {
118
- "type": "string",
119
- "mutable": false,
120
- "complexType": {
121
- "original": "string",
122
- "resolved": "string",
123
- "references": {}
124
- },
125
- "required": false,
126
- "optional": false,
127
- "docs": {
128
- "tags": [],
129
- "text": ""
130
- },
131
- "attribute": "session-id",
132
- "reflect": false,
133
- "defaultValue": "\"\""
134
- },
135
- "customFont": {
136
- "type": "boolean",
137
- "mutable": false,
138
- "complexType": {
139
- "original": "boolean",
140
- "resolved": "boolean",
141
- "references": {}
142
- },
143
- "required": false,
144
- "optional": false,
145
- "docs": {
146
- "tags": [],
147
- "text": ""
148
- },
149
- "attribute": "custom-font",
150
- "reflect": false,
151
- "defaultValue": "false"
152
- },
153
- "errorMessage": {
154
- "type": "string",
155
- "mutable": false,
156
- "complexType": {
157
- "original": "string",
158
- "resolved": "string",
159
- "references": {}
160
- },
161
- "required": false,
162
- "optional": false,
163
- "docs": {
164
- "tags": [],
165
- "text": ""
166
- },
167
- "attribute": "error-message",
168
- "reflect": false,
169
- "defaultValue": "\"Please try again later.\""
170
- },
171
- "errorMessage403": {
172
- "type": "string",
173
- "mutable": false,
174
- "complexType": {
175
- "original": "string",
176
- "resolved": "string",
177
- "references": {}
178
- },
179
- "required": false,
180
- "optional": false,
181
- "docs": {
182
- "tags": [],
183
- "text": ""
184
- },
185
- "attribute": "error-message-4-0-3",
186
- "reflect": false,
187
- "defaultValue": "\"The request URL does not match the one defined in PushFeedback for this project.\""
188
- },
189
- "errorMessage404": {
190
- "type": "string",
191
- "mutable": false,
192
- "complexType": {
193
- "original": "string",
194
- "resolved": "string",
195
- "references": {}
196
- },
197
- "required": false,
198
- "optional": false,
199
- "docs": {
200
- "tags": [],
201
- "text": ""
202
- },
203
- "attribute": "error-message-4-0-4",
204
- "reflect": false,
205
- "defaultValue": "\"We could not find the provided project id in PushFeedback.\""
206
- },
207
- "modalTitle": {
208
- "type": "string",
209
- "mutable": false,
210
- "complexType": {
211
- "original": "string",
212
- "resolved": "string",
213
- "references": {}
214
- },
215
- "required": false,
216
- "optional": false,
217
- "docs": {
218
- "tags": [],
219
- "text": ""
220
- },
221
- "attribute": "modal-title",
222
- "reflect": false,
223
- "defaultValue": "'Share your feedback'"
224
- },
225
- "modalTitleSuccess": {
226
- "type": "string",
227
- "mutable": false,
228
- "complexType": {
229
- "original": "string",
230
- "resolved": "string",
231
- "references": {}
232
- },
233
- "required": false,
234
- "optional": false,
235
- "docs": {
236
- "tags": [],
237
- "text": ""
238
- },
239
- "attribute": "modal-title-success",
240
- "reflect": false,
241
- "defaultValue": "'Thanks for your feedback!'"
242
- },
243
- "modalTitleError": {
244
- "type": "string",
245
- "mutable": false,
246
- "complexType": {
247
- "original": "string",
248
- "resolved": "string",
249
- "references": {}
250
- },
251
- "required": false,
252
- "optional": false,
253
- "docs": {
254
- "tags": [],
255
- "text": ""
256
- },
257
- "attribute": "modal-title-error",
258
- "reflect": false,
259
- "defaultValue": "\"Oops!\""
260
- },
261
- "modalPosition": {
262
- "type": "string",
263
- "mutable": false,
264
- "complexType": {
265
- "original": "string",
266
- "resolved": "string",
267
- "references": {}
268
- },
269
- "required": false,
270
- "optional": false,
271
- "docs": {
272
- "tags": [],
273
- "text": ""
274
- },
275
- "attribute": "modal-position",
276
- "reflect": false,
277
- "defaultValue": "'center'"
278
- },
279
- "sendButtonText": {
280
- "type": "string",
281
- "mutable": false,
282
- "complexType": {
283
- "original": "string",
284
- "resolved": "string",
285
- "references": {}
286
- },
287
- "required": false,
288
- "optional": false,
289
- "docs": {
290
- "tags": [],
291
- "text": ""
292
- },
293
- "attribute": "send-button-text",
294
- "reflect": false,
295
- "defaultValue": "'Send'"
296
- },
297
- "successMessage": {
298
- "type": "string",
299
- "mutable": false,
300
- "complexType": {
301
- "original": "string",
302
- "resolved": "string",
303
- "references": {}
304
- },
305
- "required": false,
306
- "optional": false,
307
- "docs": {
308
- "tags": [],
309
- "text": ""
310
- },
311
- "attribute": "success-message",
312
- "reflect": false,
313
- "defaultValue": "\"\""
314
- },
315
- "project": {
316
- "type": "string",
317
- "mutable": false,
318
- "complexType": {
319
- "original": "string",
320
- "resolved": "string",
321
- "references": {}
322
- },
323
- "required": false,
324
- "optional": false,
325
- "docs": {
326
- "tags": [],
327
- "text": ""
328
- },
329
- "attribute": "project",
330
- "reflect": false,
331
- "defaultValue": "''"
332
- },
333
- "screenshotButtonText": {
334
- "type": "string",
335
- "mutable": false,
336
- "complexType": {
337
- "original": "string",
338
- "resolved": "string",
339
- "references": {}
340
- },
341
- "required": false,
342
- "optional": false,
343
- "docs": {
344
- "tags": [],
345
- "text": ""
346
- },
347
- "attribute": "screenshot-button-text",
348
- "reflect": false,
349
- "defaultValue": "'Add a screenshot'"
350
- },
351
- "screenshotTopbarText": {
352
- "type": "string",
353
- "mutable": false,
354
- "complexType": {
355
- "original": "string",
356
- "resolved": "string",
357
- "references": {}
358
- },
359
- "required": false,
360
- "optional": false,
361
- "docs": {
362
- "tags": [],
363
- "text": ""
364
- },
365
- "attribute": "screenshot-topbar-text",
366
- "reflect": false,
367
- "defaultValue": "'Select an element on this page'"
368
- },
369
- "hideEmail": {
370
- "type": "boolean",
371
- "mutable": false,
372
- "complexType": {
373
- "original": "boolean",
374
- "resolved": "boolean",
375
- "references": {}
376
- },
377
- "required": false,
378
- "optional": false,
379
- "docs": {
380
- "tags": [],
381
- "text": ""
382
- },
383
- "attribute": "hide-email",
384
- "reflect": false,
385
- "defaultValue": "false"
386
- },
387
- "emailAddress": {
388
- "type": "string",
389
- "mutable": false,
390
- "complexType": {
391
- "original": "string",
392
- "resolved": "string",
393
- "references": {}
394
- },
395
- "required": false,
396
- "optional": false,
397
- "docs": {
398
- "tags": [],
399
- "text": ""
400
- },
401
- "attribute": "email-address",
402
- "reflect": false,
403
- "defaultValue": "''"
404
- },
405
- "emailPlaceholder": {
406
- "type": "string",
407
- "mutable": false,
408
- "complexType": {
409
- "original": "string",
410
- "resolved": "string",
411
- "references": {}
412
- },
413
- "required": false,
414
- "optional": false,
415
- "docs": {
416
- "tags": [],
417
- "text": ""
418
- },
419
- "attribute": "email-placeholder",
420
- "reflect": false,
421
- "defaultValue": "'Email address (optional)'"
422
- },
423
- "messagePlaceholder": {
424
- "type": "string",
425
- "mutable": false,
426
- "complexType": {
427
- "original": "string",
428
- "resolved": "string",
429
- "references": {}
430
- },
431
- "required": false,
432
- "optional": false,
433
- "docs": {
434
- "tags": [],
435
- "text": ""
436
- },
437
- "attribute": "message-placeholder",
438
- "reflect": false,
439
- "defaultValue": "'Comments'"
440
- },
441
- "hideRating": {
442
- "type": "boolean",
443
- "mutable": false,
444
- "complexType": {
445
- "original": "boolean",
446
- "resolved": "boolean",
447
- "references": {}
448
- },
449
- "required": false,
450
- "optional": false,
451
- "docs": {
452
- "tags": [],
453
- "text": ""
454
- },
455
- "attribute": "hide-rating",
456
- "reflect": false,
457
- "defaultValue": "false"
458
- },
459
- "rating": {
460
- "type": "number",
461
- "mutable": false,
462
- "complexType": {
463
- "original": "number",
464
- "resolved": "number",
465
- "references": {}
466
- },
467
- "required": false,
468
- "optional": false,
469
- "docs": {
470
- "tags": [],
471
- "text": ""
472
- },
473
- "attribute": "rating",
474
- "reflect": false
475
- },
476
- "ratingMode": {
477
- "type": "string",
478
- "mutable": false,
479
- "complexType": {
480
- "original": "string",
481
- "resolved": "string",
482
- "references": {}
483
- },
484
- "required": false,
485
- "optional": false,
486
- "docs": {
487
- "tags": [],
488
- "text": ""
489
- },
490
- "attribute": "rating-mode",
491
- "reflect": false,
492
- "defaultValue": "'thumbs'"
493
- },
494
- "ratingPlaceholder": {
495
- "type": "string",
496
- "mutable": false,
497
- "complexType": {
498
- "original": "string",
499
- "resolved": "string",
500
- "references": {}
501
- },
502
- "required": false,
503
- "optional": false,
504
- "docs": {
505
- "tags": [],
506
- "text": ""
507
- },
508
- "attribute": "rating-placeholder",
509
- "reflect": false,
510
- "defaultValue": "'Was this page helpful?'"
511
- },
512
- "ratingStarsPlaceholder": {
513
- "type": "string",
514
- "mutable": false,
515
- "complexType": {
516
- "original": "string",
517
- "resolved": "string",
518
- "references": {}
519
- },
520
- "required": false,
521
- "optional": false,
522
- "docs": {
523
- "tags": [],
524
- "text": ""
525
- },
526
- "attribute": "rating-stars-placeholder",
527
- "reflect": false,
528
- "defaultValue": "'How would you rate this page?'"
529
- },
530
- "buttonStyle": {
531
- "type": "string",
532
- "mutable": false,
533
- "complexType": {
534
- "original": "string",
535
- "resolved": "string",
536
- "references": {}
537
- },
538
- "required": false,
539
- "optional": false,
540
- "docs": {
541
- "tags": [],
542
- "text": ""
543
- },
544
- "attribute": "button-style",
545
- "reflect": false,
546
- "defaultValue": "'default'"
547
- },
548
- "buttonPosition": {
549
- "type": "string",
550
- "mutable": false,
551
- "complexType": {
552
- "original": "string",
553
- "resolved": "string",
554
- "references": {}
555
- },
556
- "required": false,
557
- "optional": false,
558
- "docs": {
559
- "tags": [],
560
- "text": ""
561
- },
562
- "attribute": "button-position",
563
- "reflect": false,
564
- "defaultValue": "'default'"
565
- },
566
- "hideIcon": {
567
- "type": "boolean",
568
- "mutable": false,
569
- "complexType": {
570
- "original": "boolean",
571
- "resolved": "boolean",
572
- "references": {}
573
- },
574
- "required": false,
575
- "optional": false,
576
- "docs": {
577
- "tags": [],
578
- "text": ""
579
- },
580
- "attribute": "hide-icon",
581
- "reflect": false,
582
- "defaultValue": "false"
583
- },
584
- "hideScreenshotButton": {
585
- "type": "boolean",
586
- "mutable": false,
587
- "complexType": {
588
- "original": "boolean",
589
- "resolved": "boolean",
590
- "references": {}
591
- },
592
- "required": false,
593
- "optional": false,
594
- "docs": {
595
- "tags": [],
596
- "text": ""
597
- },
598
- "attribute": "hide-screenshot-button",
599
- "reflect": false,
600
- "defaultValue": "false"
601
- },
602
- "hidePrivacyPolicy": {
603
- "type": "boolean",
604
- "mutable": false,
605
- "complexType": {
606
- "original": "boolean",
607
- "resolved": "boolean",
608
- "references": {}
609
- },
610
- "required": false,
611
- "optional": false,
612
- "docs": {
613
- "tags": [],
614
- "text": ""
615
- },
616
- "attribute": "hide-privacy-policy",
617
- "reflect": false,
618
- "defaultValue": "true"
619
- },
620
- "privacyPolicyText": {
621
- "type": "string",
622
- "mutable": false,
623
- "complexType": {
624
- "original": "string",
625
- "resolved": "string",
626
- "references": {}
627
- },
628
- "required": false,
629
- "optional": false,
630
- "docs": {
631
- "tags": [],
632
- "text": ""
633
- },
634
- "attribute": "privacy-policy-text",
635
- "reflect": false,
636
- "defaultValue": "\"I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.\""
637
- },
638
- "fetchData": {
639
- "type": "boolean",
640
- "mutable": false,
641
- "complexType": {
642
- "original": "boolean",
643
- "resolved": "boolean",
644
- "references": {}
645
- },
646
- "required": false,
647
- "optional": false,
648
- "docs": {
649
- "tags": [],
650
- "text": ""
651
- },
652
- "attribute": "fetch-data",
653
- "reflect": false,
654
- "defaultValue": "true"
655
- }
656
- };
657
- }
658
- static get elementRef() { return "el"; }
659
- }
1
+ import { Host, h } from '@stencil/core';
2
+ export class FeedbackButton {
3
+ constructor() {
4
+ this.sessionId = "";
5
+ this.customFont = false;
6
+ this.errorMessage = "Please try again later.";
7
+ this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
8
+ this.errorMessage404 = "We could not find the provided project id in PushFeedback.";
9
+ this.modalTitle = 'Share your feedback';
10
+ this.modalTitleSuccess = 'Thanks for your feedback!';
11
+ this.modalTitleError = "Oops!";
12
+ this.modalPosition = 'center';
13
+ this.sendButtonText = 'Send';
14
+ this.successMessage = "";
15
+ this.project = '';
16
+ this.screenshotButtonText = 'Add a screenshot';
17
+ this.screenshotTopbarText = 'Select an element on this page';
18
+ this.hideEmail = false;
19
+ this.emailAddress = '';
20
+ this.emailPlaceholder = 'Email address (optional)';
21
+ this.messagePlaceholder = 'Comments';
22
+ this.hideRating = false;
23
+ this.rating = undefined;
24
+ this.ratingMode = 'thumbs';
25
+ this.ratingPlaceholder = 'Was this page helpful?';
26
+ this.ratingStarsPlaceholder = 'How would you rate this page?';
27
+ this.buttonStyle = 'default';
28
+ this.buttonPosition = 'default';
29
+ this.hideIcon = false;
30
+ this.hideScreenshotButton = false;
31
+ this.hidePrivacyPolicy = true;
32
+ this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
33
+ this.fetchData = true;
34
+ }
35
+ componentWillLoad() {
36
+ if (!this.sessionId) {
37
+ let storedSessionId = localStorage.getItem('pushfeedback_sessionid');
38
+ if (!storedSessionId) {
39
+ storedSessionId = this.generateRandomSessionId();
40
+ localStorage.setItem('pushfeedback_sessionid', storedSessionId);
41
+ this.sessionId = storedSessionId;
42
+ }
43
+ }
44
+ }
45
+ componentDidLoad() {
46
+ if (this.buttonPosition === 'center-right') {
47
+ const buttonContent = this.el.shadowRoot.querySelector('.feedback-button-content');
48
+ let adjustement = 0;
49
+ if (this.isSafariBrowser()) {
50
+ adjustement = 10;
51
+ }
52
+ buttonContent.style.right = `${(buttonContent.offsetWidth + adjustement) / 2 * -1}px`;
53
+ }
54
+ if (!this.customFont) {
55
+ this.loadInterFont();
56
+ }
57
+ }
58
+ connectedCallback() {
59
+ this.feedbackModal = document.createElement('feedback-modal');
60
+ const props = [
61
+ 'customFont',
62
+ 'errorMessage',
63
+ 'errorMessage403',
64
+ 'errorMessage404',
65
+ 'modalTitle',
66
+ 'modalTitleSuccess',
67
+ 'modalTitleError',
68
+ 'modalPosition',
69
+ 'sendButtonText',
70
+ 'successMessage',
71
+ 'project',
72
+ 'screenshotButtonText',
73
+ 'screenshotTopbarText',
74
+ 'hideEmail',
75
+ 'emailAddress',
76
+ 'emailPlaceholder',
77
+ 'messagePlaceholder',
78
+ 'hideRating',
79
+ 'rating',
80
+ 'ratingMode',
81
+ 'ratingPlaceholder',
82
+ 'ratingStarsPlaceholder',
83
+ 'hideScreenshotButton',
84
+ 'hidePrivacyPolicy',
85
+ 'privacyPolicyText',
86
+ 'fetchData'
87
+ ];
88
+ props.forEach(prop => {
89
+ this.feedbackModal[prop] = this[prop];
90
+ });
91
+ document.body.appendChild(this.feedbackModal);
92
+ }
93
+ disconnectedCallback() {
94
+ document.body.removeChild(this.feedbackModal);
95
+ }
96
+ generateRandomSessionId(length = 16) {
97
+ return Math.random().toString(36).substr(2, length);
98
+ }
99
+ isSafariBrowser() {
100
+ const isSafari = /safari/i.test(navigator.userAgent) && !/chrome/i.test(navigator.userAgent);
101
+ return isSafari;
102
+ }
103
+ loadInterFont() {
104
+ const link = document.createElement('link');
105
+ link.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap';
106
+ link.rel = 'stylesheet';
107
+ document.head.appendChild(link);
108
+ }
109
+ showModal() {
110
+ this.feedbackModal.showModal = true;
111
+ }
112
+ render() {
113
+ return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, onClick: () => this.showModal() }, !this.hideIcon && (h("span", { class: "feedback-button-content-icon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "icon-edit" }, h("path", { d: "M12 20h9" }), h("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })))), h("slot", null))));
114
+ }
115
+ static get is() { return "feedback-button"; }
116
+ static get encapsulation() { return "shadow"; }
117
+ static get originalStyleUrls() {
118
+ return {
119
+ "$": ["feedback-button.css"]
120
+ };
121
+ }
122
+ static get styleUrls() {
123
+ return {
124
+ "$": ["feedback-button.css"]
125
+ };
126
+ }
127
+ static get properties() {
128
+ return {
129
+ "sessionId": {
130
+ "type": "string",
131
+ "mutable": true,
132
+ "complexType": {
133
+ "original": "string",
134
+ "resolved": "string",
135
+ "references": {}
136
+ },
137
+ "required": false,
138
+ "optional": false,
139
+ "docs": {
140
+ "tags": [],
141
+ "text": ""
142
+ },
143
+ "attribute": "session-id",
144
+ "reflect": true,
145
+ "defaultValue": "\"\""
146
+ },
147
+ "customFont": {
148
+ "type": "boolean",
149
+ "mutable": false,
150
+ "complexType": {
151
+ "original": "boolean",
152
+ "resolved": "boolean",
153
+ "references": {}
154
+ },
155
+ "required": false,
156
+ "optional": false,
157
+ "docs": {
158
+ "tags": [],
159
+ "text": ""
160
+ },
161
+ "attribute": "custom-font",
162
+ "reflect": false,
163
+ "defaultValue": "false"
164
+ },
165
+ "errorMessage": {
166
+ "type": "string",
167
+ "mutable": false,
168
+ "complexType": {
169
+ "original": "string",
170
+ "resolved": "string",
171
+ "references": {}
172
+ },
173
+ "required": false,
174
+ "optional": false,
175
+ "docs": {
176
+ "tags": [],
177
+ "text": ""
178
+ },
179
+ "attribute": "error-message",
180
+ "reflect": false,
181
+ "defaultValue": "\"Please try again later.\""
182
+ },
183
+ "errorMessage403": {
184
+ "type": "string",
185
+ "mutable": false,
186
+ "complexType": {
187
+ "original": "string",
188
+ "resolved": "string",
189
+ "references": {}
190
+ },
191
+ "required": false,
192
+ "optional": false,
193
+ "docs": {
194
+ "tags": [],
195
+ "text": ""
196
+ },
197
+ "attribute": "error-message-4-0-3",
198
+ "reflect": false,
199
+ "defaultValue": "\"The request URL does not match the one defined in PushFeedback for this project.\""
200
+ },
201
+ "errorMessage404": {
202
+ "type": "string",
203
+ "mutable": false,
204
+ "complexType": {
205
+ "original": "string",
206
+ "resolved": "string",
207
+ "references": {}
208
+ },
209
+ "required": false,
210
+ "optional": false,
211
+ "docs": {
212
+ "tags": [],
213
+ "text": ""
214
+ },
215
+ "attribute": "error-message-4-0-4",
216
+ "reflect": false,
217
+ "defaultValue": "\"We could not find the provided project id in PushFeedback.\""
218
+ },
219
+ "modalTitle": {
220
+ "type": "string",
221
+ "mutable": false,
222
+ "complexType": {
223
+ "original": "string",
224
+ "resolved": "string",
225
+ "references": {}
226
+ },
227
+ "required": false,
228
+ "optional": false,
229
+ "docs": {
230
+ "tags": [],
231
+ "text": ""
232
+ },
233
+ "attribute": "modal-title",
234
+ "reflect": false,
235
+ "defaultValue": "'Share your feedback'"
236
+ },
237
+ "modalTitleSuccess": {
238
+ "type": "string",
239
+ "mutable": false,
240
+ "complexType": {
241
+ "original": "string",
242
+ "resolved": "string",
243
+ "references": {}
244
+ },
245
+ "required": false,
246
+ "optional": false,
247
+ "docs": {
248
+ "tags": [],
249
+ "text": ""
250
+ },
251
+ "attribute": "modal-title-success",
252
+ "reflect": false,
253
+ "defaultValue": "'Thanks for your feedback!'"
254
+ },
255
+ "modalTitleError": {
256
+ "type": "string",
257
+ "mutable": false,
258
+ "complexType": {
259
+ "original": "string",
260
+ "resolved": "string",
261
+ "references": {}
262
+ },
263
+ "required": false,
264
+ "optional": false,
265
+ "docs": {
266
+ "tags": [],
267
+ "text": ""
268
+ },
269
+ "attribute": "modal-title-error",
270
+ "reflect": false,
271
+ "defaultValue": "\"Oops!\""
272
+ },
273
+ "modalPosition": {
274
+ "type": "string",
275
+ "mutable": false,
276
+ "complexType": {
277
+ "original": "string",
278
+ "resolved": "string",
279
+ "references": {}
280
+ },
281
+ "required": false,
282
+ "optional": false,
283
+ "docs": {
284
+ "tags": [],
285
+ "text": ""
286
+ },
287
+ "attribute": "modal-position",
288
+ "reflect": false,
289
+ "defaultValue": "'center'"
290
+ },
291
+ "sendButtonText": {
292
+ "type": "string",
293
+ "mutable": false,
294
+ "complexType": {
295
+ "original": "string",
296
+ "resolved": "string",
297
+ "references": {}
298
+ },
299
+ "required": false,
300
+ "optional": false,
301
+ "docs": {
302
+ "tags": [],
303
+ "text": ""
304
+ },
305
+ "attribute": "send-button-text",
306
+ "reflect": false,
307
+ "defaultValue": "'Send'"
308
+ },
309
+ "successMessage": {
310
+ "type": "string",
311
+ "mutable": false,
312
+ "complexType": {
313
+ "original": "string",
314
+ "resolved": "string",
315
+ "references": {}
316
+ },
317
+ "required": false,
318
+ "optional": false,
319
+ "docs": {
320
+ "tags": [],
321
+ "text": ""
322
+ },
323
+ "attribute": "success-message",
324
+ "reflect": false,
325
+ "defaultValue": "\"\""
326
+ },
327
+ "project": {
328
+ "type": "string",
329
+ "mutable": false,
330
+ "complexType": {
331
+ "original": "string",
332
+ "resolved": "string",
333
+ "references": {}
334
+ },
335
+ "required": false,
336
+ "optional": false,
337
+ "docs": {
338
+ "tags": [],
339
+ "text": ""
340
+ },
341
+ "attribute": "project",
342
+ "reflect": false,
343
+ "defaultValue": "''"
344
+ },
345
+ "screenshotButtonText": {
346
+ "type": "string",
347
+ "mutable": false,
348
+ "complexType": {
349
+ "original": "string",
350
+ "resolved": "string",
351
+ "references": {}
352
+ },
353
+ "required": false,
354
+ "optional": false,
355
+ "docs": {
356
+ "tags": [],
357
+ "text": ""
358
+ },
359
+ "attribute": "screenshot-button-text",
360
+ "reflect": false,
361
+ "defaultValue": "'Add a screenshot'"
362
+ },
363
+ "screenshotTopbarText": {
364
+ "type": "string",
365
+ "mutable": false,
366
+ "complexType": {
367
+ "original": "string",
368
+ "resolved": "string",
369
+ "references": {}
370
+ },
371
+ "required": false,
372
+ "optional": false,
373
+ "docs": {
374
+ "tags": [],
375
+ "text": ""
376
+ },
377
+ "attribute": "screenshot-topbar-text",
378
+ "reflect": false,
379
+ "defaultValue": "'Select an element on this page'"
380
+ },
381
+ "hideEmail": {
382
+ "type": "boolean",
383
+ "mutable": false,
384
+ "complexType": {
385
+ "original": "boolean",
386
+ "resolved": "boolean",
387
+ "references": {}
388
+ },
389
+ "required": false,
390
+ "optional": false,
391
+ "docs": {
392
+ "tags": [],
393
+ "text": ""
394
+ },
395
+ "attribute": "hide-email",
396
+ "reflect": false,
397
+ "defaultValue": "false"
398
+ },
399
+ "emailAddress": {
400
+ "type": "string",
401
+ "mutable": false,
402
+ "complexType": {
403
+ "original": "string",
404
+ "resolved": "string",
405
+ "references": {}
406
+ },
407
+ "required": false,
408
+ "optional": false,
409
+ "docs": {
410
+ "tags": [],
411
+ "text": ""
412
+ },
413
+ "attribute": "email-address",
414
+ "reflect": false,
415
+ "defaultValue": "''"
416
+ },
417
+ "emailPlaceholder": {
418
+ "type": "string",
419
+ "mutable": false,
420
+ "complexType": {
421
+ "original": "string",
422
+ "resolved": "string",
423
+ "references": {}
424
+ },
425
+ "required": false,
426
+ "optional": false,
427
+ "docs": {
428
+ "tags": [],
429
+ "text": ""
430
+ },
431
+ "attribute": "email-placeholder",
432
+ "reflect": false,
433
+ "defaultValue": "'Email address (optional)'"
434
+ },
435
+ "messagePlaceholder": {
436
+ "type": "string",
437
+ "mutable": false,
438
+ "complexType": {
439
+ "original": "string",
440
+ "resolved": "string",
441
+ "references": {}
442
+ },
443
+ "required": false,
444
+ "optional": false,
445
+ "docs": {
446
+ "tags": [],
447
+ "text": ""
448
+ },
449
+ "attribute": "message-placeholder",
450
+ "reflect": false,
451
+ "defaultValue": "'Comments'"
452
+ },
453
+ "hideRating": {
454
+ "type": "boolean",
455
+ "mutable": false,
456
+ "complexType": {
457
+ "original": "boolean",
458
+ "resolved": "boolean",
459
+ "references": {}
460
+ },
461
+ "required": false,
462
+ "optional": false,
463
+ "docs": {
464
+ "tags": [],
465
+ "text": ""
466
+ },
467
+ "attribute": "hide-rating",
468
+ "reflect": false,
469
+ "defaultValue": "false"
470
+ },
471
+ "rating": {
472
+ "type": "number",
473
+ "mutable": false,
474
+ "complexType": {
475
+ "original": "number",
476
+ "resolved": "number",
477
+ "references": {}
478
+ },
479
+ "required": false,
480
+ "optional": false,
481
+ "docs": {
482
+ "tags": [],
483
+ "text": ""
484
+ },
485
+ "attribute": "rating",
486
+ "reflect": false
487
+ },
488
+ "ratingMode": {
489
+ "type": "string",
490
+ "mutable": false,
491
+ "complexType": {
492
+ "original": "string",
493
+ "resolved": "string",
494
+ "references": {}
495
+ },
496
+ "required": false,
497
+ "optional": false,
498
+ "docs": {
499
+ "tags": [],
500
+ "text": ""
501
+ },
502
+ "attribute": "rating-mode",
503
+ "reflect": false,
504
+ "defaultValue": "'thumbs'"
505
+ },
506
+ "ratingPlaceholder": {
507
+ "type": "string",
508
+ "mutable": false,
509
+ "complexType": {
510
+ "original": "string",
511
+ "resolved": "string",
512
+ "references": {}
513
+ },
514
+ "required": false,
515
+ "optional": false,
516
+ "docs": {
517
+ "tags": [],
518
+ "text": ""
519
+ },
520
+ "attribute": "rating-placeholder",
521
+ "reflect": false,
522
+ "defaultValue": "'Was this page helpful?'"
523
+ },
524
+ "ratingStarsPlaceholder": {
525
+ "type": "string",
526
+ "mutable": false,
527
+ "complexType": {
528
+ "original": "string",
529
+ "resolved": "string",
530
+ "references": {}
531
+ },
532
+ "required": false,
533
+ "optional": false,
534
+ "docs": {
535
+ "tags": [],
536
+ "text": ""
537
+ },
538
+ "attribute": "rating-stars-placeholder",
539
+ "reflect": false,
540
+ "defaultValue": "'How would you rate this page?'"
541
+ },
542
+ "buttonStyle": {
543
+ "type": "string",
544
+ "mutable": false,
545
+ "complexType": {
546
+ "original": "string",
547
+ "resolved": "string",
548
+ "references": {}
549
+ },
550
+ "required": false,
551
+ "optional": false,
552
+ "docs": {
553
+ "tags": [],
554
+ "text": ""
555
+ },
556
+ "attribute": "button-style",
557
+ "reflect": false,
558
+ "defaultValue": "'default'"
559
+ },
560
+ "buttonPosition": {
561
+ "type": "string",
562
+ "mutable": false,
563
+ "complexType": {
564
+ "original": "string",
565
+ "resolved": "string",
566
+ "references": {}
567
+ },
568
+ "required": false,
569
+ "optional": false,
570
+ "docs": {
571
+ "tags": [],
572
+ "text": ""
573
+ },
574
+ "attribute": "button-position",
575
+ "reflect": false,
576
+ "defaultValue": "'default'"
577
+ },
578
+ "hideIcon": {
579
+ "type": "boolean",
580
+ "mutable": false,
581
+ "complexType": {
582
+ "original": "boolean",
583
+ "resolved": "boolean",
584
+ "references": {}
585
+ },
586
+ "required": false,
587
+ "optional": false,
588
+ "docs": {
589
+ "tags": [],
590
+ "text": ""
591
+ },
592
+ "attribute": "hide-icon",
593
+ "reflect": false,
594
+ "defaultValue": "false"
595
+ },
596
+ "hideScreenshotButton": {
597
+ "type": "boolean",
598
+ "mutable": false,
599
+ "complexType": {
600
+ "original": "boolean",
601
+ "resolved": "boolean",
602
+ "references": {}
603
+ },
604
+ "required": false,
605
+ "optional": false,
606
+ "docs": {
607
+ "tags": [],
608
+ "text": ""
609
+ },
610
+ "attribute": "hide-screenshot-button",
611
+ "reflect": false,
612
+ "defaultValue": "false"
613
+ },
614
+ "hidePrivacyPolicy": {
615
+ "type": "boolean",
616
+ "mutable": false,
617
+ "complexType": {
618
+ "original": "boolean",
619
+ "resolved": "boolean",
620
+ "references": {}
621
+ },
622
+ "required": false,
623
+ "optional": false,
624
+ "docs": {
625
+ "tags": [],
626
+ "text": ""
627
+ },
628
+ "attribute": "hide-privacy-policy",
629
+ "reflect": false,
630
+ "defaultValue": "true"
631
+ },
632
+ "privacyPolicyText": {
633
+ "type": "string",
634
+ "mutable": false,
635
+ "complexType": {
636
+ "original": "string",
637
+ "resolved": "string",
638
+ "references": {}
639
+ },
640
+ "required": false,
641
+ "optional": false,
642
+ "docs": {
643
+ "tags": [],
644
+ "text": ""
645
+ },
646
+ "attribute": "privacy-policy-text",
647
+ "reflect": false,
648
+ "defaultValue": "\"I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.\""
649
+ },
650
+ "fetchData": {
651
+ "type": "boolean",
652
+ "mutable": false,
653
+ "complexType": {
654
+ "original": "boolean",
655
+ "resolved": "boolean",
656
+ "references": {}
657
+ },
658
+ "required": false,
659
+ "optional": false,
660
+ "docs": {
661
+ "tags": [],
662
+ "text": ""
663
+ },
664
+ "attribute": "fetch-data",
665
+ "reflect": false,
666
+ "defaultValue": "true"
667
+ }
668
+ };
669
+ }
670
+ static get elementRef() { return "el"; }
671
+ }