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aqzE,EAAa,CACxB2H,gBAAiB,kBACjB1H,iBAAkB,mBAClB2H,YAAa,eAGF/sB,EAAQ,CACnBG,QAAS,UACTF,IAAK,MACLG,QAAS,WAGE4sB,EACK,iBADLA,EAEI,gBAFJA,EAGQ,oBAGRhI,GAAuB5xE,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GACjC45E,EAA+B7H,EAAWC,kBAC1C4H,EAA8B7H,EAAW4H,aACzCC,EAAkC7H,EAAW2H,iBAGnCxH,GAAkBlyE,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GAC5B+xE,EAAW2H,gBAAkB9sB,EAAMI,SACnC+kB,EAAWC,iBAAmBplB,EAAMG,SACpCglB,EAAW4H,YAAc/sB,EAAMC,KCxBrBkR,EAAkB,SAAChpB,GAC9B,IAAM8kC,EAAgB,CACpB/oB,EAAAA,GAAWqC,gBACXrC,EAAAA,GAAW4C,QAcb,OAXI3e,IAAS6X,EAAMI,UACjB6sB,EAAcroE,KAAKs/C,EAAAA,GAAW4B,cAC9BmnB,EAAcroE,KAAKs/C,EAAAA,GAAW0B,kBAC9BqnB,EAAcroE,KAAKs/C,EAAAA,GAAWgC,QAG5B/d,IAAS6X,EAAMG,SAAWhY,IAAS6X,EAAMC,MAC3CgtB,EAAcroE,KAAKs/C,EAAAA,GAAWuC,cAC9BwmB,EAAcroE,KAAKs/C,EAAAA,GAAWiB,SAGzB8nB,CACT,EAEa7W,EAA0B,SAACjuB,GACtC,IAAM+kC,EAAS/b,EAAgBhpB,GAI/B,OAFA+kC,EAAOtoE,KAAKs/C,EAAAA,GAAW6C,iBAEhBmmB,CACT,C","sources":["../../toolbar-plugin/src/plugin.js","../../top-grid-panel/src/bulk-edit-style.js","../../top-grid-panel/src/upgraded-url-override-style.js","../../top-grid-panel/src/automated-rules-style.js","../../top-grid-panel/src/bulk-edit-override-style.js","../../top-grid-panel/src/inline-download-style.js","../../top-grid-panel/src/paste-style.js","../../top-grid-panel/src/panel-styles.js","../../top-grid-panel/src/panel.js","../../xandr-campaign/src/steps/ad-group/target/device.js","../../xandr-campaign/src/steps/ad-group/target/gender.js","../../xandr-campaign/src/steps/ad-group/target/age-range.js","../../xandr-campaign/src/common/constants.js","../../xandr-campaign/src/model/criterions.js","../../xandr-campaign/src/model/ad-group-criterions.js","../../xandr-campaign/src/common/shared-components.js","../../xandr-campaign/src/steps/ad-group/use-step-ad-group-state.js","../../xandr-campaign/src/steps/ad-group/target/audience-picker.js","../../xandr-campaign/src/steps/ad-group/target/styles/audience-picker.js","../../xandr-campaign/src/steps/ad-group/frequency-capping/index.js","../../xandr-campaign/src/steps/ad-group/genre-targeting/genre-selection-double-list-box.js","../../xandr-campaign/src/steps/ad-group/genre-targeting/get-styles.js","../../xandr-campaign/src/steps/ad-group/genre-targeting/index.js","../../xandr-campaign/src/steps/ad-group/genre-targeting/genre-options.js","../../xandr-campaign/src/steps/ad-group/step-ad-group-settings-styles.js","../../xandr-campaign/src/steps/ad-group/reach-estimate/reach-estimate-styles.js","../../xandr-campaign/src/steps/ad-group/reach-estimate/audience-meter.js","../../xandr-campaign/src/steps/ad-group/reach-estimate/utils.js","../../xandr-campaign/src/steps/ad-group/reach-estimate/index.js","../../xandr-campaign/src/common/deal-potential-impression/deal-potential-impression-styles.js","../../xandr-campaign/src/common/deal-potential-impression/deal-potential-impression.js","../../xandr-campaign/src/steps/ad-group/frequency-capping/netflixFrequencyCapping.js","../../xandr-campaign/src/steps/ad-group/netflix-tc/netflix-tc-agreement.js","../../xandr-campaign/src/steps/ad-group/step-ad-group-settings.js","../../xandr-campaign/src/common/date-settings.js","../../xandr-campaign/src/model/ad-group.js","../../xandr-campaign/src/model/ad-group-bulk.js","../../xandr-campaign/src/model/campaign-criterions.js","../../xandr-campaign/src/model/campaign.js","../../xandr-campaign/src/model/call-to-action-settings.js","../../xandr-campaign/src/steps/ad-group/step-wizard-config.js","../../xandr-campaign/src/model/campaign-bulk.js","../../xandr-campaign/src/steps/campaign-settings/audience-setting/audience-setting.js","../../xandr-campaign/src/steps/campaign-settings/use-step-campaign-settings-state.js","../../xandr-campaign/src/steps/campaign-settings/step-campaign-settings-styles.js","../../xandr-campaign/src/steps/campaign-settings/step-campaign-settings.js","../../xandr-campaign/src/steps/campaign-settings/step-wizard-config.js","../../xandr-campaign/src/common/dataLayer/MmpFetchProvider.js","../../xandr-campaign/src/common/dataLayer/config.js","../../xandr-display-ads-campaign/src/steps/ad/use-step-ads-state.js","../../xandr-display-ads-campaign/src/steps/ad/step-ads-settings.js","../../xandr-display-ads-campaign/src/steps/ad/step-wizard-config.js","../../xandr-display-ads-campaign/src/xandr-display-ads-campaign-crud-scenarios.js","../../xandr-display-ads-campaign/src/pages/xandr-display-ads-campaign-creation-page.js","../../xandr-display-ads-campaign/src/pages/xandr-display-ads-campaign-settings-page.js","../../xandr-display-ads-campaign/src/pages/xandr-display-ads-ad-group-settings-page.js","../../xandr-display-ads-campaign/src/pages/xandr-display-ads-ad-group-creation-page.js","../../xandr-video-campaign/src/steps/ad/use-step-ads-state.js","../../xandr-video-campaign/src/steps/ad/step-ads-settings.js","../../xandr-video-campaign/src/steps/ad/step-wizard-config.js","../../xandr-video-campaign/src/xandr-video-campaign-crud-scenarios.js","../../xandr-video-campaign/src/pages/xandr-video-campaign-creation-page.js","../../xandr-video-campaign/src/pages/xandr-video-campaign-settings-page.js","../../xandr-video-campaign/src/pages/xandr-video-ad-group-settings-page.js","../../xandr-video-campaign/src/pages/xandr-video-ad-group-creation-page.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/wizard/wizard.js","../../../../unified-app-campaign/packages/unified-app-assets/src/use-assets-step-styles.js","../../../../unified-app-campaign/packages/unified-app-assets/src/model/constants.js","../../../../unified-app-campaign/packages/unified-app-assets/src/components/asset-group-name-section.js","../../../../unified-app-campaign/packages/unified-app-assets/src/components/assets-section.js","../../../../unified-app-campaign/packages/unified-app-assets/src/components/assets-step-form.js","../../../../unified-app-campaign/packages/unified-app-assets/src/assets-step-shell.js","../../../../unified-app-campaign/packages/unified-app-assets/src/model/default-data.js","../../../../unified-app-campaign/packages/unified-app-assets/src/use-assets-step-repository.js","../../../../unified-app-campaign/packages/unified-app-assets/src/model/create-default-campaign.js","../../../../unified-app-campaign/packages/unified-app-assets/src/assets-step-shell-settings.js","../../../../unified-app-campaign/packages/unified-app-targeting/src/use-targeting-step-styles.js","../../../../unified-app-campaign/packages/unified-app-targeting/src/targeting-step-shell.js","../../../../unified-app-campaign/packages/unified-app-campaign-details/src/use-campaign-details-step-styles.js","../../../../unified-app-campaign/packages/unified-app-campaign-details/src/campaign-details-form.js","../../../../unified-app-campaign/packages/unified-app-campaign-details/src/campaign-details-step-shell.js","../../../../unified-app-campaign/packages/unified-app-campaign-details/src/campaign-details-edit-step-shell.js","../../../../unified-app-campaign/packages/unified-app-campaign-details/src/use-campaign-details-step-repository.js","../../../../unified-app-campaign/packages/unified-app-budget/src/use-budget-step-styles.js","../../../../unified-app-campaign/packages/unified-app-budget/src/budget-step-shell.js","../../../../unified-app-campaign/packages/unified-app-budget/src/use-budget-step-repository.js","../../../../unified-app-campaign/packages/unified-app-summary/src/use-summary-schema-data.js","../../../../unified-app-campaign/packages/unified-app-summary/src/summary-step-shell.js","../../../../unified-app-campaign/packages/unified-app-summary/src/schema.js","../../../../unified-app-campaign/packages/unified-app-summary/src/use-summary-step-repository.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/steps/step-constants.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/steps/step-config.js","../../../../unified-app-campaign/packages/unified-app-targeting/src/use-targeting-step-repository.js","../../../../unified-app-campaign/packages/unified-app-campaign-details/src/use-campaign-details-edit-step-repository.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/components/footer.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/components/edit-footer.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/components/step-list.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/wizard/use-store-type.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/wizard/unified-app-campaign-wizard.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/wizard/unified-app-edit-campaign-settings-wizard.js","../../../../unified-app-campaign/packages/unified-app-campaign-wizard/src/wizard/unified-app-edit-asset-group-settings-wizard.js","../../../../unified-app-campaign/packages/unified-app-shared/src/components/system-errors.js","../../../../unified-app-campaign/packages/unified-app-shared/src/components/entity-validation-groups.js","../../../../unified-app-campaign/packages/unified-app-shared/src/components/preview-controls.js","../../../../unified-app-campaign/packages/unified-app-shared/src/components/preview-styles.js","../../../../unified-app-campaign/packages/unified-app-shared/src/components/windows-app-ads-preview.js","../../../../unified-app-campaign/packages/unified-app-shared/src/model/campaign/campaign.js","../../../../unified-app-campaign/packages/unified-app-shared/src/model/campaign/campaign-bulk.js","../../../../unified-app-campaign/packages/unified-app-shared/src/model/campaign/save-campaign.js","../../../../unified-app-campaign/packages/unified-app-shared/src/model/asset-group/save-asset-group.js","../../../../unified-app-campaign/packages/unified-app-shared/src/model/budget/use-budget-model.js","../../../../unified-app-campaign/packages/unified-app-shared/src/utils/use-responsive-style-wrapper.js","../../../../unified-app-campaign/packages/unified-app-shared/src/utils/constants.js","../../../../unified-app-campaign/packages/unified-app-shared/src/utils/assets-panels.js"],"sourcesContent":["import _, { each, extend, find, isFunction, noop } from 'underscore';\r\nimport $ from 'jquery';\r\n\r\nfunction findIdInToolbarSubMenu(id, toolbarItem) {\r\n return find(toolbarItem.menu && toolbarItem.menu.items, menuItem => id === menuItem.id);\r\n}\r\n\r\n// toolbar item may appear in both selected & unselected, such as inline chart\r\nclass ToolbarEditor {\r\n constructor(options) {\r\n const { overrideWith, toolbarConfig, updateToolbar } = options;\r\n\r\n extend(this, {\r\n overrideWith,\r\n toolbarConfig,\r\n updateToolbar,\r\n $,\r\n });\r\n }\r\n\r\n update = (value) => {\r\n const toolbarConfigs = ['toolbarSelectedConfig', 'toolbarUnselectedConfig'];\r\n const { id } = value;\r\n\r\n let hasAnyToolbarBeenUpdated = false;\r\n\r\n each(toolbarConfigs, (configName) => {\r\n let hasBeenUpdated = false;\r\n const toolbarConfig = this.toolbarConfig[configName];\r\n if (!toolbarConfig) {\r\n return;\r\n }\r\n\r\n if (toolbarConfig.has(id)) {\r\n toolbarConfig.set(id, extend(toolbarConfig.get(id), value));\r\n hasBeenUpdated = true;\r\n }\r\n\r\n if (!hasBeenUpdated) {\r\n toolbarConfig.forEach((config, key) => {\r\n const subMenu = findIdInToolbarSubMenu(id, config);\r\n\r\n if (subMenu) {\r\n extend(subMenu, value);\r\n toolbarConfig.set(key, extend({}, config));\r\n hasBeenUpdated = true;\r\n }\r\n });\r\n }\r\n\r\n hasAnyToolbarBeenUpdated = hasBeenUpdated || hasAnyToolbarBeenUpdated;\r\n });\r\n\r\n if (hasAnyToolbarBeenUpdated && isFunction(this.updateToolbar)) {\r\n this.updateToolbar();\r\n }\r\n }\r\n\r\n get(id) {\r\n const toolbarConfigs = ['toolbarSelectedConfig', 'toolbarUnselectedConfig'];\r\n let foundConfig = null;\r\n\r\n each(toolbarConfigs, (configName) => {\r\n if (!foundConfig) {\r\n if (this.toolbarConfig[configName].has(id)) {\r\n foundConfig = this.toolbarConfig[configName].get(id);\r\n }\r\n\r\n if (!foundConfig) {\r\n this.toolbarConfig[configName].forEach((config) => {\r\n const subMenu = findIdInToolbarSubMenu(id, config);\r\n if (subMenu) {\r\n foundConfig = subMenu;\r\n }\r\n });\r\n }\r\n }\r\n });\r\n\r\n return foundConfig;\r\n }\r\n\r\n overrideWith(view) {\r\n if (this.overrideWith) {\r\n // pass plugin form view to tab wrapper\r\n this.overrideWith(view);\r\n }\r\n }\r\n\r\n set(id, value) {\r\n this.update(_.defaults({ id }, value));\r\n }\r\n\r\n restoreToolbar() {\r\n noop();\r\n }\r\n}\r\n\r\nexport function getToolbarEditor({ overrideWith, toolbarConfig, updateToolbar }) {\r\n return new ToolbarEditor({\r\n overrideWith,\r\n toolbarConfig,\r\n updateToolbar,\r\n });\r\n}\r\n\r\nexport function getToolbarPlugin({\r\n overrideWith,\r\n resetVisibility,\r\n toolbarConfig,\r\n resetGraphVisibility,\r\n resetToolbarMode,\r\n updateToolbarDynamicSelectedConfig,\r\n updateToolbar,\r\n}) {\r\n return {\r\n plugin: definePlugin => definePlugin('toolbar', ['gridView'], (gridView) => {\r\n gridView.on('didSelect', () => {\r\n const selectedRowCount = gridView.selectedItems().length;\r\n const showToolbarSelected = selectedRowCount > 0;\r\n const showToolbarUnselected = selectedRowCount === 0;\r\n resetToolbarMode({\r\n showToolbarSelected,\r\n showToolbarUnselected,\r\n });\r\n if (showToolbarSelected && isFunction(toolbarConfig.toolbarDynamicSelectedConfigCallback)) {\r\n const dynamicSelectedConfig = toolbarConfig.toolbarDynamicSelectedConfigCallback({ gridView });\r\n updateToolbarDynamicSelectedConfig({\r\n dynamicSelectedConfig,\r\n });\r\n }\r\n });\r\n\r\n const resetVisibilityAndTriggerUpdate = (...options) => {\r\n resetVisibility(...options);\r\n gridView.trigger('didUpdate');\r\n };\r\n\r\n const toolbarEditor = getToolbarEditor({ overrideWith, toolbarConfig, updateToolbar });\r\n\r\n return {\r\n gridToolbarGroup: {\r\n toolbarNames: () => [],\r\n toolbarWithItem: () => toolbarEditor,\r\n toolbarWithName: () => toolbarEditor,\r\n hideAllToolbars: () => {\r\n resetVisibilityAndTriggerUpdate({\r\n forceHideToolbar: true,\r\n });\r\n },\r\n showAllToolbars: () => {\r\n resetVisibilityAndTriggerUpdate({\r\n forceHideToolbar: false,\r\n });\r\n\r\n if (_.isFunction(resetGraphVisibility)) {\r\n resetGraphVisibility();\r\n }\r\n },\r\n updateGridView: noop,\r\n remove: noop,\r\n },\r\n };\r\n }),\r\n };\r\n}\r\n","import { underlineLinkStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const bulkEditStyle = ({ palette = {} }) => ({\r\n '& .previewTable': {\r\n overflowY: 'scroll',\r\n margin: '5px 0 !important',\r\n maxHeight: 250,\r\n display: 'inline-block',\r\n minWidth: 500,\r\n width: 'auto !important',\r\n },\r\n '& .previewTable > table': {\r\n width: '100%',\r\n border: '1px solid #CCCCCC',\r\n },\r\n '& .bulk-edit-progress-bar': {\r\n maxWidth: 750,\r\n width: '50%',\r\n },\r\n '& .form-group .bulk-edit-currency': {\r\n fontWeight: 'normal',\r\n },\r\n '& .form-inline .bulkEdit-bid': {\r\n textAlign: 'right',\r\n width: '5em',\r\n },\r\n '& .bulkEdit-units': {\r\n marginLeft: 4,\r\n },\r\n '& .bulkEdit-limit-label': {\r\n marginRight: 16,\r\n paddingLeft: 40,\r\n },\r\n '& .bulkeditlink': {\r\n marginBottom: 5,\r\n ...underlineLinkStyle({ palette }),\r\n },\r\n '& .bulkeditdate': {\r\n marginBottom: 5,\r\n },\r\n '& .bulkedit-info-text': {\r\n marginBottom: 10,\r\n },\r\n});\r\n","export const upgradedUrlOverrideStyle = {\r\n '& .custom-params-template .custom-param-entry': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n '& .custom-params-template .custom-param-entry td': {\r\n display: 'flex',\r\n alignItems: 'baseline',\r\n },\r\n '& .custom-params-template .flex-row-fixed.custom-param__key-container': {\r\n display: 'flex',\r\n alignItems: 'baseline',\r\n },\r\n '& .custom-params-template .flex-row-fixed.custom-param__key-container .control-label': {\r\n whiteSpace: 'pre',\r\n },\r\n '& .custom-params-template .flex-row-fixed.custom-param__key-container input.form-control.custom-param__key-field': {\r\n margin: '0px 5px',\r\n },\r\n '& .custom-params-template .flex-row-dynamic input.form-control.custom-param__value-field': {\r\n marginLeft: '5px',\r\n },\r\n '& .custom-params-template .closeimage.custom-param__close-button': {\r\n height: '20px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n\r\n '&:before': {\r\n fontFamily: '\"MsAds MDL2 Assets\"',\r\n content: '\"\\\\E711\"',\r\n },\r\n },\r\n '& .custom-param__close-button': {\r\n marginLeft: 10,\r\n cursor: 'pointer',\r\n },\r\n};\r\n","export const getAutomatedRulesStyles = ({ palette, semanticColors }) => ({\r\n '& .automated-rules-vnext': {\r\n '& .different-user-warning.col-sm-10': {\r\n paddingLeft: 0,\r\n },\r\n '& .add-filter-button': {\r\n marginLeft: 0,\r\n },\r\n '& .predicate-list': {\r\n paddingLeft: 0,\r\n },\r\n '& .predicate-pill': {\r\n '&:hover': {\r\n background: `${palette.neutralPrimaryAlt} !important`,\r\n },\r\n },\r\n '& .predicate-pill-selected': {\r\n background: `${palette.themePrimary} !important`,\r\n\r\n '& .predicate-pill': {\r\n '&:hover': {\r\n background: `${palette.themeDark} !important`,\r\n },\r\n },\r\n '& .remove': {\r\n '&:hover': {\r\n background: `${palette.themeDark} !important`,\r\n },\r\n },\r\n },\r\n '& .predicate-pill-container': {\r\n background: palette.neutralSecondary,\r\n },\r\n '& .invalid-predicate-pill-container': {\r\n background: palette.red,\r\n },\r\n '& .icon-right.spritedimage.grid-expand-icon.pull-right': {\r\n border: '0 solid transparent',\r\n color: '#605e5c',\r\n display: 'inline-block',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n fontSize: '12px',\r\n fontWeight: 400,\r\n height: 'auto',\r\n margin: '0 4px',\r\n position: 'relative',\r\n float: 'right',\r\n width: 'auto',\r\n '&::before': {\r\n content: '\"\\\\E76C\"',\r\n },\r\n },\r\n '& .radio-inline + .radio-inline': {\r\n marginLeft: 16,\r\n },\r\n '& .error': {\r\n color: palette.red,\r\n },\r\n '& #AutomationRulesBidErrorMessage': {\r\n display: 'inline-block',\r\n marginLeft: '30px',\r\n },\r\n '& [data-bind*=\"isIncreaseBudgetHelp\"]': {\r\n display: 'inline-block',\r\n },\r\n '& input.search-box__input': {\r\n marginRight: '0px',\r\n },\r\n '& .search-box__icon.glyphicon.filter_search_icon_small:before': {\r\n content: '\"\\\\E721\"',\r\n },\r\n '& .search-box__icon.glyphicon.filter_search_icon_small': {\r\n position: 'absolute',\r\n top: '10px',\r\n right: '10px',\r\n color: '#0078d4',\r\n fontSize: '14px',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n '& .rule-preview-body': {\r\n '& .previewTable.grid': {\r\n paddingLeft: '0 !important',\r\n '& .grid-row': {\r\n height: 42,\r\n },\r\n },\r\n '& .grid-header-text': {\r\n lineHeight: '\\'19px\\'',\r\n color: palette.neutralPrimary,\r\n fontWeight: 'normal',\r\n },\r\n '& .grid-header-row': {\r\n height: 42,\r\n },\r\n '& tbody .grid-cell': {\r\n lineHeight: '\\'19px\\'',\r\n color: palette.themePrimary,\r\n },\r\n '& tbody .grid-cell + .grid-cell': {\r\n lineHeight: '\\'16px\\'',\r\n color: '#797775',\r\n },\r\n },\r\n '& .control-label': {\r\n textAlign: 'left !important',\r\n width: '100%',\r\n padding: '12px 0 13px 0',\r\n marginBottom: '16px',\r\n display: 'flex',\r\n fontWeight: 600,\r\n lineHeight: '19px',\r\n fontSize: '18px',\r\n '& label': {\r\n padding: 0,\r\n },\r\n '& span.action-text': {\r\n fontSize: '14px',\r\n fontWeight: 'normal',\r\n },\r\n },\r\n '& .panel-body': {\r\n width: '100%',\r\n '& > div:not([style=\"display: none;\"])': {\r\n marginTop: '16px',\r\n },\r\n '& > div.margin-zero': {\r\n marginTop: 0,\r\n },\r\n '& .form-group:last-child': {\r\n marginBottom: 0,\r\n },\r\n '& .form-group .formgroupline': {\r\n width: '787px !important',\r\n height: '1px',\r\n color: palette.neutralLight,\r\n borderTop: '1px solid',\r\n },\r\n },\r\n '& .rule-scope-options-selection': {\r\n paddingLeft: 0,\r\n },\r\n '& .rule-options-selection': {\r\n padding: '0',\r\n display: 'inline-block',\r\n verticalAlign: 'top',\r\n '& .form-text': {\r\n marginRight: 8,\r\n },\r\n '& .radio-inline': {\r\n paddingTop: '0',\r\n width: 94,\r\n display: 'inline-block',\r\n },\r\n '& input[type=\"radio\"]:checked': {\r\n W: 'none',\r\n M: 'none',\r\n appearance: 'none',\r\n display: 'inline-block',\r\n height: 18,\r\n width: 18,\r\n padding: 4,\r\n backgroundClip: 'content-box',\r\n border: `1px solid ${palette.themeDarkAlt}`,\r\n backgroundColor: palette.themeDarkAlt,\r\n borderRadius: '50%',\r\n },\r\n '& input[type=\"radio\"]': {\r\n W: 'none',\r\n M: 'none',\r\n appearance: 'none',\r\n display: 'inline-block',\r\n height: 18,\r\n width: 18,\r\n backgroundClip: 'content-box',\r\n border: `1px solid ${palette.neutralPrimary}`,\r\n backgroundColor: semanticColors.bodyBackground,\r\n borderRadius: '50%',\r\n },\r\n '& .radio-inline span': {\r\n marginLeft: 8,\r\n },\r\n '& .changeBudgetHelp': {\r\n display: 'contents',\r\n '& label': {\r\n display: 'contents',\r\n },\r\n },\r\n '& .k-datePicker-container': {\r\n padding: 0,\r\n '& .k-input': {\r\n border: 'none',\r\n height: 30,\r\n padding: '0px 0px 0px 8px',\r\n },\r\n },\r\n },\r\n '& select, & input': {\r\n marginRight: 8,\r\n },\r\n '& .bulk-edit-currency': {\r\n display: 'inline-block',\r\n },\r\n '& .bulkEdit-bid': {\r\n width: 106,\r\n },\r\n '& .predicate-row': {\r\n marginLeft: '0',\r\n paddingLeft: '0',\r\n },\r\n '& .rule-filter-selection': {\r\n marginLeft: '0',\r\n padding: '0',\r\n width: '100% !important',\r\n '& .glyphicon.glyphicon-remove': {\r\n marginTop: 6,\r\n color: palette.neutralSecondary,\r\n lineHeight: '12px',\r\n fontSize: 12,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n verticalAlign: 'middle',\r\n },\r\n '& .glyphicon-remove:before': {\r\n content: '\"\\\\E711\" !important',\r\n },\r\n '& .new': {\r\n color: palette.neutralPrimary,\r\n },\r\n '& .glyphicon.glyphicon-plus': {\r\n marginRight: 8,\r\n height: 14,\r\n width: 14,\r\n fontFamily: 'MsAds MDL2 Assets',\r\n color: palette.themePrimary,\r\n },\r\n '& .glyphicon-plus:before': {\r\n content: '\"\\\\E710\" !important',\r\n },\r\n '& .delivery-status-category-container:first-of-type': {\r\n float: 'left',\r\n marginLeft: '20px',\r\n display: 'inline-block',\r\n marginTop: 0,\r\n },\r\n\r\n '& .delivery-status-category-container + .delivery-status-category-container': {\r\n paddingLeft: 20,\r\n float: 'left',\r\n },\r\n '& .predicate-row': {\r\n alignItems: 'end',\r\n },\r\n },\r\n '& .frequency-selection': {\r\n display: 'inline-block',\r\n '& div[role=\"radiogroup\"]': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n '& #ImprovedAdScheduling_Display_Time_Label': {\r\n width: 'auto',\r\n paddingBottom: 0,\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","import { adColumnPreviewStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const getBulkEditOverrideStyle = ({ palette = {}, iconFontFamily = 'MsAds MDL2 Assets' }) => ({\r\n '& .campaigns-date-picker .radioInput .date': {\r\n marginRight: '5px',\r\n },\r\n '& select.form-control.custom-param__select': {\r\n marginBottom: '5px',\r\n },\r\n '& .bulkEdit-limit-label.checkbox-inline': {\r\n paddingTop: '0px',\r\n paddingBottom: '0px',\r\n },\r\n '& .control-label': {\r\n verticalAlign: 'middle',\r\n display: 'inline-block',\r\n\r\n '&.bulk-edit-currency': {\r\n paddingTop: '0px',\r\n paddingBottom: '0px',\r\n },\r\n '&#currencyLabel1': {\r\n paddingTop: '0px',\r\n },\r\n },\r\n '& span.control-label.not(#bulkedit-budget-label)': {\r\n paddingTop: '0px',\r\n },\r\n '& .infomark.spritedimage': {\r\n fontStyle: 'normal',\r\n fontSize: '16px',\r\n verticalAlign: 'middle',\r\n marginRight: '5px',\r\n\r\n '&:before': {\r\n fontFamily: iconFontFamily,\r\n content: '\"\\\\F167\"',\r\n },\r\n },\r\n '& .form-horizontal .form-group': {\r\n marginLeft: '0px',\r\n marginRight: '0px',\r\n },\r\n '& .previewTable': {\r\n padding: '15px',\r\n overflowY: 'auto',\r\n },\r\n '& .previewTable > table': {\r\n borderLeft: 'none',\r\n borderRight: 'none',\r\n },\r\n '& .previewTable > table td, & .previewTable > table th': {\r\n border: '1px solid',\r\n borderColor: palette.neutralLighter,\r\n borderLeft: 'none',\r\n height: '44px',\r\n padding: '0px 8px',\r\n },\r\n '& .previewTable > table tr td:last-child, & .previewTable > table tr th:last-child': {\r\n borderRight: 'none',\r\n },\r\n '& .previewTable > table tr td': {\r\n color: ' #797775',\r\n fontSize: '12px',\r\n },\r\n '& .previewTable > table tr th a': {\r\n color: palette.neutralPrimary,\r\n fontWeight: 'normal',\r\n cursor: 'unset',\r\n },\r\n '& label > input[type=\"radio\"]': {\r\n marginRight: '5px',\r\n position: 'relative',\r\n },\r\n '& .campaigns-date-picker input[type=\"radio\"]': {\r\n position: 'relative',\r\n },\r\n '& .campaigns-date-picker .radioInput label': {\r\n display: 'inline-block',\r\n },\r\n '& .campaigns-date-picker .radioInput': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n '& .nodate, & .date': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n },\r\n '& .form-inline .form-control, & .form-inline .form-text': {\r\n marginRight: '10px',\r\n },\r\n '& .font-error': {\r\n color: palette.redDark,\r\n },\r\n '& .error': {\r\n color: palette.redDark,\r\n },\r\n '& input.btn, & button.btn': {\r\n marginRight: '8px',\r\n },\r\n // bulk edit bid strategy type\r\n '& .bid-strategy-container label': {\r\n display: 'inline-block',\r\n },\r\n '& [data-bind=\"visible: checkCPC\"] > .row': {\r\n marginLeft: '0px',\r\n },\r\n '& [data-bind=\"visible: showCPC\"]': {\r\n '& > label, & > a[type=\"helppopup\"]': {\r\n display: 'inline-block',\r\n },\r\n },\r\n '& .builkEdit-bid.custom-param__key-field, & .target-impression-share-percent-field.custom-param__key-field': {\r\n display: 'inline-block',\r\n marginLeft: 5,\r\n marginRight: 5,\r\n width: 85,\r\n },\r\n '& .grid-content-container': {\r\n fontSize: 14,\r\n lineHeight: '19px',\r\n color: palette.neutralPrimary,\r\n // Bulk change ads.\r\n ...adColumnPreviewStyle(),\r\n },\r\n '& .grid-content-container .previewAd': {\r\n border: '1px solid #ccc',\r\n padding: 5,\r\n margin: [5, 0, 5, 0],\r\n },\r\n '& .grid-content-container .previewAd .previewTitleAd + div + div, & .grid-content-container .previewAd .moreHint + div + span': {\r\n color: '#767676',\r\n },\r\n '& .panel > .panel-body > .form-group': {\r\n '& > .rsa-headlines, & > .rsa-descriptions, & > .mma-headlines, & > .mma-descriptions': {\r\n width: '100%',\r\n paddingLeft: 0,\r\n paddingRight: 0,\r\n '& .glyphicon-pushpin, & .glyphicon-plus': {\r\n color: palette.themePrimary,\r\n fontFamily: iconFontFamily,\r\n },\r\n '& .glyphicon-pushpin:before': {\r\n content: '\"\\\\E840\"',\r\n },\r\n '& .glyphicon-plus:before': {\r\n content: '\"\\\\E710\"',\r\n marginRight: 8,\r\n },\r\n '& .form-group': {\r\n margin: 0,\r\n },\r\n '& .control-label': {\r\n width: '16.66666667%',\r\n '& > label': {\r\n display: 'inline-block',\r\n },\r\n '& > helpbutton': {\r\n display: 'inline-block',\r\n },\r\n },\r\n '& .ad-rsa-filed-group': {\r\n width: '41.666666667%',\r\n '& > .form-control.text': {\r\n width: '90%',\r\n display: 'inline-block',\r\n },\r\n '& > .ad-rsa-pin-group': {\r\n display: 'inline-flex',\r\n width: '10%',\r\n '& > .ad-field-position': {\r\n display: 'inline',\r\n paddingLeft: 12,\r\n '& > .glyphicon-pushpin': {\r\n display: 'inline',\r\n },\r\n '& > .ad-pinned': {\r\n display: 'inline',\r\n paddingLeft: 8,\r\n color: palette.neutralPrimary,\r\n wordBreak: 'keep-all',\r\n },\r\n },\r\n },\r\n '& > .clearfix': {\r\n marginRight: '10%',\r\n textAlign: 'right',\r\n marginBottom: 11,\r\n },\r\n },\r\n '& .ad-rsa-add-headline, & .ad-rsa-add-description': {\r\n marginLeft: '16.66666667%',\r\n paddingLeft: 15,\r\n color: palette.neutralPrimary,\r\n },\r\n '& .ad-rsa-add-headline.disabled, & .ad-rsa-add-description.disabled': {\r\n color: palette.neutralTertiary,\r\n paddingLeft: 15,\r\n cursor: 'default',\r\n '& .glyphicon-plus': {\r\n color: palette.neutralTertiary,\r\n },\r\n },\r\n },\r\n },\r\n // Bulk appeal.\r\n '& .bulk-appeal .editor .form-horizontal': {\r\n margin: 0,\r\n maxWidth: 784,\r\n border: 0,\r\n boxShadow: 'none',\r\n '& .form-group': {\r\n margin: '0px 0px 18px 0px',\r\n '& .root': {\r\n margin: 0,\r\n padding: 0,\r\n '& > label': {\r\n padding: 0,\r\n },\r\n '& .title': {\r\n fontWeight: 'normal',\r\n },\r\n '& .details': {\r\n margin: '27px 0px 0px 0px',\r\n padding: 0,\r\n '& .col-sm-4': {\r\n padding: '0px 0px 0px 1px',\r\n width: '50%',\r\n '& .appeal-column-title': {\r\n fontSize: 18,\r\n lineHeight: '24px',\r\n fontWeight: 'normal',\r\n },\r\n '& .reasons > ul': {\r\n margin: '1px 0px 0px 0px',\r\n '& > li': {\r\n marginTop: '10px',\r\n },\r\n },\r\n },\r\n '& .col-sm-8': {\r\n width: '50%',\r\n paddingLeft: 14,\r\n paddingRight: 0,\r\n '& .appeal-column-title': {\r\n fontSize: 14,\r\n lineHeight: '19px',\r\n fontWeight: 600,\r\n },\r\n '& .appeal-textarea': {\r\n marginTop: 7,\r\n padding: 8,\r\n fontSize: 14,\r\n lineHeight: '19px',\r\n border: `1px solid ${palette.neutralSecondary}`,\r\n borderRadius: '2px',\r\n background: '#FFFFFF',\r\n width: '100%',\r\n },\r\n '& .remaining-hint': {\r\n textAlign: 'right',\r\n marginTop: 3,\r\n marginBottom: 3,\r\n fontSize: 12,\r\n lineHeight: '16px',\r\n },\r\n },\r\n },\r\n '& .non-appeal-msg-panel': {\r\n margin: '11px 0px 0px 1px',\r\n },\r\n },\r\n },\r\n },\r\n '& .rsa-auto-assets-setting-container': {\r\n '& .checkbox-inline': {\r\n width: '100%',\r\n '& input': {\r\n float: 'left',\r\n bottom: '0',\r\n },\r\n },\r\n '& .HelpTopic': {\r\n marginLeft: 5,\r\n },\r\n },\r\n '& #status-label': {\r\n color: '#0A610A',\r\n backgroundColor: '#DFF6DD',\r\n fontWeight: 600,\r\n fontSize: 12,\r\n border: 4,\r\n paddingInline: 5,\r\n paddingTop: 2,\r\n paddingBottom: 2,\r\n paddingLeft: 2,\r\n paddingRight: 2,\r\n verticalAlign: 'middle',\r\n borderRadius: 4,\r\n marginLeft: 8,\r\n },\r\n});\r\n","import { getInlineDownloadStyle as sharedStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const getInlineDownloadStyle = sharedStyle;\r\n","export const pasteStyle = {\r\n '& .copy-paste-container': {\r\n '& .form-group': {\r\n padding: 0,\r\n margin: 0,\r\n '& ul': {\r\n marginBottom: 0,\r\n '& .checkbox': {\r\n paddingTop: 0,\r\n '& label': {\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n },\r\n },\r\n },\r\n '& .copyPaste-radio-topBottomPadding': {\r\n margin: {\r\n top: 3,\r\n bottom: 3,\r\n },\r\n },\r\n '& .date-picker-within-radio': {\r\n margin: {\r\n top: -6,\r\n bottom: -4,\r\n left: -15,\r\n },\r\n },\r\n '& .copyPaste-radio-label': {\r\n margin: {\r\n top: 4,\r\n right: -9,\r\n },\r\n },\r\n '& .col-sm-1': {\r\n width: 100,\r\n },\r\n '& .col-sm-2': {\r\n width: 140,\r\n },\r\n },\r\n },\r\n};\r\n","import { datePickerStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { ComponentSettings } from '@bingads-webui-theme-2018/theme-fluent';\r\n\r\nimport { bulkEditStyle } from './bulk-edit-style';\r\nimport { upgradedUrlOverrideStyle } from './upgraded-url-override-style';\r\nimport { getAutomatedRulesStyles } from './automated-rules-style';\r\nimport { getBulkEditOverrideStyle } from './bulk-edit-override-style';\r\nimport { getInlineDownloadStyle } from './inline-download-style';\r\nimport { pasteStyle } from './paste-style';\r\n\r\nconst {\r\n columnChooserStyle,\r\n getColumnChooserOverrideStyle,\r\n filterEditorStyle,\r\n getFilterEditorOverrideStyle,\r\n getTopGridPanelCommonStyle,\r\n} = ComponentSettings;\r\n\r\nexport const getTopGridPanelDefaultStyles = (_, {\r\n palette = {},\r\n semanticColors = {},\r\n spacing = {},\r\n}) => ({\r\n // Don't inject to global\r\n topGridPanelDefaultStyles: Object.assign(\r\n {},\r\n {\r\n // make sure we don't occupy any vertical space when panel is hidden\r\n padding: '0px',\r\n margin: '0px',\r\n minWidth: '1000px',\r\n maxWidth: '1500px',\r\n position: 'relative',\r\n zIndex: 1,\r\n\r\n '&:focus': {\r\n outline: 'none',\r\n },\r\n // Styles for panel itself\r\n ...getTopGridPanelCommonStyle({ palette }),\r\n\r\n '& .warn.warn-info.form-group': {\r\n padding: 8,\r\n background: '#FFF4CE',\r\n marginBottom: '5px',\r\n fontSize: '12px',\r\n width: '450px',\r\n\r\n '& .warn-image': {\r\n color: '#D83B01',\r\n fontSize: '16px !important',\r\n float: 'left',\r\n paddingRight: '5px',\r\n },\r\n },\r\n },\r\n // Styles for each of the panel contents\r\n bulkEditStyle({ palette }),\r\n getBulkEditOverrideStyle({ palette }),\r\n upgradedUrlOverrideStyle,\r\n getAutomatedRulesStyles({ palette, semanticColors, spacing }),\r\n columnChooserStyle,\r\n getColumnChooserOverrideStyle(palette),\r\n filterEditorStyle,\r\n getFilterEditorOverrideStyle(palette),\r\n getInlineDownloadStyle({ palette }),\r\n pasteStyle\r\n ),\r\n '@global': Object.assign(\r\n {},\r\n datePickerStyle({ palette })\r\n ),\r\n});\r\n\r\n","/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport $ from 'jquery';\r\nimport { filter } from 'underscore';\r\n\r\nimport { BackboneInstanceWrapper } from '@bingads-webui-react/backbone-instance-wrapper';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getTabbableNodes, addDataFocus } from '@bingads-webui-react/focus-lock';\r\n\r\nimport { getTopGridPanelDefaultStyles } from './panel-styles';\r\n\r\nclass TopGridPanelUnStyled extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n this.rootRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (this.rootRef && this.rootRef.current) {\r\n // filter the not visible element out which may due to parent display property\r\n const tabbableNode = filter(getTabbableNodes(this.rootRef.current), item => $(item).is(':visible'));\r\n\r\n if (tabbableNode && tabbableNode.length > 0) {\r\n tabbableNode[0].focus({\r\n preventScroll: true,\r\n });\r\n }\r\n addDataFocus(this.rootRef.current);\r\n }\r\n }\r\n\r\n render() {\r\n let panelContent = (null);\r\n const {\r\n panelView, customClasses, classes,\r\n } = this.props;\r\n\r\n if (panelView) {\r\n if (React.isValidElement(panelView)) {\r\n panelContent = panelView;\r\n } else {\r\n panelContent = (\r\n \r\n );\r\n }\r\n }\r\n\r\n return (\r\n
\r\n {panelContent}\r\n
\r\n );\r\n }\r\n}\r\n\r\nTopGridPanelUnStyled.propTypes = {\r\n panelView: PropTypes.shape({\r\n render: PropTypes.func,\r\n }),\r\n classes: PropTypes.shape({\r\n topGridPanelDefaultStyles: PropTypes.string.isRequired,\r\n }).isRequired,\r\n customClasses: PropTypes.object, // eslint-disable-line\r\n};\r\n\r\nTopGridPanelUnStyled.defaultProps = {\r\n panelView: null,\r\n customClasses: {},\r\n};\r\n\r\nexport const TopGridPanel = withDefaultStyles(\r\n TopGridPanelUnStyled,\r\n getTopGridPanelDefaultStyles\r\n);\r\n","import React, { useContext } from 'react';\r\nimport { chain, size, sortBy, omit, isEmpty, keys, difference } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { Target } from '@bingads-webui-react/dimensions-target';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport computerIcon from './styles/media/desktop.svg';\r\nimport tabletIcon from './styles/media/tablet.svg';\r\nimport smartphoneIcon from './styles/media/mobile.svg';\r\nimport connectedTVIcon from './styles/media/ctv.svg';\r\n\r\nexport const DeviceKeys = {\r\n Computers: 'Computers',\r\n Tablets: 'Tablets',\r\n Smartphones: 'Smartphones',\r\n ConnectedTVs: 'ConnectedTVs',\r\n};\r\n\r\nexport const Devices = {\r\n [DeviceKeys.Computers]: _TL_('Desktop'),\r\n [DeviceKeys.Tablets]: _TL_('Tablet'),\r\n [DeviceKeys.Smartphones]: _TL_('Mobile'),\r\n [DeviceKeys.ConnectedTVs]: _TL_('CTV'),\r\n};\r\n\r\nexport const BidStrategyToDevices = {\r\n ManualCpm: [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones],\r\n ManualCpv: [DeviceKeys.ConnectedTVs],\r\n};\r\n\r\nconst sortDevices = devices => sortBy(devices, device => Devices[device]);\r\nconst iconStyle = {\r\n width: 32,\r\n height: 32,\r\n backgroundSize: 'contain',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundPosition: 'center',\r\n};\r\n\r\nconst containerStyle = {\r\n width: 96,\r\n height: 96,\r\n border: '1px solid #E1DFDD',\r\n borderRadius: '4px',\r\n\r\n '&.is-checked': {\r\n border: '1px solid #0078D4',\r\n '&:hover': {\r\n border: '1px solid #005A9E',\r\n },\r\n },\r\n\r\n '&:hover': {\r\n border: '1px solid #323130',\r\n },\r\n\r\n '& input[type=\"checkbox\"]': {\r\n width: '100%',\r\n },\r\n\r\n '& label': {\r\n padding: 0,\r\n flex: 1,\r\n alignSelf: 'stretch',\r\n },\r\n};\r\n\r\nconst getStyle = () => ({\r\n computer: {\r\n ...containerStyle,\r\n '& .icon': {\r\n backgroundImage: `url(\"${computerIcon}\")`,\r\n ...iconStyle,\r\n },\r\n },\r\n tablet: {\r\n ...containerStyle,\r\n '& .icon': {\r\n backgroundImage: `url(\"${tabletIcon}\")`,\r\n ...iconStyle,\r\n },\r\n },\r\n smartphones: {\r\n ...containerStyle,\r\n '& .icon': {\r\n backgroundImage: `url(\"${smartphoneIcon}\")`,\r\n ...iconStyle,\r\n },\r\n },\r\n connectedTVs: {\r\n ...containerStyle,\r\n '& .icon': {\r\n backgroundImage: `url(\"${connectedTVIcon}\")`,\r\n ...iconStyle,\r\n },\r\n },\r\n iconContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n },\r\n pickerContainer: {\r\n '& div.dimensions': {\r\n display: 'flex',\r\n gap: '4px',\r\n margin: '3px 0 3px 3px',\r\n '&>span.fui-Checkbox': {\r\n flexDirection: 'column',\r\n\r\n '& .fui-Checkbox__indicator': {\r\n alignSelf: 'flex-end',\r\n margin: '4px',\r\n },\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const formatDevice = (device, i18n) => (Devices[device] ? i18n.getString(Devices[device]) : device);\r\n\r\nexport const formatDevices = ({ devices, i18n, isCTVSupported }) => {\r\n if ((isCTVSupported && size(devices) === size(Devices)) ||\r\n (!isCTVSupported && size(devices) === size(Devices) - 1)\r\n ) {\r\n return i18n.getString(_TL_('All devices'));\r\n }\r\n\r\n return chain(sortDevices(devices))\r\n .map(device => formatDevice(device, i18n))\r\n .join(i18n.getString(_TL_(', ')))\r\n .value();\r\n};\r\n\r\nexport const getDeviceDetails = (devices, isCTVSupported, i18n) => {\r\n if (isEmpty(devices)) {\r\n return '';\r\n }\r\n\r\n if ((!isCTVSupported && devices.length === 3) || (isCTVSupported && devices.length === 4)) {\r\n return i18n.getString(_TL_('Targeting: All devices'));\r\n }\r\n\r\n const formattedDevices = devices.map(device => Devices[device] || device).join(i18n.getString(_TL_(', ')));\r\n\r\n return i18n.getString(_TL_('{{formattedDevices}}'), { formattedDevices });\r\n};\r\n\r\nexport const Device = ({\r\n i18n,\r\n devices,\r\n deviceRestrictions,\r\n isCTVSupported,\r\n hideDeselectAll,\r\n validationPropsField,\r\n defaultSelectAll,\r\n}) => {\r\n const classes = useDefaultStyles(getStyle);\r\n const activity = useContext(ActivityContext);\r\n const supportedDevices = isCTVSupported ? Devices : omit(Devices, DeviceKeys.ConnectedTVs);\r\n const isAnyDeviceSupported = isEmpty(difference(keys(supportedDevices), deviceRestrictions));\r\n\r\n return ( {\r\n const { label } = options;\r\n\r\n return (\r\n
\r\n
\r\n
{label}
\r\n
\r\n );\r\n }}\r\n defaultSelectAll={defaultSelectAll}\r\n />);\r\n};\r\n\r\nDevice.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n devices: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n deviceRestrictions: PropTypes.arrayOf(PropTypes.string),\r\n isCTVSupported: PropTypes.bool,\r\n hideDeselectAll: PropTypes.bool,\r\n validationPropsField: PropTypes.string,\r\n defaultSelectAll: PropTypes.bool,\r\n};\r\n\r\nDevice.defaultProps = {\r\n deviceRestrictions: [],\r\n isCTVSupported: true,\r\n hideDeselectAll: true,\r\n validationPropsField: 'deviceTypes',\r\n defaultSelectAll: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { chain, size, sortBy } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Target as TargetInternal } from '@bingads-webui-react/dimensions-target';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\n\r\nconst Target = withControlErrorHandling(TargetInternal);\r\n\r\nconst GendersWithoutUnknown = {\r\n Female: _TL_('Female'),\r\n Male: _TL_('Male'),\r\n};\r\n\r\nexport const Genders = {\r\n ...GendersWithoutUnknown,\r\n Unknown: _TL_('Unknown'),\r\n};\r\n\r\nconst sortGenders = genders => sortBy(genders, gender => Genders[gender]);\r\n\r\nexport const formatGender = (gender, i18n) => (Genders[gender] ? i18n.getString(Genders[gender]) : gender);\r\n\r\nexport const formatGenders = (genders, i18n) => {\r\n if (size(genders) === size(Genders)) {\r\n return i18n.getString(_TL_('Targeting: All genders'));\r\n }\r\n\r\n return chain(sortGenders(genders))\r\n .map(gender => formatGender(gender, i18n))\r\n .join(i18n.getString(_TL_(', ')))\r\n .value();\r\n};\r\n\r\nexport const Gender = ({ i18n, genders, hideUnknown }) => {\r\n const activity = useContext(ActivityContext);\r\n\r\n return (\r\n );\r\n};\r\n\r\nGender.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n genders: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { chain, size, sortBy } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Target as TargetInternal } from '@bingads-webui-react/dimensions-target';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst Target = withControlErrorHandling(TargetInternal);\r\n\r\nexport const AgeRanges = {\r\n EighteenToTwentyFive: _TL_('18-24'),\r\n TwentyFiveToThirtyFive: _TL_('25-34'),\r\n ThirtyFiveToFifty: _TL_('35-49'),\r\n FiftyToSixtyFive: _TL_('50-64'),\r\n SixtyFiveAndAbove: _TL_('65+'),\r\n Unknown: _TL_('Unknown'),\r\n};\r\n\r\nexport const AgeRangesCampaignToAdInsight = {\r\n EighteenToTwentyFive: 'EighteenToTwentyFour',\r\n TwentyFiveToThirtyFive: 'TwentyFiveToThirtyFour',\r\n ThirtyFiveToFifty: 'ThirtyFiveToFourtyNine',\r\n FiftyToSixtyFive: 'FiftyToSixtyFour',\r\n SixtyFiveAndAbove: 'SixtyFiveAndAbove',\r\n Unknown: _TL_('Unknown'),\r\n};\r\n\r\nconst sortAgeRanges = ageRanges => sortBy(ageRanges, ageRange => AgeRanges[ageRange]);\r\n\r\nexport const formatAgeRange = (ageRange, i18n) => (AgeRanges[ageRange] ? i18n.getString(AgeRanges[ageRange]) : ageRange);\r\n\r\nexport const formatAgeRanges = (ageRanges, i18n) => {\r\n if (size(ageRanges) === size(AgeRanges)) {\r\n return i18n.getString(_TL_('Targeting: All ages'));\r\n }\r\n\r\n return chain(sortAgeRanges(ageRanges))\r\n .map(ageRange => formatAgeRange(ageRange, i18n))\r\n .join(i18n.getString(_TL_(', ')))\r\n .value();\r\n};\r\n\r\nexport const AgeRange = ({ i18n, ageRanges }) => {\r\n const activity = useContext(ActivityContext);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nAgeRange.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n ageRanges: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n","import { ceil } from 'lodash';\r\nimport { generateNameSuggestionSuffix } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { xandrVideoCampaignTypes } from '@bingads-webui-campaign-react/campaign-adgroup-creation';\r\nimport { getBudgetRange, MinXandrDailyBudgetRangePerCurrency } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\nimport { CampaignSubTypeMapping } from '@bingads-webui-campaign-react/constants';\r\nimport { getConvertedCurrencyDealMinimumBid, getAccountExchangeRateFromLocalStorage } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { Devices } from '../steps/ad-group/target/device';\r\nimport { Genders } from '../steps/ad-group/target/gender';\r\nimport { AgeRanges } from '../steps/ad-group/target/age-range';\r\n\r\nexport const STEP_PATHS = {\r\n CAMPAIGN_SETTINGS: 'CAMPAIGN_SETTINGS',\r\n AD_GROUP: 'AD_GROUP',\r\n ADS: 'ADS',\r\n};\r\n\r\nexport const ScenarioName = {\r\n XandrVideoCampaignCreation: 'XandrVideoCampaignCreation',\r\n XandrVideoAdGroupCreation: 'XandrVideoAdGroupCreation',\r\n XandrVideoCampaignSettings: 'XandrVideoCampaignSettings',\r\n XandrVideoAdGroupSettings: 'XandrVideoAdGroupSettings',\r\n XandrVideoAdsCreation: 'XandrVideoAdsCreation',\r\n};\r\n\r\nexport const StepLoadingStatus = {\r\n loading: 'loading',\r\n ready: 'ready',\r\n failed: 'failed',\r\n};\r\n\r\nconst getDefaultBudget = (currencyCode) => {\r\n if (MinXandrDailyBudgetRangePerCurrency[currencyCode]) {\r\n return MinXandrDailyBudgetRangePerCurrency[currencyCode];\r\n }\r\n const budget = getBudgetRange(currencyCode);\r\n\r\n return budget.Daily.Default;\r\n};\r\n\r\nconst getInitialCampaignData = (i18n, currencyCode, { xandrVideoDeal, xandrVideoCampaignType, isDisplayAds, serverContext }) => {\r\n let biddingSchemeType = (xandrVideoCampaignType === xandrVideoCampaignTypes.xandrVideoWeb || isDisplayAds) ? 'ManualCpm' : 'ManualCpv';\r\n let dealMinimumBid;\r\n\r\n if (xandrVideoDeal) {\r\n biddingSchemeType = 'ManualCpm';\r\n if (serverContext) {\r\n const exchangeRateMapping = getAccountExchangeRateFromLocalStorage(serverContext);\r\n dealMinimumBid = getConvertedCurrencyDealMinimumBid(xandrVideoDeal.MinimumBid, xandrVideoDeal.Currency, currencyCode, exchangeRateMapping.val);\r\n }\r\n }\r\n\r\n let campaignNamePrefix;\r\n if (isDisplayAds) {\r\n campaignNamePrefix = _TL_('Display ads');\r\n } else {\r\n campaignNamePrefix = _TL_('Video views campaign');\r\n }\r\n\r\n return {\r\n Status: 'Active',\r\n Name: generateNameSuggestionSuffix(i18n.getString(campaignNamePrefix)),\r\n Budget: {\r\n Amount: dealMinimumBid ? ceil(dealMinimumBid * 10, 2) : getDefaultBudget(currencyCode),\r\n Type: 'DailyStandard',\r\n },\r\n Languages: ['All'],\r\n BiddingScheme: {\r\n Type: biddingSchemeType,\r\n },\r\n Target: xandrVideoDeal && xandrVideoDeal.Id,\r\n CampaignSubType: isDisplayAds ? CampaignSubTypeMapping.DisplayAds : CampaignSubTypeMapping.BrandAwarenessVideoAds,\r\n CampaignType: 'Audience',\r\n };\r\n};\r\n\r\nexport const getInitialCampaignViewModel = (i18n, currencyCode, options) => ({\r\n data: getInitialCampaignData(i18n, currencyCode, options),\r\n isValid: true,\r\n isDirty: true,\r\n});\r\n\r\nexport const AddedDeviceBidAdjustment = 0;\r\nexport const RemovedDeviceBidAdjustment = -100;\r\n\r\nexport const AdGroupNegativeReferenceId = -111;\r\n\r\nexport const getInitialAdGroupData = ({ i18n, deviceTypes, dealMinimumBid }) => ({\r\n Status: 'Active',\r\n StartDate: new Date(),\r\n Name: generateNameSuggestionSuffix(i18n.getString(_TL_('Ad group'))),\r\n locationTargets: {\r\n bidMode: false,\r\n currentLevelSettings: {\r\n initLocations: [],\r\n peopleInLocation: true,\r\n peopleSearchingForLocation: true,\r\n targetOption: 'everywhere',\r\n },\r\n parentLevelSettings: {},\r\n useParentLevel: false,\r\n },\r\n adSchedules: {\r\n adScheduleUseSearcherTimeZone: undefined,\r\n dayTimeRanges: [],\r\n timeZone: undefined,\r\n },\r\n deviceTypes,\r\n initialDeviceTypes: Object.keys(Devices).map(device => ({\r\n criterion: device,\r\n bidAdjustment: RemovedDeviceBidAdjustment,\r\n })),\r\n ageRanges: Object.keys(AgeRanges),\r\n initialAgeRanges: [],\r\n genderTypes: Object.keys(Genders),\r\n initialGenderTypes: [],\r\n audiences: [],\r\n initialAudiences: [],\r\n FrequencyCapSettings: [{}],\r\n genreTargets: [],\r\n initialGenreTargets: [],\r\n CpmBid: dealMinimumBid,\r\n});\r\n\r\nexport const getInitialAdGroupViewModel = ({ i18n, deviceTypes, dealMinimumBid }) => ({\r\n data: getInitialAdGroupData({ i18n, deviceTypes, dealMinimumBid }),\r\n isValid: false,\r\n isDirty: false,\r\n});\r\n","import { locationTargetsOptionKeys } from '@bingads-webui-campaign-react/wizard-shared-components';\r\n\r\nimport {\r\n shouldSelectBundleOption,\r\n getLocationIntent\r\n} from '@bingads-webui-campaign/hotel-common-targets';\r\nimport { getSelectionFromCriterions } from '@bingads-webui-campaign-react/boost-contextual-target';\r\nimport { RemovedDeviceBidAdjustment } from '../common/constants';\r\n\r\nexport const CRITERION_LEVEL = {\r\n AD_GROUP: 'adGroup',\r\n CAMPAIGN: 'campaign',\r\n};\r\n\r\nexport const modelToViewModelForTargetCriterions = ({\r\n model,\r\n level = CRITERION_LEVEL.AD_GROUP,\r\n campaignDeviceCriterions = [],\r\n}) => {\r\n let positiveOdataType = '';\r\n let negativeOdateType = '';\r\n\r\n if (level === CRITERION_LEVEL.CAMPAIGN) {\r\n positiveOdataType = '#Model.BiddableCampaignCriterion';\r\n negativeOdateType = '#Model.NegativeCampaignCriterion';\r\n } else {\r\n positiveOdataType = '#Model.BiddableAdGroupCriterion';\r\n negativeOdateType = '#Model.NegativeAdGroupCriterion';\r\n }\r\n\r\n const initialDeviceTypes = model.filter(criterion => criterion.Criterion.Type === 'Device')\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.DeviceName,\r\n bidAdjustment: criterion.CriterionBid.Multiplier,\r\n }));\r\n\r\n const initialAgeRanges = model.filter(criterion => criterion.Criterion.Type === 'Age' && criterion['@odata.type'] === positiveOdataType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.AgeRange,\r\n bidAdjustment: criterion.CriterionBid.Multiplier,\r\n }));\r\n const negativeAgeRanges = model.filter(criterion => criterion.Criterion.Type === 'Age' && criterion['@odata.type'] === negativeOdateType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.AgeRange,\r\n }));\r\n\r\n const initialGenderTypes = model.filter(criterion => criterion.Criterion.Type === 'Gender' && criterion['@odata.type'] === positiveOdataType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.GenderType,\r\n bidAdjustment: criterion.CriterionBid.Multiplier,\r\n }));\r\n const negativeGenderTYpes = model.filter(criterion => criterion.Criterion.Type === 'Gender' && criterion['@odata.type'] === negativeOdateType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.GenderType,\r\n }));\r\n\r\n const initialGenreTargets = model.filter(criterion => criterion.Criterion.Type === 'Genre' && criterion['@odata.type'] === positiveOdataType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.GenreId,\r\n }));\r\n\r\n const initialIndustryTargets = model.filter(criterion => criterion.Criterion.Type === 'Industry' && criterion['@odata.type'] === positiveOdataType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.ProfileId,\r\n BidAdjustment: criterion.CriterionBid.Multiplier,\r\n }));\r\n\r\n const initialNegativeIndustryTargets = model.filter(criterion => criterion.Criterion.Type === 'Industry' && criterion['@odata.type'] === negativeOdateType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.ProfileId,\r\n }));\r\n\r\n const initialJobTargets = model.filter(criterion => criterion.Criterion.Type === 'JobFunction' && criterion['@odata.type'] === positiveOdataType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.ProfileId,\r\n BidAdjustment: criterion.CriterionBid.Multiplier,\r\n }));\r\n\r\n const initialNegativeJobTargets = model.filter(criterion => criterion.Criterion.Type === 'JobFunction' && criterion['@odata.type'] === negativeOdateType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.ProfileId,\r\n }));\r\n\r\n const initialCompanyNameTargets = model.filter(criterion => criterion.Criterion.Type === 'CompanyName' && criterion['@odata.type'] === positiveOdataType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n Target: criterion.Criterion.ProfileId,\r\n Size: criterion.Criterion.Size,\r\n Industry: criterion.Criterion.Industry,\r\n Name: criterion.Criterion.CompanyName,\r\n BidAdjustment: criterion.CriterionBid.Multiplier,\r\n }));\r\n\r\n const initialNegativeCompanyNameTargets = model.filter(criterion => criterion.Criterion.Type === 'CompanyName' && criterion['@odata.type'] === negativeOdateType)\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n Target: criterion.Criterion.ProfileId,\r\n Size: criterion.Criterion.Size,\r\n Industry: criterion.Criterion.Industry,\r\n Name: criterion.Criterion.CompanyName,\r\n }));\r\n\r\n const initialContextualTargets = getSelectionFromCriterions(model.filter(criterion => criterion.Criterion.Type === 'ContextualTargetType'));\r\n\r\n const initialCampaignLevelDeviceTargets = campaignDeviceCriterions.filter(criterion => criterion.Criterion.Type === 'Device')\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.DeviceName,\r\n bidAdjustment: criterion.CriterionBid.Multiplier,\r\n }));\r\n\r\n const deviceTypes = initialDeviceTypes.filter(device => device.bidAdjustment !== RemovedDeviceBidAdjustment && device.bidAdjustment !== undefined).map(criterion => criterion.criterion);\r\n const campaignLevelDeviceTargets = initialCampaignLevelDeviceTargets.filter(device => device.bidAdjustment !== RemovedDeviceBidAdjustment && device.bidAdjustment !== undefined).map(criterion => criterion.criterion);\r\n\r\n return {\r\n initialDeviceTypes,\r\n deviceTypes,\r\n initialCampaignLevelDeviceTargets,\r\n campaignLevelDeviceTargets,\r\n initialAgeRanges,\r\n ageRanges: initialAgeRanges.map(criterion => criterion.criterion),\r\n initialGenderTypes,\r\n genderTypes: initialGenderTypes.map(criterion => criterion.criterion),\r\n negativeAgeRanges,\r\n negativeGenderTYpes,\r\n initialGenreTargets,\r\n genreTargets: initialGenreTargets.map(criterion => criterion.criterion),\r\n initialIndustryTargets,\r\n industry: initialIndustryTargets.map(criterion => criterion.criterion),\r\n initialNegativeIndustryTargets,\r\n negativeIndustry: initialNegativeIndustryTargets.map(criterion => criterion.criterion),\r\n initialJobTargets,\r\n jobTargets: initialJobTargets.map(criterion => criterion.criterion),\r\n initialNegativeJobTargets,\r\n negativeJobTargets: initialNegativeJobTargets.map(criterion => criterion.criterion),\r\n initialCompanyNameTargets,\r\n companyNameTargets: initialCompanyNameTargets,\r\n initialNegativeCompanyNameTargets,\r\n negativeCompanyNameTargets: initialNegativeCompanyNameTargets,\r\n initialContextualTargets,\r\n contextualTargets: initialContextualTargets,\r\n deviceTargetingCampaignLevel: deviceTypes.length === 0 || initialDeviceTypes === 0,\r\n };\r\n};\r\n\r\nexport const bulkModelToViewModelForLocationTargetsBase = ({\r\n locationTargetsModel, bundleCountries, level = CRITERION_LEVEL.AD_GROUP,\r\n}) => {\r\n const locations = locationTargetsModel\r\n .filter(criterion => criterion.Criterion.Type === 'Radius' || criterion.Criterion.Type === 'Location');\r\n const intent = locationTargetsModel.find(criterion => criterion.Criterion.Type === 'LocationIntentCriterion');\r\n const intentId = intent ? intent.Id : null;\r\n const intentOption = intent ? getLocationIntent(intent.Criterion.LocationIntentCriterion.IntentOption) : null;\r\n let targetOption = locations.length ? locationTargetsOptionKeys.specific : locationTargetsOptionKeys.everywhere;\r\n targetOption = shouldSelectBundleOption(bundleCountries, locations) ? locationTargetsOptionKeys.bundleOrDefaultMarket : targetOption;\r\n\r\n const useParentLevel = level === CRITERION_LEVEL.CAMPAIGN ? false : locations.length === 0;\r\n\r\n return {\r\n locationTargets: {\r\n currentLevelSettings: {\r\n initLocations: locations,\r\n currentLocations: locations,\r\n targetOption,\r\n intentId,\r\n ...intentOption,\r\n },\r\n bidMode: false,\r\n useParentLevel,\r\n },\r\n };\r\n};\r\n","import { pick, isEmpty, chain, difference, map, get } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { AdGroupCriterion } from '@bingads-webui/campaign-odata-schemas';\r\nimport { modelToViewModelDayTimeTargets, locationTargetsOptionKeys } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport {\r\n getBundleCountriesAndBundleLocationCriterions,\r\n shouldSelectBundleOption,\r\n parseLocationTargets,\r\n convertLocationStateToLocationSchemaCampaign,\r\n} from '@bingads-webui-campaign/hotel-common-targets';\r\nimport { isXandrDisplayAdsCampaign, isAudienceNativeAdsCampaign, isXandrVideoAdsCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { getContextualTargetInfo } from '@bingads-webui-campaign-react/boost-contextual-target';\r\nimport { AddedDeviceBidAdjustment as DefaultDeviceBidAdjustment, RemovedDeviceBidAdjustment, AdGroupNegativeReferenceId } from '../common/constants';\r\nimport { DeviceKeys } from '../steps/ad-group/target/device';\r\nimport { CRITERION_LEVEL, bulkModelToViewModelForLocationTargetsBase } from './criterions';\r\n\r\nexport const initialAdGroupCriterionsViewModel = {\r\n data: [],\r\n isValid: true,\r\n isDirty: false,\r\n};\r\n\r\nconst whitelistedSchemaPropertyKeys = Object.keys(AdGroupCriterion.properties);\r\n\r\nexport const modelToViewModelForAdGroupCriterions = (adGroupCriterionsModel) => {\r\n const data = pick(adGroupCriterionsModel, whitelistedSchemaPropertyKeys);\r\n const adGroupCriterionsViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return adGroupCriterionsViewModel;\r\n};\r\n\r\nexport const modelToViewModelForLocationTargets = ({\r\n model, campaignLocationModel, bundleCountries, adGroupId, campaignId, overrideOriginalBidAdjustment = false, bidMode = false,\r\n}) => {\r\n const {\r\n locations,\r\n intentId,\r\n intentOption,\r\n } = parseLocationTargets(model, 'adGroup', adGroupId);\r\n\r\n let targetOption = locations.length ? locationTargetsOptionKeys.specific : locationTargetsOptionKeys.everywhere;\r\n targetOption = shouldSelectBundleOption(bundleCountries, locations) ? locationTargetsOptionKeys.bundleOrDefaultMarket : targetOption;\r\n\r\n let parentLevelSettings;\r\n\r\n if (campaignLocationModel) {\r\n const {\r\n locations: campaignLocations,\r\n intentId: campaignIntentId,\r\n intentOption: campaignIntentOption,\r\n } = parseLocationTargets(campaignLocationModel, 'campaign', campaignId);\r\n\r\n let campaignTargetOption = campaignLocations.length ? locationTargetsOptionKeys.specific : locationTargetsOptionKeys.everywhere;\r\n campaignTargetOption = shouldSelectBundleOption(bundleCountries, campaignLocations) ? locationTargetsOptionKeys.bundleOrDefaultMarket : targetOption;\r\n\r\n parentLevelSettings = {\r\n initLocations: campaignLocations,\r\n currentLocations: campaignLocations,\r\n targetOption: campaignTargetOption,\r\n intentId: campaignIntentId,\r\n ...campaignIntentOption,\r\n };\r\n }\r\n\r\n if (overrideOriginalBidAdjustment) {\r\n locations.forEach((location) => {\r\n // eslint-disable-next-line no-param-reassign\r\n location.Criterion.OriginalBidAdjustment = null;\r\n });\r\n }\r\n\r\n return {\r\n locationTargets: {\r\n currentLevelSettings: {\r\n initLocations: locations,\r\n currentLocations: locations,\r\n targetOption,\r\n intentId,\r\n ...intentOption,\r\n },\r\n parentLevelSettings,\r\n bidMode,\r\n useParentLevel: locations.length === 0,\r\n },\r\n };\r\n};\r\n\r\nexport const modelToViewModelForPlacements = ({\r\n model,\r\n}) => {\r\n const placements = model.map(placement => ({\r\n ...placement.Criterion,\r\n Id: placement.Id,\r\n }));\r\n\r\n return {\r\n placements,\r\n initialPlacements: placements,\r\n };\r\n};\r\n\r\nexport const modelToViewModelForDayTimeTargets = ({\r\n model,\r\n}) => {\r\n const adGroupDayTimeRanges = modelToViewModelDayTimeTargets(model);\r\n return {\r\n adSchedules: {\r\n dayTimeRanges: adGroupDayTimeRanges,\r\n },\r\n };\r\n};\r\n\r\nconst modelToViewModelForAudience = audience => ({\r\n CriterionType: audience.CriterionType,\r\n Id: audience.Id,\r\n Status: audience.Status,\r\n Criterion: {\r\n AudienceId: audience.AudienceCriterion.AudienceId,\r\n AudienceName: audience.AudienceCriterion.AudienceName,\r\n AudienceType: audience.AudienceCriterion.AudienceType,\r\n BidMultiplier: audience.AudienceCriterion.BidMultiplier,\r\n Type: audience.AudienceCriterion.Type,\r\n },\r\n AdGroup: audience.AdGroup,\r\n BidType: audience.BidType,\r\n});\r\n\r\nexport const modelToViewModelForAudienceCriterions = ({ model, separateIMA }) => {\r\n // TODO: filter custom segment out from audiences\r\n let filteredAudiences = model.filter(audience => audience.AudienceCriterion.AudienceType !== 'CustomSegment');\r\n const customSegmentsAudiences = model.filter(audience => audience.AudienceCriterion.AudienceType === 'CustomSegment');\r\n const interests = separateIMA ? model.filter(audience => audience.AudienceCriterion.AudienceType === 'InMarket') : [];\r\n if (separateIMA) {\r\n filteredAudiences = filteredAudiences.filter(audience => audience.AudienceCriterion.AudienceType !== 'InMarket');\r\n }\r\n\r\n const initialCustomSegments = map(customSegmentsAudiences, modelToViewModelForAudience);\r\n\r\n const initialAudiences = map(filteredAudiences, modelToViewModelForAudience);\r\n\r\n const initialInterests = map(interests, modelToViewModelForAudience);\r\n\r\n return {\r\n initialAudiences,\r\n audiences: initialAudiences,\r\n initialCustomSegments,\r\n customSegments: initialCustomSegments,\r\n initialInterests,\r\n interests: initialInterests,\r\n };\r\n};\r\n\r\nexport const bulkModelToViewModelForDayTimeTargets = ({\r\n criterions,\r\n}) => {\r\n const schedulingRows = [];\r\n\r\n chain(criterions)\r\n .filter(criterion => criterion.CriterionType === 'DayTime')\r\n .each((criterion) => {\r\n schedulingRows.push({\r\n Id: criterion.Id,\r\n Day: criterion.Criterion.DayTimeCriterion.Day,\r\n StartHour: criterion.Criterion.DayTimeCriterion.FromHour,\r\n StartMinute: criterion.Criterion.DayTimeCriterion.FromMinute,\r\n EndHour: criterion.Criterion.DayTimeCriterion.ToHour,\r\n EndMinute: criterion.Criterion.DayTimeCriterion.ToMinute,\r\n });\r\n })\r\n .value();\r\n\r\n return {\r\n adSchedules: {\r\n dayTimeRanges: schedulingRows,\r\n },\r\n };\r\n};\r\n\r\nexport const bulkModelToViewModelForLocationTargets = ({\r\n locationTargetsModel, bundleCountries,\r\n}) => bulkModelToViewModelForLocationTargetsBase({\r\n locationTargetsModel, bundleCountries, level: CRITERION_LEVEL.AD_GROUP,\r\n});\r\n\r\nexport const viewModelToBulkModelForLocationTargets = ({ bundleLocationCriterions, adGroupViewModel, campaignViewModel }) => {\r\n if (!adGroupViewModel.data.locationTargets || adGroupViewModel.data.locationRestricted) {\r\n return [];\r\n }\r\n const bulkUpsertModel = convertLocationStateToLocationSchemaCampaign(\r\n adGroupViewModel.data.locationTargets,\r\n bundleLocationCriterions,\r\n {\r\n bidStrategy: { option: 'placeholder' },\r\n ...campaignViewModel,\r\n },\r\n {\r\n ...adGroupViewModel.data,\r\n name: {\r\n value: adGroupViewModel.data.Name,\r\n },\r\n }\r\n );\r\n return bulkUpsertModel;\r\n};\r\n\r\nexport const viewModelToBulkModelForAdSchedules = ({ adGroupViewModel, campaignViewModel }) => {\r\n const targets = adGroupViewModel.data.adSchedulesBulkUpsert || [];\r\n return targets.map((criterion) => {\r\n const Status = isEmpty(criterion) ? 'Active' : criterion.Status;\r\n if (adGroupViewModel.data.Id) {\r\n return {\r\n ...criterion,\r\n Status,\r\n AdGroup: {\r\n Id: adGroupViewModel.data.Id,\r\n },\r\n };\r\n }\r\n return {\r\n ...criterion,\r\n Status,\r\n AdGroupName: adGroupViewModel.data.Name,\r\n CampaignName: campaignViewModel.Name,\r\n };\r\n });\r\n};\r\n\r\nexport const viewModelToBulkModelForAudiences = ({ adGroupViewModel, campaignViewModel }) => {\r\n if (adGroupViewModel.data.audienceRestricted) {\r\n return [];\r\n }\r\n const audiences = adGroupViewModel.data.audiences || [];\r\n const initialAudiences = adGroupViewModel.data.initialAudiences || [];\r\n const customSegments = adGroupViewModel.data.customSegments || [];\r\n const initialCustomSegments = adGroupViewModel.data.initialCustomSegments || [];\r\n const interests = adGroupViewModel.data.interests || [];\r\n const initialInterests = adGroupViewModel.data.initialInterests || [];\r\n\r\n const totalAudiences = [...audiences, ...interests];\r\n const initialTotalAudiences = [...initialAudiences, ...initialInterests];\r\n\r\n const added = totalAudiences.filter(audience => !initialTotalAudiences.find(initialAudience => initialAudience.Criterion.AudienceId === audience.Criterion.AudienceId && initialAudience.Criterion.BidMultiplier === audience.Criterion.BidMultiplier));\r\n const removed = initialTotalAudiences.filter(initialAudience => !totalAudiences.find(audience => audience.Criterion.AudienceId === initialAudience.Criterion.AudienceId)).map(audience => ({\r\n ...audience,\r\n Status: 'Deleted',\r\n }));\r\n\r\n const addedCustomSegments = customSegments.filter(customSegment => !initialCustomSegments.find(initialCustomSegment => initialCustomSegment.Criterion.AudienceId === customSegment.Criterion.AudienceId));\r\n const removedCustomSegments = initialCustomSegments.filter(initialCustomSegment => !customSegments.find(customSegment => customSegment.Criterion.AudienceId === initialCustomSegment.Criterion.AudienceId)).map(customSegment => ({\r\n ...customSegment,\r\n Status: 'Deleted',\r\n }));\r\n\r\n return [...added, ...addedCustomSegments, ...removed, ...removedCustomSegments].map((audience) => {\r\n const Status = isEmpty(audience.Status) ? 'Active' : audience.Status;\r\n\r\n const typePrefix = audience.Status === 'Excluded' ? 'Negative' : '';\r\n const criterionType = `${typePrefix}${audience.Criterion.AudienceType}`;\r\n\r\n if (adGroupViewModel.data.Id) {\r\n return {\r\n ...audience,\r\n Status,\r\n CriterionType: criterionType,\r\n AdGroup: {\r\n Id: adGroupViewModel.data.Id,\r\n },\r\n };\r\n }\r\n\r\n return {\r\n ...audience,\r\n Status,\r\n CriterionType: criterionType,\r\n AdGroupName: adGroupViewModel.data.Name,\r\n CampaignName: campaignViewModel.Name,\r\n AdGroup: {\r\n Id: AdGroupNegativeReferenceId,\r\n },\r\n };\r\n });\r\n};\r\n\r\nexport const viewModelToBulkModelForPlacements = ({ adGroupViewModel, campaignViewModel }) => {\r\n const placements = adGroupViewModel.data.placements || [];\r\n const initialPlacements = adGroupViewModel.data.initialPlacements || [];\r\n\r\n const added = placements.filter(placement => !initialPlacements.find(initialPlacement => initialPlacement.PlacementId === placement.PlacementId));\r\n const removed = initialPlacements.filter(initialPlacement => !placements.find(placement => placement.PlacementId === initialPlacement.PlacementId)).map(placement => ({\r\n ...placement,\r\n Status: 'Deleted',\r\n }));\r\n\r\n return [...added, ...removed].map((placement) => {\r\n const Status = isEmpty(placement.Status) ? 'Active' : placement.Status;\r\n\r\n const adGroupId = adGroupViewModel.data.Id;\r\n if (adGroupId) {\r\n return {\r\n Status,\r\n CriterionType: 'AdGroupPlacementCriterion',\r\n ...(placement.Id ? { Id: placement.Id } : {}),\r\n Criterion: {\r\n PlacementId: placement.PlacementId,\r\n Type: 'Placement',\r\n },\r\n AdGroup: {\r\n Id: adGroupId,\r\n },\r\n };\r\n }\r\n\r\n return {\r\n Status,\r\n ...(placement.Id ? { Id: placement.Id } : {}),\r\n CriterionType: 'AdGroupPlacementCriterion',\r\n AdGroupName: adGroupViewModel.data.Name,\r\n CampaignName: campaignViewModel.Name,\r\n Criterion: {\r\n PlacementId: placement.PlacementId,\r\n Type: 'Placement',\r\n },\r\n AdGroup: {\r\n Id: AdGroupNegativeReferenceId,\r\n },\r\n };\r\n });\r\n};\r\n\r\nexport const getTargetCriterion = ({\r\n targets,\r\n type,\r\n propKey,\r\n adGroupViewModel,\r\n campaignViewModel,\r\n bidAdjustment,\r\n overrideType = undefined,\r\n level = 'adGroup',\r\n}) => targets.map((target) => {\r\n let BidAdjustment = bidAdjustment;\r\n let propValue = target.criterion;\r\n\r\n if (typeof (target.criterion) === 'object') {\r\n propValue = target.criterion.Target;\r\n\r\n if (bidAdjustment === undefined) {\r\n const { BidAdjustment: bid } = target.criterion;\r\n BidAdjustment = bid;\r\n }\r\n }\r\n\r\n const criterion = {\r\n Type: overrideType || type,\r\n BidAdjustment,\r\n [`${overrideType || type}Criterion`]: {\r\n [propKey]: propValue,\r\n },\r\n };\r\n\r\n if (level === 'campaign') {\r\n return {\r\n Id: target.Id,\r\n Status: target.status ? target.status : 'Active',\r\n Criterion: criterion,\r\n CriterionType: type,\r\n Campaign: {\r\n Id: campaignViewModel.data.Id || -111,\r\n },\r\n };\r\n }\r\n\r\n if (adGroupViewModel.data.Id) {\r\n return {\r\n Id: target.Id,\r\n Status: target.status ? target.status : 'Active',\r\n Criterion: criterion,\r\n CriterionType: type,\r\n AdGroup: {\r\n Id: adGroupViewModel.data.Id,\r\n },\r\n CampaignName: campaignViewModel.Name,\r\n };\r\n }\r\n return {\r\n Criterion: criterion,\r\n CriterionType: type,\r\n AdGroupName: adGroupViewModel.data.Name,\r\n CampaignName: campaignViewModel.Name,\r\n AdGroup: {\r\n Id: AdGroupNegativeReferenceId,\r\n },\r\n };\r\n});\r\n\r\n// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\r\nfunction getDeviceCriterionsFull(adGroupViewModel, isDeviceTargetingForDisplayEnabled) {\r\n const deviceTargets = adGroupViewModel.data.deviceTypes || [];\r\n const initialDeviceTargets = adGroupViewModel.data.initialDeviceTypes || [];\r\n\r\n const addedBackDevices = initialDeviceTargets.filter(initialTarget => deviceTargets.find(target => initialTarget.criterion === target) && initialTarget.bidAdjustment === RemovedDeviceBidAdjustment)\r\n .map((device => ({ criterion: device.criterion, Id: device.Id })));\r\n const newlyAddedDevices = deviceTargets.filter(target => initialDeviceTargets.find(initialTarget => initialTarget.criterion === target) === undefined)\r\n .filter((device => addedBackDevices.find(addedBackDevice => addedBackDevice.criterion === device) === undefined));\r\n let removedDevices = initialDeviceTargets.filter(initialTarget => deviceTargets.find(target => initialTarget.criterion === target) === undefined);\r\n if (isDeviceTargetingForDisplayEnabled) {\r\n removedDevices = initialDeviceTargets.filter(initialTarget => deviceTargets.find(target => initialTarget.criterion === target) === undefined && initialTarget.bidAdjustment === DefaultDeviceBidAdjustment);\r\n }\r\n const addedDevices = [...addedBackDevices, ...newlyAddedDevices.map(criterion => ({ criterion }))];\r\n\r\n return { addedDevices, removedDevices };\r\n}\r\n\r\nfunction getDeviceCriterionsVideoAds(adGroupViewModel) {\r\n const deviceTargets = adGroupViewModel.data.deviceTypes || []; // user selected device targets\r\n\r\n // ICM 542906055, handles a case where no device criterion was previously saved\r\n const deviceTargetsWhenNoInitialDeviceTargets = [\r\n {\r\n criterion: DeviceKeys.Computers,\r\n bidAdjustment: deviceTargets.includes(DeviceKeys.Computers) ? DefaultDeviceBidAdjustment : RemovedDeviceBidAdjustment,\r\n },\r\n {\r\n criterion: DeviceKeys.Tablets,\r\n bidAdjustment: deviceTargets.includes(DeviceKeys.Tablets) ? DefaultDeviceBidAdjustment : RemovedDeviceBidAdjustment,\r\n },\r\n {\r\n criterion: DeviceKeys.Smartphones,\r\n bidAdjustment: deviceTargets.includes(DeviceKeys.Smartphones) ? DefaultDeviceBidAdjustment : RemovedDeviceBidAdjustment,\r\n },\r\n {\r\n criterion: DeviceKeys.ConnectedTVs,\r\n bidAdjustment: RemovedDeviceBidAdjustment,\r\n },\r\n ];\r\n\r\n const initialDeviceTargets = adGroupViewModel.data.initialDeviceTypes || []; // saved initial device targets\r\n const supportedDevices = [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones]; // supported device targets for VideoAds\r\n\r\n // get added devices - overlap between initial removed devices (bid adjustment = -100) and selected devices\r\n const addedDevices = initialDeviceTargets.length === 0 ? deviceTargetsWhenNoInitialDeviceTargets : initialDeviceTargets.filter(initialTarget => deviceTargets.find(target => initialTarget.criterion === target) && initialTarget.bidAdjustment === RemovedDeviceBidAdjustment);\r\n\r\n // get removed devices - overlap between supported added devices (bid adjustment = 0) and selected devices\r\n const toRemoveDevices = difference(supportedDevices, deviceTargets);\r\n const removedDevices = initialDeviceTargets.filter(initialTarget => toRemoveDevices.find(target => initialTarget.criterion === target) && initialTarget.bidAdjustment === DefaultDeviceBidAdjustment);\r\n\r\n return { addedDevices, removedDevices };\r\n}\r\n\r\nfunction getDeviceCriterions(adGroupViewModel) {\r\n const { deviceTypesWithBidAdjustment = [] } = adGroupViewModel.data;\r\n const deviceTargets = adGroupViewModel.data.deviceTypes || [];\r\n const initialDeviceTargets = adGroupViewModel.data.initialDeviceTypes || [];\r\n const supportedDevices = [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones];\r\n\r\n // if we have deviceTargetingCampaignLevel, we need to delete the targets set at adgroup level.\r\n const deviceTargetingCampaignLevel = adGroupViewModel.data.deviceTargetingCampaignLevel || false;\r\n\r\n if (deviceTargetingCampaignLevel) {\r\n return { addedDevices: [], removedDevices: initialDeviceTargets.map(target => ({ ...target, status: 'Deleted' })) };\r\n }\r\n\r\n const isBidAdjustmentSame = initialTarget => deviceTypesWithBidAdjustment.find(targetWithBid =>\r\n targetWithBid.Criterion.DeviceCriterion.DeviceName === initialTarget.target && targetWithBid.Criterion.BidAdjustment === initialTarget.bidAdjustment);\r\n const isTargetChanged = target => initialDeviceTargets.find(initialTarget => initialTarget.criterion === target && isBidAdjustmentSame(initialTarget)) === undefined;\r\n\r\n const addedDevices = deviceTargets.filter(isTargetChanged).map((target) => {\r\n const deviceTargetWithBid = deviceTypesWithBidAdjustment.find(deviceWithBid => deviceWithBid.Criterion.DeviceCriterion.DeviceName === target) || {};\r\n const initialDeviceTarget = initialDeviceTargets.find(initialTarget => initialTarget.criterion === target) || {};\r\n const { Id } = initialDeviceTarget || deviceTargetWithBid;\r\n const bid = get(deviceTargetWithBid, 'Criterion.BidAdjustment', initialDeviceTarget.bidAdjustment || DefaultDeviceBidAdjustment);\r\n\r\n return {\r\n Id,\r\n criterion: {\r\n Target: target,\r\n BidAdjustment: bid,\r\n },\r\n };\r\n });\r\n\r\n const toRemoveDevices = initialDeviceTargets.length === 0 && deviceTargets.length === 0 ? [] : difference(supportedDevices, deviceTargets); // don't remove devices if no change\r\n\r\n const removedDevices = toRemoveDevices.map((target) => {\r\n const { Id } = initialDeviceTargets.find(initialTarget => initialTarget.criterion === target) || {};\r\n\r\n return {\r\n Id,\r\n criterion: {\r\n Target: target,\r\n BidAdjustment: RemovedDeviceBidAdjustment,\r\n },\r\n };\r\n });\r\n\r\n return { addedDevices, removedDevices };\r\n}\r\n\r\n\r\nconst isBidAdjustmentSame = (criterionType, targetWithBidAdjustmentList, target, initialTarget) =>\r\n targetWithBidAdjustmentList.find(targetWithBid =>\r\n targetWithBid.Criterion[`${criterionType}Criterion`].Target === target &&\r\n targetWithBid.Criterion.BidAdjustment === initialTarget.bidAdjustment);\r\n\r\nconst hydrateCriterionWithBidAndId = (criterionType, initialTargetList, adddedCriterionList, targetWithBidAdjustmentList) => {\r\n for (let i = 0; i < adddedCriterionList.length; i += 1) {\r\n const criterion = adddedCriterionList[i];\r\n // add bid adjustments to modified criterion\r\n const matchingAgeRangeWithBid = targetWithBidAdjustmentList.find(criterionWithBidAdjustment =>\r\n criterionWithBidAdjustment.Criterion[`${criterionType}Criterion`].Target === criterion.Criterion[`${criterionType}Criterion`].Target);\r\n criterion.Criterion.BidAdjustment = matchingAgeRangeWithBid.Criterion.BidAdjustment;\r\n\r\n // add id to update existing criterion in MT\r\n const originalCrition = initialTargetList.find(initialTarget => initialTarget.criterion === criterion.Criterion[`${criterionType}Criterion`].Target);\r\n if (originalCrition) {\r\n criterion.Id = originalCrition.Id;\r\n }\r\n }\r\n};\r\n\r\nexport const viewModelToBulkModelForTargeting = ({\r\n adGroupViewModel,\r\n campaignViewModel,\r\n isXandrDeviceTargetEnabled,\r\n isBoostEnabled = false,\r\n isDeviceTargetingForDisplayEnabled = false,\r\n isMultiAdFormatEnabled = false,\r\n isXandrServing = false,\r\n isPremiumStreamingEnabled = false,\r\n}) => {\r\n let addedDeviceCriterion = [];\r\n let removedDeviceCriterion = [];\r\n // deviceTypes\r\n const isDisplayAds = isXandrDisplayAdsCampaign(campaignViewModel.CampaignSubType);\r\n const isNativeAds = isAudienceNativeAdsCampaign(campaignViewModel.CampaignSubType);\r\n const isVideoAds = isXandrVideoAdsCampaign(campaignViewModel.CampaignSubType);\r\n const isDealBasedAds = adGroupViewModel.data.deal;\r\n\r\n const isXandrDeviceTargetForOLVEnabled = isXandrDeviceTargetEnabled && isVideoAds && campaignViewModel.BiddingScheme.Type === 'ManualCpm';\r\n const isUpdate = !!adGroupViewModel.data.Id;\r\n\r\n let addedDevices = [];\r\n let removedDevices = [];\r\n\r\n if (isUpdate) {\r\n // updating\r\n if (isDisplayAds) {\r\n const { addedDevices: displayAddDevices, removedDevices: displayRemovedDevices } = getDeviceCriterionsFull(adGroupViewModel, isDeviceTargetingForDisplayEnabled);\r\n\r\n addedDevices = displayAddDevices;\r\n removedDevices = displayRemovedDevices;\r\n } else if (isNativeAds) {\r\n const { addedDevices: displayAddDevices, removedDevices: displayRemovedDevices } = getDeviceCriterions(adGroupViewModel);\r\n\r\n addedDevices = displayAddDevices;\r\n removedDevices = displayRemovedDevices;\r\n } else if (isDealBasedAds) {\r\n if (!adGroupViewModel.data.deviceRestricted) {\r\n addedDevices = adGroupViewModel.data.deviceTypes.map(device => ({ criterion: device }));\r\n removedDevices = difference(Object.keys(DeviceKeys), adGroupViewModel.data.deviceTypes).map(device => ({ criterion: device }));\r\n }\r\n } else if (isVideoAds && (!isXandrServing || isXandrDeviceTargetForOLVEnabled)) {\r\n const { addedDevices: displayAddDevices, removedDevices: displayRemovedDevices } = getDeviceCriterionsVideoAds(adGroupViewModel);\r\n\r\n addedDevices = displayAddDevices;\r\n removedDevices = displayRemovedDevices;\r\n } else if (isXandrDeviceTargetForOLVEnabled) {\r\n addedDevices = adGroupViewModel.data.deviceTypes.map(device => ({ criterion: device }));\r\n removedDevices = difference(Object.keys(DeviceKeys), adGroupViewModel.data.deviceTypes).map(device => ({ criterion: device }));\r\n } else if (isVideoAds && isPremiumStreamingEnabled && campaignViewModel.BiddingScheme.Type === 'ManualCpv') {\r\n addedDevices = adGroupViewModel.data.deviceTypes.map(device => ({ criterion: device }));\r\n removedDevices = difference(Object.keys(DeviceKeys), adGroupViewModel.data.deviceTypes).map(device => ({ criterion: device }));\r\n } else {\r\n const cpmTargets = [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones];\r\n const cpvTargets = [DeviceKeys.ConnectedTVs];\r\n if (campaignViewModel.BiddingScheme.Type === 'ManualCpm') {\r\n addedDevices = cpmTargets.map(device => ({ criterion: device }));\r\n removedDevices = cpvTargets.map(device => ({ criterion: device }));\r\n } else {\r\n addedDevices = cpvTargets.map(device => ({ criterion: device }));\r\n removedDevices = cpmTargets.map(device => ({ criterion: device }));\r\n }\r\n }\r\n } else {\r\n // creating\r\n // eslint-disable-next-line no-lonely-if\r\n if (isDisplayAds || (isNativeAds && isMultiAdFormatEnabled)) {\r\n const supportedDevices = [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones];\r\n addedDevices = adGroupViewModel.data.deviceTypes.map(device => ({ criterion: device }));\r\n removedDevices = difference(supportedDevices, adGroupViewModel.data.deviceTypes).map(device => ({ criterion: device }));\r\n } else if (isDealBasedAds) {\r\n if (!adGroupViewModel.data.deviceRestricted) {\r\n addedDevices = adGroupViewModel.data.deviceTypes.map(device => ({ criterion: device }));\r\n removedDevices = difference(Object.keys(DeviceKeys), adGroupViewModel.data.deviceTypes).map(device => ({ criterion: device }));\r\n }\r\n } else if (isXandrDeviceTargetForOLVEnabled) {\r\n addedDevices = adGroupViewModel.data.deviceTypes.map(device => ({ criterion: device }));\r\n removedDevices = difference(Object.keys(DeviceKeys), adGroupViewModel.data.deviceTypes).map(device => ({ criterion: device }));\r\n } else if (isVideoAds && isPremiumStreamingEnabled && campaignViewModel.BiddingScheme.Type === 'ManualCpv') {\r\n addedDevices = adGroupViewModel.data.deviceTypes.map(device => ({ criterion: device }));\r\n removedDevices = difference(Object.keys(DeviceKeys), adGroupViewModel.data.deviceTypes).map(device => ({ criterion: device }));\r\n }\r\n }\r\n\r\n // deviceTypesWithBidAdjustment is not set then use DefaultDeviceBidAdjustment for all added devices\r\n const { deviceTypesWithBidAdjustment } = adGroupViewModel.data;\r\n const defaultBidAdjustment = deviceTypesWithBidAdjustment ? undefined : DefaultDeviceBidAdjustment;\r\n\r\n addedDeviceCriterion = getTargetCriterion({\r\n targets: addedDevices, type: 'Device', propKey: 'DeviceName', adGroupViewModel, campaignViewModel, bidAdjustment: defaultBidAdjustment,\r\n });\r\n\r\n // ICM 542906055, in this scenario, the getTargetCriterion function sets the bid adjustment to 0 for all devices\r\n if (isVideoAds && !isXandrServing && adGroupViewModel.data.initialDeviceTypes.length === 0) {\r\n const deviceTypes = [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones, DeviceKeys.ConnectedTVs];\r\n const adjustedAddedDeviceCriterion = addedDeviceCriterion.map((addedCriterion, idx) => {\r\n if (deviceTypes.includes(addedCriterion.Criterion.DeviceCriterion.DeviceName)) {\r\n return {\r\n ...addedCriterion,\r\n Criterion: {\r\n ...addedCriterion.Criterion,\r\n BidAdjustment: addedDevices[idx].bidAdjustment,\r\n },\r\n };\r\n }\r\n return addedCriterion;\r\n });\r\n addedDeviceCriterion = adjustedAddedDeviceCriterion;\r\n }\r\n\r\n removedDeviceCriterion = getTargetCriterion({\r\n targets: removedDevices, type: 'Device', propKey: 'DeviceName', adGroupViewModel, campaignViewModel, bidAdjustment: RemovedDeviceBidAdjustment,\r\n });\r\n\r\n // ageRanges\r\n const ageTargets = adGroupViewModel.data.ageRanges || [];\r\n const initialAgeTargets = adGroupViewModel.data.initialAgeRanges || [];\r\n const { ageRangesWithBidAdjustment } = adGroupViewModel.data;\r\n const addedAges = ageTargets.filter(target => initialAgeTargets.find(initialTarget => initialTarget.criterion === target\r\n && (!ageRangesWithBidAdjustment || isBidAdjustmentSame('Age', ageRangesWithBidAdjustment, target, initialTarget))) === undefined);\r\n const removedAges = initialAgeTargets.filter(initialTarget => ageTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n const addedAgeCriterion = getTargetCriterion({\r\n targets: addedAges.map(criterion => ({ criterion })), type: 'Age', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n const removedAgeCriterion = getTargetCriterion({\r\n targets: removedAges, type: 'Age', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n const negativeAgeRanges = adGroupViewModel.data.negativeAgeRanges || [];\r\n const removedNegativeAges = negativeAgeRanges.filter(negativeAge => addedAges.find(addedTarget => addedTarget === negativeAge.criterion)).map(target => ({ ...target, status: 'Deleted' }));\r\n const removedNegativeAgeCriterion = getTargetCriterion({\r\n targets: removedNegativeAges, type: 'NegativeAge', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n if (ageRangesWithBidAdjustment) {\r\n hydrateCriterionWithBidAndId('Age', initialAgeTargets, addedAgeCriterion, ageRangesWithBidAdjustment);\r\n }\r\n // genderTypes\r\n const genderTypes = adGroupViewModel.data.genderTypes || [];\r\n const initialGenderTypes = adGroupViewModel.data.initialGenderTypes || [];\r\n const { genderTypesWithBidAdjustment } = adGroupViewModel.data;\r\n const addedGenders = genderTypes.filter(target => initialGenderTypes.find(initialTarget => initialTarget.criterion === target\r\n && (!genderTypesWithBidAdjustment || isBidAdjustmentSame('Gender', genderTypesWithBidAdjustment, target, initialTarget))) === undefined);\r\n const removedGenders = initialGenderTypes.filter(initialTarget => genderTypes.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n const addedGenderCriterion = getTargetCriterion({\r\n targets: addedGenders.map(criterion => ({ criterion })), type: 'Gender', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n const removedGenderCriterion = getTargetCriterion({\r\n targets: removedGenders, type: 'Gender', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n const negativeGenderTypes = adGroupViewModel.data.negativeGenderTYpes || [];\r\n const removedNegativeGenders = negativeGenderTypes.filter(negativeGenderType => addedGenders.find(addedTarget => addedTarget === negativeGenderType.criterion)).map(target => ({ ...target, status: 'Deleted' }));\r\n const removedNegativeGenderCriterion = getTargetCriterion({\r\n targets: removedNegativeGenders, type: 'NegativeGender', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n if (genderTypesWithBidAdjustment) {\r\n hydrateCriterionWithBidAndId('Gender', initialGenderTypes, addedGenderCriterion, genderTypesWithBidAdjustment);\r\n }\r\n\r\n // genreTargets\r\n const genreTargets = adGroupViewModel.data.genreTargets || [];\r\n const initialGenreTargets = adGroupViewModel.data.initialGenreTargets || [];\r\n const addedGenres = genreTargets.filter(target => initialGenreTargets.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n const removedGenres = initialGenreTargets.filter(initialTarget => genreTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n const addedGenreTargets = getTargetCriterion({\r\n targets: addedGenres.map(criterion => ({ criterion })), type: 'Genre', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n const removedGenreCriterion = getTargetCriterion({\r\n targets: removedGenres, type: 'Genre', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n // industry target\r\n const { data: { industryTargetsBidAdjustment } } = adGroupViewModel;\r\n let industryTargets = [];\r\n let negativeIndustryTargets = [];\r\n let initialIndustryTargets = [];\r\n let initialNegativeIndustryTargets = [];\r\n let addedIndustryTargets = [];\r\n let removedIndustryTargets = [];\r\n let addedIndustryCriterion = [];\r\n let removedIndustryCriterion = [];\r\n let negativeAddedIndustryTargets = [];\r\n let negativeRemovedIndustryTargets = [];\r\n let negativeAddedIndustryCriterion = [];\r\n let negativeRemovedIndustryCriterion = [];\r\n\r\n if ((!isXandrServing && isDisplayAds) || (!isXandrServing && isVideoAds) || isNativeAds) {\r\n industryTargets = adGroupViewModel.data.industry || [];\r\n initialIndustryTargets = adGroupViewModel.data.initialIndustryTargets || [];\r\n\r\n negativeIndustryTargets = adGroupViewModel.data.negativeIndustry || [];\r\n initialNegativeIndustryTargets = adGroupViewModel.data.initialNegativeIndustryTargets || [];\r\n\r\n const isIndustryTargetBidAdjustmentUpdated = ({ criterion, BidAdjustment }) => industryTargetsBidAdjustment.find(targetWithBid =>\r\n get(targetWithBid, 'Criterion.IndustryCriterion.Target') === criterion && get(targetWithBid, 'Criterion.BidAdjustment') === BidAdjustment);\r\n\r\n addedIndustryTargets = industryTargets.filter(target => initialIndustryTargets.find(initialTarget =>\r\n initialTarget.criterion === target && (!industryTargetsBidAdjustment || isIndustryTargetBidAdjustmentUpdated(initialTarget))) === undefined);\r\n removedIndustryTargets = initialIndustryTargets.filter(initialTarget => industryTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n addedIndustryCriterion = getTargetCriterion({\r\n targets: addedIndustryTargets.map(criterion => ({ criterion })), type: 'Industry', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n removedIndustryCriterion = getTargetCriterion({\r\n targets: removedIndustryTargets, type: 'Industry', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n negativeAddedIndustryTargets = negativeIndustryTargets.filter(target => initialNegativeIndustryTargets.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n negativeRemovedIndustryTargets = initialNegativeIndustryTargets.filter(initialTarget => negativeIndustryTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n negativeAddedIndustryCriterion = getTargetCriterion({\r\n targets: negativeAddedIndustryTargets.map(criterion => ({ criterion })), type: 'NegativeIndustry', propKey: 'Target', adGroupViewModel, campaignViewModel, overrideType: 'Industry',\r\n });\r\n\r\n negativeRemovedIndustryCriterion = getTargetCriterion({\r\n targets: negativeRemovedIndustryTargets, type: 'NegativeIndustry', propKey: 'Target', adGroupViewModel, campaignViewModel, overrideType: 'Industry',\r\n });\r\n\r\n if (industryTargetsBidAdjustment && industryTargetsBidAdjustment.length > 0) {\r\n hydrateCriterionWithBidAndId('Industry', initialIndustryTargets, addedIndustryCriterion, industryTargetsBidAdjustment);\r\n }\r\n }\r\n\r\n // job target\r\n const { data: { jobTargetBidAdjustments } } = adGroupViewModel;\r\n let jobTargets = [];\r\n let negativeJobTargets = [];\r\n let initialJobTargets = [];\r\n let initialNegativeJobTargets = [];\r\n let addedJobTargets = [];\r\n let removedJobTargets = [];\r\n let addedJobCriterion = [];\r\n let removedJobCriterion = [];\r\n let negativeAddedJobTargets = [];\r\n let negativeRemovedJobTargets = [];\r\n let negativeAddedJobCriterion = [];\r\n let negativeRemovedJobCriterion = [];\r\n\r\n if ((!isXandrServing && isDisplayAds) || (!isXandrServing && isVideoAds) || isNativeAds) {\r\n jobTargets = adGroupViewModel.data.jobTargets || [];\r\n initialJobTargets = adGroupViewModel.data.initialJobTargets || [];\r\n\r\n negativeJobTargets = adGroupViewModel.data.negativeJobTargets || [];\r\n initialNegativeJobTargets = adGroupViewModel.data.initialNegativeJobTargets || [];\r\n\r\n const isJobTargetBidAdjustmentUpdated = ({ criterion, BidAdjustment }) => jobTargetBidAdjustments.find(targetWithBid =>\r\n get(targetWithBid, 'Criterion.JobFunctionCriterion.Target') === criterion && get(targetWithBid, 'Criterion.BidAdjustment') === BidAdjustment);\r\n\r\n addedJobTargets = jobTargets.filter(target => initialJobTargets.find(initialTarget =>\r\n initialTarget.criterion === target && (!jobTargetBidAdjustments || isJobTargetBidAdjustmentUpdated(initialTarget))) === undefined);\r\n removedJobTargets = initialJobTargets.filter(initialTarget => jobTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n addedJobCriterion = getTargetCriterion({\r\n targets: addedJobTargets.map(criterion => ({ criterion })), type: 'JobFunction', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n removedJobCriterion = getTargetCriterion({\r\n targets: removedJobTargets, type: 'JobFunction', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n negativeAddedJobTargets = negativeJobTargets.filter(target => initialNegativeJobTargets.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n negativeRemovedJobTargets = initialNegativeJobTargets.filter(initialTarget => negativeJobTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n negativeAddedJobCriterion = getTargetCriterion({\r\n targets: negativeAddedJobTargets.map(criterion => ({ criterion })), type: 'NegativeJobFunction', propKey: 'Target', adGroupViewModel, campaignViewModel, overrideType: 'JobFunction',\r\n });\r\n\r\n negativeRemovedJobCriterion = getTargetCriterion({\r\n targets: negativeRemovedJobTargets, type: 'NegativeJobFunction', propKey: 'Target', adGroupViewModel, campaignViewModel, overrideType: 'JobFunction',\r\n });\r\n\r\n if (jobTargetBidAdjustments && jobTargetBidAdjustments.length > 0) {\r\n hydrateCriterionWithBidAndId('JobFunction', initialJobTargets, addedJobCriterion, jobTargetBidAdjustments);\r\n }\r\n }\r\n // companyName targets\r\n let companyNameTargets = [];\r\n let negativeCompanyNameTargets = [];\r\n let initialCompanyNameTargets = [];\r\n let initialNegativeCompanyNameTargets = [];\r\n let addedCompanyNameTargets = [];\r\n let removedCompanyNameTargets = [];\r\n let addedCompanyNameCriterion = [];\r\n let removedCompanyNameCriterion = [];\r\n let negativeAddedCompanyNameTargets = [];\r\n let negativeRemovedCompanyNameTargets = [];\r\n let negativeAddedCompanyNameCriterion = [];\r\n let negativeRemovedCompanyNameCriterion = [];\r\n\r\n if ((!isXandrServing && isDisplayAds) || (!isXandrServing && isVideoAds) || isNativeAds) {\r\n companyNameTargets = adGroupViewModel.data.companyNameTargets || [];\r\n initialCompanyNameTargets = adGroupViewModel.data.initialCompanyNameTargets || [];\r\n\r\n\r\n negativeCompanyNameTargets = adGroupViewModel.data.negativeCompanyNameTargets || [];\r\n initialNegativeCompanyNameTargets = adGroupViewModel.data.initialNegativeCompanyNameTargets || [];\r\n\r\n addedCompanyNameTargets = companyNameTargets.filter(target => initialCompanyNameTargets.find(initialTarget =>\r\n initialTarget.Target === target.Target && initialTarget.BidAdjustment === target.BidAdjustment) === undefined);\r\n removedCompanyNameTargets = initialCompanyNameTargets.filter(initialTarget => companyNameTargets.find(target => initialTarget.Target === target.Target) === undefined).map(target => ({ ...target, criterion: target.Target, status: 'Deleted' }));\r\n\r\n addedCompanyNameCriterion = getTargetCriterion({\r\n targets: addedCompanyNameTargets.map(({ Id, ...criterion }) => ({ Id, criterion })), type: 'CompanyName', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n removedCompanyNameCriterion = getTargetCriterion({\r\n targets: removedCompanyNameTargets, type: 'CompanyName', propKey: 'Target', adGroupViewModel, campaignViewModel,\r\n });\r\n\r\n negativeAddedCompanyNameTargets = negativeCompanyNameTargets.filter(target => initialNegativeCompanyNameTargets.find(initialTarget => initialTarget.Target === target.Target) === undefined);\r\n negativeRemovedCompanyNameTargets = initialNegativeCompanyNameTargets.filter(initialTarget => negativeCompanyNameTargets.find(target => initialTarget.Target === target.Target) === undefined).map(target => ({ ...target, criterion: target.Target, status: 'Deleted' }));\r\n\r\n negativeAddedCompanyNameCriterion = getTargetCriterion({\r\n targets: negativeAddedCompanyNameTargets.map(criterion => ({ criterion })), type: 'NegativeCompanyName', propKey: 'Target', adGroupViewModel, campaignViewModel, overrideType: 'CompanyName',\r\n });\r\n\r\n negativeRemovedCompanyNameCriterion = getTargetCriterion({\r\n targets: negativeRemovedCompanyNameTargets, type: 'NegativeCompanyName', propKey: 'Target', adGroupViewModel, campaignViewModel, overrideType: 'CompanyName',\r\n });\r\n }\r\n\r\n let initialContextualTargets = [];\r\n let contextualTargets = [];\r\n let updatedContextualTargets = [];\r\n\r\n if (isAudienceNativeAdsCampaign(campaignViewModel.CampaignSubType) && isBoostEnabled) {\r\n initialContextualTargets = adGroupViewModel.data.initialContextualTargets || [];\r\n contextualTargets = adGroupViewModel.data.contextualTargets || [];\r\n\r\n updatedContextualTargets = getContextualTargetInfo(initialContextualTargets, contextualTargets).map((criterion) => {\r\n // eslint-disable-next-line no-param-reassign\r\n criterion.AdGroup = { Id: adGroupViewModel.data.Id ? adGroupViewModel.data.Id : AdGroupNegativeReferenceId };\r\n return criterion;\r\n }) || [];\r\n }\r\n\r\n return [\r\n ...addedDeviceCriterion,\r\n ...removedDeviceCriterion,\r\n ...removedNegativeAgeCriterion,\r\n ...addedAgeCriterion,\r\n ...removedAgeCriterion,\r\n ...removedNegativeGenderCriterion,\r\n ...addedGenderCriterion,\r\n ...removedGenderCriterion,\r\n ...addedGenreTargets,\r\n ...removedGenreCriterion,\r\n ...addedIndustryCriterion,\r\n ...removedIndustryCriterion,\r\n ...negativeAddedIndustryCriterion,\r\n ...negativeRemovedIndustryCriterion,\r\n ...addedJobCriterion,\r\n ...removedJobCriterion,\r\n ...negativeAddedJobCriterion,\r\n ...negativeRemovedJobCriterion,\r\n ...addedCompanyNameCriterion,\r\n ...removedCompanyNameCriterion,\r\n ...negativeAddedCompanyNameCriterion,\r\n ...negativeRemovedCompanyNameCriterion,\r\n ...updatedContextualTargets,\r\n ];\r\n};\r\n\r\nexport const loadBundleCountries = ({\r\n cid,\r\n aid,\r\n serverContext,\r\n}) => {\r\n const lcid = serverContext ? serverContext.CurrentUser.LocaleID : '1033';\r\n const market = serverContext ? serverContext.CurrentUser.Market : 'US';\r\n const language = 'All';\r\n\r\n return getBundleCountriesAndBundleLocationCriterions(cid, aid, lcid, language, market);\r\n};\r\n\r\nconst adGroupCriterionTypeName = 'Model.AdGroupCriterion';\r\n\r\nexport const readAdGroupCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n type,\r\n}) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AdGroups.$withKey(adGroupId)\r\n .AdGroupCriterions\r\n .$cast(adGroupCriterionTypeName)\r\n .get({\r\n filter: {\r\n where: type,\r\n },\r\n })\r\n .toPromise();\r\n\r\nexport const readPlacementCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n}) =>\r\n readAdGroupCriterions({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n type: \"isof(Criterion, 'Model.PlacementCriterion')\",\r\n });\r\n\r\nexport const readLocationCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n}) =>\r\n readAdGroupCriterions({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n type: \"isof(Criterion,'Model.LocationCriterion') or isof(Criterion,'Model.RadiusCriterion') or isof(Criterion,'Model.LocationIntentCriterion')\",\r\n });\r\n\r\nexport const readDayTimeCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n}) =>\r\n readAdGroupCriterions({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n type: \"isof(Criterion,'Model.DayTimeCriterion')\",\r\n });\r\n\r\nexport const readTargetingCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n}) =>\r\n readAdGroupCriterions({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n type: \"isof(Criterion,'Model.AgeCriterion') or isof(Criterion,'Model.GenderCriterion') or isof(Criterion,'Model.DeviceCriterion') or isof(Criterion,'Model.GenreCriterion') or isof(Criterion, 'Model.IndustryCriterion') or isof(Criterion, 'Model.JobFunctionCriterion') or isof(Criterion, 'Model.CompanyNameCriterion') or isof(Criterion, 'Model.ContextualTarget')\",\r\n });\r\n\r\nexport const readAudienceCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n}) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AdGroups.$withKey(adGroupId)\r\n .AudienceAssociations\r\n .get({ top: 2000 })\r\n .toPromise();\r\n","import { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\n\r\nexport const ServerValidatedRemainingCharsValidatedTextField = RemainingCharsValidatedTextField;\r\n","import { useCallback, useEffect, useMemo, useContext, useState } from 'react';\r\nimport { useSelector } from '@xstate/react';\r\nimport { isCanceling, stateLoggingListener, StepEvents, isSaving } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { useExitWithoutSavingConfirmation } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { serverErrorsCompare } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { useImpulse, usePrevProp } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport timeZoneMapper from '@bingads-webui-component-legacy/timezonemapper/index';\r\nimport { isXandrDisplayAdsCampaign, CampaignSubTypeMapping, isXandrVideoAdsCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { needsSaving } from './step-wizard-config';\r\nimport { AgeRangesCampaignToAdInsight } from './target/age-range';\r\nimport { BidStrategyToDevices } from './target/device';\r\n\r\nconst doesNeedSavingSelector = state => !isCanceling(state) && needsSaving(state.context) && !isSaving(state);\r\nconst hideStepHeaderSelector = state => state.context.stepInfo.hideStepHeader;\r\nconst serverContextSelector = state => state.context.stepsData.serverContext;\r\nconst adGroupIdSelector = state => state.context.stepsData.adGroupId;\r\nconst adGroupSelector = state => state.context.data.adGroup;\r\nconst scopeSelector = state => state.context.stepsData.scope;\r\nconst locationTargetsSelector = state => state.context.data.adGroup.data.locationTargets;\r\nconst bundleCountriesSelector = state => state.context.data.bundleCountries;\r\nconst bundleLocationCriterionsSelector = state => state.context.data.bundleLocationCriterions;\r\nconst adSchedulesSelector = state => state.context.data.adGroup.data.adSchedules;\r\nconst adSchedulesBulkUpsertModelSelector = state => state.context.data.adGroup.data.adSchedulesBulkUpsert;\r\nconst genreTargetsSelector = state => state.context.data.adGroup.data.genreTargets;\r\nconst ageRangesSelector = state => state.context.data.adGroup.data.ageRanges;\r\nconst genderTypesSelector = state => state.context.data.adGroup.data.genderTypes;\r\nconst deviceTypesSelector = state => state.context.data.adGroup.data.deviceTypes;\r\nconst deviceRestrictionsSelector = state => state.context.data.adGroup.data.deviceRestrictions;\r\nconst deviceRestrictedSelector = state => state.context.data.adGroup.data.deviceRestricted;\r\nconst companyNameTargetsSelector = state => state.context.data.adGroup.data.companyNameTargets;\r\nconst negativeCompanyNameTargetsSelector = state => state.context.data.adGroup.data.negativeCompanyNameTargets;\r\nconst jobTargetsSelector = state => state.context.data.adGroup.data.jobTargets;\r\nconst negativeJobTargetsSelector = state => state.context.data.adGroup.data.negativeJobTargets;\r\nconst industrySelector = state => state.context.data.adGroup.data.industry;\r\nconst negativeIndustrySelector = state => state.context.data.adGroup.data.negativeIndustry;\r\nconst locationRestrictedSelector = state => state.context.data.adGroup.data.locationRestricted;\r\nconst dealLocationListSelector = state => state.context.data.adGroup.data.dealLocationList;\r\nconst genreRestrictedSelector = state => state.context.data.adGroup.data.genreRestricted;\r\nconst ageRestrictedSelector = state => state.context.data.adGroup.data.ageRestricted;\r\nconst genderRestrictedSelector = state => state.context.data.adGroup.data.genderRestricted;\r\nconst audienceRestrictedSelector = state => state.context.data.adGroup.data.audienceRestricted;\r\nconst customSegmentsSelector = state => state.context.data.adGroup.data.customSegments;\r\nconst campaignTimeZoneSelector = state => (state.context.stepsData.campaign && state.context.stepsData.campaign.TimeZone) || (state.context.stepsData.currentCampaign && state.context.stepsData.currentCampaign.TimeZone);\r\nconst campaignBiddingStrategySelector = state => (state.context.stepsData.campaign && state.context.stepsData.campaign.BiddingScheme) || (state.context.stepsData.currentCampaign && state.context.stepsData.currentCampaign.BiddingScheme);\r\nconst campaignSubTypeSelector = state => (state.context.stepsData.campaign && state.context.stepsData.campaign.CampaignSubType) || (state.context.stepsData.currentCampaign && state.context.stepsData.currentCampaign.CampaignSubType);\r\nconst campaignSettingsSelector = state => (state.context.stepsData.campaign && state.context.stepsData.campaign.CampaignSettings) || (state.context.stepsData.currentCampaign && state.context.stepsData.currentCampaign.CampaignSettings);\r\nconst systemErrorsSelector = state => state.context.data.systemErrors;\r\nconst isEditingSelector = state => state.context.stepsData.isEditing;\r\nconst serverErrorsSelector = state => state.context.data.serverErrors;\r\nconst invalidSaveAttemptSelector = state => state.context.invalidSaveAttempt;\r\nconst dealDetailsSelector = state => state.context.data.adGroup.data.deal;\r\nconst permissionsSelector = state => state.context.stepsData.permissions;\r\nconst placementsSelector = state => state.context.data.adGroup.data.placements;\r\nconst exclusionsSelector = state => state.context.data.adGroup.data.exclusions;\r\nconst initialAdGroupSelector = state => state.context.data.adGroup;\r\n\r\n\r\nexport const useStepAdGroupSettingsState = (stepService) => {\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n\r\n useEffect(() => {\r\n const subscription = stepService.subscribe(stateLoggingListener);\r\n return subscription.unsubscribe;\r\n }, [stepService]);\r\n\r\n const hideStepHeader = useSelector(stepService, hideStepHeaderSelector);\r\n const serverContext = useSelector(stepService, serverContextSelector);\r\n const adGroupId = useSelector(stepService, adGroupIdSelector);\r\n const adGroup = useSelector(stepService, adGroupSelector);\r\n const scope = useSelector(stepService, scopeSelector);\r\n const locationTargets = useSelector(stepService, locationTargetsSelector);\r\n const bundleCountries = useSelector(stepService, bundleCountriesSelector);\r\n const bundleLocationCriterions = useSelector(stepService, bundleLocationCriterionsSelector);\r\n const adSchedules = useSelector(stepService, adSchedulesSelector);\r\n const adSchedulesBulkUpsert = useSelector(stepService, adSchedulesBulkUpsertModelSelector);\r\n const genreTargets = useSelector(stepService, genreTargetsSelector);\r\n const ageRanges = useSelector(stepService, ageRangesSelector);\r\n const genderTypes = useSelector(stepService, genderTypesSelector);\r\n const deviceTypes = useSelector(stepService, deviceTypesSelector);\r\n const companyNameTargets = useSelector(stepService, companyNameTargetsSelector);\r\n const negativeCompanyNameTargets = useSelector(stepService, negativeCompanyNameTargetsSelector);\r\n const jobTargets = useSelector(stepService, jobTargetsSelector);\r\n const negativeJobTargets = useSelector(stepService, negativeJobTargetsSelector);\r\n const industry = useSelector(stepService, industrySelector);\r\n const negativeIndustry = useSelector(stepService, negativeIndustrySelector);\r\n const campaignTimeZone = useSelector(stepService, campaignTimeZoneSelector);\r\n const campaignBiddingStrategy = useSelector(stepService, campaignBiddingStrategySelector);\r\n const campaignSubtype = useSelector(stepService, campaignSubTypeSelector);\r\n const campaignSettings = useSelector(stepService, campaignSettingsSelector);\r\n const isEditing = useSelector(stepService, isEditingSelector);\r\n\r\n const doesNeedSaving = useSelector(stepService, doesNeedSavingSelector);\r\n const systemErrors = useSelector(stepService, systemErrorsSelector);\r\n\r\n const serverErrors = useSelector(stepService, serverErrorsSelector);\r\n const invalidSaveAttempt = useSelector(stepService, invalidSaveAttemptSelector);\r\n\r\n const dealDetails = useSelector(stepService, dealDetailsSelector);\r\n const deviceRestrictions = useSelector(stepService, deviceRestrictionsSelector);\r\n const deviceRestricted = useSelector(stepService, deviceRestrictedSelector);\r\n const locationRestricted = useSelector(stepService, locationRestrictedSelector);\r\n const genreRestricted = useSelector(stepService, genreRestrictedSelector);\r\n const ageRestricted = useSelector(stepService, ageRestrictedSelector);\r\n const genderRestricted = useSelector(stepService, genderRestrictedSelector);\r\n const audienceRestricted = useSelector(stepService, audienceRestrictedSelector);\r\n const customSegments = useSelector(stepService, customSegmentsSelector);\r\n const dealLocationList = useSelector(stepService, dealLocationListSelector);\r\n const permissions = useSelector(stepService, permissionsSelector);\r\n const placements = useSelector(stepService, placementsSelector);\r\n const exclusions = useSelector(stepService, exclusionsSelector);\r\n const [initialAdGroup] = useState(useSelector(stepService, initialAdGroupSelector));\r\n\r\n const [navigationConfirmationPrompt] = useExitWithoutSavingConfirmation(doesNeedSaving, stepService, i18n);\r\n\r\n const onAdGroupValidation = useCallback((results) => {\r\n const { data: newAdGroupData, ...restResults } = results;\r\n const dataPatch = {\r\n adGroup: {\r\n ...adGroup,\r\n data: {\r\n ...adGroup.data,\r\n ...newAdGroupData,\r\n },\r\n ...restResults,\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, adGroup]);\r\n\r\n // eslint-disable-next-line no-bitwise\r\n const [, hasInvalidSaveAttemptChanged] = usePrevProp(invalidSaveAttempt | 0);\r\n const [, hasServerErrorsChanged] = usePrevProp(serverErrors, serverErrorsCompare);\r\n const areBeaconsActive = useImpulse(hasInvalidSaveAttemptChanged || hasServerErrorsChanged);\r\n\r\n const [showAllValidationErrors, setShowAllValidationErrors] = useState(false);\r\n if (hasInvalidSaveAttemptChanged) {\r\n setShowAllValidationErrors(true);\r\n }\r\n\r\n const getLocationIds = useCallback(() => {\r\n if (locationTargets && locationTargets.currentLevelSettings) {\r\n const { targetOption, currentLocations } = locationTargets.currentLevelSettings;\r\n\r\n if (targetOption === 'bundle' && bundleCountries && bundleCountries.length > 0) {\r\n return bundleCountries.map(c => c.LocationId);\r\n }\r\n\r\n if (targetOption === 'specific' && currentLocations && currentLocations.length > 0) {\r\n return currentLocations.reduce((locationIds, cl) => {\r\n if (cl.SelectionStatus === 'Included' && cl.Criterion.LocationCriterion) {\r\n locationIds.push(cl.Criterion.LocationCriterion.LocationId);\r\n }\r\n return locationIds;\r\n }, []);\r\n }\r\n\r\n return [];\r\n }\r\n\r\n return [];\r\n }, [bundleCountries, locationTargets]);\r\n\r\n const getExcludedLocationIds = useCallback(() => {\r\n if (locationTargets && locationTargets.currentLevelSettings) {\r\n const { targetOption, currentLocations } = locationTargets.currentLevelSettings;\r\n\r\n if (targetOption === 'specific' && currentLocations && currentLocations.length > 0) {\r\n return currentLocations.reduce((locationIds, cl) => {\r\n if (cl.SelectionStatus === 'Excluded' && cl.Criterion.LocationCriterion) {\r\n locationIds.push(cl.Criterion.LocationCriterion.LocationId);\r\n }\r\n return locationIds;\r\n }, []);\r\n }\r\n\r\n return [];\r\n }\r\n\r\n return [];\r\n }, [locationTargets]);\r\n\r\n const getRadiusCriterions = useCallback(() => {\r\n if (locationTargets && locationTargets.currentLevelSettings) {\r\n const { currentLocations } = locationTargets.currentLevelSettings;\r\n if (currentLocations && currentLocations.length > 0) {\r\n return currentLocations.reduce((radiusTargets, cl) => {\r\n if (cl.CriterionType === 'Radius') {\r\n radiusTargets.push({\r\n CenterLatitude: cl.Criterion.RadiusCriterion.Latitude,\r\n CenterLongitude: cl.Criterion.RadiusCriterion.Longitude,\r\n Radius: cl.Criterion.RadiusCriterion.Radius,\r\n });\r\n }\r\n return radiusTargets;\r\n }, []);\r\n }\r\n return [];\r\n }\r\n return [];\r\n }, [locationTargets]);\r\n\r\n const getAudienceIds = useCallback(() => {\r\n if (adGroup && adGroup.data && adGroup.data.audiences && adGroup.data.audiences.length > 0) {\r\n return adGroup.data.audiences.reduce((includeIds, audience) => {\r\n if (audience.Status === 'Active') {\r\n includeIds.push(audience.Criterion.AudienceId);\r\n }\r\n return includeIds;\r\n }, []);\r\n }\r\n\r\n return [];\r\n }, [adGroup]);\r\n\r\n const getExcludedAudienceIds = useCallback(() => {\r\n if (adGroup && adGroup.data && adGroup.data.audiences && adGroup.data.audiences.length > 0) {\r\n return adGroup.data.audiences.reduce((includeIds, audience) => {\r\n if (audience.Status === 'Excluded') {\r\n includeIds.push(audience.Criterion.AudienceId);\r\n }\r\n return includeIds;\r\n }, []);\r\n }\r\n\r\n return [];\r\n }, [adGroup]);\r\n\r\n const getGenreTargets = useCallback(() => genreTargets, [genreTargets]);\r\n\r\n const getAgeRanges = useCallback(() => ageRanges && ageRanges.map(ar => AgeRangesCampaignToAdInsight[ar]), [ageRanges]);\r\n\r\n const getDevices = useCallback(() => {\r\n if (dealDetails) {\r\n return deviceTypes;\r\n }\r\n\r\n if (isXandrVideoAdsCampaign(campaignSubtype) && permissions.dynamic.XandrDeviceTarget && campaignBiddingStrategy.Type === 'ManualCpm') {\r\n return deviceTypes;\r\n }\r\n\r\n return BidStrategyToDevices[campaignBiddingStrategy.Type];\r\n }, [campaignBiddingStrategy.Type, campaignSubtype, dealDetails, deviceTypes, permissions.dynamic.XandrDeviceTarget]);\r\n\r\n const getCompanyNameTargets = useCallback(() => companyNameTargets, [companyNameTargets]);\r\n\r\n const getNegativeCompanyNameTargets = useCallback(() => negativeCompanyNameTargets, [negativeCompanyNameTargets]);\r\n\r\n const getJobTargets = useCallback(() => jobTargets, [jobTargets]);\r\n\r\n const getNegativeJobTargets = useCallback(() => negativeJobTargets, [negativeJobTargets]);\r\n\r\n const getIndustry = useCallback(() => industry, [industry]);\r\n\r\n const getNegativeIndustry = useCallback(() => negativeIndustry, [negativeIndustry]);\r\n\r\n const isAdScheduleInvalid = useMemo(() => adGroup && adGroup.messages && adGroup.messages.length > 0 && adGroup.messages.indexOf('Ad schedule has validation errors') !== -1, [adGroup]);\r\n\r\n const getAdSchedule = useCallback(() => {\r\n if (adGroup && adGroup.data && adGroup.data.adSchedulesBulkUpsert && adGroup.data.adSchedulesBulkUpsert.length > 0 && !isAdScheduleInvalid) {\r\n return adGroup.data.adSchedulesBulkUpsert.map((a) => {\r\n const { Day, FromHour, ToHour } = a.Criterion.DayTimeCriterion;\r\n return {\r\n Day,\r\n StartHour: FromHour,\r\n EndHour: ToHour,\r\n };\r\n });\r\n }\r\n return [];\r\n }, [adGroup, isAdScheduleInvalid]);\r\n\r\n const reachEstimationTargets = useMemo(() => ({\r\n Age: {\r\n Includes: getAgeRanges(),\r\n },\r\n Gender: {\r\n Includes: genderTypes,\r\n },\r\n Device: {\r\n Includes: getDevices(),\r\n },\r\n CompanyName: {\r\n Includes: getCompanyNameTargets(),\r\n Excludes: getNegativeCompanyNameTargets(),\r\n },\r\n Job: {\r\n Includes: getJobTargets(),\r\n Excludes: getNegativeJobTargets(),\r\n },\r\n Industry: {\r\n Includes: getIndustry(),\r\n Excludes: getNegativeIndustry(),\r\n },\r\n Location: {\r\n Includes: getLocationIds(),\r\n Excludes: getExcludedLocationIds(),\r\n },\r\n RadiusTargets: getRadiusCriterions(),\r\n Audience: {\r\n Includes: getAudienceIds(),\r\n Excludes: getExcludedAudienceIds(),\r\n },\r\n Genre: { Includes: getGenreTargets() },\r\n Day: getAdSchedule(),\r\n TimeZone: timeZoneMapper.getAccountIANATimeZone(),\r\n CampaignSubType: isXandrDisplayAdsCampaign(campaignSubtype) ? CampaignSubTypeMapping.DisplayAds : CampaignSubTypeMapping.BrandAwarenessVideoAds,\r\n }), [getAgeRanges, genderTypes, getDevices, getCompanyNameTargets, getNegativeCompanyNameTargets, getJobTargets, getNegativeJobTargets, getIndustry, getNegativeIndustry, getLocationIds, getRadiusCriterions, getExcludedLocationIds, getAudienceIds, getExcludedAudienceIds, getGenreTargets, getAdSchedule, campaignSubtype]);\r\n\r\n const state = {\r\n serverContext,\r\n adGroup,\r\n isEditing,\r\n i18n,\r\n legacyI18n,\r\n hideStepHeader,\r\n adGroupId,\r\n scope,\r\n locationTargets,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n adSchedules,\r\n adSchedulesBulkUpsert,\r\n genreTargets,\r\n ageRanges,\r\n genderTypes,\r\n deviceTypes,\r\n companyNameTargets,\r\n negativeCompanyNameTargets,\r\n jobTargets,\r\n negativeJobTargets,\r\n industry,\r\n negativeIndustry,\r\n campaignTimeZone,\r\n campaignBiddingStrategy,\r\n campaignSubtype,\r\n campaignSettings,\r\n dealDetails,\r\n systemErrors,\r\n navigationConfirmationPrompt,\r\n reachEstimationTargets,\r\n showAllValidationErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n deviceRestrictions,\r\n deviceRestricted,\r\n locationRestricted,\r\n genreRestricted,\r\n ageRestricted,\r\n dealLocationList,\r\n genderRestricted,\r\n audienceRestricted,\r\n customSegments,\r\n placements,\r\n exclusions,\r\n initialAdGroup,\r\n };\r\n const api = { onAdGroupValidation };\r\n\r\n return [state, api];\r\n};\r\n","import React, { useCallback, useEffect, useMemo, useState, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { compact, find, map, noop } from 'underscore';\r\nimport { AimAudienceAssociationView } from '@bingads-webui-campaign-legacy/audience-association/view/aim-component-view';\r\nimport { perfMarkerPropTypes } from '@bingads-webui/performance-marker';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { getRoutePathById, withSiteMap } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { getAudiencePickerStyle } from './styles/audience-picker';\r\n\r\nexport const formatAudience = ({ audiences, i18n }) => {\r\n if (!audiences || !audiences.length) {\r\n return i18n.getString(_TL_('Targeting: No audience segments selected.'));\r\n }\r\n\r\n const targetedAudiences = audiences.filter(({ Status }) => Status === 'Active');\r\n const excludedAudiences = audiences.filter(({ Status }) => Status === 'Excluded');\r\n\r\n let targetedAudienceDetails = '';\r\n let excludedAudienceDetails = '';\r\n\r\n if (targetedAudiences.length === 1) {\r\n targetedAudienceDetails = i18n.getString(_TL_('Targeted: 1 audience'));\r\n } else if (targetedAudiences.length > 1) {\r\n targetedAudienceDetails = i18n.getString(_TL_('Targeted: {{count}} audiences'), { count: (targetedAudiences.length) });\r\n }\r\n\r\n if (excludedAudiences.length === 1) {\r\n excludedAudienceDetails = i18n.getString(_TL_('Excluded: 1 audience'));\r\n } else if (excludedAudiences.length > 1) {\r\n excludedAudienceDetails = i18n.getString(_TL_('Excluded: {{count}} audiences'), { count: (excludedAudiences.length) });\r\n }\r\n\r\n return `${targetedAudienceDetails}${targetedAudienceDetails && excludedAudienceDetails && '. '}${excludedAudienceDetails}`;\r\n};\r\n\r\nconst audiencesLibraryId = 'audiences-library';\r\nconst tagsManagementId = 'uet-tag';\r\n\r\nexport const navigate = (siteMap, scopeService, routeId, state) => {\r\n const path = getRoutePathById(siteMap, routeId);\r\n\r\n scopeService.history.push({\r\n pathname: path,\r\n search: scopeService.history.location.search,\r\n state,\r\n });\r\n};\r\n\r\nconst UnstyledAudiencePicker = (props) => {\r\n const {\r\n classes,\r\n validationProps,\r\n updateValidation,\r\n perfMarker,\r\n campaignSubType,\r\n campaignSettings,\r\n campaignBiddingStrategy,\r\n supportExclusion,\r\n siteMap,\r\n isAudienceCreationWorkflow,\r\n isIMARedesignEnabled,\r\n hideCustomSegmentsOption,\r\n } = props;\r\n\r\n const { data: { audiences } } = validationProps;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const [audienceAssociationRef, setAudienceAssociationRef] = useState();\r\n\r\n const { scope } = useContext(ScopeContext);\r\n\r\n const audienceAssociationView = useMemo(() => {\r\n const associationView = new AimAudienceAssociationView({\r\n isForVNext: true,\r\n perfMarker,\r\n campaignSubType,\r\n hideExclusion: !supportExclusion,\r\n hideAssociationHeader: true,\r\n biddingScheme: campaignBiddingStrategy,\r\n campaignSettings,\r\n isAudienceCreationWorkflow,\r\n deps: {\r\n router: {\r\n navigateToAudiences: data => navigate(siteMap, scope, audiencesLibraryId, data),\r\n navigateToTags: () => navigate(siteMap, scope, tagsManagementId),\r\n },\r\n },\r\n isIMARedesignEnabled,\r\n hideCustomSegmentsOption,\r\n });\r\n\r\n associationView.canExpandAssociation = true;\r\n associationView.render();\r\n associationView.expandAssociation();\r\n if (supportExclusion) {\r\n associationView.expandExclusion();\r\n }\r\n\r\n return associationView;\r\n }, [isAudienceCreationWorkflow, campaignBiddingStrategy, campaignSettings, campaignSubType, perfMarker, scope, siteMap, supportExclusion, isIMARedesignEnabled]);\r\n\r\n const onAudienceListChanged = useCallback(() => {\r\n const associationList = audienceAssociationView.getAudienceCriterion();\r\n\r\n updateValidation([], { audiences: [...associationList] });\r\n if (activity) {\r\n activity.signal(`onAudienceListChange - ${JSON.stringify({ audiences: associationList })}`);\r\n }\r\n }, [audienceAssociationView, updateValidation, activity]);\r\n\r\n useEffect(() => {\r\n if (audienceAssociationRef && audienceAssociationRef.childElementCount === 0 && audienceAssociationView) {\r\n audienceAssociationRef.innerHTML = '';\r\n audienceAssociationRef.append(audienceAssociationView.el);\r\n }\r\n }, [audienceAssociationRef, audienceAssociationView]);\r\n\r\n useEffect(() => {\r\n if (audienceAssociationView) {\r\n audienceAssociationView\r\n .ensureLoadedAsync()\r\n .then(() => {\r\n const associationList = compact(map(audiences, ({ Criterion, Status }) => find(audienceAssociationView.doubleListBoxViewModel.allAudiences, audience =>\r\n audience.Id === Criterion.AudienceId && Status === 'Active')));\r\n const exclusionList = compact(map(audiences, ({ Criterion, Status }) => find(audienceAssociationView.doubleListBoxViewModel.allAudiences, audience => audience.Id === Criterion.AudienceId && Status === 'Excluded')));\r\n\r\n audienceAssociationView.off('selectionChanged', onAudienceListChanged);\r\n audienceAssociationView.setLists({\r\n associationList,\r\n exclusionList,\r\n });\r\n\r\n audienceAssociationView.on('selectionChanged', onAudienceListChanged);\r\n });\r\n\r\n return () => {\r\n audienceAssociationView.off('selectionChanged', onAudienceListChanged);\r\n };\r\n }\r\n\r\n return noop;\r\n }, [audiences]); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n return (\r\n
\r\n
setAudienceAssociationRef(newRef)} />\r\n
\r\n );\r\n};\r\n\r\nUnstyledAudiencePicker.propTypes = {\r\n classes: PropTypes.shape({\r\n pickerContainer: PropTypes.string.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isAudienceCreationWorkflow: PropTypes.bool.isRequired,\r\n perfMarker: perfMarkerPropTypes.isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n audiences: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n campaignSubType: PropTypes.string,\r\n supportExclusion: PropTypes.bool,\r\n campaignSettings: PropTypes.shape({}).isRequired,\r\n campaignBiddingStrategy: PropTypes.shape({}).isRequired,\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string,\r\n })).isRequired,\r\n isIMARedesignEnabled: PropTypes.bool,\r\n hideCustomSegmentsOption: PropTypes.bool,\r\n};\r\n\r\nUnstyledAudiencePicker.defaultProps = {\r\n campaignSubType: null,\r\n supportExclusion: false,\r\n isIMARedesignEnabled: false,\r\n hideCustomSegmentsOption: false,\r\n};\r\n\r\nexport const ValidatedAudiencePicker = withDefaultStyles(withSiteMap(withCustomValidation(UnstyledAudiencePicker)), getAudiencePickerStyle);\r\n","import {\r\n audienceAssociationSectionStyle,\r\n commonDoubleListBoxStyle,\r\n convertToLocalStyle,\r\n glyphIconStyle,\r\n helpbuttonStyle,\r\n paginationStyle,\r\n searchboxStyle,\r\n uiblockerStyle,\r\n audienceModalStyles,\r\n audienceExpressionStyle,\r\n audienceCombinedListStyle,\r\n} from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const getAudiencePickerStyle = (_, { palette }) => ({\r\n '@global': {\r\n ...uiblockerStyle({ palette }),\r\n ...audienceModalStyles({ palette }, { modalWidth: 500 }),\r\n ...audienceExpressionStyle(),\r\n ...audienceCombinedListStyle({ palette }),\r\n '.audience-modal.create-audience': {\r\n width: 700,\r\n },\r\n },\r\n pickerContainer: {\r\n '& .audience-association-view': {\r\n ...audienceAssociationSectionStyle({ palette }, { singleListBoxWidth: 450 }),\r\n ...commonDoubleListBoxStyle({ palette }),\r\n ...paginationStyle({ palette }),\r\n ...searchboxStyle({ palette }),\r\n ...convertToLocalStyle(glyphIconStyle({ palette })),\r\n ...convertToLocalStyle(helpbuttonStyle({ palette })),\r\n\r\n '& .create-audience-link-section': {\r\n marginLeft: 0,\r\n },\r\n\r\n '& .exclude-audience-link-section': {\r\n marginLeft: 0,\r\n },\r\n\r\n '& .ima-reach-ineligible-audience-toggle': {\r\n marginLeft: 16,\r\n marginTop: 8,\r\n },\r\n\r\n '& .association-section, .audience__association, .audience__exclusion': {\r\n '& .DMP_doublelistbox_section .doubleListBox.layout-columns': {\r\n width: 920,\r\n\r\n '& .form-group, .layout-columns-element:nth-child(1) .form-group:nth-child(1) .dlb-filter-alignPlaceholder .form-control-feedback': {\r\n margin: 0,\r\n },\r\n },\r\n\r\n '& .row': {\r\n margin: 0,\r\n },\r\n },\r\n\r\n '& .selectable-treeview ul': {\r\n listStyleType: 'none',\r\n padding: 0,\r\n },\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React, { useState, useMemo, useCallback, useContext } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { Toggle } from '@fluentui/react';\r\nimport { Dropdown, TextField } from '@bingads-webui-react/fabric-with-signal';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withCustomValidation, withValidation, withError } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst ValidatedTextField = withValidation(TextField);\r\n\r\nconst FrequencyIntervals = {\r\n Hour: 'HOUR',\r\n Day: 'DAY',\r\n Week: 'WEEK',\r\n Month: 'MONTH',\r\n Lifetime: 'LIFETIME',\r\n};\r\n\r\nconst FrequencyCapUnit = 'IMPRESSION';\r\n\r\nconst getKeyStringMap = i18n => [\r\n { key: FrequencyIntervals.Hour, text: i18n.getString(_TL_('hour')) },\r\n { key: FrequencyIntervals.Day, text: i18n.getString(_TL_('day')) },\r\n { key: FrequencyIntervals.Week, text: i18n.getString(_TL_('week')) },\r\n // Don't support month and lifetime for now\r\n // { key: FrequencyIntervals.Month, text: i18n.getString(_TL_('month')) },\r\n // { key: FrequencyIntervals.Lifetime, text: i18n.getString(_TL_('lifetime')) },\r\n];\r\n\r\nexport const formatFrequencyCapping = ({ CapValue, TimeGranularity, i18n }) => {\r\n let interval;\r\n if (TimeGranularity === undefined || TimeGranularity === null) {\r\n return i18n.getString(_TL_('No limit to how often people see your ads'));\r\n }\r\n if (TimeGranularity === '') {\r\n interval = '';\r\n } else {\r\n interval = getKeyStringMap(i18n).find(({ key }) => key === TimeGranularity).text;\r\n }\r\n return i18n.getString(_TL_('{{count}} times per {{interval}}'), { count: CapValue, interval });\r\n};\r\n\r\nconst textWidth = 100;\r\nconst textStyles = { root: { width: textWidth } };\r\n\r\nconst dropdownWidth = 100;\r\nconst dropDownStyles = { dropdown: { width: dropdownWidth } };\r\n\r\nconst getStyle = () => ({\r\n inputContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n frequency: {\r\n margin: '0 10px',\r\n },\r\n});\r\n\r\nconst ValueAndInterval = ({\r\n i18n,\r\n TimeGranularity,\r\n onIntervalChanged,\r\n timeOptions,\r\n validationProps,\r\n}) => {\r\n const classes = useDefaultStyles(getStyle);\r\n\r\n return (\r\n
\r\n \r\n {formatFrequencyCapping({ CapValue: '', TimeGranularity: '', i18n })}\r\n \r\n
\r\n );\r\n};\r\n\r\nValueAndInterval.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n TimeGranularity: PropTypes.string,\r\n onIntervalChanged: PropTypes.func.isRequired,\r\n timeOptions: PropTypes.shape({}).isRequired,\r\n validationProps: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nValueAndInterval.defaultProps = {\r\n TimeGranularity: '',\r\n};\r\n\r\nconst ValidatedValueAndInterval = withError(ValueAndInterval);\r\n\r\nconst FrequencyCapping = ({\r\n i18n,\r\n validationProps,\r\n updateValidation,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const { data: [{ CapValue = null, TimeGranularity } = {}] = [] } = validationProps;\r\n const [errorMessage, setErrorMessage] = useState([]);\r\n\r\n const onIntervalChanged = useCallback((e, value) => {\r\n updateValidation(errorMessage, {\r\n FrequencyCapSettings: [{\r\n CapValue,\r\n TimeGranularity: value.key,\r\n FrequencyCapUnit,\r\n }],\r\n });\r\n\r\n if (activity) {\r\n activity.signal(`onFrequencyIntervalChanged - ${JSON.stringify(value)})}`);\r\n }\r\n }, [updateValidation, errorMessage, CapValue, activity]);\r\n\r\n const timeOptions = useMemo(() => getKeyStringMap(i18n), [i18n]);\r\n\r\n const onToggle = useCallback((e, checked) => {\r\n if (checked) {\r\n updateValidation([], {\r\n FrequencyCapSettings: [{\r\n CapValue: undefined,\r\n TimeGranularity: TimeGranularity || FrequencyIntervals.Hour,\r\n FrequencyCapUnit,\r\n }],\r\n });\r\n } else {\r\n updateValidation([], { FrequencyCapSettings: [{}] });\r\n }\r\n\r\n if (activity) {\r\n activity.signal(`onFrequencyCapToggleChanged - toggleStatus: ${checked}`);\r\n }\r\n }, [TimeGranularity, activity, updateValidation]);\r\n\r\n const onCountValidate = useCallback((result) => {\r\n const { messages = [], data: { capValue } } = result;\r\n if (!_.isEqual(messages, errorMessage) || capValue !== CapValue) {\r\n setErrorMessage(messages);\r\n\r\n updateValidation(messages, {\r\n FrequencyCapSettings: [{\r\n CapValue: capValue,\r\n TimeGranularity,\r\n FrequencyCapUnit,\r\n }],\r\n });\r\n }\r\n }, [errorMessage, CapValue, updateValidation, TimeGranularity]);\r\n\r\n const customErrors = {\r\n decimalLength: i18n.getString(_TL_('Field requires integer value')),\r\n };\r\n\r\n const errorProcessor = errors => _.map(\r\n errors,\r\n (oldError, key) => customErrors[key] || oldError\r\n );\r\n\r\n return (\r\n \r\n \r\n { TimeGranularity && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nFrequencyCapping.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n inputContainer: PropTypes.string.isRequired,\r\n frequency: PropTypes.string.isRequired,\r\n }).isRequired,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n CapValue: PropTypes.string,\r\n TimeGranularity: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ValidatedFrequencyCapping = withCustomValidation(FrequencyCapping);\r\n","import _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport React, { useContext, useMemo, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ThemeProvider } from 'react-jss';\r\nimport { ComponentSettings, ThemeFluent } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { DoubleListBox, DoubleListBoxContextProvider, DoubleListBoxContext } from '@bingads-webui-react/double-list-box-fluent';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getStyles } from './get-styles';\r\n\r\nconst DataSource = ({ genreOptions }) => {\r\n const {\r\n state: {\r\n search,\r\n },\r\n dispatch,\r\n } = useContext(DoubleListBoxContext);\r\n\r\n useEffect(() => {\r\n dispatch({ type: 'START_LOAD_DATA' });\r\n\r\n const items = search ? genreOptions.filter(item => item.name.toLowerCase().includes(search.toLowerCase())) : genreOptions;\r\n const start = 0;\r\n const end = items.length;\r\n dispatch({\r\n type: 'FINISH_LOAD_DATA',\r\n payload: {\r\n items: items.slice(start, end),\r\n totalCount: items.length,\r\n },\r\n });\r\n }, [dispatch, search, genreOptions]);\r\n\r\n return null;\r\n};\r\n\r\nDataSource.propTypes = {\r\n genreOptions: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n })).isRequired,\r\n};\r\n\r\nconst UnthemedGenreSelectionDoubleListBox = ({\r\n onSelectionChange, i18n, genreOptions, genreTargets, classes,\r\n}) => {\r\n const selectedItems = useMemo(\r\n () => _.map(genreTargets, genreTarget => _.findWhere(genreOptions, { id: genreTarget }))\r\n , [genreTargets, genreOptions]\r\n );\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nUnthemedGenreSelectionDoubleListBox.propTypes = {\r\n classes: PropTypes.shape(_.mapObject(getStyles(), _.constant(PropTypes.string.isRequired)))\r\n .isRequired,\r\n onSelectionChange: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n genreOptions: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n })).isRequired,\r\n genreTargets: PropTypes.arrayOf(PropTypes.number).isRequired,\r\n};\r\n\r\nconst GenreSelectionDoubleListBox = withDefaultStyles(UnthemedGenreSelectionDoubleListBox, getStyles);\r\n\r\nexport { GenreSelectionDoubleListBox };\r\n","export const getStyles = (_, { palette = {} } = {}) => {\r\n const doubleListBox = {\r\n '& > div': {\r\n height: 470,\r\n },\r\n '& .items .item[aria-selected=\"true\"]': {\r\n backgroundColor: palette.neutralLight,\r\n\r\n '& div:nth-child(2)': {\r\n display: 'none',\r\n },\r\n },\r\n };\r\n\r\n return {\r\n doubleListBox,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { RadioGroup } from '@bingads-webui-react/radio';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { GenreSelectionDoubleListBox } from './genre-selection-double-list-box';\r\n\r\nconst genreTargetAllOptionIds = {\r\n AllGenres: 'AllGenres',\r\n SelectSpecifics: 'SelectSpecifics',\r\n};\r\n\r\nconst radioOptions = [\r\n genreTargetAllOptionIds.AllGenres,\r\n genreTargetAllOptionIds.SelectSpecifics,\r\n];\r\n\r\nconst GenreTargets = ({\r\n i18n,\r\n genreTargets,\r\n genreOptions,\r\n updateValidation,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const isAllSelected = genreTargets == null || genreTargets.length === 0;\r\n\r\n const [selectedOptionId, setSelectedOptionId] = useState(radioOptions[isAllSelected ? 0 : 1]);\r\n\r\n const optionToString = {\r\n [genreTargetAllOptionIds.AllGenres]: i18n.getString(_TL_('All genres')),\r\n [genreTargetAllOptionIds.SelectSpecifics]: i18n.getString(_TL_('Let me choose specific genres')),\r\n };\r\n\r\n const renderItem = useCallback(id => optionToString[id], [optionToString]);\r\n const getItemId = _.identity;\r\n\r\n const onGenreTargetsChanged = useCallback((selections) => {\r\n const selectionIds = _.map(selections, selection => selection.id);\r\n updateValidation([], { genreTargets: selectionIds });\r\n if (activity) {\r\n activity.signal(`onGenreTargetChange - ${JSON.stringify({ genreTargets: selectionIds })}`);\r\n }\r\n }, [updateValidation, activity]);\r\n\r\n const onRadioGroupChange = useCallback((id) => {\r\n if (id === genreTargetAllOptionIds.AllGenres) {\r\n // reset the selections.\r\n updateValidation([], { genreTargets: [] });\r\n }\r\n\r\n setSelectedOptionId(id);\r\n }, [updateValidation]);\r\n\r\n return (\r\n \r\n
\r\n { i18n.getString(_TL_('What genre do you want your ads to target?')) }\r\n
\r\n \r\n {\r\n selectedOptionId === genreTargetAllOptionIds.SelectSpecifics &&\r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\nGenreTargets.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n genreTargets: PropTypes.arrayOf(PropTypes.number).isRequired,\r\n genreOptions: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n name: PropTypes.string.isRequired,\r\n })).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nconst formatGenreTargets = ({ i18n, genreTargets, genreOptions }) => {\r\n if (genreTargets === null ||\r\n genreTargets === undefined ||\r\n genreTargets.length === 0 ||\r\n genreTargets.length === genreOptions.length) {\r\n return i18n.getString(_TL_('All genres'));\r\n }\r\n\r\n const genreTargetStr = genreTargets.length + i18n.getString(_TL_(' targets selected: ')) +\r\n _.chain(genreTargets)\r\n .sortBy()\r\n .take(10)\r\n .map(genreTargetId => _.findWhere(genreOptions, { id: genreTargetId }).name)\r\n .join(i18n.getString(_TL_(', ')))\r\n .value();\r\n\r\n if (genreTargets.length > 10) {\r\n return genreTargetStr + i18n.getString(_TL_('...'));\r\n }\r\n\r\n return genreTargetStr;\r\n};\r\n\r\nconst ValidatedGenreTargets = withCustomValidation(GenreTargets);\r\n\r\nexport { ValidatedGenreTargets, formatGenreTargets };\r\n","const getGenreOptions = i18n =>\r\n [\r\n {\r\n id: 1,\r\n name: i18n.getString(_TL_('Horror')),\r\n },\r\n {\r\n id: 2,\r\n name: i18n.getString(_TL_('Crime')),\r\n },\r\n {\r\n id: 3,\r\n name: i18n.getString(_TL_('Game-show')),\r\n },\r\n {\r\n id: 4,\r\n name: i18n.getString(_TL_('Documentary')),\r\n },\r\n {\r\n id: 5,\r\n name: i18n.getString(_TL_('Romance')),\r\n },\r\n {\r\n id: 6,\r\n name: i18n.getString(_TL_('Sports - Other')),\r\n },\r\n {\r\n id: 7,\r\n name: i18n.getString(_TL_('Talk')),\r\n },\r\n {\r\n id: 8,\r\n name: i18n.getString(_TL_('Drama')),\r\n },\r\n {\r\n id: 9,\r\n name: i18n.getString(_TL_('Fantasy')),\r\n },\r\n {\r\n id: 10,\r\n name: i18n.getString(_TL_('Music')),\r\n },\r\n {\r\n id: 11,\r\n name: i18n.getString(_TL_('Shopping')),\r\n },\r\n {\r\n id: 12,\r\n name: i18n.getString(_TL_('Other')),\r\n },\r\n {\r\n id: 13,\r\n name: i18n.getString(_TL_('Action')),\r\n },\r\n {\r\n id: 14,\r\n name: i18n.getString(_TL_('Thriller')),\r\n },\r\n {\r\n id: 15,\r\n name: i18n.getString(_TL_('News')),\r\n },\r\n {\r\n id: 17,\r\n name: i18n.getString(_TL_('Reality')),\r\n },\r\n {\r\n id: 18,\r\n name: i18n.getString(_TL_('Comedy')),\r\n },\r\n {\r\n id: 19,\r\n name: i18n.getString(_TL_('Business & Finance')),\r\n },\r\n {\r\n id: 20,\r\n name: i18n.getString(_TL_('Cooking')),\r\n },\r\n {\r\n id: 21,\r\n name: i18n.getString(_TL_('Sitcom')),\r\n },\r\n {\r\n id: 22,\r\n name: i18n.getString(_TL_('Adventure')),\r\n },\r\n {\r\n id: 23,\r\n name: i18n.getString(_TL_('Sci-fi')),\r\n },\r\n {\r\n id: 25,\r\n name: i18n.getString(_TL_('Football')),\r\n },\r\n {\r\n id: 26,\r\n name: i18n.getString(_TL_('Animation')),\r\n },\r\n {\r\n id: 27,\r\n name: i18n.getString(_TL_('Baseball')),\r\n },\r\n {\r\n id: 28,\r\n name: i18n.getString(_TL_('Basketball')),\r\n },\r\n {\r\n id: 29,\r\n name: i18n.getString(_TL_('Biography')),\r\n },\r\n {\r\n id: 30,\r\n name: i18n.getString(_TL_('History')),\r\n },\r\n {\r\n id: 31,\r\n name: i18n.getString(_TL_('Musical')),\r\n },\r\n {\r\n id: 32,\r\n name: i18n.getString(_TL_('Mystery')),\r\n },\r\n {\r\n id: 33,\r\n name: i18n.getString(_TL_('Soccer')),\r\n },\r\n {\r\n id: 34,\r\n name: i18n.getString(_TL_('War')),\r\n },\r\n {\r\n id: 35,\r\n name: i18n.getString(_TL_('Western')),\r\n },\r\n {\r\n id: 36,\r\n name: i18n.getString(_TL_('Animals')),\r\n },\r\n {\r\n id: 37,\r\n name: i18n.getString(_TL_('Automotive')),\r\n },\r\n {\r\n id: 38,\r\n name: i18n.getString(_TL_('Science & Technology')),\r\n },\r\n {\r\n id: 39,\r\n name: i18n.getString(_TL_('Travel')),\r\n },\r\n {\r\n id: 40,\r\n name: i18n.getString(_TL_('Golf')),\r\n },\r\n {\r\n id: 41,\r\n name: i18n.getString(_TL_('Ice Hockey')),\r\n },\r\n {\r\n id: 42,\r\n name: i18n.getString(_TL_('Motor Sports')),\r\n },\r\n {\r\n id: 43,\r\n name: i18n.getString(_TL_('Beauty & Fashion')),\r\n },\r\n {\r\n id: 44,\r\n name: i18n.getString(_TL_('Home & Garden')),\r\n },\r\n {\r\n id: 45,\r\n name: i18n.getString(_TL_('Health')),\r\n },\r\n {\r\n id: 46,\r\n name: i18n.getString(_TL_('Fitness')),\r\n },\r\n // Children not allowed\r\n // {\r\n // id: 47,\r\n // name: i18n.getString(_TL_('Children')),\r\n // },\r\n {\r\n id: 48,\r\n name: i18n.getString(_TL_('Weather')),\r\n },\r\n {\r\n id: 49,\r\n name: i18n.getString(_TL_('Education')),\r\n },\r\n {\r\n id: 50,\r\n name: i18n.getString(_TL_('Cycling')),\r\n },\r\n {\r\n id: 51,\r\n name: i18n.getString(_TL_('Gaming')),\r\n },\r\n {\r\n id: 52,\r\n name: i18n.getString(_TL_('Rugby League')),\r\n },\r\n {\r\n id: 53,\r\n name: i18n.getString(_TL_('Rugby Union')),\r\n },\r\n {\r\n id: 54,\r\n name: i18n.getString(_TL_('Australian Rules Football')),\r\n },\r\n {\r\n id: 55,\r\n name: i18n.getString(_TL_('Tennis')),\r\n },\r\n {\r\n id: 56,\r\n name: i18n.getString(_TL_('Olympics')),\r\n },\r\n {\r\n id: 57,\r\n name: i18n.getString(_TL_('Softball')),\r\n },\r\n {\r\n id: 58,\r\n name: i18n.getString(_TL_('Cricket')),\r\n },\r\n {\r\n id: 59,\r\n name: i18n.getString(_TL_('MMA')),\r\n },\r\n {\r\n id: 60,\r\n name: i18n.getString(_TL_('Boxing')),\r\n },\r\n {\r\n id: 61,\r\n name: i18n.getString(_TL_('Horse Racing')),\r\n },\r\n // Religion and Politics not allowed\r\n // {\r\n // id: 62,\r\n // name: i18n.getString(_TL_('Politics')),\r\n // },\r\n // {\r\n // id: 63,\r\n // name: i18n.getString(_TL_('Religion')),\r\n // },\r\n {\r\n id: 64,\r\n name: i18n.getString(_TL_('Nature')),\r\n },\r\n {\r\n id: 65,\r\n name: i18n.getString(_TL_('Outdoors')),\r\n },\r\n {\r\n id: 66,\r\n name: i18n.getString(_TL_('Arts')),\r\n },\r\n {\r\n id: 67,\r\n name: i18n.getString(_TL_('Pop Culture')),\r\n },\r\n {\r\n id: 68,\r\n name: i18n.getString(_TL_('Fishing')),\r\n },\r\n {\r\n id: 69,\r\n name: i18n.getString(_TL_('Surfing')),\r\n },\r\n {\r\n id: 70,\r\n name: i18n.getString(_TL_('Paranormal')),\r\n },\r\n {\r\n id: 71,\r\n name: i18n.getString(_TL_('Awards')),\r\n },\r\n {\r\n id: 72,\r\n name: i18n.getString(_TL_('Martial Arts')),\r\n },\r\n {\r\n id: 73,\r\n name: i18n.getString(_TL_('Hobbies')),\r\n },\r\n {\r\n id: 74,\r\n name: i18n.getString(_TL_('Dance')),\r\n },\r\n {\r\n id: 75,\r\n name: i18n.getString(_TL_('Law')),\r\n },\r\n {\r\n id: 76,\r\n name: i18n.getString(_TL_('Comic Book')),\r\n },\r\n {\r\n id: 77,\r\n name: i18n.getString(_TL_('Holidays')),\r\n },\r\n {\r\n id: 78,\r\n name: i18n.getString(_TL_('Wrestling')),\r\n },\r\n // {\r\n // id: 79,\r\n // name: i18n.getString(_TL_('Gambling')),\r\n // },\r\n {\r\n id: 80,\r\n name: i18n.getString(_TL_('Anime')),\r\n },\r\n {\r\n id: 81,\r\n name: i18n.getString(_TL_('Soap-Opera')),\r\n },\r\n ];\r\n\r\nconst getDealGenreOptions = i18n =>\r\n [\r\n {\r\n id: 1,\r\n name: i18n.getString(_TL_('Horror')),\r\n },\r\n {\r\n id: 4,\r\n name: i18n.getString(_TL_('Documentary')),\r\n },\r\n {\r\n id: 5,\r\n name: i18n.getString(_TL_('Romance')),\r\n },\r\n {\r\n id: 8,\r\n name: i18n.getString(_TL_('Drama')),\r\n },\r\n {\r\n id: 9,\r\n name: i18n.getString(_TL_('Fantasy')),\r\n },\r\n {\r\n id: 13,\r\n name: i18n.getString(_TL_('Action')),\r\n },\r\n {\r\n id: 18,\r\n name: i18n.getString(_TL_('Comedy')),\r\n },\r\n ];\r\n\r\nexport { getGenreOptions, getDealGenreOptions };\r\n","import { getCollapsiblePanelStyles } from '@bingads-webui-campaign-react/display-plus-native-ads';\r\n\r\nexport const getAdGroupStepStyles = (components, theme) => ({\r\n collapsiblePanel: getCollapsiblePanelStyles(components, theme),\r\n container: {\r\n marginTop: 10,\r\n },\r\n reachEstimate: {\r\n height: '100%',\r\n top: 111,\r\n position: 'sticky',\r\n },\r\n reachEstimationError: {\r\n marginBottom: 12,\r\n },\r\n});\r\n","export const getReachEstimateStyles = (_, core) => ({\r\n reachEstimateControl: {\r\n width: 400,\r\n },\r\n\r\n estimateNote: {\r\n color: '#323130',\r\n fontSize: 12,\r\n },\r\n\r\n panel: {\r\n minHeight: 161,\r\n paddingTop: 8,\r\n position: 'relative',\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n borderRadius: 2,\r\n backgroundColor: `${core && core.palette && core.palette.white}`,\r\n },\r\n\r\n panelBody: {\r\n padding: 10,\r\n },\r\n\r\n reachEstimateTitle: {\r\n fontSize: 18,\r\n marginBottom: 8,\r\n },\r\n\r\n impressionsCountMessage: {\r\n fontSize: 18,\r\n },\r\n\r\n impressionsCount: {\r\n fontWeight: 'bold',\r\n },\r\n\r\n meterContainer: {\r\n height: 37,\r\n margin: '10px 0 13px 0',\r\n position: 'relative',\r\n fontSize: 12,\r\n '& .specificMeter': {\r\n width: '10%',\r\n height: 12,\r\n backgroundColor: '#C4C4C4',\r\n position: 'absolute',\r\n top: 17,\r\n },\r\n '& .broadMeter': {\r\n width: '90%',\r\n height: 12,\r\n backgroundColor: '#C4C4C4',\r\n position: 'absolute',\r\n top: 17,\r\n marginLeft: '10%',\r\n },\r\n },\r\n\r\n specificMeter: {\r\n width: '10%',\r\n height: 12,\r\n backgroundColor: '#C4C4C4',\r\n position: 'absolute',\r\n top: 17,\r\n },\r\n\r\n broadMeter: {\r\n width: '90%',\r\n height: 12,\r\n backgroundColor: '#C4C4C4',\r\n position: 'absolute',\r\n top: 17,\r\n marginLeft: '10%',\r\n },\r\n\r\n audienceSpecificLabel: {\r\n position: 'absolute',\r\n top: 35,\r\n fontSize: 12,\r\n },\r\n\r\n audienceBroadLabel: {\r\n position: 'absolute',\r\n top: 35,\r\n fontSize: 12,\r\n right: 0,\r\n },\r\n\r\n arrow: {\r\n backgroundColor: '#107C10',\r\n top: 5,\r\n width: 16,\r\n height: 35,\r\n position: 'absolute',\r\n border: `4px solid ${core && core.palette && core.palette.white} !important`,\r\n zIndex: 1,\r\n },\r\n});\r\n","import React, { useEffect, useRef, useCallback, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getReachEstimateStyles } from './reach-estimate-styles';\r\n\r\n\r\nconst meterProps = {\r\n value: 0,\r\n max: 100,\r\n min: 0,\r\n};\r\n\r\nconst calcBroadMeterValue = (estimatedImpressions) => {\r\n // Use logarithmic scale to represent impressions: y = a ln x + b\r\n // 96 = a ln 466B + b: (466B experimentally derived as max impressions value)\r\n // 20 = a ln 1M + b: (1M is required as min broad impressions value)\r\n // TODO: Tune this as needed after initial self-hosting\r\n const transformedVal = (5.82288 * Math.log(estimatedImpressions)) - 60.44618;\r\n\r\n return transformedVal;\r\n};\r\n\r\nexport const AudienceMeter = (props) => {\r\n const {\r\n estimatedImpressions, isImpressionTooSpecific, i18n, isDealEstimate,\r\n } = props;\r\n\r\n const classes = useDefaultStyles(getReachEstimateStyles);\r\n\r\n const arrowRef = useRef(null);\r\n const specificMeterRef = useRef(null);\r\n const broadMeterRef = useRef(null);\r\n\r\n const [arrowStyles, setArrowStyles] = useState(null);\r\n const [arrowType, setArrowType] = useState(null);\r\n const [broadMeterStyle, setBroadMeterStyle] = useState(null);\r\n const [specificMeterStyle, setSpecificMeterStyle] = useState(null);\r\n\r\n const calcBroadPos = useCallback((value) => {\r\n const specificMeterSize = specificMeterRef.current.offsetWidth;\r\n const broadMeterSize = broadMeterRef.current.offsetWidth;\r\n const arrowGap = arrowRef.current.style.borderLeftWidth;\r\n\r\n const broadScalePos = value * ((broadMeterSize - arrowGap) / meterProps.max);\r\n\r\n // Offset final position with specific meter width\r\n return (0.1 * specificMeterSize) + broadScalePos;\r\n }, [arrowRef, specificMeterRef, broadMeterRef]);\r\n\r\n const moveAlongBroad = useCallback((value) => {\r\n if (arrowRef && arrowRef.current) {\r\n setArrowStyles({\r\n left: calcBroadPos(value),\r\n borderTopColor: 'green',\r\n backgroundColor: '#107C10',\r\n });\r\n setArrowType('arrow-broad');\r\n }\r\n\r\n if (isDealEstimate && specificMeterRef.current && broadMeterRef.current) {\r\n const totalWidth = (0.1 * specificMeterRef.current.clientWidth) + broadMeterRef.current.clientWidth;\r\n const estimatePos = calcBroadPos(value);\r\n\r\n setSpecificMeterStyle({\r\n width: '100%',\r\n });\r\n setBroadMeterStyle({\r\n width: `${(estimatePos / totalWidth) * 100}%`,\r\n marginLeft: 0,\r\n });\r\n setArrowStyles({\r\n visibility: 'hidden',\r\n });\r\n }\r\n }, [isDealEstimate, calcBroadPos]);\r\n\r\n const calcSpecificPos = useCallback((value) => {\r\n const specificMeterSize = specificMeterRef.current.offsetWidth;\r\n const arrowGap = arrowRef.current.style.borderLeftWidth;\r\n\r\n return value * ((specificMeterSize - arrowGap) / meterProps.max);\r\n }, [arrowRef, specificMeterRef]);\r\n\r\n const moveToSpecific = useCallback(() => {\r\n const midPointVal = 50; // percentage\r\n\r\n if (arrowRef && arrowRef.current) {\r\n setArrowStyles({\r\n left: calcSpecificPos(midPointVal),\r\n borderTopColor: 'red',\r\n backgroundColor: '#A80000',\r\n });\r\n setArrowType('arrow-narrow');\r\n }\r\n }, [calcSpecificPos]);\r\n\r\n useEffect(() => {\r\n if (arrowRef.current && specificMeterRef.current && broadMeterRef.current) {\r\n if (isImpressionTooSpecific) {\r\n moveToSpecific();\r\n } else {\r\n moveAlongBroad(calcBroadMeterValue(estimatedImpressions));\r\n }\r\n }\r\n }, [moveAlongBroad, moveToSpecific, estimatedImpressions, isImpressionTooSpecific, arrowRef, specificMeterRef, broadMeterRef]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('Low'))}\r\n
\r\n
\r\n {i18n.getString(_TL_('High'))}\r\n
\r\n
\r\n );\r\n};\r\n\r\nAudienceMeter.propTypes = {\r\n estimatedImpressions: PropTypes.number,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isImpressionTooSpecific: PropTypes.bool,\r\n isDealEstimate: PropTypes.bool,\r\n};\r\n\r\nAudienceMeter.defaultProps = {\r\n estimatedImpressions: null,\r\n isImpressionTooSpecific: false,\r\n isDealEstimate: false,\r\n};\r\n","const unitValueMap = {\r\n None: {\r\n value: 1,\r\n unit: '',\r\n },\r\n Thousand: {\r\n value: 1000,\r\n unit: 'K',\r\n },\r\n Million: {\r\n value: 1000000,\r\n unit: 'M',\r\n },\r\n Billion: {\r\n value: 1000000000,\r\n unit: 'B',\r\n },\r\n};\r\n\r\nexport { unitValueMap };\r\n","import PropTypes from 'prop-types';\r\nimport React, { useState, useEffect, useCallback, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { useFetch } from 'use-http';\r\nimport classNames from 'classnames';\r\nimport { Stack, Spinner, SpinnerSize, MessageBar, MessageBarType } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { getReachEstimateStyles } from './reach-estimate-styles';\r\nimport { AudienceMeter } from './audience-meter';\r\nimport { unitValueMap } from './utils';\r\n\r\nexport const tooNarrowFlag = 'ToNarrow';\r\nexport const tooNarrowErrorMessage = _TL_('Your targeting is too narrow. Update your targets to broaden your audience and increase estimated impressions.');\r\n\r\nconst title = _TL_('Potential monthly impressions');\r\n\r\nconst ReachEstimate = (props) => {\r\n const {\r\n i18n,\r\n permissions,\r\n targets,\r\n accountId,\r\n customerId,\r\n updateValidation,\r\n validationProps,\r\n shouldServeOnMSAN,\r\n } = props;\r\n\r\n const classes = useDefaultStyles(getReachEstimateStyles);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const {\r\n post: fetchReachEstimation,\r\n response: reachEstimationResponse,\r\n loading: reachEstimationLoading,\r\n error: reachEstimationError,\r\n } = useFetch(`Customers(${customerId})/Accounts(${accountId})/planner/AudienceEstimation`);\r\n\r\n const [currentTargets, setCurrentTargets] = useState(null);\r\n\r\n const [showPanel, setShowPanel] = useState(true);\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n const [estimatedImpressions, setEstimatedImpressions] = useState();\r\n const [estimatedImpressionsText, setEstimatedImpressionsText] = useState();\r\n const [isImpressionTooSpecific, setIsImpressionTooSpecific] = useState();\r\n\r\n const [errorMessage, setErrorMessage] = useState();\r\n\r\n const updateEstimatesOnMeter = useCallback((data) => {\r\n if (!data || !data.estImpression) {\r\n return;\r\n }\r\n\r\n const estImpressionsVal = data.estImpression.value;\r\n const estImpressionsUnit = unitValueMap[data.estImpression.unit].unit;\r\n const estImpressionsUnitVal = unitValueMap[data.estImpression.unit].value;\r\n\r\n const estImpressionsText = `${estImpressionsVal}${estImpressionsUnit}`;\r\n const estImpressions = estImpressionsVal * estImpressionsUnitVal;\r\n\r\n setEstimatedImpressions(estImpressions);\r\n setEstimatedImpressionsText(estImpressionsText);\r\n setIsImpressionTooSpecific(data.isImpressionTooSpecific);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (shouldServeOnMSAN) {\r\n if (isImpressionTooSpecific && !permissions.IsAmplifyEnabled) {\r\n updateValidation([i18n.getString(_TL_('Targeting too specific'))], { [validationProps.field]: tooNarrowFlag }, false);\r\n } else if (isLoading) {\r\n updateValidation([i18n.getString(_TL_('Loading'))], { [validationProps.field]: null }, false);\r\n } else {\r\n updateValidation([], { [validationProps.field]: null }, false);\r\n }\r\n }\r\n }, [i18n, isLoading, updateValidation, isImpressionTooSpecific, permissions.IsAmplifyEnabled, validationProps, shouldServeOnMSAN]);\r\n\r\n const updatePanel = useCallback((data) => {\r\n let currentErrorMessage = null;\r\n if (_.get(data, ['estImpression', 'value']) || data.isImpressionTooSpecific) {\r\n setShowPanel(true);\r\n updateEstimatesOnMeter(data);\r\n\r\n if (data.isImpressionTooSpecific && !permissions.IsAmplifyEnabled) {\r\n currentErrorMessage = tooNarrowErrorMessage;\r\n }\r\n setErrorMessage(currentErrorMessage && i18n.getString(currentErrorMessage));\r\n } else {\r\n setShowPanel(false);\r\n }\r\n }, [i18n, permissions.IsAmplifyEnabled, updateEstimatesOnMeter]);\r\n\r\n useEffect(() => {\r\n if (!reachEstimationLoading) {\r\n const { data } = reachEstimationResponse;\r\n\r\n setIsLoading(false);\r\n\r\n if (data) {\r\n updatePanel(data);\r\n }\r\n\r\n if (reachEstimationError) {\r\n setShowPanel(false);\r\n }\r\n\r\n if (activity) {\r\n activity.signal(`onReachEstimationChange - ${JSON.stringify({ estimation: data })}`);\r\n }\r\n }\r\n }, [reachEstimationError, reachEstimationLoading, reachEstimationResponse, updateValidation, updatePanel, activity]);\r\n\r\n // Allow Updating Estimates no more than once every 2000 ms\r\n const debouncedUpdateEstimate = useCallback(_.debounce(data => fetchReachEstimation('', data), 2000), [fetchReachEstimation]);\r\n\r\n useEffect(() => {\r\n if (targets && !_.isEqual(targets, currentTargets)) {\r\n setIsLoading(true);\r\n setShowPanel(true);\r\n setCurrentTargets(targets);\r\n debouncedUpdateEstimate(targets);\r\n }\r\n }, [targets, debouncedUpdateEstimate, currentTargets]);\r\n\r\n return (\r\n
\r\n {showPanel &&\r\n
\r\n \r\n {isLoading ? (\r\n <>\r\n
{i18n.getString(title)}
\r\n \r\n \r\n \r\n \r\n )\r\n : (\r\n <>\r\n \r\n
{i18n.getString(`${title}: `)}
\r\n
{estimatedImpressionsText}
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n {i18n.getString(_TL_('These are estimates based on your targeting and audience settings.'))}\r\n
\r\n {errorMessage &&\r\n \r\n {errorMessage}\r\n \r\n }\r\n
\r\n \r\n )\r\n }\r\n
\r\n
\r\n }\r\n
\r\n );\r\n};\r\n\r\nReachEstimate.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n permissions: PropTypes.shape({\r\n IsAmplifyEnabled: PropTypes.bool,\r\n IsKPIEstimateForAudienceFeedBasedEnabled: PropTypes.bool,\r\n }).isRequired,\r\n shouldServeOnMSAN: PropTypes.bool,\r\n targets: PropTypes.shape({}),\r\n accountId: PropTypes.number.isRequired,\r\n customerId: PropTypes.number.isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n validationProps: PropTypes.shape({\r\n field: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nReachEstimate.defaultProps = {\r\n targets: null,\r\n shouldServeOnMSAN: false,\r\n};\r\n\r\n\r\nconst validatedReachEstimate = withCustomValidation(ReachEstimate);\r\n\r\nexport { validatedReachEstimate as ReachEstimate };\r\n","export const getDealPotentialImpression = () => ({\r\n dealImpression: {\r\n backgroundColor: 'white',\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n padding: 10,\r\n width: 400,\r\n height: 'fit-content',\r\n marginBottom: 20,\r\n '&.panel-mode': {\r\n height: 'unset',\r\n boxShadow: 'none',\r\n },\r\n '& .deal-seller': {\r\n fontSize: '18px',\r\n fontWeight: 'bold',\r\n marginBottom: '15px',\r\n },\r\n '& .deal-warning': {\r\n fontSize: '18px',\r\n fontWeight: 'bold',\r\n marginBottom: '15px',\r\n '& .deleted-text': {\r\n color: '#A80000',\r\n },\r\n },\r\n '& .desc': {\r\n fontSize: '12px',\r\n fontWeight: 'bold',\r\n },\r\n '& .impression': {\r\n fontSize: '28px',\r\n fontWeight: 'bold',\r\n },\r\n '& .deal-impression': {\r\n marginBottom: '20px',\r\n },\r\n '& .broadMeter': {\r\n backgroundColor: '#004578 !important',\r\n height: '24px !important',\r\n top: '8px !important',\r\n },\r\n '& .specificMeter': {\r\n height: '24px !important',\r\n top: '8px !important',\r\n },\r\n },\r\n});\r\n","import React, { useCallback, useEffect, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { useFetch } from 'use-http';\r\nimport BlockUi from 'react-block-ui';\r\nimport { Link, Panel, Spinner, SpinnerSize } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { useBoolean } from '@fluentui/react-hooks';\r\n\r\nimport { DealDetails, bytesForHuman, isNetflixDeal, isDealDeleted } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { AudienceMeter } from '../../steps/ad-group/reach-estimate/audience-meter';\r\nimport { getDealPotentialImpression } from './deal-potential-impression-styles';\r\nimport { unitValueMap } from '../../steps/ad-group/reach-estimate/utils';\r\n\r\nexport const DealImpressionPanel = (props) => {\r\n const {\r\n deal, i18n, isPanelMode, targets, serverContext, impression,\r\n } = props;\r\n\r\n const classes = useDefaultStyles(getDealPotentialImpression);\r\n const [isOpen, { setTrue: openPanel, setFalse: dismissPanel }] = useBoolean(false);\r\n const [estimateLoaded, setEstimateLoaded] = useState(!!impression);\r\n const [estImpression, setEstImpression] = useState(impression);\r\n\r\n const dealDeleted = isDealDeleted(deal);\r\n // hide impression for netflix\r\n const hideDealImpression = isNetflixDeal(deal) || dealDeleted;\r\n\r\n const {\r\n DynamicPermissions: {\r\n GenreTargets,\r\n },\r\n Permissions: {\r\n IsDealFilterEnabled,\r\n },\r\n } = serverContext;\r\n const shouldShowGenre = GenreTargets && IsDealFilterEnabled && deal;\r\n\r\n const {\r\n post: fetchReachEstimation,\r\n } = useFetch(`Customers(${serverContext.CurrentCustomer.Id})/Accounts(${serverContext.CurrentAccount.Id})/planner/AudienceEstimation`);\r\n\r\n const debouncedUpdateEstimate = useCallback(_.debounce((data) => {\r\n fetchReachEstimation('', data).then((res) => {\r\n if (!res) {\r\n return;\r\n }\r\n const estImpressionsVal = res.estImpression.value;\r\n const estImpressionsUnitVal = unitValueMap[res.estImpression.unit].value;\r\n const estImpressions = estImpressionsVal * estImpressionsUnitVal;\r\n\r\n // set to undefine if 0\r\n if (estImpressions === 0) {\r\n setEstImpression(undefined);\r\n } else {\r\n setEstImpression(estImpressions);\r\n }\r\n setEstimateLoaded(true);\r\n });\r\n }, 3000), []);\r\n\r\n useEffect(() => {\r\n if (!impression && !hideDealImpression) {\r\n setEstimateLoaded(false);\r\n debouncedUpdateEstimate({\r\n ...targets,\r\n DealIds: { Includes: [deal.Id] },\r\n });\r\n }\r\n }, [targets, debouncedUpdateEstimate, deal.Id, impression]);\r\n\r\n\r\n return (\r\n
\r\n {dealDeleted ?\r\n
\r\n {i18n.getString(_TL_('Media deal'))}: {i18n.getString(_TL_('Deleted'))}\r\n
\r\n :
{i18n.getString(_TL_('Media deal'))}: {deal.Name}
\r\n }\r\n { estImpression &&
{i18n.getString(_TL_('Potential impression for this deal'))}
}\r\n { estImpression &&
{bytesForHuman(estImpression)}
}\r\n\r\n {\r\n !hideDealImpression &&\r\n
\r\n } >\r\n \r\n \r\n
\r\n }\r\n {\r\n !dealDeleted &&\r\n (\r\n isPanelMode ?\r\n :\r\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\r\n {i18n.getString(_TL_('View deal'))}\r\n )\r\n }\r\n {\r\n !isPanelMode &&\r\n \r\n \r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\n\r\nDealImpressionPanel.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n impression: PropTypes.number,\r\n deal: PropTypes.shape({\r\n Seller: PropTypes.string,\r\n Name: PropTypes.string,\r\n AskPrice: PropTypes.number,\r\n EstimatedImpressions: PropTypes.number,\r\n Id: PropTypes.number,\r\n }).isRequired,\r\n isPanelMode: PropTypes.bool,\r\n serverContext: PropTypes.shape({\r\n CurrentCustomer: PropTypes.shape({ Id: PropTypes.string }),\r\n CurrentAccount: PropTypes.shape({ Id: PropTypes.string }),\r\n Permissions: PropTypes.shape({\r\n IsDealFilterEnabled: PropTypes.bool,\r\n }),\r\n DynamicPermissions: PropTypes.shape({\r\n GenreTargets: PropTypes.bool,\r\n }),\r\n }).isRequired,\r\n targets: PropTypes.shape({}),\r\n};\r\n\r\nDealImpressionPanel.defaultProps = {\r\n isPanelMode: false,\r\n impression: null,\r\n targets: {},\r\n};\r\n","import React from 'react';\r\nimport { MessageBar } from '@fluentui/react';\r\n\r\nexport const getNetflixFrequencyCapping = i18n => (\r\n
\r\n
\r\n \r\n
{i18n.getString(_TL_('The publisher\\'s frequency limits have been applied: 3 impressions/day, 14 impressions/week, and 40 impressions/month.'))}
\r\n
\r\n
\r\n
\r\n);\r\n","import React, { useEffect, useCallback, useState } from 'react';\r\nimport { MessageBar, Checkbox, Spinner, SpinnerSize } from '@fluentui/react';\r\nimport { Link } from '@bingads-webui-react/fabric-with-signal';\r\nimport PropTypes from 'prop-types';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport BlockUi from 'react-block-ui';\r\n\r\nconst NetflixTCAgreement = ({ i18n, cid, aid }) => {\r\n const [fetched, setFetched] = useState(false);\r\n const [accepted, setAccepted] = useState(false);\r\n\r\n const readAccount = useCallback(() => edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .get({ select: ['NetflixTCAccepted'] })\r\n .toPromise(), [aid, cid]);\r\n\r\n const patchAccount = useCallback(() => edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .patch({ NetflixTCAccepted: 'true' })\r\n .toPromise(), [aid, cid]);\r\n\r\n const onAccept = useCallback(() => {\r\n setFetched(false);\r\n patchAccount()\r\n .then(() => {\r\n setAccepted(true);\r\n setFetched(true);\r\n });\r\n }, [patchAccount]);\r\n\r\n useEffect(() => {\r\n readAccount().then((account) => {\r\n setFetched(true);\r\n setAccepted(account.NetflixTCAccepted === 'true');\r\n });\r\n }, [readAccount]);\r\n\r\n return (\r\n } >\r\n \r\n {i18n.getString(_TL_('I have read and agree to the '))}\r\n \r\n {i18n.getString(_TL_('Netflix Inventory Policy'))}\r\n \r\n {i18n.getString(_TL_('.'))}\r\n \r\n }\r\n checked={accepted}\r\n onChange={onAccept}\r\n disabled={accepted}\r\n defaultChecked={false}\r\n />\r\n \r\n {i18n.getString(_TL_('To be eligible to show ads on Netflix, your campaigns must meet all Netflix requirements, such as containing a bid, having a certain video quality and adhering to Netflix’s policies.'))}\r\n \r\n \r\n \r\n {\r\n i18n.getString(_TL_('Advertisers in the following verticals are required to submit their licenses and/or proof of creative approval in select markets to serve their ads on Netflix: Alcohol, Financial Services, Insurance, High fat/sugar/salt foods, online sports betting, state-run lotteries, healthcare, pharmaceuticals, and dating. Licenses and proof of creative approval can be submitted in web forms linked through the'))\r\n }\r\n \r\n \r\n {i18n.getString(_TL_('Restricted policy page.'))}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nNetflixTCAgreement.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n};\r\n\r\nexport { NetflixTCAgreement };\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useState, useCallback, useMemo } from 'react';\r\nimport _, { compact } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { Link } from '@bingads-webui-react/fabric-with-signal';\r\nimport { MessageBarType, MessageBar } from '@fluentui/react';\r\nimport { Stack, Label } from '@bingads-webui-react/fabric-control';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { getLocationTargetTitleDetails, getAdScheduleDetails, getBidTitleDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { CustomValidatedDefaultBid } from '@bingads-webui-campaign-react/default-bid';\r\nimport { AdGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ValidatedLegacyDateSetting, getDateSettingDetails } from '@bingads-webui-campaign/date-setting';\r\nimport { ValidatedLocationTargetSetting } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { withStepLoadingShell } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { ValidatedLegacyAdSchedule } from '@bingads-webui-campaign/ad-schedule';\r\nimport { SEARCH_TYPE } from '@bingads-webui-react/bing-maps';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n FormErrorGroup, UnmappedFormErrors,\r\n entityIs, andComp, propertyIs, anyComp, notComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup, withActuation, FocusableActuator } from '@bingads-webui-campaign-react/actuator';\r\nimport { ERROR_ENTITY, getPanelErrorProps, getConvertedCurrencyDealMinimumBid, getAccountExchangeRateFromLocalStorage } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport {\r\n Collapse,\r\n TextTitle,\r\n useCollapseState,\r\n ValidatedBootstrapPanel,\r\n ValidatedFixedPanel,\r\n ValidatedPanel,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n isXandrDisplayAdsCampaign,\r\n isXandrVideoAdsCampaign,\r\n CampaignSubTypes,\r\n campaignShouldServeOnMSAN,\r\n isXandrServing,\r\n ScopeLevel\r\n} from '@bingads-webui-campaign-react/constants';\r\nimport { Alert } from '@bingads-webui-react/alert';\r\nimport {\r\n ValidatedCompanyPicker,\r\n formatCompany,\r\n ValidatedIndustryPicker,\r\n formatIndustry,\r\n ValidatedJobFunctionPicker,\r\n formatJobFunction,\r\n PredictiveTargetingHeader,\r\n PredictiveTargetingControlHeader,\r\n SectionShimmer,\r\n} from '@bingads-webui-campaign-react/display-plus-native-ads';\r\nimport { ValidatedCustomSegmentsPicker, formatCustomSegment } from '@bingads-webui-campaign-react/custom-segments-edit-create';\r\nimport { ServerValidatedWebExclusionsWithValidation, webExclusionPropertyVal } from '@bingads-webui-react/web-exclusions';\r\nimport { getContentTargetingPlacementsSummaryText, ContentTargetingPlacements } from '@bingads-webui-campaign-react/display-plus-campaigns/src/steps/adgroup/components/content-targeting-placements';\r\nimport { ServerValidatedRemainingCharsValidatedTextField } from '../../common/shared-components';\r\nimport { useStepAdGroupSettingsState } from './use-step-ad-group-state';\r\nimport { AgeRange, formatAgeRanges } from './target/age-range';\r\nimport { Gender, formatGenders } from './target/gender';\r\nimport { Device, formatDevices } from './target/device';\r\nimport { ValidatedAudiencePicker, formatAudience } from './target/audience-picker';\r\nimport { ValidatedFrequencyCapping } from './frequency-capping';\r\nimport { ValidatedGenreTargets, formatGenreTargets } from './genre-targeting';\r\nimport { getGenreOptions, getDealGenreOptions } from './genre-targeting/genre-options';\r\nimport { getAdGroupStepStyles } from './step-ad-group-settings-styles';\r\nimport { ReachEstimate, tooNarrowFlag, tooNarrowErrorMessage } from './reach-estimate';\r\nimport { DealImpressionPanel } from '../../common/deal-potential-impression/deal-potential-impression';\r\nimport { getNetflixFrequencyCapping } from './frequency-capping/netflixFrequencyCapping';\r\nimport { NetflixTCAgreement } from './netflix-tc/netflix-tc-agreement';\r\n\r\nconst FocusableErrorMessage = withActuation(ErrorMessages, { Actuators: [FocusableActuator] });\r\n\r\nconst entityIsAdGroup = entityIs(ERROR_ENTITY.AdGroup);\r\n\r\nconst adGroupUrlOptionsProperties = notComp(andComp(\r\n entityIsAdGroup,\r\n anyComp(\r\n propertyIs('TrackingUrlTemplate'),\r\n propertyIs('UrlCustomParameters'),\r\n propertyIs('FinalUrlSuffix')\r\n )\r\n));\r\n\r\nexport const adGroupNameProp = andComp(entityIsAdGroup, propertyIs('Name'));\r\nexport const adGroupBidProp = andComp(entityIsAdGroup, anyComp(propertyIs('Bid'), propertyIs('BidAmount')));\r\nfunction StepAdGroupSettings(props) {\r\n const {\r\n stepService,\r\n } = props;\r\n\r\n const [optimizedTargetingEnabled, setOptimizedTargetingEnabled] = useState(false);\r\n\r\n const [stepState, stepApi] = useStepAdGroupSettingsState(stepService);\r\n\r\n const [adScheduleView, setAdScheduleView] = useState(null);\r\n const setAdScheduleViewCallback = useCallback((view) => {\r\n setAdScheduleView(view);\r\n }, []);\r\n\r\n const {\r\n i18n,\r\n legacyI18n,\r\n hideStepHeader,\r\n serverContext,\r\n bundleCountries,\r\n locationTargets,\r\n bundleLocationCriterions,\r\n adSchedules,\r\n campaignTimeZone,\r\n genreTargets,\r\n ageRanges,\r\n genderTypes,\r\n deviceTypes,\r\n deviceRestrictions,\r\n deviceRestricted,\r\n companyNameTargets,\r\n negativeCompanyNameTargets,\r\n jobTargets,\r\n negativeJobTargets,\r\n industry,\r\n negativeIndustry,\r\n locationRestricted,\r\n dealLocationList,\r\n genreRestricted,\r\n ageRestricted,\r\n genderRestricted,\r\n audienceRestricted,\r\n campaignBiddingStrategy,\r\n campaignSubtype,\r\n scope,\r\n adGroup,\r\n adGroupErrors,\r\n systemErrors,\r\n navigationConfirmationPrompt,\r\n reachEstimationTargets,\r\n serverErrors,\r\n dealDetails,\r\n areBeaconsActive,\r\n showAllValidationErrors,\r\n campaignSettings,\r\n customSegments,\r\n placements,\r\n exclusions,\r\n initialAdGroup,\r\n } = stepState;\r\n const { onAdGroupValidation } = stepApi;\r\n\r\n const {\r\n DynamicPermissions: {\r\n XandrVideoCampaignsAudienceTargets,\r\n XandrNegativeTarget,\r\n XandrDeviceTarget,\r\n GenreTargets,\r\n ShowNetflixTCAccepted,\r\n AgeGenderDisclaimer,\r\n EnableMSANDisplayCampaigns,\r\n EnableMSANVideoCampaigns,\r\n EnableKeywordCustomSegments,\r\n ContentTargeting,\r\n ContentTargetingMSNSubcategories,\r\n CampaignLifetimeBudget,\r\n },\r\n Permissions: {\r\n IsDealFilterEnabled,\r\n },\r\n CurrentCustomer: {\r\n Id: cid,\r\n },\r\n CurrentAccount: {\r\n Id: aid,\r\n },\r\n NetflixEnabledCountryCodes = 'GB',\r\n } = serverContext;\r\n\r\n const shouldServeOnMSAN = campaignShouldServeOnMSAN(campaignSettings);\r\n const isEnableMSANDisplayCampaignsEnabled = EnableMSANDisplayCampaigns && isXandrDisplayAdsCampaign(campaignSubtype) && shouldServeOnMSAN;\r\n const isEnableMSANVideoCampaignsEnabled = EnableMSANVideoCampaigns && isXandrVideoAdsCampaign(campaignSubtype) && shouldServeOnMSAN;\r\n\r\n const isMSANEnabled = isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled;\r\n const isXandrServingCampaign = isXandrServing(campaignSubtype, campaignSettings);\r\n\r\n const basicOptions = compact([\r\n 'ad-group',\r\n 'bid',\r\n 'locations',\r\n 'age-range',\r\n 'gender',\r\n 'start-end-date',\r\n isMSANEnabled && 'predictive-targeting',\r\n isMSANEnabled && 'web-exclusions',\r\n !isMSANEnabled && 'audience',\r\n !isMSANEnabled && 'device',\r\n !isMSANEnabled && 'frequency-capping',\r\n !isMSANEnabled && 'ad-schedule',\r\n !isMSANEnabled && 'genre-targets',\r\n !isMSANEnabled && 'netflix-tc',\r\n ]);\r\n\r\n const [\r\n allAdGroupSettingsSections,\r\n adGroupSettingsExpandedSections,\r\n setAdGroupSettingsExpandedSections,\r\n flipAdGroupSettingsExpandAllState,\r\n ] = useCollapseState(\r\n basicOptions /* all sections */,\r\n dealDetails ? ['ad-group', 'bid'] : ['ad-group', 'bid', 'locations'] /* initially expanded sections */\r\n );\r\n\r\n const [\r\n allAdGroupSettingsTargetingSections,\r\n adGroupSettingsTargetingExpandedSections,\r\n setAdGroupSettingsTargetingExpandedSections,\r\n ] = useCollapseState(\r\n compact([\r\n 'audience',\r\n 'device',\r\n 'company-target',\r\n 'job-target',\r\n 'industry-target',\r\n 'frequency-capping',\r\n 'ad-schedule',\r\n 'genre-targets',\r\n 'netflix-tc',\r\n 'predictive-targeting-control',\r\n 'start-end-date',\r\n EnableKeywordCustomSegments && 'custom-segments',\r\n ContentTargeting && 'content-targeting-placements',\r\n ]) /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n\r\n const classes = useDefaultStyles(getAdGroupStepStyles);\r\n const isDealTypeRestricted = dealDetails && _.isEqual('Restricted', dealDetails.Type);\r\n const shouldUsePredefinedFrequencyLimit = isDealTypeRestricted;\r\n const shouldHideDeviceListForDeal = isDealTypeRestricted;\r\n\r\n let bidType = (campaignBiddingStrategy && campaignBiddingStrategy.Type === 'ManualCpm') ? 'CpmBid' : 'CpvBid';\r\n if (campaignBiddingStrategy.Type === 'EnhancedCpc') {\r\n bidType = 'SearchBid';\r\n }\r\n\r\n let bidRange = serverContext.KeywordBidRange;\r\n\r\n if (isXandrServing(campaignSubtype, campaignSettings) && isXandrVideoAdsCampaign(campaignSubtype)) {\r\n bidRange = bidType === 'CpmBid' ? serverContext.VideoViewsCPMBidRange : serverContext.VideoViewsCPVBidRange;\r\n }\r\n\r\n if (isXandrDisplayAdsCampaign(campaignSubtype)) {\r\n bidRange = serverContext.KeywordCPMBidRange;\r\n }\r\n\r\n const shouldShowDealLocationTarget = IsDealFilterEnabled && dealDetails && !locationRestricted;\r\n const isDealGenreRestricted = GenreTargets && IsDealFilterEnabled && dealDetails && dealDetails.Genre;\r\n const genreOptions = useMemo(() => _.sortBy(isDealGenreRestricted ? getDealGenreOptions(i18n) : getGenreOptions(i18n), 'name'), [i18n, isDealGenreRestricted]);\r\n\r\n const isCTVSupported = !isXandrDisplayAdsCampaign(campaignSubtype) && bidType === 'CpvBid';\r\n const isXandrVideoCampaignsAudienceTargetsEnabled = XandrVideoCampaignsAudienceTargets;\r\n\r\n const shouldShowDeviceTarget = (!dealDetails && bidType !== 'CpvBid' && !isXandrDisplayAdsCampaign(campaignSubtype) && XandrDeviceTarget) || !isXandrServingCampaign;\r\n\r\n let dealMinimumBid = 0;\r\n if (dealDetails) {\r\n const exchangeRateMapping = getAccountExchangeRateFromLocalStorage(serverContext);\r\n dealMinimumBid = getConvertedCurrencyDealMinimumBid(dealDetails.MinimumBid, dealDetails.Currency, serverContext.CurrentAccount.CurrencyCode, exchangeRateMapping.val);\r\n }\r\n\r\n const bidValidationProps = {\r\n field: bidType,\r\n schema: {\r\n properties: {\r\n [bidType]: {\r\n type: 'number',\r\n minimum: dealDetails ? Math.max(dealMinimumBid, bidRange.FloorValue) : bidRange.FloorValue,\r\n maximum: dealDetails ? null : bidRange.CeilingValue,\r\n required: true,\r\n },\r\n },\r\n },\r\n };\r\n\r\n const reachEstimationToNarrowErrorMessage = useMemo(() => {\r\n if (adGroup.data.reachEstimation === tooNarrowFlag) {\r\n return [i18n.getString(tooNarrowErrorMessage)];\r\n }\r\n return null;\r\n }, [adGroup.data.reachEstimation, i18n]);\r\n\r\n const basicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAdGroupSettingsExpandedSections }),\r\n [setAdGroupSettingsExpandedSections]\r\n );\r\n\r\n const shouldHideAudiences = !isXandrVideoCampaignsAudienceTargetsEnabled && isCTVSupported;\r\n\r\n const getAdScheduleDetailsCombined = useMemo(() => {\r\n const adScheduleDetails = getAdScheduleDetails(i18n, adScheduleView && adScheduleView.current, true);\r\n\r\n return ` ${adScheduleDetails}`;\r\n }, [adScheduleView, i18n]);\r\n\r\n const NetflixEnabledCountryCodesArr = useMemo(() => NetflixEnabledCountryCodes.split(','), [NetflixEnabledCountryCodes]);\r\n const BundleCountriesCodesArr = useMemo(() => (bundleLocationCriterions && bundleLocationCriterions.map(c => c && c.Criterion && c.Criterion.LocationCriterion && c.Criterion.LocationCriterion.CountryCode)) || [], [bundleLocationCriterions]);\r\n\r\n const webExclusionsError = serverErrors && serverErrors.filter(err => err.property === 'webExclusions');\r\n\r\n const shouldShowNetflixTC = useMemo(() =>\r\n ShowNetflixTCAccepted &&\r\n isCTVSupported &&\r\n locationTargets &&\r\n (\r\n locationTargets.currentLevelSettings.targetOption === 'everywhere' ||\r\n (\r\n locationTargets.currentLevelSettings.targetOption === 'bundle'\r\n && BundleCountriesCodesArr.some(bundleCountry => NetflixEnabledCountryCodesArr.indexOf(bundleCountry) >= 0)\r\n ) ||\r\n (\r\n locationTargets.currentLevelSettings.targetOption === 'specific' &&\r\n _.some(\r\n locationTargets.currentLevelSettings.currentLocations,\r\n location => location.SelectionStatus === 'Included'\r\n && location.Criterion.LocationCriterion\r\n && NetflixEnabledCountryCodesArr.indexOf(location.Criterion.LocationCriterion.CountryCode) >= 0\r\n )\r\n )\r\n ), [ShowNetflixTCAccepted, isCTVSupported, locationTargets, NetflixEnabledCountryCodesArr, BundleCountriesCodesArr]);\r\n\r\n const isFCapEnabled = useMemo(() => (bidType === 'CpmBid'), [bidType]);\r\n\r\n const shouldSelectAllDeviceByDefault = useMemo(() => {\r\n if (campaignSubtype === CampaignSubTypes.AudienceStatic || !isXandrServingCampaign) {\r\n if (adGroup.data && _.isArray(adGroup.data.initialDeviceTypes) && adGroup.data.initialDeviceTypes.length === 0) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }, [campaignSubtype, adGroup, isXandrServingCampaign]);\r\n\r\n const deviceTargetingPanel = useMemo(() => (\r\n }\r\n >\r\n \r\n \r\n ), [deviceTypes, deviceRestrictions, i18n, isCTVSupported, shouldSelectAllDeviceByDefault]);\r\n\r\n const audienceTargetingPanel = useMemo(() => (\r\n }\r\n >\r\n new Date())}\r\n />\r\n \r\n ), [adGroup.data.audiences, i18n, campaignSubtype, campaignSettings, campaignBiddingStrategy, XandrNegativeTarget, initialAdGroup, adGroup]);\r\n\r\n const genreTargetingPanel = useMemo(() => (\r\n }\r\n >\r\n \r\n \r\n ), [genreTargets, genreOptions, i18n]);\r\n\r\n const adScheduleTargetingPanel = useMemo(() => (\r\n }\r\n >\r\n {\r\n !dealDetails &&\r\n \r\n }\r\n \r\n ), [adGroup, adSchedules, dealDetails, setAdScheduleViewCallback, getAdScheduleDetailsCombined]);\r\n\r\n const getBasicSettingsSection = () => (\r\n
\r\n \r\n \r\n \r\n {adGroupSettingsExpandedSections.length ? i18n.getString(_TL_('Collapse all')) : i18n.getString(_TL_('Expand all'))}\r\n \r\n {reachEstimationToNarrowErrorMessage &&\r\n
\r\n \r\n
\r\n }\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'budget',\r\n }}\r\n >\r\n \r\n \r\n {\r\n shouldUsePredefinedFrequencyLimit ?\r\n getNetflixFrequencyCapping(i18n)\r\n :\r\n (isFCapEnabled || !(isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled)) &&\r\n \r\n }\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n new Date()),\r\n },\r\n }}\r\n />\r\n \r\n {\r\n !(dealLocationList && dealLocationList.length === 0) && (!shouldHideDeviceListForDeal || shouldShowDealLocationTarget) &&\r\n }\r\n >\r\n 0)}\r\n scope={scope}\r\n bidStrategyType=\"placeholder\"\r\n strings={{\r\n description: i18n.getString(_TL_('For example, a country/region, state/province, or ZIP/postal code.')),\r\n }}\r\n />\r\n \r\n }\r\n {\r\n shouldShowNetflixTC &&\r\n }\r\n >\r\n \r\n \r\n }\r\n {\r\n !ageRestricted && !shouldHideAudiences &&\r\n }\r\n >\r\n \r\n \r\n }\r\n {\r\n !genderRestricted && !shouldHideAudiences &&\r\n }\r\n >\r\n \r\n \r\n }\r\n {\r\n !shouldHideAudiences && (isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled) &&\r\n : }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n
\r\n \r\n }\r\n {\r\n (((dealDetails && !(deviceRestricted && deviceTypes.length === 0) && !shouldHideDeviceListForDeal)) || shouldShowDeviceTarget) &&\r\n deviceTargetingPanel\r\n }\r\n {\r\n !audienceRestricted && !shouldHideAudiences &&\r\n (!isEnableMSANDisplayCampaignsEnabled || !isEnableMSANVideoCampaignsEnabled) &&\r\n audienceTargetingPanel\r\n }\r\n {\r\n ((!genreRestricted && isCTVSupported) || (isDealGenreRestricted)) &&\r\n (!isEnableMSANDisplayCampaignsEnabled || !isEnableMSANVideoCampaignsEnabled) &&\r\n genreTargetingPanel\r\n }\r\n {\r\n (!isEnableMSANDisplayCampaignsEnabled || !isEnableMSANVideoCampaignsEnabled) &&\r\n adScheduleTargetingPanel\r\n }\r\n {\r\n (isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled) &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'web-exclusions',\r\n }}\r\n >\r\n \r\n {i18n.getString(_TL_('Which websites should not show your ads and which IP addresses should be blocked from seeing your ads?'))}\r\n \r\n \r\n \r\n }\r\n \r\n {\r\n (isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled) &&\r\n \r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('Targeting preferences (optional)'))}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n {\r\n (((dealDetails && !(deviceRestricted && deviceTypes.length === 0) && !shouldHideDeviceListForDeal)) || shouldShowDeviceTarget) &&\r\n deviceTargetingPanel\r\n }\r\n {\r\n !audienceRestricted && !shouldHideAudiences &&\r\n audienceTargetingPanel\r\n }\r\n {\r\n !shouldHideAudiences &&\r\n }\r\n >\r\n \r\n \r\n }\r\n {\r\n !shouldHideAudiences &&\r\n }\r\n >\r\n \r\n \r\n }\r\n {\r\n !shouldHideAudiences &&\r\n }\r\n >\r\n \r\n \r\n }\r\n {\r\n ((!genreRestricted && isCTVSupported) ||\r\n (isDealGenreRestricted))\r\n &&\r\n genreTargetingPanel\r\n }\r\n {adScheduleTargetingPanel}\r\n {EnableKeywordCustomSegments &&\r\n }\r\n noOverflowHidden\r\n >\r\n \r\n \r\n }\r\n {ContentTargeting &&\r\n }\r\n >\r\n \r\n \r\n }\r\n {\r\n !shouldHideAudiences &&\r\n )\r\n : \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n {!optimizedTargetingEnabled ?\r\n i18n.getString(_TL_('Predictive targeting is automatically enabled. You can disable it by setting a targeting preference.'))\r\n : i18n.getString(_TL_('Turning off predictive targeting significantly limits our ability to help you reach the best audience for your campaign.'))\r\n }\r\n\r\n \r\n \r\n }\r\n \r\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n
\r\n }\r\n \r\n
\r\n {\r\n dealDetails &&\r\n \r\n }\r\n {\r\n !dealDetails &&\r\n \r\n }\r\n
\r\n \r\n
);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {!hideStepHeader &&\r\n <>\r\n

{i18n.getString(_TL_('Ad group'))}

\r\n {i18n.getString(_TL_(''))}\r\n \r\n }\r\n
\r\n {/* // TODO: add error handling for \"CampaignServiceDuplicateAdGroupCriterion\" */}\r\n \r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n {getBasicSettingsSection()}\r\n \r\n {navigationConfirmationPrompt}\r\n {AgeGenderDisclaimer && not use individuals’ demographics—such as age, gender, location, etc.—for the purpose of personalizing advertising, segmenting, or profiling customers.'))}\r\n level=\"Info\"\r\n icon={(
)}\r\n dismissible={false}\r\n />}\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nStepAdGroupSettings.propTypes = {\r\n stepService: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nconst withLoadingShell = withStepLoadingShell(StepAdGroupSettings);\r\n\r\nexport { withLoadingShell as StepAdGroupSettings };\r\n","const globalLegacyI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/campaign-creation-advanced');\r\n\r\nconst parseLoadDate = (i18n, dateString) => globalLegacyI18n.parseDate(dateString.substring(0, 10), { raw: 'yyyy-MM-dd' });\r\n\r\nconst parseDateFromAPIFormat = (i18n, date) => {\r\n if (date == null) {\r\n return null;\r\n }\r\n\r\n if (typeof date === 'string') {\r\n return globalLegacyI18n.parseDate(date.substring(0, 10), { raw: 'M/d/yyyy' });\r\n }\r\n\r\n return date;\r\n};\r\n\r\n\r\n// keeping unused i18n in case we find bugs with replacement to globalLegacyI18n and change need to be reverted\r\nexport const formatDateToAPIFormat = (i18n, date) => {\r\n if (date == null) {\r\n return '';\r\n }\r\n\r\n if (typeof date === 'string') {\r\n return date;\r\n }\r\n\r\n return globalLegacyI18n.formatDate(date, {\r\n raw: 'M/d/yyyy',\r\n });\r\n};\r\n\r\nexport const modelToViewModelForDateSetting = ({ model, i18n }) => ({\r\n StartDate: parseLoadDate(i18n, model.StartDate),\r\n EndDate: model.EndDate ? parseLoadDate(i18n, model.EndDate) : undefined,\r\n});\r\n\r\nexport const bulkModelToViewModelForDateSetting = ({ model, i18n }) => ({\r\n StartDate: parseDateFromAPIFormat(i18n, model.StartDate),\r\n EndDate: model.EndDate ? parseDateFromAPIFormat(i18n, model.EndDate) : undefined,\r\n});\r\n\r\nexport const viewModelToBulkModelForDateSetting = ({ viewModel, i18n }) => ({\r\n StartDate: formatDateToAPIFormat(i18n, viewModel.data.StartDate),\r\n EndDate: viewModel.data.EndDate ? formatDateToAPIFormat(i18n, viewModel.data.EndDate) : '1/1/3000',\r\n});\r\n","import { each, pick, extend, defaults, omit, isString, isEmpty, has, get, find, isArray, without } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport {\r\n modelToViewModelForLocationTargets,\r\n modelToViewModelForDayTimeTargets,\r\n bulkModelToViewModelForLocationTargets,\r\n bulkModelToViewModelForDayTimeTargets,\r\n modelToViewModelForAudienceCriterions,\r\n modelToViewModelForPlacements,\r\n} from './ad-group-criterions';\r\nimport { modelToViewModelForTargetCriterions } from './criterions';\r\n\r\nimport { AdGroupNegativeReferenceId } from '../common/constants';\r\nimport { modelToViewModelForDateSetting, viewModelToBulkModelForDateSetting, bulkModelToViewModelForDateSetting } from '../common/date-settings';\r\n\r\nconst whitelistedSchemaPropertyKeysForModel = [\r\n 'Id', 'Name', 'Status', 'BidStrategyName', 'Campaign', 'CpmBid', 'CpvBid', 'SearchBid',\r\n 'AdScheduleUseSearcherTimeZone', 'StartDate', 'EndDate', 'FrequencyCapSettings',\r\n 'TrackingUrlTemplate', 'FinalUrlSuffix', 'UrlCustomParameters',\r\n];\r\n\r\nconst readonlyPropertyKeysForModel = [\r\n 'StartDate',\r\n];\r\n\r\nexport const modelToViewModelForAdGroup = ({\r\n adGroupModel,\r\n campaignModel,\r\n locationCriterionsModel,\r\n campaignLocationCriterionsModel,\r\n campaignDeviceCriterions,\r\n dayTimeCriterionsModel,\r\n bundleCountries,\r\n targetCriterionsModel,\r\n audienceCriterionsModel,\r\n placementCriterionsModel,\r\n i18n,\r\n isAudienceAds = false,\r\n isAudienceAdGroupEdit = false,\r\n isDisplayAds = false,\r\n isVideoAds = false,\r\n defaultAdGroupData = null,\r\n defaultTargeting = null,\r\n isXandrServing = false,\r\n separateIMA = false,\r\n campaignExclusions,\r\n adgroupExclusions,\r\n ads,\r\n}) => {\r\n let data = pick(adGroupModel, whitelistedSchemaPropertyKeysForModel);\r\n\r\n if (isAudienceAds) {\r\n const AdRotationSettings = get(adGroupModel, 'AdRotation', {}) || {};\r\n data.AdRotation = AdRotationSettings.RotationType;\r\n }\r\n\r\n if (campaignExclusions || adgroupExclusions) {\r\n data.exclusions = {\r\n campaignExclusions,\r\n adgroupExclusions,\r\n };\r\n }\r\n\r\n if (isAudienceAds ||\r\n (!isXandrServing && isDisplayAds) ||\r\n (!isXandrServing && isVideoAds)) {\r\n if (adGroupModel.UseOptimizedTargeting != null) {\r\n data.UseOptimizedTargeting = adGroupModel.UseOptimizedTargeting;\r\n }\r\n\r\n /**\r\n * NOTE: this is where the default values from getDefaultAdGroup() - are gettting over-written by the value from the adGroupModel odata response.\r\n * MT odata response for AdGroup can have values missing or different from getDefaultAdGroup()\r\n * example: responds with a default value (0.05) for SearchBid, even when it was NOT set by the Bulk Upsert call.\r\n */\r\n\r\n data.CampaignSubType = campaignModel && campaignModel.CampaignSubType;\r\n data.CampaignBidStrategyName = campaignModel && campaignModel.BiddingScheme.Type;\r\n\r\n const adGroupSettings = get(adGroupModel, 'Settings', []);\r\n\r\n const BoostPlacementSetting = find(adGroupSettings, setting => setting['@odata.type'] === '#Model.BoostPlacementSetting') || {};\r\n\r\n data.BoostAdunitIds = BoostPlacementSetting.AdUnitIds;\r\n data.BoostPublisherIds = BoostPlacementSetting.PublisherIds;\r\n data.BoostAccountIds = BoostPlacementSetting.AccountIds;\r\n data.BoostTriggerIds = BoostPlacementSetting.TriggerIds;\r\n\r\n const adGroupTargetSettings = get(adGroupModel, 'TargetSetting', null);\r\n if (adGroupTargetSettings) {\r\n each(adGroupTargetSettings.Details, (targetSetting) => {\r\n data[`isTargetSet${targetSetting.CriterionType}`] = !targetSetting.TargetAll;\r\n });\r\n }\r\n }\r\n\r\n if (placementCriterionsModel) {\r\n data = extend(data, modelToViewModelForPlacements({ model: placementCriterionsModel }));\r\n }\r\n\r\n if (locationCriterionsModel) {\r\n data = extend(data, modelToViewModelForLocationTargets({\r\n model: locationCriterionsModel,\r\n campaignLocationModel: campaignLocationCriterionsModel,\r\n bundleCountries,\r\n adGroupId: adGroupModel.Id,\r\n campaignId: campaignModel && campaignModel.Id,\r\n bidMode: isAudienceAdGroupEdit,\r\n }));\r\n }\r\n\r\n if (dayTimeCriterionsModel) {\r\n data = extend(data, modelToViewModelForDayTimeTargets({\r\n model: dayTimeCriterionsModel,\r\n }));\r\n }\r\n\r\n if (adGroupModel.StartDate) {\r\n data = extend(data, modelToViewModelForDateSetting({\r\n model: adGroupModel,\r\n i18n,\r\n }));\r\n }\r\n\r\n if (targetCriterionsModel) {\r\n data = extend(data, modelToViewModelForTargetCriterions({\r\n model: targetCriterionsModel,\r\n campaignDeviceCriterions,\r\n }));\r\n }\r\n\r\n if ((targetCriterionsModel === null ||\r\n (targetCriterionsModel && isArray(targetCriterionsModel) && targetCriterionsModel.length === 0)) &&\r\n defaultTargeting) {\r\n data = extend(data, defaultTargeting);\r\n }\r\n\r\n if (audienceCriterionsModel) {\r\n data = extend(data, modelToViewModelForAudienceCriterions({\r\n model: audienceCriterionsModel,\r\n separateIMA,\r\n }));\r\n }\r\n\r\n if (defaultAdGroupData) {\r\n defaults(data, defaultAdGroupData);\r\n }\r\n\r\n data.ads = get(ads, 'ads', {});\r\n\r\n const adGroupViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return adGroupViewModel;\r\n};\r\n\r\nexport const bulkModelToViewModelForAdGroup = ({\r\n adGroupModel,\r\n bundleCountries,\r\n originalAdGroupViewModel,\r\n i18n,\r\n}) => {\r\n let data = pick(adGroupModel, whitelistedSchemaPropertyKeysForModel);\r\n if (data.Id && isString(data.Id)) {\r\n // eslint-disable-next-line no-param-reassign\r\n data.Id = parseInt(data.Id, 10);\r\n }\r\n data = extend(data, bulkModelToViewModelForLocationTargets({\r\n locationTargetsModel: adGroupModel.AdGroupCriterions,\r\n bundleCountries,\r\n }));\r\n data = extend(data, bulkModelToViewModelForDayTimeTargets({\r\n criterions: adGroupModel.AdGroupCriterions,\r\n }));\r\n\r\n data = extend(data, bulkModelToViewModelForDateSetting({ model: adGroupModel, i18n }));\r\n\r\n if (isEmpty(data.FrequencyCapSettings)) {\r\n data = extend(data, { FrequencyCapSettings: [{}] });\r\n }\r\n\r\n if (originalAdGroupViewModel.data.customSegments) {\r\n data = extend(data, { customSegments: originalAdGroupViewModel.data.customSegments });\r\n data = extend(data, { initialCustomSegments: originalAdGroupViewModel.data.initialCustomSegments });\r\n }\r\n\r\n if (originalAdGroupViewModel.data.deal) {\r\n data = extend(data, {\r\n deal: originalAdGroupViewModel.data.deal,\r\n });\r\n }\r\n\r\n if (has(adGroupModel, 'AdRotation')) {\r\n data = extend(data, { AdRotation: adGroupModel.AdRotation });\r\n }\r\n\r\n const adGroupViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return adGroupViewModel;\r\n};\r\n\r\nexport const viewModelToModelForAdGroup = ({ adGroupViewModel, i18n, isDisplayPlus = false }) => {\r\n let model = pick(adGroupViewModel.data, whitelistedSchemaPropertyKeysForModel);\r\n\r\n model = extend(model, viewModelToBulkModelForDateSetting({ i18n, viewModel: adGroupViewModel }));\r\n\r\n if (!adGroupViewModel.data.Id || adGroupViewModel.data.Id === AdGroupNegativeReferenceId) {\r\n model.Id = AdGroupNegativeReferenceId;\r\n\r\n if (isEmpty(model.FrequencyCapSettings) ||\r\n isEmpty(model.FrequencyCapSettings[0]) ||\r\n !model.FrequencyCapSettings[0].CapValue) {\r\n model = omit(model, 'FrequencyCapSettings');\r\n }\r\n } else if (isDisplayPlus) {\r\n const filteredReadonlyKeys = without(readonlyPropertyKeysForModel, 'StartDate');\r\n model = omit(model, filteredReadonlyKeys);\r\n } else {\r\n model = omit(model, readonlyPropertyKeysForModel);\r\n }\r\n\r\n if (has(adGroupViewModel.data, 'UseOptimizedTargeting') && adGroupViewModel.data.UseOptimizedTargeting !== null) {\r\n model.UseOptimizedTargeting = adGroupViewModel.data.UseOptimizedTargeting;\r\n }\r\n\r\n if (has(adGroupViewModel.data, 'PricingModel')) {\r\n model.PricingModel = adGroupViewModel.data.PricingModel;\r\n }\r\n\r\n if (has(adGroupViewModel.data, 'BoostAdunitIds')) {\r\n const adUnitIds = adGroupViewModel.data.BoostAdunitIds;\r\n model.BoostAdunitIds = isArray(adUnitIds) ? adUnitIds.join(';') : adUnitIds;\r\n model.BoostPublisherIds = adGroupViewModel.data.BoostPublisherIds;\r\n model.BoostAccountIds = adGroupViewModel.data.BoostAccountIds;\r\n model.BoostTriggerIds = adGroupViewModel.data.BoostTriggerIds;\r\n }\r\n\r\n if (has(adGroupViewModel.data, 'TargetSetting') && adGroupViewModel.data.TargetSetting !== null) {\r\n model.TargetSetting = adGroupViewModel.data.TargetSetting;\r\n }\r\n\r\n if (has(adGroupViewModel.data, 'AdRotation')) {\r\n model.AdRotation = adGroupViewModel.data.AdRotation;\r\n }\r\n\r\n return model;\r\n};\r\n\r\n\r\nconst readAdGroup = (cid, aid, campaignId, adGroupId) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AdGroups.$withKey(adGroupId)\r\n .get()\r\n .toPromise();\r\n\r\nexport const loadAdGroup = (cid, aid, campaignId, adGroupId) =>\r\n readAdGroup(cid, aid, campaignId, adGroupId);\r\n","import { pick } from 'underscore';\r\nimport { AdGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { isMSANServingDNV, ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport exclusionRepository from '@bingads-webui-campaign-legacy/advanced-settings/util/exclusion-repository';\r\nimport { modelConstraints, ERROR_ENTITY, isBulkWrappedResponse, getBulkUploadErrorType, modelToViewModelForBulkErrors, removeReferencedEntityInvalidIdErrors } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { bulkModelToViewModelForAdGroup, viewModelToModelForAdGroup } from './ad-group';\r\nimport { viewModelToBulkModelForLocationTargets, viewModelToBulkModelForAdSchedules, viewModelToBulkModelForTargeting, viewModelToBulkModelForAudiences, viewModelToBulkModelForPlacements } from './ad-group-criterions';\r\n\r\nconst adGroupEDM = edmCampaign.types.resolve('Model.AdGroup');\r\nconst adGroupResource = new adGroupEDM.ResourceIdentifier();\r\n\r\nconst createOrUpdateAdGroup = (data) => {\r\n const createOrUpdateCall = data && data.Id ?\r\n adGroupResource.bulkUpdate.bind(adGroupResource) :\r\n adGroupResource.bulkCreate.bind(adGroupResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nconst GENERIC_ERROR_MESSAGE_KEY = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n\r\nconst bulkUpsertAdGroupSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(AdGroup)]: ERROR_ENTITY.AdGroup,\r\n};\r\n\r\nconst parallelSave = async (modelToSave, adGroupViewModel, campaign) => {\r\n const savePromise = createOrUpdateAdGroup(modelToSave);\r\n\r\n let saveExclusionsPromise = Promise.resolve();\r\n if (adGroupViewModel && adGroupViewModel.data && adGroupViewModel.data.exclusions) {\r\n const saveExclusionsData = {\r\n CampaignId: campaign.Id,\r\n AdGroupId: adGroupViewModel.data.Id,\r\n AdvancedSettings: {\r\n ExcludedSites: adGroupViewModel.data.exclusions.adgroupExclusions.ExcludedSites,\r\n },\r\n };\r\n saveExclusionsPromise = exclusionRepository.saveExtensions(saveExclusionsData, ScopeLevel.AdGroup);\r\n }\r\n\r\n return {\r\n result: await savePromise,\r\n resultExclusion: await saveExclusionsPromise,\r\n };\r\n};\r\n\r\nexport const getErrorsPlaceholders = () => ({\r\n systemErrors: [],\r\n serverErrors: [],\r\n});\r\n\r\nexport const saveAdGroup = async ({\r\n adGroup: adGroupViewModel,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n campaign,\r\n customTargetingBulkModel = null,\r\n isDisplayPlus = false,\r\n flow = '',\r\n}, {\r\n scenario, i18n, activityLogger, serverContext,\r\n}) => {\r\n // NOTE: adGroupViewModel.data.CampaignBidStrategyName is not set when this is called first time from create-ad step.\r\n // ensure that you have no logic relying on this or any other fields being set from campaign model onto adgroup model.\r\n\r\n const adGroupModel = viewModelToModelForAdGroup({ adGroupViewModel, i18n, isDisplayPlus });\r\n const locationTargetsModel = viewModelToBulkModelForLocationTargets({\r\n bundleLocationCriterions,\r\n adGroupViewModel,\r\n campaignViewModel: campaign,\r\n });\r\n const adSchedulesModel = viewModelToBulkModelForAdSchedules({ adGroupViewModel, campaignViewModel: campaign });\r\n let isMSANServingDNVCampaign = false;\r\n if (flow === 'VIDEO_CAMPAIGNS' && campaign.CampaignSubType === 4 && serverContext.DynamicPermissions.EnableMSANVideoCampaigns) {\r\n isMSANServingDNVCampaign = true;\r\n } else if (flow === 'DISPLAY_CAMPAIGNS' && campaign.CampaignSubType === 5 && serverContext.DynamicPermissions.EnableMSANDisplayCampaigns) {\r\n isMSANServingDNVCampaign = true;\r\n } else {\r\n isMSANServingDNVCampaign = isMSANServingDNV(campaign.CampaignSubType, campaign.CampaignSettings);\r\n }\r\n\r\n const targetingModel = customTargetingBulkModel ?\r\n customTargetingBulkModel({ adGroupViewModel, campaignViewModel: campaign }) :\r\n viewModelToBulkModelForTargeting({\r\n adGroupViewModel,\r\n campaignViewModel: campaign,\r\n isXandrDeviceTargetEnabled: serverContext.DynamicPermissions.XandrDeviceTarget,\r\n isBoostEnabled: serverContext.Permissions.IsAmplifyEnabled,\r\n isDeviceTargetingForDisplayEnabled: serverContext.DynamicPermissions.DeviceTargetingForDisplay,\r\n isMultiAdFormatEnabled: serverContext.DynamicPermissions.MultiAdFormat,\r\n isPremiumStreamingEnabled: serverContext.DynamicPermissions.PremiumStreaming,\r\n isXandrServing: !isMSANServingDNVCampaign,\r\n });\r\n const audienceCriterionsModel = viewModelToBulkModelForAudiences({ adGroupViewModel, campaignViewModel: campaign });\r\n\r\n const placementCriterionsModel = viewModelToBulkModelForPlacements({ adGroupViewModel, campaignViewModel: campaign });\r\n\r\n const modelToSave = {\r\n ...adGroupModel,\r\n AdGroupCriterions: [\r\n ...locationTargetsModel,\r\n ...adSchedulesModel,\r\n ...targetingModel,\r\n ...placementCriterionsModel,\r\n ],\r\n AdGroupAudienceCriterions: audienceCriterionsModel,\r\n Campaign: pick(campaign, 'Id'),\r\n };\r\n\r\n try {\r\n const saveResult = await parallelSave(modelToSave, adGroupViewModel, campaign);\r\n\r\n const data = {\r\n adGroup: bulkModelToViewModelForAdGroup({\r\n adGroupModel: saveResult.result,\r\n originalAdGroupViewModel: adGroupViewModel,\r\n bundleCountries,\r\n i18n,\r\n }),\r\n ...getErrorsPlaceholders(),\r\n };\r\n return data;\r\n } catch (bulkOrSystemError) {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity, errors } = bulkOrSystemError;\r\n const adGroup = entity ?\r\n bulkModelToViewModelForAdGroup({\r\n adGroupModel: entity,\r\n originalAdGroupViewModel: adGroupViewModel,\r\n bundleCountries,\r\n errors,\r\n i18n,\r\n }) :\r\n adGroupViewModel;\r\n\r\n if (adGroupViewModel.data.deal) {\r\n adGroup.data = await modelConstraints(adGroupViewModel.data.deal, adGroupViewModel.data, serverContext);\r\n }\r\n\r\n let filteredErrors = errors;\r\n if (adGroup.data.Id <= 0) {\r\n filteredErrors = removeReferencedEntityInvalidIdErrors(errors);\r\n }\r\n\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n filteredErrors,\r\n bulkUpsertAdGroupSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activityLogger\r\n );\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n adGroup,\r\n serverErrors,\r\n });\r\n }\r\n\r\n if (bulkOrSystemError && bulkOrSystemError.NegativeSitesResult) {\r\n const { NegativeSitesResult } = bulkOrSystemError;\r\n const serverErrors = [{\r\n property: 'webExclusions',\r\n NegativeSitesResult: NegativeSitesResult.EntityErrors,\r\n }];\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n adGroup: adGroupViewModel,\r\n serverErrors,\r\n });\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`AdGroup bulk upsert system error: ${bulkOrSystemError.stack || bulkOrSystemError.message || bulkOrSystemError}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n\r\n return {\r\n adGroup: adGroupViewModel,\r\n systemErrors: [i18n.getString(GENERIC_ERROR_MESSAGE_KEY)],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n };\r\n }\r\n};\r\n\r\nexport const saveJustAdGroup = async ({\r\n adGroup: adGroupViewModel,\r\n campaign,\r\n}, {\r\n i18n,\r\n}) => {\r\n const adGroupModel = viewModelToModelForAdGroup({ adGroupViewModel, i18n });\r\n\r\n const modelToSave = {\r\n ...adGroupModel,\r\n Campaign: pick(campaign, 'Id'),\r\n };\r\n\r\n try {\r\n const result = await createOrUpdateAdGroup(modelToSave);\r\n const data = {\r\n adGroup: bulkModelToViewModelForAdGroup({\r\n adGroupModel: result,\r\n originalAdGroupViewModel: adGroupViewModel,\r\n i18n,\r\n }),\r\n ...getErrorsPlaceholders(),\r\n };\r\n return data;\r\n } catch (bulkOrSystemError) {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { errors } = bulkOrSystemError;\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n errors,\r\n });\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`AdGroup bulk upsert system error: ${bulkOrSystemError.stack || bulkOrSystemError.message || bulkOrSystemError}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n\r\n return {\r\n adGroup: adGroupViewModel,\r\n systemErrors: [i18n.getString(GENERIC_ERROR_MESSAGE_KEY)],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n };\r\n }\r\n};\r\n","import _ from 'underscore';\r\nimport {\r\n shouldSelectBundleOption,\r\n parseLocationTargets,\r\n convertLocationStateToLocationSchemaCampaign,\r\n} from '@bingads-webui-campaign/hotel-common-targets';\r\nimport { locationTargetsOptionKeys } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { CRITERION_LEVEL, bulkModelToViewModelForLocationTargetsBase } from './criterions';\r\nimport { getTargetCriterion } from './ad-group-criterions';\r\nimport { AddedDeviceBidAdjustment as DefaultDeviceBidAdjustment, RemovedDeviceBidAdjustment } from '../common/constants';\r\nimport { DeviceKeys } from '../steps/ad-group/target/device';\r\n\r\nexport const viewModelToBulkModelForDealTargets = model => ({\r\n CriterionType: 'DealCriterion',\r\n CampaignName: model.data.Name,\r\n Criterion: {\r\n Type: 'DealCriterion',\r\n DealCriterion: {\r\n DealId: _.get(model, ['data', 'deal', 'Id']),\r\n },\r\n },\r\n});\r\n\r\nexport const modelToViewModelForLocationTargets = ({\r\n model, bundleCountries, campaignId, overrideOriginalBidAdjustment = false,\r\n}) => {\r\n const {\r\n locations,\r\n intentId,\r\n intentOption,\r\n } = parseLocationTargets(model, 'campaign', campaignId);\r\n let targetOption = locations.length ? locationTargetsOptionKeys.specific : locationTargetsOptionKeys.everywhere;\r\n targetOption = shouldSelectBundleOption(bundleCountries, locations) ? locationTargetsOptionKeys.bundleOrDefaultMarket : targetOption;\r\n\r\n if (overrideOriginalBidAdjustment) {\r\n locations.forEach((location) => {\r\n // eslint-disable-next-line no-param-reassign\r\n location.Criterion.OriginalBidAdjustment = null;\r\n });\r\n }\r\n\r\n return {\r\n locationTargets: {\r\n currentLevelSettings: {\r\n initLocations: locations,\r\n currentLocations: locations,\r\n targetOption,\r\n intentId,\r\n ...intentOption,\r\n },\r\n bidMode: false,\r\n useParentLevel: false,\r\n },\r\n };\r\n};\r\n\r\nexport const viewModelToBulkModelForLocationTargets = ({ bundleLocationCriterions, campaignViewModel }) => {\r\n if (!campaignViewModel.data.locationTargets || campaignViewModel.data.locationRestricted) {\r\n return [];\r\n }\r\n const bulkUpsertModel = convertLocationStateToLocationSchemaCampaign(\r\n campaignViewModel.data.locationTargets,\r\n bundleLocationCriterions,\r\n {\r\n bidStrategy: { option: 'placeholder' },\r\n ...campaignViewModel.data,\r\n name: {\r\n value: campaignViewModel.data.Name,\r\n },\r\n }\r\n );\r\n return bulkUpsertModel;\r\n};\r\n\r\nexport const bulkModelToViewModelForLocationTargets = ({\r\n locationTargetsModel, bundleCountries,\r\n}) => bulkModelToViewModelForLocationTargetsBase({\r\n locationTargetsModel, bundleCountries, level: CRITERION_LEVEL.CAMPAIGN,\r\n});\r\n\r\nexport const viewModelToBulkModelForDeviceTargets = ({ campaignViewModel }) => {\r\n const deviceTargets = campaignViewModel.data.campaignLevelDeviceTargets || [];\r\n const initialDeviceTargets = campaignViewModel.data.initialCampaignLevelDeviceTargets || [];\r\n const campaignDeviceTypesWithBidAdjustment = campaignViewModel.data.campaignDeviceTypesWithBidAdjustment || [];\r\n const supportedDevices = [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones];\r\n\r\n const isBidAdjustmentSame = initialTarget => campaignDeviceTypesWithBidAdjustment.find(targetWithBid =>\r\n targetWithBid.Criterion.DeviceCriterion.DeviceName === initialTarget.target && targetWithBid.Criterion.BidAdjustment === initialTarget.bidAdjustment);\r\n const isTargetChanged = target => initialDeviceTargets.find(initialTarget => initialTarget.criterion === target && isBidAdjustmentSame(initialTarget)) === undefined;\r\n\r\n const addedDevices = deviceTargets.filter(isTargetChanged).map((target) => {\r\n const deviceTargetWithBid = campaignDeviceTypesWithBidAdjustment.find(deviceWithBid => deviceWithBid.Criterion.DeviceCriterion.DeviceName === target) || {};\r\n const initialDeviceTarget = initialDeviceTargets.find(initialTarget => initialTarget.criterion === target) || {};\r\n const { Id } = initialDeviceTarget || deviceTargetWithBid;\r\n const bid = _.get(deviceTargetWithBid, 'Criterion.BidAdjustment', initialDeviceTarget.bidAdjustment || DefaultDeviceBidAdjustment);\r\n\r\n return {\r\n Id,\r\n criterion: {\r\n Target: target,\r\n BidAdjustment: bid,\r\n },\r\n };\r\n });\r\n\r\n const toRemoveDevices = initialDeviceTargets.length === 0 && deviceTargets.length === 0 ? [] : _.difference(supportedDevices, deviceTargets); // don't remove devices if no change\r\n const isTargetInitiallyRemoved = target => initialDeviceTargets.find(initialTarget =>\r\n initialTarget.criterion === target && initialTarget.bidAdjustment === RemovedDeviceBidAdjustment);\r\n\r\n const removedDevices = toRemoveDevices.filter(target => !isTargetInitiallyRemoved(target)).map((target) => {\r\n const { Id } = initialDeviceTargets.find(initialTarget => initialTarget.criterion === target) || {};\r\n\r\n return {\r\n Id,\r\n criterion: {\r\n Target: target,\r\n BidAdjustment: RemovedDeviceBidAdjustment,\r\n },\r\n };\r\n });\r\n\r\n const defaultBidAdjustment = campaignDeviceTypesWithBidAdjustment ? undefined : DefaultDeviceBidAdjustment;\r\n\r\n const addedDeviceCriterion = getTargetCriterion({\r\n targets: addedDevices, type: 'Device', propKey: 'DeviceName', adGroupViewModel: null, campaignViewModel, bidAdjustment: defaultBidAdjustment, level: 'campaign',\r\n });\r\n\r\n const removedDeviceCriterion = getTargetCriterion({\r\n targets: removedDevices, type: 'Device', propKey: 'DeviceName', adGroupViewModel: null, campaignViewModel, bidAdjustment: RemovedDeviceBidAdjustment, level: 'campaign',\r\n });\r\n\r\n\r\n return [\r\n ...addedDeviceCriterion,\r\n ...removedDeviceCriterion,\r\n ];\r\n};\r\n","import { pick, isString, extend, get, isArray, filter } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { getDealDetails, fillLocationForDeal } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { CampaignSubTypeMapping, CampaignSubTypeTextMapping } from '@bingads-webui-campaign-react/constants';\r\nimport { getVerifiedTrackingSettingsRead } from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { modelToViewModelForConversionGoals, bulkModelToViewModelForConversionGoals } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { modelToViewModelForDayTimeTargets } from './ad-group-criterions';\r\nimport { modelToViewModelForLocationTargets, bulkModelToViewModelForLocationTargets } from './campaign-criterions';\r\nimport { modelToViewModelForCallToActionSettings } from './call-to-action-settings';\r\nimport { RemovedDeviceBidAdjustment } from '../common/constants';\r\nimport { modelToViewModelForDateSetting, viewModelToBulkModelForDateSetting, bulkModelToViewModelForDateSetting } from '../common/date-settings';\r\n\r\nconst whitelistedSchemaPropertyKeysForModel = [\r\n 'Budget', 'Id', 'Name', 'Status', 'TimeZone', 'BidStrategyName', 'BudgetId',\r\n 'AdScheduleUseSearcherTimeZone',\r\n 'DeliveryStatus', 'DeliveryStatusDetails', 'CampaignType', 'CampaignSubType',\r\n 'StartDate', 'EndDate',\r\n 'UseCampaignLevelDates',\r\n 'IsBidLandscapeAvailable',\r\n 'BiddingScheme',\r\n 'CampaignSettings', 'DisplayBiddingStrategyType',\r\n 'DisplayBiddingStrategyMaxCpc', 'DisplayBiddingStrategyTargetCpa', 'Languages',\r\n 'BaseCampaignName',\r\n 'VerifiedTrackingData',\r\n 'CampaignObjectiveSetting',\r\n 'TrackingUrlTemplate', 'FinalUrlSuffix', 'UrlCustomParameters', 'DisclaimerAdsEnabled',\r\n];\r\n\r\nexport const viewModelToModelForCampaign = (campaignViewModel) => {\r\n let data = {\r\n ...pick(campaignViewModel.data, whitelistedSchemaPropertyKeysForModel),\r\n CampaignSubType: CampaignSubTypeTextMapping[campaignViewModel.data.CampaignSubType],\r\n };\r\n\r\n data = extend(data, viewModelToBulkModelForDateSetting({ i18n: null, viewModel: campaignViewModel }));\r\n\r\n if (campaignViewModel.data && campaignViewModel.data.Status === 'UserPaused') {\r\n data.Status = 'Paused'; // if we send back userpaused mt treats it as active, we explicitly need to send paused\r\n }\r\n\r\n return data;\r\n};\r\n\r\nexport const bulkModelToViewModelForCampaign = ({\r\n campaignModel,\r\n originalCampaignModel,\r\n bundleCountries,\r\n}) => {\r\n let data = {\r\n ...pick(campaignModel, whitelistedSchemaPropertyKeysForModel),\r\n CampaignSubType: CampaignSubTypeMapping[campaignModel.CampaignSubType],\r\n };\r\n\r\n data = extend(data, {\r\n deal: get(originalCampaignModel, ['data', 'deal']),\r\n });\r\n if (data.Id && isString(data.Id)) {\r\n // eslint-disable-next-line no-param-reassign\r\n data.Id = parseInt(data.Id, 10);\r\n }\r\n\r\n if (data.CampaignType === 'Audience') {\r\n data = extend(data, bulkModelToViewModelForConversionGoals({\r\n campaignModel,\r\n originalCampaignViewModel: originalCampaignModel,\r\n }));\r\n }\r\n\r\n if (data.StartDate) {\r\n data = extend(data, bulkModelToViewModelForDateSetting({\r\n model: campaignModel,\r\n i18n: null,\r\n }));\r\n }\r\n\r\n if (campaignModel && campaignModel.CampaignCriterions && isArray(campaignModel.CampaignCriterions)) {\r\n data = extend(data, bulkModelToViewModelForLocationTargets({\r\n locationTargetsModel: campaignModel.CampaignCriterions,\r\n bundleCountries,\r\n }));\r\n }\r\n\r\n const campaignViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n\r\n return campaignViewModel;\r\n};\r\n\r\nconst readCampaign = (cid, aid, campaignId) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .get({\r\n select: ['Budget', 'CampaignConversionGoal/Goals'],\r\n })\r\n .toPromise();\r\n\r\nexport const loadCampaign = (cid, aid, campaignId) =>\r\n readCampaign(cid, aid, campaignId);\r\n\r\nexport const modelToViewModelForCampaign = ({\r\n campaignModel,\r\n dealDetails,\r\n dayTimeCriterionsModel = [],\r\n locationCriterionsModel,\r\n campaignDeviceCriterions,\r\n bundleCountries,\r\n isAudienceMMACTAOptOutEnabled = false,\r\n isAudienceMMACTADefaultOptOutEnabled = false,\r\n exclusions,\r\n}) => {\r\n let data = {\r\n ...pick(campaignModel, [...whitelistedSchemaPropertyKeysForModel, 'ImportProperties']),\r\n CampaignSubType: CampaignSubTypeMapping[campaignModel.CampaignSubType],\r\n };\r\n\r\n if (dealDetails) {\r\n data = extend(data, { deal: dealDetails });\r\n }\r\n\r\n if (exclusions) {\r\n data = extend(data, { exclusions });\r\n }\r\n\r\n if (data.CampaignType === 'Audience') {\r\n const audienceSettings = filter(\r\n get(data, ['CampaignSettings'], []),\r\n setting => setting['@odata.type'] === '#Model.AudienceSettings'\r\n );\r\n const audienceSetting = get(audienceSettings, [0], {});\r\n data = extend(data, getVerifiedTrackingSettingsRead(audienceSetting));\r\n }\r\n\r\n // adding conversion goals for display ads, video ads and native ads\r\n if (data.CampaignType === 'Audience' &&\r\n (data.CampaignSubType === CampaignSubTypeMapping.AudienceStatic ||\r\n data.CampaignSubType === CampaignSubTypeMapping.DisplayAds ||\r\n data.CampaignSubType === CampaignSubTypeMapping.BrandAwarenessVideoAds\r\n )) {\r\n data = extend(data, modelToViewModelForConversionGoals(campaignModel));\r\n }\r\n\r\n if (data.CampaignType === 'Audience' && data.CampaignSubType === CampaignSubTypeMapping.AudienceStatic) {\r\n data = extend(data, modelToViewModelForDayTimeTargets({ model: dayTimeCriterionsModel }));\r\n\r\n if (isAudienceMMACTAOptOutEnabled) {\r\n data = extend(data, modelToViewModelForCallToActionSettings(campaignModel, isAudienceMMACTADefaultOptOutEnabled));\r\n }\r\n }\r\n\r\n if (locationCriterionsModel) {\r\n data = extend(data, modelToViewModelForLocationTargets({\r\n model: locationCriterionsModel,\r\n bundleCountries,\r\n campaignId: campaignModel.Id,\r\n }));\r\n }\r\n\r\n if (campaignModel.StartDate) {\r\n data = extend(data, modelToViewModelForDateSetting({\r\n model: campaignModel,\r\n i18n: null,\r\n }));\r\n }\r\n\r\n if (campaignDeviceCriterions) {\r\n const initialCampaignLevelDeviceTargets = campaignDeviceCriterions.filter(criterion => criterion.Criterion.Type === 'Device')\r\n .map(criterion => ({\r\n Id: criterion.Id,\r\n criterion: criterion.Criterion.DeviceName,\r\n bidAdjustment: criterion.CriterionBid.Multiplier,\r\n }));\r\n\r\n const campaignLevelDeviceTargets = initialCampaignLevelDeviceTargets\r\n .filter(device => device.bidAdjustment !== RemovedDeviceBidAdjustment && device.bidAdjustment !== undefined)\r\n .map(criterion => criterion.criterion);\r\n\r\n data = extend(data, {\r\n initialCampaignLevelDeviceTargets,\r\n campaignLevelDeviceTargets,\r\n });\r\n }\r\n\r\n const campaignViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return campaignViewModel;\r\n};\r\n\r\nexport {\r\n getDealDetails,\r\n fillLocationForDeal,\r\n};\r\n","import _ from 'underscore';\r\n\r\nexport const modelToViewModelForCallToActionSettings = (model, isAudienceMMACTADefaultOptOutEnabled) => {\r\n const isOptOut = _.result(_.find(\r\n _.get(model, 'CampaignSettings', []),\r\n setting => setting['@odata.type'] === '#Model.CallToActionSetting'\r\n ), 'CallToActionOptOut', !!isAudienceMMACTADefaultOptOutEnabled);\r\n\r\n return {\r\n IsCallToActionOptOut: isOptOut,\r\n };\r\n};\r\n","import { isEmpty, result, extend } from 'underscore';\r\nimport { assign } from 'xstate';\r\nimport Promise from 'bluebird';\r\nimport { stepStateMachine } from '@bingads-webui-campaign-react/step-wizard-machine';\r\n// import { modelConstraints } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { modelConstraints, getConvertedCurrencyDealMinimumBid, getAccountExchangeRateFromLocalStorage } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { isXandrDisplayAdsCampaign, isXandrVideoAdsCampaign, isXandrServing, ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport exclusionRepository from '@bingads-webui-campaign-legacy/advanced-settings/util/exclusion-repository';\r\n\r\nimport { loadBundleCountries, readLocationCriterions, readDayTimeCriterions, readTargetingCriterions, readAudienceCriterions, readPlacementCriterions } from '../../model/ad-group-criterions';\r\nimport { STEP_PATHS, getInitialAdGroupViewModel, AdGroupNegativeReferenceId } from '../../common/constants';\r\nimport { StepAdGroupSettings } from './step-ad-group-settings';\r\nimport { DeviceKeys, Devices } from './target/device';\r\nimport { saveAdGroup, getErrorsPlaceholders } from '../../model/ad-group-bulk';\r\nimport { viewModelToModelForCampaign, getDealDetails } from '../../model/campaign';\r\nimport { viewModelToModelForAdGroup, loadAdGroup, modelToViewModelForAdGroup } from '../../model/ad-group';\r\n\r\nconst needsLoading = () => true;\r\nconst hasCampaignData = context =>\r\n Boolean(result(context, ['stepsData', 'campaign', 'Id']));\r\n\r\nconst getCampaignId = context => result(context, ['data', 'campaign', 'data', 'Id']) || result(context, ['stepsData', 'campaign', 'Id']) || result(context, ['stepsData', 'currentCampaign', 'Id']);\r\nconst getAdGoupId = context => result(context, ['data', 'adGroup', 'data', 'Id']) || result(context, ['stepsData', 'adGroupId']);\r\nconst getBiddingScheme = context => result(context, ['stepsData', 'currentCampaign', 'BiddingScheme', 'Type']) || result(context, ['stepsData', 'campaign', 'BiddingScheme', 'Type']);\r\nconst getCampaignSubType = context => result(context, ['stepsData', 'currentCampaign', 'CampaignSubType']) || result(context, ['stepsData', 'campaign', 'CampaignSubType']);\r\n\r\nconst getInitDeviceTypes = (context, permissions) => {\r\n const campaignSubType = getCampaignSubType(context);\r\n const biddingScheme = getBiddingScheme(context);\r\n const isDisplayAds = isXandrDisplayAdsCampaign(campaignSubType);\r\n const isVideoAds = isXandrVideoAdsCampaign(campaignSubType);\r\n\r\n if (isDisplayAds) {\r\n return [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones];\r\n }\r\n\r\n if (isVideoAds && permissions.dynamic.XandrDeviceTarget) {\r\n return biddingScheme === 'ManualCpm' ? [DeviceKeys.Computers, DeviceKeys.Tablets, DeviceKeys.Smartphones] : [DeviceKeys.ConnectedTVs];\r\n }\r\n\r\n return Object.keys(Devices);\r\n};\r\n\r\n/**\r\n * Loads step data asynchronously. The returned promise must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n *\r\n * The function is called when the wizard enters the step.\r\n * The step will be blocked until the promise resolves.\r\n * @param {Object} context - the current context\r\n * @returns {Promise} a promise that must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n */\r\nconst loadData = async (context) => {\r\n const {\r\n cid, aid, serverContext, i18n, permissions,\r\n } = context.stepsData;\r\n const deal = result(context, ['stepsData', 'campaign', 'deal']);\r\n const campaignId = getCampaignId(context);\r\n const adGroupId = getAdGoupId(context);\r\n const deviceTypes = getInitDeviceTypes(context, permissions);\r\n\r\n let dealMinimumBid;\r\n if (deal) {\r\n const exchangeRateMapping = getAccountExchangeRateFromLocalStorage(serverContext);\r\n dealMinimumBid = getConvertedCurrencyDealMinimumBid(deal.MinimumBid, deal.Currency, serverContext.CurrentAccount.CurrencyCode, exchangeRateMapping.val);\r\n }\r\n\r\n let loadPromises = {\r\n adGroup: Promise.resolve(getInitialAdGroupViewModel({ i18n, dealMinimumBid, deviceTypes })),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n dealDetails: deal || getDealDetails(cid, aid, campaignId, serverContext),\r\n };\r\n\r\n if (adGroupId && adGroupId !== AdGroupNegativeReferenceId) {\r\n loadPromises = extend(loadPromises, {\r\n adGroup: loadAdGroup(cid, aid, campaignId, adGroupId),\r\n locationCriterions: readLocationCriterions({\r\n cid, aid, campaignId, adGroupId,\r\n }),\r\n dayTimeCriterions: readDayTimeCriterions({\r\n cid, aid, campaignId, adGroupId,\r\n }),\r\n targetCriterions: readTargetingCriterions({\r\n cid, aid, campaignId, adGroupId,\r\n }),\r\n audienceCriterions: readAudienceCriterions({\r\n cid, aid, campaignId, adGroupId,\r\n }),\r\n placementCriterions: readPlacementCriterions({\r\n cid, aid, campaignId, adGroupId,\r\n }),\r\n exclusions: exclusionRepository.load(campaignId, adGroupId, ScopeLevel.AdGroup),\r\n });\r\n }\r\n\r\n const {\r\n adGroup,\r\n locationCriterions,\r\n dealDetails,\r\n bundleCountriesAndLocationCriterions,\r\n dayTimeCriterions,\r\n targetCriterions,\r\n audienceCriterions,\r\n placementCriterions,\r\n exclusions: [campaignExclusions, adgroupExclusions] = [null, null],\r\n } = await Promise.props(loadPromises);\r\n\r\n let results = {\r\n ...bundleCountriesAndLocationCriterions,\r\n adGroup,\r\n ...getErrorsPlaceholders(),\r\n };\r\n\r\n const campaign = isEmpty(context.stepsData.campaign) ? context.stepsData.currentCampaign : context.stepsData.campaign;\r\n\r\n if (adGroupId) {\r\n const adGroupData = modelToViewModelForAdGroup({\r\n adGroupModel: adGroup,\r\n locationCriterionsModel: locationCriterions ? locationCriterions.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n targetCriterionsModel: targetCriterions ? targetCriterions.value : [],\r\n audienceCriterionsModel: audienceCriterions ? audienceCriterions.value : [],\r\n i18n,\r\n isDisplayAds: isXandrDisplayAdsCampaign(getCampaignSubType(context)),\r\n isVideoAds: isXandrVideoAdsCampaign(getCampaignSubType(context)),\r\n isXandrServing: isXandrServing(getCampaignSubType(context), campaign.CampaignSettings),\r\n placementCriterionsModel: placementCriterions ? placementCriterions.value : [],\r\n campaignExclusions,\r\n adgroupExclusions,\r\n });\r\n results = extend(results, {\r\n adGroup: adGroupData,\r\n });\r\n }\r\n\r\n if (dealDetails) {\r\n results.adGroup.data = await modelConstraints(dealDetails, results.adGroup.data, serverContext);\r\n }\r\n\r\n results.adGroup.data.genreRestricted = !context.stepsData.permissions.dynamic.GenreTargets || results.adGroup.data.genreRestricted;\r\n\r\n return results;\r\n};\r\n\r\n// must return `Promise.resolve(data)` or `Promise.reject(error)`\r\n// the payload will be available in `onDone` and `onError` in event's `data` prop.\r\nconst saveData = (context) => {\r\n const campaign = isEmpty(context.stepsData.campaign) ? context.stepsData.currentCampaign : context.stepsData.campaign;\r\n\r\n return saveAdGroup({\r\n adGroup: context.data.adGroup,\r\n campaign,\r\n bundleLocationCriterions: context.data.bundleLocationCriterions,\r\n bundleCountries: context.data.bundleCountries,\r\n isDisplayPlus: true,\r\n }, {\r\n scenario: context.stepsData.scenarioName,\r\n activityLogger: context.stepsData.scenario.createActivity('saveAdGroup'),\r\n i18n: context.stepsData.i18n,\r\n serverContext: context.stepsData.serverContext,\r\n });\r\n};\r\n\r\nconst isValid = context => context.data.adGroup.isValid;\r\nconst isDirty = context => context.data.adGroup.isDirty;\r\nconst hasServerErrors = context => !isEmpty(context.data.serverErrors) || !isEmpty(context.data.otherErrors) || !isEmpty(context.data.systemErrors);\r\nexport const needsSaving = context => isDirty(context) || hasServerErrors(context) || !context.data.adGroup.data.Id || context.data.adGroup.data.Id === AdGroupNegativeReferenceId;\r\n\r\nconst patchStepsData = assign({\r\n stepsData: (context/* , event */) => {\r\n const campaignViewModel = isEmpty(context.stepsData.campaign) ? { data: context.stepsData.currentCampaign } : { data: context.stepsData.campaign };\r\n\r\n return {\r\n ...context.stepsData,\r\n adGroup: {\r\n ...viewModelToModelForAdGroup({ adGroupViewModel: context.data.adGroup, i18n: context.stepsData.i18n }),\r\n deal: context.data.adGroup.data.deal,\r\n },\r\n ...hasCampaignData(context) ? {} :\r\n { campaign: viewModelToModelForCampaign(campaignViewModel) },\r\n };\r\n },\r\n});\r\n\r\nconst clearErrors = assign({\r\n data: context => ({\r\n ...context.data,\r\n ...getErrorsPlaceholders(),\r\n }),\r\n});\r\n\r\nexport const stepAdGroupWizardConfig = {\r\n id: STEP_PATHS.AD_GROUP,\r\n title: _TL_('Ad group'),\r\n StepMachine: stepStateMachine,\r\n StepMachineOptions: (stepInfo, initialStepsData) => ({\r\n machineId: STEP_PATHS.AD_GROUP,\r\n initialContext: {\r\n id: stepInfo.id,\r\n stepInfo,\r\n stepsData: initialStepsData,\r\n data: {\r\n adGroup: getInitialAdGroupViewModel({ i18n: initialStepsData.i18n, isDisplayAds: initialStepsData.isDisplayAds }),\r\n ...getErrorsPlaceholders(),\r\n },\r\n invalidSaveAttempt: 0,\r\n },\r\n actions: {\r\n patchStepsData,\r\n clearErrors,\r\n },\r\n guards: {\r\n needsLoading,\r\n needsSaving,\r\n isValid,\r\n isDirty,\r\n },\r\n }),\r\n StepComponent: StepAdGroupSettings,\r\n canNavigateBackWithoutSaving: true,\r\n stepRepositoryConfig: {\r\n saveData,\r\n loadData,\r\n },\r\n};\r\n","import { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport _ from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { viewModelToBulkModelForConversionGoals } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { CampaignSubTypeMapping, ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport exclusionRepository from '@bingads-webui-campaign-legacy/advanced-settings/util/exclusion-repository';\r\nimport { ERROR_ENTITY, isBulkWrappedResponse, getBulkUploadErrorType, modelToViewModelForBulkErrors, removeReferencedEntityInvalidIdErrors, isDealCampaign } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { bulkModelToViewModelForCampaign, viewModelToModelForCampaign } from './campaign';\r\nimport { viewModelToBulkModelForDealTargets, viewModelToBulkModelForLocationTargets, viewModelToBulkModelForDeviceTargets } from './campaign-criterions';\r\n\r\nconst campaignEDM = edmCampaign.types.resolve('Model.Campaign');\r\nconst campaignResource = new campaignEDM.ResourceIdentifier();\r\n\r\nconst createOrUpdateCampaign = (data) => {\r\n const createOrUpdateCall = data && data.Id ?\r\n campaignResource.bulkUpdate.bind(campaignResource) :\r\n campaignResource.bulkCreate.bind(campaignResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nconst GENERIC_ERROR_MESSAGE_KEY = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n\r\nconst bulkUpsertCampaignSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(Campaign)]: ERROR_ENTITY.Campaign,\r\n};\r\n\r\nconst allSettledPromiseWrapper = (promises) => {\r\n const wrappedPromises = promises.map(p => Promise.resolve(p)\r\n .then(\r\n val => ({ status: 'fulfilled', value: val }),\r\n err => ({ status: 'rejected', reason: err })\r\n ));\r\n return Promise.all(wrappedPromises);\r\n};\r\n\r\nexport const getErrorsPlaceholders = () => ({\r\n systemErrors: [],\r\n serverErrors: [],\r\n});\r\n\r\nexport const saveCampaign = ({\r\n campaign: campaignViewModel,\r\n viewModelToBulkModelForAdSchedules = null,\r\n bundleCountries = null,\r\n bundleLocationCriterions = null,\r\n viewModelToBulkModelForDisclaimerAssociation = null,\r\n isAudienceMMACTAOptOutEnabled = false,\r\n viewModelToBulkModelForVerifiedTrackingSettings = null,\r\n}, { scenario, i18n, activityLogger }) => {\r\n const campaignModel = viewModelToModelForCampaign(campaignViewModel);\r\n\r\n let conversionGoalsAssociations = {};\r\n let adExtensionAssociations = {};\r\n let adSchedulesModel = [];\r\n let locationTargetsModel = [];\r\n let verifiedTrackingDataObj = {};\r\n\r\n const modelToSave = {\r\n ...campaignModel,\r\n ...conversionGoalsAssociations,\r\n };\r\n\r\n // Add conversion goals to Native, Display and Video campaigns\r\n if (campaignViewModel.data.CampaignType === 'Audience' &&\r\n (campaignViewModel.data.CampaignSubType === CampaignSubTypeMapping.AudienceStatic ||\r\n campaignViewModel.data.CampaignSubType === CampaignSubTypeMapping.DisplayAds ||\r\n campaignViewModel.data.CampaignSubType === CampaignSubTypeMapping.BrandAwarenessVideoAds\r\n ) && campaignViewModel.data.conversionGoals) {\r\n conversionGoalsAssociations = {\r\n CampaignConversionGoalAssociations: viewModelToBulkModelForConversionGoals(campaignViewModel, campaignViewModel.data.Id || -111),\r\n };\r\n _.extend(modelToSave, { ...conversionGoalsAssociations });\r\n }\r\n // Add ads schedule and location targets for Native campaigns\r\n if (campaignViewModel.data.CampaignType === 'Audience' && campaignViewModel.data.CampaignSubType === CampaignSubTypeMapping.AudienceStatic) {\r\n if (viewModelToBulkModelForAdSchedules) {\r\n adSchedulesModel = viewModelToBulkModelForAdSchedules({ campaignViewModel });\r\n }\r\n\r\n if (bundleLocationCriterions) {\r\n locationTargetsModel = viewModelToBulkModelForLocationTargets({\r\n bundleLocationCriterions,\r\n campaignViewModel,\r\n });\r\n }\r\n\r\n if (viewModelToBulkModelForDisclaimerAssociation) {\r\n adExtensionAssociations = viewModelToBulkModelForDisclaimerAssociation({ campaignViewModel });\r\n }\r\n\r\n _.extend(modelToSave, { ...adExtensionAssociations });\r\n modelToSave.CampaignCriterions = [\r\n ...adSchedulesModel,\r\n ...locationTargetsModel,\r\n ...viewModelToBulkModelForDeviceTargets({ campaignViewModel }),\r\n ];\r\n\r\n if (isAudienceMMACTAOptOutEnabled) {\r\n modelToSave.CallToActionOptOut = campaignViewModel.data.IsCallToActionOptOut;\r\n }\r\n }\r\n\r\n if (isDealCampaign()) {\r\n modelToSave.IsDealCampaign = true;\r\n const dealModel = viewModelToBulkModelForDealTargets(campaignViewModel);\r\n modelToSave.CampaignCriterions = [dealModel];\r\n }\r\n\r\n if (campaignViewModel.data.CampaignType === 'Audience' && viewModelToBulkModelForVerifiedTrackingSettings) {\r\n const campaignData = _.get(campaignViewModel, ['data'], {});\r\n if (_.has(campaignData, 'VerifiedTrackingSettings')) {\r\n const verifiedTrackingSettings = _.get(campaignData, ['VerifiedTrackingSettings'], []);\r\n verifiedTrackingDataObj = viewModelToBulkModelForVerifiedTrackingSettings(verifiedTrackingSettings);\r\n _.extend(modelToSave, verifiedTrackingDataObj);\r\n }\r\n }\r\n\r\n const saveCampaignPromise = createOrUpdateCampaign(modelToSave)\r\n // with bulk the result will have shape of:\r\n // - { ...entityData } - in case of success;\r\n // - { entity: { ...entityData }, errors: [(EditorialError|MTError)] } - in case of error(s).\r\n .then((result) => {\r\n const data = {\r\n campaign: bulkModelToViewModelForCampaign({\r\n campaignModel: result,\r\n originalCampaignModel: campaignViewModel,\r\n bundleCountries,\r\n }),\r\n ...getErrorsPlaceholders(),\r\n };\r\n\r\n return data;\r\n }, (bulkOrSystemError) => {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity, errors } = bulkOrSystemError;\r\n const campaign = entity ?\r\n bulkModelToViewModelForCampaign({\r\n campaignModel: entity,\r\n originalCampaignModel: campaignViewModel,\r\n }) :\r\n campaignViewModel;\r\n\r\n let filteredErrors = errors;\r\n if (campaign.data.Id <= 0) {\r\n filteredErrors = removeReferencedEntityInvalidIdErrors(errors);\r\n }\r\n\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n filteredErrors,\r\n bulkUpsertCampaignSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activityLogger\r\n );\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n campaign,\r\n serverErrors,\r\n });\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`Campaign bulk upsert system error: ${bulkOrSystemError.stack || bulkOrSystemError.message || bulkOrSystemError}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n campaign: campaignViewModel,\r\n systemErrors: [i18n.getString(GENERIC_ERROR_MESSAGE_KEY)],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n });\r\n });\r\n let saveExclusionsPromise = Promise.resolve();\r\n if (campaignViewModel && campaignViewModel.data && campaignViewModel.data.exclusions) {\r\n const saveExclusionsData = {\r\n campaignId: campaignViewModel.data.Id,\r\n AdvanceSettings: {\r\n Exclusions: {\r\n ExcludedIPs: campaignViewModel.data.exclusions.campaignExclusions.ExcludedIPs,\r\n ExcludedSites: campaignViewModel.data.exclusions.campaignExclusions.ExcludedSites,\r\n },\r\n },\r\n };\r\n\r\n saveExclusionsPromise = exclusionRepository.saveExtensions(saveExclusionsData, ScopeLevel.Campaign);\r\n }\r\n\r\n const savePromises = [saveCampaignPromise, saveExclusionsPromise];\r\n\r\n return new Promise((resolve, reject) => {\r\n allSettledPromiseWrapper(savePromises).then((results) => {\r\n const allSuccess = _.every(results, result => result.status === 'fulfilled');\r\n\r\n if (allSuccess) {\r\n return resolve({\r\n campaign: results[0].value.campaign,\r\n ...getErrorsPlaceholders(),\r\n });\r\n }\r\n\r\n const errors = _.map(results, (result) => {\r\n let { serverErrors = null } = result.reason || {};\r\n\r\n if (result.reason && result.reason.NegativeSitesResult) {\r\n const { NegativeSitesResult } = result.reason;\r\n serverErrors = {\r\n property: 'webExclusions',\r\n NegativeSitesResult: NegativeSitesResult.EntityErrors,\r\n };\r\n }\r\n\r\n if (result.reason && result.reason.NegativeIPsResult) {\r\n const { NegativeIPsResult } = result.reason;\r\n serverErrors = {\r\n property: 'webExclusions',\r\n NegativeIPsResult: NegativeIPsResult.EntityErrors,\r\n };\r\n }\r\n\r\n return serverErrors;\r\n });\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return reject({\r\n campaign: campaignViewModel,\r\n serverErrors: _.flatten(errors.filter(val => val !== null)),\r\n });\r\n });\r\n });\r\n};\r\n","\r\nimport React, { useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _, { noop } from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ImpressionTrackingUrlOptions as ImpressionTrackingView} from '@bingads-webui-campaign/audience-campaign-shared';\r\n\r\nconst extractImpressionTrackingSetting = (verifiedTrackingData) => {\r\n if (_.isArray(verifiedTrackingData) && verifiedTrackingData.length === 2) {\r\n return verifiedTrackingData;\r\n }\r\n return ['', ''];\r\n};\r\n\r\nexport const formatImpressionTrackingSetting = (campaignSettings, i18n) => {\r\n const [advertiserEntityID, publisherEntityID] = extractImpressionTrackingSetting(_.get(campaignSettings, '[0].VerifiedTrackingSettings[0].VerifiedTrackingData[0].Data.Values'));\r\n return (\r\n
\r\n
{i18n.getString(_TL_('Advertiser entity ID: ')) + (advertiserEntityID === '' ? i18n.getString(_TL_('None')) : advertiserEntityID)}
\r\n
{i18n.getString(_TL_('Publisher entity ID: ')) + (publisherEntityID === '' ? i18n.getString(_TL_('None')) : publisherEntityID)}
\r\n
\r\n );\r\n};\r\n\r\nconst ImpressionTrackingSetting = ({\r\n i18n,\r\n campaignSettings,\r\n updateValidation,\r\n}) => {\r\n const classes = useDefaultStyles();\r\n\r\n const [impressionTrackingSettingRef, setImpressionTrackingSettingRef] = useState();\r\n\r\n const impressionTrackingView1 = useMemo(() => {\r\n const impressionTrackingView = new ImpressionTrackingView({\r\n i18n,\r\n isEnabledForVerifiedImpressionTrackingAtCampaignLevel: true,\r\n initialIASImpressionTrackingUrlValue: extractImpressionTrackingSetting(_.get(campaignSettings, '[0].VerifiedTrackingSettings[0].VerifiedTrackingData[0].Data.Values')),\r\n isImpressionTrackingUrlSectionVisible: false,\r\n isForBrandAwarenessCampaign: true,\r\n });\r\n\r\n impressionTrackingView.render();\r\n\r\n return impressionTrackingView;\r\n });\r\n\r\n useEffect(() => {\r\n if (impressionTrackingSettingRef) {\r\n impressionTrackingSettingRef.innerHTML = '';\r\n impressionTrackingSettingRef.append(impressionTrackingView1.el);\r\n\r\n impressionTrackingView1.on('IASInputChange', (value) => {\r\n updateValidation([], {\r\n VerifiedTrackingData: value,\r\n });\r\n });\r\n }\r\n\r\n return noop;\r\n }, [impressionTrackingSettingRef]);\r\n\r\n return (\r\n
\r\n
setImpressionTrackingSettingRef(newRef)} />\r\n
\r\n );\r\n};\r\n\r\nImpressionTrackingSetting.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaignSettings: PropTypes.shape(PropTypes.string).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nconst validatedImpressionTrackingSetting = withCustomValidation(ImpressionTrackingSetting);\r\n\r\nexport { validatedImpressionTrackingSetting as ImpressionTrackingSetting };\r\n","import { useCallback, useEffect, useMemo, useContext, useState } from 'react';\r\nimport { useSelector } from '@xstate/react';\r\nimport { get } from 'underscore';\r\nimport { isCanceling, stateLoggingListener, StepEvents, isSaving } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { useExitWithoutSavingConfirmation } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { useImpulse, usePrevProp } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { serverErrorsCompare } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\n\r\nimport { needsSaving } from './step-wizard-config';\r\n\r\nconst doesNeedSavingSelector = state => !isCanceling(state) && needsSaving(state.context) && !isSaving(state);\r\nconst serverContextSelector = state => state.context.stepsData.serverContext;\r\nconst hideStepHeaderSelector = state => state.context.stepInfo.hideStepHeader;\r\nconst campaignIdSelector = state => state.context.stepsData.campaignId;\r\nconst campaignSelector = state => state.context.data.campaign;\r\nconst campaignSettingsSelector = state => (state.context.stepsData.campaign && state.context.stepsData.campaign.CampaignSettings) || (state.context.stepsData.currentCampaign && state.context.stepsData.currentCampaign.CampaignSettings);\r\nconst serverErrorsSelector = state => state.context.data.serverErrors;\r\nconst invalidSaveAttemptSelector = state => state.context.invalidSaveAttempt;\r\nconst systemErrorsSelector = state => state.context.data.systemErrors;\r\nconst permissionsSelector = state => get(state, 'context.stepsData.permissions');\r\nconst scenarioNameSelector = state => get(state, 'context.stepsData.scenarioName');\r\nconst exclusionsSelector = state => state.context.data.campaign.data.exclusions;\r\n\r\nexport const useStepCampaignSettingsState = (stepService) => {\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n\r\n useEffect(() => {\r\n const subscription = stepService.subscribe(stateLoggingListener);\r\n return subscription.unsubscribe;\r\n }, [stepService]);\r\n\r\n const serverContext = useSelector(stepService, serverContextSelector);\r\n const hideStepHeader = useSelector(stepService, hideStepHeaderSelector);\r\n const campaignId = useSelector(stepService, campaignIdSelector);\r\n const campaign = useSelector(stepService, campaignSelector);\r\n const campaignSettings = useSelector(stepService, campaignSettingsSelector);\r\n\r\n const doesNeedSaving = useSelector(stepService, doesNeedSavingSelector);\r\n const systemErrors = useSelector(stepService, systemErrorsSelector);\r\n\r\n const serverErrors = useSelector(stepService, serverErrorsSelector);\r\n const invalidSaveAttempt = useSelector(stepService, invalidSaveAttemptSelector);\r\n\r\n const permissions = useSelector(stepService, permissionsSelector);\r\n const scenarioName = useSelector(stepService, scenarioNameSelector);\r\n const exclusions = useSelector(stepService, exclusionsSelector);\r\n\r\n const dealDetails = campaign.data.deal;\r\n\r\n const [navigationConfirmationPrompt] = useExitWithoutSavingConfirmation(doesNeedSaving, stepService, i18n);\r\n const onCampaignValidation = useCallback((results) => {\r\n const { data: newCampaignData, ...restResults } = results;\r\n const dataPatch = {\r\n campaign: {\r\n ...campaign,\r\n data: {\r\n ...campaign.data,\r\n ...newCampaignData,\r\n },\r\n ...restResults,\r\n },\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, campaign]);\r\n\r\n // eslint-disable-next-line no-bitwise\r\n const [, hasInvalidSaveAttemptChanged] = usePrevProp(invalidSaveAttempt | 0);\r\n const [, hasServerErrorsChanged] = usePrevProp(serverErrors, serverErrorsCompare);\r\n const areBeaconsActive = useImpulse(hasInvalidSaveAttemptChanged || hasServerErrorsChanged);\r\n\r\n const [showAllValidationErrors, setShowAllValidationErrors] = useState(false);\r\n if (hasInvalidSaveAttemptChanged) {\r\n setShowAllValidationErrors(true);\r\n }\r\n\r\n const state = {\r\n campaign,\r\n serverContext,\r\n i18n,\r\n legacyI18n,\r\n hideStepHeader,\r\n campaignId,\r\n campaignSettings,\r\n systemErrors,\r\n navigationConfirmationPrompt,\r\n showAllValidationErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n permissions,\r\n scenarioName,\r\n dealDetails,\r\n exclusions,\r\n };\r\n const api = { onCampaignValidation };\r\n\r\n return [state, api];\r\n};\r\n","export const getStepCampaignSettingsStyles = (components, theme) => ({\r\n container: {\r\n marginTop: 10,\r\n },\r\n description: {\r\n marginBottom: '10px',\r\n },\r\n bidStrategy: {\r\n '&.vanilla-bid-strategy .bid-strategy-container select': {\r\n width: 300,\r\n },\r\n },\r\n collapsiblePanel: {\r\n border: 'none',\r\n marginBottom: 'unset',\r\n backgroundColor: 'unset',\r\n '& .panel-heading': {\r\n padding: 0,\r\n borderBottom: 'none',\r\n marginBottom: 18,\r\n '& .panel-title': {\r\n fontSize: 18,\r\n '& > a': {\r\n color: theme && theme.palette && theme.palette.themePrimary,\r\n padding: 0,\r\n '&:hover, &:active': {\r\n color: theme && theme.palette && theme.palette.themeDarker,\r\n textDecoration: 'none',\r\n backgroundColor: 'unset',\r\n },\r\n },\r\n '& > a:after': {\r\n transform: 'rotate(180deg)',\r\n },\r\n '& > a.collapsed:after': {\r\n transform: 'rotate(90deg)',\r\n },\r\n },\r\n },\r\n '& .panel-collapse': {\r\n '& .panel-body': {\r\n padding: 0,\r\n overflow: 'hidden',\r\n },\r\n },\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useMemo, useState, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { Stack } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ValidationGroup, ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { ServerValidatedWebExclusionsWithValidation, webExclusionPropertyVal } from '@bingads-webui-react/web-exclusions';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport _ from 'underscore';\r\nimport {\r\n FormErrorGroup, UnmappedFormErrors,\r\n entityIs, andComp, propertyIs, anyComp, notComp,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ERROR_ENTITY, getPanelErrorProps, getConvertedCurrencyDealMinimumBid, getAccountExchangeRateFromLocalStorage } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ValidatedLegacyBudget, ValidatedConversionGoals } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { getBidTitleDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { withStepLoadingShell } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { MinXandrDailyBudgetRangePerCurrency } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\nimport { Collapse, TextTitle, ValidatedBootstrapPanel, useCollapseState, ValidatedFixedPanel, ValidatedPanel, collapseExpander } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n isXandrDisplayAdsCampaign,\r\n isXandrVideoAdsCampaign,\r\n campaignShouldServeOnMSAN,\r\n ScopeLevel\r\n} from '@bingads-webui-campaign-react/constants';\r\n\r\nimport {\r\n SectionShimmer,\r\n AudienceBudgetBidStrategy,\r\n} from '@bingads-webui-campaign-react/display-plus-native-ads';\r\nimport { ThirdPartyMeasurementV3WithValidation, formatVendorSettings } from '@bingads-webui-campaign-react/third-party-measurement';\r\n\r\nimport { ImpressionTrackingSetting, formatImpressionTrackingSetting } from './audience-setting/audience-setting';\r\nimport { ServerValidatedRemainingCharsValidatedTextField } from '../../common/shared-components';\r\nimport { DealImpressionPanel } from '../../common/deal-potential-impression/deal-potential-impression';\r\nimport { useStepCampaignSettingsState } from './use-step-campaign-settings-state';\r\nimport { getStepCampaignSettingsStyles } from './step-campaign-settings-styles';\r\n\r\nconst entityIsCampaign = entityIs(ERROR_ENTITY.Campaign);\r\n\r\nexport const campaignNameProp = andComp(entityIsCampaign, propertyIs('Name'));\r\nconst campaignBudgetProp = andComp(entityIsCampaign, propertyIs('Budget'));\r\nconst campaignCampaignSettingsProp = andComp(entityIsCampaign, propertyIs('CampaignSettings'));\r\n\r\nexport const ServerValidatedLegacyBudget = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedLegacyBudget, { filter: campaignBudgetProp }));\r\nexport const ValidatedImpressionTrackingSetting = withControlErrorHandling(withUnvalidatedControlErrors(ImpressionTrackingSetting, { filter: campaignCampaignSettingsProp }));\r\n\r\nconst campaignUrlOptionsProperties = notComp(andComp(\r\n entityIsCampaign,\r\n anyComp(\r\n propertyIs('TrackingUrlTemplate'),\r\n propertyIs('UrlCustomParameters'),\r\n propertyIs('FinalUrlSuffix')\r\n )\r\n));\r\n\r\nfunction StepCampaignSettings(props) {\r\n const {\r\n stepService,\r\n scope: { values: { aid, cid } },\r\n } = props;\r\n\r\n const classes = useDefaultStyles(getStepCampaignSettingsStyles);\r\n const [stepState, stepApi] = useStepCampaignSettingsState(stepService);\r\n\r\n const {\r\n i18n,\r\n legacyI18n,\r\n hideStepHeader,\r\n campaignId,\r\n campaign,\r\n campaignErrors,\r\n navigationConfirmationPrompt,\r\n serverErrors,\r\n systemErrors,\r\n areBeaconsActive,\r\n showAllValidationErrors,\r\n serverContext,\r\n dealDetails,\r\n campaignSettings,\r\n exclusions,\r\n } = stepState;\r\n const { onCampaignValidation } = stepApi;\r\n\r\n const advertiserCustomerId = serverContext.CurrentAccount.AdvertiserCustomerID;\r\n\r\n const {\r\n DynamicPermissions: {\r\n EnableMSANDisplayCampaigns,\r\n EnableMSANVideoCampaigns,\r\n EnableDoubleVerify,\r\n },\r\n Permissions: {\r\n IsMSANISPOTEnabled,\r\n },\r\n } = serverContext;\r\n\r\n // Deprecate IAS verified impression tracking URLs\r\n const shouldshowIASVerifiedImpressionTrackingURLs = false;\r\n\r\n const shouldShowThirdPartyTrackginSetting = IsMSANISPOTEnabled || EnableDoubleVerify;\r\n\r\n const verifiedTrackingSettingsValidationProps = useMemo(\r\n () => {\r\n if (_.isNull(campaign) || _.isUndefined(campaign)) {\r\n return { data: null };\r\n }\r\n const VerifiedTrackingSettings = _.get(campaign, ['data', 'VerifiedTrackingSettings'], []);\r\n\r\n return {\r\n data: {\r\n VerifiedTrackingSettings,\r\n },\r\n };\r\n }\r\n , [campaign]\r\n );\r\n\r\n const shouldServeOnMSAN = campaignShouldServeOnMSAN(campaignSettings);\r\n const isEnableMSANDisplayCampaignsEnabled = EnableMSANDisplayCampaigns && isXandrDisplayAdsCampaign(campaign.data.CampaignSubType) && shouldServeOnMSAN;\r\n const isEnableMSANVideoCampaignsEnabled = EnableMSANVideoCampaigns && isXandrVideoAdsCampaign(campaign.data.CampaignSubType) && shouldServeOnMSAN;\r\n\r\n const [\r\n allCampaignSettingsSections,\r\n campaignSettingsExpandedSections,\r\n setCampaignSettingsExpandedSections,\r\n ] = useCollapseState(\r\n _.compact([\r\n 'campaign',\r\n (!isEnableMSANDisplayCampaignsEnabled && !isEnableMSANVideoCampaignsEnabled) && 'budget',\r\n (!isEnableMSANDisplayCampaignsEnabled && !isEnableMSANVideoCampaignsEnabled) && 'bid-strategy',\r\n (isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled) && 'bid-and-budget',\r\n shouldshowIASVerifiedImpressionTrackingURLs && 'impression-tracking-URLs',\r\n shouldShowThirdPartyTrackginSetting && 'third-party-measurement-settings',\r\n ]), /* all sections */\r\n _.compact([\r\n 'campaign',\r\n (!isEnableMSANDisplayCampaignsEnabled && !isEnableMSANVideoCampaignsEnabled) && 'budget',\r\n (!isEnableMSANDisplayCampaignsEnabled && !isEnableMSANVideoCampaignsEnabled) && 'bid-strategy',\r\n (isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled) && 'bid-and-budget',\r\n ]) /* initially expanded sections */\r\n );\r\n\r\n const basicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setCampaignSettingsExpandedSections }),\r\n [setCampaignSettingsExpandedSections]\r\n );\r\n\r\n const [\r\n allAdvancedCampaignSettingsSections,\r\n advancedCampaignSettingsExpandedSections,\r\n setAdvancedCampaignSettingsExpandedSections,\r\n ] = useCollapseState(_.compact([\r\n (isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled) && 'web-exclusions',\r\n ]), ['']);\r\n\r\n const advancedSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAdvancedCampaignSettingsExpandedSections }),\r\n [setAdvancedCampaignSettingsExpandedSections]\r\n );\r\n\r\n const webExclusionsError = serverErrors && serverErrors.filter(err => err.property === 'webExclusions');\r\n const [moreOptionsSectionExpanded, setNameAndTitleExpanded] = useState(false);\r\n const onMoreOptionsSectionToggle = useCallback((expanded) => {\r\n setNameAndTitleExpanded(expanded);\r\n }, []);\r\n\r\n const minBudget = useMemo(() => {\r\n let dealMinimumBid = 0;\r\n if (dealDetails) {\r\n const exchangeRateMapping = getAccountExchangeRateFromLocalStorage(serverContext);\r\n dealMinimumBid = getConvertedCurrencyDealMinimumBid(dealDetails.MinimumBid, dealDetails.Currency, serverContext.CurrentAccount.CurrencyCode, exchangeRateMapping.val);\r\n return Math.max(dealMinimumBid || 0, MinXandrDailyBudgetRangePerCurrency[serverContext.CurrentAccount.CurrencyCode]);\r\n }\r\n return MinXandrDailyBudgetRangePerCurrency[serverContext.CurrentAccount.CurrencyCode];\r\n }, [dealDetails, serverContext]);\r\n const getBasicSettingsSection = () => (\r\n
\r\n \r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n {\r\n (isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled) &&\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'bid-and-budget',\r\n }}\r\n >\r\n {\r\n campaign && campaign.data ? (\r\n \r\n ) : ()\r\n }\r\n \r\n }\r\n {\r\n (!isEnableMSANDisplayCampaignsEnabled && !isEnableMSANVideoCampaignsEnabled) &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'budget',\r\n }}\r\n >\r\n \r\n \r\n }\r\n {\r\n (!isEnableMSANDisplayCampaignsEnabled && !isEnableMSANVideoCampaignsEnabled) &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'bid-strategy',\r\n }}\r\n >\r\n \r\n {getBidTitleDetails(i18n, campaign.data.BiddingScheme)}\r\n \r\n \r\n }\r\n }\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'impression-tracking-URLs',\r\n }}\r\n >\r\n \r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'third-party-measurement',\r\n }}\r\n >\r\n \r\n \r\n {\r\n (isEnableMSANDisplayCampaignsEnabled || isEnableMSANVideoCampaignsEnabled) &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n }\r\n \r\n {dealDetails && }\r\n \r\n {\r\n allAdvancedCampaignSettingsSections && allAdvancedCampaignSettingsSections.length > 0 &&\r\n \r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('Advanced settings'))}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: advancedSettingsExpand,\r\n expandKey: 'web-exclusions',\r\n }}\r\n >\r\n \r\n {i18n.getString(_TL_('Which websites should not show your ads and which IP addresses should be blocked from seeing your ads?'))}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n
\r\n }\r\n
);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {!hideStepHeader &&\r\n <>\r\n

{i18n.getString(_TL_('Campaign settings'))}

\r\n {i18n.getString(_TL_('Tell us about your campaign and how much you want to spend.'))}\r\n \r\n }\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n {getBasicSettingsSection()}\r\n \r\n {navigationConfirmationPrompt}\r\n
\r\n
\r\n
\r\n \r\n );\r\n}\r\n\r\nStepCampaignSettings.propTypes = {\r\n stepService: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n uid: PropTypes.number.isRequired,\r\n campaignId: PropTypes.number,\r\n }).isRequired,\r\n }).isRequired,\r\n};\r\n\r\nconst withLoadingShell = withStepLoadingShell(StepCampaignSettings);\r\n\r\nexport { withLoadingShell as StepCampaignSettings };\r\n","import { isEmpty, result, extend } from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { assign } from 'xstate';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { stepStateMachine } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { getVerifiedTrackingSettingWrite as viewModelToBulkModelForVerifiedTrackingSettings } from '@bingads-webui-campaign-react/third-party-measurement';\r\nimport { ScopeLevel } from '@bingads-webui-campaign-react/constants';\r\nimport exclusionRepository from '@bingads-webui-campaign-legacy/advanced-settings/util/exclusion-repository';\r\nimport { saveCampaign, getErrorsPlaceholders } from '../../model/campaign-bulk';\r\nimport { STEP_PATHS, getInitialCampaignViewModel } from '../../common/constants';\r\nimport { StepCampaignSettings } from './step-campaign-settings';\r\nimport { viewModelToModelForCampaign, loadCampaign, modelToViewModelForCampaign, getDealDetails, fillLocationForDeal } from '../../model/campaign';\r\n\r\nconst getCampaignId = context => result(context, ['data', 'campaign', 'data', 'Id']) || result(context, ['stepsData', 'campaignId']);\r\n\r\nconst needsLoading = () => true;\r\n\r\n/**\r\n * Loads step data asynchronously. The returned promise must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n *\r\n * The function is called when the wizard enters the step.\r\n * The step will be blocked until the promise resolves.\r\n * @param {Object} context - the current context\r\n * @returns {Promise} a promise that must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n */\r\nconst loadData = (context) => {\r\n const {\r\n cid,\r\n aid,\r\n i18n,\r\n xandrVideoCampaignType,\r\n xandrVideoDeal,\r\n serverContext,\r\n isDisplayAds,\r\n } = context.stepsData;\r\n const campaignId = getCampaignId(context);\r\n let loadPromises = {\r\n campaign: Promise.resolve(getInitialCampaignViewModel(i18n, serverContext.CurrentAccount.CurrencyCode, {\r\n xandrVideoDeal,\r\n xandrVideoCampaignType,\r\n isDisplayAds,\r\n serverContext,\r\n })),\r\n };\r\n if (campaignId) {\r\n loadPromises = extend(loadPromises, {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n dealDetails: getDealDetails(cid, aid, campaignId, serverContext),\r\n exclusions: exclusionRepository.load(campaignId, null, ScopeLevel.Campaign),\r\n });\r\n } else {\r\n loadPromises = extend(loadPromises, {\r\n dealDetails: fillLocationForDeal(xandrVideoDeal, serverContext),\r\n });\r\n }\r\n\r\n return Promise.props(loadPromises).then(({\r\n campaign,\r\n dealDetails,\r\n exclusions: [campaignExclusions] = [null],\r\n }) => {\r\n let results = {\r\n campaign,\r\n ...getErrorsPlaceholders(),\r\n };\r\n if (campaignId) {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: campaign,\r\n dealDetails,\r\n exclusions: {\r\n campaignExclusions,\r\n },\r\n });\r\n results = extend(results, {\r\n campaign: campaignData,\r\n });\r\n } else {\r\n results = extend(results, {\r\n campaign: {\r\n ...campaign,\r\n data: {\r\n ...campaign.data,\r\n deal: dealDetails,\r\n },\r\n },\r\n });\r\n }\r\n return results;\r\n });\r\n};\r\n\r\n// must return `Promise.resolve(data)` or `Promise.reject(error)`\r\n// the payload will be available in `onDone` and `onError` in event's `data` prop.\r\nconst saveData = context =>\r\n saveCampaign({\r\n campaign: context.data.campaign,\r\n viewModelToBulkModelForVerifiedTrackingSettings,\r\n }, {\r\n scenario: context.stepsData.scenarioName,\r\n activityLogger: context.stepsData.scenario.createActivity('saveCampaignAndLinkedData'),\r\n i18n: context.stepsData.i18n,\r\n });\r\n\r\nconst isValid = context => context.data.campaign.isValid;\r\nconst isDirty = context => context.data.campaign.isDirty;\r\nconst hasServerErrors = context => !isEmpty(context.data.serverErrors) || !isEmpty(context.data.systemErrors);\r\nexport const needsSaving = context => isDirty(context) || hasServerErrors(context) || !context.data.campaign.data.Id;\r\n\r\nconst patchStepsData = assign({\r\n stepsData: (context/* , event */) => ({\r\n ...context.stepsData,\r\n campaign: {\r\n ...viewModelToModelForCampaign(context.data.campaign),\r\n deal: context.data.campaign.data.deal,\r\n },\r\n }),\r\n});\r\nconst clearErrors = assign({\r\n data: context => ({\r\n ...context.data,\r\n ...getErrorsPlaceholders(),\r\n }),\r\n});\r\nconst hasIncomingSystemError = () => false;\r\n\r\nexport const stepCampaignSettingsWizardConfig = {\r\n id: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n title: _TL_('Campaign settings'),\r\n StepMachine: stepStateMachine,\r\n StepMachineOptions: (stepInfo, initialStepsData) => ({\r\n machineId: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n initialContext: {\r\n id: stepInfo.id,\r\n stepsData: initialStepsData,\r\n stepInfo,\r\n data: {\r\n campaign: getInitialCampaignViewModel(\r\n initialStepsData.i18n,\r\n initialStepsData.serverContext.CurrentAccount.CurrencyCode,\r\n {\r\n xandrVideoCampaignType: initialStepsData.xandrVideoCampaignType,\r\n xandrVideoDeal: initialStepsData.xandrVideoDeal,\r\n isDisplayAds: initialStepsData.isDisplayAds,\r\n }\r\n ),\r\n ...getErrorsPlaceholders(),\r\n },\r\n invalidSaveAttempt: 0,\r\n },\r\n actions: {\r\n patchStepsData,\r\n clearErrors,\r\n },\r\n guards: {\r\n needsLoading,\r\n isValid,\r\n isDirty,\r\n needsSaving,\r\n hasIncomingSystemError,\r\n },\r\n }),\r\n StepComponent: withScope(StepCampaignSettings),\r\n stepRepositoryConfig: {\r\n saveData,\r\n loadData,\r\n },\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\nimport React, { useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Provider } from 'use-http';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { getDefaultOptions, getDefaultUrl } from './config';\r\n\r\nexport function MmpFetchProvider({ url, options, children }) {\r\n const serverContext = useContext(ServerContext);\r\n const finalOptions = getDefaultOptions(serverContext);\r\n\r\n if (options && options.headers) {\r\n finalOptions.headers = { ...finalOptions.headers, ...options.headers };\r\n }\r\n\r\n const finalUrl = url || getDefaultUrl(serverContext);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nMmpFetchProvider.propTypes = {\r\n url: PropTypes.string,\r\n options: PropTypes.shape({\r\n headers: PropTypes.shape({}),\r\n }),\r\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\r\n};\r\n\r\nMmpFetchProvider.defaultProps = {\r\n url: undefined,\r\n options: undefined,\r\n};\r\n","import { generateGuid } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nexport function getDefaultUrl(serverContext) {\r\n const { CampaignAPI } = serverContext.ServicesEndpoints;\r\n\r\n return `${CampaignAPI}mmp/`;\r\n}\r\n\r\nexport function getDefaultOptions(serverContext) {\r\n const defaultOptions = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n lcid: serverContext.CurrentUser.Locale,\r\n 'x-ms-clientapplication': 'bingadsweb', // required, will get 401 if missing\r\n 'x-ms-pagetrackingid': serverContext.PageTrackingId,\r\n Authorization: `CCMTSmallToken ${serverContext.Token}`,\r\n },\r\n cachePolicy: 'no-cache',\r\n interceptors: {\r\n request: ({ options }) => {\r\n // eslint-disable-next-line no-param-reassign\r\n options.headers['x-ms-requestid'] = generateGuid();\r\n\r\n return options;\r\n },\r\n },\r\n };\r\n\r\n return defaultOptions;\r\n}\r\n","import { useCallback, useEffect, useMemo, useContext, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { useSelector } from '@xstate/react';\r\nimport { isCanceling, stateLoggingListener, StepEvents, isSaving } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { useExitWithoutSavingConfirmation } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { useImpulse, usePrevProp } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { serverErrorsCompare } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\n\r\nimport { needsSaving } from './step-wizard-config';\r\n\r\nconst doesNeedSavingSelector = state => !isCanceling(state) && needsSaving(state.context) && !isSaving(state);\r\nconst hideStepHeaderSelector = state => state.context.stepInfo.hideStepHeader;\r\nconst adsSelector = state => state.context.data.ads;\r\nconst adsErrorsSelector = state => state.context.data.adsErrors;\r\nconst serverErrorsSelector = state => state.context.data.serverErrors;\r\nconst otherErrorsSelector = state => state.context.data.otherErrors;\r\nconst systemErrorsSelector = state => state.context.data.systemErrors;\r\nconst invalidSaveAttemptSelector = state => state.context.invalidSaveAttempt;\r\nconst serverContextSelector = state => state.context.stepsData.serverContext;\r\nconst permissionsSelector = state => _.get(state, 'context.stepsData.permissions');\r\n\r\nexport const useStepAdsSettingsState = (stepService, activity) => {\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n\r\n useEffect(() => {\r\n const subscription = stepService.subscribe(stateLoggingListener);\r\n return subscription.unsubscribe;\r\n }, [stepService]);\r\n\r\n const hideStepHeader = useSelector(stepService, hideStepHeaderSelector);\r\n\r\n const ads = useSelector(stepService, adsSelector);\r\n const serverContext = useSelector(stepService, serverContextSelector);\r\n const doesNeedSaving = useSelector(stepService, doesNeedSavingSelector);\r\n const adsErrors = useSelector(stepService, adsErrorsSelector);\r\n const otherErrors = useSelector(stepService, otherErrorsSelector);\r\n const systemErrors = useSelector(stepService, systemErrorsSelector);\r\n const serverErrors = useSelector(stepService, serverErrorsSelector);\r\n const invalidSaveAttempt = useSelector(stepService, invalidSaveAttemptSelector);\r\n const permissions = useSelector(stepService, permissionsSelector);\r\n\r\n const [navigationConfirmationPrompt] = useExitWithoutSavingConfirmation(doesNeedSaving, stepService, i18n);\r\n\r\n const removeEmptyAds = newAdsData => newAdsData.filter(ad => !_.isEmpty(ad.data));\r\n\r\n const onAdsValidation = useCallback((results) => {\r\n const { data: newAdsData, ...restResults } = results;\r\n\r\n const newAds = removeEmptyAds(newAdsData);\r\n\r\n const dataPatch = {\r\n ads: {\r\n ...ads,\r\n data: [\r\n ...newAds,\r\n ],\r\n ...restResults,\r\n },\r\n activity,\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, ads, activity]);\r\n\r\n // eslint-disable-next-line no-bitwise\r\n const [, hasInvalidSaveAttemptChanged] = usePrevProp(invalidSaveAttempt | 0);\r\n const [, hasServerErrorsChanged] = usePrevProp(serverErrors, serverErrorsCompare);\r\n const areBeaconsActive = useImpulse(hasInvalidSaveAttemptChanged || hasServerErrorsChanged);\r\n\r\n const [showAllValidationErrors, setShowAllValidationErrors] = useState(false);\r\n if (hasInvalidSaveAttemptChanged) {\r\n setShowAllValidationErrors(true);\r\n }\r\n\r\n const state = {\r\n ads,\r\n i18n,\r\n legacyI18n,\r\n serverContext,\r\n hideStepHeader,\r\n adsErrors,\r\n otherErrors,\r\n systemErrors,\r\n navigationConfirmationPrompt,\r\n showAllValidationErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n permissions,\r\n };\r\n const api = { onAdsValidation };\r\n\r\n return [state, api];\r\n};\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useCallback, useContext, useState, useMemo } from 'react';\r\nimport _, { get } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { useSelector } from '@xstate/react';\r\n\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { withPerformanceMarker } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { AdPreview, DisplayAdsContainer, PopulateImages, imagePlacementsToImage } from '@bingads-webui-campaign-react/xandr-display-ads-campaign-shared-components';\r\nimport { useImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\n\r\nimport { useStepAdsSettingsState } from './use-step-ads-state';\r\n\r\nconst permissionsSelector = state => get(state, 'context.stepsData.permissions');\r\n\r\nexport const getODataConfig = (serverContext) => {\r\n const isLocal = () => {\r\n const hostname = document.location.hostname.toLowerCase();\r\n return hostname.indexOf('ads.microsoft.com') === -1 &&\r\n hostname.indexOf('ads-int.microsoft.com') === -1;\r\n };\r\n\r\n const odataPath = isLocal() ? 'Advertiser/V2' : 'Campaign/V2';\r\n\r\n const oDataConfig = {\r\n odataToken: serverContext.Token,\r\n oDataToken: serverContext.Token,\r\n odataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n oDataPath: `${serverContext.ServicesEndpoints.CampaignAPI}${odataPath}`,\r\n };\r\n\r\n return oDataConfig;\r\n};\r\n\r\nconst StepAdsSettingsInternal = (props) => {\r\n const {\r\n stepService,\r\n perfMarker,\r\n scope,\r\n } = props;\r\n\r\n const { aid, cid, campaignId } = scope.values;\r\n const activity = useContext(ActivityContext);\r\n const [stepState, stepApi] = useStepAdsSettingsState(stepService, activity);\r\n const permissions = useSelector(stepService, permissionsSelector);\r\n const [currentImageIndex, setCurrentImageIndex] = useState(0);\r\n const { onAdsValidation } = stepApi;\r\n const {\r\n i18n,\r\n hideStepHeader,\r\n ads,\r\n adsErrors, otherErrors,\r\n navigationConfirmationPrompt,\r\n systemErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n showAllValidationErrors,\r\n serverContext,\r\n } = stepState;\r\n const oDataConfig = useMemo(() => getODataConfig(serverContext), [serverContext]);\r\n\r\n const {\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n } = useImagePicker();\r\n\r\n const onNewImageSelected = useCallback((imagePlacements) => {\r\n const newAds = imagePlacements.map(imagePlacement => (imagePlacementsToImage({\r\n crops: imagePlacement,\r\n defaults: {\r\n FinalUrls: [],\r\n isValid: false,\r\n isDirty: false,\r\n },\r\n })));\r\n const result = {\r\n data: [...newAds],\r\n isValid: false,\r\n isDirty: true,\r\n };\r\n onAdsValidation(result);\r\n setDisplayImagePicker(false);\r\n }, [onAdsValidation, setDisplayImagePicker]);\r\n\r\n const getBasicSettingsSection = useCallback(() => (\r\n
\r\n\r\n
\r\n
\r\n {i18n.getString(_TL_('Now that you\\'ve created your ad group, you can create your ads. Add your images and the Final URL, and we\\'ll show you a preview of how your ads might look like.'))}\r\n {_.isEmpty(ads.data) &&\r\n \r\n }\r\n { !_.isEmpty(ads.data) &&\r\n \r\n }\r\n
\r\n {\r\n !_.isEmpty(ads.data) &&\r\n
\r\n \r\n
\r\n }\r\n
\r\n
), [i18n, stepService, perfMarker, cid, aid, ads, currentImageIndex, oDataConfig, permissions, displayImagePicker, selectedMediaPanelSource, setSelectedMediaPanelSource, onNewImageSelected, serverContext]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {!hideStepHeader &&\r\n <>\r\n

{i18n.getString(_TL_('Ads'))}

\r\n {i18n.getString(_TL_(''))}\r\n \r\n }\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {getBasicSettingsSection()}\r\n {navigationConfirmationPrompt}\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nStepAdsSettingsInternal.propTypes = {\r\n stepService: PropTypes.shape({}).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n aid: PropTypes.number,\r\n cid: PropTypes.number,\r\n campaignId: PropTypes.number,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nexport const StepAdsSettings = withPerformanceMarker(StepAdsSettingsInternal);\r\n","import { isEmpty, result } from 'underscore';\r\nimport { assign } from 'xstate';\r\nimport Promise from 'bluebird';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { stepStateMachine } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { saveAds, modelToViewModelForAd, getErrorsPlaceholders } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\n\r\nimport { STEP_PATHS, viewModelToModelForCampaign } from '@bingads-webui-campaign-react/xandr-campaign';\r\n\r\nimport { StepAdsSettings } from './step-ads-settings';\r\n\r\n\r\nconst needsLoading = () => true;\r\nconst hasCampaignData = context =>\r\n Boolean(result(context, ['stepsData', 'campaign', 'Id']));\r\n\r\n/**\r\n * Loads step data asynchronously. The returned promise must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n *\r\n * The function is called when the wizard enters the step.\r\n * The step will be blocked until the promise resolves.\r\n * @param {Object} context - the current context\r\n * @returns {Promise} a promise that must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n */\r\nconst loadData = (context) => {\r\n const loadPromises = {\r\n ads: Promise.resolve(context.data.ads),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n ads,\r\n }) => {\r\n const { deal } = context.stepsData.adGroup;\r\n const adsModel = modelToViewModelForAd({ adsModel: ads });\r\n\r\n const results = {\r\n ads: adsModel, oldAdsModel: adsModel, deal, ...getErrorsPlaceholders(),\r\n };\r\n\r\n return results;\r\n });\r\n};\r\n\r\n// must return `Promise.resolve(data)` or `Promise.reject(error)`\r\n// the payload will be available in `onDone` and `onError` in event's `data` prop.\r\nconst saveData = context =>\r\n saveAds({\r\n ads: context.data.ads,\r\n oldAdsModel: context.data.oldAdsModel,\r\n campaign: context.stepsData.campaign,\r\n adGroup: context.stepsData.adGroup,\r\n activity: context.data.activity,\r\n }, {\r\n scenario: context.stepsData.scenarioName,\r\n activityLogger: context.stepsData.scenario.createActivity('saveAds'),\r\n i18n: context.stepsData.i18n,\r\n });\r\n\r\nconst isValid = context => context.data.ads.isValid;\r\nconst isDirty = context => context.data.ads.isDirty;\r\nconst hasServerErrors = context => !isEmpty(context.data.serverErrors) || !isEmpty(context.data.systemErrors);\r\nexport const needsSaving = context => isDirty(context) || hasServerErrors(context);\r\n\r\nconst patchStepsData = assign({\r\n stepsData: (context/* , event */) => ({\r\n ...context.stepsData,\r\n ads: context.data.ads,\r\n ...hasCampaignData(context) ? {} :\r\n { campaign: viewModelToModelForCampaign(context.data.campaign) },\r\n }),\r\n});\r\nconst clearErrors = assign({\r\n data: context => ({\r\n ...context.data,\r\n ...getErrorsPlaceholders(),\r\n }),\r\n});\r\n\r\nexport const stepAdsWizardConfig = {\r\n id: STEP_PATHS.ADS,\r\n title: _TL_('Ads'),\r\n StepMachine: stepStateMachine,\r\n StepMachineOptions: (stepInfo, initialStepsData) => ({\r\n machineId: STEP_PATHS.ADS,\r\n initialContext: {\r\n id: stepInfo.id,\r\n stepInfo,\r\n stepsData: initialStepsData,\r\n data: {\r\n ads: [],\r\n ...getErrorsPlaceholders(),\r\n },\r\n },\r\n actions: {\r\n patchStepsData,\r\n clearErrors,\r\n },\r\n guards: {\r\n needsLoading,\r\n needsSaving,\r\n isValid,\r\n isDirty,\r\n },\r\n }),\r\n StepComponent: withScope(StepAdsSettings),\r\n canNavigateBackWithoutSaving: true,\r\n stepRepositoryConfig: {\r\n saveData,\r\n loadData,\r\n },\r\n};\r\n","import {\r\n stepAdGroupWizardConfig,\r\n stepCampaignSettingsWizardConfig,\r\n STEP_PATHS,\r\n} from '@bingads-webui-campaign-react/xandr-campaign';\r\n\r\nimport { stepAdsWizardConfig } from './steps';\r\n\r\nconst ScenarioName = {\r\n XandrDisplayAdsCampaignCreation: 'XandrDisplayAdsCampaignCreation',\r\n XandrDisplayAdsAdGroupCreation: 'XandrDisplayAdsAdGroupCreation',\r\n XandrDisplayAdsCampaignSettings: 'XandrDisplayAdsCampaignSettings',\r\n XandrDisplayAdsAdGroupSettings: 'XandrDisplayAdsAdGroupSettings',\r\n XandrDisplayAdsCreation: 'XandrDisplayAdsCreation',\r\n};\r\n\r\nconst STEP_INFOS = {\r\n [STEP_PATHS.CAMPAIGN_SETTINGS]: stepCampaignSettingsWizardConfig,\r\n [STEP_PATHS.AD_GROUP]: stepAdGroupWizardConfig,\r\n [STEP_PATHS.ADS]: stepAdsWizardConfig,\r\n};\r\n\r\nconst applyCommonSettingsPageSettings = stepInfo => ({\r\n ...stepInfo,\r\n hideStepHeader: true,\r\n});\r\n\r\n// Scenarios\r\n// I. Creation\r\n// 1. Campaign creation\r\n// 2. Ad group\r\n// ...\r\n// II. Settings\r\n// 1. Campaign settings\r\n// 2. Ad group settings\r\n\r\nconst XANDR_DISPLAY_ADS_CAMPAIGN_CREATION = {\r\n scenarioName: ScenarioName.XandrDisplayAdsCampaignCreation,\r\n isEditing: false,\r\n stepList: [\r\n STEP_INFOS[STEP_PATHS.CAMPAIGN_SETTINGS],\r\n STEP_INFOS[STEP_PATHS.AD_GROUP],\r\n STEP_INFOS[STEP_PATHS.ADS],\r\n ],\r\n};\r\n\r\nconst XANDR_DISPLAY_ADS_AD_GROUP_CREATION = {\r\n scenarioName: ScenarioName.XandrDisplayAdsAdGroupCreation,\r\n isEditing: false,\r\n withContentFooter: false,\r\n stepList: [\r\n STEP_INFOS[STEP_PATHS.AD_GROUP],\r\n STEP_INFOS[STEP_PATHS.ADS],\r\n ],\r\n};\r\n\r\nconst XANDR_DISPLAY_ADS_CAMPAIGN_SETTINGS = {\r\n scenarioName: ScenarioName.XandrDisplayAdsCampaignSettings,\r\n isEditing: true,\r\n stepList: [\r\n applyCommonSettingsPageSettings(STEP_INFOS[STEP_PATHS.CAMPAIGN_SETTINGS]),\r\n ],\r\n};\r\n\r\nconst XANDR_DISPLAY_ADS_AD_GROUP_SETTINGS = {\r\n scenarioName: ScenarioName.XandrDisplayAdsAdGroupSettings,\r\n isEditing: true,\r\n stepList: [\r\n applyCommonSettingsPageSettings(STEP_INFOS[STEP_PATHS.AD_GROUP]),\r\n ],\r\n};\r\n\r\nexport const XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS = {\r\n XANDR_DISPLAY_ADS_CAMPAIGN_CREATION,\r\n XANDR_DISPLAY_ADS_AD_GROUP_CREATION,\r\n XANDR_DISPLAY_ADS_CAMPAIGN_SETTINGS,\r\n XANDR_DISPLAY_ADS_AD_GROUP_SETTINGS,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS } from '../xandr-display-ads-campaign-crud-scenarios';\r\n\r\n\r\nconst XandrDisplayAdsCampaignCreationPageImpl = ((props) => {\r\n const routeToNavigateToWhenDone = getRoutePathById(props.siteMap, 'campaigns');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nXandrDisplayAdsCampaignCreationPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const XandrDisplayAdsCampaignCreationPage = withSiteMap(withTheme(withComponentErrorLogging(\r\n XandrDisplayAdsCampaignCreationPageImpl,\r\n XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS.XANDR_DISPLAY_ADS_CAMPAIGN_CREATION.scenarioName\r\n)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\n\r\nimport { XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS } from '../xandr-display-ads-campaign-crud-scenarios';\r\n\r\nconst XandrDisplayAdsCampaignSettingsPageImpl = ((props) => {\r\n const routeToNavigateToWhenDone = getRoutePathById(props.siteMap, 'adgroups');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nXandrDisplayAdsCampaignSettingsPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n currentAdGroup: PropTypes.shape({}),\r\n currentCampaign: PropTypes.shape({}),\r\n};\r\n\r\nXandrDisplayAdsCampaignSettingsPageImpl.defaultProps = {\r\n currentAdGroup: null,\r\n currentCampaign: null,\r\n};\r\n\r\nexport const XandrDisplayAdsCampaignSettingsPage = withSiteMap(withTheme(withComponentErrorLogging(\r\n XandrDisplayAdsCampaignSettingsPageImpl,\r\n XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS.XANDR_DISPLAY_ADS_CAMPAIGN_SETTINGS.scenarioName\r\n)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS } from '../xandr-display-ads-campaign-crud-scenarios';\r\n\r\nconst XandrDisplayAdsAdGroupSettingsPageImpl = ((props) => {\r\n const routeToNavigateToWhenDone = getRoutePathById(props.siteMap, 'ads');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nXandrDisplayAdsAdGroupSettingsPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const XandrDisplayAdsAdGroupSettingsPage = withSiteMap(withTheme(withComponentErrorLogging(\r\n XandrDisplayAdsAdGroupSettingsPageImpl,\r\n XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS.XANDR_DISPLAY_ADS_AD_GROUP_SETTINGS.scenarioName\r\n)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS } from '../xandr-display-ads-campaign-crud-scenarios';\r\n\r\nconst getStyles = () => ({\r\n '@global': {\r\n '.app-shell .app-content-body': {\r\n // need to override the style since ad-group creation page shell inserts footer.\r\n overflow: 'hidden',\r\n flexShrink: '1!important',\r\n },\r\n },\r\n});\r\n\r\nconst XandrDisplayAdsAdGroupCreationPageImpl = ((props) => {\r\n const routeToNavigateToWhenDone = getRoutePathById(props.siteMap, 'adgroups');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nXandrDisplayAdsAdGroupCreationPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const XandrDisplayAdsAdGroupCreationPage = withSiteMap(withTheme(withInstrumentation(withComponentErrorLogging(\r\n withDefaultStyles(XandrDisplayAdsAdGroupCreationPageImpl, getStyles),\r\n XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS.XANDR_DISPLAY_ADS_AD_GROUP_CREATION.scenarioName\r\n))));\r\n","import { useCallback, useEffect, useMemo, useContext, useState } from 'react';\r\nimport _ from 'underscore';\r\nimport { useSelector } from '@xstate/react';\r\nimport { isCanceling, stateLoggingListener, StepEvents, isSaving } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { useExitWithoutSavingConfirmation } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { useImpulse, usePrevProp } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { serverErrorsCompare } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\n\r\nimport { needsSaving } from './step-wizard-config';\r\n\r\nconst doesNeedSavingSelector = state => !isCanceling(state) && needsSaving(state.context) && !isSaving(state);\r\nconst hideStepHeaderSelector = state => state.context.stepInfo.hideStepHeader;\r\nconst adsSelector = state => state.context.data.ads;\r\nconst adsErrorsSelector = state => state.context.data.adsErrors;\r\nconst serverErrorsSelector = state => state.context.data.serverErrors;\r\nconst otherErrorsSelector = state => state.context.data.otherErrors;\r\nconst systemErrorsSelector = state => state.context.data.systemErrors;\r\nconst invalidSaveAttemptSelector = state => state.context.invalidSaveAttempt;\r\nconst dealSelector = state => state.context.data.deal;\r\nconst biddngSchemeSelector = state => state.context.data.biddingScheme;\r\n\r\nexport const useStepAdsSettingsState = (stepService, activity) => {\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n\r\n useEffect(() => {\r\n const subscription = stepService.subscribe(stateLoggingListener);\r\n return subscription.unsubscribe;\r\n }, [stepService]);\r\n\r\n const hideStepHeader = useSelector(stepService, hideStepHeaderSelector);\r\n\r\n const ads = useSelector(stepService, adsSelector);\r\n\r\n const doesNeedSaving = useSelector(stepService, doesNeedSavingSelector);\r\n const adsErrors = useSelector(stepService, adsErrorsSelector);\r\n const otherErrors = useSelector(stepService, otherErrorsSelector);\r\n const systemErrors = useSelector(stepService, systemErrorsSelector);\r\n const serverErrors = useSelector(stepService, serverErrorsSelector);\r\n const invalidSaveAttempt = useSelector(stepService, invalidSaveAttemptSelector);\r\n const deal = useSelector(stepService, dealSelector);\r\n const biddingScheme = useSelector(stepService, biddngSchemeSelector);\r\n\r\n const [navigationConfirmationPrompt] = useExitWithoutSavingConfirmation(doesNeedSaving, stepService, i18n);\r\n\r\n const removeEmptyAds = newAdsData => newAdsData.filter(ad => !_.isEmpty(ad.data));\r\n\r\n const onAdsValidation = useCallback((results) => {\r\n const { data: newAdsData, ...restResults } = results;\r\n\r\n const newAds = removeEmptyAds(newAdsData);\r\n\r\n const dataPatch = {\r\n ads: {\r\n ...ads,\r\n data: [\r\n ...newAds,\r\n ],\r\n ...restResults,\r\n },\r\n activity,\r\n };\r\n stepService.send({ type: StepEvents.UPDATE_VALIDATION, data: dataPatch });\r\n }, [stepService, ads, activity]);\r\n\r\n // eslint-disable-next-line no-bitwise\r\n const [, hasInvalidSaveAttemptChanged] = usePrevProp(invalidSaveAttempt | 0);\r\n const [, hasServerErrorsChanged] = usePrevProp(serverErrors, serverErrorsCompare);\r\n const areBeaconsActive = useImpulse(hasInvalidSaveAttemptChanged || hasServerErrorsChanged);\r\n\r\n const [showAllValidationErrors, setShowAllValidationErrors] = useState(false);\r\n if (hasInvalidSaveAttemptChanged) {\r\n setShowAllValidationErrors(true);\r\n }\r\n\r\n const state = {\r\n ads,\r\n i18n,\r\n legacyI18n,\r\n hideStepHeader,\r\n adsErrors,\r\n otherErrors,\r\n systemErrors,\r\n navigationConfirmationPrompt,\r\n showAllValidationErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n deal,\r\n biddingScheme,\r\n };\r\n const api = { onAdsValidation };\r\n\r\n return [state, api];\r\n};\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useCallback, useState, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { get } from 'underscore';\r\nimport { useSelector } from '@xstate/react';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { withPerformanceMarker } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { AdPreview, VideoAdsContainer } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useStepAdsSettingsState } from './use-step-ads-state';\r\n\r\nconst permissionsSelector = state => get(state, 'context.stepsData.permissions');\r\n\r\nconst StepAdsSettingsInternal = (props) => {\r\n const {\r\n stepService,\r\n perfMarker,\r\n scope,\r\n loadClipchampPlayer,\r\n } = props;\r\n\r\n const { aid, cid } = scope.values;\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const [stepState, stepApi] = useStepAdsSettingsState(stepService, activity);\r\n const permissions = useSelector(stepService, permissionsSelector);\r\n const isCTVCopilotVideoGenerationEnabled = permissions && permissions.dynamic && permissions.dynamic.CTVCopilotVideoGeneration;\r\n\r\n const [currentVideoIndex, setCurrentVideoIndex] = useState(0);\r\n\r\n const { onAdsValidation } = stepApi;\r\n\r\n const {\r\n i18n,\r\n legacyI18n,\r\n hideStepHeader,\r\n ads,\r\n adsErrors, otherErrors,\r\n navigationConfirmationPrompt,\r\n systemErrors,\r\n areBeaconsActive,\r\n serverErrors,\r\n deal,\r\n biddingScheme,\r\n showAllValidationErrors,\r\n } = stepState;\r\n\r\n const getBasicSettingsSection = useCallback(() => (\r\n
\r\n {i18n.getString(_TL_('Now that you\\'ve created your ad group, you can create your ads. Add your videos and the Final URL, and we\\'ll show a preview of what your ads might look like.'))}\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
), [i18n, stepService, legacyI18n, perfMarker, cid, aid, ads, currentVideoIndex]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {!hideStepHeader &&\r\n <>\r\n

{i18n.getString(_TL_('Ads'))}

\r\n {i18n.getString(_TL_(''))}\r\n \r\n }\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {getBasicSettingsSection()}\r\n {navigationConfirmationPrompt}\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nStepAdsSettingsInternal.propTypes = {\r\n stepService: PropTypes.shape({}).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n aid: PropTypes.string,\r\n cid: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nexport const StepAdsSettings = withPerformanceMarker(StepAdsSettingsInternal);\r\n","import { isEmpty, result } from 'underscore';\r\nimport { assign } from 'xstate';\r\nimport Promise from 'bluebird';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { stepStateMachine } from '@bingads-webui-campaign-react/step-wizard-machine';\r\nimport { saveAds, modelToViewModelForAd, getErrorsPlaceholders } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\n\r\nimport { STEP_PATHS, viewModelToModelForCampaign } from '@bingads-webui-campaign-react/xandr-campaign';\r\n\r\nimport { StepAdsSettings } from './step-ads-settings';\r\n\r\n\r\nconst needsLoading = () => true;\r\nconst hasCampaignData = context =>\r\n Boolean(result(context, ['stepsData', 'campaign', 'Id']));\r\n\r\n/**\r\n * Loads step data asynchronously. The returned promise must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n *\r\n * The function is called when the wizard enters the step.\r\n * The step will be blocked until the promise resolves.\r\n * @param {Object} context - the current context\r\n * @returns {Promise} a promise that must resolve\r\n * into a single object, opaque to the step, which will be saved\r\n * in the context under the `data` property.\r\n */\r\nconst loadData = (context) => {\r\n const loadPromises = {\r\n ads: Promise.resolve(context.data.ads),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n ads,\r\n }) => {\r\n const { deal } = context.stepsData.adGroup;\r\n const biddingScheme = context.stepsData.campaign.BiddingScheme;\r\n const adsModel = modelToViewModelForAd({ adsModel: ads });\r\n\r\n const results = {\r\n ads: adsModel, oldAdsModel: adsModel, deal, biddingScheme, ...getErrorsPlaceholders(),\r\n };\r\n\r\n return results;\r\n });\r\n};\r\n\r\n// must return `Promise.resolve(data)` or `Promise.reject(error)`\r\n// the payload will be available in `onDone` and `onError` in event's `data` prop.\r\nconst saveData = context =>\r\n saveAds({\r\n ads: context.data.ads,\r\n oldAdsModel: context.data.oldAdsModel,\r\n campaign: context.stepsData.campaign,\r\n adGroup: context.stepsData.adGroup,\r\n activity: context.data.activity,\r\n }, {\r\n scenario: context.stepsData.scenarioName,\r\n activityLogger: context.stepsData.scenario.createActivity('saveAds'),\r\n i18n: context.stepsData.i18n,\r\n });\r\n\r\nconst isValid = context => context.data.ads.isValid;\r\nconst isDirty = context => context.data.ads.isDirty;\r\nconst hasServerErrors = context => !isEmpty(context.data.serverErrors) || !isEmpty(context.data.systemErrors);\r\nexport const needsSaving = context => isDirty(context) || hasServerErrors(context);\r\n\r\nconst patchStepsData = assign({\r\n stepsData: (context/* , event */) => ({\r\n ...context.stepsData,\r\n ads: context.data.ads,\r\n ...hasCampaignData(context) ? {} :\r\n { campaign: viewModelToModelForCampaign(context.data.campaign) },\r\n }),\r\n});\r\nconst clearErrors = assign({\r\n data: context => ({\r\n ...context.data,\r\n ...getErrorsPlaceholders(),\r\n }),\r\n});\r\n\r\nexport const stepAdsWizardConfig = {\r\n id: STEP_PATHS.ADS,\r\n title: _TL_('Ads'),\r\n StepMachine: stepStateMachine,\r\n StepMachineOptions: (stepInfo, initialStepsData) => ({\r\n machineId: STEP_PATHS.ADS,\r\n initialContext: {\r\n id: stepInfo.id,\r\n stepInfo,\r\n stepsData: initialStepsData,\r\n data: {\r\n ads: [],\r\n ...getErrorsPlaceholders(),\r\n },\r\n },\r\n actions: {\r\n patchStepsData,\r\n clearErrors,\r\n },\r\n guards: {\r\n needsLoading,\r\n needsSaving,\r\n isValid,\r\n isDirty,\r\n },\r\n }),\r\n StepComponent: withScope(StepAdsSettings),\r\n canNavigateBackWithoutSaving: true,\r\n stepRepositoryConfig: {\r\n saveData,\r\n loadData,\r\n },\r\n};\r\n","import {\r\n stepAdGroupWizardConfig,\r\n stepCampaignSettingsWizardConfig,\r\n STEP_PATHS,\r\n} from '@bingads-webui-campaign-react/xandr-campaign';\r\n\r\nimport { stepAdsWizardConfig } from './steps';\r\n\r\nconst ScenarioName = {\r\n XandrVideoCampaignCreation: 'XandrVideoCampaignCreation',\r\n XandrVideoAdGroupCreation: 'XandrVideoAdGroupCreation',\r\n XandrVideoCampaignSettings: 'XandrVideoCampaignSettings',\r\n XandrVideoAdGroupSettings: 'XandrVideoAdGroupSettings',\r\n XandrVideoAdsCreation: 'XandrVideoAdsCreation',\r\n};\r\n\r\nconst STEP_INFOS = {\r\n [STEP_PATHS.CAMPAIGN_SETTINGS]: stepCampaignSettingsWizardConfig,\r\n [STEP_PATHS.AD_GROUP]: stepAdGroupWizardConfig,\r\n [STEP_PATHS.ADS]: stepAdsWizardConfig,\r\n};\r\n\r\nconst applyCommonSettingsPageSettings = stepInfo => ({\r\n ...stepInfo,\r\n hideStepHeader: true,\r\n});\r\n\r\n// Scenarios\r\n// I. Creation\r\n// 1. Campaign creation\r\n// 2. Ad group\r\n// ...\r\n// II. Settings\r\n// 1. Campaign settings\r\n// 2. Ad group settings\r\n\r\nconst XANDR_VIDEO_CAMPAIGN_CREATION = {\r\n scenarioName: ScenarioName.XandrVideoCampaignCreation,\r\n isEditing: false,\r\n stepList: [\r\n STEP_INFOS[STEP_PATHS.CAMPAIGN_SETTINGS],\r\n STEP_INFOS[STEP_PATHS.AD_GROUP],\r\n STEP_INFOS[STEP_PATHS.ADS],\r\n ],\r\n};\r\n\r\nconst XANDR_VIDEO_AD_GROUP_CREATION = {\r\n scenarioName: ScenarioName.XandrVideoAdGroupCreation,\r\n isEditing: false,\r\n withContentFooter: false,\r\n stepList: [\r\n STEP_INFOS[STEP_PATHS.AD_GROUP],\r\n STEP_INFOS[STEP_PATHS.ADS],\r\n ],\r\n};\r\n\r\nconst XANDR_VIDEO_CAMPAIGN_SETTINGS = {\r\n scenarioName: ScenarioName.XandrVideoCampaignSettings,\r\n isEditing: true,\r\n stepList: [\r\n applyCommonSettingsPageSettings(STEP_INFOS[STEP_PATHS.CAMPAIGN_SETTINGS]),\r\n ],\r\n};\r\n\r\nconst XANDR_VIDEO_AD_GROUP_SETTINGS = {\r\n scenarioName: ScenarioName.XandrVideoAdGroupSettings,\r\n isEditing: true,\r\n stepList: [\r\n applyCommonSettingsPageSettings(STEP_INFOS[STEP_PATHS.AD_GROUP]),\r\n ],\r\n};\r\n\r\nexport const XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS = {\r\n XANDR_VIDEO_CAMPAIGN_CREATION,\r\n XANDR_VIDEO_AD_GROUP_CREATION,\r\n XANDR_VIDEO_CAMPAIGN_SETTINGS,\r\n XANDR_VIDEO_AD_GROUP_SETTINGS,\r\n};\r\n","import React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { getVideoDeal, isDealCampaign } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport localStorage from '@bingads-webui-component-legacy/storage/localStorage';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS } from '../xandr-video-campaign-crud-scenarios';\r\n\r\nconst getXandrVideoCampaignType = () => {\r\n let xandrVideoCampaignType = config.get('XandrVideoCampaignType');\r\n if (!xandrVideoCampaignType) {\r\n if (localStorage.supportsStorage()) {\r\n xandrVideoCampaignType = localStorage.get('XandrVideoCampaignType');\r\n config.set('XandrVideoCampaignType', xandrVideoCampaignType);\r\n }\r\n }\r\n\r\n return xandrVideoCampaignType;\r\n};\r\n\r\nconst XandrVideoCampaignCreationPageImpl = ((props) => {\r\n const routeToNavigateToWhenDone = getRoutePathById(props.siteMap, 'campaigns');\r\n const xandrVideoCampaignType = getXandrVideoCampaignType();\r\n const xandrVideoDeal = getVideoDeal();\r\n useEffect(() => {\r\n if (isDealCampaign()) {\r\n // return to objective page if user navigates to this page directly\r\n if (!xandrVideoDeal) {\r\n props.scope.save('/campaign/vnext/createcampaign/objective');\r\n }\r\n } else {\r\n // eslint-disable-next-line no-lonely-if\r\n if (!xandrVideoCampaignType) {\r\n props.scope.save('/campaign/vnext/createcampaign/objective');\r\n }\r\n }\r\n\r\n return () => {\r\n if (localStorage.supportsStorage()) {\r\n localStorage.invalidate('XandrVideoCampaignType');\r\n }\r\n };\r\n }, [props.scope, xandrVideoCampaignType, xandrVideoDeal]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nXandrVideoCampaignCreationPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const XandrVideoCampaignCreationPage = withSiteMap(withTheme(withComponentErrorLogging(\r\n XandrVideoCampaignCreationPageImpl,\r\n XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS.XANDR_VIDEO_CAMPAIGN_CREATION.scenarioName\r\n)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\n\r\nimport { XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS } from '../xandr-video-campaign-crud-scenarios';\r\n\r\nconst XandrVideoCampaignSettingsPageImpl = ((props) => {\r\n const routeToNavigateToWhenDone = getRoutePathById(props.siteMap, 'adgroups');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nXandrVideoCampaignSettingsPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n currentAdGroup: PropTypes.shape({}),\r\n currentCampaign: PropTypes.shape({}),\r\n};\r\n\r\nXandrVideoCampaignSettingsPageImpl.defaultProps = {\r\n currentAdGroup: null,\r\n currentCampaign: null,\r\n};\r\n\r\nexport const XandrVideoCampaignSettingsPage = withSiteMap(withTheme(withComponentErrorLogging(\r\n XandrVideoCampaignSettingsPageImpl,\r\n XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS.XANDR_VIDEO_CAMPAIGN_SETTINGS.scenarioName\r\n)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS } from '../xandr-video-campaign-crud-scenarios';\r\n\r\nconst XandrVideoAdGroupSettingsPageImpl = ((props) => {\r\n const routeToNavigateToWhenDone = getRoutePathById(props.siteMap, 'ads');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nXandrVideoAdGroupSettingsPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const XandrVideoAdGroupSettingsPage = withSiteMap(withTheme(withComponentErrorLogging(\r\n XandrVideoAdGroupSettingsPageImpl,\r\n XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS.XANDR_VIDEO_AD_GROUP_SETTINGS.scenarioName\r\n)));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withTheme } from 'react-jss';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withComponentErrorLogging } from '@bingads-webui-campaign-react/global-error-options';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { StepWizard } from '@bingads-webui-campaign-react/step-wizard';\r\nimport { withInstrumentation } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS } from '../xandr-video-campaign-crud-scenarios';\r\n\r\nconst getStyles = () => ({\r\n '@global': {\r\n '.app-shell .app-content-body': {\r\n // need to override the style since ad-group creation page shell inserts footer.\r\n overflow: 'hidden',\r\n flexShrink: '1!important',\r\n },\r\n },\r\n});\r\n\r\nconst XandrVideoAdGroupCreationPageImpl = ((props) => {\r\n const routeToNavigateToWhenDone = getRoutePathById(props.siteMap, 'adgroups');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nXandrVideoAdGroupCreationPageImpl.propTypes = {\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n theme: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const XandrVideoAdGroupCreationPage = withSiteMap(withTheme(withInstrumentation(withComponentErrorLogging(\r\n withDefaultStyles(XandrVideoAdGroupCreationPageImpl, getStyles),\r\n XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS.XANDR_VIDEO_AD_GROUP_CREATION.scenarioName\r\n))));\r\n","import React, { useMemo, useContext, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Wizard,\r\n LayoutContainer,\r\n Layout,\r\n StepContainer,\r\n} from '@bingads-webui-react/wizard';\r\nimport {\r\n SaveBlocker,\r\n DefaultTemplate,\r\n CancelWizardDialog,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { FluentSwitcherContext } from '@bingads-webui-react/fluent-version-switcher';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { WizardPerfMarker } from '@bingads-webui-campaign/wizard-performance-marker';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\n\r\nexport const UnifiedAppWizard = ({\r\n action, storeType, wizardConfig, perfMarker, children,\r\n}) => {\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n const wizardName = useMemo(() => `UnifiedAppCampaign${action}-${storeType}`, [action, storeType]);\r\n\r\n const wizardPerfMarker = useMemo(() => (\r\n perfMarker.createChild(wizardName)\r\n ), [perfMarker, wizardName]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ [`UnifiedAppCampaign${action}`]: storeType });\r\n }, [action, storeType]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nUnifiedAppWizard.propTypes = {\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n action: PropTypes.string.isRequired,\r\n storeType: PropTypes.string.isRequired,\r\n wizardConfig: PropTypes.shape({}).isRequired,\r\n children: PropTypes.node,\r\n};\r\n\r\nUnifiedAppWizard.defaultProps = {\r\n children: null,\r\n};\r\n","import { useResponsiveStyleWrapper } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nconst IndicatorWidth = 10;\r\nconst IndicatorsGap = 8;\r\n\r\nconst getIndicatorsWidth = placements => (placements * IndicatorWidth) + ((placements - 1) * IndicatorsGap);\r\n\r\nexport const getAssetStepStyles = () => ({\r\n container: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n width: '100%',\r\n gap: '32px',\r\n\r\n '& .title-item': {\r\n width: 'unset !important',\r\n },\r\n },\r\n 'container-l': {\r\n width: 'calc(100% - 64px)',\r\n },\r\n imageExperience: {\r\n '& .image-experience-content': {\r\n minWidth: 'unset !important',\r\n },\r\n },\r\n formContainer: {\r\n width: '100%',\r\n '& .text-assets-collection-container': {\r\n width: 'auto',\r\n },\r\n '& .asset-group-name-section .error-string-wrapper': {\r\n right: 'unset !important',\r\n position: 'unset !important',\r\n },\r\n\r\n '& .text-input-container': {\r\n width: '100%',\r\n },\r\n '& .date-settings table': {\r\n width: 'unset !important',\r\n },\r\n },\r\n 'formContainer-xxl': {\r\n width: '530px',\r\n },\r\n 'formContainer-xl': {\r\n width: '430px',\r\n },\r\n previewerContainer: {\r\n marginTop: 150,\r\n '& > div': {\r\n top: 124,\r\n },\r\n flexGrow: '1',\r\n },\r\n 'previewerContainer-l': {\r\n width: 'calc(100% - 64px)',\r\n },\r\n 'previewerContainer-m': {\r\n width: 'calc(100% - 64px)',\r\n },\r\n 'previewerContainer-s': {\r\n width: 'calc(100% - 64px)',\r\n },\r\n adPreview: {\r\n '& .new-preview-carousel-container-adprelib': {\r\n maxWidth: '550px !important',\r\n },\r\n marginTop: '140px',\r\n },\r\n windowsAdPreview: {\r\n position: 'sticky',\r\n width: 420,\r\n marginTop: '140px',\r\n top: '0px',\r\n '& .ad-placement-preview': {\r\n height: 450,\r\n },\r\n '& .new-preview-carousel-container-adprelib': {\r\n // backgroundColor: '#ffffff',\r\n border: '1px solid #C8C8C8 !important',\r\n // borderRadius: '4px',\r\n // boxShadow: '0px 2px 4px 0px rgba(0, 0, 0, 0.10)',\r\n // maxWidth: '420px',\r\n minWidth: 'unset !important',\r\n\r\n '& .preview-string': {\r\n display: 'none',\r\n },\r\n\r\n '& .ad-preview-actions': {\r\n display: 'flex',\r\n },\r\n '& .carousel-inner': {\r\n height: 450,\r\n },\r\n\r\n '& .carousel-indicators': {\r\n display: 'flex',\r\n gap: '8px',\r\n left: '50% !important',\r\n margin: '48px 0 !important',\r\n transform: 'translateX(-50%)',\r\n\r\n '& li': {\r\n margin: '0',\r\n },\r\n },\r\n\r\n '& .carousel-control': {\r\n display: 'flex',\r\n width: '12px',\r\n margin: '12px 0 !important',\r\n left: '50% !important',\r\n },\r\n\r\n '& .carousel-control.left': {\r\n transform: ({ placements }) => {\r\n const transformations = [];\r\n\r\n // Move left arrow to the center\r\n transformations.push('translateX(-50%)');\r\n\r\n // Move left arrow to the left of the indicators\r\n const indicatorsWidth = getIndicatorsWidth(placements);\r\n transformations.push(`translateX(-${indicatorsWidth / 2}px)`);\r\n\r\n // Add extra space between the left arrow and the indicators\r\n transformations.push('translateX(-47px)');\r\n\r\n return transformations.join(' ');\r\n },\r\n bottom: 16,\r\n },\r\n\r\n '& .carousel-control.right': {\r\n transform: ({ placements }) => {\r\n const transformations = [];\r\n\r\n // Move right arrow to the center\r\n transformations.push('translateX(-50%)');\r\n\r\n // Move right arrow to the right of the indicators\r\n const indicatorsWidth = getIndicatorsWidth(placements);\r\n transformations.push(`translateX(${indicatorsWidth / 2}px)`);\r\n\r\n // Add extra space between the right arrow and the indicators\r\n transformations.push('translateX(43px)');\r\n\r\n return transformations.join(' ');\r\n },\r\n bottom: 16,\r\n },\r\n\r\n '& .ad-preview-title': {\r\n height: '24px',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n\r\n '& .preview-title-string-key': {\r\n color: '#323130',\r\n fontSize: '14px',\r\n fontWeight: 700,\r\n marginRight: '8px',\r\n },\r\n\r\n '& .preview-title-preview-type': {\r\n fontSize: '14px',\r\n },\r\n },\r\n\r\n '& .ad-placement-preview': {\r\n overflow: 'hidden',\r\n\r\n '& .card-parent': {\r\n width: '100%',\r\n },\r\n\r\n '& .responsive-ad-preview-content': {\r\n boxSizing: 'border-box',\r\n width: '100%',\r\n },\r\n },\r\n '& .ad-placement-preview.app-ad-windows': {\r\n '& .card-parent': {\r\n '& .responsive-ad-preview-content': {\r\n height: 'fit-content',\r\n width: 'fit-content',\r\n maxWidth: '100%',\r\n '& .text-container-apl': {\r\n maxWidth: 'calc(100% - 25px)',\r\n },\r\n },\r\n },\r\n },\r\n '& .ad-placement-preview.app-ad-start-menu': {\r\n '& .new-responsive-ad-preview-container': {\r\n height: '100%',\r\n width: '100%',\r\n },\r\n },\r\n },\r\n },\r\n 'windowsAdPreview-xxl': {\r\n '@media (min-width: 1400px)': {\r\n width: 530,\r\n },\r\n width: 420,\r\n },\r\n 'windowsAdPreview-xl': {\r\n width: 420,\r\n },\r\n});\r\n\r\nexport const useAssetsStepStyles = () => useResponsiveStyleWrapper(getAssetStepStyles);\r\n","import { platforms } from '@bingads-webui-campaign-react/app-store-selector';\r\nimport { FLOWS } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nimport {\r\n UAPPlacementTypeAlias as EPT,\r\n} from '@bingads-webui-campaign-react/unified-ad-preview-library-cmui';\r\n\r\nexport const flowToPlatform = {\r\n [FLOWS.IOS]: platforms.IOS,\r\n [FLOWS.ANDROID]: platforms.ANDROID,\r\n [FLOWS.WINDOWS]: platforms.WINDOWS,\r\n};\r\n\r\nexport const unifiedAppAdsSurfaces = {\r\n VideoGaming: {\r\n key: 'VideoGaming',\r\n title: _TL_('Video Gaming'),\r\n placements: [\r\n 'VideoHorizontal',\r\n ],\r\n },\r\n M365: {\r\n key: 'M365',\r\n title: _TL_('M365'),\r\n placements: [\r\n 'M365Outlook',\r\n ],\r\n },\r\n MsnDisplay: {\r\n key: 'MsnDisplay',\r\n title: _TL_('MSN & Display'),\r\n placements: [\r\n 'MSNDisplay',\r\n ],\r\n },\r\n MicrosoftCasualGames: {\r\n key: 'MicrosoftCasualGames',\r\n title: _TL_('Microsoft Casual Games'),\r\n placements: [\r\n 'CasualGamesDimensions',\r\n ],\r\n },\r\n BingSearch: {\r\n key: 'BingSearch',\r\n title: _TL_('Bing Search'),\r\n placements: [\r\n 'BingSearch',\r\n 'BingSearchText',\r\n ],\r\n },\r\n};\r\n\r\nexport const adPreviewConfig = [{\r\n placementSetName: unifiedAppAdsSurfaces.VideoGaming.key,\r\n placementTypes: [\r\n EPT.UnifiedAppAds.VideoHorizontal,\r\n ],\r\n}, {\r\n placementSetName: unifiedAppAdsSurfaces.M365.key,\r\n placementTypes: [\r\n EPT.UnifiedAppAds.M365Outlook,\r\n ],\r\n}, {\r\n placementSetName: unifiedAppAdsSurfaces.MsnDisplay.key,\r\n placementTypes: [\r\n EPT.UnifiedAppAds.MSNDisplay,\r\n ],\r\n}, {\r\n placementSetName: unifiedAppAdsSurfaces.MicrosoftCasualGames.key,\r\n placementTypes: [\r\n EPT.UnifiedAppAds.CasualGamesDimensions,\r\n ],\r\n}, {\r\n placementSetName: unifiedAppAdsSurfaces.BingSearch.key,\r\n placementTypes: [\r\n EPT.UnifiedAppAds.BingSearch,\r\n EPT.UnifiedAppAds.BingSearchText,\r\n ],\r\n}];\r\n\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n ValidatedFixedPanel,\r\n getPanelErrorProps,\r\n TextTitle,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n ServerValidatedRemainingCharsValidatedTextField,\r\n GroupInfoImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { StoreAppSelector } from '@bingads-webui-campaign-react/app-store-selector';\r\nimport { CampaignValidationGroup } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { flowToPlatform } from '../model/constants';\r\n\r\nexport const AssetGroupNameSection = (props) => {\r\n const {\r\n flow, i18n, isValidating, onDataChange, campaign,\r\n } = props;\r\n\r\n const onRenderAdGroupNameLabel = useCallback(() => (\r\n \r\n ), []);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n {...props}\r\n >\r\n
{campaign && !campaign.AppSetting && i18n.getString(_TL_('Choose the app you want to promote'))}
\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nAssetGroupNameSection.propTypes = {\r\n flow: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isValidating: PropTypes.bool.isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n campaign: PropTypes.shape({\r\n AppSetting: PropTypes.shape({}),\r\n AppSettingReadOnly: PropTypes.bool,\r\n }).isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useContext, useMemo, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text, Subtitle1 } from '@fluentui/react-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ShortHeadlinesPanel,\r\n DescriptionsPanel,\r\n PANEL_KEYS,\r\n ImagesPanel,\r\n BaseImagePanel,\r\n LogosPanel,\r\n DateSettingsPanel,\r\n AudienceSignalSection } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { VideoPanel, AudienceSignalPanel } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport {\r\n useCollapseState,\r\n Collapse,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n TextAssetsImg,\r\n ImageAssetsImg,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { useVideoAdsCopilot } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { TaskManager } from '@bingads-webui-universal/task-manager';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { FLOWS } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { getHeadlinesCardSummaryDetails, getDescriptionsCardSummaryDetails } from '@bingads-webui-campaign-react/validated-text-collection';\r\n\r\nexport const AssetsSection = ({\r\n imageExperiencePortalContainerState,\r\n transparentLogoExperiencePortalContainerState,\r\n imageExpereienceProngPortalContainerState,\r\n imageExperienceSpotLightPortalContainerState,\r\n prongImageExperienceAddNewImageCallback,\r\n imageSpotlightExperienceAddNewImageCallback,\r\n transparentLogoContainerRef,\r\n logosContainerRef,\r\n imageExperienceAddNewImageCallback,\r\n imagesContainerRef,\r\n imageSpotlightContainerRef,\r\n imageProngContainerRef,\r\n setAddNewDescriptionCallback,\r\n setAddNewShortHeadlinesCallback,\r\n perfMarker,\r\n mergedI18n,\r\n data,\r\n assetPanels,\r\n setSelectedVideoId,\r\n selectedVideoId,\r\n}) => {\r\n const isLoading = useMemo(() => _.isEmpty(data), [data]);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state } = useWizardService();\r\n\r\n const {\r\n wizardData: { flow },\r\n } = state.context;\r\n\r\n const {\r\n Headlines,\r\n Descriptions,\r\n } = data || {};\r\n\r\n const headlinesCardSummaryDetails = useMemo(() => getHeadlinesCardSummaryDetails(i18n, Headlines), [Headlines, i18n]);\r\n const descriptionsCardSummaryDetails = useMemo(() => getDescriptionsCardSummaryDetails(i18n, Descriptions), [Descriptions, i18n]);\r\n\r\n const [\r\n allSections,\r\n allSectionsExpandedSections,\r\n setAllSectionsExpandedSections,\r\n ] = useCollapseState(\r\n assetPanels /* all sections */,\r\n assetPanels /* initially expanded sections */\r\n );\r\n\r\n const [\r\n moreSettings,\r\n moreSettingsExpandedSections,\r\n setMoreSettingsExpandedSections,\r\n ] = useCollapseState(\r\n PANEL_KEYS.START_END_DATES /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n\r\n const allAssetsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAllSectionsExpandedSections }),\r\n [setAllSectionsExpandedSections]\r\n );\r\n\r\n const { fetch } = useVideoAdsCopilot();\r\n\r\n const copilotFetchTaskManager = useMemo(() => new TaskManager(), []);\r\n\r\n useEffect(() => {\r\n fetch(copilotFetchTaskManager);\r\n // setClarityTag({ VideoCopilotGeneration: true });\r\n }, [copilotFetchTaskManager, fetch]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Add assets'))}\r\n \r\n
\r\n
\r\n \r\n {i18n.getString(_TL_('Provide your assets and we\\'ll automatically determine what your ads look like, where and when they appear, and who sees them.'))}\r\n \r\n
\r\n
\r\n
\r\n \r\n {}}\r\n icon={ImageAssetsImg}\r\n imagesContainerRef={imagesContainerRef}\r\n imageExperiencePortalContainerState={imageExperiencePortalContainerState}\r\n imageExperienceAddNewImageCallback={imageExperienceAddNewImageCallback}\r\n images={data && data.Images}\r\n topicKey=\"pop_BA_Apps_Images\"\r\n />\r\n {}}\r\n icon={ImageAssetsImg}\r\n titleKey={_TL_('Large image')}\r\n iconAltText={_TL_('\"Images\" panel\\'s image')}\r\n imagesData={data && data.ImageSPOTLIGHT}\r\n containerRef={imageSpotlightContainerRef}\r\n portalContainerState={imageExperienceSpotLightPortalContainerState}\r\n addNewImageCallback={imageSpotlightExperienceAddNewImageCallback}\r\n maxUploadNum={1}\r\n />\r\n {}}\r\n icon={ImageAssetsImg}\r\n titleKey={_TL_('Small image')}\r\n iconAltText={_TL_('\"Images\" panel\\'s image')}\r\n imagesData={data && data.ImagePRONG}\r\n containerRef={imageProngContainerRef}\r\n portalContainerState={imageExpereienceProngPortalContainerState}\r\n addNewImageCallback={prongImageExperienceAddNewImageCallback}\r\n maxUploadNum={1}\r\n />\r\n \r\n \r\n \r\n {flow !== FLOWS.WINDOWS && (\r\n \r\n )}\r\n \r\n
\r\n
\r\n {\r\n _.contains(assetPanels, PANEL_KEYS.AUDIENCE_SIGNAL) && (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n
\r\n
\r\n
\r\n {i18n.getString(_TL_('More Settings'))} \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nAssetsSection.propTypes = {\r\n imageExperiencePortalContainerState: PropTypes.shape({}).isRequired,\r\n imageExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n imageProngContainerRef: PropTypes.shape({}).isRequired,\r\n imageSpotlightContainerRef: PropTypes.shape({}).isRequired,\r\n imageExpereienceProngPortalContainerState: PropTypes.shape({}).isRequired,\r\n imageExperienceSpotLightPortalContainerState: PropTypes.shape({}).isRequired,\r\n logosContainerRef: PropTypes.shape({}).isRequired,\r\n imagesContainerRef: PropTypes.shape({}).isRequired,\r\n setAddNewDescriptionCallback: PropTypes.func.isRequired,\r\n setAddNewShortHeadlinesCallback: PropTypes.func.isRequired,\r\n perfMarker: PropTypes.string.isRequired,\r\n mergedI18n: PropTypes.shape({}).isRequired,\r\n prongImageExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n imageSpotlightExperienceAddNewImageCallback: PropTypes.func.isRequired,\r\n data: PropTypes.shape({\r\n videos: PropTypes.shape([]),\r\n Images: PropTypes.shape([]),\r\n ImageSPOTLIGHT: PropTypes.shape([]),\r\n ImagePRONG: PropTypes.shape([]),\r\n logos: PropTypes.shape([]),\r\n }).isRequired,\r\n transparentLogoContainerRef: PropTypes.shape({}).isRequired,\r\n transparentLogoExperiencePortalContainerState: PropTypes.shape({}).isRequired,\r\n assetPanels: PropTypes.shape({}).isRequired,\r\n setSelectedVideoId: PropTypes.func.isRequired,\r\n selectedVideoId: PropTypes.string.isRequired,\r\n};\r\n","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { noop, isArray, union } from 'underscore';\r\nimport React, { useContext, useMemo, useCallback, useRef, useState, useEffect } from 'react';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { withBannerService, CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { RecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { mergeI18n } from '@bingads-webui-campaign-react/i18n-merger';\r\nimport { useWizardService, matchStepState, STEP_STATES } from '@bingads-webui-react/wizard';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { getGenericImageObjectAsync } from '@bingads-webui-campaign/image-experience-utils';\r\nimport {\r\n FormErrorGroup, UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { AssetScenario } from '@bingads-webui-react/copilot-event-provider';\r\nimport { AssetEventFeature } from '@bingads-webui-campaign-react/copilot-common';\r\nimport { useCopilot } from '@bingads-webui-campaign-react/copilot-experience';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { useIsMounted } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\nimport { legacyI18nOfListingGroup } from '@bingads-webui-campaign-react/listing-groups-page';\r\nimport { StepHeader } from '@bingads-webui-campaign-react/pmax-common';\r\nimport { SystemErrors, AssetGroupValidationGroup, FLOWS, AppAdsPreview } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport {\r\n ValidatedImageExperienceWrapper,\r\n PerfMaxResponsiveAdPreviewUAPL\r\n} from '@bingads-webui-campaign-react/pmax-image-experience';\r\nimport { PerformanceMarkerContext } from '@bingads-webui-campaign-react/performance-marker-provider';\r\n\r\nimport { getAssetStepStyles } from '../use-assets-step-styles';\r\n\r\nimport { AssetGroupNameSection } from './asset-group-name-section';\r\nimport { AssetsSection } from './assets-section';\r\nimport { adPreviewConfig, unifiedAppAdsSurfaces } from '../model/constants';\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\nconst MaxImageCount = 1;\r\n\r\nconst AssetsStepFormInternal = ({\r\n data,\r\n onDataChange: onDataChangeProp,\r\n error,\r\n scope,\r\n assetPanels,\r\n}) => {\r\n const isMounted = useIsMounted();\r\n\r\n const { state } = useWizardService();\r\n\r\n const {\r\n wizardData: { flow },\r\n } = state.context;\r\n\r\n const permissions = useContext(PermissionsContext);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const [recommendationContext] = useContext(RecommendationContext);\r\n\r\n const imagesContainerRef = useRef(null);\r\n const logosContainerRef = useRef(null);\r\n const transparentLogoContainerRef = useRef(null);\r\n const ImageSPOTLIGHTContainerRef = useRef(null);\r\n const ImagePRONGContainerRef = useRef(null);\r\n const portraitContainerRef = useRef(null);\r\n\r\n const stylingProps = useMemo(() =>\r\n ({ component: { placements: 3 } }), []);\r\n\r\n const getStyles = useResponsiveStyles(getAssetStepStyles, stylingProps);\r\n\r\n const { cid, aid } = scope.values || {};\r\n\r\n const [selectedVideoId, setSelectedVideoId] = useState(0);\r\n\r\n const [imageExperiencePortalContainerState, setImageExperiencePortalContainerState] = useState({});\r\n const [ImageSPOTLIGHTExperiencePortalContainerState, setImageSPOTLIGHTExperiencePortalContainerState] = useState({});\r\n const [ImagePRONGExperiencePortalContainerState, setImagePRONGExperiencePortalContainerState] = useState({});\r\n\r\n const [imageExperienceAddNewImageCallback, setImageExperienceAddNewImageCallback] = useState(noop);\r\n const [prongImageExperienceAddNewImageCallback, setProngImageExperienceAddNewImageCallback] = useState(noop);\r\n const [imageSpotlightExperienceAddNewImageCallback, setImageSpotlightExperienceAddNewImageCallback] = useState(noop);\r\n\r\n const [addNewDescriptionCallback, setAddNewDescriptionCallback] = useState(noop);\r\n const [addNewShortHeadlinesCallback, setAddNewShortHeadlinesCallback] = useState(noop);\r\n const [transparentLogoExperiencePortalContainerState, setTransparentLogoExperiencePortalContainerState] = useState({});\r\n const [previewTransparentLogoSharedState, setPreviewTransparentLogoSharedState] = useState({ previewImageId: null, cropImageObj: null });\r\n const [previewImageSPOTLIGHTSharedState, setPreviewImageSPOTLIGHTSharedState] = useState({ previewImageId: null, cropImageObj: null });\r\n const [previewImagePRONGSharedState, setPreviewImagePRONGSharedState] = useState({ previewImageId: null, cropImageObj: null });\r\n const [appLogo, setAppLogo] = useState(null);\r\n\r\n const {\r\n assetGroup,\r\n campaign,\r\n } = data || {};\r\n\r\n const {\r\n AppSetting,\r\n } = campaign || {};\r\n\r\n const {\r\n Images,\r\n CallToAction,\r\n LongHeadlines,\r\n Descriptions,\r\n Headlines,\r\n videos = [],\r\n ImageSPOTLIGHT,\r\n ImagePRONG,\r\n TransparentLogo,\r\n } = assetGroup || {};\r\n\r\n const onDataChange = useCallback((result) => {\r\n if (!isMounted.current) return;\r\n onDataChangeProp({ ...result });\r\n }, [isMounted, onDataChangeProp]);\r\n\r\n const onReset = useCallback(() => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n Images: {\r\n ...assetGroup.Images,\r\n ImageList: [],\r\n ImageAssets: null,\r\n },\r\n Headlines: {\r\n Headline0: '',\r\n Headline1: '',\r\n Headline2: '',\r\n },\r\n LongHeadlines: {\r\n LongHeadline0: '',\r\n },\r\n Descriptions: {\r\n Description0: '',\r\n Description1: '',\r\n },\r\n },\r\n }),\r\n isValid: false,\r\n });\r\n }, [assetGroup, onDataChange]);\r\n\r\n const onUpdateImageList = useCallback((newImageList) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n Images: {\r\n ...prevData.assetGroup.Images,\r\n ImageList: newImageList,\r\n ImageAssets: null,\r\n },\r\n },\r\n }),\r\n });\r\n }, [onDataChange]);\r\n\r\n const {\r\n serverErrors = [],\r\n systemErrors = [],\r\n } = error || {};\r\n\r\n const i18n = useContext(I18nContext);\r\n const legacyGlobalI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap, legacyI18nOfListingGroup]), [i18n]);\r\n\r\n const mergedI18n = useMemo(() => {\r\n const mergedTempI18n = mergeI18n(\r\n legacyI18n,\r\n i18n\r\n );\r\n\r\n return mergeI18n(\r\n legacyGlobalI18n,\r\n mergedTempI18n\r\n );\r\n }, [i18n, legacyI18n, legacyGlobalI18n]);\r\n\r\n const { state: { context: { saveFailed } } } = useFormService();\r\n\r\n const isSaving = matchStepState(state, STEP_STATES.SAVING);\r\n const isCanceling = matchStepState(state, STEP_STATES.CANCELING);\r\n\r\n const perfMarker = useContext(PerformanceMarkerContext);\r\n\r\n const [previewImagesSharedState, setPreviewImagesSharedState] = useState({\r\n previewImageId: null,\r\n previewLogoId: null,\r\n cropImageObj: null,\r\n editingPlacementType: '',\r\n });\r\n\r\n const { postAssetEventLog } = recommendationContext || noop;\r\n\r\n const maxUploadNum = useMemo(() => {\r\n const imageListLength = Images && Images.ImageList && isArray(Images.ImageList) ? Images.ImageList.length : 0;\r\n return 20 - imageListLength;\r\n }, [Images]);\r\n\r\n const finalUrlFromApp = useMemo(() => {\r\n if (AppSetting) {\r\n if (flow === FLOWS.WINDOWS) {\r\n return `https://apps.microsoft.com/detail/${AppSetting.AppId}`;\r\n }\r\n return AppSetting.AppUrl;\r\n }\r\n return null;\r\n }, [AppSetting, flow]);\r\n\r\n const {\r\n copilotBanner,\r\n suggestionPoller,\r\n } = useCopilot({\r\n maxUploadNum,\r\n addNewShortHeadlinesCallback,\r\n addNewLongHeadlinesCallback: noop,\r\n addNewDescriptionCallback,\r\n imageExperienceAddNewImageCallback,\r\n // newCTACallback,\r\n currentCTA: CallToAction,\r\n onReset,\r\n cid,\r\n aid,\r\n serverContext,\r\n instrumentation,\r\n data: {\r\n ...assetGroup,\r\n finalUrls: [finalUrlFromApp],\r\n FinalUrlForRecommendation: finalUrlFromApp,\r\n },\r\n isSaving,\r\n isCanceling,\r\n enableCopilotRecommendations: true,\r\n feature: AssetEventFeature.PMAX, // TODO Feature name\r\n assetScenario: AssetScenario.CREATE_WORK_FLOW,\r\n });\r\n\r\n const imageExperienceComponents = useMemo(() => (\r\n
\r\n {}} // TODO\r\n isLogoEnabled={false}\r\n previewImagesSharedState={previewImagesSharedState}\r\n setPreviewImagesSharedState={setPreviewImagesSharedState}\r\n updatePortalContainerState={setImageExperiencePortalContainerState}\r\n setImageExperienceAddNewImageCallback={setImageExperienceAddNewImageCallback}\r\n validationProps={{ data: assetGroup, initialValue: assetGroup }}\r\n suggestionPoller={suggestionPoller}\r\n wizardPerfMarker={perfMarker}\r\n postAssetEventLog={postAssetEventLog}\r\n UAPLPMaxIntegration\r\n showCopilotOptionForImage={permissions.IsBackgroundSceneEnabled}\r\n // currently there is implementation in image experience to unify prong and spotlight images for windows store.\r\n // but we will not use it for now. We will keep two separate panels for prong and spotlight images.\r\n // Later when we want to unify this behaviour we can turn on this flag and undo this change.\r\n // isUnifiedAppCampaignWindowsStore={flow === FLOWS.WINDOWS}\r\n imageAssetsOptional={flow === FLOWS.WINDOWS}\r\n />\r\n
), [i18n, permissions, postAssetEventLog, suggestionPoller, previewImagesSharedState, assetGroup, perfMarker, flow]);\r\n\r\n const transparentLogoComponent = useMemo(() => (\r\n
\r\n \r\n
), [i18n, permissions, perfMarker, assetGroup, previewTransparentLogoSharedState]);\r\n\r\n const validatedImageSPOTLIGHTExperienceWrapper = useMemo(() => (\r\n \r\n ), [i18n, permissions, previewImageSPOTLIGHTSharedState, assetGroup, perfMarker]);\r\n\r\n const validatedImagePRONGExperienceWrapper = useMemo(() => (\r\n \r\n ), [i18n, permissions, previewImagePRONGSharedState, assetGroup, perfMarker]);\r\n\r\n const adPreview = useMemo(() => {\r\n const previewProps = {\r\n i18n,\r\n imageList: Images && Images.ImageList,\r\n updateImageList: onUpdateImageList,\r\n shortHeadline: (Headlines && Headlines.Headline0 !== '' && Headlines.Headline0) || undefined,\r\n longHeadline: (LongHeadlines && LongHeadlines.LongHeadline0 !== '' && LongHeadlines.LongHeadline0) || undefined,\r\n description: (Descriptions && Descriptions.Description0 !== '' && Descriptions.Description0) || undefined,\r\n businessName: AppSetting && AppSetting.AppTitle,\r\n callToAction: CallToAction,\r\n videos: (videos.length > selectedVideoId && selectedVideoId !== null) ? [videos[selectedVideoId]] : [],\r\n displayUrl: finalUrlFromApp,\r\n url: finalUrlFromApp,\r\n previewImagesSharedState,\r\n setPreviewImagesSharedState,\r\n adPreviewConfig,\r\n autoHeightCarousel: true,\r\n customSurfaceKeys: unifiedAppAdsSurfaces,\r\n appLogo,\r\n };\r\n return (\r\n \r\n );\r\n }, [i18n, Images, videos, appLogo, AppSetting, selectedVideoId, finalUrlFromApp, onUpdateImageList, Headlines, LongHeadlines, Descriptions, CallToAction, previewImagesSharedState]);\r\n\r\n const windowsAppAdsPreivew = useMemo(() => (\r\n \r\n ), [i18n, Headlines, ImageSPOTLIGHT, ImagePRONG, TransparentLogo, AppSetting, previewImageSPOTLIGHTSharedState]);\r\n\r\n useEffect(() => {\r\n if (AppSetting && AppSetting.IconUrl) {\r\n getGenericImageObjectAsync(AppSetting.IconUrl).then((iconImage) => {\r\n setAppLogo({\r\n ...iconImage,\r\n CropSettings: {},\r\n });\r\n });\r\n }\r\n }, [AppSetting]);\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n {copilotBanner}\r\n \r\n {flow !== FLOWS.WINDOWS && imageExperienceComponents}\r\n {flow === FLOWS.WINDOWS && transparentLogoComponent}\r\n {flow === FLOWS.WINDOWS && validatedImageSPOTLIGHTExperienceWrapper}\r\n {flow === FLOWS.WINDOWS && validatedImagePRONGExperienceWrapper}\r\n \r\n \r\n
\r\n
\r\n {\r\n flow === FLOWS.WINDOWS ?\r\n
\r\n {windowsAppAdsPreivew}\r\n
\r\n :\r\n
\r\n {adPreview}\r\n
\r\n }\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nAssetsStepFormInternal.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({\r\n Id: PropTypes.number,\r\n TimeZone: PropTypes.string,\r\n }),\r\n assetGroup: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n Images: PropTypes.shape({\r\n ImageList: PropTypes.arrayOf(PropTypes.string),\r\n ImageAssets: PropTypes.shape({}),\r\n }),\r\n CallToAction: PropTypes.shape({\r\n cta: PropTypes.string,\r\n }),\r\n FinalUrlForRecommendation: PropTypes.string,\r\n BusinessName: PropTypes.string,\r\n Headlines: PropTypes.shape({}),\r\n LongHeadlines: PropTypes.shape({}),\r\n Descriptions: PropTypes.shape({}),\r\n }),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.string),\r\n systemErrors: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n cid: PropTypes.string,\r\n aid: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n assetPanels: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nAssetsStepFormInternal.defaultProps = {\r\n error: {},\r\n};\r\n\r\nexport const AssetsStepForm = withBannerService(withScope(AssetsStepFormInternal));\r\n","import React, { useMemo } from 'react';\r\nimport propTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { AdAssetsFormShimmer, AdAssetsPreviewerShimmer } from '@bingads-webui-campaign-react/pmax-lite-shimmers';\r\nimport { getAssetsPanels } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\n\r\nimport { AssetsStepForm } from './components';\r\nimport { useAssetsStepStyles } from './use-assets-step-styles';\r\n\r\nexport const AssetsStepShell = (props) => {\r\n const { data } = props || {};\r\n\r\n const isLoading = useMemo(() => _.isEmpty(data), [data]);\r\n const getStyles = useAssetsStepStyles();\r\n\r\n const { state } = useWizardService();\r\n\r\n const {\r\n wizardData: { flow },\r\n } = state.context;\r\n\r\n const assetPanels = useMemo(() => getAssetsPanels(flow), [flow]);\r\n\r\n return (\r\n <>\r\n {\r\n isLoading ?\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n : \r\n }\r\n \r\n );\r\n};\r\n\r\nAssetsStepShell.propTypes = {\r\n data: propTypes.shape({}),\r\n};\r\n\r\nAssetsStepShell.defaultProps = {\r\n data: {},\r\n};\r\n","\r\nimport { generateNameSuggestionSuffix } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { getBudgetRange } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\nimport { getDefaultLocationTargetsViewModel, getDefaultLanguagesViewModel } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { URL_RULES_OPTIONS } from '@bingads-webui-campaign-react/url-rules';\r\nimport { FLOWS } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nconst platformToAppStore = {\r\n Windows: 'MicrosoftAppStore',\r\n Android: 'GoogleAppStore',\r\n iOS: 'AppleAppStore',\r\n};\r\n\r\nconst getBiddingScheme = (flow) => {\r\n const isFlowApps = flow !== FLOWS.WINDOWS;\r\n if (isFlowApps) {\r\n return {\r\n Type: 'ManualCpc',\r\n ManualCpc: 5,\r\n };\r\n }\r\n return {\r\n Type: 'ManualCpa',\r\n ManualCpi: 5,\r\n };\r\n};\r\n\r\nexport const getDefaultCampaignData = ({\r\n serverContext,\r\n cnMarketAccount,\r\n AppSetting,\r\n flow,\r\n}) => {\r\n let platformNamePrefix;\r\n if (flow !== FLOWS.WINDOWS) {\r\n platformNamePrefix = flow === FLOWS.ANDROID ? 'Android' : 'iOS';\r\n }\r\n return ({\r\n Name: `${generateNameSuggestionSuffix(flow === FLOWS.WINDOWS ? 'Windows Store Campaign' : `${platformNamePrefix} Mobile App Campaign`)}-${Math.floor(Math.random() * 100)}`,\r\n Status: 'Paused',\r\n Languages: getDefaultLanguagesViewModel(cnMarketAccount),\r\n Budget: {\r\n Amount: getBudgetRange(serverContext.CurrentAccount.CurrencyCode).Daily.Default,\r\n Type: 'DailyStandard',\r\n },\r\n BiddingScheme: getBiddingScheme(flow),\r\n CampaignType: 'App',\r\n CampaignSubType: 'AppInstall',\r\n locationTargets: getDefaultLocationTargetsViewModel(cnMarketAccount),\r\n AppStore: platformToAppStore[AppSetting?.AppPlatform],\r\n AppId: AppSetting?.AppStoreId,\r\n TrackingUrlTemplate: 'http://www.trackingtool.com/tracking?url={lpurl}&type=1',\r\n AppSetting,\r\n });\r\n};\r\n\r\nexport const getDefaultAssetGroup = ({ i18n, businessName, storeFinalUrl = null }) => ({\r\n Name: generateNameSuggestionSuffix(i18n.getString(_TL_('AssetGroup'))),\r\n Status: 'Paused',\r\n Images: {\r\n ImageList: [],\r\n IsOptional: true,\r\n },\r\n BusinessName: businessName,\r\n FinalUrls: [storeFinalUrl],\r\n FinalUrlForRecommendation: storeFinalUrl,\r\n UrlRulesOption: URL_RULES_OPTIONS.All,\r\n});\r\n","import { useCallback, useContext } from 'react';\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { PermissionsContext } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { saveAssetGroup, loadCampaignAsViewModel, FLOWS } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { useAppStoreRepository } from '@bingads-webui-campaign-react/app-store-selector';\r\nimport { loadAssetGroupWithVideos, loadAssetGroupForWindowsStore } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { newVideoFromMTObject } from '@bingads-webui-campaign-react/image-experience-video-part';\r\nimport cacheManager from '@bingads-webui-campaign-legacy/cache-manager/index';\r\n\r\nimport {\r\n getLoggerWithoutPageInfo,\r\n createVideoRepository,\r\n createImageRepository,\r\n createFolderRepository,\r\n uploadVideoMetadata,\r\n} from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { getLogVersion } from '@bingads-webui-campaign-react/asset-library-model';\r\n\r\nimport { createDefaultCampaign, getDefaultAssetGroup } from './model';\r\nimport { flowToPlatform } from './model/constants';\r\n\r\nexport const useAssetsStepRepository = () => {\r\n const scenarioContext = useContext(ScenarioContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n\r\n const {\r\n wizardData: { flow },\r\n } = state.context;\r\n\r\n const permissions = useContext(PermissionsContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const versionForLog = getLogVersion(permissions);\r\n\r\n const logger = getLoggerWithoutPageInfo(activity, versionForLog, 'UnifiedAppAdsStep');\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { aid, cid } = scope.values;\r\n\r\n const { searchAppById, oDataConfig } = useAppStoreRepository({ platform: flowToPlatform[flow] });\r\n\r\n const videoRepository = createVideoRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n\r\n const folderRepository = createFolderRepository({\r\n i18n,\r\n logger,\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n\r\n const imageRepository = createImageRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n logger,\r\n i18n,\r\n activity,\r\n });\r\n\r\n const uploadVideoIfNeeded = useCallback(({ assetGroup }) => {\r\n const videoPromises = [];\r\n\r\n if (!assetGroup.videos) {\r\n return Promise.resolve(assetGroup);\r\n }\r\n\r\n // check for videos in the assetGroup that dont have an id.\r\n assetGroup.videos.forEach((video) => {\r\n if (!video.id) {\r\n videoPromises.push(uploadVideoMetadata({\r\n videoMetadata: video,\r\n newVideoFromMTObject,\r\n folderRepository,\r\n imageRepository,\r\n videoRepository,\r\n }).then((newVideo) => {\r\n _.extend(video, newVideo);\r\n }));\r\n }\r\n });\r\n\r\n if (_.isEmpty(videoPromises)) {\r\n return Promise.resolve(assetGroup);\r\n }\r\n\r\n return Promise.all(videoPromises).then(() => assetGroup);\r\n }, [folderRepository, imageRepository, videoRepository]);\r\n\r\n const load = useCallback(() => {\r\n const { assetGroup: savedAssetGroup, campaign: savedCampaign } = state.context.wizardData;\r\n\r\n const campaignId = savedCampaign ? savedCampaign.Id : null;\r\n const assetGroupId = savedAssetGroup ? savedAssetGroup.Id : null;\r\n\r\n const saveCampaignsPromise = campaignId\r\n ? loadCampaignAsViewModel(cid, aid, campaignId)\r\n : Promise.resolve({});\r\n\r\n const assetGroupPromise = flow === FLOWS.WINDOWS ? loadAssetGroupForWindowsStore : loadAssetGroupWithVideos;\r\n\r\n const savedAssetGroupPromise = assetGroupId\r\n ? assetGroupPromise(cid, aid, campaignId, assetGroupId, i18n, false, false, videoRepository)\r\n : Promise.resolve(getDefaultAssetGroup({ i18n }));\r\n\r\n return Promise.props({ campaign: saveCampaignsPromise, assetGroup: savedAssetGroupPromise })\r\n .then(({ campaign, assetGroup }) => {\r\n if (_.has(campaign, 'data')) {\r\n // since the view model conversion adds a data parameter, we dont need it in this wizard.\r\n // eslint-disable-next-line no-param-reassign\r\n campaign = campaign.data;\r\n }\r\n if (_.has(assetGroup, 'data')) {\r\n // since the view model conversion adds a data parameter, we dont need it in this wizard.\r\n // eslint-disable-next-line no-param-reassign\r\n assetGroup = assetGroup.data;\r\n }\r\n\r\n return ({\r\n campaign,\r\n assetGroup,\r\n });\r\n }).then(({ campaign, assetGroup }) => {\r\n if (campaign && campaign.CampaignSettings && campaign.CampaignSettings.length > 0) {\r\n const appSettings = campaign.CampaignSettings.find(settings => settings['@odata.type'] === '#Model.AppSetting');\r\n const { AppId } = appSettings || {};\r\n\r\n return searchAppById(AppId).then((appInfo) => {\r\n // eslint-disable-next-line no-param-reassign\r\n campaign.AppSetting = appInfo;\r\n // eslint-disable-next-line no-param-reassign\r\n campaign.AppSettingReadOnly = true;\r\n\r\n return {\r\n campaign,\r\n assetGroup,\r\n };\r\n });\r\n }\r\n return {\r\n campaign,\r\n assetGroup,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace(`[UnifiedAppWizard] loadData failed. Error: ${errorData}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, i18n, state.context.wizardData, aid, cid, searchAppById, videoRepository]);\r\n\r\n const save = useCallback(({\r\n data,\r\n initialData,\r\n }) => {\r\n const savedCampaign = state.context.wizardData.campaign;\r\n\r\n const { assetGroup: assetGroupToSave, campaign: campaignToSave } = data;\r\n const { assetGroup: initialAssetGroup } = initialData;\r\n\r\n const { AppSetting } = campaignToSave;\r\n\r\n const saveCampaignsPromise = savedCampaign\r\n ? Promise.resolve({\r\n campaign: {\r\n data: savedCampaign,\r\n },\r\n }) :\r\n createDefaultCampaign({\r\n i18n,\r\n serverContext,\r\n scenarioContext,\r\n AppSetting,\r\n flow,\r\n });\r\n\r\n return saveCampaignsPromise.then((result) => {\r\n const { campaign } = result;\r\n\r\n activity.trace('[UnifiedAppWizard] - Default Campaign saved');\r\n activity.signal(`[UnifiedAppWizard] - Default Campaign saved, campaignId: ${campaign.data.Id}`);\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: result.campaign.data });\r\n\r\n cacheManager.invalidate('AssetGroup');\r\n cacheManager.invalidate('Campaign');\r\n\r\n return {\r\n campaign: result.campaign.data,\r\n };\r\n }).then((result) => {\r\n const assetGroupChanges = {\r\n assetGroup: {\r\n data: assetGroupToSave,\r\n },\r\n originalAssetGroup: {\r\n data: initialAssetGroup,\r\n },\r\n campaign: result.campaign,\r\n };\r\n\r\n const saveContext = {\r\n scenario: scenarioContext.name,\r\n activity,\r\n activityLogger: scenarioContext.createActivity('saveAssets'),\r\n i18n,\r\n serverContext,\r\n cid,\r\n aid,\r\n };\r\n\r\n return Promise.props({\r\n campaign: Promise.resolve(result.campaign),\r\n savedAssetGroup: uploadVideoIfNeeded({ assetGroup: assetGroupToSave })\r\n .then(() => saveAssetGroup(assetGroupChanges, saveContext)),\r\n });\r\n }).then((result) => {\r\n const { savedAssetGroup } = result;\r\n\r\n activity.trace(`[PmaxWizard] saveData succeeded. Assets count: ${result}`);\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { assetGroup: savedAssetGroup.assetGroup.data });\r\n\r\n // TODO: Uncomment this when copilot recommendations are ready\r\n // logCopilotRecommendations({\r\n // recommendationContext,\r\n // assetGroup: savedAssetGroup.assetGroup.data,\r\n // campaignId: result.campaign.Id,\r\n // });\r\n\r\n return {\r\n campaign: result.campaign,\r\n assetGroup: savedAssetGroup.assetGroup.data,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace(`[UnifiedAppWizard] saveData failed. Error: ${errorData}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, cid, flow, i18n, scenarioContext, send, serverContext, state.context.wizardData.campaign, uploadVideoIfNeeded]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { saveCampaign } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { getDefaultCampaignData } from './default-data';\r\n\r\nexport const createDefaultCampaign = ({\r\n i18n,\r\n serverContext,\r\n scenarioContext,\r\n AppSetting,\r\n flow,\r\n}) => {\r\n const permissions = serverContext.Permissions || {};\r\n\r\n const initialCampaignViewModel = {\r\n data: getDefaultCampaignData({\r\n i18n,\r\n serverContext,\r\n cnMarketAccount: permissions.IsDomesticSimplifiedChineseEnabled,\r\n AppSetting,\r\n flow,\r\n }),\r\n };\r\n\r\n return saveCampaign({\r\n campaign: initialCampaignViewModel,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('saveDefaultCampaign'),\r\n });\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport propTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { AdAssetsFormShimmer, AdAssetsPreviewerShimmer } from '@bingads-webui-campaign-react/pmax-lite-shimmers';\r\nimport { getAssetsSettingsPanels } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\n\r\nimport { AssetsStepForm } from './components';\r\nimport { useAssetsStepStyles } from './use-assets-step-styles';\r\n\r\nexport const AssetsStepSettingsShell = (props) => {\r\n const { data } = props || {};\r\n\r\n const isLoading = useMemo(() => _.isEmpty(data), [data]);\r\n const getStyles = useAssetsStepStyles();\r\n\r\n const { state } = useWizardService();\r\n\r\n const {\r\n wizardData: { flow },\r\n } = state.context;\r\n\r\n const assetPanels = useMemo(() => getAssetsSettingsPanels(flow), [flow]);\r\n\r\n return (\r\n <>\r\n {\r\n isLoading ?\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n : \r\n }\r\n \r\n );\r\n};\r\n\r\nAssetsStepSettingsShell.propTypes = {\r\n data: propTypes.shape({}),\r\n};\r\n\r\nAssetsStepSettingsShell.defaultProps = {\r\n data: {},\r\n};\r\n","\r\nimport { getLocationTargetingStyles } from '@bingads-webui-campaign-react/location-targeting';\r\nimport { useResponsiveStyleWrapper } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nconst getStyles = () => ({\r\n container: {\r\n maxWidth: 680,\r\n },\r\n ...getLocationTargetingStyles(),\r\n});\r\n\r\nexport const useTargetingStepStyles = () => useResponsiveStyleWrapper(getStyles);\r\n","import React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { isEmpty } from 'underscore';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport {\r\n apiErrorMapper,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { PerformanceMarkerContext } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport {\r\n FormErrorGroup, UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport { StepHeader } from '@bingads-webui-campaign-react/pmax-common';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { LanguageTargetPanel, AudienceSignalSection, PANEL_KEYS } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { LocationTargetingSettingPanel, AudienceSignalPanel, useIsMounted } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { CampaignValidationGroup, AssetGroupValidationGroup, SystemErrors } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { PlacementTargetPanel, PANEL_KEYS as PANEL_KEYS_V2 } from '@bingads-webui-campaign-react/wizard-shared-components-v2';\r\n\r\nimport { useTargetingStepStyles } from './use-targeting-step-styles';\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nexport const TargetingStepShell = ({\r\n data: targetingInfo = {},\r\n onDataChange,\r\n error,\r\n}) => {\r\n const isLoading = useMemo(() => isEmpty(targetingInfo), [targetingInfo]);\r\n const isMounted = useIsMounted();\r\n\r\n const getStyles = useTargetingStepStyles();\r\n\r\n const { serverErrors, systemErrors } = error || {};\r\n\r\n const { state: { context: { saveFailed } } } = useFormService();\r\n const i18n = useContext(I18nContext);\r\n const perfMarker = useContext(PerformanceMarkerContext);\r\n\r\n const {\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n campaign = {},\r\n assetGroup = {},\r\n } = targetingInfo || {};\r\n\r\n const [\r\n allSections,\r\n expandedSections,\r\n setExpandedSections,\r\n ] = useCollapseState(\r\n // PANEL_KEYS_V2.PLACEMENT_TARGET should be added to these arrays once it's ready to enable it\r\n [PANEL_KEYS.LOCATIONS, PANEL_KEYS.LANGUAGE_TARGET, PANEL_KEYS.AUDIENCE_SIGNAL],\r\n [PANEL_KEYS.LOCATIONS, PANEL_KEYS.LANGUAGE_TARGET, PANEL_KEYS.AUDIENCE_SIGNAL]\r\n );\r\n\r\n const targetingExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setExpandedSections }),\r\n [setExpandedSections]\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nTargetingStepShell.propTypes = {\r\n data: PropTypes.shape({\r\n locationTargets: PropTypes.shape({}),\r\n bundleCountries: PropTypes.arrayOf(PropTypes.shape({})),\r\n bundleLocationCriterions: PropTypes.arrayOf(PropTypes.shape({})),\r\n campaign: PropTypes.shape({}),\r\n assetGroup: PropTypes.shape({}),\r\n }),\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n systemErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n\r\nTargetingStepShell.defaultProps = {\r\n data: {},\r\n error: {},\r\n};\r\n","import { useResponsiveStyleWrapper } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nconst getStyles = () => ({\r\n formContainer: {\r\n maxWidth: 800,\r\n '& .advanced-scheduling-grid': {\r\n width: 'unset !important',\r\n\r\n '& .ad-scheduling-grid': {\r\n minWidth: 'unset !important',\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport const useCampaignDetailsStepStyles = () => useResponsiveStyleWrapper(getStyles);\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useMemo, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { LocationTargetingSettingPanel, useIsMounted } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport {\r\n CampaignNamePanel,\r\n BudgetPanel,\r\n BidStrategyPanel,\r\n BidValuePanel,\r\n LanguageTargetPanel,\r\n AdSchedulePanel,\r\n UrlOptionsPanel,\r\n AppDetailsPanel,\r\n PANEL_KEYS,\r\n} from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { CampaignValidationGroup } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { MANUAL_CPA, MANUAL_CPC } from '@bingads-webui-campaign-react/bid-strategy-component';\r\n\r\nimport { useCampaignDetailsStepStyles } from './use-campaign-details-step-styles';\r\n\r\nexport const CampaignDetailsForm = ({\r\n data: campaignInfo,\r\n onDataChange,\r\n allSectionsKeys,\r\n initiallyExpandedSectionsKeys,\r\n}) => {\r\n const {\r\n campaign,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n } = campaignInfo || {};\r\n\r\n const isLoading = useMemo(() => _.isEmpty(campaignInfo), [campaignInfo]);\r\n\r\n const getStyles = useCampaignDetailsStepStyles();\r\n\r\n const i18n = useContext(I18nContext);\r\n const isMounted = useIsMounted();\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n\r\n const [\r\n allSections,\r\n expandedSections,\r\n setExpandedSections,\r\n ] = useCollapseState(allSectionsKeys, initiallyExpandedSectionsKeys);\r\n\r\n const expand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setExpandedSections }),\r\n [setExpandedSections]\r\n );\r\n\r\n const isBidStrategyCPC = useMemo(() => !isLoading && campaign?.BiddingScheme.Type === 'ManualCpc', [isLoading, campaign]);\r\n const getBidStrategyOptions = useMemo(() => (isBidStrategyCPC ? [MANUAL_CPC] : [MANUAL_CPA]), [isBidStrategyCPC]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nCampaignDetailsForm.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({}),\r\n }),\r\n onDataChange: PropTypes.func.isRequired,\r\n allSectionsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n initiallyExpandedSectionsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n\r\nCampaignDetailsForm.defaultProps = {\r\n data: {},\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport {\r\n FormErrorGroup,\r\n UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n apiErrorMapper,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { StepHeader } from '@bingads-webui-campaign-react/pmax-common';\r\nimport { PANEL_KEYS } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { SystemErrors } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nimport { CampaignDetailsForm } from './campaign-details-form';\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst ALL_SECTIONS_KEYS = [PANEL_KEYS.CAMPAIGN_NAME, PANEL_KEYS.AD_SCHEDULE, PANEL_KEYS.URL_OPTIONS];\r\nconst INITIALLY_EXPANDED_SECTIONS_KEYS = ALL_SECTIONS_KEYS;\r\n\r\nexport const CampaignDetailsStepShell = ({\r\n data,\r\n onDataChange,\r\n error,\r\n}) => {\r\n const { serverErrors, systemErrors } = error || {};\r\n\r\n const { state } = useFormService();\r\n const { saveFailed } = state.context;\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nCampaignDetailsStepShell.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({}),\r\n }),\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n systemErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n\r\nCampaignDetailsStepShell.defaultProps = {\r\n data: {},\r\n error: {},\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport {\r\n FormErrorGroup,\r\n UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n apiErrorMapper,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { PANEL_KEYS } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { SystemErrors } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nimport { CampaignDetailsForm } from './campaign-details-form';\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nconst ALL_SECTIONS_KEYS = [\r\n PANEL_KEYS.CAMPAIGN_NAME,\r\n PANEL_KEYS.AD_SCHEDULE,\r\n PANEL_KEYS.URL_OPTIONS,\r\n PANEL_KEYS.BID_STRATEGY,\r\n PANEL_KEYS.BID_VALUE,\r\n PANEL_KEYS.BUDGET,\r\n PANEL_KEYS.LOCATIONS,\r\n PANEL_KEYS.LANGUAGE_TARGET,\r\n PANEL_KEYS.APP,\r\n];\r\nconst INITIALLY_EXPANDED_SECTIONS_KEYS = [\r\n PANEL_KEYS.CAMPAIGN_NAME,\r\n PANEL_KEYS.AD_SCHEDULE,\r\n PANEL_KEYS.URL_OPTIONS,\r\n PANEL_KEYS.BUDGET,\r\n PANEL_KEYS.BID_VALUE,\r\n PANEL_KEYS.LOCATIONS,\r\n PANEL_KEYS.LANGUAGE_TARGET,\r\n PANEL_KEYS.APP,\r\n];\r\n\r\nexport const CampaignDetailsEditStepShell = ({\r\n data,\r\n onDataChange,\r\n error,\r\n}) => {\r\n const { serverErrors, systemErrors } = error || {};\r\n\r\n const { state } = useFormService();\r\n const { saveFailed } = state.context;\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nCampaignDetailsEditStepShell.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({}),\r\n }),\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n systemErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n\r\nCampaignDetailsEditStepShell.defaultProps = {\r\n data: {},\r\n error: {},\r\n};\r\n","import { useCallback, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport {\r\n loadCampaign,\r\n loadBundleCountries,\r\n modelToViewModelForCampaign,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport {\r\n readLocationCriterions,\r\n readDayTimeCriterions,\r\n} from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { saveCampaign, useBudgetModel } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { useAppStoreRepository } from '@bingads-webui-campaign-react/app-store-selector';\r\nimport { flowToPlatform } from '@bingads-webui-campaign-react/unified-app-assets';\r\n\r\nexport const useCampaignDetailsStepRepository = (props) => {\r\n const { state, send } = useWizardService();\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n const { budgetModelToViewModel, budgetViewModelToModel, isBudgetInputValid } = useBudgetModel();\r\n\r\n const { isBudgetAndBiddingEnabled = false } = props || {};\r\n\r\n const { flow } = state.context.wizardData;\r\n const { searchAppById } = useAppStoreRepository({ platform: flowToPlatform[flow] });\r\n\r\n const load = useCallback(() => {\r\n const savedCampaign = state.context.wizardData.campaign;\r\n const { Id: campaignId } = savedCampaign || {};\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n dayTimeCriterions: readDayTimeCriterions(cid, aid, campaignId),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n campaign,\r\n locationTargets,\r\n bundleCountriesAndLocationCriterions,\r\n dayTimeCriterions,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: { ...campaign, Status: savedCampaign.status }, // MT sends UserPaused, if we send this back they mark it as active. So we just use Paused from the saved ad model\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n });\r\n\r\n const commonCampaignData = data => ({\r\n ...bundleCountriesAndLocationCriterions,\r\n campaign: {\r\n ...data,\r\n ManualCPC: _.get(campaign, ['BiddingScheme', 'ManualCPC']) || null,\r\n ManualCPI: _.get(campaign, ['BiddingScheme', 'ManualCPI']) || null,\r\n },\r\n ...(isBudgetAndBiddingEnabled ? budgetModelToViewModel(campaign) : {}),\r\n });\r\n\r\n if (campaignData.data && campaignData.data.CampaignSettings && campaignData.data.CampaignSettings.length > 0) {\r\n const appSettings = campaignData.data.CampaignSettings.find(settings => settings['@odata.type'] === '#Model.AppSetting');\r\n const { AppId } = appSettings || {};\r\n\r\n return searchAppById(AppId).then((appInfo) => {\r\n campaignData.data.AppSetting = appInfo;\r\n campaignData.data.AppSettingReadOnly = true;\r\n\r\n return commonCampaignData(campaignData.data);\r\n });\r\n }\r\n\r\n return commonCampaignData(campaignData.data);\r\n }).catch((errorData) => {\r\n activity.trace(`[UnifiedAppWizard] loadData failed. Error: ${errorData}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, budgetModelToViewModel, cid, isBudgetAndBiddingEnabled, serverContext, state.context.wizardData.campaign, searchAppById]);\r\n\r\n const save = useCallback(({\r\n data,\r\n }) => {\r\n const {\r\n campaign: campaignData,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n budgetAmount,\r\n bidStrategy,\r\n ManualCPC,\r\n ManualCPI,\r\n isBudgetValid,\r\n isMarketingMetricValid,\r\n } = data;\r\n\r\n let campaignToSave = campaignData;\r\n\r\n if (isBudgetAndBiddingEnabled) {\r\n if (!isBudgetInputValid(isBudgetValid, isMarketingMetricValid)) {\r\n return Promise.reject();\r\n }\r\n\r\n campaignToSave = {\r\n ...campaignToSave,\r\n ...budgetViewModelToModel(bidStrategy, budgetAmount, ManualCPC, ManualCPI),\r\n };\r\n }\r\n\r\n const savePromises = {\r\n campaign: saveCampaign({\r\n campaign: { data: campaignToSave },\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateCampaign'),\r\n }),\r\n };\r\n\r\n return Promise.props(savePromises).then(({\r\n campaign: campaignResults,\r\n }) => {\r\n activity.trace('[UnifiedAppWizard] - campaign settings updated in campaign details step');\r\n activity.signal('[UnifiedAppWizard] - campaign settings updated in campaign details step');\r\n\r\n const { campaign } = campaignResults;\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: campaign.data });\r\n\r\n return {\r\n campaign: campaign.data,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace('[UnifiedAppWizard] - campaign settings update failed in campaign details step');\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, budgetViewModelToModel, i18n, isBudgetAndBiddingEnabled, isBudgetInputValid, scenarioContext, send]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { useResponsiveStyleWrapper } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nconst getStyles = () => ({\r\n formContainer: {\r\n maxWidth: 680,\r\n minWidth: 300,\r\n flex: '1',\r\n },\r\n});\r\n\r\nexport const useBudgetStepStyles = () => useResponsiveStyleWrapper(getStyles);\r\n","import React, { useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { useIsMounted } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { BudgetPanel, BidStrategyPanel, BidValuePanel, PANEL_KEYS } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n FormErrorGroup,\r\n UnmappedFormErrors as OriginalUnmappedFormErrors,\r\n} from '@bingads-webui-campaign-react/form-error';\r\nimport {\r\n apiErrorMapper,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport {\r\n withControlErrorHandling,\r\n} from '@bingads-webui-campaign-react/error-handling';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { StepHeader } from '@bingads-webui-campaign-react/pmax-common';\r\nimport { CampaignValidationGroup, SystemErrors, FLOWS } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n collapseExpander,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { MANUAL_CPA, MANUAL_CPC } from '@bingads-webui-campaign-react/bid-strategy-component';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\n\r\nimport { useBudgetStepStyles } from './use-budget-step-styles';\r\n\r\nconst UnmappedFormErrors = withControlErrorHandling(OriginalUnmappedFormErrors);\r\n\r\nexport const BudgetStepShell = ({\r\n data: budgetInfo,\r\n onDataChange,\r\n error,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const isMounted = useIsMounted();\r\n const { state } = useFormService();\r\n const { state: wizardState } = useWizardService();\r\n const { saveFailed } = state.context;\r\n const isLoading = useMemo(() => _.isEmpty(budgetInfo), [budgetInfo]);\r\n\r\n const getStyles = useBudgetStepStyles();\r\n\r\n const { serverErrors, systemErrors } = error || {};\r\n\r\n const [\r\n allSections,\r\n allExpandedSections,\r\n setExpandedSections,\r\n ] = useCollapseState(\r\n [PANEL_KEYS.BID_STRATEGY, PANEL_KEYS.BUDGET, PANEL_KEYS.BID_VALUE],\r\n [PANEL_KEYS.BUDGET, PANEL_KEYS.BID_VALUE]\r\n );\r\n\r\n const expandSections = useMemo(() =>\r\n collapseExpander({ setActiveKeys: setExpandedSections }), [setExpandedSections]);\r\n\r\n const {\r\n wizardData: { flow },\r\n } = wizardState.context;\r\n\r\n const isBidStrategyCPC = useMemo(() => flow !== FLOWS.WINDOWS, [flow]);\r\n const getBidStrategyOptions = useMemo(() => (isBidStrategyCPC ? [MANUAL_CPC] : [MANUAL_CPA]), [isBidStrategyCPC]);\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nBudgetStepShell.propTypes = {\r\n data: PropTypes.shape({}),\r\n onDataChange: PropTypes.func.isRequired,\r\n error: PropTypes.shape({\r\n serverErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n systemErrors: PropTypes.arrayOf(PropTypes.shape({})),\r\n }),\r\n};\r\n\r\nBudgetStepShell.defaultProps = {\r\n data: {},\r\n error: {},\r\n};\r\n","import { useCallback, useContext } from 'react';\r\nimport Promise from 'bluebird';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport {\r\n loadCampaign,\r\n modelToViewModelForCampaign,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { saveCampaign, useBudgetModel } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { readLocationCriterions } from '@bingads-webui-campaign-react/perf-max-data';\r\n\r\nexport const useBudgetStepRepository = () => {\r\n const { state, send } = useWizardService();\r\n const { campaign: savedCampaign } = state.context.wizardData;\r\n const { scope } = useContext(ScopeContext) || {};\r\n const scenarioContext = useContext(ScenarioContext);\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const { cid, aid } = scope.values;\r\n const { budgetModelToViewModel, budgetViewModelToModel, isBudgetInputValid } = useBudgetModel();\r\n\r\n const load = useCallback(() => {\r\n const { Id: campaignId } = savedCampaign || {};\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n campaign,\r\n locationTargets,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: { ...campaign, Status: savedCampaign.status }, // MT sends UserPaused, if we send this back they mark it as active. So we just use Paused from the saved ad model\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n });\r\n\r\n return {\r\n ...budgetModelToViewModel(campaign),\r\n campaign: campaignData.data,\r\n };\r\n });\r\n }, [aid, cid, budgetModelToViewModel, savedCampaign]);\r\n\r\n const save = useCallback(({ data }) => {\r\n const {\r\n campaign: updatedCampaign,\r\n budgetAmount,\r\n bidStrategy,\r\n ManualCPC,\r\n ManualCPI,\r\n isBudgetValid,\r\n isMarketingMetricValid,\r\n } = data || {};\r\n\r\n if (!isBudgetInputValid(isBudgetValid, isMarketingMetricValid)) {\r\n return Promise.reject();\r\n }\r\n\r\n const newCampaign = {\r\n ...updatedCampaign,\r\n ...budgetViewModelToModel(bidStrategy, budgetAmount, ManualCPC, ManualCPI),\r\n };\r\n\r\n const savePromises = {\r\n campaign: saveCampaign({\r\n campaign: { data: newCampaign },\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateCampaign'),\r\n }),\r\n };\r\n\r\n return Promise.props(savePromises).then(({\r\n campaign: campaignResults,\r\n }) => {\r\n activity.trace('[UnifiedAppWizard] - campaign settings updated in budget step');\r\n activity.signal('[UnifiedAppWizard] - campaign settings updated in budget step');\r\n\r\n const { campaign } = campaignResults;\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n campaign: {\r\n ...campaign.data,\r\n },\r\n });\r\n\r\n return {\r\n campaign: campaign.data,\r\n ...budgetModelToViewModel(campaign.data),\r\n };\r\n }).catch((errorData) => {\r\n activity.trace('[UnifiedAppWizard] - campaign settings update failed in budget step');\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({ error: { ...errorData } });\r\n });\r\n }, [isBudgetInputValid, budgetViewModelToModel, scenarioContext, i18n, activity, send, budgetModelToViewModel]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { useState, useEffect, useContext, useMemo } from 'react';\r\nimport _ from 'underscore';\r\nimport _preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { useWizardService, getFlowFactors } from '@bingads-webui-react/wizard';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nconst buildSchemaData = ({\r\n data,\r\n timeDisplayType,\r\n serverContext,\r\n cid,\r\n aid,\r\n i18n,\r\n}) => {\r\n const locations = _.map(\r\n _.filter(\r\n data.campaign && data.campaign.locationTargets && data.campaign.locationTargets.currentLevelSettings.currentLocations,\r\n loc => loc.SelectionStatus === 'Included'\r\n ),\r\n loc => loc.location\r\n );\r\n\r\n return ({\r\n campaignName: {\r\n data: data.campaign.Name,\r\n },\r\n assetGroupName: {\r\n data: data.assetGroup.data.Name,\r\n },\r\n appName: {\r\n data: data.campaign.AppSetting.name,\r\n },\r\n appPlatform: {\r\n data: data.campaign.AppSetting.AppPlatform,\r\n },\r\n autoGeneratedAssets: {\r\n data: {\r\n finalUrlExpansionOptOut: data.campaign.finalUrlExpansionOptOut,\r\n finalUrlExpansions: data.campaign.finalUrlExpansions,\r\n autoGeneratedTextOptOut: data.campaign.autoGeneratedTextOptOut,\r\n autoGeneratedImageOptOut: data.campaign.autoGeneratedImageOptOut,\r\n },\r\n },\r\n budget: {\r\n data: data.campaign.Budget,\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n },\r\n bidStrategy: {\r\n data: data.campaign.BiddingScheme,\r\n },\r\n bidValue: {\r\n data: data.campaign.BiddingScheme.ManualCPC,\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n },\r\n costPerSale: {\r\n data: {\r\n costPerSaleOptOut: data.campaign.costPerSaleOptOut,\r\n },\r\n },\r\n conversionGoals: {\r\n conversionGoals: data.campaign.conversionGoals,\r\n },\r\n locationTargeting: {\r\n locations,\r\n targetOption: data.campaign && data.campaign.locationTargets && data.campaign.locationTargets.currentLevelSettings.targetOption,\r\n },\r\n languages: {\r\n data: data.campaign.Languages,\r\n },\r\n audienceSignal: {\r\n data: data.assetGroup.data.AudienceGroup,\r\n },\r\n searchThemes: {\r\n data: data.assetGroup.data.AssetGroupSearchThemes,\r\n },\r\n images: {\r\n data: data.assetGroup.data.Images,\r\n shouldFetchFromMT: true,\r\n cid,\r\n aid,\r\n },\r\n logos: {\r\n data: data.assetGroup.data.Images,\r\n shouldFetchFromMT: true,\r\n cid,\r\n aid,\r\n label: _TL_('Logos'),\r\n isLogo: true,\r\n },\r\n headlines: {\r\n data: data.assetGroup.data.Headlines,\r\n },\r\n descriptions: {\r\n data: data.assetGroup.data.Descriptions,\r\n },\r\n videos: {\r\n data: data.assetGroup.data.videos,\r\n },\r\n adScheduleCampaign: {\r\n startDate: data.assetGroup.data.StartDate,\r\n endDate: data.assetGroup.data.EndDate,\r\n adSchedules: data.campaign && data.campaign.adSchedules && data.campaign.adSchedules.dayTimeRanges,\r\n useSearcherTimeZone: data.campaign.AdScheduleUseSearcherTimeZone,\r\n timeDisplayType,\r\n },\r\n urlOptions: {\r\n data: {\r\n TrackingUrlTemplate: data.campaign.TrackingUrlTemplate,\r\n FinalUrlSuffix: data.campaign.FinalUrlSuffix,\r\n UrlCustomParameters: data.campaign.UrlCustomParameters,\r\n },\r\n },\r\n finalUrlExpansions: {\r\n data: {\r\n finalUrlExpansions: data.campaign.finalUrlExpansions,\r\n },\r\n },\r\n urlRules: {\r\n data: {\r\n i18n,\r\n finalUrls: data.assetGroup.data.FinalUrls,\r\n path1: data.assetGroup.data.Path1,\r\n path2: data.assetGroup.data.Path2,\r\n mobileFinalUrls: data.assetGroup.data.MobileFinalUrls,\r\n urlRules: data.assetGroup.data.AssetGroupUrlTargets,\r\n },\r\n },\r\n newCustomerAcquisition: {\r\n data: {\r\n newCustomerAcquisitionOptOut: data.campaign.newCustomerAcquisitionOptOut,\r\n newCustomerAcquisition: data.campaign.newCustomerAcquisition,\r\n },\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n },\r\n });\r\n};\r\n\r\nexport const useSummarySchemaData = ({ data }) => {\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const { cid, aid } = scope.values;\r\n\r\n const [timeDisplayType, setTimeDisplayType] = useState('12-hour');\r\n\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n\r\n const { state } = useWizardService();\r\n\r\n const { loadedStoresData, savedProductFilter, savedListingGroup } = state.context.wizardData;\r\n\r\n const { flow } = getFlowFactors(state);\r\n\r\n useEffect(() => {\r\n const preferencesService = _preferencesService.default || _preferencesService;\r\n preferencesService.initialize().then(() => {\r\n const isTwelveHourDisplay = preferencesService.findByName('WebApp.CampaignUI.isTwelveHourDisplay') || {};\r\n setTimeDisplayType(_.isUndefined(isTwelveHourDisplay.Data) || isTwelveHourDisplay.Data ? '12-hour' : '24-hour');\r\n });\r\n }, []);\r\n\r\n return (data && data.campaign && data.assetGroup && buildSchemaData({\r\n data,\r\n timeDisplayType,\r\n serverContext,\r\n cid,\r\n aid,\r\n flow,\r\n loadedStoresData,\r\n savedProductFilter,\r\n savedListingGroup,\r\n i18n,\r\n permissions,\r\n })) || {};\r\n};\r\n","import React, { useEffect, useMemo, useCallback } from 'react';\r\n\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { StepHeader } from '@bingads-webui-campaign-react/pmax-common';\r\nimport { GeneratedUI } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { summaryPageComponentTypes } from '@bingads-webui-campaign-react/summary-page';\r\nimport { WIZARD_EVENTS, getCurrentFlow, useWizardService } from '@bingads-webui-react/wizard';\r\nimport { STEP_PATHS } from '@bingads-webui-campaign-react/unified-app-campaign-wizard';\r\nimport { SummaryShimmer } from '@bingads-webui-campaign-react/perf-max-wizard-north-star';\r\n\r\nimport { useSummarySchemaData } from './use-summary-schema-data';\r\nimport { buildSchema } from './schema';\r\n\r\nexport const SummaryStepShell = ({\r\n data,\r\n onDataChange,\r\n}) => {\r\n const schemaData = useSummarySchemaData({ data });\r\n const isLoading = useMemo(() => _.isEmpty(data), [data]);\r\n\r\n const appPlatformString = useMemo(() => {\r\n if (schemaData.appPlatform && schemaData.appPlatform.data) {\r\n if (schemaData.appPlatform.data === 'Android') {\r\n return _TL_('Android mobile app name');\r\n } else if (schemaData.appPlatform.data === 'iOS') {\r\n return _TL_('iOS mobile app name');\r\n } else if (schemaData.appPlatform.data === 'Windows') {\r\n return _TL_('Windows app name');\r\n }\r\n }\r\n return _TL_('App name');\r\n }, [schemaData.appPlatform]);\r\n\r\n const { send, state } = useWizardService();\r\n\r\n const currentFlow = getCurrentFlow(state);\r\n const { wizardData } = state.context;\r\n const { flow } = wizardData;\r\n\r\n const onAssetsHeaderActionClick = useCallback(() => {\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.ASSETS,\r\n });\r\n }, [send]);\r\n\r\n const onTargetingHeaderActionClick = useCallback(() => send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.TARGETING,\r\n }), [send]);\r\n\r\n const onCampaignSettingsHeaderActionClick = useCallback(() =>\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.CAMPAIGN_DETAILS,\r\n }), [send]);\r\n\r\n const onBudgetSettingsHeaderActionClick = useCallback(() =>\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.BUDGET,\r\n }), [send]);\r\n\r\n const options = useMemo(() => ({\r\n onAssetsHeaderActionClick,\r\n onTargetingHeaderActionClick,\r\n onCampaignSettingsHeaderActionClick,\r\n onBudgetSettingsHeaderActionClick,\r\n appPlatformString,\r\n flow,\r\n }), [onAssetsHeaderActionClick, onTargetingHeaderActionClick, onCampaignSettingsHeaderActionClick, onBudgetSettingsHeaderActionClick, appPlatformString, flow]);\r\n\r\n const schema = buildSchema(options);\r\n\r\n useEffect(() => (\r\n onDataChange({\r\n data,\r\n isValid: true,\r\n })\r\n ), [data, onDataChange]);\r\n\r\n return (\r\n
\r\n \r\n {isLoading ?\r\n :\r\n \r\n }\r\n
\r\n );\r\n};\r\n\r\nSummaryStepShell.propTypes = {\r\n data: PropTypes.shape({}),\r\n onDataChange: PropTypes.func.isRequired,\r\n};\r\n\r\nSummaryStepShell.defaultProps = {\r\n data: {},\r\n};\r\n","import { buildDefaultDataProperty } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const buildSchema = options => ({\r\n separatorStyles: {\r\n marginBottom: 20,\r\n },\r\n assets: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Assets'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onAssetsHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n assetGroupName: buildDefaultDataProperty({\r\n label: _TL_('Asset group name'),\r\n dynamicProps: props => props.assetGroupName,\r\n }),\r\n appName: buildDefaultDataProperty({\r\n label: options.appPlatformString,\r\n dynamicProps: props => props.appName,\r\n }),\r\n hd1: {\r\n type: 'horizontal-divider',\r\n },\r\n images: {\r\n type: 'images',\r\n dynamicProps: props => props.images,\r\n },\r\n hd2: {\r\n type: 'horizontal-divider',\r\n isRendered: options.flow !== 'WINDOWS',\r\n },\r\n videos: {\r\n type: 'videos',\r\n dynamicProps: props => props.videos,\r\n isRendered: options.flow !== 'WINDOWS',\r\n },\r\n hd3: {\r\n type: 'horizontal-divider',\r\n },\r\n headlines: {\r\n type: 'headlines',\r\n dynamicProps: props => props.headlines,\r\n },\r\n descriptions: {\r\n type: 'descriptions',\r\n dynamicProps: props => props.descriptions,\r\n },\r\n },\r\n },\r\n targeting: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Targeting'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onTargetingHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n locationTargeting: {\r\n type: 'location-targeting',\r\n dynamicProps: props => props.locationTargeting,\r\n },\r\n languages: {\r\n type: 'languages',\r\n dynamicProps: props => props.languages,\r\n },\r\n audienceSignal: {\r\n type: 'audience-signal',\r\n dynamicProps: props => props.audienceSignal,\r\n },\r\n },\r\n },\r\n campaignSettings: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Campaign Details'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onCampaignSettingsHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n campaignName: buildDefaultDataProperty({\r\n label: _TL_('Campaign name'),\r\n dynamicProps: props => props.campaignName,\r\n }),\r\n adScheduleCampaign: {\r\n type: 'ad-schedule',\r\n dynamicProps: props => props.adScheduleCampaign,\r\n },\r\n conversionGoals: {\r\n type: 'conversion-goals',\r\n dynamicProps: props => props.conversionGoals,\r\n },\r\n },\r\n },\r\n budget: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Budget'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onBudgetSettingsHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n budget: {\r\n type: 'budget',\r\n dynamicProps: props => props.budget,\r\n },\r\n bidStrategy: {\r\n type: 'bid-strategy',\r\n dynamicProps: props => props.bidStrategy,\r\n },\r\n bidValue: {\r\n type: 'bid-value',\r\n dynamicProps: props => props.bidValue,\r\n },\r\n },\r\n },\r\n});\r\n","import { useCallback, useContext } from 'react';\r\nimport Promise from 'bluebird';\r\nimport {\r\n loadBundleCountries,\r\n loadCampaign,\r\n modelToViewModelForCampaign,\r\n loadAssetGroupWithVideos,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport {\r\n readLocationCriterions,\r\n} from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { flowToPlatform } from '@bingads-webui-campaign-react/unified-app-assets';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { createVideoRepository } from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { useAppStoreRepository } from '@bingads-webui-campaign-react/app-store-selector';\r\nimport { updateAssetGroupAndCampaignStatus } from '@bingads-webui-campaign-react/perf-max-wizard-north-star';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nexport const useSummaryStepRepository = () => {\r\n const serverContext = useContext(ServerContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n const { state } = useWizardService();\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const {\r\n wizardData: {\r\n flow,\r\n isPublishing,\r\n campaign: savedCampaign,\r\n assetGroup: savedAssetGroup,\r\n },\r\n } = state.context;\r\n\r\n const { searchAppById, oDataConfig } = useAppStoreRepository({ platform: flowToPlatform[flow] });\r\n\r\n const videoRepository = createVideoRepository({\r\n oDataConfig,\r\n aid,\r\n cid,\r\n });\r\n\r\n const load = useCallback(() => {\r\n const campaignId = savedCampaign ? savedCampaign.Id : null;\r\n const assetGroupId = savedAssetGroup ? savedAssetGroup.Id : null;\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n assetGroup: loadAssetGroupWithVideos(cid, aid, campaignId, assetGroupId, i18n, false, false, videoRepository),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n };\r\n return Promise.props(loadPromises).then(({\r\n bundleCountriesAndLocationCriterions,\r\n campaign,\r\n assetGroup,\r\n locationTargets,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: { ...campaign, Status: savedCampaign.status }, // MT sends UserPaused, if we send this back they mark it as active. So we just use Paused from the saved ad model\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n });\r\n\r\n return ({\r\n ...bundleCountriesAndLocationCriterions,\r\n campaign: campaignData.data,\r\n assetGroup,\r\n });\r\n }).then(({ campaign, assetGroup }) => {\r\n if (campaign && campaign.CampaignSettings && campaign.CampaignSettings.length > 0) {\r\n const appSettings = campaign.CampaignSettings.find(settings => settings['@odata.type'] === '#Model.AppSetting');\r\n const { AppId } = appSettings;\r\n\r\n return searchAppById(AppId).then((appInfo) => {\r\n // eslint-disable-next-line no-param-reassign\r\n campaign.AppSetting = appInfo;\r\n\r\n return {\r\n campaign,\r\n assetGroup,\r\n };\r\n });\r\n }\r\n return {\r\n campaign,\r\n assetGroup,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace(`[UnifiedAppWizard] loadData failed. Error: ${errorData}`);\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, cid, i18n, savedAssetGroup, savedCampaign, searchAppById, serverContext, videoRepository]);\r\n\r\n const save = useCallback(({\r\n data,\r\n }) => {\r\n const { Id: campaignId } = savedCampaign || {};\r\n const { Id: assetGroupId } = savedAssetGroup || {};\r\n\r\n if (isPublishing) {\r\n updateAssetGroupAndCampaignStatus({ campaignId, assetGroupId }).then(() => ({\r\n campaign: data.campaign,\r\n assetGroup: data.assetGroup,\r\n })).catch(errorData => (\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n Promise.reject({ error: { ...errorData } })));\r\n }\r\n\r\n // no update necessary if not publishing.\r\n return Promise.resolve({\r\n campaign: data.campaign,\r\n assetGroup: data.assetGroup,\r\n });\r\n }, [isPublishing, savedAssetGroup, savedCampaign]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","export const UNIFIED_APP_CAMPAIGN_WIZARD_ID = 'UNIFIED_APP_CAMPAIGN_WIZARD_ID';\r\nexport const UNIFIED_APP_EDIT_CAMPAIGN_SETTINGS_WIZARD_ID = 'UNIFIED_APP_EDIT_CAMPAIGN_SETTINGS_WIZARD_ID';\r\nexport const UNIFIED_APP_EDIT_ASSET_GROUP_SETTINGS_WIZARD_ID = 'UNIFIED_APP_EDIT_ASSET_GROUP_SETTINGS_WIZARD_ID';\r\n\r\nexport const STEP_PATHS = {\r\n ASSETS: 'ASSETS',\r\n TARGETING: 'TARGETING',\r\n CAMPAIGN_DETAILS: 'CAMPAIGN_DETAILS',\r\n CAMPAIGN_DETAILS_EDIT: 'CAMPAIGN_DETAILS_EDIT',\r\n ASSETS_GROUP_EDIT: 'ASSETS_GROUP_EDIT',\r\n BUDGET: 'BUDGET',\r\n SUMMARY: 'SUMMARY',\r\n};\r\n","import React from 'react';\r\nimport { Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { AssetsStepShell, AssetsStepSettingsShell, useAssetsStepRepository } from '@bingads-webui-campaign-react/unified-app-assets';\r\nimport { TargetingStepShell, useTargetingStepRepository } from '@bingads-webui-campaign-react/unified-app-targeting';\r\nimport { CampaignDetailsStepShell, CampaignDetailsEditStepShell, useCampaignDetailsStepRepository, useCampaignDetailsEditStepRepository } from '@bingads-webui-campaign-react/unified-app-campaign-details';\r\nimport { BudgetStepShell, useBudgetStepRepository } from '@bingads-webui-campaign-react/unified-app-budget';\r\nimport { SummaryStepShell, useSummaryStepRepository } from '@bingads-webui-campaign-react/unified-app-summary';\r\n\r\nimport { STEP_PATHS } from './step-constants';\r\n\r\nexport const UnifiedAppCampaignStepsConfig = [\r\n {\r\n id: STEP_PATHS.ASSETS,\r\n view: props => ,\r\n repository: useAssetsStepRepository,\r\n },\r\n {\r\n id: STEP_PATHS.TARGETING,\r\n view: props => ,\r\n repository: useTargetingStepRepository,\r\n },\r\n {\r\n id: STEP_PATHS.CAMPAIGN_DETAILS,\r\n view: props => ,\r\n repository: useCampaignDetailsStepRepository,\r\n },\r\n {\r\n id: STEP_PATHS.BUDGET,\r\n view: props => ,\r\n repository: useBudgetStepRepository,\r\n },\r\n {\r\n id: STEP_PATHS.SUMMARY,\r\n view: props => ,\r\n repository: useSummaryStepRepository,\r\n },\r\n];\r\n\r\nexport const UnifiedAppEditCampaignSettingsStepsConfig = [\r\n {\r\n id: STEP_PATHS.CAMPAIGN_DETAILS_EDIT,\r\n view: props => ,\r\n repository: useCampaignDetailsEditStepRepository,\r\n },\r\n];\r\n\r\nexport const UnifiedAppEditAssetGroupSettingsStepConfig = [\r\n {\r\n id: STEP_PATHS.ASSETS_GROUP_EDIT,\r\n view: props => ,\r\n repository: useAssetsStepRepository,\r\n },\r\n];\r\n\r\nexport const getStepListConfig = ({ i18n }) => {\r\n const stepListConfig = [{\r\n id: STEP_PATHS.ASSETS,\r\n title: i18n.getString(_TL_('Assets')),\r\n }, {\r\n id: STEP_PATHS.TARGETING,\r\n title: i18n.getString(_TL_('Targeting')),\r\n }, {\r\n id: STEP_PATHS.CAMPAIGN_DETAILS,\r\n title: i18n.getString(_TL_('Campaign details')),\r\n }, {\r\n id: STEP_PATHS.BUDGET,\r\n title: i18n.getString(_TL_('Budget')),\r\n }, {\r\n id: STEP_PATHS.SUMMARY,\r\n title: i18n.getString(_TL_('Summary')),\r\n }];\r\n\r\n return stepListConfig;\r\n};\r\n","import { useCallback, useContext } from 'react';\r\nimport Promise from 'bluebird';\r\nimport {\r\n loadBundleCountries,\r\n loadCampaign,\r\n modelToViewModelForCampaign,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ScenarioContext, ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n readLocationCriterions,\r\n} from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { saveCampaign, saveAssetGroup } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nexport const useTargetingStepRepository = () => {\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n\r\n const { cid, aid } = scope.values;\r\n\r\n const { state, send } = useWizardService();\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const i18n = useContext(I18nContext);\r\n\r\n const load = useCallback(() => {\r\n const savedCampaign = state.context.wizardData.campaign;\r\n const savedAssetGroup = state.context.wizardData.assetGroup;\r\n const { Id: campaignId } = savedCampaign || {};\r\n\r\n const loadPromises = {\r\n campaign: loadCampaign(cid, aid, campaignId),\r\n locationTargets: readLocationCriterions(cid, aid, campaignId),\r\n assetGroup: Promise.resolve(savedAssetGroup),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({\r\n cid,\r\n aid,\r\n serverContext,\r\n }),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n bundleCountriesAndLocationCriterions,\r\n campaign,\r\n assetGroup,\r\n locationTargets,\r\n }) => {\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: { ...campaign, Status: savedCampaign.status }, // MT sends UserPaused, if we send this back they mark it as active. So we just use Paused from the saved ad model\r\n locationCriterionsModel: locationTargets ? locationTargets.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n });\r\n\r\n return ({\r\n ...bundleCountriesAndLocationCriterions,\r\n campaign: campaignData.data,\r\n assetGroup,\r\n });\r\n });\r\n }, [aid, cid, serverContext, state.context.wizardData.assetGroup, state.context.wizardData.campaign]);\r\n\r\n const save = useCallback(({\r\n data,\r\n initialData,\r\n }) => {\r\n const {\r\n campaign: campaignToSave,\r\n assetGroup: assetGroupToSave,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n } = data || {};\r\n\r\n const { assetGroup: initialAssetGroup } = initialData;\r\n\r\n const savePromises = {\r\n campaign: saveCampaign({\r\n campaign: { data: campaignToSave },\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateCampaign'),\r\n }),\r\n assetGroup: saveAssetGroup({\r\n assetGroup: { data: assetGroupToSave },\r\n originalAssetGroup: { data: initialAssetGroup },\r\n campaign: campaignToSave,\r\n }, {\r\n scenario: scenarioContext.name,\r\n i18n,\r\n activityLogger: scenarioContext.createActivity('updateAssetGroup'),\r\n serverContext,\r\n cid,\r\n aid,\r\n activity,\r\n }),\r\n };\r\n\r\n return Promise.props(savePromises).then(({\r\n campaign: campaignResults,\r\n assetGroup: assetGroupResults,\r\n }) => {\r\n activity.trace('[UnifiedAppWizard] - campaign/assetgroup settings updated in targeting step');\r\n activity.signal('[UnifiedAppWizard] - campaign/assetgroup settings updated in targeting step');\r\n\r\n const {\r\n campaign,\r\n } = campaignResults;\r\n\r\n const {\r\n assetGroup,\r\n } = assetGroupResults;\r\n\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaign: campaign.data });\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { assetGroup: assetGroup.data });\r\n\r\n return {\r\n campaign: campaign.data,\r\n assetGroup: assetGroup.data,\r\n };\r\n }).catch((errorData) => {\r\n activity.trace('[UnifiedAppWizard] - campaign/assetgroup settings update failed in targeting step');\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n error: {\r\n ...errorData,\r\n },\r\n });\r\n });\r\n }, [activity, aid, cid, i18n, scenarioContext, send, serverContext]);\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { useCampaignDetailsStepRepository } from './use-campaign-details-step-repository';\r\n\r\nexport const useCampaignDetailsEditStepRepository = () =>\r\n useCampaignDetailsStepRepository({ isBudgetAndBiddingEnabled: true });\r\n","import React, { useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack, PrimaryButton, DefaultButton } from '@bingads-webui-react/fluent-controls';\r\nimport {\r\n useWizardService,\r\n getIsFirstStep,\r\n getIsLastStep,\r\n getCurrentStepId,\r\n matchStepState,\r\n STEP_STATES,\r\n WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\nimport { CancelButton } from '@bingads-webui-fluent-component/wizard-ui-library';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { STEP_PATHS } from '../steps/step-constants';\r\n\r\nconst SaveAndPublish = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (activity) {\r\n activity.signal('onSaveAndPublishClicked');\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isPublishing: true });\r\n send(WIZARD_EVENTS.SAVE_AND_EXIT);\r\n }, [activity, send]);\r\n\r\n const buttonText = useMemo(() => {\r\n const currentStep = getCurrentStepId(state);\r\n\r\n if (currentStep === STEP_PATHS.SUMMARY) {\r\n return i18n.getString(_TL_('Go live'));\r\n }\r\n\r\n return i18n.getString(_TL_('Save & go live'));\r\n }, [i18n, state]);\r\n\r\n return (\r\n \r\n {buttonText}\r\n \r\n );\r\n};\r\n\r\nconst SaveAsDraft = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (activity) {\r\n activity.signal('onSaveAsDraftClicked');\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isPublishing: false });\r\n send(WIZARD_EVENTS.SAVE_AND_EXIT);\r\n }, [activity, send]);\r\n\r\n const buttonText = useMemo(() => {\r\n const currentStep = getCurrentStepId(state);\r\n\r\n if (currentStep === STEP_PATHS.SUMMARY) {\r\n return i18n.getString(_TL_('Don\\'t go live'));\r\n }\r\n\r\n return i18n.getString(_TL_('Save & don\\'t go live'));\r\n }, [i18n, state]);\r\n\r\n return (\r\n \r\n {buttonText}\r\n \r\n );\r\n};\r\n\r\nexport const NextButton = ({ buttonText, disabled }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n send(WIZARD_EVENTS.SAVE_AND_NEXT);\r\n }, [send]);\r\n\r\n return (\r\n \r\n {buttonText ? i18n.getString(buttonText) : i18n.getString(_TL_('Next'))}\r\n \r\n );\r\n};\r\n\r\nexport const BackButton = ({ buttonText }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onBackClicked = useCallback(() => {\r\n send(WIZARD_EVENTS.BACK);\r\n }, [send]);\r\n\r\n return (\r\n \r\n {buttonText ? i18n.getString(buttonText) : i18n.getString(_TL_('Back'))}\r\n \r\n );\r\n};\r\nBackButton.propTypes = {\r\n buttonText: PropTypes.string,\r\n};\r\nBackButton.defaultProps = {\r\n buttonText: undefined,\r\n};\r\n\r\nNextButton.propTypes = {\r\n buttonText: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n};\r\nNextButton.defaultProps = {\r\n buttonText: undefined,\r\n disabled: false,\r\n};\r\n\r\nexport const UnifiedAppCampaignFooter = ({\r\n nextButtonText,\r\n nextDisabled,\r\n backButtonText,\r\n cancelButtonText,\r\n hideBackButton,\r\n}) => {\r\n const { state } = useWizardService();\r\n const isFirstStep = getIsFirstStep(state);\r\n const isLastStep = getIsLastStep(state);\r\n\r\n return (\r\n \r\n {(!isFirstStep && !hideBackButton) && }\r\n {(!isLastStep ? : )}\r\n {isLastStep && }\r\n {isFirstStep && }\r\n \r\n );\r\n};\r\nUnifiedAppCampaignFooter.propTypes = {\r\n nextButtonText: PropTypes.string,\r\n nextDisabled: PropTypes.bool,\r\n backButtonText: PropTypes.string,\r\n cancelButtonText: PropTypes.string,\r\n hideBackButton: PropTypes.bool,\r\n};\r\nUnifiedAppCampaignFooter.defaultProps = {\r\n nextButtonText: undefined,\r\n nextDisabled: false,\r\n backButtonText: undefined,\r\n cancelButtonText: undefined,\r\n hideBackButton: false,\r\n};\r\n","import React, { useContext } from 'react';\r\nimport { Stack } from '@fluentui/react';\r\nimport {\r\n SaveAndExitButton,\r\n CancelButton,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nexport const EditFooter = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useMemo, useCallback, useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Constants } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { ResponsiveStepList } from '@bingads-webui-react/step-progress-indicator';\r\nimport { useResponsiveSize } from '@bingads-webui-react/with-responsive-size';\r\nimport {\r\n useWizardService,\r\n getCurrentStepId,\r\n getCurrentFlow,\r\n WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\n\r\nimport { getStepListConfig } from '../steps/step-config';\r\n\r\nexport const StepList = () => {\r\n const { state, send } = useWizardService();\r\n const i18n = useContext(I18nContext);\r\n\r\n const currentStepId = getCurrentStepId(state);\r\n const currentFlow = getCurrentFlow(state);\r\n const displayMode = useResponsiveSize(Constants.ResponsiveSizeBreakpoints);\r\n const { flow } = state.context.wizardData;\r\n\r\n const stepListConfig = useMemo(() => getStepListConfig({ i18n, flow, currentStepId }), [currentStepId, flow, i18n]);\r\n\r\n const getDefaultOnItemClickFn = useCallback((step) => {\r\n let toStep;\r\n if (currentFlow.includes(step.id)) {\r\n toStep = step;\r\n } else if (!_.isEmpty(step.steps)) {\r\n const firstSubStep = _.find(step.steps, s => currentFlow.includes(s.id));\r\n if (firstSubStep) {\r\n toStep = firstSubStep;\r\n }\r\n }\r\n if (toStep && toStep.isBehind) {\r\n return () => {\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: toStep.id,\r\n });\r\n };\r\n }\r\n return undefined;\r\n }, [currentFlow, send]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\n","import appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport localStorage from '@bingads-webui-component-legacy/storage/localStorage';\r\nimport { LocalStorageKeys } from '@bingads-webui-campaign-react/campaign-onboarding-v2';\r\nimport { APP_STORE_TO_STORE_TYPE } from '@bingads-webui-campaign-react/unified-app-shared';\r\n\r\nconst localStorageKey = LocalStorageKeys.UnifiedAppCampaignAdType;\r\n\r\nexport const useLocalStorageStoreType = (defaultStoreType) => {\r\n let unifiedAppCampaignStoreType = appConfig.get(localStorageKey);\r\n if (!unifiedAppCampaignStoreType) {\r\n if (localStorage && localStorage.supportsStorage()) {\r\n unifiedAppCampaignStoreType = localStorage.get(localStorageKey);\r\n appConfig.set(localStorageKey, unifiedAppCampaignStoreType);\r\n }\r\n }\r\n\r\n return unifiedAppCampaignStoreType || defaultStoreType;\r\n};\r\n\r\nexport const useCampaignStoreType = (campaign, defaultStoreType) => {\r\n if (campaign && campaign.CampaignSettings) {\r\n const appSettings = campaign.CampaignSettings.find(settings => settings['@odata.type'] === '#Model.AppSetting');\r\n\r\n if (appSettings && appSettings.AppStore) {\r\n return APP_STORE_TO_STORE_TYPE[appSettings.AppStore];\r\n }\r\n }\r\n return defaultStoreType;\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Layout } from '@bingads-webui-react/wizard';\r\nimport { StoreTypes, STORE_TYPE_TO_FLOW } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { UnifiedAppWizard } from './wizard';\r\n\r\nimport { UnifiedAppCampaignStepsConfig } from '../steps/step-config';\r\nimport { UnifiedAppCampaignFooter, StepList } from '../components';\r\nimport { STEP_PATHS, UNIFIED_APP_CAMPAIGN_WIZARD_ID } from '../steps/step-constants';\r\nimport { useLocalStorageStoreType } from './use-store-type';\r\n\r\nexport const UnifiedAppCampaignWizardInternal = ({\r\n perfMarker, scope, siteMap,\r\n}) => {\r\n const storeType = useLocalStorageStoreType(StoreTypes.AndroidPlayStore);\r\n\r\n const wizardFlow = useMemo(() => STORE_TYPE_TO_FLOW[storeType], [storeType]);\r\n\r\n const routeToNavigateToWhenDone = getRoutePathById(siteMap, 'campaigns');\r\n\r\n const config = useMemo(() => ({\r\n id: UNIFIED_APP_CAMPAIGN_WIZARD_ID,\r\n initialStep: STEP_PATHS.ASSETS,\r\n steps: UnifiedAppCampaignStepsConfig,\r\n initialFlowFactors: { flow: wizardFlow },\r\n initialWizardData: {\r\n flow: wizardFlow,\r\n },\r\n actions: {\r\n onDone: () => scope.save(routeToNavigateToWhenDone),\r\n onExited: () => scope.save(routeToNavigateToWhenDone),\r\n },\r\n }), [routeToNavigateToWhenDone, scope, wizardFlow]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nUnifiedAppCampaignWizardInternal.propTypes = {\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport const UnifiedAppCampaignWizard = withSiteMap(withScope(withRecommendationContext(UnifiedAppCampaignWizardInternal)));\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Layout } from '@bingads-webui-react/wizard';\r\nimport { STORE_TYPE_TO_FLOW } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\n\r\nimport { UnifiedAppEditCampaignSettingsStepsConfig } from '../steps/step-config';\r\nimport { EditFooter } from '../components';\r\nimport { STEP_PATHS, UNIFIED_APP_EDIT_CAMPAIGN_SETTINGS_WIZARD_ID } from '../steps/step-constants';\r\nimport { useCampaignStoreType } from './use-store-type';\r\nimport { UnifiedAppWizard } from './wizard';\r\n\r\nconst UnifiedAppEditCampaignSettingsWizardInternal = ({\r\n currentCampaign, perfMarker, siteMap, scope,\r\n}) => {\r\n const storeType = useCampaignStoreType(currentCampaign);\r\n const wizardFlow = useMemo(() => STORE_TYPE_TO_FLOW[storeType], [storeType]);\r\n\r\n const routeToNavigateToWhenDone = getRoutePathById(siteMap, 'overview');\r\n\r\n const config = useMemo(() => ({\r\n id: UNIFIED_APP_EDIT_CAMPAIGN_SETTINGS_WIZARD_ID,\r\n initialStep: STEP_PATHS.CAMPAIGN_DETAILS_EDIT,\r\n steps: UnifiedAppEditCampaignSettingsStepsConfig,\r\n initialFlowFactors: { flow: wizardFlow },\r\n initialWizardData: {\r\n campaign: currentCampaign,\r\n flow: wizardFlow,\r\n },\r\n actions: {\r\n onDone: () => scope.save(routeToNavigateToWhenDone),\r\n onExited: () => scope.save(routeToNavigateToWhenDone),\r\n },\r\n }), [currentCampaign, routeToNavigateToWhenDone, scope, wizardFlow]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nUnifiedAppEditCampaignSettingsWizardInternal.propTypes = {\r\n currentCampaign: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const UnifiedAppEditCampaignSettingsWizard = withScope(withSiteMap(UnifiedAppEditCampaignSettingsWizardInternal));\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Layout } from '@bingads-webui-react/wizard';\r\nimport { STORE_TYPE_TO_FLOW } from '@bingads-webui-campaign-react/unified-app-shared';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\n\r\nimport { UnifiedAppEditAssetGroupSettingsStepConfig } from '../steps/step-config';\r\nimport { EditFooter } from '../components';\r\nimport { STEP_PATHS, UNIFIED_APP_EDIT_ASSET_GROUP_SETTINGS_WIZARD_ID } from '../steps/step-constants';\r\nimport { useCampaignStoreType } from './use-store-type';\r\nimport { UnifiedAppWizard } from './wizard';\r\n\r\nconst UnifiedAppEditAssetGroupSettingsWizardInternal = ({\r\n currentCampaign, perfMarker, siteMap, scope,\r\n}) => {\r\n const storeType = useCampaignStoreType(currentCampaign);\r\n const wizardFlow = useMemo(() => STORE_TYPE_TO_FLOW[storeType], [storeType]);\r\n\r\n const routeToNavigateToWhenDone = getRoutePathById(siteMap, 'appads-asset-groups');\r\n\r\n const { assetGroupId } = scope.values;\r\n\r\n const config = useMemo(() => ({\r\n id: UNIFIED_APP_EDIT_ASSET_GROUP_SETTINGS_WIZARD_ID,\r\n initialStep: STEP_PATHS.ASSETS_GROUP_EDIT,\r\n steps: UnifiedAppEditAssetGroupSettingsStepConfig,\r\n initialFlowFactors: { flow: wizardFlow },\r\n initialWizardData: {\r\n campaign: currentCampaign,\r\n assetGroup: { Id: assetGroupId },\r\n flow: wizardFlow,\r\n },\r\n actions: {\r\n onDone: () => scope.save(routeToNavigateToWhenDone),\r\n onExited: () => scope.save(routeToNavigateToWhenDone),\r\n },\r\n }), [currentCampaign, routeToNavigateToWhenDone, scope, assetGroupId, wizardFlow]);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nUnifiedAppEditAssetGroupSettingsWizardInternal.propTypes = {\r\n currentCampaign: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n values: PropTypes.shape({\r\n assetGroupId: PropTypes.number.isRequired,\r\n }).isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n siteMap: PropTypes.shape({}).isRequired,\r\n};\r\n\r\nexport const UnifiedAppEditAssetGroupSettingsWizard = withScope(withSiteMap(UnifiedAppEditAssetGroupSettingsWizardInternal));\r\n","import React from 'react';\r\nimport propTypes from 'prop-types';\r\nimport { ErrorMessages } from '@bingads-webui-react/validation';\r\n\r\nexport const SystemErrors = ({ errors }) => (\r\n
\r\n \r\n
\r\n);\r\n\r\nSystemErrors.propTypes = {\r\n errors: propTypes.arrayOf(propTypes.string),\r\n};\r\n\r\nSystemErrors.defaultProps = {\r\n errors: [],\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { Campaign, AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\n\r\nexport const CampaignValidationGroup = ({\r\n data, onDataChange, i18n, children, stopPropagation,\r\n}) => {\r\n const onValidate = useCallback((results) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n campaign: {\r\n ...prevData.campaign,\r\n ...results.data,\r\n },\r\n }),\r\n isValid: results.isValid,\r\n isDirty: results.isDirty,\r\n });\r\n }, [onDataChange]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nCampaignValidationGroup.propTypes = {\r\n data: PropTypes.shape({}),\r\n onDataChange: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n children: PropTypes.node,\r\n stopPropagation: PropTypes.bool,\r\n};\r\n\r\nCampaignValidationGroup.defaultProps = {\r\n data: {},\r\n children: null,\r\n stopPropagation: false,\r\n};\r\n\r\nexport const AssetGroupValidationGroup = ({\r\n data, onDataChange, i18n, children,\r\n}) => {\r\n const onValidate = useCallback((results) => {\r\n onDataChange({\r\n data: prevData => ({\r\n ...prevData,\r\n assetGroup: {\r\n ...prevData.assetGroup,\r\n ...results.data,\r\n },\r\n }),\r\n isValid: results.isValid,\r\n isDirty: results.isDirty,\r\n });\r\n }, [onDataChange]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nAssetGroupValidationGroup.propTypes = {\r\n data: PropTypes.shape({}),\r\n onDataChange: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n children: PropTypes.node,\r\n};\r\n\r\nAssetGroupValidationGroup.defaultProps = {\r\n data: {},\r\n children: null,\r\n};\r\n","import React, { useCallback, useMemo, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Pivot, PivotItem } from '@fluentui/react';\r\n\r\nexport const AppAdPreviewControls = (props) => {\r\n const {\r\n onSurfaceChange,\r\n onPlacementFilterChange,\r\n showStart,\r\n } = props;\r\n\r\n const [surfaceChoice, setSurfaceChoice] = useState('Windows');\r\n\r\n const surfaceMap = useMemo(() => ({\r\n Windows: showStart ? ['Windows11StartLight', 'Windows11StartDark', 'Windows10StartLight', 'Windows10StartDark', 'WindowsProngLight', 'WindowsProngDark'] : ['Windows11ProngLight', 'WindowsProngDark'],\r\n Store: ['WindowsStoreSpotLight'],\r\n }), []);\r\n\r\n const placementFilterByPreviewControlState = useCallback((placement) => {\r\n const { type: previewTemplateType } = placement;\r\n const surfaceList = surfaceMap[surfaceChoice];\r\n\r\n return _.contains(surfaceList, previewTemplateType);\r\n }, [surfaceChoice, surfaceMap]);\r\n\r\n useEffect(() => {\r\n onPlacementFilterChange(placementFilterByPreviewControlState);\r\n }, [onPlacementFilterChange, placementFilterByPreviewControlState]);\r\n\r\n useEffect(() => {\r\n onSurfaceChange(surfaceChoice);\r\n }, [onSurfaceChange, surfaceChoice]);\r\n\r\n return (\r\n
\r\n setSurfaceChoice(item.props.itemKey)}>\r\n \r\n \r\n \r\n
);\r\n};\r\n\r\nAppAdPreviewControls.propTypes = {\r\n onSurfaceChange: PropTypes.func.isRequired,\r\n onPlacementFilterChange: PropTypes.func.isRequired,\r\n showStart: PropTypes.bool.isRequired,\r\n};\r\n","export const getAdPreviewStyles = (components, { palette = {} }) => ({\r\n adPreviewContainer: {\r\n '& .new-preview-carousel-container-adprelib': {\r\n border: 0,\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n borderRadius: '2px',\r\n backgroundColor: `${palette.white}`,\r\n },\r\n '& .ad-preview-controls-container': {\r\n paddingBottom: 10,\r\n },\r\n '& .ad-preview-actions': {\r\n '& button': {\r\n marginRight: 8,\r\n },\r\n },\r\n '& .ad-preview-title': {\r\n '& .preview-title-string-key': {\r\n fontSize: 14,\r\n fontWeight: 'bold',\r\n marginRight: 8,\r\n },\r\n '& .preview-title-preview-type': {\r\n fontSize: 14,\r\n },\r\n },\r\n '& .preview-type-string': {\r\n visibility: 'hidden',\r\n },\r\n '& .carousel-wrapper': {\r\n '& .carousel-inner': {\r\n height: 515,\r\n merginTop: 10,\r\n },\r\n '& .carousel-control': {\r\n background: 'transparent',\r\n },\r\n },\r\n },\r\n\r\n carouselLayoutClassName: {\r\n border: 0,\r\n boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',\r\n borderRadius: '2px',\r\n backgroundColor: `${palette.white}`,\r\n\r\n '& .carousel-wrapper': {\r\n '& .carousel-inner': {\r\n height: 515,\r\n },\r\n '& .carousel-control.left, .carousel-control.right': {\r\n left: 0,\r\n bottom: -7,\r\n background: 'transparent',\r\n zIndex: 20,\r\n },\r\n },\r\n },\r\n carouselControlsMsn: {\r\n '& .carousel-wrapper': {\r\n '& .carousel-control.left': {\r\n marginLeft: 200,\r\n },\r\n '& .carousel-control.right': {\r\n marginLeft: 430,\r\n },\r\n '& .carousel-indicators': {\r\n marginLeft: 240,\r\n margin: '20px 24px',\r\n left: 0,\r\n },\r\n },\r\n },\r\n carouselControlsOthers: {\r\n '& .carousel-wrapper': {\r\n '& .carousel-control.left': {\r\n marginLeft: 270,\r\n },\r\n '& .carousel-control.right': {\r\n marginLeft: 357,\r\n },\r\n '& .carousel-indicators': {\r\n marginLeft: 310,\r\n margin: '20px 24px',\r\n left: 0,\r\n },\r\n },\r\n },\r\n customCarouselRoot: {\r\n '& .custom-carousel-controls-and-indicators': {\r\n transform: 'translateX(-15px) translateX(-50%)',\r\n left: '50%',\r\n\r\n '& .carousel-control.left': {\r\n marginRight: '10px !important',\r\n },\r\n '& .carousel-control.right': {\r\n marginLeft: '5px !important',\r\n },\r\n },\r\n },\r\n adExtensionContainer: {\r\n // todo: add styles for ad extension preview components if needed\r\n margin: 10,\r\n },\r\n placementContainerClassName: {\r\n minWidth: 669,\r\n border: '0 !important',\r\n boxShadow: 'unset !important',\r\n borderRadius: '0 !important',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n flexDirection: 'column',\r\n\r\n '& .placement-validation-message': {\r\n display: 'inline-block',\r\n width: '100%',\r\n fontSize: 14,\r\n textAlign: 'center',\r\n lineHeight: 2,\r\n marginRight: 16,\r\n },\r\n },\r\n carouselLayoutHeader: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n width: '100%',\r\n\r\n '& .carousel-header-texts': {\r\n display: 'inline-block',\r\n margin: '20px 8px 16px 24px',\r\n fontSize: 18,\r\n lineHeight: '24px',\r\n\r\n '& .carousel-header-ratio': {\r\n fontSize: 14,\r\n fontWeight: 'bold',\r\n marginRight: 8,\r\n },\r\n '& .carousel-header-title': {\r\n fontSize: 14,\r\n },\r\n },\r\n '& .ad-preview-actions': {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n flexGrow: 0,\r\n flexShrink: 0,\r\n alignItems: 'center',\r\n marginRight: 16,\r\n '& button': {\r\n marginRight: 8,\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst geCarouselStyleForMsan = {\r\n root: {\r\n '& .carousel-wrapper': {\r\n '& .carousel-control.left': {\r\n marginLeft: 200,\r\n },\r\n '& .carousel-control.right': {\r\n marginLeft: 430,\r\n },\r\n },\r\n },\r\n previewCarousel: {\r\n bottomCarouselNavigation: {\r\n '& .carousel-indicators': {\r\n marginLeft: 240,\r\n margin: '20px 24px',\r\n left: 0,\r\n },\r\n },\r\n },\r\n};\r\n\r\nconst geCarouselStyleForOthers = {\r\n root: {\r\n '& .carousel-wrapper': {\r\n '& .carousel-control.left': {\r\n marginLeft: 270,\r\n },\r\n '& .carousel-control.right': {\r\n marginLeft: 357,\r\n },\r\n },\r\n },\r\n previewCarousel: {\r\n bottomCarouselNavigation: {\r\n '& .carousel-indicators': {\r\n marginLeft: 310,\r\n margin: '20px 24px',\r\n left: 0,\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const getCarouselControlsAndIndicatorsStyleBySurface = (surface) => {\r\n switch (surface) {\r\n case 'Bing':\r\n case 'Edge':\r\n case 'Outlook':\r\n return geCarouselStyleForOthers;\r\n case 'Msn':\r\n default:\r\n return geCarouselStyleForMsan;\r\n }\r\n};\r\n","import React, { useCallback, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { usePreviewCarouselLayout } from '@bingads-webui-campaign-react/ad-placement-factory';\r\nimport { AdPlacementsGroupType } from '@bingads-webui-campaign-react/ad-placement-consts';\r\nimport { AppAdPreviewControls } from './preview-controls';\r\nimport previewPlaceholder from '../media/preview-placeholder.png';\r\nimport { getAdPreviewStyles, getCarouselControlsAndIndicatorsStyleBySurface } from './preview-styles';\r\n\r\nconst shortHeadlineMaxLength = 30;\r\nconst longHeadlineMaxLength = 90;\r\nconst descriptionMaxLength = 90;\r\n\r\nexport const AppAdsPreview = (props) => {\r\n const {\r\n imageList,\r\n updateImageList,\r\n previewImagesSharedState,\r\n setPreviewImagesSharedState,\r\n placementCustomizationPredicate,\r\n hideHeaderButtons,\r\n isAppCampaignPreview,\r\n showStart,\r\n } = props;\r\n\r\n const adDataProps = ['shortHeadline', 'longHeadline', 'description', 'url', 'displayUrl', 'callToAction', 'businessName'];\r\n const currentAdData = _.pick(props, adDataProps);\r\n const [adData, setAdData] = React.useState(currentAdData);\r\n\r\n const isAdDataUpdated = useCallback(newAdData => (newAdData.length !== adData.length || !_.isMatch(newAdData, adData)), [adData]);\r\n const debouncedSetAdData = useMemo(() => _.debounce(setAdData, 500), []);\r\n if (isAdDataUpdated(currentAdData)) {\r\n debouncedSetAdData.cancel();\r\n debouncedSetAdData(currentAdData);\r\n }\r\n\r\n const getImageIndexFromId = useCallback((id) => {\r\n const index = _.findIndex(imageList, placement => _.first(placement).id === id && !_.first(placement).isLogo && !_.first(placement).isPortrait);\r\n return index >= 0 ? index : null;\r\n }, [imageList]);\r\n\r\n const getPreviewImageIndex = useCallback((idRequestedByImageExperience) => {\r\n let index = getImageIndexFromId(idRequestedByImageExperience);\r\n\r\n if (!index) {\r\n const firstImageIndex = _.findIndex(imageList, placement => !_.first(placement).isLogo && !_.first(placement).isPortrait);\r\n index = firstImageIndex >= 0 ? firstImageIndex : null;\r\n }\r\n\r\n return index;\r\n }, [getImageIndexFromId, imageList]);\r\n\r\n const { previewImageId } = previewImagesSharedState;\r\n\r\n let imagesToDisplay = [];\r\n let previewImageIndex = null;\r\n if (imageList && isAppCampaignPreview) {\r\n // for app campaign, always send all images for preview\r\n imagesToDisplay = imageList.flat();\r\n } else if (imageList && imageList.length > 0) {\r\n previewImageIndex = getPreviewImageIndex(previewImageId);\r\n imagesToDisplay = _.isNumber(previewImageIndex) ? imageList[previewImageIndex] : [];\r\n }\r\n\r\n const onAddAspectRatio = useCallback((type) => {\r\n const newImageList = [...imageList];\r\n _.find(newImageList[previewImageIndex], imagePlacement => imagePlacement.type === type).isIncluded = true;\r\n setPreviewImagesSharedState({ ...previewImagesSharedState, isImageListUpdatedByPreview: true });\r\n updateImageList(newImageList);\r\n }, [imageList, previewImageIndex, previewImagesSharedState, setPreviewImagesSharedState, updateImageList]);\r\n\r\n const onRemoveAspectRatio = useCallback((type) => {\r\n const newImageList = [...imageList];\r\n _.find(newImageList[previewImageIndex], imagePlacement => imagePlacement.type === type).isIncluded = false;\r\n setPreviewImagesSharedState({ ...previewImagesSharedState, isImageListUpdatedByPreview: true });\r\n updateImageList(newImageList);\r\n }, [imageList, previewImageIndex, previewImagesSharedState, setPreviewImagesSharedState, updateImageList]);\r\n\r\n const onEdit = useCallback((type) => {\r\n const cropImageObj = _.find(imageList[previewImageIndex], imagePlacement => imagePlacement.type === type);\r\n setPreviewImagesSharedState({ ...previewImagesSharedState, cropImageObj });\r\n }, [imageList, previewImageIndex, previewImagesSharedState, setPreviewImagesSharedState]);\r\n\r\n const truncatedAdData = useMemo(() => {\r\n const validAdData = { ...adData };\r\n\r\n if (validAdData.shortHeadline && validAdData.shortHeadline.length > shortHeadlineMaxLength) {\r\n validAdData.shortHeadline = validAdData.shortHeadline.substring(0, shortHeadlineMaxLength - 1);\r\n }\r\n\r\n if (validAdData.longHeadline && validAdData.longHeadline.length > longHeadlineMaxLength) {\r\n validAdData.longHeadline = validAdData.longHeadline.substring(0, longHeadlineMaxLength - 1);\r\n }\r\n\r\n if (validAdData.description && validAdData.description.length > descriptionMaxLength) {\r\n validAdData.description = validAdData.description.substring(0, descriptionMaxLength - 1);\r\n }\r\n\r\n return validAdData;\r\n }, [adData]);\r\n\r\n const [placementFilter, setPlacementFilter] = useState({ func: () => true });\r\n\r\n const getFirstElement = useCallback((item) => {\r\n if (_.isArray(item)) {\r\n return _.first(item);\r\n }\r\n return item;\r\n }, []);\r\n\r\n const getLogo = useCallback(() => {\r\n const logos = _.filter(imageList, imageArr =>\r\n // reuse the selected TransparentLogo for the Logo property in preview\r\n // for Prong previews where we need both smallImage and Logo scenario\r\n getFirstElement(imageArr).associationType === 'TransparentLogo');\r\n\r\n return _.first(logos);\r\n }, [getFirstElement, imageList]);\r\n\r\n const { PreviewCarouselLayout } = usePreviewCarouselLayout({\r\n groupType: showStart ? AdPlacementsGroupType.appAdStart : AdPlacementsGroupType.appAd,\r\n placementFilterPredicate: placementFilter.func,\r\n customDefaultImage: previewPlaceholder,\r\n placementCustomizationPredicate: placementCustomizationPredicate || null,\r\n });\r\n\r\n const classes = useDefaultStyles(getAdPreviewStyles);\r\n const [surfaceChoice, setSurfaceChoice] = useState({});\r\n const styleOverrides = useMemo(() => getCarouselControlsAndIndicatorsStyleBySurface(surfaceChoice), [surfaceChoice]);\r\n\r\n const onPlacementFilterChange = useCallback((newPlacementFilter) => {\r\n setPlacementFilter({ func: newPlacementFilter });\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n logo.isIncluded)}\r\n headerButtonProps={{\r\n onAddAspectRatio,\r\n onRemoveAspectRatio,\r\n onEdit,\r\n }}\r\n adData={truncatedAdData}\r\n getIsRequiredByIndex={() => true}\r\n enableAutoPlay={false}\r\n styleOverrides={styleOverrides}\r\n hideHeaderButtons={hideHeaderButtons}\r\n />\r\n
);\r\n};\r\n\r\nAppAdsPreview.propTypes = {\r\n imageList: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.shape({}))),\r\n updateImageList: PropTypes.func.isRequired,\r\n previewImagesSharedState: PropTypes.shape({\r\n previewImageId: PropTypes.shape({}),\r\n }).isRequired,\r\n setPreviewImagesSharedState: PropTypes.func.isRequired,\r\n placementCustomizationPredicate: PropTypes.func,\r\n hideHeaderButtons: PropTypes.bool,\r\n isAppCampaignPreview: PropTypes.bool,\r\n showStart: PropTypes.bool,\r\n};\r\n\r\nAppAdsPreview.defaultProps = {\r\n imageList: null,\r\n placementCustomizationPredicate: null,\r\n hideHeaderButtons: false,\r\n isAppCampaignPreview: false,\r\n showStart: false,\r\n};\r\n","import { pick, extend, isString } from 'underscore';\r\nimport { loadCampaignAsViewModel, bulkModelToViewModelForLocationTargets, bulkModelToViewModelForDayTimeTargets } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\n\r\nconst whitelistedSchemaPropertyKeysForModel = [\r\n 'Notes', 'Budget', 'Id', 'Name', 'TimeZone', 'BidStrategyName', 'Status',\r\n 'DeliveryStatus', 'DeliveryStatusDetails', 'CampaignType', 'CampaignSubType',\r\n 'HasAuctionInsight', 'IsBidLandscapeAvailable', 'TrackingUrlTemplate',\r\n 'FinalUrlSuffix', 'UrlCustomParameters', 'BiddingScheme', 'NativeBidAdjustment',\r\n 'CampaignSettings', 'DisplayBiddingStrategyType',\r\n 'DisplayBiddingStrategyMaxCpc', 'DisplayBiddingStrategyTargetCpa', 'Languages',\r\n 'ExperimentId', 'BaseCampaignName', 'TargetSetting',\r\n 'AdScheduleUseSearcherTimeZone', 'AvailableInsightTypeIds',\r\n 'MultiMediaAdBidAdjustment', 'AppStore', 'AppId',\r\n];\r\n\r\nexport const viewModelToBulkModelForCampaign = (campaignViewModel) => {\r\n const data = pick(campaignViewModel.data, whitelistedSchemaPropertyKeysForModel);\r\n\r\n if (campaignViewModel.data\r\n && campaignViewModel.data.BiddingScheme\r\n && (campaignViewModel.data.BiddingScheme.ManualCPC || campaignViewModel.data.BiddingScheme.ManualCPI)\r\n ) {\r\n // Get Campaigns call returns it as ManualCPC.\r\n // Bulk upsert expects it as ManualCpc in lower case.\r\n data.BiddingScheme = {\r\n ...campaignViewModel.data.BiddingScheme,\r\n ManualCpc: campaignViewModel.data.BiddingScheme.ManualCPC,\r\n ManualCpi: campaignViewModel.data.BiddingScheme.ManualCPI,\r\n };\r\n }\r\n\r\n return data;\r\n};\r\n\r\nexport const bulkModelToViewModelForCampaign = ({\r\n campaignModel,\r\n bundleCountries,\r\n originalCampaignViewModel,\r\n}) => {\r\n let data = pick(campaignModel, whitelistedSchemaPropertyKeysForModel);\r\n if (data.Id && isString(data.Id)) {\r\n // eslint-disable-next-line no-param-reassign\r\n data.Id = parseInt(data.Id, 10);\r\n }\r\n data = extend(data, bulkModelToViewModelForLocationTargets({\r\n locationTargetsModel: campaignModel.CampaignCriterions,\r\n bundleCountries,\r\n }));\r\n\r\n data = extend(data, bulkModelToViewModelForDayTimeTargets({\r\n criterions: campaignModel.CampaignCriterions,\r\n }));\r\n\r\n data = extend(data, {\r\n AppSetting: originalCampaignViewModel && originalCampaignViewModel.data && originalCampaignViewModel.data.AppSetting,\r\n });\r\n\r\n const campaignViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return campaignViewModel;\r\n};\r\n\r\nexport { loadCampaignAsViewModel };\r\n","import _ from 'underscore';\r\nimport { createOrUpdateCampaign } from '@bingads-webui-campaign-react/perf-max-data';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ERROR_ENTITY } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport {\r\n viewModelToBulkModelForLocationTargets,\r\n viewModelToBulkModelForAdSchedules,\r\n getBulkUploadErrorType, modelToViewModelForBulkErrors, removeReferencedEntityInvalidIdErrors, unexpectedBulkErrorToString,\r\n isBulkWrappedResponse,\r\n genericApiError,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { viewModelToBulkModelForCampaign, bulkModelToViewModelForCampaign } from './campaign';\r\n\r\nconst bulkUpsertCampaignSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(Campaign)]: ERROR_ENTITY.Campaign,\r\n 'Campaign Location Criterion Error': ERROR_ENTITY.CampaignLocation,\r\n 'Campaign Radius Criterion Error': ERROR_ENTITY.CampaignRadius,\r\n 'Campaign Negative Location Criterion Error': ERROR_ENTITY.CampaignNegativeLocation,\r\n 'Campaign Location Intent Criterion Error': ERROR_ENTITY.CampaignLocationIntent,\r\n 'Campaign Day Time Criterion Error': ERROR_ENTITY.CampaignDayTimeCriterion,\r\n};\r\n\r\nexport const getErrorsPlaceholders = () => ({\r\n serverErrors: [],\r\n systemErrors: [],\r\n});\r\n\r\nexport const saveCampaign = ({\r\n campaign: campaignViewModel,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n}, { scenario, i18n, activityLogger }) => {\r\n const campaignModel = viewModelToBulkModelForCampaign(campaignViewModel);\r\n const locationTargetsModel = viewModelToBulkModelForLocationTargets(campaignViewModel, bundleLocationCriterions);\r\n const adSchedulesModel = viewModelToBulkModelForAdSchedules(campaignViewModel);\r\n\r\n const modelToSave = {\r\n ...campaignModel,\r\n CampaignCriterions: [\r\n ...locationTargetsModel,\r\n ...adSchedulesModel,\r\n ],\r\n };\r\n\r\n return createOrUpdateCampaign(modelToSave)\r\n // with bulk the result will have shape of:\r\n // - { ...entityData } - in case of success;\r\n // - { entity: { ...entityData }, errors: [(EditorialError|MTError)] } - in case of error(s).\r\n .then((result) => {\r\n const campaign = bulkModelToViewModelForCampaign({\r\n campaignModel: result,\r\n originalCampaignViewModel: campaignViewModel,\r\n bundleCountries,\r\n });\r\n\r\n const data = {\r\n campaign,\r\n ...getErrorsPlaceholders(),\r\n };\r\n\r\n return data;\r\n }, (bulkOrSystemError) => {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity, errors } = bulkOrSystemError;\r\n const campaign = entity ?\r\n bulkModelToViewModelForCampaign({\r\n campaignModel: entity,\r\n bundleCountries,\r\n }) :\r\n campaignViewModel;\r\n\r\n let filteredErrors = errors;\r\n if (campaign.data.Id <= 0) {\r\n filteredErrors = removeReferencedEntityInvalidIdErrors(filteredErrors);\r\n }\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n filteredErrors,\r\n bulkUpsertCampaignSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activityLogger\r\n );\r\n\r\n const data = {\r\n campaign,\r\n ...getErrorsPlaceholders(),\r\n serverErrors,\r\n };\r\n\r\n return _.isEmpty(filteredErrors) ? data : Promise.reject(data);\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`Campaign bulk upsert system error: ${unexpectedBulkErrorToString(bulkOrSystemError)}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n campaign: campaignViewModel,\r\n ...getErrorsPlaceholders(),\r\n serverErrors: [genericApiError],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n });\r\n });\r\n};\r\n","import { saveCampaign as UnifiedAppCampaignSave } from './campaign-bulk';\r\n\r\nexport const saveCampaign = UnifiedAppCampaignSave;\r\n","import { saveAssetGroupAndLinkedData } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\n\r\nexport const saveAssetGroup = saveAssetGroupAndLinkedData;\r\n","import { useCallback, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport { useLocalizeBudget } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { usePreference, preferenceNames } from '@bingads-webui-campaign-react/pmax-lite-data';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\nexport const roasMtToUI = roas => (_.isNumber(roas) ? roas * 100 : null);\r\nexport const roasUiToMt = roas => (_.isNumber(roas) ? (roas / 100).toFixed(4) : null);\r\n\r\nexport const useBudgetModel = () => {\r\n const i18n = useContext(I18nContext);\r\n const { localizeBudget } = useLocalizeBudget();\r\n const [{ value: currencyPreference }] = usePreference(preferenceNames.SelectedCurrency);\r\n\r\n const budgetModelToViewModel = useCallback((campaign) => {\r\n const budgetAmount = _.get(campaign, ['Budget', 'Amount']);\r\n const bidStrategy = _.get(campaign, ['BiddingScheme', 'Type']);\r\n const bidValueCpc = _.get(campaign, ['BiddingScheme', 'ManualCPC']) || null;\r\n const bidValueCpi = _.get(campaign, ['BiddingScheme', 'ManualCPI']) || null;\r\n const cpa = _.get(campaign, ['BiddingScheme', 'TargetCpa']);\r\n const roas = parseFloat(_.get(campaign, ['BiddingScheme', 'TargetRoas'])) || null;\r\n const isInitialAdditionalDetailsChecked = _.isNumber(cpa) || _.isNumber(roas) || _.isNumber(bidValueCpc) || _.isNumber(bidValueCpi);\r\n\r\n return {\r\n budgetAmount: localizeBudget(budgetAmount, 'USD'),\r\n bidStrategy,\r\n ManualCPI: bidValueCpi,\r\n ManualCPC: bidValueCpc,\r\n currency: currencyPreference,\r\n cpa,\r\n roas: roasMtToUI(roas),\r\n isInitialAdditionalDetailsChecked,\r\n isMarketingMetricValid: true,\r\n };\r\n }, [currencyPreference, localizeBudget]);\r\n\r\n const budgetViewModelToModel = useCallback((bidStrategy, budgetAmount, bidValueCpc = null, bidValueCpi = null) => (\r\n {\r\n BiddingScheme: {\r\n Type: bidStrategy,\r\n ...(bidStrategy === 'ManualCpc' && bidValueCpc !== null && { ManualCpc: bidValueCpc }),\r\n ...(bidStrategy === 'ManualCpa' && bidValueCpi !== null && { ManualCpi: bidValueCpi }),\r\n },\r\n Budget: {\r\n Amount: i18n.parseDecimal(budgetAmount),\r\n Type: 'DailyStandard',\r\n },\r\n }), [i18n]);\r\n\r\n const isBudgetInputValid = (isBudgetValid, isMarketingMetricValid) =>\r\n isBudgetValid && isMarketingMetricValid;\r\n\r\n return {\r\n budgetModelToViewModel,\r\n budgetViewModelToModel,\r\n isBudgetInputValid,\r\n };\r\n};\r\n","import classNames from 'classnames';\r\nimport { useResponsiveStyles } from '@bingads-webui-campaign-react/common-hooks';\r\n\r\nexport const useResponsiveStyleWrapper = (getStylesFunction) => {\r\n const getResponsiveStyles = useResponsiveStyles(getStylesFunction);\r\n\r\n return className => classNames(getResponsiveStyles(className));\r\n};\r\n","export const StoreTypes = {\r\n WindowsAppStore: 'WindowsAppStore',\r\n AndroidPlayStore: 'AndroidPlayStore',\r\n IosAppStore: 'IosAppStore',\r\n};\r\n\r\nexport const FLOWS = {\r\n ANDROID: 'ANDROID',\r\n IOS: 'IOS',\r\n WINDOWS: 'WINDOWS',\r\n};\r\n\r\nexport const AppStoreTypes = {\r\n GoogleAppStore: 'GoogleAppStore',\r\n AppleAppStore: 'AppleAppStore',\r\n MicrosoftAppStore: 'MicrosoftAppStore',\r\n};\r\n\r\nexport const APP_STORE_TO_STORE_TYPE = {\r\n [AppStoreTypes.GoogleAppStore]: StoreTypes.AndroidPlayStore,\r\n [AppStoreTypes.AppleAppStore]: StoreTypes.IosAppStore,\r\n [AppStoreTypes.MicrosoftAppStore]: StoreTypes.WindowsAppStore,\r\n};\r\n\r\nexport const STORE_TYPE_TO_FLOW = {\r\n [StoreTypes.WindowsAppStore]: FLOWS.WINDOWS,\r\n [StoreTypes.AndroidPlayStore]: FLOWS.ANDROID,\r\n [StoreTypes.IosAppStore]: FLOWS.IOS,\r\n};\r\n","import { PANEL_KEYS } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { FLOWS } from './constants';\r\n\r\nexport const getAssetsPanels = (flow) => {\r\n const defaultPanels = [\r\n PANEL_KEYS.SHORT_HEADLINES,\r\n PANEL_KEYS.VIDEOS,\r\n ];\r\n\r\n if (flow === FLOWS.WINDOWS) {\r\n defaultPanels.push(PANEL_KEYS.PRONG_IMAGES);\r\n defaultPanels.push(PANEL_KEYS.SPOTLIGHT_IMAGES);\r\n defaultPanels.push(PANEL_KEYS.LOGOS);\r\n }\r\n\r\n if (flow === FLOWS.ANDROID || flow === FLOWS.IOS) {\r\n defaultPanels.push(PANEL_KEYS.DESCRIPTIONS);\r\n defaultPanels.push(PANEL_KEYS.IMAGES);\r\n }\r\n\r\n return defaultPanels;\r\n};\r\n\r\nexport const getAssetsSettingsPanels = (flow) => {\r\n const panels = getAssetsPanels(flow);\r\n\r\n panels.push(PANEL_KEYS.AUDIENCE_SIGNAL);\r\n\r\n return panels;\r\n};\r\n"],"names":["findIdInToolbarSubMenu","id","toolbarItem","find","menu","items","menuItem","ToolbarEditor","_createClass","options","_this","_classCallCheck","update","value","hasAnyToolbarBeenUpdated","each","configName","hasBeenUpdated","toolbarConfig","has","set","extend","get","forEach","config","key","subMenu","isFunction","updateToolbar","overrideWith","this","$","_this2","foundConfig","view","_","noop","getToolbarEditor","_ref","getToolbarPlugin","_ref2","resetVisibility","resetGraphVisibility","resetToolbarMode","updateToolbarDynamicSelectedConfig","plugin","definePlugin","gridView","on","selectedRowCount","selectedItems","length","showToolbarSelected","showToolbarUnselected","toolbarDynamicSelectedConfigCallback","dynamicSelectedConfig","resetVisibilityAndTriggerUpdate","apply","arguments","trigger","toolbarEditor","gridToolbarGroup","toolbarNames","toolbarWithItem","toolbarWithName","hideAllToolbars","forceHideToolbar","showAllToolbars","updateGridView","remove","bulkEditStyle","_ref$palette","palette","overflowY","margin","maxHeight","display","minWidth","width","border","maxWidth","fontWeight","textAlign","marginLeft","marginRight","paddingLeft","_objectSpread","marginBottom","underlineLinkStyle","upgradedUrlOverrideStyle","alignItems","whiteSpace","height","fontFamily","content","cursor","getAutomatedRulesStyles","semanticColors","background","concat","neutralPrimaryAlt","themePrimary","themeDark","neutralSecondary","red","color","fontSize","position","float","top","right","lineHeight","neutralPrimary","padding","marginTop","neutralLight","borderTop","verticalAlign","paddingTop","W","M","appearance","backgroundClip","themeDarkAlt","backgroundColor","borderRadius","bodyBackground","paddingBottom","getBulkEditOverrideStyle","_ref$iconFontFamily","iconFontFamily","fontStyle","borderLeft","borderRight","borderColor","neutralLighter","redDark","adColumnPreviewStyle","paddingRight","wordBreak","neutralTertiary","boxShadow","bottom","paddingInline","getInlineDownloadStyle","sharedStyle","pasteStyle","left","columnChooserStyle","ComponentSettings","getColumnChooserOverrideStyle","filterEditorStyle","getFilterEditorOverrideStyle","getTopGridPanelCommonStyle","TopGridPanelUnStyled","_React$PureComponent","props","_callSuper","rootRef","React","_inherits","current","tabbableNode","filter","getTabbableNodes","item","is","focus","preventScroll","addDataFocus","panelContent","_this$props","panelView","customClasses","classes","_jsx","BackboneInstanceWrapper","managed","instance","ref","className","classNames","topGridPanelCustomStyles","topGridPanelDefaultStyles","children","defaultProps","TopGridPanel","withDefaultStyles","_ref$semanticColors","_ref$spacing","spacing","Object","assign","zIndex","outline","datePickerStyle","DeviceKeys","Computers","Tablets","Smartphones","ConnectedTVs","Devices","_defineProperty","_TL_","BidStrategyToDevices","ManualCpm","ManualCpv","iconStyle","backgroundSize","backgroundRepeat","backgroundPosition","containerStyle","flex","alignSelf","getStyle","computer","backgroundImage","computerIcon","tablet","tabletIcon","smartphones","smartphoneIcon","connectedTVs","connectedTVIcon","iconContainer","flexDirection","pickerContainer","gap","formatDevice","device","i18n","getString","formatDevices","devices","isCTVSupported","size","chain","sortBy","sortDevices","map","join","getDeviceDetails","isEmpty","formattedDevices","Device","deviceRestrictions","hideDeselectAll","validationPropsField","defaultSelectAll","useDefaultStyles","activity","useContext","ActivityContext","supportedDevices","omit","isAnyDeviceSupported","difference","keys","Target","description","formatter","dimensions","availableDimensions","disabledDimensions","validationProps","field","logger","log","signal","undefined","targetClasses","containerClass","renderLabel","label","_jsxs","withControlErrorHandling","TargetInternal","GendersWithoutUnknown","Female","Male","Genders","Unknown","formatGender","gender","formatGenders","genders","sortGenders","Gender","hideUnknown","AgeRanges","EighteenToTwentyFive","TwentyFiveToThirtyFive","ThirtyFiveToFifty","FiftyToSixtyFive","SixtyFiveAndAbove","AgeRangesCampaignToAdInsight","formatAgeRange","ageRange","formatAgeRanges","ageRanges","sortAgeRanges","AgeRange","STEP_PATHS","CAMPAIGN_SETTINGS","AD_GROUP","ADS","getDefaultBudget","currencyCode","MinXandrDailyBudgetRangePerCurrency","getBudgetRange","Daily","Default","getInitialCampaignData","dealMinimumBid","campaignNamePrefix","xandrVideoDeal","xandrVideoCampaignType","isDisplayAds","serverContext","biddingSchemeType","xandrVideoCampaignTypes","xandrVideoWeb","exchangeRateMapping","getAccountExchangeRateFromLocalStorage","getConvertedCurrencyDealMinimumBid","MinimumBid","Currency","val","Status","Name","generateNameSuggestionSuffix","Budget","Amount","ceil","Type","Languages","BiddingScheme","Id","CampaignSubType","CampaignSubTypeMapping","DisplayAds","BrandAwarenessVideoAds","CampaignType","getInitialCampaignViewModel","data","isValid","isDirty","AddedDeviceBidAdjustment","RemovedDeviceBidAdjustment","AdGroupNegativeReferenceId","getInitialAdGroupData","deviceTypes","StartDate","Date","locationTargets","bidMode","currentLevelSettings","initLocations","peopleInLocation","peopleSearchingForLocation","targetOption","parentLevelSettings","useParentLevel","adSchedules","adScheduleUseSearcherTimeZone","dayTimeRanges","timeZone","initialDeviceTypes","criterion","bidAdjustment","initialAgeRanges","genderTypes","initialGenderTypes","audiences","initialAudiences","FrequencyCapSettings","genreTargets","initialGenreTargets","CpmBid","getInitialAdGroupViewModel","_ref3","CRITERION_LEVEL","CAMPAIGN","modelToViewModelForTargetCriterions","model","_ref$level","level","_ref$campaignDeviceCr","campaignDeviceCriterions","positiveOdataType","negativeOdateType","Criterion","DeviceName","CriterionBid","Multiplier","negativeAgeRanges","GenderType","negativeGenderTYpes","GenreId","initialIndustryTargets","ProfileId","BidAdjustment","initialNegativeIndustryTargets","initialJobTargets","initialNegativeJobTargets","initialCompanyNameTargets","Size","Industry","CompanyName","initialNegativeCompanyNameTargets","initialContextualTargets","getSelectionFromCriterions","initialCampaignLevelDeviceTargets","campaignLevelDeviceTargets","industry","negativeIndustry","jobTargets","negativeJobTargets","companyNameTargets","negativeCompanyNameTargets","contextualTargets","deviceTargetingCampaignLevel","bulkModelToViewModelForLocationTargetsBase","locationTargetsModel","bundleCountries","_ref2$level","locations","intent","intentId","intentOption","getLocationIntent","LocationIntentCriterion","IntentOption","locationTargetsOptionKeys","specific","everywhere","shouldSelectBundleOption","bundleOrDefaultMarket","currentLocations","modelToViewModelForLocationTargets","AdGroupCriterion","properties","campaignLocationModel","adGroupId","campaignId","_ref$overrideOriginal","overrideOriginalBidAdjustment","_ref$bidMode","_parseLocationTargets","parseLocationTargets","_parseLocationTargets2","campaignLocations","campaignIntentId","campaignIntentOption","campaignTargetOption","location","OriginalBidAdjustment","modelToViewModelForDayTimeTargets","modelToViewModelDayTimeTargets","modelToViewModelForAudience","audience","CriterionType","AudienceId","AudienceCriterion","AudienceName","AudienceType","BidMultiplier","AdGroup","BidType","modelToViewModelForAudienceCriterions","_ref4","separateIMA","filteredAudiences","customSegmentsAudiences","interests","initialCustomSegments","initialInterests","customSegments","bulkModelToViewModelForDayTimeTargets","_ref5","criterions","schedulingRows","push","Day","DayTimeCriterion","StartHour","FromHour","StartMinute","FromMinute","EndHour","ToHour","EndMinute","ToMinute","bulkModelToViewModelForLocationTargets","_ref6","viewModelToBulkModelForLocationTargets","_ref7","bundleLocationCriterions","adGroupViewModel","campaignViewModel","locationRestricted","convertLocationStateToLocationSchemaCampaign","bidStrategy","option","name","viewModelToBulkModelForAdSchedules","_ref8","adSchedulesBulkUpsert","AdGroupName","CampaignName","viewModelToBulkModelForAudiences","_ref9","audienceRestricted","totalAudiences","_toConsumableArray","initialTotalAudiences","added","initialAudience","removed","addedCustomSegments","customSegment","initialCustomSegment","removedCustomSegments","typePrefix","criterionType","viewModelToBulkModelForPlacements","_ref10","placements","initialPlacements","placement","initialPlacement","PlacementId","getTargetCriterion","_ref11","targets","type","propKey","_ref11$overrideType","overrideType","_ref11$level","target","propValue","status","Campaign","getDeviceCriterions","_adGroupViewModel$dat","deviceTypesWithBidAdjustment","deviceTargets","initialDeviceTargets","addedDevices","removedDevices","initialTarget","targetWithBid","DeviceCriterion","isBidAdjustmentSame","deviceTargetWithBid","deviceWithBid","initialDeviceTarget","bid","DefaultDeviceBidAdjustment","targetWithBidAdjustmentList","hydrateCriterionWithBidAndId","initialTargetList","adddedCriterionList","_loop","i","matchingAgeRangeWithBid","criterionWithBidAdjustment","originalCrition","viewModelToBulkModelForTargeting","_ref14","removedDeviceCriterion","isXandrDeviceTargetEnabled","_ref14$isBoostEnabled","isBoostEnabled","_ref14$isDeviceTarget","isDeviceTargetingForDisplayEnabled","_ref14$isMultiAdForma","isMultiAdFormatEnabled","_ref14$isXandrServing","isXandrServing","_ref14$isPremiumStrea","isPremiumStreamingEnabled","addedDeviceCriterion","isXandrDisplayAdsCampaign","isNativeAds","isAudienceNativeAdsCampaign","isVideoAds","isXandrVideoAdsCampaign","isDealBasedAds","deal","isXandrDeviceTargetForOLVEnabled","isUpdate","_getDeviceCriterionsF","addedBackDevices","newlyAddedDevices","addedBackDevice","getDeviceCriterionsFull","displayAddDevices","displayRemovedDevices","_getDeviceCriterions","deviceRestricted","cpmTargets","cpvTargets","_getDeviceCriterionsV","deviceTargetsWhenNoInitialDeviceTargets","includes","toRemoveDevices","getDeviceCriterionsVideoAds","adjustedAddedDeviceCriterion","addedCriterion","idx","ageTargets","initialAgeTargets","ageRangesWithBidAdjustment","addedAges","removedAges","addedAgeCriterion","removedAgeCriterion","removedNegativeAges","negativeAge","addedTarget","removedNegativeAgeCriterion","genderTypesWithBidAdjustment","addedGenders","removedGenders","addedGenderCriterion","removedGenderCriterion","removedNegativeGenders","negativeGenderType","removedNegativeGenderCriterion","addedGenres","removedGenres","addedGenreTargets","removedGenreCriterion","industryTargetsBidAdjustment","industryTargets","negativeIndustryTargets","addedIndustryTargets","removedIndustryTargets","addedIndustryCriterion","removedIndustryCriterion","negativeAddedIndustryTargets","negativeRemovedIndustryTargets","negativeAddedIndustryCriterion","negativeRemovedIndustryCriterion","_ref15","isIndustryTargetBidAdjustmentUpdated","jobTargetBidAdjustments","addedJobTargets","removedJobTargets","addedJobCriterion","removedJobCriterion","negativeAddedJobTargets","negativeRemovedJobTargets","negativeAddedJobCriterion","negativeRemovedJobCriterion","_ref16","isJobTargetBidAdjustmentUpdated","addedCompanyNameTargets","removedCompanyNameTargets","addedCompanyNameCriterion","removedCompanyNameCriterion","negativeAddedCompanyNameTargets","negativeRemovedCompanyNameTargets","negativeAddedCompanyNameCriterion","negativeRemovedCompanyNameCriterion","_ref17","_objectWithoutProperties","_excluded","updatedContextualTargets","getContextualTargetInfo","loadBundleCountries","_ref18","cid","aid","lcid","CurrentUser","LocaleID","market","Market","getBundleCountriesAndBundleLocationCriterions","readAdGroupCriterions","_ref19","edmCampaign","Customers","$withKey","Accounts","Campaigns","AdGroups","AdGroupCriterions","$cast","where","toPromise","readPlacementCriterions","_ref20","readLocationCriterions","_ref21","readDayTimeCriterions","_ref22","readTargetingCriterions","_ref23","readAudienceCriterions","_ref24","AudienceAssociations","ServerValidatedRemainingCharsValidatedTextField","RemainingCharsValidatedTextField","doesNeedSavingSelector","state","isCanceling","needsSaving","context","isSaving","hideStepHeaderSelector","stepInfo","hideStepHeader","serverContextSelector","stepsData","adGroupIdSelector","adGroupSelector","adGroup","scopeSelector","scope","locationTargetsSelector","bundleCountriesSelector","bundleLocationCriterionsSelector","adSchedulesSelector","adSchedulesBulkUpsertModelSelector","genreTargetsSelector","ageRangesSelector","genderTypesSelector","deviceTypesSelector","deviceRestrictionsSelector","deviceRestrictedSelector","companyNameTargetsSelector","negativeCompanyNameTargetsSelector","jobTargetsSelector","negativeJobTargetsSelector","industrySelector","negativeIndustrySelector","locationRestrictedSelector","dealLocationListSelector","dealLocationList","genreRestrictedSelector","genreRestricted","ageRestrictedSelector","ageRestricted","genderRestrictedSelector","genderRestricted","audienceRestrictedSelector","customSegmentsSelector","campaignTimeZoneSelector","campaign","TimeZone","currentCampaign","campaignBiddingStrategySelector","campaignSubTypeSelector","campaignSettingsSelector","CampaignSettings","systemErrorsSelector","systemErrors","isEditingSelector","isEditing","serverErrorsSelector","serverErrors","invalidSaveAttemptSelector","invalidSaveAttempt","dealDetailsSelector","permissionsSelector","permissions","placementsSelector","exclusionsSelector","exclusions","initialAdGroupSelector","formatAudience","targetedAudiences","excludedAudiences","targetedAudienceDetails","excludedAudienceDetails","count","navigate","siteMap","scopeService","routeId","path","getRoutePathById","history","pathname","search","UnstyledAudiencePicker","updateValidation","perfMarker","campaignSubType","campaignSettings","campaignBiddingStrategy","supportExclusion","isAudienceCreationWorkflow","isIMARedesignEnabled","hideCustomSegmentsOption","_useState","useState","_useState2","_slicedToArray","audienceAssociationRef","setAudienceAssociationRef","ScopeContext","audienceAssociationView","useMemo","associationView","AimAudienceAssociationView","isForVNext","hideExclusion","hideAssociationHeader","biddingScheme","deps","router","navigateToAudiences","navigateToTags","canExpandAssociation","render","expandAssociation","expandExclusion","onAudienceListChanged","useCallback","associationList","getAudienceCriterion","JSON","stringify","useEffect","childElementCount","innerHTML","append","el","ensureLoadedAsync","then","compact","doubleListBoxViewModel","allAudiences","exclusionList","off","setLists","newRef","ValidatedAudiencePicker","withSiteMap","withCustomValidation","uiblockerStyle","audienceModalStyles","modalWidth","audienceExpressionStyle","audienceCombinedListStyle","audienceAssociationSectionStyle","singleListBoxWidth","commonDoubleListBoxStyle","paginationStyle","searchboxStyle","convertToLocalStyle","glyphIconStyle","helpbuttonStyle","listStyleType","ValidatedTextField","withValidation","TextField","FrequencyIntervals","FrequencyCapUnit","getKeyStringMap","text","formatFrequencyCapping","interval","CapValue","TimeGranularity","textStyles","root","dropDownStyles","dropdown","inputContainer","frequency","ValueAndInterval","onIntervalChanged","timeOptions","styles","ariaLabel","Dropdown","onChange","selectedKey","ValidatedValueAndInterval","withError","ValidatedFrequencyCapping","_validationProps$data","_validationProps$data2","_validationProps$data4","_validationProps$data5","_validationProps$data6","errorMessage","setErrorMessage","e","onToggle","checked","onCountValidate","result","_result$messages","messages","capValue","customErrors","decimalLength","Toggle","onText","offText","onValidate","alwaysShowError","errorProcessor","errors","oldError","schema","minimum","maximum","required","DataSource","genreOptions","_useContext","DoubleListBoxContext","dispatch","toLowerCase","end","payload","slice","totalCount","propTypes","PropTypes","isRequired","GenreSelectionDoubleListBox","onSelectionChange","genreTarget","ThemeProvider","theme","components","core","ThemeFluent","style","DoubleListBoxContextProvider","initialSelectedItems","DoubleListBox","doubleListBox","availableItemsText","genreTargetAllOptionIds","radioOptions","formatGenreTargets","genreTargetStr","take","genreTargetId","ValidatedGenreTargets","isAllSelected","selectedOptionId","setSelectedOptionId","optionToString","renderItem","getItemId","onGenreTargetsChanged","selections","selectionIds","selection","onRadioGroupChange","RadioGroup","getGenreOptions","getDealGenreOptions","getAdGroupStepStyles","collapsiblePanel","getCollapsiblePanelStyles","container","reachEstimate","reachEstimationError","getReachEstimateStyles","reachEstimateControl","estimateNote","panel","minHeight","white","panelBody","reachEstimateTitle","impressionsCountMessage","impressionsCount","meterContainer","specificMeter","broadMeter","audienceSpecificLabel","audienceBroadLabel","arrow","meterProps","AudienceMeter","estimatedImpressions","isImpressionTooSpecific","isDealEstimate","arrowRef","useRef","specificMeterRef","broadMeterRef","arrowStyles","setArrowStyles","_useState3","_useState4","arrowType","setArrowType","_useState5","_useState6","broadMeterStyle","setBroadMeterStyle","_useState7","_useState8","specificMeterStyle","setSpecificMeterStyle","calcBroadPos","offsetWidth","borderLeftWidth","moveAlongBroad","borderTopColor","totalWidth","clientWidth","estimatePos","visibility","calcSpecificPos","moveToSpecific","Math","calcBroadMeterValue","meter","unitValueMap","None","unit","Thousand","Million","Billion","tooNarrowFlag","tooNarrowErrorMessage","title","ReachEstimate","accountId","customerId","shouldServeOnMSAN","_useFetch","useFetch","fetchReachEstimation","post","reachEstimationResponse","response","reachEstimationLoading","loading","error","currentTargets","setCurrentTargets","showPanel","setShowPanel","isLoading","setIsLoading","setEstimatedImpressions","_useState9","_useState10","estimatedImpressionsText","setEstimatedImpressionsText","_useState11","_useState12","setIsImpressionTooSpecific","_useState13","_useState14","updateEstimatesOnMeter","estImpression","estImpressionsVal","estImpressionsUnit","estImpressionsUnitVal","estImpressionsText","IsAmplifyEnabled","updatePanel","currentErrorMessage","estimation","debouncedUpdateEstimate","Stack","_Fragment","Spinner","SpinnerSize","large","ariaLive","labelPosition","horizontal","tokens","childrenGap","audienceMeterContainer","MessageBar","messageBarType","MessageBarType","warning","isMultiline","validatedReachEstimate","getDealPotentialImpression","dealImpression","DealImpressionPanel","isPanelMode","impression","_useBoolean","useBoolean","_useBoolean2","isOpen","_useBoolean2$","openPanel","setTrue","dismissPanel","setFalse","estimateLoaded","setEstimateLoaded","setEstImpression","dealDeleted","isDealDeleted","hideDealImpression","isNetflixDeal","GenreTargets","DynamicPermissions","IsDealFilterEnabled","Permissions","shouldShowGenre","CurrentCustomer","CurrentAccount","res","estImpressions","DealIds","Includes","classnames","bytesForHuman","BlockUi","blocking","loader","DealDetails","dealDetails","Link","onClick","Panel","main","isLightDismiss","onDismiss","closeButtonAriaLabel","_DealImpressionPanel","getNetflixFrequencyCapping","NetflixTCAgreement","fetched","setFetched","accepted","setAccepted","readAccount","select","patchAccount","patch","NetflixTCAccepted","onAccept","account","small","Checkbox","href","disabled","defaultChecked","FocusableErrorMessage","withActuation","ErrorMessages","Actuators","FocusableActuator","entityIsAdGroup","entityIs","ERROR_ENTITY","adGroupUrlOptionsProperties","notComp","andComp","anyComp","propertyIs","adGroupNameProp","adGroupBidProp","withLoadingShell","withStepLoadingShell","stepService","optimizedTargetingEnabled","setOptimizedTargetingEnabled","_useStepAdGroupSettin","I18nContext","legacyI18n","buildLegacyI18n","ValidationStringMap","subscribe","stateLoggingListener","unsubscribe","useSelector","campaignTimeZone","campaignSubtype","doesNeedSaving","initialAdGroup","_useExitWithoutSaving","useExitWithoutSavingConfirmation","navigationConfirmationPrompt","onAdGroupValidation","results","newAdGroupData","restResults","dataPatch","send","StepEvents","UPDATE_VALIDATION","_usePrevProp","usePrevProp","hasInvalidSaveAttemptChanged","_usePrevProp3","serverErrorsCompare","hasServerErrorsChanged","areBeaconsActive","useImpulse","showAllValidationErrors","setShowAllValidationErrors","getLocationIds","_locationTargets$curr","c","LocationId","reduce","locationIds","cl","SelectionStatus","LocationCriterion","getExcludedLocationIds","_locationTargets$curr2","getRadiusCriterions","radiusTargets","CenterLatitude","RadiusCriterion","Latitude","CenterLongitude","Longitude","Radius","getAudienceIds","includeIds","getExcludedAudienceIds","getGenreTargets","getAgeRanges","ar","getDevices","dynamic","XandrDeviceTarget","getCompanyNameTargets","getNegativeCompanyNameTargets","getJobTargets","getNegativeJobTargets","getIndustry","getNegativeIndustry","isAdScheduleInvalid","indexOf","getAdSchedule","a","_a$Criterion$DayTimeC","reachEstimationTargets","Age","Excludes","Job","Location","RadiusTargets","Audience","Genre","timeZoneMapper","getAccountIANATimeZone","useStepAdGroupSettingsState","_useStepAdGroupSettin2","stepState","stepApi","adScheduleView","setAdScheduleView","setAdScheduleViewCallback","adGroupErrors","_serverContext$Dynami","XandrVideoCampaignsAudienceTargets","XandrNegativeTarget","ShowNetflixTCAccepted","AgeGenderDisclaimer","EnableMSANDisplayCampaigns","EnableMSANVideoCampaigns","EnableKeywordCustomSegments","ContentTargeting","ContentTargetingMSNSubcategories","CampaignLifetimeBudget","_serverContext$Netfli","NetflixEnabledCountryCodes","campaignShouldServeOnMSAN","isEnableMSANDisplayCampaignsEnabled","isEnableMSANVideoCampaignsEnabled","isMSANEnabled","isXandrServingCampaign","basicOptions","_useCollapseState","useCollapseState","_useCollapseState2","allAdGroupSettingsSections","adGroupSettingsExpandedSections","setAdGroupSettingsExpandedSections","flipAdGroupSettingsExpandAllState","_useCollapseState3","_useCollapseState4","allAdGroupSettingsTargetingSections","adGroupSettingsTargetingExpandedSections","setAdGroupSettingsTargetingExpandedSections","isDealTypeRestricted","shouldUsePredefinedFrequencyLimit","shouldHideDeviceListForDeal","bidType","bidRange","KeywordBidRange","VideoViewsCPMBidRange","VideoViewsCPVBidRange","KeywordCPMBidRange","shouldShowDealLocationTarget","isDealGenreRestricted","isXandrVideoCampaignsAudienceTargetsEnabled","shouldShowDeviceTarget","CurrencyCode","bidValidationProps","max","FloorValue","CeilingValue","reachEstimationToNarrowErrorMessage","reachEstimation","basicSettingsExpand","collapseExpander","setActiveKeys","shouldHideAudiences","getAdScheduleDetailsCombined","adScheduleDetails","getAdScheduleDetails","NetflixEnabledCountryCodesArr","split","BundleCountriesCodesArr","CountryCode","webExclusionsError","err","property","shouldShowNetflixTC","some","bundleCountry","isFCapEnabled","shouldSelectAllDeviceByDefault","CampaignSubTypes","AudienceStatic","deviceTargetingPanel","Collapse","TextTitle","titleKey","topicKey","details","audienceTargetingPanel","genreTargetingPanel","adScheduleTargetingPanel","ValidatedPanel","ValidatedLegacyAdSchedule","isCreation","hideMinuteOptions","entity","hideUseCampaignSetting","ActuationGroup","actuationProps","isActive","AttentionBeaconGroup","FormErrorGroup","formErrorProps","UnmappedFormErrors","ValidationGroup","horizontalAlign","needsActivation","allPanelItems","checkItems","skipItemsTypeCheck","activeKeys","ValidatedFixedPanel","attentionBeaconProps","getExtraProps","getPanelErrorProps","placeholder","expand","expandKey","Label","htmlFor","getBidTitleDetails","HelpPopup","topic","CustomValidatedDefaultBid","placeholderText","noOverflowHidden","getDateSettingDetails","EndDate","panelKey","ValidatedLegacyDateSetting","isCreate","disableExpand","getLocationTargetTitleDetails","ValidatedLocationTargetSetting","isRadiusExcludeEnabled","allowNegativeLocationTargeting","showSearchTypeOptions","defaultSelectedSearchType","SEARCH_TYPE","Boundary","isBrandAwarenessCampaignScenario","hideIntent","isAdGroupLevel","bidStrategyType","strings","PredictiveTargetingHeader","SectionShimmer","ServerValidatedWebExclusionsWithValidation","showSiteExclusion","parentData","ScopeLevel","exclusionData","webExclusionPropertyVal","token","ValidatedBootstrapPanel","defaultExpanded","BootstrapPanel","Heading","Title","toggle","Body","formatCompany","ValidatedCompanyPicker","formatIndustry","ValidatedIndustryPicker","formatJobFunction","ValidatedJobFunctionPicker","formatCustomSegment","headingRole","headingLevel","ValidatedCustomSegmentsPicker","getContentTargetingPlacementsSummaryText","ContentTargetingPlacements","msnSubcategoriesEnabled","PredictiveTargetingControlHeader","onToggleEnabledChanged","Alert","message","icon","dismissible","globalLegacyI18n","window","parseLoadDate","dateString","parseDate","substring","raw","parseDateFromAPIFormat","date","formatDateToAPIFormat","formatDate","modelToViewModelForDateSetting","bulkModelToViewModelForDateSetting","viewModelToBulkModelForDateSetting","viewModel","whitelistedSchemaPropertyKeysForModel","readonlyPropertyKeysForModel","modelToViewModelForAdGroup","adGroupModel","campaignModel","locationCriterionsModel","campaignLocationCriterionsModel","dayTimeCriterionsModel","targetCriterionsModel","audienceCriterionsModel","placementCriterionsModel","_ref$isAudienceAds","isAudienceAds","_ref$isAudienceAdGrou","isAudienceAdGroupEdit","_ref$isDisplayAds","_ref$isVideoAds","_ref$defaultAdGroupDa","defaultAdGroupData","_ref$defaultTargeting","defaultTargeting","_ref$isXandrServing","_ref$separateIMA","campaignExclusions","adgroupExclusions","ads","pick","AdRotationSettings","AdRotation","RotationType","UseOptimizedTargeting","CampaignBidStrategyName","adGroupSettings","BoostPlacementSetting","setting","BoostAdunitIds","AdUnitIds","BoostPublisherIds","PublisherIds","BoostAccountIds","AccountIds","BoostTriggerIds","TriggerIds","adGroupTargetSettings","Details","targetSetting","TargetAll","modelToViewModelForPlacements","isArray","defaults","bulkModelToViewModelForAdGroup","originalAdGroupViewModel","isString","parseInt","viewModelToModelForAdGroup","_ref3$isDisplayPlus","isDisplayPlus","filteredReadonlyKeys","without","PricingModel","adUnitIds","TargetSetting","loadAdGroup","readAdGroup","adGroupResource","types","resolve","ResourceIdentifier","createOrUpdateAdGroup","bulkUpdate","bind","bulkCreate","GENERIC_ERROR_MESSAGE_KEY","bulkUpsertAdGroupSettingsEntityErrorMap","getBulkUploadErrorType","parallelSave","_asyncToGenerator","_regeneratorRuntime","mark","_callee","modelToSave","savePromise","saveExclusionsPromise","saveExclusionsData","wrap","_context","prev","next","Promise","CampaignId","AdGroupId","AdvancedSettings","ExcludedSites","exclusionRepository","saveExtensions","t0","sent","t1","abrupt","resultExclusion","stop","_x","_x2","_x3","getErrorsPlaceholders","saveAdGroup","_callee2","_ref2$customTargeting","customTargetingBulkModel","_ref2$isDisplayPlus","_ref2$flow","flow","scenario","activityLogger","adSchedulesModel","isMSANServingDNVCampaign","targetingModel","saveResult","filteredErrors","NegativeSitesResult","_serverErrors","_context2","isMSANServingDNV","DeviceTargetingForDisplay","MultiAdFormat","PremiumStreaming","AdGroupAudienceCriterions","isBulkWrappedResponse","modelConstraints","removeReferencedEntityInvalidIdErrors","modelToViewModelForBulkErrors","reject","EntityErrors","console","warn","stack","_x4","_x5","saveJustAdGroup","_callee3","_context3","_x6","_x7","viewModelToBulkModelForDeviceTargets","campaignDeviceTypesWithBidAdjustment","isTargetInitiallyRemoved","viewModelToModelForCampaign","CampaignSubTypeTextMapping","bulkModelToViewModelForCampaign","originalCampaignModel","bulkModelToViewModelForConversionGoals","originalCampaignViewModel","CampaignCriterions","loadCampaign","readCampaign","modelToViewModelForCampaign","_ref2$dayTimeCriterio","_ref2$isAudienceMMACT","isAudienceMMACTAOptOutEnabled","_ref2$isAudienceMMACT2","isAudienceMMACTADefaultOptOutEnabled","audienceSettings","audienceSetting","getVerifiedTrackingSettingsRead","modelToViewModelForConversionGoals","IsCallToActionOptOut","modelToViewModelForCallToActionSettings","needsLoading","getCampaignId","getAdGoupId","getCampaignSubType","getInitDeviceTypes","getBiddingScheme","loadData","_context$stepsData","loadPromises","_yield$Promise$props","locationCriterions","bundleCountriesAndLocationCriterions","dayTimeCriterions","targetCriterions","audienceCriterions","placementCriterions","_yield$Promise$props$","_yield$Promise$props$2","_yield$Promise$props$3","adGroupData","getDealDetails","load","otherErrors","hasServerErrors","patchStepsData","Boolean","hasCampaignData","clearErrors","stepAdGroupWizardConfig","StepMachine","stepStateMachine","StepMachineOptions","initialStepsData","machineId","initialContext","actions","guards","StepComponent","StepAdGroupSettings","canNavigateBackWithoutSaving","stepRepositoryConfig","saveData","scenarioName","createActivity","campaignResource","bulkUpsertCampaignSettingsEntityErrorMap","saveCampaign","_ref$viewModelToBulkM","_ref$bundleCountries","_ref$bundleLocationCr","_ref$viewModelToBulkM2","viewModelToBulkModelForDisclaimerAssociation","_ref$isAudienceMMACTA","_ref$viewModelToBulkM3","viewModelToBulkModelForVerifiedTrackingSettings","conversionGoalsAssociations","adExtensionAssociations","verifiedTrackingDataObj","conversionGoals","CampaignConversionGoalAssociations","viewModelToBulkModelForConversionGoals","CallToActionOptOut","isDealCampaign","IsDealCampaign","dealModel","DealCriterion","DealId","campaignData","saveCampaignPromise","bulkOrSystemError","AdvanceSettings","Exclusions","ExcludedIPs","savePromises","promises","wrappedPromises","p","reason","all","allSettledPromiseWrapper","_ref3$serverErrors","NegativeIPsResult","extractImpressionTrackingSetting","verifiedTrackingData","formatImpressionTrackingSetting","_extractImpressionTra","_extractImpressionTra2","advertiserEntityID","publisherEntityID","validatedImpressionTrackingSetting","impressionTrackingSettingRef","setImpressionTrackingSettingRef","impressionTrackingView1","impressionTrackingView","ImpressionTrackingView","isEnabledForVerifiedImpressionTrackingAtCampaignLevel","initialIASImpressionTrackingUrlValue","isImpressionTrackingUrlSectionVisible","isForBrandAwarenessCampaign","VerifiedTrackingData","campaignIdSelector","campaignSelector","scenarioNameSelector","getStepCampaignSettingsStyles","borderBottom","themeDarker","textDecoration","transform","overflow","entityIsCampaign","campaignNameProp","campaignBudgetProp","campaignCampaignSettingsProp","ServerValidatedLegacyBudget","withUnvalidatedControlErrors","ValidatedLegacyBudget","ValidatedImpressionTrackingSetting","ImpressionTrackingSetting","campaignUrlOptionsProperties","_props$scope$values","values","_useStepCampaignSetti","onCampaignValidation","newCampaignData","useStepCampaignSettingsState","_useStepCampaignSetti2","campaignErrors","advertiserCustomerId","AdvertiserCustomerID","EnableDoubleVerify","IsMSANISPOTEnabled","shouldShowThirdPartyTrackginSetting","verifiedTrackingSettingsValidationProps","VerifiedTrackingSettings","allCampaignSettingsSections","campaignSettingsExpandedSections","setCampaignSettingsExpandedSections","allAdvancedCampaignSettingsSections","advancedCampaignSettingsExpandedSections","setAdvancedCampaignSettingsExpandedSections","advancedSettingsExpand","moreOptionsSectionExpanded","setNameAndTitleExpanded","onMoreOptionsSectionToggle","expanded","minBudget","AudienceBudgetBidStrategy","campaignType","validationDailyMinBudget","hideBudgetMinRecommendation","formatVendorSettings","headingClassName","as","ThirdPartyMeasurementV3WithValidation","ValidatedConversionGoals","initialValue","showIPExclusion","hasIncomingSystemError","stepCampaignSettingsWizardConfig","withScope","StepCampaignSettings","fillLocationForDeal","_ref$exclusions","_ref$exclusions2","MmpFetchProvider","url","ServerContext","finalOptions","headers","Locale","PageTrackingId","Authorization","Token","cachePolicy","interceptors","request","generateGuid","getDefaultOptions","finalUrl","CampaignAPI","ServicesEndpoints","getDefaultUrl","Provider","adsSelector","adsErrorsSelector","adsErrors","otherErrorsSelector","useStepAdsSettingsState","onAdsValidation","newAdsData","newAds","ad","removeEmptyAds","StepAdsSettings","withPerformanceMarker","_scope$values","_useStepAdsSettingsSt","_useStepAdsSettingsSt2","currentImageIndex","setCurrentImageIndex","oDataConfig","odataPath","hostname","document","isLocal","odataToken","oDataToken","oDataPath","getODataConfig","_useImagePicker","useImagePicker","displayImagePicker","setDisplayImagePicker","selectedMediaPanelSource","setSelectedMediaPanelSource","onNewImageSelected","imagePlacements","imagePlacement","imagePlacementsToImage","crops","FinalUrls","getBasicSettingsSection","columnGap","PopulateImages","DisplayAdsContainer","AdPreview","onUpdateCurrentImageIndex","stepAdsWizardConfig","saveAds","oldAdsModel","adsModel","modelToViewModelForAd","ScenarioName","STEP_INFOS","applyCommonSettingsPageSettings","XANDR_DISPLAY_ADS_CAMPAIGN_CRUD_SCENARIOS","XANDR_DISPLAY_ADS_CAMPAIGN_CREATION","stepList","XANDR_DISPLAY_ADS_AD_GROUP_CREATION","withContentFooter","XANDR_DISPLAY_ADS_CAMPAIGN_SETTINGS","XANDR_DISPLAY_ADS_AD_GROUP_SETTINGS","XandrDisplayAdsCampaignCreationPage","withTheme","withComponentErrorLogging","routeToNavigateToWhenDone","PerformanceMarkerProvider","instrumentation","immediateDone","StepWizard","wizardScenario","extraStepsData","XandrDisplayAdsCampaignSettingsPageImpl","currentAdGroup","XandrDisplayAdsCampaignSettingsPage","XandrDisplayAdsAdGroupSettingsPage","XandrDisplayAdsAdGroupCreationPage","withInstrumentation","flexShrink","dealSelector","biddngSchemeSelector","loadClipchampPlayer","isCTVCopilotVideoGenerationEnabled","CTVCopilotVideoGeneration","currentVideoIndex","setCurrentVideoIndex","VideoAdsContainer","dealLoaded","allowCopilotVideoGeneration","onUpdateCurrentVideoIndex","XANDR_VIDEO_CAMPAIGN_CRUD_SCENARIOS","XANDR_VIDEO_CAMPAIGN_CREATION","XANDR_VIDEO_AD_GROUP_CREATION","XANDR_VIDEO_CAMPAIGN_SETTINGS","XANDR_VIDEO_AD_GROUP_SETTINGS","XandrVideoCampaignCreationPage","localStorage","supportsStorage","getXandrVideoCampaignType","getVideoDeal","save","invalidate","XandrVideoCampaignSettingsPageImpl","XandrVideoCampaignSettingsPage","XandrVideoAdGroupSettingsPage","XandrVideoAdGroupCreationPage","UnifiedAppWizard","action","storeType","wizardConfig","InstrumentationContext","wizardName","wizardPerfMarker","createChild","setClarityTag","FluentSwitcherContext","Scenario","Activity","Wizard","WizardPerfMarker","wizardMarker","LayoutContainer","template","DefaultTemplate","Layout","component","StepContainer","SaveBlocker","CancelWizardDialog","getIndicatorsWidth","getAssetStepStyles","flexWrap","imageExperience","formContainer","previewerContainer","flexGrow","adPreview","windowsAdPreview","transformations","indicatorsWidth","textOverflow","boxSizing","useAssetsStepStyles","useResponsiveStyleWrapper","flowToPlatform","FLOWS","IOS","platforms","ANDROID","WINDOWS","unifiedAppAdsSurfaces","VideoGaming","M365","MsnDisplay","MicrosoftCasualGames","BingSearch","adPreviewConfig","placementSetName","placementTypes","EPT","UnifiedAppAds","VideoHorizontal","M365Outlook","MSNDisplay","CasualGamesDimensions","BingSearchText","AssetGroupNameSection","isValidating","onDataChange","onRenderAdGroupNameLabel","GroupInfoImg","AppSetting","CampaignValidationGroup","StoreAppSelector","platform","isMounted","readOnly","AppSettingReadOnly","isCountryRefinementEnabled","AssetGroup","onRenderLabel","AssetsSection","imageExperiencePortalContainerState","transparentLogoExperiencePortalContainerState","imageExpereienceProngPortalContainerState","imageExperienceSpotLightPortalContainerState","prongImageExperienceAddNewImageCallback","imageSpotlightExperienceAddNewImageCallback","transparentLogoContainerRef","logosContainerRef","imageExperienceAddNewImageCallback","imagesContainerRef","imageSpotlightContainerRef","imageProngContainerRef","setAddNewDescriptionCallback","setAddNewShortHeadlinesCallback","mergedI18n","assetPanels","setSelectedVideoId","selectedVideoId","useWizardService","wizardData","Headlines","Descriptions","headlinesCardSummaryDetails","getHeadlinesCardSummaryDetails","descriptionsCardSummaryDetails","getDescriptionsCardSummaryDetails","allSections","allSectionsExpandedSections","setAllSectionsExpandedSections","PANEL_KEYS","START_END_DATES","moreSettings","moreSettingsExpandedSections","setMoreSettingsExpandedSections","allAssetsExpand","fetch","useVideoAdsCopilot","copilotFetchTaskManager","TaskManager","Subtitle1","Text","ImagesPanel","setAddNewImageCallback","ImageAssetsImg","images","Images","IMAGES","BaseImagePanel","iconAltText","imagesData","ImageSPOTLIGHT","containerRef","portalContainerState","addNewImageCallback","maxUploadNum","SPOTLIGHT_IMAGES","ImagePRONG","PRONG_IMAGES","LogosPanel","logos","logoExperiencePortalContainerState","LOGOS","ShortHeadlinesPanel","TextAssetsImg","featureName","isOptional","SHORT_HEADLINES","DescriptionsPanel","DESCRIPTIONS","VideoPanel","videos","isVideoRequired","skipQualityValidation","VIDEOS","AUDIENCE_SIGNAL","AudienceSignalSection","AudienceSignalPanel","weight","DateSettingsPanel","OriginalUnmappedFormErrors","AssetsStepFormInternal","onDataChangeProp","useIsMounted","PermissionsContext","RecommendationContext","recommendationContext","ImageSPOTLIGHTContainerRef","ImagePRONGContainerRef","portraitContainerRef","stylingProps","getStyles","useResponsiveStyles","setImageExperiencePortalContainerState","ImageSPOTLIGHTExperiencePortalContainerState","setImageSPOTLIGHTExperiencePortalContainerState","ImagePRONGExperiencePortalContainerState","setImagePRONGExperiencePortalContainerState","setImageExperienceAddNewImageCallback","setProngImageExperienceAddNewImageCallback","setImageSpotlightExperienceAddNewImageCallback","_useState15","_useState16","addNewDescriptionCallback","_useState17","_useState18","addNewShortHeadlinesCallback","_useState19","_useState20","setTransparentLogoExperiencePortalContainerState","_useState21","previewImageId","cropImageObj","_useState22","previewTransparentLogoSharedState","setPreviewTransparentLogoSharedState","_useState23","_useState24","previewImageSPOTLIGHTSharedState","setPreviewImageSPOTLIGHTSharedState","_useState25","_useState26","previewImagePRONGSharedState","setPreviewImagePRONGSharedState","_useState27","_useState28","appLogo","setAppLogo","assetGroup","CallToAction","LongHeadlines","_ref5$videos","TransparentLogo","onReset","prevData","ImageList","ImageAssets","Headline0","Headline1","Headline2","LongHeadline0","Description0","Description1","onUpdateImageList","newImageList","_ref6$serverErrors","_ref6$systemErrors","legacyGlobalI18n","legacyI18nOfListingGroup","mergedTempI18n","mergeI18n","saveFailed","useFormService","matchStepState","STEP_STATES","SAVING","CANCELING","PerformanceMarkerContext","_useState29","previewLogoId","editingPlacementType","_useState30","previewImagesSharedState","setPreviewImagesSharedState","postAssetEventLog","finalUrlFromApp","AppId","AppUrl","_useCopilot","useCopilot","addNewLongHeadlinesCallback","currentCTA","finalUrls","FinalUrlForRecommendation","enableCopilotRecommendations","feature","AssetEventFeature","PMAX","assetScenario","AssetScenario","CREATE_WORK_FLOW","copilotBanner","suggestionPoller","imageExperienceComponents","ValidatedImageExperienceWrapper","imagesContaineRef","logosContaineRef","updateFinalUrlCallback","isLogoEnabled","updatePortalContainerState","UAPLPMaxIntegration","showCopilotOptionForImage","IsBackgroundSceneEnabled","imageAssetsOptional","transparentLogoComponent","isBoostPortraitEnabled","customMaxImageCount","imageListPropName","isStoreAppTransparentLogo","isCombinedMsanAndMmaAspectRatios","isCopilotRecommendations","validatedImageSPOTLIGHTExperienceWrapper","isStoreAppSpotLight","validatedImagePRONGExperienceWrapper","isStoreAppProng","previewProps","imageList","updateImageList","shortHeadline","longHeadline","businessName","AppTitle","callToAction","displayUrl","autoHeightCarousel","customSurfaceKeys","PerfMaxResponsiveAdPreviewUAPL","logoPreviewEnabled","windowsAppAdsPreivew","AppAdsPreview","union","hideHeaderButtons","isAppCampaignPreview","showStart","IconUrl","getGenericImageObjectAsync","iconImage","CropSettings","StepHeader","SystemErrors","AssetGroupValidationGroup","CopilotRepositoryProvider","locale","getLocale","recommendationType","enableLogoAndCTA","AssetsStepForm","withBannerService","AssetsStepShell","getAssetsPanels","AdAssetsFormShimmer","AdAssetsPreviewerShimmer","platformToAppStore","Windows","Android","iOS","ManualCpc","ManualCpi","getDefaultCampaignData","platformNamePrefix","cnMarketAccount","floor","random","getDefaultLanguagesViewModel","getDefaultLocationTargetsViewModel","AppStore","AppPlatform","AppStoreId","TrackingUrlTemplate","useAssetsStepRepository","scenarioContext","ScenarioContext","_useWizardService","versionForLog","getLogVersion","getLoggerWithoutPageInfo","_useAppStoreRepositor","useAppStoreRepository","searchAppById","videoRepository","createVideoRepository","folderRepository","createFolderRepository","imageRepository","createImageRepository","uploadVideoIfNeeded","videoPromises","video","uploadVideoMetadata","videoMetadata","newVideoFromMTObject","newVideo","_state$context$wizard","savedAssetGroup","savedCampaign","assetGroupId","saveCampaignsPromise","loadCampaignAsViewModel","assetGroupPromise","loadAssetGroupForWindowsStore","loadAssetGroupWithVideos","savedAssetGroupPromise","_ref2$storeFinalUrl","storeFinalUrl","IsOptional","BusinessName","UrlRulesOption","URL_RULES_OPTIONS","All","getDefaultAssetGroup","settings","appInfo","catch","errorData","trace","initialData","assetGroupToSave","campaignToSave","initialAssetGroup","initialCampaignViewModel","IsDomesticSimplifiedChineseEnabled","createDefaultCampaign","WIZARD_EVENTS","UPDATE_WIZARD_DATA","cacheManager","assetGroupChanges","originalAssetGroup","saveContext","saveAssetGroup","AssetsStepSettingsShell","getAssetsSettingsPanels","getLocationTargetingStyles","useTargetingStepStyles","TargetingStepShell","_ref$data","targetingInfo","_ref3$campaign","_ref3$assetGroup","LOCATIONS","LANGUAGE_TARGET","expandedSections","setExpandedSections","targetingExpand","errorMapper","apiErrorMapper","LocationTargetingSettingPanel","LanguageTargetPanel","PlacementTargetPanel","PANEL_KEYS_V2","PLACEMENT_TARGET","CampaignDetailsForm","campaignInfo","allSectionsKeys","initiallyExpandedSectionsKeys","isBidStrategyCPC","getBidStrategyOptions","MANUAL_CPC","MANUAL_CPA","CampaignNamePanel","CAMPAIGN_NAME","AppDetailsPanel","APP","BidStrategyPanel","bidStrategyComponentOptions","bidStrategyOptions","hideAdditionalDetails","biddingBannerOptions","isCampaignCreation","BID_STRATEGY","BidValuePanel","bidValueType","BID_VALUE","BudgetPanel","BUDGET","AdSchedulePanel","AD_SCHEDULE","UrlOptionsPanel","showDescription","urlParameterOptions","showFinalUrlSuffix","showCustomParameters","isTrackingUrlTemplateRequired","isWithError","URL_OPTIONS","ALL_SECTIONS_KEYS","INITIALLY_EXPANDED_SECTIONS_KEYS","CampaignDetailsStepShell","CampaignDetailsEditStepShell","useCampaignDetailsStepRepository","_useBudgetModel","useBudgetModel","budgetModelToViewModel","budgetViewModelToModel","isBudgetInputValid","_ref2$isBudgetAndBidd","isBudgetAndBiddingEnabled","commonCampaignData","ManualCPC","ManualCPI","budgetAmount","isBudgetValid","isMarketingMetricValid","campaignResults","BudgetStepShell","budgetInfo","wizardState","allExpandedSections","expandSections","useSummarySchemaData","timeDisplayType","setTimeDisplayType","loadedStoresData","savedProductFilter","savedListingGroup","getFlowFactors","preferencesService","_preferencesService","initialize","isTwelveHourDisplay","findByName","Data","loc","campaignName","assetGroupName","appName","appPlatform","autoGeneratedAssets","finalUrlExpansionOptOut","finalUrlExpansions","autoGeneratedTextOptOut","autoGeneratedImageOptOut","budget","bidValue","costPerSale","costPerSaleOptOut","locationTargeting","languages","audienceSignal","AudienceGroup","searchThemes","AssetGroupSearchThemes","shouldFetchFromMT","isLogo","headlines","descriptions","adScheduleCampaign","startDate","endDate","useSearcherTimeZone","AdScheduleUseSearcherTimeZone","urlOptions","FinalUrlSuffix","UrlCustomParameters","urlRules","path1","Path1","path2","Path2","mobileFinalUrls","MobileFinalUrls","AssetGroupUrlTargets","newCustomerAcquisition","newCustomerAcquisitionOptOut","buildSchemaData","SummaryStepShell","schemaData","appPlatformString","currentFlow","getCurrentFlow","onAssetsHeaderActionClick","NAVIGATE_TO","stepId","ASSETS","onTargetingHeaderActionClick","TARGETING","onCampaignSettingsHeaderActionClick","CAMPAIGN_DETAILS","onBudgetSettingsHeaderActionClick","separatorStyles","assets","header","actionButton","iconName","buildDefaultDataProperty","dynamicProps","hd1","hd2","isRendered","hd3","targeting","buildSchema","SummaryShimmer","currentSteps","GeneratedUI","customComponentTypes","summaryPageComponentTypes","CAMPAIGN_DETAILS_EDIT","ASSETS_GROUP_EDIT","SUMMARY","UnifiedAppCampaignStepsConfig","repository","assetGroupResults","updatedCampaign","newCampaign","isPublishing","updateAssetGroupAndCampaignStatus","UnifiedAppEditCampaignSettingsStepsConfig","UnifiedAppEditAssetGroupSettingsStepConfig","SaveAndPublish","isBlocking","FETCHING","LOADING","onNextClicked","SAVE_AND_EXIT","buttonText","getCurrentStepId","PrimaryButton","SaveAsDraft","_useWizardService2","DefaultButton","NextButton","_useWizardService3","SAVE_AND_NEXT","BackButton","_useWizardService4","onBackClicked","BACK","UnifiedAppCampaignFooter","nextButtonText","nextDisabled","backButtonText","cancelButtonText","hideBackButton","isFirstStep","getIsFirstStep","isLastStep","getIsLastStep","CancelButton","EditFooter","SaveAndExitButton","StepList","currentStepId","displayMode","useResponsiveSize","Constants","ResponsiveSizeBreakpoints","stepListConfig","getStepListConfig","getDefaultOnItemClickFn","step","toStep","steps","firstSubStep","s","isBehind","ResponsiveStepList","getOnItemClickFn","localStorageKey","LocalStorageKeys","UnifiedAppCampaignAdType","useLocalStorageStoreType","defaultStoreType","unifiedAppCampaignStoreType","appConfig","useCampaignStoreType","appSettings","APP_STORE_TO_STORE_TYPE","UnifiedAppCampaignWizard","withRecommendationContext","StoreTypes","AndroidPlayStore","wizardFlow","STORE_TYPE_TO_FLOW","initialStep","initialFlowFactors","initialWizardData","onDone","onExited","UnifiedAppEditCampaignSettingsWizard","UnifiedAppEditAssetGroupSettingsWizard","stopPropagation","AppAdPreviewControls","onSurfaceChange","onPlacementFilterChange","surfaceChoice","setSurfaceChoice","surfaceMap","Store","placementFilterByPreviewControlState","previewTemplateType","surfaceList","Pivot","onLinkClick","itemKey","PivotItem","headerText","getAdPreviewStyles","adPreviewContainer","merginTop","carouselLayoutClassName","carouselControlsMsn","carouselControlsOthers","customCarouselRoot","adExtensionContainer","placementContainerClassName","justifyContent","carouselLayoutHeader","geCarouselStyleForMsan","previewCarousel","bottomCarouselNavigation","geCarouselStyleForOthers","placementCustomizationPredicate","currentAdData","_React$useState","_React$useState2","adData","setAdData","isAdDataUpdated","newAdData","debouncedSetAdData","cancel","getImageIndexFromId","index","isPortrait","getPreviewImageIndex","idRequestedByImageExperience","firstImageIndex","imagesToDisplay","previewImageIndex","flat","onAddAspectRatio","isIncluded","isImageListUpdatedByPreview","onRemoveAspectRatio","onEdit","truncatedAdData","validAdData","shortHeadlineMaxLength","longHeadlineMaxLength","descriptionMaxLength","func","placementFilter","setPlacementFilter","getFirstElement","getLogo","imageArr","associationType","PreviewCarouselLayout","usePreviewCarouselLayout","groupType","AdPlacementsGroupType","appAdStart","appAd","placementFilterPredicate","customDefaultImage","previewPlaceholder","styleOverrides","surface","getCarouselControlsAndIndicatorsStyleBySurface","newPlacementFilter","logo","headerButtonProps","getIsRequiredByIndex","enableAutoPlay","CampaignLocation","CampaignRadius","CampaignNegativeLocation","CampaignLocationIntent","CampaignDayTimeCriterion","viewModelToBulkModelForCampaign","createOrUpdateCampaign","unexpectedBulkErrorToString","genericApiError","saveAssetGroupAndLinkedData","roasMtToUI","roas","localizeBudget","useLocalizeBudget","_usePreference","usePreference","preferenceNames","SelectedCurrency","currencyPreference","bidValueCpc","bidValueCpi","cpa","parseFloat","isInitialAdditionalDetailsChecked","currency","parseDecimal","getStylesFunction","getResponsiveStyles","WindowsAppStore","IosAppStore","AppStoreTypes","defaultPanels","panels"],"sourceRoot":""}