@imposium-hub/components 2.9.0-14 → 2.9.0-2
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/Util.js +0 -6
- package/dist/cjs/Util.js.map +1 -1
- package/dist/cjs/components/app-wrapper/AppWrapper.js +0 -5
- package/dist/cjs/components/app-wrapper/AppWrapper.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableAssetIdFilter.js +1 -1
- package/dist/cjs/components/assets/AssetsTableAssetIdFilter.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableNameFilter.js +1 -1
- package/dist/cjs/components/assets/AssetsTableNameFilter.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTablePreviewCell.d.ts +0 -1
- package/dist/cjs/components/assets/AssetsTablePreviewCell.js +4 -7
- package/dist/cjs/components/assets/AssetsTablePreviewCell.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableTagsFilter.js +1 -1
- package/dist/cjs/components/assets/AssetsTableTagsFilter.js.map +1 -1
- package/dist/cjs/components/assets/AssetsUploadMenu.js +2 -4
- package/dist/cjs/components/assets/AssetsUploadMenu.js.map +1 -1
- package/dist/cjs/components/auth-gate/AuthGate.d.ts +2 -0
- package/dist/cjs/components/auth-gate/AuthGate.js +105 -0
- package/dist/cjs/components/auth-gate/AuthGate.js.map +1 -0
- package/dist/cjs/components/confirm-modal/ConfirmModal.js +2 -3
- package/dist/cjs/components/confirm-modal/ConfirmModal.js.map +1 -1
- package/dist/cjs/components/field-wrapper/FieldWrapper.d.ts +0 -1
- package/dist/cjs/components/field-wrapper/FieldWrapper.js +8 -10
- package/dist/cjs/components/field-wrapper/FieldWrapper.js.map +1 -1
- package/dist/cjs/components/header/Header.js +7 -10
- package/dist/cjs/components/header/Header.js.map +1 -1
- package/dist/cjs/components/number-field/NumberField.d.ts +0 -1
- package/dist/cjs/components/number-field/NumberField.js +2 -5
- package/dist/cjs/components/number-field/NumberField.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/EmailWorkflow.js +28 -61
- package/dist/cjs/components/publish-wizard/publish/EmailWorkflow.js.map +1 -1
- package/dist/cjs/components/replace-files-modal/ReplaceFilesModal.d.ts +0 -1
- package/dist/cjs/components/replace-files-modal/ReplaceFilesModal.js +12 -34
- package/dist/cjs/components/replace-files-modal/ReplaceFilesModal.js.map +1 -1
- package/dist/cjs/components/slider-field/SliderField.d.ts +0 -2
- package/dist/cjs/components/slider-field/SliderField.js +8 -17
- package/dist/cjs/components/slider-field/SliderField.js.map +1 -1
- package/dist/cjs/components/story-previewer/StoryPreviewer.js +3 -17
- package/dist/cjs/components/story-previewer/StoryPreviewer.js.map +1 -1
- package/dist/cjs/components/tabs/Tabs.js +1 -2
- package/dist/cjs/components/tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/text-field/TextField.d.ts +0 -1
- package/dist/cjs/components/text-field/TextField.js +2 -2
- package/dist/cjs/components/text-field/TextField.js.map +1 -1
- package/dist/cjs/constants/copy.d.ts +1 -5
- package/dist/cjs/constants/copy.js +2 -6
- package/dist/cjs/constants/copy.js.map +1 -1
- package/dist/cjs/constants/icons.d.ts +0 -2
- package/dist/cjs/constants/icons.js +1 -3
- package/dist/cjs/constants/icons.js.map +1 -1
- package/dist/cjs/constants/publish.d.ts +0 -3
- package/dist/cjs/constants/publish.js +3 -5
- package/dist/cjs/constants/publish.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/redux/actions/asset-uploads.d.ts +1 -1
- package/dist/cjs/redux/actions/asset-uploads.js +119 -169
- package/dist/cjs/redux/actions/asset-uploads.js.map +1 -1
- package/dist/cjs/redux/actions/auth.d.ts +9 -0
- package/dist/cjs/redux/actions/auth.js +30 -0
- package/dist/cjs/redux/actions/auth.js.map +1 -0
- package/dist/cjs/redux/actions/publish.js +3 -11
- package/dist/cjs/redux/actions/publish.js.map +1 -1
- package/dist/cjs/redux/reducers/asset-uploads.js +1 -2
- package/dist/cjs/redux/reducers/asset-uploads.js.map +1 -1
- package/dist/cjs/redux/reducers/auth.d.ts +3 -0
- package/dist/cjs/redux/reducers/auth.js +67 -0
- package/dist/cjs/redux/reducers/auth.js.map +1 -0
- package/dist/cjs/services/API.d.ts +10 -5
- package/dist/cjs/services/API.js +105 -36
- package/dist/cjs/services/API.js.map +1 -1
- package/dist/cjs/services/Auth0.d.ts +18 -0
- package/dist/cjs/services/Auth0.js +102 -0
- package/dist/cjs/services/Auth0.js.map +1 -0
- package/dist/cjs/services/Session.d.ts +26 -0
- package/dist/cjs/services/Session.js +155 -0
- package/dist/cjs/services/Session.js.map +1 -0
- package/dist/cjs/utils/modal.d.ts +0 -1
- package/dist/cjs/utils/modal.js +2 -3
- package/dist/cjs/utils/modal.js.map +1 -1
- package/dist/esm/Util.js +0 -6
- package/dist/esm/Util.js.map +1 -1
- package/dist/esm/components/app-wrapper/AppWrapper.js +0 -5
- package/dist/esm/components/app-wrapper/AppWrapper.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableAssetIdFilter.js +1 -1
- package/dist/esm/components/assets/AssetsTableAssetIdFilter.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableNameFilter.js +1 -1
- package/dist/esm/components/assets/AssetsTableNameFilter.js.map +1 -1
- package/dist/esm/components/assets/AssetsTablePreviewCell.d.ts +0 -1
- package/dist/esm/components/assets/AssetsTablePreviewCell.js +5 -8
- package/dist/esm/components/assets/AssetsTablePreviewCell.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableTagsFilter.js +1 -1
- package/dist/esm/components/assets/AssetsTableTagsFilter.js.map +1 -1
- package/dist/esm/components/assets/AssetsUploadMenu.js +3 -5
- package/dist/esm/components/assets/AssetsUploadMenu.js.map +1 -1
- package/dist/esm/components/auth-gate/AuthGate.d.ts +2 -0
- package/dist/esm/components/auth-gate/AuthGate.js +59 -0
- package/dist/esm/components/auth-gate/AuthGate.js.map +1 -0
- package/dist/esm/components/confirm-modal/ConfirmModal.js +2 -3
- package/dist/esm/components/confirm-modal/ConfirmModal.js.map +1 -1
- package/dist/esm/components/field-wrapper/FieldWrapper.d.ts +0 -1
- package/dist/esm/components/field-wrapper/FieldWrapper.js +8 -10
- package/dist/esm/components/field-wrapper/FieldWrapper.js.map +1 -1
- package/dist/esm/components/header/Header.js +5 -8
- package/dist/esm/components/header/Header.js.map +1 -1
- package/dist/esm/components/number-field/NumberField.d.ts +0 -1
- package/dist/esm/components/number-field/NumberField.js +2 -5
- package/dist/esm/components/number-field/NumberField.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/EmailWorkflow.js +19 -52
- package/dist/esm/components/publish-wizard/publish/EmailWorkflow.js.map +1 -1
- package/dist/esm/components/replace-files-modal/ReplaceFilesModal.d.ts +0 -1
- package/dist/esm/components/replace-files-modal/ReplaceFilesModal.js +12 -31
- package/dist/esm/components/replace-files-modal/ReplaceFilesModal.js.map +1 -1
- package/dist/esm/components/slider-field/SliderField.d.ts +0 -2
- package/dist/esm/components/slider-field/SliderField.js +8 -17
- package/dist/esm/components/slider-field/SliderField.js.map +1 -1
- package/dist/esm/components/story-previewer/StoryPreviewer.js +4 -13
- package/dist/esm/components/story-previewer/StoryPreviewer.js.map +1 -1
- package/dist/esm/components/tabs/Tabs.js +1 -2
- package/dist/esm/components/tabs/Tabs.js.map +1 -1
- package/dist/esm/components/text-field/TextField.d.ts +0 -1
- package/dist/esm/components/text-field/TextField.js +2 -2
- package/dist/esm/components/text-field/TextField.js.map +1 -1
- package/dist/esm/constants/copy.d.ts +1 -5
- package/dist/esm/constants/copy.js +2 -6
- package/dist/esm/constants/copy.js.map +1 -1
- package/dist/esm/constants/icons.d.ts +0 -2
- package/dist/esm/constants/icons.js +1 -3
- package/dist/esm/constants/icons.js.map +1 -1
- package/dist/esm/constants/publish.d.ts +0 -3
- package/dist/esm/constants/publish.js +2 -4
- package/dist/esm/constants/publish.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/redux/actions/asset-uploads.d.ts +1 -1
- package/dist/esm/redux/actions/asset-uploads.js +115 -165
- package/dist/esm/redux/actions/asset-uploads.js.map +1 -1
- package/dist/esm/redux/actions/auth.d.ts +9 -0
- package/dist/esm/redux/actions/auth.js +25 -0
- package/dist/esm/redux/actions/auth.js.map +1 -0
- package/dist/esm/redux/actions/publish.js +3 -11
- package/dist/esm/redux/actions/publish.js.map +1 -1
- package/dist/esm/redux/reducers/asset-uploads.js +1 -2
- package/dist/esm/redux/reducers/asset-uploads.js.map +1 -1
- package/dist/esm/redux/reducers/auth.d.ts +3 -0
- package/dist/esm/redux/reducers/auth.js +27 -0
- package/dist/esm/redux/reducers/auth.js.map +1 -0
- package/dist/esm/services/API.d.ts +10 -5
- package/dist/esm/services/API.js +50 -16
- package/dist/esm/services/API.js.map +1 -1
- package/dist/esm/services/Auth0.d.ts +18 -0
- package/dist/esm/services/Auth0.js +68 -0
- package/dist/esm/services/Auth0.js.map +1 -0
- package/dist/esm/services/Session.d.ts +26 -0
- package/dist/esm/services/Session.js +107 -0
- package/dist/esm/services/Session.js.map +1 -0
- package/dist/esm/utils/modal.d.ts +0 -1
- package/dist/esm/utils/modal.js +1 -2
- package/dist/esm/utils/modal.js.map +1 -1
- package/dist/styles.css +6 -101
- package/dist/styles.less +58 -91
- package/less/components/assets.less +39 -5
- package/less/components/button-menu.less +0 -1
- package/less/components/button.less +19 -57
- package/less/components/form-field.less +0 -27
- package/less/components/story-previewer.less +1 -1
- package/package.json +5 -5
- package/src/Util.ts +0 -9
- package/src/components/app-wrapper/AppWrapper.tsx +0 -6
- package/src/components/assets/AssetsTableAssetIdFilter.tsx +0 -1
- package/src/components/assets/AssetsTableNameFilter.tsx +0 -1
- package/src/components/assets/AssetsTablePreviewCell.tsx +14 -10
- package/src/components/assets/AssetsTableTagsFilter.tsx +0 -1
- package/src/components/assets/AssetsUploadMenu.tsx +11 -20
- package/src/components/confirm-modal/ConfirmModal.tsx +2 -3
- package/src/components/field-wrapper/FieldWrapper.tsx +12 -16
- package/src/components/header/Header.tsx +5 -8
- package/src/components/number-field/NumberField.tsx +2 -6
- package/src/components/publish-wizard/publish/EmailWorkflow.tsx +26 -77
- package/src/components/slider-field/SliderField.tsx +22 -44
- package/src/components/story-previewer/StoryPreviewer.tsx +8 -24
- package/src/components/tabs/Tabs.tsx +1 -2
- package/src/components/text-field/TextField.tsx +2 -5
- package/src/constants/copy.ts +2 -6
- package/src/constants/icons.tsx +1 -10
- package/src/constants/publish.ts +2 -7
- package/src/index.ts +1 -1
- package/src/redux/actions/asset-uploads.ts +162 -193
- package/src/redux/actions/publish.ts +3 -11
- package/src/redux/reducers/asset-uploads.ts +1 -2
- package/src/services/API.ts +82 -24
- package/src/utils/modal.ts +1 -3
- package/dist/cjs/components/edit-guide-modal/EditGuideModal.d.ts +0 -8
- package/dist/cjs/components/edit-guide-modal/EditGuideModal.js +0 -122
- package/dist/cjs/components/edit-guide-modal/EditGuideModal.js.map +0 -1
- package/dist/cjs/components/edit-marker-modal/EditMarkerModal.d.ts +0 -8
- package/dist/cjs/components/edit-marker-modal/EditMarkerModal.js +0 -104
- package/dist/cjs/components/edit-marker-modal/EditMarkerModal.js.map +0 -1
- package/dist/esm/components/edit-guide-modal/EditGuideModal.d.ts +0 -8
- package/dist/esm/components/edit-guide-modal/EditGuideModal.js +0 -65
- package/dist/esm/components/edit-guide-modal/EditGuideModal.js.map +0 -1
- package/dist/esm/components/edit-marker-modal/EditMarkerModal.d.ts +0 -8
- package/dist/esm/components/edit-marker-modal/EditMarkerModal.js +0 -72
- package/dist/esm/components/edit-marker-modal/EditMarkerModal.js.map +0 -1
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
interface IAssetsTablePreviewCell {
|
|
12
12
|
cell: any;
|
|
13
13
|
showMedia: boolean;
|
|
14
|
-
asset: any;
|
|
15
14
|
onClick(): void;
|
|
16
15
|
onRequestClose(): void;
|
|
17
16
|
}
|
|
@@ -44,15 +43,12 @@ class AssetsTablePreviewCell extends React.PureComponent<IAssetsTablePreviewCell
|
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
public render() {
|
|
47
|
-
const { cell, showMedia
|
|
46
|
+
const { cell, showMedia } = this.props;
|
|
48
47
|
const playbackSettings = {
|
|
49
48
|
autoPlay: true,
|
|
50
49
|
loop: false
|
|
51
50
|
};
|
|
52
51
|
|
|
53
|
-
const url = asset?.url || cell.row.original.url;
|
|
54
|
-
const width = asset?.width || cell.row.original.width;
|
|
55
|
-
const height = asset?.height || cell.row.original.height;
|
|
56
52
|
return (
|
|
57
53
|
<div
|
|
58
54
|
ref={this.iconRef}
|
|
@@ -62,17 +58,25 @@ class AssetsTablePreviewCell extends React.PureComponent<IAssetsTablePreviewCell
|
|
|
62
58
|
{cell.row.values.type === ASSET_TYPES.IMAGE && showMedia && (
|
|
63
59
|
<ImagePreview
|
|
64
60
|
style={{
|
|
65
|
-
...getMediaPreviewStyle(
|
|
61
|
+
...getMediaPreviewStyle(
|
|
62
|
+
cell.row.original.width,
|
|
63
|
+
cell.row.original.height,
|
|
64
|
+
this.iconRef
|
|
65
|
+
)
|
|
66
66
|
}}
|
|
67
|
-
url={url}
|
|
67
|
+
url={cell.row.original.url}
|
|
68
68
|
onRequestClose={this.evtHandlers.onClose}
|
|
69
69
|
/>
|
|
70
70
|
)}
|
|
71
71
|
{cell.row.values.type === ASSET_TYPES.VIDEO && showMedia && (
|
|
72
72
|
<VideoPreview
|
|
73
73
|
playbackSettings={playbackSettings}
|
|
74
|
-
style={getMediaPreviewStyle(
|
|
75
|
-
|
|
74
|
+
style={getMediaPreviewStyle(
|
|
75
|
+
cell.row.original.width,
|
|
76
|
+
cell.row.original.height,
|
|
77
|
+
this.iconRef
|
|
78
|
+
)}
|
|
79
|
+
url={cell.row.original.url}
|
|
76
80
|
onRequestClose={this.evtHandlers.onClose}
|
|
77
81
|
/>
|
|
78
82
|
)}
|
|
@@ -80,7 +84,7 @@ class AssetsTablePreviewCell extends React.PureComponent<IAssetsTablePreviewCell
|
|
|
80
84
|
<AudioPreview
|
|
81
85
|
playbackSettings={playbackSettings}
|
|
82
86
|
style={getMediaPreviewStyle(5, 1, this.iconRef)}
|
|
83
|
-
url={url}
|
|
87
|
+
url={cell.row.original.url}
|
|
84
88
|
onRequestClose={this.evtHandlers.onClose}
|
|
85
89
|
/>
|
|
86
90
|
)}
|
|
@@ -18,7 +18,7 @@ import AssetsTableTagsPivot from './AssetsTableTagsPivot';
|
|
|
18
18
|
import Tag from '../tag/Tag';
|
|
19
19
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
20
20
|
import { faEraser } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
-
import {
|
|
21
|
+
import { ICON_TIMES, ICON_UPLOAD } from '../../constants/icons';
|
|
22
22
|
import AssetsTableDropzone from './AssetsTableDropzone';
|
|
23
23
|
|
|
24
24
|
interface IAssetsUploadMenuProps {
|
|
@@ -148,7 +148,7 @@ class AssetsUploadMenu extends React.PureComponent<IAssetsUploadMenuProps, IAsse
|
|
|
148
148
|
|
|
149
149
|
public render() {
|
|
150
150
|
const {
|
|
151
|
-
assetUploads,
|
|
151
|
+
assetUploads: { uploads },
|
|
152
152
|
editor: {
|
|
153
153
|
fromCrM,
|
|
154
154
|
showUploadsMenu,
|
|
@@ -163,13 +163,10 @@ class AssetsUploadMenu extends React.PureComponent<IAssetsUploadMenuProps, IAsse
|
|
|
163
163
|
},
|
|
164
164
|
assetTags
|
|
165
165
|
} = this.props;
|
|
166
|
-
|
|
167
|
-
const uploads = assetUploads?.uploads || [];
|
|
168
166
|
const disable = uploads.length > 0 ? false : true;
|
|
169
167
|
|
|
170
168
|
let uploadsListInner;
|
|
171
169
|
const uploading = [];
|
|
172
|
-
|
|
173
170
|
if (uploads.length > 0) {
|
|
174
171
|
uploadsListInner = uploads.map((u: any) => {
|
|
175
172
|
const { filename, percent, tags } = u;
|
|
@@ -185,27 +182,21 @@ class AssetsUploadMenu extends React.PureComponent<IAssetsUploadMenuProps, IAsse
|
|
|
185
182
|
</Button>
|
|
186
183
|
);
|
|
187
184
|
|
|
188
|
-
const fileTags =
|
|
189
|
-
tags
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
: [];
|
|
185
|
+
const fileTags = tags
|
|
186
|
+
? tags.map((tag: string) => (
|
|
187
|
+
<Tag
|
|
188
|
+
key={tag}
|
|
189
|
+
copy={tag}
|
|
190
|
+
colorize={AssetsTableTagsPivot.COLORIZE_TAGS}
|
|
191
|
+
/>
|
|
192
|
+
))
|
|
193
|
+
: [];
|
|
198
194
|
|
|
199
195
|
return (
|
|
200
196
|
<div
|
|
201
197
|
className='ongoing-upload'
|
|
202
198
|
key={filename}>
|
|
203
199
|
<div className='ongoing-upload-inner'>
|
|
204
|
-
{u.assetId ? (
|
|
205
|
-
<div className='upload-icon'>{ICON_FILE_REPLACE}</div>
|
|
206
|
-
) : (
|
|
207
|
-
<div className='upload-icon'>{ICON_FILE_ADD}</div>
|
|
208
|
-
)}
|
|
209
200
|
<input
|
|
210
201
|
className='upload-filename'
|
|
211
202
|
value={filename}
|
|
@@ -4,7 +4,6 @@ import Modal from '../modal/Modal';
|
|
|
4
4
|
import Button from '../button/Button';
|
|
5
5
|
import { confirm as copy } from '../../constants/copy';
|
|
6
6
|
import Section from '../section/Section';
|
|
7
|
-
import { confirmModalEvent } from '../../utils/modal';
|
|
8
7
|
|
|
9
8
|
export interface IConfirmModalProps {
|
|
10
9
|
onYes: () => void;
|
|
@@ -66,9 +65,9 @@ export const ConfirmModal = () => {
|
|
|
66
65
|
);
|
|
67
66
|
|
|
68
67
|
useEffect(() => {
|
|
69
|
-
window.addEventListener(
|
|
68
|
+
window.addEventListener('openconfirmmodal', onOpen);
|
|
70
69
|
return () => {
|
|
71
|
-
window.removeEventListener(
|
|
70
|
+
window.removeEventListener('openconfirmmodal', onOpen);
|
|
72
71
|
};
|
|
73
72
|
}, []);
|
|
74
73
|
|
|
@@ -14,7 +14,6 @@ interface IFieldWrapperProps {
|
|
|
14
14
|
width?: string | number;
|
|
15
15
|
labelPosition?: string;
|
|
16
16
|
labelWidth?: string | number;
|
|
17
|
-
header?: boolean;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
interface IFieldWrapperState {
|
|
@@ -88,7 +87,7 @@ class FieldWrapper extends React.PureComponent<IFieldWrapperProps, IFieldWrapper
|
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
public render() {
|
|
91
|
-
const { label, width, customClass
|
|
90
|
+
const { label, width, customClass } = this.props;
|
|
92
91
|
const labelJSX = this.renderLabel();
|
|
93
92
|
|
|
94
93
|
const style = {};
|
|
@@ -101,22 +100,19 @@ class FieldWrapper extends React.PureComponent<IFieldWrapperProps, IFieldWrapper
|
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
return (
|
|
104
|
-
|
|
105
|
-
{
|
|
103
|
+
<div
|
|
104
|
+
className={`form-field ${customClass} ${this.getLabelClass()}`}
|
|
105
|
+
style={style}>
|
|
106
|
+
{labelJSX}
|
|
106
107
|
<div
|
|
107
|
-
className={`form-field ${
|
|
108
|
-
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
className={`form-field-content ${this.getLabelClass()}`}
|
|
112
|
-
{...fieldProps}>
|
|
113
|
-
{this.props.children}
|
|
114
|
-
{!header && this.renderButtons()}
|
|
115
|
-
</div>
|
|
116
|
-
{renderTooltip(this.tooltipId, this.props.tooltip)}
|
|
117
|
-
{this.renderInfo()}
|
|
108
|
+
className={`form-field-content ${this.getLabelClass()}`}
|
|
109
|
+
{...fieldProps}>
|
|
110
|
+
{this.props.children}
|
|
111
|
+
{this.renderButtons()}
|
|
118
112
|
</div>
|
|
119
|
-
|
|
113
|
+
{renderTooltip(this.tooltipId, this.props.tooltip)}
|
|
114
|
+
{this.renderInfo()}
|
|
115
|
+
</div>
|
|
120
116
|
);
|
|
121
117
|
}
|
|
122
118
|
|
|
@@ -73,7 +73,7 @@ class ImposiumHeader extends React.PureComponent<IHeaderProps, IHeaderState> {
|
|
|
73
73
|
|
|
74
74
|
private static readonly SDK_DOCS_LINK: string = 'https://docs.imposium.com/js-sdk/';
|
|
75
75
|
|
|
76
|
-
private static readonly DEFAULT_ACCOUNT_TOGGLE_COLOR: string = '
|
|
76
|
+
private static readonly DEFAULT_ACCOUNT_TOGGLE_COLOR: string = 'royalblue';
|
|
77
77
|
|
|
78
78
|
private static readonly NO_STORIES_COPY: string = 'No stories were found';
|
|
79
79
|
|
|
@@ -144,7 +144,7 @@ class ImposiumHeader extends React.PureComponent<IHeaderProps, IHeaderState> {
|
|
|
144
144
|
: [];
|
|
145
145
|
|
|
146
146
|
let dropdownToggleColor: string = ImposiumHeader.DEFAULT_ACCOUNT_TOGGLE_COLOR;
|
|
147
|
-
let activeFirstChar: string = '
|
|
147
|
+
let activeFirstChar: string = '';
|
|
148
148
|
|
|
149
149
|
if (activeOrganizationBlob && activeOrganizationBlob.hasOwnProperty('name')) {
|
|
150
150
|
dropdownToggleColor = string2HexCode(activeOrganizationBlob.name);
|
|
@@ -164,7 +164,6 @@ class ImposiumHeader extends React.PureComponent<IHeaderProps, IHeaderState> {
|
|
|
164
164
|
const { activeOrganization, api, activeServiceId, unsavedChanges } = this.props;
|
|
165
165
|
|
|
166
166
|
const changeStory = () => {
|
|
167
|
-
api.cancelAllPendingRequests();
|
|
168
167
|
pushRoute(`/${activeOrganization}/${story.id}`);
|
|
169
168
|
api.cacheActiveStory(activeServiceId, activeOrganization, story.id);
|
|
170
169
|
};
|
|
@@ -179,8 +178,8 @@ class ImposiumHeader extends React.PureComponent<IHeaderProps, IHeaderState> {
|
|
|
179
178
|
|
|
180
179
|
openConfirmModal({
|
|
181
180
|
showCancel: true,
|
|
182
|
-
showNo: true,
|
|
183
181
|
noLabel: header.noSave,
|
|
182
|
+
showNo: true,
|
|
184
183
|
onNo: () => changeStory(),
|
|
185
184
|
yesLabel: header.onSave,
|
|
186
185
|
onYes: () => onYes(),
|
|
@@ -199,9 +198,8 @@ class ImposiumHeader extends React.PureComponent<IHeaderProps, IHeaderState> {
|
|
|
199
198
|
this.setState({ showAccountDropdown: false });
|
|
200
199
|
|
|
201
200
|
if (orgId) {
|
|
201
|
+
const lastModified = getLastModifiedStoryInOrg(orgId, this.props.access);
|
|
202
202
|
const changeOrg = () => {
|
|
203
|
-
api.cancelAllPendingRequests();
|
|
204
|
-
const lastModified = getLastModifiedStoryInOrg(orgId, this.props.access);
|
|
205
203
|
let storyId = lastModified;
|
|
206
204
|
api.getCachedStoryForOrg(activeServiceId, orgId)
|
|
207
205
|
.then((res) => {
|
|
@@ -211,7 +209,6 @@ class ImposiumHeader extends React.PureComponent<IHeaderProps, IHeaderState> {
|
|
|
211
209
|
api.cacheActiveStory(activeServiceId, orgId, storyId);
|
|
212
210
|
} else {
|
|
213
211
|
pushRoute(`/${orgId}`);
|
|
214
|
-
api.cacheActiveStory(activeServiceId, orgId);
|
|
215
212
|
}
|
|
216
213
|
})
|
|
217
214
|
.catch((e) => {
|
|
@@ -229,8 +226,8 @@ class ImposiumHeader extends React.PureComponent<IHeaderProps, IHeaderState> {
|
|
|
229
226
|
|
|
230
227
|
openConfirmModal({
|
|
231
228
|
showCancel: true,
|
|
232
|
-
showNo: true,
|
|
233
229
|
noLabel: header.noSave,
|
|
230
|
+
showNo: true,
|
|
234
231
|
onNo: () => changeOrg(),
|
|
235
232
|
yesLabel: header.onSave,
|
|
236
233
|
onYes: () => onYes(),
|
|
@@ -17,7 +17,6 @@ interface INumberFieldProps {
|
|
|
17
17
|
min?: number;
|
|
18
18
|
max?: number;
|
|
19
19
|
onBlur?(e): void;
|
|
20
|
-
focusOnMount?: boolean;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
interface INumberFieldState {
|
|
@@ -38,9 +37,6 @@ class NumberField extends React.PureComponent<INumberFieldProps, INumberFieldSta
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
public componentDidMount(): void {
|
|
41
|
-
if (this.props.focusOnMount && this.inputRef.current) {
|
|
42
|
-
this.inputRef.current.focus();
|
|
43
|
-
}
|
|
44
40
|
this.setState({
|
|
45
41
|
error: false,
|
|
46
42
|
value: this.props.value
|
|
@@ -74,8 +70,8 @@ class NumberField extends React.PureComponent<INumberFieldProps, INumberFieldSta
|
|
|
74
70
|
|
|
75
71
|
private onChange(e) {
|
|
76
72
|
let val = e.target.value;
|
|
77
|
-
if (val === ''
|
|
78
|
-
val =
|
|
73
|
+
if (val === '') {
|
|
74
|
+
val = null;
|
|
79
75
|
} else {
|
|
80
76
|
val = parseFloat(val);
|
|
81
77
|
}
|
|
@@ -12,13 +12,7 @@ import { connect } from 'react-redux';
|
|
|
12
12
|
import SelectField from '../../select-field/SelectField';
|
|
13
13
|
import { updateAssociation, getBatch, setPage } from '../../../redux/actions/active-batch';
|
|
14
14
|
import TextField from '../../text-field/TextField';
|
|
15
|
-
import {
|
|
16
|
-
ADSTUDIO_POST_RENDER_ACTION,
|
|
17
|
-
ASSET_NAME_VAR,
|
|
18
|
-
ASSETS_POST_RENDER_ACTION,
|
|
19
|
-
CRM_PLACEMENT_VARS
|
|
20
|
-
} from '../../../constants/publish';
|
|
21
|
-
import CheckboxField from '../../checkbox-field/CheckboxField';
|
|
15
|
+
import { CRM_PLACEMENT_VARS } from '../../../constants/publish';
|
|
22
16
|
|
|
23
17
|
interface IEmailWorkflowProps {
|
|
24
18
|
story: any;
|
|
@@ -75,12 +69,12 @@ interface IEmailWorkflowProps {
|
|
|
75
69
|
onNext: (val: boolean) => void;
|
|
76
70
|
next: boolean;
|
|
77
71
|
isCrM: boolean;
|
|
78
|
-
isCrMAsset?: boolean;
|
|
79
72
|
}
|
|
80
73
|
|
|
81
74
|
interface CrMOverrides {
|
|
82
75
|
creative_id: string;
|
|
83
76
|
creative_library_id: string;
|
|
77
|
+
notification_email: string;
|
|
84
78
|
placement_type: string;
|
|
85
79
|
}
|
|
86
80
|
|
|
@@ -130,6 +124,7 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
130
124
|
creativeManagerOverrides: {
|
|
131
125
|
creative_id: '',
|
|
132
126
|
creative_library_id: '',
|
|
127
|
+
notification_email: '',
|
|
133
128
|
placement_type: 'crm-adstudio'
|
|
134
129
|
},
|
|
135
130
|
waitingForPublish: false,
|
|
@@ -271,8 +266,6 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
271
266
|
const { name } = this.props.story;
|
|
272
267
|
const { isCrM } = this.props;
|
|
273
268
|
const { inventory, inventoryKeys } = this.state;
|
|
274
|
-
const uploadAsAssets =
|
|
275
|
-
this.state.creativeManagerOverrides.placement_type === ASSETS_POST_RENDER_ACTION;
|
|
276
269
|
|
|
277
270
|
const maskConfig: any[] = inventoryKeys.map((currKey: string) => {
|
|
278
271
|
let value = '';
|
|
@@ -295,27 +288,12 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
295
288
|
});
|
|
296
289
|
|
|
297
290
|
if (isCrM) {
|
|
298
|
-
|
|
299
|
-
maskConfig.push(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
id: 'creative_library_id',
|
|
307
|
-
name: 'creative_library_id',
|
|
308
|
-
show: true
|
|
309
|
-
}
|
|
310
|
-
);
|
|
311
|
-
} else {
|
|
312
|
-
for (const id of CRM_PLACEMENT_VARS) {
|
|
313
|
-
maskConfig.push({
|
|
314
|
-
id,
|
|
315
|
-
name: id,
|
|
316
|
-
show: true
|
|
317
|
-
});
|
|
318
|
-
}
|
|
291
|
+
for (const id of CRM_PLACEMENT_VARS) {
|
|
292
|
+
maskConfig.push({
|
|
293
|
+
id,
|
|
294
|
+
name: id,
|
|
295
|
+
show: true
|
|
296
|
+
});
|
|
319
297
|
}
|
|
320
298
|
}
|
|
321
299
|
|
|
@@ -458,7 +436,12 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
458
436
|
private getPostRenderActions() {
|
|
459
437
|
const CrMUploadAction = { data: {} };
|
|
460
438
|
const {
|
|
461
|
-
creativeManagerOverrides: {
|
|
439
|
+
creativeManagerOverrides: {
|
|
440
|
+
placement_type,
|
|
441
|
+
creative_id,
|
|
442
|
+
creative_library_id,
|
|
443
|
+
notification_email
|
|
444
|
+
}
|
|
462
445
|
} = this.state;
|
|
463
446
|
|
|
464
447
|
CrMUploadAction['type'] = placement_type;
|
|
@@ -468,6 +451,9 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
468
451
|
if (creative_library_id) {
|
|
469
452
|
CrMUploadAction.data['creative_library_id'] = creative_library_id;
|
|
470
453
|
}
|
|
454
|
+
if (notification_email) {
|
|
455
|
+
CrMUploadAction.data['notification_email'] = notification_email;
|
|
456
|
+
}
|
|
471
457
|
|
|
472
458
|
return [CrMUploadAction];
|
|
473
459
|
}
|
|
@@ -729,9 +715,7 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
729
715
|
};
|
|
730
716
|
|
|
731
717
|
if (!publishDataset) {
|
|
732
|
-
|
|
733
|
-
emailOptions.push(downloadSampleCsv);
|
|
734
|
-
}
|
|
718
|
+
emailOptions.push(downloadSampleCsv);
|
|
735
719
|
emailOptions.push(selectCsv);
|
|
736
720
|
} else {
|
|
737
721
|
emailOptions.push(uploadDataset);
|
|
@@ -795,7 +779,7 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
795
779
|
|
|
796
780
|
const downloadCSV = (
|
|
797
781
|
<>
|
|
798
|
-
{downloadCSVDiv}
|
|
782
|
+
{this.props.error ? (this.props.next ? downloadCSVDiv : '') : downloadCSVDiv}
|
|
799
783
|
{this.renderColumnMap()}
|
|
800
784
|
</>
|
|
801
785
|
);
|
|
@@ -871,13 +855,6 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
871
855
|
/>
|
|
872
856
|
);
|
|
873
857
|
})}
|
|
874
|
-
{batchError && (
|
|
875
|
-
<BigButton
|
|
876
|
-
label={downloadCsvLabel}
|
|
877
|
-
disabled={downloading}
|
|
878
|
-
onClick={() => this.downloadCsv()}
|
|
879
|
-
/>
|
|
880
|
-
)}
|
|
881
858
|
</div>
|
|
882
859
|
</div>
|
|
883
860
|
);
|
|
@@ -934,8 +911,10 @@ const CrMOptions: React.FC<ICrMOptionsProps> = ({ options, onChange, errorCopy =
|
|
|
934
911
|
</div>
|
|
935
912
|
) : null;
|
|
936
913
|
|
|
937
|
-
|
|
914
|
+
return (
|
|
938
915
|
<>
|
|
916
|
+
<HRule />
|
|
917
|
+
<br />
|
|
939
918
|
<h2>{copy.publish.crmPlacement}</h2>
|
|
940
919
|
<p>{copy.publish.crmData}</p>
|
|
941
920
|
{e}
|
|
@@ -954,44 +933,14 @@ const CrMOptions: React.FC<ICrMOptionsProps> = ({ options, onChange, errorCopy =
|
|
|
954
933
|
value={options.creative_id}
|
|
955
934
|
onChange={(v) => onInputChange('creative_id', v)}
|
|
956
935
|
/>
|
|
957
|
-
</>
|
|
958
|
-
);
|
|
959
|
-
|
|
960
|
-
const assetInterface = (
|
|
961
|
-
<>
|
|
962
|
-
<h2>{copy.publish.crmPlacement}</h2>
|
|
963
|
-
<p>{copy.publish.crmData}</p>
|
|
964
|
-
{e}
|
|
965
|
-
<br />
|
|
966
936
|
<TextField
|
|
967
937
|
width={'33%'}
|
|
968
938
|
labelPosition='top'
|
|
969
|
-
label={copy.publish.
|
|
970
|
-
value={options.
|
|
971
|
-
onChange={(v) => onInputChange('
|
|
939
|
+
label={copy.publish.email}
|
|
940
|
+
value={options.notification_email}
|
|
941
|
+
onChange={(v) => onInputChange('notification_email', v)}
|
|
972
942
|
/>
|
|
973
|
-
</>
|
|
974
|
-
);
|
|
975
|
-
return (
|
|
976
|
-
<>
|
|
977
|
-
<HRule />
|
|
978
943
|
<br />
|
|
979
|
-
{options['placement_type'] === ASSETS_POST_RENDER_ACTION
|
|
980
|
-
? assetInterface
|
|
981
|
-
: standardInterface}
|
|
982
|
-
<br />
|
|
983
|
-
<HRule />
|
|
984
|
-
<CheckboxField
|
|
985
|
-
value={options['placement_type'] === ASSETS_POST_RENDER_ACTION ? true : false}
|
|
986
|
-
label={copy.publish.uploadAsAssets}
|
|
987
|
-
onChange={(v) => {
|
|
988
|
-
if (v === false) {
|
|
989
|
-
onInputChange('placement_type', ADSTUDIO_POST_RENDER_ACTION);
|
|
990
|
-
} else {
|
|
991
|
-
onInputChange('placement_type', ASSETS_POST_RENDER_ACTION);
|
|
992
|
-
}
|
|
993
|
-
}}
|
|
994
|
-
/>
|
|
995
944
|
<HRule />
|
|
996
945
|
</>
|
|
997
946
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import FieldWrapper from '../field-wrapper/FieldWrapper';
|
|
3
3
|
import { IToolTipConfig } from '../Tooltip';
|
|
4
|
-
import { ICON_CHECK } from '../../constants/icons';
|
|
5
4
|
|
|
6
5
|
interface ISliderFieldProps {
|
|
7
6
|
label?: any;
|
|
@@ -16,7 +15,6 @@ interface ISliderFieldProps {
|
|
|
16
15
|
info?: string;
|
|
17
16
|
labelPosition?: string;
|
|
18
17
|
labelWidth?: string | number;
|
|
19
|
-
enabledToggle?: boolean;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
interface ISliderFieldState {
|
|
@@ -71,14 +69,6 @@ class SliderField extends React.PureComponent<ISliderFieldProps, ISliderFieldSta
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
|
|
74
|
-
private toggle() {
|
|
75
|
-
if (this.props.value !== undefined && this.props.value !== null) {
|
|
76
|
-
this.props.onChange(null);
|
|
77
|
-
} else {
|
|
78
|
-
this.props.onChange(this.props.defaultValue);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
72
|
public render() {
|
|
83
73
|
const {
|
|
84
74
|
label,
|
|
@@ -91,15 +81,16 @@ class SliderField extends React.PureComponent<ISliderFieldProps, ISliderFieldSta
|
|
|
91
81
|
tooltip,
|
|
92
82
|
info,
|
|
93
83
|
labelPosition,
|
|
94
|
-
labelWidth
|
|
95
|
-
enabledToggle
|
|
84
|
+
labelWidth
|
|
96
85
|
} = this.props;
|
|
97
86
|
const { tempValue } = this.state;
|
|
98
|
-
const valueSet = value !== null && value !== undefined;
|
|
99
|
-
const val = tempValue !== null ? tempValue : !valueSet ? defaultValue : value;
|
|
100
87
|
|
|
101
|
-
const
|
|
102
|
-
|
|
88
|
+
const val =
|
|
89
|
+
tempValue !== null
|
|
90
|
+
? tempValue
|
|
91
|
+
: value === null || value === undefined
|
|
92
|
+
? defaultValue
|
|
93
|
+
: value;
|
|
103
94
|
|
|
104
95
|
return (
|
|
105
96
|
<FieldWrapper
|
|
@@ -110,34 +101,21 @@ class SliderField extends React.PureComponent<ISliderFieldProps, ISliderFieldSta
|
|
|
110
101
|
labelPosition={labelPosition}
|
|
111
102
|
labelWidth={labelWidth}
|
|
112
103
|
width={width}>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
value={val}
|
|
129
|
-
step={step}
|
|
130
|
-
/>
|
|
131
|
-
)}
|
|
132
|
-
|
|
133
|
-
{showInputs && (
|
|
134
|
-
<input
|
|
135
|
-
className='val'
|
|
136
|
-
onChange={(e) => this.numberInputChange(e)}
|
|
137
|
-
type='number'
|
|
138
|
-
value={val}
|
|
139
|
-
/>
|
|
140
|
-
)}
|
|
104
|
+
<input
|
|
105
|
+
onChange={(e) => this.rangeInputChange(e)}
|
|
106
|
+
type='range'
|
|
107
|
+
min={min}
|
|
108
|
+
max={max}
|
|
109
|
+
value={val}
|
|
110
|
+
step={step}
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<input
|
|
114
|
+
className='val'
|
|
115
|
+
onChange={(e) => this.numberInputChange(e)}
|
|
116
|
+
type='number'
|
|
117
|
+
value={val}
|
|
118
|
+
/>
|
|
141
119
|
</FieldWrapper>
|
|
142
120
|
);
|
|
143
121
|
}
|
|
@@ -48,7 +48,6 @@ interface IStoryPreviewerProps {
|
|
|
48
48
|
compositionOptions?: any[];
|
|
49
49
|
editor: any;
|
|
50
50
|
updateEditorConfig(c): void;
|
|
51
|
-
reRender: boolean;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
interface IStoryPreviewerState {
|
|
@@ -200,15 +199,7 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
200
199
|
if (!prevProps.editor?.autoRender && this.props.editor?.autoRender) {
|
|
201
200
|
this.props.updateEditorConfig({ autoRender: false });
|
|
202
201
|
this.evtHandlers.gotExperience = null;
|
|
203
|
-
this.props.api.cancelExperiencePolling().then(() =>
|
|
204
|
-
if (this.props.editor?.reRender) {
|
|
205
|
-
this.setState({ compositionOverride: null }, () =>
|
|
206
|
-
this.createExperience(this.props.compositionId)
|
|
207
|
-
);
|
|
208
|
-
} else {
|
|
209
|
-
this.createExperience();
|
|
210
|
-
}
|
|
211
|
-
});
|
|
202
|
+
this.props.api.cancelExperiencePolling().then(() => this.createExperience());
|
|
212
203
|
}
|
|
213
204
|
|
|
214
205
|
if (
|
|
@@ -511,17 +502,11 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
511
502
|
onExperenceLoaded(resVideo);
|
|
512
503
|
}
|
|
513
504
|
|
|
514
|
-
this.setState(
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
},
|
|
520
|
-
() =>
|
|
521
|
-
this.props.updateEditorConfig({
|
|
522
|
-
reRender: false
|
|
523
|
-
})
|
|
524
|
-
);
|
|
505
|
+
this.setState({
|
|
506
|
+
rendering: false,
|
|
507
|
+
activeOutput: this.getFirstOutput(resVideo),
|
|
508
|
+
experience: resVideo
|
|
509
|
+
});
|
|
525
510
|
};
|
|
526
511
|
|
|
527
512
|
api.getExperience(experienceId, true)
|
|
@@ -624,12 +609,12 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
624
609
|
);
|
|
625
610
|
}
|
|
626
611
|
|
|
627
|
-
private createExperience(
|
|
612
|
+
private createExperience() {
|
|
628
613
|
const { storyId, onNotification, onError, api, onExperienceCreated, useWorkingCopy } =
|
|
629
614
|
this.props;
|
|
630
615
|
|
|
631
616
|
const fastRender = this.props.editor?.fastRender || false;
|
|
632
|
-
const compId =
|
|
617
|
+
const compId = this.getCompId();
|
|
633
618
|
|
|
634
619
|
this.resetState(false, () => {
|
|
635
620
|
this.setState(
|
|
@@ -894,7 +879,6 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
894
879
|
const { storyId } = this.props;
|
|
895
880
|
const renderCopy = experience ? copy.btnReRender : copy.btnRender;
|
|
896
881
|
const compId = this.getCompId();
|
|
897
|
-
|
|
898
882
|
const btnRender = !rendering ? (
|
|
899
883
|
<Button
|
|
900
884
|
disabled={!compId}
|