pushfeedback 0.1.82 → 0.1.84
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/canvas-editor_3.cjs.entry.js +124 -60
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pushfeedback.cjs.js +1 -1
- package/dist/collection/components/canvas-editor/canvas-editor.js +57 -42
- package/dist/collection/components/feedback-button/feedback-button.js +42 -2
- package/dist/collection/components/feedback-modal/feedback-modal.css +40 -0
- package/dist/collection/components/feedback-modal/feedback-modal.js +96 -15
- package/dist/components/canvas-editor2.js +57 -42
- package/dist/components/feedback-button.js +8 -2
- package/dist/components/feedback-modal2.js +63 -16
- package/dist/esm/canvas-editor_3.entry.js +124 -60
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pushfeedback.js +1 -1
- package/dist/pushfeedback/p-06bb93cb.entry.js +1 -0
- package/dist/pushfeedback/pushfeedback.css +1 -1
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/dist/types/components/feedback-button/feedback-button.d.ts +2 -0
- package/dist/types/components/feedback-modal/feedback-modal.d.ts +9 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/pushfeedback/p-69f4eacb.entry.js +0 -1
|
@@ -35,7 +35,7 @@ const CanvasEditor = class {
|
|
|
35
35
|
this.hideAllFeedbackElements();
|
|
36
36
|
try {
|
|
37
37
|
// Wait a moment for UI to update before capturing
|
|
38
|
-
await new Promise(resolve => setTimeout(resolve, 100));
|
|
38
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
39
39
|
// Capture viewport screenshot using browser API
|
|
40
40
|
const dataUrl = await this.captureViewportScreenshot();
|
|
41
41
|
this.originalImageData = dataUrl;
|
|
@@ -63,14 +63,14 @@ const CanvasEditor = class {
|
|
|
63
63
|
this.hideAllFeedbackElements = () => {
|
|
64
64
|
// Hide all feedback buttons and modals on the page
|
|
65
65
|
const feedbackElements = document.querySelectorAll('feedback-button, feedback-modal');
|
|
66
|
-
feedbackElements.forEach(element => {
|
|
66
|
+
feedbackElements.forEach((element) => {
|
|
67
67
|
element.style.visibility = 'hidden';
|
|
68
68
|
});
|
|
69
69
|
};
|
|
70
70
|
this.showAllFeedbackElements = () => {
|
|
71
71
|
// Show all feedback buttons and modals on the page
|
|
72
72
|
const feedbackElements = document.querySelectorAll('feedback-button, feedback-modal');
|
|
73
|
-
feedbackElements.forEach(element => {
|
|
73
|
+
feedbackElements.forEach((element) => {
|
|
74
74
|
element.style.visibility = 'visible';
|
|
75
75
|
});
|
|
76
76
|
};
|
|
@@ -126,7 +126,7 @@ const CanvasEditor = class {
|
|
|
126
126
|
const scaleY = containerHeight / img.height;
|
|
127
127
|
// Use a more aggressive scaling approach for large screens
|
|
128
128
|
// Allow scaling up to 1.5x on very large screens, but still maintain aspect ratio
|
|
129
|
-
const maxScale = window.innerWidth > 1920 ? 1.5 :
|
|
129
|
+
const maxScale = window.innerWidth > 1920 ? 1.5 : window.innerWidth > 1200 ? 1.2 : 1;
|
|
130
130
|
const scale = Math.min(scaleX, scaleY, maxScale);
|
|
131
131
|
// Calculate final display dimensions
|
|
132
132
|
const displayWidth = img.width * scale;
|
|
@@ -150,7 +150,7 @@ const CanvasEditor = class {
|
|
|
150
150
|
this.canvasContext.clearRect(0, 0, this.canvasRef.width, this.canvasRef.height);
|
|
151
151
|
this.canvasContext.drawImage(img, 0, 0);
|
|
152
152
|
// Draw all annotations
|
|
153
|
-
this.annotations.forEach(annotation => {
|
|
153
|
+
this.annotations.forEach((annotation) => {
|
|
154
154
|
this.drawAnnotation(annotation);
|
|
155
155
|
});
|
|
156
156
|
};
|
|
@@ -200,7 +200,7 @@ const CanvasEditor = class {
|
|
|
200
200
|
this.drawLineResizeHandles(annotation);
|
|
201
201
|
}
|
|
202
202
|
break;
|
|
203
|
-
case 'text':
|
|
203
|
+
case 'text': {
|
|
204
204
|
const fontSize = annotation.fontSize || 24;
|
|
205
205
|
this.canvasContext.fillStyle = annotation.color;
|
|
206
206
|
this.canvasContext.font = `${fontSize}px Arial`;
|
|
@@ -210,6 +210,7 @@ const CanvasEditor = class {
|
|
|
210
210
|
this.drawTextSelectionIndicator(annotation);
|
|
211
211
|
}
|
|
212
212
|
break;
|
|
213
|
+
}
|
|
213
214
|
}
|
|
214
215
|
};
|
|
215
216
|
// Draw selection indicator for shapes
|
|
@@ -281,7 +282,7 @@ const CanvasEditor = class {
|
|
|
281
282
|
};
|
|
282
283
|
this.deleteSelectedAnnotation = () => {
|
|
283
284
|
if (this.selectedAnnotation) {
|
|
284
|
-
const index = this.annotations.findIndex(a => a === this.selectedAnnotation);
|
|
285
|
+
const index = this.annotations.findIndex((a) => a === this.selectedAnnotation);
|
|
285
286
|
if (index !== -1) {
|
|
286
287
|
this.annotations = this.annotations.filter((_, i) => i !== index);
|
|
287
288
|
this.selectedAnnotation = null;
|
|
@@ -352,26 +353,32 @@ const CanvasEditor = class {
|
|
|
352
353
|
this.isPointInResizeHandle = (x, y, annotation) => {
|
|
353
354
|
const handleSize = 8;
|
|
354
355
|
switch (annotation.type) {
|
|
355
|
-
case 'rectangle':
|
|
356
|
+
case 'rectangle': {
|
|
356
357
|
const right = annotation.startX + annotation.width;
|
|
357
358
|
const bottom = annotation.startY + annotation.height;
|
|
358
359
|
// Only check bottom-right corner handle
|
|
359
|
-
return x >= right - handleSize / 2 &&
|
|
360
|
-
|
|
360
|
+
return (x >= right - handleSize / 2 &&
|
|
361
|
+
x <= right + handleSize / 2 &&
|
|
362
|
+
y >= bottom - handleSize / 2 &&
|
|
363
|
+
y <= bottom + handleSize / 2);
|
|
364
|
+
}
|
|
361
365
|
case 'line':
|
|
362
|
-
case 'arrow':
|
|
366
|
+
case 'arrow': {
|
|
363
367
|
// Check both endpoint handles
|
|
364
368
|
const lineHandles = [
|
|
365
369
|
{ x: annotation.startX, y: annotation.startY, point: 'start' },
|
|
366
|
-
{ x: annotation.endX, y: annotation.endY, point: 'end' }
|
|
370
|
+
{ x: annotation.endX, y: annotation.endY, point: 'end' },
|
|
367
371
|
];
|
|
368
372
|
for (const handle of lineHandles) {
|
|
369
|
-
if (x >= handle.x - handleSize / 2 &&
|
|
370
|
-
|
|
373
|
+
if (x >= handle.x - handleSize / 2 &&
|
|
374
|
+
x <= handle.x + handleSize / 2 &&
|
|
375
|
+
y >= handle.y - handleSize / 2 &&
|
|
376
|
+
y <= handle.y + handleSize / 2) {
|
|
371
377
|
return handle.point; // Return which endpoint was clicked
|
|
372
378
|
}
|
|
373
379
|
}
|
|
374
380
|
return false;
|
|
381
|
+
}
|
|
375
382
|
default:
|
|
376
383
|
return false;
|
|
377
384
|
}
|
|
@@ -400,13 +407,13 @@ const CanvasEditor = class {
|
|
|
400
407
|
// Define handle positions (2 endpoints)
|
|
401
408
|
const handles = [
|
|
402
409
|
{ x: annotation.startX, y: annotation.startY },
|
|
403
|
-
{ x: annotation.endX, y: annotation.endY } // End point
|
|
410
|
+
{ x: annotation.endX, y: annotation.endY }, // End point
|
|
404
411
|
];
|
|
405
412
|
// Draw each handle
|
|
406
413
|
this.canvasContext.fillStyle = '#0070F4'; // Primary color
|
|
407
414
|
this.canvasContext.strokeStyle = '#ffffff';
|
|
408
415
|
this.canvasContext.lineWidth = 2;
|
|
409
|
-
handles.forEach(handle => {
|
|
416
|
+
handles.forEach((handle) => {
|
|
410
417
|
this.canvasContext.fillRect(handle.x - handleSize / 2, handle.y - handleSize / 2, handleSize, handleSize);
|
|
411
418
|
this.canvasContext.strokeRect(handle.x - handleSize / 2, handle.y - handleSize / 2, handleSize, handleSize);
|
|
412
419
|
});
|
|
@@ -427,12 +434,12 @@ const CanvasEditor = class {
|
|
|
427
434
|
if (!this.resizingAnnotation || !this.dragStartPos)
|
|
428
435
|
return;
|
|
429
436
|
const annotation = this.resizingAnnotation;
|
|
430
|
-
const index = this.annotations.findIndex(a => a === annotation);
|
|
437
|
+
const index = this.annotations.findIndex((a) => a === annotation);
|
|
431
438
|
if (index === -1)
|
|
432
439
|
return;
|
|
433
|
-
|
|
440
|
+
const updatedAnnotation = Object.assign({}, annotation);
|
|
434
441
|
switch (annotation.type) {
|
|
435
|
-
case 'rectangle':
|
|
442
|
+
case 'rectangle': {
|
|
436
443
|
// Rectangle resize logic - only bottom-right corner
|
|
437
444
|
const rectDeltaX = currentPos.x - this.dragStartPos.x;
|
|
438
445
|
const rectDeltaY = currentPos.y - this.dragStartPos.y;
|
|
@@ -440,6 +447,7 @@ const CanvasEditor = class {
|
|
|
440
447
|
updatedAnnotation.width = Math.max(10, this.resizeStartDimensions.width + rectDeltaX);
|
|
441
448
|
updatedAnnotation.height = Math.max(10, this.resizeStartDimensions.height + rectDeltaY);
|
|
442
449
|
break;
|
|
450
|
+
}
|
|
443
451
|
case 'line':
|
|
444
452
|
case 'arrow':
|
|
445
453
|
// Line/arrow resize logic - move endpoints
|
|
@@ -462,7 +470,7 @@ const CanvasEditor = class {
|
|
|
462
470
|
this.startTextEditing = (annotation) => {
|
|
463
471
|
const newText = prompt(this.editTextPromptText, annotation.text);
|
|
464
472
|
if (newText !== null && newText.trim()) {
|
|
465
|
-
const index = this.annotations.findIndex(a => a === annotation);
|
|
473
|
+
const index = this.annotations.findIndex((a) => a === annotation);
|
|
466
474
|
if (index !== -1) {
|
|
467
475
|
this.annotations[index] = Object.assign(Object.assign({}, annotation), { text: newText.trim() });
|
|
468
476
|
this.selectedAnnotation = this.annotations[index];
|
|
@@ -473,7 +481,7 @@ const CanvasEditor = class {
|
|
|
473
481
|
// Update selected annotation font size
|
|
474
482
|
this.updateSelectedTextSize = (newSize) => {
|
|
475
483
|
if (this.selectedAnnotation && this.selectedAnnotation.type === 'text') {
|
|
476
|
-
const index = this.annotations.findIndex(a => a === this.selectedAnnotation);
|
|
484
|
+
const index = this.annotations.findIndex((a) => a === this.selectedAnnotation);
|
|
477
485
|
if (index !== -1) {
|
|
478
486
|
this.annotations[index] = Object.assign(Object.assign({}, this.selectedAnnotation), { fontSize: Math.max(8, Math.min(72, newSize)) });
|
|
479
487
|
this.selectedAnnotation = this.annotations[index];
|
|
@@ -483,8 +491,9 @@ const CanvasEditor = class {
|
|
|
483
491
|
};
|
|
484
492
|
// Update selected annotation border width
|
|
485
493
|
this.updateSelectedBorderWidth = (newWidth) => {
|
|
486
|
-
if (this.selectedAnnotation &&
|
|
487
|
-
|
|
494
|
+
if (this.selectedAnnotation &&
|
|
495
|
+
['rectangle', 'line', 'arrow'].includes(this.selectedAnnotation.type)) {
|
|
496
|
+
const index = this.annotations.findIndex((a) => a === this.selectedAnnotation);
|
|
488
497
|
if (index !== -1) {
|
|
489
498
|
this.annotations[index] = Object.assign(Object.assign({}, this.selectedAnnotation), { lineWidth: Math.max(1, Math.min(20, newWidth)) });
|
|
490
499
|
this.selectedAnnotation = this.annotations[index];
|
|
@@ -547,7 +556,7 @@ const CanvasEditor = class {
|
|
|
547
556
|
y: coords.y,
|
|
548
557
|
text,
|
|
549
558
|
color: this.canvasDrawingColor,
|
|
550
|
-
fontSize: this.canvasTextSize
|
|
559
|
+
fontSize: this.canvasTextSize,
|
|
551
560
|
};
|
|
552
561
|
this.annotations = [...this.annotations, annotation];
|
|
553
562
|
this.redrawAnnotations();
|
|
@@ -560,7 +569,7 @@ const CanvasEditor = class {
|
|
|
560
569
|
startX: coords.x,
|
|
561
570
|
startY: coords.y,
|
|
562
571
|
color: this.canvasDrawingColor,
|
|
563
|
-
lineWidth: this.canvasLineWidth
|
|
572
|
+
lineWidth: this.canvasLineWidth,
|
|
564
573
|
};
|
|
565
574
|
}
|
|
566
575
|
};
|
|
@@ -600,7 +609,7 @@ const CanvasEditor = class {
|
|
|
600
609
|
break;
|
|
601
610
|
}
|
|
602
611
|
// Update annotation in array
|
|
603
|
-
const index = this.annotations.findIndex(a => a === this.draggedAnnotation);
|
|
612
|
+
const index = this.annotations.findIndex((a) => a === this.draggedAnnotation);
|
|
604
613
|
if (index !== -1) {
|
|
605
614
|
this.annotations[index] = updatedAnnotation;
|
|
606
615
|
this.draggedAnnotation = updatedAnnotation;
|
|
@@ -713,22 +722,26 @@ const CanvasEditor = class {
|
|
|
713
722
|
this.isPointInAnnotation = (x, y, annotation) => {
|
|
714
723
|
const tolerance = 10; // Click tolerance
|
|
715
724
|
switch (annotation.type) {
|
|
716
|
-
case 'rectangle':
|
|
725
|
+
case 'rectangle': {
|
|
717
726
|
const left = Math.min(annotation.startX, annotation.startX + annotation.width);
|
|
718
727
|
const right = Math.max(annotation.startX, annotation.startX + annotation.width);
|
|
719
728
|
const top = Math.min(annotation.startY, annotation.startY + annotation.height);
|
|
720
729
|
const bottom = Math.max(annotation.startY, annotation.startY + annotation.height);
|
|
721
|
-
return x >= left - tolerance &&
|
|
722
|
-
|
|
730
|
+
return (x >= left - tolerance &&
|
|
731
|
+
x <= right + tolerance &&
|
|
732
|
+
y >= top - tolerance &&
|
|
733
|
+
y <= bottom + tolerance);
|
|
734
|
+
}
|
|
723
735
|
case 'line':
|
|
724
|
-
case 'arrow':
|
|
736
|
+
case 'arrow': {
|
|
725
737
|
// Distance from point to line
|
|
726
738
|
const A = annotation.endY - annotation.startY;
|
|
727
739
|
const B = annotation.startX - annotation.endX;
|
|
728
740
|
const C = annotation.endX * annotation.startY - annotation.startX * annotation.endY;
|
|
729
741
|
const distance = Math.abs(A * x + B * y + C) / Math.sqrt(A * A + B * B);
|
|
730
742
|
return distance <= tolerance;
|
|
731
|
-
|
|
743
|
+
}
|
|
744
|
+
case 'text': {
|
|
732
745
|
// Use actual text dimensions for better dragging
|
|
733
746
|
const fontSize = annotation.fontSize || 24;
|
|
734
747
|
const textWidth = this.getTextWidth(annotation.text, fontSize);
|
|
@@ -738,8 +751,8 @@ const CanvasEditor = class {
|
|
|
738
751
|
const textRight = annotation.x + textWidth + tolerance;
|
|
739
752
|
const textTop = annotation.y - textHeight - tolerance;
|
|
740
753
|
const textBottom = annotation.y + tolerance;
|
|
741
|
-
return x >= textLeft && x <= textRight &&
|
|
742
|
-
|
|
754
|
+
return x >= textLeft && x <= textRight && y >= textTop && y <= textBottom;
|
|
755
|
+
}
|
|
743
756
|
default:
|
|
744
757
|
return false;
|
|
745
758
|
}
|
|
@@ -821,10 +834,10 @@ const CanvasEditor = class {
|
|
|
821
834
|
video: {
|
|
822
835
|
mediaSource: 'screen',
|
|
823
836
|
width: { ideal: window.innerWidth },
|
|
824
|
-
height: { ideal: window.innerHeight }
|
|
837
|
+
height: { ideal: window.innerHeight },
|
|
825
838
|
},
|
|
826
839
|
audio: false,
|
|
827
|
-
preferCurrentTab: true
|
|
840
|
+
preferCurrentTab: true,
|
|
828
841
|
});
|
|
829
842
|
// Create video element to capture frame
|
|
830
843
|
const video = document.createElement('video');
|
|
@@ -844,20 +857,20 @@ const CanvasEditor = class {
|
|
|
844
857
|
const ctx = canvas.getContext('2d');
|
|
845
858
|
ctx.drawImage(video, 0, 0);
|
|
846
859
|
// Stop the stream
|
|
847
|
-
stream.getTracks().forEach(track => track.stop());
|
|
860
|
+
stream.getTracks().forEach((track) => track.stop());
|
|
848
861
|
// Convert to data URL
|
|
849
862
|
const dataUrl = canvas.toDataURL('image/png');
|
|
850
863
|
console.log('Screenshot captured successfully using Screen Capture API');
|
|
851
864
|
resolve(dataUrl);
|
|
852
865
|
}
|
|
853
866
|
catch (error) {
|
|
854
|
-
stream.getTracks().forEach(track => track.stop());
|
|
867
|
+
stream.getTracks().forEach((track) => track.stop());
|
|
855
868
|
reject(error);
|
|
856
869
|
}
|
|
857
870
|
}, 100);
|
|
858
871
|
};
|
|
859
872
|
video.onerror = () => {
|
|
860
|
-
stream.getTracks().forEach(track => track.stop());
|
|
873
|
+
stream.getTracks().forEach((track) => track.stop());
|
|
861
874
|
reject(new Error('Failed to load video for screenshot capture'));
|
|
862
875
|
};
|
|
863
876
|
});
|
|
@@ -869,7 +882,8 @@ const CanvasEditor = class {
|
|
|
869
882
|
}
|
|
870
883
|
render() {
|
|
871
884
|
var _a, _b, _c, _d, _e, _f;
|
|
872
|
-
return (index.h("div", { class: "canvas-editor-wrapper" }, this.showCanvasEditor && (index.h("div", { class: "canvas-editor-overlay" }, index.h("div", { class: "canvas-editor-modal" }, index.h("div", { class: "canvas-editor-header" }, index.h("div", { class: "canvas-editor-title" }, index.h("h3", null, this.canvasEditorTitle)), index.h("div", { class: "canvas-editor-toolbar" }, index.h("div", { class: "toolbar-section" }, index.h("div", { class: "tool-group" }, index.h("button", { class: `tool-btn ${this.canvasDrawingTool === 'rectangle' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'rectangle', title: "Rectangle" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-square" }, index.h("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }))), index.h("button", { class: `tool-btn ${this.canvasDrawingTool === 'line' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'line', title: "Line" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-minus" }, index.h("path", { d: "M5 12h14" }))), index.h("button", { class: `tool-btn ${this.canvasDrawingTool === 'arrow' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'arrow', title: "Arrow" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-move-up-right" }, index.h("path", { d: "M13 5H19V11" }), index.h("path", { d: "M19 5L5 19" }))), index.h("button", { class: `tool-btn ${this.canvasDrawingTool === 'text' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'text', title: "Text" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-type" }, index.h("path", { d: "M12 4v16" }), index.h("path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" }), index.h("path", { d: "M9 20h6" }))), index.h("div", { class: "toolbar-divider" }), index.h("button", { class: "tool-btn undo-btn", onClick: this.undoLastAnnotation, disabled: this.annotations.length === 0, title: "Undo" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-undo" }, index.h("path", { d: "M3 7v6h6" }), index.h("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" }))), this.selectedAnnotation && (index.h("button", { class: "tool-btn delete-btn", onClick: this.deleteSelectedAnnotation, title: "Delete" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-trash-2" }, index.h("path", { d: "M3 6h18" }), index.h("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }), index.h("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }), index.h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), index.h("line", { x1: "14", x2: "14", y1: "11", y2: "17" })))))), index.h("div", { class: "toolbar-section" }, index.h("div", { class: "color-palette" }, this.defaultColors.map((color, index$1) => (index.h("div", { class: "color-slot-wrapper" }, index.h("button", { class: `color-btn ${this.canvasDrawingColor === color ? 'active' : ''} ${this.editingColorIndex === index$1 ? 'editing' : ''}`, style: { backgroundColor: color }, onClick: () => this.handleColorSlotClick(index$1), title: `Color ${index$1 + 1} - Click to customize` }, this.editingColorIndex === index$1 && (index.h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "white", "stroke-width": "2" }, index.h("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" })))), this.editingColorIndex === index$1 && this.showColorPicker && (index.h("div", { class: "color-picker-dropdown" }, index.h("input", { type: "color", value: color, onInput: (e) => this.handleColorPickerInput(e), onClick: (e) => this.handleColorPickerClick(e) })))))))), (this.selectedAnnotation || this.canvasDrawingTool) && (index.h("div", { class: "toolbar-section selected-annotation-controls" }, (((_a = this.selectedAnnotation) === null || _a === void 0 ? void 0 : _a.type) === 'text' ||
|
|
885
|
+
return (index.h("div", { class: "canvas-editor-wrapper" }, this.showCanvasEditor && (index.h("div", { class: "canvas-editor-overlay", part: "overlay" }, index.h("div", { class: "canvas-editor-modal", part: "modal" }, index.h("div", { class: "canvas-editor-header", part: "header" }, index.h("div", { class: "canvas-editor-title", part: "title" }, index.h("h3", null, this.canvasEditorTitle)), index.h("div", { class: "canvas-editor-toolbar", part: "toolbar" }, index.h("div", { class: "toolbar-section" }, index.h("div", { class: "tool-group" }, index.h("button", { class: `tool-btn ${this.canvasDrawingTool === 'rectangle' ? 'active' : ''}`, part: "tool-button", onClick: () => (this.canvasDrawingTool = 'rectangle'), title: "Rectangle" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-square" }, index.h("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }))), index.h("button", { class: `tool-btn ${this.canvasDrawingTool === 'line' ? 'active' : ''}`, part: "tool-button", onClick: () => (this.canvasDrawingTool = 'line'), title: "Line" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-minus" }, index.h("path", { d: "M5 12h14" }))), index.h("button", { class: `tool-btn ${this.canvasDrawingTool === 'arrow' ? 'active' : ''}`, part: "tool-button", onClick: () => (this.canvasDrawingTool = 'arrow'), title: "Arrow" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-move-up-right" }, index.h("path", { d: "M13 5H19V11" }), index.h("path", { d: "M19 5L5 19" }))), index.h("button", { class: `tool-btn ${this.canvasDrawingTool === 'text' ? 'active' : ''}`, part: "tool-button", onClick: () => (this.canvasDrawingTool = 'text'), title: "Text" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-type" }, index.h("path", { d: "M12 4v16" }), index.h("path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" }), index.h("path", { d: "M9 20h6" }))), index.h("div", { class: "toolbar-divider" }), index.h("button", { class: "tool-btn undo-btn", part: "tool-button", onClick: this.undoLastAnnotation, disabled: this.annotations.length === 0, title: "Undo" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-undo" }, index.h("path", { d: "M3 7v6h6" }), index.h("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" }))), this.selectedAnnotation && (index.h("button", { class: "tool-btn delete-btn", part: "tool-button", onClick: this.deleteSelectedAnnotation, title: "Delete" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-trash-2" }, index.h("path", { d: "M3 6h18" }), index.h("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }), index.h("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }), index.h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), index.h("line", { x1: "14", x2: "14", y1: "11", y2: "17" })))))), index.h("div", { class: "toolbar-section" }, index.h("div", { class: "color-palette" }, this.defaultColors.map((color, index$1) => (index.h("div", { class: "color-slot-wrapper" }, index.h("button", { class: `color-btn ${this.canvasDrawingColor === color ? 'active' : ''} ${this.editingColorIndex === index$1 ? 'editing' : ''}`, style: { backgroundColor: color }, onClick: () => this.handleColorSlotClick(index$1), title: `Color ${index$1 + 1} - Click to customize` }, this.editingColorIndex === index$1 && (index.h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "white", "stroke-width": "2" }, index.h("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" })))), this.editingColorIndex === index$1 && this.showColorPicker && (index.h("div", { class: "color-picker-dropdown" }, index.h("input", { type: "color", value: color, onInput: (e) => this.handleColorPickerInput(e), onClick: (e) => this.handleColorPickerClick(e) })))))))), (this.selectedAnnotation || this.canvasDrawingTool) && (index.h("div", { class: "toolbar-section selected-annotation-controls" }, (((_a = this.selectedAnnotation) === null || _a === void 0 ? void 0 : _a.type) === 'text' ||
|
|
886
|
+
(!this.selectedAnnotation && this.canvasDrawingTool === 'text')) && (index.h("div", { class: "text-controls" }, index.h("div", { class: "font-size-control" }, index.h("label", null, this.sizeLabelText), index.h("input", { type: "range", min: "8", max: "72", value: ((_b = this.selectedAnnotation) === null || _b === void 0 ? void 0 : _b.fontSize) || this.canvasTextSize, onInput: (e) => {
|
|
873
887
|
const newSize = parseInt(e.target.value);
|
|
874
888
|
if (this.selectedAnnotation) {
|
|
875
889
|
this.updateSelectedTextSize(newSize);
|
|
@@ -877,8 +891,9 @@ const CanvasEditor = class {
|
|
|
877
891
|
else {
|
|
878
892
|
this.canvasTextSize = newSize;
|
|
879
893
|
}
|
|
880
|
-
}, class: "size-slider" }), index.h("span", { class: "size-value" }, ((_c = this.selectedAnnotation) === null || _c === void 0 ? void 0 : _c.fontSize) || this.canvasTextSize, "px")), this.selectedAnnotation && (index.h("button", { class: "action-btn small", onClick: () => this.startTextEditing(this.selectedAnnotation) }, this.editTextButtonText)))), (
|
|
881
|
-
(!this.selectedAnnotation &&
|
|
894
|
+
}, class: "size-slider" }), index.h("span", { class: "size-value" }, ((_c = this.selectedAnnotation) === null || _c === void 0 ? void 0 : _c.fontSize) || this.canvasTextSize, "px")), this.selectedAnnotation && (index.h("button", { class: "action-btn small", onClick: () => this.startTextEditing(this.selectedAnnotation) }, this.editTextButtonText)))), (['rectangle', 'line', 'arrow'].includes((_d = this.selectedAnnotation) === null || _d === void 0 ? void 0 : _d.type) ||
|
|
895
|
+
(!this.selectedAnnotation &&
|
|
896
|
+
['rectangle', 'line', 'arrow'].includes(this.canvasDrawingTool))) && (index.h("div", { class: "shape-controls" }, index.h("div", { class: "border-width-control" }, index.h("label", null, this.borderLabelText), index.h("input", { type: "range", min: "1", max: "20", value: ((_e = this.selectedAnnotation) === null || _e === void 0 ? void 0 : _e.lineWidth) || this.canvasLineWidth, onInput: (e) => {
|
|
882
897
|
const newWidth = parseInt(e.target.value);
|
|
883
898
|
if (this.selectedAnnotation) {
|
|
884
899
|
this.updateSelectedBorderWidth(newWidth);
|
|
@@ -886,7 +901,7 @@ const CanvasEditor = class {
|
|
|
886
901
|
else {
|
|
887
902
|
this.canvasLineWidth = newWidth;
|
|
888
903
|
}
|
|
889
|
-
}, class: "size-slider" }), index.h("span", { class: "size-value" }, ((_f = this.selectedAnnotation) === null || _f === void 0 ? void 0 : _f.lineWidth) || this.canvasLineWidth, "px")))))), index.h("div", { class: "toolbar-section" }, index.h("button", { class: "action-btn secondary", onClick: this.closeCanvasEditor }, this.canvasEditorCancelText), index.h("button", { class: "action-btn primary", onClick: this.saveAnnotations }, this.canvasEditorSaveText))), index.h("div", { class: "canvas-editor-content" }, index.h("canvas", { ref: (el) => this.canvasRef = el, class: "annotation-canvas", onMouseDown: this.handleCanvasMouseDown, onMouseMove: this.handleCanvasMouseMove, onMouseUp: this.handleCanvasMouseUp, onMouseLeave: this.handleCanvasMouseUp }))))))));
|
|
904
|
+
}, class: "size-slider" }), index.h("span", { class: "size-value" }, ((_f = this.selectedAnnotation) === null || _f === void 0 ? void 0 : _f.lineWidth) || this.canvasLineWidth, "px")))))), index.h("div", { class: "toolbar-section" }, index.h("button", { class: "action-btn secondary", part: "cancel-button", onClick: this.closeCanvasEditor }, this.canvasEditorCancelText), index.h("button", { class: "action-btn primary", part: "save-button", onClick: this.saveAnnotations }, this.canvasEditorSaveText))), index.h("div", { class: "canvas-editor-content", part: "content" }, index.h("canvas", { ref: (el) => (this.canvasRef = el), class: "annotation-canvas", part: "canvas", onMouseDown: this.handleCanvasMouseDown, onMouseMove: this.handleCanvasMouseMove, onMouseUp: this.handleCanvasMouseUp, onMouseLeave: this.handleCanvasMouseUp }))))))));
|
|
890
905
|
}
|
|
891
906
|
};
|
|
892
907
|
CanvasEditor.style = canvasEditorCss;
|
|
@@ -905,8 +920,10 @@ const FeedbackButton = class {
|
|
|
905
920
|
this.sessionId = '';
|
|
906
921
|
this.metadata = '';
|
|
907
922
|
this.submit = false;
|
|
923
|
+
this.clickOutsideClose = true;
|
|
908
924
|
this.customFont = false;
|
|
909
925
|
this.emailAddress = '';
|
|
926
|
+
this.historyClose = true;
|
|
910
927
|
this.isEmailRequired = false;
|
|
911
928
|
this.fetchData = true;
|
|
912
929
|
this.hideEmail = false;
|
|
@@ -979,9 +996,11 @@ const FeedbackButton = class {
|
|
|
979
996
|
connectedCallback() {
|
|
980
997
|
this.feedbackModal = document.createElement('feedback-modal');
|
|
981
998
|
const props = [
|
|
999
|
+
'clickOutsideClose',
|
|
982
1000
|
'customFont',
|
|
983
1001
|
'emailAddress',
|
|
984
1002
|
'fetchData',
|
|
1003
|
+
'historyClose',
|
|
985
1004
|
'hideEmail',
|
|
986
1005
|
'hidePrivacyPolicy',
|
|
987
1006
|
'hideRating',
|
|
@@ -1085,7 +1104,7 @@ const FeedbackButton = class {
|
|
|
1085
1104
|
else if (res.status === 202) {
|
|
1086
1105
|
const limitExceededBody = {
|
|
1087
1106
|
message: "You received a new feedback entry. You've reached the 25 message limit for your current plan. Upgrade to continue receiving feedback.",
|
|
1088
|
-
id: await res.json()
|
|
1107
|
+
id: await res.json(),
|
|
1089
1108
|
};
|
|
1090
1109
|
this.feedbackSent.emit({ feedback: limitExceededBody });
|
|
1091
1110
|
}
|
|
@@ -1107,19 +1126,30 @@ const FeedbackButton = class {
|
|
|
1107
1126
|
}
|
|
1108
1127
|
}
|
|
1109
1128
|
render() {
|
|
1110
|
-
return (index.h(index.Host, null, index.h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition} ${this.customFont ? 'feedback-button-content--custom-font' : ''} ${this.hideMobile ? 'feedback-button-content--hide-mobile' : ''}`, onClick: () => this.showModal() }, !this.hideIcon && this.buttonStyle != 'default' && (index.h("span", { class: "feedback-button-content-icon" }, index.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" }, index.h("path", { d: "M12 20h9" }), index.h("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })))), index.h("slot", null))));
|
|
1129
|
+
return (index.h(index.Host, null, index.h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition} ${this.customFont ? 'feedback-button-content--custom-font' : ''} ${this.hideMobile ? 'feedback-button-content--hide-mobile' : ''}`, part: "button", onClick: () => this.showModal() }, !this.hideIcon && this.buttonStyle != 'default' && (index.h("span", { class: "feedback-button-content-icon", part: "icon" }, index.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" }, index.h("path", { d: "M12 20h9" }), index.h("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })))), index.h("slot", null))));
|
|
1111
1130
|
}
|
|
1112
1131
|
get el() { return index.getElement(this); }
|
|
1113
1132
|
};
|
|
1114
1133
|
FeedbackButton.style = feedbackButtonCss;
|
|
1115
1134
|
|
|
1116
|
-
const feedbackModalCss = ".text-center{flex-grow:1;text-align:center}.feedback-modal-wrapper *{font-family:var(--feedback-font-family)}.feedback-modal-wrapper--custom-font *{font-family:inherit}.feedback-modal-wrapper{position:absolute;z-index:var(--feedback-modal-modal-wrapper-z-index)}.feedback-overlay{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;opacity:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index);transition:opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.feedback-overlay--visible{opacity:1}.feedback-modal{display:inline-block;position:relative}.feedback-modal-content{background-color:var(--feedback-modal-content-bg-color);border:1px solid rgba(0, 0, 0, 0.08);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 0px 0px 1px rgba(0, 0, 0, 0.02),\n 0px 2px 4px rgba(0, 0, 0, 0.04),\n 0px 8px 16px rgba(0, 0, 0, 0.06),\n 0px 16px 32px rgba(0, 0, 0, 0.04);box-sizing:border-box;color:var(--feedback-modal-content-text-color);display:flex;flex-direction:column;left:50%;max-width:90%;padding:24px;position:fixed;top:50%;transform:translate(-50%, -50%) scale(0.96);opacity:0;width:100%;z-index:var(--feedback-modal-content-z-index);transition:transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1)}.feedback-modal-content--open{transform:translate(-50%, -50%) scale(1);opacity:1}.feedback-modal-header{color:var(--feedback-modal-header-text-color);display:flex;font-size:var(--feedback-modal-header-font-size);font-weight:var(--feedback-modal-header-font-weight);justify-content:space-between;align-items:flex-start;margin-bottom:24px;letter-spacing:-0.01em}.feedback-modal-header-content{flex:1}.feedback-modal-header-text{display:flex;flex-direction:column;gap:6px}.feedback-modal-title{display:block}.feedback-modal-powered-by{display:block;font-size:13px;font-weight:400;color:var(--feedback-color-gray-500);line-height:1.4}.feedback-modal-powered-by a{color:var(--feedback-modal-header-text-color);text-decoration:none;font-weight:500}.feedback-modal-powered-by a:hover{text-decoration:underline}.feedback-modal-header--no-content{margin-bottom:0}.feedback-modal-rating-buttons{width:100%;margin-bottom:24px;display:flex;gap:4px}.feedback-modal-rating-button{padding:0;background-color:transparent;border:transparent;margin-right:8px;cursor:pointer}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button{transition:transform 0.15s ease, opacity 0.15s ease}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button:hover{transform:scale(1.1)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button{border:1.5px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);font-size:var(--feedback-modal-button-font-size);font-weight:500;margin-right:12px;justify-content:center;padding:10px 16px;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover{transform:translateY(-2px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.12)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected{background-color:var(--feedback-modal-button-bg-color-active);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-selected-color)}.feedback-modal-rating-buttons svg{stroke:var(--feedback-modal-rating-button-color);cursor:pointer}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button--selected svg{fill:var(--feedback-modal-rating-button-stars-selected-color);stroke:var(--feedback-modal-rating-button-stars-selected-color)}.feedback-modal-text textarea{background-color:var(--feedback-modal-input-bg-color);border:1.5px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:100px;min-height:100px;padding:12px;resize:vertical;width:100%;transition:border-color 0.2s ease, box-shadow 0.2s ease;line-height:1.5}.feedback-modal-text textarea:hover{border-color:var(--feedback-modal-input-border-color-hover)}.feedback-modal-email input{background-color:var(--feedback-modal-input-bg-color);border:1.5px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:44px;padding:12px;width:100%;transition:border-color 0.2s ease, box-shadow 0.2s ease}.feedback-modal-email input:hover{border-color:var(--feedback-modal-input-border-color-hover)}.feedback-modal-text textarea:-webkit-autofill,.feedback-modal-email input:-webkit-autofill,.feedback-modal-email input:-webkit-autofill:hover,.feedback-modal-email input:-webkit-autofill:focus,.feedback-modal-email input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--feedback-modal-input-bg-color) inset !important;-webkit-text-fill-color:var(--feedback-modal-input-text-color) !important;transition:background-color 5000s ease-in-out 0s}.feedback-modal-privacy{font-size:var(--feedback-modal-input-font-size);margin-bottom:20px}.feedback-modal-text textarea:focus,.feedback-modal-email input:focus{border:1.5px solid var(--feedback-modal-input-border-color-focused);outline:none;box-shadow:0 0 0 3px rgba(59, 130, 246, 0.1)}.feedback-modal-buttons{display:flex;flex-direction:column}.feedback-modal-buttons .feedback-modal-button{margin-bottom:20px}.feedback-modal-button{align-items:center;background-color:transparent;border:1.5px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);cursor:pointer;display:flex;font-size:var(--feedback-modal-button-font-size);font-weight:500;justify-content:center;min-height:44px;padding:10px 16px;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.feedback-modal-button svg{margin-right:6px}.feedback-modal-button path{fill:var(--feedback-modal-button-icon-color)}.feedback-modal-button:hover path,.feedback-modal-button--active path{fill:var(--feedback-modal-button-icon-color-active)}.feedback-modal-button--submit{background-color:var(--feedback-modal-button-submit-bg-color);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-submit-text-color);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}.feedback-modal-button:hover,.feedback-modal-button--active{background-color:var(--feedback-modal-button-bg-color-active);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active);transform:translateY(-1px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.12)}.feedback-modal-button--submit:hover{background-color:var(--feedback-modal-button-submit-bg-color-hover);border:1.5px solid var(--feedback-modal-button-submit-border-color-hover);color:var(--feedback-modal-button-submit-text-color-hover);transform:translateY(-1px);box-shadow:0 6px 12px rgba(0, 0, 0, 0.15)}.feedback-modal-button--submit:active{transform:translateY(0);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}.feedback-modal-input-heading{display:block;font-size:14px;font-weight:500;padding-bottom:12px;color:var(--feedback-modal-header-text-color);letter-spacing:-0.01em}.feedback-modal-footer{font-size:12px;text-align:center}.feedback-modal-footer a{color:var(--feedback-modal-footer-link);font-weight:500;text-decoration:none}.feedback-logo,.feedback-footer-text{display:block;text-align:center;margin-top:5px}.feedback-footer-text{margin-top:10px;line-height:1.5}.feedback-footer-combined{display:block;text-align:center;font-size:11px;color:#666;line-height:1.5}.feedback-footer-combined a{color:#666;text-decoration:underline}.feedback-recaptcha-notice{display:block;text-align:center;margin-bottom:10px;font-size:11px;color:#666;line-height:1.4}.feedback-recaptcha-notice a{color:#666;text-decoration:underline}.feedback-modal-close{background-color:var(--feedback-modal-close-bg-color);border:0;border-radius:6px;cursor:pointer;height:32px;width:32px;margin-left:auto;padding:0;display:flex;align-items:center;justify-content:center;transition:all 0.2s ease}.feedback-modal-close:hover{background-color:rgba(0, 0, 0, 0.06);transform:scale(1.05)}.feedback-modal-close:active{transform:scale(0.95)}.feedback-modal-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-screenshot{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index)}.feedback-modal-screenshot-header{align-items:center;background-color:var(--feedback-modal-screenshot-header-bg-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-screenshot-header-text-color);cursor:pointer;display:flex;left:50%;top:20px;transform:translateX(-50%);padding:10px;position:fixed;width:max-content;z-index:var(--feedback-modal-screenshot-header-z-index)}.feedback-modal-screenshot-close{height:24px;padding-left:10px;width:24px}.feedback-modal-screenshot-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-message{font-size:var(--feedback-modal-message-font-size);margin:0;line-height:1.6;color:var(--feedback-modal-content-text-color)}.feedback-modal-element-hover{background-color:transparent;cursor:pointer;border:1px solid var(--feedback-modal-element-hover-border-color)}.feedback-modal-element-selected{background-color:transparent;border:3px solid var(--feedback-modal-element-selected-border-color) !important;box-shadow:0 0 0 2px rgba(0, 123, 255, 0.3) !important}.screenshot-preview{display:inline-block;width:32px;height:32px;overflow:hidden;border-radius:6px;margin-right:10px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);border:2px solid rgba(255, 255, 255, 0.8)}.screenshot-preview:hover{transform:scale(1.15);box-shadow:0 4px 8px rgba(0, 0, 0, 0.15)}.screenshot-preview img{width:100%;height:100%;object-fit:cover}.screenshot-loading{display:inline-flex;align-items:center;margin-right:8px}@media screen and (min-width: 768px){.feedback-modal-content{max-width:var(--feedback-modal-content-max-width)}.feedback-modal-content.feedback-modal-content--bottom-right{bottom:var(--feedback-modal-content-position-bottom);left:initial;right:var(--feedback-modal-content-position-right);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--bottom-left{bottom:var(--feedback-modal-content-position-bottom);left:var(--feedback-modal-content-position-left);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--top-right{right:var(--feedback-modal-content-position-right);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--top-left{left:var(--feedback-modal-content-position-left);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--center-left{left:5px;right:auto;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--center-right{left:auto;right:5px;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--sidebar-left.feedback-modal-content--open,.feedback-modal-content.feedback-modal-content--sidebar-right.feedback-modal-content--open{transform:translateX(0)}.feedback-modal-content.feedback-modal-content--sidebar-left{max-width:var(--feedback-modal-content-sidebar-max-width);left:0;right:auto;height:100vh;top:0;transform:translateX(-100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-content.feedback-modal-content--sidebar-right{max-width:var(--feedback-modal-content-sidebar-max-width);left:auto;right:0;height:100vh;top:0;transform:translateX(100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-text textarea{height:150px;min-height:150px}.feedback-modal-content.feedback-modal-content--bottom-right{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--bottom-left{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-left.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-right{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-left{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-left.feedback-modal-content--open{transform:translateY(0)}}@keyframes feather-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.feather-loader{animation:feather-spin 1s linear infinite;display:block}.screenshot-error-notification{position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:10001;max-width:500px;width:90%;animation:slideDown 0.3s ease-out}@keyframes slideDown{from{opacity:0;transform:translateX(-50%) translateY(-20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}.screenshot-error-content{background:#fee;border:1.5px solid #fcc;border-radius:10px;padding:14px 18px;display:flex;align-items:center;gap:12px;box-shadow:0 0 0 1px rgba(197, 48, 48, 0.05),\n 0 4px 6px rgba(0, 0, 0, 0.07),\n 0 10px 20px rgba(0, 0, 0, 0.1);color:#c53030}.screenshot-error-content svg:first-child{color:#e53e3e;flex-shrink:0}.screenshot-error-content span{flex:1;font-size:14px;line-height:1.4;font-weight:500}.error-close-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:6px;color:#c53030;flex-shrink:0;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center}.error-close-btn:hover{background:rgba(197, 48, 48, 0.15);transform:scale(1.1)}.error-close-btn:active{transform:scale(0.95)}@media screen and (max-width: 768px){.feedback-modal-content{width:100vw;height:100dvh;max-width:none;border-radius:0;top:0;left:0;transform:scale(0.95);padding:24px 20px;display:flex;flex-direction:column}.feedback-modal-content--open{transform:scale(1)}.feedback-modal-buttons{display:flex;flex-direction:column;gap:12px}.feedback-modal-button--screenshot{display:none !important}.feedback-modal-button--submit{width:100%}.feedback-modal-text textarea{flex:1;min-height:120px;resize:none}}.feedback-modal-wrapper--embedded{position:relative;z-index:auto;display:block;width:100%}.feedback-modal-content--embedded{position:relative !important;left:auto !important;right:auto !important;top:auto !important;bottom:auto !important;transform:none !important;opacity:1 !important;max-width:100%;margin:0 auto;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);text-align:left}.feedback-modal-content--embedded.feedback-modal-content--open{transform:none !important}@media screen and (max-width: 768px){.feedback-modal-content--embedded{width:100%;height:auto;border-radius:var(--feedback-modal-content-border-radius);padding:24px}.feedback-modal-content--embedded .feedback-modal-button--screenshot{display:flex !important}}";
|
|
1135
|
+
const feedbackModalCss = ".text-center{flex-grow:1;text-align:center}.feedback-modal-wrapper *{font-family:var(--feedback-font-family)}.feedback-modal-wrapper--custom-font *{font-family:inherit}.feedback-modal-wrapper{position:absolute;z-index:var(--feedback-modal-modal-wrapper-z-index)}.feedback-overlay{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;opacity:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index);transition:opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.feedback-overlay--visible{opacity:1}.feedback-modal{display:inline-block;position:relative}.feedback-modal-content{background-color:var(--feedback-modal-content-bg-color);border:1px solid rgba(0, 0, 0, 0.08);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 0px 0px 1px rgba(0, 0, 0, 0.02),\n 0px 2px 4px rgba(0, 0, 0, 0.04),\n 0px 8px 16px rgba(0, 0, 0, 0.06),\n 0px 16px 32px rgba(0, 0, 0, 0.04);box-sizing:border-box;color:var(--feedback-modal-content-text-color);display:flex;flex-direction:column;left:50%;max-width:90%;padding:24px;position:fixed;top:50%;transform:translate(-50%, -50%) scale(0.96);opacity:0;width:100%;z-index:var(--feedback-modal-content-z-index);transition:transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1)}.feedback-modal-content--open{transform:translate(-50%, -50%) scale(1);opacity:1}.feedback-modal-header{color:var(--feedback-modal-header-text-color);display:flex;font-size:var(--feedback-modal-header-font-size);font-weight:var(--feedback-modal-header-font-weight);justify-content:space-between;align-items:flex-start;margin-bottom:24px;letter-spacing:-0.01em}.feedback-modal-header-content{flex:1}.feedback-modal-header-text{display:flex;flex-direction:column;gap:6px}.feedback-modal-title{display:block}.feedback-modal-powered-by{display:block;font-size:13px;font-weight:400;color:var(--feedback-color-gray-500);line-height:1.4}.feedback-modal-powered-by a{color:var(--feedback-modal-header-text-color);text-decoration:none;font-weight:500}.feedback-modal-powered-by a:hover{text-decoration:underline}.feedback-modal-header--no-content{margin-bottom:0}.feedback-modal-rating-buttons{width:100%;margin-bottom:24px;display:flex;gap:4px}.feedback-modal-rating-button{padding:0;background-color:transparent;border:transparent;margin-right:8px;cursor:pointer}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button{transition:transform 0.15s ease, opacity 0.15s ease}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button:hover{transform:scale(1.1)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button{border:1.5px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);font-size:var(--feedback-modal-button-font-size);font-weight:500;margin-right:12px;justify-content:center;padding:10px 16px;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive{background-color:var(--feedback-modal-rating-button-positive-bg-color);border-color:var(--feedback-modal-rating-button-positive-border-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative{background-color:var(--feedback-modal-rating-button-negative-bg-color);border-color:var(--feedback-modal-rating-button-negative-border-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover{transform:translateY(-2px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.12)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected{background-color:var(--feedback-modal-button-bg-color-active);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-selected-color)}.feedback-modal-rating-buttons svg{stroke:var(--feedback-modal-rating-button-color);cursor:pointer}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive svg{stroke:var(--feedback-modal-rating-button-positive-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative svg{stroke:var(--feedback-modal-rating-button-negative-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive.feedback-modal-rating-button--selected{background-color:var(--feedback-modal-rating-button-positive-selected-bg-color);border-color:var(--feedback-modal-rating-button-positive-selected-border-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative.feedback-modal-rating-button--selected{background-color:var(--feedback-modal-rating-button-negative-selected-bg-color);border-color:var(--feedback-modal-rating-button-negative-selected-border-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--positive.feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-positive-selected-color)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--negative.feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-negative-selected-color)}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button--selected svg{fill:var(--feedback-modal-rating-button-stars-selected-color);stroke:var(--feedback-modal-rating-button-stars-selected-color)}.feedback-modal-text textarea{background-color:var(--feedback-modal-input-bg-color);border:1.5px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:100px;min-height:100px;padding:12px;resize:vertical;width:100%;transition:border-color 0.2s ease, box-shadow 0.2s ease;line-height:1.5}.feedback-modal-text textarea:hover{border-color:var(--feedback-modal-input-border-color-hover)}.feedback-modal-email input{background-color:var(--feedback-modal-input-bg-color);border:1.5px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:44px;padding:12px;width:100%;transition:border-color 0.2s ease, box-shadow 0.2s ease}.feedback-modal-email input:hover{border-color:var(--feedback-modal-input-border-color-hover)}.feedback-modal-text textarea:-webkit-autofill,.feedback-modal-email input:-webkit-autofill,.feedback-modal-email input:-webkit-autofill:hover,.feedback-modal-email input:-webkit-autofill:focus,.feedback-modal-email input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--feedback-modal-input-bg-color) inset !important;-webkit-text-fill-color:var(--feedback-modal-input-text-color) !important;transition:background-color 5000s ease-in-out 0s}.feedback-modal-privacy{font-size:var(--feedback-modal-input-font-size);margin-bottom:20px}.feedback-modal-text textarea:focus,.feedback-modal-email input:focus{border:1.5px solid var(--feedback-modal-input-border-color-focused);outline:none;box-shadow:0 0 0 3px rgba(59, 130, 246, 0.1)}.feedback-modal-buttons{display:flex;flex-direction:column}.feedback-modal-buttons .feedback-modal-button{margin-bottom:20px}.feedback-modal-button{align-items:center;background-color:transparent;border:1.5px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);cursor:pointer;display:flex;font-size:var(--feedback-modal-button-font-size);font-weight:500;justify-content:center;min-height:44px;padding:10px 16px;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.feedback-modal-button svg{margin-right:6px}.feedback-modal-button path{fill:var(--feedback-modal-button-icon-color)}.feedback-modal-button:hover path,.feedback-modal-button--active path{fill:var(--feedback-modal-button-icon-color-active)}.feedback-modal-button--submit{background-color:var(--feedback-modal-button-submit-bg-color);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-submit-text-color);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}.feedback-modal-button:hover,.feedback-modal-button--active{background-color:var(--feedback-modal-button-bg-color-active);border:1.5px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active);transform:translateY(-1px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.12)}.feedback-modal-button--submit:hover{background-color:var(--feedback-modal-button-submit-bg-color-hover);border:1.5px solid var(--feedback-modal-button-submit-border-color-hover);color:var(--feedback-modal-button-submit-text-color-hover);transform:translateY(-1px);box-shadow:0 6px 12px rgba(0, 0, 0, 0.15)}.feedback-modal-button--submit:active{transform:translateY(0);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}.feedback-modal-input-heading{display:block;font-size:14px;font-weight:500;padding-bottom:12px;color:var(--feedback-modal-header-text-color);letter-spacing:-0.01em}.feedback-modal-footer{font-size:12px;text-align:center}.feedback-modal-footer a{color:var(--feedback-modal-footer-link);font-weight:500;text-decoration:none}.feedback-logo,.feedback-footer-text{display:block;text-align:center;margin-top:5px}.feedback-footer-text{margin-top:10px;line-height:1.5}.feedback-footer-combined{display:block;text-align:center;font-size:11px;color:#666;line-height:1.5}.feedback-footer-combined a{color:#666;text-decoration:underline}.feedback-recaptcha-notice{display:block;text-align:center;margin-bottom:10px;font-size:11px;color:#666;line-height:1.4}.feedback-recaptcha-notice a{color:#666;text-decoration:underline}.feedback-modal-close{background-color:var(--feedback-modal-close-bg-color);border:0;border-radius:6px;cursor:pointer;height:32px;width:32px;margin-left:auto;padding:0;display:flex;align-items:center;justify-content:center;transition:all 0.2s ease}.feedback-modal-close:hover{background-color:rgba(0, 0, 0, 0.06);transform:scale(1.05)}.feedback-modal-close:active{transform:scale(0.95)}.feedback-modal-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-screenshot{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index)}.feedback-modal-screenshot-header{align-items:center;background-color:var(--feedback-modal-screenshot-header-bg-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-screenshot-header-text-color);cursor:pointer;display:flex;left:50%;top:20px;transform:translateX(-50%);padding:10px;position:fixed;width:max-content;z-index:var(--feedback-modal-screenshot-header-z-index)}.feedback-modal-screenshot-close{height:24px;padding-left:10px;width:24px}.feedback-modal-screenshot-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-message{font-size:var(--feedback-modal-message-font-size);margin:0;line-height:1.6;color:var(--feedback-modal-content-text-color)}.feedback-modal-element-hover{background-color:transparent;cursor:pointer;border:1px solid var(--feedback-modal-element-hover-border-color)}.feedback-modal-element-selected{background-color:transparent;border:3px solid var(--feedback-modal-element-selected-border-color) !important;box-shadow:0 0 0 2px rgba(0, 123, 255, 0.3) !important}.screenshot-preview{display:inline-block;width:32px;height:32px;overflow:hidden;border-radius:6px;margin-right:10px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);border:2px solid rgba(255, 255, 255, 0.8)}.screenshot-preview:hover{transform:scale(1.15);box-shadow:0 4px 8px rgba(0, 0, 0, 0.15)}.screenshot-preview img{width:100%;height:100%;object-fit:cover}.screenshot-loading{display:inline-flex;align-items:center;margin-right:8px}@media screen and (min-width: 768px){.feedback-modal-content{max-width:var(--feedback-modal-content-max-width)}.feedback-modal-content.feedback-modal-content--bottom-right{bottom:var(--feedback-modal-content-position-bottom);left:initial;right:var(--feedback-modal-content-position-right);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--bottom-left{bottom:var(--feedback-modal-content-position-bottom);left:var(--feedback-modal-content-position-left);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--top-right{right:var(--feedback-modal-content-position-right);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--top-left{left:var(--feedback-modal-content-position-left);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--center-left{left:5px;right:auto;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--center-right{left:auto;right:5px;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--sidebar-left.feedback-modal-content--open,.feedback-modal-content.feedback-modal-content--sidebar-right.feedback-modal-content--open{transform:translateX(0)}.feedback-modal-content.feedback-modal-content--sidebar-left{max-width:var(--feedback-modal-content-sidebar-max-width);left:0;right:auto;height:100vh;top:0;transform:translateX(-100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-content.feedback-modal-content--sidebar-right{max-width:var(--feedback-modal-content-sidebar-max-width);left:auto;right:0;height:100vh;top:0;transform:translateX(100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-text textarea{height:150px;min-height:150px}.feedback-modal-content.feedback-modal-content--bottom-right{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--bottom-left{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-left.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-right{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-left{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-left.feedback-modal-content--open{transform:translateY(0)}}@keyframes feather-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.feather-loader{animation:feather-spin 1s linear infinite;display:block}.screenshot-error-notification{position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:10001;max-width:500px;width:90%;animation:slideDown 0.3s ease-out}@keyframes slideDown{from{opacity:0;transform:translateX(-50%) translateY(-20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}.screenshot-error-content{background:#fee;border:1.5px solid #fcc;border-radius:10px;padding:14px 18px;display:flex;align-items:center;gap:12px;box-shadow:0 0 0 1px rgba(197, 48, 48, 0.05),\n 0 4px 6px rgba(0, 0, 0, 0.07),\n 0 10px 20px rgba(0, 0, 0, 0.1);color:#c53030}.screenshot-error-content svg:first-child{color:#e53e3e;flex-shrink:0}.screenshot-error-content span{flex:1;font-size:14px;line-height:1.4;font-weight:500}.error-close-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:6px;color:#c53030;flex-shrink:0;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center}.error-close-btn:hover{background:rgba(197, 48, 48, 0.15);transform:scale(1.1)}.error-close-btn:active{transform:scale(0.95)}@media screen and (max-width: 768px){.feedback-modal-content{width:100vw;height:100dvh;max-width:none;border-radius:0;top:0;left:0;transform:scale(0.95);padding:24px 20px;display:flex;flex-direction:column}.feedback-modal-content--open{transform:scale(1)}.feedback-modal-buttons{display:flex;flex-direction:column;gap:12px}.feedback-modal-button--screenshot{display:none !important}.feedback-modal-button--submit{width:100%}.feedback-modal-text textarea{flex:1;min-height:120px;resize:none}}.feedback-modal-wrapper--embedded{position:relative;z-index:auto;display:block;width:100%}.feedback-modal-content--embedded{position:relative !important;left:auto !important;right:auto !important;top:auto !important;bottom:auto !important;transform:none !important;opacity:1 !important;max-width:100%;margin:0 auto;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);text-align:left}.feedback-modal-content--embedded.feedback-modal-content--open{transform:none !important}@media screen and (max-width: 768px){.feedback-modal-content--embedded{width:100%;height:auto;border-radius:var(--feedback-modal-content-border-radius);padding:24px}.feedback-modal-content--embedded .feedback-modal-button--screenshot{display:flex !important}}";
|
|
1117
1136
|
|
|
1118
1137
|
const FeedbackModal = class {
|
|
1119
1138
|
constructor(hostRef) {
|
|
1120
1139
|
index.registerInstance(this, hostRef);
|
|
1121
1140
|
this.feedbackSent = index.createEvent(this, "feedbackSent", 7);
|
|
1122
1141
|
this.feedbackError = index.createEvent(this, "feedbackError", 7);
|
|
1142
|
+
// Track the history entry pushed while the modal is open
|
|
1143
|
+
this.historyEntryPushed = false;
|
|
1144
|
+
this.handlePopState = () => {
|
|
1145
|
+
// Back button pressed while the modal is open: close it and consume our entry
|
|
1146
|
+
if (this.historyEntryPushed) {
|
|
1147
|
+
this.historyEntryPushed = false;
|
|
1148
|
+
if (this.showModal) {
|
|
1149
|
+
this.close();
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1123
1153
|
this.onScrollDebounced = () => {
|
|
1124
1154
|
clearTimeout(this.scrollTimeout);
|
|
1125
1155
|
this.scrollTimeout = setTimeout(() => {
|
|
@@ -1170,7 +1200,7 @@ const FeedbackModal = class {
|
|
|
1170
1200
|
else if (res.status === 202) {
|
|
1171
1201
|
const limitExceededBody = {
|
|
1172
1202
|
message: "You received a new feedback entry. You've reached the 25 message limit for your current plan. Upgrade to continue receiving feedback.",
|
|
1173
|
-
id: await res.json()
|
|
1203
|
+
id: await res.json(),
|
|
1174
1204
|
};
|
|
1175
1205
|
this.feedbackSent.emit({ feedback: limitExceededBody });
|
|
1176
1206
|
this.formSuccess = true;
|
|
@@ -1204,24 +1234,35 @@ const FeedbackModal = class {
|
|
|
1204
1234
|
}
|
|
1205
1235
|
};
|
|
1206
1236
|
this.close = () => {
|
|
1237
|
+
this.doClose(false);
|
|
1238
|
+
};
|
|
1239
|
+
// Closing by clicking outside keeps the typed input, so an accidental
|
|
1240
|
+
// click does not throw away a half-written message or screenshot
|
|
1241
|
+
this.handleOverlayClick = () => {
|
|
1242
|
+
this.doClose(!this.formSuccess);
|
|
1243
|
+
};
|
|
1244
|
+
this.doClose = (preserveInput) => {
|
|
1207
1245
|
this.isAnimating = false;
|
|
1246
|
+
this.popHistoryEntry();
|
|
1208
1247
|
setTimeout(() => {
|
|
1209
1248
|
this.sending = false;
|
|
1210
1249
|
this.showModal = false;
|
|
1211
1250
|
this.showScreenshotMode = false;
|
|
1212
1251
|
this.showScreenshotTopBar = false;
|
|
1213
1252
|
this.hasSelectedElement = false;
|
|
1214
|
-
this.encodedScreenshot = null;
|
|
1215
1253
|
// Remove highlight from ALL selected elements
|
|
1216
|
-
document.querySelectorAll('.feedback-modal-element-selected').forEach(el => {
|
|
1254
|
+
document.querySelectorAll('.feedback-modal-element-selected').forEach((el) => {
|
|
1217
1255
|
el.classList.remove('feedback-modal-element-selected');
|
|
1218
1256
|
});
|
|
1219
1257
|
// Reset form states
|
|
1220
1258
|
this.formSuccess = false;
|
|
1221
1259
|
this.formError = false;
|
|
1222
1260
|
this.formErrorStatus = 500;
|
|
1223
|
-
|
|
1224
|
-
|
|
1261
|
+
if (!preserveInput) {
|
|
1262
|
+
this.encodedScreenshot = null;
|
|
1263
|
+
this.formMessage = '';
|
|
1264
|
+
this.formEmail = '';
|
|
1265
|
+
}
|
|
1225
1266
|
this.resetOverflow();
|
|
1226
1267
|
}, 200);
|
|
1227
1268
|
};
|
|
@@ -1307,6 +1348,8 @@ const FeedbackModal = class {
|
|
|
1307
1348
|
this.metadata = undefined;
|
|
1308
1349
|
this.fetchData = true;
|
|
1309
1350
|
this.embedded = false;
|
|
1351
|
+
this.clickOutsideClose = true;
|
|
1352
|
+
this.historyClose = true;
|
|
1310
1353
|
this.emailPlaceholder = 'Email address (optional)';
|
|
1311
1354
|
this.errorMessage = 'Please try again later.';
|
|
1312
1355
|
this.errorMessage403 = 'The request URL does not match the one defined in PushFeedback for this project.';
|
|
@@ -1341,6 +1384,12 @@ const FeedbackModal = class {
|
|
|
1341
1384
|
this.screenshotErrorBrowserNotSupported = 'Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari on desktop.';
|
|
1342
1385
|
this.screenshotErrorUnexpected = 'An unexpected error occurred. Please try again.';
|
|
1343
1386
|
}
|
|
1387
|
+
connectedCallback() {
|
|
1388
|
+
window.addEventListener('popstate', this.handlePopState);
|
|
1389
|
+
}
|
|
1390
|
+
disconnectedCallback() {
|
|
1391
|
+
window.removeEventListener('popstate', this.handlePopState);
|
|
1392
|
+
}
|
|
1344
1393
|
componentWillLoad() {
|
|
1345
1394
|
if (this.fetchData)
|
|
1346
1395
|
this.fetchProjectData();
|
|
@@ -1391,7 +1440,7 @@ const FeedbackModal = class {
|
|
|
1391
1440
|
// Wait for grecaptcha to be available
|
|
1392
1441
|
let attempts = 0;
|
|
1393
1442
|
while (!window['grecaptcha'] && attempts < 50) {
|
|
1394
|
-
await new Promise(resolve => setTimeout(resolve, 100));
|
|
1443
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
1395
1444
|
attempts++;
|
|
1396
1445
|
}
|
|
1397
1446
|
if (!window['grecaptcha']) {
|
|
@@ -1403,7 +1452,7 @@ const FeedbackModal = class {
|
|
|
1403
1452
|
window['grecaptcha'].ready(async () => {
|
|
1404
1453
|
try {
|
|
1405
1454
|
const token = await window['grecaptcha'].execute(this.recaptchaSiteKey, {
|
|
1406
|
-
action: 'submit_feedback'
|
|
1455
|
+
action: 'submit_feedback',
|
|
1407
1456
|
});
|
|
1408
1457
|
resolve(token);
|
|
1409
1458
|
}
|
|
@@ -1431,6 +1480,12 @@ const FeedbackModal = class {
|
|
|
1431
1480
|
handleEmailInput(event) {
|
|
1432
1481
|
this.formEmail = event.target.value;
|
|
1433
1482
|
}
|
|
1483
|
+
popHistoryEntry() {
|
|
1484
|
+
if (this.historyEntryPushed) {
|
|
1485
|
+
this.historyEntryPushed = false;
|
|
1486
|
+
history.back();
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1434
1489
|
handleCheckboxChange(event) {
|
|
1435
1490
|
this.isPrivacyChecked = event.target.checked;
|
|
1436
1491
|
}
|
|
@@ -1441,23 +1496,28 @@ const FeedbackModal = class {
|
|
|
1441
1496
|
this.selectedRating = newRating;
|
|
1442
1497
|
}
|
|
1443
1498
|
render() {
|
|
1444
|
-
return (index.h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''} ${this.embedded ? 'feedback-modal-wrapper--embedded' : ''}
|
|
1499
|
+
return (index.h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''} ${this.embedded ? 'feedback-modal-wrapper--embedded' : ''}`, part: "wrapper" }, this.showCanvasEditor && (index.h("canvas-editor", { ref: (el) => (this.canvasEditorRef = el), exportparts: "overlay: canvas-editor-overlay, modal: canvas-editor-modal, header: canvas-editor-header, title: canvas-editor-title, toolbar: canvas-editor-toolbar, tool-button: canvas-editor-tool-button, cancel-button: canvas-editor-cancel-button, save-button: canvas-editor-save-button, content: canvas-editor-content, canvas: canvas-editor-canvas", "canvas-editor-title": this.screenshotEditorTitle, "canvas-editor-cancel-text": this.screenshotEditorCancelText, "canvas-editor-save-text": this.screenshotEditorSaveText, "screenshot-taking-text": this.screenshotTakingText, "screenshot-attached-text": this.screenshotAttachedText, "screenshot-button-text": this.screenshotButtonText, "auto-start-screenshot": this.autoStartCapture, "existing-screenshot": this.encodedScreenshot || '', "edit-text-button-text": this.screenshotEditTextButtonText, "size-label-text": this.screenshotSizeLabelText, "border-label-text": this.screenshotBorderLabelText, "edit-text-prompt-text": this.screenshotEditTextPromptText, "screenshot-error-general": this.screenshotErrorGeneral, "screenshot-error-permission": this.screenshotErrorPermission, "screenshot-error-not-supported": this.screenshotErrorNotSupported, "screenshot-error-not-found": this.screenshotErrorNotFound, "screenshot-error-cancelled": this.screenshotErrorCancelled, "screenshot-error-browser-not-supported": this.screenshotErrorBrowserNotSupported, "screenshot-error-unexpected": this.screenshotErrorUnexpected, onScreenshotReady: this.handleScreenshotReady, onScreenshotCancelled: this.handleScreenshotCancelled, onScreenshotFailed: this.handleScreenshotError })), this.showScreenshotError && (index.h("div", { class: "screenshot-error-notification" }, index.h("div", { class: "screenshot-error-content" }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("circle", { cx: "12", cy: "12", r: "10" }), index.h("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), index.h("line", { x1: "9", y1: "9", x2: "15", y2: "15" })), index.h("span", null, this.screenshotError), index.h("button", { class: "error-close-btn", onClick: () => (this.showScreenshotError = false), title: "Close" }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))))), this.showModal && !this.embedded && (index.h("div", { class: `feedback-overlay ${this.isAnimating ? 'feedback-overlay--visible' : ''}`, part: "overlay", onClick: this.clickOutsideClose ? this.handleOverlayClick : undefined })), this.showModal && (index.h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating ? 'feedback-modal-content--open' : ''} ${this.embedded ? 'feedback-modal-content--embedded' : ''}`, part: "modal", ref: (el) => (this.modalContent = el) }, index.h("div", { class: `feedback-modal-header ${(this.formSuccess && !this.successMessage) || (this.formError && !this.errorMessage)
|
|
1500
|
+
? 'feedback-modal-header--no-content'
|
|
1501
|
+
: ''}`, part: "header" }, index.h("div", { class: "feedback-modal-header-content" }, !this.formSuccess && !this.formError ? (index.h("div", { class: "feedback-modal-header-text" }, index.h("span", { class: "feedback-modal-title", part: "title" }, this.modalTitle), !this.whitelabel && (index.h("span", { class: "feedback-modal-powered-by", part: "powered-by" }, "Powered by", ' ', index.h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback"))))) : this.formSuccess ? (index.h("span", { class: "feedback-modal-title", part: "title" }, this.modalTitleSuccess)) : (index.h("span", { class: "feedback-modal-title", part: "title" }, this.modalTitleError))), !this.embedded && (index.h("button", { class: "feedback-modal-close", part: "close-button", onClick: this.close }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))), index.h("div", { class: "feedback-modal-body", part: "body" }, !this.formSuccess && !this.formError ? (index.h("form", { part: "form", onSubmit: this.handleSubmit }, !this.hideRating && (index.h("div", { class: "feedback-modal-rating", part: "rating" }, this.ratingMode === 'thumbs' ? (index.h("div", { class: "feedback-modal-rating-content" }, index.h("span", { class: "feedback-modal-input-heading", part: "rating-title" }, this.ratingPlaceholder), index.h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs", part: "rating-buttons" }, index.h("button", { title: "Yes", class: `feedback-modal-rating-button feedback-modal-rating-button--positive ${this.selectedRating === 1
|
|
1445
1502
|
? 'feedback-modal-rating-button--selected'
|
|
1446
|
-
: ''}`, onClick: (event) => {
|
|
1503
|
+
: ''}`, part: "rating-button rating-button-positive", onClick: (event) => {
|
|
1447
1504
|
event.preventDefault();
|
|
1448
1505
|
this.handleRatingChange(1);
|
|
1449
|
-
} }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3" }))), index.h("button", { title: "No", class: `feedback-modal-rating-button ${this.selectedRating === 5
|
|
1506
|
+
} }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3" }))), index.h("button", { title: "No", class: `feedback-modal-rating-button feedback-modal-rating-button--negative ${this.selectedRating === 5
|
|
1450
1507
|
? 'feedback-modal-rating-button--selected'
|
|
1451
|
-
: ''}`, onClick: (event) => {
|
|
1508
|
+
: ''}`, part: "rating-button rating-button-negative", onClick: (event) => {
|
|
1452
1509
|
event.preventDefault();
|
|
1453
1510
|
this.handleRatingChange(5);
|
|
1454
|
-
} }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" })))))) : (index.h("div", { class: "feedback-modal-rating-content" }, index.h("span", { class: "feedback-modal-input-heading" }, this.ratingStarsPlaceholder), index.h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars" }, [1, 2, 3, 4, 5].map((rating) => (index.h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating
|
|
1511
|
+
} }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" })))))) : (index.h("div", { class: "feedback-modal-rating-content" }, index.h("span", { class: "feedback-modal-input-heading", part: "rating-title" }, this.ratingStarsPlaceholder), index.h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars", part: "rating-buttons" }, [1, 2, 3, 4, 5].map((rating) => (index.h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating
|
|
1455
1512
|
? 'feedback-modal-rating-button--selected'
|
|
1456
|
-
: ''}`, onClick: (event) => {
|
|
1513
|
+
: ''}`, part: "rating-button", onClick: (event) => {
|
|
1457
1514
|
event.preventDefault();
|
|
1458
1515
|
this.handleRatingChange(rating);
|
|
1459
|
-
} }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })))))))))), index.h("div", { class: "feedback-modal-text" }, index.h("textarea", { placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (index.h("div", { class: "feedback-modal-email" }, index.h("input", { placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail, required: this.isEmailRequired }))), index.h("div", { class: "feedback-verification" }, index.h("input", { type: "text", name: "verification", style: { display: 'none' }, onInput: (event) => this.handleVerification(event), value: this.formVerification })), !this.hidePrivacyPolicy && (index.h("div", { class: "feedback-modal-privacy" }, index.h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), index.h("span", { innerHTML: this.privacyPolicyText }))), index.h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}
|
|
1460
|
-
|
|
1516
|
+
} }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })))))))))), index.h("div", { class: "feedback-modal-text" }, index.h("textarea", { part: "message-input", placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (index.h("div", { class: "feedback-modal-email" }, index.h("input", { part: "email-input", placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail, required: this.isEmailRequired }))), index.h("div", { class: "feedback-verification" }, index.h("input", { type: "text", name: "verification", style: { display: 'none' }, onInput: (event) => this.handleVerification(event), value: this.formVerification })), !this.hidePrivacyPolicy && (index.h("div", { class: "feedback-modal-privacy", part: "privacy" }, index.h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), index.h("span", { innerHTML: this.privacyPolicyText }))), index.h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}`, part: "buttons" }, !this.hideScreenshotButton && (index.h("button", { type: "button", class: `feedback-modal-button feedback-modal-button--screenshot ${this.encodedScreenshot ? 'feedback-modal-button--active' : ''}`, part: "screenshot-button", onClick: this.openScreenShot, disabled: this.sending || this.takingScreenshot }, this.encodedScreenshot && (index.h("div", { class: "screenshot-preview", onClick: this.openCanvasEditor }, index.h("img", { src: this.encodedScreenshot, alt: "Screenshot Preview" }))), !this.encodedScreenshot && !this.takingScreenshot && (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, index.h("path", { d: "M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z" }))), this.takingScreenshot && (index.h("div", { class: "screenshot-loading" }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#666", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather-loader" }, index.h("line", { x1: "12", y1: "2", x2: "12", y2: "6" }), index.h("line", { x1: "12", y1: "18", x2: "12", y2: "22" }), index.h("line", { x1: "4.93", y1: "4.93", x2: "7.76", y2: "7.76" }), index.h("line", { x1: "16.24", y1: "16.24", x2: "19.07", y2: "19.07" }), index.h("line", { x1: "2", y1: "12", x2: "6", y2: "12" }), index.h("line", { x1: "18", y1: "12", x2: "22", y2: "12" }), index.h("line", { x1: "4.93", y1: "19.07", x2: "7.76", y2: "16.24" }), index.h("line", { x1: "16.24", y1: "7.76", x2: "19.07", y2: "4.93" })))), this.takingScreenshot
|
|
1517
|
+
? this.screenshotTakingText
|
|
1518
|
+
: this.encodedScreenshot
|
|
1519
|
+
? this.screenshotAttachedText
|
|
1520
|
+
: this.screenshotButtonText)), index.h("button", { class: "feedback-modal-button feedback-modal-button--submit", part: "submit-button", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (index.h("div", { class: "feedback-modal-success" }, index.h("p", { class: "feedback-modal-message", part: "success-message" }, this.successMessage))) : this.formError && this.formErrorStatus == 404 ? (index.h("p", { class: "feedback-modal-message", part: "error-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (index.h("p", { class: "feedback-modal-message", part: "error-message" }, this.errorMessage403)) : this.formError ? (index.h("p", { class: "feedback-modal-message", part: "error-message" }, this.errorMessage)) : (index.h("span", null))), !this.formSuccess && !this.formError && (this.recaptchaEnabled || this.footerText) && (index.h("div", { class: "feedback-modal-footer", part: "footer" }, index.h("div", { class: "feedback-footer-combined" }, this.recaptchaEnabled && index.h("span", { innerHTML: this.recaptchaText }), this.recaptchaEnabled && this.footerText && ' ', this.footerText && index.h("span", { innerHTML: this.footerText }))))))));
|
|
1461
1521
|
}
|
|
1462
1522
|
componentDidRender() {
|
|
1463
1523
|
if (this.showModal) {
|
|
@@ -1468,6 +1528,10 @@ const FeedbackModal = class {
|
|
|
1468
1528
|
}
|
|
1469
1529
|
async openModal() {
|
|
1470
1530
|
this.showModal = true;
|
|
1531
|
+
if (this.historyClose && !this.embedded && !this.historyEntryPushed) {
|
|
1532
|
+
history.pushState({ feedbackModal: true }, '');
|
|
1533
|
+
this.historyEntryPushed = true;
|
|
1534
|
+
}
|
|
1471
1535
|
requestAnimationFrame(() => {
|
|
1472
1536
|
requestAnimationFrame(() => {
|
|
1473
1537
|
this.isAnimating = true;
|