@magicfeedback/popup-sdk 1.4.0 → 1.5.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.
@@ -171,6 +171,20 @@ interface DeepdotsInitParams {
171
171
  * close). Ver `ReactNativePopupRenderer`.
172
172
  */
173
173
  renderChrome?: boolean;
174
+ /**
175
+ * Barra de progreso ("Question X of Y" + barra) en la cabecera del popup. Si se omite,
176
+ * manda el `showProgressBar` que la plataforma configura en el estilo del survey; `true` o
177
+ * `false` lo fuerzan desde el host. Solo se pinta con más de una página, fuera de la
178
+ * pantalla de inicio y antes de completar, igual que en la web de surveys.
179
+ */
180
+ showProgressBar?: boolean;
181
+ /**
182
+ * CSS propio del host, inyectado como último bloque de estilos del popup: gana en cascada
183
+ * sobre el del SDK y sobre el de `@magicfeedback/native` sin tener que tocar ninguno. Es la
184
+ * vía para reestilar el área de preguntas (enunciados, opciones, escalas) por integración,
185
+ * en vez de cambiar los defaults que comparten todos los clientes.
186
+ */
187
+ surveyCss?: string;
174
188
  }
175
189
  /**
176
190
  * Options for configuring survey triggers
@@ -248,11 +262,26 @@ interface PopupStyle {
248
262
  font?: PopupFont;
249
263
  }
250
264
 
265
+ /**
266
+ * Ajustes de presentación que no vienen del estilo del popup. Van agrupados para no seguir
267
+ * alargando la lista posicional de `show`, que ya arrastra doce parámetros.
268
+ */
269
+ interface PopupRenderOptions {
270
+ /**
271
+ * Título de la cabecera: el `title` de la definición del popup, tal cual llega de la API.
272
+ * Varía por popup y vacío es un valor válido (la cabecera se queda solo con la X).
273
+ */
274
+ title?: string;
275
+ /** Barra de progreso: `undefined` deja decidir a la plataforma, `true`/`false` la fuerzan. */
276
+ showProgressBar?: boolean;
277
+ /** CSS del host, inyectado el último: gana sobre el del SDK y el de `@magicfeedback/native`. */
278
+ surveyCss?: string;
279
+ }
251
280
  interface PopupRenderer {
252
281
  /** Preparar recursos si aplica */
253
282
  init?(): void;
254
283
  /** Mostrar popup */
255
- show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: (type: DeepdotsEventType, surveyId: string, data?: Record<string, unknown>) => void, onClose: () => void, env?: string, userId?: string, style?: PopupStyle, sessionId?: string, miniService?: string, analyticsFeedbackSessionId?: string, renderChrome?: boolean): void;
284
+ show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: (type: DeepdotsEventType, surveyId: string, data?: Record<string, unknown>) => void, onClose: () => void, env?: string, userId?: string, style?: PopupStyle, sessionId?: string, miniService?: string, analyticsFeedbackSessionId?: string, renderChrome?: boolean, options?: PopupRenderOptions): void;
256
285
  /** Ocultar popup */
257
286
  hide(): void;
258
287
  }
@@ -334,6 +363,10 @@ declare class DeepdotsPopups {
334
363
  private env;
335
364
  /** Si el SDK pinta el "modal" del popup (RN). Default true; false = el host lo envuelve. */
336
365
  private renderChrome;
366
+ /** Barra de progreso. undefined = la decide la plataforma (style.showProgressBar). */
367
+ private showProgressBar;
368
+ /** CSS del host inyectado al final de los estilos del popup. */
369
+ private surveyCss;
337
370
  /** Identidad + sesión (Fase 1 tracking). Null hasta init(). */
338
371
  private tracking;
339
372
  /** Capa de analytics (canal separado del feedback). Null hasta init(). */
@@ -632,7 +665,7 @@ declare class ReactNativePopupRenderer implements PopupRenderer {
632
665
  private partialEmitted;
633
666
  constructor(options?: ReactNativeRendererOptions);
634
667
  init(): void;
635
- show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: EmitFn, onClose: () => void, env?: string, userId?: string, style?: PopupStyle, sessionId?: string, miniService?: string, analyticsFeedbackSessionId?: string, renderChrome?: boolean): void;
668
+ show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: EmitFn, onClose: () => void, env?: string, userId?: string, style?: PopupStyle, sessionId?: string, miniService?: string, analyticsFeedbackSessionId?: string, renderChrome?: boolean, options?: PopupRenderOptions): void;
636
669
  hide(): void;
