@magicfeedback/popup-sdk 1.2.0 → 1.4.0
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 +119 -70
- package/dist/assets/assets/style.css +5 -1
- package/dist/chunk-R4B3K2ZW.mjs +176 -0
- package/dist/chunk-R4B3K2ZW.mjs.map +1 -0
- package/dist/chunk-XFA2Y6CK.mjs +197 -0
- package/dist/chunk-XFA2Y6CK.mjs.map +1 -0
- package/dist/index.d.mts +40 -7
- package/dist/index.d.ts +40 -7
- package/dist/index.js +281 -900
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +276 -33
- package/dist/index.mjs.map +1 -1
- package/dist/react-native.d.mts +22 -2
- package/dist/react-native.d.ts +22 -2
- package/dist/react-native.js +283 -901
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +278 -34
- package/dist/react-native.mjs.map +1 -1
- package/dist/{renderPopup-R53C7DB3.mjs → renderPopup-TCKR5Z3P.mjs} +5 -871
- package/dist/renderPopup-TCKR5Z3P.mjs.map +1 -0
- package/dist/{renderPopup-NHWJ7YSI.mjs → renderPopup-UYMGEBSI.mjs} +5 -871
- package/dist/renderPopup-UYMGEBSI.mjs.map +1 -0
- package/package.json +5 -10
- package/dist/chunk-4UXOEIAB.mjs +0 -172
- package/dist/chunk-4UXOEIAB.mjs.map +0 -1
- package/dist/chunk-XOTM5CHX.mjs +0 -193
- package/dist/chunk-XOTM5CHX.mjs.map +0 -1
- package/dist/renderPopup-NHWJ7YSI.mjs.map +0 -1
- package/dist/renderPopup-R53C7DB3.mjs.map +0 -1
package/dist/react-native.js
CHANGED
|
@@ -178,6 +178,14 @@ var init_font = __esm({
|
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
|
|
181
|
+
// src/assets/style.css
|
|
182
|
+
var style_default;
|
|
183
|
+
var init_style = __esm({
|
|
184
|
+
"src/assets/style.css"() {
|
|
185
|
+
style_default = '.magicfeedback-container {\n width: 100%;\n}\n\n\n.magicfeedback-success-message,\n.magicfeedback-info-message,\n.magicfeedback-start-message,\n.magicfeedback-container{\n animation-duration: 0.5s;\n animation-name: animate-fade;\n animation-delay: 0.25s;\n animation-fill-mode: backwards;\n\n font-style: normal;\n text-align: justify;\n font-weight: 400;\n font-size: 1.2rem;\n color: #475569;\n line-height: 1.5;\n}\n\n@keyframes animate-fade {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n}\n\n.magicfeedback-form {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n}\n.magicfeedback-questions {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n}\n\n.magicfeedback-div {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n margin-bottom: 10px;\n width: 100%;\n}\n\n.magicfeedback-label {\n margin-bottom: 25px;\n margin-top: 20px;\n font-weight: 400;\n font-family: inherit;\n font-size: 1.2rem;\n color: #212529;\n text-align: start;\n word-wrap: break-word;\n white-space: normal;\n\n}\n\n.magicfeedback-checkbox {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n width: 100%;\n}\n\n.magicfeedback-checkbox-container {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin-bottom: 5px;\n margin-top: 5px;\n}\n\n/* Cualificado con `div`: @magicfeedback/native reutiliza la clase "magicfeedback-radio"\n tambi\xE9n en el <input> de cada opci\xF3n (rating), y sin el tag este selector lo capturaba\n tambi\xE9n, rompiendo su tama\xF1o (el input pasaba a display:flex; width:100%). */\ndiv.magicfeedback-radio {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n flex-wrap: wrap;\n width: 100%;\n margin-right: 5px;\n padding: 5px;\n box-sizing: border-box;\n}\n\n.magicfeedback-checkbox-container,\n.magicfeedback-radio-container {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin: 5px;\n padding: 5px 0;\n background-color: #fff;\n border-radius: 5px;\n box-shadow: 0 0 3px #ccc;\n}\n\n.deepdots-popup input::-webkit-outer-spin-button,\n.deepdots-popup input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n -moz-appearance: textfield;\n}\n\n.magicfeedback-checkbox input[type="checkbox"] {\n margin-right: 5px;\n margin-left: 5px;\n width: 20px;\n height: 20px;\n cursor: pointer;\n}\n\n\n.magicfeedback-checkbox label,\n.magicfeedback-radio-container label {\n margin-left: 5px;\n font-weight: 400;\n font-family: inherit;\n font-size: 16px;\n color: #212529;\n text-align: start;\n width: 100%;\n}\n\n.deepdots-popup p {\n margin-bottom: 0px;\n font-size: 12px;\n}\n\n.deepdots-popup h2 {\n line-height: 1.66;\n margin: 0;\n padding: 0;\n font-weight: 900;\n color: #222;\n font-family: var(--deepdots-font, \'Montserrat\');\n font-size: 18px;\n text-transform: uppercase;\n text-align: center;\n margin-bottom: 40px;\n}\n\n/* Los controles de formulario no heredan font-family por defecto: cuando hay\n fuente custom (clase deepdots-has-font), los forzamos a usar la del contenedor. */\n.deepdots-popup.deepdots-has-font button,\n.deepdots-popup.deepdots-has-font input,\n.deepdots-popup.deepdots-has-font textarea,\n.deepdots-popup.deepdots-has-font select {\n font-family: var(--deepdots-font, inherit);\n}\n\n.deepdots-popup h6 {\n margin-bottom: 1rem;\n}\n\n.deepdots-popup input[type="date"],\n.deepdots-popup input[type="text"],\n.deepdots-popup input[type="number"],\n.deepdots-popup input[type="email"],\n.deepdots-popup input[type="password"],\n.deepdots-popup textarea,\n.deepdots-popup select {\n box-sizing: border-box;\n padding: 10px;\n margin: 10px 0;\n width: 100%;\n border: 2px solid #ccc; /* Default border color - you can customize this */\n border-radius: 5px;\n font-size: 18px;\n outline: none;\n transition: border-color 0.3s ease;\n min-height: 50px;\n font-family: inherit;\n -webkit-appearance: none;\n}\n\n.deepdots-popup select {\n background-image: linear-gradient(45deg, transparent 50%, gray 50%),\n linear-gradient(135deg, gray 50%, transparent 50%),\n linear-gradient(to right, #ccc, #ccc);\n background-position: calc(100% - 20px) calc(1em + 2px),\n calc(100% - 15px) calc(1em + 2px),\n calc(100% - 2.5em) 0.5em;\n background-size: 5px 5px,\n 5px 5px,\n 1px 1.5em;\n background-repeat: no-repeat;\n}\n\n.magicfeedback-boolean-container {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin: 10px 0;\n width: 100%;\n}\n\n.magicfeedback-boolean-container label {\n margin-left: 10px;\n font-weight: 400;\n font-size: 16px;\n width: 100%;\n padding-top: 5px;\n}\n\n.magicfeedback-boolean-option {\n margin-right: 10px;\n margin-left: 10px;\n width: 100%;\n height: 38px;\n border-radius: 8px;\n font-size: 16px;\n cursor: pointer;\n border: 1px solid #ced4da !important;\n}\n\n.magicfeedback-boolean-option label {\n font-weight: 400;\n font-size: 16px;\n color: #475569;\n cursor: pointer;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: inherit;\n}\n\n.magicfeedback-boolean-option input[type=radio] + label:hover {\n color: #007bff;\n}\n\n.magicfeedback-boolean-option input[type=radio]:checked + label {\n color: #007bff;\n background-color: #cadff8;\n}\n\n.deepdots-popup input[type="radio"] {\n padding: 20px;\n margin: 10px 0 10px 15px;\n width: 40px;\n background-color: #fff;\n box-shadow: none;\n}\n\n/* Style for focused input/select */\n.deepdots-popup input:focus, .deepdots-popup select:focus {\n border-color: #4CAF50; /* Highlight color when focused - you can customize this */\n}\n\n/* Style for invalid input (example: validation error) */\n.deepdots-popup input.error, .deepdots-popup select.error {\n border-color: #ff3333; /* Red color for error state - you can customize this */\n}\n\n.magicfeedback-action-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n width: 100%;\n}\n\n.magicfeedback-action-container .magicfeedback-submit {\n cursor: pointer;\n padding: 10px;\n margin: 10px 0;\n width: 100px;\n border-radius: 8px;\n font-size: 16px;\n outline: none;\n transition: border-color 0.3s ease;\n background-color: #1E293B;\n color: white;\n}\n\n.magicfeedback-action-container .magicfeedback-back {\n cursor: pointer;\n padding: 10px;\n margin: 10px 0;\n width: 100px;\n border: 0;\n border-radius: 8px;\n font-size: 16px;\n outline: none;\n transition: border-color 0.3s ease;\n background-color: transparent;\n color: #212529;\n}\n\n\n\n/* Rating styles */\n.magicfeedback-rating {\n width: 100%;\n}\n\n.magicfeedback-rating-container {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n flex-wrap: wrap;\n align-items: center;\n\n margin: 15px 5px;\n padding: 0;\n\n list-style: none;\n font-size: 1.5rem;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n}\n\n.magicfeedback-rating-placeholder-value,\n.magicfeedback-rating-placeholder{\n text-align: center;\n align-content: center;\n justify-content: center;\n text-wrap: wrap;\n}\n\n.magicfeedback-rating-option {\n margin: 0 0.5rem;\n padding: 0;\n}\n\n@media (max-width: 1024px) {\n .magicfeedback-rating-option {\n margin: 10px 0;\n padding: 0;\n width: 20%;\n display: flex;\n justify-content: center;\n }\n\n .magicfeedback-rating-placeholder-value {\n font-size: 0.75rem;\n margin-bottom: 1px;\n }\n .magicfeedback-rating-placeholder{\n justify-content: center;\n }\n\n .magicfeedback-rating-container {\n flex-wrap: wrap;\n justify-content: flex-start;\n }\n}\n\n\n.magicfeedback-rating-option-label-container {\n display: flex;\n flex-direction: column;\n}\n\n\n.magicfeedback-rating-option-label-container label {\n display: inline-block;\n text-align: center;\n margin-bottom: 0;\n font-weight: 600;\n font-size: 18px;\n color: #475569;\n}\n\n.magicfeedback-rating-option-label-container input[type=radio] {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n/* IMAGE STYLES */\n.magicfeedback-rating-option-label-container input[type=radio] + img {\n cursor: pointer;\n height: 48px;\n width: 48px;\n}\n\n/* LABEL STYLES */\n.magicfeedback-rating-option-label-container input[type=radio] + label {\n cursor: pointer;\n}\n\n/* CHECKED STYLES */\n.magicfeedback-rating-option-label-container input[type=radio]:checked + img {\n box-shadow: #007bff 0px 1px 4px, #007BFFA0 0px 0px 0px 2px;\n border-radius: 50%;\n}\n\n.magicfeedback-rating-number {\n width: 100%;\n}\n.magicfeedback-rating-container,\n.magicfeedback-rating-number-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n\n margin: 15px 0;\n padding: 0;\n\n list-style: none;\n font-size: 1.5rem;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n}\n\n/* Cuando hay placeholders (Very bad / Very good), el placeholder ocupa\n el 100% de la primera l\xEDnea y los boxes bajan a la siguiente */\n.magicfeedback-rating-number-container--with-placeholder {\n flex-wrap: wrap;\n align-items: flex-start;\n}\n\n.magicfeedback-rating-number-container--with-placeholder .magicfeedback-rating-placeholder {\n width: 100%;\n margin-bottom: 8px;\n}\n\n.magicfeedback-rating-number-container--with-placeholder .magicfeedback-rating-number-option {\n width: auto;\n flex: 1;\n}\n\n.magicfeedback-rating-number-option {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin: 5px;\n padding: 0;\n list-style: none;\n font-size: 1.5rem;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n width: 100%;\n}\n\n.magicfeedback-rating-number-option-row{\n max-width: 100% !important;\n}\n\n.magicfeedback-rating-number-top-placeholder,\n.magicfeedback-rating-number-bottom-placeholder{\n text-align: center !important;\n align-content: center;\n justify-content: center;\n text-wrap: wrap;\n\n font-size: 15px;\n color: #475569;\n\n width: 100%;\n margin: auto;\n}\n\n@media (min-width: 650px) {\n .magicfeedback-rating-number-option-row +.magicfeedback-rating-number-container-ltr:first-child,\n .magicfeedback-rating-number-option-row + +.magicfeedback-rating-number-container-rtl:last-child {\n margin-left: 0;\n width: calc(100% - 10px);\n }\n\n .magicfeedback-rating-number-option-row +.magicfeedback-rating-number-container-rtl:first-child,\n .magicfeedback-rating-number-option-row + +.magicfeedback-rating-number-container-ltr:last-child {\n margin-right: 0;\n width: calc(100% - 10px);\n }\n}\n\n\n.magicfeedback-rating-number-option-label-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n}\n\n.magicfeedback-rating-number-option-label-container label {\n display: flex;\n align-items: center;\n justify-content: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0 10px;\n font-weight: 600;\n font-size: 14px;\n color: #475569;\n cursor: pointer;\n width: 100%;\n height: 100%;\n min-height: 50px;\n text-align: center;\n padding: 0;\n border-radius: 4px;\n border: 1px solid #ced4da;\n background-color: rgba(246, 246, 246, 0.3);\n transition: background-color 0.15s ease-in-out;\n}\n\n.magicfeedback-rating-number-option-label-container input[type=radio] {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.magicfeedback-rating-number-option-label-container input[type=radio] + label {\n cursor: pointer;\n}\n\n.magicfeedback-rating-number-option-label-container input[type=radio] + label:hover,\n.magicfeedback-rating-number-option-label-container input[type=radio]:checked + label {\n color: #007bff;\n border: 1px solid #007bff;\n background-color: rgba(86, 168, 253, 0.29);\n}\n\n.magicfeedback-rating-number-container-column{\n align-items: flex-start !important;\n}\n\n@media (max-width: 650px) {\n .magicfeedback-rating-number-container-ltr {\n justify-content: center;\n flex-wrap: wrap;\n }\n\n .magicfeedback-rating-number-container-rtl {\n justify-content: center;\n flex-wrap: wrap-reverse;\n }\n\n .magicfeedback-rating-number-option {\n max-width: 100%;\n height: 55px;\n margin: 5px 0;\n }\n}\n\n.magicfeedback-rating-star {\n width: 100%;\n}\n\n.magicfeedback-rating-star-container {\n display: flex !important;\n flex-direction: row !important;\n justify-content: center !important;\n align-items: center !important;\n flex-wrap: wrap;\n margin: 15px 5px;\n padding: 0;\n list-style: none;\n font-size: 1.5rem;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n}\n\n.magicfeedback-rating-star-option:not(:checked) > .rating__star {\n float: right;\n width: 1em;\n overflow: hidden;\n white-space: nowrap;\n cursor: pointer;\n font-size: 30px;\n color: #ccc;\n margin: 0 10px;\n}\n\n.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover,\n.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover ~ span {\n color: #deb217 !important;\n}\n\n.magicfeedback-rating-star-selected {\n color: #ffc700 !important;\n}\n\n\n/* Style for multiple choice image */\n.magicfeedback-image-option-label-container:hover {\n cursor: pointer;\n border: 0 !important;\n}\n\n.magicfeedback-image-option-label-container input[type=radio]:checked + img,\n.magicfeedback-image-option-label-container input[type=checkbox]:checked + img {\n border: 1px solid #007bff !important;\n box-shadow: 0 0 3px #007bff !important;\n}\n\n.magicfeedback-image-option-label-container input[type=radio] + img,\n.magicfeedback-image-option-label-container input[type=checkbox] + img {\n border: 1px solid transparent !important;\n}\n\n.magicfeedback-image-option-label-container{\n margin: 10px !important;\n height: calc(100% - 20px) !important;\n width: calc(100% - 20px) !important;\n}\n\n.magicfeedback-multiple-choice-image-option {\n display: flex;\n height: auto !important;\n box-shadow: 0 0 3px #ccc;\n}\n\n.magicfeedback-multiple-choice-image-label {\n font-size: 1rem;\n}\n\n.magicfeedback-consent-container {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin: 10px 0;\n width: 100%;\n}\n\n.magicfeedback-consent-container label {\n margin-left: 10px;\n}\n\n.magicfeedback-start-message-container {\n /* ... add your start message container styles here ... */\n}\n\n.magicfeedback-success-message,\n.magicfeedback-info-message,\n.magicfeedback-start-message {\n margin: 35px 5px;\n}\n\n.magicfeedback-success-message p,\n.magicfeedback-info-message p,\n.magicfeedback-start-message p {\n font-style: normal;\n text-align: start;\n font-weight: 400;\n font-size: 16px;\n color: #475569;\n line-height: 1.5;\n}\n\n.magicfeedback-success-message img,\n.magicfeedback-info-message img,\n.magicfeedback-start-message img {\n width: 400px;\n max-width: 80%;\n height: auto;\n margin: 10px auto;\n}\n\n.magicfeedback-counter,\n.magicfeedback-point-system-total {\n margin: 10px 0 0 0 !important;\n display: flex !important;\n justify-content: right !important;\n align-items: center !important;\n width: 100%;\n}\n\n.magicfeedback-skip-container {\n background-color: transparent !important;\n border: 0 !important;\n color: #999999FF !important;\n padding: 0 !important;\n margin: 0 !important;\n cursor: pointer !important;\n font-size: 0.5em !important;\n font-weight: 400 !important;\n box-shadow: 0 0 0 !important;\n\n &:hover {\n color: #0066ff;\n }\n}\n\n.magicfeedback-skip-container input[type=checkbox] {\n border-color: #999999FF !important;\n border: 0 !important;\n cursor: pointer !important;\n\n}\n\n.magicfeedback-multi-question-matrix,\n.magicfeedback-point-system,\n.magicfeedback-priority-list {\n width: 100% !important;\n}\n\n.magicfeedback-multi-question-matrix-container,\n.magicfeedback-point-system-container,\n.magicfeedback-priority-list-container {\n width: 100% !important;\n overflow-x: auto;\n}\n\n.magicfeedback-point-system-list,\n.magicfeedback-priority-list-list,\n.magicfeedback-multi-question-matrix-table {\n width: 100% !important;\n padding: 0 !important;\n overflow-x: auto;\n}\n\n.magicfeedback-multi-question-matrix {\n position: relative !important;\n}\n\n.magicfeedback-multi-question-matrix-container {\n overflow: auto !important;\n padding-bottom: 10px;\n}\n\n.magicfeedback-multi-question-matrix-label{\n text-align: left !important;\n}\n.magicfeedback-priority-list-item {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 10px 0 10px 10px;\n\n border: 1px solid #ced4da;\n border-radius: 5px;\n margin: 10px 0 !important;\n}\n\n.magicfeedback-point-system-item {\n height: 45px;\n margin: 5px 0 !important;\n}\n\n.magicfeedback-point-system-item label,\n.magicfeedback-priority-list-item-label {\n font-family: inherit;\n font-size: 18px !important;\n color: #212529;\n text-align: start;\n word-wrap: break-word;\n white-space: normal;\n padding: 0 10px 0 0;\n}\n\n.magicfeedback-point-system-input-container {\n padding: 0 10px 0 0;\n border-radius: 5px;\n font-size: 14px;\n border: 1px solid #ced4da;\n height: 42px;\n margin: auto 0;\n}\n\n.magicfeedback-multi-question-matrix-table thead {\n margin-bottom: 20px;\n}\n\n.magicfeedback-multi-question-matrix-table th{\n text-align: center;\n font-weight: 400 !important;\n font-size: 1rem !important;\n padding: 0 10px !important;\n}\n\n.magicfeedback-multi-question-matrix-table th,\n.magicfeedback-multi-question-matrix-table td label,\n.magicfeedback-priority-list-arrow-up,\n.magicfeedback-priority-list-arrow-down {\n font-style: normal !important;\n font-weight: 400 !important;\n font-size: 1rem !important;\n color: #475569 !important;\n cursor: pointer !important;\n margin: 0 !important;\n line-height: inherit;\n}\n\n.magicfeedback-multi-question-matrix-table tr {\n align-items: center;\n margin: 5px 0;\n}\n\n.magicfeedback-multi-question-matrix-row-tr{\n border-radius: 5px;\n margin: 10px 0 !important;\n}\n\n.magicfeedback-multi-question-matrix-row-tr:nth-child(odd) {\n background-color: #f1f6f6; /* Light gray background for odd rows */\n}\n\n.magicfeedback-multi-question-matrix-row-tr:nth-child(even) {\n background-color: #ffffff; /* White background for even rows */\n}\n\n.magicfeedback-multi-question-matrix-row-label {\n text-align: left !important;\n}\n\n.magicfeedback-point-system-item span {\n color: #475569 !important;\n}\n\n.magicfeedback-point-system-item input {\n padding: 0;\n margin: 0 !important;\n width: auto !important;\n min-width: 100px !important;\n height: auto !important;\n min-height: 42px;\n cursor: pointer;\n font-size: 14px;\n text-align: center !important;\n}\n\n.magicfeedback-multi-question-matrix-table input {\n margin: auto !important;\n padding: 20px !important;\n width: 100% !important;\n height: 15px;\n border: 1px solid #ced4da;\n cursor: pointer;\n}\n\n.magicfeedback-image{\n max-height: 400px !important;\n height: auto !important;\n max-width: 100% !important;\n margin: 10px auto !important;\n}\n\n.magicfeedback-error{\n margin-top: 5px;\n}';
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
181
189
|
// src/util/logger.ts
|
|
182
190
|
function setLogger(logger) {
|
|
183
191
|
active = logger ?? console;
|
|
@@ -199,876 +207,6 @@ var init_logger = __esm({
|
|
|
199
207
|
}
|
|
200
208
|
});
|
|
201
209
|
|
|
202
|
-
// src/assets/style.css
|
|
203
|
-
var style_default;
|
|
204
|
-
var init_style = __esm({
|
|
205
|
-
"src/assets/style.css"() {
|
|
206
|
-
style_default = `.magicfeedback-container {
|
|
207
|
-
width: 100%;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
.magicfeedback-success-message,
|
|
212
|
-
.magicfeedback-info-message,
|
|
213
|
-
.magicfeedback-start-message,
|
|
214
|
-
.magicfeedback-container{
|
|
215
|
-
animation-duration: 0.5s;
|
|
216
|
-
animation-name: animate-fade;
|
|
217
|
-
animation-delay: 0.25s;
|
|
218
|
-
animation-fill-mode: backwards;
|
|
219
|
-
|
|
220
|
-
font-style: normal;
|
|
221
|
-
text-align: justify;
|
|
222
|
-
font-weight: 400;
|
|
223
|
-
font-size: 1.2rem;
|
|
224
|
-
color: #475569;
|
|
225
|
-
line-height: 1.5;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
@keyframes animate-fade {
|
|
229
|
-
0% { opacity: 0; }
|
|
230
|
-
100% { opacity: 1; }
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.magicfeedback-form {
|
|
234
|
-
display: flex;
|
|
235
|
-
flex-direction: column;
|
|
236
|
-
justify-content: flex-start;
|
|
237
|
-
align-items: center;
|
|
238
|
-
width: 100%;
|
|
239
|
-
}
|
|
240
|
-
.magicfeedback-questions {
|
|
241
|
-
display: flex;
|
|
242
|
-
flex-direction: column;
|
|
243
|
-
justify-content: flex-start;
|
|
244
|
-
align-items: flex-start;
|
|
245
|
-
width: 100%;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.magicfeedback-div {
|
|
249
|
-
display: flex;
|
|
250
|
-
flex-direction: column;
|
|
251
|
-
justify-content: flex-start;
|
|
252
|
-
align-items: flex-start;
|
|
253
|
-
margin-bottom: 10px;
|
|
254
|
-
width: 100%;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.magicfeedback-label {
|
|
258
|
-
margin-bottom: 25px;
|
|
259
|
-
margin-top: 20px;
|
|
260
|
-
font-weight: 400;
|
|
261
|
-
font-family: inherit;
|
|
262
|
-
font-size: 1.2rem;
|
|
263
|
-
color: #212529;
|
|
264
|
-
text-align: start;
|
|
265
|
-
word-wrap: break-word;
|
|
266
|
-
white-space: normal;
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.magicfeedback-checkbox {
|
|
271
|
-
display: flex;
|
|
272
|
-
flex-direction: column;
|
|
273
|
-
flex-wrap: wrap;
|
|
274
|
-
width: 100%;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.magicfeedback-checkbox-container {
|
|
278
|
-
display: flex;
|
|
279
|
-
flex-direction: row;
|
|
280
|
-
justify-content: flex-start;
|
|
281
|
-
align-items: center;
|
|
282
|
-
margin-bottom: 5px;
|
|
283
|
-
margin-top: 5px;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.magicfeedback-radio {
|
|
287
|
-
display: flex;
|
|
288
|
-
flex-direction: column;
|
|
289
|
-
justify-content: flex-start;
|
|
290
|
-
flex-wrap: wrap;
|
|
291
|
-
width: 100%;
|
|
292
|
-
margin-right: 5px;
|
|
293
|
-
padding: 5px;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.magicfeedback-checkbox-container,
|
|
297
|
-
.magicfeedback-radio-container {
|
|
298
|
-
display: flex;
|
|
299
|
-
flex-direction: row;
|
|
300
|
-
justify-content: flex-start;
|
|
301
|
-
align-items: center;
|
|
302
|
-
margin: 5px;
|
|
303
|
-
padding: 5px 0;
|
|
304
|
-
background-color: #fff;
|
|
305
|
-
border-radius: 5px;
|
|
306
|
-
box-shadow: 0 0 3px #ccc;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.deepdots-popup input::-webkit-outer-spin-button,
|
|
310
|
-
.deepdots-popup input::-webkit-inner-spin-button {
|
|
311
|
-
-webkit-appearance: none;
|
|
312
|
-
-moz-appearance: textfield;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.magicfeedback-checkbox input[type="checkbox"] {
|
|
316
|
-
margin-right: 5px;
|
|
317
|
-
margin-left: 5px;
|
|
318
|
-
width: 20px;
|
|
319
|
-
height: 20px;
|
|
320
|
-
cursor: pointer;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
.magicfeedback-checkbox label,
|
|
325
|
-
.magicfeedback-radio-container label {
|
|
326
|
-
margin-left: 5px;
|
|
327
|
-
font-weight: 400;
|
|
328
|
-
font-family: inherit;
|
|
329
|
-
font-size: 16px;
|
|
330
|
-
color: #212529;
|
|
331
|
-
text-align: start;
|
|
332
|
-
width: 100%;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.deepdots-popup p {
|
|
336
|
-
margin-bottom: 0px;
|
|
337
|
-
font-size: 12px;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.deepdots-popup h2 {
|
|
341
|
-
line-height: 1.66;
|
|
342
|
-
margin: 0;
|
|
343
|
-
padding: 0;
|
|
344
|
-
font-weight: 900;
|
|
345
|
-
color: #222;
|
|
346
|
-
font-family: var(--deepdots-font, 'Montserrat');
|
|
347
|
-
font-size: 18px;
|
|
348
|
-
text-transform: uppercase;
|
|
349
|
-
text-align: center;
|
|
350
|
-
margin-bottom: 40px;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/* Los controles de formulario no heredan font-family por defecto: cuando hay
|
|
354
|
-
fuente custom (clase deepdots-has-font), los forzamos a usar la del contenedor. */
|
|
355
|
-
.deepdots-popup.deepdots-has-font button,
|
|
356
|
-
.deepdots-popup.deepdots-has-font input,
|
|
357
|
-
.deepdots-popup.deepdots-has-font textarea,
|
|
358
|
-
.deepdots-popup.deepdots-has-font select {
|
|
359
|
-
font-family: var(--deepdots-font, inherit);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.deepdots-popup h6 {
|
|
363
|
-
margin-bottom: 1rem;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
.deepdots-popup input[type="date"],
|
|
367
|
-
.deepdots-popup input[type="text"],
|
|
368
|
-
.deepdots-popup input[type="number"],
|
|
369
|
-
.deepdots-popup input[type="email"],
|
|
370
|
-
.deepdots-popup input[type="password"],
|
|
371
|
-
.deepdots-popup textarea,
|
|
372
|
-
.deepdots-popup select {
|
|
373
|
-
box-sizing: border-box;
|
|
374
|
-
padding: 10px;
|
|
375
|
-
margin: 10px 0;
|
|
376
|
-
width: 100%;
|
|
377
|
-
border: 2px solid #ccc; /* Default border color - you can customize this */
|
|
378
|
-
border-radius: 5px;
|
|
379
|
-
font-size: 18px;
|
|
380
|
-
outline: none;
|
|
381
|
-
transition: border-color 0.3s ease;
|
|
382
|
-
min-height: 50px;
|
|
383
|
-
font-family: inherit;
|
|
384
|
-
-webkit-appearance: none;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.deepdots-popup select {
|
|
388
|
-
background-image: linear-gradient(45deg, transparent 50%, gray 50%),
|
|
389
|
-
linear-gradient(135deg, gray 50%, transparent 50%),
|
|
390
|
-
linear-gradient(to right, #ccc, #ccc);
|
|
391
|
-
background-position: calc(100% - 20px) calc(1em + 2px),
|
|
392
|
-
calc(100% - 15px) calc(1em + 2px),
|
|
393
|
-
calc(100% - 2.5em) 0.5em;
|
|
394
|
-
background-size: 5px 5px,
|
|
395
|
-
5px 5px,
|
|
396
|
-
1px 1.5em;
|
|
397
|
-
background-repeat: no-repeat;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.magicfeedback-boolean-container {
|
|
401
|
-
display: flex;
|
|
402
|
-
flex-direction: row;
|
|
403
|
-
justify-content: flex-start;
|
|
404
|
-
align-items: center;
|
|
405
|
-
margin: 10px 0;
|
|
406
|
-
width: 100%;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.magicfeedback-boolean-container label {
|
|
410
|
-
margin-left: 10px;
|
|
411
|
-
font-weight: 400;
|
|
412
|
-
font-size: 16px;
|
|
413
|
-
width: 100%;
|
|
414
|
-
padding-top: 5px;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
.magicfeedback-boolean-option {
|
|
418
|
-
margin-right: 10px;
|
|
419
|
-
margin-left: 10px;
|
|
420
|
-
width: 100%;
|
|
421
|
-
height: 38px;
|
|
422
|
-
border-radius: 8px;
|
|
423
|
-
font-size: 16px;
|
|
424
|
-
cursor: pointer;
|
|
425
|
-
border: 1px solid #ced4da !important;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
.magicfeedback-boolean-option label {
|
|
429
|
-
font-weight: 400;
|
|
430
|
-
font-size: 16px;
|
|
431
|
-
color: #475569;
|
|
432
|
-
cursor: pointer;
|
|
433
|
-
width: 100%;
|
|
434
|
-
height: 100%;
|
|
435
|
-
display: flex;
|
|
436
|
-
justify-content: center;
|
|
437
|
-
align-items: center;
|
|
438
|
-
border-radius: inherit;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.magicfeedback-boolean-option input[type=radio] + label:hover {
|
|
442
|
-
color: #007bff;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.magicfeedback-boolean-option input[type=radio]:checked + label {
|
|
446
|
-
color: #007bff;
|
|
447
|
-
background-color: #cadff8;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.deepdots-popup input[type="radio"] {
|
|
451
|
-
padding: 20px;
|
|
452
|
-
margin: 10px 0 10px 15px;
|
|
453
|
-
width: 40px;
|
|
454
|
-
background-color: #fff;
|
|
455
|
-
box-shadow: none;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/* Style for focused input/select */
|
|
459
|
-
.deepdots-popup input:focus, .deepdots-popup select:focus {
|
|
460
|
-
border-color: #4CAF50; /* Highlight color when focused - you can customize this */
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
/* Style for invalid input (example: validation error) */
|
|
464
|
-
.deepdots-popup input.error, .deepdots-popup select.error {
|
|
465
|
-
border-color: #ff3333; /* Red color for error state - you can customize this */
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.magicfeedback-action-container {
|
|
469
|
-
display: flex;
|
|
470
|
-
flex-direction: row;
|
|
471
|
-
justify-content: space-between;
|
|
472
|
-
align-items: center;
|
|
473
|
-
margin-top: 10px;
|
|
474
|
-
width: 100%;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.magicfeedback-action-container .magicfeedback-submit {
|
|
478
|
-
cursor: pointer;
|
|
479
|
-
padding: 10px;
|
|
480
|
-
margin: 10px 0;
|
|
481
|
-
width: 100px;
|
|
482
|
-
border-radius: 8px;
|
|
483
|
-
font-size: 16px;
|
|
484
|
-
outline: none;
|
|
485
|
-
transition: border-color 0.3s ease;
|
|
486
|
-
background-color: #1E293B;
|
|
487
|
-
color: white;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.magicfeedback-action-container .magicfeedback-back {
|
|
491
|
-
cursor: pointer;
|
|
492
|
-
padding: 10px;
|
|
493
|
-
margin: 10px 0;
|
|
494
|
-
width: 100px;
|
|
495
|
-
border: 0;
|
|
496
|
-
border-radius: 8px;
|
|
497
|
-
font-size: 16px;
|
|
498
|
-
outline: none;
|
|
499
|
-
transition: border-color 0.3s ease;
|
|
500
|
-
background-color: transparent;
|
|
501
|
-
color: #212529;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
/* Rating styles */
|
|
507
|
-
.magicfeedback-rating {
|
|
508
|
-
width: 100%;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
.magicfeedback-rating-container {
|
|
512
|
-
display: flex;
|
|
513
|
-
flex-direction: row;
|
|
514
|
-
justify-content: space-around;
|
|
515
|
-
flex-wrap: wrap;
|
|
516
|
-
align-items: center;
|
|
517
|
-
|
|
518
|
-
margin: 15px 5px;
|
|
519
|
-
padding: 0;
|
|
520
|
-
|
|
521
|
-
list-style: none;
|
|
522
|
-
font-size: 1.5rem;
|
|
523
|
-
cursor: pointer;
|
|
524
|
-
user-select: none;
|
|
525
|
-
-webkit-user-select: none;
|
|
526
|
-
-moz-user-select: none;
|
|
527
|
-
-ms-user-select: none;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
.magicfeedback-rating-placeholder-value,
|
|
531
|
-
.magicfeedback-rating-placeholder{
|
|
532
|
-
text-align: center;
|
|
533
|
-
align-content: center;
|
|
534
|
-
justify-content: center;
|
|
535
|
-
text-wrap: wrap;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
.magicfeedback-rating-option {
|
|
539
|
-
margin: 0 0.5rem;
|
|
540
|
-
padding: 0;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
@media (max-width: 1024px) {
|
|
544
|
-
.magicfeedback-rating-option {
|
|
545
|
-
margin: 10px 0;
|
|
546
|
-
padding: 0;
|
|
547
|
-
width: 20%;
|
|
548
|
-
display: flex;
|
|
549
|
-
justify-content: center;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.magicfeedback-rating-placeholder-value {
|
|
553
|
-
font-size: 0.75rem;
|
|
554
|
-
margin-bottom: 1px;
|
|
555
|
-
}
|
|
556
|
-
.magicfeedback-rating-placeholder{
|
|
557
|
-
justify-content: center;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.magicfeedback-rating-container {
|
|
561
|
-
flex-wrap: wrap;
|
|
562
|
-
justify-content: flex-start;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
.magicfeedback-rating-option-label-container {
|
|
568
|
-
display: flex;
|
|
569
|
-
flex-direction: column;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
.magicfeedback-rating-option-label-container label {
|
|
574
|
-
display: inline-block;
|
|
575
|
-
text-align: center;
|
|
576
|
-
margin-bottom: 0;
|
|
577
|
-
font-weight: 600;
|
|
578
|
-
font-size: 18px;
|
|
579
|
-
color: #475569;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
.magicfeedback-rating-option-label-container input[type=radio] {
|
|
583
|
-
position: absolute;
|
|
584
|
-
opacity: 0;
|
|
585
|
-
width: 0;
|
|
586
|
-
height: 0;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
/* IMAGE STYLES */
|
|
590
|
-
.magicfeedback-rating-option-label-container input[type=radio] + img {
|
|
591
|
-
cursor: pointer;
|
|
592
|
-
height: 48px;
|
|
593
|
-
width: 48px;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/* LABEL STYLES */
|
|
597
|
-
.magicfeedback-rating-option-label-container input[type=radio] + label {
|
|
598
|
-
cursor: pointer;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/* CHECKED STYLES */
|
|
602
|
-
.magicfeedback-rating-option-label-container input[type=radio]:checked + img {
|
|
603
|
-
box-shadow: #007bff 0px 1px 4px, #007BFFA0 0px 0px 0px 2px;
|
|
604
|
-
border-radius: 50%;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
.magicfeedback-rating-number {
|
|
608
|
-
width: 100%;
|
|
609
|
-
}
|
|
610
|
-
.magicfeedback-rating-container,
|
|
611
|
-
.magicfeedback-rating-number-container {
|
|
612
|
-
display: flex;
|
|
613
|
-
flex-direction: row;
|
|
614
|
-
justify-content: space-between;
|
|
615
|
-
align-items: center;
|
|
616
|
-
|
|
617
|
-
margin: 15px 0;
|
|
618
|
-
padding: 0;
|
|
619
|
-
|
|
620
|
-
list-style: none;
|
|
621
|
-
font-size: 1.5rem;
|
|
622
|
-
cursor: pointer;
|
|
623
|
-
user-select: none;
|
|
624
|
-
-webkit-user-select: none;
|
|
625
|
-
-moz-user-select: none;
|
|
626
|
-
-ms-user-select: none;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
/* Cuando hay placeholders (Very bad / Very good), el placeholder ocupa
|
|
630
|
-
el 100% de la primera l\xEDnea y los boxes bajan a la siguiente */
|
|
631
|
-
.magicfeedback-rating-number-container--with-placeholder {
|
|
632
|
-
flex-wrap: wrap;
|
|
633
|
-
align-items: flex-start;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
.magicfeedback-rating-number-container--with-placeholder .magicfeedback-rating-placeholder {
|
|
637
|
-
width: 100%;
|
|
638
|
-
margin-bottom: 8px;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
.magicfeedback-rating-number-container--with-placeholder .magicfeedback-rating-number-option {
|
|
642
|
-
width: auto;
|
|
643
|
-
flex: 1;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
.magicfeedback-rating-number-option {
|
|
647
|
-
display: flex;
|
|
648
|
-
flex-direction: row;
|
|
649
|
-
justify-content: flex-start;
|
|
650
|
-
align-items: center;
|
|
651
|
-
margin: 5px;
|
|
652
|
-
padding: 0;
|
|
653
|
-
list-style: none;
|
|
654
|
-
font-size: 1.5rem;
|
|
655
|
-
cursor: pointer;
|
|
656
|
-
user-select: none;
|
|
657
|
-
-webkit-user-select: none;
|
|
658
|
-
-moz-user-select: none;
|
|
659
|
-
-ms-user-select: none;
|
|
660
|
-
width: 100%;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
.magicfeedback-rating-number-option-row{
|
|
664
|
-
max-width: 100% !important;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
.magicfeedback-rating-number-top-placeholder,
|
|
668
|
-
.magicfeedback-rating-number-bottom-placeholder{
|
|
669
|
-
text-align: center !important;
|
|
670
|
-
align-content: center;
|
|
671
|
-
justify-content: center;
|
|
672
|
-
text-wrap: wrap;
|
|
673
|
-
|
|
674
|
-
font-size: 15px;
|
|
675
|
-
color: #475569;
|
|
676
|
-
|
|
677
|
-
width: 100%;
|
|
678
|
-
margin: auto;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
@media (min-width: 650px) {
|
|
682
|
-
.magicfeedback-rating-number-option-row +.magicfeedback-rating-number-container-ltr:first-child,
|
|
683
|
-
.magicfeedback-rating-number-option-row + +.magicfeedback-rating-number-container-rtl:last-child {
|
|
684
|
-
margin-left: 0;
|
|
685
|
-
width: calc(100% - 10px);
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
.magicfeedback-rating-number-option-row +.magicfeedback-rating-number-container-rtl:first-child,
|
|
689
|
-
.magicfeedback-rating-number-option-row + +.magicfeedback-rating-number-container-ltr:last-child {
|
|
690
|
-
margin-right: 0;
|
|
691
|
-
width: calc(100% - 10px);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
.magicfeedback-rating-number-option-label-container {
|
|
697
|
-
display: flex;
|
|
698
|
-
flex-direction: column;
|
|
699
|
-
align-items: center;
|
|
700
|
-
justify-content: center;
|
|
701
|
-
width: 100%;
|
|
702
|
-
height: 100%;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
.magicfeedback-rating-number-option-label-container label {
|
|
706
|
-
display: flex;
|
|
707
|
-
align-items: center;
|
|
708
|
-
justify-content: center;
|
|
709
|
-
white-space: nowrap;
|
|
710
|
-
overflow: hidden;
|
|
711
|
-
text-overflow: ellipsis;
|
|
712
|
-
margin: 0 10px;
|
|
713
|
-
font-weight: 600;
|
|
714
|
-
font-size: 14px;
|
|
715
|
-
color: #475569;
|
|
716
|
-
cursor: pointer;
|
|
717
|
-
width: 100%;
|
|
718
|
-
height: 100%;
|
|
719
|
-
min-height: 50px;
|
|
720
|
-
text-align: center;
|
|
721
|
-
padding: 0;
|
|
722
|
-
border-radius: 4px;
|
|
723
|
-
border: 1px solid #ced4da;
|
|
724
|
-
background-color: rgba(246, 246, 246, 0.3);
|
|
725
|
-
transition: background-color 0.15s ease-in-out;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
.magicfeedback-rating-number-option-label-container input[type=radio] {
|
|
729
|
-
position: absolute;
|
|
730
|
-
opacity: 0;
|
|
731
|
-
width: 0;
|
|
732
|
-
height: 0;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
.magicfeedback-rating-number-option-label-container input[type=radio] + label {
|
|
736
|
-
cursor: pointer;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
.magicfeedback-rating-number-option-label-container input[type=radio] + label:hover,
|
|
740
|
-
.magicfeedback-rating-number-option-label-container input[type=radio]:checked + label {
|
|
741
|
-
color: #007bff;
|
|
742
|
-
border: 1px solid #007bff;
|
|
743
|
-
background-color: rgba(86, 168, 253, 0.29);
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
.magicfeedback-rating-number-container-column{
|
|
747
|
-
align-items: flex-start !important;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
@media (max-width: 650px) {
|
|
751
|
-
.magicfeedback-rating-number-container-ltr {
|
|
752
|
-
justify-content: center;
|
|
753
|
-
flex-wrap: wrap;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.magicfeedback-rating-number-container-rtl {
|
|
757
|
-
justify-content: center;
|
|
758
|
-
flex-wrap: wrap-reverse;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.magicfeedback-rating-number-option {
|
|
762
|
-
max-width: 100%;
|
|
763
|
-
height: 55px;
|
|
764
|
-
margin: 5px 0;
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
.magicfeedback-rating-star {
|
|
769
|
-
width: 100%;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
.magicfeedback-rating-star-container {
|
|
773
|
-
display: flex !important;
|
|
774
|
-
flex-direction: row !important;
|
|
775
|
-
justify-content: center !important;
|
|
776
|
-
align-items: center !important;
|
|
777
|
-
flex-wrap: wrap;
|
|
778
|
-
margin: 15px 5px;
|
|
779
|
-
padding: 0;
|
|
780
|
-
list-style: none;
|
|
781
|
-
font-size: 1.5rem;
|
|
782
|
-
cursor: pointer;
|
|
783
|
-
user-select: none;
|
|
784
|
-
-webkit-user-select: none;
|
|
785
|
-
-moz-user-select: none;
|
|
786
|
-
-ms-user-select: none;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
.magicfeedback-rating-star-option:not(:checked) > .rating__star {
|
|
790
|
-
float: right;
|
|
791
|
-
width: 1em;
|
|
792
|
-
overflow: hidden;
|
|
793
|
-
white-space: nowrap;
|
|
794
|
-
cursor: pointer;
|
|
795
|
-
font-size: 30px;
|
|
796
|
-
color: #ccc;
|
|
797
|
-
margin: 0 10px;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover,
|
|
801
|
-
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover ~ span {
|
|
802
|
-
color: #deb217 !important;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
.magicfeedback-rating-star-selected {
|
|
806
|
-
color: #ffc700 !important;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
/* Style for multiple choice image */
|
|
811
|
-
.magicfeedback-image-option-label-container:hover {
|
|
812
|
-
cursor: pointer;
|
|
813
|
-
border: 0 !important;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
.magicfeedback-image-option-label-container input[type=radio]:checked + img,
|
|
817
|
-
.magicfeedback-image-option-label-container input[type=checkbox]:checked + img {
|
|
818
|
-
border: 1px solid #007bff !important;
|
|
819
|
-
box-shadow: 0 0 3px #007bff !important;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
.magicfeedback-image-option-label-container input[type=radio] + img,
|
|
823
|
-
.magicfeedback-image-option-label-container input[type=checkbox] + img {
|
|
824
|
-
border: 1px solid transparent !important;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
.magicfeedback-image-option-label-container{
|
|
828
|
-
margin: 10px !important;
|
|
829
|
-
height: calc(100% - 20px) !important;
|
|
830
|
-
width: calc(100% - 20px) !important;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
.magicfeedback-multiple-choice-image-option {
|
|
834
|
-
display: flex;
|
|
835
|
-
height: auto !important;
|
|
836
|
-
box-shadow: 0 0 3px #ccc;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
.magicfeedback-multiple-choice-image-label {
|
|
840
|
-
font-size: 1rem;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
.magicfeedback-consent-container {
|
|
844
|
-
display: flex;
|
|
845
|
-
flex-direction: row;
|
|
846
|
-
justify-content: flex-start;
|
|
847
|
-
align-items: center;
|
|
848
|
-
margin: 10px 0;
|
|
849
|
-
width: 100%;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
.magicfeedback-consent-container label {
|
|
853
|
-
margin-left: 10px;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
.magicfeedback-start-message-container {
|
|
857
|
-
/* ... add your start message container styles here ... */
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
.magicfeedback-success-message,
|
|
861
|
-
.magicfeedback-info-message,
|
|
862
|
-
.magicfeedback-start-message {
|
|
863
|
-
margin: 35px 5px;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
.magicfeedback-success-message p,
|
|
867
|
-
.magicfeedback-info-message p,
|
|
868
|
-
.magicfeedback-start-message p {
|
|
869
|
-
font-style: normal;
|
|
870
|
-
text-align: start;
|
|
871
|
-
font-weight: 400;
|
|
872
|
-
font-size: 16px;
|
|
873
|
-
color: #475569;
|
|
874
|
-
line-height: 1.5;
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
.magicfeedback-success-message img,
|
|
878
|
-
.magicfeedback-info-message img,
|
|
879
|
-
.magicfeedback-start-message img {
|
|
880
|
-
width: 400px;
|
|
881
|
-
max-width: 80%;
|
|
882
|
-
height: auto;
|
|
883
|
-
margin: 10px auto;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
.magicfeedback-counter,
|
|
887
|
-
.magicfeedback-point-system-total {
|
|
888
|
-
margin: 10px 0 0 0 !important;
|
|
889
|
-
display: flex !important;
|
|
890
|
-
justify-content: right !important;
|
|
891
|
-
align-items: center !important;
|
|
892
|
-
width: 100%;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
.magicfeedback-skip-container {
|
|
896
|
-
background-color: transparent !important;
|
|
897
|
-
border: 0 !important;
|
|
898
|
-
color: #999999FF !important;
|
|
899
|
-
padding: 0 !important;
|
|
900
|
-
margin: 0 !important;
|
|
901
|
-
cursor: pointer !important;
|
|
902
|
-
font-size: 0.5em !important;
|
|
903
|
-
font-weight: 400 !important;
|
|
904
|
-
box-shadow: 0 0 0 !important;
|
|
905
|
-
|
|
906
|
-
&:hover {
|
|
907
|
-
color: #0066ff;
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
.magicfeedback-skip-container input[type=checkbox] {
|
|
912
|
-
border-color: #999999FF !important;
|
|
913
|
-
border: 0 !important;
|
|
914
|
-
cursor: pointer !important;
|
|
915
|
-
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
.magicfeedback-multi-question-matrix,
|
|
919
|
-
.magicfeedback-point-system,
|
|
920
|
-
.magicfeedback-priority-list {
|
|
921
|
-
width: 100% !important;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
.magicfeedback-multi-question-matrix-container,
|
|
925
|
-
.magicfeedback-point-system-container,
|
|
926
|
-
.magicfeedback-priority-list-container {
|
|
927
|
-
width: 100% !important;
|
|
928
|
-
overflow-x: auto;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
.magicfeedback-point-system-list,
|
|
932
|
-
.magicfeedback-priority-list-list,
|
|
933
|
-
.magicfeedback-multi-question-matrix-table {
|
|
934
|
-
width: 100% !important;
|
|
935
|
-
padding: 0 !important;
|
|
936
|
-
overflow-x: auto;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
.magicfeedback-multi-question-matrix {
|
|
940
|
-
position: relative !important;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
.magicfeedback-multi-question-matrix-container {
|
|
944
|
-
overflow: auto !important;
|
|
945
|
-
padding-bottom: 10px;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
.magicfeedback-multi-question-matrix-label{
|
|
949
|
-
text-align: left !important;
|
|
950
|
-
}
|
|
951
|
-
.magicfeedback-priority-list-item {
|
|
952
|
-
display: flex;
|
|
953
|
-
flex-direction: row;
|
|
954
|
-
justify-content: space-between;
|
|
955
|
-
align-items: center;
|
|
956
|
-
padding: 10px 0 10px 10px;
|
|
957
|
-
|
|
958
|
-
border: 1px solid #ced4da;
|
|
959
|
-
border-radius: 5px;
|
|
960
|
-
margin: 10px 0 !important;
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
.magicfeedback-point-system-item {
|
|
964
|
-
height: 45px;
|
|
965
|
-
margin: 5px 0 !important;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
.magicfeedback-point-system-item label,
|
|
969
|
-
.magicfeedback-priority-list-item-label {
|
|
970
|
-
font-family: inherit;
|
|
971
|
-
font-size: 18px !important;
|
|
972
|
-
color: #212529;
|
|
973
|
-
text-align: start;
|
|
974
|
-
word-wrap: break-word;
|
|
975
|
-
white-space: normal;
|
|
976
|
-
padding: 0 10px 0 0;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
.magicfeedback-point-system-input-container {
|
|
980
|
-
padding: 0 10px 0 0;
|
|
981
|
-
border-radius: 5px;
|
|
982
|
-
font-size: 14px;
|
|
983
|
-
border: 1px solid #ced4da;
|
|
984
|
-
height: 42px;
|
|
985
|
-
margin: auto 0;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
.magicfeedback-multi-question-matrix-table thead {
|
|
989
|
-
margin-bottom: 20px;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
.magicfeedback-multi-question-matrix-table th{
|
|
993
|
-
text-align: center;
|
|
994
|
-
font-weight: 400 !important;
|
|
995
|
-
font-size: 1rem !important;
|
|
996
|
-
padding: 0 10px !important;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
.magicfeedback-multi-question-matrix-table th,
|
|
1000
|
-
.magicfeedback-multi-question-matrix-table td label,
|
|
1001
|
-
.magicfeedback-priority-list-arrow-up,
|
|
1002
|
-
.magicfeedback-priority-list-arrow-down {
|
|
1003
|
-
font-style: normal !important;
|
|
1004
|
-
font-weight: 400 !important;
|
|
1005
|
-
font-size: 1rem !important;
|
|
1006
|
-
color: #475569 !important;
|
|
1007
|
-
cursor: pointer !important;
|
|
1008
|
-
margin: 0 !important;
|
|
1009
|
-
line-height: inherit;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
.magicfeedback-multi-question-matrix-table tr {
|
|
1013
|
-
align-items: center;
|
|
1014
|
-
margin: 5px 0;
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
.magicfeedback-multi-question-matrix-row-tr{
|
|
1018
|
-
border-radius: 5px;
|
|
1019
|
-
margin: 10px 0 !important;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.magicfeedback-multi-question-matrix-row-tr:nth-child(odd) {
|
|
1023
|
-
background-color: #f1f6f6; /* Light gray background for odd rows */
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
.magicfeedback-multi-question-matrix-row-tr:nth-child(even) {
|
|
1027
|
-
background-color: #ffffff; /* White background for even rows */
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
.magicfeedback-multi-question-matrix-row-label {
|
|
1031
|
-
text-align: left !important;
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
.magicfeedback-point-system-item span {
|
|
1035
|
-
color: #475569 !important;
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
.magicfeedback-point-system-item input {
|
|
1039
|
-
padding: 0;
|
|
1040
|
-
margin: 0 !important;
|
|
1041
|
-
width: auto !important;
|
|
1042
|
-
min-width: 100px !important;
|
|
1043
|
-
height: auto !important;
|
|
1044
|
-
min-height: 42px;
|
|
1045
|
-
cursor: pointer;
|
|
1046
|
-
font-size: 14px;
|
|
1047
|
-
text-align: center !important;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
.magicfeedback-multi-question-matrix-table input {
|
|
1051
|
-
margin: auto !important;
|
|
1052
|
-
padding: 20px !important;
|
|
1053
|
-
width: 100% !important;
|
|
1054
|
-
height: 15px;
|
|
1055
|
-
border: 1px solid #ced4da;
|
|
1056
|
-
cursor: pointer;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
.magicfeedback-image{
|
|
1060
|
-
max-height: 400px !important;
|
|
1061
|
-
height: auto !important;
|
|
1062
|
-
max-width: 100% !important;
|
|
1063
|
-
margin: 10px auto !important;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
.magicfeedback-error{
|
|
1067
|
-
margin-top: 5px;
|
|
1068
|
-
}`;
|
|
1069
|
-
}
|
|
1070
|
-
});
|
|
1071
|
-
|
|
1072
210
|
// src/ui/renderPopup.ts
|
|
1073
211
|
var renderPopup_exports = {};
|
|
1074
212
|
__export(renderPopup_exports, {
|
|
@@ -1476,7 +614,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
1476
614
|
};
|
|
1477
615
|
generateOptions.onLoadedEvent = ({ formData }) => {
|
|
1478
616
|
try {
|
|
1479
|
-
} catch
|
|
617
|
+
} catch {
|
|
1480
618
|
}
|
|
1481
619
|
const s = formData?.style;
|
|
1482
620
|
if (s && !stylesInjected) {
|
|
@@ -1641,6 +779,10 @@ var POPUP_TRIGGER_CONDITION_STATUSES = [
|
|
|
1641
779
|
];
|
|
1642
780
|
|
|
1643
781
|
// src/triggers/index.ts
|
|
782
|
+
function toNumericValue(value, fallback) {
|
|
783
|
+
const n = Number(value);
|
|
784
|
+
return Number.isFinite(n) ? n : fallback;
|
|
785
|
+
}
|
|
1644
786
|
function setupTrigger(popups, trigger) {
|
|
1645
787
|
switch (trigger.type) {
|
|
1646
788
|
case "time":
|
|
@@ -1661,14 +803,14 @@ function setupTrigger(popups, trigger) {
|
|
|
1661
803
|
}
|
|
1662
804
|
}
|
|
1663
805
|
function setupTimeTrigger(popups, trigger) {
|
|
1664
|
-
const delay = trigger.value
|
|
806
|
+
const delay = toNumericValue(trigger.value, 5e3);
|
|
1665
807
|
setTimeout(() => {
|
|
1666
808
|
popups.triggerSurvey(trigger.surveyId, trigger.popupId);
|
|
1667
809
|
}, delay);
|
|
1668
810
|
popups.debug(`Time trigger set for ${delay}ms`);
|
|
1669
811
|
}
|
|
1670
812
|
function setupScrollTrigger(popups, trigger) {
|
|
1671
|
-
const threshold = trigger.value
|
|
813
|
+
const threshold = toNumericValue(trigger.value, 50);
|
|
1672
814
|
const handler = () => {
|
|
1673
815
|
const scrollPercentage = window.scrollY / (document.documentElement.scrollHeight - window.innerHeight) * 100;
|
|
1674
816
|
if (scrollPercentage >= threshold) {
|
|
@@ -1822,6 +964,16 @@ init_tracking_manager();
|
|
|
1822
964
|
|
|
1823
965
|
// src/ui/surveyHtml.ts
|
|
1824
966
|
init_font();
|
|
967
|
+
init_style();
|
|
968
|
+
var POSITION_MAP = {
|
|
969
|
+
center: { justifyContent: "center", alignItems: "center", padding: "0", background: "rgba(0,0,0,0.5)" },
|
|
970
|
+
bottom: { justifyContent: "center", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
971
|
+
"bottom-right": { justifyContent: "flex-end", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
972
|
+
"bottom-left": { justifyContent: "flex-start", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
973
|
+
top: { justifyContent: "center", alignItems: "flex-start", padding: "16px", background: "transparent" },
|
|
974
|
+
"top-right": { justifyContent: "flex-end", alignItems: "flex-start", padding: "16px", background: "transparent" },
|
|
975
|
+
"top-left": { justifyContent: "flex-start", alignItems: "flex-start", padding: "16px", background: "transparent" }
|
|
976
|
+
};
|
|
1825
977
|
function buildSurveyHtml(opts) {
|
|
1826
978
|
const env = opts.env === "development" ? "dev" : "prod";
|
|
1827
979
|
const version = opts.version ?? "2.2.4";
|
|
@@ -1832,17 +984,152 @@ function buildSurveyHtml(opts) {
|
|
|
1832
984
|
const metaJson = JSON.stringify(opts.metadata ?? []);
|
|
1833
985
|
const fontFaceCss = opts.font ? buildFontFaceCss(opts.font.family, opts.font.url) : "";
|
|
1834
986
|
const fontFamilyValue = opts.font ? buildFontFamilyValue(opts.font.family) : "-apple-system,system-ui,sans-serif";
|
|
987
|
+
const popupClass = opts.font?.family ? "deepdots-popup deepdots-has-font" : "deepdots-popup";
|
|
988
|
+
const isDark = opts.theme === "dark";
|
|
989
|
+
const popupBg = isDark ? "#1e1e1e" : "#fff";
|
|
990
|
+
const colorScheme = isDark ? "dark" : "light";
|
|
991
|
+
const textPrimary = isDark ? "#f0f0f0" : "#111";
|
|
992
|
+
const pos = POSITION_MAP[opts.position ?? "center"] ?? POSITION_MAP.center;
|
|
993
|
+
const chrome = opts.chrome !== false;
|
|
994
|
+
const bodyBg = chrome ? pos.background : "transparent";
|
|
995
|
+
const bodyPadding = chrome ? pos.padding : "0";
|
|
996
|
+
const bodyDisplay = chrome ? "flex" : "block";
|
|
997
|
+
const cardBg = chrome ? popupBg : "transparent";
|
|
998
|
+
const cardShadow = chrome ? "0 4px 6px rgba(0,0,0,0.1)" : "none";
|
|
999
|
+
const cardRadius = chrome ? "8px" : "0";
|
|
1000
|
+
const cardMaxWidth = chrome ? "600px" : "none";
|
|
1001
|
+
const cardWidth = chrome ? "90%" : "100%";
|
|
1002
|
+
const cardMinHeight = chrome ? "200px" : "0";
|
|
1003
|
+
const backLabel = JSON.stringify(opts.actions?.back?.label ?? "Back");
|
|
1004
|
+
const startLabel = JSON.stringify(opts.actions?.start?.label ?? "Start survey");
|
|
1005
|
+
const completeLabel = JSON.stringify(opts.actions?.complete?.label ?? "Complete survey");
|
|
1006
|
+
const submitLabel = JSON.stringify(opts.actions?.accept?.label ?? "Send");
|
|
1835
1007
|
return `<!DOCTYPE html><html><head>
|
|
1836
1008
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
1837
|
-
<meta name="color-scheme" content="
|
|
1838
|
-
<style
|
|
1009
|
+
<meta name="color-scheme" content="${colorScheme}"/>
|
|
1010
|
+
<style>
|
|
1011
|
+
${style_default}
|
|
1012
|
+
${fontFaceCss}
|
|
1013
|
+
html,body{margin:0;padding:0;height:100%;font-family:${fontFamilyValue}}
|
|
1014
|
+
body{display:${bodyDisplay};justify-content:${pos.justifyContent};align-items:${pos.alignItems};background:${bodyBg};padding:${bodyPadding};box-sizing:border-box}
|
|
1015
|
+
.deepdots-popup{position:relative;display:flex;flex-direction:column;justify-content:flex-start;background:${cardBg};color-scheme:${colorScheme};border-radius:${cardRadius};padding:24px;box-shadow:${cardShadow};max-width:${cardMaxWidth};width:${cardWidth};min-height:${cardMinHeight};box-sizing:border-box}
|
|
1016
|
+
.deepdots-popup-header{display:flex;justify-content:flex-end;align-items:center;width:100%}
|
|
1017
|
+
#dd-close{background:transparent;border:none;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;color:${textPrimary};padding:4px}
|
|
1018
|
+
.deepdots-popup-container-content{display:flex;flex-direction:column;padding:0 20px 12px 20px;max-height:80vh;overflow:hidden;box-sizing:border-box}
|
|
1019
|
+
.deepdots-popup-main{display:flex;flex-direction:column;width:100%;max-height:80vh;overflow-y:auto;overflow-x:hidden;position:relative}
|
|
1020
|
+
#dd-form-wrapper{width:100%;flex:1 1 auto}
|
|
1021
|
+
#mf{width:100%;box-sizing:border-box;visibility:hidden}
|
|
1022
|
+
.deepdots-popup-main *{max-width:100%;box-sizing:border-box}
|
|
1023
|
+
#dd-logo{max-height:40px;max-width:100%;object-fit:contain}
|
|
1024
|
+
.deepdots-error-hint{display:none;margin:12px 0 0 0;padding:10px 12px;border-radius:6px;background:#FEF3C7;color:#92400E;border:1px solid #FCD34D;font-size:13px}
|
|
1025
|
+
.deepdots-popup-footer{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center;gap:8px;margin-top:auto;width:100%;padding-top:16px}
|
|
1026
|
+
.dd-nav-btn{display:none;border:none;padding:12px 24px;border-radius:4px;cursor:pointer;font-size:14px;box-shadow:0 2px 4px rgba(0,0,0,0.1);align-items:center;justify-content:center;text-align:center}
|
|
1027
|
+
#dd-back{background:transparent;color:#333;border:1px solid #999}
|
|
1028
|
+
#dd-start,#dd-complete,#dd-submit{background:#1E293B;color:#fff;border:none}
|
|
1029
|
+
#dd-submit:disabled,#dd-start:disabled,#dd-back:disabled,#dd-complete:disabled{opacity:0.6;cursor:not-allowed}
|
|
1030
|
+
.mf-spinner{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
|
|
1031
|
+
.mf-spinner-circle{width:28px;height:28px;border:3px solid #e0e6ed;border-top-color:#1E293B;border-radius:50%;animation:ddspin 0.9s linear infinite}
|
|
1032
|
+
@keyframes ddspin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
|
|
1033
|
+
@media (max-width:640px){
|
|
1034
|
+
.deepdots-popup{width:calc(100% - 24px);max-width:calc(100% - 24px);border-radius:12px}
|
|
1035
|
+
.deepdots-popup-footer{flex-direction:column-reverse;gap:12px}
|
|
1036
|
+
.dd-nav-btn{width:100%}
|
|
1037
|
+
.magicfeedback-checkbox-container,.magicfeedback-radio-container{margin:4px 0;padding:4px 8px}
|
|
1038
|
+
.magicfeedback-checkbox label,.magicfeedback-radio-container label{font-size:15px}
|
|
1039
|
+
.deepdots-popup input[type="radio"]{margin:6px 0 6px 8px}
|
|
1040
|
+
.deepdots-popup input[type="checkbox"]{width:16px;height:16px}
|
|
1041
|
+
}
|
|
1042
|
+
</style>
|
|
1839
1043
|
</head><body>
|
|
1840
|
-
<div id="
|
|
1044
|
+
<div class="${popupClass}" id="dd-popup">
|
|
1045
|
+
<div class="deepdots-popup-header">
|
|
1046
|
+
<button type="button" id="dd-close" aria-label="Close popup">
|
|
1047
|
+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1048
|
+
<path d="M6 6L18 18M6 18L18 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1049
|
+
</svg>
|
|
1050
|
+
</button>
|
|
1051
|
+
</div>
|
|
1052
|
+
<div class="deepdots-popup-container-content">
|
|
1053
|
+
<div class="deepdots-popup-main" id="dd-main">
|
|
1054
|
+
<div id="dd-form-wrapper">
|
|
1055
|
+
<div class="mf-spinner" id="dd-spinner" role="status" aria-label="Loading survey"><div class="mf-spinner-circle"></div></div>
|
|
1056
|
+
<div id="mf"></div>
|
|
1057
|
+
</div>
|
|
1058
|
+
<div class="deepdots-error-hint" id="dd-error" role="alert" aria-live="polite"></div>
|
|
1059
|
+
<div class="deepdots-popup-footer" id="dd-footer">
|
|
1060
|
+
<button type="button" class="dd-nav-btn" id="dd-submit">Send</button>
|
|
1061
|
+
<button type="button" class="dd-nav-btn" id="dd-back">Back</button>
|
|
1062
|
+
<button type="button" class="dd-nav-btn" id="dd-complete">Complete survey</button>
|
|
1063
|
+
<button type="button" class="dd-nav-btn" id="dd-start">Start survey</button>
|
|
1064
|
+
</div>
|
|
1065
|
+
</div>
|
|
1066
|
+
</div>
|
|
1067
|
+
</div>
|
|
1841
1068
|
<script>
|
|
1842
1069
|
(function(){
|
|
1843
1070
|
function emit(s){ try{ if(window.ReactNativeWebView){ window.ReactNativeWebView.postMessage(s); } }catch(e){} }
|
|
1844
1071
|
function emitJSON(n,p){ try{ emit(JSON.stringify({name:n,payload:p||{}})); }catch(e){} }
|
|
1845
1072
|
window.DeepdotsClose = function(){ emitJSON('popup_close'); };
|
|
1073
|
+
var chromeOn=${chrome ? "true" : "false"};
|
|
1074
|
+
|
|
1075
|
+
var popup=document.getElementById('dd-popup');
|
|
1076
|
+
var main=document.getElementById('dd-main');
|
|
1077
|
+
var footer=document.getElementById('dd-footer');
|
|
1078
|
+
var spinner=document.getElementById('dd-spinner');
|
|
1079
|
+
var formHost=document.getElementById('mf');
|
|
1080
|
+
var errorHint=document.getElementById('dd-error');
|
|
1081
|
+
var backBtn=document.getElementById('dd-back');
|
|
1082
|
+
var startBtn=document.getElementById('dd-start');
|
|
1083
|
+
var completeBtn=document.getElementById('dd-complete');
|
|
1084
|
+
var submitBtn=document.getElementById('dd-submit');
|
|
1085
|
+
|
|
1086
|
+
backBtn.textContent=${backLabel};
|
|
1087
|
+
startBtn.textContent=${startLabel};
|
|
1088
|
+
completeBtn.textContent=${completeLabel};
|
|
1089
|
+
submitBtn.textContent=${submitLabel};
|
|
1090
|
+
|
|
1091
|
+
document.getElementById('dd-close').onclick=function(){ emitJSON('popup_close'); };
|
|
1092
|
+
backBtn.onclick=function(){ if(window.DeepdotsForm && window.DeepdotsForm.back){ window.DeepdotsForm.back(); } };
|
|
1093
|
+
startBtn.onclick=function(){ if(window.DeepdotsForm && window.DeepdotsForm.startForm){ window.DeepdotsForm.startForm(); } };
|
|
1094
|
+
completeBtn.onclick=function(){ emitJSON('popup_close'); };
|
|
1095
|
+
var surveyCompletedEmitted=false;
|
|
1096
|
+
submitBtn.onclick=function(){
|
|
1097
|
+
if(surveyCompletedEmitted) return;
|
|
1098
|
+
if(window.DeepdotsForm && window.DeepdotsForm.send){ window.DeepdotsForm.send(); }
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
function updateButtons(state){
|
|
1102
|
+
backBtn.style.display='none';
|
|
1103
|
+
startBtn.style.display='none';
|
|
1104
|
+
submitBtn.style.display='none';
|
|
1105
|
+
completeBtn.style.display='none';
|
|
1106
|
+
backBtn.style.width='';
|
|
1107
|
+
startBtn.style.width='';
|
|
1108
|
+
submitBtn.style.width='';
|
|
1109
|
+
completeBtn.style.width='';
|
|
1110
|
+
if(state==='start'){
|
|
1111
|
+
startBtn.style.display='inline-flex';
|
|
1112
|
+
startBtn.style.width='100%';
|
|
1113
|
+
} else if(state==='in_progress_first'){
|
|
1114
|
+
submitBtn.style.display='inline-flex';
|
|
1115
|
+
} else if(state==='in_progress_next'){
|
|
1116
|
+
backBtn.style.display='inline-flex';
|
|
1117
|
+
submitBtn.style.display='inline-flex';
|
|
1118
|
+
} else if(state==='completed'){
|
|
1119
|
+
completeBtn.style.display='inline-flex';
|
|
1120
|
+
completeBtn.style.width='100%';
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
function setLoading(isLoading){
|
|
1125
|
+
spinner.style.display=isLoading?'flex':'none';
|
|
1126
|
+
if(!isLoading){ formHost.style.visibility='visible'; }
|
|
1127
|
+
footer.style.display=isLoading?'none':'flex';
|
|
1128
|
+
backBtn.disabled=isLoading; startBtn.disabled=isLoading; completeBtn.disabled=isLoading; submitBtn.disabled=isLoading;
|
|
1129
|
+
if(isLoading){ updateButtons(null); }
|
|
1130
|
+
}
|
|
1131
|
+
setLoading(true);
|
|
1132
|
+
|
|
1846
1133
|
var initialized=false;
|
|
1847
1134
|
function initMF(){
|
|
1848
1135
|
if(initialized || !window.magicfeedback) return initialized;
|
|
@@ -1851,23 +1138,85 @@ function buildSurveyHtml(opts) {
|
|
|
1851
1138
|
window.magicfeedback.init({ debug:false, env:'${env}' });
|
|
1852
1139
|
var form = window.magicfeedback.form(${sid}, ${pid}, ${profileJson}, ${metaJson});
|
|
1853
1140
|
window.DeepdotsForm = form;
|
|
1141
|
+
var stylesInjected=false;
|
|
1854
1142
|
form.generate('mf', {
|
|
1855
1143
|
addButton:false,
|
|
1856
1144
|
getMetaData:true,
|
|
1857
|
-
onLoadedEvent:function(){
|
|
1858
|
-
|
|
1145
|
+
onLoadedEvent:function(args){
|
|
1146
|
+
var s=args && args.formData ? args.formData.style : null;
|
|
1147
|
+
if(s && !stylesInjected){
|
|
1148
|
+
stylesInjected=true;
|
|
1149
|
+
if(chromeOn && s.boxBackgroundColor){ popup.style.background=s.boxBackgroundColor; }
|
|
1150
|
+
if(s.contentAlign){ main.style.justifyContent = s.contentAlign==='center' ? 'center' : 'flex-start'; }
|
|
1151
|
+
if(s.buttonPrimaryColor){
|
|
1152
|
+
submitBtn.style.background=s.buttonPrimaryColor; submitBtn.style.border='none'; submitBtn.style.color='#fff';
|
|
1153
|
+
startBtn.style.background=s.buttonPrimaryColor; startBtn.style.border='none'; startBtn.style.color='#fff';
|
|
1154
|
+
completeBtn.style.background=s.buttonPrimaryColor; completeBtn.style.border='none'; completeBtn.style.color='#fff';
|
|
1155
|
+
}
|
|
1156
|
+
if(s.buttonSecondaryColor){
|
|
1157
|
+
backBtn.style.background='#fff'; backBtn.style.color=s.buttonSecondaryColor; backBtn.style.border='1px solid '+s.buttonSecondaryColor;
|
|
1158
|
+
}
|
|
1159
|
+
if(s.logo && !document.getElementById('dd-logo')){
|
|
1160
|
+
var logoImg=document.createElement('img');
|
|
1161
|
+
logoImg.id='dd-logo'; logoImg.src=s.logo; logoImg.alt='Logo';
|
|
1162
|
+
if(s.logoSize==='small'){ logoImg.style.maxHeight='30px'; }
|
|
1163
|
+
else if(s.logoSize==='medium'){ logoImg.style.maxHeight='50px'; }
|
|
1164
|
+
else if(s.logoSize==='large'){ logoImg.style.maxHeight='70px'; }
|
|
1165
|
+
if(s.logoPosition==='left'){ logoImg.style.margin='0 16px 20px 0'; logoImg.style.display='block'; logoImg.style.marginLeft='0'; }
|
|
1166
|
+
else if(s.logoPosition==='right'){ logoImg.style.margin='0 0 20px 16px'; logoImg.style.display='block'; logoImg.style.marginLeft='auto'; }
|
|
1167
|
+
else if(s.logoPosition==='center'){ logoImg.style.margin='0 auto 20px auto'; logoImg.style.display='block'; }
|
|
1168
|
+
main.insertBefore(logoImg, document.getElementById('dd-form-wrapper'));
|
|
1169
|
+
}
|
|
1170
|
+
if(s.startMessage && s.startMessage!==''){ updateButtons('start'); }
|
|
1171
|
+
else { updateButtons('in_progress_first'); }
|
|
1172
|
+
} else {
|
|
1173
|
+
updateButtons('in_progress_first');
|
|
1174
|
+
}
|
|
1175
|
+
emitJSON('loaded');
|
|
1176
|
+
setLoading(false);
|
|
1177
|
+
},
|
|
1178
|
+
beforeSubmitEvent:function(){
|
|
1179
|
+
setLoading(true);
|
|
1180
|
+
emitJSON('before_submit');
|
|
1181
|
+
},
|
|
1859
1182
|
afterSubmitEvent:function(p){
|
|
1860
|
-
|
|
1861
|
-
|
|
1183
|
+
var error=p && p.error ? (typeof p.error==='string' ? p.error : String(p.error)) : '';
|
|
1184
|
+
if(error){
|
|
1185
|
+
setLoading(false);
|
|
1186
|
+
if(error.toLowerCase().indexOf('no response')!==-1){
|
|
1187
|
+
errorHint.textContent='Please answer the required question to continue.';
|
|
1188
|
+
errorHint.style.display='block';
|
|
1189
|
+
updateButtons('in_progress_next');
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
errorHint.textContent='An error occurred while submitting. Please try again or close the popup.';
|
|
1193
|
+
errorHint.style.display='block';
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
errorHint.style.display='none';
|
|
1197
|
+
setLoading(false);
|
|
1198
|
+
if(p && p.completed){
|
|
1199
|
+
surveyCompletedEmitted=true;
|
|
1200
|
+
updateButtons('completed');
|
|
1201
|
+
emitJSON('survey_completed', p);
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
if(p && p.total>1 && p.progress>0 && p.progress<p.total){ updateButtons('in_progress_next'); }
|
|
1205
|
+
else { updateButtons('in_progress_first'); }
|
|
1206
|
+
emitJSON('after_submit', p);
|
|
1862
1207
|
},
|
|
1863
|
-
onBackEvent:function(p){
|
|
1864
|
-
|
|
1865
|
-
|
|
1208
|
+
onBackEvent:function(p){
|
|
1209
|
+
if(p && p.progress===0){ updateButtons('in_progress_first'); }
|
|
1210
|
+
else { updateButtons('in_progress_next'); }
|
|
1211
|
+
emitJSON('back', p);
|
|
1212
|
+
}
|
|
1213
|
+
}).catch(function(e){ setLoading(false); emit('error:init'); });
|
|
1214
|
+
}catch(e){ setLoading(false); emit('error:exception'); }
|
|
1866
1215
|
return true;
|
|
1867
1216
|
}
|
|
1868
1217
|
var s=document.createElement('script'); s.src=${JSON.stringify(cdn)}; s.async=true;
|
|
1869
1218
|
s.onload=function(){ initMF(); };
|
|
1870
|
-
s.onerror=function(){ emit('error:load'); };
|
|
1219
|
+
s.onerror=function(){ setLoading(false); emit('error:load'); };
|
|
1871
1220
|
document.head.appendChild(s);
|
|
1872
1221
|
var tries=0, t=setInterval(function(){ if(initMF()||++tries>40){ clearInterval(t); } },150);
|
|
1873
1222
|
})();
|
|
@@ -1887,18 +1236,30 @@ var ReactNativePopupRenderer = class {
|
|
|
1887
1236
|
}
|
|
1888
1237
|
init() {
|
|
1889
1238
|
}
|
|
1890
|
-
show(surveyId, productId,
|
|
1239
|
+
show(surveyId, productId, actions, emit, onClose, env = "production", userId, style, sessionId, miniService, analyticsFeedbackSessionId, renderChrome) {
|
|
1891
1240
|
this.emitFn = emit;
|
|
1892
1241
|
this.onCloseFn = onClose;
|
|
1893
1242
|
this.currentSurveyId = surveyId;
|
|
1894
1243
|
this.partialEmitted = false;
|
|
1895
1244
|
const { profile, metadata } = buildSurveyIdentity(userId ?? null, sessionId ?? null, miniService ?? null, analyticsFeedbackSessionId ?? null);
|
|
1896
|
-
const html = buildSurveyHtml({
|
|
1245
|
+
const html = buildSurveyHtml({
|
|
1246
|
+
surveyId,
|
|
1247
|
+
productId,
|
|
1248
|
+
env,
|
|
1249
|
+
profile,
|
|
1250
|
+
metadata,
|
|
1251
|
+
font: style?.font,
|
|
1252
|
+
theme: style?.theme,
|
|
1253
|
+
position: style?.position,
|
|
1254
|
+
actions,
|
|
1255
|
+
// renderChrome:false (init) → HTML sin tarjeta/overlay: el host lo envuelve en su Modal.
|
|
1256
|
+
chrome: renderChrome
|
|
1257
|
+
});
|
|
1897
1258
|
if (this.options.onShow) {
|
|
1898
1259
|
this.options.onShow({ surveyId, productId, html });
|
|
1899
1260
|
} else {
|
|
1900
1261
|
sdkWarn(
|
|
1901
|
-
"[Deepdots] ReactNativePopupRenderer
|
|
1262
|
+
"[Deepdots] ReactNativePopupRenderer has no onShow: pass { onShow } to new ReactNativePopupRenderer({...}) to mount the survey WebView."
|
|
1902
1263
|
);
|
|
1903
1264
|
}
|
|
1904
1265
|
}
|
|
@@ -1983,7 +1344,7 @@ var BrowserPopupRenderer = class {
|
|
|
1983
1344
|
document.body.appendChild(this.container);
|
|
1984
1345
|
}
|
|
1985
1346
|
}
|
|
1986
|
-
show(surveyId, productId, actions, emit, onClose, env = "production", userId, style, sessionId, miniService, analyticsFeedbackSessionId) {
|
|
1347
|
+
show(surveyId, productId, actions, emit, onClose, env = "production", userId, style, sessionId, miniService, analyticsFeedbackSessionId, _renderChrome) {
|
|
1987
1348
|
if (this.visible) return;
|
|
1988
1349
|
if (!this.container || !document.body.contains(this.container)) this.init();
|
|
1989
1350
|
if (!this.container) return;
|
|
@@ -2016,7 +1377,7 @@ init_tracking_manager();
|
|
|
2016
1377
|
// src/analytics/analytics-manager.ts
|
|
2017
1378
|
function createDryRunSink(log = console.log) {
|
|
2018
1379
|
return (payload) => log(
|
|
2019
|
-
"[DeepdotsAnalytics] (dry-run \xB7
|
|
1380
|
+
"[DeepdotsAnalytics] (dry-run \xB7 NOT sent \xB7 no init.analytics) POST /sdk/feedback \u2192",
|
|
2020
1381
|
JSON.stringify(payload, null, 2)
|
|
2021
1382
|
);
|
|
2022
1383
|
}
|
|
@@ -2258,14 +1619,14 @@ function createFeedbackSink(options) {
|
|
|
2258
1619
|
if (final && options.sendBeaconImpl && small) {
|
|
2259
1620
|
const payload = typeof Blob !== "undefined" ? new Blob([json], { type: "application/json" }) : json;
|
|
2260
1621
|
if (options.sendBeaconImpl(url, payload)) {
|
|
2261
|
-
options.log?.("[DeepdotsAnalytics] flush
|
|
1622
|
+
options.log?.("[DeepdotsAnalytics] final flush via sendBeacon");
|
|
2262
1623
|
return;
|
|
2263
1624
|
}
|
|
2264
|
-
options.log?.("[DeepdotsAnalytics] sendBeacon
|
|
1625
|
+
options.log?.("[DeepdotsAnalytics] sendBeacon rejected the batch; falling back to fetch");
|
|
2265
1626
|
}
|
|
2266
1627
|
const f = options.fetchImpl ?? (typeof fetch !== "undefined" ? fetch : void 0);
|
|
2267
1628
|
if (!f) {
|
|
2268
|
-
options.log?.("[DeepdotsAnalytics] no fetch
|
|
1629
|
+
options.log?.("[DeepdotsAnalytics] no fetch available; payload not sent", body);
|
|
2269
1630
|
return;
|
|
2270
1631
|
}
|
|
2271
1632
|
const res = await f(url, {
|
|
@@ -2278,10 +1639,10 @@ function createFeedbackSink(options) {
|
|
|
2278
1639
|
if (!res.ok) {
|
|
2279
1640
|
const detail = await safeBodyText(res);
|
|
2280
1641
|
if (isRetryableStatus(res.status)) {
|
|
2281
|
-
throw new Error(`POST /sdk/feedback ${res.status} (
|
|
1642
|
+
throw new Error(`POST /sdk/feedback ${res.status} (retryable): ${detail}`);
|
|
2282
1643
|
}
|
|
2283
1644
|
options.log?.(
|
|
2284
|
-
`[DeepdotsAnalytics] POST /sdk/feedback
|
|
1645
|
+
`[DeepdotsAnalytics] POST /sdk/feedback rejected with ${res.status}; batch DISCARDED:`,
|
|
2285
1646
|
detail
|
|
2286
1647
|
);
|
|
2287
1648
|
return;
|
|
@@ -2291,7 +1652,7 @@ function createFeedbackSink(options) {
|
|
|
2291
1652
|
const data = await res.json();
|
|
2292
1653
|
if (data?.sessionId && data.sessionId !== feedbackSessionId) {
|
|
2293
1654
|
feedbackSessionId = data.sessionId;
|
|
2294
|
-
options.log?.("[DeepdotsAnalytics] feedbackSessionId
|
|
1655
|
+
options.log?.("[DeepdotsAnalytics] feedbackSessionId cached:", feedbackSessionId);
|
|
2295
1656
|
options.onSessionId?.(feedbackSessionId);
|
|
2296
1657
|
}
|
|
2297
1658
|
} catch {
|
|
@@ -2775,7 +2136,7 @@ var MessageGuard = class {
|
|
|
2775
2136
|
return {
|
|
2776
2137
|
emit: false,
|
|
2777
2138
|
reason: "invalid_channel",
|
|
2778
|
-
detail: `channel "${channel}"
|
|
2139
|
+
detail: `invalid channel "${channel}" (expected ${MESSAGE_CHANNELS.join(" | ")})`
|
|
2779
2140
|
};
|
|
2780
2141
|
}
|
|
2781
2142
|
const entry = this.seen.get(options.id);
|
|
@@ -2787,14 +2148,14 @@ var MessageGuard = class {
|
|
|
2787
2148
|
return {
|
|
2788
2149
|
emit: false,
|
|
2789
2150
|
reason: "channel_conflict",
|
|
2790
|
-
detail: `message_id "${options.id}"
|
|
2151
|
+
detail: `message_id "${options.id}" was already reported on channel "${entry.channel}"; discarding "${channel}"`
|
|
2791
2152
|
};
|
|
2792
2153
|
}
|
|
2793
2154
|
if (entry.stages.has(stage)) {
|
|
2794
2155
|
return {
|
|
2795
2156
|
emit: false,
|
|
2796
2157
|
reason: "duplicate_stage",
|
|
2797
|
-
detail: `stage "${stage}"
|
|
2158
|
+
detail: `stage "${stage}" was already sent for message_id "${options.id}"`
|
|
2798
2159
|
};
|
|
2799
2160
|
}
|
|
2800
2161
|
entry.stages.add(stage);
|
|
@@ -2844,6 +2205,8 @@ var DeepdotsPopups = class {
|
|
|
2844
2205
|
this.deferredExitTimers = [];
|
|
2845
2206
|
this.baseUrl = "";
|
|
2846
2207
|
this.env = "production";
|
|
2208
|
+
/** Si el SDK pinta el "modal" del popup (RN). Default true; false = el host lo envuelve. */
|
|
2209
|
+
this.renderChrome = true;
|
|
2847
2210
|
/** Identidad + sesión (Fase 1 tracking). Null hasta init(). */
|
|
2848
2211
|
this.tracking = null;
|
|
2849
2212
|
/** Capa de analytics (canal separado del feedback). Null hasta init(). */
|
|
@@ -2894,6 +2257,7 @@ var DeepdotsPopups = class {
|
|
|
2894
2257
|
const env = resolveEnvironment(config.nodeEnv);
|
|
2895
2258
|
this.baseUrl = env.apiBaseUrl;
|
|
2896
2259
|
this.env = config.nodeEnv || "production";
|
|
2260
|
+
this.renderChrome = config.renderChrome ?? true;
|
|
2897
2261
|
this.config = {
|
|
2898
2262
|
apiKey: config.apiKey || void 0,
|
|
2899
2263
|
debug: config.debug || false,
|
|
@@ -3079,6 +2443,22 @@ var DeepdotsPopups = class {
|
|
|
3079
2443
|
trackFunnelStep(funnel, step, taskId, params) {
|
|
3080
2444
|
this.track("deepdots_funnel_step", { funnel, step, task_id: taskId, ...params ?? {} });
|
|
3081
2445
|
}
|
|
2446
|
+
/**
|
|
2447
|
+
* Product Effectiveness: una interacción significativa del usuario (`interaction_type` es la
|
|
2448
|
+
* dimensión de agrupación, p. ej. `get_help`, `homepage`, `contact_support`).
|
|
2449
|
+
*
|
|
2450
|
+
* Existe como evento RESERVADO para que la convención no la invente cada host: un `track()`
|
|
2451
|
+
* custom acaba como `deepdots_event_…` y no lo cuenta la analítica de effectiveness.
|
|
2452
|
+
* Un `interactionType` vacío se descarta con warning (no aporta dato agrupable).
|
|
2453
|
+
*/
|
|
2454
|
+
trackMeaningfulInteraction(interactionType, params) {
|
|
2455
|
+
const type = typeof interactionType === "string" ? interactionType.trim() : "";
|
|
2456
|
+
if (!type) {
|
|
2457
|
+
console.warn("[DeepdotsPopups] trackMeaningfulInteraction discarded: empty interaction_type");
|
|
2458
|
+
return;
|
|
2459
|
+
}
|
|
2460
|
+
this.track("deepdots_meaningful_interaction", { interaction_type: type, ...params ?? {} });
|
|
2461
|
+
}
|
|
3082
2462
|
/**
|
|
3083
2463
|
* Messaging (#18–22): registra una etapa del funnel de una notificación (push/in-app).
|
|
3084
2464
|
* No-op si tracking off. El evento se descarta (con warning) si el `channel` no es válido,
|
|
@@ -3088,7 +2468,7 @@ var DeepdotsPopups = class {
|
|
|
3088
2468
|
trackMessage(stage, options) {
|
|
3089
2469
|
const verdict = this.messageGuard.evaluate(stage, options);
|
|
3090
2470
|
if (!verdict.emit) {
|
|
3091
|
-
console.warn(`[DeepdotsPopups] trackMessage
|
|
2471
|
+
console.warn(`[DeepdotsPopups] trackMessage discarded (${verdict.reason}): ${verdict.detail}`);
|
|
3092
2472
|
return;
|
|
3093
2473
|
}
|
|
3094
2474
|
this.track("deepdots_message", buildMessageParams(stage, options));
|
|
@@ -3679,7 +3059,8 @@ var DeepdotsPopups = class {
|
|
|
3679
3059
|
style,
|
|
3680
3060
|
sessionId,
|
|
3681
3061
|
miniService,
|
|
3682
|
-
analyticsFeedbackSessionId
|
|
3062
|
+
analyticsFeedbackSessionId,
|
|
3063
|
+
this.renderChrome
|
|
3683
3064
|
);
|
|
3684
3065
|
return;
|
|
3685
3066
|
}
|
|
@@ -3945,9 +3326,10 @@ function DeepdotsProvider({ config, children }) {
|
|
|
3945
3326
|
survey ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Modal, { visible: true, transparent: true, animationType: "slide", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
3946
3327
|
import_react_native_webview.WebView,
|
|
3947
3328
|
{
|
|
3329
|
+
style: { flex: 1 },
|
|
3948
3330
|
originWhitelist: ["*"],
|
|
3949
3331
|
javaScriptEnabled: true,
|
|
3950
|
-
source: { html: survey.html },
|
|
3332
|
+
source: { html: survey.html, baseUrl: "https://sdk.deepdots.com/" },
|
|
3951
3333
|
onMessage: (e) => rendererRef.current?.handleMessage(e.nativeEvent.data)
|
|
3952
3334
|
}
|
|
3953
3335
|
) }) }) : null
|