@capillarytech/creatives-library 7.17.98 → 7.17.100
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/package.json +1 -1
- package/v2Components/CapDeviceContent/index.js +1 -0
- package/v2Components/CapDeviceContent/index.scss +1 -1
- package/v2Components/CapDeviceContent/messages.js +1 -1
- package/v2Components/CapInAppCTA/index.js +2 -2
- package/v2Components/CapInAppCTA/index.scss +6 -0
- package/v2Components/FormBuilder/index.js +2 -1
- package/v2Containers/Email/index.js +12 -10
- package/v2Containers/InApp/index.js +34 -34
package/package.json
CHANGED
|
@@ -73,7 +73,7 @@ export default defineMessages({
|
|
|
73
73
|
},
|
|
74
74
|
btnDesc: {
|
|
75
75
|
id: `${prefix}.btnDesc`,
|
|
76
|
-
defaultMessage: 'These will be
|
|
76
|
+
defaultMessage: 'These will be shown as clickable buttons below your message.',
|
|
77
77
|
},
|
|
78
78
|
optional: {
|
|
79
79
|
id: `${prefix}.optional`,
|
|
@@ -131,9 +131,9 @@ export const CapInAppCTA = (props) => {
|
|
|
131
131
|
>
|
|
132
132
|
<CapRow className="inapp-cta-row">
|
|
133
133
|
<CapColumn>
|
|
134
|
-
<CapIcon size="s" type={'launch'} />
|
|
134
|
+
<CapIcon size="s" type={'launch'} className="btn-icon" />
|
|
135
135
|
</CapColumn>
|
|
136
|
-
<CapColumn>
|
|
136
|
+
<CapColumn className="btn-text">
|
|
137
137
|
<CapLabel type="label2" className="inapp-saved-cta-button-text">
|
|
138
138
|
{text}
|
|
139
139
|
</CapLabel>
|
|
@@ -929,7 +929,8 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
929
929
|
}
|
|
930
930
|
// Check if template subject present in form data from Loyalty, DVS, Timeline
|
|
931
931
|
if (index === 'template-subject' && type.toLowerCase() === 'embedded' && (currentModule.toLowerCase() === 'loyalty' || currentModule.toLowerCase() === 'dvs' || currentModule.toLowerCase() === 'timeline' || currentModule.toLowerCase() === 'library')) {
|
|
932
|
-
|
|
932
|
+
//checking email subject name validation
|
|
933
|
+
if (!data?.trim()) {
|
|
933
934
|
errorData[index] = true;
|
|
934
935
|
isValid = false;
|
|
935
936
|
} else {
|
|
@@ -2069,7 +2069,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2069
2069
|
formData[0].selectedLanguages = [];
|
|
2070
2070
|
let tabKey;
|
|
2071
2071
|
if ((this.props.location.query.isLanguageSupport === undefined || this.props.location.query.isLanguageSupport === 'false')) {
|
|
2072
|
-
formData['template-subject']
|
|
2072
|
+
// If formData['template-subject'] is empty, assign an empty string; otherwise, retain its current value or use data.base.subject.
|
|
2073
|
+
formData['template-subject'] = formData?.['template-subject'] === '' ? '' : (data?.base?.subject || '');
|
|
2073
2074
|
const baseLanguage = this.props.currentOrgDetails.basic_details.base_language;
|
|
2074
2075
|
let languageIndex = _.findIndex(this.supportedLanguages, {iso_code: baseLanguage});
|
|
2075
2076
|
|
|
@@ -2134,16 +2135,17 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2134
2135
|
this.addLanguage(false, formData, false, additionalLanguages);
|
|
2135
2136
|
}
|
|
2136
2137
|
formData.base = _.cloneDeep(formData[0]);
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2138
|
+
if (formData?.['template-subject'] !== '') {
|
|
2139
|
+
this.setState({formData, loading: false, injectedTags: data.tags, tabKey, isDragDrop: (data.base.is_drag_drop !== 0 )}, () => {
|
|
2140
|
+
// this.setState({tabKey: ''});
|
|
2141
|
+
const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
|
|
2142
|
+
_.forEach(formData[0].selectedLanguages, (language) => {
|
|
2143
|
+
if (formData[0][language].is_drag_drop && isBEEEnable) {
|
|
2144
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport, isBEEEnable);
|
|
2145
|
+
}
|
|
2146
|
+
});
|
|
2145
2147
|
});
|
|
2146
|
-
}
|
|
2148
|
+
}
|
|
2147
2149
|
} else {
|
|
2148
2150
|
this.setState({injectedTags: data.tags});
|
|
2149
2151
|
}
|
|
@@ -428,35 +428,17 @@ export const InApp = (props) => {
|
|
|
428
428
|
const createModeContent = (
|
|
429
429
|
<CapRow>
|
|
430
430
|
{/* template name */}
|
|
431
|
-
<
|
|
432
|
-
<
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
size="default"
|
|
431
|
+
<CapHeading type="h4">
|
|
432
|
+
<FormattedMessage {...messages.creativeName} />
|
|
433
|
+
</CapHeading>
|
|
434
|
+
<CapInput
|
|
435
|
+
id="inapp-template-name-input"
|
|
436
|
+
className="inapp-template-name-input"
|
|
437
|
+
onChange={onTemplateNameChange}
|
|
438
|
+
placeholder={formatMessage(globalMessages.templateNamePlaceholder)}
|
|
439
|
+
value={templateName}
|
|
440
|
+
size="default"
|
|
442
441
|
/>
|
|
443
|
-
</CapRow>
|
|
444
|
-
{/* Creative layout type*/}
|
|
445
|
-
<CapRow className="inapp-creative-layout">
|
|
446
|
-
<CapHeading type="h4">
|
|
447
|
-
<FormattedMessage {...messages.creativeLayout} />
|
|
448
|
-
</CapHeading>
|
|
449
|
-
<CapHeading type="h6" className="inapp-creative-layout-desc">
|
|
450
|
-
<FormattedMessage {...messages.creativeLayoutDesc} />
|
|
451
|
-
</CapHeading>
|
|
452
|
-
</CapRow>
|
|
453
|
-
<CapRadioGroup
|
|
454
|
-
id="inapp-layout-radio"
|
|
455
|
-
options={LAYOUT_RADIO_OPTIONS}
|
|
456
|
-
value={templateLayoutType}
|
|
457
|
-
onChange={onTemplateLayoutTypeChange}
|
|
458
|
-
className="inapp-layout-radio"
|
|
459
|
-
/>
|
|
460
442
|
</CapRow>
|
|
461
443
|
);
|
|
462
444
|
//create methods end
|
|
@@ -716,9 +698,29 @@ export const InApp = (props) => {
|
|
|
716
698
|
<CapRow className="cap-inapp-creatives">
|
|
717
699
|
<CapColumn span={14}>
|
|
718
700
|
{isFullMode && createModeContent}
|
|
701
|
+
{/* Creative layout type*/}
|
|
702
|
+
{(isFullMode || !isEditFlow) && (
|
|
703
|
+
<>
|
|
704
|
+
<CapRow className="inapp-creative-layout">
|
|
705
|
+
<CapHeading type="h4">
|
|
706
|
+
<FormattedMessage {...messages.creativeLayout} />
|
|
707
|
+
</CapHeading>
|
|
708
|
+
<CapHeading type="h6" className="inapp-creative-layout-desc">
|
|
709
|
+
<FormattedMessage {...messages.creativeLayoutDesc} />
|
|
710
|
+
</CapHeading>
|
|
711
|
+
</CapRow><CapRadioGroup
|
|
712
|
+
id="inapp-layout-radio"
|
|
713
|
+
options={LAYOUT_RADIO_OPTIONS}
|
|
714
|
+
value={templateLayoutType}
|
|
715
|
+
onChange={onTemplateLayoutTypeChange}
|
|
716
|
+
className="inapp-layout-radio" />
|
|
717
|
+
</>)
|
|
718
|
+
}
|
|
719
719
|
{/* device tab */}
|
|
720
720
|
<CapTab
|
|
721
|
-
panes={PANES.filter(
|
|
721
|
+
panes={PANES.filter(
|
|
722
|
+
(devicePane) => devicePane?.isSupported === true
|
|
723
|
+
)}
|
|
722
724
|
onChange={(value) => {
|
|
723
725
|
setPanes(value);
|
|
724
726
|
}}
|
|
@@ -746,12 +748,10 @@ export const InApp = (props) => {
|
|
|
746
748
|
) : (
|
|
747
749
|
<FormattedMessage {...globalMessages.done} />
|
|
748
750
|
)
|
|
751
|
+
) : isFullMode ? (
|
|
752
|
+
<FormattedMessage {...messages.create} />
|
|
749
753
|
) : (
|
|
750
|
-
|
|
751
|
-
<FormattedMessage {...messages.create} />
|
|
752
|
-
) : (
|
|
753
|
-
<FormattedMessage {...globalMessages.done} />
|
|
754
|
-
)
|
|
754
|
+
<FormattedMessage {...globalMessages.done} />
|
|
755
755
|
)}
|
|
756
756
|
</CapButton>
|
|
757
757
|
</>
|