@imposium-hub/components 1.62.1 → 1.62.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/components/publish-wizard/PublishWizard.js +12 -2
- package/dist/cjs/components/publish-wizard/PublishWizard.js.map +1 -1
- package/dist/cjs/components/publish-wizard/publish/EmailWorkflow.js +116 -36
- package/dist/cjs/components/publish-wizard/publish/EmailWorkflow.js.map +1 -1
- package/dist/cjs/constants/copy.d.ts +3 -0
- package/dist/cjs/constants/copy.js +3 -0
- package/dist/cjs/constants/copy.js.map +1 -1
- package/dist/cjs/services/API.d.ts +2 -0
- package/dist/cjs/services/API.js +23 -0
- package/dist/cjs/services/API.js.map +1 -1
- package/dist/esm/components/publish-wizard/PublishWizard.js +13 -3
- package/dist/esm/components/publish-wizard/PublishWizard.js.map +1 -1
- package/dist/esm/components/publish-wizard/publish/EmailWorkflow.js +110 -34
- package/dist/esm/components/publish-wizard/publish/EmailWorkflow.js.map +1 -1
- package/dist/esm/constants/copy.d.ts +3 -0
- package/dist/esm/constants/copy.js +3 -0
- package/dist/esm/constants/copy.js.map +1 -1
- package/dist/esm/services/API.d.ts +2 -0
- package/dist/esm/services/API.js +19 -0
- package/dist/esm/services/API.js.map +1 -1
- package/package.json +1 -1
- package/src/components/publish-wizard/PublishWizard.tsx +31 -1
- package/src/components/publish-wizard/publish/EmailWorkflow.tsx +147 -42
- package/src/constants/copy.ts +4 -0
- package/src/services/API.ts +36 -0
package/src/services/API.ts
CHANGED
|
@@ -67,6 +67,14 @@ export interface IImposiumAPI {
|
|
|
67
67
|
compId?: string,
|
|
68
68
|
addMedia?: boolean
|
|
69
69
|
): Promise<any | Error>;
|
|
70
|
+
importBatchDataFromDataset(
|
|
71
|
+
batchId: string,
|
|
72
|
+
datasetId: string,
|
|
73
|
+
embed?: boolean,
|
|
74
|
+
accessKey?: string,
|
|
75
|
+
compId?: string,
|
|
76
|
+
addMedia?: boolean
|
|
77
|
+
): Promise<any | Error>;
|
|
70
78
|
updateBatchColumns(batchId: string, columns: any);
|
|
71
79
|
insertNewRow(batchId: string, rowIndex: number);
|
|
72
80
|
updateCellValue(batchId: string, colIndex: number, rowIndex: number, value: string);
|
|
@@ -717,6 +725,34 @@ export default class API {
|
|
|
717
725
|
});
|
|
718
726
|
};
|
|
719
727
|
|
|
728
|
+
public importBatchDataFromDataset = (
|
|
729
|
+
batchId: string,
|
|
730
|
+
datasetId: string,
|
|
731
|
+
embed: boolean = false,
|
|
732
|
+
accessKey: string = null,
|
|
733
|
+
compId: string = null,
|
|
734
|
+
addMedia: boolean = false
|
|
735
|
+
): Promise<any | Error> => {
|
|
736
|
+
const formData: FormData = new FormData();
|
|
737
|
+
|
|
738
|
+
if (embed && accessKey && compId) {
|
|
739
|
+
formData.append('include_email_embed', 'true');
|
|
740
|
+
formData.append('composition_id', compId);
|
|
741
|
+
formData.append('access_key', accessKey);
|
|
742
|
+
} else if (compId) {
|
|
743
|
+
formData.append('composition_id', compId);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
if (addMedia) {
|
|
747
|
+
formData.append('include_media', 'true');
|
|
748
|
+
}
|
|
749
|
+
return this.doRequest({
|
|
750
|
+
method: 'POST',
|
|
751
|
+
url: `/batch/${batchId}/data/from-dataset/${datasetId}`,
|
|
752
|
+
data: formData
|
|
753
|
+
});
|
|
754
|
+
};
|
|
755
|
+
|
|
720
756
|
public updateBatchColumns = (batchId: string, columns: any[]): Promise<any | Error> => {
|
|
721
757
|
return this.doRequest({
|
|
722
758
|
method: 'PUT',
|