@imposium-hub/components 2.14.11 → 2.15.0-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/app-wrapper/AppWrapper.d.ts +1 -0
- package/dist/cjs/components/app-wrapper/AppWrapper.js +1 -1
- package/dist/cjs/components/app-wrapper/AppWrapper.js.map +1 -1
- package/dist/cjs/components/app-wrapper/AppWrapperV2.d.ts +26 -0
- package/dist/cjs/components/app-wrapper/AppWrapperV2.js +266 -0
- package/dist/cjs/components/app-wrapper/AppWrapperV2.js.map +1 -0
- package/dist/cjs/components/app-wrapper/AppWrapperV3.d.ts +19 -0
- package/dist/cjs/components/app-wrapper/AppWrapperV3.js +195 -0
- package/dist/cjs/components/app-wrapper/AppWrapperV3.js.map +1 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_BACKUP_73190.d.ts +27 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_BACKUP_73190.js +243 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_BACKUP_73190.js.map +1 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_BASE_73190.d.ts +28 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_BASE_73190.js +255 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_BASE_73190.js.map +1 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_LOCAL_73190.d.ts +27 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_LOCAL_73190.js +243 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_LOCAL_73190.js.map +1 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_REMOTE_73190.d.ts +28 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_REMOTE_73190.js +251 -0
- package/dist/cjs/components/app-wrapper/AppWrapper_REMOTE_73190.js.map +1 -0
- 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/change-report/ChangeReportTree.d.ts +10 -0
- package/dist/cjs/components/change-report/ChangeReportTree.js +95 -0
- package/dist/cjs/components/change-report/ChangeReportTree.js.map +1 -0
- package/dist/cjs/components/dropdown/{Dropdown.stories.js → dropdown.stories.js} +1 -1
- package/dist/cjs/components/dropdown/{Dropdown.stories.js.map → dropdown.stories.js.map} +1 -1
- package/dist/cjs/components/edit-guide-modal/EditGuideModal.d.ts +8 -0
- package/dist/cjs/components/edit-guide-modal/EditGuideModal.js +132 -0
- package/dist/cjs/components/edit-guide-modal/EditGuideModal.js.map +1 -0
- package/dist/cjs/components/edit-marker-modal/EditMarkerModal.d.ts +8 -0
- package/dist/cjs/components/edit-marker-modal/EditMarkerModal.js +104 -0
- package/dist/cjs/components/edit-marker-modal/EditMarkerModal.js.map +1 -0
- package/dist/cjs/components/error-message-preview/ErrorMessagePreview.d.ts +15 -0
- package/dist/cjs/components/error-message-preview/ErrorMessagePreview.js +91 -0
- package/dist/cjs/components/error-message-preview/ErrorMessagePreview.js.map +1 -0
- package/dist/cjs/components/feature-flag-wrapper/FeatureFlagWrapper.d.ts +7 -0
- package/dist/cjs/components/feature-flag-wrapper/FeatureFlagWrapper.js +48 -0
- package/dist/cjs/components/feature-flag-wrapper/FeatureFlagWrapper.js.map +1 -0
- package/dist/cjs/components/header/Header_BACKUP_73021.d.ts +33 -0
- package/dist/cjs/components/header/Header_BACKUP_73021.js +393 -0
- package/dist/cjs/components/header/Header_BACKUP_73021.js.map +1 -0
- package/dist/cjs/components/header/Header_BASE_73021.d.ts +29 -0
- package/dist/cjs/components/header/Header_BASE_73021.js +376 -0
- package/dist/cjs/components/header/Header_BASE_73021.js.map +1 -0
- package/dist/cjs/components/header/Header_LOCAL_73021.d.ts +33 -0
- package/dist/cjs/components/header/Header_LOCAL_73021.js +382 -0
- package/dist/cjs/components/header/Header_LOCAL_73021.js.map +1 -0
- package/dist/cjs/components/header/Header_REMOTE_73021.d.ts +30 -0
- package/dist/cjs/components/header/Header_REMOTE_73021.js +386 -0
- package/dist/cjs/components/header/Header_REMOTE_73021.js.map +1 -0
- package/dist/cjs/components/header/StoryDropdown.d.ts +6 -0
- package/dist/cjs/components/header/StoryDropdown.js +111 -0
- package/dist/cjs/components/header/StoryDropdown.js.map +1 -0
- package/dist/cjs/components/number-field/NumberField.d.ts +2 -2
- package/dist/cjs/components/number-field/NumberField.js +4 -7
- package/dist/cjs/components/number-field/NumberField.js.map +1 -1
- package/dist/cjs/components/publish-wizard/PublishWizard.d.ts +4 -3
- package/dist/cjs/components/publish-wizard/PublishWizard.js +104 -38
- package/dist/cjs/components/publish-wizard/PublishWizard.js.map +1 -1
- package/dist/cjs/components/replace-files-modal/ReplaceFilesModal.d.ts +11 -0
- package/dist/cjs/components/replace-files-modal/ReplaceFilesModal.js +213 -0
- package/dist/cjs/components/replace-files-modal/ReplaceFilesModal.js.map +1 -0
- package/dist/cjs/components/service-icon/ServiceIcon.test.d.ts +0 -0
- package/dist/cjs/components/service-icon/ServiceIcon.test.js +1 -0
- package/dist/cjs/components/service-icon/ServiceIcon.test.js.map +1 -0
- package/dist/cjs/components/tag/Tag.test.d.ts +0 -0
- package/dist/cjs/components/tag/Tag.test.js +1 -0
- package/dist/cjs/components/tag/Tag.test.js.map +1 -0
- package/dist/cjs/constants/copy.d.ts +9 -0
- package/dist/cjs/constants/copy.js +13 -2
- package/dist/cjs/constants/copy.js.map +1 -1
- package/dist/cjs/constants/snippets.d.ts +18 -0
- package/dist/cjs/constants/snippets.js +3 -0
- package/dist/cjs/constants/snippets.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.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/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 +2 -0
- package/dist/cjs/services/API.js +6 -0
- 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/esm/components/app-wrapper/AppWrapper.d.ts +1 -0
- package/dist/esm/components/app-wrapper/AppWrapper.js +1 -1
- package/dist/esm/components/app-wrapper/AppWrapper.js.map +1 -1
- package/dist/esm/components/app-wrapper/AppWrapperV2.d.ts +26 -0
- package/dist/esm/components/app-wrapper/AppWrapperV2.js +142 -0
- package/dist/esm/components/app-wrapper/AppWrapperV2.js.map +1 -0
- package/dist/esm/components/app-wrapper/AppWrapperV3.d.ts +19 -0
- package/dist/esm/components/app-wrapper/AppWrapperV3.js +88 -0
- package/dist/esm/components/app-wrapper/AppWrapperV3.js.map +1 -0
- package/dist/esm/components/app-wrapper/AppWrapper_BACKUP_73190.d.ts +27 -0
- package/dist/esm/components/app-wrapper/AppWrapper_BACKUP_73190.js +194 -0
- package/dist/esm/components/app-wrapper/AppWrapper_BACKUP_73190.js.map +1 -0
- package/dist/esm/components/app-wrapper/AppWrapper_BASE_73190.d.ts +28 -0
- package/dist/esm/components/app-wrapper/AppWrapper_BASE_73190.js +208 -0
- package/dist/esm/components/app-wrapper/AppWrapper_BASE_73190.js.map +1 -0
- package/dist/esm/components/app-wrapper/AppWrapper_LOCAL_73190.d.ts +27 -0
- package/dist/esm/components/app-wrapper/AppWrapper_LOCAL_73190.js +194 -0
- package/dist/esm/components/app-wrapper/AppWrapper_LOCAL_73190.js.map +1 -0
- package/dist/esm/components/app-wrapper/AppWrapper_REMOTE_73190.d.ts +28 -0
- package/dist/esm/components/app-wrapper/AppWrapper_REMOTE_73190.js +204 -0
- package/dist/esm/components/app-wrapper/AppWrapper_REMOTE_73190.js.map +1 -0
- 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/change-report/ChangeReportTree.d.ts +10 -0
- package/dist/esm/components/change-report/ChangeReportTree.js +42 -0
- package/dist/esm/components/change-report/ChangeReportTree.js.map +1 -0
- package/dist/esm/components/dropdown/{Dropdown.stories.js → dropdown.stories.js} +1 -1
- package/dist/esm/components/dropdown/{Dropdown.stories.js.map → dropdown.stories.js.map} +1 -1
- package/dist/esm/components/edit-guide-modal/EditGuideModal.d.ts +8 -0
- package/dist/esm/components/edit-guide-modal/EditGuideModal.js +65 -0
- package/dist/esm/components/edit-guide-modal/EditGuideModal.js.map +1 -0
- package/dist/esm/components/edit-marker-modal/EditMarkerModal.d.ts +8 -0
- package/dist/esm/components/edit-marker-modal/EditMarkerModal.js +72 -0
- package/dist/esm/components/edit-marker-modal/EditMarkerModal.js.map +1 -0
- package/dist/esm/components/error-message-preview/ErrorMessagePreview.d.ts +15 -0
- package/dist/esm/components/error-message-preview/ErrorMessagePreview.js +35 -0
- package/dist/esm/components/error-message-preview/ErrorMessagePreview.js.map +1 -0
- package/dist/esm/components/feature-flag-wrapper/FeatureFlagWrapper.d.ts +7 -0
- package/dist/esm/components/feature-flag-wrapper/FeatureFlagWrapper.js +10 -0
- package/dist/esm/components/feature-flag-wrapper/FeatureFlagWrapper.js.map +1 -0
- package/dist/esm/components/header/Header_BACKUP_73021.d.ts +33 -0
- package/dist/esm/components/header/Header_BACKUP_73021.js +336 -0
- package/dist/esm/components/header/Header_BACKUP_73021.js.map +1 -0
- package/dist/esm/components/header/Header_BASE_73021.d.ts +29 -0
- package/dist/esm/components/header/Header_BASE_73021.js +322 -0
- package/dist/esm/components/header/Header_BASE_73021.js.map +1 -0
- package/dist/esm/components/header/Header_LOCAL_73021.d.ts +33 -0
- package/dist/esm/components/header/Header_LOCAL_73021.js +328 -0
- package/dist/esm/components/header/Header_LOCAL_73021.js.map +1 -0
- package/dist/esm/components/header/Header_REMOTE_73021.d.ts +30 -0
- package/dist/esm/components/header/Header_REMOTE_73021.js +329 -0
- package/dist/esm/components/header/Header_REMOTE_73021.js.map +1 -0
- package/dist/esm/components/header/StoryDropdown.d.ts +6 -0
- package/dist/esm/components/header/StoryDropdown.js +82 -0
- package/dist/esm/components/header/StoryDropdown.js.map +1 -0
- package/dist/esm/components/number-field/NumberField.d.ts +2 -2
- package/dist/esm/components/number-field/NumberField.js +4 -5
- package/dist/esm/components/number-field/NumberField.js.map +1 -1
- package/dist/esm/components/publish-wizard/PublishWizard.d.ts +4 -3
- package/dist/esm/components/publish-wizard/PublishWizard.js +92 -38
- package/dist/esm/components/publish-wizard/PublishWizard.js.map +1 -1
- package/dist/esm/components/replace-files-modal/ReplaceFilesModal.d.ts +11 -0
- package/dist/esm/components/replace-files-modal/ReplaceFilesModal.js +141 -0
- package/dist/esm/components/replace-files-modal/ReplaceFilesModal.js.map +1 -0
- package/dist/esm/components/service-icon/ServiceIcon.test.d.ts +0 -0
- package/dist/esm/components/service-icon/ServiceIcon.test.js +1 -0
- package/dist/esm/components/service-icon/ServiceIcon.test.js.map +1 -0
- package/dist/esm/components/tag/Tag.test.d.ts +0 -0
- package/dist/esm/components/tag/Tag.test.js +1 -0
- package/dist/esm/components/tag/Tag.test.js.map +1 -0
- package/dist/esm/constants/copy.d.ts +9 -0
- package/dist/esm/constants/copy.js +13 -2
- package/dist/esm/constants/copy.js.map +1 -1
- package/dist/esm/constants/snippets.d.ts +18 -0
- package/dist/esm/constants/snippets.js +2 -0
- package/dist/esm/constants/snippets.js.map +1 -0
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.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/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 +2 -0
- package/dist/esm/services/API.js +6 -0
- 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/styles.css +127 -0
- package/dist/styles.less +152 -0
- package/less/components/change-report.less +115 -0
- package/less/components/publish-wizard.less +36 -0
- package/less/entry.less +1 -0
- package/package.json +6 -17
- package/src/components/app-wrapper/AppWrapper.tsx +6 -1
- package/src/components/change-report/ChangeReportTree.tsx +125 -0
- package/src/components/number-field/NumberField.tsx +9 -15
- package/src/components/publish-wizard/PublishWizard.tsx +144 -45
- package/src/components/service-icon/ServiceIcon.test.tsx +0 -0
- package/src/components/tag/Tag.test.tsx +0 -0
- package/src/constants/copy.ts +16 -2
- package/src/constants/snippets.ts +25 -0
- package/src/index.ts +7 -1
- package/src/services/API.ts +8 -0
- package/tsconfig.json +1 -1
- package/src/components/advanced-number-field/AdvancedNumberField.test.tsx +0 -724
- package/src/components/anchor-field/AnchorField.test.tsx +0 -130
- package/src/components/asset-details/AssetDetails.test.tsx +0 -494
- package/src/components/assets/AssetField.test.tsx +0 -449
- package/src/components/assets/AssetsTableAssetIdCell.test.tsx +0 -142
- package/src/components/assets/AssetsTableAssetIdFilter.test.tsx +0 -95
- package/src/components/assets/AssetsTableComplexTagCell.test.tsx +0 -161
- package/src/components/assets/AssetsTableDateCell.test.tsx +0 -106
- package/src/components/assets/AssetsTableDropzone.test.tsx +0 -132
- package/src/components/assets/AssetsTableDurationCell.test.tsx +0 -119
- package/src/components/assets/AssetsTableGlobalCell.test.tsx +0 -46
- package/src/components/assets/AssetsTableNameCell.test.tsx +0 -166
- package/src/components/assets/AssetsTableNameFilter.test.tsx +0 -95
- package/src/components/assets/AssetsTablePreviewCell.test.tsx +0 -191
- package/src/components/assets/AssetsTableRateCell.test.tsx +0 -87
- package/src/components/assets/AssetsTableSelectCell.test.tsx +0 -156
- package/src/components/assets/AssetsTableSelectFilter.test.tsx +0 -119
- package/src/components/assets/AssetsTableStatusCell.test.tsx +0 -60
- package/src/components/number-field/NumberField.test.tsx +0 -383
- package/src/components/text-field/TextField.test.tsx +0 -988
- package/src/test/setup.ts +0 -91
- package/src/test/utils.tsx +0 -44
- package/tsconfig.eslint.json +0 -8
- package/vitest.config.ts +0 -31
- /package/dist/cjs/components/dropdown/{Dropdown.stories.d.ts → dropdown.stories.d.ts} +0 -0
- /package/dist/esm/components/dropdown/{Dropdown.stories.d.ts → dropdown.stories.d.ts} +0 -0
- /package/src/components/dropdown/{Dropdown.stories.tsx → dropdown.stories.tsx} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IChangeReportNode, IChangeReportSection } from '../../constants/snippets';
|
|
3
|
+
import * as copy from '../../constants/copy';
|
|
4
|
+
|
|
5
|
+
interface IChangeReportTreeProps {
|
|
6
|
+
sections: IChangeReportSection[] | null;
|
|
7
|
+
defaultExpanded?: boolean;
|
|
8
|
+
emptyMessage?: string;
|
|
9
|
+
loadingMessage?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IChangeReportNodeProps {
|
|
13
|
+
node: IChangeReportNode;
|
|
14
|
+
defaultExpanded: boolean;
|
|
15
|
+
depth: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const STATUS_LABELS: Record<IChangeReportNode['status'], string> = {
|
|
19
|
+
added: copy.publish.statusAdded,
|
|
20
|
+
removed: copy.publish.statusRemoved,
|
|
21
|
+
modified: copy.publish.statusModified
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const ChangeReportNode: React.FC<IChangeReportNodeProps> = ({ node, defaultExpanded, depth }) => {
|
|
25
|
+
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
26
|
+
|
|
27
|
+
const hasChildren = node.children && node.children.length > 0;
|
|
28
|
+
const hasValues = node.oldValue !== undefined || node.newValue !== undefined;
|
|
29
|
+
|
|
30
|
+
const oldDisplay =
|
|
31
|
+
node.oldValue === null || node.oldValue === '' || node.oldValue === undefined
|
|
32
|
+
? '*empty*'
|
|
33
|
+
: node.oldValue;
|
|
34
|
+
const newDisplay =
|
|
35
|
+
node.newValue === null || node.newValue === '' || node.newValue === undefined
|
|
36
|
+
? '*empty*'
|
|
37
|
+
: node.newValue;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div
|
|
41
|
+
className='change-report-node'
|
|
42
|
+
style={{ paddingLeft: depth * 16 }}>
|
|
43
|
+
<div className='change-report-node-row'>
|
|
44
|
+
{hasChildren && (
|
|
45
|
+
<span
|
|
46
|
+
className={`change-report-toggle ${
|
|
47
|
+
expanded ? 'change-report-toggle--expanded' : ''
|
|
48
|
+
}`}
|
|
49
|
+
onClick={() => setExpanded(!expanded)}>
|
|
50
|
+
▶
|
|
51
|
+
</span>
|
|
52
|
+
)}
|
|
53
|
+
{!hasChildren && <span className='change-report-toggle-placeholder' />}
|
|
54
|
+
<span className={`change-report-status change-report-status--${node.status}`}>
|
|
55
|
+
{STATUS_LABELS[node.status]}
|
|
56
|
+
</span>
|
|
57
|
+
<span className='change-report-label'>{node.label}</span>
|
|
58
|
+
{hasValues && (
|
|
59
|
+
<span className='change-report-values'>
|
|
60
|
+
<span className='change-report-value change-report-value--old'>
|
|
61
|
+
{oldDisplay}
|
|
62
|
+
</span>
|
|
63
|
+
<span className='change-report-value-arrow'>→</span>
|
|
64
|
+
<span className='change-report-value change-report-value--new'>
|
|
65
|
+
{newDisplay}
|
|
66
|
+
</span>
|
|
67
|
+
</span>
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
70
|
+
{hasChildren && expanded && (
|
|
71
|
+
<div className='change-report-children'>
|
|
72
|
+
{node.children.map((child, i) => (
|
|
73
|
+
<ChangeReportNode
|
|
74
|
+
key={i}
|
|
75
|
+
node={child}
|
|
76
|
+
defaultExpanded={defaultExpanded}
|
|
77
|
+
depth={depth + 1}
|
|
78
|
+
/>
|
|
79
|
+
))}
|
|
80
|
+
</div>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const ChangeReportTree: React.FC<IChangeReportTreeProps> = ({
|
|
87
|
+
sections,
|
|
88
|
+
defaultExpanded = true,
|
|
89
|
+
emptyMessage = copy.publish.noChangesMessage,
|
|
90
|
+
loadingMessage = copy.publish.loadingChangesMessage
|
|
91
|
+
}) => {
|
|
92
|
+
if (sections === null) {
|
|
93
|
+
return (
|
|
94
|
+
<div className='change-report-tree change-report-tree--loading'>{loadingMessage}</div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (sections.length === 0) {
|
|
99
|
+
return <div className='change-report-tree change-report-tree--empty'>{emptyMessage}</div>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<div className='change-report-tree'>
|
|
104
|
+
{sections.map((section, i) => (
|
|
105
|
+
<div
|
|
106
|
+
key={i}
|
|
107
|
+
className='change-report-section'>
|
|
108
|
+
<div className='change-report-section-heading'>{section.section}</div>
|
|
109
|
+
<div className='change-report-section-nodes'>
|
|
110
|
+
{section.nodes.map((node, j) => (
|
|
111
|
+
<ChangeReportNode
|
|
112
|
+
key={j}
|
|
113
|
+
node={node}
|
|
114
|
+
defaultExpanded={defaultExpanded}
|
|
115
|
+
depth={0}
|
|
116
|
+
/>
|
|
117
|
+
))}
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
))}
|
|
121
|
+
</div>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export default ChangeReportTree;
|
|
@@ -2,8 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import FieldWrapper from '../field-wrapper/FieldWrapper';
|
|
3
3
|
import { IToolTipConfig } from '../Tooltip';
|
|
4
4
|
|
|
5
|
-
export const validateNumInput = (val: number, min
|
|
6
|
-
if (
|
|
5
|
+
export const validateNumInput = (val: number, min: number, max: number) => {
|
|
6
|
+
if (val < min || val > max) {
|
|
7
7
|
return false;
|
|
8
8
|
} else {
|
|
9
9
|
return true;
|
|
@@ -15,7 +15,7 @@ interface INumberFieldProps {
|
|
|
15
15
|
label?: any;
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
readOnly?: boolean;
|
|
18
|
-
value: number
|
|
18
|
+
value: number;
|
|
19
19
|
tooltip?: IToolTipConfig | string;
|
|
20
20
|
width?: string | number;
|
|
21
21
|
onChange?(e): void;
|
|
@@ -60,14 +60,10 @@ class NumberField extends React.PureComponent<INumberFieldProps, INumberFieldSta
|
|
|
60
60
|
if (this.props.focusOnMount && this.inputRef.current) {
|
|
61
61
|
this.inputRef.current.focus();
|
|
62
62
|
}
|
|
63
|
-
this.setState(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
() => {
|
|
68
|
-
this.validateValue(this.props.value);
|
|
69
|
-
}
|
|
70
|
-
);
|
|
63
|
+
this.setState({
|
|
64
|
+
error: false,
|
|
65
|
+
value: this.props.value
|
|
66
|
+
});
|
|
71
67
|
}
|
|
72
68
|
|
|
73
69
|
public componentDidUpdate(prevProps): void {
|
|
@@ -90,17 +86,15 @@ class NumberField extends React.PureComponent<INumberFieldProps, INumberFieldSta
|
|
|
90
86
|
}
|
|
91
87
|
|
|
92
88
|
private onChange(e) {
|
|
89
|
+
this.validateValue(e.target.value);
|
|
93
90
|
let val = e.target.value;
|
|
94
|
-
|
|
95
|
-
this.validateValue(val);
|
|
96
|
-
|
|
97
91
|
if (val === '' || val === null) {
|
|
98
92
|
val = this.props.min;
|
|
99
93
|
} else {
|
|
100
94
|
val = parseFloat(val);
|
|
101
95
|
}
|
|
102
96
|
|
|
103
|
-
this.
|
|
97
|
+
this.props.onChange(val);
|
|
104
98
|
}
|
|
105
99
|
|
|
106
100
|
private onKeyDownHandler(e) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CrMPublishUI } from './publish/CrMPublishUI';
|
|
3
3
|
import Button from '../button/Button';
|
|
4
|
+
import ChangeReportTree from '../change-report/ChangeReportTree';
|
|
5
|
+
import { IChangeReportSection } from '../../constants/snippets';
|
|
4
6
|
import SelectField from '../select-field/SelectField';
|
|
5
7
|
import HRule from '../h-rule/HRule';
|
|
6
8
|
import {
|
|
@@ -72,6 +74,7 @@ interface IPublishWizardProps {
|
|
|
72
74
|
publishData: any;
|
|
73
75
|
onDeleteBatch?: (batchId: string) => any;
|
|
74
76
|
onBackBtn?: () => void;
|
|
77
|
+
auditLogEnabled?: boolean;
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
export interface ICredential {
|
|
@@ -98,6 +101,8 @@ interface IPublishWizardState {
|
|
|
98
101
|
nextStep: boolean;
|
|
99
102
|
publishError: string;
|
|
100
103
|
selectedCreatives: string[];
|
|
104
|
+
changeReport: IChangeReportSection[] | null;
|
|
105
|
+
publishNotes: string;
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
interface IBigButtonProps {
|
|
@@ -126,8 +131,12 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
126
131
|
publishData: { unpublished_changes }
|
|
127
132
|
} = props;
|
|
128
133
|
|
|
129
|
-
const
|
|
130
|
-
|
|
134
|
+
const hasReviewStep = !!props.auditLogEnabled;
|
|
135
|
+
const screenIndex = hasReviewStep
|
|
136
|
+
? 0
|
|
137
|
+
: unpublished_changes === undefined || unpublished_changes === true
|
|
138
|
+
? 0
|
|
139
|
+
: 1;
|
|
131
140
|
|
|
132
141
|
this.state = {
|
|
133
142
|
compositions: [],
|
|
@@ -145,28 +154,46 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
145
154
|
next: false,
|
|
146
155
|
nextStep: false,
|
|
147
156
|
publishError: null,
|
|
148
|
-
selectedCreatives: []
|
|
157
|
+
selectedCreatives: [],
|
|
158
|
+
changeReport: null,
|
|
159
|
+
publishNotes: ''
|
|
149
160
|
};
|
|
150
161
|
this.emailWorkflow = React.createRef();
|
|
151
162
|
this.hiddenFileInputRef = React.createRef();
|
|
152
163
|
}
|
|
153
164
|
|
|
154
165
|
public componentDidUpdate(prevProps, prevState) {
|
|
155
|
-
|
|
166
|
+
const hasReviewStep = !!this.props.auditLogEnabled;
|
|
167
|
+
// If we just finished publishing, advance from the Publish screen to the Distribution screen
|
|
168
|
+
const publishScreenIndex = hasReviewStep ? 1 : 0;
|
|
169
|
+
const distributionScreenIndex = hasReviewStep ? 2 : 1;
|
|
156
170
|
if (
|
|
157
171
|
prevProps.publishData.publishing &&
|
|
158
172
|
!this.props.publishData.publishing &&
|
|
159
|
-
this.state.screenIndex ===
|
|
173
|
+
this.state.screenIndex === publishScreenIndex &&
|
|
160
174
|
!this.state.publishError
|
|
161
175
|
) {
|
|
162
176
|
this.setState({
|
|
163
|
-
screenIndex:
|
|
177
|
+
screenIndex: distributionScreenIndex
|
|
164
178
|
});
|
|
165
179
|
}
|
|
166
180
|
}
|
|
167
181
|
|
|
168
182
|
public componentDidMount() {
|
|
169
|
-
const { story, api, handleError, activeComposition } = this.props;
|
|
183
|
+
const { story, api, handleError, activeComposition, auditLogEnabled } = this.props;
|
|
184
|
+
|
|
185
|
+
if (auditLogEnabled) {
|
|
186
|
+
api.getAuditLog(story.id)
|
|
187
|
+
.then((entries) => {
|
|
188
|
+
const currentEntry = entries?.[0];
|
|
189
|
+
const report = currentEntry?.id === 'current' ? currentEntry.changes : null;
|
|
190
|
+
this.setState({ changeReport: report });
|
|
191
|
+
})
|
|
192
|
+
.catch(() => {
|
|
193
|
+
this.setState({ changeReport: null });
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
170
197
|
// Pull in all of the access creds for the composition dropdown
|
|
171
198
|
api.getAssets({ type: ASSET_TYPES.VIDEO_COMPOSITION }, story.id)
|
|
172
199
|
.then((res) => {
|
|
@@ -303,12 +330,14 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
303
330
|
handleError,
|
|
304
331
|
fromCrM
|
|
305
332
|
} = this.props;
|
|
333
|
+
const hasReviewStep = !!this.props.auditLogEnabled;
|
|
334
|
+
const distributionScreenIndex = hasReviewStep ? 2 : 1;
|
|
306
335
|
|
|
307
336
|
if (fromCrM) {
|
|
308
337
|
this.props
|
|
309
338
|
.publishVersion(api, id, this.state.selectedCreatives)
|
|
310
339
|
.then(() => {
|
|
311
|
-
this.setState({ screenIndex:
|
|
340
|
+
this.setState({ screenIndex: distributionScreenIndex });
|
|
312
341
|
})
|
|
313
342
|
.catch((e) => {
|
|
314
343
|
this.setState({ publishError: e });
|
|
@@ -317,7 +346,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
317
346
|
this.props.publishVersion(api, id).catch((e) => {
|
|
318
347
|
handleError(e);
|
|
319
348
|
});
|
|
320
|
-
this.setState({ screenIndex:
|
|
349
|
+
this.setState({ screenIndex: distributionScreenIndex });
|
|
321
350
|
}
|
|
322
351
|
}
|
|
323
352
|
|
|
@@ -353,12 +382,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
353
382
|
}
|
|
354
383
|
|
|
355
384
|
private getErrorCopyForCrMPublish() {
|
|
356
|
-
const { story, project
|
|
357
|
-
|
|
358
|
-
if (!fromCrM) {
|
|
359
|
-
return null;
|
|
360
|
-
}
|
|
361
|
-
|
|
385
|
+
const { story, project } = this.props;
|
|
362
386
|
const variables = story ? story.acts[project.actId].inventory : {};
|
|
363
387
|
const varLength = variables ? Object.keys(variables).length : 0;
|
|
364
388
|
|
|
@@ -374,12 +398,35 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
374
398
|
const { fromCrM, story } = this.props;
|
|
375
399
|
const { publishing } = this.props.publishData;
|
|
376
400
|
const disabledForCrM = this.shouldDisablePublishButtonForCrM();
|
|
401
|
+
const hasReviewStep = !!this.props.auditLogEnabled;
|
|
402
|
+
const publishScreenIndex = hasReviewStep ? 1 : 0;
|
|
403
|
+
const distributionScreenIndex = hasReviewStep ? 2 : 1;
|
|
377
404
|
const lowerButtons = [];
|
|
378
405
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
406
|
+
if (hasReviewStep && screenIndex === 0) {
|
|
407
|
+
// Review Changes step: Skip and Publish buttons (no Back)
|
|
408
|
+
lowerButtons.push(
|
|
409
|
+
<Button
|
|
410
|
+
tooltip={copy.publish.btnSkip}
|
|
411
|
+
key='btn-skip'
|
|
412
|
+
size={'large'}
|
|
413
|
+
onClick={() => this.setState({ screenIndex: distributionScreenIndex })}
|
|
414
|
+
color='primary'>
|
|
415
|
+
{copy.publish.btnSkip}
|
|
416
|
+
</Button>
|
|
417
|
+
);
|
|
418
|
+
lowerButtons.push(
|
|
419
|
+
<Button
|
|
420
|
+
tooltip={copy.publish.btnPublish}
|
|
421
|
+
size={'large'}
|
|
422
|
+
key='btn-publish-review'
|
|
423
|
+
onClick={() => this.setState({ screenIndex: publishScreenIndex })}
|
|
424
|
+
color='primary'>
|
|
425
|
+
{copy.publish.btnPublish}
|
|
426
|
+
</Button>
|
|
427
|
+
);
|
|
428
|
+
} else if (screenIndex === publishScreenIndex) {
|
|
429
|
+
// Publish step: Publish and Skip buttons
|
|
383
430
|
const projectType = story.creativeId
|
|
384
431
|
? CRM_INTEGRATED_PROJECT_TYPES.SINGLE_CREATIVE
|
|
385
432
|
: CRM_INTEGRATED_PROJECT_TYPES.MULTI_CREATIVE;
|
|
@@ -406,13 +453,13 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
406
453
|
tooltip={copy.publish.btnSkip}
|
|
407
454
|
key='btn-skip'
|
|
408
455
|
size={'large'}
|
|
409
|
-
onClick={() => this.setState({ screenIndex:
|
|
456
|
+
onClick={() => this.setState({ screenIndex: distributionScreenIndex })}
|
|
410
457
|
color='primary'>
|
|
411
458
|
{copy.publish.btnSkip}
|
|
412
459
|
</Button>
|
|
413
460
|
);
|
|
414
461
|
} else {
|
|
415
|
-
//
|
|
462
|
+
// Distribution and sub-screens: Back button (and Done/Finish if applicable)
|
|
416
463
|
if (done || error) {
|
|
417
464
|
lowerButtons.push(
|
|
418
465
|
<Button
|
|
@@ -426,9 +473,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
426
473
|
);
|
|
427
474
|
}
|
|
428
475
|
|
|
429
|
-
|
|
476
|
+
// Back button: from distribution → go to 0 (Review Changes ON) or 0 (Publish OFF)
|
|
477
|
+
// from sub-screens → go back to distribution
|
|
478
|
+
const backIndex = screenIndex === distributionScreenIndex ? 0 : distributionScreenIndex;
|
|
430
479
|
|
|
431
|
-
// back button
|
|
432
480
|
lowerButtons.push(
|
|
433
481
|
<Button
|
|
434
482
|
tooltip={copy.publish.btnBack}
|
|
@@ -455,7 +503,6 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
455
503
|
</Button>
|
|
456
504
|
);
|
|
457
505
|
|
|
458
|
-
// reimport after column align
|
|
459
506
|
if (error) {
|
|
460
507
|
lowerButtons.push(
|
|
461
508
|
<Button
|
|
@@ -474,6 +521,32 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
474
521
|
return lowerButtons;
|
|
475
522
|
}
|
|
476
523
|
|
|
524
|
+
private renderReviewChanges() {
|
|
525
|
+
const { changeReport, publishNotes } = this.state;
|
|
526
|
+
return (
|
|
527
|
+
<div className='publish-wizard-step publish-wizard-step--review'>
|
|
528
|
+
<h2>{copy.publish.reviewChangesStepTitle}</h2>
|
|
529
|
+
<HRule />
|
|
530
|
+
<p>{copy.publish.reviewChangesDescription}</p>
|
|
531
|
+
<ChangeReportTree
|
|
532
|
+
sections={changeReport}
|
|
533
|
+
defaultExpanded={true}
|
|
534
|
+
emptyMessage={copy.publish.noChangesMessage}
|
|
535
|
+
loadingMessage={copy.publish.loadingChangesMessage}
|
|
536
|
+
/>
|
|
537
|
+
<div className='publish-notes-wrapper'>
|
|
538
|
+
<label className='publish-notes-label'>{copy.publish.publishNotesLabel}</label>
|
|
539
|
+
<textarea
|
|
540
|
+
className='publish-notes-textarea'
|
|
541
|
+
value={publishNotes}
|
|
542
|
+
onChange={(e) => this.setState({ publishNotes: e.target.value })}
|
|
543
|
+
placeholder={copy.publish.publishNotesPlaceholder}
|
|
544
|
+
/>
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
|
|
477
550
|
private renderPublish() {
|
|
478
551
|
const { fromCrM, story } = this.props;
|
|
479
552
|
const { publishing } = this.props.publishData;
|
|
@@ -483,7 +556,6 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
483
556
|
const projectType = story.creativeId
|
|
484
557
|
? CRM_INTEGRATED_PROJECT_TYPES.SINGLE_CREATIVE
|
|
485
558
|
: CRM_INTEGRATED_PROJECT_TYPES.MULTI_CREATIVE;
|
|
486
|
-
|
|
487
559
|
const error = errorCopy ? (
|
|
488
560
|
<p className='publish-error'>
|
|
489
561
|
<span className='icon'>{ICON_EXCLAIMATION_TRIANGLE}</span> {errorCopy}
|
|
@@ -597,6 +669,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
597
669
|
selectedComposition={selectedComposition}
|
|
598
670
|
publishDataset={publishDataset}
|
|
599
671
|
creativeManagerBaseUrl={creativeManagerBaseUrl}
|
|
672
|
+
hasReviewStep={!!this.props.auditLogEnabled}
|
|
600
673
|
/>
|
|
601
674
|
</div>
|
|
602
675
|
</div>
|
|
@@ -607,7 +680,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
607
680
|
private nextClickHandler = () => {
|
|
608
681
|
this.setState({ nextStep: true, error: false });
|
|
609
682
|
|
|
610
|
-
|
|
683
|
+
const hasReviewStep = !!this.props.auditLogEnabled;
|
|
684
|
+
const exportIndex = hasReviewStep ? 8 : 7;
|
|
685
|
+
const crmExportIndex = hasReviewStep ? 9 : 8;
|
|
686
|
+
if (this.state.screenIndex === exportIndex || this.state.screenIndex === crmExportIndex) {
|
|
611
687
|
this.emailWorkflow.current.getWrappedInstance().proceedWithExport();
|
|
612
688
|
}
|
|
613
689
|
};
|
|
@@ -660,6 +736,8 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
660
736
|
})?.name || '';
|
|
661
737
|
|
|
662
738
|
const variables = story ? story.acts[project.actId].inventory : {};
|
|
739
|
+
const hasReviewStep = !!this.props.auditLogEnabled;
|
|
740
|
+
|
|
663
741
|
return (
|
|
664
742
|
<div className='publish-wizard'>
|
|
665
743
|
<div className='publish-wizard-header'>
|
|
@@ -668,20 +746,26 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
668
746
|
</div>
|
|
669
747
|
{/* <PaneErrorBoundry>*/}
|
|
670
748
|
<div>
|
|
671
|
-
{screenIndex === 0 && this.
|
|
672
|
-
{screenIndex === 1 && this.
|
|
673
|
-
{screenIndex === 2 && (
|
|
749
|
+
{hasReviewStep && screenIndex === 0 && this.renderReviewChanges()}
|
|
750
|
+
{screenIndex === (hasReviewStep ? 1 : 0) && this.renderPublish()}
|
|
751
|
+
{screenIndex === (hasReviewStep ? 2 : 1) && this.renderDistributionOptions()}
|
|
752
|
+
{screenIndex === (hasReviewStep ? 3 : 2) && (
|
|
674
753
|
<WebpageHosted
|
|
675
754
|
story={story}
|
|
676
755
|
compositionId={selectedComposition}
|
|
677
756
|
accessKey={accessKey}
|
|
678
757
|
/>
|
|
679
758
|
)}
|
|
680
|
-
{(screenIndex ===
|
|
759
|
+
{(screenIndex === (hasReviewStep ? 4 : 3) ||
|
|
760
|
+
screenIndex === (hasReviewStep ? 8 : 7) ||
|
|
761
|
+
screenIndex === (hasReviewStep ? 9 : 8)) && (
|
|
681
762
|
<EmailWorkflow
|
|
682
|
-
isCrM={screenIndex === 8}
|
|
683
|
-
isExport={
|
|
684
|
-
|
|
763
|
+
isCrM={screenIndex === (hasReviewStep ? 9 : 8)}
|
|
764
|
+
isExport={
|
|
765
|
+
screenIndex === (hasReviewStep ? 8 : 7) ||
|
|
766
|
+
screenIndex === (hasReviewStep ? 9 : 8)
|
|
767
|
+
}
|
|
768
|
+
isEmail={screenIndex === (hasReviewStep ? 4 : 3)}
|
|
685
769
|
api={api}
|
|
686
770
|
story={story}
|
|
687
771
|
variables={variables}
|
|
@@ -707,7 +791,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
707
791
|
ref={this.emailWorkflow}
|
|
708
792
|
/>
|
|
709
793
|
)}
|
|
710
|
-
{screenIndex === 5 && (
|
|
794
|
+
{screenIndex === (hasReviewStep ? 6 : 5) && (
|
|
711
795
|
<HubSpotFlow
|
|
712
796
|
handleError={handleError}
|
|
713
797
|
status={status}
|
|
@@ -717,7 +801,7 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
717
801
|
compositionId={selectedComposition}
|
|
718
802
|
/>
|
|
719
803
|
)}
|
|
720
|
-
{screenIndex === 6 && <APIIntegration />}
|
|
804
|
+
{screenIndex === (hasReviewStep ? 7 : 6) && <APIIntegration />}
|
|
721
805
|
<br />
|
|
722
806
|
<HRule />
|
|
723
807
|
<div className='lower-buttons'>{this.renderLowerButtons()}</div>
|
|
@@ -737,7 +821,19 @@ const mapDispatchToProps = (dispatch) => {
|
|
|
737
821
|
return bindActionCreators({ publishVersion }, dispatch);
|
|
738
822
|
};
|
|
739
823
|
|
|
740
|
-
|
|
824
|
+
const ConnectedPublishWizard = connect(mapStateToProps, mapDispatchToProps)(PublishWizard);
|
|
825
|
+
|
|
826
|
+
const PublishWizardWithFlag = (props) => {
|
|
827
|
+
const auditLogEnabled = useFlag('feature.IMPOSIUM_EDITOR.AUDIT_LOG');
|
|
828
|
+
return (
|
|
829
|
+
<ConnectedPublishWizard
|
|
830
|
+
{...props}
|
|
831
|
+
auditLogEnabled={auditLogEnabled}
|
|
832
|
+
/>
|
|
833
|
+
);
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
export default PublishWizardWithFlag;
|
|
741
837
|
|
|
742
838
|
export const BigButton: React.FC<IBigButtonProps> = (p) => (
|
|
743
839
|
<div
|
|
@@ -792,8 +888,11 @@ export const DistributeOptions = ({
|
|
|
792
888
|
onSelectOption,
|
|
793
889
|
selectedComposition,
|
|
794
890
|
publishDataset,
|
|
795
|
-
creativeManagerBaseUrl
|
|
891
|
+
creativeManagerBaseUrl,
|
|
892
|
+
hasReviewStep = false
|
|
796
893
|
}) => {
|
|
894
|
+
const shift = hasReviewStep ? 1 : 0;
|
|
895
|
+
const selectOption = (index: number) => onSelectOption(index + shift);
|
|
797
896
|
const isPrerendersEnabled = useFlag('feature.IMPOSIUM_EDITOR.PRERENDERS_CRM_WORKFLOW');
|
|
798
897
|
|
|
799
898
|
const getCrMLink = (creativeLibraryId: string, creativeId?: string) => {
|
|
@@ -812,7 +911,7 @@ export const DistributeOptions = ({
|
|
|
812
911
|
{ICON_GLOBE} {copy.publish.btnWebsite}
|
|
813
912
|
</span>
|
|
814
913
|
),
|
|
815
|
-
onClick: (e) =>
|
|
914
|
+
onClick: (e) => selectOption(2)
|
|
816
915
|
},
|
|
817
916
|
{
|
|
818
917
|
label: (
|
|
@@ -820,7 +919,7 @@ export const DistributeOptions = ({
|
|
|
820
919
|
{ICON_EMAIL} {copy.publish.btnEmail}
|
|
821
920
|
</span>
|
|
822
921
|
),
|
|
823
|
-
onClick: (e) =>
|
|
922
|
+
onClick: (e) => selectOption(3)
|
|
824
923
|
},
|
|
825
924
|
{
|
|
826
925
|
label: (
|
|
@@ -828,7 +927,7 @@ export const DistributeOptions = ({
|
|
|
828
927
|
{ICON_HUBSPOT} {copy.publish.btnHubspot}
|
|
829
928
|
</span>
|
|
830
929
|
),
|
|
831
|
-
onClick: (e) =>
|
|
930
|
+
onClick: (e) => selectOption(5)
|
|
832
931
|
},
|
|
833
932
|
{
|
|
834
933
|
label: (
|
|
@@ -836,7 +935,7 @@ export const DistributeOptions = ({
|
|
|
836
935
|
{ICON_PROJECT_DIAGRAM} {copy.publish.btnAPI}
|
|
837
936
|
</span>
|
|
838
937
|
),
|
|
839
|
-
onClick: (e) =>
|
|
938
|
+
onClick: (e) => selectOption(6)
|
|
840
939
|
},
|
|
841
940
|
{
|
|
842
941
|
label: (
|
|
@@ -844,7 +943,7 @@ export const DistributeOptions = ({
|
|
|
844
943
|
{ICON_DOWNLOAD} {copy.publish.btnExport}
|
|
845
944
|
</span>
|
|
846
945
|
),
|
|
847
|
-
onClick: (e) =>
|
|
946
|
+
onClick: (e) => selectOption(7)
|
|
848
947
|
},
|
|
849
948
|
{
|
|
850
949
|
label: (
|
|
@@ -852,7 +951,7 @@ export const DistributeOptions = ({
|
|
|
852
951
|
{ICON_IMAGE} {copy.publish.btnCRM}
|
|
853
952
|
</span>
|
|
854
953
|
),
|
|
855
|
-
onClick: (e) =>
|
|
954
|
+
onClick: (e) => selectOption(8)
|
|
856
955
|
}
|
|
857
956
|
]
|
|
858
957
|
: [
|
|
@@ -862,7 +961,7 @@ export const DistributeOptions = ({
|
|
|
862
961
|
{ICON_DOWNLOAD} {copy.publish.btnRunTestBatch}
|
|
863
962
|
</span>
|
|
864
963
|
),
|
|
865
|
-
onClick: (e) =>
|
|
964
|
+
onClick: (e) => selectOption(7)
|
|
866
965
|
},
|
|
867
966
|
{
|
|
868
967
|
label: (
|
|
@@ -891,7 +990,7 @@ export const DistributeOptions = ({
|
|
|
891
990
|
{ICON_IMAGE} {copy.publish.btnCRM}
|
|
892
991
|
</span>
|
|
893
992
|
),
|
|
894
|
-
onClick: (e) =>
|
|
993
|
+
onClick: (e) => selectOption(8),
|
|
895
994
|
style: { width: 'calc(100% - 4px)' }
|
|
896
995
|
});
|
|
897
996
|
}
|
|
File without changes
|
|
File without changes
|
package/src/constants/copy.ts
CHANGED
|
@@ -147,14 +147,28 @@ export const publish = {
|
|
|
147
147
|
'Your videos have finished rendering. They will appear in Creative Manager momentarily.',
|
|
148
148
|
renderComplete: 'Render Complete!',
|
|
149
149
|
|
|
150
|
+
// review changes
|
|
151
|
+
reviewChangesStepTitle: 'STEP 1: Review Changes',
|
|
152
|
+
reviewChangesDescription:
|
|
153
|
+
'Review the changes made since your last publish. You can publish these changes or skip to distribution.',
|
|
154
|
+
noChangesMessage: 'No changes detected since last publish.',
|
|
155
|
+
loadingChangesMessage: 'Loading changes...',
|
|
156
|
+
publishNotesLabel: 'Publish notes',
|
|
157
|
+
publishNotesPlaceholder: 'Describe the changes in this version...',
|
|
158
|
+
|
|
159
|
+
// change report status labels
|
|
160
|
+
statusAdded: 'Added',
|
|
161
|
+
statusRemoved: 'Removed',
|
|
162
|
+
statusModified: 'Modified',
|
|
163
|
+
|
|
150
164
|
// publish
|
|
151
|
-
publishStepTitle: 'STEP
|
|
165
|
+
publishStepTitle: 'STEP 2: Publish your Project',
|
|
152
166
|
publishStepTitleFromCrM: 'STEP 1: Publish your Project to selected Creatives',
|
|
153
167
|
publishStepDesc:
|
|
154
168
|
"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.",
|
|
155
169
|
|
|
156
170
|
// distribute
|
|
157
|
-
distributeStepTitle: 'STEP
|
|
171
|
+
distributeStepTitle: 'STEP 3: How do you want your users to view their video?',
|
|
158
172
|
distributeStepTitleFromCrM: 'STEP 2: Run a test batch or return to Creative Manager?',
|
|
159
173
|
distributeStepDesc:
|
|
160
174
|
'Select which Composition you want to deliver, access credentials you want to use, and distribution channel.',
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface IChangeReportNode {
|
|
2
|
+
label: string;
|
|
3
|
+
status: 'added' | 'removed' | 'modified';
|
|
4
|
+
oldValue?: string;
|
|
5
|
+
newValue?: string;
|
|
6
|
+
children?: IChangeReportNode[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IChangeReportSection {
|
|
10
|
+
section:
|
|
11
|
+
| 'PROJECT SETTINGS'
|
|
12
|
+
| 'VARIABLES'
|
|
13
|
+
| 'SCENES & ENCODING'
|
|
14
|
+
| 'ASSETS'
|
|
15
|
+
| 'COMPOSITIONS & LAYERS';
|
|
16
|
+
nodes: IChangeReportNode[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IPublishLogEntry {
|
|
20
|
+
id: string;
|
|
21
|
+
version: number | null;
|
|
22
|
+
message: string | null;
|
|
23
|
+
changes: IChangeReportSection[] | null;
|
|
24
|
+
date_created: number | null;
|
|
25
|
+
}
|