@capillarytech/creatives-library 8.0.242-alpha.0 → 8.0.242-alpha.1

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 (215) hide show
  1. package/assets/Android.png +0 -0
  2. package/assets/iOS.png +0 -0
  3. package/constants/unified.js +2 -1
  4. package/initialReducer.js +2 -0
  5. package/package.json +1 -1
  6. package/sagas/__tests__/assetPolling.test.js +74 -3
  7. package/sagas/assetPolling.js +8 -1
  8. package/services/api.js +10 -5
  9. package/services/tests/api.test.js +18 -0
  10. package/translations/en.json +0 -1
  11. package/utils/common.js +5 -0
  12. package/utils/commonUtils.js +14 -1
  13. package/utils/tests/commonUtil.test.js +224 -0
  14. package/utils/transformTemplateConfig.js +0 -10
  15. package/utils/transformerUtils.js +0 -42
  16. package/v2Components/CapDeviceContent/index.js +61 -56
  17. package/v2Components/CapImageUpload/constants.js +0 -2
  18. package/v2Components/CapImageUpload/index.js +14 -54
  19. package/v2Components/CapImageUpload/index.scss +1 -4
  20. package/v2Components/CapImageUpload/messages.js +0 -4
  21. package/v2Components/CapTagList/index.js +6 -1
  22. package/v2Components/CapTagListWithInput/index.js +5 -1
  23. package/v2Components/CapTagListWithInput/messages.js +1 -1
  24. package/v2Components/CapWhatsappCTA/tests/index.test.js +5 -0
  25. package/v2Components/ErrorInfoNote/index.js +412 -72
  26. package/v2Components/ErrorInfoNote/messages.js +22 -0
  27. package/v2Components/ErrorInfoNote/style.scss +279 -2
  28. package/v2Components/HtmlEditor/HTMLEditor.js +210 -89
  29. package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +1132 -133
  30. package/v2Components/HtmlEditor/__tests__/index.lazy.test.js +17 -12
  31. package/v2Components/HtmlEditor/_htmlEditor.scss +8 -23
  32. package/v2Components/HtmlEditor/_index.lazy.scss +1 -1
  33. package/v2Components/HtmlEditor/components/CodeEditorPane/_codeEditorPane.scss +13 -101
  34. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +148 -139
  35. package/v2Components/HtmlEditor/components/DeviceToggle/_deviceToggle.scss +2 -1
  36. package/v2Components/HtmlEditor/components/DeviceToggle/index.js +3 -3
  37. package/v2Components/HtmlEditor/components/EditorToolbar/index.js +1 -1
  38. package/v2Components/HtmlEditor/components/FullscreenModal/_fullscreenModal.scss +1 -0
  39. package/v2Components/HtmlEditor/components/InAppPreviewPane/DeviceFrame.js +4 -7
  40. package/v2Components/HtmlEditor/components/InAppPreviewPane/__tests__/DeviceFrame.test.js +35 -45
  41. package/v2Components/HtmlEditor/components/InAppPreviewPane/_inAppPreviewPane.scss +1 -3
  42. package/v2Components/HtmlEditor/components/InAppPreviewPane/constants.js +33 -33
  43. package/v2Components/HtmlEditor/components/InAppPreviewPane/index.js +7 -6
  44. package/v2Components/HtmlEditor/components/PreviewPane/_previewPane.scss +3 -6
  45. package/v2Components/HtmlEditor/components/PreviewPane/index.js +10 -11
  46. package/v2Components/HtmlEditor/components/SplitContainer/_splitContainer.scss +1 -1
  47. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/__tests__/index.test.js +87 -62
  48. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/index.js +49 -31
  49. package/v2Components/HtmlEditor/components/ValidationTabs/_validationTabs.scss +254 -0
  50. package/v2Components/HtmlEditor/components/ValidationTabs/index.js +362 -0
  51. package/v2Components/HtmlEditor/components/ValidationTabs/messages.js +51 -0
  52. package/v2Components/HtmlEditor/constants.js +29 -20
  53. package/v2Components/HtmlEditor/hooks/__tests__/useInAppContent.test.js +373 -16
  54. package/v2Components/HtmlEditor/hooks/useEditorContent.js +5 -2
  55. package/v2Components/HtmlEditor/hooks/useInAppContent.js +88 -146
  56. package/v2Components/HtmlEditor/index.js +1 -1
  57. package/v2Components/HtmlEditor/messages.js +95 -85
  58. package/v2Components/HtmlEditor/utils/liquidTemplateSupport.js +99 -101
  59. package/v2Components/HtmlEditor/utils/properSyntaxHighlighting.js +23 -25
  60. package/v2Components/HtmlEditor/utils/validationAdapter.js +34 -41
  61. package/v2Components/MobilePushPreviewV2/index.js +32 -7
  62. package/v2Components/TemplatePreview/_templatePreview.scss +44 -24
  63. package/v2Components/TemplatePreview/index.js +47 -32
  64. package/v2Components/TemplatePreview/messages.js +4 -0
  65. package/v2Components/TestAndPreviewSlidebox/index.js +31 -25
  66. package/v2Containers/App/constants.js +0 -5
  67. package/v2Containers/BeeEditor/index.js +82 -80
  68. package/v2Containers/BeePopupEditor/constants.js +10 -0
  69. package/v2Containers/BeePopupEditor/index.js +193 -0
  70. package/v2Containers/BeePopupEditor/tests/index.test.js +627 -0
  71. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +0 -1
  72. package/v2Containers/CreativesContainer/SlideBoxContent.js +148 -120
  73. package/v2Containers/CreativesContainer/SlideBoxFooter.js +9 -3
  74. package/v2Containers/CreativesContainer/SlideBoxHeader.js +2 -2
  75. package/v2Containers/CreativesContainer/constants.js +1 -2
  76. package/v2Containers/CreativesContainer/index.js +173 -193
  77. package/v2Containers/CreativesContainer/messages.js +4 -4
  78. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +38 -50
  79. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +36 -0
  80. package/v2Containers/Email/actions.js +7 -0
  81. package/v2Containers/Email/constants.js +5 -1
  82. package/v2Containers/Email/index.js +13 -0
  83. package/v2Containers/Email/messages.js +32 -0
  84. package/v2Containers/Email/reducer.js +12 -1
  85. package/v2Containers/Email/sagas.js +41 -6
  86. package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +2 -0
  87. package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +1045 -0
  88. package/v2Containers/EmailWrapper/components/EmailWrapperView.js +193 -7
  89. package/v2Containers/EmailWrapper/components/HTMLEditorTesting.js +40 -74
  90. package/v2Containers/EmailWrapper/components/__tests__/HTMLEditorTesting.test.js +2 -67
  91. package/v2Containers/EmailWrapper/constants.js +2 -0
  92. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +436 -67
  93. package/v2Containers/EmailWrapper/index.js +99 -23
  94. package/v2Containers/EmailWrapper/messages.js +61 -1
  95. package/v2Containers/EmailWrapper/tests/EmailWrapperView.test.js +26 -1
  96. package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +111 -77
  97. package/v2Containers/InApp/__tests__/InAppHTMLEditor.test.js +376 -0
  98. package/v2Containers/InApp/__tests__/sagas.test.js +363 -0
  99. package/v2Containers/InApp/actions.js +7 -0
  100. package/v2Containers/InApp/constants.js +20 -4
  101. package/v2Containers/InApp/index.js +800 -357
  102. package/v2Containers/InApp/index.scss +4 -3
  103. package/v2Containers/InApp/messages.js +7 -3
  104. package/v2Containers/InApp/reducer.js +21 -3
  105. package/v2Containers/InApp/sagas.js +29 -9
  106. package/v2Containers/InApp/selectors.js +25 -5
  107. package/v2Containers/InApp/tests/index.test.js +154 -50
  108. package/v2Containers/InApp/tests/reducer.test.js +34 -0
  109. package/v2Containers/InApp/tests/sagas.test.js +61 -9
  110. package/v2Containers/InApp/tests/selectors.test.js +612 -0
  111. package/v2Containers/InAppWrapper/components/InAppWrapperView.js +162 -0
  112. package/v2Containers/InAppWrapper/components/__tests__/InAppWrapperView.test.js +267 -0
  113. package/v2Containers/InAppWrapper/components/inAppWrapperView.scss +9 -0
  114. package/v2Containers/InAppWrapper/constants.js +16 -0
  115. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +473 -0
  116. package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +198 -0
  117. package/v2Containers/InAppWrapper/index.js +148 -0
  118. package/v2Containers/InAppWrapper/messages.js +49 -0
  119. package/v2Containers/InappAdvance/index.js +1099 -0
  120. package/v2Containers/InappAdvance/index.scss +10 -0
  121. package/v2Containers/InappAdvance/tests/index.test.js +448 -0
  122. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -3
  123. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -2
  124. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -25
  125. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -18
  126. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +12 -46
  127. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +0 -4
  128. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -8
  129. package/v2Containers/TagList/index.js +67 -1
  130. package/v2Containers/Templates/ChannelTypeIllustration.js +1 -13
  131. package/v2Containers/Templates/_templates.scss +56 -200
  132. package/v2Containers/Templates/actions.js +1 -2
  133. package/v2Containers/Templates/constants.js +0 -1
  134. package/v2Containers/Templates/index.js +124 -277
  135. package/v2Containers/Templates/messages.js +4 -24
  136. package/v2Containers/Templates/reducer.js +0 -2
  137. package/v2Containers/Templates/tests/index.test.js +0 -10
  138. package/v2Containers/TemplatesV2/index.js +2 -3
  139. package/v2Containers/TemplatesV2/messages.js +0 -4
  140. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -132
  141. package/v2Components/CapImageUrlUpload/constants.js +0 -19
  142. package/v2Components/CapImageUrlUpload/index.js +0 -455
  143. package/v2Components/CapImageUrlUpload/index.scss +0 -35
  144. package/v2Components/CapImageUrlUpload/messages.js +0 -47
  145. package/v2Containers/WebPush/Create/components/ButtonForm.js +0 -175
  146. package/v2Containers/WebPush/Create/components/ButtonItem.js +0 -101
  147. package/v2Containers/WebPush/Create/components/ButtonList.js +0 -144
  148. package/v2Containers/WebPush/Create/components/_buttons.scss +0 -246
  149. package/v2Containers/WebPush/Create/components/tests/ButtonForm.test.js +0 -554
  150. package/v2Containers/WebPush/Create/components/tests/ButtonItem.test.js +0 -607
  151. package/v2Containers/WebPush/Create/components/tests/ButtonList.test.js +0 -633
  152. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonForm.test.js.snap +0 -666
  153. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonItem.test.js.snap +0 -74
  154. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonList.test.js.snap +0 -80
  155. package/v2Containers/WebPush/Create/index.js +0 -1755
  156. package/v2Containers/WebPush/Create/index.scss +0 -123
  157. package/v2Containers/WebPush/Create/messages.js +0 -199
  158. package/v2Containers/WebPush/Create/preview/DevicePreviewContent.js +0 -241
  159. package/v2Containers/WebPush/Create/preview/NotificationContainer.js +0 -290
  160. package/v2Containers/WebPush/Create/preview/PreviewContent.js +0 -81
  161. package/v2Containers/WebPush/Create/preview/PreviewControls.js +0 -240
  162. package/v2Containers/WebPush/Create/preview/PreviewDisclaimer.js +0 -23
  163. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +0 -144
  164. package/v2Containers/WebPush/Create/preview/assets/Light.svg +0 -53
  165. package/v2Containers/WebPush/Create/preview/assets/Top.svg +0 -5
  166. package/v2Containers/WebPush/Create/preview/assets/chrome-icon.png +0 -0
  167. package/v2Containers/WebPush/Create/preview/assets/edge-icon.png +0 -0
  168. package/v2Containers/WebPush/Create/preview/assets/firefox-icon.svg +0 -106
  169. package/v2Containers/WebPush/Create/preview/assets/iOS.svg +0 -26
  170. package/v2Containers/WebPush/Create/preview/assets/opera-icon.svg +0 -18
  171. package/v2Containers/WebPush/Create/preview/assets/safari-icon.svg +0 -29
  172. package/v2Containers/WebPush/Create/preview/components/AndroidMobileChromeHeader.js +0 -44
  173. package/v2Containers/WebPush/Create/preview/components/AndroidMobileExpanded.js +0 -110
  174. package/v2Containers/WebPush/Create/preview/components/IOSHeader.js +0 -45
  175. package/v2Containers/WebPush/Create/preview/components/NotificationExpandedContent.js +0 -72
  176. package/v2Containers/WebPush/Create/preview/components/NotificationHeader.js +0 -55
  177. package/v2Containers/WebPush/Create/preview/components/WindowsChromeExpanded.js +0 -70
  178. package/v2Containers/WebPush/Create/preview/components/tests/AndroidMobileExpanded.test.js +0 -512
  179. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/AndroidMobileExpanded.test.js.snap +0 -77
  180. package/v2Containers/WebPush/Create/preview/config/notificationMappings.js +0 -527
  181. package/v2Containers/WebPush/Create/preview/constants.js +0 -162
  182. package/v2Containers/WebPush/Create/preview/notification-container.scss +0 -104
  183. package/v2Containers/WebPush/Create/preview/preview.scss +0 -409
  184. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-chrome.scss +0 -300
  185. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-edge.scss +0 -12
  186. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-firefox.scss +0 -12
  187. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-opera.scss +0 -12
  188. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-chrome.scss +0 -303
  189. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-edge.scss +0 -11
  190. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-firefox.scss +0 -11
  191. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-opera.scss +0 -11
  192. package/v2Containers/WebPush/Create/preview/styles/_base.scss +0 -188
  193. package/v2Containers/WebPush/Create/preview/styles/_ios.scss +0 -106
  194. package/v2Containers/WebPush/Create/preview/styles/_ipados.scss +0 -107
  195. package/v2Containers/WebPush/Create/preview/styles/_macos-chrome.scss +0 -75
  196. package/v2Containers/WebPush/Create/preview/styles/_windows-chrome.scss +0 -174
  197. package/v2Containers/WebPush/Create/preview/tests/DevicePreviewContent.test.js +0 -909
  198. package/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +0 -1077
  199. package/v2Containers/WebPush/Create/preview/tests/PreviewControls.test.js +0 -723
  200. package/v2Containers/WebPush/Create/preview/tests/WebPushPreview.test.js +0 -943
  201. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/DevicePreviewContent.test.js.snap +0 -128
  202. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/NotificationContainer.test.js.snap +0 -121
  203. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/PreviewControls.test.js.snap +0 -144
  204. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/WebPushPreview.test.js.snap +0 -127
  205. package/v2Containers/WebPush/Create/utils/urlValidation.js +0 -116
  206. package/v2Containers/WebPush/Create/utils/urlValidation.test.js +0 -449
  207. package/v2Containers/WebPush/actions.js +0 -60
  208. package/v2Containers/WebPush/constants.js +0 -108
  209. package/v2Containers/WebPush/index.js +0 -2
  210. package/v2Containers/WebPush/reducer.js +0 -104
  211. package/v2Containers/WebPush/sagas.js +0 -119
  212. package/v2Containers/WebPush/selectors.js +0 -65
  213. package/v2Containers/WebPush/tests/reducer.test.js +0 -863
  214. package/v2Containers/WebPush/tests/sagas.test.js +0 -566
  215. package/v2Containers/WebPush/tests/selectors.test.js +0 -960
