@pushwoosh/websdk-common 6.24.0 → 6.25.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/websdk-common",
3
- "version": "6.24.0",
3
+ "version": "6.25.0",
4
4
  "description": "Code shared by the Pushwoosh WebSDK and the Control Panel, one entry point per module (web-popups: web popup model and renderer; subscription-widget: push subscription widget model and renderer; inbox: web inbox widget and inbox cell previews)",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useContext } from 'react';
3
3
  import { WebPopupFormSessionContext } from '../../formSession';
4
+ import { WEB_POPUP_SUBMIT_ATTRIBUTE } from '../../styles';
4
5
  import { errorStyle } from '../styles';
5
6
  import { pillStyle, slotStyle } from './styles';
6
7
  /** A Form's Submit: sends every field of the popup; shows errorMessage after a refusal. */
@@ -15,6 +16,7 @@ export function SubmitSlotView({
15
16
  style: slotStyle,
16
17
  children: [_jsx("button", {
17
18
  type: "button",
19
+ [WEB_POPUP_SUBMIT_ATTRIBUTE]: '',
18
20
  disabled: submitting,
19
21
  style: pillStyle(slot.variant, colors, submitting),
20
22
  onClick: session.submit,
@@ -1,6 +1,6 @@
1
1
  export { WebPopupReader, WebPopupBox, WebPopupSlotView } from './WebPopupReader';
2
2
  export { WebPopupInline } from './WebPopupInline';
3
- export { WEB_POPUP_CLOSE_ATTRIBUTE } from './styles';
3
+ export { WEB_POPUP_CLOSE_ATTRIBUTE, WEB_POPUP_SUBMIT_ATTRIBUTE } from './styles';
4
4
  export { WEB_POPUP_TEMPLATES, findWebPopupTemplate } from './templates';
5
5
  export { parseWebPopupJson, stringifyWebPopup, resolveWebPopupPages, resolveWebPopupPageSize, startPageOf, safeUrl, sanitizeWebPopupHtml, normalizeWebPopupColors, normalizeWebPopupValues, webPopupValuesMap, collectWebPopupFormCodes, webPopupExpired, normalizeWebPopupDark, WEB_POPUP_MAX_SIZE_PX, isWebPopupCloseButton, webPopupPageWithoutCloseButtons, webPopupParamsWithoutCloseButtons, } from './helpers';
6
6
  export { webPopupHasForm } from './form';
@@ -1,6 +1,6 @@
1
1
  export { WebPopupReader, WebPopupBox, WebPopupSlotView } from './WebPopupReader';
2
2
  export { WebPopupInline } from './WebPopupInline';
3
- export { WEB_POPUP_CLOSE_ATTRIBUTE } from './styles';
3
+ export { WEB_POPUP_CLOSE_ATTRIBUTE, WEB_POPUP_SUBMIT_ATTRIBUTE } from './styles';
4
4
  export { WEB_POPUP_TEMPLATES, findWebPopupTemplate } from './templates';
5
5
  export { parseWebPopupJson, stringifyWebPopup, resolveWebPopupPages, resolveWebPopupPageSize, startPageOf, safeUrl, sanitizeWebPopupHtml, normalizeWebPopupColors, normalizeWebPopupValues, webPopupValuesMap, collectWebPopupFormCodes, webPopupExpired, normalizeWebPopupDark, WEB_POPUP_MAX_SIZE_PX, isWebPopupCloseButton, webPopupPageWithoutCloseButtons, webPopupParamsWithoutCloseButtons } from './helpers';
6
6
  export { webPopupHasForm } from './form';
@@ -3,6 +3,11 @@ import { type CSSProperties } from 'react';
3
3
  export declare const WEB_POPUP_INLINE_SCOPE_ATTRIBUTE = "data-pw-web-popup-inline";
4
4
  /** Marks the reader's ✕, so a host can tell it from the content's own buttons. */
5
5
  export declare const WEB_POPUP_CLOSE_ATTRIBUTE = "data-pw-close";
6
+ /**
7
+ * Marks the FORM content Submit: its send already counts in the campaign's Submits, so the host skips it as a click.
8
+ * Email-subscription-form, choice and rating sends don't reach Submits, so their clicks stay interactions.
9
+ */
10
+ export declare const WEB_POPUP_SUBMIT_ATTRIBUTE = "data-pw-submit";
6
11
  /** An Inline block fills its container: the page's own width only sizes a floating popup. */
7
12
  export declare const WEB_POPUP_INLINE_WRAPPER_STYLE: CSSProperties;
8
13
  /** Image-cap stylesheet of an Inline block, scoped by WEB_POPUP_INLINE_SCOPE_ATTRIBUTE. */
@@ -3,6 +3,11 @@ import { WEB_POPUP_INLINE_IMAGE_MAX_HEIGHT } from './constants';
3
3
  export const WEB_POPUP_INLINE_SCOPE_ATTRIBUTE = 'data-pw-web-popup-inline';
4
4
  /** Marks the reader's ✕, so a host can tell it from the content's own buttons. */
5
5
  export const WEB_POPUP_CLOSE_ATTRIBUTE = 'data-pw-close';
6
+ /**
7
+ * Marks the FORM content Submit: its send already counts in the campaign's Submits, so the host skips it as a click.
8
+ * Email-subscription-form, choice and rating sends don't reach Submits, so their clicks stay interactions.
9
+ */
10
+ export const WEB_POPUP_SUBMIT_ATTRIBUTE = 'data-pw-submit';
6
11
  /** An Inline block fills its container: the page's own width only sizes a floating popup. */
7
12
  export const WEB_POPUP_INLINE_WRAPPER_STYLE = {
8
13
  width: '100%'