@capillarytech/creatives-library 8.0.261 → 8.0.262-alpha.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.261",
4
+ "version": "8.0.262-alpha.0",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -19,7 +19,6 @@ export const LABEL_ISSUE_PATTERNS = [
19
19
  'tag must be paired',
20
20
  'open tag match failed',
21
21
  'closed tag match failed',
22
- 'unclosed',
23
22
  'missing required',
24
23
  'tag-pair',
25
24
  'attr-value-not-empty',
@@ -1828,21 +1828,24 @@ export class Creatives extends React.Component {
1828
1828
  // Check if Continue button should be disabled (for new flow only)
1829
1829
  isContinueButtonDisabled = () => {
1830
1830
  const { currentChannel, emailCreateMode, templateNameExists } = this.state;
1831
- const { isFullMode } = this.props;
1831
+ const { isFullMode, EmailLayout } = this.props;
1832
1832
  const supportCKEditor = commonUtil.hasSupportCKEditor();
1833
1833
  if (supportCKEditor) {
1834
1834
  return false;
1835
1835
  }
1836
1836
  if (currentChannel.toUpperCase() === constants.EMAIL) {
1837
+ // Upload mode: enable when a file has been uploaded (EmailLayout set by ZIP or HTML upload)
1838
+ // Other modes: enable when an editor type is selected (html_editor, drag_drop, editor)
1839
+ const isUploadComplete = emailCreateMode === 'upload' && !isEmpty(EmailLayout);
1837
1840
  const isEditorSelected = !!emailCreateMode && emailCreateMode !== 'upload';
1838
- // In full mode: require both template name AND editor selection
1839
- // In library mode: require only editor selection (template name not needed)
1841
+ const canContinue = isUploadComplete || isEditorSelected;
1842
+ // In full mode: require both template name AND (upload complete or editor selected)
1843
+ // In library mode: require only upload complete or editor selection
1840
1844
  if (isFullMode) {
1841
1845
  const isTemplateNameValid = templateNameExists;
1842
- return !(isTemplateNameValid && isEditorSelected);
1846
+ return !(isTemplateNameValid && canContinue);
1843
1847
  }
1844
- // Library mode: only editor selection is required
1845
- return !isEditorSelected;
1848
+ return !canContinue;
1846
1849
  }
1847
1850
  return true;
1848
1851
  }
@@ -899,8 +899,13 @@ const EmailHTMLEditor = (props) => {
899
899
 
900
900
  // Handle success response
901
901
  if (createResponse && createResponse.templateId) {
902
- const successMessage = formatMessage(emailMessages.emailCreateSuccess);
903
- CapNotification.success({ message: successMessage, key: 'create-template-success' });
902
+ const successMessage = formatMessage(
903
+ isEditModeForSave ? emailMessages.emailEditSuccess : emailMessages.emailCreateSuccess
904
+ );
905
+ CapNotification.success({
906
+ message: successMessage,
907
+ key: isEditModeForSave ? 'edit-template-success' : 'create-template-success',
908
+ });
904
909
 
905
910
  const module = location?.query?.module || 'default';
906
911
  const type = location?.query?.type;