@capillarytech/creatives-library 8.0.141 → 8.0.142

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.
Files changed (40) hide show
  1. package/initialReducer.js +2 -0
  2. package/package.json +2 -2
  3. package/services/api.js +5 -0
  4. package/services/tests/api.test.js +17 -0
  5. package/v2Components/MobilePushPreviewV2/index.js +8 -0
  6. package/v2Components/NavigationBar/saga.js +1 -1
  7. package/v2Components/NavigationBar/tests/saga.test.js +2 -2
  8. package/v2Components/TemplatePreview/assets/images/empty_android.svg +8 -0
  9. package/v2Components/TemplatePreview/assets/images/empty_ios.svg +5 -0
  10. package/v2Components/TemplatePreview/index.js +28 -2
  11. package/v2Containers/BeePopupEditor/constants.js +10 -0
  12. package/v2Containers/BeePopupEditor/index.js +169 -0
  13. package/v2Containers/BeePopupEditor/tests/index.test.js +628 -0
  14. package/v2Containers/CreativesContainer/SlideBoxContent.js +26 -8
  15. package/v2Containers/CreativesContainer/index.js +12 -2
  16. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +5 -0
  17. package/v2Containers/InApp/actions.js +7 -0
  18. package/v2Containers/InApp/constants.js +5 -1
  19. package/v2Containers/InApp/index.js +76 -53
  20. package/v2Containers/InApp/reducer.js +17 -0
  21. package/v2Containers/InApp/sagas.js +27 -0
  22. package/v2Containers/InApp/selectors.js +23 -1
  23. package/v2Containers/InApp/tests/index.test.js +0 -9
  24. package/v2Containers/InApp/tests/reducer.test.js +33 -0
  25. package/v2Containers/InApp/tests/sagas.test.js +57 -1
  26. package/v2Containers/InApp/tests/selector.test.js +612 -0
  27. package/v2Containers/InappAdvanced/index.js +459 -0
  28. package/v2Containers/InappAdvanced/index.scss +11 -0
  29. package/v2Containers/InappAdvanced/tests/index.test.js +442 -0
  30. package/v2Containers/InappWrapper/_inappWrapper.scss +19 -0
  31. package/v2Containers/InappWrapper/index.js +194 -0
  32. package/v2Containers/InappWrapper/messages.js +38 -0
  33. package/v2Containers/InappWrapper/tests/index.test.js +247 -0
  34. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
  35. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
  36. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -0
  37. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -0
  38. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +18 -0
  39. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -0
  40. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -0