@@ -40,6 +40,7 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
40
40
  tags: [],
41
41
  tagsError: false,
42
42
  currentContext: null, // Track current context to detect changes
43
+ hasTriggeredInitialApiCall: false, // Track if we've triggered API call when popover opens
43
44
  };
44
45
  this.renderTags = this.renderTags.bind(this);
45
46
  this.populateTags = this.populateTags.bind(this);
@@ -51,6 +52,14 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
51
52
 
52
53
  componentDidMount() {
53
54
  this.generateTags(this.props);
55
+ // Trigger initial API call if tags are empty (similar to Email/SMS behavior)
56
+ const { tags, injectedTags, onContextChange } = this.props;
57
+ const hasNoTags = (!tags || tags.length === 0) && _.isEmpty(injectedTags);
58
+ if (hasNoTags && onContextChange) {
59
+ // Trigger API call with default 'Outbound' context to match CapTagList default
60
+ // This ensures tags are loaded when component mounts
61
+ this.getTagsforContext('Outbound');
62
+ }
54
63
  }
55
64
 
56
65
  componentWillReceiveProps(nextProps) {
@@ -76,6 +85,10 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
76
85
  if (!_.isEqual(nextTags, currentTags)) {
77
86
  this.setState({loading: false});
78
87
  this.clearLoadingTimeout();
88
+ // Reset the flag when tags are received, so we can trigger API call again if needed
89
+ if (nextTags && nextTags.length > 0) {
90
+ this.setState({ hasTriggeredInitialApiCall: false });
91
+ }
79
92
  }
80
93
  if (fetchingSchemaError) {
81
94
  this.setState({tagsError: fetchingSchemaError, loading: false});
@@ -109,6 +122,11 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
109
122
  };
110
123
 
111
124
  getTagsforContext = (data) => {
125
+ console.log('TagList getTagsforContext called', {
126
+ data,
127
+ hasOnContextChange: !!this.props.onContextChange,
128
+ });
129
+
112
130
  // Set loading state when context change is requested
113
131
  this.setState({loading: true, currentContext: data});
114
132
 
@@ -119,9 +137,54 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
119
137
  }, 5000); // Reduced timeout to 5 seconds for better UX
