@capillarytech/creatives-library 8.0.345-alpha.12 → 8.0.345-alpha.14
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 +0 -29
- package/package.json +1 -1
- package/services/tests/api.test.js +0 -13
- package/utils/commonUtils.js +1 -19
- package/v2Components/CapActionButton/constants.js +0 -7
- package/v2Components/CapActionButton/index.js +109 -167
- package/v2Components/CapActionButton/index.scss +6 -157
- package/v2Components/CapActionButton/messages.js +3 -19
- package/v2Components/CapActionButton/tests/index.test.js +17 -41
- package/v2Components/CapTagList/index.js +0 -10
- package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +49 -70
- package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +2 -8
- package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +21 -207
- package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +0 -16
- package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +10 -85
- package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +0 -30
- package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +11 -79
- package/v2Components/CommonTestAndPreview/SendTestMessage.js +5 -10
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +15 -160
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +76 -341
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +4 -133
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +0 -11
- package/v2Components/CommonTestAndPreview/constants.js +2 -38
- package/v2Components/CommonTestAndPreview/index.js +186 -676
- package/v2Components/CommonTestAndPreview/messages.js +3 -49
- package/v2Components/CommonTestAndPreview/sagas.js +6 -15
- package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +284 -308
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +65 -231
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +5 -118
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +0 -341
- package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +1 -8
- package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +13 -34
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +283 -281
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +1 -199
- package/v2Components/CommonTestAndPreview/tests/index.test.js +4 -132
- package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
- package/v2Components/FormBuilder/index.js +10 -8
- package/v2Components/TemplatePreview/_templatePreview.scss +23 -33
- package/v2Components/TemplatePreview/index.js +28 -143
- package/v2Components/TemplatePreview/tests/index.test.js +0 -142
- package/v2Components/TestAndPreviewSlidebox/index.js +1 -13
- package/v2Components/TestAndPreviewSlidebox/sagas.js +4 -11
- package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +1 -3
- package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -36
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +1 -10
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +4 -29
- package/v2Containers/CreativesContainer/constants.js +0 -9
- package/v2Containers/CreativesContainer/index.js +103 -300
- package/v2Containers/CreativesContainer/index.scss +1 -51
- package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +34 -78
- package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +16 -79
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -8
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +98 -357
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +15 -20
- package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
- package/v2Containers/Email/reducer.js +11 -3
- package/v2Containers/Email/sagas.js +9 -5
- package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +4 -0
- package/v2Containers/Email/tests/sagas.test.js +21 -3
- package/v2Containers/Rcs/constants.js +8 -119
- package/v2Containers/Rcs/index.js +812 -2375
- package/v2Containers/Rcs/index.scss +6 -276
- package/v2Containers/Rcs/messages.js +3 -38
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +70345 -98302
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +5 -0
- package/v2Containers/Rcs/tests/index.test.js +121 -152
- package/v2Containers/Rcs/tests/mockData.js +0 -38
- package/v2Containers/Rcs/tests/utils.test.js +30 -646
- package/v2Containers/Rcs/utils.js +11 -478
- package/v2Containers/Sms/Create/index.js +40 -100
- package/v2Containers/SmsTrai/Create/index.js +4 -9
- package/v2Containers/SmsTrai/Edit/constants.js +0 -2
- package/v2Containers/SmsTrai/Edit/index.js +130 -636
- package/v2Containers/SmsTrai/Edit/messages.js +4 -14
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +2296 -4249
- package/v2Containers/SmsWrapper/index.js +8 -37
- package/v2Containers/TagList/index.js +0 -6
- package/v2Containers/Templates/_templates.scss +2 -163
- package/v2Containers/Templates/actions.js +0 -11
- package/v2Containers/Templates/constants.js +0 -2
- package/v2Containers/Templates/index.js +54 -119
- package/v2Containers/Templates/sagas.js +12 -57
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1079 -1043
- package/v2Containers/Templates/tests/sagas.test.js +123 -193
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +1 -72
- package/v2Containers/TemplatesV2/index.js +23 -86
- package/v2Containers/Whatsapp/index.js +20 -3
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34 -578
- package/utils/rcsPayloadUtils.js +0 -92
- package/utils/templateVarUtils.js +0 -201
- package/utils/tests/templateVarUtils.test.js +0 -204
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +0 -18
- package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
- package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +0 -67
- package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +0 -87
- package/v2Components/SmsFallback/constants.js +0 -73
- package/v2Components/SmsFallback/index.js +0 -955
- package/v2Components/SmsFallback/index.scss +0 -265
- package/v2Components/SmsFallback/messages.js +0 -78
- package/v2Components/SmsFallback/smsFallbackUtils.js +0 -118
- package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +0 -50
- package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +0 -147
- package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +0 -304
- package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +0 -197
- package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +0 -277
- package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +0 -422
- package/v2Components/SmsFallback/useLocalTemplateList.js +0 -92
- package/v2Components/TemplatePreview/constants.js +0 -2
- package/v2Components/VarSegmentMessageEditor/constants.js +0 -2
- package/v2Components/VarSegmentMessageEditor/index.js +0 -125
- package/v2Components/VarSegmentMessageEditor/index.scss +0 -46
- package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +0 -43
- package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +0 -67
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +0 -90
- package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +0 -258
- package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +0 -125
- package/v2Containers/Rcs/index.js.rej +0 -1336
- package/v2Containers/Rcs/index.scss.rej +0 -74
- package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +0 -225
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +0 -128
- package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +0 -318
- package/v2Containers/Sms/smsFormDataHelpers.js +0 -67
- package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +0 -253
- package/v2Containers/SmsTrai/Edit/index.scss +0 -121
- package/v2Containers/Templates/TemplatesActionBar.js +0 -101
- package/v2Containers/Templates/tests/TemplatesActionBar.test.js +0 -120
- package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +0 -180
- package/v2Containers/Templates/utils/smsTemplatesListApi.js +0 -79
- package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +0 -131
|
@@ -33,10 +33,6 @@ import injectReducer from '../../../utils/injectReducer';
|
|
|
33
33
|
import v2SmsCreateReducer from './reducer';
|
|
34
34
|
import * as globalActions from '../../Cap/actions';
|
|
35
35
|
import TestAndPreviewSlidebox from '../../../v2Components/TestAndPreviewSlidebox';
|
|
36
|
-
import {
|
|
37
|
-
getSmsEmbeddedFooterValidity,
|
|
38
|
-
getSmsMessageFromFormData,
|
|
39
|
-
} from '../smsFormDataHelpers';
|
|
40
36
|
|
|
41
37
|
export class Create extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
42
38
|
constructor(props) {
|
|
@@ -57,11 +53,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
57
53
|
isTestAndPreviewMode: false,
|
|
58
54
|
pendingGetFormData: false,
|
|
59
55
|
};
|
|
60
|
-
// Tracks the last validity value reported to SmsFallback so componentDidUpdate
|
|
61
|
-
// does not dispatch on every render and create an infinite update loop.
|
|
62
|
-
// Intentionally undefined (not true) so the first render always reports the
|
|
63
|
-
// real validity rather than assuming the form starts invalid.
|
|
64
|
-
this._lastReportedSmsFooterInvalid = undefined;
|
|
65
56
|
this.saveFormData = this.saveFormData.bind(this);
|
|
66
57
|
this.onFormDataChange = this.onFormDataChange.bind(this);
|
|
67
58
|
this.onTemplateNameChange = this.onTemplateNameChange.bind(this);
|
|
@@ -168,9 +159,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
168
159
|
layout: 'SMS',
|
|
169
160
|
type: 'TAG',
|
|
170
161
|
context: this.props.location.query.type === 'embedded' ? this.props.location.query.module : 'default',
|
|
171
|
-
embedded: this.props.
|
|
172
|
-
? 'full'
|
|
173
|
-
: (this.props.location.query.type === 'embedded' ? this.props.location.query.type : 'full'),
|
|
162
|
+
embedded: this.props.location.query.type === 'embedded' ? this.props.location.query.type : 'full',
|
|
174
163
|
};
|
|
175
164
|
if (this.props.getDefaultTags) {
|
|
176
165
|
query.context = this.props.getDefaultTags;
|
|
@@ -183,22 +172,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
183
172
|
}
|
|
184
173
|
}
|
|
185
174
|
|
|
186
|
-
componentDidUpdate() {
|
|
187
|
-
if (!this.props.embeddedSmsFallback || typeof this.props.onEmbeddedSmsFooterValidity !== 'function') {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
const validity = getSmsEmbeddedFooterValidity(this.state.formData, this.state.tabCount);
|
|
191
|
-
const isInvalid = !!validity.isTemplateNameEmpty || !!validity.isMessageEmpty;
|
|
192
|
-
// Only dispatch when the validity value changes. Dispatching unconditionally caused
|
|
193
|
-
// an infinite loop: componentDidUpdate → dispatch → SmsFallback re-render →
|
|
194
|
-
// SmsCreate re-render → componentDidUpdate → ... even when state was unchanged.
|
|
195
|
-
// The instance variable handles both reference-based and mutation-based FormBuilder
|
|
196
|
-
// updates: validity is recomputed from current formData content, not by reference.
|
|
197
|
-
if (this._lastReportedSmsFooterInvalid === isInvalid) return;
|
|
198
|
-
this._lastReportedSmsFooterInvalid = isInvalid;
|
|
199
|
-
this.props.onEmbeddedSmsFooterValidity(validity);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
175
|
componentWillUnmount() {
|
|
203
176
|
if (this.pendingGetFormDataTimeout) {
|
|
204
177
|
clearTimeout(this.pendingGetFormDataTimeout);
|
|
@@ -302,10 +275,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
302
275
|
}
|
|
303
276
|
const result = {};
|
|
304
277
|
result.base = baseData;
|
|
305
|
-
/* Root field used by FormBuilder; embedded getFormSubscriptionData reads value.base */
|
|
306
|
-
if (formData['template-name'] !== undefined) {
|
|
307
|
-
result.base['template-name'] = formData['template-name'];
|
|
308
|
-
}
|
|
309
278
|
if (this.state.isValid) {
|
|
310
279
|
const msgObj = charCount.updateCharCount(baseData['sms-editor']);
|
|
311
280
|
result.base.msg_count = msgObj.msgCount;
|
|
@@ -912,9 +881,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
912
881
|
layout: 'SMS',
|
|
913
882
|
type: 'TAG',
|
|
914
883
|
context: (data && data.toLowerCase() === 'all') ? 'default' : (data && data.toLowerCase()),
|
|
915
|
-
embedded: this.props.
|
|
916
|
-
? 'full'
|
|
917
|
-
: (this.props.location.query.type === 'embedded' ? this.props.location.query.type : 'full'),
|
|
884
|
+
embedded: this.props.location.query.type === 'embedded' ? this.props.location.query.type : 'full',
|
|
918
885
|
};
|
|
919
886
|
this.props.globalActions.fetchSchemaForEntity(query);
|
|
920
887
|
}
|
|
@@ -922,29 +889,11 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
922
889
|
removeStandAlone() {
|
|
923
890
|
const schema = _.cloneDeep(this.state.schema);
|
|
924
891
|
const childSections = _.get(schema, 'standalone.sections[0].childSections');
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
/*
|
|
931
|
-
* Creatives library drops the standalone template-name block because `SlideBoxHeader`
|
|
932
|
-
* shows the name. This is independent of the section count — guard it separately so
|
|
933
|
-
* it still runs even when childSections.length <= 2 (e.g. schema arrives pre-trimmed).
|
|
934
|
-
* RCS SMS fallback uses the same slidebox footer but keeps the name in the form.
|
|
935
|
-
*/
|
|
936
|
-
if (!this.props.embeddedSmsFallback) {
|
|
937
|
-
const fields = _.get(childSections, '[1].childSections[0].childSections');
|
|
938
|
-
if (fields && fields.length > 0) {
|
|
939
|
-
fields.splice(0, 1);
|
|
940
|
-
_.set(childSections, '[1].childSections[0].childSections', fields);
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
_.set(schema, 'standalone.sections[0].childSections', childSections);
|
|
944
|
-
}
|
|
945
|
-
// Always increment loadingStatus — isSmsLoading() requires >= 2 in library mode
|
|
946
|
-
// (isFullMode=false). The early return previously skipped this, leaving the
|
|
947
|
-
// spinner stuck forever when the schema had <= 2 childSections.
|
|
892
|
+
childSections.splice(2, 1);
|
|
893
|
+
const fields = _.get(childSections, '[1].childSections[0].childSections');//removing template name section
|
|
894
|
+
fields.splice(0, 1);
|
|
895
|
+
_.set(childSections, '[1].childSections[0].childSections', fields);
|
|
896
|
+
_.set(schema, 'standalone.sections[0].childSections', childSections);
|
|
948
897
|
this.setState({ schema, loadingStatus: this.state.loadingStatus + 1 });
|
|
949
898
|
}
|
|
950
899
|
|
|
@@ -989,8 +938,37 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
989
938
|
this.setState({startValidation: false});
|
|
990
939
|
}
|
|
991
940
|
|
|
992
|
-
getTemplateContent = () =>
|
|
993
|
-
|
|
941
|
+
getTemplateContent = () => {
|
|
942
|
+
// Get SMS content from formData
|
|
943
|
+
if (!this.state.formData || !Array.isArray(this.state.formData) || this.state.formData.length === 0) {
|
|
944
|
+
return '';
|
|
945
|
+
}
|
|
946
|
+
const currentTabData = this.state.formData[this.state.currentTab - 1];
|
|
947
|
+
if (!currentTabData) {
|
|
948
|
+
return '';
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// PRIORITY 1: Check direct path first (most common for SMS)
|
|
952
|
+
// This handles: formData[0]['sms-editor']
|
|
953
|
+
if (currentTabData['sms-editor']) {
|
|
954
|
+
return currentTabData['sms-editor'];
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
// PRIORITY 2: Check activeTab structure (for versioned templates)
|
|
958
|
+
// This handles: formData[0][activeTab]['sms-editor']
|
|
959
|
+
const activeTab = currentTabData?.activeTab || 'base';
|
|
960
|
+
if (currentTabData[activeTab]?.['sms-editor']) {
|
|
961
|
+
return currentTabData[activeTab]['sms-editor'];
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
// PRIORITY 3: Check base explicitly (fallback)
|
|
965
|
+
// This handles: formData[0]['base']['sms-editor']
|
|
966
|
+
if (currentTabData['base']?.['sms-editor']) {
|
|
967
|
+
return currentTabData['base']['sms-editor'];
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
return '';
|
|
971
|
+
}
|
|
994
972
|
|
|
995
973
|
handleTestAndPreview = () => {
|
|
996
974
|
// If parent is managing state (props exist), call parent handler
|
|
@@ -1019,35 +997,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1019
997
|
}
|
|
1020
998
|
|
|
1021
999
|
saveFormData() {
|
|
1022
|
-
/*
|
|
1023
|
-
* RCS SMS fallback slidebox (embeddedSmsFallback): parent passes isFullMode from RCS, but we must not
|
|
1024
|
-
* call createTemplate — that spins CapSpin on createTemplateInProgress and is not the embedded contract.
|
|
1025
|
-
* Same as library: hand off form payload via getFormSubscriptionData.
|
|
1026
|
-
*/
|
|
1027
|
-
if (this.props.embeddedSmsFallback && this.props.getFormSubscriptionData) {
|
|
1028
|
-
const { isTemplateNameEmpty, isMessageEmpty } = getSmsEmbeddedFooterValidity(
|
|
1029
|
-
this.state.formData,
|
|
1030
|
-
this.state.tabCount,
|
|
1031
|
-
);
|
|
1032
|
-
if (isTemplateNameEmpty || isMessageEmpty) {
|
|
1033
|
-
this.setState({ startValidation: true, pendingGetFormData: false });
|
|
1034
|
-
if (this.props.onValidationFail) {
|
|
1035
|
-
this.props.onValidationFail();
|
|
1036
|
-
}
|
|
1037
|
-
return;
|
|
1038
|
-
}
|
|
1039
|
-
const payload = this.getFormData();
|
|
1040
|
-
if (!payload.validity) {
|
|
1041
|
-
if (this.props.onValidationFail) {
|
|
1042
|
-
this.props.onValidationFail();
|
|
1043
|
-
}
|
|
1044
|
-
this.setState({ pendingGetFormData: false, startValidation: false });
|
|
1045
|
-
return;
|
|
1046
|
-
}
|
|
1047
|
-
this.props.getFormSubscriptionData(payload);
|
|
1048
|
-
this.setState({ pendingGetFormData: false, startValidation: false });
|
|
1049
|
-
return;
|
|
1050
|
-
}
|
|
1051
1000
|
// In library mode: FormBuilder calls onSubmit only after liquid validation succeeds.
|
|
1052
1001
|
// Submit to parent here so the slidebox can close with valid data.
|
|
1053
1002
|
if (!this.props.isFullMode) {
|
|
@@ -1147,9 +1096,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1147
1096
|
onTestContentClicked={this.props.onTestContentClicked}
|
|
1148
1097
|
onPreviewContentClicked={this.props.onPreviewContentClicked}
|
|
1149
1098
|
eventContextTags={this.props?.eventContextTags}
|
|
1150
|
-
|
|
1151
|
-
tagListPopoverOverlayStyle={this.props.tagListPopoverOverlayStyle}
|
|
1152
|
-
tagListPopoverOverlayClassName={this.props.tagListPopoverOverlayClassName}
|
|
1099
|
+
waitEventContextTags={this.props?.waitEventContextTags}
|
|
1153
1100
|
/>
|
|
1154
1101
|
</CapColumn>
|
|
1155
1102
|
</CapRow>
|
|
@@ -1162,7 +1109,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1162
1109
|
formData={this.state.formData}
|
|
1163
1110
|
content={this.getTemplateContent()}
|
|
1164
1111
|
currentChannel={SMS}
|
|
1165
|
-
smsRegister={this.props.smsRegister}
|
|
1166
1112
|
/>
|
|
1167
1113
|
</div>
|
|
1168
1114
|
);
|
|
@@ -1187,17 +1133,11 @@ Create.propTypes = {
|
|
|
1187
1133
|
isLoadingMetaEntities: PropTypes.bool,
|
|
1188
1134
|
selectedOfferDetails: PropTypes.array,
|
|
1189
1135
|
eventContextTags: PropTypes.array,
|
|
1136
|
+
waitEventContextTags: PropTypes.object,
|
|
1190
1137
|
showTestAndPreviewSlidebox: PropTypes.bool,
|
|
1191
1138
|
handleTestAndPreview: PropTypes.func,
|
|
1192
1139
|
handleCloseTestAndPreview: PropTypes.func,
|
|
1193
1140
|
isTestAndPreviewMode: PropTypes.bool,
|
|
1194
|
-
smsRegister: PropTypes.any,
|
|
1195
|
-
forceFullTagContext: PropTypes.bool,
|
|
1196
|
-
embeddedSmsFallback: PropTypes.bool,
|
|
1197
|
-
onEmbeddedSmsFooterValidity: PropTypes.func,
|
|
1198
|
-
tagListGetPopupContainer: PropTypes.func,
|
|
1199
|
-
tagListPopoverOverlayStyle: PropTypes.object,
|
|
1200
|
-
tagListPopoverOverlayClassName: PropTypes.string,
|
|
1201
1141
|
};
|
|
1202
1142
|
|
|
1203
1143
|
const mapStateToProps = createStructuredSelector({
|
|
@@ -70,7 +70,6 @@ export const SmsTraiCreate = (props) => {
|
|
|
70
70
|
onCreateComplete,
|
|
71
71
|
isFullMode,
|
|
72
72
|
onShowTemplates,
|
|
73
|
-
embeddedSmsFallback,
|
|
74
73
|
traiSms: {
|
|
75
74
|
duplicateDetails = {},
|
|
76
75
|
duplicateDetailsError = '',
|
|
@@ -660,11 +659,9 @@ export const SmsTraiCreate = (props) => {
|
|
|
660
659
|
|
|
661
660
|
const createCallback = ({ errorMessage }) => {
|
|
662
661
|
if (!errorMessage) {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
});
|
|
667
|
-
}
|
|
662
|
+
CapNotification.success({
|
|
663
|
+
message: formatMessage(messages.smsCreateNotification),
|
|
664
|
+
});
|
|
668
665
|
actions.clearCreateResponse();
|
|
669
666
|
} else {
|
|
670
667
|
CapNotification.error({
|
|
@@ -744,9 +741,7 @@ export const SmsTraiCreate = (props) => {
|
|
|
744
741
|
{ templates: savedData },
|
|
745
742
|
(resp, errorMessage) => {
|
|
746
743
|
createCallback({ errorMessage });
|
|
747
|
-
if (
|
|
748
|
-
if (!errorMessage) onCreateComplete(savedData[0]);
|
|
749
|
-
} else if (isFullMode) {
|
|
744
|
+
if (isFullMode) {
|
|
750
745
|
onCreateComplete();
|
|
751
746
|
} else {
|
|
752
747
|
onShowTemplates();
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export const CHARLIMIT = 40;
|
|
8
|
-
/** Display / soft cap label for DLT SMS body length (matches product UI). */
|
|
9
|
-
export const SMS_TRAI_CONTENT_MAX_LENGTH = 1024;
|
|
10
8
|
export const SMS = 'SMS';
|
|
11
9
|
export const SMS_TRAI_VAR = '{#var#}';
|
|
12
10
|
export const TAG = 'TAG';
|