@imposium-hub/components 2.2.45-0 → 2.2.45
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.d.ts +2 -1
- package/dist/cjs/components/app-wrapper/AppWrapper.js +79 -71
- package/dist/cjs/components/app-wrapper/AppWrapper.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableNameCell.js +2 -2
- package/dist/cjs/components/assets/AssetsTableNameCell.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTablePreviewCell.d.ts +1 -1
- package/dist/cjs/components/assets/AssetsUploadMenu.js +2 -3
- package/dist/cjs/components/assets/AssetsUploadMenu.js.map +1 -1
- package/dist/cjs/components/assets/FontAssetPreview.d.ts +1 -1
- package/dist/cjs/components/auth-gate/AuthGate.js +5 -8
- package/dist/cjs/components/auth-gate/AuthGate.js.map +1 -1
- package/dist/cjs/components/button/Button.d.ts +1 -1
- package/dist/cjs/components/button/Button.stories.d.ts +5 -6
- package/dist/cjs/components/button-group-field/ButtonGroupField.stories.d.ts +1 -2
- package/dist/cjs/components/button-menu/ButtonMenu.d.ts +2 -2
- package/dist/cjs/components/button-menu/ButtonMenu.stories.d.ts +1 -2
- package/dist/cjs/components/button-menu/ButtonMenuItem.d.ts +1 -1
- package/dist/cjs/components/card/Card.stories.d.ts +1 -2
- package/dist/cjs/components/checkbox-field/CheckboxField.d.ts +1 -1
- package/dist/cjs/components/checkbox-field/CheckboxField.stories.d.ts +1 -2
- package/dist/cjs/components/color-field/ColorField.d.ts +1 -1
- package/dist/cjs/components/color-field/ColorFiled.stories.d.ts +1 -2
- package/dist/cjs/components/compositions/TextLayer.d.ts +1 -1
- package/dist/cjs/components/context-menu/AnimateComponent.d.ts +1 -2
- package/dist/cjs/components/context-menu/ContextMenu.d.ts +1 -2
- package/dist/cjs/components/context-menu/ContextMenuItem.d.ts +1 -2
- package/dist/cjs/components/context-menu/ContextMenuTrigger.d.ts +1 -2
- package/dist/cjs/components/context-menu/SubMenu.d.ts +1 -2
- package/dist/cjs/components/controlled-list/ControlledList.d.ts +2 -2
- package/dist/cjs/components/controlled-list/ControlledList.stories.d.ts +1 -2
- package/dist/cjs/components/determinate-loader/DeterminateLoader.stories.d.ts +3 -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/dropdown/dropdown.stories.js +1 -1
- package/dist/cjs/components/dropdown/dropdown.stories.js.map +1 -1
- package/dist/cjs/components/field-wrapper/FieldWrapper.d.ts +2 -2
- package/dist/cjs/components/field-wrapper/FieldWrapper.stories.d.ts +1 -2
- package/dist/cjs/components/font-picker/FontPicker.d.ts +1 -1
- package/dist/cjs/components/h-rule/HRule.d.ts +1 -2
- package/dist/cjs/components/h-rule/HRule.stories.d.ts +2 -3
- package/dist/cjs/components/header/Header.d.ts +0 -4
- package/dist/cjs/components/header/Header.js +19 -27
- package/dist/cjs/components/header/Header.js.map +1 -1
- package/dist/cjs/components/list-field/ListField.d.ts +1 -1
- package/dist/cjs/components/list-field/ListField.stories.d.ts +1 -2
- 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 +1 -2
- package/dist/cjs/components/number-field/NumberField.d.ts +1 -1
- package/dist/cjs/components/number-field/NumberField.stories.d.ts +1 -2
- 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/VideoPreview.d.ts +1 -1
- package/dist/cjs/components/publish-wizard/PublishWizard.d.ts +3 -3
- package/dist/cjs/components/publish-wizard/PublishWizard.js +59 -119
- 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/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 +1 -2
- package/dist/cjs/components/section/Section.stories.d.ts +2 -3
- package/dist/cjs/components/select-field/SelectField.d.ts +1 -1
- package/dist/cjs/components/select-field/SelectField.stories.d.ts +1 -2
- package/dist/cjs/components/shortcut-menu/ShortcutMenu.stories.d.ts +1 -1
- package/dist/cjs/components/slider-field/SliderField.d.ts +1 -1
- package/dist/cjs/components/slider-field/SliderField.stories.d.ts +1 -2
- package/dist/cjs/components/smpte-field/SMPTEField.d.ts +1 -1
- package/dist/cjs/components/tabs/Tabs.stories.d.ts +1 -1
- package/dist/cjs/components/text-area-field/TextAreaField.d.ts +1 -1
- package/dist/cjs/components/text-area-field/TextAreaField.stories.d.ts +1 -2
- package/dist/cjs/components/text-field/TextField.d.ts +1 -1
- package/dist/cjs/components/text-field/TextField.stories.d.ts +1 -2
- package/dist/cjs/constants/copy.d.ts +0 -5
- package/dist/cjs/constants/copy.js +0 -5
- package/dist/cjs/constants/copy.js.map +1 -1
- package/dist/cjs/constants/icons.d.ts +70 -72
- package/dist/cjs/constants/icons.js +1 -3
- package/dist/cjs/constants/icons.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/redux/actions/access.d.ts +3 -1
- package/dist/cjs/redux/actions/access.js +43 -10
- package/dist/cjs/redux/actions/access.js.map +1 -1
- package/dist/cjs/redux/actions/publish.js +3 -4
- package/dist/cjs/redux/actions/publish.js.map +1 -1
- package/dist/cjs/redux/reducers/access.js +30 -7
- package/dist/cjs/redux/reducers/access.js.map +1 -1
- package/dist/cjs/services/Session.d.ts +8 -9
- package/dist/cjs/services/Session.js +127 -31
- package/dist/cjs/services/Session.js.map +1 -1
- package/dist/cjs/utils/assets.d.ts +0 -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.d.ts +2 -1
- package/dist/esm/components/app-wrapper/AppWrapper.js +79 -69
- package/dist/esm/components/app-wrapper/AppWrapper.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableNameCell.js +2 -2
- package/dist/esm/components/assets/AssetsTableNameCell.js.map +1 -1
- package/dist/esm/components/assets/AssetsTablePreviewCell.d.ts +1 -1
- package/dist/esm/components/assets/AssetsUploadMenu.js +2 -3
- package/dist/esm/components/assets/AssetsUploadMenu.js.map +1 -1
- package/dist/esm/components/assets/FontAssetPreview.d.ts +1 -1
- package/dist/esm/components/auth-gate/AuthGate.js +6 -9
- package/dist/esm/components/auth-gate/AuthGate.js.map +1 -1
- package/dist/esm/components/button/Button.d.ts +1 -1
- package/dist/esm/components/button/Button.stories.d.ts +5 -6
- package/dist/esm/components/button-group-field/ButtonGroupField.stories.d.ts +1 -2
- package/dist/esm/components/button-menu/ButtonMenu.d.ts +2 -2
- package/dist/esm/components/button-menu/ButtonMenu.stories.d.ts +1 -2
- package/dist/esm/components/button-menu/ButtonMenuItem.d.ts +1 -1
- package/dist/esm/components/card/Card.stories.d.ts +1 -2
- package/dist/esm/components/checkbox-field/CheckboxField.d.ts +1 -1
- package/dist/esm/components/checkbox-field/CheckboxField.stories.d.ts +1 -2
- package/dist/esm/components/color-field/ColorField.d.ts +1 -1
- package/dist/esm/components/color-field/ColorFiled.stories.d.ts +1 -2
- package/dist/esm/components/compositions/TextLayer.d.ts +1 -1
- package/dist/esm/components/context-menu/AnimateComponent.d.ts +1 -2
- package/dist/esm/components/context-menu/ContextMenu.d.ts +1 -2
- package/dist/esm/components/context-menu/ContextMenuItem.d.ts +1 -2
- package/dist/esm/components/context-menu/ContextMenuTrigger.d.ts +1 -2
- package/dist/esm/components/context-menu/SubMenu.d.ts +1 -2
- package/dist/esm/components/controlled-list/ControlledList.d.ts +2 -2
- package/dist/esm/components/controlled-list/ControlledList.stories.d.ts +1 -2
- package/dist/esm/components/determinate-loader/DeterminateLoader.stories.d.ts +3 -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/dropdown/dropdown.stories.js +1 -1
- package/dist/esm/components/dropdown/dropdown.stories.js.map +1 -1
- package/dist/esm/components/field-wrapper/FieldWrapper.d.ts +2 -2
- package/dist/esm/components/field-wrapper/FieldWrapper.stories.d.ts +1 -2
- package/dist/esm/components/font-picker/FontPicker.d.ts +1 -1
- package/dist/esm/components/h-rule/HRule.d.ts +1 -2
- package/dist/esm/components/h-rule/HRule.stories.d.ts +2 -3
- package/dist/esm/components/header/Header.d.ts +0 -4
- package/dist/esm/components/header/Header.js +19 -27
- package/dist/esm/components/header/Header.js.map +1 -1
- package/dist/esm/components/list-field/ListField.d.ts +1 -1
- package/dist/esm/components/list-field/ListField.stories.d.ts +1 -2
- 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 +1 -2
- package/dist/esm/components/number-field/NumberField.d.ts +1 -1
- package/dist/esm/components/number-field/NumberField.stories.d.ts +1 -2
- 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/VideoPreview.d.ts +1 -1
- package/dist/esm/components/publish-wizard/PublishWizard.d.ts +3 -3
- package/dist/esm/components/publish-wizard/PublishWizard.js +60 -119
- 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/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 +1 -2
- package/dist/esm/components/section/Section.stories.d.ts +2 -3
- package/dist/esm/components/select-field/SelectField.d.ts +1 -1
- package/dist/esm/components/select-field/SelectField.stories.d.ts +1 -2
- package/dist/esm/components/shortcut-menu/ShortcutMenu.stories.d.ts +1 -1
- package/dist/esm/components/slider-field/SliderField.d.ts +1 -1
- package/dist/esm/components/slider-field/SliderField.stories.d.ts +1 -2
- package/dist/esm/components/smpte-field/SMPTEField.d.ts +1 -1
- package/dist/esm/components/tabs/Tabs.stories.d.ts +1 -1
- package/dist/esm/components/text-area-field/TextAreaField.d.ts +1 -1
- package/dist/esm/components/text-area-field/TextAreaField.stories.d.ts +1 -2
- package/dist/esm/components/text-field/TextField.d.ts +1 -1
- package/dist/esm/components/text-field/TextField.stories.d.ts +1 -2
- package/dist/esm/constants/copy.d.ts +0 -5
- package/dist/esm/constants/copy.js +0 -5
- package/dist/esm/constants/copy.js.map +1 -1
- package/dist/esm/constants/icons.d.ts +70 -72
- package/dist/esm/constants/icons.js +0 -2
- package/dist/esm/constants/icons.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/redux/actions/access.d.ts +3 -1
- package/dist/esm/redux/actions/access.js +37 -8
- package/dist/esm/redux/actions/access.js.map +1 -1
- package/dist/esm/redux/actions/publish.js +3 -4
- package/dist/esm/redux/actions/publish.js.map +1 -1
- package/dist/esm/redux/reducers/access.js +8 -5
- package/dist/esm/redux/reducers/access.js.map +1 -1
- package/dist/esm/services/Session.d.ts +8 -9
- package/dist/esm/services/Session.js +102 -29
- package/dist/esm/services/Session.js.map +1 -1
- package/dist/esm/utils/assets.d.ts +0 -1
- package/dist/styles.css +0 -23
- package/dist/styles.less +0 -26
- package/less/components/header.less +0 -13
- package/less/components/publish-wizard.less +0 -13
- package/package.json +1 -1
- package/src/components/app-wrapper/AppWrapper.tsx +120 -79
- package/src/components/assets/AssetsTableNameCell.tsx +1 -4
- package/src/components/assets/AssetsUploadMenu.tsx +8 -13
- package/src/components/auth-gate/AuthGate.tsx +8 -14
- package/src/components/header/Header.tsx +39 -74
- package/src/components/publish-wizard/PublishWizard.tsx +87 -172
- package/src/constants/copy.ts +0 -6
- package/src/constants/icons.tsx +0 -3
- package/src/index.ts +10 -1
- package/src/redux/actions/access.ts +67 -5
- package/src/redux/actions/publish.ts +3 -6
- package/src/redux/reducers/access.ts +8 -5
- package/src/services/Session.ts +120 -34
- package/dist/cjs/components/app-wrapper/AppWrapper_BACKUP_73190.d.ts +0 -27
- package/dist/cjs/components/app-wrapper/AppWrapper_BACKUP_73190.js +0 -243
- package/dist/cjs/components/app-wrapper/AppWrapper_BACKUP_73190.js.map +0 -1
- package/dist/cjs/components/app-wrapper/AppWrapper_BASE_73190.d.ts +0 -28
- package/dist/cjs/components/app-wrapper/AppWrapper_BASE_73190.js +0 -255
- package/dist/cjs/components/app-wrapper/AppWrapper_BASE_73190.js.map +0 -1
- package/dist/cjs/components/app-wrapper/AppWrapper_LOCAL_73190.d.ts +0 -27
- package/dist/cjs/components/app-wrapper/AppWrapper_LOCAL_73190.js +0 -243
- package/dist/cjs/components/app-wrapper/AppWrapper_LOCAL_73190.js.map +0 -1
- package/dist/cjs/components/app-wrapper/AppWrapper_REMOTE_73190.d.ts +0 -28
- package/dist/cjs/components/app-wrapper/AppWrapper_REMOTE_73190.js +0 -251
- package/dist/cjs/components/app-wrapper/AppWrapper_REMOTE_73190.js.map +0 -1
- package/dist/cjs/components/error-message-preview/ErrorMessagePreview.d.ts +0 -15
- package/dist/cjs/components/error-message-preview/ErrorMessagePreview.js +0 -91
- package/dist/cjs/components/error-message-preview/ErrorMessagePreview.js.map +0 -1
- package/dist/cjs/components/header/Header_BACKUP_73021.d.ts +0 -33
- package/dist/cjs/components/header/Header_BACKUP_73021.js +0 -393
- package/dist/cjs/components/header/Header_BACKUP_73021.js.map +0 -1
- package/dist/cjs/components/header/Header_BASE_73021.d.ts +0 -29
- package/dist/cjs/components/header/Header_BASE_73021.js +0 -376
- package/dist/cjs/components/header/Header_BASE_73021.js.map +0 -1
- package/dist/cjs/components/header/Header_LOCAL_73021.d.ts +0 -33
- package/dist/cjs/components/header/Header_LOCAL_73021.js +0 -382
- package/dist/cjs/components/header/Header_LOCAL_73021.js.map +0 -1
- package/dist/cjs/components/header/Header_REMOTE_73021.d.ts +0 -30
- package/dist/cjs/components/header/Header_REMOTE_73021.js +0 -386
- package/dist/cjs/components/header/Header_REMOTE_73021.js.map +0 -1
- package/dist/esm/components/app-wrapper/AppWrapper_BACKUP_73190.d.ts +0 -27
- package/dist/esm/components/app-wrapper/AppWrapper_BACKUP_73190.js +0 -194
- package/dist/esm/components/app-wrapper/AppWrapper_BACKUP_73190.js.map +0 -1
- package/dist/esm/components/app-wrapper/AppWrapper_BASE_73190.d.ts +0 -28
- package/dist/esm/components/app-wrapper/AppWrapper_BASE_73190.js +0 -208
- package/dist/esm/components/app-wrapper/AppWrapper_BASE_73190.js.map +0 -1
- package/dist/esm/components/app-wrapper/AppWrapper_LOCAL_73190.d.ts +0 -27
- package/dist/esm/components/app-wrapper/AppWrapper_LOCAL_73190.js +0 -194
- package/dist/esm/components/app-wrapper/AppWrapper_LOCAL_73190.js.map +0 -1
- package/dist/esm/components/app-wrapper/AppWrapper_REMOTE_73190.d.ts +0 -28
- package/dist/esm/components/app-wrapper/AppWrapper_REMOTE_73190.js +0 -204
- package/dist/esm/components/app-wrapper/AppWrapper_REMOTE_73190.js.map +0 -1
- package/dist/esm/components/error-message-preview/ErrorMessagePreview.d.ts +0 -15
- package/dist/esm/components/error-message-preview/ErrorMessagePreview.js +0 -35
- package/dist/esm/components/error-message-preview/ErrorMessagePreview.js.map +0 -1
- package/dist/esm/components/header/Header_BACKUP_73021.d.ts +0 -33
- package/dist/esm/components/header/Header_BACKUP_73021.js +0 -336
- package/dist/esm/components/header/Header_BACKUP_73021.js.map +0 -1
- package/dist/esm/components/header/Header_BASE_73021.d.ts +0 -29
- package/dist/esm/components/header/Header_BASE_73021.js +0 -322
- package/dist/esm/components/header/Header_BASE_73021.js.map +0 -1
- package/dist/esm/components/header/Header_LOCAL_73021.d.ts +0 -33
- package/dist/esm/components/header/Header_LOCAL_73021.js +0 -328
- package/dist/esm/components/header/Header_LOCAL_73021.js.map +0 -1
- package/dist/esm/components/header/Header_REMOTE_73021.d.ts +0 -30
- package/dist/esm/components/header/Header_REMOTE_73021.js +0 -329
- package/dist/esm/components/header/Header_REMOTE_73021.js.map +0 -1
- /package/src/components/dropdown/{dropdown.stories.tsx → Dropdown.stories.tsx} +0 -0
|
@@ -5,12 +5,10 @@ import HRule from '../h-rule/HRule';
|
|
|
5
5
|
import {
|
|
6
6
|
ICON_DOWNLOAD,
|
|
7
7
|
ICON_EMAIL,
|
|
8
|
-
ICON_EXCLAIMATION_TRIANGLE,
|
|
9
8
|
ICON_GLOBE,
|
|
10
9
|
ICON_HUBSPOT,
|
|
11
10
|
ICON_IMAGE,
|
|
12
|
-
ICON_PROJECT_DIAGRAM
|
|
13
|
-
ICON_UP_RIGHT_FROM_SQUARE
|
|
11
|
+
ICON_PROJECT_DIAGRAM
|
|
14
12
|
} from '../../constants/icons';
|
|
15
13
|
import { IImposiumAPI } from '../../services/API';
|
|
16
14
|
import * as copy from '../../constants/copy';
|
|
@@ -25,8 +23,6 @@ import { publishVersion } from '../../redux/actions/publish';
|
|
|
25
23
|
import { connect } from 'react-redux';
|
|
26
24
|
|
|
27
25
|
interface IPublishWizardProps {
|
|
28
|
-
fromCrM?: boolean;
|
|
29
|
-
creativeManagerBaseUrl?: string;
|
|
30
26
|
story: any;
|
|
31
27
|
project: any;
|
|
32
28
|
updateEditorConfig(c): void;
|
|
@@ -38,6 +34,7 @@ interface IPublishWizardProps {
|
|
|
38
34
|
exportExperiences: () => void;
|
|
39
35
|
publishVersion: (api: IImposiumAPI, sId: string) => any;
|
|
40
36
|
batchesList: any;
|
|
37
|
+
publishing: boolean;
|
|
41
38
|
onClose(): any;
|
|
42
39
|
api: IImposiumAPI;
|
|
43
40
|
handleError(e): void;
|
|
@@ -94,7 +91,6 @@ interface IPublishWizardState {
|
|
|
94
91
|
error: boolean;
|
|
95
92
|
next: boolean;
|
|
96
93
|
nextStep: boolean;
|
|
97
|
-
publishError: string;
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
interface IBigButtonProps {
|
|
@@ -138,27 +134,12 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
138
134
|
done: false,
|
|
139
135
|
error: false,
|
|
140
136
|
next: false,
|
|
141
|
-
nextStep: false
|
|
142
|
-
publishError: null
|
|
137
|
+
nextStep: false
|
|
143
138
|
};
|
|
144
139
|
this.emailWorkflow = React.createRef();
|
|
145
140
|
this.hiddenFileInputRef = React.createRef();
|
|
146
141
|
}
|
|
147
142
|
|
|
148
|
-
public componentDidUpdate(prevProps, prevState) {
|
|
149
|
-
// If we just finished publushing, and we're on the first screen still go to the second screen
|
|
150
|
-
if (
|
|
151
|
-
prevProps.publishData.publishing &&
|
|
152
|
-
!this.props.publishData.publishing &&
|
|
153
|
-
this.state.screenIndex === 0 &&
|
|
154
|
-
!this.state.publishError
|
|
155
|
-
) {
|
|
156
|
-
this.setState({
|
|
157
|
-
screenIndex: 1
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
143
|
public componentDidMount() {
|
|
163
144
|
const { story, api, handleError, activeComposition } = this.props;
|
|
164
145
|
// Pull in all of the access creds for the composition dropdown
|
|
@@ -294,25 +275,12 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
294
275
|
const {
|
|
295
276
|
story: { id },
|
|
296
277
|
api,
|
|
297
|
-
handleError
|
|
298
|
-
fromCrM
|
|
278
|
+
handleError
|
|
299
279
|
} = this.props;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
.then(() => {
|
|
305
|
-
this.setState({ screenIndex: 1 });
|
|
306
|
-
})
|
|
307
|
-
.catch((e) => {
|
|
308
|
-
this.setState({ publishError: e });
|
|
309
|
-
});
|
|
310
|
-
} else {
|
|
311
|
-
this.props.publishVersion(api, id).catch((e) => {
|
|
312
|
-
handleError(e);
|
|
313
|
-
});
|
|
314
|
-
this.setState({ screenIndex: 1 });
|
|
315
|
-
}
|
|
280
|
+
this.props.publishVersion(api, id).catch((e) => {
|
|
281
|
+
handleError(e);
|
|
282
|
+
});
|
|
283
|
+
this.setState({ screenIndex: 1 });
|
|
316
284
|
}
|
|
317
285
|
|
|
318
286
|
private onCloseHandler = () => {
|
|
@@ -328,7 +296,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
328
296
|
|
|
329
297
|
private renderLowerButtons() {
|
|
330
298
|
const { screenIndex, done, error, next } = this.state;
|
|
331
|
-
const { publishing } = this.props
|
|
299
|
+
const { publishing } = this.props;
|
|
332
300
|
|
|
333
301
|
const lowerButtons = [];
|
|
334
302
|
|
|
@@ -415,19 +383,11 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
415
383
|
}
|
|
416
384
|
|
|
417
385
|
private renderPublish() {
|
|
418
|
-
const { publishing } = this.props.publishData;
|
|
419
|
-
const { publishError } = this.state;
|
|
420
|
-
const error = publishError ? (
|
|
421
|
-
<p className='publish-error'>
|
|
422
|
-
<span className='icon'>{ICON_EXCLAIMATION_TRIANGLE}</span> {publishError}
|
|
423
|
-
</p>
|
|
424
|
-
) : null;
|
|
425
386
|
return (
|
|
426
387
|
<div>
|
|
427
388
|
<h2>{copy.publish.publishStepTitle}</h2>
|
|
428
389
|
<HRule />
|
|
429
|
-
<p>{
|
|
430
|
-
{error}
|
|
390
|
+
<p>{copy.publish.publishStepDesc}</p>
|
|
431
391
|
</div>
|
|
432
392
|
);
|
|
433
393
|
}
|
|
@@ -438,7 +398,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
438
398
|
const { compositions, afterEffects, selectedComposition, credentials, accessKey } =
|
|
439
399
|
this.state;
|
|
440
400
|
|
|
441
|
-
const { publishDataset
|
|
401
|
+
const { publishDataset } = this.props;
|
|
442
402
|
|
|
443
403
|
for (const comp of compositions) {
|
|
444
404
|
compOpts.push({
|
|
@@ -461,75 +421,56 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
461
421
|
});
|
|
462
422
|
}
|
|
463
423
|
|
|
464
|
-
let distributionOptions =
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
]
|
|
515
|
-
: [
|
|
516
|
-
{
|
|
517
|
-
label: (
|
|
518
|
-
<span>
|
|
519
|
-
{ICON_DOWNLOAD} {copy.publish.btnRunTestBatch}
|
|
520
|
-
</span>
|
|
521
|
-
),
|
|
522
|
-
onClick: (e) => this.onSelectOption(7)
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
label: (
|
|
526
|
-
<span>
|
|
527
|
-
{ICON_UP_RIGHT_FROM_SQUARE} {copy.publish.btnCrM}
|
|
528
|
-
</span>
|
|
529
|
-
),
|
|
530
|
-
link: `${creativeManagerBaseUrl}/library/${story.creativeLibraryId}/creative/${story.creativeLibraryId}/versions/`
|
|
531
|
-
}
|
|
532
|
-
];
|
|
424
|
+
let distributionOptions = [
|
|
425
|
+
{
|
|
426
|
+
label: (
|
|
427
|
+
<span>
|
|
428
|
+
{ICON_GLOBE} {copy.publish.btnWebsite}
|
|
429
|
+
</span>
|
|
430
|
+
),
|
|
431
|
+
onClick: (e) => this.onSelectOption(2)
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
label: (
|
|
435
|
+
<span>
|
|
436
|
+
{ICON_EMAIL} {copy.publish.btnEmail}
|
|
437
|
+
</span>
|
|
438
|
+
),
|
|
439
|
+
onClick: (e) => this.onSelectOption(3)
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
label: (
|
|
443
|
+
<span>
|
|
444
|
+
{ICON_HUBSPOT} {copy.publish.btnHubspot}
|
|
445
|
+
</span>
|
|
446
|
+
),
|
|
447
|
+
onClick: (e) => this.onSelectOption(5)
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
label: (
|
|
451
|
+
<span>
|
|
452
|
+
{ICON_PROJECT_DIAGRAM} {copy.publish.btnAPI}
|
|
453
|
+
</span>
|
|
454
|
+
),
|
|
455
|
+
onClick: (e) => this.onSelectOption(6)
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
label: (
|
|
459
|
+
<span>
|
|
460
|
+
{ICON_DOWNLOAD} {copy.publish.btnExport}
|
|
461
|
+
</span>
|
|
462
|
+
),
|
|
463
|
+
onClick: (e) => this.onSelectOption(7)
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
label: (
|
|
467
|
+
<span>
|
|
468
|
+
{ICON_IMAGE} {copy.publish.btnCRM}
|
|
469
|
+
</span>
|
|
470
|
+
),
|
|
471
|
+
onClick: (e) => this.onSelectOption(8)
|
|
472
|
+
}
|
|
473
|
+
];
|
|
533
474
|
|
|
534
475
|
if (publishDataset) {
|
|
535
476
|
const indexes = [0, 2, 3];
|
|
@@ -541,67 +482,41 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
541
482
|
}, []);
|
|
542
483
|
}
|
|
543
484
|
|
|
544
|
-
const compDropdown = !fromCrM ? (
|
|
545
|
-
<SelectField
|
|
546
|
-
label={copy.project.compName}
|
|
547
|
-
value={selectedComposition}
|
|
548
|
-
onChange={this.onCompositionChange}
|
|
549
|
-
options={compOpts}
|
|
550
|
-
tooltip={copy.project.tooltipCompId}
|
|
551
|
-
/>
|
|
552
|
-
) : null;
|
|
553
|
-
|
|
554
|
-
const accessKeyDropdown = !fromCrM ? (
|
|
555
|
-
<SelectField
|
|
556
|
-
label={copy.publish.accessKey}
|
|
557
|
-
value={accessKey}
|
|
558
|
-
onChange={this.onCredentialsChange}
|
|
559
|
-
options={credOpts}
|
|
560
|
-
tooltip={copy.publish.tooltipAccessKey}
|
|
561
|
-
/>
|
|
562
|
-
) : null;
|
|
563
|
-
|
|
564
485
|
return (
|
|
565
486
|
<div>
|
|
566
|
-
<h2>
|
|
567
|
-
{!fromCrM
|
|
568
|
-
? copy.publish.distributeStepTitle
|
|
569
|
-
: copy.publish.distributeStepTitleFromCrM}
|
|
570
|
-
</h2>
|
|
487
|
+
<h2>{copy.publish.distributeStepTitle}</h2>
|
|
571
488
|
<HRule />
|
|
572
|
-
<p>
|
|
573
|
-
{!fromCrM
|
|
574
|
-
? copy.publish.distributeStepDesc
|
|
575
|
-
: copy.publish.distributeStepDescFromCrM}
|
|
576
|
-
</p>
|
|
489
|
+
<p>{copy.publish.distributeStepDesc}</p>
|
|
577
490
|
<HRule />
|
|
578
|
-
{!this.state.selectedComposition &&
|
|
491
|
+
{!this.state.selectedComposition && (
|
|
579
492
|
<p className={'text-danger'}>{copy.publish.noCompErrorDesc}</p>
|
|
580
493
|
)}
|
|
581
494
|
<div style={{ marginTop: '10px' }}>
|
|
582
|
-
|
|
583
|
-
|
|
495
|
+
<SelectField
|
|
496
|
+
label={copy.project.compName}
|
|
497
|
+
value={selectedComposition}
|
|
498
|
+
onChange={this.onCompositionChange}
|
|
499
|
+
options={compOpts}
|
|
500
|
+
tooltip={copy.project.tooltipCompId}
|
|
501
|
+
/>
|
|
502
|
+
<SelectField
|
|
503
|
+
label={copy.publish.accessKey}
|
|
504
|
+
value={accessKey}
|
|
505
|
+
onChange={this.onCredentialsChange}
|
|
506
|
+
options={credOpts}
|
|
507
|
+
tooltip={copy.publish.tooltipAccessKey}
|
|
508
|
+
/>
|
|
584
509
|
|
|
585
510
|
<div className='link-wrapper'>
|
|
586
|
-
{distributionOptions?.map((option
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
} else {
|
|
596
|
-
return (
|
|
597
|
-
<BigButton
|
|
598
|
-
key={index}
|
|
599
|
-
disabled={!selectedComposition}
|
|
600
|
-
label={option.label}
|
|
601
|
-
onClick={option.onClick}
|
|
602
|
-
/>
|
|
603
|
-
);
|
|
604
|
-
}
|
|
511
|
+
{distributionOptions?.map((option, index) => {
|
|
512
|
+
return (
|
|
513
|
+
<BigButton
|
|
514
|
+
key={index}
|
|
515
|
+
disabled={!selectedComposition}
|
|
516
|
+
label={option.label}
|
|
517
|
+
onClick={option.onClick}
|
|
518
|
+
/>
|
|
519
|
+
);
|
|
605
520
|
})}
|
|
606
521
|
</div>
|
|
607
522
|
</div>
|
package/src/constants/copy.ts
CHANGED
|
@@ -115,9 +115,6 @@ export const compositions = {
|
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
export const publish = {
|
|
118
|
-
publishInProgress: 'Publish to Creative Manager in progress',
|
|
119
|
-
btnRunTestBatch: 'Run Test Batch',
|
|
120
|
-
btnCrM: 'Creative Manager',
|
|
121
118
|
creativeLibraryId: 'Creative Library ID',
|
|
122
119
|
creativeId: 'Creative ID',
|
|
123
120
|
email: 'Notification Email',
|
|
@@ -138,11 +135,8 @@ export const publish = {
|
|
|
138
135
|
|
|
139
136
|
// distribute
|
|
140
137
|
distributeStepTitle: 'STEP 2: How do you want your users to view their video?',
|
|
141
|
-
distributeStepTitleFromCrM: 'STEP 2: Run a test batch or return to Creative Manager?',
|
|
142
138
|
distributeStepDesc:
|
|
143
139
|
'Select which Composition you want to deliver, access credentials you want to use, and distribution channel.',
|
|
144
|
-
distributeStepDescFromCrM:
|
|
145
|
-
'You can run a test batch to preview a sample data set, or return to Creative Manager where you can publish the final version set.',
|
|
146
140
|
compositionError: 'Please Select Composition',
|
|
147
141
|
|
|
148
142
|
// webpage
|
package/src/constants/icons.tsx
CHANGED
|
@@ -37,7 +37,6 @@ import { faFont } from '@fortawesome/free-solid-svg-icons/faFont';
|
|
|
37
37
|
import { faAlignLeft } from '@fortawesome/free-solid-svg-icons/faAlignLeft';
|
|
38
38
|
import { faAlignRight } from '@fortawesome/free-solid-svg-icons/faAlignRight';
|
|
39
39
|
import { faAlignCenter } from '@fortawesome/free-solid-svg-icons/faAlignCenter';
|
|
40
|
-
import { faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons/faUpRightFromSquare';
|
|
41
40
|
import { faBars } from '@fortawesome/free-solid-svg-icons/faBars';
|
|
42
41
|
import { faArrowToTop } from '@fortawesome/pro-light-svg-icons/faArrowToTop';
|
|
43
42
|
import { faArrowToBottom } from '@fortawesome/pro-light-svg-icons/faArrowToBottom';
|
|
@@ -213,5 +212,3 @@ export const ICON_CENTER_ANCHOR = <FontAwesomeIcon icon={faCircleSmall} />;
|
|
|
213
212
|
export const ICON_CLAPPERBOARD_PLAY = <FontAwesomeIcon icon={faClapperboardPlay} />;
|
|
214
213
|
|
|
215
214
|
export const ICON_CODE = <FontAwesomeIcon icon={faCode} />;
|
|
216
|
-
|
|
217
|
-
export const ICON_UP_RIGHT_FROM_SQUARE = <FontAwesomeIcon icon={faUpRightFromSquare} />;
|
package/src/index.ts
CHANGED
|
@@ -80,7 +80,14 @@ import {
|
|
|
80
80
|
clearStoryPublishStatus,
|
|
81
81
|
getStoryPublishStatus
|
|
82
82
|
} from './redux/actions/publish';
|
|
83
|
-
import {
|
|
83
|
+
import {
|
|
84
|
+
cacheAccessData,
|
|
85
|
+
clearCachedAccessList,
|
|
86
|
+
storyAdded,
|
|
87
|
+
storyNameMutated,
|
|
88
|
+
orgNameMutated,
|
|
89
|
+
storyDeleted
|
|
90
|
+
} from './redux/actions/access';
|
|
84
91
|
import { resetFilters, updateFilters } from './redux/actions/asset-filters';
|
|
85
92
|
import {
|
|
86
93
|
getAssets,
|
|
@@ -228,6 +235,8 @@ export {
|
|
|
228
235
|
login,
|
|
229
236
|
clearCachedAuth,
|
|
230
237
|
access,
|
|
238
|
+
cacheAccessData,
|
|
239
|
+
clearCachedAccessList,
|
|
231
240
|
storyAdded,
|
|
232
241
|
storyNameMutated,
|
|
233
242
|
orgNameMutated,
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
+
import SessionService from '../../services/Session';
|
|
2
|
+
|
|
3
|
+
export const ACCESS_CACHE_KEY: string = 'imposium_access_list';
|
|
4
|
+
|
|
5
|
+
export const cacheAccessData = (accessData: any): any => {
|
|
6
|
+
doCacheAccessData(accessData);
|
|
7
|
+
return { type: actions.SET, accessData };
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const clearCachedAccessList = (): any => {
|
|
11
|
+
try {
|
|
12
|
+
localStorage.removeItem(ACCESS_CACHE_KEY);
|
|
13
|
+
} catch (e) {
|
|
14
|
+
console.warn('Failed to clear access list cache from local storage.');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return { type: actions.CLEAR };
|
|
18
|
+
};
|
|
19
|
+
|
|
1
20
|
export const storyAdded = (storyId: string, storyName: string): any => {
|
|
2
21
|
return (dispatch, getStore) => {
|
|
3
22
|
const {
|
|
4
23
|
access,
|
|
24
|
+
auth: {
|
|
25
|
+
idTokenPayload: { exp }
|
|
26
|
+
},
|
|
5
27
|
routing: {
|
|
6
28
|
locationBeforeTransitions: { query }
|
|
7
29
|
}
|
|
@@ -27,13 +49,24 @@ export const storyAdded = (storyId: string, storyName: string): any => {
|
|
|
27
49
|
return o;
|
|
28
50
|
})
|
|
29
51
|
};
|
|
52
|
+
|
|
53
|
+
SessionService.updateSession(
|
|
54
|
+
{ stories_hash: SessionService.generateStoriesHash(accessData) },
|
|
55
|
+
exp
|
|
56
|
+
);
|
|
57
|
+
doCacheAccessData(accessData);
|
|
30
58
|
dispatch({ type: actions.STORY_ADDED, accessData });
|
|
31
59
|
};
|
|
32
60
|
};
|
|
33
61
|
|
|
34
62
|
export const orgNameMutated = (orgId: string, newOrgName: string): any => {
|
|
35
63
|
return (dispatch, getStore) => {
|
|
36
|
-
const {
|
|
64
|
+
const {
|
|
65
|
+
access,
|
|
66
|
+
auth: {
|
|
67
|
+
idTokenPayload: { exp }
|
|
68
|
+
}
|
|
69
|
+
} = getStore();
|
|
37
70
|
|
|
38
71
|
const accessData: any = {
|
|
39
72
|
...access,
|
|
@@ -48,6 +81,12 @@ export const orgNameMutated = (orgId: string, newOrgName: string): any => {
|
|
|
48
81
|
return o;
|
|
49
82
|
})
|
|
50
83
|
};
|
|
84
|
+
|
|
85
|
+
SessionService.updateSession(
|
|
86
|
+
{ stories_hash: SessionService.generateOrgsHash(accessData) },
|
|
87
|
+
exp
|
|
88
|
+
);
|
|
89
|
+
doCacheAccessData(accessData);
|
|
51
90
|
dispatch({ type: actions.ORG_NAME_MUTATION, accessData });
|
|
52
91
|
};
|
|
53
92
|
};
|
|
@@ -56,6 +95,9 @@ export const storyNameMutated = (storyId: string, newStoryName: string): any =>
|
|
|
56
95
|
return (dispatch, getStore) => {
|
|
57
96
|
const {
|
|
58
97
|
access,
|
|
98
|
+
auth: {
|
|
99
|
+
idTokenPayload: { exp }
|
|
100
|
+
},
|
|
59
101
|
routing: {
|
|
60
102
|
locationBeforeTransitions: { query }
|
|
61
103
|
}
|
|
@@ -81,6 +123,12 @@ export const storyNameMutated = (storyId: string, newStoryName: string): any =>
|
|
|
81
123
|
return o;
|
|
82
124
|
})
|
|
83
125
|
};
|
|
126
|
+
|
|
127
|
+
SessionService.updateSession(
|
|
128
|
+
{ stories_hash: SessionService.generateOrgsHash(accessData) },
|
|
129
|
+
exp
|
|
130
|
+
);
|
|
131
|
+
doCacheAccessData(accessData);
|
|
84
132
|
dispatch({ type: actions.STORY_NAME_MUTATION, accessData });
|
|
85
133
|
};
|
|
86
134
|
};
|
|
@@ -89,6 +137,9 @@ export const storyDeleted = (storyId: string): any => {
|
|
|
89
137
|
return (dispatch, getStore) => {
|
|
90
138
|
const {
|
|
91
139
|
access,
|
|
140
|
+
auth: {
|
|
141
|
+
idTokenPayload: { exp }
|
|
142
|
+
},
|
|
92
143
|
routing: {
|
|
93
144
|
locationBeforeTransitions: { query }
|
|
94
145
|
}
|
|
@@ -108,14 +159,25 @@ export const storyDeleted = (storyId: string): any => {
|
|
|
108
159
|
return o;
|
|
109
160
|
})
|
|
110
161
|
};
|
|
162
|
+
|
|
163
|
+
SessionService.updateSession(
|
|
164
|
+
{
|
|
165
|
+
story_id: '',
|
|
166
|
+
stories_hash: SessionService.generateStoriesHash(accessData)
|
|
167
|
+
},
|
|
168
|
+
exp
|
|
169
|
+
);
|
|
170
|
+
doCacheAccessData(accessData);
|
|
111
171
|
dispatch({ type: actions.STORY_DELETED, accessData });
|
|
112
172
|
};
|
|
113
173
|
};
|
|
114
174
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
175
|
+
const doCacheAccessData = (accessData: any): any => {
|
|
176
|
+
try {
|
|
177
|
+
localStorage.setItem(ACCESS_CACHE_KEY, JSON.stringify(accessData));
|
|
178
|
+
} catch (e) {
|
|
179
|
+
console.warn('Failed to cache access list in local storage.');
|
|
180
|
+
}
|
|
119
181
|
};
|
|
120
182
|
|
|
121
183
|
const actions = {
|
|
@@ -12,17 +12,13 @@ export const getStoryPublishStatus = (api: IImposiumAPI, storyId: string): any =
|
|
|
12
12
|
api.getStoryStatus(storyId)
|
|
13
13
|
.then((resStatus) => {
|
|
14
14
|
if (resStatus) {
|
|
15
|
-
if (resStatus.status === 'failed') {
|
|
16
|
-
reject(resStatus.message);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
15
|
dispatch({ type: publish.UPDATE_PUBLISH_STATUS, data: resStatus });
|
|
20
|
-
|
|
21
16
|
if (resStatus.publishing) {
|
|
22
17
|
const jobId = resStatus.job_id;
|
|
23
18
|
api.pollJob(jobId)
|
|
24
19
|
.then(() => {
|
|
25
20
|
return dispatch(getStoryPublishStatus(api, storyId));
|
|
21
|
+
// Error polling job
|
|
26
22
|
})
|
|
27
23
|
.catch((e) => {
|
|
28
24
|
api.cancelJobPolling()
|
|
@@ -33,6 +29,7 @@ export const getStoryPublishStatus = (api: IImposiumAPI, storyId: string): any =
|
|
|
33
29
|
reject(f);
|
|
34
30
|
throw f;
|
|
35
31
|
});
|
|
32
|
+
console.error(e);
|
|
36
33
|
reject(copy.header.publishPollError);
|
|
37
34
|
});
|
|
38
35
|
}
|
|
@@ -76,7 +73,7 @@ export const publishVersion = (api: IImposiumAPI, storyId: string) => {
|
|
|
76
73
|
return new Promise((resolve, reject) => {
|
|
77
74
|
api.runPublish(storyId, '')
|
|
78
75
|
.then((d) => {
|
|
79
|
-
|
|
76
|
+
dispatch(getStoryPublishStatus(api, storyId));
|
|
80
77
|
})
|
|
81
78
|
.catch(() => {
|
|
82
79
|
reject(copy.header.publishJobError);
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import actions from '../actions/access';
|
|
1
|
+
import actions, { ACCESS_CACHE_KEY } from '../actions/access';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
let initialState: any = null;
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
initialState = JSON.parse(localStorage.getItem(ACCESS_CACHE_KEY));
|
|
7
|
+
} catch (e) {
|
|
8
|
+
console.warn('Cached access data was malformed or missing, redirected to login.');
|
|
9
|
+
}
|
|
7
10
|
|
|
8
11
|
const access = (state = initialState, action) => {
|
|
9
12
|
switch (action.type) {
|