@pushwoosh/smart-components-kit 2.5.0 → 2.5.2
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.
|
@@ -102,15 +102,18 @@ export const ResendModal = ({
|
|
|
102
102
|
const type = message.type === 'Email' ? 'email' : 'push';
|
|
103
103
|
const queryParams = new URLSearchParams({
|
|
104
104
|
type,
|
|
105
|
-
message: message.code
|
|
105
|
+
message: message.code,
|
|
106
|
+
resendOf: message.code
|
|
106
107
|
});
|
|
107
108
|
const props = message.properties || {};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
const campaignCode = parsedProps.campaignCode || props.campaignCode;
|
|
110
|
+
const preset = parsedProps.preset || message.preset;
|
|
111
|
+
const richMediaCode = parsedProps.rich_media_code || props.rich_media_code;
|
|
112
|
+
if (campaignCode) queryParams.set('campaign', campaignCode);
|
|
113
|
+
if (preset) queryParams.set('preset', preset);
|
|
114
|
+
if (richMediaCode) queryParams.set('inapp', richMediaCode);
|
|
115
|
+
return `/applications/${applicationCode}/one-time-messages/clone?${queryParams.toString()}`;
|
|
116
|
+
}, [applicationCode, message, parsedProps]);
|
|
114
117
|
const handleResend = useCallback(async () => {
|
|
115
118
|
const res = await resendEmail(applicationCode, message, presetSubject);
|
|
116
119
|
if (res) {
|
|
@@ -2,7 +2,7 @@ import { parseMessageProperties } from './helpers';
|
|
|
2
2
|
export class ResendEmailPayloadMapper {
|
|
3
3
|
static getPayload(applicationCode, originalMessage, newSubject) {
|
|
4
4
|
const props = parseMessageProperties(originalMessage.properties);
|
|
5
|
-
const expression = `((Event("${applicationCode}", "PW_EmailSent", date daysago lte 365, count
|
|
5
|
+
const expression = `((Event("${applicationCode}", "PW_EmailSent", date daysago lte 365, count gte 1, attribute "message_code" eq "${originalMessage.code}")) \\ (Event("${applicationCode}", "PW_EmailOpen", date daysago lte 365, count gte 1, attribute "message_code" eq "${originalMessage.code}")))`;
|
|
6
6
|
return {
|
|
7
7
|
transaction_id: crypto.randomUUID(),
|
|
8
8
|
segment: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/smart-components-kit",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "Stateful, data-connected React components shared by Pushwoosh micro-frontends",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@floating-ui/react-dom": "^2.1.2",
|
|
29
|
-
"@pushwoosh/dumb-components": "^4.15.
|
|
30
|
-
"@pushwoosh/kit-constants": "^3.2.
|
|
31
|
-
"@pushwoosh/kit-helpers": "^4.17.
|
|
29
|
+
"@pushwoosh/dumb-components": "^4.15.3",
|
|
30
|
+
"@pushwoosh/kit-constants": "^3.2.1",
|
|
31
|
+
"@pushwoosh/kit-helpers": "^4.17.2",
|
|
32
32
|
"@pushwoosh/kit-icons": "^3.0.1",
|
|
33
|
-
"@pushwoosh/kit-typography": "^2.1.
|
|
33
|
+
"@pushwoosh/kit-typography": "^2.1.2",
|
|
34
34
|
"@pushwoosh/rpc-v2-http-api-data": "^0.2.534",
|
|
35
35
|
"jwt-decode": "^4.0.0",
|
|
36
36
|
"react-hook-form": "^7.89.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@pushwoosh/frontend-builder-engine": "^5.
|
|
40
|
-
"@pushwoosh/spa-context": "^3.
|
|
39
|
+
"@pushwoosh/frontend-builder-engine": "^5.5.0",
|
|
40
|
+
"@pushwoosh/spa-context": "^3.6.1",
|
|
41
41
|
"@svgr/webpack": "^8.1.0",
|
|
42
42
|
"@testing-library/dom": "^10.4.2",
|
|
43
43
|
"@testing-library/react": "^16.3.0",
|