637
670
  /**
638
671
  * El host la conecta al `onMessage` del WebView. Traduce los mensajes del survey a
@@ -171,6 +171,20 @@ interface DeepdotsInitParams {
171
171
  * close). Ver `ReactNativePopupRenderer`.
172
172
  */
173
173
  renderChrome?: boolean;
174
+ /**
175
+ * Barra de progreso ("Question X of Y" + barra) en la cabecera del popup. Si se omite,
176
+ * manda el `showProgressBar` que la plataforma configura en el estilo del survey; `true` o
177
+ * `false` lo fuerzan desde el host. Solo se pinta con más de una página, fuera de la
178
+ * pantalla de inicio y antes de completar, igual que en la web de surveys.
179
+ */
180
+ showProgressBar?: boolean;
181
+ /**
182
+ * CSS propio del host, inyectado como último bloque de estilos del popup: gana en cascada
183
+ * sobre el del SDK y sobre el de `@magicfeedback/native` sin tener que tocar ninguno. Es la
184
+ * vía para reestilar el área de preguntas (enunciados, opciones, escalas) por integración,
185
+ * en vez de cambiar los defaults que comparten todos los clientes.
186
+ */
187
+ surveyCss?: string;
174
188
  }
175
189
  /**
176
190
  * Options for configuring survey triggers
@@ -248,11 +262,26 @@ interface PopupStyle {
248
262
  font?: PopupFont;
249
263
  }
250
264
 
265
+ /**
266
+ * Ajustes de presentación que no vienen del estilo del popup. Van agrupados para no seguir
267
+ * alargando la lista posicional de `show`, que ya arrastra doce parámetros.
268
+ */
269
+ interface PopupRenderOptions {
270
+ /**
271
+ * Título de la cabecera: el `title` de la definición del popup, tal cual llega de la API.
272
+ * Varía por popup y vacío es un valor válido (la cabecera se queda solo con la X).
273
+ */
274
+ title?: string;
275
+ /** Barra de progreso: `undefined` deja decidir a la plataforma, `true`/`false` la fuerzan. */
276
+ showProgressBar?: boolean;
277
+ /** CSS del host, inyectado el último: gana sobre el del SDK y el de `@magicfeedback/native`. */
278
+ surveyCss?: string;
279
+ }
251
280
  interface PopupRenderer {
252
281
  /** Preparar recursos si aplica */
253
282
  init?(): void;
254
283
  /** Mostrar popup */
255
- show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: (type: DeepdotsEventType, surveyId: string, data?: Record<string, unknown>) => void, onClose: () => void, env?: string, userId?: string, style?: PopupStyle, sessionId?: string, miniService?: string, analyticsFeedbackSessionId?: string, renderChrome?: boolean): void;
284
+ show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: (type: DeepdotsEventType, surveyId: string, data?: Record<string, unknown>) => void, onClose: () => void, env?: string, userId?: string, style?: PopupStyle, sessionId?: string, miniService?: string, analyticsFeedbackSessionId?: string, renderChrome?: boolean, options?: PopupRenderOptions): void;
256
285
  /** Ocultar popup */
257
286
  hide(): void;
258
287
  }
@@ -334,6 +363,10 @@ declare class DeepdotsPopups {
334
363
  private env;
335
364
  /** Si el SDK pinta el "modal" del popup (RN). Default true; false = el host lo envuelve. */
336
365
  private renderChrome;
366
+ /** Barra de progreso. undefined = la decide la plataforma (style.showProgressBar). */
367
+ private showProgressBar;
368
+ /** CSS del host inyectado al final de los estilos del popup. */
369
+ private surveyCss;
337
370
  /** Identidad + sesión (Fase 1 tracking). Null hasta init(). */
338
371
  private tracking;
339
372
  /** Capa de analytics (canal separado del feedback). Null hasta init(). */
@@ -632,7 +665,7 @@ declare class ReactNativePopupRenderer implements PopupRenderer {
632
665
  private partialEmitted;
633
666
  constructor(options?: ReactNativeRendererOptions);
634
667
  init(): void;
635
- show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: EmitFn, onClose: () => void, env?: string, userId?: string, style?: PopupStyle, sessionId?: string, miniService?: string, analyticsFeedbackSessionId?: string, renderChrome?: boolean): void;
668
+ show(surveyId: string, productId: string, actions: PopupActions | undefined, emit: EmitFn, onClose: () => void, env?: string, userId?: string, style?: PopupStyle, sessionId?: string, miniService?: string, analyticsFeedbackSessionId?: string, renderChrome?: boolean, options?: PopupRenderOptions): void;
636
669
  hide(): void;
637
670
  /**
638
671
  * El host la conecta al `onMessage` del WebView. Traduce los mensajes del survey a