@imposium-hub/components 2.5.6 → 2.5.8
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/color-field/ColorField.d.ts +1 -0
- package/dist/cjs/components/color-field/ColorField.js +13 -1
- package/dist/cjs/components/color-field/ColorField.js.map +1 -1
- package/dist/cjs/components/publish-wizard/PublishWizard.js.map +1 -1
- package/dist/cjs/components/story-previewer/StoryPreviewer.js +10 -14
- package/dist/cjs/components/story-previewer/StoryPreviewer.js.map +1 -1
- package/dist/cjs/redux/actions/publish.js +1 -0
- package/dist/cjs/redux/actions/publish.js.map +1 -1
- 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/esm/components/color-field/ColorField.d.ts +1 -0
- package/dist/esm/components/color-field/ColorField.js +13 -1
- package/dist/esm/components/color-field/ColorField.js.map +1 -1
- package/dist/esm/components/publish-wizard/PublishWizard.js.map +1 -1
- package/dist/esm/components/story-previewer/StoryPreviewer.js +10 -14
- package/dist/esm/components/story-previewer/StoryPreviewer.js.map +1 -1
- package/dist/esm/redux/actions/publish.js +1 -0
- package/dist/esm/redux/actions/publish.js.map +1 -1
- 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/styles.css +3 -0
- package/dist/styles.less +9 -4
- package/less/components/assets.less +9 -4
- package/package.json +1 -1
- package/src/components/color-field/ColorField.tsx +13 -2
- package/src/components/publish-wizard/PublishWizard.tsx +2 -1
- package/src/components/story-previewer/StoryPreviewer.tsx +14 -16
- package/src/redux/actions/publish.ts +1 -1
- package/src/services/API.ts +8 -0
|
@@ -65,7 +65,7 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
65
65
|
|
|
66
66
|
private evtHandlers: any;
|
|
67
67
|
|
|
68
|
-
private TIMEOUT:
|
|
68
|
+
private TIMEOUT: number = 120000;
|
|
69
69
|
|
|
70
70
|
private maxPlaybackRate = 3;
|
|
71
71
|
|
|
@@ -210,20 +210,8 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
if (this.props.notifications) {
|
|
214
|
-
if (this.props.notifications[0]) {
|
|
215
|
-
if (this.props.notifications[0]['type'] === 'error') {
|
|
216
|
-
this.setState({ isTimeOut: true });
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
if (this.props.notifications[0]['type'] === 'info') {
|
|
220
|
-
this.setState({ isTimeOut: false });
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
213
|
if (prevState.timeElapsed !== this.state.timeElapsed) {
|
|
226
|
-
if (
|
|
214
|
+
if (this.state.timeElapsed >= this.TIMEOUT && !this.state.experience) {
|
|
227
215
|
const { onError, api } = this.props;
|
|
228
216
|
const { experienceId } = this.state;
|
|
229
217
|
|
|
@@ -570,14 +558,24 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
570
558
|
}
|
|
571
559
|
})
|
|
572
560
|
.catch((e) => {
|
|
573
|
-
this.resetState();
|
|
574
561
|
if (onError) {
|
|
575
562
|
if (e.error) {
|
|
576
563
|
onError(copy.runExpError.replace('[error]', e.error));
|
|
564
|
+
this.resetState(
|
|
565
|
+
true,
|
|
566
|
+
() => {
|
|
567
|
+
this.setState({
|
|
568
|
+
isTimeOut: true,
|
|
569
|
+
errorMsg: e.error
|
|
570
|
+
});
|
|
571
|
+
},
|
|
572
|
+
experienceId
|
|
573
|
+
);
|
|
577
574
|
} else {
|
|
578
575
|
onError(
|
|
579
576
|
copy.runExpIdError.replace('[expId]', experienceId)
|
|
580
577
|
);
|
|
578
|
+
this.resetState();
|
|
581
579
|
}
|
|
582
580
|
}
|
|
583
581
|
});
|
|
@@ -682,7 +680,7 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
682
680
|
{copy.time} {formattedTime(timeElapsed)}
|
|
683
681
|
</p>
|
|
684
682
|
<br />
|
|
685
|
-
<p>{`${copy.runExpError.replace('[error]', errorMsg)}`}</p>
|
|
683
|
+
{errorMsg ? <p>{`${copy.runExpError.replace('[error]', errorMsg)}`}</p> : ''}
|
|
686
684
|
</div>
|
|
687
685
|
);
|
|
688
686
|
} else if (experience && activeOutput) {
|
|
@@ -17,7 +17,7 @@ export const getStoryPublishStatus = (api: IImposiumAPI, storyId: string): any =
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
dispatch({ type: publish.UPDATE_PUBLISH_STATUS, data: resStatus });
|
|
20
|
-
|
|
20
|
+
resolve(resStatus);
|
|
21
21
|
if (resStatus.publishing) {
|
|
22
22
|
const jobId = resStatus.job_id;
|
|
23
23
|
api.pollJob(jobId)
|
package/src/services/API.ts
CHANGED
|
@@ -145,6 +145,7 @@ export interface IImposiumAPI {
|
|
|
145
145
|
textToSpeech(options: ITTSOptions);
|
|
146
146
|
getAssetMap(storyId: string);
|
|
147
147
|
clearStoryCache(storyId: string);
|
|
148
|
+
debugId(id: string);
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
interface ITTSOptions {
|
|
@@ -1626,4 +1627,11 @@ export default class API {
|
|
|
1626
1627
|
method: 'DELETE'
|
|
1627
1628
|
});
|
|
1628
1629
|
};
|
|
1630
|
+
|
|
1631
|
+
public debugId = (id: string): Promise<any> => {
|
|
1632
|
+
return this.doRequest({
|
|
1633
|
+
url: `/info/${id}`,
|
|
1634
|
+
method: 'GET'
|
|
1635
|
+
});
|
|
1636
|
+
};
|
|
1629
1637
|
}
|