@@ -0,0 +1,442 @@
1
+ import React from 'react';
2
+ import { Provider } from 'react-redux';
3
+ import '@testing-library/jest-dom';
4
+ import { injectIntl } from 'react-intl';
5
+ import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
6
+ import history from '../../../utils/history';
7
+ import { initialReducer } from '../../../initialReducer';
8
+ import { InappAdvanced } from '../index';
9
+ import { render, screen, fireEvent, waitFor } from '../../../utils/test-utils';
10
+
11
+ // Mock child components that are complex or not under test
12
+ jest.mock('../../BeePopupEditor', () => ({
13
+ __esModule: true,
14
+ default: (props) => (
15
+ <div
16
+ data-testid={`bee-popup-editor-${props.device}`}
17
+ data-device={props.device}
18
+ data-template-layout-type={props.templateLayoutType}
19
+ >
20
+ BeePopupEditor - {props.device}
21
+ <button
22
+ onClick={() => props.saveBeeData('{"test": "json"}', '<p>Test HTML</p>', props.device)}
23
+ data-testid={`save-bee-data-${props.device}`}
24
+ >
25
+ Save Bee Data
26
+ </button>
27
+ <button
28
+ onClick={() => props.saveBeeInstance({ mockInstance: true })}
29
+ data-testid={`save-bee-instance-${props.device}`}
30
+ >
31
+ Save Bee Instance
32
+ </button>
33
+ </div>
34
+ ),
35
+ }));
36
+
37
+ let store;
38
+ beforeAll(() => {
39
+ store = configureStore({}, initialReducer, history);
40
+ });
41
+
42
+ const ComponentToRender = injectIntl(InappAdvanced);
43
+ const renderComponent = (props) =>
44
+ render(
45
+ <Provider store={store}>
46
+ <ComponentToRender {...props} />
47
+ </Provider>
48
+ );
49
+
50
+ describe('InappAdvanced Component', () => {
51
+ let defaultProps;
52
+ let mockActions;
53
+
54
+ beforeEach(() => {
55
+ mockActions = {
56
+ getBeePopupBuilderToken: jest.fn(),
57
+ createInAppTemplate: jest.fn(),
58
+ editTemplate: jest.fn(),
59
+ clearCreateResponse: jest.fn(),
60
+ };
61
+
62
+ const mockGlobalActions = {
63
+ fetchSchemaForEntity: jest.fn(),
64
+ };
65
+
66
+ defaultProps = {
67
+ intl: {
68
+ formatMessage: jest.fn((msg) => msg.defaultMessage || msg.id),
69
+ },
70
+ actions: mockActions,
71
+ globalActions: mockGlobalActions,
72
+ isFullMode: true,
73
+ onCreateComplete: jest.fn(),
74
+ params: { id: 'test-id' },
75
+ templateData: {},
76
+ editData: {},
77
+ accountData: {
78
+ selectedWeChatAccount: {
79
+ sourceAccountIdentifier: 'test-account',
80
+ id: 'account-123',
81
+ configs: {
82
+ android: '1',
83
+ ios: '1',
84
+ },
85
+ },
86
+ },
87
+ location: {
88
+ pathname: '/inapp/create',
89
+ query: { type: 'inapp' },
90
+ search: '',
91
+ },
92
+ getDefaultTags: 'inapp',
93
+ supportedTags: [],
94
+ metaEntities: {
95
+ tags: {
96
+ standard: [],
97
+ },
98
+ },
99
+ injectedTags: [],
100
+ getFormData: jest.fn(),
101
+ templateName: 'Test Template',
102
+ setTemplateName: jest.fn(),
103
+ beePopupBuilderTokenFetching: false,
104
+ beePopupBuilderToken: {
105
+ uuid: 'test-uuid-123',
106
+ token: 'test-token-456',
107
+ },
108
+ };
109
+ });
110
+
111
+ describe('Component Initialization', () => {
112
+ it('should render without crashing', () => {
113
+ renderComponent(defaultProps);
114
+
115
+ expect(screen.getByText('Create')).toBeInTheDocument();
116
+ });
117
+
118
+ it('should call getBeePopupBuilderToken on mount', () => {
119
+ renderComponent(defaultProps);
120
+
121
+ expect(mockActions.getBeePopupBuilderToken).toHaveBeenCalledTimes(1);
122
+ });
123
+
124
+ it('should show loading spinner when beePopupBuilderTokenFetching is true', () => {
125
+ renderComponent({
126
+ ...defaultProps,
127
+ beePopupBuilderTokenFetching: true,
128
+ });
129
+
130
+ // The spinner should be present but we can't easily test for it without mocking
131
+ expect(screen.getByText('Create')).toBeInTheDocument();
132
+ });
133
+ });
134
+
135
+ describe('Layout Selection', () => {
136
+ it('should render layout selection when isFullMode is true', () => {
137
+ renderComponent({
138
+ ...defaultProps,
139
+ isFullMode: true,
140
+ });
141
+
142
+ expect(screen.getByText('Creative layout')).toBeInTheDocument();
143
+ // CapSelect from cap-ui-library should render a select element
144
+ const selectElements = screen.getAllByRole('button');
145
+ expect(selectElements.length).toBeGreaterThan(0);
146
+ });
147
+
148
+ it('should update layout type when selection changes', () => {
149
+ renderComponent(defaultProps);
150
+
151
+ // Layout selection should be rendered
152
+ expect(screen.getByText('Creative layout')).toBeInTheDocument();
153
+ });
154
+ });
155
+
156
+ describe('Device Tabs', () => {
157
+ it('should render device tabs with Android and iOS options', () => {
158
+ renderComponent(defaultProps);
159
+
160
+ expect(screen.getByText('Android')).toBeInTheDocument();
161
+ expect(screen.getByText('IOS')).toBeInTheDocument();
162
+ });
163
+
164
+ it('should show BeePopupEditor for Android when Android tab is active', () => {
165
+ renderComponent({
166
+ ...defaultProps,
167
+ beePopupBuilderToken: { uuid: 'test-uuid' },
168
+ });
169
+
170
+ expect(screen.getByTestId('bee-popup-editor-ANDROID')).toBeInTheDocument();
171
+ });
172
+
173
+ it('should only show supported device tabs', () => {
174
+ renderComponent({
175
+ ...defaultProps,
176
+ accountData: {
177
+ selectedWeChatAccount: {
178
+ configs: {
179
+ android: '0', // Not supported
180
+ ios: '1', // Supported
181
+ },
182
+ },
183
+ },
184
+ });
185
+
186
+ expect(screen.queryByText('Android')).not.toBeInTheDocument();
187
+ expect(screen.getByText('IOS')).toBeInTheDocument();
188
+ });
189
+ });
190
+
191
+ describe('BeePopupEditor Integration', () => {
192
+ it('should pass correct props to BeePopupEditor', () => {
193
+ renderComponent({
194
+ ...defaultProps,
195
+ beePopupBuilderToken: { uuid: 'test-uuid' },
196
+ });
197
+
198
+ const beeEditor = screen.getByTestId('bee-popup-editor-ANDROID');
199
+ expect(beeEditor).toHaveAttribute('data-device', 'ANDROID');
200
+ expect(beeEditor).toHaveAttribute('data-template-layout-type', 'POPUP');
201
+ });
202
+
203
+ it('should handle saveBeeData callback correctly', () => {
204
+ renderComponent({
205
+ ...defaultProps,
206
+ beePopupBuilderToken: { uuid: 'test-uuid' },
207
+ });
208
+
209
+ const saveBeeDataButton = screen.getByTestId('save-bee-data-ANDROID');
210
+ fireEvent.click(saveBeeDataButton);
211
+
212
+ // The component should update its internal state with the JSON and HTML
213
+ expect(saveBeeDataButton).toBeInTheDocument(); // Basic check that callback was handled
214
+ });
215
+
216
+ it('should handle saveBeeInstance callback correctly', () => {
217
+ renderComponent({
218
+ ...defaultProps,
219
+ beePopupBuilderToken: { uuid: 'test-uuid' },
220
+ });
221
+
222
+ const saveBeeInstanceButton = screen.getByTestId('save-bee-instance-ANDROID');
223
+ fireEvent.click(saveBeeInstanceButton);
224
+
225
+ // The component should store the bee instance
226
+ expect(saveBeeInstanceButton).toBeInTheDocument(); // Basic check that callback was handled
227
+ });
228
+
229
+ it('should not render BeePopupEditor when no token is available', () => {
230
+ renderComponent({
231
+ ...defaultProps,
232
+ beePopupBuilderToken: null,
233
+ });
234
+
235
+ expect(screen.queryByTestId('bee-popup-editor-ANDROID')).not.toBeInTheDocument();
236
+ });
237
+ });
238
+
239
+ describe('Action Buttons', () => {
240
+ it('should render Create button in full mode for new templates', () => {
241
+ renderComponent({
242
+ ...defaultProps,
243
+ isFullMode: true,
244
+ });
245
+
246
+ expect(screen.getByText('Create')).toBeInTheDocument();
247
+ });
248
+
249
+ it('should render Update button in edit mode', () => {
250
+ renderComponent({
251
+ ...defaultProps,
252
+ isFullMode: true,
253
+ editData: {
254
+ templateDetails: {
255
+ name: 'Existing Template',
256
+ versions: {
257
+ base: {
258
+ content: {
259
+ ANDROID: { title: 'Test' },
260
+ },
261
+ },
262
+ },
263
+ },
264
+ },
265
+ });
266
+
267
+ expect(screen.getByText('Update')).toBeInTheDocument();
268
+ });
269
+
270
+ it('should render Done button in library mode', () => {
271
+ renderComponent({
272
+ ...defaultProps,
273
+ isFullMode: false,
274
+ });
275
+
276
+ expect(screen.getByText('Done')).toBeInTheDocument();
277
+ });
278
+
279
+ it('should call appropriate action when Create button is clicked', () => {
280
+ renderComponent({
281
+ ...defaultProps,
282
+ isFullMode: true,
283
+ });
284
+
285
+ const createButton = screen.getByText('Create');
286
+ fireEvent.click(createButton);
287
+
288
+ expect(mockActions.createInAppTemplate).toHaveBeenCalled();
289
+ });
290
+ });
291
+
292
+ describe('Form Data Integration', () => {
293
+ it('should call getFormData when in library mode', () => {
294
+ const mockGetFormData = jest.fn();
295
+ renderComponent({
296
+ ...defaultProps,
297
+ isFullMode: false,
298
+ getFormData: mockGetFormData,
299
+ });
300
+
301
+ const doneButton = screen.getByText('Done');
302
+ fireEvent.click(doneButton);
303
+
304
+ expect(mockGetFormData).toHaveBeenCalledWith({
305
+ value: expect.any(Object),
306
+ _id: 'test-id',
307
+ validity: true,
308
+ type: 'INAPP',
309
+ });
310
+ });
311
+ });
312
+
313
+ describe('Template Name Integration', () => {
314
+ it('should display the template name when provided', () => {
315
+ renderComponent({
316
+ ...defaultProps,
317
+ templateName: 'My Awesome Template',
318
+ });
319
+
320
+ // Template name should be used in the payload creation
321
+ expect(screen.getByText('Create')).toBeInTheDocument();
322
+ });
323
+
324
+ it('should handle setTemplateName callback', () => {
325
+ const mockSetTemplateName = jest.fn();
326
+ renderComponent({
327
+ ...defaultProps,
328
+ setTemplateName: mockSetTemplateName,
329
+ });
330
+
331
+ // The component should be able to update template name
332
+ expect(mockSetTemplateName).toBeDefined();
333
+ });
334
+ });
335
+
336
+ describe('Account Data Integration', () => {
337
+ it('should handle missing account data gracefully', () => {
338
+ renderComponent({
339
+ ...defaultProps,
340
+ accountData: {},
341
+ });
342
+
343
+ // Component should render without crashing
344
+ expect(screen.getByText('Create')).toBeInTheDocument();
345
+ });
346
+
347
+ it('should use account data in payload creation', () => {
348
+ renderComponent({
349
+ ...defaultProps,
350
+ accountData: {
351
+ selectedWeChatAccount: {
352
+ sourceAccountIdentifier: 'test-account-123',
353
+ id: 'account-456',
354
+ },
355
+ },
356
+ });
357
+
358
+ // Account data should be used when creating the payload
359
+ expect(screen.getByText('Create')).toBeInTheDocument();
360
+ });
361
+ });
362
+
363
+ describe('Edit Flow', () => {
364
+ it('should initialize edit flow when editData is provided', () => {
365
+ renderComponent({
366
+ ...defaultProps,
367
+ editData: {
368
+ templateDetails: {
369
+ name: 'Existing Template',
370
+ createdAt: '2023-01-01',
371
+ versions: {
372
+ base: {
373
+ content: {
374
+ ANDROID: {
375
+ isBEEeditor: true,
376
+ beeJson: '{"test": "json"}',
377
+ beeHtml: '<p>Test HTML</p>',
378
+ },
379
+ IOS: {
380
+ isBEEeditor: true,
381
+ beeJson: '{"test": "ios-json"}',
382
+ beeHtml: '<p>iOS Test HTML</p>',
383
+ },
384
+ },
385
+ },
386
+ },
387
+ },
388
+ },
389
+ });
390
+
391
+ // Should show Update button in edit flow
392
+ expect(screen.getByText('Update')).toBeInTheDocument();
393
+ });
394
+ });
395
+
396
+ describe('Error Handling', () => {
397
+ it('should handle missing props gracefully', () => {
398
+ expect(() => {
399
+ renderComponent({
400
+ intl: {
401
+ formatMessage: jest.fn((msg) => msg.defaultMessage || msg.id),
402
+ },
403
+ actions: mockActions,
404
+ globalActions: {
405
+ fetchSchemaForEntity: jest.fn(),
406
+ },
407
+ location: {
408
+ pathname: '/inapp/create',
409
+ query: { type: 'inapp' },
410
+ search: '',
411
+ },
412
+ });
413
+ }).not.toThrow();
414
+ });
415
+
416
+ it('should handle undefined beePopupBuilderToken gracefully', () => {
417
+ renderComponent({
418
+ ...defaultProps,
419
+ beePopupBuilderToken: undefined,
420
+ });
421
+
422
+ expect(screen.getByText('Create')).toBeInTheDocument();
423
+ });
424
+ });
425
+
426
+ describe('Responsive Behavior', () => {
427
+ it('should apply correct CSS classes for different modes', () => {
428
+ const { container } = renderComponent(defaultProps);
429
+
430
+ expect(container.querySelector('.cap-inapp-creatives')).toBeInTheDocument();
431
+ });
432
+
433
+ it('should show footer with correct classes in library mode', () => {
434
+ const { container } = renderComponent({
435
+ ...defaultProps,
436
+ isFullMode: false,
437
+ });
438
+
439
+ expect(container.querySelector('.inapp-footer-lib')).toBeInTheDocument();
440
+ });
441
+ });
442
+ });
@@ -0,0 +1,19 @@
1
+ .inapp-wrapper {
2
+
3
+ .ant-radio-group.cap-radioCard-v2 {
4
+ .ant-radio-button-wrapper{
5
+ width: 284px;
6
+ height: 258px;
7
+ }
8
+ .ant-card-body {
9
+ padding: 1rem;
10
+ }
11
+ }
12
+ }
13
+ .template-name-inapp {
14
+ width: 580px;
15
+ margin-bottom: 1.5rem;
16
+ .ant-input {
17
+ height: 40px;
18
+ }
19
+ }
@@ -0,0 +1,194 @@
1
+ /*
2
+ *
3
+ * InappWrapper
4
+ *
5
+ */
6
+ import PropTypes from "prop-types";
7
+ import React, { useState } from "react";
8
+ import { connect } from "react-redux";
9
+ import { FormattedMessage } from "react-intl";
10
+ import CapRadioCard from "@capillarytech/cap-ui-library/CapRadioCard";
11
+ import CapInput from "@capillarytech/cap-ui-library/CapInput";
12
+ import CapIcon from "@capillarytech/cap-ui-library/CapIcon";
13
+ import ComponentWithLabelHOC from "@capillarytech/cap-ui-library/assets/HOCs/ComponentWithLabelHOC";
14
+ import styled from "styled-components";
15
+ import InApp from "../InApp/index";
16
+ import InappAdvanced from "../InappAdvanced/index";
17
+ import messages from "./messages";
18
+ import "./_inappWrapper.scss";
19
+
20
+ const CapRadioCardWithLabel = ComponentWithLabelHOC(CapRadioCard);
21
+ const CardContainer = styled.div`
22
+ margin-top: 16px;
23
+ .component-with-label-label {
24
+ margin-bottom: unset;
25
+ }
26
+ .ant-radio-group {
27
+ .ant-radio-button-wrapper {
28
+ &:first-child {
29
+ margin-left: unset;
30
+ margin-top: unset;
31
+ }
32
+ }
33
+ }
34
+ `;
35
+ export function InappWrapper(props) {
36
+ const {
37
+ inAppCreateMode,
38
+ step,
39
+ getFormData,
40
+ setIsLoadingContent,
41
+ isGetFormData,
42
+ query,
43
+ isFullMode,
44
+ showTemplateName,
45
+ type,
46
+ onValidationFail,
47
+ templateData,
48
+ onInAppModeChange,
49
+ onEnterTemplateName,
50
+ onRemoveTemplateName,
51
+ forwardedTags,
52
+ selectedOfferDetails,
53
+ onCreateComplete,
54
+ } = props;
55
+ const [templateName, setTemplateName] = useState("");
56
+ const modes = [
57
+ {
58
+ title: <FormattedMessage {...messages.basicEditor} />,
59
+ icon: <CapIcon type="notepad-material" />,
60
+ content: <FormattedMessage {...messages.basicEditorDesc} />,
61
+ value: "basicEditor",
62
+ },
63
+ {
64
+ title: <FormattedMessage {...messages.dndEditor} />,
65
+ icon: <CapIcon type="draggable" />,
66
+ content: <FormattedMessage {...messages.dndEditorDesc} />,
67
+ value: "beeEditor",
68
+ },
69
+ ];
70
+
71
+ const onChange = (e) => {
72
+ onInAppModeChange(e.target.value);
73
+ };
74
+
75
+ function onTemplateNameChange(event) {
76
+ setTemplateName(event.target.value);
77
+ if (event.target.value && onEnterTemplateName) {
78
+ onEnterTemplateName();
79
+ } else if (onRemoveTemplateName) {
80
+ onRemoveTemplateName();
81
+ }
82
+ }
83
+
84
+ return (
85
+ <div className="inapp-wrapper">
86
+ {step === "modeSelection" ? (
87
+ <div>
88
+ {isFullMode && (
89
+ <CapInput
90
+ className="template-name-inapp"
91
+ label={<FormattedMessage {...messages.creativeName} />}
92
+ onChange={onTemplateNameChange}
93
+ value={templateName}
94
+ labelPosition="top"
95
+ size="default"
96
+ data-testid="template-name-input"
97
+ />
98
+ )}
99
+ <CardContainer>
100
+ <CapRadioCardWithLabel
101
+ label={<FormattedMessage {...messages.modeDesc} />}
102
+ panes={modes}
103
+ cardHeight="8.6rem"
104
+ onChange={onChange}
105
+ selected={inAppCreateMode}
106
+ data-testid="cap-radio-card"
107
+ />
108
+ </CardContainer>
109
+ </div>
110
+ ) : (
111
+ <div>
112
+ {inAppCreateMode === 'basicEditor' && (
113
+ <InApp
114
+ getFormData={getFormData}
115
+ setIsLoadingContent={setIsLoadingContent}
116
+ defaultData={{ "template-name": templateName }}
117
+ location={{
118
+ pathname: `/inapp/create`,
119
+ query,
120
+ search: '',
121
+ }}
122
+ params={{ mode: inAppCreateMode }}
123
+ isFullMode={isFullMode}
124
+ isGetFormData={isGetFormData}
125
+ showTemplateName={showTemplateName}
126
+ route={{ name: "inapp" }}
127
+ getDefaultTags={type}
128
+ onValidationFail={onValidationFail}
129
+ templateData={templateData}
130
+ templateName={templateName}
131
+ setTemplateName={setTemplateName}
132
+ forwardedTags={forwardedTags}
133
+ selectedOfferDetails={selectedOfferDetails}
134
+ onCreateComplete={onCreateComplete}
135
+ />
136
+ )}
137
+ {inAppCreateMode === 'beeEditor' && (
138
+ <InappAdvanced
139
+ getFormData={getFormData}
140
+ setIsLoadingContent={setIsLoadingContent}
141
+ defaultData={{ "template-name": templateName }}
142
+ location={{
143
+ pathname: `/inapp/create`,
144
+ query,
145
+ search: '',
146
+ }}
147
+ params={{ mode: inAppCreateMode }}
148
+ isFullMode={isFullMode}
149
+ isGetFormData={isGetFormData}
150
+ showTemplateName={showTemplateName}
151
+ route={{ name: "inapp" }}
152
+ getDefaultTags={type}
153
+ onValidationFail={onValidationFail}
154
+ templateData={templateData}
155
+ templateName={templateName}
156
+ setTemplateName={setTemplateName}
157
+ forwardedTags={forwardedTags}
158
+ selectedOfferDetails={selectedOfferDetails}
159
+ onCreateComplete={onCreateComplete}
160
+ />
161
+ )}
162
+ </div>
163
+ )}
164
+ </div>
165
+ );
166
+ }
167
+
168
+ InappWrapper.propTypes = {
169
+ onInAppModeChange: PropTypes.func,
170
+ inAppCreateMode: PropTypes.string,
171
+ step: PropTypes.string,
172
+ getFormData: PropTypes.f,
173
+ setIsLoadingContent: PropTypes.func,
174
+ onEnterTemplateName: PropTypes.func,
175
+ onRemoveTemplateName: PropTypes.func,
176
+ isGetFormData: PropTypes.bool,
177
+ query: PropTypes.object,
178
+ isFullMode: PropTypes.bool,
179
+ showTemplateName: PropTypes.func,
180
+ type: PropTypes.string,
181
+ onValidationFail: PropTypes.func,
182
+ forwardedTags: PropTypes.object,
183
+ templateData: PropTypes.object,
184
+ selectedOfferDetails: PropTypes.object,
185
+ onCreateComplete: PropTypes.func,
186
+ };
187
+
188
+ function mapDispatchToProps(dispatch) {
189
+ return {
190
+ dispatch,
191
+ };
192
+ }
193
+
194
+ export default connect(null, mapDispatchToProps)(InappWrapper);
@@ -0,0 +1,38 @@
1
+ /*
2
+ * MobilepushWrapper Messages
3
+ *
4
+ * This contains all the text for the MobilepushWrapper component.
5
+ */
6
+ import { defineMessages } from 'react-intl';
7
+ const prefix = "app.v2Containers.InappWrapper";
8
+
9
+ export default defineMessages({
10
+ header: {
11
+ id: `${prefix}.header`,
12
+ defaultMessage: 'This is MobilepushWrapper container !',
13
+ },
14
+ basicEditor: {
15
+ id: `${prefix}.basicEditor`,
16
+ defaultMessage: 'Basic editor',
17
+ },
18
+ basicEditorDesc: {
19
+ id: `${prefix}.basicEditorDesc`,
20
+ defaultMessage: 'This form creates in-app message templates with basic customization options and supports only four layouts.',
21
+ },
22
+ dndEditor: {
23
+ id: `${prefix}.dndEditor`,
24
+ defaultMessage: 'Drag & drop editor',
25
+ },
26
+ dndEditorDesc: {
27
+ id: `${prefix}.dndEditorDesc`,
28
+ defaultMessage: 'This advanced editor, powered by Beefree template builder, offers full customization options and supports all layouts.',
29
+ },
30
+ modeDesc: {
31
+ id: `${prefix}.modeDesc`,
32
+ defaultMessage: 'Which editor do you want to use to create this template?',
33
+ },
34
+ creativeName: {
35
+ id: `${prefix}.creativeName`,
36
+ defaultMessage: 'Creative name',
37
+ },
38
+ });