@magicfeedback/popup-sdk 1.0.12 → 1.0.13
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/README.md +3 -3
- package/dist/assets/assets/style.css +29 -20
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1934 -809
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1934 -809
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Deepdots Popup SDK
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for loading and displaying
|
|
3
|
+
TypeScript SDK for loading and displaying Deepdots surveys as popups in browser apps.
|
|
4
4
|
|
|
5
5
|
Package name: `@magicfeedback/popup-sdk`
|
|
6
6
|
|
|
@@ -333,7 +333,7 @@ interface DeepdotsEvent {
|
|
|
333
333
|
- `segments.path` is the only segment currently evaluated by the SDK runtime.
|
|
334
334
|
- `exit` triggers work across anchor navigation, hash navigation, `history.pushState()`, and `history.replaceState()`.
|
|
335
335
|
- Pending `exit` popups are stored in `sessionStorage` until they are shown or discarded.
|
|
336
|
-
- The default browser renderer uses
|
|
336
|
+
- The default browser renderer uses Deepdots forms and applies button labels from `actions.accept`, `actions.start`, `actions.back`, and `actions.complete`.
|
|
337
337
|
- `title`, `message`, and `style` belong to the popup definition contract, but the current browser renderer focuses on the embedded form and does not render those fields as standalone popup copy/layout controls.
|
|
338
338
|
- `actions.decline` is accepted in the definition shape, but the current browser renderer does not render a dedicated decline button or enforce `decline.cooldownDays`.
|
|
339
339
|
- In browser mode, the SDK creates `#deepdots-popup-container` and injects the shared popup stylesheet from jsDelivr.
|
|
@@ -50,22 +50,16 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.magicfeedback-label {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
font-size: 1.1rem;
|
|
56
|
-
color: #212529;
|
|
57
|
-
text-align: start;
|
|
58
|
-
word-wrap: break-word;
|
|
59
|
-
white-space: normal;
|
|
60
|
-
}
|
|
61
|
-
.magicfeedback-sublabel{
|
|
53
|
+
margin-bottom: 25px;
|
|
54
|
+
margin-top: 20px;
|
|
62
55
|
font-weight: 400;
|
|
63
56
|
font-family: inherit;
|
|
64
|
-
font-size:
|
|
65
|
-
color: #
|
|
57
|
+
font-size: 1.2rem;
|
|
58
|
+
color: #212529;
|
|
66
59
|
text-align: start;
|
|
67
60
|
word-wrap: break-word;
|
|
68
61
|
white-space: normal;
|
|
62
|
+
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
.magicfeedback-checkbox {
|
|
@@ -90,8 +84,8 @@
|
|
|
90
84
|
justify-content: flex-start;
|
|
91
85
|
flex-wrap: wrap;
|
|
92
86
|
width: 100%;
|
|
93
|
-
margin-
|
|
94
|
-
|
|
87
|
+
margin-right: 5px;
|
|
88
|
+
padding: 5px;
|
|
95
89
|
}
|
|
96
90
|
|
|
97
91
|
.magicfeedback-checkbox-container,
|
|
@@ -100,12 +94,11 @@
|
|
|
100
94
|
flex-direction: row;
|
|
101
95
|
justify-content: flex-start;
|
|
102
96
|
align-items: center;
|
|
103
|
-
margin:
|
|
97
|
+
margin: 5px;
|
|
104
98
|
padding: 5px 0;
|
|
105
99
|
background-color: #fff;
|
|
106
100
|
border-radius: 5px;
|
|
107
101
|
box-shadow: 0 0 3px #ccc;
|
|
108
|
-
width: calc(100% - 10px);
|
|
109
102
|
}
|
|
110
103
|
|
|
111
104
|
input::-webkit-outer-spin-button,
|
|
@@ -131,7 +124,7 @@ input::-webkit-inner-spin-button {
|
|
|
131
124
|
font-size: 16px;
|
|
132
125
|
color: #212529;
|
|
133
126
|
text-align: start;
|
|
134
|
-
width:
|
|
127
|
+
width: 100%;
|
|
135
128
|
}
|
|
136
129
|
|
|
137
130
|
p {
|
|
@@ -165,7 +158,7 @@ textarea,
|
|
|
165
158
|
select {
|
|
166
159
|
box-sizing: border-box;
|
|
167
160
|
padding: 10px;
|
|
168
|
-
margin:
|
|
161
|
+
margin: 10px 0;
|
|
169
162
|
width: 100%;
|
|
170
163
|
border: 2px solid #ccc; /* Default border color - you can customize this */
|
|
171
164
|
border-radius: 5px;
|
|
@@ -409,7 +402,6 @@ input.error, select.error {
|
|
|
409
402
|
|
|
410
403
|
margin: 15px 0;
|
|
411
404
|
padding: 0;
|
|
412
|
-
padding-top: 45px !important;
|
|
413
405
|
|
|
414
406
|
list-style: none;
|
|
415
407
|
font-size: 1.5rem;
|
|
@@ -420,6 +412,23 @@ input.error, select.error {
|
|
|
420
412
|
-ms-user-select: none;
|
|
421
413
|
}
|
|
422
414
|
|
|
415
|
+
/* Cuando hay placeholders (Very bad / Very good), el placeholder ocupa
|
|
416
|
+
el 100% de la primera línea y los boxes bajan a la siguiente */
|
|
417
|
+
.magicfeedback-rating-number-container--with-placeholder {
|
|
418
|
+
flex-wrap: wrap;
|
|
419
|
+
align-items: flex-start;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.magicfeedback-rating-number-container--with-placeholder .magicfeedback-rating-placeholder {
|
|
423
|
+
width: 100%;
|
|
424
|
+
margin-bottom: 8px;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.magicfeedback-rating-number-container--with-placeholder .magicfeedback-rating-number-option {
|
|
428
|
+
width: auto;
|
|
429
|
+
flex: 1;
|
|
430
|
+
}
|
|
431
|
+
|
|
423
432
|
.magicfeedback-rating-number-option {
|
|
424
433
|
display: flex;
|
|
425
434
|
flex-direction: row;
|
|
@@ -538,7 +547,7 @@ input.error, select.error {
|
|
|
538
547
|
.magicfeedback-rating-number-option {
|
|
539
548
|
max-width: 100%;
|
|
540
549
|
height: 55px;
|
|
541
|
-
margin: 5px;
|
|
550
|
+
margin: 5px 0;
|
|
542
551
|
}
|
|
543
552
|
}
|
|
544
553
|
|
|
@@ -637,7 +646,7 @@ input.error, select.error {
|
|
|
637
646
|
.magicfeedback-success-message,
|
|
638
647
|
.magicfeedback-info-message,
|
|
639
648
|
.magicfeedback-start-message {
|
|
640
|
-
margin:
|
|
649
|
+
margin: 35px 5px;
|
|
641
650
|
}
|
|
642
651
|
|
|
643
652
|
.magicfeedback-success-message p,
|
package/dist/index.d.mts
CHANGED
|
@@ -141,7 +141,7 @@ interface PopupRenderer {
|
|
|
141
141
|
/** Preparar recursos si aplica */
|
|
142
142
|
init?(): void;
|
|
143
143
|
/** Mostrar popup */
|
|
144
|
-
show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: (type: DeepdotsEventType, surveyId: string, data?: Record<string, unknown>) => void, onClose: () => void, env?: string): void;
|
|
144
|
+
show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: (type: DeepdotsEventType, surveyId: string, data?: Record<string, unknown>) => void, onClose: () => void, env?: string, userId?: string): void;
|
|
145
145
|
/** Ocultar popup */
|
|
146
146
|
hide(): void;
|
|
147
147
|
}
|
|
@@ -190,6 +190,7 @@ declare class DeepdotsPopups {
|
|
|
190
190
|
triggerEvent(eventName: string): void;
|
|
191
191
|
private showDefinition;
|
|
192
192
|
private shouldShow;
|
|
193
|
+
private matchesSegmentsLang;
|
|
193
194
|
private matchesSegmentsPath;
|
|
194
195
|
private evaluateCooldown;
|
|
195
196
|
private evaluateLegacyCondition;
|
package/dist/index.d.ts
CHANGED
|
@@ -141,7 +141,7 @@ interface PopupRenderer {
|
|
|
141
141
|
/** Preparar recursos si aplica */
|
|
142
142
|
init?(): void;
|
|
143
143
|
/** Mostrar popup */
|
|
144
|
-
show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: (type: DeepdotsEventType, surveyId: string, data?: Record<string, unknown>) => void, onClose: () => void, env?: string): void;
|
|
144
|
+
show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: (type: DeepdotsEventType, surveyId: string, data?: Record<string, unknown>) => void, onClose: () => void, env?: string, userId?: string): void;
|
|
145
145
|
/** Ocultar popup */
|
|
146
146
|
hide(): void;
|
|
147
147
|
}
|
|
@@ -190,6 +190,7 @@ declare class DeepdotsPopups {
|
|
|
190
190
|
triggerEvent(eventName: string): void;
|
|
191
191
|
private showDefinition;
|
|
192
192
|
private shouldShow;
|
|
193
|
+
private matchesSegmentsLang;
|
|
193
194
|
private matchesSegmentsPath;
|
|
194
195
|
private evaluateCooldown;
|
|
195
196
|
private evaluateLegacyCondition;
|