@imposium-hub/components 2.7.3 → 2.8.0-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.
Files changed (37) hide show
  1. package/dist/cjs/components/app-wrapper/AppWrapper.js +0 -5
  2. package/dist/cjs/components/app-wrapper/AppWrapper.js.map +1 -1
  3. package/dist/cjs/components/confirm-modal/ConfirmModal.d.ts +1 -0
  4. package/dist/cjs/components/confirm-modal/ConfirmModal.js +7 -1
  5. package/dist/cjs/components/confirm-modal/ConfirmModal.js.map +1 -1
  6. package/dist/cjs/components/header/Header.js +2 -2
  7. package/dist/cjs/components/header/Header.js.map +1 -1
  8. package/dist/cjs/components/publish-wizard/publish/EmailWorkflow.js +25 -58
  9. package/dist/cjs/components/publish-wizard/publish/EmailWorkflow.js.map +1 -1
  10. package/dist/cjs/constants/copy.d.ts +1 -1
  11. package/dist/cjs/constants/copy.js +1 -1
  12. package/dist/cjs/constants/copy.js.map +1 -1
  13. package/dist/cjs/constants/publish.d.ts +0 -3
  14. package/dist/cjs/constants/publish.js +3 -5
  15. package/dist/cjs/constants/publish.js.map +1 -1
  16. package/dist/esm/components/app-wrapper/AppWrapper.js +0 -5
  17. package/dist/esm/components/app-wrapper/AppWrapper.js.map +1 -1
  18. package/dist/esm/components/confirm-modal/ConfirmModal.d.ts +1 -0
  19. package/dist/esm/components/confirm-modal/ConfirmModal.js +7 -1
  20. package/dist/esm/components/confirm-modal/ConfirmModal.js.map +1 -1
  21. package/dist/esm/components/header/Header.js +2 -2
  22. package/dist/esm/components/header/Header.js.map +1 -1
  23. package/dist/esm/components/publish-wizard/publish/EmailWorkflow.js +14 -47
  24. package/dist/esm/components/publish-wizard/publish/EmailWorkflow.js.map +1 -1
  25. package/dist/esm/constants/copy.d.ts +1 -1
  26. package/dist/esm/constants/copy.js +1 -1
  27. package/dist/esm/constants/copy.js.map +1 -1
  28. package/dist/esm/constants/publish.d.ts +0 -3
  29. package/dist/esm/constants/publish.js +2 -4
  30. package/dist/esm/constants/publish.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/components/app-wrapper/AppWrapper.tsx +0 -6
  33. package/src/components/confirm-modal/ConfirmModal.tsx +15 -6
  34. package/src/components/header/Header.tsx +2 -2
  35. package/src/components/publish-wizard/publish/EmailWorkflow.tsx +24 -69
  36. package/src/constants/copy.ts +1 -1
  37. package/src/constants/publish.ts +2 -7
@@ -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 = '';
@@ -281,9 +274,6 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
281
274
  if (variables?.previewItem?.src) {
282
275
  const { url, src } = variables.previewItem;
283
276
  value = url ? url : src ? src : '';
284
- } else if (variables?.defaultItem?.src) {
285
- const { url, src } = variables.defaultItem;
286
- value = url ? url : src ? src : '';
287
277
  }
288
278
 
289
279
  return {
@@ -295,27 +285,12 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
295
285
  });
296
286
 