120
138
 
121
139
  const { onContextChange } = this.props;
122
- onContextChange(data);
140
+ // Always call onContextChange if available - this triggers the API call
141
+ // The API call will fetch tags from /meta/TAG endpoint
142
+ if (onContextChange) {
143
+ console.log('TagList: Calling onContextChange with data:', data);
144
+ onContextChange(data);
145
+ } else {
146
+ console.warn('TagList: onContextChange is not available. API call will not be triggered.');
147
+ }
123
148
  }
124
149
 
150
+ handlePopoverVisibilityChange = (visible) => {
151
+ console.log('TagList handlePopoverVisibilityChange called', {
152
+ visible,
153
+ hasOnContextChange: !!this.props.onContextChange,
154
+ });
155
+
156
+ // When popover opens, trigger API call if tags are empty or if we haven't triggered it yet
157
+ // This ensures API call happens when user clicks "Add Label" button
158
+ if (visible && this.props.onContextChange) {
159
+ const { tags, injectedTags } = this.props;
160
+ // Check if tags array is empty or if state tags are empty
161
+ const hasNoTags = (!tags || tags.length === 0) && _.isEmpty(injectedTags);
162
+ const hasNoStateTags = _.isEmpty(this.state.tags);
163
+ const hasNotTriggeredApiCall = !this.state.hasTriggeredInitialApiCall;
164
+
165
+ console.log('TagList: Checking conditions for API call', {
166
+ hasNoTags,
167
+ hasNoStateTags,
168
+ hasNotTriggeredApiCall,
169
+ willTrigger: (hasNoTags || hasNoStateTags || hasNotTriggeredApiCall),
170
+ });
171
+
172
+ // Trigger API call if tags are not loaded yet OR if we haven't triggered it yet
173
+ if ((hasNoTags || hasNoStateTags || hasNotTriggeredApiCall)) {
174
+ // Mark that we've triggered the API call
175
+ this.setState({ hasTriggeredInitialApiCall: true });
176
+ console.log('TagList: Triggering API call with Outbound context');
177
+ // Trigger API call with default 'Outbound' context to match CapTagList default
178
+ // This will call onContextChange which triggers handleOnTagsContextChange in InApp
179
+ this.getTagsforContext('Outbound');
180
+ } else {
181
+ console.log('TagList: API call not triggered - conditions not met');
182
+ }
183
+ } else {
184
+ console.log('TagList: API call not triggered - popover not visible or onContextChange not available');
185
+ }
186
+ };
187
+
125
188
  generateTags = (props) => {
126
189
  let tags = {};
127
190
  let injectedTags = {};
@@ -366,12 +429,14 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
366
429
  visibleTaglist={this.props.visibleTaglist}
367
430
  hidePopover={this.props.hidePopover}
368
431
  onContextChange={this.getTagsforContext}
432
+ onVisibleChange={this.handlePopoverVisibilityChange}
369
433
  moduleFilterEnabled={this.props.moduleFilterEnabled}
370
434
  modalProps={this.props.modalProps}
371
435
  currentOrgDetails={this.props.currentOrgDetails}
372
436
  channel={this.props.channel}
373
437
  disabled={this.props.disabled}
374
438
  fetchingSchemaError={this?.state?.tagsError}
439
+ popoverPlacement={this.props.popoverPlacement}
375
440
  />
376
441
  </div>
377
442
  );
