@imposium-hub/components 2.11.4 → 2.11.5-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.
- package/dist/cjs/components/advanced-number-field/AdvancedNumberField.d.ts +1 -1
- package/dist/cjs/components/anchor-field/AnchorField.d.ts +1 -1
- package/dist/cjs/components/app-wrapper/AppWrapper.js +2 -2
- package/dist/cjs/components/app-wrapper/AppWrapper.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableDateCell.d.ts +6 -1
- package/dist/cjs/components/assets/AssetsTableGlobalCell.d.ts +5 -1
- package/dist/cjs/components/assets/AssetsTablePreviewCell.d.ts +17 -1
- package/dist/cjs/components/assets/AssetsTableStatusCell.d.ts +5 -1
- package/dist/cjs/components/assets/AssetsTableTagsCell.d.ts +6 -1
- package/dist/cjs/components/assets/AssetsTableTypeCell.d.ts +5 -1
- package/dist/cjs/components/assets/AssetsTypeIcon.d.ts +5 -1
- package/dist/cjs/components/assets/FontAssetPreview.d.ts +1 -1
- package/dist/cjs/components/assets/StoryTableTotalRendersCell.d.ts +2 -1
- package/dist/cjs/components/button/Button.d.ts +1 -1
- package/dist/cjs/components/button/Button.stories.d.ts +6 -5
- package/dist/cjs/components/button-group-field/ButtonGroupField.stories.d.ts +2 -1
- package/dist/cjs/components/button-menu/ButtonMenu.d.ts +2 -2
- package/dist/cjs/components/button-menu/ButtonMenu.stories.d.ts +2 -1
- package/dist/cjs/components/button-menu/ButtonMenuItem.d.ts +1 -1
- package/dist/cjs/components/card/Card.d.ts +4 -4
- package/dist/cjs/components/card/Card.stories.d.ts +2 -1
- package/dist/cjs/components/checkbox-field/CheckboxField.d.ts +1 -1
- package/dist/cjs/components/checkbox-field/CheckboxField.stories.d.ts +2 -1
- package/dist/cjs/components/color-field/ColorField.d.ts +1 -1
- package/dist/cjs/components/color-field/ColorFiled.stories.d.ts +2 -1
- package/dist/cjs/components/compositions/TextLayer.d.ts +1 -1
- package/dist/cjs/components/confirm-modal/ConfirmModal.d.ts +2 -1
- package/dist/cjs/components/controlled-list/ControlledList.d.ts +2 -2
- package/dist/cjs/components/controlled-list/ControlledList.stories.d.ts +2 -1
- package/dist/cjs/components/copy-prop-id-button/CopyPropIdButton.d.ts +1 -1
- package/dist/cjs/components/determinate-loader/DeterminateLoader.stories.d.ts +4 -3
- package/dist/cjs/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/cjs/components/dropdown/dropdown.stories.d.ts +1 -1
- package/dist/cjs/components/field-wrapper/FieldWrapper.d.ts +2 -2
- package/dist/cjs/components/field-wrapper/FieldWrapper.stories.d.ts +2 -1
- package/dist/cjs/components/font-picker/FontPicker.d.ts +1 -1
- package/dist/cjs/components/h-rule/HRule.d.ts +2 -1
- package/dist/cjs/components/h-rule/HRule.stories.d.ts +3 -2
- package/dist/cjs/components/header/Header.js +2 -3
- package/dist/cjs/components/header/Header.js.map +1 -1
- package/dist/cjs/components/header/ProjectDropdown.d.ts +2 -1
- package/dist/cjs/components/list-field/ListField.d.ts +1 -1
- package/dist/cjs/components/list-field/ListField.stories.d.ts +2 -1
- package/dist/cjs/components/log-viewer/LogViewer.d.ts +1 -1
- package/dist/cjs/components/media-variable-field/MediaVariableField.d.ts +1 -1
- package/dist/cjs/components/modal/Modal.d.ts +1 -1
- package/dist/cjs/components/modal/Modal.stories.d.ts +2 -1
- package/dist/cjs/components/number-field/NumberField.d.ts +1 -1
- package/dist/cjs/components/number-field/NumberField.stories.d.ts +2 -1
- package/dist/cjs/components/players/AudioPlayer.d.ts +1 -1
- package/dist/cjs/components/players/AudioPreview.d.ts +1 -1
- package/dist/cjs/components/players/ImagePlayer.d.ts +1 -1
- package/dist/cjs/components/players/ImagePreview.d.ts +1 -1
- package/dist/cjs/components/players/ImageSequencePlayer.d.ts +1 -1
- package/dist/cjs/components/players/TemplatePlayer.d.ts +1 -1
- package/dist/cjs/components/players/VideoPlayer.d.ts +1 -1
- package/dist/cjs/components/players/VideoPreview.d.ts +1 -1
- package/dist/cjs/components/publish-wizard/PublishWizard.d.ts +2 -2
- package/dist/cjs/components/publish-wizard/PublishWizard.js +51 -14
- package/dist/cjs/components/publish-wizard/PublishWizard.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/APIIntegration.d.ts +1 -1
- package/dist/cjs/components/publish-wizard/publish/CrMPublishCreativeSelectCell.js +1 -1
- package/dist/cjs/components/publish-wizard/publish/CrMPublishCreativeSelectCell.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/CrMPublishCreativeSelectHeader.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/CrMPublishNameCell.js +1 -1
- package/dist/cjs/components/publish-wizard/publish/CrMPublishNameCell.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/CrMPublishPreviewCell.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/CrMPublishStatusCell.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/CrMPublishUI.d.ts +1 -0
- package/dist/cjs/components/publish-wizard/publish/CrMPublishUI.js +34 -21
- package/dist/cjs/components/publish-wizard/publish/CrMPublishUI.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/HubSpotFlow.d.ts +1 -1
- package/dist/cjs/components/publish-wizard/publish/WebpageHosted.d.ts +2 -2
- package/dist/cjs/components/section/Section.d.ts +2 -1
- package/dist/cjs/components/section/Section.stories.d.ts +3 -2
- package/dist/cjs/components/select-field/SelectField.d.ts +1 -1
- package/dist/cjs/components/select-field/SelectField.stories.d.ts +2 -1
- package/dist/cjs/components/shortcut-menu/ShortcutMenu.stories.d.ts +2 -1
- package/dist/cjs/components/slider-field/SliderField.d.ts +1 -1
- package/dist/cjs/components/slider-field/SliderField.stories.d.ts +2 -1
- package/dist/cjs/components/smpte-field/SMPTEField.d.ts +1 -1
- package/dist/cjs/components/tabs/Tabs.d.ts +4 -1
- package/dist/cjs/components/tabs/Tabs.stories.d.ts +5 -2
- package/dist/cjs/components/tag/Tag.d.ts +9 -1
- package/dist/cjs/components/text-area-field/TextAreaField.d.ts +1 -1
- package/dist/cjs/components/text-area-field/TextAreaField.stories.d.ts +2 -1
- package/dist/cjs/components/text-field/TextField.d.ts +1 -1
- package/dist/cjs/components/text-field/TextField.stories.d.ts +2 -1
- package/dist/cjs/constants/copy.d.ts +3 -0
- package/dist/cjs/constants/copy.js +3 -0
- package/dist/cjs/constants/copy.js.map +1 -1
- package/dist/cjs/constants/icons.d.ts +78 -76
- package/dist/cjs/constants/icons.js +3 -1
- package/dist/cjs/constants/icons.js.map +1 -1
- package/dist/cjs/constants/publish.d.ts +27 -0
- package/dist/cjs/constants/publish.js +33 -1
- package/dist/cjs/constants/publish.js.map +1 -1
- package/dist/cjs/redux/actions/publish.d.ts +1 -1
- package/dist/cjs/redux/actions/publish.js +2 -2
- package/dist/cjs/redux/actions/publish.js.map +1 -1
- package/dist/cjs/services/API.d.ts +6 -4
- package/dist/cjs/services/API.js +16 -4
- package/dist/cjs/services/API.js.map +1 -1
- package/dist/esm/components/advanced-number-field/AdvancedNumberField.d.ts +1 -1
- package/dist/esm/components/anchor-field/AnchorField.d.ts +1 -1
- package/dist/esm/components/app-wrapper/AppWrapper.js +2 -2
- package/dist/esm/components/app-wrapper/AppWrapper.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableDateCell.d.ts +6 -1
- package/dist/esm/components/assets/AssetsTableGlobalCell.d.ts +5 -1
- package/dist/esm/components/assets/AssetsTablePreviewCell.d.ts +17 -1
- package/dist/esm/components/assets/AssetsTableStatusCell.d.ts +5 -1
- package/dist/esm/components/assets/AssetsTableTagsCell.d.ts +6 -1
- package/dist/esm/components/assets/AssetsTableTypeCell.d.ts +5 -1
- package/dist/esm/components/assets/AssetsTypeIcon.d.ts +5 -1
- package/dist/esm/components/assets/FontAssetPreview.d.ts +1 -1
- package/dist/esm/components/assets/StoryTableTotalRendersCell.d.ts +2 -1
- package/dist/esm/components/button/Button.d.ts +1 -1
- package/dist/esm/components/button/Button.stories.d.ts +6 -5
- package/dist/esm/components/button-group-field/ButtonGroupField.stories.d.ts +2 -1
- package/dist/esm/components/button-menu/ButtonMenu.d.ts +2 -2
- package/dist/esm/components/button-menu/ButtonMenu.stories.d.ts +2 -1
- package/dist/esm/components/button-menu/ButtonMenuItem.d.ts +1 -1
- package/dist/esm/components/card/Card.d.ts +4 -4
- package/dist/esm/components/card/Card.stories.d.ts +2 -1
- package/dist/esm/components/checkbox-field/CheckboxField.d.ts +1 -1
- package/dist/esm/components/checkbox-field/CheckboxField.stories.d.ts +2 -1
- package/dist/esm/components/color-field/ColorField.d.ts +1 -1
- package/dist/esm/components/color-field/ColorFiled.stories.d.ts +2 -1
- package/dist/esm/components/compositions/TextLayer.d.ts +1 -1
- package/dist/esm/components/confirm-modal/ConfirmModal.d.ts +2 -1
- package/dist/esm/components/controlled-list/ControlledList.d.ts +2 -2
- package/dist/esm/components/controlled-list/ControlledList.stories.d.ts +2 -1
- package/dist/esm/components/copy-prop-id-button/CopyPropIdButton.d.ts +1 -1
- package/dist/esm/components/determinate-loader/DeterminateLoader.stories.d.ts +4 -3
- package/dist/esm/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/esm/components/dropdown/dropdown.stories.d.ts +1 -1
- package/dist/esm/components/field-wrapper/FieldWrapper.d.ts +2 -2
- package/dist/esm/components/field-wrapper/FieldWrapper.stories.d.ts +2 -1
- package/dist/esm/components/font-picker/FontPicker.d.ts +1 -1
- package/dist/esm/components/h-rule/HRule.d.ts +2 -1
- package/dist/esm/components/h-rule/HRule.stories.d.ts +3 -2
- package/dist/esm/components/header/Header.js +2 -3
- package/dist/esm/components/header/Header.js.map +1 -1
- package/dist/esm/components/header/ProjectDropdown.d.ts +2 -1
- package/dist/esm/components/list-field/ListField.d.ts +1 -1
- package/dist/esm/components/list-field/ListField.stories.d.ts +2 -1
- package/dist/esm/components/log-viewer/LogViewer.d.ts +1 -1
- package/dist/esm/components/media-variable-field/MediaVariableField.d.ts +1 -1
- package/dist/esm/components/modal/Modal.d.ts +1 -1
- package/dist/esm/components/modal/Modal.stories.d.ts +2 -1
- package/dist/esm/components/number-field/NumberField.d.ts +1 -1
- package/dist/esm/components/number-field/NumberField.stories.d.ts +2 -1
- package/dist/esm/components/players/AudioPlayer.d.ts +1 -1
- package/dist/esm/components/players/AudioPreview.d.ts +1 -1
- package/dist/esm/components/players/ImagePlayer.d.ts +1 -1
- package/dist/esm/components/players/ImagePreview.d.ts +1 -1
- package/dist/esm/components/players/ImageSequencePlayer.d.ts +1 -1
- package/dist/esm/components/players/TemplatePlayer.d.ts +1 -1
- package/dist/esm/components/players/VideoPlayer.d.ts +1 -1
- package/dist/esm/components/players/VideoPreview.d.ts +1 -1
- package/dist/esm/components/publish-wizard/PublishWizard.d.ts +2 -2
- package/dist/esm/components/publish-wizard/PublishWizard.js +50 -14
- package/dist/esm/components/publish-wizard/PublishWizard.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/APIIntegration.d.ts +1 -1
- package/dist/esm/components/publish-wizard/publish/CrMPublishCreativeSelectCell.js +1 -1
- package/dist/esm/components/publish-wizard/publish/CrMPublishCreativeSelectCell.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/CrMPublishCreativeSelectHeader.js +3 -3
- package/dist/esm/components/publish-wizard/publish/CrMPublishCreativeSelectHeader.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/CrMPublishNameCell.js +1 -1
- package/dist/esm/components/publish-wizard/publish/CrMPublishNameCell.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/CrMPublishPreviewCell.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/CrMPublishStatusCell.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/CrMPublishUI.d.ts +1 -0
- package/dist/esm/components/publish-wizard/publish/CrMPublishUI.js +38 -25
- package/dist/esm/components/publish-wizard/publish/CrMPublishUI.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/HubSpotFlow.d.ts +1 -1
- package/dist/esm/components/publish-wizard/publish/WebpageHosted.d.ts +2 -2
- package/dist/esm/components/section/Section.d.ts +2 -1
- package/dist/esm/components/section/Section.stories.d.ts +3 -2
- package/dist/esm/components/select-field/SelectField.d.ts +1 -1
- package/dist/esm/components/select-field/SelectField.stories.d.ts +2 -1
- package/dist/esm/components/shortcut-menu/ShortcutMenu.stories.d.ts +2 -1
- package/dist/esm/components/slider-field/SliderField.d.ts +1 -1
- package/dist/esm/components/slider-field/SliderField.stories.d.ts +2 -1
- package/dist/esm/components/smpte-field/SMPTEField.d.ts +1 -1
- package/dist/esm/components/tabs/Tabs.d.ts +4 -1
- package/dist/esm/components/tabs/Tabs.stories.d.ts +5 -2
- package/dist/esm/components/tag/Tag.d.ts +9 -1
- package/dist/esm/components/text-area-field/TextAreaField.d.ts +1 -1
- package/dist/esm/components/text-area-field/TextAreaField.stories.d.ts +2 -1
- package/dist/esm/components/text-field/TextField.d.ts +1 -1
- package/dist/esm/components/text-field/TextField.stories.d.ts +2 -1
- package/dist/esm/constants/copy.d.ts +3 -0
- package/dist/esm/constants/copy.js +3 -0
- package/dist/esm/constants/copy.js.map +1 -1
- package/dist/esm/constants/icons.d.ts +78 -76
- package/dist/esm/constants/icons.js +2 -0
- package/dist/esm/constants/icons.js.map +1 -1
- package/dist/esm/constants/publish.d.ts +27 -0
- package/dist/esm/constants/publish.js +32 -0
- package/dist/esm/constants/publish.js.map +1 -1
- package/dist/esm/redux/actions/publish.d.ts +1 -1
- package/dist/esm/redux/actions/publish.js +2 -2
- package/dist/esm/redux/actions/publish.js.map +1 -1
- package/dist/esm/services/API.d.ts +6 -4
- package/dist/esm/services/API.js +16 -4
- package/dist/esm/services/API.js.map +1 -1
- package/dist/styles.css +14 -4
- package/dist/styles.less +17 -5
- package/less/components/data-table.less +1 -0
- package/less/components/header.less +6 -5
- package/less/components/publish-wizard.less +10 -0
- package/package.json +1 -1
- package/src/components/app-wrapper/AppWrapper.tsx +2 -2
- package/src/components/header/Header.tsx +2 -4
- package/src/components/publish-wizard/PublishWizard.tsx +73 -19
- package/src/components/publish-wizard/publish/CrMPublishCreativeSelectCell.tsx +29 -0
- package/src/components/publish-wizard/publish/CrMPublishCreativeSelectHeader.tsx +33 -0
- package/src/components/publish-wizard/publish/CrMPublishNameCell.tsx +27 -0
- package/src/components/publish-wizard/publish/CrMPublishPreviewCell.tsx +27 -0
- package/src/components/publish-wizard/publish/CrMPublishStatusCell.tsx +13 -0
- package/src/components/publish-wizard/publish/CrMPublishUI.tsx +211 -0
- package/src/constants/copy.ts +3 -0
- package/src/constants/icons.tsx +3 -0
- package/src/constants/publish.ts +36 -0
- package/src/redux/actions/publish.ts +2 -2
- package/src/services/API.ts +38 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { CrMPublishUI } from './publish/CrMPublishUI';
|
|
2
3
|
import Button from '../button/Button';
|
|
3
4
|
import SelectField from '../select-field/SelectField';
|
|
4
5
|
import HRule from '../h-rule/HRule';
|
|
@@ -23,6 +24,7 @@ import PublishStatusIndicator from './publish/PublishStatusIndicator';
|
|
|
23
24
|
import { bindActionCreators } from 'redux';
|
|
24
25
|
import { publishVersion } from '../../redux/actions/publish';
|
|
25
26
|
import { connect } from 'react-redux';
|
|
27
|
+
import { CRM_INTEGRATED_PROJECT_TYPES } from '../../constants/publish';
|
|
26
28
|
|
|
27
29
|
interface IPublishWizardProps {
|
|
28
30
|
fromCrM?: boolean;
|
|
@@ -34,7 +36,7 @@ interface IPublishWizardProps {
|
|
|
34
36
|
checkStoryForErrors(): any;
|
|
35
37
|
addViewer(c: any): void;
|
|
36
38
|
exportExperiences: () => void;
|
|
37
|
-
publishVersion: (api: IImposiumAPI, sId: string) => any;
|
|
39
|
+
publishVersion: (api: IImposiumAPI, sId: string, creativeIds?: string[]) => any;
|
|
38
40
|
batchesList: any;
|
|
39
41
|
onClose(): any;
|
|
40
42
|
api: IImposiumAPI;
|
|
@@ -94,6 +96,7 @@ interface IPublishWizardState {
|
|
|
94
96
|
next: boolean;
|
|
95
97
|
nextStep: boolean;
|
|
96
98
|
publishError: string;
|
|
99
|
+
selectedCreatives: string[];
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
interface IBigButtonProps {
|
|
@@ -140,7 +143,8 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
140
143
|
error: false,
|
|
141
144
|
next: false,
|
|
142
145
|
nextStep: false,
|
|
143
|
-
publishError: null
|
|
146
|
+
publishError: null,
|
|
147
|
+
selectedCreatives: []
|
|
144
148
|
};
|
|
145
149
|
this.emailWorkflow = React.createRef();
|
|
146
150
|
this.hiddenFileInputRef = React.createRef();
|
|
@@ -301,7 +305,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
301
305
|
|
|
302
306
|
if (fromCrM) {
|
|
303
307
|
this.props
|
|
304
|
-
.publishVersion(api, id)
|
|
308
|
+
.publishVersion(api, id, this.state.selectedCreatives)
|
|
305
309
|
.then(() => {
|
|
306
310
|
this.setState({ screenIndex: 1 });
|
|
307
311
|
})
|
|
@@ -331,15 +335,37 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
331
335
|
const { story, project, fromCrM } = this.props;
|
|
332
336
|
const variables = story ? story.acts[project.actId].inventory : {};
|
|
333
337
|
const varLength = variables ? Object.keys(variables).length : 0;
|
|
338
|
+
const projectType = story.creativeId
|
|
339
|
+
? CRM_INTEGRATED_PROJECT_TYPES.SINGLE_CREATIVE
|
|
340
|
+
: CRM_INTEGRATED_PROJECT_TYPES.MULTI_CREATIVE;
|
|
334
341
|
|
|
335
342
|
if (fromCrM && varLength === 0) {
|
|
336
343
|
return true;
|
|
344
|
+
} else if (
|
|
345
|
+
fromCrM &&
|
|
346
|
+
this.state.selectedCreatives.length === 0 &&
|
|
347
|
+
projectType === CRM_INTEGRATED_PROJECT_TYPES.MULTI_CREATIVE
|
|
348
|
+
) {
|
|
349
|
+
return true;
|
|
337
350
|
}
|
|
338
351
|
return false;
|
|
339
352
|
}
|
|
340
353
|
|
|
354
|
+
private getErrorCopyForCrMPublish() {
|
|
355
|
+
const { story, project } = this.props;
|
|
356
|
+
const variables = story ? story.acts[project.actId].inventory : {};
|
|
357
|
+
const varLength = variables ? Object.keys(variables).length : 0;
|
|
358
|
+
|
|
359
|
+
if (varLength === 0) {
|
|
360
|
+
return copy.publish.noVariablesError;
|
|
361
|
+
} else if (this.state.selectedCreatives.length === 0) {
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
341
366
|
private renderLowerButtons() {
|
|
342
367
|
const { screenIndex, done, error, next } = this.state;
|
|
368
|
+
const { fromCrM, story } = this.props;
|
|
343
369
|
const { publishing } = this.props.publishData;
|
|
344
370
|
const disabledForCrM = this.shouldDisablePublishButtonForCrM();
|
|
345
371
|
const lowerButtons = [];
|
|
@@ -347,6 +373,15 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
347
373
|
// publish and skip buttons
|
|
348
374
|
if (screenIndex === 0) {
|
|
349
375
|
// publish
|
|
376
|
+
|
|
377
|
+
const projectType = story.creativeId
|
|
378
|
+
? CRM_INTEGRATED_PROJECT_TYPES.SINGLE_CREATIVE
|
|
379
|
+
: CRM_INTEGRATED_PROJECT_TYPES.MULTI_CREATIVE;
|
|
380
|
+
const btnCopy = fromCrM
|
|
381
|
+
? projectType === CRM_INTEGRATED_PROJECT_TYPES.MULTI_CREATIVE
|
|
382
|
+
? `Publish to ${this.state.selectedCreatives.length} Creatives`
|
|
383
|
+
: 'Publish to Creative Manager'
|
|
384
|
+
: copy.publish.btnPublish;
|
|
350
385
|
lowerButtons.push(
|
|
351
386
|
<Button
|
|
352
387
|
tooltip={copy.publish.btnPublish}
|
|
@@ -355,7 +390,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
355
390
|
key='btn-publish'
|
|
356
391
|
onClick={() => this.handlePublish()}
|
|
357
392
|
color='primary'>
|
|
358
|
-
{
|
|
393
|
+
{btnCopy}
|
|
359
394
|
</Button>
|
|
360
395
|
);
|
|
361
396
|
|
|
@@ -434,28 +469,47 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
434
469
|
}
|
|
435
470
|
|
|
436
471
|
private renderPublish() {
|
|
472
|
+
const { fromCrM, story } = this.props;
|
|
437
473
|
const { publishing } = this.props.publishData;
|
|
438
|
-
const disabledForCrM = this.shouldDisablePublishButtonForCrM();
|
|
439
474
|
const { publishError } = this.state;
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
?
|
|
444
|
-
:
|
|
445
|
-
|
|
475
|
+
const errorCopyForCrM = this.getErrorCopyForCrMPublish();
|
|
476
|
+
const errorCopy = publishError ? publishError : errorCopyForCrM ? errorCopyForCrM : null;
|
|
477
|
+
const projectType = story.creativeId
|
|
478
|
+
? CRM_INTEGRATED_PROJECT_TYPES.SINGLE_CREATIVE
|
|
479
|
+
: CRM_INTEGRATED_PROJECT_TYPES.MULTI_CREATIVE;
|
|
446
480
|
const error = errorCopy ? (
|
|
447
481
|
<p className='publish-error'>
|
|
448
482
|
<span className='icon'>{ICON_EXCLAIMATION_TRIANGLE}</span> {errorCopy}
|
|
449
483
|
</p>
|
|
450
484
|
) : null;
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
<
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
485
|
+
|
|
486
|
+
if (fromCrM) {
|
|
487
|
+
return (
|
|
488
|
+
<CrMPublishUI
|
|
489
|
+
projectType={projectType}
|
|
490
|
+
selectedCreatives={this.state.selectedCreatives}
|
|
491
|
+
onUpdateSelectedCreatives={(c) => this.setState({ selectedCreatives: c })}
|
|
492
|
+
onError={(e) => this.setState({ publishError: e })}
|
|
493
|
+
publishing={publishing}
|
|
494
|
+
error={error}
|
|
495
|
+
creativeLibraryId={story.creativeLibraryId}
|
|
496
|
+
projectId={story.id}
|
|
497
|
+
api={this.props.api}
|
|
498
|
+
crmBaseUrl={this.props.creativeManagerBaseUrl}
|
|
499
|
+
/>
|
|
500
|
+
);
|
|
501
|
+
} else {
|
|
502
|
+
return (
|
|
503
|
+
<div>
|
|
504
|
+
<h2>{copy.publish.publishStepTitle}</h2>
|
|
505
|
+
<HRule />
|
|
506
|
+
<p>
|
|
507
|
+
{publishing ? copy.publish.publishInProgress : copy.publish.publishStepDesc}
|
|
508
|
+
</p>
|
|
509
|
+
{error}
|
|
510
|
+
</div>
|
|
511
|
+
);
|
|
512
|
+
}
|
|
459
513
|
}
|
|
460
514
|
|
|
461
515
|
private renderDistributionOptions() {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import CheckboxField from '../../checkbox-field/CheckboxField';
|
|
3
|
+
import { canBePublishedTo } from './CrMPublishUI';
|
|
4
|
+
interface ICrMPublishCreativeSelectCellProps {
|
|
5
|
+
cell: any;
|
|
6
|
+
onSelectChange: (creativeId: string, selected: boolean) => void;
|
|
7
|
+
selectedCreatives: string[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const CrMPublishCreativeSelectCell: React.FC<ICrMPublishCreativeSelectCellProps> = (
|
|
11
|
+
props
|
|
12
|
+
) => {
|
|
13
|
+
const { cell, onSelectChange, selectedCreatives } = props;
|
|
14
|
+
const creativeId = cell.row.original.creativeId;
|
|
15
|
+
const isSelected = selectedCreatives.includes(creativeId);
|
|
16
|
+
const showCheckbox = canBePublishedTo(cell.row.original.approvalStatus);
|
|
17
|
+
if (showCheckbox) {
|
|
18
|
+
return (
|
|
19
|
+
<CheckboxField
|
|
20
|
+
label=''
|
|
21
|
+
propagate={false}
|
|
22
|
+
value={isSelected}
|
|
23
|
+
onChange={(selected) => onSelectChange(creativeId, selected)}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
} else {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import CheckboxField from '../../checkbox-field/CheckboxField';
|
|
3
|
+
import { canBePublishedTo } from './CrMPublishUI';
|
|
4
|
+
|
|
5
|
+
interface ICrMPublishCreativeSelectHeaderProps {
|
|
6
|
+
onSelectChange: (selected: boolean) => void;
|
|
7
|
+
selectedCreatives: string[];
|
|
8
|
+
creativeConfig: any[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const CrMPublishCreativeSelectHeader: React.FC<ICrMPublishCreativeSelectHeaderProps> = (
|
|
12
|
+
props
|
|
13
|
+
) => {
|
|
14
|
+
const { onSelectChange, selectedCreatives, creativeConfig } = props;
|
|
15
|
+
|
|
16
|
+
const publishableCreatives = creativeConfig.filter((creative) =>
|
|
17
|
+
canBePublishedTo(creative.approvalStatus)
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const publishableCreativeIds = publishableCreatives.map((creative) => creative.creativeId);
|
|
21
|
+
const allPublishableSelected =
|
|
22
|
+
publishableCreativeIds.length > 0 &&
|
|
23
|
+
publishableCreativeIds.every((id) => selectedCreatives.includes(id));
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<CheckboxField
|
|
27
|
+
label=''
|
|
28
|
+
propagate={false}
|
|
29
|
+
value={allPublishableSelected}
|
|
30
|
+
onChange={(selected) => onSelectChange(selected)}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { renderTooltip, renderTooltipProps } from '../../Tooltip';
|
|
3
|
+
import { canBePublishedTo } from './CrMPublishUI';
|
|
4
|
+
import * as copy from '../../../constants/copy';
|
|
5
|
+
|
|
6
|
+
interface ICrMPublishNameCellProps {
|
|
7
|
+
cell: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const CrMPublishNameCell: React.FC<ICrMPublishNameCellProps> = (props) => {
|
|
11
|
+
const { cell } = props;
|
|
12
|
+
const canBePublished = canBePublishedTo(cell.row.original.approvalStatus);
|
|
13
|
+
const tooltipId = `publish-name-${cell.row.original.creativeId}`;
|
|
14
|
+
|
|
15
|
+
if (canBePublished) {
|
|
16
|
+
return <div className={`crm-publish-name`}>{cell.row.original.creativeName}</div>;
|
|
17
|
+
} else {
|
|
18
|
+
return (
|
|
19
|
+
<div
|
|
20
|
+
className={`crm-publish-name disabled`}
|
|
21
|
+
{...renderTooltipProps(tooltipId, copy.publish.disabledCreativeTooltip)}>
|
|
22
|
+
{cell.row.original.creativeName}
|
|
23
|
+
{renderTooltip(tooltipId, copy.publish.disabledCreativeTooltip)}
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from '../../..';
|
|
3
|
+
import { ICON_EYE } from '../../../constants/icons';
|
|
4
|
+
|
|
5
|
+
interface ICrMPublishPreviewCellProps {
|
|
6
|
+
cell: any;
|
|
7
|
+
crmBaseUrl: string;
|
|
8
|
+
creativeLibraryId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const CrMPublishPreviewCell: React.FC<ICrMPublishPreviewCellProps> = (props) => {
|
|
12
|
+
const { cell, crmBaseUrl, creativeLibraryId } = props;
|
|
13
|
+
const creativeId = cell.row.original.creativeId;
|
|
14
|
+
const previewUrl = `${crmBaseUrl}/library/${creativeLibraryId}/creative/${creativeId}/versions/`;
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<a
|
|
18
|
+
href={previewUrl}
|
|
19
|
+
target='_blank'>
|
|
20
|
+
<Button
|
|
21
|
+
style='subtle'
|
|
22
|
+
size='small'>
|
|
23
|
+
{ICON_EYE}
|
|
24
|
+
</Button>
|
|
25
|
+
</a>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CREATIVE_STATUS_LABELS } from '../../../constants/publish';
|
|
3
|
+
|
|
4
|
+
interface ICrMPublishStatusCellProps {
|
|
5
|
+
cell: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const CrMPublishStatusCell: React.FC<ICrMPublishStatusCellProps> = (props) => {
|
|
9
|
+
const { cell } = props;
|
|
10
|
+
return (
|
|
11
|
+
CREATIVE_STATUS_LABELS[cell.row.original.approvalStatus] || cell.row.original.approvalStatus
|
|
12
|
+
);
|
|
13
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as copy from '../../../constants/copy';
|
|
3
|
+
import { DataTable, HRule, Button, IImposiumAPI, TextField } from '../../..';
|
|
4
|
+
import { useEffect, useState, useCallback } from 'react';
|
|
5
|
+
import { ICON_SEARCH } from '../../../constants/icons';
|
|
6
|
+
import {
|
|
7
|
+
CREATIVE_STATUSES_TO_PUBLISH,
|
|
8
|
+
CRM_INTEGRATED_PROJECT_TYPES
|
|
9
|
+
} from '../../../constants/publish';
|
|
10
|
+
import { CrMPublishStatusCell } from './CrMPublishStatusCell';
|
|
11
|
+
import { CrMPublishPreviewCell } from './CrMPublishPreviewCell';
|
|
12
|
+
import { CrMPublishNameCell } from './CrMPublishNameCell';
|
|
13
|
+
import { CrMPublishCreativeSelectHeader } from './CrMPublishCreativeSelectHeader';
|
|
14
|
+
import { CrMPublishCreativeSelectCell } from './CrMPublishCreativeSelectCell';
|
|
15
|
+
|
|
16
|
+
interface ICrmPublishUIProps {
|
|
17
|
+
projectType: string;
|
|
18
|
+
publishing: boolean;
|
|
19
|
+
error: React.ReactNode;
|
|
20
|
+
api: IImposiumAPI;
|
|
21
|
+
creativeLibraryId: string;
|
|
22
|
+
projectId: string;
|
|
23
|
+
crmBaseUrl: string;
|
|
24
|
+
selectedCreatives: string[];
|
|
25
|
+
onUpdateSelectedCreatives: (selectedCreatives) => void;
|
|
26
|
+
onError: (error: string) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const CrMPublishUI: React.FC<ICrmPublishUIProps> = (props) => {
|
|
30
|
+
const {
|
|
31
|
+
projectType,
|
|
32
|
+
publishing,
|
|
33
|
+
error,
|
|
34
|
+
crmBaseUrl,
|
|
35
|
+
creativeLibraryId,
|
|
36
|
+
projectId,
|
|
37
|
+
api,
|
|
38
|
+
selectedCreatives,
|
|
39
|
+
onUpdateSelectedCreatives
|
|
40
|
+
} = props;
|
|
41
|
+
const [nameFilter, setNameFilter] = useState('');
|
|
42
|
+
const [creativeConfig, setCreativeConfig] = useState([]);
|
|
43
|
+
|
|
44
|
+
const nameSearch = (
|
|
45
|
+
<TextField
|
|
46
|
+
className='creative-name'
|
|
47
|
+
buttons={[
|
|
48
|
+
<Button
|
|
49
|
+
key='btn-search'
|
|
50
|
+
style='subtle'
|
|
51
|
+
size='small'>
|
|
52
|
+
{ICON_SEARCH}
|
|
53
|
+
</Button>
|
|
54
|
+
]}
|
|
55
|
+
width='150px'
|
|
56
|
+
value={nameFilter}
|
|
57
|
+
onChange={(value) => setNameFilter(value)}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const onSelectChange = useCallback(
|
|
62
|
+
(creativeId: string, selected: boolean) => {
|
|
63
|
+
const previouslySelected = [...selectedCreatives];
|
|
64
|
+
if (selected) {
|
|
65
|
+
onUpdateSelectedCreatives([...previouslySelected, creativeId]);
|
|
66
|
+
} else {
|
|
67
|
+
onUpdateSelectedCreatives(previouslySelected.filter((id) => id !== creativeId));
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
[selectedCreatives, onUpdateSelectedCreatives]
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
const onSelectAllChange = useCallback(
|
|
74
|
+
(selected: boolean) => {
|
|
75
|
+
if (selected) {
|
|
76
|
+
const publishableCreativeIds = creativeConfig
|
|
77
|
+
.filter((creative) => canBePublishedTo(creative.approvalStatus))
|
|
78
|
+
.map((creative) => creative.creativeId);
|
|
79
|
+
onUpdateSelectedCreatives(publishableCreativeIds);
|
|
80
|
+
} else {
|
|
81
|
+
onUpdateSelectedCreatives([]);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
[nameFilter, creativeConfig]
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
const COLUMN_CONFIG = [
|
|
88
|
+
{
|
|
89
|
+
accessor: 'selected',
|
|
90
|
+
width: 25,
|
|
91
|
+
disableResize: true,
|
|
92
|
+
disableSortBy: true,
|
|
93
|
+
Header: () => (
|
|
94
|
+
<CrMPublishCreativeSelectHeader
|
|
95
|
+
onSelectChange={onSelectAllChange}
|
|
96
|
+
selectedCreatives={selectedCreatives}
|
|
97
|
+
creativeConfig={creativeConfig}
|
|
98
|
+
/>
|
|
99
|
+
),
|
|
100
|
+
Cell: (cell: any) => (
|
|
101
|
+
<CrMPublishCreativeSelectCell
|
|
102
|
+
cell={cell}
|
|
103
|
+
onSelectChange={onSelectChange}
|
|
104
|
+
selectedCreatives={selectedCreatives}
|
|
105
|
+
/>
|
|
106
|
+
)
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
accessor: 'creativeName',
|
|
110
|
+
Header: 'Creative Name',
|
|
111
|
+
width: 250,
|
|
112
|
+
minWidth: 250,
|
|
113
|
+
maxWidth: 250,
|
|
114
|
+
disableSortBy: true,
|
|
115
|
+
Cell: (cell: any) => <CrMPublishNameCell cell={cell} />,
|
|
116
|
+
Search: nameSearch
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
accessor: 'creativeId',
|
|
120
|
+
Header: 'ID',
|
|
121
|
+
width: 75,
|
|
122
|
+
minWidth: 75,
|
|
123
|
+
maxWidth: 75,
|
|
124
|
+
disableSortBy: true
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
accessor: 'numberOfVersions',
|
|
128
|
+
Header: 'Versions',
|
|
129
|
+
width: 75,
|
|
130
|
+
minWidth: 75,
|
|
131
|
+
maxWidth: 75,
|
|
132
|
+
disableSortBy: true
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
accessor: 'approvalStatus',
|
|
136
|
+
Header: 'Status',
|
|
137
|
+
width: 75,
|
|
138
|
+
minWidth: 75,
|
|
139
|
+
maxWidth: 75,
|
|
140
|
+
disableSortBy: true,
|
|
141
|
+
Cell: (cell: any) => <CrMPublishStatusCell cell={cell} />
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
accessor: 'preview',
|
|
145
|
+
Header: 'Preview',
|
|
146
|
+
width: 50,
|
|
147
|
+
minWidth: 50,
|
|
148
|
+
maxWidth: 50,
|
|
149
|
+
disableSortBy: true,
|
|
150
|
+
Cell: (cell: any) => (
|
|
151
|
+
<CrMPublishPreviewCell
|
|
152
|
+
cell={cell}
|
|
153
|
+
crmBaseUrl={crmBaseUrl}
|
|
154
|
+
creativeLibraryId={creativeLibraryId}
|
|
155
|
+
/>
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
useEffect(() => {
|
|
161
|
+
api.getCreativesLinkedToProject(projectId)
|
|
162
|
+
.then((res) => {
|
|
163
|
+
setCreativeConfig(res.creatives);
|
|
164
|
+
})
|
|
165
|
+
.catch((err) => {
|
|
166
|
+
const msg = err.response?.data?.error || err.message;
|
|
167
|
+
const errorCopy = copy.publish.errorGettingCreatives.replace('{{ERR}}', msg);
|
|
168
|
+
props.onError(errorCopy);
|
|
169
|
+
});
|
|
170
|
+
}, []);
|
|
171
|
+
|
|
172
|
+
if (projectType === CRM_INTEGRATED_PROJECT_TYPES.MULTI_CREATIVE) {
|
|
173
|
+
return (
|
|
174
|
+
<div>
|
|
175
|
+
<h2>{copy.publish.publishStepTitleFromCrM}</h2>
|
|
176
|
+
<HRule />
|
|
177
|
+
<p>{publishing ? copy.publish.publishInProgress : ''}</p>
|
|
178
|
+
<DataTable
|
|
179
|
+
showInterstitial={publishing}
|
|
180
|
+
columns={COLUMN_CONFIG}
|
|
181
|
+
data={
|
|
182
|
+
nameFilter
|
|
183
|
+
? creativeConfig.filter((creative) => {
|
|
184
|
+
return creative.creativeName
|
|
185
|
+
.toLowerCase()
|
|
186
|
+
.includes(nameFilter.toLowerCase());
|
|
187
|
+
})
|
|
188
|
+
: creativeConfig
|
|
189
|
+
}
|
|
190
|
+
hidePaginator={true}
|
|
191
|
+
itemsPerPage={1000}
|
|
192
|
+
tightRows={true}
|
|
193
|
+
/>
|
|
194
|
+
{error && <p className='publish-error'>{error}</p>}
|
|
195
|
+
</div>
|
|
196
|
+
);
|
|
197
|
+
} else {
|
|
198
|
+
return (
|
|
199
|
+
<div>
|
|
200
|
+
<h2>{copy.publish.publishStepTitle}</h2>
|
|
201
|
+
<HRule />
|
|
202
|
+
<p>{publishing ? copy.publish.publishInProgress : copy.publish.publishStepDesc}</p>
|
|
203
|
+
{error && <p className='publish-error'>{error}</p>}
|
|
204
|
+
</div>
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
export const canBePublishedTo = (approvalStatus: string) => {
|
|
210
|
+
return CREATIVE_STATUSES_TO_PUBLISH.includes(approvalStatus);
|
|
211
|
+
};
|
package/src/constants/copy.ts
CHANGED
|
@@ -127,6 +127,8 @@ export const compositions = {
|
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
export const publish = {
|
|
130
|
+
errorGettingCreatives: 'Error getting creatives linked to project: {{ERR}}',
|
|
131
|
+
disabledCreativeTooltip: 'You cannot publish a project to a creative with Approved status.',
|
|
130
132
|
uploadAsAssets: 'Upload as Assets',
|
|
131
133
|
noVariablesError:
|
|
132
134
|
'No variables found on the project. Cannot proceed with publishing to Creative Manager until at least one variable is added to the project.',
|
|
@@ -147,6 +149,7 @@ export const publish = {
|
|
|
147
149
|
|
|
148
150
|
// publish
|
|
149
151
|
publishStepTitle: 'STEP 1: Publish your Project',
|
|
152
|
+
publishStepTitleFromCrM: 'STEP 1: Publish your Project to selected Creatives',
|
|
150
153
|
publishStepDesc:
|
|
151
154
|
"Your project needs to be published before your changes can be seen. If you haven't made any changes since the last time you published, you can skip to the next step.",
|
|
152
155
|
|
package/src/constants/icons.tsx
CHANGED
|
@@ -60,6 +60,7 @@ import { faJs } from '@fortawesome/free-brands-svg-icons/faJs';
|
|
|
60
60
|
import { faDownload } from '@fortawesome/free-solid-svg-icons/faDownload';
|
|
61
61
|
import { faUpload } from '@fortawesome/free-solid-svg-icons/faUpload';
|
|
62
62
|
import { faCode } from '@fortawesome/free-solid-svg-icons/faCode';
|
|
63
|
+
import { faEye } from '@fortawesome/free-solid-svg-icons/faEye';
|
|
63
64
|
import {
|
|
64
65
|
faArrowDown,
|
|
65
66
|
faArrowLeft,
|
|
@@ -232,3 +233,5 @@ export const ICON_FILE_ERROR = <FontAwesomeIcon icon={faCircleExclamation} />;
|
|
|
232
233
|
export const ICON_FILE_ADD = <FontAwesomeIcon icon={faFileCirclePlus} />;
|
|
233
234
|
|
|
234
235
|
export const ICON_FILE_REPLACE = <FontAwesomeIcon icon={faFilePen} />;
|
|
236
|
+
|
|
237
|
+
export const ICON_EYE = <FontAwesomeIcon icon={faEye} />;
|
package/src/constants/publish.ts
CHANGED
|
@@ -27,3 +27,39 @@ export const CRM_PLACEMENT_VARS = [
|
|
|
27
27
|
export const ADSTUDIO_POST_RENDER_ACTION = 'crm-adstudio';
|
|
28
28
|
|
|
29
29
|
export const ASSETS_POST_RENDER_ACTION = 'crm-asset';
|
|
30
|
+
|
|
31
|
+
export const CREATIVE_STATUSES = {
|
|
32
|
+
PENDING_APPROVAL: 'PENDING_APPROVAL',
|
|
33
|
+
UNSUBMITTED: 'UNSUBMITTED',
|
|
34
|
+
PRODUCTION_INCOMPLETE: 'PRODUCTION_INCOMPLETE',
|
|
35
|
+
APPROVED: 'APPROVED',
|
|
36
|
+
REJECTED: 'REJECTED',
|
|
37
|
+
FAILED: 'FAILED',
|
|
38
|
+
TRANSCODING: 'TRANSCODING',
|
|
39
|
+
TRANSCODING_ERROR: 'TRANSCODING_ERROR',
|
|
40
|
+
SUBMITTED: 'SUBMITTED'
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const CREATIVE_STATUS_LABELS = {
|
|
44
|
+
PENDING_APPROVAL: 'Pending Approval',
|
|
45
|
+
UNSUBMITTED: 'Production',
|
|
46
|
+
PRODUCTION_INCOMPLETE: 'Production',
|
|
47
|
+
APPROVED: 'Approved',
|
|
48
|
+
REJECTED: 'Rejected',
|
|
49
|
+
FAILED: 'Failed',
|
|
50
|
+
TRANSCODING: 'Transcoding',
|
|
51
|
+
TRANSCODING_ERROR: 'Transcoding Error',
|
|
52
|
+
SUBMITTED: 'Submitted'
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const CREATIVE_STATUSES_TO_PUBLISH = [
|
|
56
|
+
CREATIVE_STATUSES.UNSUBMITTED,
|
|
57
|
+
CREATIVE_STATUSES.PRODUCTION_INCOMPLETE,
|
|
58
|
+
CREATIVE_STATUSES.REJECTED,
|
|
59
|
+
CREATIVE_STATUSES.FAILED
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
export const CRM_INTEGRATED_PROJECT_TYPES = {
|
|
63
|
+
SINGLE_CREATIVE: 'SINGLE_CREATIVE',
|
|
64
|
+
MULTI_CREATIVE: 'MULTI_CREATIVE'
|
|
65
|
+
};
|
|
@@ -74,10 +74,10 @@ export const cancelPublish = (api: IImposiumAPI, storyId: string) => {
|
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
export const publishVersion = (api: IImposiumAPI, storyId: string) => {
|
|
77
|
+
export const publishVersion = (api: IImposiumAPI, storyId: string, creativeIds?: string[]) => {
|
|
78
78
|
return (dispatch) => {
|
|
79
79
|
return new Promise((resolve, reject) => {
|
|
80
|
-
api.runPublish(storyId, '')
|
|
80
|
+
api.runPublish(storyId, '', creativeIds)
|
|
81
81
|
.then((d) => {
|
|
82
82
|
dispatch(getStoryPublishStatus(api, storyId))
|
|
83
83
|
.then()
|