297
287
  if (isCrM) {
298
- if (uploadAsAssets) {
299
- maskConfig.push(
300
- {
301
- id: ASSET_NAME_VAR,
302
- name: ASSET_NAME_VAR,
303
- show: true
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
- }
288
+ for (const id of CRM_PLACEMENT_VARS) {
289
+ maskConfig.push({
290
+ id,
291
+ name: id,
292
+ show: true
293
+ });
319
294
  }
320
295
  }
321
296
 
@@ -458,7 +433,12 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
458
433
  private getPostRenderActions() {
459
434
  const CrMUploadAction = { data: {} };
460
435
  const {
461
- creativeManagerOverrides: { placement_type, creative_id, creative_library_id }
436
+ creativeManagerOverrides: {
437
+ placement_type,
438
+ creative_id,
439
+ creative_library_id,
440
+ notification_email
441
+ }
462
442
  } = this.state;
463
443
 
464
444
  CrMUploadAction['type'] = placement_type;
@@ -468,6 +448,9 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
468
448
  if (creative_library_id) {
469
449
  CrMUploadAction.data['creative_library_id'] = creative_library_id;
470
450
  }
451
+ if (notification_email) {
452
+ CrMUploadAction.data['notification_email'] = notification_email;
453
+ }
471
454
 
472
455
  return [CrMUploadAction];
473
456
  }
@@ -925,8 +908,10 @@ const CrMOptions: React.FC<ICrMOptionsProps> = ({ options, onChange, errorCopy =
925
908
  </div>
926
909
  ) : null;
927
910
 
928
- const standardInterface = (
911
+ return (
929
912
  <>
913
+ <HRule />
914
+ <br />
930
915
  <h2>{copy.publish.crmPlacement}</h2>
931
916
  <p>{copy.publish.crmData}</p>
932
917
  {e}
@@ -945,44 +930,14 @@ const CrMOptions: React.FC<ICrMOptionsProps> = ({ options, onChange, errorCopy =
945
930
  value={options.creative_id}
946
931
  onChange={(v) => onInputChange('creative_id', v)}
947
932
  />
948
- </>
949
- );
950
-
951
- const assetInterface = (
952
- <>
953
- <h2>{copy.publish.crmPlacement}</h2>
954
- <p>{copy.publish.crmData}</p>
955
- {e}
956
- <br />
957
933
  <TextField
958
934
  width={'33%'}
959
935
  labelPosition='top'
960
- label={copy.publish.creativeLibraryId}
961
- value={options.creative_library_id}
962
- onChange={(v) => onInputChange('creative_library_id', v)}
936
+ label={copy.publish.email}
937
+ value={options.notification_email}
938
+ onChange={(v) => onInputChange('notification_email', v)}
963
939
  />
964
- </>
965
- );
966
- return (
967
- <>
968
- <HRule />
969
940
  <br />
970
- {options['placement_type'] === ASSETS_POST_RENDER_ACTION
971
- ? assetInterface
972
- : standardInterface}
973
- <br />
974
- <HRule />
975
- <CheckboxField
976
- value={options['placement_type'] === ASSETS_POST_RENDER_ACTION ? true : false}
977
- label={copy.publish.uploadAsAssets}
978
- onChange={(v) => {
979
- if (v === false) {
980
- onInputChange('placement_type', ADSTUDIO_POST_RENDER_ACTION);
981
- } else {
982
- onInputChange('placement_type', ASSETS_POST_RENDER_ACTION);
983
- }
984
- }}
985
- />
986
941
  <HRule />
987
942
  </>
988
943
  );
@@ -123,7 +123,6 @@ export const compositions = {
123
123
  };
124
124
 
125
125
  export const publish = {
126
- uploadAsAssets: 'Upload as Assets',
127
126
  noVariablesError:
128
127
  'No variables found on the project. Cannot proceed with publishing to Creative Manager until at least one variable is added to the project.',
129
128
  publishInProgress: 'Publish to Creative Manager in progress',
@@ -131,6 +130,7 @@ export const publish = {
131
130
  btnCrM: 'Creative Manager',
132
131
  creativeLibraryId: 'Creative Library ID',
133
132
  creativeId: 'Creative ID',
133
+ email: 'Notification Email',
134
134
  missingFields: 'Please provide the missing fields and try again!',
135
135
  crmPlacement: 'Creative Manager Placement Variables',
136
136
  crmData: `If your CSV batch data doesn't contain the required Creative Manager placement variables, or you would like to override them, enter the values below before you upload the batch data.`,
@@ -14,16 +14,11 @@ export const CRM_PLACEMENT_OPTIONS = [
14
14
  }
15
15
  ];
16
16
 
17
- export const ASSET_NAME_VAR = 'asset-name';
18
-
19
17
  export const CRM_PLACEMENT_VARS = [
20
18
  'creative_library_id',
21
19
  'creative_id',
22
20
  'version-name',
23
21
  'version-id',
24
- 'clickTag1'
22
+ 'clickTag1',
23
+ 'notificiaton_email'
25
24
  ];
26
-
27
- export const ADSTUDIO_POST_RENDER_ACTION = 'crm-adstudio';
28
-
29
- export const ASSETS_POST_RENDER_ACTION = 'crm-asset';