@@ -402,6 +467,7 @@ TagList.propTypes = {
402
467
  disabled: PropTypes.bool,
403
468
  fetchingSchemaError: PropTypes.bool,
404
469
  eventContextTags: PropTypes.array,
470
+ popoverPlacement: PropTypes.string,
405
471
  intl: PropTypes.shape({
406
472
  formatMessage: PropTypes.func.isRequired,
407
473
  locale: PropTypes.string,
@@ -14,7 +14,7 @@ import inAppIllustration from '@capillarytech/cap-ui-library/assets/images/featu
14
14
  import messages from './messages';
15
15
  import { FormattedMessage } from 'react-intl';
16
16
  import { CapIllustration } from "@capillarytech/cap-ui-library";
17
- import { MOBILE_PUSH, SMS, EMAIL, LINE, VIBER, FACEBOOK, WHATSAPP, RCS, ZALO, INAPP, WEBPUSH } from '../CreativesContainer/constants';
17
+ import { MOBILE_PUSH, SMS, EMAIL, LINE, VIBER, FACEBOOK, WHATSAPP, RCS, ZALO, INAPP } from '../CreativesContainer/constants';
18
18
 
19
19
 
20
20
  // Configuration object for channel types
@@ -133,18 +133,6 @@ function ChannelTypeIllustration(props) {
133
133
  };
134
134
  }
135
135
 
136
- if (type === WEBPUSH) {
137
- return {
138
- buttonLabel: <FormattedMessage {...messages.newWebPushTemplate} values={{ template: templateText }} />,
139
- onClick: createTemplate,
140
- illustrationImage: pushIllustration,
141
- title: <FormattedMessage {...messages.webPushTitleIllustration} values={{ template: templateText }} />,
142
- description: <FormattedMessage {...messages.webPushDescIllustration} />,
143
- descriptionPosition: 'bottom',
144
- descriptionClassName: 'illustration-desc',
145
- };
146
- }
147
-
148
136
  // Handle standard channels using configuration
149
137
  const config = CHANNEL_CONFIG[type];
150
138
  if (!config) {
@@ -133,20 +133,17 @@
133
133
  .ant-card-meta-description{
134
134
  display: -webkit-box;
135
135
  -webkit-line-clamp: 13;
136
- line-clamp: 13;
137
136
  -webkit-box-orient: vertical;
138
137
  }
139
138
  }
140
139
  .truncate-text-with-button{
141
140
  .ant-card-meta-description{
142
141
  -webkit-line-clamp: 13;
143
- line-clamp: 13;
144
142
  }
145
143
  }
146
144
  .truncate-text-with-image{
147
145
  .ant-card-meta-description{
148
146
  -webkit-line-clamp: 3;
149
- line-clamp: 3;
150
147
  }
151
148
  }
152
149
 
@@ -316,72 +313,63 @@
316
313
  }
317
314
  }
