@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/index.js
CHANGED
|
@@ -181,6 +181,14 @@ var init_font = __esm({
|
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
|
|
184
|
+
// src/assets/style.css
|
|
185
|
+
var style_default;
|
|
186
|
+
var init_style = __esm({
|
|
187
|
+
"src/assets/style.css"() {
|
|
188
|
+
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}';
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
184
192
|
// src/util/logger.ts
|
|
185
193
|
function setLogger(logger) {
|
|
186
194
|
active = logger ?? console;
|
|
@@ -2127,876 +2135,6 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2127
2135
|
}
|
|
2128
2136
|
});
|
|
2129
2137
|
|
|
2130
|
-
// src/assets/style.css
|
|
2131
|
-
var style_default;
|
|
2132
|
-
var init_style = __esm({
|
|
2133
|
-
"src/assets/style.css"() {
|
|
2134
|
-
style_default = `.magicfeedback-container {
|
|
2135
|
-
width: 100%;
|
|
2136
|
-
}
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
.magicfeedback-success-message,
|
|
2140
|
-
.magicfeedback-info-message,
|
|
2141
|
-
.magicfeedback-start-message,
|
|
2142
|
-
.magicfeedback-container{
|
|
2143
|
-
animation-duration: 0.5s;
|
|
2144
|
-
animation-name: animate-fade;
|
|
2145
|
-
animation-delay: 0.25s;
|
|
2146
|
-
animation-fill-mode: backwards;
|
|
2147
|
-
|
|
2148
|
-
font-style: normal;
|
|
2149
|
-
text-align: justify;
|
|
2150
|
-
font-weight: 400;
|
|
2151
|
-
font-size: 1.2rem;
|
|
2152
|
-
color: #475569;
|
|
2153
|
-
line-height: 1.5;
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
@keyframes animate-fade {
|
|
2157
|
-
0% { opacity: 0; }
|
|
2158
|
-
100% { opacity: 1; }
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
.magicfeedback-form {
|
|
2162
|
-
display: flex;
|
|
2163
|
-
flex-direction: column;
|
|
2164
|
-
justify-content: flex-start;
|
|
2165
|
-
align-items: center;
|
|
2166
|
-
width: 100%;
|
|
2167
|
-
}
|
|
2168
|
-
.magicfeedback-questions {
|
|
2169
|
-
display: flex;
|
|
2170
|
-
flex-direction: column;
|
|
2171
|
-
justify-content: flex-start;
|
|
2172
|
-
align-items: flex-start;
|
|
2173
|
-
width: 100%;
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
.magicfeedback-div {
|
|
2177
|
-
display: flex;
|
|
2178
|
-
flex-direction: column;
|
|
2179
|
-
justify-content: flex-start;
|
|
2180
|
-
align-items: flex-start;
|
|
2181
|
-
margin-bottom: 10px;
|
|
2182
|
-
width: 100%;
|
|
2183
|
-
}
|
|
2184
|
-
|
|
2185
|
-
.magicfeedback-label {
|
|
2186
|
-
margin-bottom: 25px;
|
|
2187
|
-
margin-top: 20px;
|
|
2188
|
-
font-weight: 400;
|
|
2189
|
-
font-family: inherit;
|
|
2190
|
-
font-size: 1.2rem;
|
|
2191
|
-
color: #212529;
|
|
2192
|
-
text-align: start;
|
|
2193
|
-
word-wrap: break-word;
|
|
2194
|
-
white-space: normal;
|
|
2195
|
-
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
.magicfeedback-checkbox {
|
|
2199
|
-
display: flex;
|
|
2200
|
-
flex-direction: column;
|
|
2201
|
-
flex-wrap: wrap;
|
|
2202
|
-
width: 100%;
|
|
2203
|
-
}
|
|
2204
|
-
|
|
2205
|
-
.magicfeedback-checkbox-container {
|
|
2206
|
-
display: flex;
|
|
2207
|
-
flex-direction: row;
|
|
2208
|
-
justify-content: flex-start;
|
|
2209
|
-
align-items: center;
|
|
2210
|
-
margin-bottom: 5px;
|
|
2211
|
-
margin-top: 5px;
|
|
2212
|
-
}
|
|
2213
|
-
|
|
2214
|
-
.magicfeedback-radio {
|
|
2215
|
-
display: flex;
|
|
2216
|
-
flex-direction: column;
|
|
2217
|
-
justify-content: flex-start;
|
|
2218
|
-
flex-wrap: wrap;
|
|
2219
|
-
width: 100%;
|
|
2220
|
-
margin-right: 5px;
|
|
2221
|
-
padding: 5px;
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
.magicfeedback-checkbox-container,
|
|
2225
|
-
.magicfeedback-radio-container {
|
|
2226
|
-
display: flex;
|
|
2227
|
-
flex-direction: row;
|
|
2228
|
-
justify-content: flex-start;
|
|
2229
|
-
align-items: center;
|
|
2230
|
-
margin: 5px;
|
|
2231
|
-
padding: 5px 0;
|
|
2232
|
-
background-color: #fff;
|
|
2233
|
-
border-radius: 5px;
|
|
2234
|
-
box-shadow: 0 0 3px #ccc;
|
|
2235
|
-
}
|
|
2236
|
-
|
|
2237
|
-
.deepdots-popup input::-webkit-outer-spin-button,
|
|
2238
|
-
.deepdots-popup input::-webkit-inner-spin-button {
|
|
2239
|
-
-webkit-appearance: none;
|
|
2240
|
-
-moz-appearance: textfield;
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
.magicfeedback-checkbox input[type="checkbox"] {
|
|
2244
|
-
margin-right: 5px;
|
|
2245
|
-
margin-left: 5px;
|
|
2246
|
-
width: 20px;
|
|
2247
|
-
height: 20px;
|
|
2248
|
-
cursor: pointer;
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
.magicfeedback-checkbox label,
|
|
2253
|
-
.magicfeedback-radio-container label {
|
|
2254
|
-
margin-left: 5px;
|
|
2255
|
-
font-weight: 400;
|
|
2256
|
-
font-family: inherit;
|
|
2257
|
-
font-size: 16px;
|
|
2258
|
-
color: #212529;
|
|
2259
|
-
text-align: start;
|
|
2260
|
-
width: 100%;
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
.deepdots-popup p {
|
|
2264
|
-
margin-bottom: 0px;
|
|
2265
|
-
font-size: 12px;
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
.deepdots-popup h2 {
|
|
2269
|
-
line-height: 1.66;
|
|
2270
|
-
margin: 0;
|
|
2271
|
-
padding: 0;
|
|
2272
|
-
font-weight: 900;
|
|
2273
|
-
color: #222;
|
|
2274
|
-
font-family: var(--deepdots-font, 'Montserrat');
|
|
2275
|
-
font-size: 18px;
|
|
2276
|
-
text-transform: uppercase;
|
|
2277
|
-
text-align: center;
|
|
2278
|
-
margin-bottom: 40px;
|
|
2279
|
-
}
|
|
2280
|
-
|
|
2281
|
-
/* Los controles de formulario no heredan font-family por defecto: cuando hay
|
|
2282
|
-
fuente custom (clase deepdots-has-font), los forzamos a usar la del contenedor. */
|
|
2283
|
-
.deepdots-popup.deepdots-has-font button,
|
|
2284
|
-
.deepdots-popup.deepdots-has-font input,
|
|
2285
|
-
.deepdots-popup.deepdots-has-font textarea,
|
|
2286
|
-
.deepdots-popup.deepdots-has-font select {
|
|
2287
|
-
font-family: var(--deepdots-font, inherit);
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
.deepdots-popup h6 {
|
|
2291
|
-
margin-bottom: 1rem;
|
|
2292
|
-
}
|
|
2293
|
-
|
|
2294
|
-
.deepdots-popup input[type="date"],
|
|
2295
|
-
.deepdots-popup input[type="text"],
|
|
2296
|
-
.deepdots-popup input[type="number"],
|
|
2297
|
-
.deepdots-popup input[type="email"],
|
|
2298
|
-
.deepdots-popup input[type="password"],
|
|
2299
|
-
.deepdots-popup textarea,
|
|
2300
|
-
.deepdots-popup select {
|
|
2301
|
-
box-sizing: border-box;
|
|
2302
|
-
padding: 10px;
|
|
2303
|
-
margin: 10px 0;
|
|
2304
|
-
width: 100%;
|
|
2305
|
-
border: 2px solid #ccc; /* Default border color - you can customize this */
|
|
2306
|
-
border-radius: 5px;
|
|
2307
|
-
font-size: 18px;
|
|
2308
|
-
outline: none;
|
|
2309
|
-
transition: border-color 0.3s ease;
|
|
2310
|
-
min-height: 50px;
|
|
2311
|
-
font-family: inherit;
|
|
2312
|
-
-webkit-appearance: none;
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
.deepdots-popup select {
|
|
2316
|
-
background-image: linear-gradient(45deg, transparent 50%, gray 50%),
|
|
2317
|
-
linear-gradient(135deg, gray 50%, transparent 50%),
|
|
2318
|
-
linear-gradient(to right, #ccc, #ccc);
|
|
2319
|
-
background-position: calc(100% - 20px) calc(1em + 2px),
|
|
2320
|
-
calc(100% - 15px) calc(1em + 2px),
|
|
2321
|
-
calc(100% - 2.5em) 0.5em;
|
|
2322
|
-
background-size: 5px 5px,
|
|
2323
|
-
5px 5px,
|
|
2324
|
-
1px 1.5em;
|
|
2325
|
-
background-repeat: no-repeat;
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
|
-
.magicfeedback-boolean-container {
|
|
2329
|
-
display: flex;
|
|
2330
|
-
flex-direction: row;
|
|
2331
|
-
justify-content: flex-start;
|
|
2332
|
-
align-items: center;
|
|
2333
|
-
margin: 10px 0;
|
|
2334
|
-
width: 100%;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
.magicfeedback-boolean-container label {
|
|
2338
|
-
margin-left: 10px;
|
|
2339
|
-
font-weight: 400;
|
|
2340
|
-
font-size: 16px;
|
|
2341
|
-
width: 100%;
|
|
2342
|
-
padding-top: 5px;
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
.magicfeedback-boolean-option {
|
|
2346
|
-
margin-right: 10px;
|
|
2347
|
-
margin-left: 10px;
|
|
2348
|
-
width: 100%;
|
|
2349
|
-
height: 38px;
|
|
2350
|
-
border-radius: 8px;
|
|
2351
|
-
font-size: 16px;
|
|
2352
|
-
cursor: pointer;
|
|
2353
|
-
border: 1px solid #ced4da !important;
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
|
-
.magicfeedback-boolean-option label {
|
|
2357
|
-
font-weight: 400;
|
|
2358
|
-
font-size: 16px;
|
|
2359
|
-
color: #475569;
|
|
2360
|
-
cursor: pointer;
|
|
2361
|
-
width: 100%;
|
|
2362
|
-
height: 100%;
|
|
2363
|
-
display: flex;
|
|
2364
|
-
justify-content: center;
|
|
2365
|
-
align-items: center;
|
|
2366
|
-
border-radius: inherit;
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
.magicfeedback-boolean-option input[type=radio] + label:hover {
|
|
2370
|
-
color: #007bff;
|
|
2371
|
-
}
|
|
2372
|
-
|
|
2373
|
-
.magicfeedback-boolean-option input[type=radio]:checked + label {
|
|
2374
|
-
color: #007bff;
|
|
2375
|
-
background-color: #cadff8;
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
|
-
.deepdots-popup input[type="radio"] {
|
|
2379
|
-
padding: 20px;
|
|
2380
|
-
margin: 10px 0 10px 15px;
|
|
2381
|
-
width: 40px;
|
|
2382
|
-
background-color: #fff;
|
|
2383
|
-
box-shadow: none;
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
/* Style for focused input/select */
|
|
2387
|
-
.deepdots-popup input:focus, .deepdots-popup select:focus {
|
|
2388
|
-
border-color: #4CAF50; /* Highlight color when focused - you can customize this */
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
|
-
/* Style for invalid input (example: validation error) */
|
|
2392
|
-
.deepdots-popup input.error, .deepdots-popup select.error {
|
|
2393
|
-
border-color: #ff3333; /* Red color for error state - you can customize this */
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
.magicfeedback-action-container {
|
|
2397
|
-
display: flex;
|
|
2398
|
-
flex-direction: row;
|
|
2399
|
-
justify-content: space-between;
|
|
2400
|
-
align-items: center;
|
|
2401
|
-
margin-top: 10px;
|
|
2402
|
-
width: 100%;
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
.magicfeedback-action-container .magicfeedback-submit {
|
|
2406
|
-
cursor: pointer;
|
|
2407
|
-
padding: 10px;
|
|
2408
|
-
margin: 10px 0;
|
|
2409
|
-
width: 100px;
|
|
2410
|
-
border-radius: 8px;
|
|
2411
|
-
font-size: 16px;
|
|
2412
|
-
outline: none;
|
|
2413
|
-
transition: border-color 0.3s ease;
|
|
2414
|
-
background-color: #1E293B;
|
|
2415
|
-
color: white;
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
.magicfeedback-action-container .magicfeedback-back {
|
|
2419
|
-
cursor: pointer;
|
|
2420
|
-
padding: 10px;
|
|
2421
|
-
margin: 10px 0;
|
|
2422
|
-
width: 100px;
|
|
2423
|
-
border: 0;
|
|
2424
|
-
border-radius: 8px;
|
|
2425
|
-
font-size: 16px;
|
|
2426
|
-
outline: none;
|
|
2427
|
-
transition: border-color 0.3s ease;
|
|
2428
|
-
background-color: transparent;
|
|
2429
|
-
color: #212529;
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
/* Rating styles */
|
|
2435
|
-
.magicfeedback-rating {
|
|
2436
|
-
width: 100%;
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
.magicfeedback-rating-container {
|
|
2440
|
-
display: flex;
|
|
2441
|
-
flex-direction: row;
|
|
2442
|
-
justify-content: space-around;
|
|
2443
|
-
flex-wrap: wrap;
|
|
2444
|
-
align-items: center;
|
|
2445
|
-
|
|
2446
|
-
margin: 15px 5px;
|
|
2447
|
-
padding: 0;
|
|
2448
|
-
|
|
2449
|
-
list-style: none;
|
|
2450
|
-
font-size: 1.5rem;
|
|
2451
|
-
cursor: pointer;
|
|
2452
|
-
user-select: none;
|
|
2453
|
-
-webkit-user-select: none;
|
|
2454
|
-
-moz-user-select: none;
|
|
2455
|
-
-ms-user-select: none;
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
.magicfeedback-rating-placeholder-value,
|
|
2459
|
-
.magicfeedback-rating-placeholder{
|
|
2460
|
-
text-align: center;
|
|
2461
|
-
align-content: center;
|
|
2462
|
-
justify-content: center;
|
|
2463
|
-
text-wrap: wrap;
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
.magicfeedback-rating-option {
|
|
2467
|
-
margin: 0 0.5rem;
|
|
2468
|
-
padding: 0;
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
@media (max-width: 1024px) {
|
|
2472
|
-
.magicfeedback-rating-option {
|
|
2473
|
-
margin: 10px 0;
|
|
2474
|
-
padding: 0;
|
|
2475
|
-
width: 20%;
|
|
2476
|
-
display: flex;
|
|
2477
|
-
justify-content: center;
|
|
2478
|
-
}
|
|
2479
|
-
|
|
2480
|
-
.magicfeedback-rating-placeholder-value {
|
|
2481
|
-
font-size: 0.75rem;
|
|
2482
|
-
margin-bottom: 1px;
|
|
2483
|
-
}
|
|
2484
|
-
.magicfeedback-rating-placeholder{
|
|
2485
|
-
justify-content: center;
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
.magicfeedback-rating-container {
|
|
2489
|
-
flex-wrap: wrap;
|
|
2490
|
-
justify-content: flex-start;
|
|
2491
|
-
}
|
|
2492
|
-
}
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
.magicfeedback-rating-option-label-container {
|
|
2496
|
-
display: flex;
|
|
2497
|
-
flex-direction: column;
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
.magicfeedback-rating-option-label-container label {
|
|
2502
|
-
display: inline-block;
|
|
2503
|
-
text-align: center;
|
|
2504
|
-
margin-bottom: 0;
|
|
2505
|
-
font-weight: 600;
|
|
2506
|
-
font-size: 18px;
|
|
2507
|
-
color: #475569;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
.magicfeedback-rating-option-label-container input[type=radio] {
|
|
2511
|
-
position: absolute;
|
|
2512
|
-
opacity: 0;
|
|
2513
|
-
width: 0;
|
|
2514
|
-
height: 0;
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
|
-
/* IMAGE STYLES */
|
|
2518
|
-
.magicfeedback-rating-option-label-container input[type=radio] + img {
|
|
2519
|
-
cursor: pointer;
|
|
2520
|
-
height: 48px;
|
|
2521
|
-
width: 48px;
|
|
2522
|
-
}
|
|
2523
|
-
|
|
2524
|
-
/* LABEL STYLES */
|
|
2525
|
-
.magicfeedback-rating-option-label-container input[type=radio] + label {
|
|
2526
|
-
cursor: pointer;
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
|
-
/* CHECKED STYLES */
|
|
2530
|
-
.magicfeedback-rating-option-label-container input[type=radio]:checked + img {
|
|
2531
|
-
box-shadow: #007bff 0px 1px 4px, #007BFFA0 0px 0px 0px 2px;
|
|
2532
|
-
border-radius: 50%;
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
.magicfeedback-rating-number {
|
|
2536
|
-
width: 100%;
|
|
2537
|
-
}
|
|
2538
|
-
.magicfeedback-rating-container,
|
|
2539
|
-
.magicfeedback-rating-number-container {
|
|
2540
|
-
display: flex;
|
|
2541
|
-
flex-direction: row;
|
|
2542
|
-
justify-content: space-between;
|
|
2543
|
-
align-items: center;
|
|
2544
|
-
|
|
2545
|
-
margin: 15px 0;
|
|
2546
|
-
padding: 0;
|
|
2547
|
-
|
|
2548
|
-
list-style: none;
|
|
2549
|
-
font-size: 1.5rem;
|
|
2550
|
-
cursor: pointer;
|
|
2551
|
-
user-select: none;
|
|
2552
|
-
-webkit-user-select: none;
|
|
2553
|
-
-moz-user-select: none;
|
|
2554
|
-
-ms-user-select: none;
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
|
-
/* Cuando hay placeholders (Very bad / Very good), el placeholder ocupa
|
|
2558
|
-
el 100% de la primera l\xEDnea y los boxes bajan a la siguiente */
|
|
2559
|
-
.magicfeedback-rating-number-container--with-placeholder {
|
|
2560
|
-
flex-wrap: wrap;
|
|
2561
|
-
align-items: flex-start;
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
.magicfeedback-rating-number-container--with-placeholder .magicfeedback-rating-placeholder {
|
|
2565
|
-
width: 100%;
|
|
2566
|
-
margin-bottom: 8px;
|
|
2567
|
-
}
|
|
2568
|
-
|
|
2569
|
-
.magicfeedback-rating-number-container--with-placeholder .magicfeedback-rating-number-option {
|
|
2570
|
-
width: auto;
|
|
2571
|
-
flex: 1;
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
.magicfeedback-rating-number-option {
|
|
2575
|
-
display: flex;
|
|
2576
|
-
flex-direction: row;
|
|
2577
|
-
justify-content: flex-start;
|
|
2578
|
-
align-items: center;
|
|
2579
|
-
margin: 5px;
|
|
2580
|
-
padding: 0;
|
|
2581
|
-
list-style: none;
|
|
2582
|
-
font-size: 1.5rem;
|
|
2583
|
-
cursor: pointer;
|
|
2584
|
-
user-select: none;
|
|
2585
|
-
-webkit-user-select: none;
|
|
2586
|
-
-moz-user-select: none;
|
|
2587
|
-
-ms-user-select: none;
|
|
2588
|
-
width: 100%;
|
|
2589
|
-
}
|
|
2590
|
-
|
|
2591
|
-
.magicfeedback-rating-number-option-row{
|
|
2592
|
-
max-width: 100% !important;
|
|
2593
|
-
}
|
|
2594
|
-
|
|
2595
|
-
.magicfeedback-rating-number-top-placeholder,
|
|
2596
|
-
.magicfeedback-rating-number-bottom-placeholder{
|
|
2597
|
-
text-align: center !important;
|
|
2598
|
-
align-content: center;
|
|
2599
|
-
justify-content: center;
|
|
2600
|
-
text-wrap: wrap;
|
|
2601
|
-
|
|
2602
|
-
font-size: 15px;
|
|
2603
|
-
color: #475569;
|
|
2604
|
-
|
|
2605
|
-
width: 100%;
|
|
2606
|
-
margin: auto;
|
|
2607
|
-
}
|
|
2608
|
-
|
|
2609
|
-
@media (min-width: 650px) {
|
|
2610
|
-
.magicfeedback-rating-number-option-row +.magicfeedback-rating-number-container-ltr:first-child,
|
|
2611
|
-
.magicfeedback-rating-number-option-row + +.magicfeedback-rating-number-container-rtl:last-child {
|
|
2612
|
-
margin-left: 0;
|
|
2613
|
-
width: calc(100% - 10px);
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
.magicfeedback-rating-number-option-row +.magicfeedback-rating-number-container-rtl:first-child,
|
|
2617
|
-
.magicfeedback-rating-number-option-row + +.magicfeedback-rating-number-container-ltr:last-child {
|
|
2618
|
-
margin-right: 0;
|
|
2619
|
-
width: calc(100% - 10px);
|
|
2620
|
-
}
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
.magicfeedback-rating-number-option-label-container {
|
|
2625
|
-
display: flex;
|
|
2626
|
-
flex-direction: column;
|
|
2627
|
-
align-items: center;
|
|
2628
|
-
justify-content: center;
|
|
2629
|
-
width: 100%;
|
|
2630
|
-
height: 100%;
|
|
2631
|
-
}
|
|
2632
|
-
|
|
2633
|
-
.magicfeedback-rating-number-option-label-container label {
|
|
2634
|
-
display: flex;
|
|
2635
|
-
align-items: center;
|
|
2636
|
-
justify-content: center;
|
|
2637
|
-
white-space: nowrap;
|
|
2638
|
-
overflow: hidden;
|
|
2639
|
-
text-overflow: ellipsis;
|
|
2640
|
-
margin: 0 10px;
|
|
2641
|
-
font-weight: 600;
|
|
2642
|
-
font-size: 14px;
|
|
2643
|
-
color: #475569;
|
|
2644
|
-
cursor: pointer;
|
|
2645
|
-
width: 100%;
|
|
2646
|
-
height: 100%;
|
|
2647
|
-
min-height: 50px;
|
|
2648
|
-
text-align: center;
|
|
2649
|
-
padding: 0;
|
|
2650
|
-
border-radius: 4px;
|
|
2651
|
-
border: 1px solid #ced4da;
|
|
2652
|
-
background-color: rgba(246, 246, 246, 0.3);
|
|
2653
|
-
transition: background-color 0.15s ease-in-out;
|
|
2654
|
-
}
|
|
2655
|
-
|
|
2656
|
-
.magicfeedback-rating-number-option-label-container input[type=radio] {
|
|
2657
|
-
position: absolute;
|
|
2658
|
-
opacity: 0;
|
|
2659
|
-
width: 0;
|
|
2660
|
-
height: 0;
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
.magicfeedback-rating-number-option-label-container input[type=radio] + label {
|
|
2664
|
-
cursor: pointer;
|
|
2665
|
-
}
|
|
2666
|
-
|
|
2667
|
-
.magicfeedback-rating-number-option-label-container input[type=radio] + label:hover,
|
|
2668
|
-
.magicfeedback-rating-number-option-label-container input[type=radio]:checked + label {
|
|
2669
|
-
color: #007bff;
|
|
2670
|
-
border: 1px solid #007bff;
|
|
2671
|
-
background-color: rgba(86, 168, 253, 0.29);
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
.magicfeedback-rating-number-container-column{
|
|
2675
|
-
align-items: flex-start !important;
|
|
2676
|
-
}
|
|
2677
|
-
|
|
2678
|
-
@media (max-width: 650px) {
|
|
2679
|
-
.magicfeedback-rating-number-container-ltr {
|
|
2680
|
-
justify-content: center;
|
|
2681
|
-
flex-wrap: wrap;
|
|
2682
|
-
}
|
|
2683
|
-
|
|
2684
|
-
.magicfeedback-rating-number-container-rtl {
|
|
2685
|
-
justify-content: center;
|
|
2686
|
-
flex-wrap: wrap-reverse;
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
.magicfeedback-rating-number-option {
|
|
2690
|
-
max-width: 100%;
|
|
2691
|
-
height: 55px;
|
|
2692
|
-
margin: 5px 0;
|
|
2693
|
-
}
|
|
2694
|
-
}
|
|
2695
|
-
|
|
2696
|
-
.magicfeedback-rating-star {
|
|
2697
|
-
width: 100%;
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
.magicfeedback-rating-star-container {
|
|
2701
|
-
display: flex !important;
|
|
2702
|
-
flex-direction: row !important;
|
|
2703
|
-
justify-content: center !important;
|
|
2704
|
-
align-items: center !important;
|
|
2705
|
-
flex-wrap: wrap;
|
|
2706
|
-
margin: 15px 5px;
|
|
2707
|
-
padding: 0;
|
|
2708
|
-
list-style: none;
|
|
2709
|
-
font-size: 1.5rem;
|
|
2710
|
-
cursor: pointer;
|
|
2711
|
-
user-select: none;
|
|
2712
|
-
-webkit-user-select: none;
|
|
2713
|
-
-moz-user-select: none;
|
|
2714
|
-
-ms-user-select: none;
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
|
-
.magicfeedback-rating-star-option:not(:checked) > .rating__star {
|
|
2718
|
-
float: right;
|
|
2719
|
-
width: 1em;
|
|
2720
|
-
overflow: hidden;
|
|
2721
|
-
white-space: nowrap;
|
|
2722
|
-
cursor: pointer;
|
|
2723
|
-
font-size: 30px;
|
|
2724
|
-
color: #ccc;
|
|
2725
|
-
margin: 0 10px;
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover,
|
|
2729
|
-
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover ~ span {
|
|
2730
|
-
color: #deb217 !important;
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
.magicfeedback-rating-star-selected {
|
|
2734
|
-
color: #ffc700 !important;
|
|
2735
|
-
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
/* Style for multiple choice image */
|
|
2739
|
-
.magicfeedback-image-option-label-container:hover {
|
|
2740
|
-
cursor: pointer;
|
|
2741
|
-
border: 0 !important;
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
.magicfeedback-image-option-label-container input[type=radio]:checked + img,
|
|
2745
|
-
.magicfeedback-image-option-label-container input[type=checkbox]:checked + img {
|
|
2746
|
-
border: 1px solid #007bff !important;
|
|
2747
|
-
box-shadow: 0 0 3px #007bff !important;
|
|
2748
|
-
}
|
|
2749
|
-
|
|
2750
|
-
.magicfeedback-image-option-label-container input[type=radio] + img,
|
|
2751
|
-
.magicfeedback-image-option-label-container input[type=checkbox] + img {
|
|
2752
|
-
border: 1px solid transparent !important;
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
.magicfeedback-image-option-label-container{
|
|
2756
|
-
margin: 10px !important;
|
|
2757
|
-
height: calc(100% - 20px) !important;
|
|
2758
|
-
width: calc(100% - 20px) !important;
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
.magicfeedback-multiple-choice-image-option {
|
|
2762
|
-
display: flex;
|
|
2763
|
-
height: auto !important;
|
|
2764
|
-
box-shadow: 0 0 3px #ccc;
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
.magicfeedback-multiple-choice-image-label {
|
|
2768
|
-
font-size: 1rem;
|
|
2769
|
-
}
|
|
2770
|
-
|
|
2771
|
-
.magicfeedback-consent-container {
|
|
2772
|
-
display: flex;
|
|
2773
|
-
flex-direction: row;
|
|
2774
|
-
justify-content: flex-start;
|
|
2775
|
-
align-items: center;
|
|
2776
|
-
margin: 10px 0;
|
|
2777
|
-
width: 100%;
|
|
2778
|
-
}
|
|
2779
|
-
|
|
2780
|
-
.magicfeedback-consent-container label {
|
|
2781
|
-
margin-left: 10px;
|
|
2782
|
-
}
|
|
2783
|
-
|
|
2784
|
-
.magicfeedback-start-message-container {
|
|
2785
|
-
/* ... add your start message container styles here ... */
|
|
2786
|
-
}
|
|
2787
|
-
|
|
2788
|
-
.magicfeedback-success-message,
|
|
2789
|
-
.magicfeedback-info-message,
|
|
2790
|
-
.magicfeedback-start-message {
|
|
2791
|
-
margin: 35px 5px;
|
|
2792
|
-
}
|
|
2793
|
-
|
|
2794
|
-
.magicfeedback-success-message p,
|
|
2795
|
-
.magicfeedback-info-message p,
|
|
2796
|
-
.magicfeedback-start-message p {
|
|
2797
|
-
font-style: normal;
|
|
2798
|
-
text-align: start;
|
|
2799
|
-
font-weight: 400;
|
|
2800
|
-
font-size: 16px;
|
|
2801
|
-
color: #475569;
|
|
2802
|
-
line-height: 1.5;
|
|
2803
|
-
}
|
|
2804
|
-
|
|
2805
|
-
.magicfeedback-success-message img,
|
|
2806
|
-
.magicfeedback-info-message img,
|
|
2807
|
-
.magicfeedback-start-message img {
|
|
2808
|
-
width: 400px;
|
|
2809
|
-
max-width: 80%;
|
|
2810
|
-
height: auto;
|
|
2811
|
-
margin: 10px auto;
|
|
2812
|
-
}
|
|
2813
|
-
|
|
2814
|
-
.magicfeedback-counter,
|
|
2815
|
-
.magicfeedback-point-system-total {
|
|
2816
|
-
margin: 10px 0 0 0 !important;
|
|
2817
|
-
display: flex !important;
|
|
2818
|
-
justify-content: right !important;
|
|
2819
|
-
align-items: center !important;
|
|
2820
|
-
width: 100%;
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
.magicfeedback-skip-container {
|
|
2824
|
-
background-color: transparent !important;
|
|
2825
|
-
border: 0 !important;
|
|
2826
|
-
color: #999999FF !important;
|
|
2827
|
-
padding: 0 !important;
|
|
2828
|
-
margin: 0 !important;
|
|
2829
|
-
cursor: pointer !important;
|
|
2830
|
-
font-size: 0.5em !important;
|
|
2831
|
-
font-weight: 400 !important;
|
|
2832
|
-
box-shadow: 0 0 0 !important;
|
|
2833
|
-
|
|
2834
|
-
&:hover {
|
|
2835
|
-
color: #0066ff;
|
|
2836
|
-
}
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2839
|
-
.magicfeedback-skip-container input[type=checkbox] {
|
|
2840
|
-
border-color: #999999FF !important;
|
|
2841
|
-
border: 0 !important;
|
|
2842
|
-
cursor: pointer !important;
|
|
2843
|
-
|
|
2844
|
-
}
|
|
2845
|
-
|
|
2846
|
-
.magicfeedback-multi-question-matrix,
|
|
2847
|
-
.magicfeedback-point-system,
|
|
2848
|
-
.magicfeedback-priority-list {
|
|
2849
|
-
width: 100% !important;
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
.magicfeedback-multi-question-matrix-container,
|
|
2853
|
-
.magicfeedback-point-system-container,
|
|
2854
|
-
.magicfeedback-priority-list-container {
|
|
2855
|
-
width: 100% !important;
|
|
2856
|
-
overflow-x: auto;
|
|
2857
|
-
}
|
|
2858
|
-
|
|
2859
|
-
.magicfeedback-point-system-list,
|
|
2860
|
-
.magicfeedback-priority-list-list,
|
|
2861
|
-
.magicfeedback-multi-question-matrix-table {
|
|
2862
|
-
width: 100% !important;
|
|
2863
|
-
padding: 0 !important;
|
|
2864
|
-
overflow-x: auto;
|
|
2865
|
-
}
|
|
2866
|
-
|
|
2867
|
-
.magicfeedback-multi-question-matrix {
|
|
2868
|
-
position: relative !important;
|
|
2869
|
-
}
|
|
2870
|
-
|
|
2871
|
-
.magicfeedback-multi-question-matrix-container {
|
|
2872
|
-
overflow: auto !important;
|
|
2873
|
-
padding-bottom: 10px;
|
|
2874
|
-
}
|
|
2875
|
-
|
|
2876
|
-
.magicfeedback-multi-question-matrix-label{
|
|
2877
|
-
text-align: left !important;
|
|
2878
|
-
}
|
|
2879
|
-
.magicfeedback-priority-list-item {
|
|
2880
|
-
display: flex;
|
|
2881
|
-
flex-direction: row;
|
|
2882
|
-
justify-content: space-between;
|
|
2883
|
-
align-items: center;
|
|
2884
|
-
padding: 10px 0 10px 10px;
|
|
2885
|
-
|
|
2886
|
-
border: 1px solid #ced4da;
|
|
2887
|
-
border-radius: 5px;
|
|
2888
|
-
margin: 10px 0 !important;
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
|
-
.magicfeedback-point-system-item {
|
|
2892
|
-
height: 45px;
|
|
2893
|
-
margin: 5px 0 !important;
|
|
2894
|
-
}
|
|
2895
|
-
|
|
2896
|
-
.magicfeedback-point-system-item label,
|
|
2897
|
-
.magicfeedback-priority-list-item-label {
|
|
2898
|
-
font-family: inherit;
|
|
2899
|
-
font-size: 18px !important;
|
|
2900
|
-
color: #212529;
|
|
2901
|
-
text-align: start;
|
|
2902
|
-
word-wrap: break-word;
|
|
2903
|
-
white-space: normal;
|
|
2904
|
-
padding: 0 10px 0 0;
|
|
2905
|
-
}
|
|
2906
|
-
|
|
2907
|
-
.magicfeedback-point-system-input-container {
|
|
2908
|
-
padding: 0 10px 0 0;
|
|
2909
|
-
border-radius: 5px;
|
|
2910
|
-
font-size: 14px;
|
|
2911
|
-
border: 1px solid #ced4da;
|
|
2912
|
-
height: 42px;
|
|
2913
|
-
margin: auto 0;
|
|
2914
|
-
}
|
|
2915
|
-
|
|
2916
|
-
.magicfeedback-multi-question-matrix-table thead {
|
|
2917
|
-
margin-bottom: 20px;
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
|
-
.magicfeedback-multi-question-matrix-table th{
|
|
2921
|
-
text-align: center;
|
|
2922
|
-
font-weight: 400 !important;
|
|
2923
|
-
font-size: 1rem !important;
|
|
2924
|
-
padding: 0 10px !important;
|
|
2925
|
-
}
|
|
2926
|
-
|
|
2927
|
-
.magicfeedback-multi-question-matrix-table th,
|
|
2928
|
-
.magicfeedback-multi-question-matrix-table td label,
|
|
2929
|
-
.magicfeedback-priority-list-arrow-up,
|
|
2930
|
-
.magicfeedback-priority-list-arrow-down {
|
|
2931
|
-
font-style: normal !important;
|
|
2932
|
-
font-weight: 400 !important;
|
|
2933
|
-
font-size: 1rem !important;
|
|
2934
|
-
color: #475569 !important;
|
|
2935
|
-
cursor: pointer !important;
|
|
2936
|
-
margin: 0 !important;
|
|
2937
|
-
line-height: inherit;
|
|
2938
|
-
}
|
|
2939
|
-
|
|
2940
|
-
.magicfeedback-multi-question-matrix-table tr {
|
|
2941
|
-
align-items: center;
|
|
2942
|
-
margin: 5px 0;
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
.magicfeedback-multi-question-matrix-row-tr{
|
|
2946
|
-
border-radius: 5px;
|
|
2947
|
-
margin: 10px 0 !important;
|
|
2948
|
-
}
|
|
2949
|
-
|
|
2950
|
-
.magicfeedback-multi-question-matrix-row-tr:nth-child(odd) {
|
|
2951
|
-
background-color: #f1f6f6; /* Light gray background for odd rows */
|
|
2952
|
-
}
|
|
2953
|
-
|
|
2954
|
-
.magicfeedback-multi-question-matrix-row-tr:nth-child(even) {
|
|
2955
|
-
background-color: #ffffff; /* White background for even rows */
|
|
2956
|
-
}
|
|
2957
|
-
|
|
2958
|
-
.magicfeedback-multi-question-matrix-row-label {
|
|
2959
|
-
text-align: left !important;
|
|
2960
|
-
}
|
|
2961
|
-
|
|
2962
|
-
.magicfeedback-point-system-item span {
|
|
2963
|
-
color: #475569 !important;
|
|
2964
|
-
}
|
|
2965
|
-
|
|
2966
|
-
.magicfeedback-point-system-item input {
|
|
2967
|
-
padding: 0;
|
|
2968
|
-
margin: 0 !important;
|
|
2969
|
-
width: auto !important;
|
|
2970
|
-
min-width: 100px !important;
|
|
2971
|
-
height: auto !important;
|
|
2972
|
-
min-height: 42px;
|
|
2973
|
-
cursor: pointer;
|
|
2974
|
-
font-size: 14px;
|
|
2975
|
-
text-align: center !important;
|
|
2976
|
-
}
|
|
2977
|
-
|
|
2978
|
-
.magicfeedback-multi-question-matrix-table input {
|
|
2979
|
-
margin: auto !important;
|
|
2980
|
-
padding: 20px !important;
|
|
2981
|
-
width: 100% !important;
|
|
2982
|
-
height: 15px;
|
|
2983
|
-
border: 1px solid #ced4da;
|
|
2984
|
-
cursor: pointer;
|
|
2985
|
-
}
|
|
2986
|
-
|
|
2987
|
-
.magicfeedback-image{
|
|
2988
|
-
max-height: 400px !important;
|
|
2989
|
-
height: auto !important;
|
|
2990
|
-
max-width: 100% !important;
|
|
2991
|
-
margin: 10px auto !important;
|
|
2992
|
-
}
|
|
2993
|
-
|
|
2994
|
-
.magicfeedback-error{
|
|
2995
|
-
margin-top: 5px;
|
|
2996
|
-
}`;
|
|
2997
|
-
}
|
|
2998
|
-
});
|
|
2999
|
-
|
|
3000
2138
|
// src/ui/renderPopup.ts
|
|
3001
2139
|
var renderPopup_exports = {};
|
|
3002
2140
|
__export(renderPopup_exports, {
|
|
@@ -3404,7 +2542,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
3404
2542
|
};
|
|
3405
2543
|
generateOptions.onLoadedEvent = ({ formData }) => {
|
|
3406
2544
|
try {
|
|
3407
|
-
} catch
|
|
2545
|
+
} catch {
|
|
3408
2546
|
}
|
|
3409
2547
|
const s = formData?.style;
|
|
3410
2548
|
if (s && !stylesInjected) {
|
|
@@ -3582,6 +2720,10 @@ var POPUP_TRIGGER_CONDITION_STATUSES = [
|
|
|
3582
2720
|
];
|
|
3583
2721
|
|
|
3584
2722
|
// src/triggers/index.ts
|
|
2723
|
+
function toNumericValue(value, fallback) {
|
|
2724
|
+
const n = Number(value);
|
|
2725
|
+
return Number.isFinite(n) ? n : fallback;
|
|
2726
|
+
}
|
|
3585
2727
|
function setupTrigger(popups, trigger) {
|
|
3586
2728
|
switch (trigger.type) {
|
|
3587
2729
|
case "time":
|
|
@@ -3602,14 +2744,14 @@ function setupTrigger(popups, trigger) {
|
|
|
3602
2744
|
}
|
|
3603
2745
|
}
|
|
3604
2746
|
function setupTimeTrigger(popups, trigger) {
|
|
3605
|
-
const delay = trigger.value
|
|
2747
|
+
const delay = toNumericValue(trigger.value, 5e3);
|
|
3606
2748
|
setTimeout(() => {
|
|
3607
2749
|
popups.triggerSurvey(trigger.surveyId, trigger.popupId);
|
|
3608
2750
|
}, delay);
|
|
3609
2751
|
popups.debug(`Time trigger set for ${delay}ms`);
|
|
3610
2752
|
}
|
|
3611
2753
|
function setupScrollTrigger(popups, trigger) {
|
|
3612
|
-
const threshold = trigger.value
|
|
2754
|
+
const threshold = toNumericValue(trigger.value, 50);
|
|
3613
2755
|
const handler = () => {
|
|
3614
2756
|
const scrollPercentage = window.scrollY / (document.documentElement.scrollHeight - window.innerHeight) * 100;
|
|
3615
2757
|
if (scrollPercentage >= threshold) {
|
|
@@ -3763,6 +2905,16 @@ init_tracking_manager();
|
|
|
3763
2905
|
|
|
3764
2906
|
// src/ui/surveyHtml.ts
|
|
3765
2907
|
init_font();
|
|
2908
|
+
init_style();
|
|
2909
|
+
var POSITION_MAP = {
|
|
2910
|
+
center: { justifyContent: "center", alignItems: "center", padding: "0", background: "rgba(0,0,0,0.5)" },
|
|
2911
|
+
bottom: { justifyContent: "center", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
2912
|
+
"bottom-right": { justifyContent: "flex-end", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
2913
|
+
"bottom-left": { justifyContent: "flex-start", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
2914
|
+
top: { justifyContent: "center", alignItems: "flex-start", padding: "16px", background: "transparent" },
|
|
2915
|
+
"top-right": { justifyContent: "flex-end", alignItems: "flex-start", padding: "16px", background: "transparent" },
|
|
2916
|
+
"top-left": { justifyContent: "flex-start", alignItems: "flex-start", padding: "16px", background: "transparent" }
|
|
2917
|
+
};
|
|
3766
2918
|
function buildSurveyHtml(opts) {
|
|
3767
2919
|
const env = opts.env === "development" ? "dev" : "prod";
|
|
3768
2920
|
const version = opts.version ?? "2.2.4";
|
|
@@ -3773,17 +2925,152 @@ function buildSurveyHtml(opts) {
|
|
|
3773
2925
|
const metaJson = JSON.stringify(opts.metadata ?? []);
|
|
3774
2926
|
const fontFaceCss = opts.font ? buildFontFaceCss(opts.font.family, opts.font.url) : "";
|
|
3775
2927
|
const fontFamilyValue = opts.font ? buildFontFamilyValue(opts.font.family) : "-apple-system,system-ui,sans-serif";
|
|
2928
|
+
const popupClass = opts.font?.family ? "deepdots-popup deepdots-has-font" : "deepdots-popup";
|
|
2929
|
+
const isDark = opts.theme === "dark";
|
|
2930
|
+
const popupBg = isDark ? "#1e1e1e" : "#fff";
|
|
2931
|
+
const colorScheme = isDark ? "dark" : "light";
|
|
2932
|
+
const textPrimary = isDark ? "#f0f0f0" : "#111";
|
|
2933
|
+
const pos = POSITION_MAP[opts.position ?? "center"] ?? POSITION_MAP.center;
|
|
2934
|
+
const chrome = opts.chrome !== false;
|
|
2935
|
+
const bodyBg = chrome ? pos.background : "transparent";
|
|
2936
|
+
const bodyPadding = chrome ? pos.padding : "0";
|
|
2937
|
+
const bodyDisplay = chrome ? "flex" : "block";
|
|
2938
|
+
const cardBg = chrome ? popupBg : "transparent";
|
|
2939
|
+
const cardShadow = chrome ? "0 4px 6px rgba(0,0,0,0.1)" : "none";
|
|
2940
|
+
const cardRadius = chrome ? "8px" : "0";
|
|
2941
|
+
const cardMaxWidth = chrome ? "600px" : "none";
|
|
2942
|
+
const cardWidth = chrome ? "90%" : "100%";
|
|
2943
|
+
const cardMinHeight = chrome ? "200px" : "0";
|
|
2944
|
+
const backLabel = JSON.stringify(opts.actions?.back?.label ?? "Back");
|
|
2945
|
+
const startLabel = JSON.stringify(opts.actions?.start?.label ?? "Start survey");
|
|
2946
|
+
const completeLabel = JSON.stringify(opts.actions?.complete?.label ?? "Complete survey");
|
|
2947
|
+
const submitLabel = JSON.stringify(opts.actions?.accept?.label ?? "Send");
|
|
3776
2948
|
return `<!DOCTYPE html><html><head>
|
|
3777
2949
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
3778
|
-
<meta name="color-scheme" content="
|
|
3779
|
-
<style
|
|
2950
|
+
<meta name="color-scheme" content="${colorScheme}"/>
|
|
2951
|
+
<style>
|
|
2952
|
+
${style_default}
|
|
2953
|
+
${fontFaceCss}
|
|
2954
|
+
html,body{margin:0;padding:0;height:100%;font-family:${fontFamilyValue}}
|
|
2955
|
+
body{display:${bodyDisplay};justify-content:${pos.justifyContent};align-items:${pos.alignItems};background:${bodyBg};padding:${bodyPadding};box-sizing:border-box}
|
|
2956
|
+
.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}
|
|
2957
|
+
.deepdots-popup-header{display:flex;justify-content:flex-end;align-items:center;width:100%}
|
|
2958
|
+
#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}
|
|
2959
|
+
.deepdots-popup-container-content{display:flex;flex-direction:column;padding:0 20px 12px 20px;max-height:80vh;overflow:hidden;box-sizing:border-box}
|
|
2960
|
+
.deepdots-popup-main{display:flex;flex-direction:column;width:100%;max-height:80vh;overflow-y:auto;overflow-x:hidden;position:relative}
|
|
2961
|
+
#dd-form-wrapper{width:100%;flex:1 1 auto}
|
|
2962
|
+
#mf{width:100%;box-sizing:border-box;visibility:hidden}
|
|
2963
|
+
.deepdots-popup-main *{max-width:100%;box-sizing:border-box}
|
|
2964
|
+
#dd-logo{max-height:40px;max-width:100%;object-fit:contain}
|
|
2965
|
+
.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}
|
|
2966
|
+
.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}
|
|
2967
|
+
.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}
|
|
2968
|
+
#dd-back{background:transparent;color:#333;border:1px solid #999}
|
|
2969
|
+
#dd-start,#dd-complete,#dd-submit{background:#1E293B;color:#fff;border:none}
|
|
2970
|
+
#dd-submit:disabled,#dd-start:disabled,#dd-back:disabled,#dd-complete:disabled{opacity:0.6;cursor:not-allowed}
|
|
2971
|
+
.mf-spinner{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
|
|
2972
|
+
.mf-spinner-circle{width:28px;height:28px;border:3px solid #e0e6ed;border-top-color:#1E293B;border-radius:50%;animation:ddspin 0.9s linear infinite}
|
|
2973
|
+
@keyframes ddspin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
|
|
2974
|
+
@media (max-width:640px){
|
|
2975
|
+
.deepdots-popup{width:calc(100% - 24px);max-width:calc(100% - 24px);border-radius:12px}
|
|
2976
|
+
.deepdots-popup-footer{flex-direction:column-reverse;gap:12px}
|
|
2977
|
+
.dd-nav-btn{width:100%}
|
|
2978
|
+
.magicfeedback-checkbox-container,.magicfeedback-radio-container{margin:4px 0;padding:4px 8px}
|
|
2979
|
+
.magicfeedback-checkbox label,.magicfeedback-radio-container label{font-size:15px}
|
|
2980
|
+
.deepdots-popup input[type="radio"]{margin:6px 0 6px 8px}
|
|
2981
|
+
.deepdots-popup input[type="checkbox"]{width:16px;height:16px}
|
|
2982
|
+
}
|
|
2983
|
+
</style>
|
|
3780
2984
|
</head><body>
|
|
3781
|
-
<div id="
|
|
2985
|
+
<div class="${popupClass}" id="dd-popup">
|
|
2986
|
+
<div class="deepdots-popup-header">
|
|
2987
|
+
<button type="button" id="dd-close" aria-label="Close popup">
|
|
2988
|
+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2989
|
+
<path d="M6 6L18 18M6 18L18 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2990
|
+
</svg>
|
|
2991
|
+
</button>
|
|
2992
|
+
</div>
|
|
2993
|
+
<div class="deepdots-popup-container-content">
|
|
2994
|
+
<div class="deepdots-popup-main" id="dd-main">
|
|
2995
|
+
<div id="dd-form-wrapper">
|
|
2996
|
+
<div class="mf-spinner" id="dd-spinner" role="status" aria-label="Loading survey"><div class="mf-spinner-circle"></div></div>
|
|
2997
|
+
<div id="mf"></div>
|
|
2998
|
+
</div>
|
|
2999
|
+
<div class="deepdots-error-hint" id="dd-error" role="alert" aria-live="polite"></div>
|
|
3000
|
+
<div class="deepdots-popup-footer" id="dd-footer">
|
|
3001
|
+
<button type="button" class="dd-nav-btn" id="dd-submit">Send</button>
|
|
3002
|
+
<button type="button" class="dd-nav-btn" id="dd-back">Back</button>
|
|
3003
|
+
<button type="button" class="dd-nav-btn" id="dd-complete">Complete survey</button>
|
|
3004
|
+
<button type="button" class="dd-nav-btn" id="dd-start">Start survey</button>
|
|
3005
|
+
</div>
|
|
3006
|
+
</div>
|
|
3007
|
+
</div>
|
|
3008
|
+
</div>
|
|
3782
3009
|
<script>
|
|
3783
3010
|
(function(){
|
|
3784
3011
|
function emit(s){ try{ if(window.ReactNativeWebView){ window.ReactNativeWebView.postMessage(s); } }catch(e){} }
|
|
3785
3012
|
function emitJSON(n,p){ try{ emit(JSON.stringify({name:n,payload:p||{}})); }catch(e){} }
|
|
3786
3013
|
window.DeepdotsClose = function(){ emitJSON('popup_close'); };
|
|
3014
|
+
var chromeOn=${chrome ? "true" : "false"};
|
|
3015
|
+
|
|
3016
|
+
var popup=document.getElementById('dd-popup');
|
|
3017
|
+
var main=document.getElementById('dd-main');
|
|
3018
|
+
var footer=document.getElementById('dd-footer');
|
|
3019
|
+
var spinner=document.getElementById('dd-spinner');
|
|
3020
|
+
var formHost=document.getElementById('mf');
|
|
3021
|
+
var errorHint=document.getElementById('dd-error');
|
|
3022
|
+
var backBtn=document.getElementById('dd-back');
|
|
3023
|
+
var startBtn=document.getElementById('dd-start');
|
|
3024
|
+
var completeBtn=document.getElementById('dd-complete');
|
|
3025
|
+
var submitBtn=document.getElementById('dd-submit');
|
|
3026
|
+
|
|
3027
|
+
backBtn.textContent=${backLabel};
|
|
3028
|
+
startBtn.textContent=${startLabel};
|
|
3029
|
+
completeBtn.textContent=${completeLabel};
|
|
3030
|
+
submitBtn.textContent=${submitLabel};
|
|
3031
|
+
|
|
3032
|
+
document.getElementById('dd-close').onclick=function(){ emitJSON('popup_close'); };
|
|
3033
|
+
backBtn.onclick=function(){ if(window.DeepdotsForm && window.DeepdotsForm.back){ window.DeepdotsForm.back(); } };
|
|
3034
|
+
startBtn.onclick=function(){ if(window.DeepdotsForm && window.DeepdotsForm.startForm){ window.DeepdotsForm.startForm(); } };
|
|
3035
|
+
completeBtn.onclick=function(){ emitJSON('popup_close'); };
|
|
3036
|
+
var surveyCompletedEmitted=false;
|
|
3037
|
+
submitBtn.onclick=function(){
|
|
3038
|
+
if(surveyCompletedEmitted) return;
|
|
3039
|
+
if(window.DeepdotsForm && window.DeepdotsForm.send){ window.DeepdotsForm.send(); }
|
|
3040
|
+
};
|
|
3041
|
+
|
|
3042
|
+
function updateButtons(state){
|
|
3043
|
+
backBtn.style.display='none';
|
|
3044
|
+
startBtn.style.display='none';
|
|
3045
|
+
submitBtn.style.display='none';
|
|
3046
|
+
completeBtn.style.display='none';
|
|
3047
|
+
backBtn.style.width='';
|
|
3048
|
+
startBtn.style.width='';
|
|
3049
|
+
submitBtn.style.width='';
|
|
3050
|
+
completeBtn.style.width='';
|
|
3051
|
+
if(state==='start'){
|
|
3052
|
+
startBtn.style.display='inline-flex';
|
|
3053
|
+
startBtn.style.width='100%';
|
|
3054
|
+
} else if(state==='in_progress_first'){
|
|
3055
|
+
submitBtn.style.display='inline-flex';
|
|
3056
|
+
} else if(state==='in_progress_next'){
|
|
3057
|
+
backBtn.style.display='inline-flex';
|
|
3058
|
+
submitBtn.style.display='inline-flex';
|
|
3059
|
+
} else if(state==='completed'){
|
|
3060
|
+
completeBtn.style.display='inline-flex';
|
|
3061
|
+
completeBtn.style.width='100%';
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
function setLoading(isLoading){
|
|
3066
|
+
spinner.style.display=isLoading?'flex':'none';
|
|
3067
|
+
if(!isLoading){ formHost.style.visibility='visible'; }
|
|
3068
|
+
footer.style.display=isLoading?'none':'flex';
|
|
3069
|
+
backBtn.disabled=isLoading; startBtn.disabled=isLoading; completeBtn.disabled=isLoading; submitBtn.disabled=isLoading;
|
|
3070
|
+
if(isLoading){ updateButtons(null); }
|
|
3071
|
+
}
|
|
3072
|
+
setLoading(true);
|
|
3073
|
+
|
|
3787
3074
|
var initialized=false;
|
|
3788
3075
|
function initMF(){
|
|
3789
3076
|
if(initialized || !window.magicfeedback) return initialized;
|
|
@@ -3792,23 +3079,85 @@ function buildSurveyHtml(opts) {
|
|
|
3792
3079
|
window.magicfeedback.init({ debug:false, env:'${env}' });
|
|
3793
3080
|
var form = window.magicfeedback.form(${sid}, ${pid}, ${profileJson}, ${metaJson});
|
|
3794
3081
|
window.DeepdotsForm = form;
|
|
3082
|
+
var stylesInjected=false;
|
|
3795
3083
|
form.generate('mf', {
|
|
3796
3084
|
addButton:false,
|
|
3797
3085
|
getMetaData:true,
|
|
3798
|
-
onLoadedEvent:function(){
|
|
3799
|
-
|
|
3086
|
+
onLoadedEvent:function(args){
|
|
3087
|
+
var s=args && args.formData ? args.formData.style : null;
|
|
3088
|
+
if(s && !stylesInjected){
|
|
3089
|
+
stylesInjected=true;
|
|
3090
|
+
if(chromeOn && s.boxBackgroundColor){ popup.style.background=s.boxBackgroundColor; }
|
|
3091
|
+
if(s.contentAlign){ main.style.justifyContent = s.contentAlign==='center' ? 'center' : 'flex-start'; }
|
|
3092
|
+
if(s.buttonPrimaryColor){
|
|
3093
|
+
submitBtn.style.background=s.buttonPrimaryColor; submitBtn.style.border='none'; submitBtn.style.color='#fff';
|
|
3094
|
+
startBtn.style.background=s.buttonPrimaryColor; startBtn.style.border='none'; startBtn.style.color='#fff';
|
|
3095
|
+
completeBtn.style.background=s.buttonPrimaryColor; completeBtn.style.border='none'; completeBtn.style.color='#fff';
|
|
3096
|
+
}
|
|
3097
|
+
if(s.buttonSecondaryColor){
|
|
3098
|
+
backBtn.style.background='#fff'; backBtn.style.color=s.buttonSecondaryColor; backBtn.style.border='1px solid '+s.buttonSecondaryColor;
|
|
3099
|
+
}
|
|
3100
|
+
if(s.logo && !document.getElementById('dd-logo')){
|
|
3101
|
+
var logoImg=document.createElement('img');
|
|
3102
|
+
logoImg.id='dd-logo'; logoImg.src=s.logo; logoImg.alt='Logo';
|
|
3103
|
+
if(s.logoSize==='small'){ logoImg.style.maxHeight='30px'; }
|
|
3104
|
+
else if(s.logoSize==='medium'){ logoImg.style.maxHeight='50px'; }
|
|
3105
|
+
else if(s.logoSize==='large'){ logoImg.style.maxHeight='70px'; }
|
|
3106
|
+
if(s.logoPosition==='left'){ logoImg.style.margin='0 16px 20px 0'; logoImg.style.display='block'; logoImg.style.marginLeft='0'; }
|
|
3107
|
+
else if(s.logoPosition==='right'){ logoImg.style.margin='0 0 20px 16px'; logoImg.style.display='block'; logoImg.style.marginLeft='auto'; }
|
|
3108
|
+
else if(s.logoPosition==='center'){ logoImg.style.margin='0 auto 20px auto'; logoImg.style.display='block'; }
|
|
3109
|
+
main.insertBefore(logoImg, document.getElementById('dd-form-wrapper'));
|
|
3110
|
+
}
|
|
3111
|
+
if(s.startMessage && s.startMessage!==''){ updateButtons('start'); }
|
|
3112
|
+
else { updateButtons('in_progress_first'); }
|
|
3113
|
+
} else {
|
|
3114
|
+
updateButtons('in_progress_first');
|
|
3115
|
+
}
|
|
3116
|
+
emitJSON('loaded');
|
|
3117
|
+
setLoading(false);
|
|
3118
|
+
},
|
|
3119
|
+
beforeSubmitEvent:function(){
|
|
3120
|
+
setLoading(true);
|
|
3121
|
+
emitJSON('before_submit');
|
|
3122
|
+
},
|
|
3800
3123
|
afterSubmitEvent:function(p){
|
|
3801
|
-
|
|
3802
|
-
|
|
3124
|
+
var error=p && p.error ? (typeof p.error==='string' ? p.error : String(p.error)) : '';
|
|
3125
|
+
if(error){
|
|
3126
|
+
setLoading(false);
|
|
3127
|
+
if(error.toLowerCase().indexOf('no response')!==-1){
|
|
3128
|
+
errorHint.textContent='Please answer the required question to continue.';
|
|
3129
|
+
errorHint.style.display='block';
|
|
3130
|
+
updateButtons('in_progress_next');
|
|
3131
|
+
return;
|
|
3132
|
+
}
|
|
3133
|
+
errorHint.textContent='An error occurred while submitting. Please try again or close the popup.';
|
|
3134
|
+
errorHint.style.display='block';
|
|
3135
|
+
return;
|
|
3136
|
+
}
|
|
3137
|
+
errorHint.style.display='none';
|
|
3138
|
+
setLoading(false);
|
|
3139
|
+
if(p && p.completed){
|
|
3140
|
+
surveyCompletedEmitted=true;
|
|
3141
|
+
updateButtons('completed');
|
|
3142
|
+
emitJSON('survey_completed', p);
|
|
3143
|
+
return;
|
|
3144
|
+
}
|
|
3145
|
+
if(p && p.total>1 && p.progress>0 && p.progress<p.total){ updateButtons('in_progress_next'); }
|
|
3146
|
+
else { updateButtons('in_progress_first'); }
|
|
3147
|
+
emitJSON('after_submit', p);
|
|
3803
3148
|
},
|
|
3804
|
-
onBackEvent:function(p){
|
|
3805
|
-
|
|
3806
|
-
|
|
3149
|
+
onBackEvent:function(p){
|
|
3150
|
+
if(p && p.progress===0){ updateButtons('in_progress_first'); }
|
|
3151
|
+
else { updateButtons('in_progress_next'); }
|
|
3152
|
+
emitJSON('back', p);
|
|
3153
|
+
}
|
|
3154
|
+
}).catch(function(e){ setLoading(false); emit('error:init'); });
|
|
3155
|
+
}catch(e){ setLoading(false); emit('error:exception'); }
|
|
3807
3156
|
return true;
|
|
3808
3157
|
}
|
|
3809
3158
|
var s=document.createElement('script'); s.src=${JSON.stringify(cdn)}; s.async=true;
|
|
3810
3159
|
s.onload=function(){ initMF(); };
|
|
3811
|
-
s.onerror=function(){ emit('error:load'); };
|
|
3160
|
+
s.onerror=function(){ setLoading(false); emit('error:load'); };
|
|
3812
3161
|
document.head.appendChild(s);
|
|
3813
3162
|
var tries=0, t=setInterval(function(){ if(initMF()||++tries>40){ clearInterval(t); } },150);
|
|
3814
3163
|
})();
|
|
@@ -3828,18 +3177,30 @@ var ReactNativePopupRenderer = class {
|
|
|
3828
3177
|
}
|
|
3829
3178
|
init() {
|
|
3830
3179
|
}
|
|
3831
|
-
show(surveyId, productId,
|
|
3180
|
+
show(surveyId, productId, actions, emit, onClose, env = "production", userId, style, sessionId, miniService, analyticsFeedbackSessionId, renderChrome) {
|
|
3832
3181
|
this.emitFn = emit;
|
|
3833
3182
|
this.onCloseFn = onClose;
|
|
3834
3183
|
this.currentSurveyId = surveyId;
|
|
3835
3184
|
this.partialEmitted = false;
|
|
3836
3185
|
const { profile, metadata } = buildSurveyIdentity(userId ?? null, sessionId ?? null, miniService ?? null, analyticsFeedbackSessionId ?? null);
|
|
3837
|
-
const html = buildSurveyHtml({
|
|
3186
|
+
const html = buildSurveyHtml({
|
|
3187
|
+
surveyId,
|
|
3188
|
+
productId,
|
|
3189
|
+
env,
|
|
3190
|
+
profile,
|
|
3191
|
+
metadata,
|
|
3192
|
+
font: style?.font,
|
|
3193
|
+
theme: style?.theme,
|
|
3194
|
+
position: style?.position,
|
|
3195
|
+
actions,
|
|
3196
|
+
// renderChrome:false (init) → HTML sin tarjeta/overlay: el host lo envuelve en su Modal.
|
|
3197
|
+
chrome: renderChrome
|
|
3198
|
+
});
|
|
3838
3199
|
if (this.options.onShow) {
|
|
3839
3200
|
this.options.onShow({ surveyId, productId, html });
|
|
3840
3201
|
} else {
|
|
3841
3202
|
sdkWarn(
|
|
3842
|
-
"[Deepdots] ReactNativePopupRenderer
|
|
3203
|
+
"[Deepdots] ReactNativePopupRenderer has no onShow: pass { onShow } to new ReactNativePopupRenderer({...}) to mount the survey WebView."
|
|
3843
3204
|
);
|
|
3844
3205
|
}
|
|
3845
3206
|
}
|
|
@@ -3924,7 +3285,7 @@ var BrowserPopupRenderer = class {
|
|
|
3924
3285
|
document.body.appendChild(this.container);
|
|
3925
3286
|
}
|
|
3926
3287
|
}
|
|
3927
|
-
show(surveyId, productId, actions, emit, onClose, env = "production", userId, style, sessionId, miniService, analyticsFeedbackSessionId) {
|
|
3288
|
+
show(surveyId, productId, actions, emit, onClose, env = "production", userId, style, sessionId, miniService, analyticsFeedbackSessionId, _renderChrome) {
|
|
3928
3289
|
if (this.visible) return;
|
|
3929
3290
|
if (!this.container || !document.body.contains(this.container)) this.init();
|
|
3930
3291
|
if (!this.container) return;
|
|
@@ -3957,7 +3318,7 @@ init_tracking_manager();
|
|
|
3957
3318
|
// src/analytics/analytics-manager.ts
|
|
3958
3319
|
function createDryRunSink(log = console.log) {
|
|
3959
3320
|
return (payload) => log(
|
|
3960
|
-
"[DeepdotsAnalytics] (dry-run \xB7
|
|
3321
|
+
"[DeepdotsAnalytics] (dry-run \xB7 NOT sent \xB7 no init.analytics) POST /sdk/feedback \u2192",
|
|
3961
3322
|
JSON.stringify(payload, null, 2)
|
|
3962
3323
|
);
|
|
3963
3324
|
}
|
|
@@ -4199,14 +3560,14 @@ function createFeedbackSink(options) {
|
|
|
4199
3560
|
if (final && options.sendBeaconImpl && small) {
|
|
4200
3561
|
const payload = typeof Blob !== "undefined" ? new Blob([json], { type: "application/json" }) : json;
|
|
4201
3562
|
if (options.sendBeaconImpl(url, payload)) {
|
|
4202
|
-
options.log?.("[DeepdotsAnalytics] flush
|
|
3563
|
+
options.log?.("[DeepdotsAnalytics] final flush via sendBeacon");
|
|
4203
3564
|
return;
|
|
4204
3565
|
}
|
|
4205
|
-
options.log?.("[DeepdotsAnalytics] sendBeacon
|
|
3566
|
+
options.log?.("[DeepdotsAnalytics] sendBeacon rejected the batch; falling back to fetch");
|
|
4206
3567
|
}
|
|
4207
3568
|
const f = options.fetchImpl ?? (typeof fetch !== "undefined" ? fetch : void 0);
|
|
4208
3569
|
if (!f) {
|
|
4209
|
-
options.log?.("[DeepdotsAnalytics] no fetch
|
|
3570
|
+
options.log?.("[DeepdotsAnalytics] no fetch available; payload not sent", body);
|
|
4210
3571
|
return;
|
|
4211
3572
|
}
|
|
4212
3573
|
const res = await f(url, {
|
|
@@ -4219,10 +3580,10 @@ function createFeedbackSink(options) {
|
|
|
4219
3580
|
if (!res.ok) {
|
|
4220
3581
|
const detail = await safeBodyText(res);
|
|
4221
3582
|
if (isRetryableStatus(res.status)) {
|
|
4222
|
-
throw new Error(`POST /sdk/feedback ${res.status} (
|
|
3583
|
+
throw new Error(`POST /sdk/feedback ${res.status} (retryable): ${detail}`);
|
|
4223
3584
|
}
|
|
4224
3585
|
options.log?.(
|
|
4225
|
-
`[DeepdotsAnalytics] POST /sdk/feedback
|
|
3586
|
+
`[DeepdotsAnalytics] POST /sdk/feedback rejected with ${res.status}; batch DISCARDED:`,
|
|
4226
3587
|
detail
|
|
4227
3588
|
);
|
|
4228
3589
|
return;
|
|
@@ -4232,7 +3593,7 @@ function createFeedbackSink(options) {
|
|
|
4232
3593
|
const data = await res.json();
|
|
4233
3594
|
if (data?.sessionId && data.sessionId !== feedbackSessionId) {
|
|
4234
3595
|
feedbackSessionId = data.sessionId;
|
|
4235
|
-
options.log?.("[DeepdotsAnalytics] feedbackSessionId
|
|
3596
|
+
options.log?.("[DeepdotsAnalytics] feedbackSessionId cached:", feedbackSessionId);
|
|
4236
3597
|
options.onSessionId?.(feedbackSessionId);
|
|
4237
3598
|
}
|
|
4238
3599
|
} catch {
|
|
@@ -4716,7 +4077,7 @@ var MessageGuard = class {
|
|
|
4716
4077
|
return {
|
|
4717
4078
|
emit: false,
|
|
4718
4079
|
reason: "invalid_channel",
|
|
4719
|
-
detail: `channel "${channel}"
|
|
4080
|
+
detail: `invalid channel "${channel}" (expected ${MESSAGE_CHANNELS.join(" | ")})`
|
|
4720
4081
|
};
|
|
4721
4082
|
}
|
|
4722
4083
|
const entry = this.seen.get(options.id);
|
|
@@ -4728,14 +4089,14 @@ var MessageGuard = class {
|
|
|
4728
4089
|
return {
|
|
4729
4090
|
emit: false,
|
|
4730
4091
|
reason: "channel_conflict",
|
|
4731
|
-
detail: `message_id "${options.id}"
|
|
4092
|
+
detail: `message_id "${options.id}" was already reported on channel "${entry.channel}"; discarding "${channel}"`
|
|
4732
4093
|
};
|
|
4733
4094
|
}
|
|
4734
4095
|
if (entry.stages.has(stage)) {
|
|
4735
4096
|
return {
|
|
4736
4097
|
emit: false,
|
|
4737
4098
|
reason: "duplicate_stage",
|
|
4738
|
-
detail: `stage "${stage}"
|
|
4099
|
+
detail: `stage "${stage}" was already sent for message_id "${options.id}"`
|
|
4739
4100
|
};
|
|
4740
4101
|
}
|
|
4741
4102
|
entry.stages.add(stage);
|
|
@@ -4785,6 +4146,8 @@ var DeepdotsPopups = class {
|
|
|
4785
4146
|
this.deferredExitTimers = [];
|
|
4786
4147
|
this.baseUrl = "";
|
|
4787
4148
|
this.env = "production";
|
|
4149
|
+
/** Si el SDK pinta el "modal" del popup (RN). Default true; false = el host lo envuelve. */
|
|
4150
|
+
this.renderChrome = true;
|
|
4788
4151
|
/** Identidad + sesión (Fase 1 tracking). Null hasta init(). */
|
|
4789
4152
|
this.tracking = null;
|
|
4790
4153
|
/** Capa de analytics (canal separado del feedback). Null hasta init(). */
|
|
@@ -4835,6 +4198,7 @@ var DeepdotsPopups = class {
|
|
|
4835
4198
|
const env = resolveEnvironment(config.nodeEnv);
|
|
4836
4199
|
this.baseUrl = env.apiBaseUrl;
|
|
4837
4200
|
this.env = config.nodeEnv || "production";
|
|
4201
|
+
this.renderChrome = config.renderChrome ?? true;
|
|
4838
4202
|
this.config = {
|
|
4839
4203
|
apiKey: config.apiKey || void 0,
|
|
4840
4204
|
debug: config.debug || false,
|
|
@@ -5020,6 +4384,22 @@ var DeepdotsPopups = class {
|
|
|
5020
4384
|
trackFunnelStep(funnel, step, taskId, params) {
|
|
5021
4385
|
this.track("deepdots_funnel_step", { funnel, step, task_id: taskId, ...params ?? {} });
|
|
5022
4386
|
}
|
|
4387
|
+
/**
|
|
4388
|
+
* Product Effectiveness: una interacción significativa del usuario (`interaction_type` es la
|
|
4389
|
+
* dimensión de agrupación, p. ej. `get_help`, `homepage`, `contact_support`).
|
|
4390
|
+
*
|
|
4391
|
+
* Existe como evento RESERVADO para que la convención no la invente cada host: un `track()`
|
|
4392
|
+
* custom acaba como `deepdots_event_…` y no lo cuenta la analítica de effectiveness.
|
|
4393
|
+
* Un `interactionType` vacío se descarta con warning (no aporta dato agrupable).
|
|
4394
|
+
*/
|
|
4395
|
+
trackMeaningfulInteraction(interactionType, params) {
|
|
4396
|
+
const type = typeof interactionType === "string" ? interactionType.trim() : "";
|
|
4397
|
+
if (!type) {
|
|
4398
|
+
console.warn("[DeepdotsPopups] trackMeaningfulInteraction discarded: empty interaction_type");
|
|
4399
|
+
return;
|
|
4400
|
+
}
|
|
4401
|
+
this.track("deepdots_meaningful_interaction", { interaction_type: type, ...params ?? {} });
|
|
4402
|
+
}
|
|
5023
4403
|
/**
|
|
5024
4404
|
* Messaging (#18–22): registra una etapa del funnel de una notificación (push/in-app).
|
|
5025
4405
|
* No-op si tracking off. El evento se descarta (con warning) si el `channel` no es válido,
|
|
@@ -5029,7 +4409,7 @@ var DeepdotsPopups = class {
|
|
|
5029
4409
|
trackMessage(stage, options) {
|
|
5030
4410
|
const verdict = this.messageGuard.evaluate(stage, options);
|
|
5031
4411
|
if (!verdict.emit) {
|
|
5032
|
-
console.warn(`[DeepdotsPopups] trackMessage
|
|
4412
|
+
console.warn(`[DeepdotsPopups] trackMessage discarded (${verdict.reason}): ${verdict.detail}`);
|
|
5033
4413
|
return;
|
|
5034
4414
|
}
|
|
5035
4415
|
this.track("deepdots_message", buildMessageParams(stage, options));
|
|
@@ -5620,7 +5000,8 @@ var DeepdotsPopups = class {
|
|
|
5620
5000
|
style,
|
|
5621
5001
|
sessionId,
|
|
5622
5002
|
miniService,
|
|
5623
|
-
analyticsFeedbackSessionId
|
|
5003
|
+
analyticsFeedbackSessionId,
|
|
5004
|
+
this.renderChrome
|
|
5624
5005
|
);
|
|
5625
5006
|
return;
|
|
5626
5007
|
}
|