@capillarytech/creatives-library 8.0.345-alpha.14 → 8.0.345-alpha.15
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/constants/unified.js +29 -0
- package/package.json +1 -1
- package/services/tests/api.test.js +13 -0
- package/utils/commonUtils.js +19 -1
- package/utils/rcsPayloadUtils.js +92 -0
- package/utils/templateVarUtils.js +201 -0
- package/utils/tests/templateVarUtils.test.js +204 -0
- package/v2Components/CapActionButton/constants.js +7 -0
- package/v2Components/CapActionButton/index.js +167 -109
- package/v2Components/CapActionButton/index.scss +157 -6
- package/v2Components/CapActionButton/messages.js +19 -3
- package/v2Components/CapActionButton/tests/index.test.js +41 -17
- package/v2Components/CapTagList/index.js +10 -0
- package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +70 -49
- package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +8 -2
- package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +207 -21
- package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +16 -0
- package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +85 -10
- package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +30 -0
- package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +79 -11
- package/v2Components/CommonTestAndPreview/SendTestMessage.js +10 -5
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +160 -15
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +18 -0
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +341 -76
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +133 -4
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +11 -0
- package/v2Components/CommonTestAndPreview/constants.js +38 -2
- package/v2Components/CommonTestAndPreview/index.js +676 -186
- package/v2Components/CommonTestAndPreview/messages.js +49 -3
- package/v2Components/CommonTestAndPreview/previewApiUtils.js +59 -0
- package/v2Components/CommonTestAndPreview/sagas.js +15 -6
- package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +308 -284
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +231 -65
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +118 -5
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +341 -0
- package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +8 -1
- package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +34 -13
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +281 -283
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +199 -1
- package/v2Components/CommonTestAndPreview/tests/index.test.js +132 -4
- package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +67 -0
- package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
- package/v2Components/FormBuilder/index.js +8 -10
- package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +87 -0
- package/v2Components/SmsFallback/constants.js +73 -0
- package/v2Components/SmsFallback/index.js +955 -0
- package/v2Components/SmsFallback/index.scss +265 -0
- package/v2Components/SmsFallback/messages.js +78 -0
- package/v2Components/SmsFallback/smsFallbackUtils.js +118 -0
- package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +50 -0
- package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +147 -0
- package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +304 -0
- package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +197 -0
- package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +277 -0
- package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +422 -0
- package/v2Components/SmsFallback/useLocalTemplateList.js +92 -0
- package/v2Components/TemplatePreview/_templatePreview.scss +33 -23
- package/v2Components/TemplatePreview/constants.js +2 -0
- package/v2Components/TemplatePreview/index.js +143 -28
- package/v2Components/TemplatePreview/tests/index.test.js +142 -0
- package/v2Components/TestAndPreviewSlidebox/index.js +13 -1
- package/v2Components/TestAndPreviewSlidebox/sagas.js +11 -4
- package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +3 -1
- package/v2Components/VarSegmentMessageEditor/constants.js +2 -0
- package/v2Components/VarSegmentMessageEditor/index.js +125 -0
- package/v2Components/VarSegmentMessageEditor/index.scss +46 -0
- package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +43 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +36 -4
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +10 -1
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +29 -4
- package/v2Containers/CreativesContainer/constants.js +9 -0
- package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +67 -0
- package/v2Containers/CreativesContainer/index.js +300 -103
- package/v2Containers/CreativesContainer/index.scss +51 -1
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +90 -0
- package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +78 -34
- package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +79 -16
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +8 -0
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +357 -98
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +20 -15
- package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +258 -0
- package/v2Containers/CreativesContainer/tests/index.test.js +71 -9
- package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +125 -0
- package/v2Containers/Email/reducer.js +3 -11
- package/v2Containers/Email/sagas.js +5 -9
- package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +0 -4
- package/v2Containers/Email/tests/sagas.test.js +3 -21
- package/v2Containers/Rcs/constants.js +119 -8
- package/v2Containers/Rcs/index.js +2379 -807
- package/v2Containers/Rcs/index.js.rej +1336 -0
- package/v2Containers/Rcs/index.scss +276 -6
- package/v2Containers/Rcs/index.scss.rej +74 -0
- package/v2Containers/Rcs/messages.js +38 -3
- package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +225 -0
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +98018 -70073
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +0 -5
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +128 -0
- package/v2Containers/Rcs/tests/index.test.js +152 -121
- package/v2Containers/Rcs/tests/mockData.js +38 -0
- package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +318 -0
- package/v2Containers/Rcs/tests/utils.test.js +646 -30
- package/v2Containers/Rcs/utils.js +478 -11
- package/v2Containers/Sms/Create/index.js +100 -40
- package/v2Containers/Sms/smsFormDataHelpers.js +67 -0
- package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +253 -0
- package/v2Containers/SmsTrai/Create/index.js +9 -4
- package/v2Containers/SmsTrai/Edit/constants.js +2 -0
- package/v2Containers/SmsTrai/Edit/index.js +636 -130
- package/v2Containers/SmsTrai/Edit/index.scss +121 -0
- package/v2Containers/SmsTrai/Edit/messages.js +14 -4
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4328 -2375
- package/v2Containers/SmsWrapper/index.js +37 -8
- package/v2Containers/TagList/index.js +6 -0
- package/v2Containers/Templates/TemplatesActionBar.js +101 -0
- package/v2Containers/Templates/_templates.scss +163 -2
- package/v2Containers/Templates/actions.js +11 -0
- package/v2Containers/Templates/constants.js +2 -0
- package/v2Containers/Templates/index.js +119 -54
- package/v2Containers/Templates/sagas.js +57 -12
- package/v2Containers/Templates/tests/TemplatesActionBar.test.js +120 -0
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1043 -1079
- package/v2Containers/Templates/tests/sagas.test.js +193 -123
- package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +180 -0
- package/v2Containers/Templates/utils/smsTemplatesListApi.js +79 -0
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +72 -1
- package/v2Containers/TemplatesV2/index.js +86 -23
- package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +131 -0
- package/v2Containers/Whatsapp/index.js +3 -20
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +578 -34
|
@@ -10,12 +10,14 @@ import { isTraiDLTEnable } from '../../utils/common';
|
|
|
10
10
|
import SmsEdit from '../Sms/Edit';
|
|
11
11
|
import SmsTraiCreate from '../SmsTrai/Create';
|
|
12
12
|
import SmsTraiEdit from '../SmsTrai/Edit';
|
|
13
|
+
|
|
13
14
|
const SmsWrapper = (props) => {
|
|
14
15
|
const {
|
|
15
16
|
isCreateSms,
|
|
16
17
|
isEditSms,
|
|
17
18
|
setIsLoadingContent,
|
|
18
19
|
location,
|
|
20
|
+
route: routeFromProps,
|
|
19
21
|
isGetFormData,
|
|
20
22
|
getFormSubscriptionData,
|
|
21
23
|
isFullMode,
|
|
@@ -38,15 +40,33 @@ const SmsWrapper = (props) => {
|
|
|
38
40
|
handleCloseTestAndPreview,
|
|
39
41
|
isTestAndPreviewMode,
|
|
40
42
|
onValidationFail,
|
|
43
|
+
embeddedSmsFallback = false,
|
|
44
|
+
onEmbeddedSmsFooterValidity,
|
|
45
|
+
forceFullTagContext = false,
|
|
41
46
|
} = props;
|
|
42
47
|
|
|
48
|
+
/** FormBuilder / SMS Create assume `location.query`; connected-router shapes may omit it. */
|
|
49
|
+
const smsLocation = (() => {
|
|
50
|
+
const loc = location || {};
|
|
51
|
+
const q = loc.query;
|
|
52
|
+
if (q && typeof q === 'object') {
|
|
53
|
+
return { ...loc, query: { ...q } };
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
pathname: loc.pathname || '/sms/create',
|
|
57
|
+
search: loc.search || '',
|
|
58
|
+
query: { type: 'embedded', module: 'library' },
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
61
|
+
|
|
43
62
|
const smsProps = {
|
|
44
63
|
onCreateComplete,
|
|
45
64
|
setIsLoadingContent,
|
|
46
|
-
location,
|
|
47
|
-
route: { name: 'sms' },
|
|
65
|
+
location: smsLocation,
|
|
66
|
+
route: routeFromProps || { name: 'sms' },
|
|
48
67
|
isGetFormData,
|
|
49
68
|
getFormSubscriptionData,
|
|
69
|
+
templateData,
|
|
50
70
|
getDefaultTags,
|
|
51
71
|
isFullMode,
|
|
52
72
|
forwardedTags,
|
|
@@ -62,24 +82,33 @@ const SmsWrapper = (props) => {
|
|
|
62
82
|
handleCloseTestAndPreview,
|
|
63
83
|
isTestAndPreviewMode,
|
|
64
84
|
onValidationFail,
|
|
85
|
+
forceFullTagContext,
|
|
86
|
+
embeddedSmsFallback,
|
|
87
|
+
onEmbeddedSmsFooterValidity,
|
|
88
|
+
...(embeddedSmsFallback
|
|
89
|
+
? {
|
|
90
|
+
tagListGetPopupContainer: () => document.body,
|
|
91
|
+
tagListPopoverOverlayStyle: { zIndex: 10020 },
|
|
92
|
+
tagListPopoverOverlayClassName: 'sms-fallback-taglist-popover rcs-sms-fallback-taglist-popover',
|
|
93
|
+
}
|
|
94
|
+
: {}),
|
|
65
95
|
};
|
|
66
|
-
const
|
|
96
|
+
const useTraiSmsFlow = isTraiDLTEnable(isFullMode, smsRegister);
|
|
67
97
|
return <>
|
|
68
98
|
{
|
|
69
|
-
isCreateSms && (
|
|
99
|
+
isCreateSms && (useTraiSmsFlow ?
|
|
70
100
|
<SmsTraiCreate
|
|
71
101
|
isComponent
|
|
72
102
|
{...smsProps}
|
|
73
103
|
onShowTemplates={onShowTemplates}
|
|
74
104
|
/> :
|
|
75
105
|
<SmsCreate
|
|
76
|
-
isComponent
|
|
77
|
-
|
|
78
|
-
}
|
|
106
|
+
isComponent
|
|
107
|
+
{...smsProps}
|
|
79
108
|
/>
|
|
80
109
|
)
|
|
81
110
|
}
|
|
82
|
-
{isEditSms && (
|
|
111
|
+
{isEditSms && (useTraiSmsFlow ?
|
|
83
112
|
<SmsTraiEdit
|
|
84
113
|
{...smsProps}
|
|
85
114
|
params={{id: templateData._id}}
|
|
@@ -477,6 +477,9 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
477
477
|
disableTooltipMsg={tooltipMsg}
|
|
478
478
|
fetchingSchemaError={this?.state?.tagsError}
|
|
479
479
|
popoverPlacement={this.props.popoverPlacement}
|
|
480
|
+
overlayStyle={this.props.popoverOverlayStyle}
|
|
481
|
+
overlayClassName={this.props.popoverOverlayClassName}
|
|
482
|
+
getPopupContainer={this.props.getPopupContainer}
|
|
480
483
|
/>
|
|
481
484
|
</div>
|
|
482
485
|
);
|
|
@@ -513,6 +516,9 @@ TagList.propTypes = {
|
|
|
513
516
|
// message to show when Add Label button is disabled (e.g. personalization restriction)
|
|
514
517
|
disableTooltipMsg: PropTypes.string,
|
|
515
518
|
restrictPersonalization: PropTypes.bool,
|
|
519
|
+
popoverOverlayStyle: PropTypes.object,
|
|
520
|
+
popoverOverlayClassName: PropTypes.string,
|
|
521
|
+
getPopupContainer: PropTypes.func,
|
|
516
522
|
intl: PropTypes.shape({
|
|
517
523
|
formatMessage: PropTypes.func.isRequired,
|
|
518
524
|
locale: PropTypes.string,
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import CapInput from '@capillarytech/cap-ui-library/CapInput';
|
|
4
|
+
import CapButton from '@capillarytech/cap-ui-library/CapButton';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Reusable action bar for template pickers.
|
|
8
|
+
* Layout and spacing live in `_templates.scss` (`.action-container`, `.action-container__toolbar-row`).
|
|
9
|
+
* Default search field width: `.action-container__toolbar-row .search-text` (13.125rem).
|
|
10
|
+
* Pass `searchInputClassName` / `searchInputStyle` to override (defaults match Templates list: 210px per master).
|
|
11
|
+
*/
|
|
12
|
+
const TemplatesActionBar = ({
|
|
13
|
+
searchValue,
|
|
14
|
+
onSearchChange,
|
|
15
|
+
onSearch,
|
|
16
|
+
onClear,
|
|
17
|
+
searchPlaceholder,
|
|
18
|
+
searchInputClassName,
|
|
19
|
+
searchInputStyle,
|
|
20
|
+
ctaLabel,
|
|
21
|
+
onCtaClick,
|
|
22
|
+
ctaDisabled,
|
|
23
|
+
ctaClassName,
|
|
24
|
+
ctaNode,
|
|
25
|
+
children,
|
|
26
|
+
showCta = true,
|
|
27
|
+
}) => (
|
|
28
|
+
<div className="action-container">
|
|
29
|
+
<div className="action-container__toolbar-row">
|
|
30
|
+
{searchPlaceholder && (
|
|
31
|
+
<CapInput.Search
|
|
32
|
+
className={['search-text', searchInputClassName].filter(Boolean).join(' ')}
|
|
33
|
+
placeholder={searchPlaceholder}
|
|
34
|
+
value={searchValue}
|
|
35
|
+
onChange={onSearchChange}
|
|
36
|
+
/* antd `Input` (used by CapInput.Search) has no `onSearch`; only `Input.Search` does. */
|
|
37
|
+
onPressEnter={(e) => {
|
|
38
|
+
if (onSearch) {
|
|
39
|
+
const v = e?.target && 'value' in e.target ? e.target.value : searchValue;
|
|
40
|
+
onSearch(v);
|
|
41
|
+
}
|
|
42
|
+
}}
|
|
43
|
+
onSearch={onSearch}
|
|
44
|
+
onClear={onClear}
|
|
45
|
+
onScroll={(e) => e.stopPropagation()}
|
|
46
|
+
/>
|
|
47
|
+
)}
|
|
48
|
+
{children}
|
|
49
|
+
</div>
|
|
50
|
+
{showCta && (
|
|
51
|
+
<div>
|
|
52
|
+
{ctaNode || (
|
|
53
|
+
<CapButton
|
|
54
|
+
className={ctaClassName}
|
|
55
|
+
type="primary"
|
|
56
|
+
disabled={ctaDisabled}
|
|
57
|
+
onClick={onCtaClick}
|
|
58
|
+
>
|
|
59
|
+
{ctaLabel}
|
|
60
|
+
</CapButton>
|
|
61
|
+
)}
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
TemplatesActionBar.propTypes = {
|
|
68
|
+
searchValue: PropTypes.string,
|
|
69
|
+
onSearchChange: PropTypes.func,
|
|
70
|
+
onSearch: PropTypes.func,
|
|
71
|
+
onClear: PropTypes.func,
|
|
72
|
+
searchPlaceholder: PropTypes.string,
|
|
73
|
+
searchInputClassName: PropTypes.string,
|
|
74
|
+
searchInputStyle: PropTypes.object,
|
|
75
|
+
ctaLabel: PropTypes.node,
|
|
76
|
+
onCtaClick: PropTypes.func,
|
|
77
|
+
ctaDisabled: PropTypes.bool,
|
|
78
|
+
ctaClassName: PropTypes.string,
|
|
79
|
+
ctaNode: PropTypes.node,
|
|
80
|
+
children: PropTypes.node,
|
|
81
|
+
showCta: PropTypes.bool,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
TemplatesActionBar.defaultProps = {
|
|
85
|
+
searchValue: '',
|
|
86
|
+
onSearchChange: () => {},
|
|
87
|
+
onSearch: () => {},
|
|
88
|
+
onClear: () => {},
|
|
89
|
+
searchPlaceholder: '',
|
|
90
|
+
searchInputClassName: '',
|
|
91
|
+
searchInputStyle: { width: '210px' },
|
|
92
|
+
ctaLabel: null,
|
|
93
|
+
onCtaClick: () => {},
|
|
94
|
+
ctaDisabled: false,
|
|
95
|
+
ctaClassName: '',
|
|
96
|
+
ctaNode: null,
|
|
97
|
+
children: null,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export default TemplatesActionBar;
|
|
101
|
+
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
.ant-tabs-content{
|
|
4
4
|
margin-top: 16px;
|
|
5
|
+
// .creatives-templates-list.full-mode{
|
|
6
|
+
.v2-pagination-container, .v2-pagination-container-half {
|
|
5
7
|
.ant-tabs-tabpane-active{
|
|
6
8
|
padding: unset;
|
|
7
9
|
}
|
|
8
10
|
}
|
|
11
|
+
}
|
|
9
12
|
|
|
10
13
|
@media screen and (max-width: 1172px) {
|
|
11
14
|
.creatives-templates-list.full-mode{
|
|
@@ -20,8 +23,11 @@
|
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
25
|
}
|
|
26
|
+
// }
|
|
23
27
|
|
|
24
28
|
@media screen and (min-width: 1172px) {
|
|
29
|
+
.creatives-templates-list.full-mode{
|
|
30
|
+
.v2-pagination-container, .v2-pagination-container-half {
|
|
25
31
|
.creatives-templates-list.full-mode{
|
|
26
32
|
.v2-pagination-container {
|
|
27
33
|
.cap-custom-card-list-row {
|
|
@@ -33,16 +39,21 @@
|
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
36
44
|
}
|
|
37
45
|
|
|
46
|
+
|
|
38
47
|
.creatives-templates-list {
|
|
39
48
|
|
|
40
49
|
.delete-template-confirm {
|
|
41
50
|
.ant-modal-footer {
|
|
42
51
|
padding: $CAP_SPACE_16 $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_24;
|
|
43
52
|
}
|
|
53
|
+
}
|
|
44
54
|
|
|
45
55
|
.ant-modal-header {
|
|
56
|
+
.v2-pagination-container, .v2-pagination-container-half {
|
|
46
57
|
padding: $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_08 $CAP_SPACE_24;
|
|
47
58
|
}
|
|
48
59
|
|
|
@@ -181,10 +192,13 @@
|
|
|
181
192
|
.whatsapp-container {
|
|
182
193
|
background-color: $CAP_WHITE;
|
|
183
194
|
padding: $CAP_SPACE_12;
|
|
195
|
+
overflow-y: hidden;
|
|
184
196
|
}
|
|
185
197
|
.scroll-container {
|
|
186
198
|
overflow-x: auto;
|
|
187
199
|
display: flex;
|
|
200
|
+
flex-wrap: nowrap;
|
|
201
|
+
width: 100%;
|
|
188
202
|
padding-top: $CAP_SPACE_06;
|
|
189
203
|
padding-right: $CAP_SPACE_06;
|
|
190
204
|
white-space: nowrap;
|
|
@@ -218,6 +232,92 @@
|
|
|
218
232
|
}
|
|
219
233
|
}
|
|
220
234
|
|
|
235
|
+
// RCS template listing preview: match WhatsApp carousel "peek" behavior
|
|
236
|
+
.RCS {
|
|
237
|
+
.cap-custom-card {
|
|
238
|
+
.ant-card-body {
|
|
239
|
+
.ant-card-meta {
|
|
240
|
+
background-color: $CAP_G09;
|
|
241
|
+
padding: 0;
|
|
242
|
+
.ant-card-meta-description {
|
|
243
|
+
.whatsapp-container,.cap-rcs-creatives {
|
|
244
|
+
background-color: $CAP_WHITE;
|
|
245
|
+
padding: $CAP_SPACE_12;
|
|
246
|
+
border-radius: 0.25rem;
|
|
247
|
+
.cap-divider-v2{
|
|
248
|
+
margin: $CAP_SPACE_12 0;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
.scroll-container {
|
|
252
|
+
overflow-x: auto;
|
|
253
|
+
overflow-y: hidden;
|
|
254
|
+
display: flex;
|
|
255
|
+
flex-wrap: nowrap;
|
|
256
|
+
padding-top: $CAP_SPACE_06;
|
|
257
|
+
padding-right: $CAP_SPACE_06;
|
|
258
|
+
white-space: nowrap;
|
|
259
|
+
scrollbar-width: none; // Hide scrollbar in Firefox
|
|
260
|
+
&::-webkit-scrollbar {
|
|
261
|
+
display: none; // Hide scrollbar in Chrome/Safari/Opera
|
|
262
|
+
}
|
|
263
|
+
.whatsapp-carousel-container {
|
|
264
|
+
padding: $CAP_SPACE_04 0px $CAP_SPACE_08;
|
|
265
|
+
border-radius: $CAP_SPACE_06;
|
|
266
|
+
background-color: $CAP_WHITE;
|
|
267
|
+
width: 80%;
|
|
268
|
+
flex-shrink: 0;
|
|
269
|
+
margin-right: $CAP_SPACE_04;
|
|
270
|
+
white-space: pre-wrap;
|
|
271
|
+
word-break: break-word;
|
|
272
|
+
overflow: auto;
|
|
273
|
+
text-align: left;
|
|
274
|
+
.whatsapp-carousel-card {
|
|
275
|
+
margin: $CAP_SPACE_02 $CAP_SPACE_06 $CAP_SPACE_01 $CAP_SPACE_08;
|
|
276
|
+
.whatsapp-carousel-body {
|
|
277
|
+
margin-bottom: $CAP_SPACE_08;
|
|
278
|
+
white-space: pre-wrap;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// RCS CTA buttons in listing (reuse WhatsApp-ish look)
|
|
285
|
+
.rcs-cta-preview {
|
|
286
|
+
margin: $CAP_SPACE_12 0;
|
|
287
|
+
display: flex;
|
|
288
|
+
justify-content: center;
|
|
289
|
+
font-size: $FONT_SIZE_M;
|
|
290
|
+
align-items: center;
|
|
291
|
+
color: #1970DA;
|
|
292
|
+
svg {
|
|
293
|
+
margin-right: $CAP_SPACE_04;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.rcs-video-preview-placeholder {
|
|
298
|
+
background: #f5f5f5;
|
|
299
|
+
display: flex;
|
|
300
|
+
align-items: center;
|
|
301
|
+
justify-content: center;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.rcs-video-preview-label {
|
|
305
|
+
color: #7a7a7a;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.rcs-listing-title {
|
|
309
|
+
font-weight: 600;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.whatsapp-divider {
|
|
313
|
+
margin: 0;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
221
321
|
.MOBILEPUSH {
|
|
222
322
|
.ant-card-body {
|
|
223
323
|
padding: 0;
|
|
@@ -659,11 +759,29 @@
|
|
|
659
759
|
}
|
|
660
760
|
|
|
661
761
|
.action-container{
|
|
662
|
-
margin-top:
|
|
663
|
-
margin-bottom:
|
|
762
|
+
margin-top: $CAP_SPACE_08;
|
|
763
|
+
margin-bottom: $CAP_SPACE_16;
|
|
664
764
|
display: flex;
|
|
665
765
|
justify-content: space-between;
|
|
666
766
|
align-items: center;
|
|
767
|
+
|
|
768
|
+
&__toolbar-row {
|
|
769
|
+
display: flex;
|
|
770
|
+
align-items: center;
|
|
771
|
+
gap: 0.75rem;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
&__toolbar-row .search-text {
|
|
775
|
+
width: 13.125rem;
|
|
776
|
+
min-width: 13.125rem;
|
|
777
|
+
flex: 1;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
&__create-row {
|
|
781
|
+
display: flex;
|
|
782
|
+
justify-content: space-between;
|
|
783
|
+
align-items: center;
|
|
784
|
+
}
|
|
667
785
|
}
|
|
668
786
|
|
|
669
787
|
.popover-action-container:hover{
|
|
@@ -1101,4 +1219,47 @@
|
|
|
1101
1219
|
.inapp-illustration-parent {
|
|
1102
1220
|
height: "calc(100vh - 325px)";
|
|
1103
1221
|
overflow: 'auto';
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
/* Local SMS / slidebox: viewport-based .v2-pagination-container-half height leaves empty space below and clips cards */
|
|
1225
|
+
.creatives-templates-container--local-sms.library-mode {
|
|
1226
|
+
.creatives-templates-list.library-mode > .cap-row:first-of-type > div {
|
|
1227
|
+
display: flex;
|
|
1228
|
+
flex-direction: column;
|
|
1229
|
+
flex: 1 1 auto;
|
|
1230
|
+
min-height: 0;
|
|
1231
|
+
overflow: hidden;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.creatives-templates-list.library-mode > .cap-row:first-of-type > div > div:first-child {
|
|
1235
|
+
display: flex;
|
|
1236
|
+
flex-direction: column;
|
|
1237
|
+
flex: 1 1 auto;
|
|
1238
|
+
min-height: 0;
|
|
1239
|
+
overflow: hidden;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/* Block below search/filter: grid + skeletons — must grow to use space above footer */
|
|
1243
|
+
.creatives-templates-list.library-mode > .cap-row:first-of-type > div > div:first-child > div:nth-child(2) {
|
|
1244
|
+
flex: 1 1 auto;
|
|
1245
|
+
min-height: 0;
|
|
1246
|
+
display: flex;
|
|
1247
|
+
flex-direction: column;
|
|
1248
|
+
overflow: hidden;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
/*
|
|
1252
|
+
* Scroll needs a definite height. Pure flex + height:auto + max-height:100% often won’t bound (no % base), so no scrollbar.
|
|
1253
|
+
* Use a taller slice than global 100vh-20rem so the grid uses space under search; still overflow-y:auto for long lists.
|
|
1254
|
+
*/
|
|
1255
|
+
.v2-pagination-container,
|
|
1256
|
+
.v2-pagination-container-half {
|
|
1257
|
+
flex: 0 1 auto;
|
|
1258
|
+
min-height: 0;
|
|
1259
|
+
height: calc(100vh - 12rem);
|
|
1260
|
+
max-height: calc(100vh - 12rem);
|
|
1261
|
+
overflow-y: auto;
|
|
1262
|
+
overflow-x: hidden;
|
|
1263
|
+
-webkit-overflow-scrolling: touch;
|
|
1264
|
+
}
|
|
1104
1265
|
}
|
|
@@ -15,6 +15,17 @@ export function getAllTemplates(channel, queryParams, intlCopyOf = '') {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
|
|
19
|
+
export function getLocalSmsTemplates(queryParams, intlCopyOf = '', onSuccess, onFailure) {
|
|
20
|
+
return {
|
|
21
|
+
type: types.GET_LOCAL_SMS_TEMPLATES_REQUEST,
|
|
22
|
+
queryParams,
|
|
23
|
+
intlCopyOf,
|
|
24
|
+
onSuccess,
|
|
25
|
+
onFailure,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
18
29
|
export function resetTemplate() {
|
|
19
30
|
return {
|
|
20
31
|
type: types.RESET_TEMPLATE,
|
|
@@ -10,6 +10,8 @@ export const GET_ALL_TEMPLATES_REQUEST = 'app/v2Containers/Templates/GET_ALL_TEM
|
|
|
10
10
|
export const GET_ALL_TEMPLATES_SUCCESS = 'app/v2Containers/Templates/GET_ALL_TEMPLATES_SUCCESS';
|
|
11
11
|
export const GET_ALL_TEMPLATES_FAILURE = 'app/v2Containers/Templates/GET_ALL_TEMPLATES_FAILURE';
|
|
12
12
|
|
|
13
|
+
export const GET_LOCAL_SMS_TEMPLATES_REQUEST = 'app/v2Containers/Templates/GET_LOCAL_SMS_TEMPLATES_REQUEST';
|
|
14
|
+
|
|
13
15
|
export const DELETE_TEMPLATE_REQUEST = 'app/v2Containers/Templates/DELETE_TEMPLATE_REQUEST';
|
|
14
16
|
export const DELETE_RCS_TEMPLATE_REQUEST = 'app/v2Containers/Templates/DELETE_RCS_TEMPLATE_REQUEST';
|
|
15
17
|
export const DELETE_TEMPLATE_SUCCESS = 'app/v2Containers/Templates/DELETE_TEMPLATE_SUCCESS';
|