318
315
  }
319
- }
320
-
321
- .WEBPUSH {
322
- .cap-custom-card {
323
- .ant-card-body {
324
- height: 19rem;
325
- padding: $CAP_SPACE_16;
326
- overflow: hidden;
327
-
328
- .ant-card-meta {
329
- height: 100%;
330
-
331
- .ant-card-meta-description {
332
- height: 100%;
333
- display: flex;
334
- flex-direction: column;
335
-
336
- .sms-template-content.webpush-template-content {
337
- height: 100%;
338
- overflow: hidden;
339
-
340
- .webpush-template-card {
341
- height: 100%;
342
- overflow: hidden;
343
-
344
- .webpush-template-meta {
345
- flex-shrink: 0;
346
- }
347
-
348
- .webpush-template-text {
349
- flex: 1;
350
- min-height: 0;
351
- overflow: hidden;
352
- }
353
-
354
- .webpush-media-image {
355
- max-height: 7.142rem;
356
- flex-shrink: 0;
357
- }
358
-
359
- .webpush-template-cta-section {
360
- flex-shrink: 0;
361
- margin-top: $CAP_SPACE_08;
362
- padding-top: $CAP_SPACE_08;
363
- border-top: 1px solid $CAP_G07;
364
- }
365
- }
366
- }
367
- }
368
- }
316
+ .INAPP {
317
+ margin-bottom: $CAP_SPACE_12;
318
+ .inapp-container {
319
+ margin-top: $CAP_SPACE_24;
369
320
  }
321
+ // Modal Layout - centered
322
+ .inapp-modal-layout {
323
+ position: absolute;
324
+ display: flex;
325
+ width: 12rem;
326
+ top: 10%;
327
+ left: 10%;
328
+ bottom: 5%;
329
+ overflow: hidden;
330
+ background-color: $CAP_WHITE;
331
+ border-radius: $CAP_SPACE_08;
370
332
  }
371
-
372
- .cap-custom-card.has-hover-option:hover {
373
- .sms-template-content.webpush-template-content {
374
- opacity: 0.2;
375
- }
333
+
334
+ // Full Screen Layout
335
+ .inapp-fullscreen-layout {
336
+ position: absolute;
337
+ display: flex;
338
+ width: 12rem;
339
+ left: 10%;
340
+ top: 1%;
341
+ bottom: 1%;
342
+ overflow: hidden;
343
+ background-color: $CAP_WHITE;
344
+ border-radius: $CAP_SPACE_08;
345
+ }
346
+
347
+ // Top Banner Layout
348
+ .inapp-top-banner-layout {
349
+ position: absolute;
350
+ display: flex;
351
+ width: 12rem;
352
+ left: 10%;
353
+ top: 1%;
354
+ bottom: 20%;
355
+ overflow: hidden;
356
+ background-color: $CAP_WHITE;
357
+ border-radius: $CAP_SPACE_08;
358
+ }
359
+
360
+ // Bottom Banner Layout
361
+ .inapp-bottom-banner-layout {
362
+ position: absolute;
363
+ display: flex;
364
+ justify-content: center;
365
+ width: 12rem;
366
+ left: 10%;
367
+ top: 50%;
368
+ bottom: 2%;
369
+ overflow: hidden;
370
+ background-color: $CAP_WHITE;
371
+ border-radius: $CAP_SPACE_08;
376
372
  }
377
-
378
- &.no-image .ant-card-meta {
379
- background: $CAP_WHITE;
380
- padding: $CAP_SPACE_16;
381
-
382
- .ant-card-meta-description {
383
- height: 100%;
384
- }
385
373
  }
386
374
  }
387
375
 
@@ -438,134 +426,6 @@
438
426
  width: 100%;
439
427
  }
440
428
 
441
- .sms-template-content.webpush-template-content {
442
- padding: 0;
443
- }
444
-
445
- .webpush-template-card {
446
- display: flex;
447
- flex-direction: column;
448
-
449
- .webpush-template-meta {
450
- display: flex;
451
- align-items: flex-start;
452
- gap: $CAP_SPACE_08;
453
- }
454
-
455
- .webpush-brand-icon,
456
- .webpush-brand-icon-placeholder {
457
- width: $CAP_SPACE_20;
458
- height: $CAP_SPACE_20;
459
- border-radius: 50%;
460
- flex-shrink: 0;
461
- object-fit: cover;
462
- }
463
-
464
- .webpush-brand-icon-placeholder {
465
- background-color: $CAP_G07;
466
- }
467
-
468
- .webpush-template-text {
469
- display: flex;
470
- flex-direction: column;
471
- gap: $CAP_SPACE_04;
472
- width: 100%;
473
- }
474
-
475
- .webpush-template-header {
476
- display: flex;
477
- align-items: flex-start;
478
- justify-content: space-between;
479
- gap: $CAP_SPACE_08;
480
- }
481
-
482
- .webpush-template-title {
483
- width: 1px; // Required for text truncation with flex: 1
484
- font-weight: 600;
485
- color: $CAP_G02;
486
- font-size: $FONT_SIZE_S;
487
- line-height: $CAP_SPACE_16;
488
- word-break: break-word;
489
- flex: 1;
490
- overflow: hidden;
491
- text-overflow: ellipsis;
492
- white-space: nowrap;
493
- }
494
-
495
- .webpush-template-time {
496
- color: $CAP_G04;
497
- font-size: $FONT_SIZE_VS;
498
- line-height: $CAP_SPACE_16;
499
- white-space: nowrap;
500
- flex-shrink: 0;
501
- }
502
-
503
- .webpush-template-message {
504
- color: $CAP_G04;
505
- font-size: $FONT_SIZE_S;
506
- line-height: $CAP_SPACE_16;
507
- word-break: break-word;
508
- display: -webkit-box;
509
- -webkit-line-clamp: 3;
510
- line-clamp: 3;
511
- -webkit-box-orient: vertical;
512
- overflow: hidden;
513
- text-overflow: ellipsis;
514
- }
515
-
516
- .webpush-media-image {
517
- width: 100%;
518
- height: auto;
519
- max-height: 8.571rem;
520
- border-radius: $CAP_SPACE_08;
521
- object-fit: cover;
522
- margin-top: $CAP_SPACE_04;
523
- }
524
-
525
- .webpush-template-cta-section {
526
- display: flex;
527
- margin-top: $CAP_SPACE_08;
528
- padding-top: $CAP_SPACE_08;
529
- width: 100%;
530
-
531
- &.single-cta {
532
- justify-content: center;
533
-
534
- .webpush-template-cta-item {
535
- flex: 0 1 auto;
536
- }
537
- }
538
-
539
- .webpush-template-cta-item {
540
- flex: 1;
541
- padding: 0 $CAP_SPACE_08;
542
- display: flex;
543
- align-items: center;
544
- justify-content: center;
545
- }
546
-
547
- .webpush-template-cta-item + .webpush-template-cta-item {
548
- border-left: 1px solid $CAP_G07;
549
- }
550
-
551
- .webpush-template-cta-text {
552
- font-weight: 600;
553
- font-size: $FONT_SIZE_VS;
554
- line-height: 1rem;
555
- color: $CAP_G02;
556
- text-align: center;
557
- white-space: nowrap;
558
- overflow: hidden;
559
- text-overflow: ellipsis;
560
- width: 100%;
561
- user-select: none;
562
- -webkit-user-select: none;
563
- -moz-user-select: none;
564
- -ms-user-select: none;
565
- }
566
- }
567
- }
568
-
569
429
  .footer-container{
570
430
  padding: 8px 0 8px 16px;
571
431
  }
@@ -770,7 +630,6 @@
770
630
  text-overflow: ellipsis;
771
631
  display: -webkit-box;
772
632
  -webkit-line-clamp: 3;
773
- line-clamp: 3;
774
633
  -webkit-box-orient: vertical;
775
634
  }
776
635
  .title{
@@ -833,7 +692,6 @@
833
692
  text-overflow: ellipsis;
834
693
  display: -webkit-box;
835
694
  -webkit-line-clamp: 2;
836
- line-clamp: 2;
837
695
  -webkit-box-orient: vertical;
838
696
  }
839
697
  .actions{
@@ -895,7 +753,8 @@
895
753
  }
896
754
 
897
755
  .whatsapp-filters,
898
- .zalo-filters {
756
+ .zalo-filters,
757
+ .inapp-filters {
899
758
  display: flex;
900
759
  width: 100%;
901
760
  padding-left: 8px;
@@ -911,7 +770,6 @@
911
770
  overflow: hidden;
912
771
  &.desc{
913
772
  -webkit-line-clamp: 5;
914
- line-clamp: 5;
915
773
  }
916
774
  }
917
775
 
@@ -1009,7 +867,6 @@
1009
867
  .whatsapp-message-with-media {
1010
868
  display: -webkit-box;
1011
869
  -webkit-line-clamp: 3;
1012
- line-clamp: 3;
1013
870
  -webkit-box-orient: vertical;
1014
871
  overflow: hidden;
1015
872
  }
@@ -1017,7 +874,6 @@
1017
874
  .whatsapp-message-without-media {
1018
875
  display: -webkit-box;
1019
876
  -webkit-line-clamp: 10;
1020
- line-clamp: 10;
1021
877
  -webkit-box-orient: vertical;
1022
878
  overflow: hidden;
1023
879
  }
@@ -6,7 +6,7 @@
6
6
 
7
7
  import * as types from './constants';
8
8
  import {
9
- LINE, WHATSAPP, RCS, ZALO, WEBPUSH,
9
+ LINE, WHATSAPP, RCS, ZALO,
10
10
  } from '../CreativesContainer/constants';
11
11
 
12
12
  export function getAllTemplates(channel, queryParams, intlCopyOf = '') {
@@ -68,7 +68,6 @@ export function setChannelAccount(channel, account) {
68
68
  [LINE]: types.SET_LINE_ACCOUNT,
69
69
  [WHATSAPP]: types.SET_WHATSAPP_ACCOUNT,
70
70
  [ZALO]: types.SET_ZALO_ACCOUNT,
71
- [WEBPUSH]: types.SET_WEBPUSH_ACCOUNT,
72
71
  [RCS]: types.SET_RCS_ACCOUNT,
73
72
  };
74
73
 
@@ -51,7 +51,6 @@ export const SET_FACEBOOK_ACCOUNT = "app/v2Containers/Templates/SET_FACEBOOK_ACC
51
51
  export const SET_WHATSAPP_ACCOUNT = "app/v2Containers/Templates/SET_WHATSAPP_ACCOUNT";
52
52
  export const SET_RCS_ACCOUNT = "app/v2Containers/Templates/SET_RCS_ACCOUNT";
53
53
  export const SET_ZALO_ACCOUNT = "app/v2Containers/Templates/SET_ZALO_ACCOUNT";
54
- export const SET_WEBPUSH_ACCOUNT = "app/v2Containers/Templates/SET_WEBPUSH_ACCOUNT";
55
54
 
56
55
  export const GET_DEAFULT_BEE_TEMPLATES_REQUEST = 'app/v2Containers/Templates/GET_DEAFULT_BEE_TEMPLATES_REQUEST';
57
56
  export const GET_DEAFULT_BEE_TEMPLATES_SUCCESS = 'app/v2Containers/Templates/GET_DEAFULT_BEE_TEMPLATES_SUCCESS';