@imposium-hub/components 1.55.0 → 1.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/publish-wizard/EmailWorkflow.d.ts +2 -0
- package/dist/cjs/components/publish-wizard/EmailWorkflow.js +491 -0
- package/dist/cjs/components/publish-wizard/EmailWorkflow.js.map +1 -0
- package/dist/cjs/components/publish-wizard/copy.d.ts +186 -0
- package/dist/cjs/components/publish-wizard/copy.js +199 -0
- package/dist/cjs/components/publish-wizard/copy.js.map +1 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer.js +120 -9
- package/dist/cjs/components/story-previewer/StoryPreviewer.js.map +1 -1
- package/dist/cjs/components/story-previewer/StoryPreviewer_BACKUP_64741.d.ts +2 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_BACKUP_64741.js +670 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_BACKUP_64741.js.map +1 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_BASE_64741.d.ts +2 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_BASE_64741.js +553 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_BASE_64741.js.map +1 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_LOCAL_64741.d.ts +2 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_LOCAL_64741.js +650 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_LOCAL_64741.js.map +1 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_REMOTE_64741.d.ts +2 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_REMOTE_64741.js +639 -0
- package/dist/cjs/components/story-previewer/StoryPreviewer_REMOTE_64741.js.map +1 -0
- package/dist/cjs/constants/copy.d.ts +2 -0
- package/dist/cjs/constants/copy.js +6 -2
- package/dist/cjs/constants/copy.js.map +1 -1
- package/dist/cjs/redux/actions/asset-list.js +5 -2
- package/dist/cjs/redux/actions/asset-list.js.map +1 -1
- package/dist/esm/components/publish-wizard/EmailWorkflow.d.ts +2 -0
- package/dist/esm/components/publish-wizard/EmailWorkflow.js +398 -0
- package/dist/esm/components/publish-wizard/EmailWorkflow.js.map +1 -0
- package/dist/esm/components/publish-wizard/copy.d.ts +186 -0
- package/dist/esm/components/publish-wizard/copy.js +196 -0
- package/dist/esm/components/publish-wizard/copy.js.map +1 -0
- package/dist/esm/components/story-previewer/StoryPreviewer.js +72 -10
- package/dist/esm/components/story-previewer/StoryPreviewer.js.map +1 -1
- package/dist/esm/components/story-previewer/StoryPreviewer_BACKUP_64741.d.ts +2 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_BACKUP_64741.js +554 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_BACKUP_64741.js.map +1 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_BASE_64741.d.ts +2 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_BASE_64741.js +489 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_BASE_64741.js.map +1 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_LOCAL_64741.d.ts +2 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_LOCAL_64741.js +537 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_LOCAL_64741.js.map +1 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_REMOTE_64741.d.ts +2 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_REMOTE_64741.js +526 -0
- package/dist/esm/components/story-previewer/StoryPreviewer_REMOTE_64741.js.map +1 -0
- package/dist/esm/constants/copy.d.ts +2 -0
- package/dist/esm/constants/copy.js +5 -1
- package/dist/esm/constants/copy.js.map +1 -1
- package/dist/esm/redux/actions/asset-list.js +5 -2
- package/dist/esm/redux/actions/asset-list.js.map +1 -1
- package/dist/styles.css +4 -0
- package/dist/styles.less +5 -0
- package/less/components/story-previewer.less +5 -0
- package/package.json +1 -1
- package/src/components/story-previewer/StoryPreviewer.tsx +117 -24
- package/src/constants/copy.ts +6 -1
- package/src/redux/actions/asset-list.ts +5 -3
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
export declare const assets: {
|
|
2
|
+
tooltipFilter: string;
|
|
3
|
+
previewNotAvailable: string;
|
|
4
|
+
iconTypes: {
|
|
5
|
+
filter: string;
|
|
6
|
+
lut: string;
|
|
7
|
+
all: string;
|
|
8
|
+
video: string;
|
|
9
|
+
audio: string;
|
|
10
|
+
video_composition: string;
|
|
11
|
+
image: string;
|
|
12
|
+
image_sequence: string;
|
|
13
|
+
template: string;
|
|
14
|
+
static_composition: string;
|
|
15
|
+
font: string;
|
|
16
|
+
after_effects: string;
|
|
17
|
+
};
|
|
18
|
+
uploads: {
|
|
19
|
+
noUploads: string;
|
|
20
|
+
preparePhase: string;
|
|
21
|
+
autoTagInput: string;
|
|
22
|
+
assignToStoryInput: string;
|
|
23
|
+
assignToStoryInfo: string;
|
|
24
|
+
uploadButton: string;
|
|
25
|
+
cancelButton: string;
|
|
26
|
+
};
|
|
27
|
+
tags: {
|
|
28
|
+
add: string;
|
|
29
|
+
duplicated: string;
|
|
30
|
+
};
|
|
31
|
+
field: {
|
|
32
|
+
fieldMismatchError: string;
|
|
33
|
+
dragPrompt: string;
|
|
34
|
+
tooltipClear: string;
|
|
35
|
+
tooltipFilter: string;
|
|
36
|
+
tooltipFilterAsset: string;
|
|
37
|
+
};
|
|
38
|
+
details: string;
|
|
39
|
+
newDetails: string;
|
|
40
|
+
name: string;
|
|
41
|
+
date: string;
|
|
42
|
+
addTag: string;
|
|
43
|
+
assetTag: string;
|
|
44
|
+
sessionExpired: string;
|
|
45
|
+
};
|
|
46
|
+
export declare const previewer: {
|
|
47
|
+
previewVars: string;
|
|
48
|
+
time: string;
|
|
49
|
+
expRunning: string;
|
|
50
|
+
runExpStart: string;
|
|
51
|
+
runExpError: string;
|
|
52
|
+
triggerExpError: string;
|
|
53
|
+
expId: string;
|
|
54
|
+
createExpError: string;
|
|
55
|
+
logDownloadError: string;
|
|
56
|
+
logURLError: string;
|
|
57
|
+
btnLog: string;
|
|
58
|
+
btnRender: string;
|
|
59
|
+
btnReRender: string;
|
|
60
|
+
expIdField: string;
|
|
61
|
+
runExpErrorDes: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const compositions: {
|
|
64
|
+
name: string;
|
|
65
|
+
width: string;
|
|
66
|
+
height: string;
|
|
67
|
+
rotation: string;
|
|
68
|
+
color: string;
|
|
69
|
+
x: string;
|
|
70
|
+
y: string;
|
|
71
|
+
wrap: string;
|
|
72
|
+
fit: string;
|
|
73
|
+
fillMode: string;
|
|
74
|
+
hAlign: string;
|
|
75
|
+
vAlign: string;
|
|
76
|
+
backgroundColor: string;
|
|
77
|
+
layers: string;
|
|
78
|
+
layerText: string;
|
|
79
|
+
fontType: string;
|
|
80
|
+
layerImage: string;
|
|
81
|
+
fontSize: string;
|
|
82
|
+
lineHeight: string;
|
|
83
|
+
font: string;
|
|
84
|
+
letterSpacing: string;
|
|
85
|
+
wordSpacing: string;
|
|
86
|
+
tooltipName: string;
|
|
87
|
+
tooltipBackgroundColor: string;
|
|
88
|
+
tooltipWidth: string;
|
|
89
|
+
tooltipHeight: string;
|
|
90
|
+
tooltipAddLayer: string;
|
|
91
|
+
tooltipLayerRotation: string;
|
|
92
|
+
tooltipLayerX: string;
|
|
93
|
+
tooltipLayerY: string;
|
|
94
|
+
tooltipLayerWidth: string;
|
|
95
|
+
tooltipLayerHeight: string;
|
|
96
|
+
textOptions: string;
|
|
97
|
+
textLayerContent: string;
|
|
98
|
+
tooltipTextLayerContent: string;
|
|
99
|
+
};
|
|
100
|
+
export declare const publish: {
|
|
101
|
+
accessKey: string;
|
|
102
|
+
tooltipAccessKey: string;
|
|
103
|
+
publishTitle: string;
|
|
104
|
+
publishStepTitle: string;
|
|
105
|
+
publishStepDesc: string;
|
|
106
|
+
distributeStepTitle: string;
|
|
107
|
+
distributeStepDesc: string;
|
|
108
|
+
compositionError: string;
|
|
109
|
+
btnWebsite: string;
|
|
110
|
+
webpageTitle: string;
|
|
111
|
+
webPageHosted: string;
|
|
112
|
+
webpageDesc: string;
|
|
113
|
+
sampleWebpage: string;
|
|
114
|
+
btnEmail: string;
|
|
115
|
+
exporting: string;
|
|
116
|
+
emailTitle: string;
|
|
117
|
+
emailDesc: string;
|
|
118
|
+
downloadSampleCsvLink: string;
|
|
119
|
+
uploadCsv: string;
|
|
120
|
+
generatingLink: string;
|
|
121
|
+
downloadLink: string;
|
|
122
|
+
btnDownload: string;
|
|
123
|
+
generatingLinkDesc: string;
|
|
124
|
+
missingColumns: string;
|
|
125
|
+
renderBatchFailed: string;
|
|
126
|
+
createBatchFailed: string;
|
|
127
|
+
downloadError: string;
|
|
128
|
+
embeddedCodeCopyError: string;
|
|
129
|
+
creatingLinks: string;
|
|
130
|
+
importingData: string;
|
|
131
|
+
downloadDesc: string;
|
|
132
|
+
titleMissingColumns: string;
|
|
133
|
+
csvMissingColumns: string;
|
|
134
|
+
csvMatchColumns: string;
|
|
135
|
+
exportBatchOfVideo: string;
|
|
136
|
+
btnHubspot: string;
|
|
137
|
+
hubspotTitle: string;
|
|
138
|
+
hubspotDesc: string;
|
|
139
|
+
saveChanges: string;
|
|
140
|
+
embeddedCode: string;
|
|
141
|
+
btnAPI: string;
|
|
142
|
+
btnExport: string;
|
|
143
|
+
btnCRM: string;
|
|
144
|
+
btnPublish: string;
|
|
145
|
+
btnSkip: string;
|
|
146
|
+
btnBack: string;
|
|
147
|
+
btnFinished: string;
|
|
148
|
+
btnCancel: string;
|
|
149
|
+
btnNext: string;
|
|
150
|
+
noCompErrorTitle: string;
|
|
151
|
+
noCompErrorDesc: string;
|
|
152
|
+
};
|
|
153
|
+
export declare const integration: {
|
|
154
|
+
errorPullingComps: string;
|
|
155
|
+
errorPullingAEs: string;
|
|
156
|
+
errorCreatingCreds: string;
|
|
157
|
+
errorGettingCreds: string;
|
|
158
|
+
documentation: string;
|
|
159
|
+
docParagraph: string;
|
|
160
|
+
js: string;
|
|
161
|
+
jsSdkLink: string;
|
|
162
|
+
restLink: string;
|
|
163
|
+
rest: string;
|
|
164
|
+
sdkArchiveSuffix: string;
|
|
165
|
+
};
|
|
166
|
+
export declare const header: {
|
|
167
|
+
publishing: string;
|
|
168
|
+
working: string;
|
|
169
|
+
statusError: string;
|
|
170
|
+
publishJobError: string;
|
|
171
|
+
publishPollError: string;
|
|
172
|
+
};
|
|
173
|
+
export declare const project: {
|
|
174
|
+
compName: string;
|
|
175
|
+
tooltipCompId: string;
|
|
176
|
+
};
|
|
177
|
+
export declare const BATCHES_COPY: {
|
|
178
|
+
progress: {
|
|
179
|
+
notRendered: string;
|
|
180
|
+
rendering: string;
|
|
181
|
+
rendered: string;
|
|
182
|
+
cancelled: string;
|
|
183
|
+
queued: string;
|
|
184
|
+
malformed: string;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BATCHES_COPY = exports.project = exports.header = exports.integration = exports.publish = exports.compositions = exports.previewer = exports.assets = void 0;
|
|
4
|
+
exports.assets = {
|
|
5
|
+
tooltipFilter: 'Filter by Asset type',
|
|
6
|
+
previewNotAvailable: 'Preview Not Available for this Asset Type',
|
|
7
|
+
iconTypes: {
|
|
8
|
+
filter: 'Filter By Type',
|
|
9
|
+
lut: 'LUT',
|
|
10
|
+
all: 'All Types',
|
|
11
|
+
video: 'Video Files',
|
|
12
|
+
audio: 'Audio Files',
|
|
13
|
+
video_composition: 'Composition',
|
|
14
|
+
image: 'Image Files',
|
|
15
|
+
image_sequence: 'Image Sequences (Archive)',
|
|
16
|
+
template: 'Custom Template',
|
|
17
|
+
static_composition: 'Template',
|
|
18
|
+
font: 'Font Files',
|
|
19
|
+
after_effects: 'After Effects'
|
|
20
|
+
},
|
|
21
|
+
uploads: {
|
|
22
|
+
noUploads: 'There are currently no assets uploading...',
|
|
23
|
+
preparePhase: 'Preparing asset...',
|
|
24
|
+
autoTagInput: 'Tag by filename',
|
|
25
|
+
assignToStoryInput: 'Assign to Story',
|
|
26
|
+
assignToStoryInfo: 'If selected, any assets uploaded will only be available to use with the currently selected story.',
|
|
27
|
+
uploadButton: 'Upload',
|
|
28
|
+
cancelButton: 'Cancel'
|
|
29
|
+
},
|
|
30
|
+
tags: {
|
|
31
|
+
add: 'Add new tag',
|
|
32
|
+
duplicated: 'Duplicated Tags: "[dupedTags]" will not be added.'
|
|
33
|
+
},
|
|
34
|
+
field: {
|
|
35
|
+
fieldMismatchError: 'Asset Type mismatch. Field only accepts "[accepts]" assets.',
|
|
36
|
+
dragPrompt: 'Drag Asset Here',
|
|
37
|
+
tooltipClear: 'Clear the selected Asset',
|
|
38
|
+
tooltipFilter: 'Filter assets to match Asset type',
|
|
39
|
+
tooltipFilterAsset: 'Filter assets to the selected Asset'
|
|
40
|
+
},
|
|
41
|
+
details: 'Asset Details',
|
|
42
|
+
newDetails: 'New Asset Details',
|
|
43
|
+
name: 'Name',
|
|
44
|
+
date: 'Date Created',
|
|
45
|
+
addTag: 'Add Tag',
|
|
46
|
+
assetTag: 'Tags',
|
|
47
|
+
sessionExpired: 'Your session has expired, please log in again to continue.'
|
|
48
|
+
};
|
|
49
|
+
exports.previewer = {
|
|
50
|
+
previewVars: 'Preview Variables',
|
|
51
|
+
time: 'Time Elapsed:',
|
|
52
|
+
expRunning: 'Rendering Experience',
|
|
53
|
+
runExpStart: 'Creating Experience',
|
|
54
|
+
runExpError: 'Error running experience - ID: [expId]',
|
|
55
|
+
triggerExpError: 'Error triggering experience - ID: [expId]',
|
|
56
|
+
expId: 'Running Experience - ID: [expId]',
|
|
57
|
+
createExpError: 'Error creating experience',
|
|
58
|
+
logDownloadError: 'Could not download log of Job: [jobId]',
|
|
59
|
+
logURLError: 'Could not retrieve log URL of Job: [jobId]',
|
|
60
|
+
btnLog: 'Job Log',
|
|
61
|
+
btnRender: 'Render',
|
|
62
|
+
btnReRender: 'Re-Render',
|
|
63
|
+
expIdField: 'Exp. ID',
|
|
64
|
+
runExpErrorDes: 'Sorry, there was a problem creating your video. Please try again.'
|
|
65
|
+
};
|
|
66
|
+
exports.compositions = {
|
|
67
|
+
name: 'Name',
|
|
68
|
+
width: 'Width',
|
|
69
|
+
height: 'Height',
|
|
70
|
+
rotation: 'Rotation',
|
|
71
|
+
color: 'Color',
|
|
72
|
+
x: 'X',
|
|
73
|
+
y: 'Y',
|
|
74
|
+
wrap: 'Wrap',
|
|
75
|
+
fit: 'Fit',
|
|
76
|
+
fillMode: 'Fill Mode',
|
|
77
|
+
hAlign: 'H. Align',
|
|
78
|
+
vAlign: 'V. Align',
|
|
79
|
+
backgroundColor: 'Background',
|
|
80
|
+
layers: 'Layers',
|
|
81
|
+
layerText: 'Text',
|
|
82
|
+
fontType: 'Font Type',
|
|
83
|
+
layerImage: 'Image',
|
|
84
|
+
fontSize: 'Font Size',
|
|
85
|
+
lineHeight: 'Line Height',
|
|
86
|
+
font: 'Font',
|
|
87
|
+
letterSpacing: 'Letter Spacing',
|
|
88
|
+
wordSpacing: 'Word Spacing',
|
|
89
|
+
tooltipName: 'Display name of this composition.',
|
|
90
|
+
tooltipBackgroundColor: 'Background color of this composition. Can also be transparent.',
|
|
91
|
+
tooltipWidth: 'Width of the composition, in pixels',
|
|
92
|
+
tooltipHeight: 'Height of the composition, in pixels',
|
|
93
|
+
tooltipAddLayer: 'Add a new layer to the composition',
|
|
94
|
+
tooltipLayerRotation: 'Rotation angle of the layer, in degrees',
|
|
95
|
+
tooltipLayerX: 'Layer X position.',
|
|
96
|
+
tooltipLayerY: 'Layer Y position',
|
|
97
|
+
tooltipLayerWidth: 'Layer width, in pixels.',
|
|
98
|
+
tooltipLayerHeight: 'Layer height, in pixels',
|
|
99
|
+
textOptions: 'Text Options',
|
|
100
|
+
textLayerContent: 'Content',
|
|
101
|
+
tooltipTextLayerContent: 'The copy rendered in this layer. Wrap variables like so: {{variable_id}}.'
|
|
102
|
+
};
|
|
103
|
+
exports.publish = {
|
|
104
|
+
accessKey: 'Access Key',
|
|
105
|
+
tooltipAccessKey: 'API access key to use for this video distribution.',
|
|
106
|
+
publishTitle: 'Publish & Deliver',
|
|
107
|
+
// publish
|
|
108
|
+
publishStepTitle: 'STEP 1: Publish your Project',
|
|
109
|
+
publishStepDesc: "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.",
|
|
110
|
+
// distribute
|
|
111
|
+
distributeStepTitle: 'STEP 2: How do you want your users to view their video?',
|
|
112
|
+
distributeStepDesc: 'Select which Composition you want to deliver, access credentials you want to use, and distribution channel.',
|
|
113
|
+
compositionError: 'Please Select Composition',
|
|
114
|
+
// webpage
|
|
115
|
+
btnWebsite: 'Webpage',
|
|
116
|
+
webpageTitle: 'STEP 3: Webpage',
|
|
117
|
+
webPageHosted: 'Webpage hosted on Imposium',
|
|
118
|
+
webpageDesc: 'You can share a demo page that is hosted on Imposium or you can download a sample webpage you can customize and use to generate videos. Please ensure you include a column for every variable on your story.',
|
|
119
|
+
sampleWebpage: 'Download sample webpage',
|
|
120
|
+
// email
|
|
121
|
+
btnEmail: 'Email',
|
|
122
|
+
exporting: 'Exporting CSV... (please wait)',
|
|
123
|
+
emailTitle: 'STEP 3: Upload a CSV file with your user information in it.',
|
|
124
|
+
emailDesc: 'You can download a sample CSV with fields to populate as a starting point. Or you can upload one that already has the data in it.',
|
|
125
|
+
downloadSampleCsvLink: 'Download Sample CSV',
|
|
126
|
+
uploadCsv: 'Upload Your CSV',
|
|
127
|
+
generatingLink: 'STEP 4: Generating embed links',
|
|
128
|
+
downloadLink: 'STEP 5: Download Your CSV file',
|
|
129
|
+
btnDownload: 'Download CSV',
|
|
130
|
+
generatingLinkDesc: 'Please wait while we generate the link for your users. This may take few minutes.',
|
|
131
|
+
missingColumns: 'Error: missing required columns',
|
|
132
|
+
renderBatchFailed: 'Error: Failed to render batch',
|
|
133
|
+
createBatchFailed: 'Error: Failed to create batch',
|
|
134
|
+
downloadError: 'Error downloading sample CSV.',
|
|
135
|
+
embeddedCodeCopyError: 'Error copying embed code.',
|
|
136
|
+
creatingLinks: 'Creating User Links... (please wait)',
|
|
137
|
+
importingData: 'Importing Data... (please wait)',
|
|
138
|
+
downloadDesc: 'Your CSV data file is ready to download with an embed code you can import into your email platform to send out.',
|
|
139
|
+
titleMissingColumns: 'Warning: ',
|
|
140
|
+
csvMissingColumns: 'Some of your column names did not match up with the variables in the story. Please ensure these variables line up and then re-upload the csv: ',
|
|
141
|
+
csvMatchColumns: 'Please match the column(s) provided to the story variables:',
|
|
142
|
+
// export
|
|
143
|
+
exportBatchOfVideo: 'Export batch of videos',
|
|
144
|
+
// hubspot
|
|
145
|
+
btnHubspot: 'Hubspot',
|
|
146
|
+
hubspotTitle: 'STEP 3: Copy Hubspot code snippet',
|
|
147
|
+
hubspotDesc: 'Copy the provided embed code into HubSpot. Replace the placeholder variable values with HubSpot template strings, to splice in your user data.',
|
|
148
|
+
saveChanges: 'Save Changes',
|
|
149
|
+
embeddedCode: 'Embed Url: ',
|
|
150
|
+
// api
|
|
151
|
+
btnAPI: 'API integration',
|
|
152
|
+
// export
|
|
153
|
+
btnExport: 'Export',
|
|
154
|
+
btnCRM: 'Flashtalking Creative Manager',
|
|
155
|
+
// global
|
|
156
|
+
btnPublish: 'Publish',
|
|
157
|
+
btnSkip: 'Skip',
|
|
158
|
+
btnBack: 'Back',
|
|
159
|
+
btnFinished: 'Done',
|
|
160
|
+
btnCancel: 'Cancel',
|
|
161
|
+
btnNext: 'Next',
|
|
162
|
+
noCompErrorTitle: 'No Compositions Found',
|
|
163
|
+
noCompErrorDesc: "You must have at least 1 composition on your story to render and distribute videos."
|
|
164
|
+
};
|
|
165
|
+
exports.integration = {
|
|
166
|
+
errorPullingComps: ' Error getting composition IDs, contact your Imposium admin for support.',
|
|
167
|
+
errorPullingAEs: ' Error getting After Effect IDs, contact your Imposium admin for support.',
|
|
168
|
+
errorCreatingCreds: ' Error creating credentials, contact your Imposium admin for support.',
|
|
169
|
+
errorGettingCreds: ' Error getting credentials, contact your Imposium admin for support.',
|
|
170
|
+
documentation: 'Documentation',
|
|
171
|
+
docParagraph: 'Use the links below for more information on integrating Imposium into your application.',
|
|
172
|
+
js: 'JavaScript SDK',
|
|
173
|
+
jsSdkLink: 'https://docs.imposium.com/js-sdk/#/',
|
|
174
|
+
restLink: 'https://docs.imposium.com',
|
|
175
|
+
rest: 'REST API',
|
|
176
|
+
sdkArchiveSuffix: ' - JS SDK Integration.zip'
|
|
177
|
+
};
|
|
178
|
+
exports.header = {
|
|
179
|
+
publishing: 'Publishing...',
|
|
180
|
+
working: 'Using Working Copy',
|
|
181
|
+
statusError: 'Error getting story status',
|
|
182
|
+
publishJobError: 'Error creating publish story job',
|
|
183
|
+
publishPollError: 'Error polling publish job status'
|
|
184
|
+
};
|
|
185
|
+
exports.project = {
|
|
186
|
+
compName: 'Composition',
|
|
187
|
+
tooltipCompId: 'Unique ID of the selected composition. Used to render that specific composition via the API and Imposium JS-SDK.'
|
|
188
|
+
};
|
|
189
|
+
exports.BATCHES_COPY = {
|
|
190
|
+
progress: {
|
|
191
|
+
notRendered: 'not rendered',
|
|
192
|
+
rendering: 'rendering',
|
|
193
|
+
rendered: 'rendered',
|
|
194
|
+
cancelled: 'cancelled',
|
|
195
|
+
queued: 'queued',
|
|
196
|
+
malformed: 'unknown'
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
//# sourceMappingURL=copy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../../../src/components/publish-wizard/copy.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG;IAClB,aAAa,EAAE,sBAAsB;IACrC,mBAAmB,EAAE,2CAA2C;IAChE,SAAS,EAAE;QACP,MAAM,EAAE,gBAAgB;QACxB,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,aAAa;QACpB,iBAAiB,EAAE,a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,EAAE,0EAA0E;IAC7F,eAAe,EAAE,2EAA2E;IAC5F,kBAAkB,EAAE,uEAAuE;IAC3F,iBAAiB,EAAE,sEAAsE;IACzF,aAAa,EAAE,eAAe;IAC9B,YAAY,EACR,yFAAyF;IAC7F,EAAE,EAAE,gBAAgB;IACpB,SAAS,EAAE,qCAAqC;IAChD,QAAQ,EAAE,2BAA2B;IACrC,IAAI,EAAE,UAAU;IAChB,gBAAgB,EAAE,2BAA2B;CAChD,CAAC;AAEW,QAAA,MAAM,GAAG;IAClB,UAAU,EAAE,eAAe;IAC3B,OAAO,EAAE,oBAAoB;IAC7B,WAAW,EAAE,4BAA4B;IACzC,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,kCAAkC;CACvD,CAAC;AAEW,QAAA,OAAO,GAAG;IACnB,QAAQ,EAAE,aAAa;IACvB,aAAa,EACT,kHAAkH;CACzH,CAAC;AAEW,QAAA,YAAY,GAAG;IACxB,QAAQ,EAAE;QACN,WAAW,EAAE,cAAc;QAC3B,SAAS,EAAE,WAAW;QACtB,QAAQ,EAAE,UAAU;QACpB,SAAS,EAAE,WAAW;QACtB,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,SAAS;KACvB;CACJ,CAAC"}
|
|
@@ -48,6 +48,42 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
48
48
|
__setModuleDefault(result, mod);
|
|
49
49
|
return result;
|
|
50
50
|
};
|
|
51
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
52
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
53
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
54
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
55
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
56
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
57
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
61
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
62
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
63
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
64
|
+
function step(op) {
|
|
65
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
66
|
+
while (_) try {
|
|
67
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
68
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
69
|
+
switch (op[0]) {
|
|
70
|
+
case 0: case 1: t = op; break;
|
|
71
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
72
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
73
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
74
|
+
default:
|
|
75
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
76
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
77
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
78
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
79
|
+
if (t[2]) _.ops.pop();
|
|
80
|
+
_.trys.pop(); continue;
|
|
81
|
+
}
|
|
82
|
+
op = body.call(thisArg, _);
|
|
83
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
84
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
85
|
+
}
|
|
86
|
+
};
|
|
51
87
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
52
88
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
89
|
};
|
|
@@ -65,6 +101,7 @@ var FieldWrapper_1 = __importDefault(require("../field-wrapper/FieldWrapper"));
|
|
|
65
101
|
var HRule_1 = __importDefault(require("../h-rule/HRule"));
|
|
66
102
|
var VideoPlayer_1 = __importDefault(require("../players/VideoPlayer"));
|
|
67
103
|
var ImagePlayer_1 = __importDefault(require("../players/ImagePlayer"));
|
|
104
|
+
var file_saver_1 = require("file-saver");
|
|
68
105
|
var MediaVariableField_1 = __importDefault(require("../media-variable-field/MediaVariableField"));
|
|
69
106
|
var react_resize_detector_1 = __importDefault(require("react-resize-detector"));
|
|
70
107
|
var copy_1 = require("../../constants/copy");
|
|
@@ -72,11 +109,29 @@ var Util_1 = require("../../Util");
|
|
|
72
109
|
var Timer_1 = __importDefault(require("../../services/Timer"));
|
|
73
110
|
var LogViewer_1 = __importDefault(require("../log-viewer/LogViewer"));
|
|
74
111
|
var react_redux_1 = require("react-redux");
|
|
112
|
+
var icons_1 = require("../../constants/icons");
|
|
75
113
|
var StoryPreviewer = /** @class */ (function (_super) {
|
|
76
114
|
__extends(StoryPreviewer, _super);
|
|
77
115
|
function StoryPreviewer(props) {
|
|
78
116
|
var _this = _super.call(this, props) || this;
|
|
79
117
|
_this.TIMEOUT = '02:00';
|
|
118
|
+
_this.download = function (url, fileName) { return __awaiter(_this, void 0, void 0, function () {
|
|
119
|
+
var res, blob;
|
|
120
|
+
return __generator(this, function (_a) {
|
|
121
|
+
switch (_a.label) {
|
|
122
|
+
case 0: return [4 /*yield*/, fetch(url, {
|
|
123
|
+
cache: 'no-cache'
|
|
124
|
+
})];
|
|
125
|
+
case 1:
|
|
126
|
+
res = _a.sent();
|
|
127
|
+
return [4 /*yield*/, res.blob()];
|
|
128
|
+
case 2:
|
|
129
|
+
blob = _a.sent();
|
|
130
|
+
(0, file_saver_1.saveAs)(blob, fileName);
|
|
131
|
+
return [2 /*return*/];
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}); };
|
|
80
135
|
var inventory = _this.getInventoryDefaults();
|
|
81
136
|
var inventoryOptions = _this.getInventoryOptions();
|
|
82
137
|
_this.state = {
|
|
@@ -88,7 +143,8 @@ var StoryPreviewer = /** @class */ (function (_super) {
|
|
|
88
143
|
timeElapsed: 0,
|
|
89
144
|
activeOutput: '',
|
|
90
145
|
rendering: false,
|
|
91
|
-
isTimeOut: false
|
|
146
|
+
isTimeOut: false,
|
|
147
|
+
compositionOverride: null
|
|
92
148
|
};
|
|
93
149
|
_this.timer = new Timer_1.default({
|
|
94
150
|
interval: 1000,
|
|
@@ -99,6 +155,7 @@ var StoryPreviewer = /** @class */ (function (_super) {
|
|
|
99
155
|
_this.evtHandlers = {
|
|
100
156
|
toggleOutput: function (e) { return _this.toggleActiveOutput(e); },
|
|
101
157
|
createExp: function () { return _this.createExperience(); },
|
|
158
|
+
compChange: function (c) { return _this.compChanged(c); },
|
|
102
159
|
gotExperience: null
|
|
103
160
|
};
|
|
104
161
|
return _this;
|
|
@@ -183,9 +240,6 @@ var StoryPreviewer = /** @class */ (function (_super) {
|
|
|
183
240
|
};
|
|
184
241
|
StoryPreviewer.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
185
242
|
var _this = this;
|
|
186
|
-
if (prevProps.storyId !== this.props.storyId) {
|
|
187
|
-
this.evtHandlers.gotExperience = null;
|
|
188
|
-
}
|
|
189
243
|
if (prevProps.variables !== this.props.variables) {
|
|
190
244
|
var inventory = void 0;
|
|
191
245
|
var inventoryOptions = this.getInventoryOptions();
|
|
@@ -415,7 +469,8 @@ var StoryPreviewer = /** @class */ (function (_super) {
|
|
|
415
469
|
};
|
|
416
470
|
StoryPreviewer.prototype.createExperience = function () {
|
|
417
471
|
var _this = this;
|
|
418
|
-
var _a = this.props, storyId = _a.storyId, onNotification = _a.onNotification, onError = _a.onError, api = _a.api, onExperienceCreated = _a.onExperienceCreated,
|
|
472
|
+
var _a = this.props, storyId = _a.storyId, onNotification = _a.onNotification, onError = _a.onError, api = _a.api, onExperienceCreated = _a.onExperienceCreated, useWorkingCopy = _a.useWorkingCopy;
|
|
473
|
+
var compId = this.getCompId();
|
|
419
474
|
this.resetState(false, function () {
|
|
420
475
|
_this.setState({
|
|
421
476
|
rendering: true,
|
|
@@ -425,7 +480,7 @@ var StoryPreviewer = /** @class */ (function (_super) {
|
|
|
425
480
|
if (onNotification) {
|
|
426
481
|
onNotification(copy_1.previewer.runExpStart);
|
|
427
482
|
}
|
|
428
|
-
api.createExperience(storyId, _this.state.inventory,
|
|
483
|
+
api.createExperience(storyId, _this.state.inventory, compId, useWorkingCopy)
|
|
429
484
|
.then(function (resExp) {
|
|
430
485
|
if (onNotification) {
|
|
431
486
|
onNotification(copy_1.previewer.expId.replace('[expId]', resExp.id));
|
|
@@ -433,7 +488,7 @@ var StoryPreviewer = /** @class */ (function (_super) {
|
|
|
433
488
|
if (onExperienceCreated) {
|
|
434
489
|
onExperienceCreated(resExp);
|
|
435
490
|
}
|
|
436
|
-
_this.getExperience(resExp.id, true,
|
|
491
|
+
_this.getExperience(resExp.id, true, compId, useWorkingCopy);
|
|
437
492
|
})
|
|
438
493
|
.catch(function (e) {
|
|
439
494
|
_this.resetState();
|
|
@@ -521,17 +576,72 @@ var StoryPreviewer = /** @class */ (function (_super) {
|
|
|
521
576
|
activeOutput: e
|
|
522
577
|
});
|
|
523
578
|
};
|
|
579
|
+
StoryPreviewer.prototype.compChanged = function (compId) {
|
|
580
|
+
this.setState({ compositionOverride: compId });
|
|
581
|
+
};
|
|
582
|
+
StoryPreviewer.prototype.getCompId = function () {
|
|
583
|
+
var _a = this.props, allowCompOverride = _a.allowCompOverride, compositionId = _a.compositionId, compositionOptions = _a.compositionOptions;
|
|
584
|
+
var compositionOverride = this.state.compositionOverride;
|
|
585
|
+
if (allowCompOverride) {
|
|
586
|
+
if (compositionOverride) {
|
|
587
|
+
return compositionOverride;
|
|
588
|
+
}
|
|
589
|
+
else if (!compositionOverride && compositionOptions[0] && !compositionId) {
|
|
590
|
+
return compositionOptions[0].value;
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
return compositionId;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
else {
|
|
597
|
+
return compositionId;
|
|
598
|
+
}
|
|
599
|
+
};
|
|
600
|
+
StoryPreviewer.prototype.copyToClipboard = function (text) {
|
|
601
|
+
var _a = this.props, onNotification = _a.onNotification, onError = _a.onError;
|
|
602
|
+
navigator.clipboard.writeText(text).then(function () {
|
|
603
|
+
if (onNotification) {
|
|
604
|
+
onNotification('Copied to clipboard!');
|
|
605
|
+
}
|
|
606
|
+
}, function () {
|
|
607
|
+
if (onError) {
|
|
608
|
+
onError('Error copying to clipboard.');
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
};
|
|
524
612
|
StoryPreviewer.prototype.render = function () {
|
|
613
|
+
var _this = this;
|
|
614
|
+
var allowCompOverride = this.props.allowCompOverride;
|
|
525
615
|
var _a = this.state, rendering = _a.rendering, experience = _a.experience, activeOutput = _a.activeOutput;
|
|
616
|
+
var storyId = this.props.storyId;
|
|
526
617
|
var renderCopy = experience ? copy_1.previewer.btnReRender : copy_1.previewer.btnRender;
|
|
527
|
-
var
|
|
618
|
+
var compId = this.getCompId();
|
|
619
|
+
var btnRender = !rendering ? (React.createElement(Button_1.default, { disabled: !compId, size: 'large', onClick: this.evtHandlers.createExp, color: 'primary', style: 'bold' }, renderCopy)) : null;
|
|
528
620
|
var viewerButtons;
|
|
529
621
|
var expIdField;
|
|
530
622
|
if (experience) {
|
|
531
623
|
var viewerOpts = this.getViewerOptions();
|
|
532
|
-
|
|
624
|
+
var outputArr = activeOutput.split('.');
|
|
625
|
+
var type = outputArr[0];
|
|
626
|
+
var key = outputArr[1];
|
|
627
|
+
var url_1;
|
|
628
|
+
var fileName_1 = "".concat(storyId, "_").concat(type);
|
|
629
|
+
if (type === previewer_1.OUTPUT_TYPES.IMAGE) {
|
|
630
|
+
url_1 = experience.output.images[key];
|
|
631
|
+
}
|
|
632
|
+
else if (type === previewer_1.OUTPUT_TYPES.VIDEO) {
|
|
633
|
+
url_1 = experience.output.videos[key].url;
|
|
634
|
+
}
|
|
635
|
+
var downloadBtn = (React.createElement(Button_1.default, { key: 'btn-download', tooltip: 'Download Preview', style: 'subtle', onClick: function () {
|
|
636
|
+
_this.download(url_1, fileName_1).catch(function (error) {
|
|
637
|
+
return alert("".concat(copy_1.ERROR.download.replace('[error]', error)));
|
|
638
|
+
});
|
|
639
|
+
} }, icons_1.ICON_DOWNLOAD));
|
|
640
|
+
var copyBtn = (React.createElement(Button_1.default, { key: 'btn-copy-url', tooltip: 'Copy URL to Clipboard', style: 'subtle', onClick: function () { return _this.copyToClipboard(url_1); } }, icons_1.ICON_CLIPBOARD));
|
|
641
|
+
viewerButtons = (React.createElement(SelectField_1.default, { width: '200px', options: viewerOpts, value: activeOutput, onChange: this.evtHandlers.toggleOutput, buttons: [downloadBtn, copyBtn] }));
|
|
533
642
|
expIdField = (React.createElement(TextField_1.default, { readOnly: true, width: '360px', label: copy_1.previewer.expIdField, showCopy: true, value: experience.id }));
|
|
534
643
|
}
|
|
644
|
+
var compSelect = allowCompOverride && !rendering ? (React.createElement(SelectField_1.default, { width: '150px', onChange: this.evtHandlers.compChange, options: this.props.compositionOptions, value: compId, label: '' })) : null;
|
|
535
645
|
return (React.createElement("div", { className: 'story-viewer viewer' },
|
|
536
646
|
React.createElement("div", { className: 'variables' },
|
|
537
647
|
React.createElement("h2", null, copy_1.previewer.previewVars),
|
|
@@ -540,6 +650,7 @@ var StoryPreviewer = /** @class */ (function (_super) {
|
|
|
540
650
|
React.createElement("div", { className: 'viewer-content' },
|
|
541
651
|
React.createElement("div", { className: 'content-header' },
|
|
542
652
|
btnRender,
|
|
653
|
+
React.createElement("div", { className: 'select-wrapper' }, compSelect),
|
|
543
654
|
React.createElement("div", { className: 'output' }, viewerButtons),
|
|
544
655
|
React.createElement("div", { className: 'right-interface' }, expIdField)),
|
|
545
656
|
React.createElement("div", { className: 'content-wrapper' }, this.renderViewerContent()))));
|