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EAAa/sG,EAAKa,UAAU,gDAAkD,GAAKksG,GAAe,MAAsB,EAAEI,KAAKjqG,KAAK,SAAU+pG,EAAgBA,EAAgBjtG,KAAmB,qBAAPA,KAAmBA,UAAKK,GAAoB2sG,CAAS,C","sources":["../../../../advisor/packages/advisor-chart/src/consts.js","../../../../advisor/packages/advisor-chart/src/metrics.js","../../../../advisor/packages/advisor-chart/src/chart-configuration.js","../../../../advisor/packages/advisor-chart/src/with-series-data.js","../../../../advisor/packages/advisor-chart/src/with-categories.js","../../../../advisor/packages/advisor-chart/src/advisor-chart.js","../../../../advisor/packages/advisor-chart/src/metric-chart.js","../../../../advisor/packages/advisor-chart/src/empty-chart.js","../../../../advisor/packages/auction-insight-common/src/auction-insight-columns.js","../../../../advisor/packages/auction-insight-common/src/consts.js","../../../../advisor/packages/auction-insight-common/src/download-service.js","../../../../advisor/packages/auction-insight-service/src/filter.js","../../../../advisor/packages/auction-insight-service/src/schema.js","../../../../advisor/packages/auction-insight-service/src/get-filtered-entities.js","../../../../advisor/packages/auction-insight-service/src/util.js","../../../../advisor/packages/auction-insight-service/src/auction-insight-service.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/consts.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/selector-data-source.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/keyword-data-source.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/adgroup-data-source.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/campaign-data-source.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/schema-processors.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/filter-config.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/filter-agent.js","../../../../advisor/packages/campaign-adgroup-selector-filter/src/empty-filter-view.js","../../../../advisor/packages/competition-auction-insight-preferences/src/consts.js","../../../../advisor/packages/competition-auction-insight-preferences/src/preference.js","../../../../advisor/packages/competition-core/src/consts.js","../../../../advisor/packages/competition-core/src/instrumentation-schema.js","../../../../advisor/packages/competition-core/src/general-insights-preferences.js","../../../../advisor/packages/competition-core/src/general-insights-segment-decorator.js","../../../../advisor/packages/competition-core/src/display-domain-data-source.js","../../../../advisor/packages/competition-core/src/schema-processors.js","../../../../advisor/packages/competition-core/src/filter-config.js","../../../../advisor/packages/competition-tile/index.js","../../../../advisor/packages/competition-tile/src/competition-tile.js","../../../../advisor/packages/competition-tile/src/domain-selector.js","../../../../advisor/packages/competition-tile/src/competition-tile-view.js","../../../../advisor/packages/recommendation-auto-apply-banner/src/recommendation-auto-apply-banner.js","../../../../advisor/packages/recommendation-auto-apply-banner/src/style/apply-banner-style.js","../../../../advisor/packages/recommendation-contextual-attribute/src/campaignModel.js","../../../../advisor/packages/recommendation-contextual-attribute/src/const.js","../../../../advisor/packages/recommendation-contextual-attribute/src/campaign.js","../../../../advisor/packages/recommendation-contextual-attribute/src/sharedBudgetModel.js","../../../../advisor/packages/recommendation-contextual-attribute/src/sharedBudget.js","../../../../advisor/packages/recommendation-contextual-attribute/src/adgroupModel.js","../../../../advisor/packages/recommendation-contextual-attribute/src/adgroup.js","../../../../advisor/packages/recommendation-contextual-attribute/src/keywordModel.js","../../../../advisor/packages/recommendation-contextual-attribute/src/keyword.js","../../../../advisor/packages/recommendation-contextual-attribute/src/audienceModel.js","../../../../advisor/packages/recommendation-contextual-attribute/src/audience.js","../../../../advisor/packages/recommendation-contextual-attribute/src/negativeKeywordListModel.js","../../../../advisor/packages/recommendation-contextual-attribute/src/negativeKeywordList.js","../../../../advisor/packages/recommendation-contextual-attribute/src/campaignVNext.js","../../../../advisor/packages/recommendation-contextual-attribute/src/sharedBudgetVNext.js","../../../../advisor/packages/recommendation-contextual-attribute/src/adgroupVNext.js","../../../../advisor/packages/recommendation-contextual-attribute/src/keywordVNext.js","../../../../advisor/packages/recommendation-contextual-attribute/src/audienceVNext.js","../../../../advisor/packages/recommendation-contextual-attribute/src/negativeKeywordListVNext.js","../../../../advisor/packages/recommendation-contextual-attribute/src/goal.js","../../../../advisor/packages/recommendation-contextual-attribute/src/accountVNext.js","../../../../advisor/packages/recommendation-contextual-attribute/src/currentSetting.js","../../../../advisor/packages/recommendation-contextual-attribute/src/suggestedSetting.js","../../../../advisor/packages/recommendation-contextual-attribute/src/generatedFrom.js","../../../../advisor/packages/recommendation-contextual-attribute/src/moreImages.js","../../../../advisor/packages/recommendation-contextual-attribute/src/moreConversionClarityButtons.js","../../../../advisor/packages/recommendation-contextual-attribute/src/importTaskItem.js","../../../../advisor/packages/recommendation-contextual-attribute/src/campaigns.js","../../../../advisor/packages/recommendation-contextual-attribute/src/contextual-attribute.js","../../../../advisor/packages/recommendation-contextual-attribute/src/util.js","../../../../advisor/packages/recommendation-core/src/consts.js","../../../../advisor/packages/recommendation-core/src/schema.js","../../../../advisor/packages/recommendation-core/src/formatter/basic-format-data.js","../../../../advisor/packages/recommendation-core/src/general-preferences.js","../../../../advisor/packages/recommendation-core/src/util.js","../../../../advisor/packages/recommendation-core/src/recommendation-configs.js","../../../../advisor/packages/recommendation-core/src/formatter/format-data.js","../../../../advisor/packages/recommendation-core/src/formatter/format-summary.js","../../../../advisor/packages/recommendation-core/src/formatter/format-visual-data.js","../../../../advisor/packages/recommendation-core/src/formatter/format-competition.js","../../../../advisor/packages/recommendation-core/src/formatter/format-error.js","../../../../advisor/packages/recommendation-core/src/details-view-model.js","../../../../advisor/packages/recommendation-core/src/hoc/with-ads-auto-apply.js","../../../../advisor/packages/recommendation-core/src/hoc/with-image-auto-retrieve.js","../../../../advisor/packages/recommendation-core/src/hoc/with-get-auto-apply-settings.js","../../../../advisor/packages/recommendation-core/src/hoc/with-filter-category.js","../../../../advisor/packages/recommendation-core/src/normalize-data.js","../../../../advisor/packages/recommendation-core/src/hoc/with-get-summary.js","../../../../advisor/packages/recommendation-core/src/hoc/with-get-count.js","../../../../advisor/packages/recommendation-core/src/hoc/with-track.js","../../../../advisor/packages/recommendation-core/src/hoc/with-coupon.js","../../../../advisor/packages/recommendation-core/src/service/recommendation-download-service.js","../../../../advisor/packages/recommendation-core/src/poll.js","../../../../advisor/packages/recommendation-core/src/cache.js","../../../../advisor/packages/recommendation-core/src/service/recommendation-service.js","../../../../advisor/packages/recommendation-core/src/summary-card-model.js","../../../../advisor/packages/recommendation-core/src/with-recommendations-scope.js","../../../../advisor/packages/recommendation-core/src/shared-component-function-state-store.js","../../../../advisor/packages/recommendation-dismiss-feedback/src/dismiss-feedback-const.js","../../../../advisor/packages/recommendation-dismiss-feedback/src/dismiss-feedback-form.js","../../../../advisor/packages/recommendation-dismiss-feedback/src/single-choice-reason-const.js","../../../../advisor/packages/recommendation-dismiss-feedback/src/customized-input/percent-input.js","../../../../advisor/packages/recommendation-dismiss-feedback/src/customized-input/number-input.js","../../../../advisor/packages/recommendation-dismiss-feedback/src/single-choice-dismiss-feedback-form.js","../../../../advisor/packages/recommendation-dismiss-feedback/src/dismiss-feedback-popover.js","../../../../advisor/packages/recommendation-estimation-tile/src/estimation-tile.js","../../../../advisor/packages/recommendation-estimation-tile/src/summary-estimation.js","../../../../advisor/packages/recommendation-feedback-modal/src/comments-field.js","../../../../advisor/packages/recommendation-feedback-modal/src/reason-const.js","../../../../advisor/packages/recommendation-feedback-modal/src/feedback-form.js","../../../../advisor/packages/recommendation-feedback-modal/src/dismiss-all-feedback-form.js","../../../../advisor/packages/recommendation-feedback-modal/src/apply-feedback-form.js","../../../../advisor/packages/recommendation-feedback-modal/src/utils.js","../../../../advisor/packages/recommendation-feedback-modal/src/feedback-modal.js","../../../../advisor/packages/recommendation-feedback-modal/src/show-feedback-model.js","../../../../advisor/packages/recommendation-alert-popup/style/index.js","../../../../advisor/packages/recommendation-alert-popup/src/alert-popup.js","../../../../advisor/packages/recommendation-inline-budget-view/src/view/const.js","../../../../advisor/packages/recommendation-inline-budget-view/src/viewmodel/table.js","../../../../advisor/packages/recommendation-inline-budget-view/src/view/table.js","../../../../advisor/packages/recommendation-inline-budget-view/src/view/chart-config.js","../../../../advisor/packages/recommendation-inline-budget-view/src/view/chart.js","../../../../advisor/packages/recommendation-inline-budget-view/src/view/index.js","../../../../advisor/packages/recommendation-navigate-modal/src/recommendation-navigate-modal.js","../../../../advisor/packages/recommendation-notification/src/warn-notification-banner.js","../../../../advisor/packages/recommendation-notification/src/utils.js","../../../../advisor/packages/recommendation-notification/src/in-product-update-notification-banner.js","../../../../advisor/packages/recommendation-notification/src/formatter/format-notification.js","../../../../advisor/packages/recommendation-notification/src/notification-core.js","../../../../advisor/packages/recommendation-os-overall/src/popup-summary.js","../../../../advisor/packages/recommendation-os-overall/src/style/popup-summary-style.js","../../../../advisor/packages/recommendation-os-overall/src/overall-score.js","../../../../advisor/packages/recommendation-os-overall/src/style/overall-score-style.js","../../../../advisor/packages/recommendation-os-tag/src/optimization-score-tag.js","../../../../advisor/packages/recommendation-preferences/src/consts.js","../../../../advisor/packages/recommendation-preferences/src/preference.js","../../../../advisor/packages/recommendation-summary-view/src/summary-context-menu.js","../../../../advisor/packages/recommendation-summary-view/src/summary-header.js","../../../../advisor/packages/recommendation-summary-view/src/summary-footer.js","../../../../advisor/packages/recommendation-summary-view/src/sample-panel.js","../../../../advisor/packages/recommendation-summary-view/src/optimization-score.js","../../../../advisor/packages/recommendation-summary-view/src/summary-card.js","../../../../advisor/packages/recommendation-summary-view/src/summary-card-list.js","../../../../advisor/packages/recommendation-summary-view/src/empty-view.js","../../../../advisor/packages/recommendation-summary-view/src/summary-view.js","../../../../advisor/packages/recommendation-summary-view/src/inline-recommendation-card-view.js","../../../../advisor/packages/recommendation-visuals/src/progress-bar.js","../../../../advisor/packages/recommendation-visuals/src/action-table.js","../../../../advisor/packages/recommendation-visuals/src/map-location.js","../../../../advisor/packages/recommendation-visuals/src/toolbar-button.js","../../../../advisor/packages/recommendation-visuals/src/download-toolbar-button.js","../../../../advisor/packages/recommendation-visuals/src/ads-preview.js","../../../../advisor/packages/advisor-chart/src/tooltip-template-vnext.pug","../../../../advisor/packages/auction-insight-common/src/column-with-insight.pug","../../../../advisor/packages/competition-tile/src/competition-tile-template.pug","../../../../advisor/packages/competition-tile/src/domain-selector-header-template.pug","../../../../advisor/packages/competition-tile/src/domain-selector-template.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/accountVNext.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/adgroup.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/adgroupVNext.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/audience.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/audienceVNext.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/campaign.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/campaignVNext.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/campaigns.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/contextual-attribute.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/currentSetting.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/generatedFrom.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/goal.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/importTaskItem.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/keyword.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/keywordVNext.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/moreConversionClarityButtons.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/moreImages.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/negativeKeywordList.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/negativeKeywordListVNext.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/sharedBudget.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/sharedBudgetVNext.pug","../../../../advisor/packages/recommendation-contextual-attribute/src/suggestedSetting.pug","../../../../advisor/packages/recommendation-dismiss-feedback/src/fixed-container-for-budget-landscape.pug","../../../../advisor/packages/recommendation-dismiss-feedback/src/fixed-container.pug","../../../../advisor/packages/recommendation-feedback-modal/src/apply-feedback-template.pug","../../../../advisor/packages/recommendation-feedback-modal/src/reject-feedback-template.pug","../../../../advisor/packages/recommendation-inline-budget-view/src/template/chart.pug","../../../../advisor/packages/recommendation-inline-budget-view/src/template/index.pug","../../../../advisor/packages/recommendation-inline-budget-view/src/template/table.pug","../../../../advisor/packages/recommendation-inline-budget-view/src/template/tableForInlineEditor.pug","../../../../advisor/packages/recommendation-inline-budget-view/src/template/tooltip.pug","../../../../advisor/packages/recommendation-inline-budget-view/src/template/uet-link.pug"],"sourcesContent":["export const METRICS = {\r\n // Recommendations and Auction Insight\r\n ImpressionShare: 'ImpressionShare',\r\n OverlapRate: 'OverlapRate',\r\n AveragePosition: 'AveragePosition',\r\n AboveRate: 'AboveRate',\r\n TopOfPageRate: 'TopOfPageRate',\r\n AbsoluteTopOfPageRate: 'AbsoluteTopOfPageRate',\r\n OutrankingShare: 'OutrankingShare',\r\n // Recommendations\r\n ConversionRate: 'ConversionRate',\r\n SearchTerms: 'SearchTerms',\r\n};\r\n\r\nexport const CHART_TYPES = {\r\n None: null,\r\n RecommendationCard: 'RecommendationCard',\r\n SmallTile: 'SmallTile',\r\n LargeTile: 'LargeTile',\r\n Primary: 'Primary',\r\n Secondary: 'Secondary',\r\n};\r\n\r\nexport const DEVICE_TYPE = {\r\n None: null,\r\n PC: 'PC',\r\n SmartPhone: 'SmartPhone',\r\n Tablet: 'Tablet',\r\n};\r\n","import _ from 'underscore';\r\nimport {\r\n formatDecimal,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { METRICS } from './consts';\r\n\r\nconst NUMBER_TYPES = {\r\n Percentage: 'Percentage',\r\n Integer: 'Integer',\r\n Short: 'Short',\r\n};\r\n\r\nconst METRICS_TYPES = {\r\n [METRICS.ImpressionShare]: NUMBER_TYPES.Percentage,\r\n [METRICS.OverlapRate]: NUMBER_TYPES.Percentage,\r\n [METRICS.AveragePosition]: NUMBER_TYPES.Integer,\r\n [METRICS.AboveRate]: NUMBER_TYPES.Percentage,\r\n [METRICS.TopOfPageRate]: NUMBER_TYPES.Percentage,\r\n [METRICS.AbsoluteTopOfPageRate]: NUMBER_TYPES.Percentage,\r\n [METRICS.OutrankingShare]: NUMBER_TYPES.Percentage,\r\n [METRICS.ConversionRate]: NUMBER_TYPES.Percentage,\r\n [METRICS.SearchTerms]: NUMBER_TYPES.Short,\r\n};\r\n\r\nconst AuctionInsightMetrics = [\r\n METRICS.ImpressionShare,\r\n METRICS.OverlapRate,\r\n METRICS.AveragePosition,\r\n METRICS.AboveRate,\r\n METRICS.TopOfPageRate,\r\n METRICS.AbsoluteTopOfPageRate,\r\n METRICS.OutrankingShare,\r\n];\r\n\r\nconst AuctionInsightMetricsForShopping = [\r\n METRICS.ImpressionShare,\r\n METRICS.OverlapRate,\r\n METRICS.AbsoluteTopOfPageRate,\r\n METRICS.OutrankingShare,\r\n];\r\n\r\nexport function isMetricPercentage(metric) {\r\n return METRICS_TYPES[metric] === NUMBER_TYPES.Percentage;\r\n}\r\n\r\nexport function formatMetric(i18n, metric, value, label = false) {\r\n const format = METRICS_TYPES[metric];\r\n const options = label ?\r\n { digits: 0 } :\r\n {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n digits: 2,\r\n };\r\n\r\n switch (format) {\r\n case NUMBER_TYPES.Percentage:\r\n return i18n.formatPercent(value, options);\r\n case NUMBER_TYPES.Short:\r\n return formatDecimal(value, i18n);\r\n case NUMBER_TYPES.Integer:\r\n default:\r\n return i18n.formatDecimalToFixed(value, options);\r\n }\r\n}\r\n\r\nexport function localizeMetric(i18n, metric) {\r\n return i18n.getString(`AuctionInsights_ColumnName_${metric}`);\r\n}\r\n\r\nexport function getLocalizedMetrics(\r\n i18n, isShoppingCampaignType = false,\r\n isAvgPositionDeprecationPhase1Enabled = false,\r\n IsAvgPositionDeprecationPhase2Enabled = false\r\n) {\r\n let metrics = isShoppingCampaignType ?\r\n AuctionInsightMetricsForShopping : AuctionInsightMetrics;\r\n\r\n if (!isAvgPositionDeprecationPhase1Enabled) {\r\n metrics = _.without(metrics, METRICS.AbsoluteTopOfPageRate);\r\n }\r\n\r\n if (IsAvgPositionDeprecationPhase2Enabled) {\r\n metrics = _.without(metrics, METRICS.AveragePosition);\r\n }\r\n\r\n return _.map(metrics, (metric, id) => ({\r\n id,\r\n value: localizeMetric(i18n, metric),\r\n metric,\r\n }));\r\n}\r\n\r\nexport function localizeTitle(i18n, metric) {\r\n return i18n.getString(`Chart_Title_${metric}`);\r\n}\r\n","/* eslint-disable no-param-reassign */\r\nimport _ from 'underscore';\r\nimport { localizeSegmentationValue, segmentationType } from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport tooltipTemplateVNext from './tooltip-template-vnext.pug';\r\n\r\nimport {\r\n CHART_TYPES,\r\n} from './consts';\r\nimport {\r\n formatMetric,\r\n isMetricPercentage,\r\n localizeMetric,\r\n localizeTitle,\r\n} from './metrics';\r\n\r\nconst CHART_TYPE = {\r\n COLUMN: 'column',\r\n LINE: 'line',\r\n};\r\n\r\nconst VNextColors = [\r\n '#0078d4',\r\n '#022f22',\r\n '#e3008c',\r\n '#4b003f',\r\n '#917edb',\r\n // above 5 colors are revised against default colors for\r\n // competition card which has at most 5 lines,\r\n // work with designer to get below 5 updated if necessary\r\n '#01188F',\r\n '#006D21',\r\n '#0C8484',\r\n '#D8D8D8',\r\n '#666666',\r\n];\r\n\r\nconst VNextRecommendationCardColors = [\r\n // From Figma:\r\n // https://www.figma.com/file/UiSbekGiA9XqEL6WM2v5allf/Microsoft-Advertising-HIG-0.01.01?node-id=11345%3A12550\r\n '#0078d4',\r\n '#022F22',\r\n '#E3008C',\r\n '#00188F',\r\n '#E86E58',\r\n '#001D3F',\r\n '#917EDB',\r\n '#502006',\r\n '#00A5B0',\r\n '#4B003F',\r\n '#D9D9D9',\r\n];\r\n\r\nfunction getChartType(primarySegmentType = null) {\r\n return _.contains([\r\n segmentationType.DayOfWeek,\r\n segmentationType.HourOfDay,\r\n segmentationType.Device,\r\n null,\r\n ], primarySegmentType) ?\r\n CHART_TYPE.COLUMN :\r\n CHART_TYPE.LINE;\r\n}\r\n\r\nfunction showXLabels(primarySegmentType = null) {\r\n return _.contains([\r\n segmentationType.DayOfWeek,\r\n segmentationType.HourOfDay,\r\n segmentationType.Device,\r\n ], primarySegmentType);\r\n}\r\n\r\nfunction setSeriesVNextMarker(chartOptions, subType) {\r\n const vNextMarkerSymbols = [\r\n 'circle',\r\n 'diamond',\r\n 'triangle-down',\r\n 'triangle',\r\n 'square',\r\n 'circle',\r\n 'diamond',\r\n 'triangle-down',\r\n 'triangle',\r\n 'square',\r\n ];\r\n _.each(chartOptions.series, (sery, index) => {\r\n if (index < vNextMarkerSymbols.length) {\r\n sery.marker = {\r\n symbol: vNextMarkerSymbols[index],\r\n enabled: subType !== 'Line_Weekly_Chart',\r\n lineWidth: 2,\r\n radius: 6,\r\n };\r\n }\r\n sery.lineWidth = 2;\r\n });\r\n}\r\n\r\nfunction getYAxis(i18n, metric) {\r\n return {\r\n title: {\r\n text: null,\r\n style: {\r\n color: '#333333',\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 'normal',\r\n fontSize: '12px',\r\n },\r\n },\r\n labels: {\r\n formatter() {\r\n return `${formatMetric(i18n, metric, this.value, true)}`;\r\n },\r\n },\r\n min: 0,\r\n ceiling: isMetricPercentage(metric) ?\r\n 1 : null,\r\n minTickInterval: isMetricPercentage(metric) ?\r\n 0.01 : 1,\r\n tickPixelInterval: 30,\r\n gridLineDashStyle: 'dash',\r\n visible: true,\r\n showFirstLabel: true,\r\n showLastLabel: true,\r\n };\r\n}\r\n\r\nfunction defaultChartOptions({\r\n i18n,\r\n metric,\r\n primarySegmentType,\r\n series,\r\n localizeCategory,\r\n}) {\r\n return {\r\n series,\r\n tooltip: {\r\n useHTML: true,\r\n formatter({ chart }) {\r\n const options = {\r\n color: this.color,\r\n blockChart: chart.options.chart.type === CHART_TYPE.COLUMN,\r\n segment: this.key === 0 ? null : localizeCategory(this.key),\r\n name: this.series.options.fullName || this.series.name,\r\n metric: localizeMetric(i18n, this.series.options.metric || metric),\r\n metricValue: formatMetric(i18n, this.series.options.metric || metric, this.y),\r\n index: this.series.index,\r\n };\r\n return tooltipTemplateVNext(options);\r\n },\r\n },\r\n chart: {\r\n type: getChartType(primarySegmentType),\r\n spacingTop: 10,\r\n spacingLeft: 0,\r\n spacingRight: 0,\r\n spacingBottom: 10,\r\n marginLeft: 50,\r\n marginRight: 10,\r\n },\r\n colors: [\r\n '#006464',\r\n '#BE5A00',\r\n '#B40091',\r\n '#600090',\r\n '#0078D7',\r\n '#01188F',\r\n '#006D21',\r\n '#0C8484',\r\n '#D8D8D8',\r\n '#666666',\r\n ],\r\n credits: {\r\n enabled: false,\r\n },\r\n legend: {\r\n align: 'right',\r\n verticalAlign: 'top',\r\n layout: 'horizontal',\r\n width: 350,\r\n itemStyle: {\r\n fontWeight: 'normal',\r\n textOverflow: 'ellipsis',\r\n overflow: 'hidden',\r\n },\r\n squareSymbol: false,\r\n symbolRadius: 0,\r\n symbolHeight: 5,\r\n symbolWidth: 19,\r\n },\r\n yAxis: getYAxis(i18n, metric),\r\n xAxis: {\r\n visible: true,\r\n lineWidth: 1,\r\n lineColor: '#DEE0E3',\r\n labels: {\r\n enabled: showXLabels(primarySegmentType),\r\n formatter() {\r\n return `${localizeCategory(this.value)}`;\r\n },\r\n style: {\r\n fontFamily: 'Segoe UI',\r\n },\r\n },\r\n tickLength: 0,\r\n type: 'category',\r\n plotBands: [],\r\n },\r\n title: {\r\n text: null,\r\n },\r\n plotOptions: {\r\n series: {\r\n maxPointWidth: 75,\r\n connectNulls: true,\r\n zoneAxis: 'x',\r\n },\r\n line: {\r\n pointPlacement: 'on',\r\n },\r\n },\r\n };\r\n}\r\n\r\nconst primaryChartOptions = config => merge(config, {\r\n chart: {\r\n height: 300,\r\n },\r\n});\r\n\r\nconst weeklyDataChartOptions = (i18n, config) => {\r\n const data = merge(config, {\r\n plotOptions: {\r\n line: {\r\n lineWidth: 1,\r\n },\r\n series: {\r\n marker: {\r\n enabled: false,\r\n },\r\n },\r\n },\r\n });\r\n\r\n const { xAxis } = data;\r\n delete data.xAxis;\r\n\r\n data.xAxis = [\r\n merge(xAxis, {\r\n showFirstLabel: false,\r\n tickLength: 5,\r\n tickInterval: 24,\r\n gridLineWidth: 1,\r\n labels: {\r\n enabled: true,\r\n formatter() {\r\n return i18n.formatDate(new Date(this.value), {\r\n skeleton: 'h',\r\n timeZone: null,\r\n });\r\n },\r\n style: {\r\n fontFamily: 'Segoe UI',\r\n },\r\n },\r\n }),\r\n {\r\n linkedTo: 0,\r\n opposite: true,\r\n type: 'category',\r\n showFirstLabel: true,\r\n tickLength: 0,\r\n tickInterval: 12,\r\n labels: {\r\n enabled: true,\r\n formatter() {\r\n // get category from first Axis\r\n const value = this.chart.xAxis[0].names[this.value];\r\n return i18n.formatDate(new Date(value), {\r\n skeleton: 'EEEEE',\r\n timeZone: null,\r\n });\r\n },\r\n },\r\n tickPositions: _.map(_.range(7), val => (val * 24) + 12),\r\n },\r\n ];\r\n // if (_.has(data, 'series')) {\r\n // data.series = data.series.map((sery) => {\r\n // sery = merge(sery, {\r\n // marker: {\r\n // enabled: false,\r\n // },\r\n // });\r\n // return sery;\r\n // });\r\n // }\r\n return data;\r\n};\r\n\r\nconst lineColumnChartOptions = (i18n, config, metric) => {\r\n // Update ConversionRate series\r\n let data = config;\r\n const conversionSeries = _.findWhere(data.series, { yAxis: 1 });\r\n\r\n if (conversionSeries) {\r\n data = merge(config, {\r\n chart: {\r\n // need right margin for second yAxis\r\n marginRight: 70,\r\n },\r\n plotOptions: {\r\n column: {\r\n color: '#BBD5E6',\r\n maxPointWidth: 35,\r\n },\r\n },\r\n });\r\n\r\n const { yAxis } = data;\r\n delete data.yAxis;\r\n\r\n // Need to align yaxis of primary and secondary metrics.\r\n if (isMetricPercentage(metric)) {\r\n data.yAxis = [\r\n merge(yAxis, {\r\n tickInterval: 0.2,\r\n tickPixelInterval: 36,\r\n }),\r\n merge(getYAxis(i18n, 'ConversionRate'), {\r\n opposite: true,\r\n title: {\r\n text: localizeMetric(i18n, 'ConversionRate'),\r\n },\r\n tickInterval: 0.2,\r\n tickPixelInterval: 36,\r\n }),\r\n ];\r\n } else {\r\n data.yAxis = [\r\n yAxis,\r\n merge(getYAxis(i18n, 'ConversionRate'), {\r\n opposite: true,\r\n title: {\r\n text: localizeMetric(i18n, 'ConversionRate'),\r\n },\r\n }),\r\n ];\r\n }\r\n\r\n conversionSeries.type = 'column';\r\n conversionSeries.name = i18n.getString('Conversions_Data_Template', { name: conversionSeries.name });\r\n }\r\n\r\n if (config.chart.type === 'column') {\r\n data = merge(data, {\r\n data: {\r\n plotOptions: {\r\n series: {\r\n pointWidth: '16px',\r\n },\r\n },\r\n },\r\n });\r\n }\r\n\r\n return data;\r\n};\r\n\r\nconst columnBottomChartOptions = (i18n, config, metric) => {\r\n const options = merge(config, {\r\n chart: {\r\n height: 250,\r\n marginTop: 40,\r\n },\r\n legend: {\r\n x: 30,\r\n y: 10,\r\n layout: 'horizontal',\r\n align: 'left',\r\n verticalAlign: 'bottom',\r\n itemStyle: {\r\n color: '#333333',\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 'normal',\r\n fontSize: '10px',\r\n width: '200px',\r\n },\r\n width: 520,\r\n },\r\n title: {\r\n text: localizeTitle(i18n, metric),\r\n style: {\r\n color: '#333333',\r\n fontFamily: 'Segoe UI',\r\n fontWeight: 'normal',\r\n fontSize: '12px',\r\n },\r\n },\r\n });\r\n return options;\r\n};\r\n\r\nconst recommendationCardChartOptions = (i18n, config, metric, subType) => {\r\n // configuration for all recommendation cards\r\n let data = merge(config, {\r\n chart: {\r\n height: 250,\r\n // Need extra space for yAxis title\r\n marginLeft: 70,\r\n },\r\n yAxis: {\r\n title: {\r\n text: localizeMetric(i18n, metric),\r\n },\r\n },\r\n });\r\n\r\n switch (subType) {\r\n case 'Line_Weekly_Chart':\r\n data = weeklyDataChartOptions(i18n, data);\r\n break;\r\n case 'Line_Column_Chart':\r\n data = lineColumnChartOptions(i18n, data, metric);\r\n break;\r\n case 'Search_Terms_Chart':\r\n data = columnBottomChartOptions(i18n, data, metric);\r\n break;\r\n default:\r\n }\r\n\r\n return data;\r\n};\r\n\r\nconst secondaryChartOptions = (i18n, config, secondarySegment) => {\r\n const option = merge(config, {\r\n chart: {\r\n height: 142.5,\r\n },\r\n legend: {\r\n enabled: false,\r\n width: 0,\r\n },\r\n title: {\r\n text: localizeSegmentationValue({\r\n i18n,\r\n type: segmentationType.DeviceType,\r\n value: secondarySegment,\r\n }),\r\n margin: 0,\r\n floating: false,\r\n align: 'right',\r\n style: {\r\n fontSize: '12px',\r\n },\r\n },\r\n });\r\n return option;\r\n};\r\n\r\nconst tileChartOptionsVNext = (config, isForRecommendationCard = false) => {\r\n const options = merge(config, {\r\n chart: {\r\n height: 180,\r\n marginRight: 10,\r\n marginBottom: 10,\r\n },\r\n colors: isForRecommendationCard ? VNextRecommendationCardColors : VNextColors,\r\n legend: {\r\n enabled: false,\r\n },\r\n xAxis: {\r\n labels: {\r\n enabled: false,\r\n style: {\r\n fontFamily: 'Segoe UI',\r\n },\r\n },\r\n },\r\n tickLength: 0,\r\n tooltip: {\r\n backgroundColor: null,\r\n borderWidth: 0,\r\n shadow: false,\r\n outside: false,\r\n positioner(labelWidth, labelHeight, point) {\r\n // a custom positioner to keep tooltips inside the plot area\r\n\r\n // if current point x + label width is bigger than plot width\r\n // which means part of label will be outside plot\r\n // so we put tooltip to the left of point\r\n // otherwise keep tooltip to the right\r\n // if corrected x is negative, make it zero\r\n // similar logic to handle y\r\n\r\n // we have predefined label width and height\r\n // in case label width and height is too small\r\n\r\n const predefinedLabelWidth = 190;\r\n labelWidth = Math.max(labelWidth, predefinedLabelWidth);\r\n let x = (point.plotX + labelWidth) > this.chart.plotWidth ?\r\n (point.plotX - labelWidth) :\r\n point.plotX;\r\n if (x < 0) {\r\n x = 0;\r\n }\r\n\r\n const predefinedLabelHeight = 110;\r\n labelHeight = Math.max(labelHeight, predefinedLabelHeight);\r\n let y = (point.plotY + labelHeight) > this.chart.plotHeight ?\r\n (point.plotY - labelHeight) :\r\n point.plotY;\r\n if (y < 0) {\r\n y = 0;\r\n }\r\n\r\n return { x, y };\r\n },\r\n },\r\n });\r\n return options;\r\n};\r\n\r\nexport function getChartOptions({\r\n i18n,\r\n type,\r\n subType,\r\n metric,\r\n primarySegmentType,\r\n secondarySegment,\r\n series,\r\n localizeCategory,\r\n}) {\r\n let chartOptions = defaultChartOptions({\r\n i18n,\r\n metric,\r\n primarySegmentType,\r\n series,\r\n localizeCategory,\r\n });\r\n\r\n // customize default chart options based on type\r\n switch (type) {\r\n case CHART_TYPES.LargeTile:\r\n case CHART_TYPES.SmallTile:\r\n tileChartOptionsVNext(chartOptions);\r\n setSeriesVNextMarker(chartOptions);\r\n break;\r\n case CHART_TYPES.Secondary:\r\n chartOptions = secondaryChartOptions(\r\n i18n,\r\n chartOptions,\r\n secondarySegment\r\n );\r\n tileChartOptionsVNext(chartOptions, true);\r\n setSeriesVNextMarker(chartOptions, subType);\r\n chartOptions.chart.height = 130;\r\n break;\r\n case CHART_TYPES.RecommendationCard:\r\n chartOptions = recommendationCardChartOptions(\r\n i18n,\r\n chartOptions,\r\n metric,\r\n subType\r\n );\r\n tileChartOptionsVNext(chartOptions, true);\r\n setSeriesVNextMarker(chartOptions, subType);\r\n break;\r\n default:\r\n chartOptions = primaryChartOptions(chartOptions);\r\n tileChartOptionsVNext(chartOptions, true);\r\n setSeriesVNextMarker(chartOptions, subType);\r\n chartOptions.chart.height = 277;\r\n }\r\n\r\n return chartOptions;\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport _ from 'underscore';\r\nimport { include } from 'underscore.string';\r\n\r\nfunction formatName(i18n, name) {\r\n if (name === 'You') {\r\n return { name: i18n.getString('AuctionInsights_You') };\r\n }\r\n\r\n if (include(name, ';')) {\r\n const domains = _.flatten(name.split(';'));\r\n const count = _.chain(domains)\r\n .compact()\r\n .size()\r\n .value();\r\n if (count > 3) {\r\n return {\r\n name: i18n.getString('Multiple_Competitors_Template', {\r\n count,\r\n competitor1: domains[0],\r\n competitor2: domains[1],\r\n competitor3: domains[2],\r\n }),\r\n fullName: i18n.getString('Multiple_Competitors_Template_Full', {\r\n count,\r\n competitors: domains.join(', '),\r\n }),\r\n };\r\n }\r\n }\r\n return { name };\r\n}\r\n\r\nfunction generateZones(data) {\r\n // change null data to dotted lines\r\n const zones = _.reduce(data, (memo, num, index) => {\r\n if (_.isNull(num)) {\r\n const prev = _.findWhere(memo, { value: index });\r\n if (prev) {\r\n // If previous found, extend zone duration\r\n prev.value = index + 1;\r\n } else {\r\n // If no previous value found, create new zone around index\r\n memo.push({ value: index - 1 });\r\n memo.push({ value: index + 1, dashStyle: 'dot' });\r\n }\r\n }\r\n return memo;\r\n }, []);\r\n\r\n return {\r\n zones,\r\n };\r\n}\r\n\r\nfunction mapSeries(data, categories = []) {\r\n return {\r\n data: _.map(data, (value, i) => ([categories[i], value])),\r\n };\r\n}\r\n\r\nfunction patchMissingData(items, categories, secondarySegment = null) {\r\n if (_.isEmpty(categories)) return items;\r\n\r\n // patch missing data with null\r\n return _.map(items, (item) => {\r\n const data = _.map(\r\n categories,\r\n primarySegment =>\r\n _.result(_.find(\r\n item.segmentData,\r\n segment =>\r\n segment.primarySegment === primarySegment &&\r\n (secondarySegment ? segment.secondarySegment === secondarySegment : true)\r\n ), 'value', null)\r\n );\r\n return _.extend(item, {\r\n data,\r\n });\r\n });\r\n}\r\n\r\nfunction withSecondMetric(secondaryMetric, metric) {\r\n return metric === secondaryMetric ?\r\n {\r\n yAxis: 1,\r\n zIndex: 0,\r\n metric,\r\n } :\r\n {\r\n yAxis: 0,\r\n zIndex: 1,\r\n metric,\r\n };\r\n}\r\n\r\nfunction getSeriesWithSecondMetric(\r\n i18n,\r\n items,\r\n secondarySegment,\r\n categories,\r\n secondaryMetric\r\n) {\r\n const patchedData = patchMissingData(items, categories, secondarySegment);\r\n\r\n return _.map(patchedData, ({\r\n name, data, metric, visible,\r\n }) => _.extend(\r\n mapSeries(data, categories),\r\n formatName(i18n, name),\r\n generateZones(data),\r\n withSecondMetric(secondaryMetric, metric),\r\n !_.isUndefined(visible) && { visible }\r\n ));\r\n}\r\n\r\nexport const WithSeriesData = (WrappedComponent) => {\r\n const HoC = props => (\r\n \r\n );\r\n\r\n HoC.displayName = `WithSeriesData(${getDisplayName(WrappedComponent)})`;\r\n HoC.propTypes = {\r\n secondaryMetric: PropTypes.string,\r\n secondarySegment: PropTypes.string,\r\n categories: PropTypes.arrayOf(PropTypes.string),\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n items: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string,\r\n data: PropTypes.arrayOf(PropTypes.number),\r\n metric: PropTypes.string,\r\n segmentData: PropTypes.arrayOf(PropTypes.shape({\r\n primarySegment: PropTypes.string,\r\n secondarySegment: PropTypes.string,\r\n value: PropTypes.number,\r\n })),\r\n })).isRequired,\r\n };\r\n HoC.defaultProps = {\r\n secondarySegment: null,\r\n categories: [],\r\n secondaryMetric: null,\r\n };\r\n\r\n hoistNonReactStatics(HoC, WrappedComponent);\r\n\r\n return HoC;\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport {\r\n localizeSegmentationValue,\r\n segmentationType\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\n\r\nimport {\r\n DEVICE_TYPE,\r\n} from './consts';\r\n\r\n// value may be \"2020-07-09\" or \"2018-07-19T00:00:00\"\r\nfunction localizeCategory(i18n, value, type = segmentationType.DeviceType) {\r\n if (type === 'Hour') {\r\n return i18n.formatDate(\r\n i18n.parseDate(value, { raw: \"yyyy-MM-dd'T'HH:mm:ss\" }) || i18n.parseDate(value, { raw: 'yyyy-MM-dd' }),\r\n { skeleton: 'yMEdh' }\r\n );\r\n } else if (type === 'Day') {\r\n return i18n.formatDate(\r\n i18n.parseDate(value, { raw: \"yyyy-MM-dd'T'HH:mm:ss\" }) || i18n.parseDate(value, { raw: 'yyyy-MM-dd' }),\r\n { skeleton: 'yMEd' }\r\n );\r\n }\r\n\r\n return localizeSegmentationValue({\r\n i18n,\r\n type,\r\n value,\r\n });\r\n}\r\n\r\nfunction getAllCategories(primarySegmentType, items) {\r\n // return harded coded list for HourOfDay and DayOfWeek\r\n if (_.isNull(primarySegmentType)) {\r\n return [];\r\n } else if (primarySegmentType === segmentationType.HourOfDay) {\r\n return _.map(_.range(24), hour => `${hour}`);\r\n } else if (primarySegmentType === segmentationType.DayOfWeek) {\r\n return ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\r\n } else if (primarySegmentType === segmentationType.Device) {\r\n return _.compact(_.values(DEVICE_TYPE));\r\n }\r\n\r\n // Generate list based on union of all categories.\r\n // sortBy is the same sort used by auctionInsights, so categories are in order\r\n return _.chain(items)\r\n .pluck('segmentData')\r\n .flatten()\r\n .pluck('primarySegment')\r\n .union()\r\n .sortBy()\r\n .value();\r\n}\r\n\r\nexport const WithCategories = (WrappedComponent) => {\r\n const HoC = props => (\r\n \r\n localizeCategory(props.i18n, item, props.primarySegmentType))\r\n }\r\n />\r\n );\r\n\r\n HoC.displayName = `WithCategories(${getDisplayName(WrappedComponent)})`;\r\n HoC.propTypes = {\r\n primarySegmentType: PropTypes.string,\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n items: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string,\r\n data: PropTypes.arrayOf(PropTypes.number),\r\n segmentData: PropTypes.arrayOf(PropTypes.shape({\r\n primarySegment: PropTypes.string,\r\n secondarySegment: PropTypes.string,\r\n value: PropTypes.number,\r\n })),\r\n })).isRequired,\r\n };\r\n HoC.defaultProps = {\r\n primarySegmentType: null,\r\n };\r\n\r\n hoistNonReactStatics(HoC, WrappedComponent);\r\n\r\n return HoC;\r\n};\r\n","/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { HighchartReactWrapper } from '@bingads-webui-react/highchart-react-wrapper';\r\nimport { keyCode } from '@bingads-webui/keycode';\r\n\r\nimport {\r\n CHART_TYPES,\r\n} from './consts';\r\nimport { getChartOptions } from './chart-configuration';\r\nimport { WithSeriesData } from './with-series-data';\r\nimport { WithCategories } from './with-categories';\r\n\r\nconst CHART_TYPE = {\r\n COLUMN: 'column',\r\n LINE: 'line',\r\n};\r\n\r\nclass AdvisorChartView extends React.Component {\r\n static defaultProps = {\r\n type: null,\r\n primarySegmentType: null,\r\n secondarySegment: null,\r\n title: null,\r\n subType: null,\r\n categories: [],\r\n localizeCategory: _.noop,\r\n enableLegend: true,\r\n onChartRenderedCallback: _.noop,\r\n };\r\n\r\n static propTypes = {\r\n selectedMetric: PropTypes.string.isRequired,\r\n primarySegmentType: PropTypes.string,\r\n secondarySegment: PropTypes.string,\r\n title: PropTypes.string,\r\n type: PropTypes.oneOf(_.values(CHART_TYPES)),\r\n subType: PropTypes.string,\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n localizeCategory: PropTypes.func,\r\n categories: PropTypes.arrayOf(PropTypes.string),\r\n series: PropTypes.arrayOf(PropTypes.object).isRequired,\r\n enableLegend: PropTypes.bool,\r\n onChartRenderedCallback: PropTypes.func,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n labelsVisibilityUpdated: false,\r\n };\r\n }\r\n\r\n onLabelClick = (index) => {\r\n // flip visible property\r\n // only when it was false, it becomes true, all others (true/null/undefined) now becomes false\r\n this.props.series[index].visible = (this.props.series[index].visible === false);\r\n\r\n // manually trigger a re-render\r\n this.setState({\r\n labelsVisibilityUpdated: !this.state.labelsVisibilityUpdated,\r\n });\r\n };\r\n\r\n onLabelKeyDown = (event, index) => {\r\n if (event.keyCode === keyCode.Enter || event.keyCode === keyCode.Space) {\r\n this.onLabelClick(index);\r\n }\r\n };\r\n\r\n buildVNextLegendLabels(chartOptions) {\r\n const labels = [];\r\n\r\n _.each(chartOptions.series, (sery, index) => {\r\n const label = (\r\n
  • \r\n this.onLabelClick(index)}\r\n onKeyDown={event => this.onLabelKeyDown(event, index)}\r\n tabIndex={0}\r\n role=\"button\"\r\n >\r\n {sery.name}\r\n \r\n
  • \r\n );\r\n labels.push(label);\r\n });\r\n\r\n return (\r\n
    \r\n
      \r\n {labels}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderRow(chartOptions, element) {\r\n return (\r\n \r\n {element}\r\n \r\n );\r\n }\r\n\r\n render() {\r\n const chartOptions = getChartOptions({\r\n i18n: this.props.i18n,\r\n type: this.props.type,\r\n subType: this.props.subType,\r\n metric: this.props.selectedMetric,\r\n primarySegmentType: this.props.primarySegmentType,\r\n secondarySegment: this.props.secondarySegment,\r\n series: this.props.series,\r\n localizeCategory: this.props.localizeCategory,\r\n enableLegend: this.props.enableLegend,\r\n });\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {chartOptions.chart.type === CHART_TYPE.COLUMN &&\r\n this.props.title &&\r\n this.renderRow(\r\n chartOptions, (\r\n \r\n {this.props.title}\r\n \r\n )\r\n )\r\n }\r\n {chartOptions.chart.type !== CHART_TYPE.COLUMN &&\r\n this.props.subType !== 'Line_Weekly_Chart' &&\r\n this.renderRow(\r\n chartOptions, (\r\n
    \r\n
    \r\n \r\n {this.props.localizeCategory(_.first(this.props.categories))}\r\n \r\n
    \r\n
    \r\n \r\n {this.props.localizeCategory(_.last(this.props.categories))}\r\n \r\n
    \r\n
    \r\n )\r\n )\r\n }\r\n {\r\n this.props.enableLegend && this.buildVNextLegendLabels(chartOptions)\r\n }\r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport const AdvisorChart =\r\n WithCategories(WithSeriesData(AdvisorChartView));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { segmentationType } from '@bingads-webui-campaign/segmentation-utilities';\r\n\r\nimport { AdvisorChart } from './advisor-chart';\r\nimport {\r\n CHART_TYPES,\r\n DEVICE_TYPE,\r\n METRICS,\r\n} from './consts';\r\n\r\nconst maxNumber = 5;\r\n\r\nfunction getDeviceTypeList(raw, primaryDeviceType) {\r\n // get segmentData from first item\r\n const segmentData = raw[0].PerformanceMetrics.SegmentedData;\r\n\r\n if (_.size(segmentData) > 0 && _.size(segmentData[0].Key) > 1) {\r\n const keys = _.pluck(segmentData[0].Key, 'StringValue');\r\n\r\n if (_.intersection(keys, DEVICE_TYPE).length > 0) {\r\n // Move the primaryDeviceType to start of the list\r\n // Use compact to remove null from list\r\n return _.compact(_.union(\r\n [primaryDeviceType],\r\n _.values(DEVICE_TYPE)\r\n ));\r\n }\r\n }\r\n\r\n return [null];\r\n}\r\n\r\nfunction isYou(item) {\r\n return item.DisplayDomain === 'You';\r\n}\r\n\r\nfunction findYou(items) {\r\n return _.find(items, isYou);\r\n}\r\n\r\nfunction filterItems(raw, domainFilter) {\r\n const you = findYou(raw);\r\n let topItems = raw;\r\n\r\n if (!_.isEmpty(domainFilter)) {\r\n topItems = _.filter(raw, ({ DisplayDomain }) => _.contains(domainFilter, DisplayDomain));\r\n }\r\n\r\n // Ensure 'You' is always first item in chart\r\n topItems = _.first(topItems, maxNumber);\r\n\r\n if (you) {\r\n topItems = _.union([you], topItems);\r\n topItems = _.first(topItems, maxNumber);\r\n }\r\n\r\n return topItems;\r\n}\r\n\r\nfunction extractSegmentDataForMetric(items, metric) {\r\n let primarySegmentType = null;\r\n let secondarySegmentType = null;\r\n const data = _.map(items, (item) => {\r\n const keys = _.size(item.Key);\r\n let primarySegment = null;\r\n let secondarySegment = null;\r\n\r\n if (keys === 2) {\r\n const primary = _.find(\r\n item.Key,\r\n ({ SegmentationType }) => SegmentationType !== segmentationType.Device\r\n );\r\n primarySegment = primary.StringValue;\r\n primarySegmentType = primary.SegmentationType;\r\n\r\n const secondary = _.find(\r\n item.Key,\r\n ({ SegmentationType }) => SegmentationType === segmentationType.Device\r\n );\r\n\r\n secondarySegment = secondary.StringValue;\r\n secondarySegmentType = secondary.SegmentationType;\r\n } else {\r\n primarySegment = item.Key[0].StringValue;\r\n primarySegmentType = item.Key[0].SegmentationType;\r\n }\r\n\r\n return {\r\n primarySegment,\r\n secondarySegment,\r\n value: item.Data[metric],\r\n };\r\n });\r\n\r\n return {\r\n primarySegmentType,\r\n secondarySegmentType,\r\n data,\r\n };\r\n}\r\n\r\nfunction extractDataForMetric(topItems, metric) {\r\n let primarySegmentType = null;\r\n let secondarySegmentType = null;\r\n const shouldHideYou = _.contains([\r\n METRICS.AboveRate,\r\n METRICS.OverlapRate,\r\n METRICS.OutrankingShare,\r\n ], metric);\r\n\r\n const items = _.map(topItems, (item) => {\r\n const data = {\r\n name: item.DisplayDomain,\r\n data: [item.PerformanceMetrics[metric]],\r\n };\r\n\r\n if (shouldHideYou && isYou(item)) {\r\n data.visible = false;\r\n }\r\n\r\n const segmentData = extractSegmentDataForMetric(item.PerformanceMetrics.SegmentedData, metric);\r\n ({ primarySegmentType, secondarySegmentType } = segmentData);\r\n\r\n return _.extend(data, {\r\n segmentData: segmentData.data,\r\n });\r\n });\r\n\r\n return {\r\n items,\r\n primarySegmentType,\r\n secondarySegmentType,\r\n };\r\n}\r\n\r\nexport class AdvisorChartWithMetrics extends React.PureComponent {\r\n static defaultProps = {\r\n chartType: null,\r\n domains: null,\r\n primaryDeviceType: null,\r\n onChartRenderedCallback: _.noop,\r\n };\r\n\r\n static propTypes = {\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n selectedMetric: PropTypes.string.isRequired,\r\n primaryDeviceType: PropTypes.string,\r\n domains: PropTypes.arrayOf(PropTypes.string),\r\n chartType: PropTypes.oneOf(_.values(CHART_TYPES)),\r\n items: PropTypes.arrayOf(PropTypes.shape({\r\n PerformanceMetrics: PropTypes.object.isRequired,\r\n DisplayDomain: PropTypes.string.isRequired,\r\n })).isRequired,\r\n onChartRenderedCallback: PropTypes.func,\r\n };\r\n\r\n render() {\r\n if (_.isEmpty(this.props.items)) {\r\n return (null);\r\n }\r\n const deviceTypeList = getDeviceTypeList(this.props.items, this.props.primaryDeviceType);\r\n const topData = filterItems(this.props.items, this.props.domains);\r\n const {\r\n items,\r\n primarySegmentType,\r\n } = extractDataForMetric(topData, this.props.selectedMetric);\r\n const showDeviceTypeDropdown = _.size(deviceTypeList) > 1;\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {showDeviceTypeDropdown &&\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","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const EmptyChart = ({ i18n }) => (\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n);\r\n\r\nEmptyChart.displayName = 'EmptyChart';\r\nEmptyChart.propTypes = {\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","import { result } from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport columnWithInsightTemplate from './column-with-insight.pug';\r\n\r\nfunction formatPercent(value, i18n) {\r\n return i18n.formatPercent(value, {\r\n maximumFractionDigits: 2,\r\n minimumFractionDigits: 2,\r\n });\r\n}\r\n\r\nexport class DisplayDomainColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, title = '' }) {\r\n const finalTitle = title || i18n.getString('AuctionInsights_ColumnName_DisplayDomain');\r\n\r\n super({\r\n name: 'DisplayDomain',\r\n property: 'LocalizedDisplayDomain',\r\n title: finalTitle,\r\n sortable: 'LocalizedDisplayDomain',\r\n type: 'string',\r\n helpId: 'pop_BA_Auction_DisplayURL',\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: finalTitle }),\r\n });\r\n }\r\n}\r\n\r\nexport class StoreDisplayNameColumn extends DisplayDomainColumn {\r\n constructor({ i18n }) {\r\n super({\r\n title: i18n.getString('AuctionInsights_ColumnName_StoreDisplayName'),\r\n i18n,\r\n });\r\n }\r\n}\r\n\r\nexport class ImpressionShareColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('AuctionInsights_ColumnName_ImpressionShare');\r\n\r\n super({\r\n name: 'ImpressionShare',\r\n property: 'PerformanceMetrics/ImpressionShare',\r\n title: 'AuctionInsights_ColumnName_ImpressionShare',\r\n sortable: 'ImpressionShare',\r\n type: 'number',\r\n helpId: 'pop_BA_Auction_ImpShare',\r\n format: 'percentage',\r\n i18n,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n template({ value }) {\r\n return formatPercent(value, this.i18n);\r\n }\r\n}\r\n\r\nexport class ImpressionShareWithInsightColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('AuctionInsights_ColumnName_ImpressionShare');\r\n\r\n super({\r\n name: 'ImpressionShare',\r\n property: 'PerformanceMetrics/ImpressionShare',\r\n title: 'AuctionInsights_ColumnName_ImpressionShare',\r\n sortable: 'ImpressionShare',\r\n type: 'number',\r\n helpId: 'pop_BA_Auction_ImpShare',\r\n format: 'percentage',\r\n i18n,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n pickProperty(item) {\r\n const { PerformanceMetrics } = item;\r\n const metricValue = formatPercent(result(PerformanceMetrics, 'ImpressionShare'), this.i18n);\r\n\r\n return {\r\n metricValue,\r\n hasInsight: !!item.HasInsight,\r\n itemIndex: item.ItemIndex,\r\n };\r\n }\r\n\r\n get template() { return columnWithInsightTemplate; }\r\n}\r\n\r\nexport class AveragePositionColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('AuctionInsights_ColumnName_AveragePosition');\r\n\r\n super({\r\n name: 'AveragePosition',\r\n property: 'PerformanceMetrics/AveragePosition',\r\n title: 'AuctionInsights_ColumnName_AveragePosition',\r\n sortable: 'AveragePosition',\r\n type: 'number',\r\n helpId: 'pop_BA_Auction_AvgPos',\r\n format: 'decimal',\r\n i18n,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n }\r\n}\r\n\r\nexport class OverlapRateColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('AuctionInsights_ColumnName_OverlapRate');\r\n\r\n super({\r\n name: 'OverlapRate',\r\n property: 'PerformanceMetrics/OverlapRate',\r\n title: 'AuctionInsights_ColumnName_OverlapRate',\r\n sortable: 'OverlapRate',\r\n type: 'number',\r\n helpId: 'pop_BA_Auction_Overlap',\r\n format: 'percentage',\r\n i18n,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n template({ value }) {\r\n return value;\r\n }\r\n\r\n get property() {\r\n const { i18n } = this;\r\n return {\r\n get({ DisplayDomain, PerformanceMetrics: { OverlapRate } }) {\r\n if (DisplayDomain === 'You') {\r\n return '-';\r\n }\r\n return formatPercent(OverlapRate, i18n);\r\n },\r\n key: 'PerformanceMetrics/OverlapRate',\r\n };\r\n }\r\n}\r\n\r\nexport class AboveRateColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('AuctionInsights_ColumnName_AboveRate');\r\n\r\n super({\r\n name: 'AboveRate',\r\n property: 'PerformanceMetrics/AboveRate',\r\n title: 'AuctionInsights_ColumnName_AboveRate',\r\n sortable: 'AboveRate',\r\n type: 'number',\r\n helpId: 'pop_BA_Auction_PositionAbove',\r\n format: 'percentage',\r\n i18n,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n template({ value }) {\r\n return value;\r\n }\r\n\r\n get property() {\r\n const { i18n } = this;\r\n return {\r\n get({ DisplayDomain, PerformanceMetrics: { AboveRate } }) {\r\n if (DisplayDomain === 'You') {\r\n return '-';\r\n }\r\n return formatPercent(AboveRate, i18n);\r\n },\r\n key: 'PerformanceMetrics/AboveRate',\r\n };\r\n }\r\n}\r\nexport class TopOfPageRateColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('AuctionInsights_ColumnName_TopOfPageRate');\r\n\r\n super({\r\n name: 'TopOfPageRate',\r\n property: 'PerformanceMetrics/TopOfPageRate',\r\n title: 'AuctionInsights_ColumnName_TopOfPageRate',\r\n sortable: 'TopOfPageRate',\r\n type: 'number',\r\n helpId: 'pop_BA_Auction_TopOfPage',\r\n format: 'percentage',\r\n i18n,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n template({ value }) {\r\n return formatPercent(value, this.i18n);\r\n }\r\n}\r\nexport class AbsoluteTopOfPageRateColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('AuctionInsights_ColumnName_AbsoluteTopOfPageRate');\r\n\r\n super({\r\n name: 'AbsoluteTopOfPageRate',\r\n property: 'PerformanceMetrics/AbsoluteTopOfPageRate',\r\n title: 'AuctionInsights_ColumnName_AbsoluteTopOfPageRate',\r\n sortable: 'AbsoluteTopOfPageRate',\r\n type: 'number',\r\n helpId: 'pop_BA_AuctionInsightsAbs',\r\n format: 'percentage',\r\n i18n,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n template({ value }) {\r\n return formatPercent(value, this.i18n);\r\n }\r\n}\r\nexport class OutrankingShareColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n const title = i18n.getString('AuctionInsights_ColumnName_OutrankingShare');\r\n\r\n super({\r\n name: 'OutrankingShare',\r\n property: 'PerformanceMetrics/OutrankingShare',\r\n title: 'AuctionInsights_ColumnName_OutrankingShare',\r\n sortable: 'OutrankingShare',\r\n type: 'number',\r\n helpId: 'pop_BA_Auction_Outranking',\r\n format: 'percentage',\r\n i18n,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n template({ value }) {\r\n return value;\r\n }\r\n\r\n get property() {\r\n const { i18n } = this;\r\n return {\r\n get({ DisplayDomain, PerformanceMetrics: { OutrankingShare } }) {\r\n if (DisplayDomain === 'You') {\r\n return '-';\r\n }\r\n return formatPercent(OutrankingShare, i18n);\r\n },\r\n key: 'PerformanceMetrics/OutrankingShare',\r\n };\r\n }\r\n}\r\n","export const AUCTION_INSIGHT_COLUMN_METRICS = {\r\n ImpressionShare: 'ImpressionShare',\r\n TopOfPageRate: 'TopOfPageRate',\r\n AbsoluteTopOfPageRate: 'AbsoluteTopOfPageRate',\r\n AboveRate: 'AboveRate',\r\n OverlapRate: 'OverlapRate',\r\n OutrankingShare: 'OutrankingShare',\r\n AveragePosition: 'AveragePosition',\r\n SegmentedData: 'SegmentedData',\r\n};\r\n\r\nexport const DEVICE_SEGMENT_TYPES = {\r\n Computer: 'PC',\r\n SmartPhone: 'SmartPhone',\r\n Tablet: 'Tablet',\r\n};\r\n\r\nexport const MAX_NUMBER_OF_ACCOUNT = 300;\r\nexport const MAX_ACCOUNTS_LIMIT_MT = 3000;\r\nexport const TOO_MUCH_DATA_TO_DOWNLOAD_ERROR = 'TooMuchDataToDownload';\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\nimport { downloadify } from '@bingads-webui/download-service';\r\nimport { segmentationType } from '@bingads-webui-campaign/segmentation-utilities';\r\n\r\nimport { AUCTION_INSIGHT_COLUMN_METRICS, DEVICE_SEGMENT_TYPES } from './consts';\r\n\r\nconst formatDate = date => kendo.toString(date, 'yyyyMMdd');\r\nconst formatHeaderDate = date => kendo.toString(date, 'MMMM dd, yyyy');\r\nconst formatCellDate = date => kendo.toString(date, 'MM/dd/yyyy');\r\n\r\n// Always use English in header\r\nconst headerMap = {\r\n DayOfWeek: 'Day of the week',\r\n HourOfDay: 'Hour of day',\r\n DisplayDomain: 'Display URL domain',\r\n DisplayDomainShopping: 'Store display name',\r\n [AUCTION_INSIGHT_COLUMN_METRICS.ImpressionShare]: 'Impression share',\r\n [AUCTION_INSIGHT_COLUMN_METRICS.AveragePosition]: 'Avg. position',\r\n [AUCTION_INSIGHT_COLUMN_METRICS.OverlapRate]: 'Overlap rate',\r\n [AUCTION_INSIGHT_COLUMN_METRICS.AboveRate]: 'Position above rate',\r\n [AUCTION_INSIGHT_COLUMN_METRICS.TopOfPageRate]: 'Top of page rate',\r\n [AUCTION_INSIGHT_COLUMN_METRICS.AbsoluteTopOfPageRate]: 'Abs. top of page rate',\r\n [AUCTION_INSIGHT_COLUMN_METRICS.OutrankingShare]: 'Outranking share',\r\n};\r\n\r\n/**\r\n * Convert data to csv format\r\n * @param {Array} data - Should be a list of lists, where each sub-list is a row.\r\n * @returns {string} - a string with comma delimiters\r\n */\r\nfunction data2Csv(data) {\r\n let csvString = '';\r\n _.each(data, (row) => {\r\n const rowString = row.join(',');\r\n csvString += `${rowString}\\r\\n`;\r\n });\r\n\r\n return csvString;\r\n}\r\n\r\nfunction formatPercent(value) {\r\n const valueInPercent = `${parseFloat(value * 100).toFixed(2)}%`;\r\n return valueInPercent;\r\n}\r\n\r\nexport function handleCustomSegmentation(finalParams, queryParams) {\r\n const finalParameters = finalParams;\r\n if (!_.isEmpty(queryParams)) {\r\n _.each(_.keys(queryParams), (key) => {\r\n if (key === 'SegmentationTypes' && queryParams[key] !== undefined) {\r\n if (key in finalParameters.query) {\r\n // the case that segmentation already exists and we update it.\r\n /* eslint-disable-next-line no-param-reassign */\r\n finalParameters.query[key] = queryParams[key];\r\n } else {\r\n // the case that segmentation starts off as none and we are adding it\r\n finalParameters.query = _.extend(queryParams, finalParams.query);\r\n }\r\n } else { // the case where we start off with segmentation but we update it to none\r\n finalParameters.query = _.omit(finalParams.query, key);\r\n }\r\n });\r\n }\r\n return finalParameters;\r\n}\r\n\r\nexport function formatData(data) {\r\n /* eslint-disable no-param-reassign */\r\n const formattedData = JSON.parse(JSON.stringify(data)); // deep clone\r\n _.each(formattedData, (competitor) => {\r\n _.each(_.keys(competitor.PerformanceMetrics), (metric) => {\r\n switch (metric) {\r\n case AUCTION_INSIGHT_COLUMN_METRICS.ImpressionShare:\r\n case AUCTION_INSIGHT_COLUMN_METRICS.TopOfPageRate:\r\n case AUCTION_INSIGHT_COLUMN_METRICS.AbsoluteTopOfPageRate: {\r\n competitor.PerformanceMetrics[metric] =\r\n `${formatPercent(competitor.PerformanceMetrics[metric])}`;\r\n break;\r\n }\r\n case AUCTION_INSIGHT_COLUMN_METRICS.AboveRate:\r\n case AUCTION_INSIGHT_COLUMN_METRICS.OverlapRate:\r\n case AUCTION_INSIGHT_COLUMN_METRICS.OutrankingShare: {\r\n competitor.PerformanceMetrics[metric] =\r\n `${formatPercent(competitor.PerformanceMetrics[metric])}`;\r\n if (competitor.DisplayDomain === 'You') {\r\n competitor.PerformanceMetrics[metric] = '--';\r\n }\r\n break;\r\n }\r\n case AUCTION_INSIGHT_COLUMN_METRICS.SegmentedData: {\r\n _.each(competitor.PerformanceMetrics[metric], (segment) => {\r\n if (segment.Key[0].SegmentationType === segmentationType.Device\r\n && segment.Key[0].StringValue === DEVICE_SEGMENT_TYPES.Computer) {\r\n segment.Key[0].StringValue = 'Computer';\r\n } else if (segment.Key[0].SegmentationType === segmentationType.Device\r\n && segment.Key[0].StringValue === DEVICE_SEGMENT_TYPES.SmartPhone) {\r\n segment.Key[0].StringValue = 'Smartphone';\r\n } else if (segment.Key[0].SegmentationType === segmentationType.Week) {\r\n segment.Key[0].StringValue = `${formatCellDate(segment.Key[0].StringValue)}`;\r\n }\r\n _.each(_.keys(segment.Data), (SegMetric) => {\r\n if (SegMetric === AUCTION_INSIGHT_COLUMN_METRICS.ImpressionShare ||\r\n SegMetric === AUCTION_INSIGHT_COLUMN_METRICS.AboveRate ||\r\n SegMetric === AUCTION_INSIGHT_COLUMN_METRICS.OverlapRate ||\r\n SegMetric === AUCTION_INSIGHT_COLUMN_METRICS.OutrankingShare ||\r\n SegMetric === AUCTION_INSIGHT_COLUMN_METRICS.TopOfPageRate ||\r\n SegMetric === AUCTION_INSIGHT_COLUMN_METRICS.AbsoluteTopOfPageRate) {\r\n segment.Data[SegMetric] =\r\n `${formatPercent(segment.Data[SegMetric])}`;\r\n }\r\n });\r\n });\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n });\r\n });\r\n return formattedData;\r\n}\r\n\r\n/**\r\n * Localized column header.\r\n * For example. DisplayDomain -> Display URL domain\r\n * @param {Array} header - header name\r\n * @param {string} campaignType - search campaign or shopping campaign\r\n * @returns {string} localized header string\r\n */\r\nfunction localizeHeader(header, campaignType = null) {\r\n if (header === 'DisplayDomain') {\r\n return campaignType === 'Shopping' ? headerMap.DisplayDomainShopping : headerMap.DisplayDomain;\r\n }\r\n\r\n return _.result(headerMap, header, header);\r\n}\r\n\r\nfunction localizeHeaders(columns, campaignType, segmentType) {\r\n const headers = [];\r\n\r\n if (segmentType != null) {\r\n headers.push(localizeHeader(segmentType));\r\n }\r\n\r\n _.each(columns, (column) => {\r\n headers.push(localizeHeader(column, campaignType));\r\n });\r\n\r\n return Promise.resolve(headers);\r\n}\r\n\r\nexport function processDataIntoArrays(data, segmentType, selectedColumns, i18n, campaignType) {\r\n const csvArray = []; // the array to hold data that we will turn into a CSV\r\n\r\n return localizeHeaders(selectedColumns, campaignType, segmentType)\r\n .then((localizedColumns) => {\r\n csvArray.push(localizedColumns); // header row\r\n }).then(() => {\r\n const formattedData = formatData(data.items);\r\n\r\n /* Parse data from gridView query and populate arrays. */\r\n if (segmentType != null) {\r\n _.each(formattedData, (competitor) => {\r\n const displayDomain = competitor.DisplayDomain;\r\n _.each(competitor.PerformanceMetrics.SegmentedData, (category) => {\r\n const row = [];\r\n row.push(category.Key[0].StringValue); // segment\r\n row.push(displayDomain); // display domain\r\n row.push(_.values(_.pick(category.Data, selectedColumns))); // metrics\r\n csvArray.push(_.flatten(row));\r\n });\r\n });\r\n } else {\r\n _.each(formattedData, (competitor) => {\r\n const row = [];\r\n row.push(competitor.DisplayDomain); // display domain\r\n row.push(_.values(_.pick(competitor.PerformanceMetrics, selectedColumns))); // metrics\r\n csvArray.push(_.flatten(row));\r\n });\r\n }\r\n\r\n return csvArray;\r\n });\r\n}\r\n\r\n/**\r\n * Do clientside auction insight data download\r\n * @param {string} format - download file format. e.g csv\r\n * @param {string} segmentType - segmentation type. e.g Device, HourOfDay\r\n * @param {Object} gridView - gridView object\r\n * @param {Object} scope - Current Account, Campaign, Adgroup information\r\n * @param {Object} state - state that contains currently selected time rage\r\n * @param {Object} i18n - localization object\r\n * @param {Function} showAlertHandler - show alert information\r\n * @returns {void}\r\n */\r\nexport function clientSideDownload(\r\n format,\r\n segmentType,\r\n gridView,\r\n scope,\r\n state,\r\n i18n,\r\n showAlertHandler\r\n) {\r\n showAlertHandler({\r\n message: i18n.getString('GridDownloadStatusMessage'),\r\n level: 'Info',\r\n dismissible: true,\r\n });\r\n\r\n /* get columns from preferences */\r\n if (format && gridView && scope && state) {\r\n const selectedColumns = _.pluck(gridView.grid.gridView.get('columns'), 'name');\r\n\r\n gridView.grid.dataSource.query({ SegmentationTypes: segmentType }, {\r\n queryTransform: (finalParams, queryParams) =>\r\n handleCustomSegmentation(finalParams, queryParams),\r\n }).then(data => processDataIntoArrays(\r\n data,\r\n segmentType,\r\n selectedColumns,\r\n i18n,\r\n gridView.options.campaignType\r\n )).then((csvArray) => {\r\n /* file download */\r\n state.getPromise('$daterange').then((dateRange) => {\r\n const StartDate = formatDate(dateRange.start);\r\n const EndDate = formatDate(dateRange.end);\r\n const filename = `AuctionInsights_Report_${scope.accountId}_${StartDate}_${EndDate}.${format}`;\r\n const header = `AuctionInsights_Report\\n\"${formatHeaderDate(dateRange.start)} - ${formatHeaderDate(dateRange.end)}\"\\n`;\r\n\r\n /* Convert array to CSV string */\r\n const csvString = header + data2Csv(csvArray);\r\n\r\n downloadify(filename, csvString, { type: `text/${format}` });\r\n });\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nexport function extractFilter(filter) {\r\n const queriesBeforeExtract = filter.$and || [filter];\r\n return _.map(queriesBeforeExtract, (item) => {\r\n const columnName = _.first(_.keys(item));\r\n const operator = _.first(_.keys(_.result(item, columnName)));\r\n const value = _.first(_.values(_.result(item, columnName)));\r\n return {\r\n columnName,\r\n operator,\r\n value,\r\n };\r\n });\r\n}\r\n\r\nfunction convertToLowerCase(val) {\r\n if (_.isArray(val)) {\r\n return _.map(val, convertToLowerCase);\r\n } else if (typeof val === 'string') {\r\n return val.toLowerCase();\r\n }\r\n return val;\r\n}\r\n\r\nfunction handleQuery(query, rowData) {\r\n const column = query.columnName;\r\n const { operator } = query;\r\n const columnData = _.has(rowData, column) ?\r\n _.result(rowData, column) : _.result(_.result(rowData, 'PerformanceMetrics'), column);\r\n\r\n if (!_.isString(columnData) && !_.isNumber(columnData)) {\r\n throw Error('Cant get the column data by the column name');\r\n }\r\n\r\n const val = query.value;\r\n const valSl = convertToLowerCase(val);\r\n const columnDataSl = convertToLowerCase(columnData);\r\n\r\n switch (operator) {\r\n case '$eq':\r\n return columnDataSl === valSl;\r\n case '$neq':\r\n return columnDataSl !== valSl;\r\n case '$gt':\r\n return columnData > val;\r\n case '$gte':\r\n return columnData >= val;\r\n case '$lt':\r\n return columnData < val;\r\n case '$lte':\r\n return columnData <= val;\r\n case '$contains':\r\n return columnDataSl.indexOf(valSl) >= 0;\r\n case '$doesnotcontain':\r\n return columnDataSl.indexOf(valSl) < 0;\r\n case '$startswith':\r\n return columnDataSl.indexOf(valSl) === 0;\r\n case '$in':\r\n return valSl.indexOf(columnDataSl) >= 0;\r\n case '$endswith': {\r\n return columnDataSl.substr(columnDataSl.indexOf(valSl), columnDataSl.length) === val;\r\n }\r\n default:\r\n throw Error('The operator is invalid');\r\n }\r\n}\r\n\r\nexport function filterData(queries, data) {\r\n // Always include 'You' when filtering.\r\n return _.filter(data, (item) => {\r\n const domainVal = _.result(item, 'DisplayDomain');\r\n const isYou = domainVal && domainVal === 'You';\r\n return isYou || _.reduce(\r\n queries,\r\n (memo, query) => memo && handleQuery(query, item),\r\n true\r\n );\r\n });\r\n}\r\n","export const entitySchema = {\r\n type: 'object',\r\n name: 'AuctionInsight',\r\n key: 'DisplayDomain',\r\n properties: {\r\n DisplayDomain: {\r\n type: 'string',\r\n filterable: true,\r\n nullable: false,\r\n },\r\n ImpressionShare: {\r\n type: 'number',\r\n isPercentValue: true,\r\n filterable: true,\r\n nullable: false,\r\n required: true,\r\n },\r\n AveragePosition: {\r\n type: 'number',\r\n filterable: true,\r\n nullable: false,\r\n required: true,\r\n },\r\n OverlapRate: {\r\n type: 'number',\r\n isPercentValue: true,\r\n filterable: true,\r\n nullable: false,\r\n required: true,\r\n },\r\n AboveRate: {\r\n type: 'number',\r\n isPercentValue: true,\r\n filterable: true,\r\n nullable: false,\r\n required: true,\r\n },\r\n TopOfPageRate: {\r\n type: 'number',\r\n isPercentValue: true,\r\n filterable: true,\r\n nullable: false,\r\n required: true,\r\n },\r\n AbsoluteTopOfPageRate: {\r\n type: 'number',\r\n isPercentValue: true,\r\n filterable: true,\r\n nullable: false,\r\n required: true,\r\n },\r\n OutrankingShare: {\r\n type: 'number',\r\n isPercentValue: true,\r\n filterable: true,\r\n nullable: false,\r\n required: true,\r\n },\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\nimport { parseSync } from '@bingads-webui/safe-json';\r\n\r\nfunction processCampaignFilterValues(filterValues) {\r\n return _.map(filterValues, filterValue => parseInt(parseSync(filterValue).Id, 10));\r\n}\r\n\r\nfunction processAdGroupFilterValues(filterValues, scope) {\r\n // only return AdGroup ids which are in current Campaign scope\r\n const processedValues = _.compact(_.map(filterValues, (filterValue) => {\r\n const parsedFilter = parseSync(filterValue);\r\n const filterCampaignId = parseInt(parsedFilter.CampaignId, 10);\r\n\r\n // if we are are in campaign scope, remove any out-of-scope ad group filters\r\n // for account scope, keep all ad group filters\r\n const scopeCampaignId = parseInt(scope.campaignId, 10);\r\n if (_.isFinite(scopeCampaignId) && filterCampaignId !== scopeCampaignId) {\r\n return false;\r\n }\r\n\r\n return parseInt(parsedFilter.Id, 10);\r\n }));\r\n\r\n return processedValues.length > 0 ? processedValues : null;\r\n}\r\n\r\nfunction processKeywordFilterValues(filterValues) {\r\n return _.map(filterValues, filterValue => parseInt(parseSync(filterValue).Id, 10));\r\n}\r\n\r\nexport function getFilteredEntities(where, scope) {\r\n // default value\r\n let levelAtInRequest = scope.levelAt;\r\n let entityIdsInRequest = _.map(scope.entityIds, i => parseInt(i, 10));\r\n let filteredAccount;\r\n\r\n // if there is filter of account, campaign, ad group, re-set levelAt, entityIds\r\n if (where) {\r\n let filteredCampaign;\r\n let filteredAdGroup;\r\n let filteredKeyword;\r\n\r\n if (where.$and) {\r\n for (let i = where.$and.length - 1; i >= 0; i -= 1) {\r\n const expression = where.$and[i];\r\n\r\n if (expression.AdGroup) {\r\n if (scope.levelAt === levelAtConstant.CAMPAIGN) {\r\n filteredAdGroup =\r\n _.union(\r\n filteredAdGroup,\r\n processAdGroupFilterValues(expression.AdGroup.$contains, scope)\r\n );\r\n }\r\n where.$and.splice(i, 1);\r\n }\r\n if (expression.Campaign) {\r\n if (scope.levelAt === levelAtConstant.ACCOUNT) {\r\n filteredCampaign =\r\n _.union(filteredCampaign, processCampaignFilterValues(expression.Campaign.$contains));\r\n }\r\n where.$and.splice(i, 1);\r\n }\r\n if (expression.Account) {\r\n if (scope.levelAt === levelAtConstant.CUSTOMER) {\r\n filteredAccount =\r\n _.union(filteredAccount, processCampaignFilterValues(expression.Account.$contains));\r\n }\r\n where.$and.splice(i, 1);\r\n }\r\n }\r\n filteredAdGroup = filteredAdGroup && filteredAdGroup.length > 0 ? filteredAdGroup : null;\r\n } else {\r\n if (where.Keyword) {\r\n filteredKeyword = processKeywordFilterValues(where.Keyword.$contains, scope);\r\n }\r\n if (where.AdGroup &&\r\n (scope.levelAt === levelAtConstant.CAMPAIGN || scope.levelAt === levelAtConstant.ACCOUNT)) {\r\n filteredAdGroup = processAdGroupFilterValues(where.AdGroup.$contains, scope);\r\n }\r\n if (where.Campaign && scope.levelAt === levelAtConstant.ACCOUNT) {\r\n filteredCampaign = processCampaignFilterValues(where.Campaign.$contains);\r\n }\r\n if (where.Account && scope.levelAt === levelAtConstant.CUSTOMER) {\r\n filteredAccount = processCampaignFilterValues(where.Account.$contains);\r\n }\r\n }\r\n\r\n // filter only supports 1 entity type in the request\r\n // we should try to pick the entity lowest in the hierarchy because it's the most specific\r\n if (!_.isEmpty(filteredKeyword)) {\r\n levelAtInRequest = levelAtConstant.KEYWORD;\r\n entityIdsInRequest = filteredKeyword;\r\n } else if (!_.isEmpty(filteredAdGroup)) {\r\n levelAtInRequest = levelAtConstant.ADGROUP;\r\n entityIdsInRequest = filteredAdGroup;\r\n } else if (!_.isEmpty(filteredCampaign)) {\r\n levelAtInRequest = levelAtConstant.CAMPAIGN;\r\n entityIdsInRequest = filteredCampaign;\r\n }\r\n }\r\n\r\n if (levelAtInRequest === levelAtConstant.CUSTOMER) {\r\n if (!_.isEmpty(filteredAccount)) {\r\n entityIdsInRequest = filteredAccount;\r\n }\r\n return {\r\n AccountIds: entityIdsInRequest,\r\n };\r\n }\r\n\r\n return {\r\n LevelAt: levelAtInRequest,\r\n EntityIds: entityIdsInRequest,\r\n };\r\n}\r\n\r\n/**\r\n * Parses the options passed to findAll. Gets the entity type and entity ids to filter on and\r\n * modifies the options to be in the correct format.\r\n * @param {Object} op - Options given to findAll call.\r\n * @param {Object} scope - Current page scope.\r\n * @returns {Object} - Entity type and entity ids to filter on.\r\n */\r\nexport function getFilteredEntitiesAndUpdateOptions(op, scope) {\r\n const where = _.result(op, 'where');\r\n\r\n // create the request data needed to filter on entity ids\r\n const filteredEntities = getFilteredEntities(where, scope);\r\n\r\n if (!_.has(where, '$and')) {\r\n // prevent these properties from being sent in the request\r\n op.where = _.omit(op.where, 'Keyword', 'AdGroup', 'Campaign', 'Account'); // eslint-disable-line no-param-reassign\r\n }\r\n\r\n return filteredEntities;\r\n}\r\n","import { Router } from '@bingads-webui/router';\r\nimport { lastNDate } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nexport const handleUnauthorizedResponse = (err) => {\r\n if (err && err.status === 401) {\r\n Router.navigate('/default.aspx?reason=1&msg=sessionexpired');\r\n }\r\n};\r\n\r\n/**\r\n * if the endDate is in recent 7 days, we should enable card data in request.\r\n * @param {Object} query - query.endDate is in format mm/dd/yyyy.\r\n * @returns {bool} value of CardDataEnabled in request.\r\n * */\r\nexport const isCardDataEnabled = (query) => {\r\n const endDate = new Date(query.endDate);\r\n const today = new Date();\r\n const sevenDaysAgo = lastNDate(today, 7);\r\n\r\n return endDate >= sevenDaysAgo;\r\n};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport { segmentationType } from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\nimport { CAMPAIGN_TYPES } from '@bingads-webui-campaign/competition-auction-insight-preferences';\r\nimport { MAX_NUMBER_OF_ACCOUNT } from '@bingads-webui-campaign/auction-insight-common';\r\n\r\nimport { extractFilter, filterData } from './filter';\r\nimport { entitySchema } from './schema';\r\nimport { getFilteredEntitiesAndUpdateOptions } from './get-filtered-entities';\r\nimport { handleUnauthorizedResponse, isCardDataEnabled } from './util';\r\n\r\nconst API = '/AdInsight/V2/Customers({cid})/Accounts({aid})/Default.GetAuctionInsightDataV2';\r\nconst APIForMCC = '/AdInsight/V2/Customers({cid})/MccAuctionInsight.GetMccAuctionInsightData';\r\nconst APIForHourly = '/AdInsight/V2/Customers({cid})/Accounts({aid})/Default.GetAuctionInsightHourlyData';\r\nconst APIForMCCHourly = 'AdInsight/V2/Customers({cid})/MccAuctionInsight.GetMccAuctionInsightHourlyData';\r\n\r\n// from mm/dd/yyyy to yyyymmdd from mm/dd/yyyy to yyyy-mm-dd\r\nfunction convertDateStr(datetimeStr, seperator = '') {\r\n const arr = datetimeStr.split('/');\r\n if (arr.length === 1) {\r\n return datetimeStr;\r\n }\r\n if (arr[0].length === 1) {\r\n arr[0] = `0${arr[0]}`;\r\n }\r\n if (arr[1].length === 1) {\r\n arr[1] = `0${arr[1]}`;\r\n }\r\n\r\n arr.unshift(arr.pop());\r\n return arr.join(seperator);\r\n}\r\n\r\nfunction normalizeSegment(segment, rawSegmentType) {\r\n const timeMap = {\r\n Day: 'Day',\r\n Week: 'Week',\r\n Month: 'Month',\r\n Quarter: 'Quarter',\r\n Year: 'Year',\r\n };\r\n const StringValue = rawSegmentType in timeMap ? convertDateStr(segment, '-') : segment;\r\n\r\n return {\r\n SegmentationType: rawSegmentType,\r\n StringValue,\r\n };\r\n}\r\n\r\nexport function normalize(raw, i18n, isCustomerLevel) {\r\n const data = _.map(raw.Entries, (entry, itemIndex) => {\r\n const item = {};\r\n item.UsedImpressions = raw.UsedImpressions;\r\n item.DisplayDomain = entry.DisplayDomain;\r\n\r\n if (isCustomerLevel) {\r\n item.HasInsight = itemIndex !== 0 && entry.DisplayDomain === 'You' && !_.isEmpty(raw.UnderPerformingAccountIds);\r\n item.ItemIndex = itemIndex;\r\n }\r\n\r\n item.LocalizedDisplayDomain = entry.DisplayDomain === 'You' && i18n ?\r\n i18n.getString('AuctionInsights_You') :\r\n entry.DisplayDomain;\r\n item.PerformanceMetrics = _.omit(entry.AggregatedKpi, 'Segments');\r\n\r\n item.PerformanceMetrics.SegmentedData = _.map(entry.SegmentedKpi, (seg) => {\r\n const segment = {};\r\n segment.Data = _.omit(seg, 'Segments');\r\n segment.Key = _.map(\r\n seg.Segments,\r\n (segmentValue, index) => {\r\n const rawSegmentType = _.isArray(raw.SegmentBy) ? raw.SegmentBy[index] : raw.SegmentBy;\r\n return normalizeSegment(segmentValue, rawSegmentType);\r\n }\r\n );\r\n return segment;\r\n });\r\n return item;\r\n });\r\n\r\n data.totalCount = _.size(raw.Entries);\r\n return data;\r\n}\r\n\r\nfunction sort(data, field, direction = 'ASC') {\r\n let ret;\r\n if (field === 'LocalizedDisplayDomain') {\r\n ret = _.sortBy(data, i => _.result(i, 'LocalizedDisplayDomain').toLowerCase());\r\n } else {\r\n ret = _.sortBy(data, i => _.result(_.result(i, 'PerformanceMetrics'), field));\r\n }\r\n\r\n return direction === 'ASC' ? ret : ret.reverse();\r\n}\r\n\r\nfunction formatUrl(url, scope) {\r\n return url.replace('{aid}', scope.accountId).replace('{cid}', scope.customerId);\r\n}\r\n\r\nexport class AuctionInsightService {\r\n constructor({\r\n scope,\r\n showAlertHandler,\r\n i18n,\r\n odataPath,\r\n currentScenario,\r\n currentActivity,\r\n campaignType,\r\n }) {\r\n this.scope = scope;\r\n this.i18n = i18n;\r\n this.showAlertHandler = showAlertHandler;\r\n this.cache = {};\r\n this.currentScenario = currentScenario;\r\n this.currentActivity = currentActivity;\r\n this.odataPath = odataPath;\r\n this.campaignType = campaignType;\r\n this.isCustomerLevel = this.scope.levelAt === levelAtConstant.CUSTOMER;\r\n\r\n if (this.isCustomerLevel && this.scope.accountsInfo.totalCount > MAX_NUMBER_OF_ACCOUNT) {\r\n currentActivity.trace(\r\n `Accounts more than ${MAX_NUMBER_OF_ACCOUNT}. Customer ID: ${this.scope.customerId}, accounts count: ${this.scope.accountsInfo.error || this.scope.accountsInfo.totalCount}`,\r\n 'AuctionInsightService'\r\n );\r\n }\r\n }\r\n\r\n getUsedImpressions() {\r\n return this.cacheUsedImpressions || 0;\r\n }\r\n\r\n getNormalizedData() {\r\n return this.rawData ? normalize(this.rawData) : [];\r\n }\r\n\r\n findAll(op, { afterFindAll } = {}) {\r\n this.currentActivity.trace('findAll is called', 'AuctionInsightService/findAll');\r\n\r\n const option = this.generateRequestOption(op);\r\n const { request } = JSON.parse(option.data);\r\n if (request.LevelAt === levelAtConstant.KEYWORD &&\r\n this.campaignType === CAMPAIGN_TYPES.Shopping) {\r\n // MT doesn't support keyword level shopping campaign request and will return non-200.\r\n // In order to support this scenario in UI, fake the empty response.\r\n this.currentActivity.trace('send empty data for keyword level shopping campaign request', 'AuctionInsightService/findAll');\r\n this.rawData = null;\r\n return Promise.resolve([]);\r\n }\r\n\r\n if (this.isCustomerLevel &&\r\n (_.isEmpty(request.AccountIds) || request.AccountIds.length > MAX_NUMBER_OF_ACCOUNT)) {\r\n this.rawData = null;\r\n this.cacheUsedImpressions = 0;\r\n return Promise.resolve([]);\r\n }\r\n\r\n const cacheKey = `auction_key_${option.data}_${option.url}`;\r\n\r\n let useCache = false;\r\n if (!_.has(this.cache, cacheKey)) {\r\n // Only cache the raw data\r\n this.cache[cacheKey] = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n this.cacheUsedImpressions = rawData.UsedImpressions;\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n } else {\r\n useCache = true;\r\n }\r\n this.currentActivity.trace(\r\n `${useCache ? 'hit cache, will not send request' : 'miss cache, send real request'}`,\r\n 'AuctionInsightService/findAll'\r\n );\r\n\r\n let findAllActivity;\r\n if (!useCache) {\r\n findAllActivity = this.currentScenario.findAll.create();\r\n findAllActivity.start();\r\n }\r\n return this.cache[cacheKey].then(\r\n (rawData) => {\r\n if (!useCache) {\r\n findAllActivity.stop();\r\n if (afterFindAll) {\r\n afterFindAll({ rawData, request });\r\n }\r\n }\r\n this.scope.underPerformingAccountIds = rawData.UnderPerformingAccountIds;\r\n this.rawData = rawData;\r\n return this.getDataByOp(op, rawData);\r\n },\r\n (err) => {\r\n const errorDetails = `ErrorCode=${err.status}, Error=${stringifySync(err)}, Request=${stringifySync(option.data)}`;\r\n\r\n if (err.status === 0) {\r\n this.currentActivity.trace(`Request not able to be sent, ${errorDetails}`, 'AuctionInsightService/findAll');\r\n } else if (err.status === 401) {\r\n this.currentActivity.trace(`error in findAll, ${errorDetails}`, 'AuctionInsightService/findAll');\r\n handleUnauthorizedResponse(err);\r\n } else {\r\n this.currentActivity.error(`error in findAll, ${errorDetails}`, 'AuctionInsightService/findAll');\r\n }\r\n\r\n if (_.isFunction(this.showAlertHandler)) {\r\n this.showAlertHandler({\r\n message: this.i18n ? this.i18n.getString('GenericErrorMessage') : '',\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n } else {\r\n throw err;\r\n }\r\n\r\n return [];\r\n }\r\n );\r\n }\r\n\r\n generateRequestOption(op) {\r\n const query = _.result(op, 'query', {});\r\n const data = {\r\n request: getFilteredEntitiesAndUpdateOptions(op, this.scope),\r\n };\r\n\r\n this.currentActivity.trace(\r\n `request entityIds length: ${this.isCustomerLevel ? data.request.AccountIds.length : data.request.EntityIds.length}`,\r\n 'AuctionInsightService/generateRequestOption'\r\n );\r\n\r\n // has segment\r\n const segmentTypes = _.isArray(query.SegmentationTypes) ?\r\n query.SegmentationTypes :\r\n [query.SegmentationTypes];\r\n\r\n const option = {\r\n contentType: 'application/json',\r\n type: 'POST',\r\n headers: {\r\n authorization: `CCMTSmallToken ${this.scope.token}`, // add prefix\r\n },\r\n };\r\n\r\n const formattedSegmentTypes = _.compact(segmentTypes);\r\n this.currentActivity.trace(\r\n `request segment type: ${_.isEmpty(formattedSegmentTypes) ? 'None' : formattedSegmentTypes}`,\r\n 'AuctionInsightService/generateRequestOption'\r\n );\r\n\r\n const isSegmentHourOfDay = _.contains(formattedSegmentTypes, segmentationType.HourOfDay);\r\n if (isSegmentHourOfDay) {\r\n option.url = formatUrl(`${this.odataPath}${this.isCustomerLevel ? APIForMCCHourly : APIForHourly}`, this.scope);\r\n // Only segment by HourOfTheDay\r\n data.request.SegmentBy = segmentationType.HourOfDay;\r\n } else {\r\n option.url = formatUrl(`${this.odataPath}${this.isCustomerLevel ? APIForMCC : API}`, this.scope);\r\n if (!_.isEmpty(formattedSegmentTypes)) {\r\n data.request.SegmentBy = formattedSegmentTypes;\r\n }\r\n }\r\n\r\n data.request.StartDate = convertDateStr(query.startDate);\r\n data.request.EndDate = convertDateStr(query.endDate);\r\n\r\n if (this.isCustomerLevel) {\r\n data.request.CardDataEnabled = isCardDataEnabled(query);\r\n }\r\n\r\n this.currentActivity.trace(\r\n `request campaign type: '${this.campaignType ? '' : this.campaignType}'`,\r\n 'AuctionInsightService/generateRequestOption'\r\n );\r\n if (this.campaignType) {\r\n data.request.CampaignType = this.campaignType;\r\n }\r\n option.data = JSON.stringify(data);\r\n\r\n return option;\r\n }\r\n\r\n getDataByOp(op, rawData) {\r\n let data = normalize(rawData, this.i18n, this.isCustomerLevel);\r\n\r\n if (!_.isEmpty(op.orderBy) && _.isArray(op.orderBy)) {\r\n const field = op.orderBy[0][0];\r\n const direction = op.orderBy[0][1];\r\n data = sort(data, field, direction);\r\n this.currentActivity.trace(\r\n `request sort field ${field} direction ${direction}`,\r\n 'AuctionInsightService/getDataByOp'\r\n );\r\n }\r\n\r\n if (!_.isEmpty(op.where)) {\r\n const queries = _.map(extractFilter(op.where), (q) => {\r\n this.currentActivity.trace(\r\n `iterate request filter: query ${stringifySync(q)}`,\r\n 'AuctionInsightService/getDataByOp'\r\n );\r\n const query = _.clone(q);\r\n if (_.result(entitySchema.properties[query.columnName], 'isPercentValue')) {\r\n // convert percent to decimal without rounding artifacts\r\n query.value = Math.round(q.value * 1e2) / 1e4;\r\n }\r\n return query;\r\n });\r\n\r\n data = filterData(queries, data);\r\n }\r\n\r\n data.totalCount = data.length;\r\n return data;\r\n }\r\n}\r\n","export const MAX_DISPLAY_COUNT = 200;\r\nexport const MAX_SELECTION_COUNT = 200;\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\n\r\nimport { parseSync } from '@bingads-webui/safe-json';\r\nimport { MAX_DISPLAY_COUNT } from './consts';\r\n\r\nfunction parseIds(ids) {\r\n const parsedIdMap = _.reduce(ids, (memo, id) => {\r\n const parsedId = parseSync(id);\r\n memo[parsedId.Id] = parsedId; // eslint-disable-line no-param-reassign\r\n return memo;\r\n }, {});\r\n const parsedIds = _.map(_.keys(parsedIdMap), id => parseInt(id, 10));\r\n\r\n return {\r\n parsedIdMap,\r\n parsedIds,\r\n };\r\n}\r\n\r\nfunction load(params, dataSource, entitySet) {\r\n return dataSource\r\n .findAll(params, {\r\n cacheResponse: false,\r\n bypassCache: true,\r\n entitySet,\r\n headers: {\r\n 'x-ms-refreshcampaigncache': true,\r\n },\r\n });\r\n}\r\n\r\nexport class SelectorDataSource {\r\n constructor({\r\n dataContextManager,\r\n cacheService,\r\n dataSource,\r\n type,\r\n selectorLoadAction,\r\n entitySet,\r\n encodeData,\r\n where,\r\n }) {\r\n this.options = {\r\n dataContextManager,\r\n cacheService,\r\n dataSource,\r\n type,\r\n selectorLoadAction,\r\n entitySet,\r\n encodeData,\r\n where,\r\n };\r\n }\r\n\r\n get itemsDisplayLimit() {\r\n return MAX_DISPLAY_COUNT;\r\n }\r\n\r\n get(viewFilter, searchFilter, ids = []) {\r\n const params = {\r\n limit: this.itemsDisplayLimit + 1,\r\n select: ['Id', 'Name'],\r\n orderBy: 'Name',\r\n where: this.options.where,\r\n };\r\n\r\n if (searchFilter) {\r\n const nameFilter = {\r\n Name: {\r\n $contains: searchFilter,\r\n },\r\n };\r\n if (params.where) {\r\n params.where = { $and: [params.where, nameFilter] };\r\n } else {\r\n params.where = nameFilter;\r\n }\r\n }\r\n\r\n const { parsedIds, parsedIdMap } = parseIds(ids);\r\n\r\n if (ids.length > 0) {\r\n const idQuery = {\r\n $or: _.map(parsedIds, id => (\r\n { Id: { $eq: id } }\r\n )),\r\n };\r\n const endQueries = [idQuery].concat(params.where || []);\r\n\r\n params.where = { $and: endQueries };\r\n }\r\n\r\n let cachedData;\r\n\r\n this.options.dataContextManager.getContext(this.options.selectorLoadAction, false, 'GET');\r\n const pseudoRequest = {\r\n url: this.options.selectorLoadAction,\r\n data: params,\r\n success: (data) => {\r\n cachedData = data[this.options.type];\r\n },\r\n };\r\n\r\n this.options.cacheService.cache(pseudoRequest);\r\n if (pseudoRequest.skipRequest) {\r\n return Promise.resolve(cachedData);\r\n }\r\n return load(params, this.options.dataSource, this.options.entitySet)\r\n .then((newData) => {\r\n let patchedData = [];\r\n\r\n const missingIds = _.difference(parsedIds, _.pluck(newData, 'Id'));\r\n\r\n _.each(missingIds, (missingId) => {\r\n patchedData.push(parsedIdMap[missingId]);\r\n });\r\n\r\n if (searchFilter) {\r\n patchedData = _.filter(\r\n patchedData,\r\n entity => searchFilter.indexOf(entity && entity.Name) >= 0\r\n );\r\n }\r\n\r\n const encodedData =\r\n _.map(patchedData.concat(newData), item => this.options.encodeData(item));\r\n\r\n pseudoRequest.success({ [this.options.type]: encodedData });\r\n return encodedData;\r\n });\r\n }\r\n\r\n /**\r\n * get entity by ids\r\n *\r\n * @param {Array[]} ids - ids to fetch, when empty, will return empty result\r\n * @returns {Promise} result promise\r\n */\r\n getByIds(ids) {\r\n if (_.size(ids) > 0) {\r\n const { parsedIdMap } = parseIds(ids);\r\n\r\n return Promise.resolve(_.map(\r\n _.values(parsedIdMap),\r\n item => this.options.encodeData(item)\r\n ));\r\n }\r\n return Promise.resolve([]);\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\n\r\nimport { SelectorDataSource } from './selector-data-source';\r\n\r\nexport function formatKeywordName({ keywordName }) {\r\n return keywordName;\r\n}\r\n\r\nfunction getEncodeDataFunction() {\r\n return ({\r\n Id,\r\n Name,\r\n CampaignName,\r\n CampaignId,\r\n AdGroupName,\r\n AdGroupId,\r\n }) => {\r\n // overwrite the current scope campaignName when encoding filter values set in a different scope\r\n const campaignNameToUse = CampaignName;\r\n const campaignIdToUse = CampaignId;\r\n const adGroupNameToUse = AdGroupName;\r\n const adGroupIdToUse = AdGroupId;\r\n\r\n const newId = stringifySync({\r\n Id,\r\n Name,\r\n AdGroupName: adGroupNameToUse,\r\n AdGroupId: adGroupIdToUse,\r\n CampaignName: campaignNameToUse,\r\n CampaignId: campaignIdToUse,\r\n });\r\n\r\n return {\r\n Id: newId,\r\n Name: formatKeywordName({ keywordName: Name }),\r\n };\r\n };\r\n}\r\nexport class KeywordDataSource {\r\n constructor() {\r\n this.selectorDataSource = new SelectorDataSource({\r\n encodeData: getEncodeDataFunction(),\r\n });\r\n }\r\n\r\n get itemsDisplayLimit() {\r\n return this.selectorDataSource.itemsDisplayLimit;\r\n }\r\n\r\n get() {\r\n // fetching of keyword ids for manual filter creation is not a supported scenario\r\n return Promise.resolve([]);\r\n }\r\n\r\n getByIds(ids) {\r\n return this.selectorDataSource.getByIds(ids);\r\n }\r\n}\r\n","import { stringifySync } from '@bingads-webui/safe-json';\r\n\r\nimport { SelectorDataSource } from './selector-data-source';\r\n\r\nexport function formatAdGroupName({ adgroupName, campaignName }) {\r\n return `${campaignName} > ${adgroupName}`;\r\n}\r\n\r\nfunction getEncodeDataFunction(currentCampaignName, currentCampaignId) {\r\n return ({\r\n Id,\r\n Name,\r\n CampaignName,\r\n CampaignId,\r\n }) => {\r\n // overwrite the current scope campaignName when encoding filter values set in a different scope\r\n const campaignNameToUse = CampaignName || currentCampaignName;\r\n // campaignId fetched from scope is string. Need to convert to int to align with filter schema.\r\n const campaignIdToUse = CampaignId || parseInt(currentCampaignId, 10);\r\n\r\n const newId = stringifySync({\r\n Id,\r\n Name,\r\n CampaignName: campaignNameToUse,\r\n CampaignId: campaignIdToUse,\r\n });\r\n\r\n return {\r\n Id: newId,\r\n Name: formatAdGroupName({ adgroupName: Name, campaignName: campaignNameToUse }),\r\n };\r\n };\r\n}\r\n\r\nexport class AdGroupDataSource {\r\n constructor({\r\n dataContextManager,\r\n cacheService,\r\n jsdata,\r\n entitySet,\r\n currentCampaignName,\r\n currentCampaignId,\r\n }) {\r\n this.selectorDataSource = new SelectorDataSource({\r\n dataContextManager,\r\n cacheService,\r\n dataSource: jsdata.AdGroup,\r\n type: 'adgroup',\r\n selectorLoadAction: 'adgroupselector/load?',\r\n entitySet,\r\n encodeData: getEncodeDataFunction(currentCampaignName, currentCampaignId),\r\n });\r\n }\r\n\r\n get itemsDisplayLimit() {\r\n return this.selectorDataSource.itemsDisplayLimit;\r\n }\r\n\r\n get(viewFilter, searchFilter, ids) {\r\n return this.selectorDataSource.get(viewFilter, searchFilter, ids);\r\n }\r\n\r\n getByIds(ids) {\r\n return this.selectorDataSource.getByIds(ids);\r\n }\r\n}\r\n","import { stringifySync } from '@bingads-webui/safe-json';\r\n\r\nimport { SelectorDataSource } from './selector-data-source';\r\n\r\nexport function encodeData({ Id, Name }) {\r\n const newId = stringifySync({\r\n Id,\r\n Name,\r\n });\r\n\r\n return {\r\n Id: newId,\r\n Name,\r\n };\r\n}\r\n\r\nexport class CampaignDataSource {\r\n constructor({\r\n dataContextManager,\r\n cacheService,\r\n jsdata,\r\n entitySet,\r\n existingCampaignFilter,\r\n }) {\r\n this.selectorDataSource = new SelectorDataSource({\r\n dataContextManager,\r\n cacheService,\r\n dataSource: jsdata.Campaign,\r\n type: 'campaign',\r\n selectorLoadAction: 'campaignselector/load?',\r\n entitySet,\r\n encodeData,\r\n where: existingCampaignFilter,\r\n });\r\n }\r\n\r\n get itemsDisplayLimit() {\r\n return this.selectorDataSource.itemsDisplayLimit;\r\n }\r\n\r\n get(viewFilter, searchFilter, ids) {\r\n return this.selectorDataSource.get(viewFilter, searchFilter, ids);\r\n }\r\n\r\n getByIds(ids) {\r\n return this.selectorDataSource.getByIds(ids);\r\n }\r\n}\r\n","/* eslint-disable import/no-unresolved */\r\n/* eslint-disable import/extensions */\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\n\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\nimport { parseSync } from '@bingads-webui/safe-json';\r\nimport { Selector } from '@bingads-webui/selector';\r\n\r\nimport { KeywordDataSource, formatKeywordName } from './keyword-data-source';\r\nimport { AdGroupDataSource, formatAdGroupName } from './adgroup-data-source';\r\nimport { CampaignDataSource } from './campaign-data-source';\r\nimport { MAX_SELECTION_COUNT } from './consts';\r\n\r\n/* eslint-disable no-param-reassign */\r\n\r\nconst stubDataSource = {\r\n findAll: () => Promise.resolve([]),\r\n};\r\n\r\nexport const selectorStyleOptions = {\r\n list: ['table--fixed-layout', 'table--no-border'],\r\n nameColumn: ['table__cell--menu-item-style'],\r\n};\r\n\r\nexport const selectorKeyMapFunc = i18n => ({\r\n Selector_Filter_Selected: (unused, key, params) => i18n.getString('CompetitionTab_Selector_Filter_Selected', params),\r\n Selector_Filter_All: () => i18n.getString('CompetitionTab_Selector_Filter_All'),\r\n});\r\n\r\nexport function handleFilterChange({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n missingDataHandler,\r\n}) {\r\n let ids;\r\n if (viewFilter === 'selected') {\r\n ids = _.pluck(stats.checked, 'id');\r\n }\r\n return dataSource.get(viewFilter, searchFilter, ids, stats).then((data) => {\r\n let predicate = _.identity;\r\n\r\n const { checkMap } = selector;\r\n const missingIds = _.difference(_.keys(checkMap), _.pluck(data, 'Id'));\r\n const patchedData = missingDataHandler({\r\n data,\r\n missingIds,\r\n });\r\n\r\n if (viewFilter === Selector.ViewFilter.selected) {\r\n const selected = stats.checked;\r\n predicate = item => item && _.find(selected, ({ id }) => id === item.Id);\r\n }\r\n\r\n selector.setData(_.filter(patchedData, predicate));\r\n });\r\n}\r\n\r\nexport function handleFilterChangeForCampaign({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n}) {\r\n handleFilterChange({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n missingDataHandler: ({ data, missingIds }) => {\r\n let missingData = [];\r\n _.each(missingIds, (missingId) => {\r\n missingData.push({\r\n Id: missingId,\r\n Name: parseSync(missingId).Name,\r\n });\r\n });\r\n\r\n if (searchFilter) {\r\n missingData = _.filter(\r\n missingData,\r\n entity => searchFilter.indexOf(entity && entity.Name) >= 0\r\n );\r\n }\r\n\r\n return missingData.concat(data);\r\n },\r\n });\r\n}\r\n\r\nexport function handleFilterChangeForAdGroup({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n}) {\r\n handleFilterChange({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n missingDataHandler: ({ data, missingIds }) => {\r\n let missingData = [];\r\n _.each(missingIds, (missingId) => {\r\n missingData.push({\r\n Id: missingId,\r\n Name: formatAdGroupName({\r\n adgroupName: parseSync(missingId).Name,\r\n campaignName: parseSync(missingId).CampaignName,\r\n }),\r\n });\r\n });\r\n\r\n if (searchFilter) {\r\n missingData = _.filter(\r\n missingData,\r\n entity => searchFilter.indexOf(entity && entity.Name) >= 0\r\n );\r\n }\r\n\r\n return missingData.concat(data);\r\n },\r\n });\r\n}\r\n\r\nexport function handleFilterChangeForKeyword({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n}) {\r\n handleFilterChange({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n missingDataHandler: ({ data, missingIds }) => {\r\n let missingData = [];\r\n _.each(missingIds, (missingId) => {\r\n const parsed = parseSync(missingId);\r\n\r\n missingData.push({\r\n Id: missingId,\r\n Name: formatKeywordName({\r\n keywordName: parsed.Name,\r\n adgroupName: parsed.AdGroupName,\r\n campaignName: parsed.CampaignName,\r\n }),\r\n });\r\n });\r\n\r\n if (searchFilter) {\r\n missingData = _.filter(\r\n missingData,\r\n entity => searchFilter.indexOf(entity && entity.Name) >= 0\r\n );\r\n }\r\n\r\n return missingData.concat(data);\r\n },\r\n });\r\n}\r\n\r\nfunction getSelectorOptions(i18n, selectorOptions, disableSearch) {\r\n return _.defaults(selectorOptions, {\r\n filter: {\r\n disableSearch,\r\n showSelected: true,\r\n showChanged: false,\r\n },\r\n keyMap: selectorKeyMapFunc(i18n),\r\n styles: selectorStyleOptions,\r\n allowCheckAll: true,\r\n showNoDataMessage: true,\r\n });\r\n}\r\n\r\nfunction generateSchemaForCampaignProperty({\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n dataService = { Campaign: stubDataSource },\r\n entitySet = {},\r\n existingCampaignFilter,\r\n}) {\r\n return {\r\n name: 'Campaign',\r\n title: i18n.getString('Entity_Campaign'),\r\n operatorDisplayNameMap: {\r\n containsany: i18n.getString('FilterOperator_ContainsAny'),\r\n },\r\n operators: ['contains'],\r\n type: 'id',\r\n addtionalParams: {\r\n dataSource: new CampaignDataSource({\r\n cacheService,\r\n dataContextManager,\r\n jsdata: dataService,\r\n entitySet,\r\n existingCampaignFilter,\r\n }),\r\n selectorOptions: getSelectorOptions(i18n, {\r\n handleFilterChange: handleFilterChangeForCampaign,\r\n }),\r\n maxCount: MAX_SELECTION_COUNT,\r\n },\r\n filterable: true,\r\n };\r\n}\r\n\r\nfunction generateSchemaForAdGroupProperty({\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n dataService = { AdGroup: stubDataSource },\r\n entitySet = {},\r\n currentCampaignName = '',\r\n currentCampaignId = 0,\r\n isInAccountScope = false,\r\n}) {\r\n return {\r\n name: 'AdGroup',\r\n title: i18n.getString('Entity_Adgroup'),\r\n operatorDisplayNameMap: {\r\n containsany: i18n.getString('FilterOperator_ContainsAny'),\r\n },\r\n operators: ['contains'],\r\n type: 'id',\r\n addtionalParams: {\r\n dataSource: new AdGroupDataSource({\r\n cacheService,\r\n dataContextManager,\r\n jsdata: dataService,\r\n entitySet,\r\n currentCampaignName,\r\n currentCampaignId,\r\n }),\r\n selectorOptions: getSelectorOptions(i18n, {\r\n handleFilterChange: handleFilterChangeForAdGroup,\r\n }, isInAccountScope),\r\n maxCount: MAX_SELECTION_COUNT,\r\n },\r\n filterable: true,\r\n };\r\n}\r\n\r\nfunction generateSchemaForKeywordProperty({\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n dataService = { Keyword: stubDataSource },\r\n entitySet = {},\r\n}) {\r\n return {\r\n name: 'Keyword',\r\n title: i18n.getString('Entity_Keywords'),\r\n operatorDisplayNameMap: {\r\n containsany: i18n.getString('FilterOperator_ContainsAny'),\r\n },\r\n operators: ['contains'],\r\n type: 'id',\r\n addtionalParams: {\r\n dataSource: new KeywordDataSource({\r\n cacheService,\r\n dataContextManager,\r\n jsdata: dataService,\r\n entitySet,\r\n }),\r\n selectorOptions: getSelectorOptions(i18n, {\r\n handleFilterChange: handleFilterChangeForKeyword,\r\n }, true),\r\n maxCount: MAX_SELECTION_COUNT,\r\n },\r\n filterable: true,\r\n };\r\n}\r\n\r\nfunction updateEntitySchemaForAccountScope({\r\n customizedSchemaForProcessor,\r\n edmCampaign,\r\n jsdata,\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n existingCampaignFilter,\r\n customizedGenerateSchemaForAdGroupProperty,\r\n customizedGenerateSchemaForCampaignProperty,\r\n}) {\r\n const ops = {\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n isInAccountScope: true,\r\n getSelectorOptions,\r\n handleFilterChangeForCampaign,\r\n };\r\n let generateCampaignProperty = generateSchemaForCampaignProperty;\r\n if (customizedGenerateSchemaForCampaignProperty) {\r\n generateCampaignProperty = customizedGenerateSchemaForCampaignProperty;\r\n }\r\n let generateAdGroupProperty = generateSchemaForAdGroupProperty;\r\n if (customizedGenerateSchemaForAdGroupProperty) {\r\n generateAdGroupProperty = customizedGenerateSchemaForAdGroupProperty;\r\n }\r\n return () => {\r\n customizedSchemaForProcessor.properties.Campaign =\r\n generateCampaignProperty(_.extend({}, ops, {\r\n dataService: jsdata,\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n existingCampaignFilter,\r\n maxCount: MAX_SELECTION_COUNT,\r\n dataSource: new CampaignDataSource({\r\n cacheService,\r\n dataContextManager,\r\n jsdata,\r\n entitySet: {},\r\n existingCampaignFilter,\r\n }),\r\n }));\r\n customizedSchemaForProcessor.properties.AdGroup =\r\n generateAdGroupProperty(_.extend({}, ops, {\r\n dataSource: new AdGroupDataSource({\r\n cacheService,\r\n dataContextManager,\r\n jsdata: { AdGroup: stubDataSource },\r\n entitySet: {},\r\n currentCampaignName: '',\r\n currentCampaignId: 0,\r\n }),\r\n }));\r\n customizedSchemaForProcessor.properties.Keyword = generateSchemaForKeywordProperty(ops);\r\n return customizedSchemaForProcessor;\r\n };\r\n}\r\n\r\nfunction updateEntitySchemaForCampaignScope({\r\n scope,\r\n customizedSchemaForProcessor,\r\n edmCampaign,\r\n jsdata,\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n existingCampaignFilter,\r\n customizedGenerateSchemaForAdGroupProperty,\r\n customizedGenerateSchemaForCampaignProperty,\r\n}) {\r\n const ops = {\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n getSelectorOptions,\r\n handleFilterChangeForCampaign,\r\n };\r\n let generateCampaignProperty = generateSchemaForCampaignProperty;\r\n if (customizedGenerateSchemaForCampaignProperty) {\r\n generateCampaignProperty = customizedGenerateSchemaForCampaignProperty;\r\n }\r\n let generateAdGroupProperty = generateSchemaForAdGroupProperty;\r\n if (customizedGenerateSchemaForAdGroupProperty) {\r\n generateAdGroupProperty = customizedGenerateSchemaForAdGroupProperty;\r\n }\r\n return () => {\r\n const entitySet = edmCampaign.currentCampaign.AdGroups;\r\n customizedSchemaForProcessor.properties.AdGroup =\r\n generateAdGroupProperty(_.extend({}, ops, {\r\n dataService: jsdata,\r\n entitySet,\r\n currentCampaignName: scope.campaignName,\r\n currentCampaignId: scope.campaignId,\r\n dataSource: new AdGroupDataSource({\r\n cacheService,\r\n dataContextManager,\r\n jsdata,\r\n entitySet,\r\n currentCampaignName: scope.campaignName,\r\n currentCampaignId: scope.campaignId,\r\n }),\r\n }));\r\n customizedSchemaForProcessor.properties.Campaign =\r\n generateCampaignProperty(_.extend({}, ops, {\r\n dataService: jsdata,\r\n entitySet: edmCampaign.currentAccount.Campaigns,\r\n existingCampaignFilter,\r\n maxCount: MAX_SELECTION_COUNT,\r\n dataSource: new CampaignDataSource({\r\n cacheService,\r\n dataContextManager,\r\n jsdata,\r\n entitySet: {},\r\n existingCampaignFilter,\r\n }),\r\n }));\r\n customizedSchemaForProcessor.properties.Keyword = generateSchemaForKeywordProperty(ops);\r\n return customizedSchemaForProcessor;\r\n };\r\n}\r\n\r\nfunction updateEntitySchemaForAdGroupScope({\r\n customizedSchemaForProcessor,\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n}) {\r\n const ops = {\r\n cacheService,\r\n dataContextManager,\r\n i18n,\r\n };\r\n return () => {\r\n customizedSchemaForProcessor.properties.AdGroup = generateSchemaForAdGroupProperty(ops);\r\n customizedSchemaForProcessor.properties.Campaign = generateSchemaForCampaignProperty(ops);\r\n customizedSchemaForProcessor.properties.Keyword = generateSchemaForKeywordProperty(ops);\r\n return customizedSchemaForProcessor;\r\n };\r\n}\r\n\r\nfunction updateEntitySchemaForCustomerScope({\r\n customizedSchemaForProcessor,\r\n i18n,\r\n generateSchemaForAccountProperty,\r\n}) {\r\n return () => {\r\n customizedSchemaForProcessor.properties.Account = generateSchemaForAccountProperty({ i18n });\r\n return customizedSchemaForProcessor;\r\n };\r\n}\r\n\r\nexport function createSchemaProcessorForCurrentScope(options) {\r\n switch (options.scope.levelAt) {\r\n case levelAtConstant.CUSTOMER:\r\n return updateEntitySchemaForCustomerScope(options);\r\n case levelAtConstant.ACCOUNT:\r\n return updateEntitySchemaForAccountScope(options);\r\n case levelAtConstant.CAMPAIGN:\r\n return updateEntitySchemaForCampaignScope(options);\r\n case levelAtConstant.ADGROUP:\r\n default:\r\n return updateEntitySchemaForAdGroupScope(options);\r\n }\r\n}\r\n","/* eslint-disable import/no-unresolved */\r\n/* eslint-disable import/extensions */\r\nimport { FilterStorageFactory } from '@bingads-webui-campaign/filter-storage';\r\nimport { SchemaI18n } from '@bingads-webui-universal/schema-i18n';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport { createSchemaProcessorForCurrentScope } from './schema-processors';\r\n\r\nexport function getCampaignAdgroupSelectorFilterConfig({\r\n scope = {},\r\n entitySchema,\r\n featureName,\r\n i18n,\r\n sessionStore,\r\n preferenceStoreFactory,\r\n customizedSchemaForProcessor,\r\n cacheService,\r\n dataContextManager,\r\n edmCampaign,\r\n jsdata,\r\n existingCampaignFilter,\r\n customizedGenerateSchemaForAdGroupProperty,\r\n customizedGenerateSchemaForCampaignProperty,\r\n generateSchemaForAccountProperty,\r\n preferenceService,\r\n}) {\r\n const maxSavedFilterLimit = 10;\r\n const schemaI18n = new SchemaI18n({ i18n });\r\n\r\n return {\r\n entitySchema,\r\n schemaProcessor: createSchemaProcessorForCurrentScope({\r\n scope,\r\n customizedSchemaForProcessor: customizedSchemaForProcessor || cloneDeep(entitySchema),\r\n cacheService,\r\n dataContextManager,\r\n edmCampaign,\r\n i18n,\r\n jsdata,\r\n existingCampaignFilter,\r\n customizedGenerateSchemaForAdGroupProperty,\r\n customizedGenerateSchemaForCampaignProperty,\r\n generateSchemaForAccountProperty,\r\n }),\r\n schemaI18n,\r\n i18n,\r\n shortDateFormat: 'yMd',\r\n odata: {\r\n ignoreCase: false,\r\n custom: {},\r\n },\r\n maxSavedFilterLimit,\r\n storageFactory: new FilterStorageFactory({\r\n sessionStore,\r\n preferenceStoreFactory,\r\n featureName,\r\n maxSavedFilterLimit,\r\n parseIdAsInt: false,\r\n getLegacySaved: false,\r\n preferenceService,\r\n }),\r\n enabled: ['editor'],\r\n editor: {\r\n isComparingEnabled: () => true,\r\n },\r\n };\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport { FilterAgent } from '@bingads-webui/filter-agent';\r\nimport { BackboneInstanceWrapper } from '@bingads-webui-react/backbone-instance-wrapper';\r\n\r\nconst EXCEED_SAVE_LIMIT = 'ExceededSaveLimit';\r\n\r\nexport class CampaignAdgroupSelectorFilterAgent extends React.PureComponent {\r\n static propTypes = {\r\n onFilterUIChanged: PropTypes.func,\r\n onFilterStateChanged: PropTypes.func.isRequired,\r\n upperToolBar: PropTypes.objectOf(PropTypes.any).isRequired,\r\n filterConfig: PropTypes.objectOf(PropTypes.any).isRequired,\r\n filterService: PropTypes.objectOf(PropTypes.any).isRequired,\r\n };\r\n\r\n static defaultProps = {\r\n onFilterUIChanged: _.noop,\r\n };\r\n\r\n state = {\r\n showFilterBar: false,\r\n showFilterEditor: false,\r\n showToolBar: true,\r\n filterBar: null,\r\n filterEditor: null,\r\n }\r\n\r\n componentDidMount() {\r\n this.initializeFilterAgent();\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.filterConfig !== prevProps.filterConfig ||\r\n this.props.filterService !== prevProps.filterService ||\r\n this.props.upperToolBar !== prevProps.upperToolBar) {\r\n this.initializeFilterAgent();\r\n }\r\n }\r\n\r\n onFilterMaxReached = () => {\r\n this.onFilterOperationFailed({\r\n message: EXCEED_SAVE_LIMIT,\r\n });\r\n }\r\n\r\n onFilterOperationFailed = (errorData = {}) => {\r\n const { filterConfig: { i18n, maxSavedFilterLimit } } = this.props;\r\n const alertHelper = new AlertHelper({ i18n });\r\n\r\n if (errorData.message === EXCEED_SAVE_LIMIT) {\r\n const errMsg = i18n.getString('Error_Campaign_API_FiltersExceedsMaxCount')\r\n .replace('{0}', maxSavedFilterLimit);\r\n alertHelper.showAlert(errMsg);\r\n } else {\r\n alertHelper.showUnknownError();\r\n }\r\n }\r\n\r\n initializeFilterAgent() {\r\n const { filterConfig, filterService, upperToolBar } = this.props;\r\n this.filterAgent = new FilterAgent(_.extend({}, filterConfig, {\r\n filterService,\r\n toolbarView: {\r\n view: upperToolBar,\r\n rendered: true,\r\n },\r\n }));\r\n let filterBar;\r\n let filterEditor;\r\n\r\n this.filterAgent.on('filter-ui-change', (state) => {\r\n if (state.showFilterBar) {\r\n filterBar = this.filterAgent.getFilterBar();\r\n } else if (this.filterAgent.filterBarAgent.deterministicView) {\r\n this.filterAgent.filterBarAgent.deterministicView.trigger('removed');\r\n }\r\n\r\n if (state.showFilterEditor) {\r\n filterEditor = this.filterAgent.getFilterEditor();\r\n }\r\n\r\n this.props.onFilterUIChanged(state);\r\n this.setState({\r\n filterBar,\r\n filterEditor,\r\n showFilterBar: state.showFilterBar,\r\n showFilterEditor: state.showFilterEditor,\r\n showToolBar: state.showToolBar,\r\n });\r\n });\r\n\r\n this.filterAgent.on('filter-state-changed', this.props.onFilterStateChanged);\r\n this.filterAgent.on('filter-operation-failed', this.onFilterOperationFailed);\r\n this.filterAgent.on('filter-max-reached', this.onFilterMaxReached);\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n
    \r\n {this.state.showToolBar &&\r\n }\r\n
    \r\n\r\n {this.state.showFilterBar &&\r\n }\r\n {this.state.showFilterEditor &&\r\n }\r\n
    \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\n\r\nexport const EmptyFilterView = ({ i18n, imagePath }) => {\r\n const bulbIconSrc = `${imagePath}Recommendation/no-opportunity-icon.png`;\r\n\r\n return (\r\n
    \r\n
    \r\n {i18n.getString('Details_View_Filter_Empty_Title')}\r\n
    \r\n
    \r\n

    {i18n.getString('Details_View_Filter_Empty_Title')}

    \r\n

    \r\n \r\n

    \r\n
    \r\n
    );\r\n};\r\n\r\nEmptyFilterView.propTypes = {\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n imagePath: PropTypes.string.isRequired,\r\n};\r\n","export const GENERAL_INSIGHTS_PREFERENCES = 'WebApp.CampaignUI.GeneralInsightsPreferences';\r\nexport const FEATURE_NAME_GENERAL_INSIGHTS = 'GeneralInsightsGrid';\r\nexport const FEATURE_NAME_GENERAL_INSIGHTS_SHOPPING = 'GeneralInsightsShoppingGrid';\r\n\r\nexport const CAMPAIGN_TYPES = {\r\n Search: 'Default',\r\n Shopping: 'Shopping',\r\n};\r\n\r\nexport const CAMPAIGN_TYPES_ENUM_VALUE = {\r\n [CAMPAIGN_TYPES.Search]: 1,\r\n [CAMPAIGN_TYPES.Shopping]: 2,\r\n};\r\n\r\nexport const METRIC_PREFERENCE_KEY_NAME = {\r\n [CAMPAIGN_TYPES.Search]: 'selectedMetric',\r\n [CAMPAIGN_TYPES.Shopping]: 'shoppingSelectedMetric',\r\n};\r\n\r\nexport const GENERAL_INSIGHTS_FEATURE_NAMES = {\r\n [CAMPAIGN_TYPES.Search]: FEATURE_NAME_GENERAL_INSIGHTS,\r\n [CAMPAIGN_TYPES.Shopping]: FEATURE_NAME_GENERAL_INSIGHTS_SHOPPING,\r\n};\r\n","import _ from 'underscore';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport {\r\n GENERAL_INSIGHTS_PREFERENCES,\r\n} from './consts';\r\n\r\nexport function getGeneralInsightsPreferences(preferencesService) {\r\n const sessionData = preferencesService.findByNameAtUserLevel(GENERAL_INSIGHTS_PREFERENCES);\r\n\r\n return _.result(sessionData, 'Data', {});\r\n}\r\n\r\nexport function saveGeneralInsightsPreferences(preferencesService, data) {\r\n const Data = merge(\r\n {},\r\n getGeneralInsightsPreferences(preferencesService),\r\n data\r\n );\r\n\r\n preferencesService.setAtUserLevel({\r\n Name: GENERAL_INSIGHTS_PREFERENCES,\r\n Data,\r\n });\r\n}\r\n","import { FEATURE_NAME_GENERAL_INSIGHTS } from '@bingads-webui-campaign/competition-auction-insight-preferences';\r\n\r\nexport const PILL_CONTROL = {\r\n summary: 'summary',\r\n overtime: 'overtime',\r\n};\r\n\r\nexport const GENERAL_INSIGHTS_DATA_TYPES = {\r\n Grid: FEATURE_NAME_GENERAL_INSIGHTS, // grid and shopping grid share the same data source.\r\n Chart: 'GeneralInsightsChart',\r\n Tile: 'GeneralInsightsTile',\r\n};\r\n","export const instrumentationSchema = {\r\n scenario: [\r\n {\r\n name: 'loadCompetitionTab',\r\n value: 'LoadCompetitionTab',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'viewGeneralInsights',\r\n value: 'ViewGeneralInsights',\r\n },\r\n {\r\n name: 'viewDeeperInsights',\r\n value: 'ViewDeeperInsights',\r\n },\r\n // Below activities are for performance logs.\r\n {\r\n name: 'renderWithPreference',\r\n value: 'constructor to render after preference config is fetched from server',\r\n },\r\n ],\r\n }, {\r\n name: 'loadGeneralInsights',\r\n value: 'LoadGeneralInsightsInCompetitionTab',\r\n setting: {},\r\n activity: [\r\n // All trace logs will be under this activity.\r\n {\r\n name: 'loadGeneralInsights',\r\n value: 'LoadGeneralInsightsInCompetitionTab',\r\n },\r\n // Below activities are for performance logs.\r\n {\r\n name: 'mountChart',\r\n value: 'constructor to componentDidMount in chart',\r\n },\r\n {\r\n name: 'refreshChart',\r\n value: 'query of chart data source',\r\n },\r\n {\r\n name: 'findAll',\r\n value: 'non cached findAll of auction insight service',\r\n },\r\n ],\r\n }, {\r\n name: 'loadCompetitionRecommendation',\r\n value: 'LoadRecommendationInCompetitionTab',\r\n setting: {},\r\n activity: [\r\n // All trace logs will be under this activity.\r\n {\r\n name: 'loadCompetitionRecommendation',\r\n value: 'LoadRecommendationInCompetitionTab',\r\n },\r\n // Below activities are for performance logs.\r\n {\r\n name: 'getSummary',\r\n value: 'getsummary',\r\n },\r\n {\r\n name: 'getCoupons',\r\n value: 'getCoupons',\r\n },\r\n {\r\n name: 'getCount',\r\n value: 'getCount',\r\n },\r\n {\r\n name: 'track',\r\n value: 'track',\r\n },\r\n ],\r\n }],\r\n};\r\n","import { isTimeRangeValid } from '@bingads-webui-campaign/segmentation-utilities';\r\n\r\nimport {\r\n GENERAL_INSIGHTS_FEATURE_NAMES,\r\n CAMPAIGN_TYPES,\r\n getGeneralInsightsPreferences as getPreference,\r\n saveGeneralInsightsPreferences as savePreference,\r\n} from '@bingads-webui-campaign/competition-auction-insight-preferences';\r\n\r\nimport {\r\n PILL_CONTROL,\r\n GENERAL_INSIGHTS_DATA_TYPES,\r\n} from './consts';\r\n\r\n/**\r\n * Plugin preference for search grid and shopping grid:\r\n * Pill control type, Segment: shared\r\n * Filter, column chooser: not shared\r\n */\r\n\r\n// ensure fetchPreferenceForGeneralInsights is called first to initalize preferences service\r\nexport function getGeneralInsightsPreferences(preferencesService) {\r\n return getPreference(preferencesService);\r\n}\r\n\r\nexport function saveGeneralInsightsPreferences(data, preferencesService) {\r\n savePreference(preferencesService, data);\r\n}\r\n\r\nexport function getPillControlTypeFromPreferences(preferencesService) {\r\n const { pillControlType } = getGeneralInsightsPreferences(preferencesService);\r\n\r\n return pillControlType || PILL_CONTROL.overtime;\r\n}\r\n\r\nfunction getGridNameWithPillControlType(preferencesService) {\r\n const pillControlType = getPillControlTypeFromPreferences(preferencesService);\r\n\r\n return `${GENERAL_INSIGHTS_DATA_TYPES.Grid}_${pillControlType}`;\r\n}\r\n\r\nexport function getSegmentationData({\r\n activity,\r\n appState,\r\n getSegType,\r\n preferencesService,\r\n}) {\r\n const gridNameWithPillControlType = getGridNameWithPillControlType(preferencesService);\r\n const segType = getSegType(gridNameWithPillControlType);\r\n\r\n if (segType &&\r\n segType.segmentationType !== 'None'\r\n && isTimeRangeValid(segType.segmentationType, appState.get('$daterange'))) {\r\n return segType.segmentationType;\r\n }\r\n if (activity) {\r\n activity.trace(\r\n `time validation failed, fallback from ${segType && segType.segmentationType} to None`,\r\n 'getSegmentationData'\r\n );\r\n }\r\n return 'None';\r\n}\r\n\r\nexport function setSegmentationData({\r\n gridName,\r\n segType,\r\n setSegType,\r\n preferencesService,\r\n}) {\r\n // need to save different segment choice for summary and overtime for general insight grid.\r\n const gridNameWithPillControlType = getGridNameWithPillControlType(preferencesService);\r\n\r\n // Save for both pill type and grid\r\n setSegType(gridNameWithPillControlType, segType);\r\n // this is to support segment decorator logic.\r\n setSegType(gridName, segType);\r\n}\r\n\r\nexport function fetchPreferenceForGeneralInsights({\r\n campaignType,\r\n preferencesService,\r\n getSegPreference,\r\n fetchSortInfo,\r\n appState,\r\n getSegType,\r\n}) {\r\n let finalCampaignType = campaignType;\r\n\r\n // call getSegPreference second as its dependent on preferences initialize\r\n return preferencesService.initialize()\r\n .then(() => getSegPreference(getGridNameWithPillControlType(preferencesService)))\r\n .then(() => {\r\n if (finalCampaignType === null) {\r\n const { selectShoppingCampaignType } = getGeneralInsightsPreferences(preferencesService);\r\n if (selectShoppingCampaignType === true) {\r\n // clean the campaign type preference\r\n saveGeneralInsightsPreferences({\r\n selectShoppingCampaignType: false,\r\n }, preferencesService);\r\n finalCampaignType = CAMPAIGN_TYPES.Shopping;\r\n } else {\r\n finalCampaignType = CAMPAIGN_TYPES.Search;\r\n }\r\n }\r\n return fetchSortInfo(GENERAL_INSIGHTS_FEATURE_NAMES[finalCampaignType]);\r\n })\r\n .then(({ sortableHeader }) => {\r\n const result = {\r\n query: {\r\n query: {},\r\n },\r\n };\r\n\r\n result.query.query.SegmentationTypes = getSegmentationData({\r\n appState,\r\n getSegType,\r\n preferencesService,\r\n });\r\n result.query.query.PillControlType = getPillControlTypeFromPreferences(preferencesService);\r\n result.sortableHeader = sortableHeader;\r\n return {\r\n campaignType: finalCampaignType,\r\n gridConfig: result,\r\n };\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\nimport { isTimeRangeValid, segmentationType } from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { PILL_CONTROL } from './consts';\r\n\r\nconst supportedTimeSegments = [\r\n segmentationType.Day,\r\n segmentationType.Week,\r\n segmentationType.Month,\r\n segmentationType.Quarter,\r\n segmentationType.Year,\r\n];\r\n\r\nexport class GeneralInsightsSegmentationDecorator {\r\n constructor(alwaysAddSegment = false) {\r\n this.alwaysAddSegment = alwaysAddSegment;\r\n }\r\n\r\n addSegmentToQuery(queryParams = {}) {\r\n const query = _.result(queryParams, 'query', {});\r\n const pillControlType = query.PillControlType;\r\n const segType = query.SegmentationTypes;\r\n\r\n if (!this.alwaysAddSegment &&\r\n (pillControlType !== PILL_CONTROL.overtime || _.contains(supportedTimeSegments, segType))) {\r\n return queryParams;\r\n }\r\n\r\n const newSegment = this.getDefaultTimeSegment(query);\r\n\r\n const newQuery = _.defaults({\r\n SegmentationTypes: _.compact([segType, newSegment]),\r\n }, queryParams.query);\r\n\r\n return _.defaults(\r\n {\r\n query: newQuery,\r\n },\r\n queryParams\r\n );\r\n }\r\n\r\n getDefaultTimeSegment(queryDateRange) {\r\n const dateRange =\r\n {\r\n start: new Date(queryDateRange.startDate),\r\n end: new Date(queryDateRange.endDate),\r\n };\r\n\r\n // Find smallest valid date segmentation\r\n const dateSegmentations = [\r\n segmentationType.Day,\r\n segmentationType.Week,\r\n segmentationType.Month,\r\n segmentationType.Quarter,\r\n segmentationType.Year,\r\n ];\r\n\r\n return _.find(\r\n dateSegmentations,\r\n dateSegmentation => isTimeRangeValid(dateSegmentation, dateRange)\r\n );\r\n }\r\n\r\n /* istanbul ignore next */\r\n run(queryParams) {\r\n return Promise.resolve(this.addSegmentToQuery(queryParams));\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\n\r\nfunction processFilterIds(ids) {\r\n return _.map(ids, id => ({\r\n Id: id,\r\n Name: id,\r\n }));\r\n}\r\n\r\nexport class DisplayDomainDataSource {\r\n constructor({\r\n dataService,\r\n }) {\r\n this.auctionInsightService = dataService;\r\n }\r\n\r\n get(viewFilter, searchFilter, ids) {\r\n const data = this.auctionInsightService.getNormalizedData();\r\n let displayDomains = _.filter(_.unique(_.pluck(data, 'DisplayDomain')), domain => domain !== 'You');\r\n if (searchFilter) {\r\n displayDomains =\r\n _.filter(displayDomains, displayDomain => displayDomain.indexOf(searchFilter) >= 0);\r\n }\r\n\r\n if (ids) {\r\n displayDomains = _.intersection(displayDomains, ids);\r\n }\r\n\r\n return Promise.resolve(processFilterIds(displayDomains));\r\n }\r\n\r\n getByIds(ids = []) {\r\n return Promise.resolve(processFilterIds(ids));\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport { entitySchema } from '@bingads-webui-campaign/auction-insight-service';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport {\r\n selectorStyleOptions,\r\n selectorKeyMapFunc,\r\n handleFilterChange,\r\n} from '@bingads-webui-campaign-react/campaign-adgroup-selector-filter';\r\nimport {\r\n CAMPAIGN_TYPES,\r\n} from '@bingads-webui-campaign/competition-auction-insight-preferences';\r\n\r\nimport { DisplayDomainDataSource } from './display-domain-data-source';\r\n\r\nfunction handleFilterChangeForDisplayDomain({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n}) {\r\n handleFilterChange({\r\n viewFilter,\r\n searchFilter,\r\n stats,\r\n dataSource,\r\n selector,\r\n missingDataHandler: ({ data, missingIds }) => {\r\n const missingData = [];\r\n _.each(missingIds, (missingId) => {\r\n missingData.push({\r\n Id: missingId,\r\n Name: missingId,\r\n });\r\n });\r\n\r\n return missingData.concat(data);\r\n },\r\n });\r\n}\r\n\r\nexport function updateDisplayDomainSchema({\r\n dataService, campaignType, i18n, permissions,\r\n}) {\r\n const schemaForFilter = cloneDeep(entitySchema);\r\n let title = '';\r\n\r\n // piloted properties\r\n if (!permissions.IsAvgPositionDeprecationPhase1Enabled) {\r\n schemaForFilter.properties = _.omit(schemaForFilter.properties, 'AbsoluteTopOfPageRate');\r\n }\r\n if (permissions.IsAvgPositionDeprecationPhase2Enabled) {\r\n schemaForFilter.properties = _.omit(schemaForFilter.properties, 'AveragePosition');\r\n }\r\n\r\n // for shopping, we only show a few columns and title is different for property displaydomain.\r\n if (campaignType === CAMPAIGN_TYPES.Shopping) {\r\n title = i18n.getString('Schema_AuctionInsight_Property_StoreDisplayName');\r\n schemaForFilter.properties = _.omit(schemaForFilter.properties, 'AveragePosition', 'AboveRate', 'TopOfPageRate');\r\n }\r\n\r\n schemaForFilter.properties.DisplayDomain = _.extend(schemaForFilter.properties.DisplayDomain, {\r\n title,\r\n type: 'id',\r\n addtionalParams: {\r\n dataSource: new DisplayDomainDataSource({ dataService }),\r\n selectorOptions: {\r\n filter: {\r\n showSelected: true,\r\n showChanged: false,\r\n },\r\n handleFilterChange: handleFilterChangeForDisplayDomain,\r\n keyMap: selectorKeyMapFunc(i18n),\r\n styles: selectorStyleOptions,\r\n },\r\n },\r\n });\r\n\r\n return schemaForFilter;\r\n}\r\n","/* eslint-disable import/no-unresolved */\r\n/* eslint-disable import/extensions */\r\nimport { entitySchema } from '@bingads-webui-campaign/auction-insight-service';\r\nimport { getCampaignAdgroupSelectorFilterConfig } from '@bingads-webui-campaign-react/campaign-adgroup-selector-filter';\r\n\r\nimport { updateDisplayDomainSchema } from './schema-processors';\r\n\r\nexport function getFilterConfig({\r\n scope = {},\r\n dataService,\r\n campaignType,\r\n featureName,\r\n existingCampaignFilter,\r\n sessionStore,\r\n preferenceStoreFactory,\r\n cacheService,\r\n dataContextManager,\r\n edmCampaign,\r\n jsdata,\r\n i18n,\r\n permissions,\r\n customizedGenerateSchemaForAdGroupProperty,\r\n customizedGenerateSchemaForCampaignProperty,\r\n generateSchemaForAccountProperty,\r\n preferenceService,\r\n}) {\r\n const customizedSchemaForProcessor = updateDisplayDomainSchema({\r\n dataService, campaignType, i18n, permissions,\r\n });\r\n\r\n return getCampaignAdgroupSelectorFilterConfig({\r\n scope,\r\n entitySchema,\r\n featureName,\r\n i18n,\r\n sessionStore,\r\n preferenceStoreFactory,\r\n customizedSchemaForProcessor,\r\n cacheService,\r\n dataContextManager,\r\n edmCampaign,\r\n jsdata,\r\n existingCampaignFilter,\r\n customizedGenerateSchemaForAdGroupProperty,\r\n customizedGenerateSchemaForCampaignProperty,\r\n generateSchemaForAccountProperty,\r\n preferenceService,\r\n });\r\n}\r\n","import { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport pkg from './package.json';\r\n\r\nexport const { version } = pkg;\r\n\r\nexport default globalContext.define(\r\n pkg.legacyDependencies,\r\n Promise => import(/* webpackMode: 'eager' */ './src/index') // eslint-disable-line no-unused-vars\r\n);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { AdvisorChartWithMetrics, CHART_TYPES } from '@bingads-webui-campaign-react/advisor-chart';\r\n\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/dashboard-cards');\r\n\r\nexport class CompetitionTile extends React.PureComponent {\r\n static defaultProps = {\r\n domains: null,\r\n };\r\n\r\n static propTypes = {\r\n chartData: PropTypes.shape({\r\n totalCount: PropTypes.number.isRequired,\r\n items: PropTypes.array.isRequired,\r\n }).isRequired,\r\n domains: PropTypes.arrayOf(PropTypes.string),\r\n metric: PropTypes.string.isRequired,\r\n chartType: PropTypes.oneOf(_.values(CHART_TYPES)).isRequired,\r\n };\r\n\r\n render() {\r\n const { totalCount, items } = this.props.chartData;\r\n if (totalCount > 0) {\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n return (null);\r\n }\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport { BaseView } from '@bingads-webui/base-view';\r\nimport { Selector } from '@bingads-webui/selector';\r\nimport { focusLockInstanceDecorator } from '@bingads-webui/focus-lock-decorator';\r\n\r\nimport domainSelectorTemplate from './domain-selector-template.pug';\r\nimport domainSelectorHeaderTemplate from './domain-selector-header-template.pug';\r\n\r\nconst SELECTOR_CHECK_STATES = {\r\n checked: 'checked',\r\n unchecked: 'unchecked',\r\n};\r\n\r\nexport class DomainSelectorView extends BaseView {\r\n /**\r\n * Initializes a new instance of DomainSelectorView.\r\n * @param {Object} options.i18n - Localization component.\r\n * @param {boolean} [options.allowCheckAll=true] - Set to true to enable select all checkbox.\r\n * @param {int} [options.itemsDisplayLimit=50] - Max number of items to display in the selector.\r\n * @param {int} [options.itemsCheckedLimit=4] - Max number of items that can be checked. For\r\n * unlimited, set to zero.\r\n * @returns {void}\r\n */\r\n initialize({\r\n i18n,\r\n allowCheckAll = true,\r\n itemsDisplayLimit = 50,\r\n itemsCheckedLimit = 4,\r\n }) {\r\n this.i18n = i18n;\r\n this.domains = [];\r\n this.previouslyCheckedIds = [];\r\n\r\n this.allowCheckAll = allowCheckAll;\r\n this.itemsDisplayLimit = itemsDisplayLimit;\r\n this.itemsCheckedLimit = itemsCheckedLimit;\r\n }\r\n\r\n updateData({ items }) {\r\n this.domains = _.chain(items)\r\n .pluck('DisplayDomain')\r\n .without('You')\r\n .value();\r\n this.previouslyCheckedIds = [];\r\n\r\n this.renderSelector();\r\n }\r\n\r\n updateButton(domains) {\r\n let text = this.i18n.getString('AuctionInsights_Domain_Selector_Empty');\r\n\r\n if (!_.isEmpty(domains)) {\r\n text = this.i18n.getString('AuctionInsights_Domain_Selector_Template', { count: _.size(domains) });\r\n }\r\n\r\n this.$('.button-label').text(text);\r\n }\r\n\r\n render() {\r\n this.$el.html(domainSelectorTemplate({ i18n: this.i18n }));\r\n this.$('.dropdown').on('show.bs.dropdown', () => this.renderSelector());\r\n\r\n // subscribe to show/hide events (necessary to enable text input in the overview card)\r\n this.$('.dropdown').on('show.bs.dropdown', () => { this.trigger('dropdownVisible', true); });\r\n this.$('.dropdown').on('hide.bs.dropdown', () => { this.trigger('dropdownVisible', false); });\r\n\r\n this.renderSelector();\r\n this.updateButton();\r\n\r\n // bind to selection changes\r\n this.on('selectionChanged', (domains) => {\r\n this.updateButton(domains);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n renderSelector() {\r\n this.removeSelector();\r\n\r\n this.$('.dropdown button').prop('disabled', _.isEmpty(this.domains));\r\n\r\n if (_.isEmpty(this.domains)) {\r\n return;\r\n }\r\n\r\n this.selector = new Selector({\r\n i18n: this.i18n,\r\n styles: {\r\n searchIcon: ['glyphicon', 'filter_search_icon_small'],\r\n list: ['table--fixed-layout', 'table--no-border'],\r\n nameColumn: ['table__cell--menu-item-style', 'table__cell--ellipsis-overflow'],\r\n searchBoxAriaLabel: this.i18n.getString('Search by competitor name'),\r\n listAttributes: { role: 'presentation' },\r\n checkboxColumn: ['table__cell--menu-item-style', 'table__cell--icon', 'legacy-competitor-selector-checkbox', 'clickable'],\r\n checkboxAttributes: { role: 'checkbox', tabindex: 0 },\r\n },\r\n busyIndicator: {\r\n enabled: true,\r\n },\r\n filter: {\r\n enabled: false,\r\n showSelected: false,\r\n showChanged: false,\r\n },\r\n showNoDataMessage: true,\r\n allowCheckAll: this.allowCheckAll,\r\n data: {\r\n itemsDisplayLimit: this.itemsDisplayLimit,\r\n },\r\n });\r\n\r\n this.selector.on('request:data', ({ searchFilter }) => {\r\n const data = _.chain(this.domains)\r\n .map((Name, Id) => {\r\n if (searchFilter && Name.indexOf(searchFilter) === -1) {\r\n return undefined;\r\n }\r\n return {\r\n Id,\r\n Name,\r\n };\r\n })\r\n .compact()\r\n .value();\r\n\r\n this.selector.setData(data);\r\n });\r\n\r\n this.selector.on('change:selection', ({ checked }) => {\r\n let hasSelectionChanged = true;\r\n let checkedIds = _.pluck(checked, 'id');\r\n\r\n if (this.itemsCheckedLimit > 0) {\r\n hasSelectionChanged = this.uncheckDomainsIfCheckedLimitExceeded(checkedIds);\r\n checkedIds = this.previouslyCheckedIds;\r\n }\r\n\r\n if (hasSelectionChanged) {\r\n const domainNames = _.map(checkedIds, id => this.domains[id]);\r\n this.trigger('selectionChanged', domainNames);\r\n }\r\n });\r\n\r\n this.FocusLockSelector = focusLockInstanceDecorator(this.selector.render(), {\r\n focusFirstItemOnMount: true,\r\n }, {\r\n managed: true,\r\n });\r\n this.focusLockSelectorView = new this.FocusLockSelector();\r\n\r\n this.$('.dropdown-menu').html(this.focusLockSelectorView.render().el);\r\n\r\n // render custom title\r\n this.$('.selector__main')\r\n .prepend(domainSelectorHeaderTemplate({ i18n: this.i18n }));\r\n }\r\n\r\n /**\r\n * Remembers the previous list of checked items and checks it against the current list.\r\n * If the number of checked items exceeds itemsCheckedLimit, uncheck the most recently checked\r\n * items so that limit is met.\r\n * @param {int[]} checkedIds - Array of ids that have been checked.\r\n * @returns {boolean} True if selection has changed from previous state.\r\n */\r\n uncheckDomainsIfCheckedLimitExceeded(checkedIds) {\r\n const numItemsToUncheck = _.size(checkedIds) - this.itemsCheckedLimit;\r\n if (numItemsToUncheck > 0) {\r\n // calculate the newly checked ids\r\n const newlyCheckedIds = _.difference(checkedIds, this.previouslyCheckedIds);\r\n\r\n // from newlyCheckedIds, pick the last items to uncheck\r\n let itemsToUncheck;\r\n let itemsToKeepChecked;\r\n if (_.size(newlyCheckedIds) > numItemsToUncheck) {\r\n // uncheck only a subset of newlyChecked\r\n itemsToKeepChecked = _.first(newlyCheckedIds, _.size(newlyCheckedIds) - numItemsToUncheck);\r\n itemsToUncheck = _.last(newlyCheckedIds, numItemsToUncheck);\r\n } else {\r\n // uncheck everything in newlyChecked\r\n itemsToUncheck = newlyCheckedIds;\r\n }\r\n\r\n if (itemsToKeepChecked) {\r\n // if unchecking only a subset of newlyCheckedId, track the new domains that remain checked\r\n this.previouslyCheckedIds.push(...itemsToKeepChecked);\r\n }\r\n\r\n // update the selector component with a new checkmap\r\n const { checkMap } = this.selector;\r\n _.each(itemsToUncheck, (id) => {\r\n checkMap[id].state = SELECTOR_CHECK_STATES.unchecked;\r\n });\r\n this.selector.setCheckMap(checkMap);\r\n\r\n // true if the selection changed from previous state, false if selection is the same\r\n return _.isArray(itemsToKeepChecked);\r\n }\r\n\r\n // nothing to uncheck\r\n this.previouslyCheckedIds = checkedIds;\r\n return true;\r\n }\r\n\r\n remove() {\r\n this.removeSelector();\r\n\r\n return super.remove();\r\n }\r\n\r\n removeSelector() {\r\n if (this.selector) {\r\n this.selector.remove();\r\n this.selector = null;\r\n }\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport _ from 'underscore';\r\nimport { BaseView } from '@bingads-webui/base-view';\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\nimport { uncheckedInjectionContext as globalContext } from '@bingads-webui-campaign/injection-context';\r\nimport { FilterService } from '@bingads-webui/filter-service';\r\nimport {\r\n METRICS,\r\n getLocalizedMetrics\r\n} from '@bingads-webui-campaign-react/advisor-chart';\r\nimport {\r\n CAMPAIGN_TYPES,\r\n METRIC_PREFERENCE_KEY_NAME,\r\n GENERAL_INSIGHTS_FEATURE_NAMES,\r\n} from '@bingads-webui-campaign/competition-auction-insight-preferences';\r\n\r\nimport {\r\n fetchPreferenceForGeneralInsights,\r\n getGeneralInsightsPreferences,\r\n saveGeneralInsightsPreferences,\r\n getFilterConfig,\r\n instrumentationSchema,\r\n} from '@bingads-webui-campaign-react/competition-core';\r\n\r\nimport { CompetitionTile } from './competition-tile';\r\nimport competitionTileTemplate from './competition-tile-template.pug';\r\nimport { DomainSelectorView } from './domain-selector';\r\n\r\nconst i18n = globalContext.require('@bingads-webui/i18n-amd-loader!campaignui/feature/dashboard-cards');\r\nconst instrumentation = globalContext.requireDefault('campaignui/feature/instrumentation/index');\r\nconst appConfig = globalContext.require('component/config/index');\r\nconst appState = globalContext.require('component/state/index');\r\nconst dateUtil = globalContext.require('component/humanize/date');\r\nconst { fetchSortInfo } = globalContext.require('component/bingads-grid/service/fetch-sortinfo');\r\nconst sessionStore = globalContext.requireDefault('component/js-data-storage/session-storage');\r\nconst preferenceStoreFactory = globalContext.require('component/bingads-grid/service/filter-preferences').getFilters;\r\nconst cacheService = globalContext.require('Services/CacheService');\r\nconst dataContextManager = globalContext.require('SummaryDataContextManager');\r\nconst edmCampaign = globalContext.requireDefault('component/edm-campaign/index');\r\nconst jsdata = globalContext.require('component/js-data-campaign/index');\r\nconst preferencesService = globalContext.requireDefault('component/preference/service/index');\r\nconst { getSegPreference, getSegType } = globalContext.require('component/bingads-grid/service/segmentation-preferences');\r\n\r\nconst permissions = appConfig.get('Permissions');\r\n\r\nexport class CompetitionTileView extends BaseView {\r\n initialize(options) {\r\n this.options = options;\r\n this.state = {\r\n metric: null,\r\n chartData: {\r\n totalCount: 0,\r\n items: [],\r\n },\r\n domains: null,\r\n chartType: 'SmallTile',\r\n };\r\n\r\n // should set first as some below codes depending on it.\r\n this.campaignType = this.options.scope.campaignType;\r\n this.metricPreferenceKeyName = METRIC_PREFERENCE_KEY_NAME[this.campaignType];\r\n\r\n this.fetchPreferenceToken = this.options.preexecuteFlag ? null :\r\n createAsyncToken(fetchPreferenceForGeneralInsights({\r\n campaignType: this.campaignType,\r\n preferencesService,\r\n getSegPreference,\r\n fetchSortInfo,\r\n appState,\r\n getSegType,\r\n }))\r\n .on({\r\n onSuccess: () => {\r\n const preferences = getGeneralInsightsPreferences(preferencesService);\r\n const availableMetrics = _.map(this.getLocalizedMetrics(), item => item.metric);\r\n let selectedMetric = preferences[this.metricPreferenceKeyName]\r\n || METRICS.ImpressionShare;\r\n\r\n if (!_.contains(availableMetrics, selectedMetric)) {\r\n selectedMetric = METRICS.ImpressionShare;\r\n\r\n _.defer(() => {\r\n saveGeneralInsightsPreferences({\r\n [this.metricPreferenceKeyName]: selectedMetric,\r\n }, preferencesService);\r\n });\r\n }\r\n this.trigger('initialMetric', selectedMetric);\r\n },\r\n });\r\n\r\n this.initializeInstrumentation();\r\n this.dataService = options.getAuctionInsightDataService(this.options.scope);\r\n\r\n this.chartDataSource = options.getDataSource({\r\n dataService: this.dataService,\r\n });\r\n\r\n if (!options.preexecuteFlag) {\r\n this.refreshDataAsync();\r\n }\r\n\r\n // initializeChildren\r\n this.setChild('selector', new DomainSelectorView({\r\n i18n,\r\n }));\r\n }\r\n\r\n initializeInstrumentation() {\r\n instrumentation.addScenario(instrumentationSchema);\r\n this.currentScenario = instrumentation.loadGeneralInsights.create();\r\n this.currentActivity = this.currentScenario.loadGeneralInsights.create();\r\n }\r\n\r\n saveDomainFilter() {\r\n // if the user selected any domains, save them as the current filter\r\n if (!_.isEmpty(this.state.domains)) {\r\n const filterService = new FilterService(getFilterConfig({\r\n scope: this.scope,\r\n appState,\r\n dateUtil,\r\n sessionStore,\r\n preferenceStoreFactory,\r\n cacheService,\r\n dataContextManager,\r\n edmCampaign,\r\n jsdata,\r\n i18n,\r\n permissions,\r\n featureName: GENERAL_INSIGHTS_FEATURE_NAMES[this.campaignType],\r\n }));\r\n filterService.setEditableFilter(\r\n { DisplayDomain: { $in: this.state.domains } },\r\n ''\r\n );\r\n }\r\n }\r\n\r\n refreshDataAsync() {\r\n if (this.options.preexecuteFlag) {\r\n return;\r\n }\r\n\r\n this.currentActivity.trace('start refresh chart data', 'CompetitionTile/refreshData');\r\n const refreshChartActivity = this.currentScenario.refreshChart.create();\r\n\r\n refreshChartActivity.start();\r\n this.trigger('willFetchData');\r\n this.fetchError = false;\r\n this.refreshDataToken = createAsyncToken(this.chartDataSource.query())\r\n .on({\r\n onSuccess: (chartData) => {\r\n this.currentActivity.trace('end refresh chart data', 'CompetitionTile/refreshData');\r\n refreshChartActivity.stop();\r\n this.trigger('initialData', _.result(chartData, 'totalCount', 0));\r\n _.each(chartData.items, (item) => {\r\n if (item.DisplayDomain === 'You') {\r\n item.LocalizedDisplayDomain = i18n.getString('AuctionInsights_You'); // eslint-disable-line\r\n }\r\n });\r\n this.updateState({ chartData });\r\n this.options.clearCache();\r\n },\r\n onError: () => {\r\n this.fetchError = true;\r\n this.render();\r\n this.trigger('fetchError');\r\n this.options.clearCache();\r\n },\r\n onCancel: () => {\r\n this.options.clearCache();\r\n },\r\n });\r\n }\r\n\r\n getLocalizedMetrics() {\r\n return getLocalizedMetrics(\r\n i18n, this.isShoppingCampaignTypeSet(),\r\n permissions.IsAvgPositionDeprecationPhase1Enabled,\r\n permissions.IsAvgPositionDeprecationPhase2Enabled\r\n );\r\n }\r\n\r\n isShoppingCampaignTypeSet() {\r\n return this.campaignType === CAMPAIGN_TYPES.Shopping;\r\n }\r\n\r\n render() {\r\n this.$el.html(competitionTileTemplate({ i18n, fetchError: this.fetchError }));\r\n\r\n this.$('.domain-selector').html(this.getChild('selector').render().$el);\r\n this.getChild('selector').on('selectionChanged', (domains) => {\r\n this.updateState({ domains });\r\n });\r\n\r\n this.updateChart();\r\n this.updateDomainSelector();\r\n\r\n return this;\r\n }\r\n\r\n updateState({\r\n metric = null,\r\n chartData = null,\r\n domains = null,\r\n chartType = null,\r\n }) {\r\n if (metric) {\r\n if (this.state.metric && this.state.metric !== metric) {\r\n saveGeneralInsightsPreferences({\r\n [this.metricPreferenceKeyName]: metric,\r\n }, preferencesService);\r\n }\r\n this.state.metric = metric;\r\n }\r\n\r\n if (chartData) {\r\n this.state.chartData = chartData;\r\n }\r\n\r\n if (domains) {\r\n this.state.domains = domains;\r\n }\r\n\r\n if (chartType) {\r\n this.state.chartType = chartType;\r\n }\r\n\r\n // rerender components\r\n this.updateChart();\r\n\r\n if ((chartData || metric) && this.state.chartData && this.state.metric) {\r\n this.updateDomainSelector();\r\n }\r\n }\r\n\r\n updateDomainSelector() {\r\n // Don't update if metric is null.\r\n if (this.state.metric !== null) {\r\n this.getChild('selector').updateData(this.state.chartData);\r\n }\r\n }\r\n\r\n updateChart() {\r\n // Don't update if metric is null.\r\n if (this.state.metric !== null) {\r\n ReactDOM.render(\r\n (\r\n \r\n ), this.$('.graph')[0]\r\n );\r\n }\r\n }\r\n\r\n remove() {\r\n if (this.refreshDataToken) this.refreshDataToken.cancel();\r\n if (this.fetchPreferenceToken) this.fetchPreferenceToken.cancel();\r\n ReactDOM.unmountComponentAtNode(this.$('.graph')[0]);\r\n return super.remove();\r\n }\r\n}\r\n","/* eslint-disable no-script-url */\r\n/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { fromLegacyTimeZone, toIANATimeZone } from '@bingads-webui-universal/time-zone-converter';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n AUTO_APPLY_TYPES_NAMES,\r\n SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { getAutpApplyBannerStyle } from './style/apply-banner-style';\r\n\r\nclass RecommendationAutpApplyBanner extends React.PureComponent {\r\n static propTypes = {\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n applyDate: PropTypes.number.isRequired,\r\n recommendationsCount: PropTypes.number.isRequired,\r\n appConfig: PropTypes.objectOf(PropTypes.any).isRequired,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isFromSummary: PropTypes.bool,\r\n classes: PropTypes.objectOf(PropTypes.string).isRequired,\r\n callback: PropTypes.func,\r\n initializeMiniGrid: PropTypes.func,\r\n campaignAutoApplyStatus: PropTypes.shape({\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: PropTypes.string,\r\n }),\r\n type: PropTypes.string.isRequired,\r\n optInStatus: PropTypes.bool.isRequired,\r\n permissions: PropTypes.shape({}),\r\n isAutoApplyRecommendationEnabled: PropTypes.bool.isRequired,\r\n viewSettings: PropTypes.func.isRequired,\r\n };\r\n\r\n static defaultProps = {\r\n campaignAutoApplyStatus: {},\r\n isFromSummary: false,\r\n callback: _.noop,\r\n initializeMiniGrid: _.noop,\r\n permissions: {},\r\n };\r\n\r\n componentDidMount() {\r\n const {\r\n isFromSummary,\r\n initializeMiniGrid,\r\n } = this.props;\r\n\r\n if (isFromSummary) {\r\n initializeMiniGrid();\r\n }\r\n }\r\n\r\n getAutoApplyString = () => {\r\n const {\r\n newI18n,\r\n applyDate,\r\n recommendationsCount,\r\n type,\r\n optInStatus,\r\n isAutoApplyRecommendationEnabled,\r\n } = this.props;\r\n\r\n let applyDateStr;\r\n let autoApplyPitching;\r\n if (isAutoApplyRecommendationEnabled) {\r\n applyDateStr = optInStatus && applyDate !== 0 ? this.formatDateWithAccountTimeZone(applyDate.toString()) : '';\r\n autoApplyPitching = !_.isEmpty(applyDateStr) ?\r\n newI18n.getString(\r\n recommendationsCount > 1 ? _TL_('{{recommendationsCount}} recommendations will apply on {{applyDateStr}} or later.') :\r\n _TL_('{{recommendationsCount}} recommendation will apply on {{applyDateStr}} or later.'),\r\n { recommendationsCount, applyDateStr }\r\n ) : newI18n.getString(\r\n recommendationsCount > 1 ? _TL_('{{recommendationsCount}} recommendations will apply later.') :\r\n _TL_('{{recommendationsCount}} recommendation will apply later.'),\r\n { recommendationsCount }\r\n );\r\n } else {\r\n applyDateStr = this.formatDateWithAccountTimeZone(_.isNumber(applyDate) ?\r\n applyDate.toString() : '');\r\n autoApplyPitching = newI18n.getString(\r\n _TL_('{{recommendationsCount}} {{recommendationName}} will apply on {{applyDateStr}} or later.'),\r\n { recommendationsCount, recommendationName: AUTO_APPLY_TYPES_NAMES[type], applyDateStr }\r\n );\r\n }\r\n\r\n return autoApplyPitching;\r\n }\r\n\r\n formatDateWithAccountTimeZone = (applyDateStr, timeZone = null) => {\r\n const { i18n, appConfig } = this.props;\r\n const applyDate = i18n.parseDate(`${applyDateStr.substring(0, 4)}/${applyDateStr.substring(4)}`, { raw: 'yyyy/MMddHHmmss', timeZone: 'UTC' });\r\n const accountTimeZone = toIANATimeZone(fromLegacyTimeZone(_.isNull(timeZone)\r\n ? appConfig.get('AccountTimeZone')\r\n : timeZone));\r\n\r\n // if applyDate is a past date, show current date instead.\r\n return i18n.formatDate(_.max([applyDate, new Date()]), { timeZone: accountTimeZone });\r\n }\r\n\r\n render() {\r\n const {\r\n newI18n,\r\n campaignAutoApplyStatus,\r\n isFromSummary,\r\n classes,\r\n callback,\r\n type,\r\n isAutoApplyRecommendationEnabled,\r\n viewSettings,\r\n } = this.props;\r\n\r\n if (campaignAutoApplyStatus[type] !== 'true') {\r\n return null;\r\n }\r\n\r\n if (!isFromSummary) {\r\n callback(campaignAutoApplyStatus);\r\n }\r\n\r\n const autoApplyString = this.getAutoApplyString();\r\n\r\n return (\r\n
    \r\n \r\n \r\n {autoApplyString}\r\n {!isFromSummary &&\r\n \r\n {` ${newI18n.getString(_TL_('Manage auto-apply preferences in'))}`}\r\n viewSettings(_.contains(SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES, type))}\r\n >\r\n {isAutoApplyRecommendationEnabled &&\r\n _.contains(SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES, type) ?\r\n newI18n.getString(_TL_('Auto-apply recommendation settings.')) : newI18n.getString(_TL_('Account settings.'))\r\n }\r\n \r\n \r\n }\r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport const StyledRecommendationAutpApplyBanner =\r\n withDefaultStyles(RecommendationAutpApplyBanner, getAutpApplyBannerStyle);\r\n","/* eslint-disable no-unused-vars */\r\nexport const getAutpApplyBannerStyle = (_, { palette = {} }) => ({\r\n recommendationAutoApplyBanner: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n background: '#F7F7F7',\r\n paddingLeft: 24,\r\n '& .iconba': {\r\n marginRight: 5,\r\n },\r\n '& button.settings-page-link.btn-link': {\r\n color: palette.themePrimary,\r\n },\r\n },\r\n});\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport {\r\n formatCost,\r\n CONTEXTUAL_DELIVERY_STATUS,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.campaignDeliveryStatusTitle = ko.observable('');\r\n this.campaignDeliveryStatus = ko.observable('');\r\n this.campaignType = ko.observable('');\r\n this.campaignBudget = ko.observable('');\r\n this.campaignBiddingType = ko.observable('');\r\n this.eligibleStatusIcon = ko.observable(false);\r\n this.showStatusIcon = ko.observable(false);\r\n }\r\n\r\n updateAttribute({\r\n campaignDeliveryStatus,\r\n campaignType,\r\n campaignBudget,\r\n campaignBiddingType,\r\n }) {\r\n const { i18n } = this;\r\n this.campaignDeliveryStatusTitle(i18n.getString('Campaign_Delivery_Status'));\r\n this.campaignDeliveryStatus(_.contains(CONTEXTUAL_DELIVERY_STATUS, campaignDeliveryStatus) ?\r\n i18n.getString(`Label_DeliveryStatus_${campaignDeliveryStatus}`) :\r\n i18n.getString('Contextual_Response_Null'));\r\n this.campaignType(i18n.getString('Campaign_Type', {\r\n campaignType: campaignType ?\r\n i18n.getString(`CampaignType_${campaignType}`) :\r\n i18n.getString('Contextual_Response_Null'),\r\n }));\r\n this.campaignBudget(i18n.getString('Campaign_Budget', {\r\n campaignBudget: campaignBudget ?\r\n i18n.getString('Campaign_Budget_Value', {\r\n campaignBudget: formatCost(campaignBudget, i18n, i18n.currency),\r\n }) :\r\n i18n.getString('Contextual_Response_Null'),\r\n }));\r\n this.campaignBiddingType(i18n.getString('Campaign_Bidding_Type', {\r\n campaignBiddingType: campaignBiddingType ?\r\n i18n.getString(`BidStrategy_${campaignBiddingType}`) :\r\n i18n.getString('Contextual_Response_Null'),\r\n }));\r\n\r\n if (this.campaignDeliveryStatus() !== i18n.getString('Contextual_Response_Null')) {\r\n this.showStatusIcon(true);\r\n }\r\n if (this.campaignDeliveryStatus() === i18n.getString('EntityStatus_Eligible')) {\r\n this.eligibleStatusIcon(true);\r\n }\r\n }\r\n}\r\n","import { CheckDocBottomMargin } from '@bingads-webui-campaign/recommendation-core';\r\n\r\n/**\r\n * set postion of el to top if bottom space is not enough else set it at bottom\r\n * @param {object} $el - element\r\n * @returns {void}\r\n */\r\nexport function setPosition($el) {\r\n $el.css('top', '');\r\n $el.css('bottom', '');\r\n $el.css('margin-top', '');\r\n $el.css('margin-bottom', '');\r\n if (!CheckDocBottomMargin($el, 50)) {\r\n $el.css('bottom', '100%');\r\n $el.css('margin-bottom', '5px');\r\n } else {\r\n $el.css('top', '100%');\r\n $el.css('margin-top', '5px');\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport $ from 'jquery';\r\n\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport ViewModel from './campaignModel';\r\nimport template from './campaign.pug';\r\nimport { setPosition } from './const';\r\n\r\nexport class CampaignContextualAttributeView extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.campaignId = targetId;\r\n this.viewModel = new ViewModel({\r\n i18n,\r\n });\r\n }\r\n\r\n\r\n render() {\r\n const {\r\n deps,\r\n campaignId,\r\n i18n,\r\n } = this;\r\n\r\n this.$el.html(template({ i18n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n const container = this.$el.children('.contextual-tooltip-container');\r\n setPosition(container);\r\n\r\n deps.jsdata.Campaign.findAll({\r\n limit: 1,\r\n select: ['DeliveryStatus', 'CampaignType', 'Budget', 'BiddingScheme'],\r\n where: { Id: { $eq: campaignId } },\r\n }).then((response) => {\r\n if (response.length && response.length > 0) {\r\n this.viewModel.updateAttribute({\r\n campaignDeliveryStatus: response[0].DeliveryStatus,\r\n campaignType: response[0].CampaignType,\r\n campaignBudget: response[0].Budget ? response[0].Budget.Amount : null,\r\n campaignBiddingType: response[0].BiddingScheme ? response[0].BiddingScheme.Type : null,\r\n });\r\n setPosition(container);\r\n }\r\n }).finally(withUiBlock($(`.${this.el.className} .contextual-content`)));\r\n return this;\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport {\r\n formatInteger,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.campaignsCount = ko.observable('');\r\n }\r\n\r\n updateAttribute({ campaignsCount }) {\r\n const { i18n } = this;\r\n this.campaignsCount(i18n.getString(\r\n 'Shared_Budget_Recommendation_CampaignCount',\r\n { campaignsCount: formatInteger(campaignsCount, this.i18n) }\r\n ));\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport ViewModel from './sharedBudgetModel';\r\nimport template from './sharedBudget.pug';\r\nimport { setPosition } from './const';\r\n\r\nexport class SharedBudgetContextualAttributeView extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.sharedBudgetId = targetId;\r\n this.viewModel = new ViewModel({\r\n i18n,\r\n });\r\n }\r\n\r\n\r\n render() {\r\n const {\r\n deps,\r\n sharedBudgetId,\r\n i18n,\r\n } = this;\r\n\r\n deps.jsdata.Budget.findAll({\r\n limit: 1,\r\n select: ['AssociationCount'],\r\n where: { Id: { $eq: sharedBudgetId } },\r\n }).then((response) => {\r\n if (response.length && response.length > 0) {\r\n this.viewModel.updateAttribute({\r\n campaignsCount: response[0].AssociationCount,\r\n });\r\n this.$el.html(template({ i18n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n const container = this.$el.children('.contextual-tooltip-container');\r\n\r\n setPosition(container);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { CONTEXTUAL_DELIVERY_STATUS } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.adgroupDeliveryStatusTitle = ko.observable('');\r\n this.adgroupDeliveryStatus = ko.observable('');\r\n this.eligibleStatusIcon = ko.observable(false);\r\n this.showStatusIcon = ko.observable(false);\r\n }\r\n\r\n updateAttribute({\r\n adgroupDeliveryStatus,\r\n }) {\r\n const { i18n } = this;\r\n this.adgroupDeliveryStatusTitle(i18n.getString('AdGroup_Delivery_Status'));\r\n this.adgroupDeliveryStatus(_.contains(CONTEXTUAL_DELIVERY_STATUS, adgroupDeliveryStatus) ?\r\n i18n.getString(`Label_DeliveryStatus_${adgroupDeliveryStatus}`) :\r\n i18n.getString('Contextual_Response_Null'));\r\n\r\n if (this.adgroupDeliveryStatus() !== i18n.getString('Contextual_Response_Null')) {\r\n this.showStatusIcon(true);\r\n }\r\n if (this.adgroupDeliveryStatus() === i18n.getString('EntityStatus_Eligible')) {\r\n this.eligibleStatusIcon(true);\r\n }\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\n\r\nimport ViewModel from './adgroupModel';\r\nimport template from './adgroup.pug';\r\nimport { setPosition } from './const';\r\n\r\nexport class AdGroupContextualAttributeView extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.adgroupId = targetId;\r\n this.viewModel = new ViewModel({\r\n i18n,\r\n });\r\n }\r\n\r\n\r\n render() {\r\n const {\r\n deps,\r\n adgroupId,\r\n i18n,\r\n } = this;\r\n\r\n deps.jsdata.AdGroup.findAll({\r\n limit: 1,\r\n select: ['Id', 'DeliveryStatus'],\r\n where: { Id: { $eq: adgroupId } },\r\n }).then((response) => {\r\n if (response.length && response.length > 0) {\r\n this.viewModel.updateAttribute({\r\n adgroupDeliveryStatus: response[0].DeliveryStatus,\r\n });\r\n this.$el.html(template({ i18n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n const container = this.$el.children('.contextual-tooltip-container');\r\n setPosition(container);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.keywordQualityScore = ko.observable('');\r\n }\r\n\r\n updateAttribute({\r\n keywordQualityScore,\r\n }) {\r\n this.keywordQualityScore(this.i18n.getString('Keyword_Quality_Score', {\r\n keywordQualityScore: keywordQualityScore ?\r\n this.i18n.getString('Keyword_Quality_Score_Value', { keywordQualityScore }) :\r\n this.i18n.getString('Contextual_Response_Null'),\r\n }));\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\n\r\nimport ViewModel from './keywordModel';\r\nimport template from './keyword.pug';\r\nimport { setPosition } from './const';\r\n\r\nexport class KeywordContextualAttributeView extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.keywordId = targetId;\r\n this.viewModel = new ViewModel({\r\n i18n,\r\n });\r\n }\r\n\r\n\r\n render() {\r\n const {\r\n deps,\r\n keywordId,\r\n } = this;\r\n\r\n deps.jsdata.Keyword.findAll({\r\n limit: 1,\r\n select: ['Id', 'QualityScore'],\r\n where: { Id: { $eq: keywordId } },\r\n }).then((response) => {\r\n if (response.length && response.length > 0) {\r\n this.viewModel.updateAttribute({\r\n keywordQualityScore: response[0].QualityScore ?\r\n response[0].QualityScore.OverallQualityScore : null,\r\n });\r\n this.$el.html(template());\r\n ko.applyBindings(this.viewModel, this.el);\r\n const container = this.$el.children('.contextual-tooltip-container');\r\n setPosition(container);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.reachSize = ko.observable('');\r\n }\r\n\r\n updateAttribute({\r\n reachSize,\r\n }) {\r\n this.reachSize(this.i18n.getString('Audience_Reach_Size', {\r\n reachSize: reachSize || this.i18n.getString('Contextual_Response_Null'),\r\n }));\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\n\r\nimport ViewModel from './audienceModel';\r\nimport template from './audience.pug';\r\nimport { setPosition } from './const';\r\n\r\nexport class AudienceContextualAttributeView extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.audienceId = targetId;\r\n this.viewModel = new ViewModel({\r\n i18n,\r\n });\r\n }\r\n\r\n\r\n render() {\r\n const {\r\n deps,\r\n audienceId,\r\n } = this;\r\n\r\n // this.$el.html(template());\r\n // ko.applyBindings(this.viewModel, this.el);\r\n\r\n deps.jsdata.Audience.find(audienceId).then((response) => {\r\n if (response) {\r\n this.viewModel.updateAttribute({\r\n reachSize: response.Reach,\r\n });\r\n this.$el.html(template());\r\n ko.applyBindings(this.viewModel, this.el);\r\n const container = this.$el.children('.contextual-tooltip-container');\r\n setPosition(container);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.negativeKeywordList = ko.observable('');\r\n }\r\n\r\n updateAttribute() {\r\n this.negativeKeywordList(this.i18n.getString('Negative_Keyword_List'));\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\n\r\nimport ViewModel from './negativeKeywordListModel';\r\nimport template from './negativeKeywordList.pug';\r\nimport { setPosition } from './const';\r\n\r\nexport class NegativeKeywordListContextualAttributeView extends Backbone.View {\r\n initialize({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.viewModel = new ViewModel({\r\n i18n,\r\n });\r\n }\r\n\r\n render() {\r\n this.viewModel.updateAttribute();\r\n this.$el.html(template());\r\n ko.applyBindings(this.viewModel, this.el);\r\n const container = this.$el.children('.contextual-tooltip-container');\r\n setPosition(container);\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport {\r\n formatCost,\r\n CONTEXTUAL_DELIVERY_STATUS,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport template from './campaignVNext.pug';\r\n\r\nexport class CampaignContextualAttributeViewVNext extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n isMCC,\r\n recommendationService,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.campaignId = targetId;\r\n this.isMCC = isMCC;\r\n this.campaignDeliveryStatusTitle = '';\r\n this.campaignDeliveryStatus = '';\r\n this.campaignType = '';\r\n this.campaignBudget = '';\r\n this.campaignBiddingType = '';\r\n this.eligibleStatusIcon = false;\r\n this.showStatusIcon = false;\r\n this.recommendationService = recommendationService;\r\n }\r\n\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n recommendationAccountId,\r\n }) {\r\n const {\r\n deps,\r\n campaignId,\r\n i18n,\r\n } = this;\r\n const options = this.isMCC ?\r\n {\r\n entitySet:\r\n deps\r\n .edmCampaign\r\n .currentCustomer\r\n .Accounts\r\n .$withKey(Number(recommendationAccountId))\r\n .Campaigns,\r\n } : {};\r\n\r\n deps.jsdata.Campaign.findAll({\r\n limit: 1,\r\n select: ['DeliveryStatus', 'CampaignType', 'Budget', 'BiddingScheme'],\r\n where: { Id: { $eq: campaignId } },\r\n }, options).then((response) => {\r\n if (response.length && response.length > 0) {\r\n const deliveryStatus = response[0].DeliveryStatus;\r\n const type = response[0].CampaignType;\r\n const budget = response[0].Budget ? response[0].Budget.Amount : null;\r\n const biddingType = response[0].BiddingScheme ? response[0].BiddingScheme.Type : null;\r\n\r\n this.campaignDeliveryStatusTitle = i18n.getString('Campaign_Delivery_Status');\r\n this.campaignDeliveryStatus = _.contains(CONTEXTUAL_DELIVERY_STATUS, deliveryStatus) ?\r\n i18n.getString(`Label_DeliveryStatus_${deliveryStatus}`) :\r\n i18n.getString('Contextual_Response_Null');\r\n this.campaignType = i18n.getString('Campaign_Type', {\r\n campaignType: type ?\r\n i18n.getString(`CampaignType_${type}`) :\r\n i18n.getString('Contextual_Response_Null'),\r\n });\r\n this.campaignBudget = i18n.getString('Campaign_Budget', {\r\n campaignBudget: budget ?\r\n i18n.getString('Campaign_Budget_Value', {\r\n campaignBudget: formatCost(budget, i18n, i18n.currency),\r\n }) :\r\n i18n.getString('Contextual_Response_Null'),\r\n });\r\n this.campaignBiddingType = i18n.getString('Campaign_Bidding_Type', {\r\n campaignBiddingType: biddingType ?\r\n i18n.getString(`BidStrategy_${biddingType}`) :\r\n i18n.getString('Contextual_Response_Null'),\r\n });\r\n\r\n if (this.campaignDeliveryStatus !== i18n.getString('Contextual_Response_Null')) {\r\n this.showStatusIcon = true;\r\n } else if (this.recommendationService) {\r\n this.recommendationService.currentActivity.trace(\r\n `unknown delivery status: \"${deliveryStatus}\" in campaign contextual attribute`,\r\n 'recommendation/unKnownDeliveryStatus'\r\n );\r\n }\r\n if (this.campaignDeliveryStatus === i18n.getString('EntityStatus_Eligible')) {\r\n this.eligibleStatusIcon = true;\r\n }\r\n\r\n this.$el.html(template({\r\n i18n,\r\n campaignDeliveryStatusTitle: this.campaignDeliveryStatusTitle,\r\n campaignDeliveryStatus: this.campaignDeliveryStatus,\r\n campaignType: this.campaignType,\r\n campaignBudget: this.campaignBudget,\r\n campaignBiddingType: this.campaignBiddingType,\r\n showStatusIcon: this.showStatusIcon,\r\n eligibleStatusIcon: this.eligibleStatusIcon,\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport {\r\n formatInteger,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport template from './sharedBudgetVNext.pug';\r\n\r\nexport class SharedBudgetContextualAttributeViewVNext extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n isMCC,\r\n targetId,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.isMCC = isMCC;\r\n this.sharedBudgetId = targetId;\r\n this.campaignsCount = '';\r\n }\r\n\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n recommendationAccountId,\r\n }) {\r\n const {\r\n deps,\r\n sharedBudgetId,\r\n i18n,\r\n } = this;\r\n const options = this.isMCC ?\r\n {\r\n entitySet:\r\n deps\r\n .edmCampaign\r\n .currentCustomer\r\n .Accounts\r\n .$withKey(Number(recommendationAccountId))\r\n .Budgets,\r\n } : {};\r\n\r\n deps.jsdata.Budget.findAll({\r\n limit: 1,\r\n select: ['AssociationCount'],\r\n where: { Id: { $eq: sharedBudgetId } },\r\n }, options).then((response) => {\r\n if (response.length && response.length > 0) {\r\n const campaignsCount = response[0].AssociationCount;\r\n\r\n this.campaignsCount = i18n.getString(\r\n 'Shared_Budget_Recommendation_CampaignCount',\r\n { campaignsCount: formatInteger(campaignsCount, i18n) }\r\n );\r\n\r\n this.$el.html(template({\r\n campaignsCount: this.campaignsCount,\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport { CONTEXTUAL_DELIVERY_STATUS } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport template from './adgroupVNext.pug';\r\n\r\nexport class AdGroupContextualAttributeViewVNext extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n isMCC,\r\n recommendationService,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.adgroupId = targetId;\r\n this.isMCC = isMCC;\r\n this.adgroupDeliveryStatusTitle = '';\r\n this.adgroupDeliveryStatus = '';\r\n this.eligibleStatusIcon = false;\r\n this.showStatusIcon = false;\r\n this.recommendationService = recommendationService;\r\n }\r\n\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n recommendationAccountId,\r\n }) {\r\n const {\r\n deps,\r\n adgroupId,\r\n i18n,\r\n } = this;\r\n const options = this.isMCC ?\r\n {\r\n entitySet:\r\n deps\r\n .edmCampaign\r\n .currentCustomer\r\n .Accounts\r\n .$withKey(Number(recommendationAccountId))\r\n .AdGroups,\r\n } : {};\r\n\r\n deps.jsdata.AdGroup.findAll({\r\n limit: 1,\r\n select: ['Id', 'DeliveryStatus'],\r\n where: { Id: { $eq: adgroupId } },\r\n }, options).then((response) => {\r\n if (response.length && response.length > 0) {\r\n this.deliveryStatus = response[0].DeliveryStatus;\r\n this.adgroupDeliveryStatusTitle = i18n.getString('AdGroup_Delivery_Status');\r\n this.adgroupDeliveryStatus = _.contains(CONTEXTUAL_DELIVERY_STATUS, this.deliveryStatus) ?\r\n i18n.getString(`Label_DeliveryStatus_${this.deliveryStatus}`) :\r\n i18n.getString('Contextual_Response_Null');\r\n\r\n if (this.adgroupDeliveryStatus !== i18n.getString('Contextual_Response_Null')) {\r\n this.showStatusIcon = true;\r\n } else if (this.recommendationService) {\r\n this.recommendationService.currentActivity.trace(\r\n `unknown delivery status: \"${this.deliveryStatus}\" in adgroup contextual attribute`,\r\n 'recommendation/unKnownDeliveryStatus'\r\n );\r\n }\r\n if (this.adgroupDeliveryStatus === i18n.getString('EntityStatus_Eligible')) {\r\n this.eligibleStatusIcon = true;\r\n }\r\n\r\n this.$el.html(template({\r\n i18n,\r\n adgroupDeliveryStatusTitle: this.adgroupDeliveryStatusTitle,\r\n adgroupDeliveryStatus: this.adgroupDeliveryStatus,\r\n showStatusIcon: this.showStatusIcon,\r\n eligibleStatusIcon: this.eligibleStatusIcon,\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\n\r\nimport template from './keywordVNext.pug';\r\n\r\nexport class KeywordContextualAttributeViewVNext extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n isMCC,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.isMCC = isMCC;\r\n this.keywordId = targetId;\r\n this.keywordQualityScore = '';\r\n }\r\n\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n recommendationAccountId,\r\n }) {\r\n const {\r\n deps,\r\n keywordId,\r\n } = this;\r\n const options = this.isMCC ?\r\n {\r\n entitySet:\r\n deps\r\n .edmCampaign\r\n .currentCustomer\r\n .Accounts\r\n .$withKey(Number(recommendationAccountId))\r\n .Keywords,\r\n } : {};\r\n\r\n deps.jsdata.Keyword.findAll({\r\n limit: 1,\r\n select: ['Id', 'QualityScore'],\r\n where: { Id: { $eq: keywordId } },\r\n }, options).then((response) => {\r\n if (response.length && response.length > 0) {\r\n const qualityScore = response[0].QualityScore ?\r\n response[0].QualityScore.OverallQualityScore : null;\r\n this.keywordQualityScore = this.i18n.getString('Keyword_Quality_Score', {\r\n keywordQualityScore: qualityScore ?\r\n this.i18n.getString('Keyword_Quality_Score_Value', { keywordQualityScore: qualityScore }) : // eslint-disable-line\r\n this.i18n.getString('Contextual_Response_Null'),\r\n });\r\n this.$el.html(template({ keywordQualityScore: this.keywordQualityScore }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\n\r\nimport template from './audienceVNext.pug';\r\n\r\nexport class AudienceContextualAttributeViewVNext extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n isMCC,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.isMCC = isMCC;\r\n this.audienceId = targetId;\r\n this.reachSize = '';\r\n }\r\n\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n recommendationAccountId,\r\n }) {\r\n const {\r\n deps,\r\n i18n,\r\n audienceId,\r\n } = this;\r\n const options = this.isMCC ?\r\n {\r\n entitySet:\r\n deps\r\n .edmCampaign\r\n .currentCustomer\r\n .Accounts\r\n .$withKey(Number(recommendationAccountId))\r\n .Audiences,\r\n } : {};\r\n\r\n deps.jsdata.Audience.find(\r\n audienceId,\r\n options\r\n ).then((response) => {\r\n if (response) {\r\n this.reachSize = i18n.getString('Audience_Reach_Size', {\r\n reachSize: response.Reach || i18n.getString('Contextual_Response_Null'),\r\n });\r\n this.$el.html(template({ reachSize: this.reachSize }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\n\r\nimport template from './negativeKeywordListVNext.pug';\r\n\r\nexport class NegativeKeywordListContextualAttributeViewVNext extends Backbone.View {\r\n initialize({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.negativeKeywordList = '';\r\n }\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n }) {\r\n this.negativeKeywordList = this.i18n.getString('Negative_Keyword_List');\r\n this.$el.html(template({ negativeKeywordList: this.negativeKeywordList }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport template from './goal.pug';\r\n\r\nexport class GoalContextualAttributeView extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n isMCC,\r\n scope,\r\n accountName,\r\n s$i18n,\r\n newI18n,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.goalId = targetId;\r\n this.isMCC = isMCC;\r\n this.scope = scope;\r\n this.accountName = accountName;\r\n this.s$i18n = s$i18n;\r\n this.newI18n = newI18n;\r\n }\r\n\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n recommendationAccountId,\r\n }) {\r\n const {\r\n deps, goalId, i18n, scope, accountName, s$i18n, newI18n,\r\n } = this;\r\n const cid = scope.advertiserCustomerId;\r\n const aid = recommendationAccountId;\r\n const url = `Customers(${cid})/Accounts(${aid})/Goals(${goalId})`;\r\n deps.odata.get(url).then((response) => {\r\n if (response) {\r\n const trackingStatus = response.TrackingStatus;\r\n const isAccountLevel = response.IsAccountLevel;\r\n const goalType = s$i18n.value('Goal', 'Type', response.Type);\r\n let scopeName;\r\n if (isAccountLevel) {\r\n scopeName = i18n.getString(\r\n 'UnifiedEventTracking_Goal_Creation_TrackingType_CurrentAccount',\r\n { acctname: accountName }\r\n );\r\n } else {\r\n scopeName = i18n.getString('UnifiedEventTracking_Goal_Creation_TrackingType_AllAccounts');\r\n }\r\n\r\n this.$el.html(template({\r\n i18n,\r\n trackingStatus,\r\n scopeName,\r\n goalType,\r\n goalTypeLabel: newI18n.getString(_TL_('Goal type')),\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport {\r\n formatCost,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport template from './accountVNext.pug';\r\n\r\nexport class AccountContextualAttributeView extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.accountId = targetId;\r\n this.budget = '';\r\n }\r\n\r\n\r\n render({ showDeliveryStatusPopup }) {\r\n const {\r\n deps,\r\n accountId,\r\n i18n,\r\n } = this;\r\n\r\n deps.jsdata.Account.findAll(\r\n {\r\n limit: 1,\r\n select: ['Budget/DailyBudget'],\r\n where: { Id: { $eq: accountId } },\r\n },\r\n {\r\n entitySet: deps.edmCampaign.currentCustomer.Accounts,\r\n }\r\n ).then((response) => {\r\n if (response.length && response.length > 0) {\r\n const dailyBudget = response[0].Budget.DailyBudget;\r\n\r\n this.budgetString = i18n.getString(\r\n 'Account_Total_Budget',\r\n { dailyBudget: formatCost(dailyBudget, i18n, i18n.currency) }\r\n );\r\n\r\n this.$el.html(template({\r\n budgetString: this.budgetString,\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\n\r\nimport template from './currentSetting.pug';\r\n\r\nexport class CurrentSettingContextualAttributeView extends Backbone.View {\r\n initialize({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n }\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n }) {\r\n const message = this.i18n.getString('Details_View_Current_Setting_Context_Attribute');\r\n this.$el.html(template({ message }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\n\r\nimport template from './suggestedSetting.pug';\r\n\r\nexport class SuggestedSettingContextualAttributeView extends Backbone.View {\r\n initialize({\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n }\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n }) {\r\n const message = this.i18n.getString('Details_View_Suggested_Setting_Context_Attribute');\r\n this.$el.html(template({ message }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\n\r\nimport template from './generatedFrom.pug';\r\n\r\nexport class GeneratedFromContextualAttributeView extends Backbone.View {\r\n initialize({\r\n pageUrls,\r\n }) {\r\n this.Urls = pageUrls;\r\n }\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n }) {\r\n const {\r\n Urls,\r\n } = this;\r\n\r\n this.$el.html(template({ Urls }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport template from './moreImages.pug';\r\n\r\nexport class MoreImagesContextualAttributeView extends Backbone.View {\r\n initialize({\r\n images,\r\n newI18n,\r\n key,\r\n gridView,\r\n }) {\r\n this.images = images;\r\n this.newI18n = newI18n;\r\n this.key = key;\r\n this.gridView = gridView;\r\n }\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n }) {\r\n const {\r\n images,\r\n gridView,\r\n } = this;\r\n\r\n const imagesWithoutFirstImage = images.slice(1);\r\n const displayPopupImageUrls = [];\r\n const MAX_NUMBER_OF_DISPLAY_POPUOP_IMAGE = 3;\r\n _.each(imagesWithoutFirstImage, (image, index) => {\r\n if (index < MAX_NUMBER_OF_DISPLAY_POPUOP_IMAGE) {\r\n if (_.isNull(image.AssetIdString)) {\r\n displayPopupImageUrls.push(image.ThumbnailURL);\r\n } else {\r\n let imageUrlToUse = image.ImageURL;\r\n\r\n // strip off the resizing from MT as we need a smaller resizing\r\n const indexOfResizeInfo = imageUrlToUse.indexOf('&w=');\r\n if (indexOfResizeInfo > 0) {\r\n imageUrlToUse = imageUrlToUse.substr(0, indexOfResizeInfo);\r\n }\r\n\r\n const responsiveAdThumbnailWidth = 114;\r\n const responsiveAdThumbnailHeight = 60;\r\n const resizeQueryString = `&w=${responsiveAdThumbnailWidth}&h=${responsiveAdThumbnailHeight}`;\r\n\r\n displayPopupImageUrls.push(`${imageUrlToUse}${resizeQueryString}`);\r\n }\r\n }\r\n });\r\n\r\n // TODO: better contract between action & their callback other than window.globalCallback\r\n window.openEditPanel = () => gridView.trigger('openEditPanel', this.key);\r\n\r\n this.$el.html(template({\r\n displayPopupImageUrls,\r\n numOfImages: imagesWithoutFirstImage.length,\r\n maxNumOfDisplayPopupImage: MAX_NUMBER_OF_DISPLAY_POPUOP_IMAGE,\r\n viewMore: this.newI18n.getString(_TL_('View {{numOfRemaininfImage}} more images'), {\r\n numOfRemaininfImage: imagesWithoutFirstImage.length - MAX_NUMBER_OF_DISPLAY_POPUOP_IMAGE,\r\n }),\r\n openEditPanel: 'openEditPanel();',\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport template from './moreConversionClarityButtons.pug';\r\n\r\nexport class MoreConversionClarityButtonsContextualAttributeView extends Backbone.View {\r\n initialize({\r\n conversionClarityButtons,\r\n newI18n,\r\n }) {\r\n this.conversionClarityButtons = conversionClarityButtons;\r\n this.newI18n = newI18n;\r\n }\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n }) {\r\n const {\r\n conversionClarityButtons,\r\n } = this;\r\n\r\n const conversionClarityButtonsWithoutFirst = conversionClarityButtons.slice(1);\r\n\r\n const displayPopupclarityEventGoalSettings = [];\r\n _.each(conversionClarityButtonsWithoutFirst, (conversionClarityButton) => {\r\n const {\r\n SourceURL,\r\n Text,\r\n } = conversionClarityButton;\r\n\r\n const buttonTextElement = `\"${Text}\"`;\r\n const clarityEventGoalSetting = this.newI18n.getString(_TL_('Button {0} on')).replace('{0}', buttonTextElement);\r\n displayPopupclarityEventGoalSettings.push({ clarityEventGoalSetting, sourceURL: SourceURL });\r\n });\r\n\r\n this.$el.html(template({\r\n displayPopupclarityEventGoalSettings,\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport template from './importTaskItem.pug';\r\n\r\nexport class ImportTaskItemContextualAttributeView extends Backbone.View {\r\n initialize({\r\n deps,\r\n i18n,\r\n targetId,\r\n isMCC,\r\n recommendationService,\r\n newI18n,\r\n taskItemId,\r\n budgetAdjustmentOption,\r\n }) {\r\n this.deps = deps;\r\n this.i18n = i18n;\r\n this.campaignId = targetId;\r\n this.isMCC = isMCC;\r\n this.campaignDeliveryStatusTitle = '';\r\n this.campaignDeliveryStatus = '';\r\n this.campaignType = '';\r\n this.campaignBudget = '';\r\n this.campaignBiddingType = '';\r\n this.eligibleStatusIcon = false;\r\n this.showStatusIcon = false;\r\n this.recommendationService = recommendationService;\r\n this.newI18n = newI18n;\r\n this.taskItemId = taskItemId;\r\n this.budgetAdjustmentOption = budgetAdjustmentOption;\r\n }\r\n\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n }) {\r\n const {\r\n deps,\r\n i18n,\r\n newI18n,\r\n taskItemId,\r\n budgetAdjustmentOption,\r\n } = this;\r\n\r\n deps.jsdata.TaskItem.findAll({\r\n query: {\r\n $filter: deps.importScheduleConstants.FILTER_ALL_BUT_DELETED,\r\n },\r\n }).then((response) => {\r\n if (response.length && response.length > 0) {\r\n const taskItem = _.filter(response, item => item.Id === taskItemId);\r\n if (taskItem.length > 0) {\r\n const status = taskItem[0].State === 'Active' ? newI18n.getString(_TL_('Enabled')) : newI18n.getString(_TL_('Paused'));\r\n\r\n const creator = taskItem[0].ModifiedBy && taskItem[0].ModifiedBy.Name;\r\n const dateTime = dateUtil.format(new Date(taskItem[0].ModifiedAt), 'dddd, MMMM d, yyyy', config.get('culture'));\r\n const time = dateUtil.format(new Date(taskItem[0].ModifiedAt), 'hh:mm:ss tt', config.get('culture'));\r\n const createdBy = `${creator}
    ${dateTime}, ${time}
    `;\r\n\r\n const when = deps.importFreqColDataToTemplate(taskItem[0], i18n);\r\n const importedCampaigns = taskItem[0].AdWordsImportContext.CampaignIds.length;\r\n const limitedByBudgetCampaigns = budgetAdjustmentOption.BudgetConstrainedCampaignsCount;\r\n\r\n this.$el.html(template({\r\n status: `${newI18n.getString(_TL_('Status'))}: ${status}`,\r\n createdBy: `${newI18n.getString(_TL_('Created by'))}: ${createdBy}`,\r\n when: `${newI18n.getString(_TL_('When'))}: ${when}`,\r\n importedCampaigns: `${newI18n.getString(_TL_('Imported campaigns'))}: ${importedCampaigns}`,\r\n limitedByBudgetCampaigns: `${newI18n.getString(_TL_('Campaigns limited by budget'))}: ${limitedByBudgetCampaigns}`,\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n }\r\n }\r\n });\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\n\r\nimport template from './campaigns.pug';\r\n\r\nexport class CampaignsContextualAttributeView extends Backbone.View {\r\n initialize({\r\n newI18n,\r\n budgetAdjustmentOption,\r\n }) {\r\n this.newI18n = newI18n;\r\n this.budgetAdjustmentOption = budgetAdjustmentOption;\r\n }\r\n\r\n render({\r\n showDeliveryStatusPopup,\r\n }) {\r\n const {\r\n newI18n,\r\n budgetAdjustmentOption,\r\n } = this;\r\n\r\n this.$el.html(template({\r\n campaignsTitle: newI18n.getString(_TL_('Campaign names:')),\r\n campaigns: budgetAdjustmentOption.BudgetAdjustmentOptionConstrainedCampaigns,\r\n }));\r\n\r\n showDeliveryStatusPopup(this.el.outerHTML);\r\n return this;\r\n }\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { DeliveryStatusPopupFactory } from '@bingads-webui-campaign/delivery-status-popup-factory';\r\nimport { RECOMMENDATION_TYPES, CONTEXTUAL_ENTITY_TYPE } from '@bingads-webui-campaign/recommendation-core';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\n\r\nimport template from './contextual-attribute.pug';\r\n\r\nimport { SharedBudgetContextualAttributeViewVNext } from './sharedBudgetVNext';\r\nimport { AccountContextualAttributeView } from './accountVNext';\r\nimport { CampaignContextualAttributeViewVNext } from './campaignVNext';\r\nimport { AdGroupContextualAttributeViewVNext } from './adgroupVNext';\r\nimport { KeywordContextualAttributeViewVNext } from './keywordVNext';\r\nimport { AudienceContextualAttributeViewVNext } from './audienceVNext';\r\nimport { NegativeKeywordListContextualAttributeViewVNext } from './negativeKeywordListVNext';\r\nimport { GoalContextualAttributeView } from './goal';\r\nimport { CurrentSettingContextualAttributeView } from './currentSetting';\r\nimport { SuggestedSettingContextualAttributeView } from './suggestedSetting';\r\nimport { GeneratedFromContextualAttributeView } from './generatedFrom';\r\nimport { MoreImagesContextualAttributeView } from './moreImages';\r\nimport { MoreConversionClarityButtonsContextualAttributeView } from './moreConversionClarityButtons';\r\nimport { ImportTaskItemContextualAttributeView } from './importTaskItem';\r\nimport { CampaignsContextualAttributeView } from './campaigns';\r\n\r\nexport const withContextualAttributeTemplate = ({\r\n opportunityId,\r\n entityName,\r\n entityId,\r\n entityType,\r\n entityCampaignId,\r\n status,\r\n isExpandingView,\r\n ariaLabel = '',\r\n accountName,\r\n pageUrls,\r\n}) => template({\r\n opportunityId,\r\n entityName,\r\n entityId,\r\n entityType,\r\n entityCampaignId,\r\n status,\r\n isExpandingView,\r\n ariaLabel,\r\n accountName,\r\n pageUrls,\r\n});\r\n\r\nfunction showDeliveryStatusPopup(e, self, contextualAttributeViewTemplate) {\r\n const factory = new DeliveryStatusPopupFactory({ grid: self.grid, i18n: self.i18n });\r\n factory.showRejectionPopup({\r\n event: e,\r\n getCustomTemplate: () => contextualAttributeViewTemplate,\r\n isContextualAttributeForRecommendation: true,\r\n popoverId: 'contextual-attribute',\r\n view: self,\r\n });\r\n}\r\n\r\nexport const showContextualAttribute = ({\r\n deps,\r\n i18n,\r\n e,\r\n type,\r\n isMCC = false,\r\n isExpanding = false,\r\n self,\r\n scope,\r\n recommendationService,\r\n s$i18n,\r\n newI18n,\r\n}) => {\r\n if (!deps.edmCampaign) {\r\n _.extend(deps, { edmCampaign });\r\n }\r\n const target = $(e.target);\r\n const elMapper = {\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: '.recommendation-repair-ads-inline-view',\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: '.recommendation-repair-keywords-inline-view',\r\n [RECOMMENDATION_TYPES.CALLOUT]: '.recommendation-inline-ad-extension-view',\r\n [RECOMMENDATION_TYPES.SITE_LINK]: '.recommendation-inline-ad-extension-view',\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: '.recommendation-inline-budget-view',\r\n [RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY]: '.recommendation-inline-budget-view',\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: '.recommendation-new-ads-inline-view',\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: '.recommendation-new-ads-inline-view',\r\n [RECOMMENDATION_TYPES.REALLOCATE_BUDGET]: '.recommendation-reallocate-budget',\r\n [RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS]: '.recommendation-dynamic-search-ads-inline-view',\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: '.recommendation-setup-conversion-tracking',\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: '.recommendation-inline-fix-conversion-goal-setting-view',\r\n };\r\n\r\n const contextualAttributeMapper = {\r\n [CONTEXTUAL_ENTITY_TYPE.CAMPAIGN]:\r\n CampaignContextualAttributeViewVNext,\r\n [CONTEXTUAL_ENTITY_TYPE.ADGROUP]:\r\n AdGroupContextualAttributeViewVNext,\r\n [CONTEXTUAL_ENTITY_TYPE.KEYWORD]: KeywordContextualAttributeViewVNext,\r\n [CONTEXTUAL_ENTITY_TYPE.AUDIENCE]: AudienceContextualAttributeViewVNext,\r\n [CONTEXTUAL_ENTITY_TYPE.NEGATIVE_KEYWORD_LIST]: NegativeKeywordListContextualAttributeViewVNext,\r\n [CONTEXTUAL_ENTITY_TYPE.SHARED_BUDGET]:\r\n SharedBudgetContextualAttributeViewVNext,\r\n [CONTEXTUAL_ENTITY_TYPE.ACCOUNT]: AccountContextualAttributeView,\r\n [CONTEXTUAL_ENTITY_TYPE.GOAL]: GoalContextualAttributeView,\r\n [CONTEXTUAL_ENTITY_TYPE.CURRENT_SETTING]: CurrentSettingContextualAttributeView,\r\n [CONTEXTUAL_ENTITY_TYPE.SUGGESTED_SETTING]: SuggestedSettingContextualAttributeView,\r\n [CONTEXTUAL_ENTITY_TYPE.GENERATED_FROM]: GeneratedFromContextualAttributeView,\r\n [CONTEXTUAL_ENTITY_TYPE.MORE_IMAGES]: MoreImagesContextualAttributeView,\r\n [CONTEXTUAL_ENTITY_TYPE.MORE_CONVERSION_CLARITY_BUTTONS]: MoreConversionClarityButtonsContextualAttributeView,\r\n [CONTEXTUAL_ENTITY_TYPE.IMPORTED_TASK_ITEM]: ImportTaskItemContextualAttributeView,\r\n [CONTEXTUAL_ENTITY_TYPE.CAMPAIGNS]: CampaignsContextualAttributeView,\r\n };\r\n\r\n const contextual = isExpanding ? $(`${elMapper[type]} .expanding-contextual-attribute-${target.data('opportunityid')}-${target.data('entityid')}`) // eslint-disable-line\r\n : $(`.contextual-attribute-${target.data('opportunityid')}-${target.data('entityid')}`);\r\n\r\n if (contextual.length === 0) {\r\n return;\r\n }\r\n\r\n if (!target.data('status')) {\r\n const key = $(e.target).parents('tr[data-key]').data('key') || $(e.target).parents('tr[key]').attr('key');\r\n const recommendation = self.grid.gridView.itemWithKey(key) || self.data; // self.data for panelEdit\r\n const recommendationAccountId = recommendation.Target.AccountId;\r\n const contextualAttributeView = new contextualAttributeMapper[target.data('type')]({\r\n deps,\r\n i18n,\r\n isMCC,\r\n targetId: Number(target.data('entityid')),\r\n el: contextual,\r\n scope,\r\n accountName: target.data('accountname'),\r\n pageUrls: target.data('pageurls'),\r\n recommendationService,\r\n s$i18n,\r\n newI18n,\r\n images: _.result(_.first(recommendation.Opportunities), 'Images'),\r\n key,\r\n gridView: self.grid.gridView,\r\n conversionClarityButtons: _.result(_.result(_.first(recommendation.Opportunities), 'SuggestedClarityEventGoal'), 'ConversionClarityButtons'),\r\n budgetAdjustmentOption: _.result(_.first(recommendation.Opportunities), 'BudgetAdjustmentOption'),\r\n taskItemId: _.result(_.first(recommendation.Opportunities), 'RuleId'),\r\n });\r\n contextualAttributeView.render({\r\n showDeliveryStatusPopup: _.partial(showDeliveryStatusPopup, e, self),\r\n recommendationAccountId,\r\n });\r\n target.data('status', 'true');\r\n }\r\n\r\n if (contextual.children('.contextual-tooltip-container').length > 0) { // new ui\r\n showDeliveryStatusPopup(\r\n e,\r\n self,\r\n contextual.children('.contextual-tooltip-container')[0].outerHTML\r\n );\r\n } else { // old ui\r\n $(`.expanding-contextual-attribute-${target.data('opportunityid')}-${target.data('entityid')}`).show();\r\n }\r\n};\r\n\r\nexport const hideContextualAttribute = ({\r\n e,\r\n self,\r\n}) => {\r\n if ($(e.relatedTarget).closest('#contextual-attribute').length === 0) {\r\n self.trigger('closeDeliveryStatusPopup');\r\n }\r\n};\r\n","import { CONTEXTUAL_ENTITY_TYPE } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport { withContextualAttributeTemplate } from './contextual-attribute';\r\n\r\n/**\r\n * add account contextual in front of campaign in MCC recommendation inline view.\r\n * @param {string} opportunityId - opportunity Id\r\n * @param {string} accountName - account Name\r\n * @param {number} accountId - account Id\r\n * @param {string} originEntity - entity contextual attribute in single account version\r\n * @return {string} entity string with account name prepended\r\n */\r\nexport const prependAccountAttribute = ({\r\n opportunityId,\r\n accountName,\r\n accountId,\r\n originEntity,\r\n}) => {\r\n const accountEntity = withContextualAttributeTemplate({\r\n opportunityId,\r\n entityName: accountName,\r\n entityId: accountId,\r\n entityType: CONTEXTUAL_ENTITY_TYPE.ACCOUNT,\r\n status: 'false',\r\n isExpandingView: true,\r\n });\r\n\r\n return `${accountEntity} > ${originEntity}`;\r\n};\r\n","import _ from 'underscore';\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\n\r\nexport const ESTIMATE_TYPES = {\r\n IMPRESSION_SHARE: 'imprShare',\r\n IMPRESSIONS: 'impressions',\r\n QUERY_VOLUME: 'queryVolume',\r\n COST: 'cost',\r\n CLICKS: 'clicks',\r\n CTR: 'ctr',\r\n CONVERSIONS: 'conv',\r\n WEEKLY_SEARCHES: 'weeklySearches',\r\n REJECTED_ADS: 'rejectedAds',\r\n REJECTED_KEYWORDS: 'rejectedKeywords',\r\n MISSING_CONVERSIONS: 'missingConv',\r\n TARGETED_PRODUCTS: 'targetedProducts',\r\n};\r\n\r\nexport const NO_SYMBOL_ESTIMATE_TYPES = [\r\n ESTIMATE_TYPES.REJECTED_ADS,\r\n ESTIMATE_TYPES.REJECTED_KEYWORDS,\r\n ESTIMATE_TYPES.MISSING_CONVERSIONS,\r\n];\r\n\r\nexport const SUMMARY_CARD = 'SummaryCard';\r\nexport const RECOMMENDATIOIN_SUMMARY_APPLY_FAILED_RESULTS = 'RecommendationSummaryPageApplyFaildResult';\r\n\r\nexport const RECOMMENDATION_TYPES = {\r\n BUDGET: 'CompetitiveBudgetOpportunity',\r\n COMPETITIVE_BID: 'CompetitiveBidOpportunity',\r\n DEVICE_BID_BOOST: 'CompetitiveDeviceBidBoostOpportunity',\r\n LOCATION_BID_BOOST: 'CompetitiveLocationBidBoostOpportunity',\r\n NEW_KEYWORD: 'CompetitiveKeywordOpportunity', // deprecated in Oct 2023\r\n BROAD_MATCH_KEYWORD: 'BroadMatchAdoptionOpportunity',\r\n BUDGET_OPPORTUNITY: 'BudgetOpportunity',\r\n ADJUST_SHARED_BUDGET_OPPORTUNITY: 'AdjustSharedBudgetOpportunity',\r\n CALLOUT: 'CalloutOpportunity',\r\n GOOGLE_IMPORT: 'GoogleImportOpportunity',\r\n GOOGLE_IMPORT_SCHEDULED: 'GoogleImportScheduledOpportunity',\r\n NEW_KEYWORD_OPPORTUNITY: 'CampaignContextKeywordOpportunity',\r\n TRENDING_QUERY: 'RisingQueryKeywordOpportunity',\r\n REPAIR_ADS: 'RepairAdsOpportunity',\r\n REPAIR_KEYWORD: 'RepairKeywordsOpportunity',\r\n SITE_LINK: 'SiteLinkOpportunity',\r\n REMOVE_CONFLICTING_NEGATIVE_KEYWORD: 'RemoveConflictingNegativeKeywordOpportunity',\r\n RESPONSIVE_SEARCH_ADS: 'ResponsiveSearchAdsOpportunity',\r\n DYNAMIC_SEARCH_ADS: 'DSAOpportunity',\r\n REALLOCATE_BUDGET: 'ReallocateBudgetOpportunity',\r\n FIX_AD_TEXT: 'FixAdContentOpportunity',\r\n FIX_AD_DESTINATION: 'FixAdDestinationOpportunity',\r\n SETUP_CONVERSION_TRACKING_OPPORTUNITY: 'SetupConversionTrackingOpportunity',\r\n FIX_CONVERSION_TRACKING_OPPORTUNITY: 'FixConversionTrackingOpportunity',\r\n FIX_CONVERSION_GOAL_SETTINGS: 'FixConversionGoalSettingsOpportunity',\r\n MULTIMEDIA_ADS: 'MultiMediaAdsOpportunity',\r\n CREATE_CONVERSION_GOAL: 'CreateConversionGoalOpportunity',\r\n FACEBOOK_IMPORT: 'FacebookImportOpportunity',\r\n IMAGE_EXTENSION: 'ImageExtensionOpportunity',\r\n REPAIR_MISSING_KEYWORD_PARAMS: 'RepairMissingKeywordParamsOpportunity',\r\n FIX_NO_IMPRESSION_BID: 'FixNoImpressionBidOpportunity',\r\n IMPROVE_RESPONSIVE_SEARCH_ADS: 'ImproveResponsiveSearchAdsOpportunity',\r\n REPAIR_UNTARGETED_OFFER: 'RepairUntargetedOfferOpportunity',\r\n IMPROVE_MULTIMEDIA_ADS: 'ImproveMultiMediaAdsOpportunity',\r\n SSC_2_PMAX_MIGRATION: 'SSC2PMaxMigrationOpportunity',\r\n PMAX_IMPORT: 'PerformanceMaxImportOpportunity',\r\n DSA_2_PMAX_MIGRATION: 'DSA2PMaxMigrationOpportunity',\r\n SYNDICATION_GAP: 'SyndicationGapOpportunity',\r\n};\r\n\r\nexport const BUDGET_OPPORTUNITY_TYPES = [\r\n RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY,\r\n];\r\n\r\nexport const RECOMMENDATION_IDS = {\r\n [RECOMMENDATION_TYPES.BUDGET]: '40001',\r\n [RECOMMENDATION_TYPES.COMPETITIVE_BID]: '19',\r\n [RECOMMENDATION_TYPES.DEVICE_BID_BOOST]: '211',\r\n [RECOMMENDATION_TYPES.LOCATION_BID_BOOST]: '212',\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD]: '32001', // deprecated in Oct 2023\r\n [RECOMMENDATION_TYPES.NEW_LOCATION]: '213',\r\n [RECOMMENDATION_TYPES.SYNDICATION]: '214',\r\n [RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD]: '202',\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: '40',\r\n [RECOMMENDATION_TYPES.CALLOUT]: '132',\r\n [RECOMMENDATION_TYPES.GOOGLE_IMPORT]: '205',\r\n [RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED]: '206',\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY]: '32',\r\n [RECOMMENDATION_TYPES.TRENDING_QUERY]: '237',\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: '60',\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: '61',\r\n [RECOMMENDATION_TYPES.SITE_LINK]: '131',\r\n [RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD]: '36',\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: '228',\r\n [RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS]: '210',\r\n [RECOMMENDATION_TYPES.REALLOCATE_BUDGET]: '42',\r\n [RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY]: '40002',\r\n [RECOMMENDATION_TYPES.FIX_AD_TEXT]: '62001',\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: '62002',\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: '65',\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY]: '66',\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: '90',\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: '242',\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: '91',\r\n [RECOMMENDATION_TYPES.FACEBOOK_IMPORT]: '247',\r\n [RECOMMENDATION_TYPES.IMAGE_EXTENSION]: '223',\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: '251',\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: '21',\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: '73',\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: '68',\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: '74',\r\n [RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION]: '44',\r\n [RECOMMENDATION_TYPES.PMAX_IMPORT]: '268',\r\n [RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION]: '270',\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: '221',\r\n};\r\n\r\nexport const ESTIMATE_STRINGS = {\r\n [ESTIMATE_TYPES.CLICKS]: 'Summary_Card_Estimate_Clicks',\r\n [ESTIMATE_TYPES.COST]: 'Summary_Card_Estimate_Cost',\r\n [ESTIMATE_TYPES.IMPRESSION_SHARE]: 'Summary_Card_Estimate_Impression_Share',\r\n [ESTIMATE_TYPES.IMPRESSIONS]: 'Summary_Card_Estimate_Impressions',\r\n [ESTIMATE_TYPES.QUERY_VOLUME]: 'Summary_Card_Estimate_Query_Volume',\r\n [ESTIMATE_TYPES.CTR]: 'Summary_Card_Estimate_CTR',\r\n [ESTIMATE_TYPES.CONVERSIONS]: 'Summary_Card_Estimate_Conversions',\r\n [ESTIMATE_TYPES.WEEKLY_SEARCHES]: 'Summary_Card_Estimate_Weekly_Searches',\r\n [ESTIMATE_TYPES.REJECTED_ADS]: 'Summary_Card_Estimate_Rejected_Ads',\r\n [ESTIMATE_TYPES.REJECTED_KEYWORDS]: 'Summary_Card_Estimate_Rejected_Keywords',\r\n [ESTIMATE_TYPES.MISSING_CONVERSIONS]: 'Summary_Card_Estimate_Missing_Conversions',\r\n [ESTIMATE_TYPES.TARGETED_PRODUCTS]: 'Summary_Card_Estimate_Targeted_Products',\r\n};\r\n\r\nexport const SUMMARY_LEVELS = levelAtConstant;\r\n\r\nexport const VISUAL_TYPES = {\r\n SEARCH_TERMS_CHART: 'Search_Terms_Chart',\r\n COLUMN_CHART: 'Column_Chart',\r\n LINE_CHART: 'Line_Chart',\r\n LINE_WEEKLY_CHART: 'Line_Weekly_Chart',\r\n LINE_COLUMN_CHART: 'Line_Column_Chart',\r\n TABLE: 'Table',\r\n MAP: 'Map',\r\n ADS_PREVIEW: 'Ads_Preview',\r\n};\r\n\r\nexport const VISUAL_TABLE_ENABLED_SCOPES = {\r\n ACCOUNT: [\r\n levelAtConstant.CUSTOMER,\r\n levelAtConstant.ACCOUNT,\r\n ],\r\n CAMPAIGN: [\r\n levelAtConstant.CUSTOMER,\r\n levelAtConstant.ACCOUNT,\r\n levelAtConstant.CAMPAIGN,\r\n ],\r\n ADGROUP: [\r\n levelAtConstant.CUSTOMER,\r\n levelAtConstant.ACCOUNT,\r\n levelAtConstant.CAMPAIGN,\r\n levelAtConstant.ADGROUP,\r\n ],\r\n};\r\n\r\nexport const CHANNEL_TYPES = {\r\n COMPETITION: 'competitionpage',\r\n RECOMMENDATION: 'recommendationpage',\r\n INCONTEXT: 'incontextrecommendation',\r\n INCONTEXTCARD: 'incontextcard',\r\n OVERVIEW: 'overviewpage',\r\n MCCRECOMMENDATION: 'mccrecommendationpage',\r\n MCCOVERVIEW: 'mccoverviewpage',\r\n AUTO_APPLY_REC_SETTING: 'autoApplyRecdSettingUpdate',\r\n CAMPAIGN_SUMMARY_BAR: 'campaignsummarybar',\r\n SEARCHINSIGHT: 'searchinsight',\r\n};\r\n\r\nconst RECOMMENDATIONS = [\r\n RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD,\r\n RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.CALLOUT,\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT,\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED,\r\n RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.TRENDING_QUERY,\r\n RECOMMENDATION_TYPES.REPAIR_ADS,\r\n RECOMMENDATION_TYPES.REPAIR_KEYWORD,\r\n RECOMMENDATION_TYPES.SITE_LINK,\r\n RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD,\r\n RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.REALLOCATE_BUDGET,\r\n RECOMMENDATION_TYPES.FIX_AD_DESTINATION,\r\n RECOMMENDATION_TYPES.FIX_AD_TEXT,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS,\r\n RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL,\r\n RECOMMENDATION_TYPES.FACEBOOK_IMPORT,\r\n RECOMMENDATION_TYPES.MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.IMAGE_EXTENSION,\r\n RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS,\r\n RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID,\r\n RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER,\r\n RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION,\r\n RECOMMENDATION_TYPES.PMAX_IMPORT,\r\n RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION,\r\n RECOMMENDATION_TYPES.SYNDICATION_GAP,\r\n];\r\n\r\nexport const CHANNEL_ALL_RECOMMENDATIONS = {\r\n [CHANNEL_TYPES.COMPETITION]: [\r\n RECOMMENDATION_TYPES.BUDGET,\r\n RECOMMENDATION_TYPES.COMPETITIVE_BID,\r\n RECOMMENDATION_TYPES.DEVICE_BID_BOOST,\r\n RECOMMENDATION_TYPES.LOCATION_BID_BOOST,\r\n ],\r\n [CHANNEL_TYPES.RECOMMENDATION]: RECOMMENDATIONS,\r\n [CHANNEL_TYPES.MCCRECOMMENDATION]: RECOMMENDATIONS,\r\n [CHANNEL_TYPES.MCCOVERVIEW]: RECOMMENDATIONS,\r\n [CHANNEL_TYPES.OVERVIEW]: RECOMMENDATIONS,\r\n [CHANNEL_TYPES.CAMPAIGN_SUMMARY_BAR]: RECOMMENDATIONS,\r\n [CHANNEL_TYPES.SEARCHINSIGHT]: RECOMMENDATIONS,\r\n [CHANNEL_TYPES.INCONTEXT]: [\r\n RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY,\r\n ],\r\n [CHANNEL_TYPES.INCONTEXTCARD]: [\r\n RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL,\r\n RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS,\r\n RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID,\r\n RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER,\r\n RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION,\r\n RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION,\r\n RECOMMENDATION_TYPES.SYNDICATION_GAP,\r\n ],\r\n};\r\n\r\nexport const NOT_SUPPORT_DOWNLOAD_TYPES = [\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT,\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS,\r\n RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL,\r\n RECOMMENDATION_TYPES.FACEBOOK_IMPORT,\r\n RECOMMENDATION_TYPES.MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.IMAGE_EXTENSION,\r\n RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS,\r\n RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION,\r\n RECOMMENDATION_TYPES.PMAX_IMPORT,\r\n RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION,\r\n RECOMMENDATION_TYPES.SYNDICATION_GAP,\r\n];\r\n\r\nexport const NOT_SUPPORT_DISMISS_TYPES = [\r\n RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION,\r\n];\r\n\r\nexport const APPLY_ODATA_TYPES = {\r\n APPLY_BULK_OPPORTUNITY_REQUEST: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyBulkOpportunitiesRequest',\r\n APPLY_ALL_OPPORTUNITY_REQUEST: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyAllOpportunitiesRequest',\r\n APPLY_BULK_RECOMMENDATION_REQUEST: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyBulkAccountRecommendationRequest',\r\n APPLY_ALL_RECOMMENDATION_REQUEST: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyAllAccountRecommendationRequest',\r\n APPLY_BULK_RECOMMENDATION_REQUEST_MCC: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyBulkMccRecommendationRequest',\r\n APPLY_ALL_RECOMMENDATION_REQUEST_MCC: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyAllMccRecommendationRequest',\r\n};\r\n\r\nexport const APPLY_ODATA_TYPES_MAP = {\r\n ALL: {\r\n MCC: APPLY_ODATA_TYPES.APPLY_ALL_RECOMMENDATION_REQUEST_MCC,\r\n SINGLE_ACCOUNT: APPLY_ODATA_TYPES.APPLY_ALL_OPPORTUNITY_REQUEST,\r\n SINGLE_ACCOUNT_ASYNC: APPLY_ODATA_TYPES.APPLY_ALL_RECOMMENDATION_REQUEST,\r\n OPTIMIZATION_SCORE: APPLY_ODATA_TYPES.APPLY_ALL_RECOMMENDATION_REQUEST,\r\n },\r\n BULK: {\r\n MCC: APPLY_ODATA_TYPES.APPLY_BULK_RECOMMENDATION_REQUEST_MCC,\r\n SINGLE_ACCOUNT: APPLY_ODATA_TYPES.APPLY_BULK_OPPORTUNITY_REQUEST,\r\n SINGLE_ACCOUNT_ASYNC: APPLY_ODATA_TYPES.APPLY_BULK_RECOMMENDATION_REQUEST,\r\n OPTIMIZATION_SCORE: APPLY_ODATA_TYPES.APPLY_BULK_RECOMMENDATION_REQUEST,\r\n },\r\n};\r\n\r\nexport const APPLY_USERINPUT_TYPES = {\r\n [RECOMMENDATION_TYPES.BUDGET]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyBudgetOpportunityUserInputV2',\r\n [RECOMMENDATION_TYPES.COMPETITIVE_BID]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyBidOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.DEVICE_BID_BOOST]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyCompetitiveBidBoostOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.LOCATION_BID_BOOST]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyCompetitiveBidBoostOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyKeywordOpportunityUserInput', // deprecated in Oct 2023\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyRepairAdsOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyRepairKeywordsOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyBroadMatchAdoptionOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyKeywordOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.TRENDING_QUERY]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyKeywordOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyUserInput',\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyResponsiveSearchAdsOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyDSAOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.REALLOCATE_BUDGET]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyReallocateBudgetOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyFixAdDestinationOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyFixConversionGoalSettingsOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyCreateConversionGoalOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyMultiMediaAdsOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.IMAGE_EXTENSION]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyImageExtensionOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyRepairMissingKeywordParamsOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyBidOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyImproveResponsiveSearchAdsOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyRepairUntargetedOfferOpportunityUserInput',\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplyImproveMultiMediaAdsOpportunityUserInput',\r\n};\r\nAPPLY_USERINPUT_TYPES[[RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]]\r\n = APPLY_USERINPUT_TYPES[[RECOMMENDATION_TYPES.BUDGET]];\r\nAPPLY_USERINPUT_TYPES[[RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY]]\r\n = APPLY_USERINPUT_TYPES[[RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]];\r\n\r\nexport const APPLY_ACTION_TYPES = {\r\n ACCEPT: 'Accept',\r\n DISMISS: 'Dismiss',\r\n REJECT: 'Reject',\r\n REDISMISS: 'Redismiss',\r\n UNDISMISS: 'Undismiss',\r\n};\r\n\r\nexport const SETTING_OPTIONS = {\r\n UPDATE_FROM_CAMPAIGN: 'UpdateRecommendationFromCampaignDb',\r\n REJECTION_DATE_LAST_NINETY_DAYS: 'RejectionDateFilterLast90Days',\r\n NONE: 'None',\r\n};\r\n\r\nexport const COMPETITION_RECOMMENDATION_FEATURE_NAME = 'CompetitionRecommendation';\r\n\r\nexport const COMPETITION_RECOMMENDATION_PREFERENCES = 'WebApp.CampaignUI.CompetitionRecommendationPreferences';\r\nexport const RECOMMENDATION_PREFERENCES = 'WebApp.CampaignUI.RecommendationPreferences';\r\n\r\nexport const COMPETITION_RECOMMENDATION_PAGE_SIZES = [3, 10, 20, 50];\r\nexport const RECOMMENDATION_PAGE_SIZES = [20, 50, 100];\r\nexport const RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES = [5];\r\nexport const RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES_TEN = [10];\r\nexport const RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES_TWENTY = [20];\r\n\r\nexport const COMPETITION_DEFAULT_PAGE_SIZE = COMPETITION_RECOMMENDATION_PAGE_SIZES[0];\r\nexport const RECOMMENDATION_DEFAULT_PAGE_SIZE = RECOMMENDATION_PAGE_SIZES[0];\r\n\r\nexport const APPLY_SETTINGS = {\r\n DEFAULT: '#Microsoft.Advertiser.AdInsight.Opportunity.Core.Adoption.Interface.Entity.ApplySettings',\r\n};\r\n\r\nexport const MAX_NUMBER_OF_RECOMMENDATION_SAMPLES = 4;\r\n\r\nexport const MAX_NUMBER_OF_RECOMMENDATION_SAMPLES_WITH_OS = 2;\r\n\r\nexport const MATCH_TYPE_IDS = {\r\n EXACT: 1,\r\n PHRASE: 2,\r\n BROAD: 3,\r\n};\r\n\r\nexport const MATCH_TYPE = {\r\n EXACT: 'Exact',\r\n PHRASE: 'Phrase',\r\n BROAD: 'Broad',\r\n};\r\n\r\nexport const PERIOD_TYPE = {\r\n WORKDAY: 1,\r\n WEEKEND: 2,\r\n};\r\n\r\nexport const MAP_HEIGHT = '320px';\r\n\r\nexport const ADINSIGHT_LOG_API_NAME = {\r\n COMPETITION: 'competitionpage',\r\n RECOMMENDATION: 'recommendationpage',\r\n INCONTEXTCARD: 'incontextcard',\r\n SEARCHINSIGHT: 'searchinsight',\r\n};\r\n\r\nexport const ADINSIGHT_LOG_ACTION_TYPE = {\r\n VIEW: 'View',\r\n VIEWEDIT: 'ViewEdit',\r\n CUSTOM: 'Custom',\r\n CLICK_CATEGORY: 'Click',\r\n CLICK_RECS: 'ClickRecs',\r\n CLICK_APPLYALL: 'ClickApplyAll',\r\n IMPRESSION: 'Impression',\r\n FEEDBACK: 'Feedback',\r\n DOWNLOAD: 'Export',\r\n HIDE: 'Hide',\r\n VIEW_EXTERNAL: 'ViewExternal',\r\n CLICK_DISMISSALL: 'ClickDismissAll',\r\n REDIRECT: 'Redirect',\r\n};\r\n\r\nexport const SUMMARY_APPLY_ALL_ENABLED = {\r\n [RECOMMENDATION_TYPES.BUDGET]: true,\r\n [RECOMMENDATION_TYPES.COMPETITIVE_BID]: true,\r\n [RECOMMENDATION_TYPES.DEVICE_BID_BOOST]: true,\r\n [RECOMMENDATION_TYPES.LOCATION_BID_BOOST]: true,\r\n [RECOMMENDATION_TYPES.NEW_LOCATION]: false,\r\n [RECOMMENDATION_TYPES.SYNDICATION]: false,\r\n [RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD]: true,\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: true,\r\n [RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY]: true,\r\n [RECOMMENDATION_TYPES.CALLOUT]: false,\r\n [RECOMMENDATION_TYPES.GOOGLE_IMPORT]: false,\r\n [RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED]: false,\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY]: true,\r\n [RECOMMENDATION_TYPES.TRENDING_QUERY]: true,\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: false,\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: false,\r\n [RECOMMENDATION_TYPES.SITE_LINK]: false,\r\n [RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD]: true,\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: true,\r\n [RECOMMENDATION_TYPES.REALLOCATE_BUDGET]: true,\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: false,\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: false,\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: false,\r\n [RECOMMENDATION_TYPES.FACEBOOK_IMPORT]: false,\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: true,\r\n [RECOMMENDATION_TYPES.IMAGE_EXTENSION]: false,\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: true,\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: true,\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: true,\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: true,\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: true,\r\n [RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION]: true,\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: true,\r\n};\r\n\r\n// import center's recommendations, only import types\r\nexport const IMPORTCENTER_RECOMMENDATION_TYPES = [\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT,\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED,\r\n RECOMMENDATION_TYPES.FACEBOOK_IMPORT,\r\n];\r\n\r\nexport const RECOMMENDATION_CATEGORIES = {\r\n ALL: 'All',\r\n REPAIRS: 'Repairs',\r\n BIDS: 'Bids',\r\n KEYWORDS: 'Keywords',\r\n ADS: 'Ads',\r\n DISMISSED: 'Dismissed',\r\n};\r\n\r\nexport const RECOMMENDATION_CATEGORIES_IDS = {\r\n [RECOMMENDATION_CATEGORIES.ALL]: 'All Recommendations',\r\n [RECOMMENDATION_CATEGORIES.REPAIRS]: 'Repairs',\r\n [RECOMMENDATION_CATEGORIES.BIDS]: 'Bids & Budgets',\r\n [RECOMMENDATION_CATEGORIES.KEYWORDS]: 'Keywords & Targeting',\r\n [RECOMMENDATION_CATEGORIES.ADS]: 'Ads & Extensions',\r\n [RECOMMENDATION_CATEGORIES.DISMISSED]: 'Dismissed',\r\n};\r\n\r\nexport const RECOMMENDATION_CATEGORIES_WORDING = {\r\n [RECOMMENDATION_CATEGORIES_IDS[RECOMMENDATION_CATEGORIES.ALL]]: 'All Recommendations',\r\n [RECOMMENDATION_CATEGORIES_IDS[RECOMMENDATION_CATEGORIES.REPAIRS]]: 'Repairs',\r\n [RECOMMENDATION_CATEGORIES_IDS[RECOMMENDATION_CATEGORIES.BIDS]]: 'Bidding & budgets',\r\n [RECOMMENDATION_CATEGORIES_IDS[RECOMMENDATION_CATEGORIES.KEYWORDS]]: 'Keywords & targeting',\r\n [RECOMMENDATION_CATEGORIES_IDS[RECOMMENDATION_CATEGORIES.ADS]]: 'Ads & Extensions',\r\n [RECOMMENDATION_CATEGORIES_IDS[RECOMMENDATION_CATEGORIES.DISMISSED]]: 'Dismissed',\r\n};\r\n\r\nexport const RECOMMENDATION_CATEGORIES_STRINGS = {\r\n [RECOMMENDATION_CATEGORIES.ALL]: 'Recommendations_Category_All',\r\n [RECOMMENDATION_CATEGORIES.REPAIRS]: 'Recommendations_Category_Repairs',\r\n [RECOMMENDATION_CATEGORIES.BIDS]: 'Recommendations_Category_Bids',\r\n [RECOMMENDATION_CATEGORIES.KEYWORDS]: 'Recommendations_Category_Target',\r\n [RECOMMENDATION_CATEGORIES.ADS]: 'Recommendations_Category_Ads',\r\n};\r\n\r\nexport const SEASONAL_TRACKID = 8;\r\n\r\nexport const NOT_AVAILABLE_DEFAULT_STR = '-';\r\n\r\nexport const CONVERSION_STATUS_TYPE = {\r\n NO_UET: 0,\r\n NO_DATA: 1,\r\n HAS_DATA: 2,\r\n};\r\n\r\nexport const RECOMMENDATION_DISMISS_FEEDBACK_TYPE = {\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY]: true,\r\n [RECOMMENDATION_TYPES.TRENDING_QUERY]: true,\r\n [RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD]: true,\r\n [RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD]: true,\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: true,\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: true,\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: true,\r\n [RECOMMENDATION_TYPES.FIX_AD_TEXT]: true,\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: true,\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: true,\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: true,\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: true,\r\n [RECOMMENDATION_TYPES.IMAGE_EXTENSION]: true,\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: true,\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: true,\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: true,\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: true,\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: true,\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: true,\r\n [RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION]: true,\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: true,\r\n};\r\n\r\nexport const RECOMMENDATION_NOTIFICATION_ERRORCODE = {\r\n Recommendation_Error_53505: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53097',\r\n }, // Recommendation_Error_MaxKeywordsLimitExceededForAdGroup\r\n Recommendation_Error_53504: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext51042',\r\n }, // Recommendation_Error_MaxKeywordsLimitExceededForAccount\r\n Recommendation_Error_53521: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53092',\r\n }, // Recommendation_Error_KeywordBroadBidAmountsLessThanFloorPrice\r\n Recommendation_Error_53517: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53092',\r\n }, // Recommendation_Error_KeywordBroadBidAmountsGreaterThanCeilingPrice\r\n Recommendation_Error_53508: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // Recommendation_Error_Keyword_KeywordNotFound\r\n Recommendation_Error_53507: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // Recommendation_Error_Keyword_KeywordNotFound\r\n Recommendation_Error_52505: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53094',\r\n }, // Recommendation_Error_Keyword_AdGroupInExpiredStateCannotBeUpdated\r\n Recommendation_Error_52511: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53094',\r\n }, // Recommendation_Error_Keyword_AdGroupInExpiredStateCannotBeUpdated\r\n Recommendation_Error_52512: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53094',\r\n }, // Recommendation_Error_AdGroupIdInvalid\r\n Recommendation_Error_51501: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext60029',\r\n }, // Recommendation_Error_CampaignIdInvalid\r\n Recommendation_Error_93001: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext60029',\r\n }, // Recommendation_Error_NegativeKeywordDeleted\r\n Recommendation_Error_93114: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext60029',\r\n }, // Recommendation_Error_SharedListDeleted\r\n Recommendation_Error_7: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext60029',\r\n }, // Recommendation_Error_Generic_OpportunityExpired\r\n Recommendation_Error_1010: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53092',\r\n }, // Recommendation_Error_Bid_InvalidPeroidToUpdate\r\n Recommendation_Error_21000: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // Recommendation_Error_Generic_SystemFailed\r\n Recommendation_Error_1001519: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53097',\r\n }, // Recommendation_Error_MaxKeywordsLimitExceededForAdGroup\r\n Recommendation_Error_1001518: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext51042',\r\n }, // Recommendation_Error_MaxKeywordsLimitExceededForAccount\r\n Recommendation_Error_1001515: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53092',\r\n }, // Recommendation_Error_KeywordBroadBidAmountsLessThanFloorPrice\r\n Recommendation_Error_1001516: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53092',\r\n }, // Recommendation_Error_KeywordBroadBidAmountsGreaterThanCeilingPrice\r\n Recommendation_Error_1001531: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // Recommendation_Error_Keyword_KeywordNotFound\r\n Recommendation_Error_1001215: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53094',\r\n }, // Recommendation_Error_Keyword_AdGroupInExpiredStateCannotBeUpdated\r\n Recommendation_Error_1001231: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53094',\r\n }, // Recommendation_Error_Keyword_AdGroupInExpiredStateCannotBeUpdated\r\n Recommendation_Error_1001201: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext53094',\r\n }, // Recommendation_Error_AdGroupIdInvalid\r\n Recommendation_Error_1001100: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext60029',\r\n }, // Recommendation_Error_CampaignIdInvalid\r\n Recommendation_Error_1004329: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext60029',\r\n }, // Recommendation_Error_NegativeKeywordDeleted\r\n Recommendation_Error_1004314: {\r\n hasLearnMore: true,\r\n helpId: 'help:ext60029',\r\n }, // Recommendation_Error_SharedListDeleted\r\n Recommendation_Error_93214: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_FailedToSaveWithDuplicatedName\r\n Recommendation_Error_93222: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goals_PleaseEnterValidGoalName\r\n Recommendation_Error_93223: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goals_PleaseEnterValidGoalName\r\n Recommendation_Error_93234: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_FailedToSaveWithLongUrl\r\n Recommendation_Error_93272: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_GoalTypeCannotBeChanged\r\n Recommendation_Error_93237: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_InvalidEventGoalCategory\r\n Recommendation_Error_93239: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_InvalidEventGoalAction\r\n Recommendation_Error_93271: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_GoalValueCurrencyCodeShouldNotBeNull\r\n Recommendation_Error_93274: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_Type_InStoreTransactionAlert\r\n Recommendation_Error_56028: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_AdvertiserCustomerIdInvalid\r\n Recommendation_Error_93233: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_FailedToSaveWithInvalidURLCharacters\r\n Recommendation_Error_93277: {\r\n hasLearnMore: false,\r\n helpId: null,\r\n }, // UnifiedEventTracking_Goal_Creation_CustomerNotEligibleForConversionGoalSelection\r\n};\r\n\r\nexport const CONTEXTUAL_DELIVERY_STATUS = [\r\n 'InvalidFinancialStatusOther',\r\n 'CampaignSuspended',\r\n 'CampaignBudgetPaused',\r\n 'CampaignUserPaused',\r\n 'Eligible',\r\n 'BudgetSuggestions',\r\n 'AutoBiddingLimitedByNotEnoughConversions',\r\n 'AutoBiddingLearning',\r\n 'AutoBiddingLimitedByNotEnoughRevenue',\r\n 'NoEligibleAdGroups',\r\n 'AdGroupExpired',\r\n 'AdGroupDraft',\r\n 'AdGroupUserPaused',\r\n 'AdGroupPrivacyPending',\r\n 'AdGroupTargetingTooNarrow',\r\n 'NoEligibleAds',\r\n 'NoEligibleKeywords',\r\n 'InlineOpportunity',\r\n 'New',\r\n];\r\n\r\nexport const CONTEXTUAL_ENTITY_TYPE = {\r\n CAMPAIGN: 'Campaign',\r\n ADGROUP: 'AdGroup',\r\n KEYWORD: 'Keyword',\r\n AUDIENCE: 'Audience',\r\n NEGATIVE_KEYWORD_LIST: 'NegativeKeywordList',\r\n SHARED_BUDGET: 'SharedBudget',\r\n ACCOUNT: 'Account',\r\n GOAL: 'Goal',\r\n CURRENT_SETTING: 'CurrentSetting',\r\n SUGGESTED_SETTING: 'SuggestedSetting',\r\n GENERATED_FROM: 'GeneratedFrom',\r\n MORE_IMAGES: 'MoreImages',\r\n MORE_CONVERSION_CLARITY_BUTTONS: 'MoreConversionClarityButtons',\r\n IMPORTED_TASK_ITEM: 'ImportedTaskItem',\r\n CAMPAIGNS: 'Campaigns',\r\n};\r\n\r\nexport const RECOMMENDATION_NOTIFICATION_REJECT_REASONS = {\r\n NotInterested: 30,\r\n OtherSolution: 60,\r\n DoNotUnderstand: 10,\r\n NotApplicable: 180,\r\n SpendNoMore: 10,\r\n UseOtherSolution: 60,\r\n ManualBidding: 60,\r\n NotAlignGoal: 30,\r\n NotImprovePerf: 30,\r\n Other: 10,\r\n};\r\n\r\nexport const RECOMMENDATION_SOURCE_FOR_SORT_TYPES = {\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY]: 'Microsoft.Advertiser.AdInsight.Opportunity.Schema.KeywordOpportunitySummary/SourceForSort',\r\n [RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD]: 'Microsoft.Advertiser.AdInsight.Opportunity.Schema.BroadMatchAdoptionOpportunitySummary/SourceForSort',\r\n};\r\n\r\nexport const CROSS_LEVEL_TYPES = [\r\n RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD,\r\n];\r\n\r\nexport const VIEW_TYPES = {\r\n SUMMARY: 'recommendation-summary',\r\n DETAILS: 'recommendation-details',\r\n HISTORY: 'recommendation-history',\r\n AUTO_APPLY_SETTINGS: 'recommendation-auto-apply-settings',\r\n AUTO_APPLY_BULK_UPLOAD: 'recommendation-auto-apply-bulk-upload',\r\n};\r\n\r\nexport const CampaignType = {\r\n None: 0,\r\n Default: 0b1,\r\n Shopping: 0b10,\r\n DynamicSearchAds: 0b100,\r\n Audience: 0b1000,\r\n Smart: 0b10000,\r\n PerformanceMax: 0b1000000,\r\n All: 0xFFFF,\r\n};\r\n\r\nexport const SUPPORTED_CAMPAIGN_TYPES = [\r\n CampaignType.Default,\r\n CampaignType.Shopping,\r\n CampaignType.DynamicSearchAds,\r\n CampaignType.Audience,\r\n CampaignType.PerformanceMax,\r\n];\r\n\r\nexport const MOVE_BUDGET_CAMPAIGN_BUDGET_STATUS = {\r\n Deficit: 'Deficit',\r\n Surplus: 'Surplus',\r\n};\r\n\r\nexport const DOWNLOAD_SCOPE = {\r\n INDIVIDUAL: 'Individual',\r\n ALL: 'All',\r\n};\r\n\r\nexport const TASK_STATUS = {\r\n COMPLETED: 'Completed',\r\n FAILED: 'Failed',\r\n INPROGRESS: 'InProgress',\r\n};\r\n\r\nexport const FAC_FEATURE_ID = {\r\n GOOGLE_IMPORT: '206',\r\n FACEBOOK_IMPORT: '207',\r\n CONVERSION_TRACKING: '208',\r\n CALLOUTCARD_GOOGLE_IMPORT: '209',\r\n CALLOUTCARD_PINTEREST_IMPORT: '210',\r\n CALLOUTCARD_FACEBOOK_IMPORT: '211',\r\n AUTO_BIDDING_MAX_CLICKS: '212',\r\n AUTO_BIDDING_MAX_CONVERSIONS: '213',\r\n SHOPPING_CAMPAIGN: '214',\r\n};\r\n\r\nexport const PAGINATION_DIRECTION = {\r\n PREVIOUS_PAGE: 'previous_page',\r\n NEXT_PAGE: 'next_page',\r\n CURRENT_PAGE: 'current_page',\r\n};\r\n\r\nexport const ORDERBY_DIRECTION = {\r\n ASCENDING: 'ASC',\r\n DESCENDING: 'DESC',\r\n};\r\n\r\nexport const FILTERBY = {\r\n UNDEFINED: 'Undefined',\r\n GREATER_THAN: 'GreaterThan',\r\n GREATER_EQUAL: 'GreaterEqual',\r\n LESS_THAN: 'LessThan',\r\n LESS_EQUAL: 'LessEqual',\r\n};\r\n\r\nexport const PAGINATION_ORDERBY = {\r\n DEFAULT: 'Default',\r\n};\r\n\r\n// mapping of FeatureId to RECOMMENDATION_TYPES, sorted by priority, and string keys\r\nexport const FAC_RECOMMENDATION_CONFIG = {\r\n [FAC_FEATURE_ID.GOOGLE_IMPORT]: {\r\n couponTitleActionKey: 'Summary_Card_Coupon_Title_Google_Import',\r\n couponDescriptionTitleKey: 'Summary_Card_Coupon_Description_Title_Google_Import',\r\n couponDescriptionKey: 'Summary_Card_Coupon_Description_Google_Import',\r\n couponTagMessageKey: 'Summary_Card_Coupon_Tag_Message_Google_Import',\r\n couponLightboxTitle: 'Coupon_LightboxTitleNew',\r\n priority: [\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED,\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT,\r\n ],\r\n },\r\n [FAC_FEATURE_ID.FACEBOOK_IMPORT]: {\r\n couponTitleActionKey: 'Summary_Card_Coupon_Title_Facebook_Import',\r\n couponDescriptionTitleKey: 'Summary_Card_Coupon_Description_Title_Facebook_Import',\r\n couponDescriptionKey: 'Summary_Card_Coupon_Description_Facebook_Import',\r\n couponTagMessageKey: 'Summary_Card_Coupon_Tag_Message_Facebook_Import',\r\n couponLightboxTitle: 'Coupon_LightboxTitleNew',\r\n },\r\n [FAC_FEATURE_ID.CONVERSION_TRACKING]: {\r\n couponTitleActionKey: 'Summary_Card_Coupon_Title_Conversion_Tracking',\r\n couponDescriptionTitleKey: 'Summary_Card_Coupon_Description_Title_Conversion_Tracking',\r\n couponDescriptionKey: 'Summary_Card_Coupon_Description_Conversion_Tracking',\r\n couponTagMessageKey: 'Summary_Card_Coupon_Tag_Message_Conversion_Tracking',\r\n couponLightboxTitle: 'Coupon_LightboxTitleNew',\r\n priority: [\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS,\r\n RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL,\r\n ],\r\n },\r\n [FAC_FEATURE_ID.SHOPPING_CAMPAIGN]: {\r\n couponTitleActionKey: 'Summary_Card_Coupon_Title_Shopping_Campaign',\r\n couponDescriptionTitleKey: 'Summary_Card_Coupon_Description_Title_Shopping_Campaign',\r\n couponDescriptionKey: 'Summary_Card_Coupon_Description_Shopping_Campaign',\r\n couponTagMessageKey: 'Summary_Card_Coupon_Tag_Message_Shopping_Campaign',\r\n couponLightboxTitle: 'Coupon_LightboxTitleNew_Shopping_Campaign',\r\n },\r\n};\r\n\r\n// creates array mapping RECOMMENDATION_TYPES to FeatureId\r\nexport const FAC_RECOMENDATIONTYPE_FEATUREID_MAPPING = _.reduce(\r\n FAC_RECOMMENDATION_CONFIG,\r\n (mapping, { priority }, featureId) =>\r\n _.extend(mapping, ..._.map(priority, recType => ({ [recType]: featureId }))),\r\n {}\r\n);\r\n\r\nexport const TYPE_DESCRIPTION_TABLE = {\r\n [RECOMMENDATION_TYPES.REALLOCATE_BUDGET]: 'Recommendation_Type_Name_Reallocate_Budget_Opportunity',\r\n};\r\n\r\nexport const DATE_FILTER = {\r\n LAST_90: 'last90Days',\r\n LAST_180: 'last180Days',\r\n};\r\n\r\nexport const FILTER_TO_TIME = {\r\n [DATE_FILTER.LAST_90]: -90,\r\n [DATE_FILTER.LAST_180]: -180,\r\n};\r\n\r\nexport const schema = {\r\n scenario: [\r\n {\r\n name: 'loadRecommendationTab',\r\n value: 'LoadRecommendationTab',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'loadRecommendationTab',\r\n value: 'LoadRecommendationTab',\r\n },\r\n // Below activities are for performance logs.\r\n {\r\n name: 'getSummary',\r\n value: 'getsummary',\r\n },\r\n {\r\n name: 'getCoupons',\r\n value: 'getCoupons',\r\n },\r\n {\r\n name: 'getHistory',\r\n value: 'getHistory',\r\n },\r\n {\r\n name: 'getCount',\r\n value: 'getCount',\r\n },\r\n {\r\n name: 'track',\r\n value: 'track',\r\n },\r\n {\r\n name: 'viewCategory',\r\n value: 'ViewCategory',\r\n },\r\n ],\r\n },\r\n ],\r\n};\r\n\r\nexport const GOAL_OPERATOR_TYPES_STRING_VALUES = {\r\n EqualTo: 'UnifiedEventTracking_Goal_Creation_Type_Option_EqualsTo',\r\n EqualsTo: 'UnifiedEventTracking_Goal_Creation_Type_Option_EqualsTo',\r\n Contains: 'UnifiedEventTracking_Goal_Creation_Type_Option_Contains',\r\n BeginsWith: 'UnifiedEventTracking_Goal_Creation_Type_Option_BeginsWith',\r\n RegularExpression: 'UnifiedEventTracking_Goal_Creation_Type_Option_RegularExpression',\r\n LessThan: 'UnifiedEventTracking_Goal_Creation_Type_Option_LessThan',\r\n GreaterThan: 'UnifiedEventTracking_Goal_Creation_Type_Option_GreaterThan',\r\n};\r\n\r\nexport const ADGROUP_TYPES = {\r\n SearchStandard: 'SearchStandard',\r\n SearchDynamic: 'SearchDynamic',\r\n};\r\n\r\nexport const AUTO_APPLY_TYPES = {\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: 'ResponsiveSearchAdsAutoApply',\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: 'MultimediaAdsAutoApply',\r\n};\r\n\r\nexport const AUTO_APPLY_TYPES_NAMES = {\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: 'responsive search ads',\r\n};\r\n\r\n// Recommendation types which support AdInsight MT new auto apply pipeline\r\nexport const SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES = [\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS,\r\n RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD,\r\n RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL,\r\n RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS,\r\n];\r\n\r\nexport const HISTORY_PAGE_TAB_TYPES = {\r\n ALL: 'All',\r\n MANUAL: 'Manual',\r\n AUTO: 'Auto',\r\n};\r\n\r\nexport const IMPORT_TYPE = {\r\n GOOGLE: 'googleimport',\r\n FACEBOOK: 'facebookimport',\r\n};\r\n\r\nexport const ISSUE_TYPES = {\r\n 1: 'Destination URL',\r\n 2: 'Event',\r\n 3: 'Scope',\r\n 4: 'Revenue value',\r\n 5: 'UET',\r\n};\r\n\r\nexport const GA_NO_PILOTING_TYPES = [\r\n RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.REALLOCATE_BUDGET,\r\n RECOMMENDATION_TYPES.MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.FACEBOOK_IMPORT,\r\n RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS,\r\n RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD,\r\n RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD,\r\n RECOMMENDATION_TYPES.REPAIR_KEYWORD,\r\n RECOMMENDATION_TYPES.REPAIR_ADS,\r\n RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.CALLOUT,\r\n RECOMMENDATION_TYPES.SITE_LINK,\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED,\r\n RECOMMENDATION_TYPES.GOOGLE_IMPORT,\r\n RECOMMENDATION_TYPES.TRENDING_QUERY,\r\n RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY,\r\n RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER,\r\n RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS,\r\n RECOMMENDATION_TYPES.FIX_AD_DESTINATION,\r\n RECOMMENDATION_TYPES.FIX_AD_TEXT,\r\n];\r\n\r\nexport const MCC_NOT_SUPPORTED_TYPE = [\r\n RECOMMENDATION_TYPES.FIX_AD_DESTINATION,\r\n RECOMMENDATION_TYPES.FIX_AD_TEXT,\r\n RECOMMENDATION_TYPES.IMAGE_EXTENSION,\r\n];\r\n\r\nexport const CAMPAIGN_ODATA_ERROR_BASELINE = 1000000;\r\n\r\nexport const INLIE_APPLY_ERROR_SUPPORT_TYPES = [\r\n RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS,\r\n RECOMMENDATION_TYPES.MULTIMEDIA_ADS,\r\n];\r\n\r\nexport const MCC_ACCOUNTS_CAPPING = 100;\r\n\r\nexport const COMPETITION_SUMMARY_TOP_NUMBER = 4;\r\n\r\nexport const RECOMMENDATION_SUMMARY_TOP_NUMBER = 10;\r\n\r\nexport const isFilterSearchStandardAdgroupRecommendationType = recommendationType =>\r\n recommendationType === RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY ||\r\n recommendationType === RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD ||\r\n recommendationType === RECOMMENDATION_TYPES.TRENDING_QUERY;\r\n\r\nexport const RECOMMENDATION_AUTO_APPLY_SETTINGS_TOOLTIPS = {\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: {\r\n text: _TL_('We created a new recommendation to improve conversion tracking and conversion goal settings.'),\r\n helpText: _TL_('Learn more about conversion tracking.'),\r\n },\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: {\r\n text: _TL_('We recommend you set up values for missing keyword parameters. Making these changes can increase the click-through rates and ad impressions of your ads.'),\r\n helpText: _TL_('Learn more about missing keyword parameters.'),\r\n },\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: {\r\n text: _TL_('We created a new recommendation to increase conversions and improve conversion tracking when using an enabled UET tag.'),\r\n helpText: _TL_('Learn more about conversion tracking.'),\r\n },\r\n [RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD]: {\r\n text: _TL_('We created a new recommendation to help you resolve negative keyword conflicts that prevent your ads from displaying.'),\r\n helpText: _TL_('Learn more about negative keyword conflicts.'),\r\n },\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: {\r\n text: _TL_('We created a new recommendation to improve your campaign performance by adding multimedia search ads to your ad groups.'),\r\n helpText: _TL_('Learn more about adding multimedia search ads.'),\r\n },\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: {\r\n text: _TL_('We created a new recommendation to improve your campaign performance by adding responsive search ads to your ad groups.'),\r\n helpText: _TL_('Learn more about responsive search ads.'),\r\n },\r\n};\r\n\r\nexport const TOP_POSITION_RECOMMENDATION_TYPES = [\r\n RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION,\r\n];\r\n","export const generateSchema = function (appConfig) {\r\n const minBudget = appConfig.get('BudgetRange').DailyRange.FloorValue;\r\n const maxBudget = appConfig.get('BudgetRange').DailyRange.CeilingValue;\r\n\r\n const minBid = appConfig.get('KeywordBidRange').FloorValue;\r\n const maxBid = appConfig.get('KeywordBidRange').CeilingValue;\r\n\r\n const schema = {\r\n name: 'recommendation details view form',\r\n type: 'object',\r\n properties: {\r\n budgetSuggested: {\r\n required: true,\r\n default: '', // required, otherwise it will not have first required check.\r\n type: 'number',\r\n minimum: minBudget,\r\n maximum: maxBudget,\r\n },\r\n suggestedBid: {\r\n required: true,\r\n default: '',\r\n type: 'number',\r\n minimum: minBid,\r\n maximum: maxBid,\r\n },\r\n },\r\n };\r\n\r\n return schema;\r\n};\r\n","import _ from 'underscore';\r\nimport smartTruncate from 'smart-truncate';\r\n\r\nimport {\r\n SUMMARY_LEVELS,\r\n RECOMMENDATION_TYPES,\r\n MATCH_TYPE_IDS,\r\n MATCH_TYPE,\r\n} from '../consts';\r\n\r\nconst ENTITY_NAME_MAX_LENGTH = 25;\r\nconst ENTITY_NAME_SINGLE_COLUNN_MAX_LENGTH = 50;\r\nconst ENTITY_NAME_ELLIPSIS_INDEX = 15;\r\nconst ENTITY_NAME_SINGLE_COLUNN_ELLIPSIS_INDEX = 30;\r\nconst ENTITY_URL_SINGLE_COLUNN_MAX_LENGTH = 80;\r\nconst ENTITY_URL_SINGLE_COLUNN_ELLIPSIS_INDEX = 30;\r\n\r\nconst percentOptions = {\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 0,\r\n};\r\n\r\nconst percentOptionsOneDecimal = {\r\n minimumFractionDigits: 1,\r\n maximumFractionDigits: 1,\r\n};\r\n\r\nconst percentOptionsHundredths = {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n};\r\n\r\n/**\r\n * Monetary, always with two decimal places\r\n */\r\nconst monetaryOptions = {\r\n compact: 'short',\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n};\r\n\r\n/**\r\n * For impressions and clicks, 0-2 decimal places\r\n */\r\nconst impreAndClicksOptions = {\r\n compact: 'short',\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 2,\r\n};\r\n\r\n/**\r\n * Format cost, spend number with currency symbol and abbreviation.\r\n * Decimals: always 2 decimals\r\n * Example: $323.00K\r\n * @param {number} value - value to be formatted\r\n * @param {Object} i18n - Localization component\r\n * @param {string} currency - currency code\r\n * @return {string} formatted string\r\n */\r\nexport const formatCost = (value, i18n, currency) =>\r\n i18n.formatCurrency(value, currency, monetaryOptions);\r\n\r\n/**\r\n * Format percentage number.\r\n * Decimals: 0 decimal\r\n * Example: 12%\r\n * @param {number} value - value to be formatted\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted string\r\n */\r\nexport const formatPercent = (value, i18n) =>\r\n i18n.formatPercent(value, percentOptions);\r\n\r\n/**\r\n * Format integer number.\r\n * Decimals: 2 decimals\r\n * Example: 12\r\n * @param {number} value - value to be formatted\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted string\r\n */\r\nexport const formatInteger = (value, i18n) =>\r\n i18n.formatDecimal(value, { minimumFractionDigits: 0, maximumFractionDigits: 0 });\r\n\r\n/**\r\n * Format percentage number.\r\n * Decimals: 1 decimal\r\n * Example: 12.9%\r\n * @param {number} value - value to be formatted\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted string\r\n */\r\nexport const formatPercentOneDecimal = (value, i18n) =>\r\n i18n.formatPercent(value, percentOptionsOneDecimal);\r\n\r\n/**\r\n * Format percentage number.\r\n * Decimals: 2 decimals\r\n * Example: 12.00%\r\n * @param {number} value - value to be formatted\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted string\r\n */\r\nexport const formatPercentHundredths = (value, i18n) =>\r\n i18n.formatPercent(value, percentOptionsHundredths);\r\n\r\n/**\r\n * Format number with abbreviation.\r\n * Decimals: 0-2 decimals\r\n * Example: $1K or 1.2M or 1.23B\r\n * @param {number} value - value to be formatted\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted string\r\n */\r\nexport const formatDecimal = (value, i18n) =>\r\n i18n.formatDecimal(value, impreAndClicksOptions);\r\n\r\n/**\r\n * Format bid number with or without currency symbol and abbreviation.\r\n * Decimals: always 2 decimals\r\n * Example: $1.23M or 1.23M\r\n * @param {number} value - value to be formatted\r\n * @param {Object} i18n - Localization component\r\n * @param {string} currency - currency code\r\n * @return {string} formatted string\r\n */\r\nexport const formatBid = (value, i18n, currency) => {\r\n if (currency) {\r\n return i18n.formatCurrency(value, currency, monetaryOptions);\r\n }\r\n return i18n.formatDecimal(value, monetaryOptions);\r\n};\r\n\r\n/**\r\n * Truncate entity name in the middle\r\n * @param {string} name - entity name to be truncated\r\n * @return {string} truncated entity name\r\n */\r\nexport const truncateEntityName = name =>\r\n smartTruncate(name, ENTITY_NAME_MAX_LENGTH, { position: ENTITY_NAME_ELLIPSIS_INDEX });\r\nexport const truncateSingleColumnEntityName = name =>\r\n smartTruncate(\r\n name,\r\n ENTITY_NAME_SINGLE_COLUNN_MAX_LENGTH,\r\n { position: ENTITY_NAME_SINGLE_COLUNN_ELLIPSIS_INDEX }\r\n );\r\n\r\nexport const truncateSingleColumnEntityURL = url =>\r\n smartTruncate(\r\n url,\r\n ENTITY_URL_SINGLE_COLUNN_MAX_LENGTH,\r\n { position: ENTITY_URL_SINGLE_COLUNN_ELLIPSIS_INDEX }\r\n );\r\n\r\nconst campaignNameHtml = campaignName =>\r\n `${truncateEntityName(campaignName)}`;\r\nconst adGroupNameHtml = adGroupName =>\r\n `${truncateEntityName(adGroupName)}`;\r\nconst fullAdGroupNameHtml = (campaignName, adGroupName) => `${campaignNameHtml(campaignName)} > ${adGroupNameHtml(adGroupName)}`;\r\nconst keywordHtml = keyword =>\r\n `${truncateEntityName(keyword)}`;\r\n\r\n/**\r\n * Format target object to html .\r\n * Display text is truncated version.\r\n * Title (hover over) is full version.\r\n * @param {string} level - target level\r\n * @param {Object} target - target object\r\n * @return {string} formatted html string\r\n */\r\nexport const formatEntityNameForHtml = (level, target = {}) => {\r\n const {\r\n CampaignName,\r\n AdGroupName,\r\n Keyword,\r\n } = target;\r\n\r\n switch (level) {\r\n case SUMMARY_LEVELS.CAMPAIGN:\r\n return campaignNameHtml(CampaignName);\r\n case SUMMARY_LEVELS.ADGROUP:\r\n return fullAdGroupNameHtml(CampaignName, AdGroupName);\r\n case SUMMARY_LEVELS.KEYWORD:\r\n return keywordHtml(Keyword);\r\n default:\r\n return '';\r\n }\r\n};\r\n\r\n/**\r\n * Format entity type\r\n * @param {string} level - target level\r\n * @param {number} recommendationsCount - number of recommendations (Plural or Singular)\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted entity type\r\n */\r\nexport const formatEntityType = (level, recommendationsCount, i18n) => {\r\n const form = recommendationsCount > 1 ? 'Plural' : 'Singular';\r\n return i18n.getString(`Summary_Card_${level}_${form}`);\r\n};\r\n\r\nexport const replacePlaceholders = ({\r\n model = {},\r\n type,\r\n i18n,\r\n level,\r\n}, settings) => {\r\n if (!settings) {\r\n return null;\r\n }\r\n\r\n if (_.isString(settings)) {\r\n return i18n.getString(settings);\r\n }\r\n\r\n const {\r\n key,\r\n config,\r\n } = settings || {};\r\n const {\r\n useLevelInComputingEntityName,\r\n useCampaignName,\r\n useAdGroupName,\r\n useOpportunityCount,\r\n compareWithCompetitor,\r\n useSegment,\r\n } = config || {};\r\n const {\r\n target,\r\n isHighConverting,\r\n opportunities = [],\r\n segment,\r\n competitor,\r\n delta,\r\n } = model;\r\n const {\r\n CampaignName,\r\n AdGroupName,\r\n Keyword,\r\n } = target || {};\r\n\r\n let localizedKey = key;\r\n const templateValues = {};\r\n\r\n if (type === RECOMMENDATION_TYPES.COMPETITIVE_BID) {\r\n localizedKey = isHighConverting ? `${key}_High_Converting` : key;\r\n templateValues.keyword = keywordHtml(Keyword);\r\n } else if (useOpportunityCount) {\r\n localizedKey = opportunities.length > 1 ? key : `${key}_Singular`;\r\n templateValues.opportunity_count = opportunities.length;\r\n }\r\n\r\n if (useLevelInComputingEntityName) {\r\n const formattedName = formatEntityNameForHtml(level, target);\r\n templateValues.entity_name = formattedName;\r\n } else if (useAdGroupName) {\r\n templateValues.entity_name = `${fullAdGroupNameHtml(CampaignName, AdGroupName)}`;\r\n } else if (useCampaignName) {\r\n templateValues.entity_name = `${campaignNameHtml(CampaignName)}`;\r\n }\r\n\r\n if (compareWithCompetitor) {\r\n _.extend(templateValues, {\r\n competitor_domain: competitor,\r\n delta: formatPercent(delta, i18n),\r\n });\r\n }\r\n\r\n if (compareWithCompetitor || useSegment) {\r\n templateValues.segment = i18n.getString(`Details_View_Device_Type_${segment}`) || segment;\r\n }\r\n\r\n return i18n.getString(localizedKey, templateValues);\r\n};\r\n\r\nexport const buildSimpleFormFields = (\r\n config,\r\n data,\r\n i18n,\r\n labelProcessor = _.identity,\r\n currency\r\n) => {\r\n const result = _.map(config, (oneRow) => {\r\n const propertyName = oneRow.property;\r\n const propertyValue = propertyName && data[propertyName];\r\n const field = { propertyValue };\r\n\r\n let formattedValue;\r\n if (oneRow.formatter) {\r\n formattedValue = oneRow.formatter(propertyValue, i18n, currency);\r\n } else {\r\n formattedValue = propertyValue && propertyValue.toString();\r\n }\r\n\r\n if (oneRow.type === 'input') {\r\n field.items = [formattedValue, i18n.getString(oneRow.placeHolder)];\r\n } else {\r\n field.value = formattedValue;\r\n }\r\n _.each(oneRow, (val, key) => {\r\n if (_.contains(['text', 'label', 'helpText'], key)) {\r\n field[key] = labelProcessor(i18n.getString(val));\r\n } else if (key === 'enum') {\r\n field[key] = [];\r\n _.each(val, ({ value, text }) => {\r\n let localizedKey = text;\r\n if (value === field.value) {\r\n localizedKey = `${text}_Recommended`;\r\n }\r\n field[key].push({\r\n value,\r\n text: i18n.getString(localizedKey),\r\n });\r\n });\r\n } else {\r\n field[key] = val;\r\n }\r\n });\r\n return field;\r\n });\r\n return result;\r\n};\r\n\r\n/**\r\n * Format match type by ID\r\n * @param {number} matchType - value to match type\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted string\r\n */\r\nexport const formatMatchType = (matchType, i18n) => {\r\n if (matchType === MATCH_TYPE_IDS.EXACT) {\r\n return i18n.getString('Details_View_Match_Type_Exact');\r\n } else if (matchType === MATCH_TYPE_IDS.PHRASE) {\r\n return i18n.getString('Details_View_Match_Type_Phrase');\r\n } else if (matchType === MATCH_TYPE_IDS.BROAD) {\r\n return i18n.getString('Details_View_Match_Type_Broad');\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Format match type by String\r\n * @param {number} matchType - value to match type\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted string\r\n */\r\nexport const formatMatchTypeStr = (matchType, i18n) => {\r\n if (_.isUndefined(matchType)) {\r\n return null;\r\n }\r\n if (matchType.toUpperCase() === MATCH_TYPE.EXACT.toUpperCase()) {\r\n return i18n.getString('Details_View_Match_Type_Exact');\r\n } else if (matchType.toUpperCase() === MATCH_TYPE.PHRASE.toUpperCase()) {\r\n return i18n.getString('Details_View_Match_Type_Phrase');\r\n } else if (matchType.toUpperCase() === MATCH_TYPE.BROAD.toUpperCase()) {\r\n return i18n.getString('Details_View_Match_Type_Broad');\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Format location level\r\n * @param {number} level - value to level\r\n * @param {Object} i18n - Localization component\r\n * @return {string} formatted string\r\n */\r\nexport const formatLocationLevel = (level, i18n) => {\r\n const levelNames = {\r\n Country: i18n.getString('BidAdjustmentOpt_Country'),\r\n State: i18n.getString('BidAdjustmentOpt_State'),\r\n MetroArea: i18n.getString('BidAdjustmentOpt_MetroArea'),\r\n City: i18n.getString('BidAdjustmentOpt_City'),\r\n PostalCode: i18n.getString('BidAdjustmentOpt_PostalCode'),\r\n };\r\n\r\n return levelNames[level];\r\n};\r\n","import {\r\n getPreferences,\r\n savePreferences,\r\n} from '@bingads-webui-campaign/recommendation-preferences';\r\n\r\nexport function getRecommendationPreferences(preferencesService, isUserLevel = true) {\r\n return getPreferences(preferencesService, isUserLevel);\r\n}\r\n\r\nexport function saveRecommendationPreferences(data, preferencesService, isUserLevel = true) {\r\n savePreferences(preferencesService, data, isUserLevel);\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\nimport * as urlUtil from '@bingads-webui/url-util';\r\nimport { CAMPAIGN_TYPES, PREFERENCES_ACTION_TYPES } from '@bingads-webui-campaign/recommendation-preferences';\r\nimport { fromLegacyTimeZone, toIANATimeZone } from '@bingads-webui-universal/time-zone-converter';\r\nimport { editorialErrorCodeToErrorMessageMapping } from '@bingads-webui-campaign/api-errors';\r\n\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n CHANNEL_ALL_RECOMMENDATIONS,\r\n RECOMMENDATION_IDS,\r\n CHANNEL_TYPES,\r\n SUMMARY_LEVELS,\r\n ESTIMATE_TYPES,\r\n ADINSIGHT_LOG_API_NAME,\r\n ADINSIGHT_LOG_ACTION_TYPE,\r\n RECOMMENDATION_DISMISS_FEEDBACK_TYPE,\r\n GA_NO_PILOTING_TYPES,\r\n MCC_NOT_SUPPORTED_TYPE,\r\n RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES,\r\n RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES_TEN,\r\n RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES_TWENTY,\r\n} from './consts';\r\n\r\nimport {\r\n getRecommendationPreferences,\r\n saveRecommendationPreferences,\r\n} from './general-preferences';\r\n\r\nimport { recommendationNewTextConfigs } from './recommendation-configs';\r\n/**\r\n * Check if a recommendation is for competition tab or recommendation tab\r\n * @param {string} type - recommendation type\r\n * @return {boolean} true for competition tab, false for recommendation tab\r\n */\r\nexport const isCompetition = (type) => {\r\n const competitionTypes = CHANNEL_ALL_RECOMMENDATIONS[CHANNEL_TYPES.COMPETITION];\r\n return _.contains(competitionTypes, type);\r\n};\r\n\r\n/**\r\n * Check recommendaton type enabling by parameter\r\n * @param {string} type - recommendation type\r\n * @return {boolean} true for enabled, false for disabled\r\n */\r\nconst isEnabledByUrlParameter = (type) => {\r\n const enabledRecommendationType = urlUtil.getParameter(`IsRecommendationType${type}Enabled`);\r\n return enabledRecommendationType === 'true';\r\n};\r\n\r\n/**\r\n * Is a recommendation type enabled based permission and channel.\r\n * @param {string} type - recommendation type\r\n * @param {string} channel - channel for competition or recommendation\r\n * @param {Object} permissions - permission object\r\n * @param {Object} isMCC - is MCC or not\r\n * @return {boolean} true for enabled, false for disabled\r\n */\r\nexport const isRecommendationTypeEnabled = (\r\n type,\r\n channel,\r\n permissions,\r\n isMCC = false\r\n) => {\r\n const supportedTypes = CHANNEL_ALL_RECOMMENDATIONS[channel];\r\n if (supportedTypes && supportedTypes.indexOf(type) !== -1) {\r\n if (isEnabledByUrlParameter(type)) {\r\n return true;\r\n }\r\n\r\n const isFromMCC = isMCC || channel === CHANNEL_TYPES.MCCRECOMMENDATION || channel === CHANNEL_TYPES.MCCOVERVIEW;\r\n\r\n if (isFromMCC && _.contains(MCC_NOT_SUPPORTED_TYPE, type)) {\r\n return false;\r\n }\r\n\r\n if (_.contains(GA_NO_PILOTING_TYPES, type)) {\r\n return true;\r\n }\r\n\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET:\r\n return permissions.IsRecommendationTypeBudgetEnabled;\r\n // [Recommendation Deprecation] Softly remove CompetitiveBidOpportunity from UI\r\n // TODO: Clean up all related code regarding CompetitiveBidOpportunity\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID:\r\n return false;\r\n // [Recommendation Deprecation] Softly remove DeviceBidBoost from UI\r\n // TODO: Clean up all related code regarding DeviceBidBoost\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST:\r\n return false;\r\n // [Recommendation Deprecation] Softly remove LocationBidBoost from UI\r\n // TODO: Clean up all related code regarding LocationBidBoost\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST:\r\n return false;\r\n case RECOMMENDATION_TYPES.NEW_LOCATION:\r\n return false;\r\n case RECOMMENDATION_TYPES.SYNDICATION:\r\n return false;\r\n case RECOMMENDATION_TYPES.IMAGE_EXTENSION:\r\n return permissions.IsRecommendationTypeImageExtensionEnabled;\r\n case RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS:\r\n return permissions.IsRecommendationTypeRepairMissingKeywordParamsEnabled;\r\n case RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID:\r\n return permissions.IsFixNoImpressionBidRecommendationEnabled;\r\n case RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS:\r\n return permissions.IsRecommendationTypeImproveResponsiveSearchAdsEnabled;\r\n case RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION:\r\n return false;\r\n case RECOMMENDATION_TYPES.PMAX_IMPORT:\r\n return permissions.IsRecommendationTypePmaxImportEnabled;\r\n case RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION:\r\n return permissions.IsRecommendationTypeDSA2PMaxMigrationEnabled;\r\n case RECOMMENDATION_TYPES.SYNDICATION_GAP:\r\n return permissions.IsRecommendationTypeSyndicationGapEnabled;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\n/**\r\n * Get enabled recommendation types.\r\n * If recommendation type is given, return its Id (if enabled)\r\n * If recommendation type is not given, return all enabled type for this channel\r\n * @param {string} recommendationType - recommendation type\r\n * @param {string} channel - channel for competition or recommendation\r\n * @param {Object} permissions - permission object\r\n * @param {Object} isMCC - is MCC or not\r\n * @return {Array} enabled type collection\r\n */\r\nexport const getRecommendationTypes = (\r\n recommendationType,\r\n channel,\r\n permissions,\r\n isMCC = false\r\n) => {\r\n const types = recommendationType ? [recommendationType] : CHANNEL_ALL_RECOMMENDATIONS[channel];\r\n const enabledTypes = _.filter(\r\n types,\r\n type => isRecommendationTypeEnabled(type, channel, permissions, isMCC)\r\n );\r\n\r\n return enabledTypes;\r\n};\r\n\r\n/**\r\n * Get enabled recommendation ids.\r\n * If recommendation type is given, return its Id (if enabled)\r\n * If recommendation type is not given, return all enabled Ids for this channel\r\n * @param {string} recommendationType - recommendation type\r\n * @param {string} channel - channel for competition or recommendation\r\n * @param {Object} permissions - permission object\r\n * @param {Object} isMCC - is MCC or not\r\n * @return {Array} enabled id collection\r\n */\r\nexport const getRecommendationIds = (\r\n recommendationType,\r\n channel,\r\n permissions,\r\n isMCC = false\r\n) => {\r\n const types = recommendationType ?\r\n _.flatten([recommendationType]) : CHANNEL_ALL_RECOMMENDATIONS[channel];\r\n const enabledTypes = _.filter(\r\n types,\r\n type => isRecommendationTypeEnabled(type, channel, permissions, isMCC)\r\n );\r\n\r\n return _.map(enabledTypes, type => RECOMMENDATION_IDS[type]);\r\n};\r\n\r\n/**\r\n * Get preference data\r\n * @param {Object} preferencesService - preference service\r\n * @param {string} name - data name\r\n * @return {Object} preference data\r\n */\r\nexport function getPreferences(preferencesService, name) {\r\n const sessionData = preferencesService.findByNameAtUserLevel(name);\r\n\r\n return _.result(sessionData, 'Data', {});\r\n}\r\n\r\n/**\r\n * Save preference data\r\n * @param {Object} preferencesService - preference service\r\n * @param {string} name - data name\r\n * @param {Object} data - preference data to be saved\r\n * @return {undefined}\r\n */\r\nexport function savePreferences(preferencesService, name, data) {\r\n const Data = merge(\r\n {},\r\n getPreferences(preferencesService, name),\r\n data\r\n );\r\n\r\n preferencesService.setAtUserLevel({\r\n Name: name,\r\n Data,\r\n });\r\n}\r\n\r\n/**\r\n * Check if it is read only user or account is inactive\r\n * @param {Object} appConfig - legacy module 'component/config/index'\r\n * @param {bool} isMCC - is or not customer level\r\n * @return {bool} true if edit is not allowed\r\n */\r\nexport function isReadOnly(appConfig, isMCC = false) {\r\n return !!(appConfig.get('Permissions').IsReadOnlyUser || (!isMCC && appConfig.get('CurrentAccountInActive')));\r\n}\r\n\r\nconst levelWeight = {\r\n [SUMMARY_LEVELS.CUSTOMER]: 4,\r\n [SUMMARY_LEVELS.ACCOUNT]: 3,\r\n [SUMMARY_LEVELS.CAMPAIGN]: 2,\r\n [SUMMARY_LEVELS.ADGROUP]: 1,\r\n [SUMMARY_LEVELS.KEYWORD]: 0,\r\n};\r\n\r\n/**\r\n * Check if a aggregate level is a parent of the scope.\r\n * E.g. Campaign level is a parent of Ad Group scope\r\n * @param {string} scope - the scope (e.g. Campaign, Ad Group)\r\n * @param {string} level - the level (e.g. Campaign, Ad Group)\r\n * @return {bool} true if level is a parent of the scope.\r\n */\r\nexport function isParentLevel(scope, level) {\r\n return levelWeight[scope] < levelWeight[level];\r\n}\r\n\r\nexport function getIncreaseSymbol(value, type = 'normal') {\r\n const map = {\r\n normal: '+',\r\n arrow: '↑ ',\r\n };\r\n return value >= 0 ? map[type] : '';\r\n}\r\n\r\n/**\r\n * Check if an estimate is positive.\r\n * E.g. increase of cost should not be highlighted\r\n * @param {number} value - the delta value\r\n * @param {string} type - type of estimates\r\n * @return {bool} true if it should be highlighted\r\n */\r\nexport function isPositive(value, type = 'default') {\r\n return type === ESTIMATE_TYPES.COST ? value <= 0 : value > 0;\r\n}\r\n\r\n/**\r\n *\r\n *\r\n * @param {object} $el - element\r\n * @param {number} extra - extra bottom need to show\r\n * @returns {boolean} if bottom of the element in screen\r\n */\r\nexport function checkBottomInScreen($el, extra = 0) {\r\n return ($el.offset().top + $el.outerHeight() > $(document).scrollTop()) &&\r\n ($el.offset().top + $el.outerHeight() + extra < $(window).height() + $(document).scrollTop());\r\n}\r\n\r\n/**\r\n *\r\n *\r\n * @param {object} $el - element\r\n * @param {number} extra - extra bottom need to show\r\n * @returns {boolean} if the element will extend the height of document return false else true\r\n */\r\nexport function CheckDocBottomMargin($el, extra = 0) {\r\n return $el.offset().top + $el.outerHeight() + extra < $(document).height();\r\n}\r\n\r\nexport function dismissFeedback(op) {\r\n const {\r\n campaignId,\r\n currentActivity,\r\n feedback: { preference, reason },\r\n preferencesService,\r\n rejectAutoApplySuggestedAds,\r\n context,\r\n guid,\r\n isMCC,\r\n } = op;\r\n const { type, expireTime } = preference;\r\n let api = ADINSIGHT_LOG_API_NAME.RECOMMENDATION;\r\n let channel = isMCC ? CHANNEL_TYPES.MCCRECOMMENDATION : CHANNEL_TYPES.RECOMMENDATION;\r\n\r\n if (isCompetition(type)) {\r\n api = ADINSIGHT_LOG_API_NAME.COMPETITION;\r\n channel = CHANNEL_TYPES.COMPETITION;\r\n }\r\n currentActivity.trace({\r\n type: type || '',\r\n typeId: RECOMMENDATION_IDS[type],\r\n action: ADINSIGHT_LOG_ACTION_TYPE.FEEDBACK,\r\n input: reason,\r\n campaignId,\r\n channel,\r\n context: JSON.stringify(context),\r\n guid,\r\n }, api);\r\n const name = rejectAutoApplySuggestedAds ?\r\n CAMPAIGN_TYPES.RejectAutoApplySuggestedAds :\r\n CAMPAIGN_TYPES.DismissFeedback;\r\n\r\n saveRecommendationPreferences(\r\n {\r\n [name]: { [type]: expireTime },\r\n },\r\n preferencesService\r\n );\r\n}\r\n\r\nexport function hideInContextRecommendation(op) {\r\n const {\r\n levelAt,\r\n id,\r\n type,\r\n currentActivity,\r\n preferencesService,\r\n channel,\r\n campaignId,\r\n context,\r\n isCardView,\r\n guid,\r\n } = op;\r\n\r\n currentActivity.trace({\r\n type,\r\n typeId: RECOMMENDATION_IDS[type],\r\n action: ADINSIGHT_LOG_ACTION_TYPE.HIDE,\r\n channel,\r\n campaignId,\r\n context: JSON.stringify(context),\r\n guid,\r\n }, ADINSIGHT_LOG_API_NAME.RECOMMENDATION);\r\n const name = isCardView ?\r\n PREFERENCES_ACTION_TYPES.HidedRecommendationCards :\r\n PREFERENCES_ACTION_TYPES.HidedRecommendationBanner;\r\n const preferences = getRecommendationPreferences(preferencesService);\r\n const levelPreferences = _.chain(preferences)\r\n .result(`${name}`)\r\n .result(`${type}`)\r\n .result(`${levelAt}`, [])\r\n .value();\r\n\r\n levelPreferences.push(id);\r\n\r\n saveRecommendationPreferences(\r\n {\r\n [name]: {\r\n [type]: {\r\n [levelAt]: levelPreferences,\r\n },\r\n },\r\n },\r\n preferencesService\r\n );\r\n}\r\n\r\nexport function isShowAutoApplyFeedback(op) {\r\n const { preferencesService, type, rejectAutoApplySuggestedAds } = op;\r\n const data = getRecommendationPreferences(preferencesService);\r\n const preference = data[rejectAutoApplySuggestedAds ?\r\n CAMPAIGN_TYPES.RejectAutoApplySuggestedAds :\r\n CAMPAIGN_TYPES.DismissFeedback];\r\n if (!RECOMMENDATION_DISMISS_FEEDBACK_TYPE[type]) {\r\n return false;\r\n }\r\n if (preference && preference[type]) {\r\n return Date.now() > preference[type];\r\n }\r\n return true;\r\n}\r\n\r\nexport function getChannel(\r\n type,\r\n isInContext,\r\n isMCC = false,\r\n isOverviewPage = false,\r\n inContextCard = false\r\n) {\r\n if (isCompetition(type)) {\r\n return CHANNEL_TYPES.COMPETITION;\r\n } else if (isInContext) {\r\n return CHANNEL_TYPES.INCONTEXT;\r\n } else if (isMCC && isOverviewPage) {\r\n return CHANNEL_TYPES.MCCOVERVIEW;\r\n } else if (isMCC) {\r\n return CHANNEL_TYPES.MCCRECOMMENDATION;\r\n } else if (inContextCard) {\r\n return CHANNEL_TYPES.INCONTEXTCARD;\r\n }\r\n return CHANNEL_TYPES.RECOMMENDATION;\r\n}\r\n\r\n/**\r\n * group UserInputs to {AccountId: [Userinputs]} for bulk apply\r\n *\r\n * @param {object} options - options\r\n * @param {array} options.userInputs - ungrouped userInputs\r\n * @param {array} options.opportunities - opportunities,\r\n * the options.userInputs must generate from users.opportunities\r\n * @returns {object} grouped userinputs\r\n */\r\nexport function groupUserInputs({\r\n userInputs,\r\n opportunities,\r\n}) {\r\n const groupedInputs = {};\r\n\r\n _.map(userInputs, (userInput) => {\r\n const opportunity = _.find(\r\n opportunities,\r\n oppo => oppo.OpportunityId === userInput.OpportunityId\r\n );\r\n const accountId = opportunity.Target.AccountId;\r\n if (!_.isUndefined(groupedInputs[accountId])) {\r\n groupedInputs[accountId].push(userInput);\r\n } else {\r\n groupedInputs[accountId] = [userInput];\r\n }\r\n });\r\n\r\n return _.map(groupedInputs, (val, key) => ({\r\n Key: parseInt(key, 10),\r\n Value: val,\r\n }));\r\n}\r\n\r\n/**\r\n * format MT date to human readable string with time zone\r\n *\r\n * @param {int} startDate - startDate in int style\r\n * @param {object} i18n - i18n\r\n * @param {int} timeZone - time zone in int\r\n * @returns {string} human readable date string\r\n */\r\nexport function formatStartDate(startDate, i18n, timeZone) {\r\n const applyDateStr = startDate.toString();\r\n const applyDate = i18n.parseDate(`${applyDateStr.substring(0, 4)}/${applyDateStr.substring(4)}`, { raw: 'yyyy/MMddHHmmss', timeZone: 'UTC' });\r\n const accountTimeZone = toIANATimeZone(fromLegacyTimeZone(timeZone));\r\n return i18n.formatDate(_.max([applyDate, new Date()]), { timeZone: accountTimeZone });\r\n}\r\n\r\nexport function getIconClasses(statusId, count) {\r\n const classes = {};\r\n let cur = 0;\r\n\r\n while (cur < count) {\r\n if (cur === statusId) {\r\n classes[`icon${cur}`] = 'status-current';\r\n } else if (cur < statusId) {\r\n classes[`icon${cur}`] = 'status-complete';\r\n } else {\r\n classes[`icon${cur}`] = 'status-next';\r\n }\r\n cur += 1;\r\n }\r\n return classes;\r\n}\r\n\r\nexport function getNewTextConfigByPermission(recommendationType, permissions = {}, configType) {\r\n const config = recommendationNewTextConfigs[recommendationType];\r\n let newConfig;\r\n\r\n if (config && permissions[config.permission]) {\r\n newConfig = config[configType];\r\n }\r\n return newConfig;\r\n}\r\n\r\nexport function getShiftedDate(shift) {\r\n const now = new Date();\r\n const shiftedDate = new Date(now.setDate(now.getDate() + (shift || 0)));\r\n\r\n return shiftedDate.toISOString().slice(0, 10);\r\n}\r\n\r\nexport const getDestUrlData = (\r\n destUrlCurrentSetting,\r\n destUrlSuggestedSetting,\r\n goalOperatorTypes,\r\n i18n\r\n) => ({\r\n currentDestinationURLOperatorName:\r\n goalOperatorTypes[destUrlCurrentSetting.DestinationURLOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[destUrlCurrentSetting.DestinationURLOperatorCode])\r\n : destUrlCurrentSetting.DestinationURLOperatorName,\r\n currentDestinationUrl: destUrlCurrentSetting.DestinationUrl,\r\n suggestedDestinationURLOperatorName:\r\n goalOperatorTypes[destUrlSuggestedSetting.DestinationURLOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[destUrlSuggestedSetting.DestinationURLOperatorCode])\r\n : destUrlSuggestedSetting.DestinationURLOperatorName,\r\n suggestedDestinationUrl: destUrlSuggestedSetting.DestinationUrl,\r\n});\r\n\r\nexport const getEventData = (\r\n eventCurrentSetting,\r\n eventSuggestedSetting,\r\n goalOperatorTypes,\r\n i18n\r\n) => ({\r\n categoryTitle: i18n.getString('UnifiedEventTracking_Goal_Creation_Type_Event_Category'),\r\n currentCategoryName: eventCurrentSetting.Category,\r\n currentCategoryOperatorName:\r\n goalOperatorTypes[eventCurrentSetting.CategoryOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[eventCurrentSetting.CategoryOperatorCode])\r\n : eventCurrentSetting.CategoryOperatorName,\r\n suggestedCategoryName: eventSuggestedSetting.Category,\r\n suggestedCategoryOperatorName:\r\n goalOperatorTypes[eventSuggestedSetting.CategoryOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[eventSuggestedSetting.CategoryOperatorCode])\r\n : eventSuggestedSetting.CategoryOperatorName,\r\n actionTitle: i18n.getString('UnifiedEventTracking_Goal_Creation_Type_Event_Action'),\r\n currentActionName: eventCurrentSetting.Action,\r\n currentActionOperatorName:\r\n goalOperatorTypes[eventCurrentSetting.ActionOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[eventCurrentSetting.ActionOperatorCode])\r\n : eventCurrentSetting.ActionOperatorName,\r\n suggestedActionName: eventSuggestedSetting.Action,\r\n suggesteActionOperatorName:\r\n goalOperatorTypes[eventSuggestedSetting.ActionOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[eventSuggestedSetting.ActionOperatorCode])\r\n : eventSuggestedSetting.CategoryOperatorName,\r\n labelTitle: i18n.getString('UnifiedEventTracking_Goal_Creation_Type_Event_Label'),\r\n currentLabelName: eventCurrentSetting.Label,\r\n currentLabelOperatorName:\r\n goalOperatorTypes[eventCurrentSetting.LabelOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[eventCurrentSetting.LabelOperatorCode])\r\n : eventCurrentSetting.LabelOperatorName,\r\n suggestedLabelName: eventSuggestedSetting.Label,\r\n suggestedLabelOperatorName:\r\n goalOperatorTypes[eventSuggestedSetting.LabelOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[eventSuggestedSetting.LabelOperatorCode])\r\n : eventSuggestedSetting.LabelOperatorName,\r\n valueTitle: i18n.getString('UnifiedEventTracking_Goal_Creation_Type_Event_Value'),\r\n currentValueName: eventCurrentSetting.Value,\r\n currentValueOperatorName:\r\n goalOperatorTypes[eventCurrentSetting.ValueOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[eventCurrentSetting.ValueOperatorCode])\r\n : eventCurrentSetting.ValueOperatorName,\r\n suggestedValueName: eventSuggestedSetting.Value,\r\n suggesteValueOperatorName:\r\n goalOperatorTypes[eventSuggestedSetting.ValueOperatorCode] ?\r\n i18n.getString(goalOperatorTypes[eventSuggestedSetting.ValueOperatorCode])\r\n : eventSuggestedSetting.ValueOperatorName,\r\n});\r\n\r\nexport function isPlural(value) {\r\n return value > 1 ? 'Plural' : 'Singular';\r\n}\r\n\r\nexport const getEditorialErrorMessage = (policyCode) => {\r\n const policyErrorStr = `Error_Editorial_Raw_${policyCode}`;\r\n let editorialErrorMessage = editorialErrorCodeToErrorMessageMapping[policyErrorStr];\r\n if (_.isUndefined(editorialErrorMessage)) {\r\n editorialErrorMessage = editorialErrorCodeToErrorMessageMapping.EditorialReasons_Default;\r\n }\r\n return editorialErrorMessage;\r\n};\r\n\r\nexport const isDFMEnabled = () => {\r\n const previousRoute = _.property(['state', 'state', 'previousRoute'])(history);\r\n return _.isUndefined(previousRoute)\r\n || (previousRoute && !previousRoute.includes('/recommendations/'));\r\n};\r\n\r\nexport const getImageExtensionPageSize = (permissions) => {\r\n let pageSize = RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES.slice();\r\n if (permissions.IsRecommendationIncreaseImageExtensionPageSizePhase2Enabled) {\r\n pageSize = RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES_TWENTY.slice();\r\n } else if (permissions.IsRecommendationIncreaseImageExtensionPageSizePhase1Enabled) {\r\n pageSize = RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES_TEN.slice();\r\n }\r\n return pageSize;\r\n};\r\n\r\nexport const getFieldValueFromGridData = (gridData, field) => {\r\n let value;\r\n const campaignGridData = _.first(_.where(gridData, { Type: 'Campaign' }));\r\n const adGroupProductPartitionGridData = _.first(_.where(gridData, { Type: 'Ad Group Product Partition' }));\r\n if (!_.isUndefined(campaignGridData)) {\r\n if (field === 'CampaignName') {\r\n value = campaignGridData.CampaignName;\r\n } else if (field === 'AdGroupName') {\r\n value = adGroupProductPartitionGridData.AdGroupName;\r\n } else if (field === 'ProductCondition1') {\r\n value = adGroupProductPartitionGridData.ProductCondition1;\r\n } else if (field === 'Bid') {\r\n value = adGroupProductPartitionGridData.Bid;\r\n } else if (field === 'Budget') {\r\n value = campaignGridData.Budget;\r\n } else if (field === 'Priority') {\r\n value = campaignGridData.Priority;\r\n } else if (field === 'StoreId') {\r\n value = campaignGridData.StoreId;\r\n }\r\n }\r\n return value;\r\n};\r\n","import _ from 'underscore';\r\n\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n ESTIMATE_TYPES,\r\n VISUAL_TYPES,\r\n VISUAL_TABLE_ENABLED_SCOPES,\r\n} from './consts';\r\n\r\nimport { formatCost, formatPercent, formatBid, formatDecimal } from './formatter/index';\r\nimport { isPlural } from './util';\r\n\r\nfunction buildActionGridDataForBidBoost({\r\n recommendation,\r\n i18n,\r\n currency,\r\n}, useBid = false) {\r\n const {\r\n opportunities,\r\n bidCurrent,\r\n currentBidAdjustmentPercent,\r\n imprShareCurrent,\r\n costCurrent,\r\n } = recommendation;\r\n const formatCostWithi18n = _.partial(formatCost, _, i18n, currency);\r\n const formatPercentWithi18n = _.partial(formatPercent, _, i18n);\r\n const formatBidWithi18n = _.partial(formatBid, _, i18n, currency);\r\n const formatDecimalWithi18n = _.partial(formatDecimal, _, i18n);\r\n\r\n const bodies = _.map(opportunities, (opportunity) => {\r\n const newBidOrAdjustment = useBid ?\r\n formatBidWithi18n(opportunity.suggestedBid) :\r\n formatPercentWithi18n(opportunity.suggestedBidAdjustmentPercent / 100);\r\n const competitorImprShareIncrease = `${formatPercentWithi18n(opportunity.imprShareIncrease)} ${i18n.getString('Summary_Card_Estimate_Points')}`;\r\n const competitorTotalImprShare = formatPercentWithi18n(opportunity.totalImprShare);\r\n const competitorWeeklyCost = formatCostWithi18n(opportunity.weeklyCost);\r\n const competitorImprShare = formatPercentWithi18n(opportunity.competitorImprShare);\r\n const competitorClicksIncrease = formatDecimalWithi18n(opportunity.clicksIncrease);\r\n const competitorConversionsIncrease = formatDecimalWithi18n(opportunity.convIncrease);\r\n\r\n return [\r\n newBidOrAdjustment,\r\n competitorImprShareIncrease,\r\n competitorTotalImprShare,\r\n competitorClicksIncrease,\r\n competitorConversionsIncrease,\r\n competitorWeeklyCost,\r\n opportunity.competitorDomain,\r\n competitorImprShare,\r\n ];\r\n });\r\n const currentBidOrAdjustment = useBid ?\r\n formatBidWithi18n(bidCurrent) : formatPercentWithi18n(currentBidAdjustmentPercent / 100);\r\n const currentTotalImprShare = formatPercentWithi18n(imprShareCurrent);\r\n const currentWeeklyCost = formatCostWithi18n(costCurrent);\r\n const ZERO_PERCENT = `${formatPercentWithi18n(0)} ${i18n.getString('Summary_Card_Estimate_Points')}`;\r\n const ZERO = '0'; // no format should be needed\r\n\r\n bodies.push([\r\n currentBidOrAdjustment,\r\n ZERO_PERCENT,\r\n currentTotalImprShare,\r\n ZERO,\r\n ZERO,\r\n currentWeeklyCost,\r\n '',\r\n '']);\r\n return bodies;\r\n}\r\n\r\nfunction buildActionGridDataForNewLocation({\r\n recommendation,\r\n i18n,\r\n currency,\r\n}) {\r\n const bodies = _.map(recommendation.opportunities, (opportunity) => {\r\n const recommendedLoc = opportunity.location;\r\n const searchQueryVolume = formatDecimal(opportunity.searchQueryVolume, i18n);\r\n const imprIncrease = formatDecimal(opportunity.impressionsIncrease, i18n);\r\n const costIncrease = formatCost(opportunity.costIncrease, i18n, currency);\r\n const clicksIncrease = formatDecimal(opportunity.clicksIncrease, i18n);\r\n\r\n return [\r\n recommendedLoc,\r\n searchQueryVolume,\r\n imprIncrease,\r\n clicksIncrease,\r\n costIncrease,\r\n ];\r\n });\r\n\r\n return bodies;\r\n}\r\n\r\nexport const recommendationConfigs = {\r\n [RECOMMENDATION_TYPES.BUDGET]: {\r\n summaryTitle: 'Summary_Card_Title_Budget',\r\n summaryIconClasses: 'recommendation-budget-icon',\r\n summaryIconClassesVNext: 'Financial',\r\n detailDescription: 'Summary_Card_Detail_Description_Budget',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Budget',\r\n detailHelpId: 'ext56677',\r\n sampleInsight: 'Summary_Card_Sample_Insight_Budget',\r\n sampleActionHeaders: [\r\n 'Summary_Card_Action_Header_Buget_Increase',\r\n 'Summary_Card_Action_Header_Est_Impression_Share',\r\n ],\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSION_SHARE,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.LINE_WEEKLY_CHART,\r\n recommendation: {\r\n actionTitle: 'Details_View_Modify_Budget',\r\n insightTitle: {\r\n key: 'Details_View_Budget_Insight',\r\n config: {\r\n useCampaignName: true,\r\n },\r\n },\r\n actionDataInForm: [{\r\n label: 'Details_View_Current_Budget',\r\n property: 'budgetCurrent',\r\n formatter: formatDecimal,\r\n }, {\r\n label: 'Details_View_Suggested_Budget',\r\n property: 'budgetSuggested',\r\n type: 'input',\r\n formatter: formatCost,\r\n placeHolder: 'Details_View_Suggested_Budget_Placeholder',\r\n }],\r\n },\r\n },\r\n [RECOMMENDATION_TYPES.COMPETITIVE_BID]: {\r\n summaryTitle: 'Summary_Card_Title_Competitive_Bid',\r\n summaryIconClasses: 'recommendation-bid-icon',\r\n summaryIconClassesVNext: 'WebConversion',\r\n detailDescription: 'Summary_Card_Detail_Description_Competitive_Bid',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Competitive_Bid',\r\n detailHelpId: 'ext53092',\r\n sampleInsight: 'Summary_Card_Sample_Insight_Competitive_Bid',\r\n sampleActionHeaders: [\r\n 'Summary_Card_Action_Header_Keyword',\r\n 'Summary_Card_Action_Header_Suggested_Bid',\r\n 'Summary_Card_Action_Header_Est_Impressions',\r\n ],\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSION_SHARE,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.LINE_COLUMN_CHART,\r\n recommendation: {\r\n insightTitle: {\r\n key: 'Details_View_Competitive_Bid_Insight',\r\n config: {\r\n useAdGroupName: true,\r\n },\r\n },\r\n actionTitle: 'Details_View_Increase_Keyword_Bid',\r\n actionGrid: {\r\n dataBuilder: _.partial(buildActionGridDataForBidBoost, _, true),\r\n columns: [{\r\n header: 'Details_View_Action_Header_New_Bid',\r\n }, {\r\n header: 'Details_View_Action_Header_Impression_Share_Change',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Total_Impression_Share',\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Clicks',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Conversions',\r\n isIncrease: true,\r\n autoHide: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Weekly_Spend',\r\n }, {\r\n header: 'Details_View_Action_Header_Competitor_Domain',\r\n enableCheckedIcon: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Competitor_Impresssion_Share',\r\n }],\r\n singleSelection: true,\r\n hasLastRowAsCurrent: true,\r\n },\r\n },\r\n },\r\n [RECOMMENDATION_TYPES.DEVICE_BID_BOOST]: {\r\n summaryTitle: 'Summary_Card_Title_Device_Bid_Boost',\r\n summaryIconClasses: 'recommendation-bid-icon',\r\n summaryIconClassesVNext: 'WebConversion',\r\n detailDescription: 'Summary_Card_Detail_Description_Device_Bid_Boost',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Device_Bid_Boost',\r\n detailHelpId: 'ext51004',\r\n sampleInsight: 'Summary_Card_Sample_Insight_Device_Bid_Boost',\r\n sampleActionHeaders: [\r\n 'Summary_Card_Action_Header_Device_Type',\r\n 'Summary_Card_Action_Header_Increase_Bid',\r\n 'Summary_Card_Action_Header_Est_Impression_Share',\r\n ],\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSION_SHARE,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.COLUMN_CHART,\r\n recommendation: {\r\n insightTitle: {\r\n key: 'Details_View_Device_Bid_Boost_Insight',\r\n config: {\r\n useLevelInComputingEntityName: true,\r\n compareWithCompetitor: true,\r\n },\r\n },\r\n actionTitle: {\r\n key: 'Details_View_Increase_Device_Bid_Boost',\r\n config: {\r\n useSegment: true,\r\n },\r\n },\r\n actionGrid: {\r\n dataBuilder: buildActionGridDataForBidBoost,\r\n columns: [{\r\n header: 'Details_View_Action_Header_New_Bid_Adjustment',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Impression_Share_Change',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Total_Impression_Share',\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Clicks',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Conversions',\r\n isIncrease: true,\r\n autoHide: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Weekly_Spend',\r\n }, {\r\n header: 'Details_View_Action_Header_Competitor_Domain',\r\n enableCheckedIcon: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Competitor_Impresssion_Share',\r\n }],\r\n singleSelection: true,\r\n hasLastRowAsCurrent: true,\r\n },\r\n },\r\n },\r\n [RECOMMENDATION_TYPES.LOCATION_BID_BOOST]: {\r\n summaryTitle: 'Summary_Card_Title_Location_Bid_Boost',\r\n summaryIconClasses: 'recommendation-bid-icon',\r\n summaryIconClassesVNext: 'WebConversion',\r\n detailDescription: 'Summary_Card_Detail_Description_Location_Bid_Boost',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Location_Bid_Boost',\r\n detailHelpId: 'ext51100',\r\n sampleInsight: 'Summary_Card_Sample_Insight_Location_Bid_Boost',\r\n sampleActionHeaders: [\r\n 'Summary_Card_Action_Header_Location',\r\n 'Summary_Card_Action_Header_Increase_Bid',\r\n 'Summary_Card_Action_Header_Est_Impression_Share',\r\n ],\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSION_SHARE,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.COLUMN_CHART,\r\n recommendation: {\r\n insightTitle: {\r\n key: 'Details_View_Location_Bid_Boost_Insight',\r\n config: {\r\n useLevelInComputingEntityName: true,\r\n compareWithCompetitor: true,\r\n },\r\n },\r\n actionTitle: 'Details_View_Increase_Location_Bid_Boost',\r\n actionGrid: {\r\n dataBuilder: buildActionGridDataForBidBoost,\r\n columns: [{\r\n header: 'Details_View_Action_Header_New_Bid_Adjustment',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Impression_Share_Change',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Total_Impression_Share',\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Clicks',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Conversions',\r\n isIncrease: true,\r\n autoHide: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Weekly_Spend',\r\n }, {\r\n header: 'Details_View_Action_Header_Competitor_Domain',\r\n enableCheckedIcon: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Competitor_Impresssion_Share',\r\n }],\r\n singleSelection: true,\r\n hasLastRowAsCurrent: true,\r\n },\r\n postprocessor(data, recommendation, i18n) {\r\n if (_.isUndefined(recommendation.targetGroupId) ||\r\n _.isNull(recommendation.targetGroupId) ||\r\n recommendation.targetGroupId === '') {\r\n /* eslint-disable no-param-reassign */\r\n data.actionTitle = i18n.getString('Details_View_Target_Location_Bid_Boost');\r\n data.actionDataInGrid.hasLastRowAsCurrent = false;\r\n data.actionDataInGrid.bodies.pop();\r\n data.actionTitleExtraForm = [{\r\n label: i18n.getString('Details_View_Action_Header_Target_Location'),\r\n property: 'segment',\r\n value: recommendation.segment.toString(),\r\n }];\r\n /* eslint-enable no-param-reassign */\r\n }\r\n },\r\n },\r\n },\r\n // deprecated in Oct 2023\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD]: {\r\n summaryTitle: 'Summary_Card_Title_New_Keyword',\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: 'Summary_Card_Detail_Description_New_Keyword',\r\n detailPitching: 'Summary_Card_Detail_Pitching_New_Keyword',\r\n detailHelpId: 'ext51010',\r\n sampleInsight: 'Summary_Card_Sample_Insight_New_Keyword',\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Suggested_Keyword',\r\n /* 'Summary_Card_Action_Header_Monthly_Search_Volume',\r\n //bug 1457951: disable until est. weekly search volume is available */\r\n 'Summary_Card_Action_Header_Suggested_Bid',\r\n 'Summary_Card_Action_Header_Est_Impressions',\r\n ],\r\n recommendation: {\r\n visualType: VISUAL_TYPES.SEARCH_TERMS_CHART,\r\n actionTitle: 'Details_View_Add_Keyword',\r\n insightTitle: {\r\n key: 'Details_View_Keyword_Insight',\r\n config: {\r\n useAdGroupName: true,\r\n },\r\n },\r\n visualData: [{\r\n label: 'Details_View_Insight_Suggested_Keyword',\r\n property: 'suggestedKeyword',\r\n }, {\r\n label: 'Details_View_Insight_Search_Query',\r\n property: 'monthlyQueryVolume',\r\n formatter: formatDecimal,\r\n }],\r\n actionDataInForm: [{\r\n label: 'Details_View_Keyword',\r\n property: 'suggestedKeyword',\r\n }, {\r\n label: 'Details_View_Suggested_Keyword_Bid',\r\n type: 'input',\r\n property: 'suggestedBid',\r\n formatter: formatBid,\r\n placeHolder: 'Details_View_Suggested_Keyword_Bid_Placeholder',\r\n }, {\r\n label: 'Details_View_Match_Type',\r\n type: 'select',\r\n property: 'matchType',\r\n enum: [{\r\n value: '1',\r\n text: 'Details_View_Match_Type_Exact',\r\n }, {\r\n value: '2',\r\n text: 'Details_View_Match_Type_Phrase',\r\n }, {\r\n value: '3',\r\n text: 'Details_View_Match_Type_Broad',\r\n }],\r\n }],\r\n },\r\n },\r\n [RECOMMENDATION_TYPES.NEW_LOCATION]: {\r\n summaryTitle: 'Summary_Card_Title_New_Location',\r\n summaryIconClasses: 'recommendation-targeting-icon',\r\n summaryIconClassesVNext: 'POI',\r\n detailDescription: 'Summary_Card_Detail_Description_New_Location',\r\n detailPitching: 'Summary_Card_Detail_Pitching_New_Location',\r\n detailHelpId: 'ext51100',\r\n sampleInsight: 'Summary_Card_Sample_Insight_New_Location',\r\n sampleActionHeaders: [\r\n 'Summary_Card_Action_Header_Target_Location',\r\n 'Summary_Card_Action_Header_Est_Impressions',\r\n ],\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.MAP,\r\n recommendation: {\r\n actionTitle: 'Details_View_Add_New_Location',\r\n insightTitle: {\r\n key: 'Details_View_New_Location_Insight',\r\n config: {\r\n useCampaignName: true,\r\n useOpportunityCount: true,\r\n },\r\n },\r\n opportunities: [{}],\r\n actionGrid: {\r\n dataBuilder: buildActionGridDataForNewLocation,\r\n columns: [{\r\n header: 'Details_View_Action_Header_Recommended_Locations',\r\n }, {\r\n header: 'Details_View_Action_Header_Query_Volume',\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Impressions',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Clicks',\r\n isIncrease: true,\r\n }, {\r\n header: 'Details_View_Action_Header_Estimate_Spend',\r\n isIncrease: true,\r\n }],\r\n singleSelection: false,\r\n helpTopics: [\r\n 'pop_BA_CompetitionTab_RecommendedLocations',\r\n 'pop_BA_CompetitionTab_Searchvolume',\r\n 'pop_BA_CompetitionTab_EstImpr',\r\n ],\r\n },\r\n },\r\n },\r\n [RECOMMENDATION_TYPES.SYNDICATION]: {\r\n summaryTitle: 'Summary_Card_Title_Syndication',\r\n summaryIconClasses: 'recommendation-targeting-icon',\r\n summaryIconClassesVNext: 'POI',\r\n detailDescription: 'Summary_Card_Detail_Description_Syndication',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Syndication',\r\n detailHelpId: 'ext52031',\r\n sampleInsight: 'Summary_Card_Sample_Insight_Syndication',\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Campaign',\r\n 'Summary_Card_Action_Header_AdGroup',\r\n 'Summary_Card_Action_Header_Adoption_Percentage',\r\n 'Summary_Card_Action_Header_Est_Change_Impressions',\r\n ],\r\n recommendation: {\r\n insightTitle: {\r\n key: 'Summary_Card_Sample_Insight_Syndication',\r\n config: {\r\n useAdGroupName: true,\r\n },\r\n },\r\n visualData: [{\r\n label: 'Details_View_Syndication_Insight_Adoption_Label',\r\n useProgressBar: true,\r\n property: 'adoptionPercent',\r\n formatter: (propertyValue, i18n) => formatPercent(propertyValue / 100, i18n),\r\n }],\r\n actionDataInForm: [{\r\n text: 'Details_View_Syndication_Action_Text',\r\n helpText: 'Details_View_Syndication_Action_Help_Text',\r\n helpQuery: 'ext56674',\r\n type: 'info',\r\n }],\r\n },\r\n },\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY]: {\r\n summaryTitle: 'Summary_Card_Title_New_Keyword_Opportunity',\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: 'Summary_Card_Detail_Description_New_Keyword_Opportunity',\r\n detailPitching: 'Summary_Card_Detail_Pitching_New_Keyword_Opportunity',\r\n detailHelpId: 'ext51010',\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Recommended_Keyword',\r\n 'Summary_Card_Action_Header_Recommended_From',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.TRENDING_QUERY]: {\r\n summaryTitle: 'Summary_Card_Title_Trending_Query',\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: 'Summary_Card_Detail_Description_Trending_Query',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Trending_Query',\r\n detailHelpId: 'ext51010',\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Recommended_Keyword',\r\n 'Summary_Card_Action_Header_Recommended_Est_Search_Volume',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS]: {\r\n summaryTitle: 'Summary_Card_Title_Dynamic_Search_Ads',\r\n summaryIconClasses: 'recommendation-ads-icon',\r\n summaryIconClassesVNext: 'Chart',\r\n detailDescription: 'Summary_Card_Detail_Description_Dynamic_Search_Ads',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Dynamic_Search_Ads',\r\n detailHelpId: 'ext56794',\r\n isPrimaryFromToEnabled: false,\r\n primaryEstimateType: ESTIMATE_TYPES.WEEKLY_SEARCHES,\r\n primaryIncreaseNullable: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ACCOUNT,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Example_Of_Searches',\r\n ],\r\n },\r\n\r\n [RECOMMENDATION_TYPES.GOOGLE_IMPORT]: {\r\n summaryTitle: 'Summary_Card_Title_Google_Import',\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: 'Summary_Card_Detail_Description_Google_Import',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Google_Import',\r\n detailHelpId: 'ext51050',\r\n primaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n secondaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n },\r\n [RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED]: {\r\n summaryTitle: 'Summary_Card_Title_Google_Import_Scheduled',\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: 'Summary_Card_Detail_Description_Google_Import_Scheduled',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Google_Import_Scheduled',\r\n detailHelpId: 'ext50851',\r\n primaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n secondaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n },\r\n [RECOMMENDATION_TYPES.SITE_LINK]: {\r\n summaryTitle: 'Summary_Card_Title_Site_Link',\r\n summaryIconClasses: 'recommendation-extension-icon',\r\n summaryIconClassesVNext: 'Add',\r\n detailDescription: 'Summary_Card_Detail_Description_Site_Link',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Site_Link',\r\n detailHelpId: 'ext56823',\r\n primaryEstimateType: ESTIMATE_TYPES.CTR,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ACCOUNT,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Campaign',\r\n 'Summary_Card_Action_Header_Est_CTR',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: {\r\n summaryTitle: 'Summary_Card_Title_Budget_Opportunity',\r\n summaryIconClasses: 'recommendation-budget-icon',\r\n summaryIconClassesVNext: 'Financial',\r\n detailDescription: 'Summary_Card_Detail_Description_Budget_Opportunity',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Budget_Opportunity',\r\n detailHelpId: 'ext53099',\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ACCOUNT,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Campaign',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY]: {\r\n summaryTitle: 'Summary_Card_Title_Adjust_Shared_Budget_Opportunity',\r\n summaryIconClasses: 'recommendation-budget-icon',\r\n summaryIconClassesVNext: 'Financial',\r\n detailDescription: 'Summary_Card_Detail_Description_Adjust_Shared_Budget_Opportunity',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Adjust_Shared_Budget_Opportunity',\r\n detailHelpId: 'ext53099', // todo\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ACCOUNT,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Shared_Budget',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.CALLOUT]: {\r\n summaryTitle: 'Summary_Card_Title_Callout',\r\n summaryIconClasses: 'recommendation-extension-icon',\r\n summaryIconClassesVNext: 'Add',\r\n detailDescription: 'Summary_Card_Detail_Description_Callout',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Callout',\r\n detailHelpId: 'ext56766',\r\n primaryEstimateType: ESTIMATE_TYPES.CTR,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ACCOUNT,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Campaign',\r\n 'Summary_Card_Action_Header_Est_CTR',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: {\r\n summaryTitle: 'Summary_Card_Title_Repair_Ads',\r\n summaryIconClasses: 'recommendation-repair-icon',\r\n summaryIconClassesVNext: 'Error',\r\n detailDescription: 'Summary_Card_Detail_Description_Repair_Ads',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Repair_Ads_Temp',\r\n detailHelpId: 'app54696',\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Ad_Group_Without_Ads',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.FIX_AD_TEXT]: {\r\n summaryTitle: 'Summary_Card_Title_Fix_Ad_Text',\r\n summaryIconClasses: 'recommendation-repair-icon',\r\n summaryIconClassesVNext: 'Error',\r\n detailDescription: 'Summary_Card_Detail_Description_Fix_Ad_Text',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Fix_Ad_Text',\r\n detailHelpId: 'app54725',\r\n isPrimaryFromToEnabled: false,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Top_Policies',\r\n 'Summary_Card_Action_Header_Rejected_Ads',\r\n 'Summary_Card_Action_Header_Rejected_Keywords',\r\n ],\r\n isEstimate: false,\r\n },\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY]: {\r\n summaryTitle: 'Summary_Card_Title_Fix_Conversion_Tracking',\r\n summaryIconClasses: 'recommendation-repair-icon',\r\n summaryIconClassesVNext: 'Error',\r\n detailDescription: 'Summary_Card_Detail_Description_Fix_Conversion_Tracking',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Fix_Conversion_Tracking',\r\n detailHelpId: 'ext56951',\r\n isPrimaryFromToEnabled: false,\r\n isEstimate: false,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n },\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: {\r\n summaryTitle: 'Summary_Card_Title_Repair_Keywords',\r\n summaryIconClasses: 'recommendation-repair-icon',\r\n summaryIconClassesVNext: 'Error',\r\n detailDescription: 'Summary_Card_Detail_Description_Repair_Keywords',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Repair_Keywords_Temp',\r\n detailHelpId: 'app54697',\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Ad_Group_Without_Keywords',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD]: {\r\n summaryTitle: 'Summary_Card_Title_Broad_Match_Keywords',\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: 'Summary_Card_Detail_Description_Broad_Match_Keyword',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Broad_Match_Keywords',\r\n detailHelpId: 'ext56911',\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Broad_Match_Keyword',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD]: {\r\n summaryTitle: 'Summary_Card_Title_Remove_Conflicting_Negative_Keyword',\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: 'Summary_Card_Detail_Description_Remove_Conflicting_Negative_Keyword',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Remove_Conflicting_Negative_Keyword',\r\n detailHelpId: 'ext51014',\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Use_Remove_Negative_Keywords',\r\n 'Summary_Card_Action_Header_Blocked_Keywords',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: {\r\n summaryTitle: 'Summary_Card_Title_Responsive_Search_Ads',\r\n summaryIconClasses: 'recommendation-ads-icon',\r\n summaryIconClassesVNext: 'Chart',\r\n detailDescription: 'Summary_Card_Detail_Description_Responsive_Search_Ads',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Responsive_Search_Ads',\r\n detailHelpId: 'ext60037',\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Ad_Group_Without_Responsive_Search_Ads',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.REALLOCATE_BUDGET]: {\r\n summaryTitle: 'Summary_Card_Title_Reallocate_Budget_Opportunity',\r\n summaryIconClasses: 'recommendation-budget-icon',\r\n summaryIconClassesVNext: 'Financial',\r\n detailDescription: 'Summary_Card_Detail_Description_Reallocate_Budget_Opportunity',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Reallocate_Budget_Opportunity',\r\n detailHelpId: 'ext53099',\r\n primaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n primaryIncreaseNullable: true,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_SuggestedBudget',\r\n 'Summary_Card_Action_Header_FromCampaign',\r\n 'Summary_Card_Action_Header_ToCampaign',\r\n 'Summary_Card_Action_Header_Est_Clicks',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: {\r\n summaryTitle: 'Summary_Card_Title_Fix_Ad_Destination_Opportunity',\r\n summaryIconClasses: 'recommendation-repair-icon',\r\n summaryIconClassesVNext: 'Error',\r\n detailDescription: 'Summary_Card_Detail_Description_Fix_Ad_Destination_Opportunity',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Fix_Ad_Destination_Opportunity',\r\n detailHelpId: '2128217',\r\n detailLinkType: 'fwdLink',\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_LandingPageUrl',\r\n ],\r\n isPrimaryFromToEnabled: false,\r\n isEstimate: false,\r\n },\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: {\r\n summaryTitle: 'Summary_Card_Title_Setup_Conversion_Tracking_Opportunity_UnCreated',\r\n summaryIconClasses: 'recommendation-shopping-cart-icon',\r\n summaryIconClassesVNext: 'ShoppingCart',\r\n detailDescription: 'Summary_Card_Detail_Description_Setup_Conversion_Tracking_Opportunity_UnCreated',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Setup_Conversion_Tracking_Opportunity_UnCreated',\r\n detailHelpId: 'ext56680',\r\n isPrimaryFromToEnabled: false,\r\n isEstimate: false,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n isDynamicText: true,\r\n },\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: {\r\n summaryTitle: 'Summary_Card_Title_Fix_Conversion_Goal_Settings',\r\n summaryIconClasses: 'recommendation-repair-icon',\r\n summaryIconClassesVNext: 'Error',\r\n detailDescription: 'Summary_Card_Detail_Description_Fix_Conversion_Goal_Settings',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Fix_Conversion_Goal_Settings',\r\n detailHelpId: '56951',\r\n primaryEstimateType: ESTIMATE_TYPES.MISSING_CONVERSIONS,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n isPrimaryFromToEnabled: false,\r\n },\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: {\r\n summaryTitle: _TL_('Create conversion goal'),\r\n summaryIconClasses: 'recommendation-shopping-cart-icon',\r\n summaryIconClassesVNext: 'ShoppingCart',\r\n detailDescription: _TL_('Track more about your conversion performance.'),\r\n detailPitching: _TL_(\"This action is recommended because UET is enabled, but you don't have any recent conversions. Create a conversion goal with a converted destination URL or custom events to help track more conversion data.\"),\r\n detailHelpId: '56689',\r\n primaryEstimateType: ESTIMATE_TYPES.MISSING_CONVERSIONS,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n isPrimaryFromToEnabled: false,\r\n useNewI18n: true,\r\n },\r\n [RECOMMENDATION_TYPES.FACEBOOK_IMPORT]: {\r\n summaryTitle: 'Summary_Card_Title_Facebook_Import',\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: 'Summary_Card_Detail_Description_Facebook_Import',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Facebook_Import',\r\n detailHelpId: '60078',\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n },\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: {\r\n summaryTitle: 'Summary_Card_Title_Multi_Media_Ads',\r\n summaryIconClasses: 'recommendation-ads-icon',\r\n summaryIconClassesVNext: 'Chart',\r\n detailDescription: 'Summary_Card_Detail_Description_Multi_Media_Ads',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Multi_Media_Ads',\r\n detailHelpId: '60107',\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Ad_Group_Without_Multi_Media_Ads',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.IMAGE_EXTENSION]: {\r\n summaryTitle: 'Summary_Card_Title_Image_Extension',\r\n summaryIconClasses: 'recommendation-ads-icon',\r\n summaryIconClassesVNext: 'Add',\r\n detailDescription: 'Summary_Card_Detail_Description_Image_Extension',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Image_Extension',\r\n detailHelpId: '56674',\r\n primaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n primaryIncreaseNullable: true,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [\r\n 'Summary_Card_Action_Header_Campaign',\r\n 'Summary_Card_Action_Header_Est_Clicks',\r\n ],\r\n },\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: {\r\n summaryTitle: _TL_('Fix missing keyword parameters issue'),\r\n summaryIconClasses: 'recommendation-repair-icon',\r\n summaryIconClassesVNext: 'Error',\r\n detailDescription: _TL_('Increase ad impressions and improve your click-through rate by setting up appropriate values for missing keyword parameters.'),\r\n detailPitching: _TL_('Setting values for your keyword parameters could enhance your search ads performance.'),\r\n detailHelpId: 'app54450',\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n secondaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n primaryIncreaseNullable: true,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [\r\n _TL_('Keywords'),\r\n _TL_('Weekly est. impressions growth'),\r\n ],\r\n useNewI18n: true,\r\n },\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: {\r\n summaryTitle: _TL_('Increase your keyword bids'),\r\n summaryIconClasses: 'recommendation-bid-icon',\r\n summaryIconClassesVNext: 'WebConversion',\r\n detailDescription: _TL_('Get more impressions in your enhanced CPC campaign by increasing bids.'),\r\n detailPitching: _TL_('Recommended because these keywords haven\\'t received impressions in the past 2 weeks due to low keyword bids.'),\r\n detailHelpId: '51018',\r\n primaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n primaryIncreaseNullable: true,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [\r\n _TL_('Keywords'),\r\n _TL_('Suggested bid'),\r\n _TL_('Weekly est. impr.'),\r\n ],\r\n useNewI18n: true,\r\n },\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: {\r\n summaryTitle: _TL_('Improve your responsive search ads'),\r\n summaryIconClasses: 'recommendation-ads-icon',\r\n summaryIconClassesVNext: 'Chart',\r\n detailDescription: _TL_('Get more clicks on your responsive search ads by improving your headlines and descriptions'),\r\n detailPitching: _TL_('Recommended because some of your responsive search ads don\\'t have sufficient headlines or descriptions.'),\r\n detailHelpId: 'ext60037',\r\n primaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n secondaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n primaryIncreaseNullable: true,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [],\r\n useNewI18n: true,\r\n },\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: {\r\n summaryTitle: _TL_('Target all eligible shopping products'),\r\n summaryIconClasses: 'recommendation-shopping-cart-icon',\r\n summaryIconClassesVNext: 'ShoppingCart',\r\n detailDescription: _TL_('Get more conversion value from your shopping products by advertising with a catch-all campaign.'),\r\n detailPitching: _TL_('Recommended because you have untargeted online products in your shopping feed.'),\r\n detailHelpId: 'ext56483',\r\n primaryEstimateType: ESTIMATE_TYPES.TARGETED_PRODUCTS,\r\n secondaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n primaryIncreaseNullable: false,\r\n costEstimateType: ESTIMATE_TYPES.COST,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.CAMPAIGN,\r\n visualTableHeaders: [\r\n _TL_('Campaigns'),\r\n _TL_('Products targeted'),\r\n _TL_('Weekly est. impr.'),\r\n ],\r\n useNewI18n: true,\r\n },\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: {\r\n summaryTitle: _TL_('Optimize your multimedia ads'),\r\n summaryIconClasses: 'recommendation-ads-icon',\r\n summaryIconClassesVNext: 'Chart',\r\n detailDescription: _TL_('Drive engagement with your multimedia ads by creating new ad texts, headlines, and images.'),\r\n detailPitching: _TL_('We\\'ve recommended these changes for some of your multimedia ads because they have an insufficient number of ad texts, headlines, or images.'),\r\n detailHelpId: 'ext60107',\r\n primaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n secondaryEstimateType: ESTIMATE_TYPES.IMPRESSIONS,\r\n primaryIncreaseNullable: true,\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.ADS_PREVIEW,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n _TL_('Ad preview'),\r\n ],\r\n useNewI18n: true,\r\n },\r\n [RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION]: {\r\n summaryTitle: _TL_('Upgrade your smart shopping campaigns to Performance Max campaigns'),\r\n summaryIconClasses: 'recommendation-p-max-icon',\r\n summaryIconClassesVNext: 'Up',\r\n detailDescription: _TL_('Increase conversions by upgrading to Performance Max.'),\r\n detailPitching: _TL_('We\\'re recommending this upgrade because you have smart shopping campaigns in this account.'),\r\n detailHelpId: 'ext60176',\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableScope: VISUAL_TABLE_ENABLED_SCOPES.ADGROUP,\r\n visualTableHeaders: [\r\n _TL_('The following smart shopping campaigns are eligible to upgrade to Performance Max campaigns:'),\r\n ],\r\n useNewI18n: true,\r\n },\r\n [RECOMMENDATION_TYPES.PMAX_IMPORT]: {\r\n summaryTitle: _TL_('Import your Performance Max campaigns from Google Ads'),\r\n summaryIconClasses: 'recommendation-keyword-icon',\r\n summaryIconClassesVNext: 'SearchCampaigns',\r\n detailDescription: _TL_('Save time and effort by importing your Performance Max campaigns from Google Ads.'),\r\n detailPitching: _TL_('We recommend this because we now support Performance Max campaigns. Importing these campaigns can increase customer engagement and improve your ROI.'),\r\n detailHelpId: 'ext51050',\r\n isPrimaryFromToEnabled: true,\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n useNewI18n: true,\r\n },\r\n [RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION]: {\r\n summaryTitle: _TL_('Upgrade your Dynamic Search Ad (DSA) campaigns to Performance Max campaigns'),\r\n summaryIconClasses: 'recommendation-p-max-icon',\r\n summaryIconClassesVNext: 'Up',\r\n detailDescription: _TL_('Upgrade your eligible DSA campaigns to Performance Max and we\\'ll use your existing assets, settings, and budget to create a new Performance Max campaign.'),\r\n detailPitching: _TL_('We recommend this because Performance Max campaigns can generate 24% more conversions at the same cost per conversion.'),\r\n detailHelpId: '60366',\r\n visualType: VISUAL_TYPES.TABLE,\r\n visualTableHeaders: [],\r\n useNewI18n: true,\r\n primaryEstimateType: ESTIMATE_TYPES.CONVERSIONS,\r\n primaryIncreaseNullable: true,\r\n isPrimaryFromToEnabled: true,\r\n },\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: {\r\n summaryTitle: _TL_('Show ads on the entire Microsoft Advertising Network'),\r\n summaryIconClasses: 'recommendation-syndication-icon',\r\n summaryIconClassesVNext: 'Add',\r\n detailDescription: _TL_('Expand your advertising reach on the entire Microsoft Advertising Network.'),\r\n detailPitching: _TL_('Recommended because it can help you reach additional customers and drive conversions at a lower cost per click.'),\r\n detailHelpId: 'ext60146',\r\n visualType: VISUAL_TYPES.TABLE,\r\n useNewI18n: true,\r\n primaryEstimateType: ESTIMATE_TYPES.CLICKS,\r\n secondaryEstimateType: ESTIMATE_TYPES.CONVERSIONS,\r\n primaryIncreaseNullable: true,\r\n isPrimaryFromToEnabled: true,\r\n visualTableHeaders: [\r\n _TL_('Campaigns'),\r\n _TL_('Weekly est. clicks'),\r\n _TL_('Weekly est. conversions'),\r\n ],\r\n },\r\n};\r\n\r\nexport const recommendationNewTextConfigs = {\r\n [RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD]: {\r\n permission: 'IsRemoveNegativeKeywordConflictNewTextsEnabled',\r\n configs: {\r\n detailDescription: 'Summary_Card_Detail_Description_Remove_Conflicting_Negative_Keyword_New',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Remove_Conflicting_Negative_Keyword_New',\r\n },\r\n column: {\r\n BlockedKeywordsColumn: {\r\n helpId: 'pop_BA_Recommendations_BlockedKeywords',\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const recommendationInProductUpdateConfigs = {\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: {\r\n permission: 'IsRecommendationInProductUpdateEnabled',\r\n available: 'isNrt',\r\n notification: 'Summary_Card_Repair_Opportunity_Update_Notification',\r\n additionalPitching: 'Detail_Card_Repair_Recommendations_NRT',\r\n additionalPitchingEnabledBy: 'available',\r\n helpTopic: 'pop_BA_Recommendations_RelevantSuggestions',\r\n },\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: {\r\n permission: 'IsRecommendationInProductUpdateEnabled',\r\n available: 'isNrt',\r\n notification: 'Summary_Card_Repair_Opportunity_Update_Notification',\r\n additionalPitching: 'Detail_Card_Repair_Recommendations_NRT',\r\n additionalPitchingEnabledBy: 'available',\r\n helpTopic: 'pop_BA_Recommendations_RelevantSuggestions',\r\n },\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: {\r\n permission: 'IsRSAAdoptionV2Enabled',\r\n available: 'hasAIAssetRecommendation',\r\n notification: 'Summary_Card_RSA_Opportunity_Update_Notification',\r\n additionalPitching: 'Detail_Card_RSA_Recommendations_Notification',\r\n additionalPitchingEnabledBy: 'permission',\r\n helpTopic: 'pop_BA_Recommendations_AI_HeadDescp',\r\n },\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: {\r\n permission: 'IsRecommendationInProductFeedbackLoopEnabled',\r\n available: 'isFeedbackPersonalized',\r\n notification: 'Summary_Card_Banner_AlertMsg_FeedbackPersonalized',\r\n additionalPitching: '',\r\n additionalPitchingEnabledBy: null,\r\n helpTopic: 'pop_BA_Recommendations_RelevantSuggestions',\r\n },\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: {\r\n permission: 'IsRecommendationThirdPartyTaggingEnabled',\r\n available: 'isNrt',\r\n notification: 'Summary_Card_SetupConversionTracking_Opportunity_Update_Notification',\r\n additionalPitching: '',\r\n additionalPitchingEnabledBy: null,\r\n helpTopic: null,\r\n needAdditionalArgs: true,\r\n neverExpired: true,\r\n },\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY]: {\r\n permission: 'IsRecommendationThirdPartyTaggingEnabled',\r\n available: 'isNrt',\r\n notification: 'Summary_Card_SetupConversionTracking_Opportunity_Update_Notification',\r\n additionalPitching: '',\r\n additionalPitchingEnabledBy: null,\r\n helpTopic: null,\r\n needAdditionalArgs: true,\r\n neverExpired: true,\r\n },\r\n};\r\n\r\nexport const recommendationDynamicTextConfigs = {\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: ({\r\n isMCC,\r\n statusId,\r\n recommendationsCount,\r\n }) => {\r\n const defaultConfig = {\r\n summaryTitle: 'Summary_Card_Title_Setup_Conversion_Tracking_Opportunity_UnCreated',\r\n detailDescription: 'Summary_Card_Detail_Description_Setup_Conversion_Tracking_Opportunity_UnCreated',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Setup_Conversion_Tracking_Opportunity_UnCreated',\r\n };\r\n let newConfig;\r\n if (isMCC) {\r\n if (statusId === 2) {\r\n newConfig = {\r\n ...defaultConfig,\r\n summaryTitle: 'Summary_Card_Title_Setup_Conversion_Tracking_Opportunity_Unverified',\r\n detailDescription: `MCC_Summary_Card_Detail_Description_Setup_Conversion_Tracking_Opportunity_Unverified_${isPlural(recommendationsCount)}`,\r\n detailPitching: 'MCC_Summary_Card_Detail_Pitching_Setup_Conversion_Tracking_Opportunity',\r\n };\r\n } else {\r\n newConfig = {\r\n ...defaultConfig,\r\n summaryTitle: 'Summary_Card_Title_Setup_Conversion_Tracking_Opportunity_UnCreated',\r\n detailDescription: `MCC_Summary_Card_Detail_Description_Setup_Conversion_Tracking_Opportunity_UnCreated_${isPlural(recommendationsCount)}`,\r\n detailPitching: 'MCC_Summary_Card_Detail_Pitching_Setup_Conversion_Tracking_Opportunity',\r\n };\r\n }\r\n } else if (statusId === 2) {\r\n newConfig = {\r\n ...defaultConfig,\r\n summaryTitle: 'Summary_Card_Title_Setup_Conversion_Tracking_Opportunity_Unverified',\r\n detailDescription: 'Summary_Card_Detail_Description_Setup_Conversion_Tracking_Opportunity_Unverified',\r\n detailPitching: 'Summary_Card_Detail_Pitching_Setup_Conversion_Tracking_Opportunity_Unverified',\r\n };\r\n }\r\n return newConfig || defaultConfig;\r\n },\r\n};\r\n\r\nexport const additionDetailPitchingConfig = {\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: {\r\n detailPitching: 'Detail_Page_Detail_Description_Fix_Ad_Destination_Opportunity',\r\n },\r\n [RECOMMENDATION_TYPES.FIX_AD_TEXT]: {\r\n detailPitching: 'Detail_Page_Detail_Description_Fix_Ad_Text_Opportunity',\r\n },\r\n};\r\n","import _ from 'underscore';\r\nimport { getCurrencyText } from '@bingads-webui-react/currency';\r\n\r\nimport { recommendationConfigs } from '../recommendation-configs';\r\nimport {\r\n ESTIMATE_TYPES,\r\n ESTIMATE_STRINGS,\r\n RECOMMENDATION_TYPES,\r\n MATCH_TYPE_IDS,\r\n NO_SYMBOL_ESTIMATE_TYPES,\r\n FAC_RECOMMENDATION_CONFIG,\r\n} from '../consts';\r\nimport {\r\n formatPercentHundredths,\r\n formatCost,\r\n formatDecimal,\r\n formatInteger,\r\n} from './basic-format-data';\r\nimport { isCompetition } from '../util';\r\n\r\n// place format function using recommendation-configs in this file\r\n\r\n/**\r\n * Format estimation value based on estimation type\r\n * @param {string} type - estimation type\r\n * @param {number} value - value to be formatted\r\n * @param {Object} i18n - Localization component\r\n * @param {string} currency - currency code\r\n * @return {string} formatted estimation value\r\n */\r\nconst formatEstimateValue = (type, value, i18n, currency) => {\r\n switch (type) {\r\n case ESTIMATE_TYPES.IMPRESSION_SHARE:\r\n case ESTIMATE_TYPES.CTR:\r\n return formatPercentHundredths(value, i18n); // 12.34%\r\n case ESTIMATE_TYPES.COST:\r\n return formatCost(value, i18n, currency); // $32.00K\r\n case ESTIMATE_TYPES.REJECTED_ADS:\r\n case ESTIMATE_TYPES.REJECTED_KEYWORDS:\r\n return formatInteger(value, i18n);\r\n case ESTIMATE_TYPES.IMPRESSIONS:\r\n case ESTIMATE_TYPES.QUERY_VOLUME:\r\n case ESTIMATE_TYPES.CLICKS:\r\n case ESTIMATE_TYPES.WEEKLY_SEARCHES:\r\n case ESTIMATE_TYPES.MISSING_CONVERSIONS:\r\n case ESTIMATE_TYPES.TARGETED_PRODUCTS:\r\n default:\r\n return formatDecimal(value, i18n); // 12.3M\r\n }\r\n};\r\n\r\n/**\r\n * Format estimation block\r\n * @param {Object} options - options\r\n * @param {string} options.type - recomendation type\r\n * @param {Object} options.i18n - Localization component\r\n * @param {Object} options.estimates - estimate value collection\r\n * @param {string} options.currency - currency code\r\n * @param {string} options.inDetailsView - estimates block will be shown in details view or not\r\n * @return {Object} formatted estimation block\r\n */\r\nexport const formatEstimates = ({\r\n type, i18n, estimates, currency, inDetailsView,\r\n}) => {\r\n if (!estimates) {\r\n return null;\r\n }\r\n\r\n const {\r\n isPrimaryFromToEnabled,\r\n primaryIncreaseNullable,\r\n } = recommendationConfigs[type];\r\n let {\r\n primaryEstimateType,\r\n secondPrimaryEstimateType,\r\n isDoublePrimary,\r\n secondaryEstimateType,\r\n costEstimateType,\r\n isEstimate,\r\n } = recommendationConfigs[type];\r\n let tertiaryEstimateType = null;\r\n\r\n const bindedFormatValue = _.partial(formatEstimateValue, _, _, i18n, currency);\r\n if (!primaryEstimateType) {\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY:\r\n primaryEstimateType = estimates.primaryEstimate;\r\n secondaryEstimateType = estimates.primaryEstimate === ESTIMATE_TYPES.CONVERSIONS ?\r\n ESTIMATE_TYPES.CLICKS : ESTIMATE_TYPES.COST;\r\n costEstimateType = estimates.primaryEstimate === ESTIMATE_TYPES.CONVERSIONS ?\r\n ESTIMATE_TYPES.COST : null;\r\n break;\r\n case RECOMMENDATION_TYPES.FIX_AD_TEXT:\r\n case RECOMMENDATION_TYPES.FIX_AD_DESTINATION:\r\n primaryEstimateType = estimates.primaryEstimate;\r\n secondPrimaryEstimateType = estimates.secondPrimaryEstimate;\r\n isDoublePrimary = estimates.isDoublePrimary; // eslint-disable-line prefer-destructuring\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n // Special logic for competition\r\n // Show Est. Conversions Increase as secondary estimate in summary page\r\n // Show Est. Conversions Increase as tertiary estimate in summary page\r\n if (isCompetition(type) && estimates.convIncrease) {\r\n if (inDetailsView) {\r\n tertiaryEstimateType = ESTIMATE_TYPES.CONVERSIONS;\r\n } else {\r\n secondaryEstimateType = ESTIMATE_TYPES.CONVERSIONS;\r\n }\r\n }\r\n const primaryString = i18n.getString(ESTIMATE_STRINGS[primaryEstimateType]);\r\n\r\n // We get CTR (%) from MT - 'CtrLift' field. Increase field is applied for calculation only.\r\n const primaryIncreaseNumber = (primaryEstimateType === ESTIMATE_TYPES.CTR) ?\r\n estimates[`${primaryEstimateType}Lift`] : estimates[`${primaryEstimateType}Increase`];\r\n const primaryIncrease = bindedFormatValue(primaryEstimateType, primaryIncreaseNumber);\r\n\r\n const increaseSymbol = primaryEstimateType === ESTIMATE_TYPES.CTR ? '↑' : '+';\r\n const primaryIncreaseSymbol = (primaryIncreaseNumber >= 0 &&\r\n !_.contains(NO_SYMBOL_ESTIMATE_TYPES, primaryEstimateType)) ? increaseSymbol : '';\r\n\r\n const primaryPts = primaryEstimateType === ESTIMATE_TYPES.IMPRESSION_SHARE ?\r\n i18n.getString('Summary_Card_Estimate_Points') : '';\r\n\r\n const hasFrom = isPrimaryFromToEnabled && !_.isUndefined(estimates[`${primaryEstimateType}Current`]);\r\n const primaryFrom = hasFrom && bindedFormatValue(primaryEstimateType, estimates[`${primaryEstimateType}Current`]);\r\n const primaryFromString = hasFrom && i18n.getString('Summary_Card_Estimate_Primary_From');\r\n const primaryTo = hasFrom\r\n && bindedFormatValue(primaryEstimateType, estimates[`${primaryEstimateType}Current`] + estimates[`${primaryEstimateType}Increase`]);\r\n const primaryToString = hasFrom && i18n.getString('Summary_Card_Estimate_Primary_To');\r\n const isPositivePrimary = !(primaryEstimateType === ESTIMATE_TYPES.COST &&\r\n primaryIncreaseNumber > 0) && !_.contains(NO_SYMBOL_ESTIMATE_TYPES, primaryEstimateType);\r\n\r\n const secondaryIncrease = secondaryEstimateType\r\n && bindedFormatValue(secondaryEstimateType, estimates[`${secondaryEstimateType}Increase`]);\r\n const secondaryString = secondaryEstimateType\r\n && i18n.getString(ESTIMATE_STRINGS[secondaryEstimateType]);\r\n const isPositiveSecondary = secondaryEstimateType &&\r\n !(secondaryEstimateType === ESTIMATE_TYPES.COST && estimates[`${secondaryEstimateType}Increase`] > 0);\r\n\r\n const tertiaryIncrease = tertiaryEstimateType\r\n && bindedFormatValue(tertiaryEstimateType, estimates[`${tertiaryEstimateType}Increase`]);\r\n const tertiaryString = tertiaryEstimateType\r\n && i18n.getString(ESTIMATE_STRINGS[tertiaryEstimateType]);\r\n\r\n const spendIncrease = costEstimateType\r\n && bindedFormatValue(costEstimateType, estimates[`${costEstimateType}Increase`]);\r\n const spendString = costEstimateType && i18n.getString(ESTIMATE_STRINGS[costEstimateType]);\r\n\r\n const estimateNote = i18n.getString('Summary_Card_Estimate_Note');\r\n\r\n const showEstimates = primaryIncreaseNumber !== 0 ||\r\n (type !== RECOMMENDATION_TYPES.CALLOUT && type !== RECOMMENDATION_TYPES.SITE_LINK);\r\n\r\n let secondPrimaryString;\r\n let secondPrimaryIncrease;\r\n\r\n if (isDoublePrimary) {\r\n secondPrimaryString = i18n.getString(ESTIMATE_STRINGS[secondPrimaryEstimateType]);\r\n\r\n // We get CTR (%) from MT - 'CtrLift' field. Increase field is applied for calculation only.\r\n const secondPrimaryIncreaseNumber = (primaryEstimateType === ESTIMATE_TYPES.CTR) ?\r\n estimates[`${secondPrimaryEstimateType}Lift`] :\r\n estimates[`${secondPrimaryEstimateType}Increase`];\r\n secondPrimaryIncrease = bindedFormatValue(\r\n secondPrimaryEstimateType,\r\n secondPrimaryIncreaseNumber\r\n );\r\n }\r\n\r\n if (type === RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS && primaryIncreaseNullable) {\r\n isEstimate = primaryIncrease !== '0';\r\n }\r\n\r\n const formatted = {\r\n primaryIncrease,\r\n primaryPts,\r\n primaryFrom,\r\n primaryTo,\r\n primaryFromString,\r\n primaryToString,\r\n primaryString,\r\n primaryIncreaseSymbol,\r\n secondPrimaryIncrease,\r\n secondPrimaryString,\r\n isDoublePrimary,\r\n isPositivePrimary,\r\n secondaryIncrease,\r\n secondaryString,\r\n isPositiveSecondary,\r\n spendIncrease,\r\n spendString,\r\n estimateNote,\r\n showEstimates,\r\n isEstimate,\r\n };\r\n\r\n if (tertiaryEstimateType) {\r\n formatted.tertiaryIncrease = tertiaryIncrease;\r\n formatted.tertiaryString = tertiaryString;\r\n }\r\n\r\n if (primaryIncreaseNullable) {\r\n formatted.primaryIncreaseNullable = primaryIncreaseNullable;\r\n }\r\n\r\n return formatted;\r\n};\r\n\r\nexport const formatLocaledSourceType = (i18n, source) => {\r\n const convertedSource = `Recommendation_Keywword_Source_Type_${source}`;\r\n return i18n.getString(convertedSource) || source;\r\n};\r\n\r\nexport const formatLocaledSeasonalEventType = (i18n, seasonEvent) => {\r\n const arr = seasonEvent.split(' ');\r\n let convertedSeasonEvent = 'Recommendation_Keywword_Seasonal_Event_Type';\r\n _.each(arr, (word) => {\r\n convertedSeasonEvent += `_${word.charAt(0).toUpperCase() + word.slice(1)}`;\r\n });\r\n convertedSeasonEvent = convertedSeasonEvent.replace('\\'', '');\r\n return i18n.getString(convertedSeasonEvent) || seasonEvent;\r\n};\r\n\r\nexport const formatPictchingSource = (i18n, pitchingKey, sources, seasonalEvent) => {\r\n let value = '';\r\n if (_.isUndefined(sources) || sources.length === 0) {\r\n return '';\r\n }\r\n\r\n if (sources.length === 1) {\r\n value = i18n.getString(\r\n pitchingKey,\r\n {\r\n source1: formatLocaledSourceType(i18n, sources[0]),\r\n }\r\n );\r\n } else if (sources.length === 2) {\r\n value = i18n.getString(\r\n `${pitchingKey}_Two`,\r\n {\r\n source1: formatLocaledSourceType(i18n, sources[0]),\r\n source2: formatLocaledSourceType(i18n, sources[1]),\r\n }\r\n );\r\n } else if (sources.length >= 3) {\r\n value = i18n.getString(\r\n `${pitchingKey}_Three`,\r\n {\r\n source1: formatLocaledSourceType(i18n, sources[0]),\r\n source2: formatLocaledSourceType(i18n, sources[1]),\r\n source3: formatLocaledSourceType(i18n, sources[2]),\r\n }\r\n );\r\n }\r\n\r\n if (!_.isUndefined(seasonalEvent) && seasonalEvent.length > 0) {\r\n value += ` ${i18n.getString(\r\n `${pitchingKey}_Seasonal_Event`,\r\n {\r\n seasonalEvent: formatLocaledSeasonalEventType(i18n, seasonalEvent[0].SampleContent),\r\n }\r\n )}`;\r\n }\r\n return value;\r\n};\r\n\r\nexport const formatKeyword = (keyword, matchType) => {\r\n switch (matchType) {\r\n case MATCH_TYPE_IDS.EXACT:\r\n return `[${keyword}]`;\r\n case MATCH_TYPE_IDS.PHRASE:\r\n return `\"${keyword}\"`;\r\n default:\r\n return keyword;\r\n }\r\n};\r\n\r\n/**\r\n * Format coupon block\r\n * @param {Object} options - options\r\n * @param {Object} options.i18n - Localization component\r\n * @param {Object} options.coupon - coupon value collection\r\n * @param {string} options.currency - currency code\r\n * @return {Object} formatted coupon block\r\n */\r\nexport const formatCoupon = ({\r\n i18n, coupon, currency,\r\n}) => {\r\n const couponConfig = FAC_RECOMMENDATION_CONFIG[coupon.FeatureId.toString()];\r\n\r\n if (!couponConfig) {\r\n return null;\r\n }\r\n\r\n const {\r\n couponTitleActionKey,\r\n couponDescriptionKey,\r\n couponDescriptionTitleKey,\r\n couponTagMessageKey,\r\n couponLightboxTitle,\r\n } = couponConfig;\r\n\r\n const titleAction = i18n.getString(couponTitleActionKey);\r\n const descriptionTitle = i18n.getString(couponDescriptionTitleKey);\r\n const description = i18n.getString(couponDescriptionKey);\r\n const tagMessage = i18n.getString(couponTagMessageKey);\r\n\r\n return {\r\n value: getCurrencyText({\r\n currencyCode: currency,\r\n amount: Math.floor(coupon.CouponValue),\r\n i18n,\r\n maxFractionDigits: 0,\r\n hideCurrencyCode: true,\r\n }),\r\n cost: getCurrencyText({\r\n currencyCode: currency,\r\n amount: Math.ceil(coupon.CouponUpfrontSpend),\r\n i18n,\r\n maxFractionDigits: 0,\r\n hideCurrencyCode: true,\r\n }),\r\n expirationDate: new Date(coupon.EndDate).toLocaleDateString(),\r\n descriptionTitle,\r\n descriptionShort: descriptionTitle,\r\n titleAction,\r\n description,\r\n tagMessage,\r\n rawData: coupon,\r\n couponLightboxTitle,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\nimport {\r\n recommendationConfigs,\r\n recommendationDynamicTextConfigs\r\n} from '../recommendation-configs';\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n BUDGET_OPPORTUNITY_TYPES,\r\n} from '../consts';\r\nimport {\r\n formatDecimal,\r\n formatEntityType,\r\n formatEntityNameForHtml,\r\n} from './basic-format-data';\r\nimport {\r\n formatEstimates,\r\n formatPictchingSource,\r\n formatLocaledSeasonalEventType,\r\n formatCoupon,\r\n} from './format-data';\r\nimport {\r\n isCompetition,\r\n isParentLevel,\r\n getNewTextConfigByPermission,\r\n} from '../util';\r\nimport {\r\n formatPercentHundredths\r\n} from './index';\r\n\r\n/**\r\n * @param {Object} options - options for formatting summary model\r\n * @param {string} options.type - recommendation type\r\n * @param {string} options.level - target level of the recommendation.\r\n * For example, Device bid boost and Location bid boost can target Campaign or AdGroup.\r\n * @param {string} options.scope - current scope user selected in wunderbar\r\n * @param {Object} options.sample - sample data for summary card (insight, actions)\r\n * @param {number} options.recommendationsCount - total count of recommendations\r\n * @param {boolean} [options.isHighConverting=false] - if the ALL recommendations for\r\n * this type is HighConverting.\r\n * @param {boolean} [options.isSeasonal=false] - if recommendation is seasonal\r\n * @param {Object} options.i18n - Localization component\r\n * @return {Object} formatted summary model for React component to render\r\n */\r\nexport const formatSummary = (options) => {\r\n const {\r\n type,\r\n level,\r\n scope,\r\n recommendationsCount,\r\n sample,\r\n i18n,\r\n newI18n,\r\n isHighConverting = false,\r\n isSeasonal = false,\r\n permissions,\r\n isNrt,\r\n hasAIAssetRecommendation,\r\n isFeedbackPersonalized,\r\n currentActivity,\r\n showAutoApplyBanner,\r\n isAutoApplyRecommendationEnabled,\r\n thirdPartyInfos,\r\n } = options;\r\n\r\n // entity\r\n const entityType = formatEntityType(level, recommendationsCount, i18n);\r\n const entityName = sample && sample.target && formatEntityNameForHtml(level, sample.target);\r\n\r\n let recommendationConfig = recommendationConfigs[type];\r\n if (_.isUndefined(recommendationConfig)) {\r\n if (!_.isUndefined(currentActivity)) {\r\n currentActivity.error(`formatSummary: cannot get recommendationConfig, type=${type}`, type);\r\n }\r\n return null;\r\n }\r\n\r\n const useNewI18n = !_.isUndefined(recommendationConfig.useNewI18n) ?\r\n recommendationConfig.useNewI18n : false;\r\n const i18nToUse = useNewI18n ? newI18n : i18n;\r\n\r\n if (recommendationConfig.isDynamicText) {\r\n recommendationConfig = _.extend(\r\n recommendationConfig,\r\n recommendationDynamicTextConfigs[type](options)\r\n );\r\n }\r\n // title\r\n const title = i18nToUse.getString(\r\n recommendationConfig.summaryTitle,\r\n { entity_type: formatEntityType(level, 1, i18n) }\r\n );\r\n\r\n // description\r\n let descriptionKey = recommendationConfig.detailDescription;\r\n // pitching\r\n let pitchingKey = type === RECOMMENDATION_TYPES.COMPETITIVE_BID && isHighConverting ?\r\n `${recommendationConfig.detailPitching}_High_Converting` :\r\n recommendationConfig.detailPitching;\r\n const isScopeToThis = !useNewI18n && (isParentLevel(scope, level) || scope === level);\r\n\r\n const newConfig = getNewTextConfigByPermission(type, permissions, 'configs');\r\n\r\n if (newConfig) {\r\n descriptionKey = newConfig.detailDescription || descriptionKey;\r\n pitchingKey = newConfig.detailPitching || pitchingKey;\r\n }\r\n\r\n let description = i18nToUse.getString(\r\n isScopeToThis ? `${descriptionKey}_This` : descriptionKey,\r\n {\r\n n: recommendationsCount,\r\n entity_name: entityName,\r\n entity_type: entityType,\r\n }\r\n );\r\n\r\n if (isSeasonal && _.contains(BUDGET_OPPORTUNITY_TYPES, type)) {\r\n description = i18n.getString(\r\n `${descriptionKey}_Seasonal_Event`,\r\n { seasonalEvent: formatLocaledSeasonalEventType(i18n, sample.seasonalEvent) }\r\n );\r\n }\r\n\r\n\r\n let pitching = '';\r\n if (isCompetition(type)) {\r\n pitching = i18n.getString(\r\n pitchingKey,\r\n { segment: i18n.getString(`Details_View_Device_Type_${sample.segment}`) || sample.segment }\r\n );\r\n } else {\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY:\r\n pitching = isSeasonal ? i18n.getString(`${pitchingKey}_Seasonal_Event`) : i18n.getString(`${pitchingKey}`);\r\n break;\r\n case RECOMMENDATION_TYPES.GOOGLE_IMPORT:\r\n case RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED:\r\n pitching = i18n.getString(\r\n pitchingKey,\r\n { clicks: formatDecimal(options.estimates.clicksIncrease, i18n) }\r\n );\r\n break;\r\n case RECOMMENDATION_TYPES.SITE_LINK:\r\n case RECOMMENDATION_TYPES.CALLOUT: {\r\n const withThis = scope === levelAtConstant.CAMPAIGN || scope === levelAtConstant.ADGROUP ? '_This' : '';\r\n const cpcCondition = options.estimates.cpcIncrease > 0 ? '_cpcIncrease' : '_cpcDecrease';\r\n const cpcStatus = options.estimates.cpcIncrease === 0 ? '_cpcSame' : cpcCondition;\r\n const paramWithoutEstimates = { n: recommendationsCount, entity_type: entityType };\r\n const paramWithEstimates = {\r\n ...paramWithoutEstimates,\r\n ctrLift: formatPercentHundredths(options.estimates.ctrLift, i18n),\r\n cpcIncrease: formatDecimal(Math.abs(options.estimates.cpcIncrease), i18n),\r\n };\r\n if (options.estimates.ctrLift !== 0) {\r\n pitching = i18n.getString(`${pitchingKey}${cpcStatus}${withThis}`, paramWithEstimates);\r\n } else {\r\n pitching = i18n.getString(`${pitchingKey}_Without_Estimates${withThis}`, paramWithoutEstimates);\r\n }\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY:\r\n pitching = formatPictchingSource(\r\n i18n,\r\n pitchingKey,\r\n options.seasonalEntity.sources,\r\n options.seasonalEntity.seasonalEvent\r\n );\r\n break;\r\n case RECOMMENDATION_TYPES.REPAIR_ADS:\r\n pitching = isNrt ? i18n.getString('Summary_Card_Detail_Pitching_Repair_Ads_NRT') : i18n.getString(pitchingKey);\r\n break;\r\n case RECOMMENDATION_TYPES.REPAIR_KEYWORD:\r\n pitching = isNrt ? i18n.getString('Summary_Card_Detail_Pitching_Repair_Keywords_NRT') : i18n.getString(pitchingKey);\r\n break;\r\n case RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY:\r\n pitching = i18n.getString(pitchingKey, {\r\n n: recommendationsCount,\r\n });\r\n break;\r\n case RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD:\r\n case RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD:\r\n case RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS:\r\n case RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS:\r\n case RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS:\r\n case RECOMMENDATION_TYPES.TRENDING_QUERY:\r\n case RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL:\r\n case RECOMMENDATION_TYPES.FACEBOOK_IMPORT:\r\n case RECOMMENDATION_TYPES.MULTIMEDIA_ADS:\r\n case RECOMMENDATION_TYPES.IMAGE_EXTENSION:\r\n case RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS:\r\n case RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID:\r\n case RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS:\r\n case RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION:\r\n case RECOMMENDATION_TYPES.PMAX_IMPORT:\r\n case RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION:\r\n case RECOMMENDATION_TYPES.SYNDICATION_GAP:\r\n default:\r\n pitching = i18nToUse.getString(pitchingKey);\r\n break;\r\n }\r\n }\r\n\r\n let iconClasses;\r\n let iconClassesVNext;\r\n if (isSeasonal) {\r\n iconClasses = 'recommendation-seasonal-icon';\r\n iconClassesVNext = 'FavoriteStar';\r\n } else if (showAutoApplyBanner && isAutoApplyRecommendationEnabled) {\r\n iconClasses = 'recommendation-auto-apply-icon';\r\n iconClassesVNext = 'FlashAuto';\r\n } else {\r\n iconClasses = recommendationConfig.summaryIconClasses;\r\n iconClassesVNext = recommendationConfig.summaryIconClassesVNext;\r\n }\r\n const helpId = recommendationConfig.detailHelpId;\r\n const linkType = recommendationConfig.detailLinkType;\r\n const isEstimate = _.isUndefined(recommendationConfig.isEstimate) ?\r\n true : recommendationConfig.isEstimate;\r\n const { needNRTDisclaimer } = recommendationConfig;\r\n\r\n const estimates = formatEstimates(options);\r\n const coupon = options.coupon && formatCoupon(options);\r\n\r\n return _.extend(\r\n {\r\n iconClasses,\r\n iconClassesVNext,\r\n title,\r\n description,\r\n pitching,\r\n helpId,\r\n isSeasonal,\r\n isEstimate,\r\n needNRTDisclaimer,\r\n isNrt,\r\n hasAIAssetRecommendation,\r\n linkType,\r\n isFeedbackPersonalized,\r\n thirdPartyInfos,\r\n },\r\n estimates ? { estimates } : null,\r\n coupon ? { coupon } : null\r\n );\r\n};\r\n","import _ from 'underscore';\r\nimport { VISUAL_TYPES } from '../consts';\r\n\r\nconst chartTypes = [\r\n VISUAL_TYPES.COLUMN_CHART,\r\n VISUAL_TYPES.LINE_CHART,\r\n VISUAL_TYPES.LINE_WEEKLY_CHART,\r\n VISUAL_TYPES.LINE_COLUMN_CHART,\r\n];\r\n\r\n/**\r\n * Format visual data chart, e.g category string\r\n * @param {Object} i18n - Localization component\r\n * @param {string} visualType - visual type\r\n * @param {Object} visualData - visual data\r\n * @return {Object} formatted visual data\r\n */\r\nexport const formatVisualDataChart = (i18n, visualType, visualData) => {\r\n if (_.contains(chartTypes, visualType)) {\r\n const category = visualData.category || null;\r\n\r\n // eslint-disable-next-line no-param-reassign\r\n visualData.title = visualData.localizeCategory ?\r\n i18n.getString(category) : category;\r\n }\r\n\r\n return visualData;\r\n};\r\n","import _ from 'underscore';\r\nimport { recommendationConfigs } from '../recommendation-configs';\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n} from '../consts';\r\nimport {\r\n formatEntityType,\r\n formatCost,\r\n formatPercent,\r\n formatBid,\r\n formatDecimal,\r\n truncateEntityName,\r\n} from './basic-format-data';\r\n\r\nconst formatOutOf = (i18n, recommendationsCount, sampleCount = 1) => (recommendationsCount === 1 ? ''\r\n : `(${sampleCount} ${i18n.getString('Summary_Card_Out_Of')} ${recommendationsCount})`);\r\n\r\nconst formatActions = (type, actions, i18n, currency) => _.map(actions, (row) => {\r\n const fromString = i18n.getString('Summary_Card_Estimate_Primary_From');\r\n const toString = i18n.getString('Summary_Card_Estimate_Primary_To');\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET: {\r\n const budgetFrom = formatCost(row.budgetCurrent, i18n, currency);\r\n const budgetTo = formatCost(row.budgetCurrent + row.budgetIncrease, i18n, currency);\r\n return [\r\n `${fromString} ${budgetFrom} ${toString} ${budgetTo}`,\r\n `+${formatPercent(row.imprShareIncrease, i18n)}`,\r\n ];\r\n }\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID: {\r\n const bidFrom = formatBid(row.bidCurrent, i18n, currency);\r\n const bidTo = formatBid(row.bidSuggested, i18n, currency);\r\n return [\r\n row.keyword,\r\n `${fromString} ${bidFrom} ${toString} ${bidTo}`,\r\n `+${formatPercent(row.imprShareIncrease, i18n)}`,\r\n ];\r\n }\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST:\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST: {\r\n const bidBoostFrom = formatPercent(row.currentBidAdjustmentPercent / 100, i18n);\r\n const bidBoostTo = formatPercent(row.suggestedBidAdjustmentPercent / 100, i18n);\r\n return [\r\n type === RECOMMENDATION_TYPES.DEVICE_BID_BOOST ?\r\n row.device : row.location,\r\n `${fromString} ${bidBoostFrom} ${toString} ${bidBoostTo}`,\r\n `+${formatPercent(row.imprShareIncrease, i18n)}`,\r\n ];\r\n }\r\n case RECOMMENDATION_TYPES.NEW_LOCATION: {\r\n return [\r\n row.location,\r\n `+${formatDecimal(row.impressionsIncrease, i18n)}`,\r\n ];\r\n }\r\n default:\r\n return null;\r\n }\r\n});\r\n\r\nexport const getModelForCompetitionSampleAction = ({\r\n type,\r\n i18n,\r\n recommendationsCount,\r\n level,\r\n entityName,\r\n currency,\r\n sample,\r\n}) => {\r\n let actionTitle;\r\n let actions;\r\n\r\n // deprecated in Oct 2023\r\n if (type === RECOMMENDATION_TYPES.NEW_KEYWORD) {\r\n actionTitle = i18n.getString('Summary_Card_What_You_Can_Do_Generic');\r\n actions = i18n.getString(\r\n 'Summary_Card_Action_New_Keyword',\r\n {\r\n n: recommendationsCount,\r\n entity_type: formatEntityType(level, recommendationsCount, i18n),\r\n }\r\n );\r\n } else if (type === RECOMMENDATION_TYPES.SYNDICATION) {\r\n actionTitle = i18n.getString('Summary_Card_What_You_Can_Do_Generic');\r\n actions = i18n.getString('Summary_Card_Action_Syndication');\r\n } else {\r\n actionTitle = i18n.getString(\r\n 'Summary_Card_What_You_Can_Do',\r\n { entity_name: entityName }\r\n );\r\n const headers = _.map(recommendationConfigs[type].sampleActionHeaders, headerKey =>\r\n i18n.getString(headerKey));\r\n const highlights = _.map(recommendationConfigs[type].sampleActionHeaders, headerKey =>\r\n headerKey === 'Summary_Card_Action_Header_Est_Impressions'\r\n || headerKey === 'Summary_Card_Action_Header_Est_Impression_Share');\r\n actions = {\r\n headers,\r\n values: formatActions(type, sample.actions, i18n, currency),\r\n highlights,\r\n };\r\n }\r\n\r\n return {\r\n actions,\r\n actionTitle,\r\n };\r\n};\r\n\r\nexport const getCompetitionSampleInsightTitle = ({\r\n type,\r\n i18n,\r\n entityName,\r\n recommendationsCount,\r\n sample,\r\n}) => {\r\n let insightTitle = '';\r\n // what's going on\r\n if (type === RECOMMENDATION_TYPES.NEW_KEYWORD || type === RECOMMENDATION_TYPES.SYNDICATION) {\r\n insightTitle = i18n.getString(\r\n 'Summary_Card_Whats_Going_Generic',\r\n { out_of: formatOutOf(i18n, recommendationsCount, sample.visualData.length) }\r\n );\r\n } else {\r\n insightTitle = i18n.getString(\r\n 'Summary_Card_Whats_Going_On',\r\n {\r\n out_of: formatOutOf(i18n, recommendationsCount),\r\n entity_name: entityName,\r\n }\r\n );\r\n }\r\n return insightTitle;\r\n};\r\n\r\nexport const formatCompetitionSampleVisualDataTable = ({\r\n type,\r\n visualData,\r\n visualTableHeaders,\r\n i18n,\r\n currency,\r\n}) => {\r\n const headers = _.map(visualTableHeaders, headerKey => i18n.getString(headerKey));\r\n const formattedVisualData = { headers };\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD: {\r\n formattedVisualData.highlights = [false, false, true];\r\n formattedVisualData.values = _.map(visualData, row => ([\r\n row.suggestedKeyword,\r\n /* row.monthlyQueryVolume,\r\n //bug 1457951: disable until est. weekly search volume is available */\r\n formatBid(row.bidSuggested, i18n, currency),\r\n `+${formatDecimal(row.impressionsIncrease, i18n)}`,\r\n ]));\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.SYNDICATION: {\r\n formattedVisualData.highlights = [false, false, false, true];\r\n formattedVisualData.alignments = ['left', 'left'];\r\n formattedVisualData.values = _.map(visualData, (row) => {\r\n const formattedAdoptionPercentage = formatPercent(row.adoptionPercentage / 100, i18n);\r\n const adoptionValue = {\r\n percentValue: row.adoptionPercentage,\r\n formattedValue: formattedAdoptionPercentage,\r\n useProgressBar: true,\r\n };\r\n return [\r\n truncateEntityName(row.campaignName),\r\n truncateEntityName(row.adGroupName),\r\n adoptionValue,\r\n `+${formatDecimal(row.impressionsIncrease, i18n)}`,\r\n ];\r\n });\r\n break;\r\n }\r\n default: {\r\n break;\r\n }\r\n }\r\n\r\n return formattedVisualData;\r\n};\r\n","import _ from 'underscore';\r\n\r\n/**\r\n * Format campaign bulk api error\r\n * @param {Array} errors - array of error from MT\r\n * @param {Integer} addedValue - diff between adinsight error code and campaign error code\r\n * @return {Array} formatted errors in campaign MT style\r\n */\r\nexport const formatCampaignBulkApiError = (errors, addedValue) => _.map(errors, error => ({\r\n ErrorNumber: error.ErrorCode - addedValue,\r\n Error: error.ErrorMessage,\r\n Property: error.Property,\r\n}));\r\n","import _ from 'underscore';\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n VISUAL_TYPES\r\n} from './consts';\r\n\r\nimport { generateSchema } from './schema';\r\n\r\nimport {\r\n formatEstimates,\r\n replacePlaceholders,\r\n formatSummary,\r\n buildSimpleFormFields,\r\n formatVisualDataChart,\r\n} from './formatter/index';\r\nimport { recommendationConfigs } from './recommendation-configs';\r\n\r\nfunction getModelForInsight({\r\n i18n, level, type,\r\n recommendation,\r\n}) {\r\n const config = recommendationConfigs[type];\r\n\r\n // visual\r\n let { visualData } = recommendation;\r\n const visualType = config.recommendation.visualType || config.visualType;\r\n visualData = formatVisualDataChart(i18n, visualType, visualData);\r\n if (visualType === VISUAL_TYPES.TABLE) {\r\n visualData = buildSimpleFormFields(\r\n config.recommendation.visualData,\r\n _.first(recommendation.opportunities),\r\n i18n\r\n );\r\n }\r\n\r\n const insightTitle = replacePlaceholders({\r\n model: recommendation,\r\n i18n,\r\n level,\r\n type,\r\n }, config.recommendation.insightTitle);\r\n\r\n return {\r\n insightTitle,\r\n visualData,\r\n visualType,\r\n };\r\n}\r\n\r\nfunction getModelForFormAction({\r\n type,\r\n i18n,\r\n recommendation,\r\n currency,\r\n appConfig,\r\n}) {\r\n const recommendationConfig = recommendationConfigs[type].recommendation;\r\n\r\n let labelProcessor;\r\n if (type === RECOMMENDATION_TYPES.BUDGET) {\r\n labelProcessor = label => label.replace('{{currency}}', currency);\r\n }\r\n const model = _.first(recommendation.opportunities);\r\n const fields = buildSimpleFormFields(\r\n recommendationConfig.actionDataInForm,\r\n model,\r\n i18n,\r\n labelProcessor,\r\n currency\r\n );\r\n\r\n const estimates = formatEstimates(_.extend(\r\n {},\r\n {\r\n type,\r\n i18n,\r\n currency,\r\n inDetailsView: true,\r\n },\r\n recommendation\r\n ));\r\n return {\r\n actionDataInForm: _.extend({ id: _.uniqueId('action-form-data-') }, {\r\n fields,\r\n model,\r\n target: recommendation.target,\r\n schema: generateSchema(appConfig),\r\n }),\r\n estimates,\r\n };\r\n}\r\n\r\nfunction getModelForGridAction({\r\n type,\r\n i18n,\r\n recommendation,\r\n currency,\r\n}) {\r\n const recommendationConfig = recommendationConfigs[type].recommendation;\r\n\r\n const {\r\n dataBuilder, columns, singleSelection, helpTopics, hasLastRowAsCurrent,\r\n } = recommendationConfig.actionGrid;\r\n const localizedHeaders = _.map(_.pluck(columns, 'header'), header => (i18n.getString(header)));\r\n const selectedRowIndex = _.findIndex(\r\n recommendation.opportunities,\r\n opportunity => opportunity.isDefault\r\n );\r\n const bodies = dataBuilder({\r\n recommendation,\r\n i18n,\r\n currency,\r\n });\r\n\r\n const actionDataInGrid = {\r\n id: _.uniqueId('action-grid-data-'),\r\n headers: localizedHeaders,\r\n bodies,\r\n selectedRow: selectedRowIndex.toString(),\r\n singleSelection,\r\n helpTopics,\r\n columns,\r\n hasLastRowAsCurrent,\r\n model: recommendation.opportunities,\r\n target: recommendation.target,\r\n };\r\n\r\n return {\r\n actionDataInGrid,\r\n };\r\n}\r\n\r\nconst getModelForAllRecommendations = (options) => {\r\n const {\r\n recommendations,\r\n type,\r\n i18n,\r\n level,\r\n currency,\r\n appConfig,\r\n } = options;\r\n const recommendationConfig = recommendationConfigs[type].recommendation;\r\n const result = _.map(recommendations, (recommendation) => {\r\n const data = {};\r\n\r\n // insight\r\n _.extend(data, getModelForInsight({\r\n i18n, level, type, recommendation,\r\n }));\r\n\r\n // action\r\n data.actionTitle = replacePlaceholders({\r\n model: recommendation,\r\n i18n,\r\n level,\r\n type,\r\n }, recommendationConfig.actionTitle);\r\n\r\n const commonOptionsForAction = {\r\n type, i18n, recommendation, currency,\r\n };\r\n if (recommendationConfig.actionDataInForm || recommendation.actionDataInForm) {\r\n _.extend(data, getModelForFormAction(_.extend({}, { appConfig }, commonOptionsForAction)));\r\n }\r\n if (recommendationConfig.actionGrid) {\r\n _.extend(data, getModelForGridAction(commonOptionsForAction));\r\n }\r\n if (_.isFunction(recommendationConfig.postprocessor)) {\r\n recommendationConfig.postprocessor(data, recommendation, i18n);\r\n }\r\n return data;\r\n });\r\n return result;\r\n};\r\n\r\nexport const getDetailsSummary = (options) => {\r\n const summary = formatSummary(options);\r\n return {\r\n summary,\r\n };\r\n};\r\n\r\nexport const getDetailsViewModel = (options) => {\r\n const summary = formatSummary(options);\r\n const recommendations = getModelForAllRecommendations(options);\r\n\r\n return _.extend({}, {\r\n summary,\r\n recommendations,\r\n });\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { RECOMMENDATION_TYPES } from '../consts';\r\n\r\nexport const withAdsAutoApply = (WrappedComponent) => {\r\n class HoC extends React.Component {\r\n static displayName = `withAdsAutoApply(${getDisplayName(WrappedComponent)})`;\r\n\r\n static propTypes = {\r\n odata: PropTypes.PropTypes.shape({\r\n get: PropTypes.func.isRequired,\r\n }).isRequired,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n showIntermediateView: PropTypes.bool,\r\n permissions: PropTypes.shape({}),\r\n type: PropTypes.string,\r\n data: PropTypes.objectOf(PropTypes.any),\r\n dataService: PropTypes.func.isRequired,\r\n };\r\n\r\n static defaultProps = {\r\n showIntermediateView: false,\r\n permissions: {},\r\n type: null,\r\n data: {},\r\n };\r\n\r\n state = {\r\n campaignAutoApplyStatus: {},\r\n };\r\n\r\n componentDidMount = () => {\r\n this.reload();\r\n };\r\n\r\n componentWillUnmount = () => {\r\n this.cancel();\r\n };\r\n\r\n reload = () => {\r\n this.cancel();\r\n\r\n this.loadToken = createAsyncToken(this.props.dataService\r\n .getAutoApplyOptInStatus())\r\n .on({\r\n onSuccess: (response) => {\r\n this.setState({\r\n campaignAutoApplyStatus: {\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: _.find(response.data.value, item => item.RecommendationType === RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS).IsOptIn,\r\n },\r\n });\r\n },\r\n });\r\n };\r\n\r\n cancel = () => {\r\n if (this.loadToken) {\r\n this.loadToken.cancel();\r\n }\r\n };\r\n\r\n render = () => {\r\n const type = this.props.type || this.props.data.type;\r\n if (this.state.campaignAutoApplyStatus[type] === undefined\r\n && !this.props.showIntermediateView) {\r\n return null;\r\n }\r\n\r\n return ();\r\n };\r\n }\r\n\r\n return hoistNonReactStatics(HoC, WrappedComponent);\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\n\r\nexport const withImgAutoRetrieve = (WrappedComponent) => {\r\n class HoC extends React.Component {\r\n static displayName = `withImgAutoRetrieve(${getDisplayName(WrappedComponent)})`;\r\n\r\n static propTypes = {\r\n odata: PropTypes.PropTypes.shape({\r\n get: PropTypes.func.isRequired,\r\n }).isRequired,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n };\r\n\r\n state = {\r\n allowCrawlImagesFromLandingPage: undefined,\r\n };\r\n\r\n componentDidMount = () => {\r\n this.reload();\r\n };\r\n\r\n componentWillUnmount = () => {\r\n this.cancel();\r\n };\r\n\r\n reload = () => {\r\n this.cancel();\r\n\r\n const {\r\n odata,\r\n cid,\r\n aid,\r\n } = this.props;\r\n\r\n const url = `Customers(${cid})/Accounts(${aid})?$select=AllowCrawlImagesFromLandingPage`;\r\n\r\n this.loadToken = createAsyncToken(odata.get(url))\r\n .on({\r\n onSuccess: (response) => {\r\n this.setState({\r\n allowCrawlImagesFromLandingPage: response.AllowCrawlImagesFromLandingPage,\r\n });\r\n },\r\n });\r\n };\r\n\r\n cancel = () => {\r\n if (this.loadToken) {\r\n this.loadToken.cancel();\r\n }\r\n };\r\n\r\n render = () => {\r\n if (this.state.allowCrawlImagesFromLandingPage === undefined) {\r\n return null;\r\n }\r\n\r\n return ();\r\n };\r\n }\r\n\r\n return hoistNonReactStatics(HoC, WrappedComponent);\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\n\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { createAsyncToken, generateGuid } from '@bingads-webui-universal/primitive-utilities';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES } from '../consts';\r\n\r\nexport const withGetAutoApplyOptInStatus = (WrappedComponent) => {\r\n class HoC extends React.Component {\r\n static displayName = `withGetAutoApplyOptInStatus(${getDisplayName(WrappedComponent)})`;\r\n\r\n static propTypes = {\r\n dataService: PropTypes.shape({\r\n getAutoApplyOptInStatus: PropTypes.func.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}),\r\n isMCC: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n permissions: {},\r\n isMCC: false,\r\n }\r\n\r\n state = {\r\n data: null,\r\n optInStatus: null,\r\n };\r\n\r\n componentDidMount = () => {\r\n if (!this.props.isMCC) {\r\n this.reload();\r\n }\r\n };\r\n\r\n componentWillUnmount = () => {\r\n this.cancel();\r\n };\r\n\r\n reload = () => {\r\n this.cancel();\r\n this.loadToken = createAsyncToken(this.props.dataService\r\n .getAutoApplyOptInStatus().finally(withUiBlock($('.recommendations-page'))))\r\n .on({\r\n onSuccess: ({\r\n data,\r\n }) => {\r\n const parsedData = this.parse(data.value);\r\n this.setState({\r\n data: parsedData.parsedData,\r\n optInStatus: parsedData.optInStatus,\r\n });\r\n },\r\n });\r\n };\r\n\r\n cancel = () => {\r\n if (this.loadToken) {\r\n this.loadToken.cancel();\r\n }\r\n };\r\n\r\n parse = (rawData) => {\r\n const parsedData = {};\r\n const optInStatus = {};\r\n _.each(rawData, (data) => {\r\n if (_.contains(SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES, data.RecommendationType)) {\r\n parsedData[data.RecommendationType] = { ...data };\r\n optInStatus[data.RecommendationType] = data.IsOptIn;\r\n }\r\n });\r\n\r\n return { optInStatus, parsedData };\r\n };\r\n\r\n render = () => {\r\n if (this.state.data === null) return null;\r\n\r\n return ();\r\n };\r\n }\r\n\r\n return hoistNonReactStatics(HoC, WrappedComponent);\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { RECOMMENDATION_CATEGORIES_IDS, RECOMMENDATION_CATEGORIES } from '../consts';\r\n\r\nfunction filterData({ data, filterCategory, recommendationCustomizedDataFilterFunc }) {\r\n if (_.isFunction(recommendationCustomizedDataFilterFunc)) {\r\n return recommendationCustomizedDataFilterFunc(data);\r\n }\r\n if (filterCategory &&\r\n filterCategory !== RECOMMENDATION_CATEGORIES_IDS[RECOMMENDATION_CATEGORIES.ALL]) {\r\n const matcher = _.matcher({ category: filterCategory });\r\n return _.pick(data, matcher);\r\n }\r\n\r\n return data;\r\n}\r\n\r\nexport const withFilterCategory = (WrappedComponent) => {\r\n const HoC = props => (\r\n \r\n );\r\n\r\n HoC.displayName = `withFilterCategory(${getDisplayName(WrappedComponent)})`;\r\n HoC.propTypes = {\r\n filterCategory: PropTypes.string,\r\n data: PropTypes.objectOf(PropTypes.any),\r\n };\r\n HoC.defaultProps = {\r\n filterCategory: null,\r\n data: null,\r\n };\r\n\r\n hoistNonReactStatics(HoC, WrappedComponent);\r\n\r\n return HoC;\r\n};\r\n","import _ from 'underscore';\r\nimport 'jquery';\r\nimport kendo from '@bingads-webui/kendo/kendo.core';\r\n\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n ESTIMATE_TYPES,\r\n SEASONAL_TRACKID,\r\n MOVE_BUDGET_CAMPAIGN_BUDGET_STATUS,\r\n BUDGET_OPPORTUNITY_TYPES,\r\n SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES,\r\n RECOMMENDATION_CATEGORIES,\r\n TOP_POSITION_RECOMMENDATION_TYPES,\r\n} from './consts';\r\n\r\nimport { getFieldValueFromGridData } from './util';\r\n\r\n// #region estimates\r\nexport const getEstimates = (type, entity) => {\r\n const estimates = {\r\n costIncrease: entity.EstimatedIncreaseInCost,\r\n clicksIncrease: entity.EstimatedIncreaseInClicks,\r\n };\r\n\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET:\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID:\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST:\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST:\r\n estimates.imprShareCurrent = entity.CurSelfImprShare;\r\n estimates.imprShareIncrease = entity.EstimatedIncreaseInImprShare;\r\n estimates.imprShareTotal = entity.CurSelfImprShare + entity.EstimatedIncreaseInImprShare;\r\n if (entity.EstimatedIncreaseInConversionsInt > 0) {\r\n estimates.convIncrease = entity.EstimatedIncreaseInConversionsInt;\r\n }\r\n break;\r\n case RECOMMENDATION_TYPES.GOOGLE_IMPORT:\r\n case RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED:\r\n case RECOMMENDATION_TYPES.FACEBOOK_IMPORT:\r\n estimates.clicksCurrent = entity.CurrentClicks;\r\n estimates.impressionsIncrease = entity.EstimatedIncreaseInImpressions;\r\n break;\r\n case RECOMMENDATION_TYPES.SITE_LINK:\r\n case RECOMMENDATION_TYPES.CALLOUT:\r\n estimates.ctrCurrent = entity.CurrentCtr;\r\n estimates.ctrIncrease = entity.EstimatedIncreaseInCtr;\r\n estimates.ctrLift = entity.CtrLift;\r\n estimates.cpcIncrease = entity.EstimatedIncreaseInCpc;\r\n break;\r\n case RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY:\r\n if (entity.EstimatedIncreaseInConversionsInt > 0) {\r\n estimates.primaryEstimate = ESTIMATE_TYPES.CONVERSIONS;\r\n estimates.convCurrent = entity.CurrentConversionsInt;\r\n estimates.convIncrease = entity.EstimatedIncreaseInConversionsInt;\r\n } else {\r\n estimates.primaryEstimate = ESTIMATE_TYPES.CLICKS;\r\n estimates.clicksCurrent = entity.CurrentClicks;\r\n }\r\n break;\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD: // deprecated in Oct 2023\r\n case RECOMMENDATION_TYPES.NEW_LOCATION:\r\n case RECOMMENDATION_TYPES.SYNDICATION:\r\n estimates.impressionsIncrease = entity.EstimatedIncreaseInImpressions;\r\n estimates.impressionsCurrent = entity.CurrentImpressions;\r\n if (entity.EstimatedIncreaseInConversionsInt > 0) {\r\n estimates.convIncrease = entity.EstimatedIncreaseInConversionsInt;\r\n }\r\n break;\r\n case RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS:\r\n estimates.weeklySearchesIncrease = entity.EstimatedIncreaseInSearches;\r\n break;\r\n case RECOMMENDATION_TYPES.IMAGE_EXTENSION:\r\n case RECOMMENDATION_TYPES.REALLOCATE_BUDGET:\r\n estimates.clicksCurrent = entity.CurrentClicks;\r\n estimates.costCurrent = entity.CurrentCost;\r\n break;\r\n case RECOMMENDATION_TYPES.FIX_AD_TEXT:\r\n case RECOMMENDATION_TYPES.FIX_AD_DESTINATION:\r\n estimates.primaryEstimate = ESTIMATE_TYPES.REJECTED_ADS;\r\n estimates.secondPrimaryEstimate = ESTIMATE_TYPES.REJECTED_KEYWORDS;\r\n estimates.isDoublePrimary = true;\r\n estimates[`${ESTIMATE_TYPES.REJECTED_ADS}Increase`] = entity.NumberRejectedAds;\r\n estimates[`${ESTIMATE_TYPES.REJECTED_KEYWORDS}Increase`] = entity.NumberRejectedKeywords;\r\n break;\r\n case RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL:\r\n case RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS:\r\n estimates.missingConvIncrease = entity.EstimatedIncreaseInConversionsInt;\r\n break;\r\n case RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS:\r\n estimates.impressionsIncrease = entity.EstimatedIncreaseInImpressions;\r\n estimates.impressionsCurrent = entity.CurrentImpressions;\r\n break;\r\n case RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS:\r\n estimates.clicksCurrent = entity.CurrentClicks;\r\n estimates.impressionsIncrease = entity.EstimatedIncreaseInImpressions;\r\n break;\r\n case RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER:\r\n estimates.impressionsCurrent = entity.CurrentImpressions;\r\n estimates.impressionsIncrease = entity.EstimatedIncreaseInImpressions;\r\n estimates.targetedProductsIncrease = entity.SumofTotalUntargetedOfferCnt;\r\n break;\r\n case RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS:\r\n estimates.clicksIncrease = entity.EstimatedIncreaseInClicks;\r\n estimates.impressionsIncrease = entity.EstimatedIncreaseInImpressions;\r\n break;\r\n case RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION:\r\n estimates.convIncrease = entity.EstimatedIncreaseInConversionsInt;\r\n break;\r\n case RECOMMENDATION_TYPES.SYNDICATION_GAP:\r\n estimates.clicksIncrease = entity.EstimatedIncreaseInClicks;\r\n estimates.convIncrease = entity.EstimatedIncreaseInConversionsInt;\r\n break;\r\n // No estimates\r\n case RECOMMENDATION_TYPES.REPAIR_ADS:\r\n case RECOMMENDATION_TYPES.REPAIR_KEYWORD:\r\n case RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD:\r\n case RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS:\r\n case RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.TRENDING_QUERY:\r\n case RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD:\r\n case RECOMMENDATION_TYPES.MULTIMEDIA_ADS:\r\n case RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID:\r\n case RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION:\r\n case RECOMMENDATION_TYPES.PMAX_IMPORT:\r\n return null;\r\n default:\r\n throw new Error(`Not Implemented: ${type}`);\r\n }\r\n\r\n return estimates;\r\n};\r\n// #endregion estimates\r\n\r\n// #region chart/map/table\r\nconst formatDate = (day, hour) => kendo.toString(kendo.parseDate(`${day}${hour || 0}`, 'yyyyMMddH'), 's');\r\n\r\nconst GetImpressionSharePoints = points => _.map(points, point => ({\r\n primarySegment: formatDate(point.Day, point.Hour),\r\n value: point.AuctionNumber && (point.ImpressionNumber / point.AuctionNumber),\r\n}));\r\n\r\nconst GetConversionRatePoints = points => _.map(points, point => ({\r\n primarySegment: formatDate(point.Day, point.Hour),\r\n value: point.ClickNumber && (point.ConversionNumber / point.ClickNumber),\r\n}));\r\n\r\nconst getBudgetChartData = (opportunity) => {\r\n const competitorData = opportunity.ReferenceCompetitor.CompetitiveInsights[0];\r\n const youData = opportunity.ReferenceCompetitor.CompetitiveInsights[1];\r\n\r\n const items = [\r\n {\r\n name: youData.Key,\r\n segmentData: GetImpressionSharePoints(youData.Value),\r\n },\r\n {\r\n name: competitorData.Key,\r\n segmentData: GetImpressionSharePoints(competitorData.Value),\r\n },\r\n ];\r\n\r\n return {\r\n selectedMetric: 'ImpressionShare',\r\n primarySegmentType: 'Hour',\r\n items,\r\n };\r\n};\r\n\r\nconst normalizeLocation = (\r\n id,\r\n location,\r\n estimatedIncreaseInImpressions = null,\r\n estimatedIncreaseInClicks = null,\r\n queriesFiltered = null,\r\n queriesPassedLocationFiltering = null\r\n) => {\r\n const type = 'Location';\r\n\r\n return {\r\n Id: id,\r\n Criterion: {\r\n Type: type,\r\n LocationCriterion: {\r\n CountryCode: location.CountryCode,\r\n LocationId: location.LocationId,\r\n Latitude: location.Latitude,\r\n Longitude: location.Longitude,\r\n LocationType: location.LocationType,\r\n Name: location.ExpandedName,\r\n },\r\n },\r\n EstimatedIncreaseInImpressions: estimatedIncreaseInImpressions,\r\n EstimatedIncreaseInClicks: estimatedIncreaseInClicks,\r\n QueriesFiltered: queriesFiltered,\r\n QueriesPassedLocationFiltering: queriesPassedLocationFiltering,\r\n };\r\n};\r\n\r\nconst getNewLocationMapData = (recommendation) => {\r\n const firstOpportunity = recommendation.Opportunities[0];\r\n let count = 0;\r\n\r\n const included =\r\n _.map(firstOpportunity.ExistingLocations, (location) => {\r\n count += 1;\r\n return normalizeLocation(count, location);\r\n });\r\n\r\n const excluded =\r\n _.map(firstOpportunity.ExcludedLocations, (location) => {\r\n count += 1;\r\n return normalizeLocation(count, location);\r\n });\r\n\r\n const recommended = _.map(recommendation.Opportunities, (opportunity) => {\r\n count += 1;\r\n return normalizeLocation(\r\n count,\r\n opportunity.Location,\r\n opportunity.EstimatedIncreaseInImpressions,\r\n opportunity.EstimatedIncreaseInClicks,\r\n opportunity.QueriesFiltered,\r\n opportunity.QueriesPassedLocationFiltering\r\n );\r\n });\r\n\r\n return {\r\n included,\r\n excluded,\r\n recommended,\r\n };\r\n};\r\n\r\nconst getBidBoostChartData = (recommendation, isDeviceBidBoost = false) => {\r\n const firstOpportunity = recommendation.Opportunities[0];\r\n const youData = firstOpportunity.CompetitiveInsights[1];\r\n const youPoint = {\r\n name: youData.Key,\r\n data: [youData.Value[0].ImpressionNumber / youData.Value[0].AuctionNumber],\r\n };\r\n\r\n const items = _.map(recommendation.Opportunities, (opportunity) => {\r\n const competitorData = opportunity.CompetitiveInsights[0].Value[0];\r\n return {\r\n name: opportunity.CompetitorDomain,\r\n data: [competitorData.ImpressionNumber / competitorData.AuctionNumber],\r\n };\r\n });\r\n items.unshift(youPoint);\r\n\r\n return {\r\n selectedMetric: 'ImpressionShare',\r\n localizeCategory: isDeviceBidBoost,\r\n category: isDeviceBidBoost ?\r\n `Details_View_Device_Type_${firstOpportunity.Device}` :\r\n firstOpportunity.ExpandedName,\r\n items,\r\n };\r\n};\r\n\r\nconst getCompetitiveBidChartData = (recommendation) => {\r\n const youData = _.find(recommendation.Opportunities[0].CompetitiveInsights, ({ Key }) => Key === 'You');\r\n\r\n const items = _.map(recommendation.Opportunities, (opportunity) => {\r\n const competitorData = _.find(opportunity.CompetitiveInsights, ({ Key }) => Key !== 'You');\r\n return {\r\n name: competitorData.Key,\r\n segmentData: GetImpressionSharePoints(competitorData.Value),\r\n };\r\n });\r\n\r\n // add line for You\r\n items.unshift({\r\n name: youData.Key,\r\n segmentData: GetImpressionSharePoints(youData.Value),\r\n });\r\n\r\n if (recommendation.Opportunities[0].IsHighConverting) {\r\n items.push({\r\n name: youData.Key,\r\n metric: 'ConversionRate',\r\n segmentData: GetConversionRatePoints(youData.Value),\r\n });\r\n }\r\n\r\n return {\r\n selectedMetric: 'ImpressionShare',\r\n secondaryMetric: 'ConversionRate',\r\n primarySegmentType: 'Day',\r\n items,\r\n };\r\n};\r\n\r\nconst getDetailsVisualData = (type, recommendation) => {\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET:\r\n return getBudgetChartData(recommendation.Opportunities[0]);\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID:\r\n return getCompetitiveBidChartData(recommendation);\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST:\r\n return getBidBoostChartData(recommendation, true);\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST:\r\n return getBidBoostChartData(recommendation);\r\n case RECOMMENDATION_TYPES.NEW_LOCATION:\r\n return getNewLocationMapData(recommendation);\r\n case RECOMMENDATION_TYPES.SYNDICATION:\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nconst getNewKeywordTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n suggestedKeyword: topOpportunity.SuggestedKeyword,\r\n monthlyQueryVolume: topOpportunity.MonthlyQueryVolume,\r\n bidSuggested: topOpportunity.SuggestedBid,\r\n impressionsIncrease: topOpportunity.EstimatedIncreaseInImpressions,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getNewKeywordOpportunityTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n recommendedKeyword: topOpportunity.SuggestedKeyword,\r\n matchType: topOpportunity.MatchType,\r\n recommendedSource: topOpportunity.SourcesForBingAdsWebUi[0],\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getDynamicSearchAdsTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = _.first(recommendation.Opportunities);\r\n if (topOpportunity) {\r\n row = { searchExamples: topOpportunity.SearchExamples };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getSyndicationTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n campaignName: topOpportunity.Target.CampaignName,\r\n adGroupName: topOpportunity.Target.AdGroupName,\r\n adoptionPercentage: topOpportunity.CompetitorAdoptionPercentage,\r\n impressionsIncrease: topOpportunity.EstimatedIncreaseInImpressions,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getExtensionTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n campaignName: topOpportunity.Target.CampaignName,\r\n ctrLift: topOpportunity.CtrLift,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getBudgetOpportunityTable = (recommendations, primaryEstimate, isShared = false) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n if (isShared) {\r\n row = { entityName: topOpportunity.Shared.BudgetName };\r\n } else {\r\n row = { entityName: topOpportunity.Target.CampaignName };\r\n }\r\n if (primaryEstimate === ESTIMATE_TYPES.CONVERSIONS) {\r\n row.convIncrease = topOpportunity.EstimatedIncreaseInConversionsInt;\r\n } else {\r\n row.clicksIncrease = topOpportunity.EstimatedIncreaseInClicks;\r\n }\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getRepairTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n adGroupName: topOpportunity.Target.AdGroupName,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getRemoveConflictingNegativeKeywordTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n negativeKeyword: topOpportunity.NegativeKeyword,\r\n blockedKeyword: _.first(topOpportunity.BlockedKeywordList).Keyword,\r\n matchType: topOpportunity.NegativeKeywordMatchTypeId,\r\n blockedKeywordMatchType: _.first(topOpportunity.BlockedKeywordList).MatchTypeId,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getResponsiveSearchAdsTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n adGroupName: topOpportunity.Target.AdGroupName,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getReallocateBudgetTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n const fromCampaign = _.find(\r\n topOpportunity.SuggestedCampaignBudgets,\r\n campaign => campaign.BudgetStatus === MOVE_BUDGET_CAMPAIGN_BUDGET_STATUS.Surplus\r\n );\r\n const toCampaign = _.find(\r\n topOpportunity.SuggestedCampaignBudgets,\r\n campaign => campaign.BudgetStatus === MOVE_BUDGET_CAMPAIGN_BUDGET_STATUS.Deficit\r\n );\r\n if (topOpportunity) {\r\n row = {\r\n fromCampaign: fromCampaign.CampaignName,\r\n toCampaign: toCampaign.CampaignName,\r\n suggestBudget: toCampaign.BudgetDeficit,\r\n clicksIncrease: topOpportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getFixAdDestinationTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n UrlOrLandingPage: topOpportunity.UrlOrLandingPage,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getBroadMatchKeywordTable = (samples) => {\r\n const rows = _.map(samples, (sample) => {\r\n const row = {\r\n recommendedKeyword: sample.SampleContent,\r\n };\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getFixAdTextTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const opportunity = recommendation.Opportunities[0];\r\n\r\n if (opportunity) {\r\n row = {\r\n policyCode: opportunity.FlagId,\r\n numberRejectedAds:\r\n opportunity.NumberRejectedDisapprovedAds +\r\n opportunity.NumberRejectedLimitedApprovedAds,\r\n numberRejectedKeywords:\r\n opportunity.NumberRejectedDisapprovedKeywords +\r\n opportunity.NumberRejectedLimitedApprovedKeywords,\r\n };\r\n }\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getTrendingQueryTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n recommendedKeyword: topOpportunity.SuggestedKeyword,\r\n matchType: topOpportunity.MatchType,\r\n searchVolumeIncrease: topOpportunity.WoWInDecimal || topOpportunity.WoW,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getMultiMediaAdsTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n adGroupName: topOpportunity.Target.AdGroupName,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getImageExtensionTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n campaignName: topOpportunity.Target.CampaignName,\r\n clicksIncrease: topOpportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getRepairMissingKeywordParamsTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n keyword: topOpportunity.Target.Keyword,\r\n impressionsIncrease: topOpportunity.EstimatedIncreaseInImpressions,\r\n impressionsCurrent: topOpportunity.CurrentImpressions,\r\n clicksIncrease: topOpportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getFixNoImpressionBidTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n keyword: topOpportunity.Target.Keyword,\r\n suggestedBid: topOpportunity.SuggestedBid,\r\n impressionsIncrease: topOpportunity.EstimatedIncreaseInImpressions,\r\n source: topOpportunity.Source,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getRepairUntargetedOfferTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n campaignName: getFieldValueFromGridData(topOpportunity.GridData, 'CampaignName'),\r\n impressionsIncrease: topOpportunity.EstimatedIncreaseInImpressions,\r\n clicksIncrease: topOpportunity.EstimatedIncreaseInClicks,\r\n targetedProductsIncrease: topOpportunity.TotalUntargetedOfferCnt,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getImproveMultiMediaAdsTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const opportunity = recommendation.Opportunities[0];\r\n if (opportunity) {\r\n row = {\r\n Images: opportunity.Images,\r\n Headlines: opportunity.Headlines,\r\n LongHeadlines: opportunity.LongHeadlines,\r\n Descriptions: opportunity.Descriptions,\r\n OpportunityId: opportunity.OpportunityId,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getSSC2PMaxMigrationTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n clicksIncrease: topOpportunity.EstimatedIncreaseInClicks,\r\n campaignName: topOpportunity.Target.CampaignName,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getDSA2PMaxMigrationTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n convIncrease: topOpportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n\r\nconst getSyndicationGapTable = (recommendations) => {\r\n const rows = _.map(recommendations, (recommendation) => {\r\n let row;\r\n const topOpportunity = recommendation.Opportunities[0];\r\n if (topOpportunity) {\r\n row = {\r\n clicksIncrease: topOpportunity.EstimatedIncreaseInClicks,\r\n campaignName: topOpportunity.Target.CampaignName,\r\n convIncrease: topOpportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n\r\n return row;\r\n });\r\n\r\n return _.compact(rows);\r\n};\r\n// #endregion chart/map/table\r\n\r\n// #region sample\r\nconst sortOpportunitiesInRecommendation = (recommendation, type) => {\r\n let sortedOpportunities = null;\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID:\r\n sortedOpportunities = _.sortBy(recommendation.Opportunities, 'SuggestedBid');\r\n break;\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST:\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST:\r\n sortedOpportunities = _.sortBy(recommendation.Opportunities, 'SuggestedBidBoost');\r\n break;\r\n case RECOMMENDATION_TYPES.NEW_LOCATION:\r\n sortedOpportunities = _.sortBy(recommendation.Opportunities, 'EstimatedIncreaseInClicks');\r\n break;\r\n // Budget, new keyword, syndication are 1 to 1\r\n // no need to sort other opportunities\r\n default:\r\n break;\r\n }\r\n\r\n return _.extend(\r\n {},\r\n recommendation,\r\n {\r\n Opportunities: sortedOpportunities ?\r\n sortedOpportunities.reverse() : recommendation.Opportunities,\r\n }\r\n );\r\n};\r\n\r\n/**\r\n * If DefaultOpportunityId is defined, return corresponding opportunity\r\n * If not, use top opportunity\r\n * @param {Object} sortedRecommendation - sorted recommendation\r\n * @return {Object} recommended opportunity\r\n */\r\nconst getRecommendedOpportunity = (sortedRecommendation) => {\r\n let opportunity = null;\r\n if (sortedRecommendation.DefaultOpportunityId) {\r\n opportunity = _.findWhere(\r\n sortedRecommendation.Opportunities,\r\n { OpportunityId: sortedRecommendation.DefaultOpportunityId }\r\n );\r\n } else {\r\n [opportunity] = sortedRecommendation.Opportunities;\r\n }\r\n\r\n return opportunity;\r\n};\r\n\r\nconst getActionData = (\r\n type,\r\n topRecommendation,\r\n recommendedOpportunity\r\n) => {\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET: {\r\n return [\r\n {\r\n budgetCurrent: recommendedOpportunity.CurrentBudget,\r\n budgetIncrease: recommendedOpportunity.EstimatedIncreaseInBudget,\r\n imprShareIncrease: recommendedOpportunity.EstimatedIncreaseInImprShare,\r\n },\r\n ];\r\n }\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID: {\r\n return [\r\n {\r\n keyword: recommendedOpportunity.Target.Keyword,\r\n bidCurrent: recommendedOpportunity.CurrentBid,\r\n bidSuggested: recommendedOpportunity.SuggestedBid,\r\n imprShareIncrease: recommendedOpportunity.TargetSelfImprShare -\r\n recommendedOpportunity.CurSelfImprShare,\r\n },\r\n ];\r\n }\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST: {\r\n return [\r\n {\r\n device: recommendedOpportunity.Device,\r\n currentBidAdjustmentPercent: recommendedOpportunity.CurrentBidBoost,\r\n suggestedBidAdjustmentPercent: recommendedOpportunity.SuggestedBidBoost,\r\n imprShareIncrease: recommendedOpportunity.EstimatedIncreaseInImprShare,\r\n },\r\n ];\r\n }\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST: {\r\n return [\r\n {\r\n location: recommendedOpportunity.ExpandedName || recommendedOpportunity.GeoLocationId,\r\n currentBidAdjustmentPercent: recommendedOpportunity.CurrentBidBoost,\r\n suggestedBidAdjustmentPercent: recommendedOpportunity.SuggestedBidBoost,\r\n imprShareIncrease: recommendedOpportunity.EstimatedIncreaseInImprShare,\r\n },\r\n ];\r\n }\r\n case RECOMMENDATION_TYPES.NEW_LOCATION: {\r\n return _.map(topRecommendation.Opportunities, opportunity => ({\r\n location: opportunity.Location.ExpandedName,\r\n impressionsIncrease: opportunity.EstimatedIncreaseInImpressions,\r\n }));\r\n }\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD:\r\n default:\r\n return null;\r\n }\r\n};\r\n// #endregion sample\r\n\r\n// #region individual recommendation\r\nconst getOpportunity = (type, opportunity, defaultOpId) => {\r\n const opportunityId = opportunity.OpportunityId;\r\n const isDefault = opportunityId === defaultOpId;\r\n\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET:\r\n return {\r\n opportunityId,\r\n budgetCurrent: opportunity.CurrentBudget,\r\n budgetSuggested: opportunity.CurrentBudget + opportunity.EstimatedIncreaseInBudget,\r\n };\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID: {\r\n return {\r\n opportunityId,\r\n isDefault,\r\n suggestedBid: opportunity.SuggestedBid,\r\n imprShareIncrease: opportunity.TargetSelfImprShare -\r\n opportunity.CurSelfImprShare,\r\n totalImprShare: opportunity.TargetSelfImprShare,\r\n weeklyCost: opportunity.EstimatedIncreaseInCost + opportunity.CurrentCost,\r\n competitorDomain: opportunity.CompetitorDomain,\r\n competitorImprShare: opportunity.CompetitorImprShare,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n convIncrease: opportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST:\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST: {\r\n const competitorData = opportunity.CompetitiveInsights[0].Value[0];\r\n return {\r\n opportunityId,\r\n isDefault,\r\n suggestedBidAdjustmentPercent: opportunity.SuggestedBidBoost,\r\n imprShareIncrease: opportunity.EstimatedIncreaseInImprShare,\r\n totalImprShare: opportunity.EstimatedIncreaseInImprShare + opportunity.CurSelfImprShare,\r\n weeklyCost: opportunity.EstimatedIncreaseInCost + opportunity.CurrentCost,\r\n competitorDomain: opportunity.CompetitorDomain,\r\n competitorImprShare: competitorData.ImpressionNumber / competitorData.AuctionNumber,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n convIncrease: opportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n // deprecated in Oct 2023\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD: {\r\n return {\r\n opportunityId,\r\n suggestedBid: opportunity.SuggestedBid,\r\n suggestedKeyword: opportunity.SuggestedKeyword,\r\n matchType: opportunity.MatchType,\r\n monthlyQueryVolume: opportunity.MonthlyQueryVolume,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.NEW_LOCATION: {\r\n return {\r\n opportunityId,\r\n location: opportunity.Location.ExpandedName,\r\n searchQueryVolume: opportunity.QueriesFiltered,\r\n impressionsIncrease: opportunity.EstimatedIncreaseInImpressions,\r\n costIncrease: opportunity.EstimatedIncreaseInCost,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.SYNDICATION:\r\n return {\r\n opportunityId,\r\n adoptionPercent: opportunity.CompetitorAdoptionPercentage,\r\n };\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY: {\r\n return {\r\n opportunityId,\r\n recommendedKeyword: opportunity.SuggestedKeyword,\r\n matchType: opportunity.MatchType,\r\n recommendedSource: opportunity.SourcesForBingAdsWebUi[0],\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.TRENDING_QUERY: {\r\n return {\r\n opportunityId,\r\n recommendedKeyword: opportunity.SuggestedKeyword,\r\n matchType: opportunity.MatchType,\r\n monthlySearchVolume: opportunity.MonthlySearchVolume,\r\n weekoverWeek: opportunity.WoWInDecimal || opportunity.WoW,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS: {\r\n return {\r\n opportunityId,\r\n weeklySearchesIncrease: opportunity.EstimatedIncreaseInSearches,\r\n searchExamples: opportunity.SearchExamples,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.GOOGLE_IMPORT:\r\n case RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED:\r\n case RECOMMENDATION_TYPES.FACEBOOK_IMPORT:\r\n case RECOMMENDATION_TYPES.PMAX_IMPORT: {\r\n return {\r\n opportunityId,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.SITE_LINK:\r\n case RECOMMENDATION_TYPES.CALLOUT: {\r\n return {\r\n opportunityId,\r\n ctrLift: opportunity.CtrLift,\r\n campaignName: opportunity.Target.CampaignName,\r\n impressionsIncrease: opportunity.EstimatedIncreaseInImpressions,\r\n costIncrease: opportunity.EstimatedIncreaseInCost,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY: {\r\n return {\r\n opportunityId,\r\n convIncrease: opportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.REPAIR_ADS: {\r\n return {\r\n opportunityId,\r\n adGroupName: opportunity.Target.AdGroupName,\r\n campaignName: opportunity.Target.CampaignName,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.REPAIR_KEYWORD: {\r\n return {\r\n opportunityId,\r\n adGroupName: opportunity.Target.AdGroupName,\r\n campaignName: opportunity.Target.CampaignName,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD: {\r\n return {\r\n opportunityId,\r\n recommendedKeyword: opportunity.ReferenceKeyword,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD: {\r\n return {\r\n opportunityId,\r\n negativeKeyword: opportunity.NegativeKeyword,\r\n blockedKeyword: _.first(opportunity.BlockedKeywordList).Keyword,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS: {\r\n return {\r\n opportunityId,\r\n adGroupName: opportunity.Target.AdGroupName,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.REALLOCATE_BUDGET: {\r\n const fromCampaign = _.find(\r\n opportunity.SuggestedCampaignBudgets,\r\n campaign => campaign.BudgetStatus === MOVE_BUDGET_CAMPAIGN_BUDGET_STATUS.Surplus\r\n );\r\n const toCampaign = _.find(\r\n opportunity.SuggestedCampaignBudgets,\r\n campaign => campaign.BudgetStatus === MOVE_BUDGET_CAMPAIGN_BUDGET_STATUS.Deficit\r\n );\r\n return {\r\n opportunityId,\r\n fromCampaign: fromCampaign.CampaignName,\r\n toCampaign: toCampaign.CampaignName,\r\n suggestBudget: toCampaign.BudgetDeficit,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.FIX_AD_DESTINATION: {\r\n return {\r\n opportunityId,\r\n rejectedAd: opportunity.RejectedAd,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.FIX_AD_TEXT: {\r\n return {\r\n opportunityId,\r\n rejectionCode: opportunity.FlagId,\r\n rejectedAds: opportunity.RejectedAds,\r\n rejectedKeywords: opportunity.RejectedKeywords,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY: {\r\n return {\r\n opportunityId,\r\n inactiveTagCount: opportunity.NumInactiveUetTags,\r\n affectedGoal: opportunity.NumAffectedConversionGoals,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY: {\r\n return {\r\n opportunityId,\r\n numImpressions: opportunity.NumImpressions,\r\n numClicks: opportunity.NumClicks,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS: {\r\n return {\r\n opportunityId,\r\n missingConvIncrease: opportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL: {\r\n return {\r\n opportunityId,\r\n missingConvIncrease: opportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.MULTIMEDIA_ADS: {\r\n return {\r\n opportunityId,\r\n adGroupName: opportunity.Target.AdGroupName,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.IMAGE_EXTENSION: {\r\n return {\r\n opportunityId,\r\n campaignName: opportunity.Target.CampaignName,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS: {\r\n return {\r\n opportunityId,\r\n keyword: opportunity.Target.Keyword,\r\n impressionsIncrease: opportunity.EstimatedIncreaseInImpressions,\r\n impressionsCurrent: opportunity.CurrentImpressions,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID: {\r\n return {\r\n opportunityId,\r\n campaignName: opportunity.Target.CampaignName,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS: {\r\n return {\r\n opportunityId,\r\n impressionsIncrease: opportunity.EstimatedIncreaseInImpressions,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER: {\r\n return {\r\n opportunityId,\r\n impressionsIncrease: opportunity.EstimatedIncreaseInImpressions,\r\n impressionsCurrent: opportunity.CurrentImpressions,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n targetedProductsIncrease: opportunity.TotalUntargetedOfferCnt,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS: {\r\n return {\r\n opportunityId,\r\n impressionsIncrease: opportunity.EstimatedIncreaseInImpressions,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION: {\r\n return {\r\n opportunityId,\r\n campaignName: opportunity.Target.CampaignName,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION: {\r\n return {\r\n opportunityId,\r\n convIncrease: opportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n case RECOMMENDATION_TYPES.SYNDICATION_GAP: {\r\n return {\r\n opportunityId,\r\n clicksIncrease: opportunity.EstimatedIncreaseInClicks,\r\n convIncrease: opportunity.EstimatedIncreaseInConversionsInt,\r\n };\r\n }\r\n default:\r\n throw new Error(`Not Implemented: ${type}`);\r\n }\r\n};\r\n\r\n\r\nconst getRecommendation = (type, recommendedOpportunity) => {\r\n const target = recommendedOpportunity.Target;\r\n\r\n let delta;\r\n let segment;\r\n let competitor;\r\n let seasonalEvent;\r\n if (type === RECOMMENDATION_TYPES.DEVICE_BID_BOOST ||\r\n type === RECOMMENDATION_TYPES.LOCATION_BID_BOOST) {\r\n const competitorData = recommendedOpportunity.CompetitiveInsights[0].Value[0];\r\n const youData = recommendedOpportunity.CompetitiveInsights[1].Value[0];\r\n\r\n competitor = recommendedOpportunity.CompetitiveInsights[0].Key;\r\n delta = (competitorData.ImpressionNumber / competitorData.AuctionNumber) -\r\n (youData.ImpressionNumber / youData.AuctionNumber);\r\n segment = recommendedOpportunity.ExpandedName || recommendedOpportunity.Device;\r\n }\r\n\r\n if (_.contains(BUDGET_OPPORTUNITY_TYPES, type)) {\r\n seasonalEvent = _.size(recommendedOpportunity.SeasonalEvents) > 0 &&\r\n recommendedOpportunity.SeasonalEvents[0].Name;\r\n }\r\n\r\n const isHighConverting = !!recommendedOpportunity.IsHighConverting;\r\n\r\n return _.extend(\r\n {},\r\n {\r\n target,\r\n competitor,\r\n delta,\r\n segment,\r\n seasonalEvent,\r\n isHighConverting,\r\n }\r\n );\r\n};\r\n// #endregion individual recommendation\r\n\r\n// #region visualData\r\nconst getSampleVisualData = ({\r\n type,\r\n topRecommendation,\r\n recommendations,\r\n primaryEstimate = null,\r\n rawSamples = null,\r\n}) => {\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.BUDGET:\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID:\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST:\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST:\r\n case RECOMMENDATION_TYPES.NEW_LOCATION:\r\n return getDetailsVisualData(type, topRecommendation);\r\n // deprecated in Oct 2023\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD:\r\n return getNewKeywordTable(recommendations);\r\n case RECOMMENDATION_TYPES.SYNDICATION:\r\n return getSyndicationTable(recommendations);\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY:\r\n return getNewKeywordOpportunityTable(recommendations);\r\n case RECOMMENDATION_TYPES.TRENDING_QUERY:\r\n return getTrendingQueryTable(recommendations);\r\n case RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS:\r\n return getDynamicSearchAdsTable(recommendations);\r\n case RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY:\r\n return getBudgetOpportunityTable(\r\n recommendations,\r\n primaryEstimate\r\n );\r\n case RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY:\r\n return getBudgetOpportunityTable(\r\n recommendations,\r\n primaryEstimate,\r\n true\r\n );\r\n case RECOMMENDATION_TYPES.SITE_LINK:\r\n case RECOMMENDATION_TYPES.CALLOUT:\r\n return getExtensionTable(recommendations);\r\n case RECOMMENDATION_TYPES.REPAIR_ADS:\r\n case RECOMMENDATION_TYPES.REPAIR_KEYWORD:\r\n return getRepairTable(recommendations);\r\n case RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD:\r\n return getBroadMatchKeywordTable(rawSamples);\r\n case RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD:\r\n return getRemoveConflictingNegativeKeywordTable(recommendations);\r\n case RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS:\r\n return getResponsiveSearchAdsTable(recommendations);\r\n case RECOMMENDATION_TYPES.REALLOCATE_BUDGET:\r\n return getReallocateBudgetTable(recommendations);\r\n case RECOMMENDATION_TYPES.FIX_AD_DESTINATION:\r\n return getFixAdDestinationTable(recommendations);\r\n case RECOMMENDATION_TYPES.FIX_AD_TEXT:\r\n return getFixAdTextTable(recommendations);\r\n case RECOMMENDATION_TYPES.MULTIMEDIA_ADS:\r\n return getMultiMediaAdsTable(recommendations);\r\n case RECOMMENDATION_TYPES.IMAGE_EXTENSION:\r\n return getImageExtensionTable(recommendations);\r\n case RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS:\r\n return getRepairMissingKeywordParamsTable(recommendations);\r\n case RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID:\r\n return getFixNoImpressionBidTable(recommendations);\r\n case RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER:\r\n return getRepairUntargetedOfferTable(recommendations);\r\n case RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS:\r\n return getImproveMultiMediaAdsTable(recommendations);\r\n case RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION:\r\n return getSSC2PMaxMigrationTable(recommendations);\r\n case RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION:\r\n return getDSA2PMaxMigrationTable(recommendations);\r\n case RECOMMENDATION_TYPES.SYNDICATION_GAP:\r\n return getSyndicationGapTable(recommendations);\r\n case RECOMMENDATION_TYPES.GOOGLE_IMPORT:\r\n case RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED:\r\n case RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS:\r\n case RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL:\r\n case RECOMMENDATION_TYPES.FACEBOOK_IMPORT:\r\n case RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS:\r\n case RECOMMENDATION_TYPES.PMAX_IMPORT:\r\n return null;\r\n default:\r\n throw new Error(`Not Implemented: ${type}`);\r\n }\r\n};\r\n// #endregion visualData\r\n\r\nconst getGridData = (opportunities) => {\r\n let gridData;\r\n const topOpportunity = opportunities[0];\r\n if (topOpportunity) {\r\n gridData = Object.assign(topOpportunity, gridData);\r\n }\r\n return gridData;\r\n};\r\n\r\nconst getRecommendationWithDetails = (type, recommendation) => {\r\n const sortedRecommendation = sortOpportunitiesInRecommendation(recommendation, type);\r\n const recommendedOpportunity = getRecommendedOpportunity(sortedRecommendation);\r\n const data = getRecommendation(type, recommendedOpportunity);\r\n const visualData = getDetailsVisualData(type, sortedRecommendation);\r\n\r\n let estimates;\r\n if (type === RECOMMENDATION_TYPES.BUDGET ||\r\n type === RECOMMENDATION_TYPES.NEW_KEYWORD || // deprecated in Oct 2023\r\n type === RECOMMENDATION_TYPES.SYNDICATION) {\r\n estimates = getEstimates(type, recommendedOpportunity);\r\n }\r\n\r\n const currentBidAdjustmentPercent = recommendedOpportunity.CurrentBidBoost;\r\n const imprShareCurrent = recommendedOpportunity.CurSelfImprShare;\r\n const costCurrent = recommendedOpportunity.CurrentCost;\r\n const bidCurrent = recommendedOpportunity.CurrentBid;\r\n const targetGroupId = recommendedOpportunity.TargetGroupId;\r\n\r\n const opportunities = _.map(\r\n sortedRecommendation.Opportunities,\r\n rawOpportunity => getOpportunity(\r\n type,\r\n rawOpportunity,\r\n sortedRecommendation.DefaultOpportunityId\r\n )\r\n );\r\n\r\n const gridData = getGridData(opportunities);\r\n\r\n return _.extend(\r\n data,\r\n {\r\n visualData,\r\n opportunities,\r\n estimates,\r\n currentBidAdjustmentPercent,\r\n imprShareCurrent,\r\n costCurrent,\r\n bidCurrent,\r\n targetGroupId,\r\n gridData,\r\n }\r\n );\r\n};\r\n\r\nconst getRecommendationSample = ({\r\n type,\r\n rawSummary: {\r\n Samples,\r\n Recommendations,\r\n },\r\n estimates,\r\n}) => {\r\n const topRecommendation = sortOpportunitiesInRecommendation(Recommendations[0], type);\r\n const recommendedOpportunity = getRecommendedOpportunity(topRecommendation);\r\n\r\n const data = getRecommendation(type, recommendedOpportunity);\r\n\r\n const actions = getActionData(\r\n type,\r\n topRecommendation,\r\n recommendedOpportunity\r\n );\r\n\r\n const visualData = getSampleVisualData({\r\n type,\r\n topRecommendation,\r\n recommendations: Recommendations,\r\n primaryEstimate: estimates && estimates.primaryEstimate,\r\n rawSamples: Samples,\r\n });\r\n\r\n return _.extend(\r\n data,\r\n {\r\n actions,\r\n visualData,\r\n }\r\n );\r\n};\r\n\r\n/**\r\n * Normalize AdInsight Recommendation MT response\r\n * 1. extract useful fields\r\n * 2. calculate, transform, sort data\r\n * @param {Object} rawData - rawData from MT.\r\n * @param {boolean} withDetails - process recommendations data or not\r\n * @returns {Object} An object of all processed data, key is the type\r\n */\r\nexport const normalize = (rawData, withDetails = false) => {\r\n const hasDismissedSummaries =\r\n rawData.DismissTabSummaries && rawData.DismissTabSummaries.length > 0;\r\n const dismissedSummaries = hasDismissedSummaries ? _.map(rawData.DismissTabSummaries, (e) => {\r\n e.Category = 'Dismissed';\r\n return e;\r\n }) : [];\r\n const filteredSummaries = _.filter(rawData.value, e => (\r\n e.RecommendationsCount !== 0 && !TOP_POSITION_RECOMMENDATION_TYPES.includes(e.OpportunityType)));\r\n const topPositionSummaries = _.filter(rawData.value, e => TOP_POSITION_RECOMMENDATION_TYPES.includes(e.OpportunityType));\r\n\r\n const summaries = _.map([topPositionSummaries, filteredSummaries, dismissedSummaries], rawSummaries =>\r\n _.map(rawSummaries, (rawSummary) => {\r\n // static properties\r\n const category = rawSummary.Category;\r\n const type = rawSummary.OpportunityType;\r\n const level = rawSummary.AggregateLevel;\r\n const recommendationsCount = rawSummary.RecommendationsCount;\r\n const opportunityCount = rawSummary.OpportunitiesCount;\r\n const version = rawSummary.Version;\r\n const coupon = rawSummary.Coupon;\r\n const accounts = rawSummary.Accounts;\r\n const optimizationScore = rawSummary.ScoreUpLift;\r\n const isNrt = rawSummary.IsNrt;\r\n const statusId = rawSummary.StatusId;\r\n const hasAIAssetRecommendation = rawSummary.HasAIAssetRecommendationCount ?\r\n rawSummary.HasAIAssetRecommendationCount > 0 : undefined;\r\n const isAutoApplyOptIn = rawSummary.IsAutoApplyOptIn\r\n && category !== RECOMMENDATION_CATEGORIES.DISMISSED;\r\n const thirdPartyInfos = rawSummary.ThirdPartyInfos ? rawSummary.ThirdPartyInfos : undefined;\r\n\r\n // calculated properties\r\n const estimates = getEstimates(type, rawSummary);\r\n const sample = getRecommendationSample({\r\n type,\r\n rawSummary,\r\n estimates,\r\n });\r\n const recommendations = withDetails && _.map(\r\n rawSummary.Recommendations,\r\n rawRecommendation => getRecommendationWithDetails(type, rawRecommendation)\r\n );\r\n\r\n const isHighConverting = type === RECOMMENDATION_TYPES.COMPETITIVE_BID && _.every(\r\n rawSummary.Recommendations,\r\n recommendation => recommendation.Opportunities[0].IsHighConverting\r\n );\r\n\r\n const isSeasonal = _.contains(BUDGET_OPPORTUNITY_TYPES, type) &&\r\n ((rawSummary.Recommendations[0].Opportunities[0].TrackId & SEASONAL_TRACKID) != 0) && // eslint-disable-line\r\n !_.isEmpty(rawSummary.Recommendations[0].Opportunities[0].SeasonalEvents);\r\n\r\n const isFeedbackPersonalized = rawSummary.IsFeedbackPersonalized;\r\n const seasonalEntity = {\r\n seasonalEvent: rawSummary.Samples,\r\n sources: rawSummary.Sources,\r\n };\r\n\r\n let optInStatus;\r\n let applyDate;\r\n if (type === RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS) {\r\n optInStatus = rawSummary.IsOptIn;\r\n applyDate = rawSummary.NearestApplyDate || 0;\r\n } else if (type === RECOMMENDATION_TYPES.MULTIMEDIA_ADS ||\r\n _.contains(SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES, type)) {\r\n optInStatus = rawSummary.AarOptInRecommendationCount > 0;\r\n applyDate = rawSummary.AarNearestApplyDate;\r\n }\r\n\r\n const summary = _.extend(\r\n {\r\n category,\r\n type,\r\n level,\r\n recommendationsCount,\r\n opportunityCount,\r\n estimates,\r\n sample,\r\n isHighConverting,\r\n isSeasonal,\r\n version,\r\n optInStatus: optInStatus && category !== RECOMMENDATION_CATEGORIES.DISMISSED,\r\n applyDate,\r\n accounts,\r\n optimizationScore,\r\n isNrt,\r\n statusId,\r\n hasAIAssetRecommendation,\r\n isFeedbackPersonalized,\r\n isAutoApplyOptIn,\r\n seasonalEntity,\r\n thirdPartyInfos,\r\n },\r\n recommendations && { recommendations },\r\n coupon && { coupon }\r\n );\r\n\r\n return [\r\n type,\r\n summary,\r\n ];\r\n }));\r\n\r\n return _.defaults({}, _.object(summaries[0]), _.object(summaries[1]), hasDismissedSummaries ?\r\n { Dismissed: _.object(summaries[2]) } : {});\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\n\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\n\r\nimport { normalize } from '../normalize-data';\r\nimport { getPreferences, isCompetition } from '../util';\r\nimport {\r\n VIEW_TYPES,\r\n CHANNEL_TYPES,\r\n COMPETITION_SUMMARY_TOP_NUMBER,\r\n RECOMMENDATION_SUMMARY_TOP_NUMBER,\r\n CampaignType,\r\n RECOMMENDATION_TYPES,\r\n} from '../consts';\r\n\r\nexport const withGetSummary = (\r\n withDetails,\r\n needExamples = true\r\n) => (WrappedComponent) => {\r\n class HoC extends React.Component {\r\n static displayName = `withGetSummary(${getDisplayName(WrappedComponent)})`;\r\n\r\n static propTypes = {\r\n type: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\r\n viewType: PropTypes.string,\r\n recommendationType: PropTypes.string,\r\n channel: PropTypes.string.isRequired,\r\n campaignType: PropTypes.number,\r\n categoryType: PropTypes.string,\r\n dataService: PropTypes.shape({\r\n getSummary: PropTypes.func.isRequired,\r\n }).isRequired,\r\n /**\r\n * element to be covered by uiblocker when loading data.\r\n */\r\n el: PropTypes.string.isRequired,\r\n filterService: PropTypes.objectOf(PropTypes.any),\r\n /**\r\n * page size information is stored in preference under preferencesName.\r\n */\r\n preferencesName: PropTypes.string,\r\n deps: PropTypes.shape({\r\n preferencesService: PropTypes.objectOf(PropTypes.any),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n }),\r\n vnextDeps: PropTypes.shape({\r\n eventDispatcher: PropTypes.objectOf(PropTypes.any),\r\n }),\r\n defaultPageSize: PropTypes.number,\r\n defaultPageNumber: PropTypes.number,\r\n /**\r\n * this is default options for reload. It will use this to do first reload in mount.\r\n * For explicit call of reload, this can be overidden by argument.\r\n */\r\n defaultOptions: PropTypes.objectOf(PropTypes.any),\r\n perfMarker: PropTypes.shape({\r\n willInit: PropTypes.func.isRequired,\r\n willFetchData: PropTypes.func.isRequired,\r\n willRender: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n createChild: PropTypes.func.isRequired,\r\n }),\r\n withBlocker: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n campaignType: null,\r\n type: null,\r\n viewType: null,\r\n recommendationType: null,\r\n preferencesName: null,\r\n deps: null,\r\n defaultPageSize: null,\r\n defaultPageNumber: null,\r\n defaultOptions: {},\r\n filterService: null,\r\n perfMarker: {\r\n willInit: _.noop,\r\n willFetchData: _.noop,\r\n willRender: _.noop,\r\n done: _.noop,\r\n createChild() {\r\n return this;\r\n },\r\n },\r\n withBlocker: true,\r\n categoryType: '',\r\n vnextDeps: null,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.perfMarkerDone = false;\r\n this.eventDispatcherDone = false;\r\n }\r\n\r\n state = {\r\n data: {},\r\n campaignAdGroups: null,\r\n };\r\n\r\n componentDidMount = () => {\r\n // In account level recommendation detail page, it doesn't need to call summary Odata.\r\n // Because category information is included in detail Odata resposne already.\r\n if (this.props.channel === CHANNEL_TYPES.RECOMMENDATION\r\n && this.props.viewType === VIEW_TYPES.DETAILS) {\r\n this.props.perfMarker.willFetchData();\r\n } else {\r\n this.reload(this.props.defaultOptions);\r\n }\r\n };\r\n\r\n componentDidUpdate = (prevProps, prevState) => {\r\n // We only care the first render after data first turn non null\r\n if (_.isEqual(prevState.data, {})) {\r\n if (this.props.perfMarker\r\n && (this.props.channel === CHANNEL_TYPES.RECOMMENDATION\r\n || this.props.channel === CHANNEL_TYPES.MCCRECOMMENDATION)\r\n && !this.perfMarkerDone) {\r\n this.perfMarkerDone = true;\r\n this.props.perfMarker.done();\r\n }\r\n if (this.props.viewType !== VIEW_TYPES.DETAILS &&\r\n !_.isNull(this.props.vnextDeps) &&\r\n !_.isUndefined(this.props.vnextDeps.eventDispatcher)) {\r\n this.props.vnextDeps.eventDispatcher.trigger('recommendation_view_loaded');\r\n }\r\n }\r\n };\r\n\r\n componentWillUnmount = () => {\r\n this.cancel();\r\n };\r\n\r\n setData = (data, campaignAdGroups, setDataFromDetails) => {\r\n setDataFromDetails();\r\n if (_.isEqual(this.state.data, {})) {\r\n this.setState({\r\n data: normalize(data, withDetails),\r\n // Gained, Dismissed, Available\r\n overallOptimizationScoreBar: data.OverallOptimizationScoreBar,\r\n // [ScoreUpLift, Category]\r\n categoryScoreUpLifts: data.CategoryScoreUpLifts,\r\n availableCategories: data.AvailableCategories,\r\n campaignAdGroups,\r\n });\r\n }\r\n };\r\n\r\n hasLoadToken = () => !_.isUndefined(this.loadToken);\r\n\r\n reload = (op = {}) => {\r\n this.cancel();\r\n\r\n _.defaults(op, this.props.defaultOptions);\r\n\r\n const {\r\n type,\r\n viewType,\r\n recommendationType,\r\n channel,\r\n campaignType,\r\n dataService,\r\n filterService,\r\n preferencesName,\r\n deps,\r\n defaultPageNumber,\r\n defaultPageSize,\r\n categoryType,\r\n } = this.props;\r\n\r\n let top = 5;\r\n if (needExamples) {\r\n top = isCompetition(type) ?\r\n COMPETITION_SUMMARY_TOP_NUMBER :\r\n RECOMMENDATION_SUMMARY_TOP_NUMBER;\r\n }\r\n const topOption = withDetails ? {} : { top };\r\n const preferencesService = deps && deps.preferencesService;\r\n\r\n const input = _.compact([\r\n filterService && filterService.p$Initialized,\r\n preferencesService && preferencesService.initialize(),\r\n ]);\r\n Promise.all(input)\r\n .spread(() => {\r\n let where = null;\r\n let pagination = {};\r\n\r\n if (filterService) {\r\n const filterQuery = filterService.getCombinedFilter();\r\n where = filterQuery.query;\r\n }\r\n\r\n if (preferencesName && preferencesService) {\r\n const preferences = getPreferences(preferencesService, preferencesName);\r\n this.pageSize = _.isNumber(preferences.pageSize) ?\r\n preferences.pageSize : defaultPageSize;\r\n this.pageNumber = _.isNumber(op.pageNumber) ? op.pageNumber : defaultPageNumber;\r\n pagination = {\r\n top: this.pageSize,\r\n skip: this.pageNumber * this.pageSize,\r\n };\r\n }\r\n\r\n const shouldShowAlertHandler = viewType !== VIEW_TYPES.SUMMARY ||\r\n channel === CHANNEL_TYPES.COMPETITION;\r\n\r\n const options = _.defaults({}, topOption, {\r\n type,\r\n recommendationType,\r\n channel,\r\n campaignType,\r\n where,\r\n scope: op.scope,\r\n isFromApplyOrDismiss: op.isFromApplyOrDismiss,\r\n shouldShowAlertHandler,\r\n categoryType,\r\n }, pagination);\r\n\r\n if (this.props.perfMarker) {\r\n this.props.perfMarker.willFetchData();\r\n }\r\n\r\n this.loadToken = createAsyncToken(dataService\r\n .getSummary(options).finally(this.props.withBlocker ?\r\n withUiBlock(\r\n $(this.props.el),\r\n this.props.deps.i18n.getString('loadingText'),\r\n true, // shouldFocus\r\n null, // delayedLoading\r\n '1000' // overlayZIndex\r\n ) : _.noop))\r\n .on({\r\n onSuccess: ({\r\n data,\r\n campaignAdGroups,\r\n }) => {\r\n if (this.props.perfMarker) {\r\n this.props.perfMarker.willRender();\r\n }\r\n this.setState({\r\n data: normalize(data, withDetails),\r\n // Gained, Dismissed, Available\r\n overallOptimizationScoreBar: data.OverallOptimizationScoreBar,\r\n // [ScoreUpLift, Category]\r\n categoryScoreUpLifts: data.CategoryScoreUpLifts,\r\n availableCategories: data.AvailableCategories,\r\n campaignAdGroups,\r\n hasFilter: !_.isEmpty(where),\r\n });\r\n },\r\n });\r\n });\r\n };\r\n\r\n cancel = () => {\r\n if (this.loadToken) {\r\n this.loadToken.cancel();\r\n }\r\n };\r\n\r\n render = () => {\r\n // eslint-disable-next-line max-len\r\n if (this.props.viewType !== VIEW_TYPES.DETAILS && _.isEqual(this.state.data, {}) && !this.hasLoadToken()) {\r\n return null;\r\n }\r\n const {\r\n data: normalizedData,\r\n overallOptimizationScoreBar,\r\n categoryScoreUpLifts,\r\n campaignAdGroups,\r\n hasFilter,\r\n availableCategories,\r\n } = this.state;\r\n\r\n if (this.props.viewType === VIEW_TYPES.DETAILS && this.eventDispatcherDone) {\r\n if (this.props.perfMarker) {\r\n this.props.perfMarker.willRender();\r\n }\r\n }\r\n\r\n if (!this.eventDispatcherDone &&\r\n this.props.viewType === VIEW_TYPES.DETAILS &&\r\n !_.isNull(this.props.vnextDeps) &&\r\n !_.isUndefined(this.props.vnextDeps.eventDispatcher)) {\r\n this.eventDispatcherDone = true;\r\n this.props.vnextDeps.eventDispatcher.trigger('recommendation_view_loaded');\r\n }\r\n let data = _.omit(normalizedData, 'Dismissed');\r\n let dismissedData = normalizedData.Dismissed || {};\r\n // Remove DSA recommendations for PMAX campaigns\r\n if (this.props.campaignType === CampaignType.PerformanceMax) {\r\n data = _.omit(data, RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS);\r\n dismissedData = _.omit(dismissedData, RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS);\r\n }\r\n return ();\r\n };\r\n }\r\n\r\n return hoistNonReactStatics(HoC, WrappedComponent);\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\n\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\n\r\nexport const withGetCount = (WrappedComponent) => {\r\n class HoC extends React.Component {\r\n static displayName = `withGetCount(${getDisplayName(WrappedComponent)})`;\r\n\r\n static propTypes = {\r\n channel: PropTypes.string.isRequired,\r\n campaignType: PropTypes.number,\r\n dataService: PropTypes.shape({\r\n getCount: PropTypes.func.isRequired,\r\n }).isRequired,\r\n /**\r\n * element to be covered by uiblocker when loading data.\r\n */\r\n el: PropTypes.string.isRequired,\r\n isGetCountByCampaignAdGroups: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n campaignType: null,\r\n isGetCountByCampaignAdGroups: false,\r\n }\r\n\r\n state = {\r\n data: null,\r\n };\r\n\r\n componentDidMount = () => {\r\n this.reload();\r\n };\r\n\r\n componentWillUnmount = () => {\r\n this.cancel();\r\n };\r\n\r\n reload = () => {\r\n this.cancel();\r\n\r\n const {\r\n channel,\r\n campaignType,\r\n dataService,\r\n isGetCountByCampaignAdGroups,\r\n } = this.props;\r\n\r\n const options = _.defaults({}, { channel, campaignType });\r\n this.loadToken = isGetCountByCampaignAdGroups ?\r\n createAsyncToken(dataService\r\n .getCountByCampaignAdGroups(this.props))\r\n .on({\r\n onSuccess: ({\r\n data,\r\n }) => {\r\n this.setState({ data });\r\n },\r\n })\r\n : createAsyncToken(dataService\r\n .getCount(options)\r\n .finally(withUiBlock($(this.props.el))))\r\n .on({\r\n onSuccess: ({\r\n data,\r\n }) => {\r\n this.setState({ data });\r\n },\r\n });\r\n };\r\n\r\n cancel = () => {\r\n if (this.loadToken) {\r\n this.loadToken.cancel();\r\n }\r\n };\r\n\r\n render = () => {\r\n if (this.state.data === null) return null;\r\n\r\n return ();\r\n };\r\n }\r\n\r\n return hoistNonReactStatics(HoC, WrappedComponent);\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport $ from 'jquery';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\n\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n APPLY_SETTINGS,\r\n APPLY_ACTION_TYPES\r\n} from '../consts';\r\n\r\nexport const withTrack = withAll => (WrappedComponent) => {\r\n class WithTrack extends React.Component {\r\n static propTypes = {\r\n dataService: PropTypes.shape({\r\n track: PropTypes.func,\r\n stopStatusPoll: PropTypes.func,\r\n }),\r\n callback: PropTypes.func,\r\n /**\r\n * HTML element that will be the target of a UI blocker\r\n */\r\n el: PropTypes.string,\r\n forwardedRef: PropTypes.func,\r\n };\r\n\r\n static defaultProps = {\r\n forwardedRef: null,\r\n dataService: {\r\n track: _.noop,\r\n stopStatusPoll: _.noop,\r\n },\r\n callback: _.noop,\r\n el: undefined,\r\n };\r\n\r\n componentWillUnmount = () => {\r\n this.cancel();\r\n };\r\n\r\n track = (op) => {\r\n this.cancel();\r\n\r\n const {\r\n dataService, el,\r\n } = this.props;\r\n\r\n let settings = null;\r\n if (withAll && _.contains([\r\n RECOMMENDATION_TYPES.DEVICE_BID_BOOST,\r\n RECOMMENDATION_TYPES.LOCATION_BID_BOOST], op.type) && op.applyOpportunitiesLevel) {\r\n settings = {\r\n '@odata.type': APPLY_SETTINGS.DEFAULT,\r\n ApplyOpportunitiesLevel: op.applyOpportunitiesLevel,\r\n };\r\n }\r\n\r\n const options = _.extend(\r\n {}, {\r\n withAll:\r\n op.userAction === APPLY_ACTION_TYPES.ACCEPT &&\r\n op.type === RECOMMENDATION_TYPES.IMAGE_EXTENSION ?\r\n false : withAll,\r\n closeUiBlock: withUiBlock($(el)),\r\n }, settings && { settings },\r\n _.pick(\r\n op,\r\n 'type',\r\n 'channel',\r\n 'userInputs',\r\n 'campaignAdGroups',\r\n 'userAction',\r\n 'reason',\r\n 'context',\r\n 'guid',\r\n 'from',\r\n 'handleRecommendationNotification',\r\n 'viewDetails',\r\n 'view',\r\n 'showAsyncApplyModal',\r\n 'totalRecommendationCount',\r\n 'closeAsyncApplyModal',\r\n 'isOptimizationScoreUsed',\r\n 'optimizationScore'\r\n )\r\n );\r\n\r\n this.loadToken = createAsyncToken(dataService\r\n .track(options))\r\n .on({\r\n onSuccess: () => {\r\n this.props.callback(op);\r\n },\r\n onCancel: () => {\r\n dataService.stopStatusPoll();\r\n },\r\n });\r\n };\r\n\r\n cancel = () => {\r\n if (this.loadToken) {\r\n this.loadToken.cancel();\r\n }\r\n };\r\n\r\n render = () => {\r\n const rest = _.omit(this.props, 'forwardedRef');\r\n\r\n return ();\r\n };\r\n }\r\n\r\n return React.forwardRef((props, ref) => );\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { createAsyncToken } from '@bingads-webui-universal/primitive-utilities';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport _ from 'underscore';\r\n\r\nimport {\r\n CHANNEL_ALL_RECOMMENDATIONS,\r\n CHANNEL_TYPES,\r\n FAC_RECOMENDATIONTYPE_FEATUREID_MAPPING,\r\n} from '../consts';\r\n\r\nexport const withCoupon = (WrappedComponent) => {\r\n class HoC extends React.Component {\r\n static displayName = `withCoupon(${getDisplayName(WrappedComponent)})`;\r\n\r\n static propTypes = {\r\n defaultOptions: PropTypes.objectOf(PropTypes.any),\r\n dataService: PropTypes.shape({\r\n getSummary: PropTypes.func.isRequired,\r\n }).isRequired,\r\n data: PropTypes.shape(_.reduce(\r\n CHANNEL_ALL_RECOMMENDATIONS[CHANNEL_TYPES.RECOMMENDATION],\r\n recommendation => ({\r\n [recommendation]: PropTypes.object,\r\n }),\r\n {}\r\n )),\r\n };\r\n\r\n static defaultProps = {\r\n defaultOptions: {},\r\n data: {},\r\n }\r\n\r\n state = {\r\n rawCouponData: null,\r\n };\r\n\r\n componentDidMount = () => {\r\n if (_.isNull(this.state.rawCouponData)\r\n && _.any(\r\n this.props.data,\r\n rec => _.has(FAC_RECOMENDATIONTYPE_FEATUREID_MAPPING, rec.type)\r\n )) {\r\n this.reload();\r\n }\r\n };\r\n\r\n componentWillUnmount = () => {\r\n this.cancel();\r\n };\r\n\r\n reload = () => {\r\n this.cancel();\r\n\r\n const {\r\n defaultOptions,\r\n dataService,\r\n } = this.props;\r\n\r\n this.loadToken = createAsyncToken(dataService\r\n .getCoupon(defaultOptions))\r\n .on({\r\n onSuccess: (rawCouponData) => {\r\n this.setState({\r\n rawCouponData,\r\n });\r\n },\r\n });\r\n };\r\n\r\n cancel = () => {\r\n if (this.loadToken) {\r\n this.loadToken.cancel();\r\n }\r\n };\r\n\r\n render = () => ();\r\n }\r\n\r\n return hoistNonReactStatics(HoC, WrappedComponent);\r\n};\r\n","import _ from 'underscore';\r\nimport { parseSync, stringifySync } from '@bingads-webui/safe-json';\r\nimport * as downloadServiceSharedComponent from '@bingads-webui/download-service';\r\nimport {\r\n InlineDownloadReportDataRepository\r\n} from '@bingads-webui-campaign/inline-download-report-data-repository';\r\n\r\nimport {\r\n NOT_SUPPORT_DOWNLOAD_TYPES,\r\n SUPPORTED_CAMPAIGN_TYPES,\r\n} from '../consts';\r\nimport { getRecommendationTypes } from '../util';\r\n\r\n/**\r\n * Service responsible for creating a download repository object and crafting the download request\r\n * to POST to odata.\r\n */\r\nexport class RecommendationDownloadService {\r\n constructor({\r\n scope,\r\n alertCenter,\r\n asyncScheduler,\r\n cacheManager,\r\n currentActivity,\r\n downloadService = downloadServiceSharedComponent,\r\n getODataErrors,\r\n i18n,\r\n odata,\r\n pageContext,\r\n permissions,\r\n isMCC = false,\r\n recommendationService = null,\r\n }) {\r\n this.repository = new InlineDownloadReportDataRepository({\r\n deps: {\r\n alertCenter,\r\n asyncScheduler,\r\n cacheManager,\r\n downloadService,\r\n getODataErrors,\r\n i18n,\r\n odata,\r\n pageContext,\r\n },\r\n isCustomerLevel: isMCC,\r\n currentActivity,\r\n });\r\n\r\n this.pageContext = pageContext;\r\n this.permissions = permissions;\r\n this.scope = scope;\r\n this.isMCC = isMCC;\r\n this.recommendationService = recommendationService;\r\n\r\n if (currentActivity) {\r\n this.currentActivity = currentActivity;\r\n this.currentActivity.trace('Initialized RecommendationDownloadService', 'RecommendationDownloadService/constructor');\r\n }\r\n }\r\n\r\n /**\r\n * Creates a download request and POSTS to odata, asynchronously polls for the status of the\r\n * request and initiates the browser download after the file has been generated.\r\n * @param {Object} [options.filterService] - Filter service library used to get combined filter.\r\n * @param {string} [options.recommendationType] - recommendation type\r\n * @param {string} [options.channel] - channel for competition or recommendation\r\n * @returns {Promise} Resolves to true if the download was successful.\r\n */\r\n download({\r\n filterService,\r\n recommendationType,\r\n campaignType,\r\n channel,\r\n }) {\r\n const ReportColumns = _.difference(\r\n getRecommendationTypes(\r\n recommendationType,\r\n channel,\r\n this.permissions,\r\n this.isMCC\r\n ),\r\n NOT_SUPPORT_DOWNLOAD_TYPES\r\n );\r\n\r\n const {\r\n CultureLcid,\r\n CurrentCustomer: {\r\n Id: CustomerId,\r\n },\r\n CurrentAccount: {\r\n Id: AccountId,\r\n AccountNumber,\r\n },\r\n } = this.pageContext;\r\n\r\n let { CurrentCampaign, CurrentAdGroup } = this.pageContext;\r\n CurrentCampaign = this.scope && this.scope.campaignId ? { Id: this.scope.campaignId } : null;\r\n CurrentAdGroup = this.scope && this.scope.adGroupId ?\r\n { Id: this.scope.adGroupId, CampaignId: this.scope.campaignId } : null;\r\n\r\n const query = filterService && filterService.getCombinedFilter().query;\r\n const CampaignReportScopes = this.getCampaignReportScopes(AccountId, CurrentCampaign, query);\r\n const AdGroupReportScopes = this.getAdGroupReportScopes(AccountId, CurrentAdGroup, query);\r\n\r\n if (this.isMCC && !_.isNull(this.recommendationService)) {\r\n return this.recommendationService.download(ReportColumns, channel);\r\n }\r\n return this.repository.download({\r\n Name: 'RecommendationsDownload',\r\n Type: 'RecommendationsDownload',\r\n ReportType: 'Recommendations',\r\n Channel: channel,\r\n CampaignTypeId: _.contains(SUPPORTED_CAMPAIGN_TYPES, campaignType) ? campaignType : null,\r\n AccountNumber,\r\n ReportColumns,\r\n Format: 'Xlsx',\r\n ReportTime: {\r\n DateRangePreset: 'AllTime',\r\n StartDate: null,\r\n EndDate: null,\r\n },\r\n CustomerId,\r\n AccountIds: [AccountId],\r\n CampaignReportScopes,\r\n AdGroupReportScopes,\r\n LCID: CultureLcid,\r\n }).catch((err) => {\r\n const errorDetails = `ErrorCode=${err.status}, Error=${stringifySync(err)}`;\r\n\r\n if (this.currentActivity) {\r\n this.currentActivity.error(`err in download, ${errorDetails}`, 'RecommendationDownloadService/Download');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Creates an array of CampaignReportScope objects that specify the Campaigns to filter on.\r\n * @param {number} AccountId - Account Id.\r\n * @param {Object} CurrentCampaign - Current campaign scope.\r\n * @param {Object} query - Filter query that contains an array of JSON strings that describe the\r\n * campaigns to filter on.\r\n * @returns {Object[]} Campaigns to filter or empty array.\r\n */\r\n getCampaignReportScopes(AccountId, CurrentCampaign, query) {\r\n // if wunderbar scope has been set, ignore filter\r\n if (_.has(CurrentCampaign, 'Id')) {\r\n return [{ CampaignId: CurrentCampaign.Id, AccountId }];\r\n }\r\n\r\n const filteredCampaigns = query && query.Campaign && query.Campaign.$contains;\r\n\r\n return _.map(filteredCampaigns, (str) => {\r\n const campaign = parseSync(str);\r\n return campaign && {\r\n CampaignId: campaign.Id,\r\n AccountId,\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Creates an array of AdGroupReportScope objects that specify the ad groups to filter on.\r\n * @param {number} AccountId - Account Id.\r\n * @param {Object} CurrentAdGroup - Current ad group scope.\r\n * @param {Object} query - Filter query that contains an array of JSON strings that describe the\r\n * ad groups to filter on.\r\n * @returns {Object[]} Ad groups to filter or empty array.\r\n */\r\n getAdGroupReportScopes(AccountId, CurrentAdGroup, query) {\r\n // if wunderbar scope has been set, ignore filter\r\n if (_.has(CurrentAdGroup, 'Id') && _.has(CurrentAdGroup, 'CampaignId')) {\r\n return [{ AdGroupId: CurrentAdGroup.Id, CampaignId: CurrentAdGroup.CampaignId, AccountId }];\r\n }\r\n\r\n const filteredAdGroups = query && query.AdGroup && query.AdGroup.$contains;\r\n\r\n return _.map(filteredAdGroups, (str) => {\r\n const adGroup = parseSync(str);\r\n return adGroup && {\r\n AdGroupId: adGroup.Id,\r\n CampaignId: adGroup.CampaignId,\r\n AccountId,\r\n };\r\n });\r\n }\r\n}\r\n","import Promise from 'bluebird';\r\n\r\nconst MAX_POLL_ATTEMPTS = 120;\r\nconst POLL_INTERVAL_TIMEOUT = 5000;\r\n\r\nexport class PollTask {\r\n /**\r\n * Create a poll task\r\n * @param {Function} task - task need to be polled\r\n * @param {Function} isCompleted - Function to check if task completed.\r\n * @param {Function} isFailed - Function to check if task failed.\r\n * @param {Object} asyncScheduler - asyncScheduler library.\r\n * @param {number} maxPollCount - Max number of times to poll.\r\n * @param {number} pollIntervalTimeout - poll interval\r\n * @returns {Promise} Resolves to the rawData of apply result.\r\n */\r\n constructor(\r\n task,\r\n isCompleted,\r\n isFailed,\r\n asyncScheduler,\r\n maxPollCount = MAX_POLL_ATTEMPTS,\r\n pollIntervalTimeout = POLL_INTERVAL_TIMEOUT\r\n ) {\r\n this.pollCount = 0;\r\n this.maxPollCount = maxPollCount;\r\n\r\n // Define task and event handler\r\n this.recurringTask = asyncScheduler.createTask({\r\n task,\r\n schedule: pollIntervalTimeout,\r\n });\r\n this.isCompleted = isCompleted;\r\n this.isFailed = isFailed;\r\n }\r\n\r\n start = () => new Promise((resolve, reject) => {\r\n this.recurringTask.on('success', ({\r\n data,\r\n stopTask,\r\n }) => {\r\n this.pollCount += 1;\r\n if (this.pollCount > this.maxPollCount) {\r\n stopTask();\r\n reject(new Error('Poll Limit Reached'));\r\n return;\r\n }\r\n\r\n if (data) {\r\n if (this.isCompleted(data)) {\r\n stopTask();\r\n resolve(data);\r\n } else if (this.isFailed(data)) {\r\n stopTask();\r\n reject(new Error('Internal Error'));\r\n }\r\n }\r\n });\r\n\r\n this.recurringTask.on('error', ({\r\n error,\r\n stopTask,\r\n }) => {\r\n stopTask();\r\n reject(error);\r\n });\r\n\r\n this.recurringTask.on('manuallyStopped', () => {\r\n resolve();\r\n });\r\n\r\n this.recurringTask.start();\r\n })\r\n\r\n stop = () => {\r\n this.recurringTask.stop();\r\n this.recurringTask.trigger('manuallyStopped');\r\n }\r\n}\r\n","const cache = {};\r\n\r\nexport const setRecommendationCache = (key, value) => {\r\n cache[key] = value;\r\n};\r\n\r\nexport const getRecommendationCache = (key) => {\r\n if (typeof key === 'string') {\r\n return cache[key];\r\n }\r\n return undefined;\r\n};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\n\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\nimport { stringifySync } from '@bingads-webui/safe-json';\r\nimport { Constants as CCUIConstants } from '@bingads-webui-clientcenter/entity-utils';\r\nimport * as downloadService from '@bingads-webui/download-service';\r\n\r\nimport {\r\n getFilteredEntitiesAndUpdateOptions,\r\n handleUnauthorizedResponse,\r\n} from '@bingads-webui-campaign/auction-insight-service';\r\nimport { withDFMCache } from '@bingads-webui/dfm-cache';\r\n\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n SUPPORTED_CAMPAIGN_TYPES,\r\n TASK_STATUS,\r\n APPLY_ODATA_TYPES_MAP,\r\n FAC_RECOMMENDATION_CONFIG,\r\n FAC_RECOMENDATIONTYPE_FEATUREID_MAPPING,\r\n CHANNEL_TYPES,\r\n APPLY_ACTION_TYPES,\r\n NOT_SUPPORT_DOWNLOAD_TYPES,\r\n RECOMMENDATION_CATEGORIES,\r\n SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES,\r\n INLIE_APPLY_ERROR_SUPPORT_TYPES,\r\n MCC_ACCOUNTS_CAPPING,\r\n} from '../consts';\r\n\r\nimport {\r\n getRecommendationIds,\r\n getRecommendationTypes,\r\n isCompetition,\r\n isDFMEnabled,\r\n} from '../util';\r\n\r\nimport {\r\n PollTask,\r\n} from '../poll';\r\n\r\nimport {\r\n formatPercentOneDecimal,\r\n} from '../formatter/basic-format-data';\r\n\r\nimport {\r\n setRecommendationCache,\r\n getRecommendationCache,\r\n} from '../cache';\r\n\r\nlet overallOptimizationScoreBar = {};\r\nlet applyNotificationInfo = { message: '', failedRecommendationCount: 0, userAction: '' };\r\nconst urlPrefix = 'AdInsight/V2/Customers({cid})/Accounts({aid})';\r\nconst urlPrefixMCC = 'AdInsight/V2/Customers({cid})';\r\nconst getSummaryAPI = `${urlPrefix}/Recommendation.GetRecSummaryData?$expand=Recommendations({top}{skip}{orderby}$expand=Opportunities)`;\r\nconst getSummaryTypeOnly = `${urlPrefix}/Recommendation.GetRecSummaryData`;\r\nconst getSummaryAPIOptimizationScoreNoExpand = `${urlPrefix}/Recommendation.GetRecSummaryDataWithOptimizationScore`;\r\nconst getSummaryAPIOptimizationScore = `${urlPrefix}/Recommendation.GetRecSummaryDataWithOptimizationScore?$expand=Summaries($expand=Recommendations({top}{skip}{orderby}$expand=Opportunities))`;\r\nconst getSummaryAPIOptimizationScoreWithDismissedTab = `${urlPrefix}/Recommendation.GetRecSummaryDataWithOptimizationScore?$expand=Summaries($expand=Recommendations({top}{skip}{orderby}$expand=Opportunities)),DismissTabSummaries($expand=Recommendations({top}{skip}{orderby}$expand=Opportunities))`;\r\nconst getSummaryAPIMCC = `${urlPrefixMCC}/Recommendation.GetSummaryData?$expand=Recommendations({top}{skip}{orderby}$expand=Opportunities)`;\r\nconst getHistoryAPI = `${urlPrefix}/Recommendation.GetApplyHistory?{topQuery}&{skipQuery}&$count=true&$orderby=Timestamp+desc&$filter=(TotalRecommendationCount+gt+0+or+IsAARSuperUser+eq+false)`;\r\nconst getHistoryAPIMCC = `${urlPrefixMCC}/Recommendation.GetApplyHistory?{topQuery}&{skipQuery}&$count=true&$orderby=Timestamp+desc&$filter=(TotalRecommendationCount+gt+0+or+IsAARSuperUser+eq+false)`;\r\nconst getAutoApplyOptInStatusAPI = `${urlPrefix}/Recommendation.GetRecommendationAutoApplyOptInStatus`;\r\nconst setAutoApplyOptInStatusAPI = `${urlPrefix}/Recommendation.SetRecommendationAutoApplyOptInStatus`;\r\nconst getCountAPI = `${urlPrefix}/Opportunity.GetSummaryData?$select=RecommendationsCount`;\r\nconst getStockImageAPI = '/Customers({cid})/Accounts({aid})/StockImages';\r\nconst getBulkAarUploadBlobAPI = `${urlPrefixMCC}/BulkOperationTools.GetUploadUrlForBulkEditAAROptInStatus`;\r\nconst submitBulkAarOptInStatusTaskAPI = `${urlPrefixMCC}/BulkOperationTools.SubmitBulkEditAAROptInStatusTask`;\r\nconst pollBulkEditAAROptInStatusTaskAPI = `${urlPrefixMCC}/BulkOperationTools.PollBulkEditAAROptInStatusTask`;\r\nconst fetchDownloadIdAPI = '/Recommendation.SubmitReportDataTask';\r\nconst applyAPISuffix = 'Apply';\r\nconst applyAllAPISuffix = 'ApplyAll';\r\nconst applyRecBulkAPISuffix = 'ApplyRecBulk';\r\nconst applyRecAllAPISuffix = 'ApplyRecAll';\r\nconst redismissAPI = 'Redismiss';\r\nconst trackAPISuffix = 'Track';\r\nconst FAC_STATUS_NOT_IN_PROGRESS = CCUIConstants.RecommendationAdoptionStatus.NotInProgess;\r\nconst FAC_STATUS_ACTIVE = CCUIConstants.RecommendationAdoptionStatus.Active;\r\n\r\nconst getOptions = (token, lcid, data, type = 'POST') => ({\r\n contentType: 'application/json',\r\n type,\r\n headers: {\r\n authorization: `CCMTSmallToken ${token}`,\r\n 'x-ms-lcid': `${lcid}`,\r\n },\r\n data: stringifySync(data),\r\n});\r\n\r\nconst formatUrl = (url, scope, top, skip, orderby, accountId) => url\r\n .replace('{aid}', accountId || scope.accountId)\r\n .replace('{cid}', scope.customerId)\r\n .replace(/{top}/g, _.isNumber(top) ? `$top=${top};` : '')\r\n .replace(/{skip}/g, _.isNumber(skip) ? `$skip=${skip};` : '')\r\n .replace('{topQuery}', _.isNumber(top) ? `$top=${top}` : '')\r\n .replace('{skipQuery}', _.isNumber(skip) ? `$skip=${skip}` : '')\r\n .replace(/{orderby}/g, !_.isEmpty(orderby) ? `$orderby=${_.map(orderby, i => i.join(' ')).join(',')};` : '');\r\n\r\nconst getRequestScope = (op, scope, activity) => {\r\n let campaignAdGroups = [];\r\n const { LevelAt, EntityIds } = getFilteredEntitiesAndUpdateOptions(op, scope);\r\n\r\n if (LevelAt === levelAtConstant.CAMPAIGN) {\r\n campaignAdGroups = _.map(EntityIds, id => ({ Key: id, Value: [] }));\r\n } else if (LevelAt === levelAtConstant.ADGROUP) {\r\n if (scope.levelAt !== levelAtConstant.ACCOUNT) {\r\n campaignAdGroups = [{\r\n Key: parseInt(scope.campaignId, 10),\r\n Value: EntityIds,\r\n }];\r\n } else {\r\n // in account scope with ad group filter\r\n activity.trace(\r\n 'fall back to return all recomemndations in account scope with ad group filter',\r\n 'RecommendationService/getRequestScope'\r\n );\r\n }\r\n }\r\n\r\n return campaignAdGroups;\r\n};\r\n\r\nfunction addCouponToRecommendations(rawCouponData, rawRecommendationData) {\r\n if (rawCouponData.length) {\r\n const coupon = rawCouponData[0];\r\n const couponFeatureId = coupon.FeatureId.toString();\r\n if (_.isUndefined(FAC_RECOMMENDATION_CONFIG[couponFeatureId])) {\r\n return;\r\n }\r\n const priorities = FAC_RECOMMENDATION_CONFIG[couponFeatureId].priority;\r\n\r\n const couponEligibleRec = _.chain(rawRecommendationData)\r\n .filter(rec => _.contains(priorities, rec.OpportunityType))\r\n .sortBy(rec => _.indexOf(priorities, rec.OpportunityType))\r\n .first()\r\n .value();\r\n\r\n if (couponEligibleRec) {\r\n _.extend(couponEligibleRec, { Coupon: coupon });\r\n }\r\n }\r\n}\r\n\r\nexport class RecommendationService {\r\n constructor({\r\n scope,\r\n showAlertHandler,\r\n i18n,\r\n odataPath,\r\n currentScenario,\r\n currentActivity,\r\n permissions,\r\n lcid,\r\n pageContext,\r\n ccJsData,\r\n asyncScheduler,\r\n isMCC = false,\r\n accountIdsPromise,\r\n alertCenter = {},\r\n odata = null,\r\n isNoExpand = false,\r\n newI18n,\r\n cacheManager = null,\r\n channel,\r\n }) {\r\n this.scope = scope;\r\n this.i18n = i18n;\r\n this.showAlertHandler = showAlertHandler;\r\n this.cache = {};\r\n this.currentScenario = currentScenario;\r\n this.currentActivity = currentActivity;\r\n this.odataPath = odataPath;\r\n this.permissions = permissions;\r\n this.lcid = lcid;\r\n this.isMCC = isMCC;\r\n this.isNoExpand = isNoExpand;\r\n this.accountIdsPromise = accountIdsPromise || Promise.resolve([]);\r\n this.hasAccountIdsPromise = !!accountIdsPromise;\r\n this.ccJsData = ccJsData;\r\n this.asyncScheduler = asyncScheduler;\r\n this.pollStatusTask = null;\r\n this.alertCenter = alertCenter;\r\n this.odata = odata;\r\n this.accountInfoCache = {};\r\n this.pageContext = pageContext;\r\n this.cappedAccountIdsPromise =\r\n this.accountIdsPromise.then(accountIds => accountIds.slice(0, MCC_ACCOUNTS_CAPPING));\r\n this.isOptimizationScoreOn = !isMCC && (channel === CHANNEL_TYPES.RECOMMENDATION\r\n || channel === CHANNEL_TYPES.OVERVIEW\r\n || channel === CHANNEL_TYPES.INCONTEXTCARD\r\n || channel === CHANNEL_TYPES.CAMPAIGN_SUMMARY_BAR);\r\n this.isDismissedTabEnabled = this.isOptimizationScoreOn && _.result(permissions, 'IsDismissedTabEnabled');\r\n this.newI18n = newI18n;\r\n this.cacheManager = cacheManager;\r\n }\r\n\r\n startCouponAdoption = (adoption) => {\r\n if (this.ccJsData\r\n && adoption) {\r\n return Promise.resolve(this.ccJsData.FeatureAdoptionCoupon\r\n .update(\r\n adoption.id,\r\n {\r\n adoption: {\r\n ...adoption,\r\n Status: FAC_STATUS_ACTIVE,\r\n },\r\n }\r\n ))\r\n .tapCatch((err) => {\r\n if (this.showAlertHandler) {\r\n const errorCode = err.Errors && err.Errors[0] && err.Errors[0].Code;\r\n const errorMessageKey = errorCode === 'CouponBankDepleted'\r\n ? 'FACDepletedErrorMessage'\r\n : 'GenericFACAdoptionStartErrorMessage';\r\n\r\n this.showAlertHandler({\r\n message: this.i18n.getString(errorMessageKey),\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n }\r\n });\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n getSummaryPromiseFromOption = (op, includeCoupons, campaignAdGroups) => (option) => {\r\n if (!option) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n\r\n const isWithDFM = (op.channel === CHANNEL_TYPES.RECOMMENDATION\r\n || (op.channel === CHANNEL_TYPES.MCCRECOMMENDATION && !op.type))\r\n && !op.isFromApplyOrDismiss\r\n && isDFMEnabled();\r\n\r\n let fetchDataPromise;\r\n if (isWithDFM) {\r\n fetchDataPromise = () => new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n fetchDataPromise = withDFMCache(fetchDataPromise, 'getSummaryDFM', this);\r\n } else {\r\n fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n }\r\n\r\n let getCouponPromise;\r\n if (op.channel !== CHANNEL_TYPES.RECOMMENDATION) {\r\n // don't take reject param, if coupon call fails, we will just not show the offer\r\n getCouponPromise = new Promise((resolve) => {\r\n if (includeCoupons\r\n && !this.isMCC\r\n && this.ccJsData) {\r\n const getCouponsActivity = this.currentScenario.getCoupons.create();\r\n\r\n getCouponsActivity.start();\r\n // if call fails, eat the error to avoid blocking workflow\r\n resolve(this.ccJsData.FeatureAdoptionCoupon\r\n .findAll({ aid: this.scope.accountId })\r\n .then((coupons) => {\r\n getCouponsActivity.stop();\r\n return _.filter(\r\n coupons,\r\n ({ Status }) =>\r\n Status === FAC_STATUS_NOT_IN_PROGRESS || Status === FAC_STATUS_ACTIVE\r\n );\r\n })\r\n .catch((err) => {\r\n if (err instanceof TypeError) {\r\n getCouponsActivity.trace(`TypeError for JsData.FeatureAdoptionCoupon, most likely due to making the request after being logged out: ${err.message}`);\r\n } else if (err === undefined) {\r\n getCouponsActivity.trace('err was undefined for getCoupons JsData response');\r\n } else if (err.name === undefined || err.message === undefined) {\r\n getCouponsActivity.trace(`likely a timeout or 400/500/unusable response from FeatureAdoptionCoupon server API,\r\n err name: ${err.name}, err.message: ${err.message}`);\r\n } else {\r\n getCouponsActivity.error(\r\n `error in getCoupons: ${err.name}: ${err.message}`,\r\n 'RecommendationService/getCoupons'\r\n );\r\n }\r\n getCouponsActivity.stop();\r\n return [];\r\n }));\r\n } else {\r\n resolve([]);\r\n }\r\n });\r\n }\r\n const getSummaryActivity = this.currentScenario.getSummary.create();\r\n\r\n getSummaryActivity.start();\r\n\r\n return (isWithDFM ? fetchDataPromise() : fetchDataPromise).then((rawData) => {\r\n getSummaryActivity.stop();\r\n return rawData;\r\n }).then((rawData) => {\r\n if (this.isOptimizationScoreOn) {\r\n let overallScoreIncrease = 0;\r\n const {\r\n message,\r\n failedRecommendationCount,\r\n allExpiredInSummary,\r\n userAction,\r\n totalRecommendationCount,\r\n } = applyNotificationInfo;\r\n\r\n // if op.type is not undefined means from detail page, and we only update current score\r\n // under 2 situations, #1 is from summay page, #2 is when user directly go to detail page\r\n if (!_.isEmpty(rawData.OverallOptimizationScoreBar)\r\n && (!op.type || (_.isEmpty(overallOptimizationScoreBar) && op.type))) {\r\n overallScoreIncrease =\r\n Number(rawData.OverallOptimizationScoreBar.Gained +\r\n rawData.OverallOptimizationScoreBar.Dismissed) -\r\n Number(overallOptimizationScoreBar.Gained +\r\n overallOptimizationScoreBar.Dismissed);\r\n overallOptimizationScoreBar = rawData.OverallOptimizationScoreBar;\r\n }\r\n\r\n if (op.isFromApplyOrDismiss\r\n && totalRecommendationCount > 0\r\n && (userAction !== APPLY_ACTION_TYPES.ACCEPT\r\n || failedRecommendationCount === 0\r\n || allExpiredInSummary\r\n )) {\r\n const level = failedRecommendationCount > 0 && !allExpiredInSummary\r\n ? 'Warning'\r\n : 'Info';\r\n this.showAlertHandler({\r\n message: !_.isString(message) ? message : `${message}${overallScoreIncrease > 0 && op.categoryType !== RECOMMENDATION_CATEGORIES.DISMISSED ?\r\n ` +${formatPercentOneDecimal(overallScoreIncrease, this.i18n)}` : ''}`,\r\n level,\r\n dismissible: true,\r\n });\r\n }\r\n }\r\n return rawData;\r\n })\r\n .then((rawData) => {\r\n if (rawData && rawData.Summaries) {\r\n return _.extend(rawData, { value: rawData.Summaries });\r\n }\r\n return rawData;\r\n })\r\n .then((rawData) => {\r\n // if loaded recommendations don't map to coupons,\r\n // don't wait for coupon promise to resolve\r\n if (includeCoupons\r\n && op.channel !== CHANNEL_TYPES.RECOMMENDATION\r\n && _.any(\r\n rawData && rawData.value,\r\n rec => _.has(FAC_RECOMENDATIONTYPE_FEATUREID_MAPPING, rec.OpportunityType)\r\n )) {\r\n return getCouponPromise.then((rawCouponData) => {\r\n addCouponToRecommendations(rawCouponData, rawData.value);\r\n\r\n return {\r\n data: rawData,\r\n campaignAdGroups,\r\n };\r\n });\r\n }\r\n\r\n return {\r\n data: rawData,\r\n campaignAdGroups,\r\n };\r\n })\r\n .then((rawData) => {\r\n // Cache recommendation summary data\r\n const isRecommendationSummaryPage =\r\n (op.channel === CHANNEL_TYPES.RECOMMENDATION\r\n || op.channel === CHANNEL_TYPES.MCCRECOMMENDATION)\r\n && _.isNull(op.type);\r\n if (this.permissions.IsRecommendationCacheDetailPageDataEnabled\r\n && isRecommendationSummaryPage) {\r\n setRecommendationCache('recommendation-summary-raw-data', rawData);\r\n }\r\n return rawData;\r\n })\r\n .catch((err) => {\r\n if (this.showAlertHandler) {\r\n this.handleAjaxError(err, option, 'getSummary', op.shouldShowAlertHandler);\r\n } else {\r\n throw (err);\r\n }\r\n // Return an object same as \"no recommendation\"\r\n // if ajax error occurs for recommendation page\r\n return op.channel === CHANNEL_TYPES.COMPETITION ? {} : {\r\n data: {\r\n CategoryScoreUpLifts: [],\r\n Id: 0,\r\n OverallOptimizationScoreBar: null,\r\n Summaries: [],\r\n value: [],\r\n },\r\n campaignAdGroups,\r\n };\r\n });\r\n }\r\n\r\n getCoupon = (op) => {\r\n // don't take reject param, if coupon call fails, we will just not show the offer\r\n const getCouponPromise = new Promise((resolve) => {\r\n if (!op.ignoreCoupons\r\n && !this.isMCC\r\n && this.ccJsData) {\r\n const getCouponsActivity = this.currentScenario.getCoupons.create();\r\n\r\n getCouponsActivity.start();\r\n // if call fails, eat the error to avoid blocking workflow\r\n resolve(this.ccJsData.FeatureAdoptionCoupon\r\n .findAll({ aid: this.scope.accountId })\r\n .then((coupons) => {\r\n getCouponsActivity.stop();\r\n return _.filter(\r\n coupons,\r\n ({ Status }) =>\r\n Status === FAC_STATUS_NOT_IN_PROGRESS || Status === FAC_STATUS_ACTIVE\r\n );\r\n })\r\n .catch((err) => {\r\n if (err instanceof TypeError) {\r\n getCouponsActivity.trace(`TypeError for JsData.FeatureAdoptionCoupon, most likely due to making the request after being logged out: ${err.message}`);\r\n } else if (err === undefined) {\r\n getCouponsActivity.trace('err was undefined for getCoupons JsData response');\r\n } else if (err.name === undefined || err.message === undefined) {\r\n getCouponsActivity.trace(`likely a timeout or 400/500/unusable response from FeatureAdoptionCoupon server API,\r\n err name: ${err.name}, err.message: ${err.message}`);\r\n } else {\r\n getCouponsActivity.error(\r\n `error in getCoupons: ${err.name}: ${err.message}`,\r\n 'RecommendationService/getCoupons'\r\n );\r\n }\r\n getCouponsActivity.stop();\r\n return [];\r\n }));\r\n } else {\r\n resolve([]);\r\n }\r\n });\r\n\r\n return getCouponPromise;\r\n }\r\n\r\n getSummary = (op) => {\r\n this.currentActivity.trace('getSummary is called', 'RecommendationService/getSummary');\r\n\r\n const includeCoupons = !op.ignoreCoupons;\r\n const campaignAdGroups = op.campaignAdGroups ||\r\n getRequestScope(op, op.scope || this.scope, this.currentActivity);\r\n\r\n const optionPromise = this.generateGetSummaryRequest(_.extend({}, op, { campaignAdGroups }));\r\n if (!optionPromise) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n if (this.hasAccountIdsPromise) {\r\n return optionPromise\r\n .then(this.getSummaryPromiseFromOption(op, includeCoupons, campaignAdGroups));\r\n }\r\n\r\n return this.getSummaryPromiseFromOption(op, includeCoupons, campaignAdGroups)(optionPromise);\r\n }\r\n\r\n getSummaryRequestFromAccountIds = op => (accountIds) => {\r\n const {\r\n type,\r\n channel,\r\n campaignType,\r\n top,\r\n skip,\r\n orderby,\r\n filterOpportunity,\r\n campaignAdGroups,\r\n detailPageSetting,\r\n accountId,\r\n } = op;\r\n let data;\r\n\r\n let paginationQueryOptions;\r\n if ((channel === CHANNEL_TYPES.RECOMMENDATION\r\n || channel === CHANNEL_TYPES.MCCRECOMMENDATION)\r\n && !_.isNull(type)\r\n && type === RECOMMENDATION_TYPES.IMAGE_EXTENSION) {\r\n paginationQueryOptions = JSON.stringify({\r\n $orderby: !_.isEmpty(orderby) ? _.map(orderby, i => i.join(' ')).join(',') : undefined,\r\n $top: _.isNumber(top) ? top.toString() : undefined,\r\n $skip: _.isNumber(skip) ? skip.toString() : undefined,\r\n });\r\n }\r\n\r\n const getOptimizationScore =\r\n (channel === CHANNEL_TYPES.RECOMMENDATION\r\n || channel === CHANNEL_TYPES.INCONTEXTCARD\r\n || channel === CHANNEL_TYPES.CAMPAIGN_SUMMARY_BAR\r\n || channel === CHANNEL_TYPES.OVERVIEW)\r\n && this.isOptimizationScoreOn;\r\n const OpportunityTypes = getRecommendationIds(\r\n type,\r\n channel,\r\n this.permissions,\r\n this.isMCC\r\n );\r\n if (this.isMCC && _.isUndefined(accountId)) {\r\n if (_.isEmpty(accountIds)) {\r\n return null;\r\n }\r\n\r\n data = {\r\n Request: {\r\n Channel: channel,\r\n RecommendationTypes: OpportunityTypes,\r\n AccountIds: accountIds,\r\n DetailPageSetting: detailPageSetting,\r\n RawFilterQueryExpression: filterOpportunity,\r\n PaginationQueryOptions: paginationQueryOptions,\r\n },\r\n };\r\n } else {\r\n data = {\r\n Request: {\r\n CampaignAdGroups: campaignAdGroups,\r\n CampaignTypeId:\r\n _.contains(SUPPORTED_CAMPAIGN_TYPES, campaignType) ?\r\n campaignType : null,\r\n Channel: channel,\r\n RecommendationTypes: OpportunityTypes,\r\n RawFilterQueryExpression: filterOpportunity,\r\n PaginationQueryOptions: paginationQueryOptions,\r\n },\r\n };\r\n }\r\n\r\n if (_.has(op, 'settingOptions')) {\r\n _.extend(data.Request, { SettingOptions: op.settingOptions });\r\n }\r\n\r\n const option = getOptions(this.scope.token, this.lcid, data);\r\n\r\n let api = getSummaryAPI;\r\n if (this.isMCC && _.isUndefined(accountId)) {\r\n api = getSummaryAPIMCC;\r\n } else if (getOptimizationScore) {\r\n if (this.isNoExpand) {\r\n api = getSummaryAPIOptimizationScoreNoExpand;\r\n } else {\r\n api = this.isDismissedTabEnabled ?\r\n getSummaryAPIOptimizationScoreWithDismissedTab : getSummaryAPIOptimizationScore;\r\n }\r\n } else if (this.isNoExpand) {\r\n api = getSummaryTypeOnly;\r\n }\r\n\r\n option.url = formatUrl(\r\n `${this.odataPath}${api}`,\r\n this.scope,\r\n top,\r\n skip,\r\n orderby,\r\n accountId\r\n );\r\n return option;\r\n }\r\n\r\n generateGetSummaryRequest = (op) => {\r\n const {\r\n type,\r\n channel,\r\n } = op;\r\n const OpportunityTypes = getRecommendationIds(\r\n type,\r\n channel,\r\n this.permissions,\r\n this.isMCC\r\n );\r\n\r\n if (!channel || !OpportunityTypes || OpportunityTypes.length === 0) {\r\n return null;\r\n }\r\n if (!this.hasAccountIdsPromise) {\r\n return this.getSummaryRequestFromAccountIds(op)([]);\r\n }\r\n return this.cappedAccountIdsPromise\r\n .then(this.getSummaryRequestFromAccountIds(op)).catch((err) => {\r\n if (this.showAlertHandler) {\r\n this.handleAjaxError(err, {}, 'getAccountIds');\r\n } else {\r\n throw (err);\r\n }\r\n return null;\r\n });\r\n }\r\n\r\n getHistory = (op) => {\r\n this.currentActivity.trace('getHistory is called', 'RecommendationService/getHistory');\r\n const option = this.generateGetHistoryRequest(_.extend({}, op));\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n\r\n const getHistoryActivity = this.currentScenario.getHistory.create();\r\n getHistoryActivity.start();\r\n\r\n return fetchDataPromise.then(\r\n (rawData) => {\r\n getHistoryActivity.stop();\r\n return {\r\n data: rawData,\r\n };\r\n },\r\n (err) => {\r\n if (this.showAlertHandler) {\r\n this.handleAjaxError(err, option, 'getHistory');\r\n } else {\r\n throw (err);\r\n }\r\n return {};\r\n }\r\n );\r\n }\r\n\r\n generateGetHistoryRequest = ({ top, skip }) => {\r\n const option = getOptions(this.scope.token, this.lcid, undefined, 'GET');\r\n\r\n option.url = formatUrl(`${this.odataPath}${this.isMCC ? getHistoryAPIMCC : getHistoryAPI}`, this.scope, top, skip);\r\n return option;\r\n }\r\n\r\n // getCount returns count of recommendations in account level only.\r\n getCount = (op) => {\r\n this.currentActivity.trace('getCount is called', 'RecommendationService/getCount');\r\n\r\n const option = this.generateGetCountRequest(op);\r\n if (!option) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n const getCountActivity = this.currentScenario.getCount.create();\r\n getCountActivity.start();\r\n\r\n return fetchDataPromise.then(\r\n (rawData) => {\r\n getCountActivity.stop();\r\n return {\r\n data: rawData,\r\n };\r\n },\r\n (err) => {\r\n if (this.showAlertHandler) {\r\n this.handleAjaxError(err, option, 'getCount');\r\n } else {\r\n throw (err);\r\n }\r\n return {};\r\n }\r\n );\r\n }\r\n\r\n generateGetCountRequest = (op) => {\r\n if (_.isUndefined(op)) {\r\n return null;\r\n }\r\n\r\n const {\r\n channel,\r\n campaignType,\r\n } = op;\r\n const OpportunityTypes = getRecommendationIds(\r\n null,\r\n channel,\r\n this.permissions,\r\n this.isMCC\r\n );\r\n\r\n if (!channel || _.isEmpty(OpportunityTypes)) {\r\n return null;\r\n }\r\n\r\n const data = {\r\n Request: {\r\n Channel: channel,\r\n OpportunityTypes,\r\n CampaignTypeId:\r\n _.contains(SUPPORTED_CAMPAIGN_TYPES, campaignType) ?\r\n campaignType : null,\r\n },\r\n };\r\n const option = getOptions(this.scope.token, this.lcid, data);\r\n\r\n option.url = formatUrl(`${this.odataPath}${getCountAPI}`, this.scope);\r\n return option;\r\n }\r\n\r\n // getCountByCampaignAdGroups returns count of recommendations by given campaign and ad groups\r\n getCountByCampaignAdGroups = (op) => {\r\n this.currentActivity.trace('getCountByCampaignAdGroups is called', 'RecommendationService/getCountByCampaignAdGroups');\r\n\r\n const campaignAdGroups = op.campaignAdGroups ||\r\n getRequestScope(op, op.scope || this.scope, this.currentActivity);\r\n const option = this.generateGetCountByCampaignAdGroupsRequest(_.extend(\r\n {}, op,\r\n { campaignAdGroups }\r\n ));\r\n if (!option) {\r\n return Promise.resolve({ data: [] });\r\n }\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n const getCountByCampaignAdGroupsActivity =\r\n this.currentScenario.getCountByCampaignAdGroups.create();\r\n getCountByCampaignAdGroupsActivity.start();\r\n\r\n return fetchDataPromise.then(\r\n (rawData) => {\r\n getCountByCampaignAdGroupsActivity.stop();\r\n return {\r\n data: rawData,\r\n };\r\n },\r\n (err) => {\r\n this.handleAjaxError(err, option, 'getCountByCampaignAdGroups');\r\n return {};\r\n }\r\n );\r\n }\r\n\r\n generateGetCountByCampaignAdGroupsRequest = (op) => {\r\n const {\r\n channel,\r\n campaignAdGroups,\r\n type,\r\n } = op;\r\n\r\n const OpportunityTypes = getRecommendationIds(\r\n type,\r\n channel,\r\n this.permissions,\r\n this.isMCC\r\n );\r\n\r\n if (!channel || !OpportunityTypes || OpportunityTypes.length === 0) {\r\n return null;\r\n }\r\n\r\n const data = {\r\n Request: {\r\n CampaignAdGroups: campaignAdGroups,\r\n Channel: channel,\r\n OpportunityTypes,\r\n },\r\n };\r\n const option = getOptions(this.scope.token, this.lcid, data);\r\n\r\n option.url = formatUrl(`${this.odataPath}${getCountAPI}`, this.scope);\r\n return option;\r\n }\r\n\r\n logRecommendationFailedResults = (rawData, type) => {\r\n _.chain(rawData.AggregatedResults)\r\n .filter(res => res.ErrorCode !== 0)\r\n .each(res => _.each(res.OpportunityIds, (opportunityId) => {\r\n this.currentActivity.trace(\r\n `apply recommendation failed, opportunityId = ${opportunityId}, errorCode = ${res.ErrorCode}, type = ${type}`, // eslint-disable-line\r\n 'recommendation/applyFailed'\r\n );\r\n }));\r\n }\r\n\r\n countError = (rawData) => {\r\n const totalCount = _.reduce(\r\n rawData.AggregatedResults,\r\n (memo, singleCodeResult) => memo + singleCodeResult.RecommendationCount,\r\n 0\r\n );\r\n const successfulCount = _.chain(rawData.AggregatedResults)\r\n .filter(singleCodeResult => singleCodeResult.ErrorCode === 0)\r\n .first()\r\n .result('RecommendationCount')\r\n .value() || 0;\r\n const failedCount = totalCount - successfulCount;\r\n const expiredCount = _.chain(rawData.AggregatedResults)\r\n .map(singleCodeResult => singleCodeResult.ExpiredCount)\r\n .reduce((memo, count) => memo + count, 0)\r\n .value();\r\n _.extend(rawData, {\r\n totalCount,\r\n successfulCount,\r\n failedCount,\r\n expiredCount,\r\n });\r\n }\r\n\r\n getErrors = rawData => _.uniq(_.map(\r\n rawData.AggregatedResults,\r\n item => _.pick(item, 'ErrorCode', 'ErrorMessage', 'Property')\r\n ), false, item => item.ErrorCode)\r\n\r\n dealWithInlineError = (rawData, hasInlineError) => {\r\n if (_.isFunction(hasInlineError)) {\r\n const errors = this.getErrors(rawData);\r\n if (hasInlineError(errors)) {\r\n throw errors;\r\n }\r\n }\r\n }\r\n\r\n aggregateResult = (rawData) => {\r\n if (_.isUndefined(rawData.AggregatedResults)) {\r\n _.extend(rawData, {\r\n AggregatedResults: _.chain(rawData.Results)\r\n .groupBy('ErrorCode')\r\n .map((items, key) => ({\r\n ErrorCode: parseInt(key, 10),\r\n ErrorMessage: _.first(items).ErrorMessage,\r\n OpportunityIds: _.map(items, item => item.OpportunityId),\r\n RecommendationCount: _.size(items),\r\n ExpiredCount: _.size(_.filter(items, item => item.Expired)),\r\n Property: _.first(items).Property,\r\n }))\r\n .value(),\r\n });\r\n }\r\n }\r\n\r\n dealApplyResponse = ({ rawData, op }) => {\r\n this.aggregateResult(rawData);\r\n this.countError(rawData);\r\n const { totalCount: total, failedCount: fail } = rawData;\r\n if (fail && isCompetition(op.type)) {\r\n const localizedkey = `Recommendation_${op.userAction}_Error_Message`;\r\n\r\n this.showAlertHandler({\r\n message: this.i18n.getString(localizedkey, { total, fail }),\r\n level: 'Info',\r\n dismissible: true,\r\n });\r\n }\r\n\r\n if (!isCompetition(op.type)) {\r\n if (rawData.totalCount === 0) {\r\n if (rawData.ErrorCode && rawData.ErrorCode !== 0) {\r\n // If ErrorCode is not equal to 0, the error should be notified.\r\n // Even though the totalCount, failedCount are 0.\r\n this.showAlertHandler({\r\n message: this.i18n.getString('GenericErrorMessage'),\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n }\r\n this.setApplyNotificationInfo({ message: '', failedRecommendationCount: 0, userAction: '' });\r\n\r\n return [];\r\n }\r\n\r\n this.logRecommendationFailedResults(rawData, op.type);\r\n if (_.contains(INLIE_APPLY_ERROR_SUPPORT_TYPES, op.type)) {\r\n this.dealWithInlineError(rawData, op.hasInlineError);\r\n }\r\n\r\n op.handleRecommendationNotification({\r\n i18n: this.i18n,\r\n op,\r\n rawData,\r\n showAlertHandler: this.showAlertHandler,\r\n isOptimizationScoreOn: this.isOptimizationScoreOn,\r\n setApplyNotificationInfo: this.setApplyNotificationInfo,\r\n newI18n: this.newI18n,\r\n scope: this.scope,\r\n });\r\n }\r\n\r\n return [];\r\n }\r\n\r\n stopStatusPoll = () => {\r\n if (!_.isNull(this.pollStatusTask)) {\r\n this.pollStatusTask.stop();\r\n }\r\n }\r\n\r\n track = (op) => {\r\n this.currentActivity.trace(`track is called, UserAction= ${stringifySync(op.userAction)}`, 'RecommendationService/track');\r\n\r\n // Apply/dismiss recommendation: invalidate recommendation summary data cache.\r\n // Call it early to prevent the timeout on aync apply.\r\n if (this.permissions.IsRecommendationCacheDetailPageDataEnabled\r\n && !_.isUndefined(getRecommendationCache('recommendation-summary-raw-data'))) {\r\n setRecommendationCache('recommendation-summary-raw-data', undefined);\r\n }\r\n\r\n let isAsync = false;\r\n\r\n return this.generateApplyRequest(op).then((option) => {\r\n const result = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n const getApplyActivity = this.currentScenario.track.create();\r\n getApplyActivity.start();\r\n\r\n return result.then((rawData = {}) => {\r\n getApplyActivity.stop();\r\n if (rawData.IsAsync) {\r\n isAsync = true;\r\n this.pollStatusTask = new PollTask(\r\n () => $.ajax(this.generateApplyStatusRequest({\r\n adoptionId: rawData.AdoptionId,\r\n })),\r\n data => data.AdoptionStatus === TASK_STATUS.COMPLETED,\r\n data => data.AdoptionStatus === TASK_STATUS.FAILED,\r\n this.asyncScheduler,\r\n 10000 // max poll count\r\n );\r\n if (_.isFunction(op.closeUiBlock)) {\r\n op.closeUiBlock();\r\n }\r\n if (_.isFunction(op.showAsyncApplyModal)) {\r\n op.showAsyncApplyModal(this.pollStatusTask);\r\n }\r\n\r\n return this.pollStatusTask.start().then((data) => {\r\n this.currentActivity.trace(`poll count: ${this.pollStatusTask.pollCount}`, 'RecommendationService/Track');\r\n return data;\r\n });\r\n }\r\n return rawData;\r\n })\r\n .then(\r\n (rawData = {}) => op.userAction !== APPLY_ACTION_TYPES.REDISMISS &&\r\n this.dealApplyResponse({ rawData, op }),\r\n (err) => {\r\n this.handleAjaxError(err, option, 'track');\r\n return [];\r\n }\r\n );\r\n }).finally(() => {\r\n if (isAsync) {\r\n if (_.isFunction(op.closeAsyncApplyModal)) {\r\n op.closeAsyncApplyModal();\r\n }\r\n } else if (_.isFunction(op.closeUiBlock)) {\r\n op.closeUiBlock();\r\n }\r\n\r\n if (this.permissions.IsRecommendationDataCacheEnabled\r\n && !_.isNull(this.cacheManager)) {\r\n // Apply/dismiss all on in context card recommendation: invalidate campaign cache.\r\n // Apply/dismiss on recommendation page: invalidate it when leaving recommendation page.\r\n if (op.channel === CHANNEL_TYPES.INCONTEXTCARD) {\r\n this.cacheManager.invalidate('Campaign');\r\n } else if (op.channel === CHANNEL_TYPES.RECOMMENDATION\r\n || op.channel === CHANNEL_TYPES.MCCRECOMMENDATION) {\r\n setRecommendationCache('need-invalidate-campaign-cache', true);\r\n }\r\n }\r\n });\r\n }\r\n\r\n getApplyAPI = (withAll, type, asyncEnabled = false, userAction) => {\r\n let suffix = asyncEnabled ? applyRecBulkAPISuffix : applyAPISuffix;\r\n\r\n if (withAll) {\r\n suffix = asyncEnabled ? applyRecAllAPISuffix : applyAllAPISuffix;\r\n } else if (\r\n (type === RECOMMENDATION_TYPES.SITE_LINK ||\r\n type === RECOMMENDATION_TYPES.CALLOUT) &&\r\n !asyncEnabled\r\n ) {\r\n suffix = trackAPISuffix; // todo: discuss with MT\r\n }\r\n\r\n if (userAction === APPLY_ACTION_TYPES.REDISMISS) {\r\n suffix = redismissAPI;\r\n }\r\n\r\n return `${this.isMCC ? urlPrefixMCC : urlPrefix}/${asyncEnabled ? 'Recommendation' : 'Opportunity'}.${suffix}`;\r\n }\r\n\r\n isTrackingOnly = (type, asyncEnabled) => (type === RECOMMENDATION_TYPES.SITE_LINK ||\r\n type === RECOMMENDATION_TYPES.CALLOUT) &&\r\n asyncEnabled;\r\n\r\n getOdataType = (withAll, type, asyncEnabled) => {\r\n const isAll = withAll ? 'ALL' : 'BULK';\r\n if (this.isMCC) {\r\n return APPLY_ODATA_TYPES_MAP[isAll].MCC;\r\n } else if (asyncEnabled) {\r\n return APPLY_ODATA_TYPES_MAP[isAll].SINGLE_ACCOUNT_ASYNC;\r\n }\r\n\r\n return APPLY_ODATA_TYPES_MAP[isAll].SINGLE_ACCOUNT;\r\n }\r\n\r\n generateApplyRequest = (op) => {\r\n const {\r\n type,\r\n channel,\r\n userAction,\r\n withAll,\r\n userInputs,\r\n campaignAdGroups,\r\n settings,\r\n reason,\r\n context,\r\n guid,\r\n totalRecommendationCount,\r\n } = op;\r\n\r\n return this.cappedAccountIdsPromise.then((accountIds) => {\r\n const asyncEnabled = this.isMCC ||\r\n (\r\n this.permissions.IsBAARecommendationsAsyncApplyEnabled &&\r\n (channel === CHANNEL_TYPES.RECOMMENDATION ||\r\n channel === CHANNEL_TYPES.INCONTEXT ||\r\n channel === CHANNEL_TYPES.INCONTEXTCARD)\r\n ) ||\r\n (\r\n this.isOptimizationScoreOn &&\r\n (channel === CHANNEL_TYPES.RECOMMENDATION ||\r\n channel === CHANNEL_TYPES.INCONTEXT ||\r\n channel === CHANNEL_TYPES.INCONTEXTCARD)\r\n );\r\n\r\n const isFromDismissTab = _.result(context, 'Category', '') === RECOMMENDATION_CATEGORIES.DISMISSED;\r\n\r\n const data = {\r\n Request: {\r\n '@odata.type': this.getOdataType(withAll, type, asyncEnabled),\r\n [`${asyncEnabled ? 'RecommendationType' : 'OpportunityType'}`]: type,\r\n AccountIds: this.isMCC ? accountIds : undefined,\r\n UserAction: userAction,\r\n UserInputs: userInputs || [],\r\n CampaignAdGroups: this.isMCC ? undefined : campaignAdGroups,\r\n Channel: channel,\r\n Settings: settings,\r\n Reason: reason,\r\n Context: JSON.stringify(context),\r\n Guid: guid,\r\n TotalRecommendationCount: asyncEnabled && withAll ? totalRecommendationCount : undefined,\r\n TrackingOnly: asyncEnabled ? this.isTrackingOnly(type, asyncEnabled) : undefined,\r\n },\r\n };\r\n\r\n if (isFromDismissTab) {\r\n data.Request.IsFromDismissTab = true;\r\n }\r\n\r\n const option = getOptions(this.scope.token, undefined, data);\r\n\r\n option.url = formatUrl(`${this.odataPath}${this.getApplyAPI(withAll, type, asyncEnabled, userAction)}`, this.scope);\r\n return option;\r\n }).catch((err) => {\r\n if (this.showAlertHandler) {\r\n this.handleAjaxError(err, {}, 'getAccountIds');\r\n } else {\r\n throw (err);\r\n }\r\n return null;\r\n });\r\n }\r\n\r\n generateApplyStatusRequest = (op) => {\r\n const {\r\n adoptionId,\r\n } = op;\r\n const option = getOptions(this.scope.token, undefined, undefined, 'GET');\r\n\r\n option.url = formatUrl(\r\n `${this.odataPath}${this.isMCC ? urlPrefixMCC : urlPrefix}/Recommendation.GetApplyStatus(Id='${adoptionId}')`,\r\n this.scope\r\n );\r\n return option;\r\n }\r\n\r\n handleAjaxError = (err, option, functionName, shouldShowAlertHandler = true) => {\r\n const errorDetails = `ErrorMessage=${stringifySync(err.message)}, ErrorStack=${stringifySync(err.stack)}, ErrorCode=${err.status}, Error=${stringifySync(err)}, Request=${stringifySync(option.data)}`;\r\n\r\n if (err.status === 0) {\r\n this.currentActivity.trace(`Request not able to be sent, ${errorDetails}`, `RecommendationService/${functionName}`);\r\n } else if (err.status === 401) {\r\n this.currentActivity.trace(`error in ${functionName}, ${errorDetails}`, `RecommendationService/${functionName}`);\r\n handleUnauthorizedResponse(err);\r\n } else {\r\n this.currentActivity.error(`error in ${functionName}, ${errorDetails}`, `RecommendationService/${functionName}`);\r\n }\r\n\r\n if (shouldShowAlertHandler) {\r\n this.showAlertHandler({\r\n message: this.i18n.getString('GenericErrorMessage'),\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n }\r\n\r\n // When it's failed to apply, set applyNotificationInfo to default value.\r\n this.setApplyNotificationInfo({ message: '', failedRecommendationCount: 0, userAction: '' });\r\n };\r\n\r\n /**\r\n * Creates a download task in MT by giving MT the adoption Id\r\n * @param {string} adoptionId - the adoption's id to download its history\r\n * @returns {Promise} Resolves to download task id if the download was successful.\r\n */\r\n fetchDownloadIdHistory = (adoptionId) => {\r\n const data = {\r\n Request: {\r\n '@odata.type': '#Microsoft.Advertiser.AdInsight.Opportunity.ODataApiModel.ApplyErrorDetailsDownloadTaskRequest',\r\n ReportType: 'ApplyErrorDetailsDownload',\r\n AdoptionId: adoptionId,\r\n },\r\n };\r\n const option = getOptions(this.scope.token, undefined, data);\r\n\r\n option.url = formatUrl(\r\n `${this.odataPath}${this.isMCC ? urlPrefixMCC : urlPrefix}${fetchDownloadIdAPI}`,\r\n this.scope\r\n );\r\n return new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n }\r\n\r\n fetchDownloadIdRecommendation = ({\r\n recommendationType,\r\n channel,\r\n campaignType,\r\n }) => this.accountIdsPromise.then((accountIds) => {\r\n const recommendationTypes = _.difference(\r\n getRecommendationTypes(\r\n recommendationType,\r\n channel,\r\n this.permissions,\r\n this.isMCC\r\n ),\r\n NOT_SUPPORT_DOWNLOAD_TYPES\r\n );\r\n\r\n let uniqParams = {};\r\n\r\n if (this.isMCC) {\r\n uniqParams = {\r\n '@odata.type': '#Microsoft.Advertiser.AdInsight.Opportunity.ODataApiModel.MccRecommendationsDownloadTaskRequest',\r\n AccountIds: accountIds,\r\n };\r\n } else {\r\n let campaignScope = null;\r\n let adgroupScope = null;\r\n\r\n campaignScope = this.scope && this.scope.campaignId\r\n ? { CampaignId: parseInt(this.scope.campaignId, 10) }\r\n : null;\r\n adgroupScope = this.scope && this.scope.adGroupId ?\r\n {\r\n AdGroupId: parseInt(this.scope.adGroupId, 10),\r\n CampaignId: parseInt(this.scope.campaignId, 10),\r\n } : null;\r\n\r\n const scopes = {};\r\n\r\n if (adgroupScope) {\r\n scopes.AdGroupScopes = [adgroupScope];\r\n } else if (campaignScope) {\r\n scopes.CampaignScopes = [campaignScope];\r\n }\r\n\r\n uniqParams = {\r\n '@odata.type': '#Microsoft.Advertiser.AdInsight.Opportunity.ODataApiModel.RecommendationsDownloadTaskRequest',\r\n CampaignTypeId: _.contains(SUPPORTED_CAMPAIGN_TYPES, campaignType) ? campaignType : null,\r\n ...scopes,\r\n };\r\n }\r\n\r\n const data = {\r\n Request: {\r\n ReportType: 'RecommendationsDownload',\r\n Channel: channel,\r\n RecommendationTypes: recommendationTypes,\r\n ...uniqParams,\r\n },\r\n };\r\n\r\n const option = getOptions(this.scope.token, undefined, data);\r\n\r\n option.url = formatUrl(\r\n `${this.odataPath}${this.isMCC ? urlPrefixMCC : urlPrefix}${fetchDownloadIdAPI}`,\r\n this.scope\r\n );\r\n\r\n return new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n })\r\n\r\n /**\r\n *\r\n * @param {string} id - download task id\r\n * @returns {Promise} Resolves to be the url of download file\r\n */\r\n pollFileName = id => new PollTask(\r\n () => $.ajax(this.generatePollFileNameRequest(id)),\r\n data => data.Status === TASK_STATUS.COMPLETED,\r\n data => data.Status === TASK_STATUS.FAILED,\r\n this.asyncScheduler\r\n )\r\n\r\n generatePollFileNameRequest = (id) => {\r\n const option = getOptions(this.scope.token, undefined, undefined, 'GET');\r\n\r\n option.url = formatUrl(\r\n `${this.odataPath}${this.isMCC ? urlPrefixMCC : urlPrefix}/Recommendation.PollReportDataTask(Id='${id}')`,\r\n this.scope\r\n );\r\n return option;\r\n }\r\n\r\n /**\r\n * poll server to know if file is ready and then download it\r\n * @param {string} downloadId - the id to fetch download file status\r\n * @returns {Promise} Resolves to poll Count if the download was successful.\r\n */\r\n downloadWithDownloadId = ({ Id: downloadId }) => {\r\n let alertId = null;\r\n this.currentActivity.trace(`Download task started with id: ${downloadId}`, 'RecommendationService/DownloadWithDownloadId');\r\n // show an alert saying that download request was successfully submitted\r\n alertId = this.alertCenter.showConfirmation(\r\n this.i18n.getString('GridDownloadStatusMessage'),\r\n alertId\r\n );\r\n const pollTask = this.pollFileName(downloadId);\r\n return pollTask.start()\r\n .finally(() => this.alertCenter.dismiss(alertId))\r\n .then(({ ResultFile }) => {\r\n downloadService.iframeDownload(ResultFile);\r\n return pollTask.pollCount;\r\n });\r\n }\r\n\r\n /**\r\n * download of recommendations\r\n * Creates a download request and POSTS to odata, asynchronously polls for the status of the\r\n * request and initiates the browser download after the file has been generated.\r\n * @param {array} recommendationType -\r\n * the recommendation type to be download. Null stands for all.\r\n * @param {string} channel - different channel has different supported recommendation types\r\n * @param {string} campaignType - campaign type selected in new UI\r\n * @returns {Promise} Resolves to true if the download was successful.\r\n */\r\n download = ({\r\n recommendationType,\r\n channel,\r\n campaignType,\r\n }) => this.fetchDownloadIdRecommendation({\r\n recommendationType,\r\n channel,\r\n campaignType,\r\n }).then(this.downloadWithDownloadId)\r\n .then((pollCount) => {\r\n this.currentActivity.trace(`poll count: ${pollCount}`, 'RecommendationService/Download');\r\n })\r\n .catch(err => this.handleAjaxError(err, 'download'))\r\n\r\n /**\r\n * Creates a download request and POSTS to odata, asynchronously polls for the status of the\r\n * request and initiates the browser download after the file has been generated.\r\n * @param {string} adoptionId - the adoption's id to download its history\r\n * @returns {Promise} Resolves to true if the download was successful.\r\n */\r\n downloadHistory = (adoptionId) => {\r\n this.currentActivity.trace(`Download history task started with adoption id: ${adoptionId}`, 'RecommendationService/DownloadHistory');\r\n return this.fetchDownloadIdHistory(adoptionId)\r\n .then(this.downloadWithDownloadId)\r\n .then((pollCount) => {\r\n this.currentActivity.trace(`poll count: ${pollCount}`, 'RecommendationService/DownloadHistory');\r\n })\r\n .catch(err => this.handleAjaxError(err, 'downloadHistory'));\r\n }\r\n\r\n setApplyNotificationInfo = (options) => {\r\n applyNotificationInfo = options;\r\n }\r\n\r\n getAutoApplyOptInStatus = () => {\r\n this.currentActivity.trace('getAutoApplyOptInStatus is called', 'RecommendationService/getAutoApplyOptInStatus');\r\n const option = this.generateGetAutoApplyOptInStatusRequest();\r\n const fetchDataPromise = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n\r\n const getAutoApplyOptInStatusActivity = this.currentScenario.getAutoApplyOptInStatus.create();\r\n getAutoApplyOptInStatusActivity.start();\r\n\r\n return fetchDataPromise.then(\r\n (rawData) => {\r\n getAutoApplyOptInStatusActivity.stop();\r\n return {\r\n data: rawData,\r\n };\r\n },\r\n (err) => {\r\n if (this.showAlertHandler) {\r\n this.handleAjaxError(err, option, 'getAutoApplyOptInStatus');\r\n } else {\r\n throw (err);\r\n }\r\n return {};\r\n }\r\n );\r\n }\r\n\r\n generateGetAutoApplyOptInStatusRequest = () => {\r\n const option = getOptions(\r\n this.scope.token, undefined,\r\n {\r\n Request: {\r\n RecommendationTypes: SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES,\r\n },\r\n }\r\n );\r\n option.url = formatUrl(`${this.odataPath}${getAutoApplyOptInStatusAPI}`, this.scope);\r\n return option;\r\n }\r\n\r\n setAutoApplyOptInStatus = (op) => {\r\n this.currentActivity.trace(`setAutoApplyOptInStatus is called, isOptInStatusDelta= ${stringifySync(op.isOptInStatusDelta)}`, 'RecommendationService/setAutoApplyOptInStatus');\r\n\r\n if (_.isEmpty(op.isOptInStatusDelta)) {\r\n this.showAlertHandler({\r\n message: this.newI18n.getString(_TL_('Auto-apply preference updated.')),\r\n level: 'Info',\r\n dismissible: true,\r\n });\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n const option = this.generateSetAutoApplyOptInStatusRequest(op);\r\n const result = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n const setAutoApplyOptInStatusActivity =\r\n this.currentScenario.setAutoApplyOptInStatus.create();\r\n setAutoApplyOptInStatusActivity.start();\r\n\r\n return result.then((rawData = {}) => {\r\n setAutoApplyOptInStatusActivity.stop();\r\n return rawData;\r\n })\r\n .then(\r\n (rawData = {}) => {\r\n const isSetAutoApplyOptInStatusSuccess = rawData.ErrorCode === 0;\r\n this.showAlertHandler({\r\n message: this.newI18n.getString(_TL_(isSetAutoApplyOptInStatusSuccess ?\r\n 'Auto-apply preference updated.' : 'Auto-apply preference failed to update. Please try again later.')),\r\n level: isSetAutoApplyOptInStatusSuccess ? 'Info' : 'Warning',\r\n dismissible: true,\r\n });\r\n },\r\n (err) => {\r\n this.handleAjaxError(err, option, 'setAutoApplyOptInStatus');\r\n return [];\r\n }\r\n );\r\n };\r\n\r\n generateSetAutoApplyOptInStatusRequest = (op) => {\r\n const AAROptInStatusList = [];\r\n _.each(op.isOptInStatusDelta, (status, type) => {\r\n AAROptInStatusList.push({ Key: type, Value: status });\r\n });\r\n\r\n const option = getOptions(this.scope.token, undefined, { Request: { AAROptInStatusList } });\r\n option.url = formatUrl(`${this.odataPath}${setAutoApplyOptInStatusAPI}`, this.scope);\r\n return option;\r\n };\r\n\r\n getStockImageUrl = (queryString) => {\r\n const culture = _.get(window, ['globalLegacyI18n', 'context', 'culture']);\r\n const url = formatUrl(`${getStockImageAPI}`, this.scope);\r\n\r\n const query = _.extend({\r\n $top: 1,\r\n $skip: 0,\r\n appName: 'AdInsight',\r\n $search: queryString,\r\n language: culture,\r\n includevertical: false,\r\n });\r\n\r\n return this.odata.get(url, _.extend({ data: query }, this.odata));\r\n };\r\n\r\n getBulkAarUploadBlobUrl = (op) => {\r\n this.currentActivity.trace(`getBulkAarUploadBlobUrl is called, fileName= ${stringifySync(op.fileName)}`, 'RecommendationService/getBulkAarUploadBlobUrl');\r\n\r\n const option = this.generateBulkAarUploadBlobUrlRequest(op);\r\n const result = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n const getBulkAarUploadBlobUrlActivity =\r\n this.currentScenario.getBulkAarUploadBlobUrl.create();\r\n getBulkAarUploadBlobUrlActivity.start();\r\n\r\n return result.then((rawData = {}) => {\r\n getBulkAarUploadBlobUrlActivity.stop();\r\n return rawData;\r\n })\r\n .then(\r\n rawData => ({ data: rawData }),\r\n (err) => {\r\n this.handleAjaxError(err, option, 'getBulkAarUploadBlobUrl');\r\n return [];\r\n }\r\n );\r\n };\r\n\r\n generateBulkAarUploadBlobUrlRequest = (op) => {\r\n const option = getOptions(this.scope.token, this.lcid, { Request: { UploadedFileName: op.fileName } });\r\n\r\n option.url = formatUrl(`${this.odataPath}${getBulkAarUploadBlobAPI}`, this.scope);\r\n return option;\r\n };\r\n\r\n setBulkAarUploadBlob = (url, data) => {\r\n const headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n headers.append('x-ms-blob-type', 'BlockBlob');\r\n\r\n return fetch(url, {\r\n headers,\r\n method: 'PUT',\r\n body: data,\r\n }).then(\r\n response => response,\r\n () => {\r\n this.showAlertHandler({\r\n message: this.newI18n.getString(_TL_('Upload failed. Please try again later.')),\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n }\r\n );\r\n };\r\n\r\n submitBulkAarOptInStatusTask = (op) => {\r\n this.currentActivity.trace(`submitBulkAarOptInStatusTask is called, fileName= ${stringifySync(op.fileName)}`, 'RecommendationService/submitBulkAarOptInStatusTask');\r\n\r\n const option = this.generateSubmitBulkAarOptInStatusTaskRequest(op);\r\n const result = new Promise((resolve, reject) => {\r\n $.ajax(option).then((rawData) => {\r\n resolve(rawData);\r\n }, reject);\r\n });\r\n\r\n const submitBulkAarOptInStatusTaskActivity =\r\n this.currentScenario.submitBulkAarOptInStatusTask.create();\r\n submitBulkAarOptInStatusTaskActivity.start();\r\n\r\n return result.then((rawData = {}) => {\r\n submitBulkAarOptInStatusTaskActivity.stop();\r\n return rawData;\r\n })\r\n .then(\r\n rawData => ({ res: rawData }),\r\n (err) => {\r\n if (err.status === 400) {\r\n this.showAlertHandler({\r\n message: err.responseJSON.error.message,\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n } else if (err.status === 401) {\r\n this.showAlertHandler({\r\n message: this.newI18n.getString(_TL_('You don\\'t have access to make updates for the account id.')),\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n } else {\r\n this.handleAjaxError(err, option, 'submitBulkAarOptInStatusTask');\r\n }\r\n return [];\r\n }\r\n );\r\n };\r\n\r\n generateSubmitBulkAarOptInStatusTaskRequest = (op) => {\r\n const option = getOptions(this.scope.token, this.lcid, { Request: { UploadedFileName: op.fileName } });\r\n\r\n option.url = formatUrl(`${this.odataPath}${submitBulkAarOptInStatusTaskAPI}`, this.scope);\r\n return option;\r\n };\r\n\r\n pollBulkAarOptInStatusTask = (op) => {\r\n this.currentActivity.trace(`pollBulkAarOptInStatusTask is called, reqId= ${stringifySync(op.reqID)}`, 'RecommendationService/pollBulkAarOptInStatusTask');\r\n\r\n this.pollStatusTask = new PollTask(\r\n () => $.ajax(this.generatepollBulkAarOptInStatusTaskRequest(op)),\r\n data => data.BulkUpdateStatus === TASK_STATUS.COMPLETED,\r\n data => data.BulkUpdateStatus === TASK_STATUS.FAILED,\r\n this.asyncScheduler,\r\n 10000 // max poll count\r\n );\r\n\r\n return this.pollStatusTask.start().then((data) => {\r\n this.currentActivity.trace(`poll count: ${this.pollStatusTask.pollCount}`, 'RecommendationService/pollBulkAarOptInStatusTask');\r\n return data;\r\n }).then(\r\n (rawData = {}) => this.dealBulkAarOptInStatusResponse({ rawData }),\r\n (err) => {\r\n this.handleAjaxError(err, null, 'pollBulkAarOptInStatusTask');\r\n return [];\r\n }\r\n );\r\n };\r\n\r\n generatepollBulkAarOptInStatusTaskRequest = (op) => {\r\n const option = getOptions(this.scope.token, this.lcid, {}, 'GET');\r\n\r\n option.url = formatUrl(`${this.odataPath}${pollBulkEditAAROptInStatusTaskAPI}(Id='${op.reqId}')`, this.scope);\r\n return option;\r\n };\r\n\r\n aggregateBulkAarResult = (rawData) => {\r\n if (_.isUndefined(rawData.AggregatedResults)) {\r\n _.extend(rawData, {\r\n AggregatedResults: _.chain(_.flatten(_.map(_.chain(rawData.Results).value(), item => _.map(item.Results, resu => ({\r\n Id: item.Id,\r\n ...resu,\r\n })))))\r\n .groupBy('ErrorCode')\r\n .map((items, key) => ({\r\n ErrorCode: parseInt(key, 10),\r\n Count: _.size(items),\r\n ...items,\r\n }))\r\n .value(),\r\n });\r\n }\r\n };\r\n\r\n countBulkError = (rawData) => {\r\n const totalCount = _.reduce(\r\n rawData.AggregatedResults,\r\n (memo, singleCodeResult) => memo + singleCodeResult.Count,\r\n 0\r\n );\r\n const successfulCount = _.filter(rawData.AggregatedResults, singleCodeResult => singleCodeResult.ErrorCode === 0).length ?\r\n _.first(_.filter(rawData.AggregatedResults, singleCodeResult => singleCodeResult.ErrorCode === 0)).Count : 0;\r\n const failedCount = totalCount - successfulCount;\r\n _.extend(rawData, {\r\n totalCount,\r\n successfulCount,\r\n failedCount,\r\n });\r\n };\r\n\r\n dealBulkAarOptInStatusResponse = ({ rawData }) => {\r\n this.aggregateBulkAarResult(rawData);\r\n this.countBulkError(rawData);\r\n\r\n if (rawData.ErrorCode !== 0) {\r\n this.showAlertHandler({\r\n message: this.newI18n.getString(_TL_('Applied fail.')),\r\n level: 'Error',\r\n dismissible: true,\r\n });\r\n } else {\r\n this.showAlertHandler({\r\n message: this.newI18n.getString(_TL_('{{successCount}} applied successfully!'), { successCount: rawData.successfulCount }),\r\n level: 'Info',\r\n dismissible: true,\r\n });\r\n }\r\n\r\n return [];\r\n };\r\n}\r\n","import _ from 'underscore';\r\nimport { recommendationConfigs } from './recommendation-configs';\r\nimport {\r\n ESTIMATE_TYPES,\r\n SUMMARY_LEVELS,\r\n RECOMMENDATION_TYPES,\r\n VISUAL_TYPES,\r\n CHANNEL_ALL_RECOMMENDATIONS,\r\n CHANNEL_TYPES,\r\n MAX_NUMBER_OF_RECOMMENDATION_SAMPLES,\r\n MAX_NUMBER_OF_RECOMMENDATION_SAMPLES_WITH_OS,\r\n} from './consts';\r\nimport {\r\n formatEntityNameForHtml,\r\n formatSummary,\r\n formatCost,\r\n formatPercent,\r\n formatPercentHundredths,\r\n truncateEntityName,\r\n truncateSingleColumnEntityURL,\r\n formatDecimal,\r\n formatVisualDataChart,\r\n formatCompetitionSampleVisualDataTable,\r\n formatLocaledSourceType,\r\n formatKeyword,\r\n getCompetitionSampleInsightTitle,\r\n getModelForCompetitionSampleAction,\r\n formatInteger,\r\n} from './formatter/index';\r\n\r\nimport { getEditorialErrorMessage } from './util';\r\n\r\nconst formatInsight = (type, sample, entityName, adGroupName, i18n) => {\r\n let insight = '';\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.COMPETITIVE_BID: {\r\n const insightKey = sample.isHighConverting ?\r\n `${recommendationConfigs[type].sampleInsight}_High_Converting` :\r\n recommendationConfigs[type].sampleInsight;\r\n insight = i18n.getString(\r\n insightKey,\r\n {\r\n keyword: entityName,\r\n ad_group: adGroupName,\r\n }\r\n );\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.DEVICE_BID_BOOST:\r\n case RECOMMENDATION_TYPES.LOCATION_BID_BOOST: {\r\n insight = i18n.getString(\r\n recommendationConfigs[type].sampleInsight,\r\n {\r\n delta: formatPercent(sample.delta, i18n),\r\n segment: sample.segment,\r\n competitor_domain: sample.competitor,\r\n }\r\n );\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.SYNDICATION: {\r\n insight = i18n.getString(\r\n recommendationConfigs[type].sampleInsight,\r\n {\r\n entity_name: entityName,\r\n }\r\n );\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.BUDGET:\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD: // deprecated in Oct 2023\r\n case RECOMMENDATION_TYPES.NEW_LOCATION:\r\n default: {\r\n if (recommendationConfigs[type].sampleInsight) {\r\n insight = i18n.getString(recommendationConfigs[type].sampleInsight);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n return insight;\r\n};\r\n\r\nconst ONE_COLUMN_IN_TABLE = 'one-column-in-table';\r\nconst TWO_COLUMNS_IN_TABLE = 'two-columns-in-table';\r\nconst THREE_COLUMNS_IN_TABLE = 'three-columns-in-table';\r\nconst FOUR_COLUMNS_IN_TABLE = 'four-columns-in-table';\r\n\r\nconst formatSample = ({\r\n type,\r\n level,\r\n scope,\r\n recommendationsCount,\r\n estimates,\r\n sample,\r\n i18n,\r\n newI18n,\r\n currency,\r\n isOptimizationScoreOn,\r\n}) => {\r\n let insightTitle = '';\r\n\r\n // what you can do\r\n let actionTitle;\r\n let actions;\r\n let moreRecommendations;\r\n let viewRecommendations;\r\n let apply;\r\n\r\n // entity\r\n const entityName = sample.target && formatEntityNameForHtml(level, sample.target);\r\n const adGroupName = level === SUMMARY_LEVELS.KEYWORD\r\n && sample.target\r\n && formatEntityNameForHtml(SUMMARY_LEVELS.ADGROUP, sample.target);\r\n const isCompetition = CHANNEL_ALL_RECOMMENDATIONS[CHANNEL_TYPES.COMPETITION].indexOf(type) !== -1;\r\n\r\n // visual\r\n const { visualType } = recommendationConfigs[type];\r\n let { visualData } = sample;\r\n visualData = formatVisualDataChart(i18n, visualType, visualData);\r\n\r\n if (isCompetition) {\r\n insightTitle = getCompetitionSampleInsightTitle({\r\n type,\r\n i18n,\r\n entityName,\r\n recommendationsCount,\r\n sample,\r\n });\r\n\r\n // Action title and action\r\n ({ actionTitle, actions } = getModelForCompetitionSampleAction({\r\n type,\r\n i18n,\r\n recommendationsCount,\r\n level,\r\n entityName,\r\n currency,\r\n sample,\r\n }));\r\n\r\n if (visualType === VISUAL_TYPES.TABLE) {\r\n visualData = formatCompetitionSampleVisualDataTable({\r\n type,\r\n visualData,\r\n visualTableHeaders: recommendationConfigs[type].visualTableHeaders,\r\n i18n,\r\n currency,\r\n });\r\n }\r\n } else if (!recommendationConfigs[type].visualTableScope || !scope\r\n || _.contains(recommendationConfigs[type].visualTableScope, scope)) {\r\n let headers = [];\r\n if (visualType === VISUAL_TYPES.TABLE) {\r\n if (recommendationConfigs[type].useNewI18n === true) {\r\n headers = _.map(recommendationConfigs[type].visualTableHeaders, headerKey =>\r\n newI18n.getString(headerKey));\r\n } else {\r\n headers = _.map(recommendationConfigs[type].visualTableHeaders, headerKey =>\r\n i18n.getString(headerKey));\r\n }\r\n } else if (visualType === VISUAL_TYPES.ADS_PREVIEW) {\r\n headers = _.map(recommendationConfigs[type].visualTableHeaders, headerKey =>\r\n newI18n.getString(headerKey));\r\n }\r\n\r\n const values = [];\r\n let highlights = [];\r\n let alignments;\r\n let columnWidths;\r\n let maxNumberOfRecommendationSamples = isOptimizationScoreOn ?\r\n MAX_NUMBER_OF_RECOMMENDATION_SAMPLES_WITH_OS : MAX_NUMBER_OF_RECOMMENDATION_SAMPLES;\r\n\r\n if (type === RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS) {\r\n maxNumberOfRecommendationSamples = MAX_NUMBER_OF_RECOMMENDATION_SAMPLES;\r\n }\r\n\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n formatKeyword(row.recommendedKeyword, row.matchType),\r\n formatLocaledSourceType(i18n, row.recommendedSource),\r\n ]);\r\n });\r\n highlights = [false, true];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.TRENDING_QUERY: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n formatKeyword(row.recommendedKeyword, row.matchType),\r\n {\r\n nullableArrow: true,\r\n value: `↑ ${_.isString(row.searchVolumeIncrease) ? row.searchVolumeIncrease : formatPercentHundredths(row.searchVolumeIncrease, i18n)}`,\r\n },\r\n ]);\r\n });\r\n highlights = [false, true];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS: {\r\n _.map(_.first(sample.visualData[0].searchExamples, maxNumberOfRecommendationSamples), (example) => { // eslint-disable-line max-len\r\n values.push([example]);\r\n });\r\n if (_.size(sample.visualData[0].searchExamples) > maxNumberOfRecommendationSamples) {\r\n values.push(['...']);\r\n }\r\n\r\n highlights = [false];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.SITE_LINK:\r\n case RECOMMENDATION_TYPES.CALLOUT: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: TWO_COLUMNS_IN_TABLE,\r\n value: row.campaignName,\r\n },\r\n `↑ ${formatPercentHundredths(row.ctrLift, i18n)}`,\r\n ]);\r\n });\r\n highlights = [false, true];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY:\r\n case RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY: {\r\n const headerKey = estimates.primaryEstimate === ESTIMATE_TYPES.CONVERSIONS ?\r\n 'Summary_Card_Action_Header_Est_Conv' : 'Summary_Card_Action_Header_Est_Clicks';\r\n headers.push(i18n.getString(headerKey));\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: TWO_COLUMNS_IN_TABLE,\r\n value: row.entityName,\r\n },\r\n `+${estimates.primaryEstimate === ESTIMATE_TYPES.CONVERSIONS ?\r\n formatDecimal(row.convIncrease, i18n) : formatDecimal(row.clicksIncrease, i18n)}`,\r\n ]);\r\n });\r\n highlights = [false, true];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.REPAIR_ADS:\r\n case RECOMMENDATION_TYPES.REPAIR_KEYWORD: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: ONE_COLUMN_IN_TABLE,\r\n value: row.adGroupName,\r\n },\r\n ]);\r\n });\r\n highlights = [false];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n row.recommendedKeyword,\r\n ]);\r\n });\r\n highlights = [false];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n formatKeyword(row.negativeKeyword, row.matchType),\r\n formatKeyword(row.blockedKeyword, row.blockedKeywordMatchType),\r\n ]);\r\n });\r\n highlights = [false, false];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: ONE_COLUMN_IN_TABLE,\r\n value: row.adGroupName,\r\n },\r\n ]);\r\n });\r\n highlights = [false];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.REALLOCATE_BUDGET: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n formatCost(row.suggestBudget, i18n, i18n.currency),\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: FOUR_COLUMNS_IN_TABLE,\r\n value: row.fromCampaign,\r\n },\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: FOUR_COLUMNS_IN_TABLE,\r\n value: row.toCampaign,\r\n },\r\n `+${formatDecimal(row.clicksIncrease, i18n)}`,\r\n ]);\r\n });\r\n alignments = ['right', 'left', 'left', 'right'];\r\n highlights = [false, false, false, true];\r\n columnWidths = ['19%', '27%', '27%', '27%'];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.FIX_AD_DESTINATION: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n truncateSingleColumnEntityURL(row.UrlOrLandingPage),\r\n ]);\r\n });\r\n highlights = [false];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.FIX_AD_TEXT: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n truncateEntityName(getEditorialErrorMessage(row.policyCode)),\r\n formatInteger(row.numberRejectedAds, i18n),\r\n formatInteger(row.numberRejectedKeywords, i18n),\r\n ]);\r\n });\r\n highlights = [false, false, false];\r\n columnWidths = ['50%', '25%', '25%'];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.MULTIMEDIA_ADS: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: ONE_COLUMN_IN_TABLE,\r\n value: row.adGroupName,\r\n },\r\n ]);\r\n });\r\n highlights = [false];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.IMAGE_EXTENSION: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: TWO_COLUMNS_IN_TABLE,\r\n value: row.campaignName,\r\n },\r\n `+${formatDecimal(row.clicksIncrease, i18n)}`,\r\n ]);\r\n });\r\n highlights = [false, true];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n row.keyword,\r\n `+${formatDecimal(row.impressionsIncrease, i18n)}`,\r\n ]);\r\n });\r\n highlights = [false, true];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n formatKeyword(row.keyword, row.matchType),\r\n formatCost(row.suggestedBid, i18n, i18n.currency),\r\n {\r\n nullableArrow: true,\r\n value: row.impressionsIncrease === 0 ?\r\n null : `+${formatInteger(row.impressionsIncrease, i18n)}`,\r\n },\r\n ]);\r\n });\r\n highlights = [false, false, true];\r\n columnWidths = ['50%', '25%', '25%'];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: THREE_COLUMNS_IN_TABLE,\r\n value: row.campaignName,\r\n },\r\n `+${formatDecimal(row.targetedProductsIncrease, i18n)}`,\r\n {\r\n nullableArrow: true,\r\n value: row.impressionsIncrease === 0 ?\r\n null : `+${formatInteger(row.impressionsIncrease, i18n)}`,\r\n },\r\n ]);\r\n });\r\n highlights = [false, true, true];\r\n columnWidths = ['50%', '25%', '25%'];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push(row);\r\n });\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: ONE_COLUMN_IN_TABLE,\r\n value: row.campaignName,\r\n },\r\n ]);\r\n });\r\n highlights = [false];\r\n break;\r\n }\r\n case RECOMMENDATION_TYPES.SYNDICATION_GAP: {\r\n _.map(_.first(sample.visualData, maxNumberOfRecommendationSamples), (row) => {\r\n values.push([\r\n {\r\n enabledToolTip: true,\r\n toolTipClass: THREE_COLUMNS_IN_TABLE,\r\n value: row.campaignName,\r\n },\r\n `+${formatDecimal(row.clicksIncrease, i18n)}`,\r\n `+${formatDecimal(row.convIncrease, i18n)}`,\r\n ]);\r\n });\r\n highlights = [false, true, true];\r\n break;\r\n }\r\n default: {\r\n break;\r\n }\r\n }\r\n if (_.size(sample.visualData) > maxNumberOfRecommendationSamples\r\n && type !== RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS\r\n && type !== RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS) {\r\n values.push(_.map(headers, () => '...'));\r\n }\r\n\r\n if (_.isEmpty(values)) {\r\n headers.pop();\r\n }\r\n\r\n visualData = {\r\n headers,\r\n values,\r\n highlights,\r\n alignments,\r\n columnWidths,\r\n };\r\n }\r\n\r\n // insight\r\n const insight = formatInsight(type, sample, entityName, adGroupName, i18n);\r\n\r\n if (recommendationsCount > 1) {\r\n moreRecommendations = i18n.getString('Summary_Card_More_Recommendations');\r\n viewRecommendations = i18n.getString(\r\n 'Summary_Card_View_Recommendations_Multi',\r\n { n: i18n.formatDecimalToInteger(recommendationsCount) }\r\n );\r\n apply = i18n.getString('Summary_Card_Apply_All');\r\n } else {\r\n moreRecommendations = null;\r\n viewRecommendations = i18n.getString('Summary_Card_View_Recommendations');\r\n apply = i18n.getString('Button_Apply');\r\n }\r\n\r\n return {\r\n sample: {\r\n insightTitle,\r\n insight,\r\n visualType,\r\n visualData,\r\n actionTitle,\r\n actions,\r\n moreRecommendations,\r\n },\r\n viewRecommendations,\r\n apply,\r\n };\r\n};\r\n\r\n/**\r\n * @param {Object} options - options for formatting summary model\r\n * @param {string} options.type - recommendation type\r\n * @param {string} options.level - target level of the recommendation.\r\n * For example, Device bid boost and Location bid boost can target Campaign or AdGroup.\r\n * @param {string} options.scope - current scope user selected in wunderbar\r\n * @param {Object} options.sample - sample data for summary card (insight, actions)\r\n * @param {number} options.recommendationsCount - total count of recommendations\r\n * @param {boolean} options.isHighConverting - if the ALL recommendations for this type\r\n * is HighConverting.\r\n * @param {string} options.currency - currency for current account\r\n * @param {Object} options.i18n - Localization component\r\n * @return {Object} formatted model for React component to render\r\n */\r\nexport const getSummaryCardModel = (options) => {\r\n const summary = formatSummary(options);\r\n const sample = formatSample(options);\r\n\r\n return _.extend(\r\n {\r\n summary,\r\n type: options.type,\r\n level: options.level,\r\n },\r\n sample\r\n );\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\n\r\nexport function mapScope(scope) {\r\n const {\r\n accountId,\r\n adGroupId,\r\n campaignId,\r\n customerId,\r\n } = scope;\r\n let levelAt = levelAtConstant.CUSTOMER;\r\n let entityIds = [customerId];\r\n\r\n if (adGroupId) {\r\n levelAt = levelAtConstant.ADGROUP;\r\n entityIds = [adGroupId];\r\n } else if (campaignId) {\r\n levelAt = levelAtConstant.CAMPAIGN;\r\n entityIds = [campaignId];\r\n } else if (accountId) {\r\n levelAt = levelAtConstant.ACCOUNT;\r\n entityIds = [accountId];\r\n }\r\n\r\n return _.defaults({}, scope, {\r\n levelAt,\r\n entityIds,\r\n });\r\n}\r\n\r\nexport const withRecommendationsScope = (WrappedComponent) => {\r\n const HoC = (props) => {\r\n const scope = !_.isEmpty(props.scope) ? mapScope(props.scope) : null;\r\n const key = scope ?\r\n _.first(scope.entityIds) || scope.levelAt :\r\n '';\r\n return (\r\n \r\n );\r\n };\r\n\r\n HoC.displayName = `withRecommendationsScope(${getDisplayName(WrappedComponent)})`;\r\n HoC.propTypes = {\r\n scope: PropTypes.shape({\r\n accountId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n adGroupId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n campaignId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n customerId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n token: PropTypes.string,\r\n }),\r\n };\r\n HoC.defaultProps = {\r\n scope: null,\r\n };\r\n\r\n hoistNonReactStatics(HoC, WrappedComponent);\r\n\r\n return HoC;\r\n};\r\n","import { StateStore } from '@bingads-webui/state-store';\r\n\r\nexport const sharedComponentFunctionStateStore = new StateStore({});\r\n","import { RECOMMENDATION_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\n\r\n// This is traditional reasons for reject single/multiple with multiple choices (log in aria).\r\nexport const reasonsMapping = {\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY]: [\r\n 'KwdDoNotAdopt',\r\n 'KwdNotRelevant',\r\n 'KwdHighSpend',\r\n 'KwdOther',\r\n ],\r\n [RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD]: [\r\n 'BmaDoNotAdd',\r\n 'BmaNotRelevant',\r\n 'BmaHighSpend',\r\n 'BmaOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REMOVE_CONFLICTING_NEGATIVE_KEYWORD]: [\r\n 'RcnkwIntentional',\r\n 'RcnkwRatherAdj',\r\n 'RcnkwNotInterested',\r\n 'RcnkwOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: [\r\n 'HaveAddressed',\r\n 'PendingEditoria',\r\n 'DynamicSearch',\r\n 'NotLikeAdgroup',\r\n 'AddressOutsideRecs',\r\n 'RepairOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: [\r\n 'HaveAddressed',\r\n 'PendingEditoria',\r\n 'DynamicSearch',\r\n 'NotLikeAdgroup',\r\n 'AddressOutsideRecs',\r\n 'RepairOther',\r\n ],\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: [\r\n 'RsaNeedApprovalBeforeApply',\r\n 'RSAHasCompetitorInfo',\r\n 'RSATooSensitive',\r\n 'RSAOutdated',\r\n 'RSANotLikeWording',\r\n 'RsaAddRecommendedAdsLater',\r\n 'RsaNeedOptOutAAR',\r\n 'RSAOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_AD_TEXT]: [\r\n 'WIP',\r\n 'WontFix',\r\n 'ResolveOutsideAds',\r\n 'RepairOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: [\r\n 'WIP',\r\n 'WontFix',\r\n 'ResolveOutsideAds',\r\n 'RepairOther',\r\n ],\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: [\r\n 'SetupConvDoItLater',\r\n 'SetupConvNeedAssistance',\r\n 'SetupConvWorking',\r\n 'SetupConvCannotMakeChanges',\r\n 'SetupConvUseOtherTool',\r\n 'SetupConvNotRelevant',\r\n 'RepairOther',\r\n ],\r\n [RECOMMENDATION_TYPES.TRENDING_QUERY]: [\r\n 'KwdDoNotAdopt',\r\n 'KwdNotRelevant',\r\n 'KwdHighSpend',\r\n 'KwdOther',\r\n ],\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: [\r\n 'MmaNotAddToAdGroup',\r\n 'MmaNotLikeImages',\r\n 'MmaNotLikeHeadlinesOrAdText',\r\n 'MmaBadCombinations',\r\n ],\r\n [RECOMMENDATION_TYPES.IMAGE_EXTENSION]: [\r\n 'ImageAdExtNotAddToAdGroup',\r\n 'ImageAdExtNotLikeImages',\r\n 'ImageAdExtConcernQuality',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: [\r\n 'FixRepairMissingKeywordParamsFixItLater',\r\n 'FixRepairMissingKeywordParamsDoNotLikeSuggestedParamValues',\r\n 'FixRepairMissingKeywordParamsNotSignificant',\r\n 'FixRepairMissingKeywordParamsAlreadyFixedThisIssue',\r\n 'FixRepairMissingKeywordParamsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: [\r\n 'FixNoImpressionBidSuggestTooHigh',\r\n 'FixNoImpressionBidSuggestNotSignificant',\r\n 'FixNoImpressionBidHaveAdjusted',\r\n 'FixNoImpressionBidOther',\r\n ],\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: [\r\n 'FixImproveResponsiveSearchAdsImproveLater',\r\n 'FixImproveResponsiveSearchAdsNotSignificant',\r\n 'FixImproveResponsiveSearchAdsDoNotLikeHeadlineDescription',\r\n 'FixImproveResponsiveSearchAdsSpendIncreaseTooMuch',\r\n 'FixImproveResponsiveSearchAdsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: [\r\n 'FixRepairUntargetedOfferNotRelevant',\r\n 'FixRepairUntargetedOfferManageInconvenient',\r\n 'FixRepairUntargetedOfferExcludedIntentionally',\r\n 'FixRepairUntargetedOfferNotUnderstand',\r\n 'FixRepairUntargetedOfferImprovementLater',\r\n 'FixRepairUntargetedOfferOther',\r\n ],\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: [\r\n 'ImproveMultiMediaAdsImprovementLater',\r\n 'ImproveMultiMediaAdsNotSignificant',\r\n 'ImproveMultiMediaAdsNotLikeRecommendedImages',\r\n 'ImproveMultiMediaAdsNotLikeRecommendedTextOrHeadlines',\r\n 'ImproveMultiMediaAdsIncreaseMySpendTooMuch',\r\n 'ImproveMultiMediaAdsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION]: [\r\n 'DSA2PMaxMigrationNoApplyUntilAttributesReviewed',\r\n 'DSA2PMaxMigrationUnsureRecommendedCampaignIsImprovement',\r\n 'DSA2PMaxMigrationCreatePerformanceMaxCampaignByMyOwn',\r\n 'DSA2PMAxMigrationOther',\r\n ],\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: [\r\n 'SyndicationGapCannotDisplayOnMicrosoftAdsNetwork',\r\n 'SyndicationGapNotInterestedOnEntireMicrosoftAdsNetwork',\r\n 'SyndicationGapOther',\r\n ],\r\n};\r\n\r\nexport const reasonsMappingNewI18n = {\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: {\r\n FixRepairMissingKeywordParamsFixItLater: _TL_('I will fix this issue later.'),\r\n FixRepairMissingKeywordParamsDoNotLikeSuggestedParamValues: _TL_('I don\\'t like the suggested param values.'),\r\n FixRepairMissingKeywordParamsNotSignificant: _TL_('The estimates show no significant improvement.'),\r\n FixRepairMissingKeywordParamsAlreadyFixedThisIssue: _TL_('I have already fixed this issue.'),\r\n FixRepairMissingKeywordParamsOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: {\r\n FixNoImpressionBidSuggestTooHigh: _TL_('The suggested bids are higher than expected.'),\r\n FixNoImpressionBidSuggestNotSignificant: _TL_('The suggestion shows no significant improvement.'),\r\n FixNoImpressionBidHaveAdjusted: _TL_('I have recently adjusted the bid.'),\r\n FixNoImpressionBidOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: {\r\n FixImproveResponsiveSearchAdsImproveLater: _TL_('I will make the improvement later.'),\r\n FixImproveResponsiveSearchAdsNotSignificant: _TL_('The performance of responsive search ads show no significant improvement.'),\r\n FixImproveResponsiveSearchAdsDoNotLikeHeadlineDescription: _TL_('I don\\'t like the suggested headlines or descriptions.'),\r\n FixImproveResponsiveSearchAdsSpendIncreaseTooMuch: _TL_('The estimated increase of spend by adopting the recommendation is too high.'),\r\n FixImproveResponsiveSearchAdsOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: {\r\n FixRepairUntargetedOfferNotRelevant: _TL_('The suggested campaigns do not align with my business goal.'),\r\n FixRepairUntargetedOfferManageInconvenient: _TL_('Managing a catch-all campaign is inconvenient.'),\r\n FixRepairUntargetedOfferExcludedIntentionally: _TL_('I want to exclude some product offers from my shopping campaign.'),\r\n FixRepairUntargetedOfferNotUnderstand: _TL_('I don\\'t know why this has been recommended to me.'),\r\n FixRepairUntargetedOfferImprovementLater: _TL_('I\\'ll create a catch-all shopping campaign later.'),\r\n FixRepairUntargetedOfferOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: {\r\n ImproveMultiMediaAdsImprovementLater: _TL_('I\\'ll apply this recommendation later.'),\r\n ImproveMultiMediaAdsNotSignificant: _TL_('The recommendation doesn\\'t improve my multimedia ad performance.'),\r\n ImproveMultiMediaAdsNotLikeRecommendedImages: _TL_('I don\\'t like the recommended images.'),\r\n ImproveMultiMediaAdsNotLikeRecommendedTextOrHeadlines: _TL_('I don\\'t like the recommended ad texts or headlines.'),\r\n ImproveMultiMediaAdsIncreaseMySpendTooMuch: _TL_('The recommendation will likely increase my spend too much.'),\r\n ImproveMultiMediaAdsOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION]: {\r\n DSA2PMaxMigrationNoApplyUntilAttributesReviewed: _TL_('I don\\'t want to apply the recommendation unless I can review the recommended attributes for the Performance Max campaign.'),\r\n DSA2PMaxMigrationUnsureRecommendedCampaignIsImprovement: _TL_('I\\'m unsure that the recommended campaign will be an improvement.'),\r\n DSA2PMaxMigrationCreatePerformanceMaxCampaignByMyOwn: _TL_('I\\'ll create my own Performance Max campaign.'),\r\n DSA2PMAxMigrationOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: {\r\n SyndicationGapCannotDisplayOnMicrosoftAdsNetwork: _TL_('The ads from the selected ad groups cannot be displayed on the Microsoft Advertising Network.'),\r\n SyndicationGapNotInterestedOnEntireMicrosoftAdsNetwork: _TL_('I don\\'t want the ads from the selected ad groups to be shown on the entire Microsoft Advertising Network.'),\r\n SyndicationGapOther: _TL_('Other'),\r\n },\r\n};\r\n\r\nexport const reasonsMappingAutoApplyFeedback = [\r\n 'NewAdsReviewAds',\r\n 'NewAdsConcernQuality',\r\n 'NewAdsConcernPerformance',\r\n 'NewAdsOther',\r\n];\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { CheckboxGroup } from '@bingads-webui-react/checkbox';\r\n\r\nimport { CommentsField } from '@bingads-webui-campaign-react/recommendation-feedback-modal';\r\nimport {\r\n reasonsMapping,\r\n reasonsMappingNewI18n,\r\n reasonsMappingAutoApplyFeedback,\r\n} from './dismiss-feedback-const';\r\n\r\nexport class DismissFeedbackForm extends React.PureComponent {\r\n static propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }),\r\n recommendationType: PropTypes.string.isRequired,\r\n changeState: PropTypes.func,\r\n onSubmit: PropTypes.func.isRequired,\r\n rejectAutoApplySuggestedAds: PropTypes.bool,\r\n isAccountSettings: PropTypes.bool,\r\n };\r\n static defaultProps = {\r\n changeState: null,\r\n rejectAutoApplySuggestedAds: false,\r\n isAccountSettings: false,\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n if (!_.isUndefined(reasonsMappingNewI18n[props.recommendationType])) {\r\n this.useNewI18n = true;\r\n this.reasonWithNewI18n = reasonsMappingNewI18n[props.recommendationType];\r\n }\r\n }\r\n\r\n state = {\r\n reasonIds: [],\r\n reasonNote: '',\r\n notshowagain: false,\r\n };\r\n\r\n onReasonChange = (checked) => {\r\n this.setState({\r\n reasonIds: checked,\r\n }, this.submitStateChange);\r\n }\r\n\r\n onSubmit = () => {\r\n // todo: in discussion.\r\n const { reasonIds, reasonNote, notshowagain } = this.state;\r\n const expireTime = Date.now() + (notshowagain ? (30 * 24 * 60 * 60 * 1000) : 0);\r\n const reasons = _.map(reasonIds, id => (this.useNewI18n ?\r\n this.props.newI18n.getString(this.reasonWithNewI18n[id]) :\r\n this.props.i18n.getString(`Recommendation_Dismiss_Feedback_${id}`)));\r\n this.props.onSubmit({\r\n reason: JSON.stringify({ reasons, reasonNote, reasonIds }),\r\n preference: {\r\n type: this.props.recommendationType,\r\n expireTime,\r\n },\r\n });\r\n }\r\n\r\n onCommentChange = (value) => {\r\n this.setState({\r\n reasonNote: value,\r\n }, this.submitStateChange);\r\n }\r\n onPreferenceChange = (e) => {\r\n const { checked } = e.target;\r\n this.setState({\r\n notshowagain: checked,\r\n }, this.submitStateChange);\r\n }\r\n submitStateChange() {\r\n if (this.props.changeState) {\r\n const submitDisabled = !this.state.notshowagain && this.state.reasonNote === '' && _.isEmpty(this.state.reasonIds);\r\n this.props.changeState(submitDisabled);\r\n }\r\n }\r\n\r\n renderCheckbox = reasonId => (this.useNewI18n ?\r\n this.props.newI18n.getString(this.reasonWithNewI18n[reasonId]) :\r\n this.props.i18n.getString(`Recommendation_Dismiss_Feedback_${reasonId}`));\r\n\r\n renderReasons() {\r\n const { rejectAutoApplySuggestedAds, isAccountSettings } = this.props;\r\n let reasons = rejectAutoApplySuggestedAds ?\r\n undefined :\r\n reasonsMapping[this.props.recommendationType];\r\n if (isAccountSettings) {\r\n reasons = reasonsMappingAutoApplyFeedback;\r\n }\r\n if (_.isEmpty(reasons)) {\r\n return null;\r\n }\r\n return (\r\n
    \r\n \r\n
    );\r\n }\r\n\r\n render() {\r\n const { i18n, rejectAutoApplySuggestedAds, isAccountSettings } = this.props;\r\n const submitDisabled = !this.state.notshowagain && this.state.reasonNote === '' && _.isEmpty(this.state.reasonIds);\r\n const title = rejectAutoApplySuggestedAds ?\r\n i18n.getString('Recommendation_Dismiss_Feedback_Popup_Title_NotToAutoApplySuggestedAds') :\r\n i18n.getString('Recommendation_Dismiss_Feedback_Popup_Title');\r\n const blurb = rejectAutoApplySuggestedAds ?\r\n i18n.getString('Recommendation_Dismiss_Feedback_Popup_Blurb_NotToAutoApplySuggestedAds') :\r\n i18n.getString('Recommendation_Dismiss_Feedback_Popup_Blurb');\r\n return (\r\n
    \r\n

    {title}

    \r\n

    {blurb}

    \r\n {this.renderReasons()}\r\n
    \r\n \r\n
    \r\n\r\n
    \r\n \r\n {i18n.getString('Recommendation_Feedback_Submit_Action')}\r\n \r\n
    \r\n {!isAccountSettings &&
    }\r\n
    \r\n );\r\n }\r\n}\r\n","/* eslint-disable no-unused-vars */\r\nimport { RECOMMENDATION_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\nimport { reasonsMapping } from './dismiss-feedback-const';\r\n\r\nexport const OTHER_REASON = 'Other';\r\nexport const REASON_TABLE = {\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: [\r\n 'BudgetNoBudget',\r\n 'BudgetTooHigh',\r\n 'BudgetCpcTooHigh',\r\n 'BudgetDoLater',\r\n 'BudgetOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: [\r\n 'FixConvGoalFixItLater',\r\n 'FixConvGoalCurrentSettingCorrect',\r\n 'FixConvGoalNeedAssistanceToFix',\r\n 'FixConvGoalAlreadyFixed',\r\n 'FixConvGoalGoalNotUse',\r\n 'FixConvGoalOther',\r\n ],\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: [\r\n 'CreateConvGoalCreateItLater',\r\n 'CreateConvGoalNotInterested',\r\n 'CreateConvGoalGoalTypeNotMatched',\r\n 'CreateConvGoalAlreadyExist',\r\n 'CreateConvGoalInappropriateSuggestion',\r\n 'CreateConvGoalOther',\r\n ],\r\n budgetLandscape: [\r\n 'NoBudget',\r\n 'RecommendedBudgetHigh',\r\n 'CPCHigh',\r\n OTHER_REASON,\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: [\r\n 'RepairAdsAlreadyAddressed',\r\n 'RepairAdsPendingEditorial',\r\n 'RepairAdsDsaAsSearch',\r\n 'RepairAdsIntentional',\r\n 'RepairAdsAddressOutside',\r\n 'RepairAdsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: [\r\n 'RepairKeywordsAlreadyAddressed',\r\n 'RepairKeywordsPendingEditorial',\r\n 'RepairKeywordsDsaAsSearch',\r\n 'RepairKeywordsIntentional',\r\n 'RepairKeywordsAddressOutside',\r\n 'RepairKeywordsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_AD_TEXT]: [\r\n 'FixAdContWIP',\r\n 'FixAdContWontFix',\r\n 'FixAdContResolveOutsideAds',\r\n 'FixAdContOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: [\r\n 'FixAdDestWIP',\r\n 'FixAdDestWontFix',\r\n 'FixAdDestResolveOutsideAds',\r\n 'FixAdDestOther',\r\n ],\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: [\r\n 'SetupConvDoItLater',\r\n 'SetupConvNeedAssistance',\r\n 'SetupConvWorking',\r\n 'SetupConvCannotMakeChanges',\r\n 'SetupConvUseOtherTool',\r\n 'SetupConvNotRelevant',\r\n 'SetupConvOther',\r\n ],\r\n};\r\n\r\n// don't have to know which opt those reasons belong to\r\nexport const PERCENT_INPUT_REASON_LIST = [\r\n 'BudgetTooHigh',\r\n 'RecommendedBudgetHigh',\r\n];\r\n\r\nexport const NUMBER_INPUT_REASON_LIST = [\r\n 'BudgetCpcTooHigh',\r\n 'CPCHigh',\r\n];\r\n\r\nexport const COMMENT_ONLY_REASON_LIST = [\r\n 'FixConvGoalGoalNotUse',\r\n];\r\n\r\nexport const COMMENT_WITH_URL_REASON_LIST = [\r\n 'FixConvGoalNeedAssistanceToFix',\r\n];\r\n\r\nexport const URL_FOR_COMMENT_WITH_URL_REASON_LIST = {\r\n [COMMENT_WITH_URL_REASON_LIST.FixConvGoalNeedAssistanceToFix]: 'http://go.microsoft.com/fwlink/?LinkId=258669',\r\n};\r\n\r\nexport const RECOMMENDATION_TYPES_SUPPORT_NEW_DISMISS_FORM = {\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: true,\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: true,\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: true,\r\n budgetLandscape: true,\r\n};\r\n\r\nexport const RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR = {\r\n BudgetTooHigh: 'Recommendation_Feedback_Reason_BudgetHigh_Comment',\r\n BudgetCpcTooHigh: 'Recommendation_Feedback_Reason_CPCHigh_Comment',\r\n RecommendedBudgetHigh: 'Recommendation_Feedback_Reason_BudgetHigh_Comment',\r\n CPCHigh: 'Recommendation_Feedback_Reason_CPCHigh_Comment',\r\n FixConvGoalNeedAssistanceToFix: 'Recommendation_Dismiss_Feedback_NeedAssistanceToFix_Comment',\r\n FixConvGoalGoalNotUse: 'Recommendation_Dismiss_Feedback_GoalNotUse_Comment',\r\n};\r\n\r\nexport function isNewFeedbackOpportunity(RecommendationType) {\r\n return RecommendationType in REASON_TABLE;\r\n}\r\n\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Input } from '@bingads-webui-react/primitive-validation';\r\n\r\nexport class PercentInput extends React.PureComponent {\r\n static propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n reasonId: PropTypes.string.isRequired,\r\n callback: PropTypes.func.isRequired,\r\n comment: PropTypes.string,\r\n };\r\n\r\n static defaultProps = {\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n comment: '',\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { value: '' };\r\n this.isNewI18n = props.newI18n.getString !== _.noop;\r\n }\r\n\r\n onValidate = ({ data }) => {\r\n this.setState({\r\n value: data.percent,\r\n });\r\n }\r\n\r\n handleChange = (e) => {\r\n this.setState({\r\n value: e.target.value,\r\n });\r\n this.props.callback(e.target.value);\r\n }\r\n\r\n percentValidator = (percent) => {\r\n const { i18n, newI18n } = this.props;\r\n const errorText = this.isNewI18n ? newI18n.getString(_TL_('invalid input')) : i18n.getString('Budget_Landscape_Validator_Invalid_Input');\r\n const numStr = Number(percent);\r\n if (!_.isNaN(numStr) && numStr > 0) {\r\n return [];\r\n }\r\n return [errorText];\r\n }\r\n\r\n render() {\r\n const {\r\n reasonId, newI18n, i18n, comment,\r\n } = this.props;\r\n const { value } = this.state;\r\n\r\n return (\r\n
    \r\n
    \r\n {i18n.getString(comment)}\r\n
    \r\n
    \r\n \r\n %\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Input, ValidationGroup } from '@bingads-webui-react/primitive-validation';\r\n\r\nexport class NumberInput extends React.PureComponent {\r\n static propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n reasonId: PropTypes.string.isRequired,\r\n callback: PropTypes.func.isRequired,\r\n comment: PropTypes.string,\r\n };\r\n\r\n static defaultProps = {\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n comment: '',\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { value: '' };\r\n this.schema = {\r\n properties: {\r\n Number: {\r\n blockInput: false,\r\n type: 'number',\r\n nullable: true,\r\n maxLength: 128,\r\n minimum: 0.00,\r\n },\r\n },\r\n };\r\n }\r\n\r\n handleChange=(e) => {\r\n this.setState({\r\n value: e.target.value,\r\n });\r\n this.props.callback(e.target.value);\r\n }\r\n\r\n\r\n render() {\r\n const {\r\n reasonId, newI18n, i18n, comment,\r\n } = this.props;\r\n const { value } = this.state;\r\n const isNewI18n = newI18n.getString !== _.noop;\r\n return (\r\n \r\n
    \r\n {i18n.getString(comment)}\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Radio } from '@bingads-webui-react/radio';\r\n\r\nimport { CommentsField } from '@bingads-webui-campaign-react/recommendation-feedback-modal';\r\nimport {\r\n REASON_TABLE,\r\n OTHER_REASON,\r\n NUMBER_INPUT_REASON_LIST,\r\n PERCENT_INPUT_REASON_LIST,\r\n RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR,\r\n COMMENT_ONLY_REASON_LIST,\r\n COMMENT_WITH_URL_REASON_LIST,\r\n URL_FOR_COMMENT_WITH_URL_REASON_LIST,\r\n} from './single-choice-reason-const';\r\nimport { PercentInput } from './customized-input/percent-input';\r\nimport { NumberInput } from './customized-input/number-input';\r\n\r\nexport class SingleChoiceDismissFeedbackForm extends React.PureComponent {\r\n static propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n type: PropTypes.string.isRequired,\r\n changeState: PropTypes.func,\r\n onSubmit: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n rejectAutoApplySuggestedAds: PropTypes.bool,\r\n };\r\n static defaultProps = {\r\n changeState: null,\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n rejectAutoApplySuggestedAds: false,\r\n };\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n reasonId: null,\r\n reasonNote: '',\r\n notshowagain: false,\r\n };\r\n this.reasonSuggestedValue = '';\r\n }\r\n\r\n onSubmit = () => {\r\n const {\r\n reasonId, reasonNote, notshowagain,\r\n } = this.state;\r\n const {\r\n i18n, type, onSubmit,\r\n } = this.props;\r\n\r\n const reasonString = i18n.getString(`Recommendation_Feedback_Reason_${reasonId}`);\r\n\r\n const reasonIds = _.isNull(reasonId) ? [] : [reasonId];\r\n const submittedReason = JSON.stringify({\r\n reasonString,\r\n reasonIds,\r\n reasonNote: reasonNote || this.reasonSuggestedValue,\r\n });\r\n\r\n if (type === 'budgetLandscape') {\r\n onSubmit({ reason: submittedReason }, reasonId);\r\n } else {\r\n const expireTime = Date.now() + (notshowagain ? (30 * 24 * 60 * 60 * 1000) : 0);\r\n onSubmit(\r\n {\r\n reason: submittedReason,\r\n preference: {\r\n type,\r\n expireTime,\r\n },\r\n },\r\n reasonId\r\n );\r\n }\r\n }\r\n\r\n onReasonNoteChange = (value) => {\r\n this.setState({\r\n reasonNote: value,\r\n }, this.submitStateChange);\r\n }\r\n\r\n onPreferenceChange = (e) => {\r\n const { checked } = e.target;\r\n this.setState({\r\n notshowagain: checked,\r\n }, this.submitStateChange);\r\n }\r\n\r\n setReasonSuggestedValue = (value) => {\r\n this.reasonSuggestedValue = value;\r\n }\r\n\r\n handleReasonChange = (e) => {\r\n this.setState({\r\n reasonId: e.target.id,\r\n reasonNote: '',\r\n }, this.submitStateChange);\r\n this.reasonSuggestedValue = '';\r\n };\r\n\r\n submitStateChange() {\r\n if (this.props.changeState) {\r\n const submitDisabled = !this.state.notshowagain && this.state.reasonNote === '' && _.isEmpty(this.state.reasonId);\r\n this.props.changeState(submitDisabled);\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n reasonId, reasonNote,\r\n } = this.state;\r\n const submitDisabled = !this.state.notshowagain && this.state.reasonNote === '' && _.isEmpty(this.state.reasonId);\r\n const {\r\n i18n,\r\n type,\r\n newI18n,\r\n onCancel,\r\n rejectAutoApplySuggestedAds,\r\n } = this.props;\r\n\r\n // don't have to judge again whether type in reason table;\r\n // it is judged in the parent component\r\n const reasonIds = rejectAutoApplySuggestedAds ?\r\n undefined :\r\n REASON_TABLE[type];\r\n const isForBudgetLandscape = type === 'budgetLandscape';\r\n\r\n const title = isForBudgetLandscape ?\r\n i18n.getString('Budget_Landscape_Feedback_Title') :\r\n i18n.getString('Recommendation_Feedback_Dismiss_Title_New');\r\n\r\n // the budget landscape popup set position to absolute in css,\r\n // and the close button in campaign UI use different class name,\r\n // so we need to put the close button in form rather than popover.\r\n // If we don't do this, the close button would disappear.\r\n return (\r\n
    \r\n
    \r\n
    \r\n {title}\r\n {isForBudgetLandscape &&
    \r\n
    \r\n {!isForBudgetLandscape && i18n.getString('Recommendation_Product_Feedback_Loop_Make_Better_Description')}\r\n
    \r\n
    \r\n\r\n \r\n
    \r\n {_.map(reasonIds, (id, index) => (\r\n \r\n {i18n.getString(`Recommendation_Feedback_Reason_${id}`) || i18n.getString(`Recommendation_Dismiss_Feedback_${id}`)}\r\n {_.isEqual(id, reasonId) && _.isEqual(index, reasonIds.length - 1) &&\r\n
    \r\n \r\n
    \r\n }\r\n {_.isEqual(id, reasonId) && PERCENT_INPUT_REASON_LIST.includes(id) &&\r\n
    \r\n \r\n
    \r\n }\r\n {_.isEqual(id, reasonId) && NUMBER_INPUT_REASON_LIST.includes(id) &&\r\n
    \r\n \r\n
    \r\n }\r\n {_.isEqual(id, reasonId) && COMMENT_ONLY_REASON_LIST.includes(id) &&\r\n
    \r\n {i18n.getString(RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR[reasonId])}\r\n
    \r\n }\r\n {_.isEqual(id, reasonId) && COMMENT_WITH_URL_REASON_LIST.includes(id) &&\r\n
    \r\n \r\n {i18n.getString(RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR[reasonId])}\r\n \r\n
    \r\n }\r\n\r\n \r\n ))}\r\n
    \r\n
    \r\n\r\n
    \r\n \r\n {i18n.getString('Recommendation_Feedback_Submit_Action')}\r\n \r\n\r\n {!isForBudgetLandscape &&\r\n
    \r\n \r\n \r\n {i18n.getString('Recommendation_Dismiss_Feedback_DontShowAgain')}\r\n \r\n
    \r\n }\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport { NavigateModal } from '@bingads-webui-campaign-react/recommendation-navigate-modal';\r\nimport { NAVIGATE_REASON } from '@bingads-webui-campaign-react/recommendation-feedback-modal';\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { DismissFeedbackForm } from './dismiss-feedback-form';\r\nimport { SingleChoiceDismissFeedbackForm } from './single-choice-dismiss-feedback-form';\r\nimport template from './fixed-container.pug';\r\nimport budgetTemplate from './fixed-container-for-budget-landscape.pug';\r\nimport { REASON_TABLE } from './single-choice-reason-const';\r\n\r\nclass FeedbackView extends React.PureComponent {\r\n static propTypes = {\r\n onSubmit: PropTypes.func.isRequired,\r\n rejectAutoApplySuggestedAds: PropTypes.bool,\r\n permissions: PropTypes.objectOf(PropTypes.any),\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n type: PropTypes.string.isRequired,\r\n viewDetails: PropTypes.func,\r\n recommendationTypesAvailable: PropTypes.arrayOf(PropTypes.any),\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n isAutoClose: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n rejectAutoApplySuggestedAds: false,\r\n permissions: {},\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n viewDetails: _.noop,\r\n recommendationTypesAvailable: [],\r\n isAutoClose: true,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isOpen: true,\r\n submitDisabled: true,\r\n timer: null,\r\n isNavigateModalOpen: false,\r\n navigateToDetailType: RECOMMENDATION_TYPES.REALLOCATE_BUDGET,\r\n };\r\n this.form = React.createRef();\r\n this.isShowNewDismissForm = props.permissions.IsRecommendationInProductFeedbackLoopEnabled &&\r\n REASON_TABLE[props.type];\r\n this.isCloseClickOverlay = props.isAutoClose;\r\n }\r\n\r\n componentDidMount() {\r\n document.onclick = (e) => {\r\n if (this.state.submitDisabled &&\r\n !this.form.current.contains(e.target) &&\r\n this.isCloseClickOverlay) {\r\n // feedback in budget landscape won't hide when user click overlay.\r\n this.hide();\r\n }\r\n // when open feedback in budget landscape,\r\n // this.form.current would not contain e.target\r\n // in the first time, so we need to add a mechanism\r\n // to make it not disappear in the first time.\r\n this.isCloseClickOverlay = true;\r\n };\r\n this.timer(true);\r\n }\r\n componentWillUnmount() {\r\n\r\n }\r\n\r\n // For Navigate Modal\r\n onYes = () => {\r\n this.setState({ isNavigateModalOpen: false });\r\n this.props.viewDetails(this.state.navigateToDetailType)();\r\n }\r\n\r\n onNo = () => {\r\n this.setState({\r\n isNavigateModalOpen: false,\r\n });\r\n }\r\n\r\n onSubmit = (data, reasonId = null) => {\r\n const {\r\n onSubmit, type,\r\n } = this.props;\r\n\r\n if (type === 'budgetLandscape') onSubmit(data, reasonId);\r\n else onSubmit(data, this.isShowNewDismissForm);\r\n\r\n this.hide();\r\n\r\n if (this.isShowNewDismissForm && reasonId) {\r\n this.navigateBasedOnReasonId(reasonId);\r\n }\r\n }\r\n\r\n navigateBasedOnReasonId = (reasonId) => {\r\n if (reasonId) {\r\n switch (reasonId) {\r\n case (NAVIGATE_REASON.NoBudget): // open navigate modal for certain reason\r\n case (NAVIGATE_REASON.BudgetNoBudget):\r\n {\r\n if (this.props.recommendationTypesAvailable\r\n .includes(RECOMMENDATION_TYPES.REALLOCATE_BUDGET)) {\r\n // open navigate modal\r\n this.setState({\r\n isNavigateModalOpen: true,\r\n navigateToDetailType: RECOMMENDATION_TYPES.REALLOCATE_BUDGET,\r\n });\r\n }\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n\r\n hide = () => {\r\n this.setState({ isOpen: false });\r\n this.timer(false);\r\n document.onclick = null;\r\n }\r\n timer(val) {\r\n let timer = null;\r\n if (this.state.timer) {\r\n clearTimeout(this.state.timer);\r\n }\r\n if (val && this.props.isAutoClose) {\r\n timer = setTimeout(() => { this.hide(); }, 15000);\r\n }\r\n this.setState({ timer });\r\n }\r\n changeState = (val) => {\r\n if (val !== this.state.submitDisabled) {\r\n this.setState({ submitDisabled: val });\r\n }\r\n this.timer(false);\r\n }\r\n\r\n render() {\r\n const { rejectAutoApplySuggestedAds, i18n, type } = this.props;\r\n\r\n // for position:absolute in popover css, we need to put the close button to form\r\n // to prevent close button disappear.\r\n const isForBudgetLandscape = type === 'budgetLandscape';\r\n\r\n const navigateModal = (\r\n this.state.isNavigateModalOpen &&\r\n \r\n );\r\n\r\n return (\r\n
    \r\n {this.state.isOpen &&\r\n \r\n {!isForBudgetLandscape &&
    \r\n );\r\n }\r\n}\r\n\r\nexport function showDismissFeedbackPopup({\r\n newI18n,\r\n i18n,\r\n type,\r\n onSubmit,\r\n rejectAutoApplySuggestedAds,\r\n permissions,\r\n recommendationTypesAvailable,\r\n viewDetails,\r\n}) {\r\n const container = document.querySelector('.recommendation-dismiss-feedback-popup');\r\n if (container === null) {\r\n $('body').append(template());\r\n } else {\r\n ReactDOM.unmountComponentAtNode(container);\r\n }\r\n ReactDOM.render(\r\n (),\r\n document.querySelector('.recommendation-dismiss-feedback-popup')\r\n );\r\n}\r\n\r\nexport function showDismissFeedbackPopupForBudgetLandscape({\r\n newI18n,\r\n i18n,\r\n onSubmit,\r\n permissions,\r\n el,\r\n}) {\r\n const budgetLandscapePopup = '.budget-landscape-dismiss-popup';\r\n const container = document.querySelector(budgetLandscapePopup);\r\n if (container === null) {\r\n $(el).append(budgetTemplate()); // .popup-container\r\n } else {\r\n ReactDOM.unmountComponentAtNode(container);\r\n }\r\n ReactDOM.render(\r\n (),\r\n document.querySelector(budgetLandscapePopup)\r\n );\r\n}\r\n\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Textfit } from 'react-textfit';\r\n\r\nexport class EstimationTile extends React.PureComponent {\r\n static propTypes = {\r\n primaryIncrease: PropTypes.string.isRequired,\r\n primaryPts: PropTypes.string.isRequired,\r\n primaryFrom: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.bool,\r\n ]),\r\n primaryTo: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.bool,\r\n ]),\r\n primaryFromString: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.bool,\r\n ]),\r\n primaryToString: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.bool,\r\n ]),\r\n primaryString: PropTypes.string.isRequired,\r\n isPositivePrimary: PropTypes.bool.isRequired,\r\n isDoublePrimary: PropTypes.bool,\r\n secondPrimaryString: PropTypes.string,\r\n secondPrimaryIncrease: PropTypes.string,\r\n secondaryIncrease: PropTypes.string,\r\n secondaryString: PropTypes.string,\r\n isPositiveSecondary: PropTypes.bool,\r\n tertiaryIncrease: PropTypes.string,\r\n tertiaryString: PropTypes.string,\r\n spendIncrease: PropTypes.string,\r\n spendString: PropTypes.string,\r\n estimateNote: PropTypes.string.isRequired,\r\n primaryIncreaseSymbol: PropTypes.string,\r\n primaryIncreaseNullable: PropTypes.bool,\r\n isEstimate: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n primaryFrom: undefined,\r\n primaryTo: undefined,\r\n primaryFromString: undefined,\r\n primaryToString: undefined,\r\n secondaryIncrease: undefined,\r\n secondaryString: undefined,\r\n isPositiveSecondary: undefined,\r\n tertiaryIncrease: undefined,\r\n tertiaryString: undefined,\r\n spendIncrease: undefined,\r\n spendString: undefined,\r\n primaryIncreaseSymbol: '+',\r\n primaryIncreaseNullable: undefined,\r\n isDoublePrimary: false,\r\n secondPrimaryString: '',\r\n secondPrimaryIncrease: '',\r\n isEstimate: true,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = { primaryAndSecondPrimaryFontSize: undefined };\r\n this.isPrimaryReady = false;\r\n this.isSecondPrimaryReady = false;\r\n this.primaryFontSize = null;\r\n this.secondPrimaryFontSize = null;\r\n }\r\n\r\n getSecondarySymbol(value) {\r\n let symbol = '+';\r\n if (Number(value) < 0 || value.includes('-')) {\r\n symbol = '';\r\n }\r\n return symbol;\r\n }\r\n\r\n primaryReady(fontSize) {\r\n this.isPrimaryReady = true;\r\n this.primaryFontSize = fontSize;\r\n\r\n if (this.isSecondPrimaryReady) {\r\n this.fitPrimaryAndSecondPrimary();\r\n }\r\n }\r\n\r\n secondPrimaryReady(fontSize) {\r\n this.isSecondPrimaryReady = true;\r\n this.secondPrimaryFontSize = fontSize;\r\n\r\n if (this.isPrimaryReady) {\r\n this.fitPrimaryAndSecondPrimary();\r\n }\r\n }\r\n\r\n fitPrimaryAndSecondPrimary() {\r\n this.isPrimaryReady = false;\r\n this.isSecondPrimaryReady = false;\r\n if (this.primaryFontSize !== this.secondPrimaryFontSize) {\r\n const minFontSize = this.primaryFontSize > this.secondPrimaryFontSize ?\r\n this.secondPrimaryFontSize : this.primaryFontSize;\r\n\r\n this.setState({ primaryAndSecondPrimaryFontSize: minFontSize });\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n primaryFromString,\r\n primaryFrom,\r\n primaryToString,\r\n primaryTo,\r\n primaryIncreaseSymbol,\r\n primaryIncrease,\r\n primaryIncreaseNullable,\r\n primaryPts,\r\n primaryString,\r\n isPositivePrimary,\r\n secondaryIncrease,\r\n secondaryString,\r\n isPositiveSecondary,\r\n tertiaryIncrease,\r\n tertiaryString,\r\n spendIncrease,\r\n spendString,\r\n isDoublePrimary,\r\n secondPrimaryString,\r\n secondPrimaryIncrease,\r\n isEstimate,\r\n } = this.props;\r\n const fromTo = `${primaryFromString} ${primaryFrom} ${primaryToString} ${primaryTo}`;\r\n const primaryIncreaseStr = `${primaryIncreaseSymbol}${primaryIncrease} ${primaryPts}`;\r\n const noPrimaryIncrease = primaryIncreaseNullable && primaryIncrease === '0';\r\n const noPrimaryIncreaseClass = 'iconba large iconba-Trending12';\r\n const isLongText = primaryIncreaseStr.length > 9;\r\n\r\n return (\r\n
    \r\n
    \r\n this.primaryReady(fontSize)}\r\n >{primaryString}\r\n \r\n
    \r\n
    \r\n {noPrimaryIncrease ?\r\n ()\r\n : ({primaryIncreaseStr})}\r\n
    \r\n {(primaryFrom && !noPrimaryIncrease) && (\r\n
    \r\n {fromTo}\r\n
    \r\n )}\r\n {(isDoublePrimary) && (\r\n
    \r\n
    \r\n this.secondPrimaryReady(fontSize)}\r\n >{secondPrimaryString}\r\n \r\n
    \r\n
    \r\n {secondPrimaryIncrease}\r\n
    \r\n
    \r\n )}\r\n {secondaryIncrease && (\r\n
    \r\n {this.getSecondarySymbol(secondaryIncrease)}{secondaryIncrease}\r\n  \r\n {secondaryString}\r\n
    \r\n )}\r\n {tertiaryIncrease && (\r\n
    \r\n +{tertiaryIncrease}\r\n  \r\n {tertiaryString}\r\n
    \r\n )}\r\n {spendIncrease && (\r\n
    \r\n +{spendIncrease}\r\n  \r\n {spendString}\r\n
    \r\n )}\r\n {isEstimate && (\r\n
    {this.props.estimateNote}
    \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport class SummaryEstimation extends React.PureComponent {\r\n static propTypes = {\r\n primaryIncrease: PropTypes.string.isRequired,\r\n primaryPts: PropTypes.string.isRequired,\r\n primaryString: PropTypes.string.isRequired,\r\n isPositivePrimary: PropTypes.bool.isRequired,\r\n isDoublePrimary: PropTypes.bool,\r\n secondPrimaryString: PropTypes.string,\r\n secondPrimaryIncrease: PropTypes.string,\r\n secondaryIncrease: PropTypes.string,\r\n secondaryString: PropTypes.string,\r\n isPositiveSecondary: PropTypes.bool,\r\n spendIncrease: PropTypes.string,\r\n spendString: PropTypes.string,\r\n estimateNote: PropTypes.string.isRequired,\r\n primaryIncreaseSymbol: PropTypes.string,\r\n primaryIncreaseNullable: PropTypes.bool,\r\n isEstimate: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n secondaryIncrease: undefined,\r\n secondaryString: undefined,\r\n isPositiveSecondary: undefined,\r\n spendIncrease: undefined,\r\n spendString: undefined,\r\n primaryIncreaseSymbol: '+',\r\n primaryIncreaseNullable: undefined,\r\n isEstimate: true,\r\n isDoublePrimary: false,\r\n secondPrimaryString: '',\r\n secondPrimaryIncrease: '',\r\n }\r\n\r\n getSecondarySymbol(value) {\r\n let symbol = '+';\r\n if (Number(value) < 0 || value.includes('-')) {\r\n symbol = '';\r\n }\r\n return symbol;\r\n }\r\n\r\n render() {\r\n const {\r\n primaryIncreaseSymbol,\r\n primaryIncrease,\r\n primaryIncreaseNullable,\r\n primaryPts,\r\n primaryString,\r\n isPositivePrimary,\r\n secondaryIncrease,\r\n secondaryString,\r\n isPositiveSecondary,\r\n spendIncrease,\r\n spendString,\r\n isEstimate,\r\n isDoublePrimary,\r\n secondPrimaryString,\r\n secondPrimaryIncrease,\r\n } = this.props;\r\n const primaryIncreaseStr = `${primaryIncreaseSymbol}${primaryIncrease} ${primaryPts}`;\r\n const noPrimaryIncrease = primaryIncreaseNullable && primaryIncrease === '0';\r\n\r\n return (\r\n
    \r\n {isEstimate && (\r\n
    {`${this.props.estimateNote}:`}
    \r\n )}\r\n
    \r\n {noPrimaryIncrease ?\r\n \r\n : {primaryIncreaseStr}}\r\n {primaryString}\r\n
    \r\n {(isDoublePrimary) && (\r\n
    \r\n {`${secondPrimaryIncrease} `}\r\n {secondPrimaryString}\r\n
    \r\n )}\r\n {secondaryIncrease && (\r\n
    \r\n {this.getSecondarySymbol(secondaryIncrease)}{secondaryIncrease}\r\n  \r\n {secondaryString}\r\n
    \r\n )}\r\n {spendIncrease && (\r\n
    \r\n +{spendIncrease}\r\n  \r\n {spendString}\r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\n\r\nconst MAX_CHARACTER_COUNT = 500;\r\n\r\nexport class CommentsField extends React.PureComponent {\r\n static propTypes = {\r\n id: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onChange: PropTypes.func.isRequired,\r\n onFocus: PropTypes.func,\r\n value: PropTypes.string,\r\n isProductFeedbackLoop: PropTypes.bool,\r\n isAccountSettings: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n value: '',\r\n onFocus: _.noop,\r\n isProductFeedbackLoop: false,\r\n isAccountSettings: false,\r\n };\r\n\r\n handleChange = (e) => {\r\n const { onChange } = this.props;\r\n onChange(e.target.value.substring(0, MAX_CHARACTER_COUNT));\r\n };\r\n\r\n render() {\r\n const {\r\n id,\r\n i18n,\r\n value,\r\n isProductFeedbackLoop,\r\n isAccountSettings,\r\n } = this.props;\r\n\r\n const characterCount = isAccountSettings ?\r\n `${value.length} / ${MAX_CHARACTER_COUNT}`\r\n : i18n.getString('Recommendation_Feedback_ReasonNoteCharacterCount', {\r\n characterCount: value.length,\r\n maxCharacterCount: MAX_CHARACTER_COUNT,\r\n });\r\n\r\n const placeHolder = isProductFeedbackLoop ?\r\n i18n.getString('Recommendation_Product_Feedback_Loop_Comments_Placeholder')\r\n : i18n.getString('Recommendation_Feedback_Comments_Placeholder');\r\n\r\n return (\r\n
    \r\n \r\n
    { characterCount }
    \r\n
    \r\n );\r\n }\r\n}\r\n","import { RECOMMENDATION_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nexport const OTHER_REASON = 'Other';\r\n\r\nexport const FEEDBACK_LOOP_REASON_TABLE = {\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: [\r\n 'NoBudget',\r\n 'OtherTech',\r\n 'NotImprove',\r\n 'DoLater',\r\n 'Unclear',\r\n OTHER_REASON,\r\n ],\r\n};\r\n\r\nexport const REASON_TABLE = {\r\n default: [\r\n 'NotInterested',\r\n 'OtherSolution',\r\n 'DoNotUnderstand',\r\n 'NotApplicable',\r\n 'SpendNoMore',\r\n OTHER_REASON,\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_AD_TEXT]: [\r\n 'FixAdContWIP',\r\n 'FixAdContWontFix',\r\n 'FixAdContResolveOutsideAds',\r\n 'FixAdContOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: [\r\n 'FixAdContWIP',\r\n 'FixAdContWontFix',\r\n 'FixAdContResolveOutsideAds',\r\n 'FixAdContOther',\r\n ],\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: [\r\n 'SetupConvDoItLater',\r\n 'SetupConvNeedAssistance',\r\n 'SetupConvWorking',\r\n 'SetupConvCannotMakeChanges',\r\n 'SetupConvUseOtherTool',\r\n 'SetupConvNotRelevant',\r\n 'SetupConvOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_TRACKING_OPPORTUNITY]: [\r\n 'FixConvFixItLater',\r\n 'FixConvNeedAssistanceToFix',\r\n 'FixConvWorkInProgress',\r\n 'FixConvNotInUse',\r\n 'FixConvOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: [\r\n 'FixConvGoalFixItLater',\r\n 'FixConvGoalCurrentSettingCorrect',\r\n 'FixConvGoalNeedAssistanceToFix',\r\n 'FixConvGoalAlreadyFixed',\r\n 'FixConvGoalGoalNotUse',\r\n 'FixConvGoalOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: [\r\n 'RepairAdsAlreadyAddressed',\r\n 'RepairAdsPendingEditorial',\r\n 'RepairAdsDsaAsSearch',\r\n 'RepairAdsIntentional',\r\n 'RepairAdsAddressOutside',\r\n 'RepairAdsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: [\r\n 'RepairKeywordsAlreadyAddressed',\r\n 'RepairKeywordsPendingEditorial',\r\n 'RepairKeywordsDsaAsSearch',\r\n 'RepairKeywordsIntentional',\r\n 'RepairKeywordsAddressOutside',\r\n 'RepairKeywordsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: [\r\n 'MmaNotInterested',\r\n 'MmaOtherTools',\r\n 'MmaNotUnderstand',\r\n 'MmaNotApplicable',\r\n 'MmaNotQualified',\r\n 'MmaOther',\r\n ],\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: [\r\n 'CreateConvGoalCreateItLater',\r\n 'CreateConvGoalNotInterested',\r\n 'CreateConvGoalGoalTypeNotMatched',\r\n 'CreateConvGoalAlreadyExist',\r\n 'CreateConvGoalInappropriateSuggestion',\r\n 'CreateConvGoalOther',\r\n ],\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: [\r\n 'RsaAddRecommendedAdsLater',\r\n 'RsaNoAutoGeneratedAssets',\r\n 'RsaNeedApprovalBeforeApply',\r\n 'RsaNeedOptOutAAR',\r\n OTHER_REASON,\r\n ],\r\n [RECOMMENDATION_TYPES.IMAGE_EXTENSION]: [\r\n 'ImageAdExtNotInterested',\r\n 'ImageAdExtNotApplicable',\r\n 'ImageAdExtPerformedNotWell',\r\n 'ImageAdExtOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: [\r\n 'FixRepairMissingKeywordParamsFixItLater',\r\n 'FixRepairMissingKeywordParamsNotKnowingWhyFix',\r\n 'FixRepairMissingKeywordParamsNotSignificant',\r\n 'FixRepairMissingKeywordParamsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: [\r\n 'FixNoImpressionBidSuggestTooHigh',\r\n 'FixNoImpressionBidSuggestNotSignificant',\r\n 'FixNoImpressionBidAdjustLater',\r\n 'FixNoImpressionBidHaveAdjusted',\r\n 'FixNoImpressionBidManagedByAgency',\r\n 'FixNoImpressionBidOther',\r\n ],\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: [\r\n 'FixImproveResponsiveSearchAdsManagedByMyself',\r\n 'FixImproveResponsiveSearchImprovementLater',\r\n 'FixImproveResponsiveSearchAdsNotSignificant',\r\n 'FixImproveResponsiveSearchAdsNotUnderstand',\r\n 'FixImproveResponsiveSearchAdsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: [\r\n 'FixRepairUntargetedOfferNotRelevant',\r\n 'FixRepairUntargetedOfferManageInconvenient',\r\n 'FixRepairUntargetedOfferExcludedIntentionally',\r\n 'FixRepairUntargetedOfferNotUnderstand',\r\n 'FixRepairUntargetedOfferImprovementLater',\r\n 'FixRepairUntargetedOfferOther',\r\n ],\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: [\r\n 'ImproveMultiMediaAdsManagedByMyself',\r\n 'ImproveMultiMediaAdsNotSignificant',\r\n 'ImproveMultiMediaAdsCostTooHigh',\r\n 'ImproveMultiMediaAdsNotUnderstand',\r\n 'ImproveMultiMediaAdsOther',\r\n ],\r\n [RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION]: [\r\n 'DSA2PMaxMigrationNoApplyUntilAttributesReviewed',\r\n 'DSA2PMaxMigrationUnsureRecommendedCampaignIsImprovement',\r\n 'DSA2PMaxMigrationCreatePerformanceMaxCampaignByMyOwn',\r\n 'DSA2PMAxMigrationOther',\r\n ],\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: [\r\n 'SyndicationGapAdPerfLowerThanExpected',\r\n 'SyndicationGapOnlyDisplayedOnMicrosoftSitesSelected',\r\n 'SyndicationGapOther',\r\n ],\r\n};\r\n\r\nexport const REASON_TABLE_NEW_I18N = {\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: {\r\n FixRepairMissingKeywordParamsFixItLater: _TL_('I will fix this issue later.'),\r\n FixRepairMissingKeywordParamsNotKnowingWhyFix: _TL_('I don\\'t understand why I should fix this issue.'),\r\n FixRepairMissingKeywordParamsNotSignificant: _TL_('The estimates show no significant improvement.'),\r\n FixRepairMissingKeywordParamsOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: {\r\n FixNoImpressionBidSuggestTooHigh: _TL_('The suggested bids are higher than expected.'),\r\n FixNoImpressionBidSuggestNotSignificant: _TL_('The suggestion shows no significant improvement.'),\r\n FixNoImpressionBidAdjustLater: _TL_('I will adjust the bid later.'),\r\n FixNoImpressionBidHaveAdjusted: _TL_('I have recently adjusted the bid.'),\r\n FixNoImpressionBidManagedByAgency: _TL_('This account is managed by an agency.'),\r\n FixNoImpressionBidOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.IMPROVE_RESPONSIVE_SEARCH_ADS]: {\r\n FixImproveResponsiveSearchAdsManagedByMyself: _TL_('I will manage the assets in responsive search ads by myself.'),\r\n FixImproveResponsiveSearchImprovementLater: _TL_('I will make the improvement later.'),\r\n FixImproveResponsiveSearchAdsNotSignificant: _TL_('The performance of responsive search ads show no significant improvement.'),\r\n FixImproveResponsiveSearchAdsNotUnderstand: _TL_('I don\\'t understand the recommendation.'),\r\n FixImproveResponsiveSearchAdsOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.REPAIR_UNTARGETED_OFFER]: {\r\n FixRepairUntargetedOfferNotRelevant: _TL_('The suggested campaigns do not align with my business goal.'),\r\n FixRepairUntargetedOfferManageInconvenient: _TL_('Managing a catch-all campaign is inconvenient.'),\r\n FixRepairUntargetedOfferExcludedIntentionally: _TL_('I want to exclude some product offers from my shopping campaign.'),\r\n FixRepairUntargetedOfferNotUnderstand: _TL_('I don\\'t know why this has been recommended to me.'),\r\n FixRepairUntargetedOfferImprovementLater: _TL_('I\\'ll create a catch-all shopping campaign later.'),\r\n FixRepairUntargetedOfferOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: {\r\n ImproveMultiMediaAdsManagedByMyself: _TL_('I\\'ll manage the ad texts, headlines, and images in Multimedia ads.'),\r\n ImproveMultiMediaAdsNotSignificant: _TL_('The recommendation doesn\\'t improve my multimedia ad performance.'),\r\n ImproveMultiMediaAdsCostTooHigh: _TL_('The estimated cost is too high.'),\r\n ImproveMultiMediaAdsNotUnderstand: _TL_('The recommendation is unclear.'),\r\n ImproveMultiMediaAdsOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION]: {\r\n DSA2PMaxMigrationNoApplyUntilAttributesReviewed: _TL_('I don\\'t want to apply the recommendation unless I can review the recommended attributes for the Performance Max campaign.'),\r\n DSA2PMaxMigrationUnsureRecommendedCampaignIsImprovement: _TL_('I\\'m unsure that the recommended campaign will be an improvement.'),\r\n DSA2PMaxMigrationCreatePerformanceMaxCampaignByMyOwn: _TL_('I\\'ll create my own Performance Max campaign.'),\r\n DSA2PMAxMigrationOther: _TL_('Other'),\r\n },\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: {\r\n SyndicationGapAdPerfLowerThanExpected: _TL_('My ad performance was lower than expected on the Microsoft Advertising Network.'),\r\n SyndicationGapOnlyDisplayedOnMicrosoftSitesSelected: _TL_('My ads can only be displayed on Microsoft sites and select traffic.'),\r\n SyndicationGapOther: _TL_('Other'),\r\n },\r\n};\r\n\r\nexport const NAVIGATE_REASON = {\r\n // for certain feedback reason, it would trigger naviagte\r\n // modal so that help user navigate to detail page of certain\r\n // recommendation\r\n NoBudget: 'NoBudget',\r\n BudgetNoBudget: 'BudgetNoBudget',\r\n};\r\n\r\nexport const RECOMMENDATION_DISMISS_ALL_MT_REASONID_CONFIGS = {\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: {\r\n excludedReason: [OTHER_REASON],\r\n prefix: 'Budget',\r\n },\r\n};\r\n\r\nexport const COMMENT_ONLY_REASON_LIST = [\r\n 'FixConvGoalGoalNotUse',\r\n];\r\n\r\nexport const COMMENT_WITH_URL_REASON_LIST = [\r\n 'FixConvGoalNeedAssistanceToFix',\r\n];\r\n\r\nexport const URL_FOR_COMMENT_WITH_URL_REASON_LIST = {\r\n [COMMENT_WITH_URL_REASON_LIST.FixConvGoalNeedAssistanceToFix]: 'http://go.microsoft.com/fwlink/?LinkId=258669',\r\n};\r\n\r\nexport const RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR = {\r\n BudgetTooHigh: 'Recommendation_Feedback_Reason_BudgetHigh_Comment',\r\n BudgetCpcTooHigh: 'Recommendation_Feedback_Reason_CPCHigh_Comment',\r\n RecommendedBudgetHigh: 'Recommendation_Feedback_Reason_BudgetHigh_Comment',\r\n CPCHigh: 'Recommendation_Feedback_Reason_CPCHigh_Comment',\r\n FixConvGoalNeedAssistanceToFix: 'Recommendation_Dismiss_Feedback_NeedAssistanceToFix_Comment',\r\n FixConvGoalGoalNotUse: 'Recommendation_Dismiss_Feedback_GoalNotUse_Comment',\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Radio } from '@bingads-webui-react/radio';\r\nimport { RECOMMENDATION_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport { CommentsField } from './comments-field';\r\nimport { REASON_TABLE } from './reason-const';\r\n\r\nconst OTHER_REASON = 'Other';\r\nconst defaultReasonIds = [\r\n 'NotInterested',\r\n 'OtherSolution',\r\n 'DoNotUnderstand',\r\n 'NotApplicable',\r\n 'SpendNoMore',\r\n OTHER_REASON,\r\n];\r\n\r\nexport class FeedbackForm extends React.PureComponent {\r\n static propTypes = {\r\n recommendationDescription: PropTypes.string.isRequired,\r\n onSubmit: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n isProvideFeedbackOnly: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n readOnly: PropTypes.bool.isRequired,\r\n type: PropTypes.string,\r\n };\r\n\r\n static defaultProps = {\r\n isProvideFeedbackOnly: false,\r\n type: '',\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n reasonId: null,\r\n reasonNote: '',\r\n };\r\n }\r\n\r\n handleReasonChange = (e) => {\r\n this.setState({\r\n reasonId: e.target.id,\r\n });\r\n };\r\n\r\n handleCommentsChange = (value) => {\r\n this.setState({\r\n reasonNote: value,\r\n });\r\n }\r\n\r\n handleCommentsFocus = () => {\r\n if (this.state.reasonId === null) {\r\n this.setState({\r\n reasonId: OTHER_REASON,\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const { reasonId, reasonNote } = this.state;\r\n const {\r\n recommendationDescription,\r\n i18n,\r\n onSubmit,\r\n onCancel,\r\n isProvideFeedbackOnly,\r\n readOnly,\r\n type,\r\n } = this.props;\r\n\r\n let reasonIds = defaultReasonIds;\r\n switch (type) {\r\n case RECOMMENDATION_TYPES.FIX_AD_TEXT:\r\n reasonIds = REASON_TABLE[RECOMMENDATION_TYPES.FIX_AD_TEXT];\r\n break;\r\n case RECOMMENDATION_TYPES.FIX_AD_DESTINATION:\r\n reasonIds = REASON_TABLE[RECOMMENDATION_TYPES.FIX_AD_DESTINATION];\r\n break;\r\n case RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY:\r\n reasonIds = REASON_TABLE[RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY];\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n const title = i18n.getString(\r\n isProvideFeedbackOnly ? 'Recommendation_Feedback_Submit_Title' : 'Recommendation_Feedback_Reject_Title',\r\n { recommendationDescription }\r\n );\r\n\r\n const submitText = i18n.getString('Recommendation_Feedback_Submit_Action');\r\n\r\n const hasUserInput = !isProvideFeedbackOnly || reasonNote !== '';\r\n const submitDisabled = readOnly || !hasUserInput;\r\n\r\n return (\r\n
    \r\n \r\n

    {title}

    \r\n\r\n {!isProvideFeedbackOnly &&\r\n \r\n

    {i18n.getString('Recommendation_Feedback_Instructions')}

    \r\n
    \r\n {_.map(reasonIds, id => (\r\n \r\n {i18n.getString(`Recommendation_Feedback_Reason_${id}`)}\r\n \r\n ))}\r\n
    \r\n
    \r\n }\r\n\r\n
    \r\n \r\n
    \r\n\r\n
    \r\n onSubmit({\r\n ReasonId: reasonId,\r\n ReasonNote: reasonNote,\r\n })}\r\n >\r\n {submitText}\r\n \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Radio } from '@bingads-webui-react/radio';\r\n\r\nimport { CommentsField } from './comments-field';\r\nimport {\r\n REASON_TABLE,\r\n OTHER_REASON,\r\n FEEDBACK_LOOP_REASON_TABLE,\r\n COMMENT_ONLY_REASON_LIST,\r\n COMMENT_WITH_URL_REASON_LIST,\r\n URL_FOR_COMMENT_WITH_URL_REASON_LIST,\r\n RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR,\r\n REASON_TABLE_NEW_I18N,\r\n} from './reason-const';\r\n\r\nexport class DismissAllFeedbackForm extends React.PureComponent {\r\n static propTypes = {\r\n recommendationDescription: PropTypes.string.isRequired,\r\n onSubmit: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n type: PropTypes.string,\r\n permissions: PropTypes.objectOf(PropTypes.any),\r\n };\r\n\r\n static defaultProps = {\r\n type: '',\r\n permissions: {},\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n reasonId: null,\r\n reasonNote: '',\r\n };\r\n }\r\n\r\n handleReasonChange = (e) => {\r\n this.setState({\r\n reasonId: e.target.id,\r\n });\r\n };\r\n\r\n handleCommentsChange = (value) => {\r\n this.setState({\r\n reasonNote: value,\r\n });\r\n }\r\n\r\n handleCommentsFocus = () => {\r\n if (this.state.reasonId === null) {\r\n this.setState({\r\n reasonId: OTHER_REASON,\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const { reasonId, reasonNote } = this.state;\r\n const {\r\n recommendationDescription,\r\n i18n,\r\n newI18n,\r\n onSubmit,\r\n onCancel,\r\n type,\r\n permissions,\r\n } = this.props;\r\n const isProductFeedbackLoop = permissions.IsRecommendationInProductFeedbackLoopEnabled;\r\n let reasonIds = REASON_TABLE.default;\r\n\r\n if (type in REASON_TABLE) {\r\n reasonIds = REASON_TABLE[type];\r\n }\r\n\r\n if (isProductFeedbackLoop && type in FEEDBACK_LOOP_REASON_TABLE) {\r\n reasonIds = FEEDBACK_LOOP_REASON_TABLE[type];\r\n }\r\n\r\n let useNewI18n = false;\r\n let reasonWithNewI18n;\r\n if (!_.isUndefined(REASON_TABLE_NEW_I18N[type])) {\r\n useNewI18n = true;\r\n reasonWithNewI18n = REASON_TABLE_NEW_I18N[type];\r\n }\r\n\r\n const title = i18n.getString('Recommendation_Feedback_Dismiss_All_Title', { recommendationDescription });\r\n\r\n const submitText = i18n.getString('Recommendation_Feedback_Submit_Action');\r\n\r\n const submitDisabled = reasonId === null;\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n
    {title}
    \r\n
    {isProductFeedbackLoop ?\r\n i18n.getString('Recommendation_Product_Feedback_Loop_Make_Better_Description')\r\n : i18n.getString('Recommendation_Feedback_Make_Better_Description')}\r\n
    \r\n
    \r\n\r\n \r\n
    \r\n {_.map(reasonIds, (id, index) => (\r\n \r\n {useNewI18n && newI18n.getString(reasonWithNewI18n[id])}\r\n {!useNewI18n && i18n.getString(`Recommendation_Feedback_Reason_${id}`)}\r\n {_.isEqual(id, reasonId) && _.isEqual(index, reasonIds.length - 1) &&\r\n
    \r\n \r\n
    \r\n }\r\n {_.isEqual(id, reasonId) && COMMENT_ONLY_REASON_LIST.includes(id) &&\r\n
    \r\n {i18n.getString(RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR[reasonId])}\r\n
    \r\n }\r\n {_.isEqual(id, reasonId) && COMMENT_WITH_URL_REASON_LIST.includes(id) &&\r\n
    \r\n \r\n {i18n.getString(RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR[reasonId])}\r\n \r\n
    \r\n }\r\n\r\n \r\n ))}\r\n
    \r\n
    \r\n\r\n
    \r\n onSubmit({\r\n ReasonId: reasonId,\r\n ReasonNote: reasonNote,\r\n })}\r\n >\r\n {submitText}\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Checkbox } from '@bingads-webui-react/checkbox';\r\n\r\nexport class ApplyFeedbackForm extends React.PureComponent {\r\n static propTypes = {\r\n onSubmit: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n odata: PropTypes.PropTypes.shape({\r\n patch: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onAutoApplyCancel: PropTypes.func.isRequired,\r\n type: PropTypes.string.isRequired,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }),\r\n permissions: PropTypes.objectOf(PropTypes.any),\r\n isFromImgExtV2: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n permissions: {},\r\n isFromImgExtV2: false,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n autoApplyChecked: false,\r\n };\r\n }\r\n\r\n onApply = (e) => {\r\n e.stopPropagation();\r\n const {\r\n onSubmit, cid, aid, odata, onAutoApplyCancel, type, dataService, isFromImgExtV2,\r\n } = this.props;\r\n const { autoApplyChecked } = this.state;\r\n if (autoApplyChecked) {\r\n const op = {\r\n isOptInStatusDelta: {\r\n [type]: true,\r\n },\r\n };\r\n dataService.setAutoApplyOptInStatus(op).then(() => {\r\n onSubmit();\r\n });\r\n } else if (isFromImgExtV2) {\r\n const url = `Customers(${cid})/Accounts(${aid})`;\r\n const options = {\r\n data: {\r\n AllowCrawlImagesFromLandingPage: 'true',\r\n },\r\n };\r\n // Set Auto-retreive image option as true and then apply all\r\n odata.patch(url, options).then(() => {\r\n onSubmit();\r\n });\r\n } else {\r\n onAutoApplyCancel();\r\n onSubmit();\r\n }\r\n }\r\n\r\n handleAutoApplyOptionChange = () => {\r\n if (this.state.autoApplyChecked) {\r\n this.setState({\r\n autoApplyChecked: false,\r\n });\r\n } else {\r\n this.setState({\r\n autoApplyChecked: true,\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n i18n,\r\n onCancel,\r\n permissions,\r\n newI18n,\r\n isFromImgExtV2,\r\n cid,\r\n aid,\r\n } = this.props;\r\n const { autoApplyChecked } = this.state;\r\n\r\n let title = i18n.getString('Recommendation_Feedback_Auto_Apply_Title');\r\n let instruction = i18n.getString('Recommendation_Feedback_Auto_Apply_Instructions');\r\n let submitText = i18n.getString('Summary_Card_Apply_All');\r\n\r\n if (permissions.IsRSAAutoApplyEnabled) {\r\n title = newI18n.getString(_TL_('Apply all recommendations?'));\r\n instruction = newI18n.getString(_TL_('Allow Microsoft Advertising to automatically apply this type of ad recommendations for you? You can opt out of auto-apply ad recommendations in your account settings at any time.'));\r\n }\r\n\r\n if (isFromImgExtV2) {\r\n title = newI18n.getString(_TL_('Auto-retrieve images from your websites'));\r\n submitText = newI18n.getString(_TL_('Allow and apply'));\r\n instruction = (\r\n
    \r\n
    \r\n {newI18n.getString(_TL_('Some images selected are from your website. By clicking “Allow and apply,” you agree that all images retrieved from your website are content provided by you the'))}\r\n  \r\n \r\n {newI18n.getString(_TL_('Microsoft Advertising Agreement'))}\r\n \r\n .\r\n
    \r\n
    \r\n {newI18n.getString(_TL_('You can change your image auto-retrieval settings anytime'))}\r\n  \r\n \r\n {newI18n.getString(_TL_('here'))}\r\n \r\n .\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n

    { title }

    \r\n {isFromImgExtV2 ? instruction : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n { instruction } \r\n {!permissions.IsRSAAutoApplyEnabled &&\r\n \r\n {i18n.getString('Learn_more_link_text')}\r\n \r\n }\r\n
    \r\n )}\r\n

    \r\n

    \r\n \r\n { submitText }\r\n \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import { RECOMMENDATION_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\nimport { RECOMMENDATION_DISMISS_ALL_MT_REASONID_CONFIGS } from './reason-const';\r\n\r\nexport function reasonToMtTranslator(type, reasonId) {\r\n switch (type) {\r\n case (RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY): {\r\n if (!RECOMMENDATION_DISMISS_ALL_MT_REASONID_CONFIGS[type].excludedReason.includes(reasonId)) {\r\n return `${RECOMMENDATION_DISMISS_ALL_MT_REASONID_CONFIGS[type].prefix}${reasonId}`;\r\n }\r\n break;\r\n }\r\n default: {\r\n break;\r\n }\r\n }\r\n return reasonId;\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ReactModal from 'react-modal';\r\n\r\nimport _ from 'underscore';\r\n\r\nimport {\r\n withTrack,\r\n APPLY_ACTION_TYPES,\r\n ADINSIGHT_LOG_ACTION_TYPE,\r\n RECOMMENDATION_TYPES,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { handleRecommendationNotification } from '@bingads-webui-campaign/recommendation-notification';\r\nimport { NavigateModal } from '@bingads-webui-campaign-react/recommendation-navigate-modal';\r\nimport { generateGuid } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport { FeedbackForm } from './feedback-form';\r\nimport { DismissAllFeedbackForm } from './dismiss-all-feedback-form';\r\nimport { ApplyFeedbackForm } from './apply-feedback-form';\r\nimport { NAVIGATE_REASON } from './reason-const';\r\nimport { reasonToMtTranslator } from './utils';\r\n\r\nclass feedbackModal extends React.PureComponent {\r\n static propTypes = {\r\n isOpen: PropTypes.bool.isRequired,\r\n recommendationDescription: PropTypes.string,\r\n onCancel: PropTypes.func.isRequired,\r\n isProvideFeedbackOnly: PropTypes.bool,\r\n isReject: PropTypes.bool,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n data: PropTypes.objectOf(PropTypes.any),\r\n track: PropTypes.func.isRequired,\r\n readOnly: PropTypes.bool,\r\n logOpportunityEvent: PropTypes.func,\r\n callback: PropTypes.func.isRequired,\r\n context: PropTypes.objectOf(PropTypes.any),\r\n guid: PropTypes.string,\r\n isApplyFeedBackFormShow: PropTypes.bool,\r\n cid: PropTypes.string,\r\n aid: PropTypes.string,\r\n odata: PropTypes.PropTypes.shape({\r\n patch: PropTypes.func.isRequired,\r\n }),\r\n onAutoApplyCancel: PropTypes.func,\r\n isFromSummary: PropTypes.bool,\r\n isFromAutoApplyDialog: PropTypes.bool,\r\n view: PropTypes.objectOf(PropTypes.any),\r\n showAlertHandler: PropTypes.func,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Available: PropTypes.number,\r\n }),\r\n isDismissAll: PropTypes.bool,\r\n viewDetails: PropTypes.func,\r\n recommendationTypesAvailable: PropTypes.arrayOf(PropTypes.any),\r\n useCallbackAsSubmit: PropTypes.bool,\r\n permissions: PropTypes.objectOf(PropTypes.any),\r\n useNavigateModal: PropTypes.bool,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }),\r\n isFromImgExtV2: PropTypes.bool,\r\n opportunities: PropTypes.arrayOf(PropTypes.any),\r\n };\r\n\r\n static defaultProps = {\r\n context: null,\r\n isProvideFeedbackOnly: false,\r\n isReject: true,\r\n recommendationDescription: '',\r\n data: {},\r\n readOnly: false,\r\n logOpportunityEvent: null,\r\n guid: null,\r\n isApplyFeedBackFormShow: true,\r\n cid: null,\r\n aid: null,\r\n odata: null,\r\n onAutoApplyCancel: null,\r\n isFromSummary: false,\r\n isFromAutoApplyDialog: false,\r\n view: null,\r\n showAlertHandler: _.noop,\r\n overallOptimizationScoreBar: null,\r\n isDismissAll: false,\r\n viewDetails: _.noop,\r\n recommendationTypesAvailable: [],\r\n useCallbackAsSubmit: false,\r\n permissions: {},\r\n useNavigateModal: false,\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n isFromImgExtV2: false,\r\n opportunities: [],\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isNavigateModalOpen: false,\r\n };\r\n this.navigateToDetailType = RECOMMENDATION_TYPES.REALLOCATE_BUDGET;\r\n }\r\n\r\n onSubmit = (reason) => {\r\n const {\r\n data,\r\n isProvideFeedbackOnly,\r\n logOpportunityEvent,\r\n track,\r\n callback,\r\n context,\r\n isReject,\r\n isFromSummary,\r\n isFromAutoApplyDialog,\r\n i18n,\r\n showAlertHandler,\r\n isDismissAll,\r\n useCallbackAsSubmit,\r\n isFromImgExtV2,\r\n opportunities,\r\n } = this.props;\r\n\r\n if ((isFromSummary && isFromAutoApplyDialog) || useCallbackAsSubmit) {\r\n callback();\r\n return;\r\n }\r\n\r\n if (isFromImgExtV2) {\r\n if (!_.isEmpty(opportunities)) {\r\n callback(opportunities);\r\n } else {\r\n callback();\r\n }\r\n return;\r\n }\r\n\r\n this.props.onCancel();\r\n\r\n let options;\r\n if (reason) {\r\n const formatedReason = this.getFormatedReason(reason);\r\n options = _.extend({}, data, this.props.context && {\r\n context: this.props.context,\r\n }, this.props.guid && {\r\n guid: this.props.guid,\r\n }, formatedReason && {\r\n reason: formatedReason,\r\n });\r\n }\r\n\r\n if (isProvideFeedbackOnly) {\r\n // eslint-disable-next-line no-unused-expressions\r\n logOpportunityEvent && logOpportunityEvent({\r\n type: data.type,\r\n action: ADINSIGHT_LOG_ACTION_TYPE.FEEDBACK,\r\n input: reason.ReasonNote,\r\n context,\r\n });\r\n callback();\r\n showAlertHandler({\r\n message: i18n.getString('Recommendation_Feedback_Comment_Success'),\r\n level: 'Info',\r\n dismissible: true,\r\n });\r\n } else if (isDismissAll) {\r\n options.context = _.extend({}, options.context, { trackId: generateGuid() });\r\n if (isFromSummary) {\r\n // eslint-disable-next-line no-unused-expressions\r\n logOpportunityEvent && logOpportunityEvent({\r\n type: data.type,\r\n action: ADINSIGHT_LOG_ACTION_TYPE.CLICK_DISMISSALL,\r\n context: options.context,\r\n });\r\n }\r\n\r\n options.context = _.extend({}, options.context, { ApplyMode: 'All' });\r\n track(_.extend(\r\n {},\r\n options,\r\n { userAction: APPLY_ACTION_TYPES.DISMISS },\r\n { withAll: true },\r\n { isDismissAll },\r\n { handleRecommendationNotification }\r\n ));\r\n this.navigateBasedOnReason(reason);\r\n } else if (isReject) {\r\n track(_.extend({}, options, {\r\n userAction: APPLY_ACTION_TYPES.REJECT,\r\n }, { handleRecommendationNotification }));\r\n } else {\r\n track(_.extend({}, data, {\r\n userAction: APPLY_ACTION_TYPES.ACCEPT,\r\n }, this.props.context && {\r\n context: this.props.context,\r\n }, { guid: this.props.guid }, { handleRecommendationNotification }, { view: this.props.view })); // eslint-disable-line\r\n }\r\n };\r\n\r\n onCancel = () => {\r\n this.props.onCancel();\r\n };\r\n\r\n onYes = () => {\r\n this.setState({ isNavigateModalOpen: false });\r\n this.props.viewDetails(this.navigateToDetailType)();\r\n }\r\n\r\n onNo = () => {\r\n this.setState({\r\n isNavigateModalOpen: false,\r\n });\r\n }\r\n\r\n getFormatedReason = (reason) => {\r\n const { isDismissAll, permissions } = this.props;\r\n let formatedReason = null;\r\n if (reason.ReasonId) {\r\n formatedReason = {\r\n ReasonId: (isDismissAll\r\n && permissions.IsRecommendationInProductFeedbackLoopEnabled) ?\r\n reasonToMtTranslator(this.props.data.type, reason.ReasonId) : reason.ReasonId,\r\n };\r\n }\r\n if (reason.ReasonNote) {\r\n formatedReason = formatedReason || {};\r\n formatedReason.ReasonNote = reason.ReasonNote;\r\n }\r\n return formatedReason;\r\n }\r\n\r\n navigateBasedOnReason = (reason) => {\r\n if (reason && reason.ReasonId) {\r\n switch (reason.ReasonId) {\r\n case NAVIGATE_REASON.NoBudget: // open navigate modal for certain reason\r\n\r\n this.navigateToDetailType = RECOMMENDATION_TYPES.REALLOCATE_BUDGET;\r\n if (this.props.recommendationTypesAvailable.includes(this.navigateToDetailType)) {\r\n // open navigate modal\r\n this.setState({ isNavigateModalOpen: true });\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n render() {\r\n const {\r\n data: { type },\r\n i18n,\r\n recommendationDescription,\r\n isOpen,\r\n isProvideFeedbackOnly,\r\n readOnly,\r\n isReject,\r\n isApplyFeedBackFormShow,\r\n cid,\r\n aid,\r\n odata,\r\n onAutoApplyCancel,\r\n isDismissAll,\r\n permissions,\r\n useNavigateModal,\r\n newI18n,\r\n isFromImgExtV2,\r\n dataService,\r\n } = this.props;\r\n\r\n\r\n // If it doesn't show ApplyFeedBackForm, execute apply directly.\r\n if (!isApplyFeedBackFormShow && !isReject) {\r\n this.onSubmit();\r\n return null;\r\n }\r\n\r\n const navigateModal = (\r\n useNavigateModal && \r\n );\r\n\r\n return (\r\n
    \r\n {isDismissAll &&\r\n \r\n \r\n \r\n }\r\n\r\n {!isDismissAll &&\r\n \r\n {isReject &&\r\n \r\n }\r\n {!isReject &&\r\n \r\n }\r\n \r\n }\r\n {navigateModal}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport const FeedbackModal = withTrack(/* withAll */ true)(feedbackModal);\r\n","import _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport ReactModal from 'react-modal';\r\nimport {\r\n recommendationConfigs,\r\n withAdsAutoApply,\r\n RECOMMENDATION_TYPES,\r\n withImgAutoRetrieve,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { FeedbackModal } from './feedback-modal';\r\nimport rejectFeedbackTemplate from './reject-feedback-template.pug';\r\nimport autoApplyFeedbackTemplate from './apply-feedback-template.pug';\r\n\r\nclass FeedbackView extends React.PureComponent {\r\n static propTypes = {\r\n el: PropTypes.string.isRequired,\r\n callback: PropTypes.func.isRequired,\r\n data: PropTypes.objectOf(PropTypes.any).isRequired,\r\n i18n: PropTypes.objectOf(PropTypes.any).isRequired,\r\n newI18n: PropTypes.objectOf(PropTypes.any),\r\n isReject: PropTypes.bool.isRequired,\r\n campaignAutoApplyStatus: PropTypes.shape({\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: PropTypes.string,\r\n }),\r\n cid: PropTypes.string,\r\n aid: PropTypes.string,\r\n odata: PropTypes.PropTypes.shape({\r\n patch: PropTypes.func.isRequired,\r\n }),\r\n onAutoApplyCancel: PropTypes.func,\r\n isFromSummary: PropTypes.bool,\r\n isFromAutoApplyDialog: PropTypes.bool,\r\n recommendationsCount: PropTypes.number,\r\n readOnly: PropTypes.bool,\r\n isDismissAll: PropTypes.bool,\r\n recommendationTypesAvailable: PropTypes.arrayOf(PropTypes.string),\r\n showApplyConfirmModal: PropTypes.func,\r\n isCrossPageApplyAll: PropTypes.bool,\r\n isFromImgExtV2: PropTypes.bool,\r\n allowCrawlImagesFromLandingPage: PropTypes.bool,\r\n opportunities: PropTypes.arrayOf(PropTypes.any),\r\n }\r\n\r\n static defaultProps = {\r\n campaignAutoApplyStatus: {},\r\n cid: null,\r\n aid: null,\r\n odata: null,\r\n onAutoApplyCancel: null,\r\n isFromSummary: false,\r\n isFromAutoApplyDialog: false,\r\n recommendationsCount: 0,\r\n readOnly: false,\r\n isDismissAll: false,\r\n recommendationTypesAvailable: [],\r\n showApplyConfirmModal: _.noop,\r\n isCrossPageApplyAll: false,\r\n isFromImgExtV2: false,\r\n allowCrawlImagesFromLandingPage: false,\r\n opportunities: [],\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isModalOpen: true,\r\n };\r\n ReactModal.setAppElement(props.el);\r\n }\r\n\r\n handleFeedbackCancel = () => {\r\n this.setState({\r\n isModalOpen: false,\r\n });\r\n };\r\n\r\n callback = (opportunities) => {\r\n this.setState({\r\n isModalOpen: false,\r\n });\r\n if (!_.isUndefined(opportunities)) {\r\n this.props.callback(opportunities);\r\n } else {\r\n this.props.callback();\r\n }\r\n }\r\n\r\n render() {\r\n const { isModalOpen } = this.state;\r\n const {\r\n data: { type },\r\n i18n,\r\n newI18n,\r\n campaignAutoApplyStatus,\r\n isReject,\r\n cid,\r\n aid,\r\n odata,\r\n onAutoApplyCancel,\r\n isFromSummary,\r\n isFromAutoApplyDialog,\r\n showApplyConfirmModal,\r\n isCrossPageApplyAll,\r\n isFromImgExtV2,\r\n allowCrawlImagesFromLandingPage,\r\n opportunities,\r\n } = this.props;\r\n const titleConfig = recommendationConfigs[type].summaryTitle;\r\n const recommendationDescription = i18n.getString(titleConfig);\r\n let isApplyFeedBackFormShow = true;\r\n\r\n // If it's apply and adsByBingAutoApply is true (opt-in), it doesn't show the feedback form.\r\n if (isModalOpen && !isReject && (campaignAutoApplyStatus[type] === true\r\n || (isFromImgExtV2 && allowCrawlImagesFromLandingPage === 'true'))) {\r\n // If users apply all from summary page, it shows a confirmation dialog.\r\n if ((isFromSummary && isFromAutoApplyDialog) || isCrossPageApplyAll) {\r\n showApplyConfirmModal();\r\n return null;\r\n }\r\n isApplyFeedBackFormShow = false;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nexport function showRejectFeedbackPopup(options) {\r\n // when InProductFeedbackLoop is on, this function would show dismiss all popup.\r\n const container = document.querySelector('.recommendation-reject-feedback-popup');\r\n if (container !== null) {\r\n ReactDOM.unmountComponentAtNode(container);\r\n } else {\r\n $('body').append(rejectFeedbackTemplate());\r\n }\r\n const feedbackOptions = _.extend({}, options, { isReject: !options.isDismissAll });\r\n ReactDOM.render(\r\n (\r\n \r\n ), document.querySelector('.recommendation-reject-feedback-popup')\r\n );\r\n}\r\n\r\nexport function showApplyFeedbackPopup(options) {\r\n const container = document.querySelector('.recommendation-apply-feedback-popup');\r\n if (container !== null) {\r\n ReactDOM.unmountComponentAtNode(container);\r\n } else {\r\n $('body').append(autoApplyFeedbackTemplate());\r\n }\r\n const feedbackOptions = _.extend({}, options, { isReject: false });\r\n if (options.isFromImgExtV2) {\r\n const ImgAutoFeedbackView = withImgAutoRetrieve(FeedbackView);\r\n ReactDOM.render(\r\n (\r\n \r\n ), document.querySelector('.recommendation-apply-feedback-popup')\r\n );\r\n } else {\r\n const AdsAutoFeedbackView = withAdsAutoApply(FeedbackView);\r\n ReactDOM.render(\r\n (\r\n \r\n ), document.querySelector('.recommendation-apply-feedback-popup')\r\n );\r\n }\r\n}\r\n\r\n","/* eslint-disable no-unused-vars */\r\nconst popupWidth = 370;\r\nconst popupMinHeight = 16;\r\nconst popupOffset = 35;\r\nconst arrowWidth = 10;\r\nconst arrowOffset = 10;\r\nexport const getStyle = (_, { palette = {} }) => ({\r\n alertPopupContariner: {\r\n display: 'inline-block',\r\n marginLeft: '5px',\r\n position: 'relative',\r\n },\r\n alertIcon: {\r\n color: '#0078D4',\r\n },\r\n alertPopup: {\r\n boxShadow: '0px 3.2px 7.2px rgba(0, 0, 0, 0.132), 0px 0.6px 1.8px rgba(0, 0, 0, 0.108)',\r\n position: 'absolute',\r\n zIndex: 1000,\r\n '& .arrow': {\r\n display: 'block',\r\n background: '#fff',\r\n width: '10px',\r\n height: '10px',\r\n transform: 'rotate(45deg)',\r\n position: 'absolute',\r\n boxShadow: '0 6.4px 14.4px 0 rgba(0,0,0,.132), 0 1.2px 3.6px 0 rgba(0,0,0,.108)',\r\n zIndex: '-1',\r\n },\r\n '& .text': {\r\n position: 'relative',\r\n zIndex: 0,\r\n padding: '13px 16px',\r\n fontSize: '12px',\r\n lineHeight: '16px',\r\n width: `${popupWidth}px`,\r\n minHeight: `${popupMinHeight}px`,\r\n fontWeight: '400',\r\n color: '#323130',\r\n background: '#fff',\r\n },\r\n '&.bottom': {\r\n top: `${popupOffset}px`,\r\n left: `-${popupWidth / 2}px`,\r\n '& .arrow': {\r\n top: `-${arrowWidth / 2}px`,\r\n left: `${popupWidth / 2}px`,\r\n },\r\n },\r\n '&.top': {\r\n bottom: `${popupOffset}px`,\r\n left: `-${popupWidth / 2}px`,\r\n '& .arrow': {\r\n bottom: `-${arrowWidth / 2}px`,\r\n left: `${popupWidth / 2}px`,\r\n },\r\n },\r\n '&.right': {\r\n top: '0px',\r\n left: `${popupOffset}px`,\r\n '& .arrow': {\r\n top: `${arrowOffset}px`,\r\n left: `-${arrowWidth / 2}px`,\r\n },\r\n },\r\n '&.left': {\r\n top: '0px',\r\n right: `${popupOffset}px`,\r\n '& .arrow': {\r\n top: `${arrowOffset}px`,\r\n right: `-${arrowWidth / 2}px`,\r\n },\r\n },\r\n },\r\n});\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getStyle } from '../style/index';\r\n\r\nexport class RecommendationAlertPopup extends React.PureComponent {\r\n static propTypes = {\r\n alertMsg: PropTypes.string,\r\n iconClass: PropTypes.string,\r\n classes: PropTypes.objectOf(PropTypes.string).isRequired,\r\n position: PropTypes.string,\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node,\r\n ]),\r\n };\r\n\r\n static defaultProps = {\r\n alertMsg: '',\r\n iconClass: 'iconba-Unknown',\r\n position: 'bottom',\r\n children: null,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.popover = null;\r\n this.state = {\r\n hiddenText: true,\r\n };\r\n }\r\n\r\n showText = () => {\r\n this.setState({\r\n hiddenText: false,\r\n });\r\n }\r\n\r\n hideText = () => {\r\n this.setState({\r\n hiddenText: true,\r\n });\r\n }\r\n\r\n\r\n render() {\r\n const {\r\n alertMsg,\r\n iconClass,\r\n classes,\r\n position,\r\n children,\r\n } = this.props;\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n \r\n );\r\n }\r\n}\r\n\r\nexport const StyledRecommendationAlertPopup =\r\n withDefaultStyles(RecommendationAlertPopup, getStyle);\r\n\r\n\r\nexport function addRecommendationAlertPopup({\r\n container,\r\n alertMsg,\r\n position,\r\n iconClass,\r\n}) {\r\n ReactDOM.render(\r\n (),\r\n container\r\n );\r\n}\r\n","export const COLUMNS_METRICS = {\r\n budget: 'EstimatedBudget',\r\n impression: 'EstimatedImpressions',\r\n click: 'EstimatedClicks',\r\n conversion: 'EstimatedConversions',\r\n cost: 'EstimatedCost',\r\n};\r\n\r\nexport const defaultColumnMetric = COLUMNS_METRICS.click;\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\n\r\nimport { KoSchema } from '@bingads-webui/ko-schema';\r\n\r\nimport { COLUMNS_METRICS } from '../view/const';\r\n\r\nfunction interpolation(y1, y2, x1, x2, x) {\r\n if (x1 !== x2) {\r\n return (((y1 - y2) / (x1 - x2)) * (x - x2)) + y2;\r\n }\r\n return y2;\r\n}\r\n\r\nexport default class ViewModel {\r\n constructor({\r\n i18n,\r\n headers,\r\n landscapes,\r\n suggestedIndex,\r\n defaultColumnIndex,\r\n defaultRowIndex,\r\n inputRowIndex,\r\n defaultBudgetValue,\r\n rawLandscapeData,\r\n currentDataRowIndex,\r\n minBudget,\r\n maxBudget,\r\n view,\r\n readOnly,\r\n isSharedBudget = false,\r\n }) {\r\n this.view = view;\r\n this.rawSuggestedBudget = rawLandscapeData[suggestedIndex][COLUMNS_METRICS.budget];\r\n this.suggestedBudgetCellValue = landscapes[suggestedIndex][COLUMNS_METRICS.budget];\r\n\r\n this.i18n = i18n;\r\n this.readOnly = readOnly;\r\n this.rawLandscapeData = rawLandscapeData;\r\n this.landscapes = landscapes;\r\n this.suggestedIndex = ko.observable(suggestedIndex);\r\n this.headers = headers;\r\n this.localizedHeaders = _.map(this.headers, header =>\r\n ((isSharedBudget && header === COLUMNS_METRICS.budget) ?\r\n i18n.getString('ColumnName_EstimatedSharedBudget') :\r\n i18n.getString(`ColumnName_${header}`)));\r\n this.isForecasting = view.isForecasting;\r\n this.selectedRowIndex = ko.observable(defaultRowIndex);\r\n this.inputRowSelected = ko.computed(() => this.selectedRowIndex() === inputRowIndex);\r\n this.currentRowIndex = ko.observable(currentDataRowIndex);\r\n this.isCurrentDataRowSelected\r\n = ko.computed(() => this.selectedRowIndex() === currentDataRowIndex);\r\n this.inputBudget = ko.observable(defaultBudgetValue);\r\n this.estimationKPIArray = ko.observable(this.getEstimationsRowData().raw);\r\n this.estimationKPIFormattedArray = ko.observable(this.getEstimationsRowData().formatted);\r\n this.showTipMessage = ko.computed(() => {\r\n if (this.inputRowSelected()) {\r\n if (this.estimationKPIArray().length > 0) {\r\n return this.inputBudget() < this.rawSuggestedBudget;\r\n }\r\n return false;\r\n }\r\n\r\n const selectedBudget = this.rawLandscapeData[this.selectedRowIndex()][COLUMNS_METRICS.budget];\r\n return selectedBudget < this.rawSuggestedBudget;\r\n });\r\n\r\n if (view.fromBudgetColumn) {\r\n this.userInputDisplayVal = ko.observable(this.i18n.formatDecimal(view.currentBudget, {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n }));\r\n this.isInputing = ko.observable(true);\r\n this.tipMessage = this.isForecasting ?\r\n i18n.getString('BudgetLandscape_Table_Budget_Tip_Forecasting').replace('{0}', this.suggestedBudgetCellValue) : // eslint-disable-line\r\n i18n.getString('BudgetLandscape_Table_Budget_Tip_Recovery').replace('{0}', this.suggestedBudgetCellValue); // eslint-disable-line\r\n } else {\r\n this.userInputDisplayVal = ko.observable('');\r\n this.isInputing = ko.observable(false);\r\n this.tipMessage = i18n.getString('BudgetLandscape_Table_Budget_Tip').replace('{0}', this.suggestedBudgetCellValue); // eslint-disable-line\r\n this.selectedColumnIndex = ko.observable(defaultColumnIndex);\r\n this.conversionSelected\r\n = ko.computed(() => this.headers[this.selectedColumnIndex()] === COLUMNS_METRICS.conversion); // eslint-disable-line\r\n this.chartTitle = ko.computed(() => {\r\n const selectedHeader = this.headers[this.selectedColumnIndex()];\r\n\r\n return isSharedBudget && selectedHeader === COLUMNS_METRICS.budget ?\r\n i18n.getString('ColumnName_EstimatedSharedBudget') :\r\n i18n.getString(`ColumnName_${selectedHeader}`);\r\n });\r\n this.selectedColumnData =\r\n ko.computed(() => _.pluck(this.rawLandscapeData, this.headers[this.selectedColumnIndex()]));\r\n }\r\n\r\n this.isInputing.subscribe((value) => {\r\n if (value) {\r\n this.selectedRowIndex(inputRowIndex);\r\n }\r\n });\r\n this.userInputDisplayVal.subscribe((value) => {\r\n this.inputBudget(i18n.isValidDecimal(value) ? i18n.parseDecimal(value) : value);\r\n this.inputBudget.validate();\r\n\r\n // need check if defaultValue\r\n if (this.inputBudget() !== '' && this.inputBudget.isValid()) {\r\n const { raw, formatted } = this.getEstimationsRowData();\r\n this.estimationKPIArray(raw);\r\n this.estimationKPIFormattedArray(formatted);\r\n } else {\r\n this.estimationKPIArray([]);\r\n this.estimationKPIFormattedArray([]);\r\n }\r\n });\r\n\r\n // validation\r\n const schema = {\r\n properties: {\r\n inputBudget: {\r\n type: 'number',\r\n required: true,\r\n default: '',\r\n minimum: minBudget,\r\n maximum: maxBudget,\r\n },\r\n },\r\n };\r\n KoSchema(this, schema, _.keys(schema.properties), {}, {}, i18n);\r\n this.inputBudget.validators.type.message = i18n.getString('ErrorMessage_InputNumericValue');\r\n this.inputBudget.validators.range.message\r\n = i18n.getString('BudgetSuggestionsValidationMsg')\r\n .replace('{0}', minBudget)\r\n .replace('{1}', i18n.currency)\r\n .replace('{2}', maxBudget)\r\n .replace('{3}', i18n.currency);\r\n this.inputBudget.validators.decimalLength.message = i18n.getString('Validation_Number_Max_Length');\r\n\r\n this.errorMessage = ko.observable('');\r\n this.showErrorMessage = ko.computed(() => {\r\n if (this.inputRowSelected() && !this.inputBudget.isValid()) {\r\n this.errorMessage(_.first(this.inputBudget.errors()));\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n getTableCellText(landscape, property, columnIndexExcludeRadio) {\r\n const val = landscape[property];\r\n if (columnIndexExcludeRadio === 0) {\r\n if (landscape.isSuggested) {\r\n return `${val} ${this.i18n.getString('BudgetLandscape_Comment_Recommended')}`;\r\n } else if (landscape.isCurrent) {\r\n return `${val} ${this.i18n.getString('BudgetLandscape_Comment_Current')}`;\r\n }\r\n }\r\n return val;\r\n }\r\n\r\n getTabelCellId(property, columnIndex, rowIndex) {\r\n if (columnIndex > 0 && property === 'EstimatedBudget') {\r\n return `EstimatedBudget-${rowIndex}`;\r\n }\r\n return `${property}-${rowIndex}`;\r\n }\r\n\r\n getCustomInputBudgetAriaLabel() {\r\n return this.i18n.getString('BudgetLandscape_Table_CustomInput');\r\n }\r\n\r\n getEstimationsRowData() {\r\n if (this.inputBudget() === '') {\r\n return { raw: [], formatted: [] };\r\n }\r\n\r\n let data;\r\n const inputBudget = this.inputBudget();\r\n const estimationHeaders = _.rest(this.headers); // exclude first\r\n const sorted = _.sortBy(this.rawLandscapeData, COLUMNS_METRICS.budget); // ascending\r\n const minPoint = sorted[0];\r\n const maxPoint = sorted[sorted.length - 1];\r\n const minBudget = minPoint[COLUMNS_METRICS.budget];\r\n const maxBudget = maxPoint[COLUMNS_METRICS.budget];\r\n\r\n if (inputBudget >= maxBudget) {\r\n data = _.map(estimationHeaders, header => maxPoint[header]);\r\n } else if (inputBudget <= minBudget) {\r\n data = _.map(\r\n estimationHeaders,\r\n header => (\r\n interpolation(\r\n 0, minPoint[header], // y1, y2\r\n 0, minPoint[COLUMNS_METRICS.budget], // x1, x2\r\n inputBudget\r\n )\r\n )\r\n );\r\n } else {\r\n const nextPointIndex =\r\n _.findIndex(sorted, point => point[COLUMNS_METRICS.budget] >= inputBudget);\r\n const previousPoint = sorted[nextPointIndex - 1];\r\n const nextPoint = sorted[nextPointIndex];\r\n\r\n data = _.map(\r\n estimationHeaders,\r\n header => (\r\n interpolation(\r\n previousPoint[header], nextPoint[header], // y1, y2\r\n previousPoint[COLUMNS_METRICS.budget], nextPoint[COLUMNS_METRICS.budget], // x1, x2\r\n inputBudget\r\n )\r\n )\r\n );\r\n }\r\n\r\n return {\r\n raw: data,\r\n formatted: _.map(estimationHeaders, (header, index) =>\r\n this.view.getFormattedTableCell(header, data[index])),\r\n };\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\n\r\nimport {\r\n formatCost,\r\n formatBid,\r\n formatInteger,\r\n NOT_AVAILABLE_DEFAULT_STR,\r\n CONVERSION_STATUS_TYPE,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { addRecommendationAlertPopup } from '@bingads-webui-campaign-react/recommendation-alert-popup';\r\nimport { triggerContainerResizing } from '@bingads-webui-campaign-react/virtual-scrollbar-recalculate-trigger';\r\n\r\nimport ViewModel from '../viewmodel/table';\r\nimport template from '../template/table.pug';\r\nimport templateForInlineEditor from '../template/tableForInlineEditor.pug';\r\n\r\nimport { COLUMNS_METRICS, defaultColumnMetric } from './const';\r\n\r\nconst COMMENT_TYPES = {\r\n SUGGESTED: 'Suggested',\r\n CURRENT: 'Current',\r\n MAXVALUE: 'MaxValue',\r\n};\r\nexport const KEYSENTER = 13;\r\n\r\nexport class BudgetLandScapeTable extends Backbone.View {\r\n initialize({\r\n opportunityData,\r\n i18n,\r\n conversionSummaryStatus,\r\n appConfig,\r\n currentBudget = null,\r\n fromBudgetColumn = false,\r\n fromCampaignTab = false,\r\n view = null,\r\n readOnly,\r\n isSharedBudget = false,\r\n // need these configuration for shell ui\r\n budgetRange = null,\r\n permissions = {},\r\n }) {\r\n this.view = view;\r\n this.opportunityId = opportunityData.OpportunityId;\r\n this.campaignId = opportunityData.Target && opportunityData.Target.CampaignId;\r\n this.opportunityData = opportunityData;\r\n this.landscapeData = _.filter(opportunityData.Landscapes, ({\r\n Comment,\r\n }) => Comment !== COMMENT_TYPES.MAXVALUE);\r\n this.currentBudget = currentBudget;\r\n this.fromBudgetColumn = fromBudgetColumn;\r\n this.fromCampaignTab = fromCampaignTab;\r\n this.i18n = i18n;\r\n this.conversionSummaryStatus = conversionSummaryStatus;\r\n this.isForecasting = opportunityData.IsForecasting;\r\n this.permissions = permissions;\r\n\r\n if (appConfig) {\r\n this.minBudget = appConfig.get('BudgetRange').DailyRange.FloorValue;\r\n this.maxBudget = appConfig.get('BudgetRange').DailyRange.CeilingValue;\r\n } else if (budgetRange) {\r\n this.minBudget = budgetRange.FloorValue;\r\n this.maxBudget = budgetRange.CeilingValue;\r\n }\r\n\r\n this.config = this.getTableConfig();\r\n const {\r\n headers,\r\n landscapes,\r\n suggestedIndex,\r\n currentDataRowIndex,\r\n defaultColumnIndex,\r\n defaultRowIndex,\r\n inputRowIndex,\r\n defaultBudgetValue,\r\n } = this.config;\r\n\r\n this.feedbackPersonalizedPopup = null;\r\n this.isInProductFeedbackLoopOn =\r\n permissions.IsRecommendationInProductFeedbackLoopEnabled &&\r\n opportunityData.IsFeedbackPersonalized;\r\n\r\n this.ko_model = new ViewModel({\r\n rawLandscapeData: this.landscapeData,\r\n i18n,\r\n headers,\r\n landscapes,\r\n suggestedIndex,\r\n currentDataRowIndex,\r\n defaultColumnIndex,\r\n defaultRowIndex,\r\n inputRowIndex,\r\n defaultBudgetValue,\r\n view: this,\r\n readOnly,\r\n isSharedBudget,\r\n minBudget: this.minBudget,\r\n maxBudget: this.maxBudget,\r\n });\r\n if (!this.fromBudgetColumn) {\r\n this.ko_model.selectedRowIndex.subscribe(() => {\r\n this.trigger('selectedRowChanged');\r\n });\r\n this.ko_model.selectedColumnIndex.subscribe(() => {\r\n this.trigger('selectedColumnChanged');\r\n });\r\n this.ko_model.estimationKPIArray.subscribe(() => {\r\n this.trigger('estimationChanged');\r\n });\r\n }\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click thead th': 'onColumnClicked',\r\n 'click tbody td': 'onColumnClicked',\r\n 'click tbody tr': 'onRowClicked',\r\n 'keydown .user-input-cell input': 'onKeyboardCustomInput',\r\n };\r\n }\r\n\r\n isValid() {\r\n if (this.ko_model.inputRowSelected()) {\r\n this.ko_model.validate();\r\n return !this.ko_model.showErrorMessage();\r\n }\r\n return true;\r\n }\r\n\r\n onColumnClicked(e) {\r\n if (this.fromBudgetColumn) {\r\n return;\r\n }\r\n const { cellIndex } = e.currentTarget;\r\n // cellIndex === 0 indicates the radio column\r\n if (cellIndex !== 0) {\r\n this.ko_model.selectedColumnIndex(e.currentTarget.cellIndex - 1);\r\n }\r\n }\r\n\r\n onRowClicked(e) {\r\n // e.currentTarget.rowIndex is from 1\r\n this.ko_model.selectedRowIndex(e.currentTarget.rowIndex - 1);\r\n }\r\n\r\n onKeyboardCustomInput(e) {\r\n if (e && e.which === KEYSENTER) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.trigger('saveCustomValueWithKeyboard');\r\n }\r\n }\r\n\r\n render() {\r\n if (this.fromBudgetColumn) {\r\n this.$el.html(templateForInlineEditor({\r\n i18n: this.i18n,\r\n currencySymbolClassName: `symbol-size-${this.i18n.getCurrencySymbol().length}`,\r\n currencySymbol: this.i18n.getCurrencySymbol(),\r\n notAvailableStr: NOT_AVAILABLE_DEFAULT_STR,\r\n }));\r\n\r\n if (this.view) {\r\n this.view.$('.input-budget-container').hide();\r\n this.view.$('.select-budget-container').attr('class', 'select-budget-container-with-landscape');\r\n }\r\n } else {\r\n this.$el.html(template({\r\n i18n: this.i18n,\r\n placeHolderText: this.i18n.getString('BudgetLandscape_Table_CustomInput'),\r\n currencySymbol: this.i18n.getCurrencySymbol(),\r\n notAvailableStr: NOT_AVAILABLE_DEFAULT_STR,\r\n }));\r\n }\r\n ko.applyBindings(this.ko_model, this.el);\r\n\r\n if (this.isInProductFeedbackLoopOn) {\r\n addRecommendationAlertPopup({\r\n alertMsg: this.i18n.getString('Recommendation_AlertMsg_FeedbackPersonalized'),\r\n iconClass: 'iconba-Insights',\r\n position: 'right',\r\n container: this.$el.find('.tooltip-container').get(0),\r\n });\r\n }\r\n\r\n if (this.fromCampaignTab) {\r\n triggerContainerResizing();\r\n }\r\n return this;\r\n }\r\n\r\n isSuggested() {\r\n return this.ko_model.selectedRowIndex() === this.config.suggestedIndex;\r\n }\r\n\r\n getSelectedNewBudget() {\r\n const selectedRow = this.ko_model.selectedRowIndex();\r\n if (selectedRow < this.landscapeData.length && selectedRow >= 0) {\r\n return this.landscapeData[selectedRow][COLUMNS_METRICS.budget];\r\n }\r\n return this.ko_model.inputBudget();\r\n }\r\n\r\n getViewModel() {\r\n return this.ko_model;\r\n }\r\n\r\n formatIntegerValue(value) {\r\n if (value < 1000) {\r\n return formatInteger(value, this.i18n);\r\n }\r\n // this is to reuse the formatBid to always 2 decimals\r\n return formatBid(value, this.i18n);\r\n }\r\n\r\n getFormattedTableCell(header, value) {\r\n let result;\r\n\r\n switch (header) {\r\n case COLUMNS_METRICS.budget:\r\n result = this.i18n.formatCurrency(value);\r\n break;\r\n case COLUMNS_METRICS.cost:\r\n result = formatCost(value, this.i18n, this.i18n.currency);\r\n break;\r\n case COLUMNS_METRICS.conversion:\r\n result = this.conversionSummaryStatus === CONVERSION_STATUS_TYPE.HAS_DATA ?\r\n this.formatIntegerValue(value, this.i18n) : NOT_AVAILABLE_DEFAULT_STR;\r\n break;\r\n default:\r\n result = this.formatIntegerValue(value, this.i18n);\r\n break;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n getTableConfig() {\r\n const { landscapeData } = this;\r\n const currentBudget = this.fromCampaignTab ?\r\n this.currentBudget : this.opportunityData.CurrentBudget;\r\n let suggestedIndex = -1;\r\n let currentDataRowIndex = -1;\r\n let headers = [\r\n COLUMNS_METRICS.budget,\r\n COLUMNS_METRICS.impression,\r\n COLUMNS_METRICS.click,\r\n COLUMNS_METRICS.conversion,\r\n COLUMNS_METRICS.cost,\r\n ];\r\n\r\n if (this.fromBudgetColumn) {\r\n headers = _.without(headers, COLUMNS_METRICS.impression, COLUMNS_METRICS.cost);\r\n\r\n if (this.conversionSummaryStatus !== CONVERSION_STATUS_TYPE.HAS_DATA) {\r\n headers = _.without(headers, COLUMNS_METRICS.conversion);\r\n }\r\n }\r\n\r\n const defaultColumnIndex = _.findIndex(headers, header => header === defaultColumnMetric);\r\n\r\n const formattedData = _.map(landscapeData, (landscape, index) => {\r\n const { Comment } = landscape;\r\n\r\n const isSuggested = Comment === COMMENT_TYPES.SUGGESTED;\r\n if (isSuggested) {\r\n suggestedIndex = index;\r\n }\r\n const isCurrent = landscape.EstimatedBudget === currentBudget;\r\n if (isCurrent) {\r\n currentDataRowIndex = index;\r\n }\r\n\r\n const result = {\r\n rawBudget: landscape[COLUMNS_METRICS.budget],\r\n isSuggested,\r\n isCurrent,\r\n currentDataRowIndex,\r\n };\r\n _.each(headers, (header) => {\r\n result[header] = this.getFormattedTableCell(header, landscape[header]);\r\n });\r\n return result;\r\n });\r\n\r\n // For inline budget suggestion view:\r\n // 1. will not show current budget row because current budget showed in input row\r\n // 2. default selected is input row\r\n // 3. input field need to be current budget value\r\n return {\r\n headers,\r\n landscapes: formattedData,\r\n suggestedIndex,\r\n currentDataRowIndex,\r\n defaultColumnIndex,\r\n defaultRowIndex: this.fromBudgetColumn ? formattedData.length : suggestedIndex,\r\n inputRowIndex: formattedData.length,\r\n defaultBudgetValue: this.fromBudgetColumn ? currentBudget.toString() : '',\r\n };\r\n }\r\n}\r\n","import _ from 'underscore';\r\n\r\nimport tooltipTemplate from '../template/tooltip.pug';\r\n\r\nconst styles = {\r\n chartColorBlue: '#0078D4',\r\n chartColorDarkBlue: '#eee',\r\n chartColorLightBlue: 'rgba(135, 206, 250, 1)',\r\n};\r\n\r\nconst barChartOptions = {\r\n chart: {\r\n type: 'bar',\r\n marginLeft: 0,\r\n marginTop: 0,\r\n marginBottom: 0,\r\n },\r\n title: {\r\n text: null,\r\n },\r\n yAxis: {\r\n tickPositions: [],\r\n gridLineWidth: 0,\r\n },\r\n legend: {\r\n enabled: false,\r\n },\r\n credits: {\r\n enabled: false,\r\n },\r\n tooltip: {\r\n enabled: true,\r\n formatter: null,\r\n },\r\n plotOptions: {\r\n bar: {\r\n animation: false,\r\n pointWidth: 25,\r\n },\r\n series: {\r\n cursor: 'pointer',\r\n point: {\r\n events: {\r\n click: null,\r\n },\r\n },\r\n states: {\r\n hover: {\r\n enabled: false,\r\n },\r\n inactive: {\r\n enabled: false,\r\n },\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport function initChart({\r\n seriesName,\r\n i18n,\r\n selectedRowIndex,\r\n points,\r\n onPointClicked,\r\n budgetPoints,\r\n isBudgetColumnSelected,\r\n}) {\r\n const chartOptions = _.clone(barChartOptions);\r\n\r\n const spaceBetweenBar = 5;\r\n const pointWidthWithPadding = chartOptions.plotOptions.bar.pointWidth + spaceBetweenBar;\r\n // 4 is for space between chart outer line and first/last bar to ensure space between bar is 5px.\r\n chartOptions.chart.height = (points.length * pointWidthWithPadding) + 4;\r\n\r\n chartOptions.colors = [styles.chartColorLightBlue, styles.chartColorDarkBlue];\r\n let seriesColorChanged = false;\r\n const stylesChartColor = styles.chartColorBlue;\r\n const mappedResult = _.map(points, (point, index) => {\r\n const color = index === selectedRowIndex ? stylesChartColor : styles.chartColorDarkBlue;\r\n if (!seriesColorChanged) {\r\n chartOptions.colors = [styles.chartColorDarkBlue, stylesChartColor];\r\n seriesColorChanged = true;\r\n }\r\n return {\r\n color,\r\n y: point,\r\n };\r\n }, this);\r\n\r\n const dataMin = 0; // for the custom input\r\n const dataMax = Math.ceil(mappedResult[0].y);\r\n const positions = [];\r\n\r\n const increment = Math.ceil((dataMax - dataMin) / 40) * 10;\r\n for (let tick = 0; tick - increment < dataMax; tick += increment) {\r\n positions.push(tick);\r\n }\r\n chartOptions.yAxis.tickPositions = positions;\r\n\r\n chartOptions.series = [{\r\n name: seriesName,\r\n data: mappedResult,\r\n }];\r\n\r\n /* eslint-disable func-names */\r\n chartOptions.plotOptions.series.point.events.click = function (event) {\r\n event.stopImmediatePropagation();\r\n onPointClicked(event, this.x);\r\n };\r\n\r\n chartOptions.tooltip.formatter = function () {\r\n const value = i18n.formatDecimal(this.y);\r\n return tooltipTemplate({\r\n name: this.series.name,\r\n value,\r\n primaryMetricName: i18n.getString('ColumnName_EstimatedBudget'),\r\n primaryMetricValue: budgetPoints[this.x],\r\n showPrimaryMetric: !isBudgetColumnSelected,\r\n });\r\n };\r\n /* eslint-enable func-names */\r\n return chartOptions;\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport 'highcharts';\r\n\r\nimport {\r\n CONVERSION_STATUS_TYPE,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport template from '../template/chart.pug';\r\nimport uetLinkTemplate from '../template/uet-link.pug';\r\nimport { initChart } from './chart-config';\r\nimport { COLUMNS_METRICS } from './const';\r\n\r\nexport class BudgetLandScapeChart extends Backbone.View {\r\n initialize({\r\n tableViewmodel,\r\n i18n,\r\n conversionSummaryStatus,\r\n legacyRouter,\r\n }) {\r\n this.tableViewmodel = tableViewmodel;\r\n this.i18n = i18n;\r\n this.conversionSummaryStatus = conversionSummaryStatus;\r\n this.legacyRouter = legacyRouter;\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .uet-link': 'goToUET',\r\n };\r\n }\r\n\r\n goToUET() {\r\n this.legacyRouter.navigateToRoute('uettag');\r\n this.trigger('close_poputil');\r\n }\r\n\r\n render() {\r\n this.$el.html(template({\r\n i18n: this.i18n,\r\n noUET: this.conversionSummaryStatus === CONVERSION_STATUS_TYPE.NO_UET,\r\n noData: this.conversionSummaryStatus === CONVERSION_STATUS_TYPE.NO_DATA,\r\n uetLink: uetLinkTemplate({ i18n: this.i18n }),\r\n }));\r\n ko.applyBindings(this.tableViewmodel, this.el);\r\n\r\n // delay draw graph when view is rendered on page, otherwise chart width doesn't respect parent.\r\n _.defer(() => {\r\n this.redraw();\r\n });\r\n return this;\r\n }\r\n\r\n onPointClicked(e, x) {\r\n this.tableViewmodel.selectedRowIndex(x);\r\n }\r\n\r\n redraw() {\r\n const selectedColumnIndex = this.tableViewmodel.selectedColumnIndex();\r\n const isBudgetColumnSelected = selectedColumnIndex === 0;\r\n\r\n const estimations = this.tableViewmodel.estimationKPIArray();\r\n const budgetPoint = _.isEmpty(estimations) ? 0 : this.tableViewmodel.inputBudget();\r\n const selectedEstimationPoint = selectedColumnIndex === 0\r\n ? budgetPoint : (estimations[selectedColumnIndex - 1] || 0);\r\n\r\n const budgetPoints =\r\n _.pluck(this.tableViewmodel.landscapes, COLUMNS_METRICS.budget)\r\n .concat(budgetPoint);\r\n const points =\r\n this.tableViewmodel.selectedColumnData()\r\n .concat(selectedEstimationPoint);\r\n\r\n this.$('.column-chart-container').highcharts(initChart({\r\n seriesName: this.tableViewmodel.chartTitle(),\r\n selectedRowIndex: this.tableViewmodel.selectedRowIndex(),\r\n budgetPoints,\r\n points,\r\n i18n: this.i18n,\r\n onPointClicked: this.onPointClicked.bind(this),\r\n isBudgetColumnSelected,\r\n }));\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\n\r\nimport {\r\n withContextualAttributeTemplate,\r\n showContextualAttribute,\r\n hideContextualAttribute,\r\n prependAccountAttribute\r\n} from '@bingads-webui-campaign/recommendation-contextual-attribute';\r\nimport { APPLY_USERINPUT_TYPES, CONTEXTUAL_ENTITY_TYPE } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport template from '../template/index.pug';\r\nimport { BudgetLandScapeTable } from './table';\r\nimport { BudgetLandScapeChart } from './chart';\r\n\r\nexport class RecommendationInlineBudgetView extends Backbone.View {\r\n initialize({\r\n data,\r\n i18n,\r\n deps,\r\n router,\r\n isMCC,\r\n gridView,\r\n readOnly,\r\n isSharedBudget = false,\r\n gridService,\r\n }) {\r\n this.opportunityData = _.first(data.Opportunities);\r\n this.i18n = i18n;\r\n this.data = data;\r\n this.deps = deps;\r\n this.router = router;\r\n this.isMCC = isMCC;\r\n this.isSharedBudget = isSharedBudget;\r\n this.grid = { gridView };\r\n this.gridService = gridService;\r\n\r\n const conversionSummaryStatus = data.ConversionSummaryStatus;\r\n this.tableView = new BudgetLandScapeTable({\r\n i18n,\r\n conversionSummaryStatus,\r\n opportunityData: this.opportunityData,\r\n appConfig: deps.appConfig,\r\n readOnly,\r\n isSharedBudget,\r\n permissions: deps.permissions,\r\n });\r\n this.chartView = new BudgetLandScapeChart({\r\n tableViewmodel: this.tableView.getViewModel(),\r\n i18n,\r\n conversionSummaryStatus,\r\n legacyRouter: deps.legacyRouter,\r\n });\r\n this.tableView.on('selectedRowChanged selectedColumnChanged estimationChanged', () => {\r\n this.chartView.redraw();\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .apply': this.apply,\r\n 'click .cancel': this.cancel,\r\n 'mouseover .recommendation-inline-budget-view .contextual-tooltip': 'showContextualAttributePopup',\r\n 'mouseout .recommendation-inline-budget-view .contextual-tooltip': 'hideContextualAttributePopup',\r\n 'click .recommendation-inline-budget-view .contextual-tooltip': 'scopeRouting',\r\n };\r\n }\r\n\r\n scopeRouting(e) {\r\n this.router(e);\r\n }\r\n\r\n hideContextualAttributePopup(e) {\r\n clearTimeout(this.timerForPopupContextualAttribute);\r\n hideContextualAttribute({ e, self: this });\r\n }\r\n\r\n showContextualAttributePopup(e) {\r\n clearTimeout(this.timerForPopupContextualAttribute);\r\n this.timerForPopupContextualAttribute = setTimeout(() => {\r\n showContextualAttribute({\r\n deps: this.deps,\r\n i18n: this.i18n,\r\n e,\r\n type: this.data.OpportunityType,\r\n isExpanding: true,\r\n self: this,\r\n recommendationService: this.gridService.recommendationService,\r\n });\r\n }, 500);\r\n }\r\n\r\n render() {\r\n const { BudgetType, Shared } = this.opportunityData;\r\n const entity = withContextualAttributeTemplate({\r\n opportunityId: this.data.Opportunities[0].OpportunityId,\r\n entityName: this.isSharedBudget ?\r\n Shared.BudgetName : this.data.Target.CampaignName,\r\n entityId: this.isSharedBudget ?\r\n Shared.BudgetId : this.data.Target.CampaignId,\r\n entityType: this.isSharedBudget ?\r\n CONTEXTUAL_ENTITY_TYPE.SHARED_BUDGET : CONTEXTUAL_ENTITY_TYPE.CAMPAIGN,\r\n status: 'false', // to check whether it is 1st time to create this view\r\n isExpandingView: true,\r\n ariaLabel: this.isSharedBudget ?\r\n '' : this.i18n.getString('Click to scope to campaign {{campaignName}}', { campaignName: this.data.Target.CampaignName }),\r\n });\r\n\r\n this.$el.html(template({\r\n entityName: this.isMCC ? prependAccountAttribute({\r\n originEntity: entity,\r\n opportunityId: this.data.Opportunities[0].OpportunityId,\r\n accountId: this.data.Target.AccountId,\r\n accountName: this.data.Target.AccountName,\r\n }) : entity,\r\n budgetType: BudgetType,\r\n i18n: this.i18n,\r\n isSharedBudget: this.isSharedBudget,\r\n }));\r\n this.$('.landscape-table').html(this.tableView.render().el);\r\n this.$('.landscape-chart').html(this.chartView.render().el);\r\n\r\n ko.applyBindings(this.tableView.getViewModel(), this.$('.budget-landscape-actions')[0]);\r\n\r\n return this;\r\n }\r\n\r\n apply() {\r\n if (this.tableView.isValid()) {\r\n let userInputs = null;\r\n if (!this.tableView.isSuggested()) {\r\n userInputs = [{\r\n '@odata.type': APPLY_USERINPUT_TYPES[this.opportunityData.OpportunityType],\r\n OpportunityId: this.opportunityData.OpportunityId,\r\n NewBudget: this.tableView.getSelectedNewBudget(),\r\n }];\r\n }\r\n\r\n this.trigger('apply', _.extend({\r\n opportunities: [this.opportunityData],\r\n }, userInputs && {\r\n userInputs,\r\n }));\r\n }\r\n }\r\n\r\n cancel() {\r\n this.trigger('cancel');\r\n }\r\n\r\n hasChanged() {\r\n return this.tableView.ko_model.selectedRowIndex() !== this.tableView.config.suggestedIndex;\r\n }\r\n\r\n remove() {\r\n this.chartView.remove();\r\n this.tableView.remove();\r\n super.remove();\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ReactModal from 'react-modal';\r\nimport { TYPE_DESCRIPTION_TABLE } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nexport class NavigateModal extends React.PureComponent {\r\n static propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n onYes: PropTypes.func.isRequired,\r\n onNo: PropTypes.func.isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n recommendationType: PropTypes.string.isRequired,\r\n };\r\n\r\n onYes = () => {\r\n this.props.onYes();\r\n }\r\n\r\n onNo = () => {\r\n this.props.onNo();\r\n }\r\n\r\n render() {\r\n const { i18n, isOpen, recommendationType } = this.props;\r\n const recommendationDescription = i18n.getString(TYPE_DESCRIPTION_TABLE[recommendationType]);\r\n const i18nKey = 'Recommendation_Feedback_Dismiss_Suggest_Recommendation_Notification';\r\n return (\r\n \r\n \r\n
    \r\n
    \r\n {i18n.getString(i18nKey, { recommendationDescription })}\r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { MessageBar, MessageBarType } from '@bingads-webui-react/fabric-control';\r\nimport {\r\n recommendationInProductUpdateConfigs,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\n\r\nexport class WarnNotificationBanner extends React.PureComponent {\r\n static propTypes = {\r\n type: PropTypes.string.isRequired,\r\n preferencesService: PropTypes.objectOf(PropTypes.any),\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n cid: PropTypes.number.isRequired,\r\n uid: PropTypes.number.isRequired,\r\n aid: PropTypes.number.isRequired,\r\n isMCC: PropTypes.bool.isRequired,\r\n dataService: PropTypes.shape({\r\n setAutoApplyOptInStatus: PropTypes.func.isRequired,\r\n }).isRequired,\r\n initializeMiniGrid: PropTypes.func,\r\n isFromSummary: PropTypes.bool,\r\n isAutoApplyOptIn: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n preferencesService: null,\r\n isFromSummary: false,\r\n initializeMiniGrid: _.noop,\r\n isAutoApplyOptIn: false,\r\n };\r\n\r\n componentDidMount() {\r\n const {\r\n isFromSummary,\r\n initializeMiniGrid,\r\n } = this.props;\r\n\r\n if (isFromSummary) {\r\n initializeMiniGrid();\r\n }\r\n }\r\n\r\n render() {\r\n const {\r\n type, preferencesService, newI18n, cid, aid, uid, isMCC, isAutoApplyOptIn,\r\n } = this.props;\r\n const config = recommendationInProductUpdateConfigs[type];\r\n\r\n return (\r\n
    \r\n { preferencesService && config &&\r\n config.warnNotification &&\r\n (config.warnNotificationInMCC === true ||\r\n (config.warnNotificationInMCC !== true && !isMCC)) && !isAutoApplyOptIn &&\r\n
    \r\n \r\n \r\n {config.warnHelpInfo &&\r\n \r\n }\r\n \r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport {\r\n getRecommendationPreferences,\r\n saveRecommendationPreferences,\r\n recommendationInProductUpdateConfigs,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { IN_PRODUCT_UPDATE_RECOMMENDATIONS_VIEW_TIME } from '@bingads-webui-campaign/recommendation-preferences';\r\n\r\nexport function isShowNotificationBannerInTargetRecommendations(preferencesService, type) {\r\n const config = recommendationInProductUpdateConfigs[type];\r\n if (!_.isUndefined(config) &&\r\n !_.isUndefined(config.neverExpired) &&\r\n config.neverExpired === true) {\r\n return true;\r\n }\r\n const data = getRecommendationPreferences(preferencesService);\r\n const firstViewTime = data[IN_PRODUCT_UPDATE_RECOMMENDATIONS_VIEW_TIME.FirstViewTime];\r\n\r\n // if current time is more than 30 days after the first view time, disable it.\r\n if (firstViewTime && firstViewTime[type]) {\r\n return (Date.now() - firstViewTime[type]) < 30 * 24 * 3600 * 1000;\r\n }\r\n return false;\r\n}\r\n\r\nexport function judgeWhetherUserFirstViewNotificationBanner(preferencesService, type) {\r\n const data = getRecommendationPreferences(preferencesService);\r\n const firstViewTime =\r\n data[IN_PRODUCT_UPDATE_RECOMMENDATIONS_VIEW_TIME.FirstViewTime]; // true if viewed\r\n\r\n // we would restore for all types of recommendations\r\n return _.isUndefined(firstViewTime) || _.isUndefined(firstViewTime[type]);\r\n}\r\n\r\nexport function recordUserFirstViewTimeOfNotificationBanner(preferencesService, type) {\r\n // for e.g. firstViewTime[RAD] = 100000000, save into preference for that user\r\n saveRecommendationPreferences(\r\n {\r\n [IN_PRODUCT_UPDATE_RECOMMENDATIONS_VIEW_TIME.FirstViewTime]: { [type]: Date.now() },\r\n },\r\n preferencesService\r\n );\r\n}\r\n\r\nexport function isInProductUpdateBannerAvailable(type, permissions, summary) {\r\n if (recommendationInProductUpdateConfigs[type]) {\r\n const config = recommendationInProductUpdateConfigs[type];\r\n return (permissions[config.permission] && summary[config.available]);\r\n }\r\n return false;\r\n}\r\n\r\nexport function isAdditionalPitchingAvailable(type, permissions, summary) {\r\n if (recommendationInProductUpdateConfigs[type]) {\r\n const config = recommendationInProductUpdateConfigs[type];\r\n if (config.additionalPitchingEnabledBy === 'permission') {\r\n return permissions[config.permission];\r\n } else if (config.additionalPitchingEnabledBy === 'available') {\r\n return summary[config.available];\r\n }\r\n return false;\r\n }\r\n return false;\r\n}\r\n","/* eslint-disable no-nested-ternary */\r\n/* eslint-disable no-undef */\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { TooltipHost, TooltipOverflowMode, DirectionalHint } from '@bingads-webui-react/fabric-control';\r\nimport {\r\n recommendationInProductUpdateConfigs,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { judgeWhetherUserFirstViewNotificationBanner,\r\n isShowNotificationBannerInTargetRecommendations,\r\n recordUserFirstViewTimeOfNotificationBanner,\r\n} from './utils';\r\n\r\nexport class InProdUpdateNotificationBanner extends React.PureComponent {\r\n static propTypes = {\r\n type: PropTypes.string.isRequired,\r\n preferencesService: PropTypes.objectOf(PropTypes.any),\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n additionalArgs: PropTypes.objectOf(PropTypes.any),\r\n };\r\n\r\n static defaultProps = {\r\n preferencesService: null,\r\n additionalArgs: {},\r\n };\r\n\r\n render() {\r\n const {\r\n type, preferencesService, i18n, additionalArgs,\r\n } = this.props;\r\n if (preferencesService &&\r\n judgeWhetherUserFirstViewNotificationBanner(preferencesService, type)) {\r\n recordUserFirstViewTimeOfNotificationBanner(preferencesService, type);\r\n }\r\n const config = recommendationInProductUpdateConfigs[type];\r\n\r\n let notification = null;\r\n if (config) {\r\n if (config.needAdditionalArgs === true) {\r\n if (!_.isEmpty(additionalArgs)) {\r\n notification = i18n.getString(config.notification, additionalArgs);\r\n }\r\n } else {\r\n notification = i18n.getString(config.notification);\r\n }\r\n }\r\n\r\n return (\r\n
    \r\n { preferencesService && config && notification &&\r\n isShowNotificationBannerInTargetRecommendations(preferencesService, type) &&\r\n
    \r\n
    \r\n \r\n {notification}\r\n \r\n
    \r\n {config.helpTopic &&\r\n
    \r\n \r\n
    \r\n }\r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { RECOMMENDATION_TYPES, APPLY_ACTION_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\n\r\n\r\nfunction isPlural(value) {\r\n return value > 1 ? 'Plural' : 'Singular';\r\n}\r\n\r\n/**\r\n * Format Notification Localized Key of i18n\r\n * @param {number} count - count of entity\r\n * @param {Boolean} isSuccess - result of request to MT\r\n * @param {String} recommendationType - Recommendation Type\r\n * @param {String} actionType - Action Type\r\n * @return {string} formatted string\r\n */\r\n\r\nexport const formatNotificationLocalizedKey = ({\r\n count,\r\n isSuccess,\r\n recommendationType,\r\n actionType,\r\n otherInfo = {},\r\n}) => {\r\n let form = isPlural(count);\r\n const result = isSuccess ? 'Success' : 'Error';\r\n let entity = '';\r\n let zeroSucceedScenario = '';\r\n switch (recommendationType) {\r\n case RECOMMENDATION_TYPES.REPAIR_ADS:\r\n entity = 'Ad';\r\n break;\r\n case RECOMMENDATION_TYPES.REPAIR_KEYWORD:\r\n entity = 'Keyword';\r\n break;\r\n case RECOMMENDATION_TYPES.FIX_AD_DESTINATION:\r\n if (actionType === APPLY_ACTION_TYPES.ACCEPT && !_.isEmpty(otherInfo)) {\r\n entity = 'Fix_Ad_Destination';\r\n const {\r\n SuccessAdsCount = 0,\r\n SuccessKeywordsCount = 0,\r\n FailedAdsCount = 0,\r\n FailedKeywordsCount = 0,\r\n } = otherInfo;\r\n if (isSuccess) {\r\n form = `${isPlural(SuccessAdsCount)}_${isPlural(SuccessKeywordsCount)}_${isPlural(SuccessAdsCount + SuccessKeywordsCount)}`;\r\n } else {\r\n form = `${isPlural(FailedAdsCount)}_${isPlural(FailedKeywordsCount)}_${isPlural(FailedAdsCount + FailedKeywordsCount)}`;\r\n }\r\n } else {\r\n entity = 'Default';\r\n }\r\n break;\r\n default:\r\n entity = 'Default';\r\n if (count === 0) {\r\n zeroSucceedScenario = '_Zero';\r\n }\r\n }\r\n return `Recommendation_${actionType}_${entity}_${form}_${result}_Message${zeroSucceedScenario}`;\r\n};\r\n","import _ from 'underscore';\r\n\r\nimport React from 'react';\r\nimport {\r\n APPLY_ACTION_TYPES,\r\n SUMMARY_CARD,\r\n RECOMMENDATIOIN_SUMMARY_APPLY_FAILED_RESULTS,\r\n RECOMMENDATION_TYPES,\r\n RECOMMENDATION_NOTIFICATION_REJECT_REASONS,\r\n IMPORT_TYPE,\r\n ADINSIGHT_LOG_ACTION_TYPE,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { getSessionStorage } from '@bingads-webui/storage';\r\nimport { formatNotificationLocalizedKey } from './formatter/format-notification';\r\n\r\nconst showLightboxNotification = ({\r\n aggregatedResult,\r\n view,\r\n}) => {\r\n view.statusLightBox.viewModel.aggregatedResult(aggregatedResult);\r\n view.statusLightBox.trigger('show');\r\n};\r\n\r\nconst getImportScheduleAndHistoryLink = (targetAccountId, scope, preferenceType) => {\r\n let queryParams = '';\r\n if (!_.isUndefined(scope.customerId) && !_.isUndefined(scope.userId)) {\r\n if (!_.isUndefined(scope.accountId)) {\r\n queryParams = `?aid=${scope.accountId}&cid=${scope.customerId}&uid=${scope.userId}&importType=${preferenceType}`;\r\n } else if (!_.isUndefined(targetAccountId)) {\r\n queryParams = `?aid=${targetAccountId}&cid=${scope.customerId}&uid=${scope.userId}&importType=${preferenceType}`;\r\n }\r\n }\r\n\r\n return `/campaign/vnext/importschedule${queryParams}`;\r\n};\r\n\r\n// TODO: separate each action type to different functions\r\nconst getNotificationMessage = ({\r\n op,\r\n i18n,\r\n totalRecommendationCount,\r\n successfulEntityCount,\r\n failedRecommendationCount,\r\n allExpired,\r\n otherInfo,\r\n newI18n = _.noop,\r\n scope = {},\r\n rawData,\r\n}) => {\r\n let message = '';\r\n switch (op.userAction) {\r\n case APPLY_ACTION_TYPES.ACCEPT: {\r\n let n = 0;\r\n if (op.type === RECOMMENDATION_TYPES.REPAIR_ADS ||\r\n op.type === RECOMMENDATION_TYPES.REPAIR_KEYWORD) {\r\n n = failedRecommendationCount === 0 ? successfulEntityCount : totalRecommendationCount;\r\n } else if (allExpired) {\r\n n = totalRecommendationCount - failedRecommendationCount;\r\n } else {\r\n n = totalRecommendationCount;\r\n }\r\n\r\n const isSuccess = failedRecommendationCount === 0 || allExpired;\r\n if (op.type === RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION && isSuccess) {\r\n message = n === 1 ? newI18n.getString(_TL_('Done! Your {n} smart shopping campaign is now upgraded to Performance Max campaign.')).replace('{n}', n)\r\n : newI18n.getString(_TL_('Done! Your {n} smart shopping campaigns are now upgraded to Performance Max campaigns.')).replace('{n}', n);\r\n } else if (op.type === RECOMMENDATION_TYPES.PMAX_IMPORT && isSuccess) {\r\n message = (\r\n
    \r\n {newI18n.getString(_TL_('Your Performance Max campaigns are scheduled to import 24 hours from now. You can review your'))}\r\n op.view.logOpportunityEvent({\r\n action: ADINSIGHT_LOG_ACTION_TYPE.REDIRECT,\r\n opportunityId: rawData.Results[0].OpportunityId,\r\n type: op.type,\r\n context: _.extend({\r\n ImportTaskId: rawData.Results[0].ImportTaskId,\r\n }, op.context),\r\n })}\r\n >\r\n {newI18n.getString(_TL_(' Import schedule & history '))}\r\n \r\n {newI18n.getString(_TL_('at any time.'))}\r\n
    \r\n );\r\n } else if (op.type === RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION && isSuccess) {\r\n message = newI18n.getString(_TL_('You\\'ve upgraded your DSA campaigns to Performance Max campaigns.'));\r\n } else {\r\n message = i18n.getString(\r\n formatNotificationLocalizedKey({\r\n count: n,\r\n isSuccess,\r\n recommendationType: op.type,\r\n actionType: op.userAction,\r\n otherInfo,\r\n }),\r\n { n, ...otherInfo }\r\n );\r\n }\r\n\r\n break;\r\n }\r\n case APPLY_ACTION_TYPES.DISMISS:\r\n case APPLY_ACTION_TYPES.UNDISMISS: {\r\n message = i18n.getString(\r\n formatNotificationLocalizedKey({\r\n count: totalRecommendationCount,\r\n isSuccess: failedRecommendationCount === 0,\r\n recommendationType: op.type,\r\n actionType: op.userAction,\r\n }),\r\n { n: failedRecommendationCount > 0 ? failedRecommendationCount : totalRecommendationCount }\r\n );\r\n break;\r\n }\r\n case APPLY_ACTION_TYPES.REJECT: {\r\n if (failedRecommendationCount) {\r\n message = i18n.getString('Recommendation_Reject_Error_Message_For_Phase2');\r\n } else {\r\n message = i18n.getString(\r\n 'Recommendation_Reject_Success_Message',\r\n { n: RECOMMENDATION_NOTIFICATION_REJECT_REASONS[op.reason ? op.reason.ReasonId : 'Other'] } //eslint-disable-line\r\n );\r\n }\r\n break;\r\n }\r\n default:\r\n break;\r\n }\r\n return message;\r\n};\r\n\r\nexport const handleRecommendationNotification = ({\r\n i18n,\r\n op,\r\n rawData,\r\n showAlertHandler,\r\n isOptimizationScoreOn = false,\r\n setApplyNotificationInfo = _.noop,\r\n newI18n = _.noop,\r\n scope = {},\r\n}) => {\r\n const {\r\n totalCount: totalRecommendationCount,\r\n failedCount: failedRecommendationCount,\r\n expiredCount,\r\n successfulCount,\r\n } = rawData;\r\n const expiredRecommendationCount = expiredCount + successfulCount;\r\n let successfulEntityCount = 0;\r\n let otherInfo = {};\r\n if (op.type === RECOMMENDATION_TYPES.REPAIR_ADS) {\r\n successfulEntityCount = _.chain(rawData.Results)\r\n .first()\r\n .result('AddAdResults')\r\n .filter(result => result.BatchErrorCode === 0)\r\n .size()\r\n .value();\r\n } else if (op.type === RECOMMENDATION_TYPES.REPAIR_KEYWORD) {\r\n successfulEntityCount = _.chain(rawData.Results)\r\n .first()\r\n .result('AddKeywordResults')\r\n .filter(result => result.BatchErrorCode === 0)\r\n .size()\r\n .value();\r\n }\r\n if (op.type === RECOMMENDATION_TYPES.FIX_AD_DESTINATION) {\r\n otherInfo = {\r\n SuccessAdsCount: 0,\r\n SuccessKeywordsCount: 0,\r\n FailedAdsCount: 0,\r\n FailedKeywordsCount: 0,\r\n };\r\n _.map(rawData.Results, (item) => {\r\n otherInfo.SuccessAdsCount += item.SuccessAdsCount;\r\n otherInfo.SuccessKeywordsCount += item.SuccessKeywordsCount;\r\n otherInfo.FailedAdsCount += item.FailedAdsCount;\r\n otherInfo.FailedKeywordsCount += item.FailedKeywordsCount;\r\n });\r\n }\r\n\r\n const allExpired = expiredRecommendationCount === totalRecommendationCount;\r\n const message = getNotificationMessage({\r\n op,\r\n i18n,\r\n totalRecommendationCount,\r\n successfulEntityCount,\r\n failedRecommendationCount,\r\n allExpired,\r\n otherInfo,\r\n rawData,\r\n newI18n,\r\n scope,\r\n });\r\n\r\n const aggregatedResult = {\r\n ..._.pick(\r\n rawData,\r\n 'totalCount',\r\n 'failedCount',\r\n 'expiredCount',\r\n 'successfulCount',\r\n 'AggregatedResults'\r\n ),\r\n otherInfo,\r\n };\r\n\r\n if (op.userAction === APPLY_ACTION_TYPES.ACCEPT && failedRecommendationCount > 0) {\r\n getSessionStorage().set(RECOMMENDATIOIN_SUMMARY_APPLY_FAILED_RESULTS, {\r\n results: aggregatedResult,\r\n recommendationType: op.type,\r\n });\r\n\r\n if (op.from === SUMMARY_CARD) {\r\n if (allExpired) {\r\n if (!isOptimizationScoreOn) {\r\n showAlertHandler({\r\n message,\r\n level: 'Info',\r\n dismissible: true,\r\n });\r\n }\r\n } else {\r\n op.viewDetails(op.type)();\r\n }\r\n } else {\r\n showLightboxNotification({\r\n aggregatedResult,\r\n view: op.view,\r\n });\r\n }\r\n } else if (!isOptimizationScoreOn) {\r\n showAlertHandler({\r\n message,\r\n level: failedRecommendationCount > 0 ? 'Warning' : 'Info',\r\n dismissible: true,\r\n });\r\n }\r\n\r\n if (isOptimizationScoreOn) {\r\n if (op.userAction === APPLY_ACTION_TYPES.UNDISMISS) {\r\n showAlertHandler({\r\n message,\r\n level: failedRecommendationCount > 0 ? 'Warning' : 'Info',\r\n dismissible: true,\r\n });\r\n } else {\r\n setApplyNotificationInfo({\r\n message,\r\n totalRecommendationCount,\r\n failedRecommendationCount,\r\n allExpiredInSummary: allExpired && op.from === SUMMARY_CARD,\r\n userAction: op.userAction,\r\n });\r\n }\r\n }\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { formatPercentOneDecimal } from '@bingads-webui-campaign/recommendation-core';\r\nimport { getPopupSummaryStyle } from './style/popup-summary-style';\r\n\r\nclass PopupSummary extends React.PureComponent {\r\n static propTypes = {\r\n classes: PropTypes.objectOf(PropTypes.string).isRequired,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number.isRequired,\r\n Dismissed: PropTypes.number.isRequired,\r\n Available: PropTypes.number.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n campaignId: PropTypes.string,\r\n }).isRequired,\r\n }).isRequired,\r\n };\r\n\r\n render() {\r\n const { Gained, Dismissed } = this.props.overallOptimizationScoreBar;\r\n const { classes, i18n, scope } = this.props;\r\n const scoreLabelText = {\r\n gained: !_.isUndefined(scope.values.campaignId) ? _TL_('Campaign optimization') : _TL_('Account optimization'),\r\n dismissed: _TL_('Dismissed recommendations'),\r\n };\r\n const scoreValue = { gained: Gained, dismissed: Dismissed };\r\n\r\n return (\r\n
    \r\n
    \r\n {_.map(['gained', 'dismissed'], e => (\r\n scoreValue[e] > 0 &&\r\n \r\n
    \r\n
    \r\n
    \r\n {i18n.getString(scoreLabelText[e])}\r\n
    \r\n
    \r\n
    \r\n {formatPercentOneDecimal(scoreValue[e], i18n)}\r\n
    \r\n \r\n ))}\r\n
    \r\n {Dismissed > 0 &&\r\n
    \r\n {i18n.getString(_TL_('Dismissed recommendations count towards to your account score'))}\r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport const StyledPopupSummary =\r\n withDefaultStyles((PopupSummary), getPopupSummaryStyle);\r\n","/* eslint-disable no-unused-vars */\r\nexport const getPopupSummaryStyle = (_, { palette = {} }) => ({\r\n popupSummaryContainer: {\r\n position: 'absolute',\r\n background: '#FFFFFF',\r\n boxShadow: '0px 3.2px 7.2px rgba(0, 0, 0, 0.132), 0px 0.6px 1.8px rgba(0, 0, 0, 0.108)',\r\n borderRadius: 2,\r\n top: 11,\r\n left: '50%',\r\n zIndex: 1,\r\n paddingBottom: 8,\r\n paddingTop: 16,\r\n paddingRight: 16,\r\n paddingLeft: 16,\r\n },\r\n scoreLabel: {\r\n display: 'flex',\r\n marginBottom: 2,\r\n alignItems: 'center',\r\n },\r\n gainedScoreLabelIcon: {\r\n width: 12,\r\n height: 12,\r\n border: '1px solid #0078D4',\r\n background: '#0078D4',\r\n marginRight: 8,\r\n },\r\n scoreLabelText: {\r\n fontSize: 12,\r\n },\r\n scoreValue: {\r\n fontWeight: 600,\r\n fontSize: 16,\r\n color: '#0078D4',\r\n marginLeft: 20,\r\n marginBottom: 8,\r\n },\r\n dismissedScoreLabelIcon: {\r\n width: 12,\r\n height: 12,\r\n background: '#ABDBFF',\r\n border: '1px solid #0078D4',\r\n marginRight: 8,\r\n },\r\n scoreHint: {\r\n fontSize: 12,\r\n borderTop: 'solid 1px #EDEBE9',\r\n color: '#666666',\r\n paddingTop: 6,\r\n marginBottom: 8,\r\n minWidth: 186,\r\n },\r\n});\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { formatPercentOneDecimal } from '@bingads-webui-campaign/recommendation-core';\r\nimport { HighchartReactWrapper } from '@bingads-webui-react/highchart-react-wrapper';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { StyledMenuItemTag } from '@bingads-webui-react/menu-item-tag';\r\nimport { TooltipHost, DirectionalHint, TooltipDelay } from '@fluentui/react';\r\nimport { StyledPopupSummary } from './popup-summary';\r\nimport { getOverallScoreStyle } from './style/overall-score-style';\r\n\r\nclass RecOptimizationOverallScore extends React.PureComponent {\r\n static propTypes = {\r\n classes: PropTypes.objectOf(PropTypes.string).isRequired,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number.isRequired,\r\n Dismissed: PropTypes.number.isRequired,\r\n Available: PropTypes.number.isRequired,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n renderAutoApplyButton: PropTypes.func.isRequired,\r\n renderDownloadButton: PropTypes.func.isRequired,\r\n renderHistoryButton: PropTypes.func.isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({\r\n campaignId: PropTypes.string,\r\n }).isRequired,\r\n }).isRequired,\r\n isAsyncApplyEnabled: PropTypes.bool.isRequired,\r\n isAutoApplyRecommendationEnabled: PropTypes.bool.isRequired,\r\n showDownloadButton: PropTypes.bool.isRequired,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\r\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\r\n this.state = {\r\n isHovering: false,\r\n };\r\n }\r\n\r\n getChartOptions = () => {\r\n const { overallOptimizationScoreBar } = this.props;\r\n return {\r\n chart: {\r\n width: 400,\r\n height: 18,\r\n margin: [0, 0, 0, 0],\r\n type: 'bar',\r\n },\r\n title: {\r\n text: null,\r\n },\r\n xAxis: {\r\n visible: false,\r\n },\r\n yAxis: {\r\n visible: false,\r\n tickPositions: [-0.2, 100.2],\r\n },\r\n legend: {\r\n enabled: false,\r\n },\r\n credits: {\r\n enabled: false,\r\n },\r\n tooltip: {\r\n enabled: false,\r\n formatter: null,\r\n },\r\n plotOptions: {\r\n bar: {\r\n animation: false,\r\n pointWidth: 16,\r\n borderColor: '#0078D4',\r\n },\r\n series: {\r\n cursor: 'pointer',\r\n point: {\r\n events: {\r\n click: null,\r\n },\r\n },\r\n stacking: 'normal',\r\n states: {\r\n hover: {\r\n enabled: false,\r\n },\r\n inactive: {\r\n enabled: false,\r\n },\r\n },\r\n },\r\n },\r\n series: [{\r\n data: [overallOptimizationScoreBar.Available * 100],\r\n color: '#FFFFFF',\r\n }, {\r\n data: [overallOptimizationScoreBar.Dismissed * 100],\r\n color: '#ABDBFF',\r\n }, {\r\n data: [overallOptimizationScoreBar.Gained * 100],\r\n color: '#0078D4',\r\n },\r\n ],\r\n };\r\n }\r\n\r\n handleMouseEnter() {\r\n this.timerForPopupSummary = setTimeout(() => {\r\n this.setState({ isHovering: true });\r\n }, 200);\r\n }\r\n\r\n handleMouseLeave() {\r\n clearTimeout(this.timerForPopupSummary);\r\n this.setState({ isHovering: false });\r\n }\r\n\r\n renderOverallScore = () => {\r\n const { classes, i18n, overallOptimizationScoreBar } = this.props;\r\n const { Gained, Dismissed } = overallOptimizationScoreBar;\r\n\r\n return (\r\n \r\n {formatPercentOneDecimal(Gained + Dismissed, i18n)}\r\n
    \r\n );\r\n }\r\n\r\n render() {\r\n const {\r\n classes,\r\n i18n,\r\n renderAutoApplyButton,\r\n renderDownloadButton,\r\n renderHistoryButton,\r\n overallOptimizationScoreBar,\r\n scope,\r\n isAsyncApplyEnabled,\r\n isAutoApplyRecommendationEnabled,\r\n showDownloadButton,\r\n } = this.props;\r\n const { Gained, Dismissed } = overallOptimizationScoreBar;\r\n const overallScore = Gained + Dismissed;\r\n\r\n const calloutContent = i18n.getString(_TL_('The low Optimization Score doesn\\'t mean you are not performing well, but represents you have much room to optimize. Applying recommendations will help you improve your Optimization Score and performance.'));\r\n const hostStyles = {\r\n root: {\r\n display: 'inline-block',\r\n },\r\n };\r\n const calloutProps = { gapSpace: 7 };\r\n const tooltipProps = {\r\n maxWidth: '231px',\r\n styles: {\r\n root: {\r\n padding: '8px 10px',\r\n },\r\n },\r\n delay: TooltipDelay.zero,\r\n };\r\n\r\n return (\r\n
    \r\n
    \r\n {i18n.getString(_TL_('Your optimization score'))}\r\n
    \r\n
    \r\n \r\n {!isAutoApplyRecommendationEnabled &&\r\n
    \r\n \r\n
    \r\n }\r\n
    \r\n {overallScore === 0 ?\r\n \r\n {this.renderOverallScore()}\r\n : this.renderOverallScore()\r\n }\r\n \r\n \r\n {this.state.isHovering && overallScore > 0 &&\r\n }\r\n
    \r\n {isAutoApplyRecommendationEnabled &&\r\n
    \r\n {renderAutoApplyButton()}\r\n
    \r\n }\r\n {showDownloadButton &&\r\n
    \r\n {renderDownloadButton(true)}\r\n
    \r\n }\r\n {isAsyncApplyEnabled && renderHistoryButton()}\r\n \r\n );\r\n }\r\n}\r\n\r\nexport const StyledRecOptimizationOverallScore =\r\n withDefaultStyles((RecOptimizationOverallScore), getOverallScoreStyle);\r\n","/* eslint-disable no-unused-vars */\r\nexport const getOverallScoreStyle = (_, { palette = {} }) => ({\r\n recOverallScoreContainer: {\r\n minWidth: 1000,\r\n display: 'flex',\r\n marginTop: 0,\r\n marginLeft: 0,\r\n marginBottom: 0,\r\n alignItems: 'center',\r\n position: 'relative',\r\n background: palette.neutralLighterAlt,\r\n paddingTop: 16,\r\n paddingLeft: 32,\r\n paddingBottom: 16,\r\n paddingRight: 22,\r\n borderBottom: `solid 1px ${palette.neutralQuaternaryAlt}`,\r\n '& .with-history-button': {\r\n '& #button-download': {\r\n right: 74,\r\n },\r\n },\r\n '& #button-download': {\r\n backgroundColor: 'transparent',\r\n border: 'none',\r\n color: palette.themeDarkAlt,\r\n padding: 'unset',\r\n height: 'fit-content',\r\n minWidth: 'unset',\r\n top: 30,\r\n right: 22,\r\n position: 'absolute',\r\n },\r\n '& .recommendation-history-item': {\r\n margin: 'unset',\r\n top: 'unset',\r\n right: 22,\r\n position: 'absolute',\r\n },\r\n '& .helpbutton': {\r\n color: `${palette.neutralPrimary} !important`,\r\n fontSize: 16,\r\n marginRight: 82,\r\n marginLeft: 'unset',\r\n },\r\n '& .helpbutton:before': {\r\n top: 2,\r\n content: '\"\\\\E9CE\"',\r\n position: 'relative',\r\n fontFamily: 'MsAds MDL2 Assets',\r\n },\r\n '& #zero-overall-score': {\r\n borderBottom: `1px dashed ${palette.themePrimary}`,\r\n cursor: 'pointer',\r\n },\r\n '& .auto-apply-container': {\r\n position: 'absolute',\r\n right: '75px',\r\n },\r\n '& .auto-apply-container.with-download-button': {\r\n right: '124px',\r\n },\r\n },\r\n scoreLabel: {\r\n fontWeight: 600,\r\n fontSize: 18,\r\n marginRight: 6,\r\n },\r\n scoreValue: {\r\n fontWeight: 600,\r\n fontSize: 32,\r\n color: palette.themePrimary,\r\n },\r\n scoreBarChartContainer: {\r\n position: 'relative',\r\n marginLeft: 15,\r\n },\r\n betaTagContainer: {\r\n position: 'absolute',\r\n display: 'inline-block',\r\n marginTop: '-11px',\r\n marginLeft: '-86px',\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { formatPercentOneDecimal } from '@bingads-webui-campaign/recommendation-core';\r\nimport { TooltipHost, DirectionalHint, TooltipDelay } from '@fluentui/react';\r\nimport {\r\n Badge,\r\n} from '@fluentui/react-components';\r\n\r\nexport class RecommendationOptimizationScoreTag extends React.PureComponent {\r\n static propTypes = {\r\n className: PropTypes.string.isRequired,\r\n optimizationScore: PropTypes.number,\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n };\r\n\r\n static defaultProps = {\r\n optimizationScore: 0,\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n };\r\n\r\n render() {\r\n const {\r\n className, optimizationScore, i18n, newI18n,\r\n } = this.props;\r\n\r\n let optimizationScoreTagContent;\r\n let calloutContent;\r\n if (_.isNull(optimizationScore)) {\r\n optimizationScoreTagContent = (
    -
    );\r\n calloutContent = newI18n.getString(_TL_('Not currently scored'));\r\n } else if (optimizationScore === 0) {\r\n optimizationScoreTagContent = (
    );\r\n calloutContent = newI18n.getString(_TL_('The score uplift is very low. While it\\'s still recommended to apply it to help your account performance well. Have a try!'));\r\n } else {\r\n const formatedScore = `+${formatPercentOneDecimal(optimizationScore, i18n)}`;\r\n optimizationScoreTagContent = (
    {formatedScore}
    );\r\n calloutContent = i18n.getString('Summary_Card_Optimization_Score_Tag_Normal_Callout', { optimization_score: formatedScore.slice(1) });\r\n }\r\n\r\n const hostStyles = {\r\n root: {\r\n display: 'inline-block',\r\n },\r\n };\r\n const calloutProps = { gapSpace: 7 };\r\n const tooltipProps = {\r\n maxWidth: '231px',\r\n styles: {\r\n root: {\r\n padding: '8px 10px',\r\n },\r\n },\r\n delay: TooltipDelay.long,\r\n };\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n \r\n {optimizationScoreTagContent}\r\n \r\n
    \r\n \r\n
    \r\n );\r\n }\r\n}\r\n","export const RECOMMENDATION_PREFERENCES = 'WebApp.RecommendationUI.Preferences';\r\nexport const RECOMMENDATION_PREFERENCES_ACCOUNT_LEVEL = 'WebApp.RecommendationUI.AccountLevelPreferences';\r\nexport const CAMPAIGN_TYPES = {\r\n DismissFeedback: 'DismissFeedback',\r\n RejectAutoApplySuggestedAds: 'RejectAutoApplySuggestedAds',\r\n};\r\n\r\nexport const PREFERENCES_ACTION_TYPES = {\r\n HidedRecommendationCards: 'HidedRecommendationCards',\r\n HidedRecommendationBanner: 'HidedRecommendationBanner',\r\n AutoRefresh: 'AutoRefresh',\r\n OptimizationScoreOnboard: 'OptimizationScoreOnboard',\r\n AAROnBoard: 'AAROnBoard',\r\n};\r\n\r\nexport const IN_PRODUCT_UPDATE_RECOMMENDATIONS_VIEW_TIME = {\r\n FirstViewTime: 'FirstViewTime',\r\n};\r\n","import _ from 'underscore';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nimport {\r\n RECOMMENDATION_PREFERENCES,\r\n RECOMMENDATION_PREFERENCES_ACCOUNT_LEVEL,\r\n} from './consts';\r\n\r\nexport function getPreferences(preferencesService, isUserLevel = true) {\r\n const sessionData = isUserLevel ?\r\n preferencesService.findByNameAtUserLevel(RECOMMENDATION_PREFERENCES) :\r\n preferencesService.findByName(RECOMMENDATION_PREFERENCES_ACCOUNT_LEVEL);\r\n\r\n return _.result(sessionData, 'Data', {});\r\n}\r\n\r\nexport function savePreferences(preferencesService, data, isUserLevel = true) {\r\n const Data = merge(\r\n {},\r\n getPreferences(preferencesService),\r\n data\r\n );\r\n const dataPackage = {\r\n Name: isUserLevel ? RECOMMENDATION_PREFERENCES : RECOMMENDATION_PREFERENCES_ACCOUNT_LEVEL,\r\n Data,\r\n };\r\n\r\n if (isUserLevel) {\r\n preferencesService.setAtUserLevel(dataPackage);\r\n } else {\r\n preferencesService.set(dataPackage);\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Popover } from '@bingads-webui-react/popover';\r\n\r\nexport class SummaryContextMenu extends React.PureComponent {\r\n static propTypes = {\r\n /**\r\n * Name of choice and its eventHandler.\r\n */\r\n funcsInMenu: PropTypes.arrayOf(PropTypes.shape({\r\n name: PropTypes.string.isRequired,\r\n func: PropTypes.func.isRequired,\r\n })).isRequired,\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.popover = null;\r\n }\r\n\r\n dismissPopover() {\r\n if (this.popover) {\r\n this.popover.dismissPopover();\r\n }\r\n }\r\n\r\n render() {\r\n const threeDots = (\r\n
    \r\n \r\n
    \r\n );\r\n\r\n return (\r\n
    \r\n { this.popover = popover; }}\r\n >\r\n
      \r\n {_.map(this.props.funcsInMenu, func => (\r\n
    • \r\n {\r\n this.dismissPopover();\r\n func.func();\r\n }}\r\n disabled={func.disabled}\r\n >\r\n {func.name}\r\n \r\n
    • \r\n ))}\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport {\r\n RECOMMENDATION_TYPES,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive';\r\nimport { TooltipHost, TooltipOverflowMode, DirectionalHint } from '@bingads-webui-react/fabric-control';\r\nimport { CouponTagNew } from '@bingads-webui-react/feature-adoption-coupon';\r\nimport { RecommendationOptimizationScoreTag } from '@bingads-webui-campaign-react/recommendation-os-tag';\r\nimport {\r\n Badge,\r\n} from '@fluentui/react-components';\r\n\r\nimport { SummaryContextMenu } from './summary-context-menu';\r\n\r\nexport class SummaryHeader extends React.PureComponent {\r\n static propTypes = {\r\n iconClasses: PropTypes.string.isRequired,\r\n iconClassesVNext: PropTypes.string.isRequired,\r\n title: PropTypes.string.isRequired,\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n levelAt: PropTypes.string,\r\n }),\r\n coupon: PropTypes.objectOf(PropTypes.any),\r\n optimizationScore: PropTypes.number,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Available: PropTypes.number,\r\n }),\r\n isOptimizationScoreOn: PropTypes.bool,\r\n headerMenuItems: PropTypes.arrayOf(PropTypes.any),\r\n isFromDismissTab: PropTypes.bool,\r\n showAutoApply: PropTypes.bool,\r\n campaignAutoApplyStatus: PropTypes.shape({\r\n [RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS]: PropTypes.string,\r\n }),\r\n inContextCard: PropTypes.bool,\r\n autoApplyToolTipText: PropTypes.string,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n type: PropTypes.string.isRequired,\r\n };\r\n\r\n static defaultProps = {\r\n scope: {\r\n levelAt: null,\r\n },\r\n coupon: null,\r\n optimizationScore: null,\r\n overallOptimizationScoreBar: null,\r\n isOptimizationScoreOn: false,\r\n headerMenuItems: [],\r\n isFromDismissTab: false,\r\n campaignAutoApplyStatus: {},\r\n inContextCard: false,\r\n autoApplyToolTipText: '',\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n showAutoApply: false,\r\n };\r\n\r\n render() {\r\n const {\r\n i18n,\r\n iconClasses,\r\n iconClassesVNext,\r\n title,\r\n coupon,\r\n optimizationScore,\r\n overallOptimizationScoreBar,\r\n isOptimizationScoreOn,\r\n headerMenuItems,\r\n isFromDismissTab,\r\n inContextCard,\r\n autoApplyToolTipText,\r\n newI18n,\r\n showAutoApply,\r\n type,\r\n } = this.props;\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n {title}\r\n \r\n
    \r\n\r\n {!inContextCard && coupon && }\r\n\r\n { showAutoApply &&\r\n
    \r\n \r\n \r\n \r\n
    \r\n }\r\n\r\n {type === RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION &&\r\n
    \r\n \r\n {newI18n.getString(_TL_('New'))}\r\n \r\n
    \r\n }\r\n\r\n {isOptimizationScoreOn && !_.isEmpty(overallOptimizationScoreBar) && !isFromDismissTab &&\r\n \r\n }\r\n\r\n
    \r\n { /* TODO: Check if description should use something different from title */}\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","\r\n/* eslint-disable jsx-a11y/anchor-is-valid, no-script-url */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { CouponLightboxNew } from '@bingads-webui-react/feature-adoption-coupon';\r\nimport { Constants as CCUIConstants } from '@bingads-webui-clientcenter/entity-utils';\r\n\r\nimport {\r\n APPLY_ACTION_TYPES,\r\n CHANNEL_TYPES,\r\n SUMMARY_CARD,\r\n SUMMARY_APPLY_ALL_ENABLED,\r\n ADINSIGHT_LOG_ACTION_TYPE,\r\n RECOMMENDATION_TYPES,\r\n dismissFeedback,\r\n isShowAutoApplyFeedback,\r\n getChannel,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport { showDismissFeedbackPopup } from '@bingads-webui-campaign-react/recommendation-dismiss-feedback';\r\nimport { showApplyFeedbackPopup } from '@bingads-webui-campaign-react/recommendation-feedback-modal';\r\nimport { handleRecommendationNotification } from '@bingads-webui-campaign/recommendation-notification';\r\nimport { generateGuid } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nconst FAC_STATUS_NOT_IN_PROGRESS = CCUIConstants.RecommendationAdoptionStatus.NotInProgess;\r\n\r\nexport class SummaryFooter extends React.PureComponent {\r\n static propTypes = {\r\n summary: PropTypes.shape({\r\n coupon: PropTypes.object,\r\n }).isRequired,\r\n viewRecommendations: PropTypes.string.isRequired,\r\n apply: PropTypes.string.isRequired,\r\n viewDetails: PropTypes.func.isRequired,\r\n type: PropTypes.string.isRequired,\r\n track: PropTypes.func,\r\n recommendationsCount: PropTypes.number.isRequired,\r\n opportunityCount: PropTypes.number,\r\n campaignAdGroups: PropTypes.arrayOf(PropTypes.object),\r\n level: PropTypes.string,\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n logOpportunityEvent: PropTypes.func.isRequired,\r\n readOnly: PropTypes.bool,\r\n currentActivity: PropTypes.objectOf(PropTypes.any).isRequired,\r\n context: PropTypes.shape({\r\n Source: PropTypes.string,\r\n Level: PropTypes.string.isRequired,\r\n Category: PropTypes.string,\r\n }),\r\n guid: PropTypes.string,\r\n logExpInfo: PropTypes.func,\r\n scope: PropTypes.shape({\r\n campaignId: PropTypes.number,\r\n customerId: PropTypes.number,\r\n accountId: PropTypes.number,\r\n }),\r\n odata: PropTypes.PropTypes.shape({\r\n get: PropTypes.func.isRequired,\r\n }),\r\n preferencesService: PropTypes.objectOf(PropTypes.any),\r\n isInlineView: PropTypes.bool,\r\n appConfig: PropTypes.objectOf(PropTypes.any).isRequired,\r\n dataService: PropTypes.objectOf(PropTypes.any),\r\n showAsyncApplyModal: PropTypes.func,\r\n closeAsyncApplyModal: PropTypes.func,\r\n showApplyConfirmModal: PropTypes.func,\r\n isMCC: PropTypes.bool,\r\n optimizationScore: PropTypes.number,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Available: PropTypes.number,\r\n }),\r\n category: PropTypes.string,\r\n isOverviewPage: PropTypes.bool,\r\n isOptimizationScoreOn: PropTypes.bool,\r\n inContextCard: PropTypes.bool,\r\n permissions: PropTypes.shape({}),\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }),\r\n };\r\n\r\n static defaultProps = {\r\n campaignAdGroups: [],\r\n level: null,\r\n logExpInfo: _.noop,\r\n guid: null,\r\n scope: null,\r\n odata: null,\r\n context: undefined,\r\n dataService: undefined,\r\n readOnly: undefined,\r\n track: _.noop,\r\n preferencesService: null,\r\n isInlineView: false,\r\n showAsyncApplyModal: _.noop,\r\n closeAsyncApplyModal: _.noop,\r\n showApplyConfirmModal: null,\r\n isMCC: false,\r\n opportunityCount: 0,\r\n optimizationScore: null,\r\n overallOptimizationScoreBar: null,\r\n category: null,\r\n isOverviewPage: false,\r\n isOptimizationScoreOn: false,\r\n inContextCard: false,\r\n permissions: {},\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n showLightbox: false,\r\n lightboxAction: _.null,\r\n };\r\n }\r\n\r\n autoApplyDialogInSummary = () => {\r\n const {\r\n campaignAdGroups,\r\n context,\r\n currentActivity,\r\n guid,\r\n preferencesService,\r\n i18n,\r\n odata,\r\n scope,\r\n type,\r\n recommendationsCount,\r\n showApplyConfirmModal,\r\n permissions,\r\n newI18n,\r\n dataService,\r\n } = this.props;\r\n const options = {\r\n i18n,\r\n el: '.recommendation-apply-feedback-popup',\r\n data: {\r\n type,\r\n channel: CHANNEL_TYPES.RECOMMENDATION,\r\n campaignAdGroups,\r\n },\r\n guid,\r\n context,\r\n callback: () => {\r\n this.applyAll();\r\n },\r\n cid: scope.advertiserCustomerId,\r\n aid: scope.accountId,\r\n odata,\r\n isFromSummary: true,\r\n isFromAutoApplyDialog: true,\r\n recommendationsCount,\r\n onAutoApplyCancel: () => {\r\n showDismissFeedbackPopup({\r\n i18n,\r\n type,\r\n onSubmit: (feedback) => {\r\n dismissFeedback({\r\n campaignId: scope.campaignId,\r\n currentActivity,\r\n feedback,\r\n preferencesService,\r\n rejectAutoApplySuggestedAds: true,\r\n context,\r\n guid,\r\n isMCC: this.props.isMCC,\r\n });\r\n },\r\n rejectAutoApplySuggestedAds: true,\r\n });\r\n },\r\n showApplyConfirmModal: () => showApplyConfirmModal({\r\n onApply: this.applyAll,\r\n countRecommendation: recommendationsCount,\r\n }),\r\n permissions,\r\n newI18n,\r\n dataService,\r\n };\r\n showApplyFeedbackPopup(options);\r\n };\r\n\r\n confirmApplyAll = () => {\r\n const { preferencesService, type, permissions } = this.props;\r\n const rejectAutoApplySuggestedAds = true;\r\n // Conditions:\r\n // 1. not in customer level\r\n // 2. Apply all new ads recommendations in summary page\r\n // 3. Users don't reject auto-apply confirmation dialog within 30 days.\r\n // Result: Show a dialog to confirm enabling auto-apply ad suggestions.\r\n if (!this.props.isMCC\r\n && (permissions.IsRSAAutoApplyEnabled && type === RECOMMENDATION_TYPES.RESPONSIVE_SEARCH_ADS)\r\n && isShowAutoApplyFeedback({ preferencesService, type, rejectAutoApplySuggestedAds })) {\r\n this.autoApplyDialogInSummary();\r\n return;\r\n }\r\n\r\n if (_.isFunction(this.props.showApplyConfirmModal)) {\r\n this.props.showApplyConfirmModal({\r\n onApply: this.applyAll,\r\n countRecommendation: this.props.recommendationsCount,\r\n type,\r\n });\r\n } else {\r\n // eslint-disable-next-line no-alert, no-restricted-globals\r\n if (!confirm(this.props.i18n.getString('Recommendation_Apply_All_Confirm', {\r\n count: this.props.recommendationsCount,\r\n }))) {\r\n return;\r\n }\r\n this.applyAll();\r\n }\r\n };\r\n\r\n applyAll = () => {\r\n const {\r\n campaignAdGroups,\r\n type,\r\n optimizationScore,\r\n isOptimizationScoreOn,\r\n isMCC,\r\n inContextCard,\r\n isInlineView,\r\n isOverviewPage,\r\n } = this.props;\r\n\r\n const action = `${this.props.recommendationsCount} recommendations applied`;\r\n this.props.logExpInfo(action);\r\n\r\n const channel = getChannel(type, isInlineView, isMCC, isOverviewPage, inContextCard);\r\n\r\n\r\n this.props.currentActivity.trace(\r\n `recommendation summary view: apply all is called, channel = ${channel}, type = ${type}`,\r\n `${channel}/applyall`\r\n );\r\n\r\n const contextWithTrackingId = _.extend({}, this.props.context, { trackId: generateGuid() });\r\n this.props.logOpportunityEvent({\r\n type: this.props.type,\r\n action: ADINSIGHT_LOG_ACTION_TYPE.CLICK_APPLYALL,\r\n context: contextWithTrackingId,\r\n });\r\n\r\n // now applyMode in context align with which mt api called, may need to modify in the future\r\n const contextWithApplyMode = _.extend({}, contextWithTrackingId, { ApplyMode: 'All' });\r\n\r\n this.props.track({\r\n type,\r\n userAction: APPLY_ACTION_TYPES.ACCEPT,\r\n campaignAdGroups,\r\n channel,\r\n applyOpportunitiesLevel: this.props.level,\r\n context: contextWithApplyMode,\r\n guid: this.props.guid,\r\n handleRecommendationNotification,\r\n viewDetails: this.props.viewDetails,\r\n from: SUMMARY_CARD,\r\n showAsyncApplyModal: this.props.showAsyncApplyModal,\r\n closeAsyncApplyModal: this.props.closeAsyncApplyModal,\r\n // because opportunity is the base unit MT applied\r\n totalRecommendationCount: this.props.opportunityCount,\r\n isOptimizationScoreUsed: isOptimizationScoreOn,\r\n optimizationScore,\r\n });\r\n };\r\n\r\n viewAll = () => {\r\n const channel = getChannel(\r\n this.props.type,\r\n this.props.isInlineView,\r\n this.props.isMCC,\r\n this.props.isOverviewPage,\r\n this.props.inContextCard\r\n );\r\n\r\n this.props.currentActivity.trace(\r\n `recommendation summary view: view all is called, channel = ${channel}, type = ${this.props.type}`,\r\n `${channel}/viewAll`\r\n );\r\n\r\n this.props.logOpportunityEvent({\r\n type: this.props.type,\r\n action: ADINSIGHT_LOG_ACTION_TYPE.CLICK_RECS,\r\n context: _.extend({}, this.props.context, { RecommendationCount: this.props.opportunityCount }),\r\n });\r\n\r\n if (channel !== CHANNEL_TYPES.INCONTEXT &&\r\n channel !== CHANNEL_TYPES.INCONTEXTCARD &&\r\n channel !== CHANNEL_TYPES.OVERVIEWPAGE &&\r\n channel !== CHANNEL_TYPES.MCCOVERVIEW) {\r\n this.props.appConfig.set('recsrc', 'summarypage');\r\n }\r\n this.props.viewDetails(this.props.type, this.props.category)();\r\n };\r\n\r\n buttonActionWithCoupon = (action) => {\r\n if (\r\n this.props.summary.coupon\r\n && !this.props.inContextCard\r\n && this.props.summary.coupon.rawData.Status === FAC_STATUS_NOT_IN_PROGRESS) {\r\n this.setState({\r\n showLightbox: true,\r\n lightboxAction: action,\r\n });\r\n } else {\r\n action();\r\n }\r\n };\r\n\r\n viewAllButtonAction = () => this.buttonActionWithCoupon(this.viewAll);\r\n\r\n applyAllButtonAction = () => this.buttonActionWithCoupon(this.confirmApplyAll);\r\n\r\n hideLightbox = () => {\r\n this.setState({ showLightbox: false });\r\n };\r\n\r\n lightboxAction = () => {\r\n const action = this.state.lightboxAction;\r\n this.setState({\r\n showLightbox: false,\r\n lightboxAction: _.null,\r\n });\r\n this.props\r\n .dataService\r\n .startCouponAdoption(this.props.summary.coupon.rawData)\r\n .finally(action);\r\n };\r\n\r\n render() {\r\n return (\r\n
    \r\n
    \r\n \r\n {SUMMARY_APPLY_ALL_ENABLED[this.props.type] &&\r\n \r\n }\r\n
    \r\n { this.props.summary.coupon\r\n && !this.props.inContextCard\r\n && this.state.showLightbox\r\n && this.props.dataService\r\n && (\r\n \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n","/* eslint-disable react/no-danger */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { ActionTable } from '@bingads-webui-campaign-react/recommendation-visuals';\r\n\r\nexport class SamplePanel extends React.PureComponent {\r\n static propTypes = {\r\n insightTitle: PropTypes.string.isRequired,\r\n insight: PropTypes.string.isRequired,\r\n actionTitle: PropTypes.string,\r\n actions: PropTypes.oneOfType([\r\n PropTypes.shape({\r\n headers: PropTypes.array.isRequired,\r\n values: PropTypes.array.isRequired,\r\n }),\r\n PropTypes.string,\r\n ]),\r\n moreRecommendations: PropTypes.string,\r\n children: PropTypes.element.isRequired,\r\n };\r\n\r\n static defaultProps = {\r\n actionTitle: null,\r\n actions: null,\r\n moreRecommendations: null,\r\n };\r\n\r\n render() {\r\n let actionDetails;\r\n if (this.props.actions) {\r\n const { actionTitle, moreRecommendations } = this.props;\r\n const actions = this.props.actions.headers ?\r\n :\r\n (\r\n
    \r\n {this.props.actions}\r\n
    \r\n );\r\n\r\n actionDetails = (\r\n
    \r\n
    \r\n \r\n {actions}\r\n {moreRecommendations &&\r\n
    \r\n {moreRecommendations}\r\n
    \r\n }\r\n
    \r\n );\r\n }\r\n\r\n return (\r\n
    \r\n {this.props.insightTitle &&\r\n \r\n }\r\n {this.props.insight &&\r\n \r\n }\r\n
    \r\n {this.props.children}\r\n
    \r\n {actionDetails}\r\n
    \r\n );\r\n }\r\n}\r\n\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Textfit } from 'react-textfit';\r\nimport { formatPercentOneDecimal, SUMMARY_LEVELS } from '@bingads-webui-campaign/recommendation-core';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\n\r\nexport const OverallOptimizationScore = (props) => {\r\n const {\r\n overallOptimizationScoreBar,\r\n newI18n,\r\n scope,\r\n } = props;\r\n\r\n if (!overallOptimizationScoreBar) {\r\n return null;\r\n }\r\n\r\n const { Gained, Dismissed } = overallOptimizationScoreBar;\r\n const { levelAt } = scope;\r\n\r\n return (\r\n
    \r\n
    \r\n {formatPercentOneDecimal(Gained + Dismissed, newI18n)}\r\n
    \r\n
    \r\n {levelAt === SUMMARY_LEVELS.CAMPAIGN ?\r\n newI18n.getString(_TL_('Your campaign optimization score')) : newI18n.getString(_TL_('Your account optimization score'))}\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nOverallOptimizationScore.propTypes = {\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Available: PropTypes.number,\r\n }),\r\n scope: PropTypes.shape({\r\n levelAt: PropTypes.string,\r\n }),\r\n newI18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n\r\nOverallOptimizationScore.defaultProps = {\r\n overallOptimizationScoreBar: null,\r\n scope: null,\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid, no-script-url */\r\nimport _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { EstimationTile, SummaryEstimation } from '@bingads-webui-campaign-react/recommendation-estimation-tile';\r\nimport {\r\n ActionTable,\r\n BingMapView,\r\n AdsPreview,\r\n} from '@bingads-webui-campaign-react/recommendation-visuals';\r\nimport { AdvisorChart } from '@bingads-webui-campaign-react/advisor-chart';\r\nimport { CouponTagNew } from '@bingads-webui-react/feature-adoption-coupon';\r\nimport {\r\n VISUAL_TYPES,\r\n isCompetition,\r\n NOT_SUPPORT_DOWNLOAD_TYPES,\r\n SUMMARY_LEVELS,\r\n withTrack,\r\n getChannel,\r\n APPLY_ACTION_TYPES,\r\n withAdsAutoApply,\r\n recommendationInProductUpdateConfigs,\r\n RECOMMENDATION_TYPES,\r\n NOT_SUPPORT_DISMISS_TYPES,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport {\r\n isInProductUpdateBannerAvailable,\r\n InProdUpdateNotificationBanner,\r\n handleRecommendationNotification,\r\n WarnNotificationBanner,\r\n} from '@bingads-webui-campaign/recommendation-notification';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { generateGuid } from '@bingads-webui-universal/primitive-utilities';\r\nimport { StyledRecommendationAutpApplyBanner } from '@bingads-webui-campaign-react/recommendation-auto-apply-banner';\r\nimport { RecommendationOptimizationScoreTag } from '@bingads-webui-campaign-react/recommendation-os-tag';\r\nimport { SummaryHeader } from './summary-header';\r\nimport { SummaryFooter } from './summary-footer';\r\nimport { SamplePanel } from './sample-panel';\r\nimport { OverallOptimizationScore } from './optimization-score';\r\n\r\nclass FuncWithName {\r\n constructor(name, func, disabled = false) {\r\n this.name = name;\r\n this.func = func;\r\n this.disabled = disabled;\r\n }\r\n}\r\n\r\nclass summaryCard extends React.PureComponent {\r\n static propTypes = {\r\n summary: PropTypes.shape({\r\n description: PropTypes.string.isRequired,\r\n pitching: PropTypes.string.isRequired,\r\n helpId: PropTypes.string.isRequired,\r\n isSeasonal: PropTypes.bool.isRequired,\r\n title: PropTypes.string.isRequired,\r\n iconClasses: PropTypes.string.isRequired,\r\n iconClassesVNext: PropTypes.string.isRequired,\r\n estimates: PropTypes.shape({\r\n primaryIncrease: PropTypes.string.isRequired,\r\n }),\r\n coupon: PropTypes.object,\r\n isNrt: PropTypes.bool,\r\n hasAIAssetRecommendation: PropTypes.bool,\r\n linkType: PropTypes.string,\r\n thirdPartyInfos: PropTypes.arrayOf(PropTypes.shape({\r\n Level: PropTypes.number,\r\n ThirdPartyName: PropTypes.string,\r\n })),\r\n }).isRequired,\r\n sample: PropTypes.shape({\r\n visualData: PropTypes.oneOfType([\r\n PropTypes.object,\r\n PropTypes.array,\r\n ]).isRequired,\r\n }).isRequired,\r\n onFeedbackModalOpen: PropTypes.func,\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n locationMap: PropTypes.func.isRequired,\r\n reload: PropTypes.func,\r\n type: PropTypes.string.isRequired,\r\n version: PropTypes.number.isRequired,\r\n level: PropTypes.string,\r\n logOpportunityEvent: PropTypes.func.isRequired,\r\n readOnly: PropTypes.bool,\r\n onDownload: PropTypes.func,\r\n handleHideCard: PropTypes.func,\r\n currentActivity: PropTypes.objectOf(PropTypes.any).isRequired,\r\n context: PropTypes.shape({\r\n Source: PropTypes.string,\r\n Level: PropTypes.string.isRequired,\r\n Category: PropTypes.string,\r\n }),\r\n guid: PropTypes.string,\r\n perfMarker: PropTypes.shape({\r\n willInit: PropTypes.func.isRequired,\r\n willRender: PropTypes.func.isRequired,\r\n done: PropTypes.func.isRequired,\r\n }),\r\n isInlineView: PropTypes.bool,\r\n scope: PropTypes.shape({\r\n customerId: PropTypes.number,\r\n accountId: PropTypes.number,\r\n advertiserCustomerId: PropTypes.number,\r\n levelAt: PropTypes.string,\r\n }),\r\n odata: PropTypes.PropTypes.shape({\r\n get: PropTypes.func.isRequired,\r\n }),\r\n preferencesService: PropTypes.objectOf(PropTypes.any),\r\n appConfig: PropTypes.objectOf(PropTypes.any).isRequired,\r\n permissions: PropTypes.objectOf(PropTypes.any),\r\n isMCC: PropTypes.bool,\r\n optimizationScore: PropTypes.number,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Available: PropTypes.number,\r\n }),\r\n isOverviewPage: PropTypes.bool,\r\n category: PropTypes.string,\r\n isOptimizationScoreOn: PropTypes.bool,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n track: PropTypes.func.isRequired,\r\n campaignAdGroups: PropTypes.arrayOf(PropTypes.object),\r\n isFromDismissTab: PropTypes.bool,\r\n optInStatus: PropTypes.bool,\r\n applyDate: PropTypes.number,\r\n recommendationsCount: PropTypes.number,\r\n isFromSummary: PropTypes.bool,\r\n classes: PropTypes.objectOf(PropTypes.string),\r\n initializeMiniGrid: PropTypes.func,\r\n showAutoApplyBanner: PropTypes.bool,\r\n isAutoApplyRecommendationEnabled: PropTypes.bool,\r\n viewSettings: PropTypes.func,\r\n isAutoApplyOptIn: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n level: null,\r\n onDownload: null,\r\n onFeedbackModalOpen: _.noop,\r\n reload: _.noop,\r\n readOnly: undefined,\r\n campaignAdGroups: undefined,\r\n handleHideCard: _.noop,\r\n perfMarker: {\r\n willInit: _.noop,\r\n willRender: _.noop,\r\n done: _.noop,\r\n },\r\n context: null,\r\n guid: null,\r\n isInlineView: false,\r\n scope: null,\r\n odata: null,\r\n preferencesService: null,\r\n permissions: {},\r\n isMCC: false,\r\n optimizationScore: null,\r\n overallOptimizationScoreBar: null,\r\n isOverviewPage: false,\r\n category: null,\r\n isOptimizationScoreOn: false,\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n isFromDismissTab: false,\r\n optInStatus: false,\r\n applyDate: 0,\r\n isFromSummary: false,\r\n initializeMiniGrid: _.noop,\r\n classes: {},\r\n recommendationsCount: 0,\r\n showAutoApplyBanner: false,\r\n isAutoApplyRecommendationEnabled: false,\r\n viewSettings: _.noop,\r\n isAutoApplyOptIn: false,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n props.perfMarker.willInit();\r\n }\r\n\r\n componentDidMount() {\r\n this.props.perfMarker.done();\r\n }\r\n\r\n getHeaderMenuItems = () => {\r\n const {\r\n permissions,\r\n isInlineView,\r\n i18n,\r\n isOptimizationScoreOn,\r\n readOnly,\r\n isFromDismissTab,\r\n newI18n,\r\n } = this.props;\r\n\r\n const isInProductFeedbackLoopOn = permissions.IsRecommendationInProductFeedbackLoopEnabled;\r\n const { levelAt } = this.props.scope;\r\n const headerMenuItems = [];\r\n const onDownload = _.contains(NOT_SUPPORT_DOWNLOAD_TYPES, this.props.type) ?\r\n null : this.props.onDownload && this.handleDownload;\r\n\r\n if (isInlineView) {\r\n if (levelAt === SUMMARY_LEVELS.CAMPAIGN) {\r\n headerMenuItems.push(new FuncWithName(i18n.getString('Summary_Card_Context_Menu_Hide_In_Campaign'), () => this.handleHideCard(SUMMARY_LEVELS.CAMPAIGN)));\r\n }\r\n if (levelAt === SUMMARY_LEVELS.ADGROUP) {\r\n headerMenuItems.push(new FuncWithName(i18n.getString('Summary_Card_Context_Menu_Hide_In_AdGroup'), () => this.handleHideCard(SUMMARY_LEVELS.ADGROUP)));\r\n }\r\n headerMenuItems.push(new FuncWithName(i18n.getString('Summary_Card_Context_Menu_Hide_In_Account'), () => this.handleHideCard(SUMMARY_LEVELS.ACCOUNT)));\r\n }\r\n\r\n if (!_.isNull(onDownload)) {\r\n headerMenuItems.push(new FuncWithName(i18n.getString('Summary_Card_Context_Menu_Download'), onDownload));\r\n }\r\n\r\n if (!_.contains(NOT_SUPPORT_DISMISS_TYPES, this.props.type)) {\r\n if (isInProductFeedbackLoopOn || isOptimizationScoreOn) {\r\n if (isFromDismissTab) {\r\n headerMenuItems.push(new FuncWithName(newI18n.getString(_TL_('Undismiss all')), this.handleUndismissAll, this.props.readOnly));\r\n } else {\r\n headerMenuItems.push(new FuncWithName(i18n.getString('Details_View_Dismiss_All'), this.handleDismissAll, readOnly));\r\n }\r\n } else {\r\n headerMenuItems.push(new FuncWithName(i18n.getString('Summary_Card_Context_Menu_Reject'), this.handleReject, readOnly));\r\n }\r\n }\r\n\r\n if (!isFromDismissTab) {\r\n headerMenuItems.push(new FuncWithName(i18n.getString('Summary_Card_Context_Menu_Feedback'), this.handleFeedback, readOnly));\r\n }\r\n\r\n return headerMenuItems;\r\n };\r\n\r\n handleSubmit(isProvideFeedbackOnly, isDismissAll = false) {\r\n this.props.onFeedbackModalOpen({\r\n recommendationDescription: this.props.summary.title,\r\n isProvideFeedbackOnly,\r\n isDismissAll,\r\n type: this.props.type,\r\n applyOpportunitiesLevel: this.props.level,\r\n context: this.props.context,\r\n });\r\n }\r\n\r\n handleDownload = () => {\r\n this.props.onDownload(this.props.type, this.props.version);\r\n };\r\n\r\n handleReject = () => {\r\n this.handleSubmit(false);\r\n };\r\n\r\n handleDismissAll = () => {\r\n this.handleSubmit(false, true);\r\n };\r\n\r\n handleUndismissAll = () => {\r\n const {\r\n context,\r\n type,\r\n isInlineView,\r\n level,\r\n guid,\r\n isMCC,\r\n } = this.props;\r\n\r\n this.props.track({\r\n type: this.props.type,\r\n campaignAdGroups: this.props.campaignAdGroups,\r\n channel: getChannel(type, isInlineView, isMCC),\r\n userAction: APPLY_ACTION_TYPES.UNDISMISS,\r\n applyOpportunitiesLevel: level,\r\n context: _.defaults({}, context, { trackId: generateGuid(), ApplyMode: 'All' }),\r\n guid,\r\n withAll: true,\r\n handleRecommendationNotification,\r\n });\r\n };\r\n\r\n handleFeedback = () => {\r\n this.handleSubmit(true);\r\n };\r\n\r\n handleHideCard = (levelAt) => {\r\n this.props.handleHideCard(this.props.type, levelAt);\r\n };\r\n\r\n render() {\r\n this.props.perfMarker.willRender();\r\n const {\r\n sample: {\r\n visualType,\r\n visualData,\r\n },\r\n locationMap,\r\n i18n,\r\n type,\r\n preferencesService,\r\n permissions,\r\n summary,\r\n isOverviewPage,\r\n isOptimizationScoreOn,\r\n context,\r\n newI18n,\r\n isFromDismissTab,\r\n optInStatus,\r\n scope,\r\n applyDate,\r\n recommendationsCount,\r\n appConfig,\r\n odata,\r\n isFromSummary,\r\n classes,\r\n initializeMiniGrid,\r\n showAutoApplyBanner,\r\n isAutoApplyRecommendationEnabled,\r\n overallOptimizationScoreBar,\r\n viewSettings,\r\n isMCC,\r\n isAutoApplyOptIn,\r\n } = this.props;\r\n const inProductUpdateConfig = recommendationInProductUpdateConfigs[type];\r\n let chart;\r\n switch (visualType) {\r\n case VISUAL_TYPES.COLUMN_CHART:\r\n case VISUAL_TYPES.LINE_CHART:\r\n case VISUAL_TYPES.LINE_WEEKLY_CHART:\r\n case VISUAL_TYPES.LINE_COLUMN_CHART:\r\n chart = ();\r\n break;\r\n case VISUAL_TYPES.TABLE:\r\n chart = ;\r\n break;\r\n case VISUAL_TYPES.MAP:\r\n chart = ;\r\n break;\r\n case VISUAL_TYPES.ADS_PREVIEW:\r\n chart = ;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n const {\r\n description,\r\n pitching,\r\n helpId,\r\n isSeasonal,\r\n estimates,\r\n coupon,\r\n linkType,\r\n thirdPartyInfos,\r\n } = this.props.summary;\r\n\r\n // value for the notification banner\r\n const tagManager = thirdPartyInfos && thirdPartyInfos.length > 0 ?\r\n thirdPartyInfos[0].ThirdPartyName : null;\r\n const additionalArgs = _.isNull(tagManager) ? {} : { tagManager };\r\n\r\n const showSummarySample = (isCompetition(this.props.type) || (\r\n !_.isEmpty(this.props.sample.visualData) &&\r\n !_.isEmpty(this.props.sample.visualData.headers))) && (!this.props.isInlineView)\r\n && (!isOverviewPage || type !== RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS);\r\n const showFooterInDescription = this.props.isInlineView;\r\n const showEstimates = estimates && estimates.showEstimates && !this.props.isInlineView;\r\n\r\n const headerMenuItems = this.getHeaderMenuItems();\r\n\r\n const header = (\r\n
    \r\n \r\n
    \r\n );\r\n\r\n const banner = (\r\n
    \r\n {estimates && estimates.showEstimates && isSeasonal &&\r\n
    \r\n {i18n.getString('Summary_Card_Banner_Seasonal_Recommendation')}\r\n
    \r\n }\r\n
    \r\n );\r\n\r\n const summaryEstimates = (\r\n
    \r\n \r\n
    \r\n );\r\n\r\n const summaryOptimizationScore = (\r\n
    \r\n \r\n
    \r\n );\r\n\r\n const summaryEstimation = (\r\n
    \r\n \r\n
    \r\n );\r\n\r\n const sample = (\r\n
    \r\n \r\n {chart}\r\n \r\n
    \r\n );\r\n\r\n const footer = (\r\n
    \r\n \r\n
    \r\n );\r\n\r\n let overviewEstimationOrSummary = null;\r\n if (isOverviewPage) {\r\n if (isOptimizationScoreOn && overallOptimizationScoreBar) {\r\n overviewEstimationOrSummary = summaryOptimizationScore;\r\n } else if (showEstimates) {\r\n overviewEstimationOrSummary = summaryEstimates;\r\n }\r\n }\r\n\r\n let AutoApplyBanner;\r\n if (showAutoApplyBanner) {\r\n AutoApplyBanner = isAutoApplyRecommendationEnabled ?\r\n StyledRecommendationAutpApplyBanner : withAdsAutoApply(StyledRecommendationAutpApplyBanner);\r\n }\r\n\r\n const summaryDescription = (\r\n
    \r\n {isOverviewPage\r\n && coupon && }\r\n \r\n {isOptimizationScoreOn && isOverviewPage && !_.isEmpty(overallOptimizationScoreBar) &&\r\n \r\n }\r\n
    \r\n \r\n
    \r\n {showFooterInDescription && footer}\r\n
    \r\n );\r\n\r\n return (\r\n
    \r\n {!isOverviewPage && header}\r\n
    \r\n {!isOverviewPage && inProductUpdateConfig && inProductUpdateConfig.warnNotification &&\r\n }\r\n {!isOverviewPage &&\r\n isInProductUpdateBannerAvailable(type, permissions, summary) &&\r\n }\r\n {!isOverviewPage && banner}\r\n \r\n {!isOptimizationScoreOn && !isOverviewPage && showEstimates && summaryEstimates}\r\n {overviewEstimationOrSummary}\r\n {summaryDescription}\r\n {!isOverviewPage && isOptimizationScoreOn && showEstimates && summaryEstimation}\r\n
    \r\n
    \r\n {showSummarySample && sample}\r\n {!showFooterInDescription && !isOverviewPage && footer}\r\n {showAutoApplyBanner &&\r\n }\r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport const SummaryCard = withTrack(/* withAll */ true)(summaryCard);\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport {\r\n ADINSIGHT_LOG_ACTION_TYPE,\r\n RECOMMENDATION_TYPES,\r\n getSummaryCardModel,\r\n APPLY_ACTION_TYPES,\r\n AUTO_APPLY_TYPES,\r\n SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport { SummaryCard } from './summary-card';\r\n\r\nconst passthroughArray = [\r\n 'dataService',\r\n 'el',\r\n 'viewDetails',\r\n 'reload',\r\n 'scope',\r\n 'readOnly',\r\n 'locationMap',\r\n 'i18n',\r\n 'campaignAdGroups',\r\n 'onFeedbackModalOpen',\r\n 'onDownload',\r\n 'handleHideCard',\r\n 'logOpportunityEvent',\r\n 'currentActivity',\r\n 'guid',\r\n 'permissions',\r\n 'logExpInfo',\r\n 'combineText',\r\n 'adDisplayUrlService',\r\n 'odata',\r\n 'preferencesService',\r\n 'appConfig',\r\n 'showAsyncApplyModal',\r\n 'closeAsyncApplyModal',\r\n 'showApplyConfirmModal',\r\n 'isMCC',\r\n 'overallOptimizationScoreBar',\r\n 'isOptimizationScoreOn',\r\n 'newI18n',\r\n 'isFromDismissTab',\r\n 'isFromSummary',\r\n 'classes',\r\n 'initializeMiniGrid',\r\n 'isAutoApplyRecommendationEnabled',\r\n 'viewSettings',\r\n];\r\n\r\nexport class SummaryCardList extends React.PureComponent {\r\n static propTypes = {\r\n data: PropTypes.shape({\r\n [RECOMMENDATION_TYPES.BUDGET]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.COMPETITIVE_BID]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.DEVICE_BID_BOOST]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.LOCATION_BID_BOOST]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD]: PropTypes.object, // deprecated in Oct 2023\r\n [RECOMMENDATION_TYPES.NEW_LOCATION]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.SYNDICATION]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.NEW_KEYWORD_OPPORTUNITY]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.TRENDING_QUERY]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.GOOGLE_IMPORT]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.GOOGLE_IMPORT_SCHEDULED]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.SITE_LINK]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.BUDGET_OPPORTUNITY]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.ADJUST_SHARED_BUDGET_OPPORTUNITY]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.BROAD_MATCH_KEYWORD]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.CALLOUT]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.REPAIR_ADS]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.REPAIR_KEYWORD]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.DYNAMIC_SEARCH_ADS]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.REALLOCATE_BUDGET]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.FIX_AD_DESTINATION]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.FIX_AD_TEXT]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.SETUP_CONVERSION_TRACKING_OPPORTUNITY]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.FIX_CONVERSION_GOAL_SETTINGS]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.CREATE_CONVERSION_GOAL]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.FACEBOOK_IMPORT]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.MULTIMEDIA_ADS]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.IMAGE_EXTENSION]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.REPAIR_MISSING_KEYWORD_PARAMS]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.FIX_NO_IMPRESSION_BID]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.IMPROVE_MULTIMEDIA_ADS]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.SSC_2_PMAX_MIGRATION]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.PMAX_IMPORT]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.DSA_2_PMAX_MIGRATION]: PropTypes.object,\r\n [RECOMMENDATION_TYPES.SYNDICATION_GAP]: PropTypes.object,\r\n }).isRequired,\r\n reload: PropTypes.func.isRequired,\r\n viewDetails: PropTypes.func.isRequired,\r\n currency: PropTypes.string.isRequired,\r\n scope: PropTypes.shape({\r\n levelAt: PropTypes.string.isRequired,\r\n customerId: PropTypes.string,\r\n accountId: PropTypes.string,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n locationMap: PropTypes.func.isRequired,\r\n logOpportunityEvent: PropTypes.func.isRequired,\r\n campaignAdGroups: PropTypes.arrayOf(PropTypes.object).isRequired,\r\n currentActivity: PropTypes.objectOf(PropTypes.any).isRequired,\r\n context: PropTypes.shape({\r\n Source: PropTypes.string,\r\n Level: PropTypes.string.isRequired,\r\n Category: PropTypes.string,\r\n }).isRequired,\r\n permissions: PropTypes.objectOf(PropTypes.any).isRequired,\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }),\r\n combineText: PropTypes.func,\r\n adDisplayUrlService: PropTypes.objectOf(PropTypes.any),\r\n isInlineView: PropTypes.bool,\r\n odata: PropTypes.PropTypes.shape({\r\n get: PropTypes.func.isRequired,\r\n }),\r\n preferencesService: PropTypes.objectOf(PropTypes.any),\r\n applyAllCallback: PropTypes.func,\r\n appConfig: PropTypes.objectOf(PropTypes.any).isRequired,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Available: PropTypes.number,\r\n }),\r\n isMCC: PropTypes.bool,\r\n isOptimizationScoreOn: PropTypes.bool,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n isFromDismissTab: PropTypes.bool,\r\n isOverviewPage: PropTypes.bool,\r\n isAutoApplyRecommendationEnabled: PropTypes.bool.isRequired,\r\n isAARSection: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n perfMarker: {\r\n createChild: () => this,\r\n },\r\n combineText: null,\r\n adDisplayUrlService: null,\r\n isInlineView: false,\r\n odata: null,\r\n preferencesService: null,\r\n applyAllCallback: _.noop,\r\n overallOptimizationScoreBar: null,\r\n isMCC: false,\r\n isOptimizationScoreOn: false,\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n isFromDismissTab: false,\r\n isOverviewPage: false,\r\n isAARSection: false,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.logImpression();\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (_.has(this.props.context, 'Category') &&\r\n this.props.context.Category !== prevProps.context.Category) {\r\n // Category Tab Click log\r\n this.props.logOpportunityEvent({\r\n action: ADINSIGHT_LOG_ACTION_TYPE.CLICK_CATEGORY,\r\n context: _.extend({}, this.props.context, {\r\n Category: prevProps.context.Category,\r\n ClickToCategory: this.props.context.Category,\r\n }),\r\n });\r\n\r\n this.logImpression();\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n const currentCategory = this.props.context.Category;\r\n const clickToCategory = window.location.pathname.split('/').slice(-1)[0];\r\n if (this.props && _.has(this.props.context, 'Category') &&\r\n currentCategory !== clickToCategory) {\r\n // Category Tab Click log\r\n this.props.logOpportunityEvent({\r\n action: ADINSIGHT_LOG_ACTION_TYPE.CLICK_CATEGORY,\r\n context: _.extend({}, this.props.context, {\r\n Category: currentCategory,\r\n ClickToCategory: clickToCategory,\r\n }),\r\n });\r\n }\r\n }\r\n\r\n logImpression() {\r\n _.each(this.props.data, (rec, key) => {\r\n this.props.logOpportunityEvent({\r\n type: rec.type,\r\n action: ADINSIGHT_LOG_ACTION_TYPE.IMPRESSION,\r\n position: _.indexOf(_.keys(this.props.data), key) + 1,\r\n context: this.props.isAARSection ? _.extend({}, this.props.context, {\r\n Section: 'AAR',\r\n ScoreUpLift: rec.optimizationScore,\r\n }) : _.extend({}, this.props.context, {\r\n ScoreUpLift: rec.optimizationScore,\r\n }),\r\n });\r\n });\r\n }\r\n\r\n render() {\r\n const {\r\n data,\r\n i18n,\r\n currency,\r\n scope,\r\n perfMarker,\r\n currentActivity,\r\n isOverviewPage,\r\n permissions,\r\n isAutoApplyRecommendationEnabled,\r\n odata,\r\n newI18n,\r\n } = this.props;\r\n\r\n const cards = _.chain(data)\r\n .map((cardData) => {\r\n let showAutoApplyBanner;\r\n if (isAutoApplyRecommendationEnabled) {\r\n showAutoApplyBanner = !isOverviewPage && !this.props.isMCC\r\n && _.contains(\r\n _.keys(AUTO_APPLY_TYPES).concat(SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES),\r\n cardData.type\r\n )\r\n && cardData.isAutoApplyOptIn;\r\n } else {\r\n showAutoApplyBanner = !isOverviewPage && !this.props.isMCC\r\n && _.contains(_.keys(AUTO_APPLY_TYPES), cardData.type)\r\n && permissions.IsRSAAutoApplyEnabled\r\n && cardData.optInStatus;\r\n }\r\n\r\n const summaryCardModel = getSummaryCardModel(_.extend({}, cardData, {\r\n i18n,\r\n currency,\r\n scope: scope.levelAt,\r\n permissions,\r\n combineText: this.props.combineText,\r\n adDisplayUrlService: this.props.adDisplayUrlService,\r\n isMCC: this.props.isMCC,\r\n isOptimizationScoreOn: this.props.isOptimizationScoreOn,\r\n currentActivity,\r\n showAutoApplyBanner,\r\n isAutoApplyRecommendationEnabled,\r\n odata,\r\n newI18n,\r\n }));\r\n\r\n const childPerfMarker = perfMarker.createChild(summaryCardModel.type);\r\n return (\r\n {\r\n this.props.reload({\r\n isFromApplyOrDismiss: op.userAction !== APPLY_ACTION_TYPES.UNDISMISS,\r\n });\r\n if (op.userAction === APPLY_ACTION_TYPES.ACCEPT) {\r\n this.props.applyAllCallback();\r\n }\r\n }}\r\n optInStatus={cardData.optInStatus}\r\n applyDate={cardData.applyDate}\r\n showAutoApplyBanner={showAutoApplyBanner}\r\n isAutoApplyOptIn={cardData.isAutoApplyOptIn}\r\n />\r\n );\r\n })\r\n .value();\r\n\r\n return (\r\n
    \r\n {cards}\r\n
    \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\nimport { LearnMoreLink } from '@bingads-webui-campaign-react/help';\r\nimport { CHANNEL_TYPES } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nimport bubbleImg from '../media/bubble.svg';\r\n\r\nfunction renderLearnMore(i18n, text, channel) {\r\n return ();\r\n}\r\n\r\nexport const EmptyView = ({\r\n i18n,\r\n scope,\r\n channel,\r\n viewAccountRecommendations,\r\n data,\r\n isOptimizationScoreOn,\r\n overallOptimizationScoreBar,\r\n isDismissedDataEmpty,\r\n newI18n,\r\n viewDismissedRecommendations,\r\n isDismissedTabEnabled,\r\n}) => {\r\n const showOptimizationScoreEmptyView = (isOptimizationScoreOn\r\n && overallOptimizationScoreBar\r\n && (overallOptimizationScoreBar.Available === 0\r\n || _.isNull(overallOptimizationScoreBar.Available)));\r\n const title = showOptimizationScoreEmptyView\r\n ? i18n.getString(`Summary_Card_${scope.levelAt}_Level_Empty_Title_OptimizationScore`)\r\n : i18n.getString(`Summary_Card_${scope.levelAt}_Level_Empty_Title`);\r\n let titleContent = title;\r\n let subTitleContent = '';\r\n let actionText = '';\r\n\r\n let totalRecommendations = {\r\n types: 0,\r\n tally: 0,\r\n };\r\n if (data) {\r\n totalRecommendations = _.reduce(\r\n data.value,\r\n (memo, { RecommendationsCount }) => ({\r\n types: RecommendationsCount > 0 ?\r\n memo.types + 1 :\r\n memo.types,\r\n tally: memo.tally + RecommendationsCount,\r\n }),\r\n totalRecommendations\r\n );\r\n }\r\n\r\n if (\r\n channel === CHANNEL_TYPES.RECOMMENDATION\r\n ) {\r\n subTitleContent = totalRecommendations.types === 0 ?\r\n i18n.getString('Summary_Card_Empty_Details_Recommendations_Tab') :\r\n i18n.getString(`Summary_Card_${scope.levelAt}_Level_Empty_Details`);\r\n\r\n const actionKey = totalRecommendations.types === 1 ?\r\n 'Summary_Card_Empty_Button_With_Count_Recommendations_Tab' :\r\n 'Summary_Card_Empty_Button_With_Count_Recommendations_Tab_Multi';\r\n actionText = i18n.getString(actionKey, {\r\n count: totalRecommendations.types,\r\n });\r\n i18n.getString('Summary_Card_View_Recommendations_Multi_Recommendations_Tab');\r\n } else if (channel === CHANNEL_TYPES.MCCRECOMMENDATION) {\r\n subTitleContent = i18n.getString('Summary_Card_Empty_Details_Recommendations_Tab_MCC');\r\n } else {\r\n if (totalRecommendations.tally > 0 || scope.levelAt === levelAtConstant.ACCOUNT) {\r\n subTitleContent = i18n.getString(`Summary_Card_${scope.levelAt}_Level_Empty_Details`);\r\n }\r\n\r\n actionText = i18n.getString(`Summary_Card_${scope.levelAt}_Level_Empty_Button_With_Count`, {\r\n count: totalRecommendations.tally,\r\n });\r\n }\r\n\r\n let hasSubTitle = !_.isEmpty(subTitleContent);\r\n const hasAction =\r\n totalRecommendations.tally > 0 &&\r\n scope.levelAt !== levelAtConstant.ACCOUNT &&\r\n scope.levelAt !== levelAtConstant.CUSTOMER;\r\n\r\n if (!hasSubTitle) {\r\n titleContent = renderLearnMore(i18n, titleContent, channel);\r\n }\r\n\r\n if (isDismissedTabEnabled && !isDismissedDataEmpty) {\r\n hasSubTitle = false;\r\n if (scope.levelAt === levelAtConstant.ACCOUNT) {\r\n titleContent = newI18n.getString(_TL_('You still have dismissed recommendations for this account'));\r\n } else if (scope.levelAt === levelAtConstant.CAMPAIGN) {\r\n titleContent = newI18n.getString(_TL_('You still have dismissed recommendations for this campaign'));\r\n }\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n {title}\r\n
    \r\n
    \r\n

    {titleContent}

    \r\n {hasSubTitle &&\r\n

    {renderLearnMore(i18n, subTitleContent, channel)}

    }\r\n
    \r\n {hasAction &&\r\n
    \r\n \r\n
    }\r\n {showOptimizationScoreEmptyView && isDismissedTabEnabled && !isDismissedDataEmpty &&\r\n
    \r\n \r\n
    }\r\n
    \r\n
    \r\n
    );\r\n};\r\n\r\nEmptyView.propTypes = {\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.shape({\r\n levelAt: PropTypes.string.isRequired,\r\n }).isRequired,\r\n viewAccountRecommendations: PropTypes.func,\r\n channel: PropTypes.string.isRequired,\r\n data: PropTypes.objectOf(PropTypes.any),\r\n isOptimizationScoreOn: PropTypes.bool,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Available: PropTypes.number,\r\n }),\r\n isDismissedDataEmpty: PropTypes.bool,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n viewDismissedRecommendations: PropTypes.func,\r\n isDismissedTabEnabled: PropTypes.bool,\r\n};\r\n\r\nEmptyView.defaultProps = {\r\n viewAccountRecommendations: _.noop,\r\n data: null,\r\n isOptimizationScoreOn: false,\r\n overallOptimizationScoreBar: {},\r\n isDismissedDataEmpty: true,\r\n newI18n: {},\r\n isDismissedTabEnabled: false,\r\n viewDismissedRecommendations: _.noop,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport Minigrid from 'minigrid';\r\n\r\nimport {\r\n withGetSummary,\r\n withGetCount,\r\n withFilterCategory,\r\n CHANNEL_TYPES,\r\n isCompetition,\r\n ADINSIGHT_LOG_ACTION_TYPE,\r\n ADINSIGHT_LOG_API_NAME,\r\n RECOMMENDATION_IDS,\r\n getChannel,\r\n hideInContextRecommendation,\r\n DOWNLOAD_SCOPE,\r\n RECOMMENDATION_CATEGORIES,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { DownloadToolbarButton } from '@bingads-webui-campaign-react/recommendation-visuals';\r\nimport { OverridableToolbarView } from '@bingads-webui/toolbar';\r\nimport {\r\n CampaignAdgroupSelectorFilterAgent,\r\n EmptyFilterView,\r\n} from '@bingads-webui-campaign-react/campaign-adgroup-selector-filter';\r\nimport { FeedbackModal } from '@bingads-webui-campaign-react/recommendation-feedback-modal';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\n\r\nimport { levelAtConstant } from '@bingads-webui-campaign/scope-constants';\r\n\r\nimport { SummaryCardList } from './summary-card-list';\r\nimport { EmptyView } from './empty-view';\r\n\r\nclass summaryView extends React.PureComponent {\r\n static propTypes = {\r\n data: PropTypes.objectOf(PropTypes.any).isRequired,\r\n dismissedData: PropTypes.objectOf(PropTypes.any),\r\n reload: PropTypes.func.isRequired,\r\n viewDetails: PropTypes.func.isRequired,\r\n viewSummary: PropTypes.func.isRequired,\r\n viewCategory: PropTypes.func,\r\n deps: PropTypes.shape({\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n locationMap: PropTypes.func.isRequired,\r\n constants: PropTypes.shape({\r\n imagePath: PropTypes.string.isRequired,\r\n }).isRequired,\r\n permissions: PropTypes.object.isRequired,\r\n combineText: PropTypes.func,\r\n adDisplayUrlService: PropTypes.object,\r\n odata: PropTypes.PropTypes.shape({\r\n get: PropTypes.func.isRequired,\r\n }),\r\n preferencesService: PropTypes.objectOf(PropTypes.any),\r\n appConfig: PropTypes.objectOf(PropTypes.any).isRequired,\r\n }).isRequired,\r\n channel: PropTypes.string.isRequired,\r\n campaignType: PropTypes.number,\r\n context: PropTypes.shape({\r\n Source: PropTypes.string,\r\n Level: PropTypes.string.isRequired,\r\n Category: PropTypes.string,\r\n }).isRequired,\r\n currency: PropTypes.string.isRequired,\r\n filterConfig: PropTypes.objectOf(PropTypes.any),\r\n filterService: PropTypes.objectOf(PropTypes.any),\r\n campaignAdGroups: PropTypes.arrayOf(PropTypes.object).isRequired,\r\n hasFilter: PropTypes.bool.isRequired,\r\n scope: PropTypes.shape({\r\n levelAt: PropTypes.string.isRequired,\r\n campaignId: PropTypes.string,\r\n customerId: PropTypes.string,\r\n accountId: PropTypes.string,\r\n adGroupId: PropTypes.string,\r\n }).isRequired,\r\n currentActivity: PropTypes.objectOf(PropTypes.any).isRequired,\r\n readOnly: PropTypes.bool,\r\n downloadService: PropTypes.objectOf(PropTypes.any),\r\n guid: PropTypes.string, // for adinsight view event log in aria\r\n isInlineView: PropTypes.bool,\r\n hasDataCallback: PropTypes.func,\r\n hideCardCallback: PropTypes.func,\r\n initialToolbarConfig: PropTypes.objectOf(PropTypes.any),\r\n applyAllCallback: PropTypes.func,\r\n toolbar: PropTypes.element,\r\n isMCC: PropTypes.bool,\r\n overallOptimizationScoreBar: PropTypes.shape({\r\n Gained: PropTypes.number,\r\n Dismissed: PropTypes.number,\r\n Available: PropTypes.number,\r\n }),\r\n isOptimizationScoreOn: PropTypes.bool,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func,\r\n }),\r\n isDismissedTabEnabled: PropTypes.bool,\r\n isFromSummary: PropTypes.bool,\r\n isAutoApplyRecommendationEnabled: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n campaignType: null,\r\n filterService: null,\r\n filterConfig: null,\r\n readOnly: false,\r\n downloadService: null,\r\n guid: null,\r\n isInlineView: false,\r\n hasDataCallback: _.noop,\r\n hideCardCallback: _.noop,\r\n initialToolbarConfig: null,\r\n applyAllCallback: _.noop,\r\n toolbar: null,\r\n isMCC: false,\r\n overallOptimizationScoreBar: null,\r\n isOptimizationScoreOn: false,\r\n newI18n: {\r\n getString: _.noop,\r\n },\r\n dismissedData: {},\r\n viewCategory: _.noop,\r\n isDismissedTabEnabled: false,\r\n isFromSummary: false,\r\n isAutoApplyRecommendationEnabled: false,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.upperToolBarInstance = new OverridableToolbarView({\r\n items: [{\r\n type: 'dropdown',\r\n id: 'filter-menu',\r\n }],\r\n });\r\n\r\n this.state = {\r\n modal: {\r\n isOpen: false,\r\n isDismissAll: false,\r\n },\r\n toolbarConfig: props.initialToolbarConfig,\r\n hideToolbar: false,\r\n appliedFilter: undefined,\r\n };\r\n if (props.filterService) {\r\n props.filterService.on('filter-state-changed', this.onFilterStateChanged);\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this.upperToolBarInstance.render();\r\n this.initializeMiniGrid();\r\n }\r\n\r\n componentDidUpdate() {\r\n this.initializeMiniGrid();\r\n }\r\n\r\n componentWillUnmount() {\r\n this.upperToolBarInstance.remove();\r\n }\r\n\r\n onFilterStateChanged = () => {\r\n this.props.reload();\r\n }\r\n\r\n initializeMiniGrid() {\r\n if (!_.isEmpty(this.props.data) && !this.props.isInlineView) {\r\n const ops = {\r\n container: '.recommendation-summary-cards',\r\n item: '.recommendation-summary-card',\r\n gutter: 20,\r\n };\r\n const autoApplyOps = {\r\n container: '.auto-apply-recommendation-container .recommendation-summary-cards',\r\n item: '.recommendation-summary-card',\r\n gutter: 20,\r\n };\r\n const grid = new Minigrid(ops);\r\n grid.mount();\r\n\r\n if (this.props.isAutoApplyRecommendationEnabled) {\r\n const autoApplyGrid = new Minigrid(autoApplyOps);\r\n autoApplyGrid.mount();\r\n }\r\n }\r\n }\r\n\r\n handleDownload = (type, version) => {\r\n const self = this;\r\n self.props.downloadService.download({\r\n channel: self.props.channel,\r\n campaignType: self.props.campaignType,\r\n filterService: self.props.filterService,\r\n recommendationType: type,\r\n }).then(() => {\r\n self.logOpportunityEvent({\r\n type,\r\n action: ADINSIGHT_LOG_ACTION_TYPE.DOWNLOAD,\r\n context: _.extend({\r\n Version: version,\r\n DownloadScope: DOWNLOAD_SCOPE.INDIVIDUAL,\r\n }, self.props.context),\r\n });\r\n });\r\n };\r\n\r\n handleFeedbackModalOpen = ({\r\n recommendationDescription,\r\n isProvideFeedbackOnly,\r\n isDismissAll,\r\n type,\r\n applyOpportunitiesLevel,\r\n context,\r\n }) => {\r\n this.setState({\r\n modal: {\r\n isOpen: true,\r\n recommendationDescription,\r\n isProvideFeedbackOnly,\r\n isDismissAll,\r\n data: {\r\n type,\r\n campaignAdGroups: this.props.campaignAdGroups,\r\n channel: getChannel(type, this.props.isInlineView, this.props.isMCC),\r\n applyOpportunitiesLevel,\r\n },\r\n context,\r\n },\r\n });\r\n }\r\n\r\n handleHideCard = (type, levelAt) => {\r\n let id = this.props.scope.accountId;\r\n\r\n if (levelAt === levelAtConstant.CAMPAIGN) {\r\n id = this.props.scope.campaignId;\r\n } else if (levelAt === levelAtConstant.ADGROUP) {\r\n id = this.props.scope.adGroupId;\r\n }\r\n hideInContextRecommendation({\r\n levelAt,\r\n id,\r\n type,\r\n preferencesService: this.props.deps.preferencesService,\r\n currentActivity: this.props.currentActivity,\r\n channel: getChannel(type, this.props.isInlineView, this.props.isMCC),\r\n campaignId: this.props.scope.campaignId,\r\n context: _.extend({ HideLevel: levelAt }, this.props.context),\r\n isCardView: true,\r\n guid: this.props.guid || '',\r\n });\r\n this.props.hideCardCallback();\r\n };\r\n\r\n handleFeedbackSubmit = (option) => {\r\n this.setState({ modal: { isOpen: false } }, () => {\r\n this.props.reload({ isFromApplyOrDismiss: option && option.isDismissAll });\r\n });\r\n };\r\n\r\n handleFeedbackCancel = () => {\r\n this.setState({ modal: { isOpen: false } });\r\n }\r\n\r\n viewAccountRecommendations = () => {\r\n this.props.viewSummary({\r\n scope: levelAtConstant.ACCOUNT,\r\n });\r\n }\r\n\r\n viewDismissedRecommendations = () => {\r\n this.props.viewCategory(RECOMMENDATION_CATEGORIES.DISMISSED)();\r\n }\r\n\r\n logOpportunityEvent = ({\r\n type = null,\r\n action,\r\n position = null,\r\n input = null,\r\n context = null,\r\n }) => {\r\n let api = ADINSIGHT_LOG_API_NAME.RECOMMENDATION;\r\n\r\n if (isCompetition(type)) {\r\n api = ADINSIGHT_LOG_API_NAME.COMPETITION;\r\n }\r\n\r\n this.props.currentActivity.trace({\r\n type: type || '',\r\n typeId: RECOMMENDATION_IDS[type],\r\n action,\r\n input,\r\n campaignId: this.props.scope.campaignId,\r\n channel: getChannel(type, this.props.isInlineView, this.props.isMCC),\r\n position,\r\n guid: this.props.guid || '',\r\n context: JSON.stringify(context),\r\n }, api);\r\n }\r\n\r\n updateToolbar = (values) => {\r\n _.each(_.isArray(values) ? values : [values], (value) => {\r\n const { id } = value;\r\n\r\n if (this.state.toolbarConfig.has(id)) {\r\n this.state.toolbarConfig.set(id, _.extend(this.state.toolbarConfig.get(id), value));\r\n this.setState({\r\n toolbarConfig: this.state.toolbarConfig,\r\n });\r\n if (id === 'predicate-list' && !_.isEqual(this.state.appliedFilter, this.props.filterService.editableFilter)) {\r\n this.setState({\r\n appliedFilter: this.props.filterService.editableFilter,\r\n });\r\n this.forceUpdate();\r\n }\r\n }\r\n });\r\n }\r\n\r\n resetToolbarVisibility = ({ forceHideToolbar }) => {\r\n this.setState({\r\n hideToolbar: forceHideToolbar,\r\n });\r\n }\r\n\r\n render = () => {\r\n const {\r\n deps: {\r\n i18n,\r\n locationMap,\r\n constants,\r\n permissions,\r\n combineText,\r\n adDisplayUrlService,\r\n odata,\r\n preferencesService,\r\n },\r\n data,\r\n scope,\r\n channel,\r\n downloadService,\r\n hasDataCallback,\r\n overallOptimizationScoreBar,\r\n isOptimizationScoreOn,\r\n dismissedData,\r\n newI18n,\r\n isDismissedTabEnabled,\r\n context,\r\n isAutoApplyRecommendationEnabled,\r\n } = this.props;\r\n\r\n let summaryCards = null;\r\n let autoApplySummaryCards = null;\r\n let autoApplyHeader = null;\r\n let emptyView = null;\r\n let modal = null;\r\n let toolbar = _.identity;\r\n\r\n const isDataEmpty = _.isEmpty(data);\r\n const isDismissedDataEmpty = _.isEmpty(dismissedData);\r\n\r\n let summaryCardDataOptOut;\r\n let summaryCardDataOptIn;\r\n\r\n hasDataCallback(!isDataEmpty);\r\n // hide if filter objects weren't passed in\r\n // hide toolbar when there is no data and there is no filter\r\n if (!isDataEmpty || this.props.hasFilter) {\r\n const downloadButton = ();\r\n\r\n if (this.props.initialToolbarConfig) {\r\n this.updateToolbar({\r\n id: 'button-download',\r\n content: downloadButton,\r\n });\r\n\r\n const ToolbarFilterbarSet = this.props.toolbar;\r\n toolbar = ();\r\n } else {\r\n const toolbarItemDownload = downloadButton;\r\n let toolbarItemFilter = null;\r\n\r\n if (this.props.filterConfig) {\r\n toolbarItemFilter = ();\r\n }\r\n\r\n toolbar = (\r\n
    \r\n { toolbarItemDownload}\r\n { toolbarItemFilter}\r\n
    );\r\n }\r\n }\r\n\r\n const { imagePath } = constants;\r\n const emptyViewSharedParam = {\r\n isOptimizationScoreOn,\r\n overallOptimizationScoreBar,\r\n isDismissedDataEmpty,\r\n viewDismissedRecommendations: this.viewDismissedRecommendations,\r\n isDismissedTabEnabled,\r\n };\r\n\r\n if (isDataEmpty && this.props.hasFilter) {\r\n emptyView = ;\r\n } else if (\r\n isDataEmpty &&\r\n (\r\n this.props.scope.levelAt === levelAtConstant.ACCOUNT ||\r\n this.props.scope.levelAt === levelAtConstant.CUSTOMER\r\n )\r\n ) {\r\n emptyView = ();\r\n } else if (isDataEmpty) {\r\n const EmptyViewWithCount = withGetCount(EmptyView);\r\n\r\n emptyView = ();\r\n } else {\r\n const summaryCardsProps = _.pick(\r\n this.props,\r\n 'campaignAdGroups',\r\n 'channel',\r\n 'context',\r\n 'currency',\r\n 'dataService',\r\n 'el',\r\n 'readOnly',\r\n 'reload',\r\n 'scope',\r\n 'summary',\r\n 'viewDetails',\r\n 'viewSummary',\r\n 'currentActivity',\r\n 'guid',\r\n 'perfMarker',\r\n 'logExpInfo',\r\n 'isInlineView',\r\n 'applyAllCallback',\r\n 'showAsyncApplyModal',\r\n 'closeAsyncApplyModal',\r\n 'isMCC',\r\n 'showApplyConfirmModal',\r\n 'overallOptimizationScoreBar',\r\n 'newI18n',\r\n 'isOptimizationScoreOn',\r\n 'isDismissedTabEnabled',\r\n 'classes',\r\n 'isAutoApplyRecommendationEnabled',\r\n 'viewSettings'\r\n );\r\n\r\n summaryCardDataOptOut = _.omit(this.props.data, rec => rec.isAutoApplyOptIn);\r\n summaryCardDataOptIn = _.omit(this.props.data, rec => !rec.isAutoApplyOptIn);\r\n summaryCards = (\r\n { this.initializeMiniGrid(); }}\r\n />);\r\n autoApplyHeader = isAutoApplyRecommendationEnabled && !_.isEmpty(summaryCardDataOptIn) ? (\r\n \r\n
    \r\n
    {newI18n.getString(_TL_('Scheduled to auto-apply'))}
    \r\n \r\n \r\n ) : null;\r\n autoApplySummaryCards = isAutoApplyRecommendationEnabled ? (\r\n
    \r\n { this.initializeMiniGrid(); }}\r\n isAARSection\r\n />\r\n
    \r\n ) : null;\r\n modal = (\r\n );\r\n }\r\n\r\n return (\r\n
    \r\n {channel === CHANNEL_TYPES.COMPETITION ? toolbar : null}\r\n {(!isAutoApplyRecommendationEnabled || !_.isEmpty(summaryCardDataOptOut)) && summaryCards}\r\n {autoApplyHeader}\r\n {autoApplySummaryCards}\r\n {modal}\r\n {!this.props.isInlineView && emptyView}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport const FilteredSummaryView =\r\n withFilterCategory(summaryView);\r\n\r\nexport const SummaryView =\r\n withGetSummary(/* withDetails */ false)(summaryView);\r\n","import Backbone from 'backbone';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport _ from 'underscore';\r\n\r\nimport { SummaryView } from './summary-view';\r\n\r\nconst inContextVersion = '1.1';\r\n\r\nexport class InlineRecommendationCardView extends Backbone.View {\r\n constructor(options) {\r\n super(options);\r\n this.options = _.defaults(options, {\r\n viewSummary: _.noop,\r\n });\r\n this.isShowCard = this.options.isShowCard;\r\n }\r\n\r\n render() {\r\n const context = {\r\n Level: this.options.scope.levelAt,\r\n CampaignIds: this.options.scope.campaignId ? [Number(this.options.scope.campaignId)] : [],\r\n AdGroupIds: this.options.scope.adGroupId ? [Number(this.options.scope.adGroupId)] : [],\r\n 'ITC-Version': inContextVersion,\r\n };\r\n\r\n ReactDOM.render(, this.el);\r\n if (!this.isShowCard) {\r\n this.$el.hide();\r\n }\r\n return this;\r\n }\r\n\r\n toggleView() {\r\n this.isShowCard = !this.isShowCard;\r\n if (this.isShowCard) {\r\n this.$el.show();\r\n } else {\r\n this.$el.hide();\r\n }\r\n }\r\n\r\n remove() {\r\n ReactDOM.unmountComponentAtNode(this.el);\r\n return super.remove();\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const ProgressBar = ({\r\n percentValue, label, useLabelOnTheRight,\r\n}) => {\r\n const style = { width: `${percentValue}%` };\r\n let rightLabel = null;\r\n let progressbarLabel = null;\r\n if (useLabelOnTheRight) {\r\n rightLabel =
    {label}
    ;\r\n } else {\r\n progressbarLabel = label;\r\n }\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n {progressbarLabel}\r\n
    \r\n
    \r\n {rightLabel}\r\n
    \r\n );\r\n};\r\n\r\nProgressBar.propTypes = {\r\n percentValue: PropTypes.number.isRequired,\r\n label: PropTypes.string.isRequired,\r\n useLabelOnTheRight: PropTypes.bool,\r\n};\r\n\r\nProgressBar.defaultProps = {\r\n useLabelOnTheRight: false,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { TooltipHost, TooltipOverflowMode, DirectionalHint } from '@bingads-webui-react/fabric-control';\r\n\r\nimport { ProgressBar } from './progress-bar';\r\n\r\nconst COLOR_HIGHLIGHT_VNEXT = '#107C10';\r\n\r\nexport const ActionTable = ({\r\n headers, values, highlights, alignments, columnWidths,\r\n}) => {\r\n if (!headers || headers.length === 0\r\n || (values && values.length !== 0 && values[0].length !== headers.length)\r\n || (highlights && headers.length !== highlights.length)) {\r\n return null;\r\n }\r\n\r\n const columnCount = headers.length;\r\n const columnWidth = `${100 / columnCount}%`;\r\n\r\n const textAlignArr = _.map(headers, (header, headerIndex) => {\r\n if (alignments && alignments[headerIndex]) {\r\n return alignments[headerIndex];\r\n }\r\n if (headerIndex === 0) {\r\n return 'left';\r\n }\r\n return 'right';\r\n });\r\n\r\n const columnWidthArr = _.map(headers, (header, headerIndex) => {\r\n if (columnWidths && columnWidths[headerIndex]) {\r\n return columnWidths[headerIndex];\r\n }\r\n return columnWidth;\r\n });\r\n\r\n const headerRow = _.map(headers, (header, headerIndex) => {\r\n const style = {\r\n width: columnWidthArr[headerIndex],\r\n textAlign: textAlignArr[headerIndex],\r\n };\r\n return (\r\n \r\n {header}\r\n \r\n );\r\n });\r\n\r\n const arrowClass = 'iconba large iconba-Trending12';\r\n\r\n const dataSection = _.map(values, (row, rowIndex) => {\r\n const dataRow = _.map(row, (item, valueIndex) => {\r\n const style = {\r\n width: columnWidthArr[valueIndex],\r\n textAlign: textAlignArr[valueIndex],\r\n };\r\n if (highlights && highlights[valueIndex]) {\r\n style.color = COLOR_HIGHLIGHT_VNEXT;\r\n }\r\n let cell;\r\n if (item && item.useProgressBar) {\r\n cell = (\r\n );\r\n } else if (item && item.nullableArrow) {\r\n cell = _.isNull(item.value) ?\r\n () :\r\n item.value;\r\n } else if (item && item.enabledToolTip) {\r\n cell = (\r\n \r\n \r\n {item.value}\r\n \r\n \r\n );\r\n } else {\r\n cell = item;\r\n }\r\n return {cell};\r\n });\r\n\r\n return (\r\n \r\n {dataRow}\r\n \r\n );\r\n });\r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n {headerRow}\r\n \r\n \r\n \r\n {dataSection}\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nActionTable.propTypes = {\r\n headers: PropTypes.arrayOf(PropTypes.string),\r\n values: PropTypes.arrayOf(PropTypes.array),\r\n highlights: PropTypes.arrayOf(PropTypes.bool),\r\n alignments: PropTypes.arrayOf(PropTypes.string),\r\n columnWidths: PropTypes.arrayOf(PropTypes.array),\r\n};\r\n\r\nActionTable.defaultProps = {\r\n columnWidths: null,\r\n alignments: null,\r\n headers: undefined,\r\n values: undefined,\r\n highlights: undefined,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { BackboneInstanceWrapper } from '@bingads-webui-react/backbone-instance-wrapper';\r\nimport { MAP_HEIGHT } from '@bingads-webui-campaign/recommendation-core';\r\n\r\nexport class BingMapView extends React.PureComponent {\r\n static propTypes = {\r\n data: PropTypes.objectOf(PropTypes.any).isRequired,\r\n locationMap: PropTypes.func.isRequired,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n const MapView = props.locationMap;\r\n this.mapView = new MapView({\r\n disableInfoBoxGroupList: [],\r\n disableActionGroupList: ['recommended', 'included', 'excluded'],\r\n mapHeight: MAP_HEIGHT,\r\n });\r\n this.refreshData();\r\n }\r\n\r\n refreshData = () => {\r\n const {\r\n data,\r\n } = this.props;\r\n\r\n this.mapView.render();\r\n _.each(data.included, (includedPoint) => {\r\n this.mapView.addRadiusTargetToMap(includedPoint, 'included');\r\n });\r\n _.each(data.excluded, (excludedPoint) => {\r\n this.mapView.addRadiusTargetToMap(excludedPoint, 'excluded');\r\n });\r\n this.mapView.updateRecommendedLocations(data.recommended);\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n { }\r\n
    \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\n\r\nexport class ToolbarButton extends React.PureComponent {\r\n render() {\r\n return (\r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport {\r\n CHANNEL_TYPES,\r\n ADINSIGHT_LOG_ACTION_TYPE,\r\n DOWNLOAD_SCOPE,\r\n NOT_SUPPORT_DOWNLOAD_TYPES,\r\n} from '@bingads-webui-campaign/recommendation-core';\r\nimport { ToolbarButton } from './toolbar-button';\r\n\r\nexport class DownloadToolbarButton extends React.PureComponent {\r\n static propTypes = {\r\n channel: PropTypes.string,\r\n campaignType: PropTypes.number,\r\n className: PropTypes.string,\r\n downloadService: PropTypes.objectOf(PropTypes.any),\r\n filterService: PropTypes.objectOf(PropTypes.any),\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n type: PropTypes.string,\r\n data: PropTypes.objectOf(PropTypes.any),\r\n logOpportunityEvent: PropTypes.func,\r\n context: PropTypes.shape({\r\n Level: PropTypes.string.isRequired,\r\n }).isRequired,\r\n title: PropTypes.string,\r\n isOptimizationScoreOn: PropTypes.bool,\r\n };\r\n\r\n static defaultProps = {\r\n channel: null,\r\n campaignType: null,\r\n className: 'btn btn-secondary',\r\n downloadService: null,\r\n filterService: null,\r\n type: null,\r\n data: null,\r\n logOpportunityEvent: null,\r\n title: undefined,\r\n isOptimizationScoreOn: false,\r\n };\r\n\r\n handleDownloadAll = () => {\r\n const self = this;\r\n self.props.downloadService.download({\r\n channel: self.props.channel,\r\n campaignType: self.props.campaignType,\r\n filterService: self.props.filterService,\r\n recommendationType: self.props.type,\r\n }).then(() => {\r\n _.each(_.omit(self.props.data, NOT_SUPPORT_DOWNLOAD_TYPES), (data) => {\r\n self.props.logOpportunityEvent({\r\n type: data.type,\r\n action: ADINSIGHT_LOG_ACTION_TYPE.DOWNLOAD,\r\n context: _.extend({\r\n Version: data.version,\r\n DownloadScope: DOWNLOAD_SCOPE.ALL,\r\n }, self.props.context),\r\n });\r\n });\r\n });\r\n };\r\n\r\n render() {\r\n const {\r\n i18n, downloadService, channel, isOptimizationScoreOn,\r\n } = this.props;\r\n\r\n if (downloadService == null) {\r\n return null;\r\n }\r\n\r\n let text;\r\n if (channel === CHANNEL_TYPES.COMPETITION) {\r\n text = i18n.getString('Details_View_Download_All');\r\n } else {\r\n text = i18n.getString('Details_View_Download_All_Rec');\r\n }\r\n\r\n const buttonProps = _.pick(this.props, 'className', 'disabled', 'title');\r\n const buttonIconClassName = 'iconba iconba-Download';\r\n return (\r\n \r\n \r\n {!isOptimizationScoreOn && text}\r\n \r\n );\r\n }\r\n}\r\n","/* eslint jsx-a11y/anchor-is-valid: 0 */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { Carousel } from '@bingads-webui-react/primitive-unthemed';\r\n\r\n// Ad Preview\r\nexport class AdsPreview extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n index: 0,\r\n direction: null,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.setAutoRotate();\r\n }\r\n\r\n setAutoRotate = () => {\r\n // disable auto-rotate in test\r\n /* istanbul ignore if */\r\n if (window.e2eTestEnvironment) {\r\n return;\r\n }\r\n\r\n this.clearAutoRotateListener();\r\n const { index } = this.state;\r\n\r\n const indicators = document.querySelector('.new-preview-carousel-container .carousel-indicators');\r\n\r\n // make sure we have the correct preview to rotate\r\n const previewCount = (indicators && indicators.childElementCount) || this.props.values.length;\r\n let nextIndex = index + 1;\r\n\r\n if (nextIndex >= previewCount) {\r\n nextIndex = 0;\r\n }\r\n\r\n this.autoRotateListener = setTimeout(() => {\r\n this.setState({\r\n index: nextIndex,\r\n direction: 'next',\r\n });\r\n\r\n this.setAutoRotate();\r\n }, 3000);\r\n }\r\n\r\n clearAutoRotateListener = () => {\r\n if (this.autoRotateListener) {\r\n clearTimeout(this.autoRotateListener);\r\n this.autoRotateListener = null;\r\n }\r\n }\r\n\r\n handleSelect = (selectedIndex, e) => {\r\n this.setState({\r\n index: selectedIndex,\r\n direction: e.direction,\r\n }, () => this.clearAutoRotateListener());\r\n }\r\n\r\n getLandScapeImageMediaUrl = (imageUrl) => {\r\n let imageUrlToUse = imageUrl;\r\n const indexOfResizeInfo = imageUrlToUse.indexOf('&w=');\r\n if (indexOfResizeInfo > 0) {\r\n imageUrlToUse = imageUrlToUse.substr(0, indexOfResizeInfo);\r\n }\r\n\r\n const responsiveAdThumbnailWidth = 114;\r\n const responsiveAdThumbnailHeight = 60;\r\n const resizeQueryString = `&w=${responsiveAdThumbnailWidth}&h=${responsiveAdThumbnailHeight}`;\r\n\r\n return `${imageUrlToUse}${resizeQueryString}`;\r\n }\r\n\r\n render() {\r\n const { index, direction } = this.state;\r\n const {\r\n values,\r\n i18n,\r\n headers,\r\n newI18n,\r\n } = this.props;\r\n\r\n return (\r\n
    \r\n
    {_.first(headers)}
    \r\n \r\n {\r\n values.map(recommendation => (\r\n \r\n
    \r\n
    \r\n \r\n {recommendation.Images.length > 1 &&\r\n \r\n { `+ ${i18n.getString('Recommendation_Grid_Todo_More', { count: recommendation.Images.length - 1 })}` }\r\n \r\n }\r\n
    \r\n
    \r\n
    \r\n \r\n {_.result(_.first(recommendation.Headlines), 'Text')}\r\n \r\n {recommendation.Headlines.length > 1 &&\r\n \r\n { `+ ${i18n.getString('Recommendation_Grid_Todo_More', { count: recommendation.Headlines.length - 1 })}` }\r\n \r\n }\r\n
    \r\n
    \r\n \r\n {_.result(_.first(recommendation.Descriptions), 'Text')}\r\n \r\n {recommendation.Descriptions.length > 1 &&\r\n \r\n { `+ ${i18n.getString('Recommendation_Grid_Todo_More', { count: recommendation.Descriptions.length - 1 })}` }\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\nAdsPreview.propTypes = {\r\n headers: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n values: PropTypes.arrayOf(PropTypes.object).isRequired,\r\n i18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n newI18n: PropTypes.PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (blockChart, color, index, metric, metricValue, name, segment) {pug_html = pug_html + \"\\u003Cdiv class=\\\"chart-tooltip\\\"\\u003E\";\nif (segment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"segment-wrapper\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = segment) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (blockChart) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"tooltip-color-block\\\"\"+pug.attr(\"style\", pug.style('background-color: ' + color), true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"tooltip-color-line\\\"\"+pug.attr(\"style\", pug.style('background-color: ' + color), true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nif (blockChart) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"tooltip-name-container column\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"tooltip-legend\\\"\"+pug.attr(\"id\", 'legend' + index, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"tooltip-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"tooltip-name-container line\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"tooltip-legend\\\"\"+pug.attr(\"id\", 'legend' + index, true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"tooltip-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan class=\\\"metric-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = metric) ? \"\" : pug_interp)) + (pug.escape(null == (pug_interp = ': ') ? \"\" : pug_interp)) + \"\\u003Cb\\u003E\" + (pug.escape(null == (pug_interp = metricValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fb\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"blockChart\" in locals_for_with?locals_for_with.blockChart:typeof blockChart!==\"undefined\"?blockChart:undefined,\"color\" in locals_for_with?locals_for_with.color:typeof color!==\"undefined\"?color:undefined,\"index\" in locals_for_with?locals_for_with.index:typeof index!==\"undefined\"?index:undefined,\"metric\" in locals_for_with?locals_for_with.metric:typeof metric!==\"undefined\"?metric:undefined,\"metricValue\" in locals_for_with?locals_for_with.metricValue:typeof metricValue!==\"undefined\"?metricValue:undefined,\"name\" in locals_for_with?locals_for_with.name:typeof name!==\"undefined\"?name:undefined,\"segment\" in locals_for_with?locals_for_with.segment:typeof segment!==\"undefined\"?segment:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {if (value) {\npug_html = pug_html + \"\\u003Cspan class=\\\"performance-metrics-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.metricValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"performance-metrics-insight\\\"\\u003E\";\nif (value.hasInsight) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"iconba iconba-Insights clickable\\\"\"+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"data-item-index\", value.itemIndex, true, true)+pug.attr(\"data-metric-value\", value.metricValue, true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = '-') ? \"\" : pug_interp));\n}}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (fetchError, i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"tile-content\\\"\\u003E\\u003Cdiv class=\\\"domain-selector\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"graph\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (fetchError) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"error-msg\\\"\\u003E\" + (null == (pug_interp = i18n.getString('Dashboard_Cards_Data_Error')) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"fetchError\" in locals_for_with?locals_for_with.fetchError:typeof fetchError!==\"undefined\"?fetchError:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"domain-selector-header\\\"\\u003E\\u003Cstrong\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AuctionInsights_Domain_Selector_Header')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fstrong\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"dropdown selector-container\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default dropdown-toggle legacy-dropdown-toggle\\\" data-toggle=\\\"dropdown\\\" role=\\\"button\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\"\\u003E\\u003Cspan class=\\\"button-label truncated\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"icon-right glyphicon glyphicon-triangle-bottom\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fbutton\\u003E\\u003Cdiv class=\\\"dropdown-menu\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (budgetString) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = budgetString) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"budgetString\" in locals_for_with?locals_for_with.budgetString:typeof budgetString!==\"undefined\"?budgetString:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cspan\\u003E\\u003Cdiv class=\\\"status\\\" data-bind=\\\"text: adgroupDeliveryStatusTitle\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cspan data-bind=\\\"attr: { class: eligibleStatusIcon() ? 'statusEnabled_icon' : 'status_warning' }, visible: showStatusIcon\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Ch6 data-bind=\\\"text: adgroupDeliveryStatus\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (adgroupDeliveryStatus, adgroupDeliveryStatusTitle, eligibleStatusIcon, showStatusIcon) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\\u003Cspan class=\\\"status\\\"\\u003E\" + (pug.escape(null == (pug_interp = adgroupDeliveryStatusTitle) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif (showStatusIcon) {\nif (eligibleStatusIcon) {\npug_html = pug_html + \"\\u003Cspan class=\\\"status-icon iconba iconba-Completed\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan class=\\\"status-icon iconba iconba-Warning\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = adgroupDeliveryStatus) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"adgroupDeliveryStatus\" in locals_for_with?locals_for_with.adgroupDeliveryStatus:typeof adgroupDeliveryStatus!==\"undefined\"?adgroupDeliveryStatus:undefined,\"adgroupDeliveryStatusTitle\" in locals_for_with?locals_for_with.adgroupDeliveryStatusTitle:typeof adgroupDeliveryStatusTitle!==\"undefined\"?adgroupDeliveryStatusTitle:undefined,\"eligibleStatusIcon\" in locals_for_with?locals_for_with.eligibleStatusIcon:typeof eligibleStatusIcon!==\"undefined\"?eligibleStatusIcon:undefined,\"showStatusIcon\" in locals_for_with?locals_for_with.showStatusIcon:typeof showStatusIcon!==\"undefined\"?showStatusIcon:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cspan\\u003E\\u003Ch6 data-bind=\\\"text: reachSize\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (reachSize) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = reachSize) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"reachSize\" in locals_for_with?locals_for_with.reachSize:typeof reachSize!==\"undefined\"?reachSize:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cspan\\u003E\\u003Cdiv class=\\\"status\\\" data-bind=\\\"text: campaignDeliveryStatusTitle\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cspan data-bind=\\\"attr: { class: eligibleStatusIcon() ? 'statusEnabled_icon' : 'iconba iconba-Warning status_warning' }, visible: showStatusIcon\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Ch6 data-bind=\\\"text: campaignDeliveryStatus\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ch6 data-bind=\\\"text: campaignType\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003Ch6 data-bind=\\\"text: campaignBudget\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003Ch6 data-bind=\\\"text: campaignBiddingType\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (campaignBiddingType, campaignBudget, campaignDeliveryStatus, campaignDeliveryStatusTitle, campaignType, eligibleStatusIcon, showStatusIcon) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\\u003Cspan class=\\\"status\\\"\\u003E\" + (pug.escape(null == (pug_interp = campaignDeliveryStatusTitle) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif (showStatusIcon) {\nif (eligibleStatusIcon) {\npug_html = pug_html + \"\\u003Cspan class=\\\"status-icon iconba iconba-Completed\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan class=\\\"status-icon iconba iconba-Warning\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\n}\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = campaignDeliveryStatus) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = campaignType) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = campaignBudget) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = campaignBiddingType) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"campaignBiddingType\" in locals_for_with?locals_for_with.campaignBiddingType:typeof campaignBiddingType!==\"undefined\"?campaignBiddingType:undefined,\"campaignBudget\" in locals_for_with?locals_for_with.campaignBudget:typeof campaignBudget!==\"undefined\"?campaignBudget:undefined,\"campaignDeliveryStatus\" in locals_for_with?locals_for_with.campaignDeliveryStatus:typeof campaignDeliveryStatus!==\"undefined\"?campaignDeliveryStatus:undefined,\"campaignDeliveryStatusTitle\" in locals_for_with?locals_for_with.campaignDeliveryStatusTitle:typeof campaignDeliveryStatusTitle!==\"undefined\"?campaignDeliveryStatusTitle:undefined,\"campaignType\" in locals_for_with?locals_for_with.campaignType:typeof campaignType!==\"undefined\"?campaignType:undefined,\"eligibleStatusIcon\" in locals_for_with?locals_for_with.eligibleStatusIcon:typeof eligibleStatusIcon!==\"undefined\"?eligibleStatusIcon:undefined,\"showStatusIcon\" in locals_for_with?locals_for_with.showStatusIcon:typeof showStatusIcon!==\"undefined\"?showStatusIcon:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (campaigns, campaignsTitle) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv class=\\\"campaigns\\\"\\u003E\\u003Cdiv class=\\\"title\\\"\\u003E\" + (pug.escape(null == (pug_interp = campaignsTitle) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n// iterate campaigns\n;(function(){\n var $$obj = campaigns;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var val = $$obj[index];\nif (index < 5) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = val.CampaignName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (index === 5) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = '...') ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var val = $$obj[index];\nif (index < 5) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = val.CampaignName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (index === 5) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = '...') ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"campaigns\" in locals_for_with?locals_for_with.campaigns:typeof campaigns!==\"undefined\"?campaigns:undefined,\"campaignsTitle\" in locals_for_with?locals_for_with.campaignsTitle:typeof campaignsTitle!==\"undefined\"?campaignsTitle:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (accountName, ariaLabel, entityCampaignId, entityId, entityName, entityType, isExpandingView, opportunityId, pageUrls, status) {pug_html = pug_html + (\"\\u003Ca\" + (pug.attr(\"aria-label\", ariaLabel, true, true)) + \"\\u003E\\u003Cdiv class=\\\"contextual-inline\\\"\\u003E\\u003Cspan\" + (\" class=\\\"contextual-tooltip\\\"\"+pug.attr(\"data-entityid\", entityId, true, true)+pug.attr(\"data-type\", entityType, true, true)+pug.attr(\"data-opportunityid\", opportunityId, true, true)+pug.attr(\"data-status\", status, true, true)+pug.attr(\"data-entityCampaignId\", entityCampaignId, true, true)+pug.attr(\"data-accountName\", accountName, true, true)+pug.attr(\"data-pageUrls\", pageUrls, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = entityName) ? \"\" : pug_interp)));\nif (isExpandingView) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes(['expanding-contextual-attribute-'+opportunityId+'-'+entityId], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes(['contextual-attribute-'+opportunityId+'-'+entityId], [true]), false, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fa\\u003E\";}.call(this,\"accountName\" in locals_for_with?locals_for_with.accountName:typeof accountName!==\"undefined\"?accountName:undefined,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"entityCampaignId\" in locals_for_with?locals_for_with.entityCampaignId:typeof entityCampaignId!==\"undefined\"?entityCampaignId:undefined,\"entityId\" in locals_for_with?locals_for_with.entityId:typeof entityId!==\"undefined\"?entityId:undefined,\"entityName\" in locals_for_with?locals_for_with.entityName:typeof entityName!==\"undefined\"?entityName:undefined,\"entityType\" in locals_for_with?locals_for_with.entityType:typeof entityType!==\"undefined\"?entityType:undefined,\"isExpandingView\" in locals_for_with?locals_for_with.isExpandingView:typeof isExpandingView!==\"undefined\"?isExpandingView:undefined,\"opportunityId\" in locals_for_with?locals_for_with.opportunityId:typeof opportunityId!==\"undefined\"?opportunityId:undefined,\"pageUrls\" in locals_for_with?locals_for_with.pageUrls:typeof pageUrls!==\"undefined\"?pageUrls:undefined,\"status\" in locals_for_with?locals_for_with.status:typeof status!==\"undefined\"?status:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (message) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = message) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"message\" in locals_for_with?locals_for_with.message:typeof message!==\"undefined\"?message:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (Urls) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\";\n// iterate Urls\n;(function(){\n var $$obj = Urls;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var val = $$obj[index];\npug_html = pug_html + \"\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = \"URL \" + (index+1) + \":\") ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"urlContainer\\\"\\u003E\\u003Cspan class=\\\"url\\\"\\u003E\" + (pug.escape(null == (pug_interp = val) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var val = $$obj[index];\npug_html = pug_html + \"\\u003Clabel\\u003E\" + (pug.escape(null == (pug_interp = \"URL \" + (index+1) + \":\") ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"urlContainer\\\"\\u003E\\u003Cspan class=\\\"url\\\"\\u003E\" + (pug.escape(null == (pug_interp = val) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"Urls\" in locals_for_with?locals_for_with.Urls:typeof Urls!==\"undefined\"?Urls:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (goalType, goalTypeLabel, i18n, scopeName, trackingStatus) {var resxKey = 'UnifiedEventTracking_Goals_TrackingStatus_Enum_' + trackingStatus\nvar statusStr = i18n.getString(resxKey)\npug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\\u003Cspan class=\\\"labelItem\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString(\"UnifiedEventTracking_TrackingStatus\")+': ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif (trackingStatus === 'Unverified' || trackingStatus === 'NoRecentConversion' || trackingStatus === 'TagInactive' || trackingStatus === 'InactiveDueToTagUnavailable') {\npug_html = pug_html + \"\\u003Cspan style=\\\"color:#D90026;\\\"\\u003E\" + (pug.escape(null == (pug_interp = statusStr) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse\nif (trackingStatus === 'RecordingConversions') {\npug_html = pug_html + \"\\u003Cspan style=\\\"color:#5CB85C;\\\"\\u003E\" + (pug.escape(null == (pug_interp = statusStr) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cspan class=\\\"labelItem\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString(\"SharedLibrary_GridColumn_Scope\")+': ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = scopeName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Cspan class=\\\"labelItem\\\"\\u003E\" + (pug.escape(null == (pug_interp = goalTypeLabel+': ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = goalType) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"goalType\" in locals_for_with?locals_for_with.goalType:typeof goalType!==\"undefined\"?goalType:undefined,\"goalTypeLabel\" in locals_for_with?locals_for_with.goalTypeLabel:typeof goalTypeLabel!==\"undefined\"?goalTypeLabel:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"scopeName\" in locals_for_with?locals_for_with.scopeName:typeof scopeName!==\"undefined\"?scopeName:undefined,\"trackingStatus\" in locals_for_with?locals_for_with.trackingStatus:typeof trackingStatus!==\"undefined\"?trackingStatus:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (createdBy, importedCampaigns, limitedByBudgetCampaigns, status, when) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv class=\\\"importedTaskItem\\\"\\u003E\\u003Cdiv\\u003E\" + (null == (pug_interp = status) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"createdBy\\\"\\u003E\" + (null == (pug_interp = createdBy) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (null == (pug_interp = when) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (null == (pug_interp = importedCampaigns) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\" + (null == (pug_interp = limitedByBudgetCampaigns) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"createdBy\" in locals_for_with?locals_for_with.createdBy:typeof createdBy!==\"undefined\"?createdBy:undefined,\"importedCampaigns\" in locals_for_with?locals_for_with.importedCampaigns:typeof importedCampaigns!==\"undefined\"?importedCampaigns:undefined,\"limitedByBudgetCampaigns\" in locals_for_with?locals_for_with.limitedByBudgetCampaigns:typeof limitedByBudgetCampaigns!==\"undefined\"?limitedByBudgetCampaigns:undefined,\"status\" in locals_for_with?locals_for_with.status:typeof status!==\"undefined\"?status:undefined,\"when\" in locals_for_with?locals_for_with.when:typeof when!==\"undefined\"?when:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cspan\\u003E\\u003Ch6 data-bind=\\\"text: keywordQualityScore\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (keywordQualityScore) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = keywordQualityScore) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"keywordQualityScore\" in locals_for_with?locals_for_with.keywordQualityScore:typeof keywordQualityScore!==\"undefined\"?keywordQualityScore:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (displayPopupclarityEventGoalSettings) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\";\n// iterate displayPopupclarityEventGoalSettings\n;(function(){\n var $$obj = displayPopupclarityEventGoalSettings;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var val = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cdiv class=\\\"clarityEventGoalSettingsContainer\\\"\\u003E\\u003Cdiv class=\\\"clarityEventGoalSettings\\\"\\u003E\" + (null == (pug_interp = val.clarityEventGoalSetting) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"sourceURL\\\"\\u003E\" + (pug.escape(null == (pug_interp = val.sourceURL) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var val = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cdiv class=\\\"clarityEventGoalSettingsContainer\\\"\\u003E\\u003Cdiv class=\\\"clarityEventGoalSettings\\\"\\u003E\" + (null == (pug_interp = val.clarityEventGoalSetting) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"sourceURL\\\"\\u003E\" + (pug.escape(null == (pug_interp = val.sourceURL) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"displayPopupclarityEventGoalSettings\" in locals_for_with?locals_for_with.displayPopupclarityEventGoalSettings:typeof displayPopupclarityEventGoalSettings!==\"undefined\"?displayPopupclarityEventGoalSettings:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (displayPopupImageUrls, maxNumOfDisplayPopupImage, numOfImages, openEditPanel, viewMore) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\" + (\" class=\\\"moreImages\\\"\"+pug.attr(\"style\", pug.style({'min-height': `${75 * displayPopupImageUrls.length + (numOfImages > maxNumOfDisplayPopupImage ? 8 : 0)}px`}), true, true)) + \"\\u003E\";\n// iterate displayPopupImageUrls\n;(function(){\n var $$obj = displayPopupImageUrls;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var imageUrl = $$obj[index];\npug_html = pug_html + \"\\u003Cimg\" + (pug.attr(\"src\", imageUrl, true, true)+\" width=\\\"114\\\" height=\\\"60\\\"\") + \"\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var imageUrl = $$obj[index];\npug_html = pug_html + \"\\u003Cimg\" + (pug.attr(\"src\", imageUrl, true, true)+\" width=\\\"114\\\" height=\\\"60\\\"\") + \"\\u003E\";\n }\n }\n}).call(this);\n\nif (numOfImages > maxNumOfDisplayPopupImage) {\npug_html = pug_html + \"\\u003Cdiv\" + (\" class=\\\"viewMore\\\"\"+pug.attr(\"onclick\", openEditPanel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = viewMore) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"displayPopupImageUrls\" in locals_for_with?locals_for_with.displayPopupImageUrls:typeof displayPopupImageUrls!==\"undefined\"?displayPopupImageUrls:undefined,\"maxNumOfDisplayPopupImage\" in locals_for_with?locals_for_with.maxNumOfDisplayPopupImage:typeof maxNumOfDisplayPopupImage!==\"undefined\"?maxNumOfDisplayPopupImage:undefined,\"numOfImages\" in locals_for_with?locals_for_with.numOfImages:typeof numOfImages!==\"undefined\"?numOfImages:undefined,\"openEditPanel\" in locals_for_with?locals_for_with.openEditPanel:typeof openEditPanel!==\"undefined\"?openEditPanel:undefined,\"viewMore\" in locals_for_with?locals_for_with.viewMore:typeof viewMore!==\"undefined\"?viewMore:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cspan\\u003E\\u003Ch6 data-bind=\\\"text: negativeKeywordList\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (negativeKeywordList) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = negativeKeywordList) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"negativeKeywordList\" in locals_for_with?locals_for_with.negativeKeywordList:typeof negativeKeywordList!==\"undefined\"?negativeKeywordList:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cspan\\u003E\\u003Ch6 data-bind=\\\"text: campaignsCount\\\"\\u003E\\u003C\\u002Fh6\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (campaignsCount) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = campaignsCount) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"campaignsCount\" in locals_for_with?locals_for_with.campaignsCount:typeof campaignsCount!==\"undefined\"?campaignsCount:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (message) {pug_html = pug_html + \"\\u003Cdiv class=\\\"contextual-tooltip-container\\\"\\u003E\\u003Cdiv class=\\\"contextual-content\\\"\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = message) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"message\" in locals_for_with?locals_for_with.message:typeof message!==\"undefined\"?message:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"budget-landscape-dismiss-popup\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"recommendation-dismiss-feedback-popup\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"recommendation-apply-feedback-popup\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"recommendation-reject-feedback-popup\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, noData, noUET, uetLink) {pug_mixins[\"chart\"] = pug_interp = function(){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"column-chart-title\\\"\\u003E\\u003Cspan data-bind=\\\"text: chartTitle\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"column-chart-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003C!-- ko ifnot: conversionSelected--\\u003E\\u003Cdiv\\u003E\";\npug_mixins[\"chart\"]();\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if : conversionSelected--\\u003E\\u003Cdiv class=\\\"anchor\\\"\\u003E\";\nif (noUET || noData) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"column-chart-title\\\"\\u003E\\u003Cspan data-bind=\\\"text: chartTitle\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"no-conversion-chart\\\"\\u003E\\u003Cdiv\\u003E\\u003Cdiv class=\\\"chart-nodata-icon chart-nodata\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (noUET) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Cdiv class=\\\"description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BudgetLandscape_ConversionStatus_0_line1')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"description\\\"\\u003E\" + (null == (pug_interp = i18n.getString('BudgetLandscape_ConversionStatus_0_line2').replace('{0}', uetLink)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (noData) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"description\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BudgetLandscape_ConversionStatus_1')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_mixins[\"chart\"]();\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"noData\" in locals_for_with?locals_for_with.noData:typeof noData!==\"undefined\"?noData:undefined,\"noUET\" in locals_for_with?locals_for_with.noUET:typeof noUET!==\"undefined\"?noUET:undefined,\"uetLink\" in locals_for_with?locals_for_with.uetLink:typeof uetLink!==\"undefined\"?uetLink:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (budgetType, entityName, i18n, isSharedBudget) {pug_html = pug_html + \"\\u003Cdiv class=\\\"recommendation-inline-budget-view\\\"\\u003E\";\nif (isSharedBudget) {\npug_html = pug_html + \"\\u003Ch5 class=\\\"shared-budget-info\\\"\\u003E\" + (null == (pug_interp = i18n.getString('Details_View_Increase_Shared_Budget', { entity_name: entityName })) ? \"\" : pug_interp) + \"\\u003C\\u002Fh5\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ch5\\u003E\" + (null == (pug_interp = i18n.getString('Details_View_Increase_Budget', { entity_name: entityName })) ? \"\" : pug_interp) + \"\\u003C\\u002Fh5\\u003E\\u003Ch5\\u003E\\u003Cspan class=\\\"grid-disabled\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BudgetLandscape_CurrentBudgetType', { budget_type: i18n.getString(`BudgetType_${budgetType}`) })) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fh5\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"budget-landscape-container\\\"\\u003E\\u003Cdiv class=\\\"landscape-table\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"landscape-chart\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"budget-landscape-actions\\\"\\u003E\\u003Cdiv class=\\\"movable-margin\\\" data-bind=\\\"visible: !showErrorMessage() && !showTipMessage()\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cbutton class=\\\"btn btn-primary btn-hero apply\\\" data-bind=\\\"disable:readOnly || isCurrentDataRowSelected() || showErrorMessage()\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Apply')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default cancel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"budgetType\" in locals_for_with?locals_for_with.budgetType:typeof budgetType!==\"undefined\"?budgetType:undefined,\"entityName\" in locals_for_with?locals_for_with.entityName:typeof entityName!==\"undefined\"?entityName:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"isSharedBudget\" in locals_for_with?locals_for_with.isSharedBudget:typeof isSharedBudget!==\"undefined\"?isSharedBudget:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (currencySymbol, notAvailableStr, placeHolderText) {pug_html = pug_html + \"\\u003Ctable class=\\\"text-right vertical-align-middle\\\"\\u003E\\u003Cthead\\u003E\\u003Cth\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = '') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko foreach: localizedHeaders--\\u003E\\u003Cth data-bind=\\\"css: { "text-left": $index() === 0, "text-right": $index() > 0, "selected": $root.selectedColumnIndex() === $index()}\\\"\\u003E\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody\\u003E\\u003C!--ko foreach: landscapes--\\u003E\\u003Ctr data-bind=\\\"css:{"selected": $root.selectedRowIndex() === $index()}\\\"\\u003E\\u003Ctd\\u003E\\u003Cinput type=\\\"radio\\\" data-bind=\\\"value: $index, checked: $root.selectedRowIndex\\\"\\u003E\\u003C\\u002Ftd\\u003E\\u003C!--ko foreach: $root.headers--\\u003E\\u003Ctd data-bind=\\\"css: { "text-left": $index() === 0, "text-right": $index() > 0, "selected": $root.selectedColumnIndex() === $index()}\\\"\\u003E\\u003Cspan data-bind=\\\"text: $root.getTableCellText($parent, $data, $index())\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C!--ko if: $parent.isSuggested && $index() === 0--\\u003E\\u003Cspan class=\\\"tooltip-container\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003Ctr class=\\\"input-row\\\" data-bind=\\\"css:{"selected": inputRowSelected}\\\"\\u003E\\u003Ctd\\u003E\\u003Cinput type=\\\"radio\\\" data-bind=\\\"value: landscapes.length, checked: selectedRowIndex\\\"\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"text-left user-input-cell\\\"\\u003E\\u003Cdiv class=\\\"user-input\\\"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"currency-symbol\",`symbol-size-${currencySymbol.length}`], [false,true]), false, true)+\" data-bind=\\\"css: {error: showErrorMessage()}\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = currencySymbol) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cinput\" + (\" type=\\\"text\\\"\"+pug.attr(\"placeholder\", placeHolderText, true, true)+\" data-bind=\\\"value: userInputDisplayVal, hasFocus: inputRowSelected, valueUpdate: 'keyup', css: {error: showErrorMessage()}\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C!--ko foreach: localizedHeaders.slice(1)--\\u003E\\u003Ctd data-bind=\\\"css: { "selected": $root.selectedColumnIndex() === $index() + 1}\\\"\\u003E\\u003C!--ko if: $root.estimationKPIFormattedArray().length === 0--\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = notAvailableStr) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!-- ko if: $root.estimationKPIFormattedArray().length \\u003E 0--\\u003E\\u003Cspan data-bind=\\\"text: $root.estimationKPIFormattedArray()[$index()]\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003Cdiv class=\\\"error-message\\\" data-bind=\\\"visible: showErrorMessage()\\\"\\u003E\\u003Cspan class=\\\"error\\\" data-bind=\\\"text: errorMessage\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"tip-message\\\" data-bind=\\\"visible: showTipMessage()\\\"\\u003E\\u003Cspan class=\\\"status_warning status iconba iconba-Warning\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"grid-disabled\\\" data-bind=\\\"text: tipMessage\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"currencySymbol\" in locals_for_with?locals_for_with.currencySymbol:typeof currencySymbol!==\"undefined\"?currencySymbol:undefined,\"notAvailableStr\" in locals_for_with?locals_for_with.notAvailableStr:typeof notAvailableStr!==\"undefined\"?notAvailableStr:undefined,\"placeHolderText\" in locals_for_with?locals_for_with.placeHolderText:typeof placeHolderText!==\"undefined\"?placeHolderText:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (currencySymbol, currencySymbolClassName, notAvailableStr) {pug_html = pug_html + \"\\u003Ctable class=\\\"text-right vertical-align-middle\\\"\\u003E\\u003Cthead\\u003E\\u003Ctr\\u003E\\u003Cth\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = '') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko foreach: localizedHeaders--\\u003E\\u003Cth data-bind=\\\"css: { "text-left": $index() === 0, "text-right": $index() > 0}\\\"\\u003E\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody\\u003E\\u003C!--ko foreach: landscapes--\\u003E\\u003Ctr data-bind=\\\"visible: $root.currentRowIndex() !== $index(), css:{"selected": $root.selectedRowIndex() === $index()}\\\"\\u003E\\u003Ctd\\u003E\\u003Cinput type=\\\"radio\\\" data-bind=\\\"value: $index(), checked: $root.selectedRowIndex(), attr: {"aria-labelledby": "EstimatedBudget-" + $index(), "aria-describedby": "EstimatedClicks-" + $index()}\\\"\\u003E\\u003C\\u002Ftd\\u003E\\u003C!--ko foreach: $root.headers--\\u003E\\u003Ctd data-bind=\\\"css: { "text-left": $index() === 0, "text-right": $index() > 0}\\\"\\u003E\\u003Cspan data-bind=\\\"text: $root.getTableCellText($parent, $data, $index()), attr: {"id": $root.getTabelCellId($data, $index(), $parentContext.$index())}\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Ftd\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003Ctr class=\\\"input-row\\\" data-bind=\\\"css:{"selected": inputRowSelected()}\\\"\\u003E\\u003Ctd\\u003E\\u003Cinput type=\\\"radio\\\" data-bind=\\\"value: landscapes.length, checked: selectedRowIndex(), attr: {"aria-label": $root.getCustomInputBudgetAriaLabel()}\\\"\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"text-left user-input-cell\\\"\\u003E\\u003Cdiv class=\\\"user-input\\\"\\u003E\\u003Cspan\" + (pug.attr(\"class\", pug.classes([\"currency-symbol\",currencySymbolClassName], [false,true]), false, true)+\" data-bind=\\\"css: {error: showErrorMessage()}\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = currencySymbol) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cinput type=\\\"text\\\" data-bind=\\\"value: userInputDisplayVal, hasFocus: inputRowSelected(), valueUpdate: "keyup", css: {error: showErrorMessage()}, attr: {"aria-label": userInputDisplayVal}\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C!--ko foreach: localizedHeaders.slice(1)--\\u003E\\u003Ctd\\u003E\\u003C!--ko if: $root.estimationKPIFormattedArray().length === 0--\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = notAvailableStr) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!-- ko if: $root.estimationKPIFormattedArray().length \\u003E 0--\\u003E\\u003Cspan data-bind=\\\"text: $root.estimationKPIFormattedArray()[$index()]\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003Cdiv class=\\\"error-message\\\" data-bind=\\\"visible: showErrorMessage()\\\"\\u003E\\u003Cspan class=\\\"error\\\" data-bind=\\\"text: errorMessage\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"tip-message\\\" data-bind=\\\"visible: showTipMessage()\\\"\\u003E\\u003Cspan class=\\\"status-icon iconba iconba-Warning\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"grid-disabled\\\" data-bind=\\\"text: tipMessage\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"currencySymbol\" in locals_for_with?locals_for_with.currencySymbol:typeof currencySymbol!==\"undefined\"?currencySymbol:undefined,\"currencySymbolClassName\" in locals_for_with?locals_for_with.currencySymbolClassName:typeof currencySymbolClassName!==\"undefined\"?currencySymbolClassName:undefined,\"notAvailableStr\" in locals_for_with?locals_for_with.notAvailableStr:typeof notAvailableStr!==\"undefined\"?notAvailableStr:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (name, primaryMetricName, primaryMetricValue, showPrimaryMetric, value) {if (showPrimaryMetric) {\npug_html = pug_html + \"\\u003Cp\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = primaryMetricName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ': ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = primaryMetricValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fp\\u003E\\u003Cbr\\u003E\";\n}\npug_html = pug_html + \"\\u003Cp\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ': ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fp\\u003E\";}.call(this,\"name\" in locals_for_with?locals_for_with.name:typeof name!==\"undefined\"?name:undefined,\"primaryMetricName\" in locals_for_with?locals_for_with.primaryMetricName:typeof primaryMetricName!==\"undefined\"?primaryMetricName:undefined,\"primaryMetricValue\" in locals_for_with?locals_for_with.primaryMetricValue:typeof primaryMetricValue!==\"undefined\"?primaryMetricValue:undefined,\"showPrimaryMetric\" in locals_for_with?locals_for_with.showPrimaryMetric:typeof showPrimaryMetric!==\"undefined\"?showPrimaryMetric:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Ca class=\\\"uet-link\\\" href=\\\"javascript:void(0);\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BudgetLandscape_ConversionStatus_0_linkText')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;"],"names":["METRICS","ImpressionShare","OverlapRate","AveragePosition","AboveRate","TopOfPageRate","AbsoluteTopOfPageRate","OutrankingShare","ConversionRate","SearchTerms","CHART_TYPES","None","RecommendationCard","SmallTile","LargeTile","Primary","Secondary","DEVICE_TYPE","PC","SmartPhone","Tablet","NUMBER_TYPES","METRICS_TYPES","_defineProperty","AuctionInsightMetrics","AuctionInsightMetricsForShopping","isMetricPercentage","metric","formatMetric","i18n","value","options","arguments","length","undefined","digits","maximumFractionDigits","minimumFractionDigits","formatPercent","formatDecimal","formatDecimalToFixed","localizeMetric","getString","concat","getLocalizedMetrics","IsAvgPositionDeprecationPhase2Enabled","metrics","_","id","localizeTitle","CHART_TYPE","VNextColors","VNextRecommendationCardColors","getChartType","primarySegmentType","segmentationType","showXLabels","setSeriesVNextMarker","chartOptions","subType","vNextMarkerSymbols","series","sery","index","marker","symbol","enabled","lineWidth","radius","getYAxis","title","text","style","color","fontFamily","fontWeight","fontSize","labels","formatter","this","min","ceiling","minTickInterval","tickPixelInterval","gridLineDashStyle","visible","showFirstLabel","showLastLabel","recommendationCardChartOptions","config","data","merge","chart","height","marginLeft","yAxis","plotOptions","line","xAxis","tickLength","tickInterval","gridLineWidth","formatDate","Date","skeleton","timeZone","linkedTo","opposite","type","names","tickPositions","val","weeklyDataChartOptions","conversionSeries","marginRight","column","maxPointWidth","name","pointWidth","lineColumnChartOptions","marginTop","legend","x","y","layout","align","verticalAlign","itemStyle","width","columnBottomChartOptions","tileChartOptionsVNext","isForRecommendationCard","marginBottom","colors","tooltip","backgroundColor","borderWidth","shadow","outside","positioner","labelWidth","labelHeight","point","Math","max","plotX","plotWidth","plotY","plotHeight","getChartOptions","_ref3","secondarySegment","_ref","localizeCategory","useHTML","_ref2","blockChart","segment","key","fullName","metricValue","tooltipTemplateVNext","spacingTop","spacingLeft","spacingRight","spacingBottom","credits","textOverflow","overflow","squareSymbol","symbolRadius","symbolHeight","symbolWidth","lineColor","plotBands","connectNulls","zoneAxis","pointPlacement","defaultChartOptions","localizeSegmentationValue","margin","floating","secondaryChartOptions","getSeriesWithSecondMetric","items","categories","secondaryMetric","patchedData","item","primarySegment","segmentData","patchMissingData","i","mapSeries","include","domains","split","count","compact","size","competitor1","competitor2","competitor3","competitors","join","formatName","zones","memo","num","prev","push","dashStyle","generateZones","zIndex","withSecondMetric","AdvisorChartView","_React$Component","props","_this","_classCallCheck","_callSuper","onLabelClick","setState","labelsVisibilityUpdated","state","onLabelKeyDown","event","keyCode","Enter","Space","_inherits","_createClass","_this2","label","_jsx","children","className","onClick","onKeyDown","tabIndex","role","element","paddingLeft","paddingRight","textAlign","selectedMetric","enableLegend","_jsxs","HighchartReactWrapper","onChartRenderedCallback","renderRow","float","buildVNextLegendLabels","React","defaultProps","AdvisorChart","WrappedComponent","HoC","_objectSpread","hour","pluck","flatten","union","sortBy","parseDate","raw","displayName","getDisplayName","hoistNonReactStatics","WithCategories","WithSeriesData","isYou","DisplayDomain","filterItems","domainFilter","you","topItems","extractDataForMetric","secondarySegmentType","shouldHideYou","PerformanceMetrics","Key","primary","SegmentationType","StringValue","secondary","Data","extractSegmentDataForMetric","SegmentedData","AdvisorChartWithMetrics","_React$PureComponent","deviceTypeList","primaryDeviceType","keys","getDeviceTypeList","_extractDataForMetric","showDeviceTypeDropdown","chartType","EmptyChart","dangerouslySetInnerHTML","__html","DisplayDomainColumn","_CampaignuiBaseColumn","_ref$title","finalTitle","property","sortable","helpId","helpAriaLabel","CampaignuiBaseColumn","StoreDisplayNameColumn","_DisplayDomainColumn","ImpressionShareColumn","_CampaignuiBaseColumn2","format","_ref4","ImpressionShareWithInsightColumn","_CampaignuiBaseColumn3","_ref5","result","hasInsight","HasInsight","itemIndex","ItemIndex","get","columnWithInsightTemplate","AveragePositionColumn","_CampaignuiBaseColumn4","_ref6","OverlapRateColumn","_CampaignuiBaseColumn5","_ref7","_this3","_ref8","_ref9","AboveRateColumn","_CampaignuiBaseColumn6","_ref10","_this4","_ref11","_ref12","TopOfPageRateColumn","_CampaignuiBaseColumn7","_ref13","_this5","_ref14","AbsoluteTopOfPageRateColumn","_CampaignuiBaseColumn8","_ref15","_this6","_ref16","OutrankingShareColumn","_CampaignuiBaseColumn9","_ref17","_this7","_ref18","_ref19","AUCTION_INSIGHT_COLUMN_METRICS","DEVICE_SEGMENT_TYPES","Computer","MAX_NUMBER_OF_ACCOUNT","MAX_ACCOUNTS_LIMIT_MT","TOO_MUCH_DATA_TO_DOWNLOAD_ERROR","date","kendo","formatHeaderDate","formatCellDate","headerMap","DayOfWeek","HourOfDay","DisplayDomainShopping","parseFloat","toFixed","localizeHeader","header","processDataIntoArrays","segmentType","selectedColumns","campaignType","csvArray","columns","headers","Promise","localizeHeaders","then","localizedColumns","formattedData","JSON","parse","stringify","competitor","SegMetric","formatData","displayDomain","category","row","clientSideDownload","gridView","scope","showAlertHandler","message","level","dismissible","grid","dataSource","query","SegmentationTypes","queryTransform","finalParams","queryParams","finalParameters","handleCustomSegmentation","getPromise","dateRange","StartDate","start","EndDate","end","filename","accountId","csvString","rowString","data2Csv","downloadify","convertToLowerCase","toLowerCase","filterData","queries","domainVal","rowData","columnName","operator","columnData","Error","valSl","columnDataSl","indexOf","substr","handleQuery","entitySchema","properties","filterable","nullable","isPercentValue","required","processCampaignFilterValues","filterValues","filterValue","parseInt","parseSync","Id","processAdGroupFilterValues","processedValues","parsedFilter","filterCampaignId","CampaignId","scopeCampaignId","campaignId","getFilteredEntities","where","filteredAccount","levelAtInRequest","levelAt","entityIdsInRequest","entityIds","filteredCampaign","filteredAdGroup","filteredKeyword","$and","expression","AdGroup","levelAtConstant","CAMPAIGN","$contains","splice","Campaign","ACCOUNT","Account","CUSTOMER","Keyword","ADGROUP","KEYWORD","AccountIds","LevelAt","EntityIds","getFilteredEntitiesAndUpdateOptions","op","filteredEntities","handleUnauthorizedResponse","err","status","Router","navigate","convertDateStr","datetimeStr","seperator","arr","unshift","pop","normalize","isCustomerLevel","Entries","entry","UsedImpressions","UnderPerformingAccountIds","LocalizedDisplayDomain","AggregatedKpi","SegmentedKpi","seg","Segments","segmentValue","rawSegmentType","Day","Week","Month","Quarter","Year","normalizeSegment","SegmentBy","totalCount","formatUrl","url","replace","customerId","AuctionInsightService","odataPath","currentScenario","currentActivity","cache","accountsInfo","trace","error","cacheUsedImpressions","rawData","afterFindAll","option","generateRequestOption","request","CAMPAIGN_TYPES","Shopping","findAllActivity","cacheKey","useCache","resolve","reject","$","findAll","create","stop","underPerformingAccountIds","getDataByOp","errorDetails","stringifySync","segmentTypes","contentType","authorization","token","formattedSegmentTypes","startDate","endDate","CardDataEnabled","today","lastNDate","isCardDataEnabled","CampaignType","orderBy","field","direction","ret","reverse","sort","filter","queriesBeforeExtract","extractFilter","q","round","MAX_SELECTION_COUNT","parseIds","ids","parsedIdMap","parsedId","parsedIds","SelectorDataSource","dataContextManager","cacheService","selectorLoadAction","entitySet","encodeData","viewFilter","searchFilter","params","limit","itemsDisplayLimit","select","nameFilter","Name","cachedData","_parseIds","endQueries","$or","$eq","getContext","pseudoRequest","success","skipRequest","cacheResponse","bypassCache","load","newData","missingIds","missingId","entity","encodedData","formatKeywordName","keywordName","KeywordDataSource","selectorDataSource","campaignNameToUse","CampaignName","campaignIdToUse","adGroupNameToUse","AdGroupName","adGroupIdToUse","AdGroupId","getByIds","formatAdGroupName","adgroupName","campaignName","getEncodeDataFunction","currentCampaignName","currentCampaignId","AdGroupDataSource","jsdata","CampaignDataSource","existingCampaignFilter","stubDataSource","selectorStyleOptions","list","nameColumn","selectorKeyMapFunc","Selector_Filter_Selected","unused","Selector_Filter_All","handleFilterChange","stats","selector","missingDataHandler","checked","predicate","checkMap","Selector","ViewFilter","selected","setData","handleFilterChangeForCampaign","missingData","handleFilterChangeForAdGroup","handleFilterChangeForKeyword","parsed","getSelectorOptions","selectorOptions","disableSearch","showSelected","showChanged","keyMap","styles","allowCheckAll","showNoDataMessage","generateSchemaForCampaignProperty","_ref9$dataService","dataService","_ref9$entitySet","operatorDisplayNameMap","containsany","operators","addtionalParams","maxCount","generateSchemaForAdGroupProperty","_ref10$dataService","_ref10$entitySet","_ref10$currentCampaig","_ref10$currentCampaig2","_ref10$isInAccountSco","isInAccountScope","generateSchemaForKeywordProperty","_ref11$dataService","_ref11$entitySet","createSchemaProcessorForCurrentScope","customizedSchemaForProcessor","generateSchemaForAccountProperty","updateEntitySchemaForCustomerScope","edmCampaign","customizedGenerateSchemaForAdGroupProperty","customizedGenerateSchemaForCampaignProperty","ops","generateCampaignProperty","generateAdGroupProperty","currentAccount","Campaigns","updateEntitySchemaForAccountScope","currentCampaign","AdGroups","updateEntitySchemaForCampaignScope","updateEntitySchemaForAdGroupScope","getCampaignAdgroupSelectorFilterConfig","_ref$scope","featureName","sessionStore","preferenceStoreFactory","preferenceService","schemaI18n","SchemaI18n","schemaProcessor","cloneDeep","shortDateFormat","odata","ignoreCase","custom","maxSavedFilterLimit","storageFactory","FilterStorageFactory","parseIdAsInt","getLegacySaved","editor","isComparingEnabled","EXCEED_SAVE_LIMIT","CampaignAdgroupSelectorFilterAgent","_len","args","Array","_key","showFilterBar","showFilterEditor","showToolBar","filterBar","filterEditor","onFilterMaxReached","onFilterOperationFailed","errorData","_this$props$filterCon","filterConfig","alertHelper","AlertHelper","errMsg","showAlert","showUnknownError","initializeFilterAgent","prevProps","filterService","upperToolBar","_this$props","filterAgent","FilterAgent","toolbarView","view","rendered","on","getFilterBar","filterBarAgent","deterministicView","trigger","getFilterEditor","onFilterUIChanged","onFilterStateChanged","BackboneInstanceWrapper","instance","managed","EmptyFilterView","imagePath","bulbIconSrc","src","alt","LearnMoreLink","topic","linkText","GENERAL_INSIGHTS_PREFERENCES","FEATURE_NAME_GENERAL_INSIGHTS","FEATURE_NAME_GENERAL_INSIGHTS_SHOPPING","Search","CAMPAIGN_TYPES_ENUM_VALUE","METRIC_PREFERENCE_KEY_NAME","GENERAL_INSIGHTS_FEATURE_NAMES","getGeneralInsightsPreferences","preferencesService","sessionData","findByNameAtUserLevel","saveGeneralInsightsPreferences","setAtUserLevel","PILL_CONTROL","summary","overtime","GENERAL_INSIGHTS_DATA_TYPES","Grid","Chart","Tile","instrumentationSchema","scenario","setting","activity","getPreference","savePreference","getPillControlTypeFromPreferences","pillControlType","getGridNameWithPillControlType","getSegmentationData","appState","segType","getSegType","isTimeRangeValid","setSegmentationData","gridName","setSegType","fetchPreferenceForGeneralInsights","getSegPreference","fetchSortInfo","finalCampaignType","initialize","selectShoppingCampaignType","sortableHeader","PillControlType","gridConfig","supportedTimeSegments","GeneralInsightsSegmentationDecorator","alwaysAddSegment","newSegment","getDefaultTimeSegment","newQuery","queryDateRange","dateSegmentations","dateSegmentation","addSegmentToQuery","processFilterIds","DisplayDomainDataSource","auctionInsightService","getNormalizedData","displayDomains","domain","handleFilterChangeForDisplayDomain","getFilterConfig","permissions","schemaForFilter","IsAvgPositionDeprecationPhase1Enabled","updateDisplayDomainSchema","pkg","globalContext","define","require","CompetitionTile","_this$props$chartData","chartData","SELECTOR_CHECK_STATES","DomainSelectorView","_BaseView","_ref$allowCheckAll","_ref$itemsDisplayLimi","_ref$itemsCheckedLimi","itemsCheckedLimit","previouslyCheckedIds","without","renderSelector","$el","html","domainSelectorTemplate","updateButton","removeSelector","prop","searchIcon","searchBoxAriaLabel","listAttributes","checkboxColumn","checkboxAttributes","tabindex","busyIndicator","map","hasSelectionChanged","checkedIds","uncheckDomainsIfCheckedLimitExceeded","domainNames","FocusLockSelector","focusLockInstanceDecorator","render","focusFirstItemOnMount","focusLockSelectorView","el","prepend","domainSelectorHeaderTemplate","numItemsToUncheck","itemsToUncheck","itemsToKeepChecked","_this$previouslyCheck","newlyCheckedIds","apply","_toConsumableArray","setCheckMap","_superPropGet","remove","BaseView","instrumentation","requireDefault","appConfig","dateUtil","getFilters","_globalContext$requir2","CompetitionTileView","metricPreferenceKeyName","fetchPreferenceToken","preexecuteFlag","createAsyncToken","onSuccess","preferences","availableMetrics","initializeInstrumentation","getAuctionInsightDataService","chartDataSource","getDataSource","refreshDataAsync","setChild","addScenario","loadGeneralInsights","FilterService","setEditableFilter","$in","refreshChartActivity","refreshChart","fetchError","refreshDataToken","updateState","clearCache","onError","onCancel","isShoppingCampaignTypeSet","competitionTileTemplate","getChild","updateChart","updateDomainSelector","_ref$metric","_ref$chartData","_ref$domains","_ref$chartType","updateData","ReactDOM","cancel","RecommendationAutpApplyBanner","getAutoApplyString","applyDateStr","autoApplyPitching","newI18n","applyDate","recommendationsCount","optInStatus","isAutoApplyRecommendationEnabled","formatDateWithAccountTimeZone","toString","_TL_","recommendationName","AUTO_APPLY_TYPES_NAMES","_this$props2","substring","accountTimeZone","toIANATimeZone","fromLegacyTimeZone","_this$props3","isFromSummary","initializeMiniGrid","_this$props4","campaignAutoApplyStatus","classes","callback","viewSettings","autoApplyString","classNames","recommendationAutoApplyBanner","SUPPORT_ADINSIGHT_AUTO_APPLY_TYPES","StyledRecommendationAutpApplyBanner","withDefaultStyles","_ref$palette","palette","display","alignItems","background","themePrimary","ViewModel","campaignDeliveryStatusTitle","ko","campaignDeliveryStatus","campaignBudget","campaignBiddingType","eligibleStatusIcon","showStatusIcon","CONTEXTUAL_DELIVERY_STATUS","formatCost","currency","setPosition","css","CheckDocBottomMargin","CampaignContextualAttributeView","_Backbone$View","deps","targetId","viewModel","template","container","response","updateAttribute","DeliveryStatus","Budget","Amount","BiddingScheme","Type","finally","withUiBlock","Backbone","campaignsCount","formatInteger","SharedBudgetContextualAttributeView","sharedBudgetId","AssociationCount","adgroupDeliveryStatusTitle","adgroupDeliveryStatus","AdGroupContextualAttributeView","adgroupId","keywordQualityScore","KeywordContextualAttributeView","keywordId","QualityScore","OverallQualityScore","reachSize","AudienceContextualAttributeView","audienceId","Audience","find","Reach","negativeKeywordList","NegativeKeywordListContextualAttributeView","CampaignContextualAttributeViewVNext","isMCC","recommendationService","showDeliveryStatusPopup","recommendationAccountId","currentCustomer","Accounts","$withKey","Number","deliveryStatus","budget","biddingType","outerHTML","SharedBudgetContextualAttributeViewVNext","Budgets","AdGroupContextualAttributeViewVNext","KeywordContextualAttributeViewVNext","Keywords","qualityScore","AudienceContextualAttributeViewVNext","Audiences","NegativeKeywordListContextualAttributeViewVNext","GoalContextualAttributeView","accountName","s$i18n","goalId","cid","advertiserCustomerId","aid","scopeName","trackingStatus","TrackingStatus","isAccountLevel","IsAccountLevel","goalType","acctname","goalTypeLabel","AccountContextualAttributeView","dailyBudget","DailyBudget","budgetString","CurrentSettingContextualAttributeView","SuggestedSettingContextualAttributeView","GeneratedFromContextualAttributeView","pageUrls","Urls","MoreImagesContextualAttributeView","images","imagesWithoutFirstImage","slice","displayPopupImageUrls","image","AssetIdString","ThumbnailURL","imageUrlToUse","ImageURL","indexOfResizeInfo","resizeQueryString","window","openEditPanel","numOfImages","maxNumOfDisplayPopupImage","viewMore","numOfRemaininfImage","MoreConversionClarityButtonsContextualAttributeView","conversionClarityButtons","conversionClarityButtonsWithoutFirst","displayPopupclarityEventGoalSettings","conversionClarityButton","SourceURL","Text","buttonTextElement","clarityEventGoalSetting","sourceURL","ImportTaskItemContextualAttributeView","taskItemId","budgetAdjustmentOption","TaskItem","$filter","importScheduleConstants","FILTER_ALL_BUT_DELETED","taskItem","State","creator","ModifiedBy","dateTime","ModifiedAt","time","createdBy","when","importFreqColDataToTemplate","importedCampaigns","AdWordsImportContext","CampaignIds","limitedByBudgetCampaigns","BudgetConstrainedCampaignsCount","CampaignsContextualAttributeView","campaignsTitle","campaigns","BudgetAdjustmentOptionConstrainedCampaigns","withContextualAttributeTemplate","opportunityId","entityName","entityId","entityType","entityCampaignId","isExpandingView","_ref$ariaLabel","ariaLabel","e","self","contextualAttributeViewTemplate","DeliveryStatusPopupFactory","showRejectionPopup","getCustomTemplate","isContextualAttributeForRecommendation","popoverId","showContextualAttribute","_elMapper","_contextualAttributeM","_ref2$isMCC","_ref2$isExpanding","isExpanding","target","elMapper","RECOMMENDATION_TYPES","REPAIR_ADS","REPAIR_KEYWORD","CALLOUT","SITE_LINK","BUDGET_OPPORTUNITY","ADJUST_SHARED_BUDGET_OPPORTUNITY","RESPONSIVE_SEARCH_ADS","MULTIMEDIA_ADS","REALLOCATE_BUDGET","DYNAMIC_SEARCH_ADS","SETUP_CONVERSION_TRACKING_OPPORTUNITY","FIX_CONVERSION_GOAL_SETTINGS","contextualAttributeMapper","CONTEXTUAL_ENTITY_TYPE","AUDIENCE","NEGATIVE_KEYWORD_LIST","SHARED_BUDGET","GOAL","CURRENT_SETTING","SUGGESTED_SETTING","GENERATED_FROM","MORE_IMAGES","MORE_CONVERSION_CLARITY_BUTTONS","IMPORTED_TASK_ITEM","CAMPAIGNS","contextual","parents","attr","recommendation","itemWithKey","Target","AccountId","Opportunities","show","hideContextualAttribute","relatedTarget","closest","prependAccountAttribute","originEntity","accountEntity","ESTIMATE_TYPES","IMPRESSION_SHARE","IMPRESSIONS","QUERY_VOLUME","COST","CLICKS","CTR","CONVERSIONS","WEEKLY_SEARCHES","REJECTED_ADS","REJECTED_KEYWORDS","MISSING_CONVERSIONS","TARGETED_PRODUCTS","NO_SYMBOL_ESTIMATE_TYPES","SUMMARY_CARD","RECOMMENDATIOIN_SUMMARY_APPLY_FAILED_RESULTS","BUDGET","COMPETITIVE_BID","DEVICE_BID_BOOST","LOCATION_BID_BOOST","NEW_KEYWORD","BROAD_MATCH_KEYWORD","GOOGLE_IMPORT","GOOGLE_IMPORT_SCHEDULED","NEW_KEYWORD_OPPORTUNITY","TRENDING_QUERY","REMOVE_CONFLICTING_NEGATIVE_KEYWORD","FIX_AD_TEXT","FIX_AD_DESTINATION","FIX_CONVERSION_TRACKING_OPPORTUNITY","CREATE_CONVERSION_GOAL","FACEBOOK_IMPORT","IMAGE_EXTENSION","REPAIR_MISSING_KEYWORD_PARAMS","FIX_NO_IMPRESSION_BID","IMPROVE_RESPONSIVE_SEARCH_ADS","REPAIR_UNTARGETED_OFFER","IMPROVE_MULTIMEDIA_ADS","SSC_2_PMAX_MIGRATION","PMAX_IMPORT","DSA_2_PMAX_MIGRATION","SYNDICATION_GAP","BUDGET_OPPORTUNITY_TYPES","RECOMMENDATION_IDS","_RECOMMENDATION_IDS","NEW_LOCATION","SYNDICATION","ESTIMATE_STRINGS","_ESTIMATE_STRINGS","SUMMARY_LEVELS","VISUAL_TYPES","SEARCH_TERMS_CHART","COLUMN_CHART","LINE_CHART","LINE_WEEKLY_CHART","LINE_COLUMN_CHART","TABLE","MAP","ADS_PREVIEW","VISUAL_TABLE_ENABLED_SCOPES","CHANNEL_TYPES","COMPETITION","RECOMMENDATION","INCONTEXT","INCONTEXTCARD","OVERVIEW","MCCRECOMMENDATION","MCCOVERVIEW","AUTO_APPLY_REC_SETTING","CAMPAIGN_SUMMARY_BAR","SEARCHINSIGHT","RECOMMENDATIONS","CHANNEL_ALL_RECOMMENDATIONS","NOT_SUPPORT_DOWNLOAD_TYPES","NOT_SUPPORT_DISMISS_TYPES","APPLY_ODATA_TYPES","APPLY_ODATA_TYPES_MAP","ALL","MCC","SINGLE_ACCOUNT","SINGLE_ACCOUNT_ASYNC","OPTIMIZATION_SCORE","BULK","APPLY_USERINPUT_TYPES","_APPLY_USERINPUT_TYPE","APPLY_ACTION_TYPES","ACCEPT","DISMISS","REJECT","REDISMISS","UNDISMISS","SETTING_OPTIONS","UPDATE_FROM_CAMPAIGN","REJECTION_DATE_LAST_NINETY_DAYS","NONE","COMPETITION_RECOMMENDATION_FEATURE_NAME","COMPETITION_RECOMMENDATION_PREFERENCES","COMPETITION_RECOMMENDATION_PAGE_SIZES","RECOMMENDATION_PAGE_SIZES","RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES","RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES_TEN","RECOMMENDATION_IMAGE_EXTENSION_PAGE_SIZES_TWENTY","COMPETITION_DEFAULT_PAGE_SIZE","APPLY_SETTINGS","MAX_NUMBER_OF_RECOMMENDATION_SAMPLES","MATCH_TYPE_IDS","EXACT","PHRASE","BROAD","MATCH_TYPE","MAP_HEIGHT","ADINSIGHT_LOG_API_NAME","ADINSIGHT_LOG_ACTION_TYPE","VIEW","VIEWEDIT","CUSTOM","CLICK_CATEGORY","CLICK_RECS","CLICK_APPLYALL","IMPRESSION","FEEDBACK","DOWNLOAD","HIDE","VIEW_EXTERNAL","CLICK_DISMISSALL","REDIRECT","SUMMARY_APPLY_ALL_ENABLED","_SUMMARY_APPLY_ALL_EN","IMPORTCENTER_RECOMMENDATION_TYPES","RECOMMENDATION_CATEGORIES","REPAIRS","BIDS","KEYWORDS","ADS","DISMISSED","RECOMMENDATION_CATEGORIES_IDS","RECOMMENDATION_CATEGORIES_WORDING","NOT_AVAILABLE_DEFAULT_STR","CONVERSION_STATUS_TYPE","NO_UET","NO_DATA","HAS_DATA","RECOMMENDATION_DISMISS_FEEDBACK_TYPE","_RECOMMENDATION_DISMI","RECOMMENDATION_NOTIFICATION_ERRORCODE","Recommendation_Error_53505","hasLearnMore","Recommendation_Error_53504","Recommendation_Error_53521","Recommendation_Error_53517","Recommendation_Error_53508","Recommendation_Error_53507","Recommendation_Error_52505","Recommendation_Error_52511","Recommendation_Error_52512","Recommendation_Error_51501","Recommendation_Error_93001","Recommendation_Error_93114","Recommendation_Error_7","Recommendation_Error_1010","Recommendation_Error_21000","Recommendation_Error_1001519","Recommendation_Error_1001518","Recommendation_Error_1001515","Recommendation_Error_1001516","Recommendation_Error_1001531","Recommendation_Error_1001215","Recommendation_Error_1001231","Recommendation_Error_1001201","Recommendation_Error_1001100","Recommendation_Error_1004329","Recommendation_Error_1004314","Recommendation_Error_93214","Recommendation_Error_93222","Recommendation_Error_93223","Recommendation_Error_93234","Recommendation_Error_93272","Recommendation_Error_93237","Recommendation_Error_93239","Recommendation_Error_93271","Recommendation_Error_93274","Recommendation_Error_56028","Recommendation_Error_93233","Recommendation_Error_93277","RECOMMENDATION_NOTIFICATION_REJECT_REASONS","NotInterested","OtherSolution","DoNotUnderstand","NotApplicable","SpendNoMore","UseOtherSolution","ManualBidding","NotAlignGoal","NotImprovePerf","Other","RECOMMENDATION_SOURCE_FOR_SORT_TYPES","CROSS_LEVEL_TYPES","VIEW_TYPES","SUMMARY","DETAILS","HISTORY","AUTO_APPLY_SETTINGS","AUTO_APPLY_BULK_UPLOAD","SUPPORTED_CAMPAIGN_TYPES","MOVE_BUDGET_CAMPAIGN_BUDGET_STATUS","Deficit","Surplus","DOWNLOAD_SCOPE","INDIVIDUAL","TASK_STATUS","FAC_FEATURE_ID","CONVERSION_TRACKING","CALLOUTCARD_GOOGLE_IMPORT","CALLOUTCARD_PINTEREST_IMPORT","CALLOUTCARD_FACEBOOK_IMPORT","AUTO_BIDDING_MAX_CLICKS","AUTO_BIDDING_MAX_CONVERSIONS","SHOPPING_CAMPAIGN","ORDERBY_DIRECTION","ASCENDING","DESCENDING","FILTERBY","UNDEFINED","GREATER_THAN","GREATER_EQUAL","LESS_THAN","LESS_EQUAL","PAGINATION_ORDERBY","DEFAULT","FAC_RECOMMENDATION_CONFIG","couponTitleActionKey","couponDescriptionTitleKey","couponDescriptionKey","couponTagMessageKey","couponLightboxTitle","priority","FAC_RECOMENDATIONTYPE_FEATUREID_MAPPING","mapping","featureId","recType","TYPE_DESCRIPTION_TABLE","DATE_FILTER","LAST_90","LAST_180","FILTER_TO_TIME","schema","GOAL_OPERATOR_TYPES_STRING_VALUES","EqualTo","EqualsTo","Contains","BeginsWith","RegularExpression","LessThan","GreaterThan","ADGROUP_TYPES","SearchStandard","SearchDynamic","AUTO_APPLY_TYPES","HISTORY_PAGE_TAB_TYPES","MANUAL","AUTO","IMPORT_TYPE","GOOGLE","FACEBOOK","ISSUE_TYPES","GA_NO_PILOTING_TYPES","MCC_NOT_SUPPORTED_TYPE","CAMPAIGN_ODATA_ERROR_BASELINE","INLIE_APPLY_ERROR_SUPPORT_TYPES","MCC_ACCOUNTS_CAPPING","RECOMMENDATION_SUMMARY_TOP_NUMBER","isFilterSearchStandardAdgroupRecommendationType","recommendationType","RECOMMENDATION_AUTO_APPLY_SETTINGS_TOOLTIPS","helpText","TOP_POSITION_RECOMMENDATION_TYPES","generateSchema","budgetSuggested","default","minimum","DailyRange","FloorValue","maximum","CeilingValue","suggestedBid","percentOptions","percentOptionsOneDecimal","percentOptionsHundredths","monetaryOptions","impreAndClicksOptions","formatCurrency","formatPercentOneDecimal","formatPercentHundredths","formatBid","truncateEntityName","smartTruncate","position","campaignNameHtml","fullAdGroupNameHtml","adGroupName","adGroupNameHtml","keywordHtml","keyword","formatEntityNameForHtml","formatEntityType","form","replacePlaceholders","settings","_ref$model","model","useLevelInComputingEntityName","useCampaignName","useAdGroupName","useOpportunityCount","compareWithCompetitor","useSegment","isHighConverting","_model$opportunities","opportunities","delta","localizedKey","templateValues","opportunity_count","formattedName","entity_name","competitor_domain","buildSimpleFormFields","labelProcessor","oneRow","formattedValue","propertyName","propertyValue","placeHolder","formatMatchType","matchType","formatMatchTypeStr","toUpperCase","getRecommendationPreferences","isUserLevel","getPreferences","saveRecommendationPreferences","savePreferences","isCompetition","competitionTypes","isRecommendationTypeEnabled","channel","supportedTypes","urlUtil","isEnabledByUrlParameter","IsRecommendationTypeBudgetEnabled","IsRecommendationTypeImageExtensionEnabled","IsRecommendationTypeRepairMissingKeywordParamsEnabled","IsFixNoImpressionBidRecommendationEnabled","IsRecommendationTypeImproveResponsiveSearchAdsEnabled","IsRecommendationTypePmaxImportEnabled","IsRecommendationTypeDSA2PMaxMigrationEnabled","IsRecommendationTypeSyndicationGapEnabled","getRecommendationTypes","types","getRecommendationIds","enabledTypes","isReadOnly","IsReadOnlyUser","levelWeight","isParentLevel","getIncreaseSymbol","normal","arrow","isPositive","extra","offset","top","outerHeight","document","dismissFeedback","_op$feedback","feedback","preference","reason","rejectAutoApplySuggestedAds","context","guid","expireTime","api","typeId","action","input","RejectAutoApplySuggestedAds","DismissFeedback","hideInContextRecommendation","isCardView","PREFERENCES_ACTION_TYPES","HidedRecommendationCards","HidedRecommendationBanner","levelPreferences","isShowAutoApplyFeedback","now","getChannel","isInContext","isOverviewPage","inContextCard","groupUserInputs","userInputs","groupedInputs","userInput","oppo","OpportunityId","Value","getIconClasses","statusId","cur","getNewTextConfigByPermission","newConfig","configType","recommendationNewTextConfigs","permission","getShiftedDate","shift","setDate","getDate","toISOString","getDestUrlData","destUrlCurrentSetting","destUrlSuggestedSetting","goalOperatorTypes","currentDestinationURLOperatorName","DestinationURLOperatorCode","DestinationURLOperatorName","currentDestinationUrl","DestinationUrl","suggestedDestinationURLOperatorName","suggestedDestinationUrl","getEventData","eventCurrentSetting","eventSuggestedSetting","categoryTitle","currentCategoryName","Category","currentCategoryOperatorName","CategoryOperatorCode","CategoryOperatorName","suggestedCategoryName","suggestedCategoryOperatorName","actionTitle","currentActionName","Action","currentActionOperatorName","ActionOperatorCode","ActionOperatorName","suggestedActionName","suggesteActionOperatorName","labelTitle","currentLabelName","Label","currentLabelOperatorName","LabelOperatorCode","LabelOperatorName","suggestedLabelName","suggestedLabelOperatorName","valueTitle","currentValueName","currentValueOperatorName","ValueOperatorCode","ValueOperatorName","suggestedValueName","suggesteValueOperatorName","isPlural","getEditorialErrorMessage","policyCode","policyErrorStr","editorialErrorMessage","editorialErrorCodeToErrorMessageMapping","EditorialReasons_Default","getImageExtensionPageSize","pageSize","IsRecommendationIncreaseImageExtensionPageSizePhase2Enabled","IsRecommendationIncreaseImageExtensionPageSizePhase1Enabled","getFieldValueFromGridData","gridData","campaignGridData","adGroupProductPartitionGridData","ProductCondition1","Bid","Priority","StoreId","buildActionGridDataForBidBoost","useBid","bidCurrent","currentBidAdjustmentPercent","imprShareCurrent","costCurrent","formatCostWithi18n","formatPercentWithi18n","formatBidWithi18n","formatDecimalWithi18n","bodies","opportunity","newBidOrAdjustment","suggestedBidAdjustmentPercent","competitorImprShareIncrease","imprShareIncrease","competitorTotalImprShare","totalImprShare","competitorWeeklyCost","weeklyCost","competitorImprShare","clicksIncrease","convIncrease","competitorDomain","currentBidOrAdjustment","currentTotalImprShare","currentWeeklyCost","ZERO_PERCENT","recommendationConfigs","_recommendationConfig","summaryTitle","summaryIconClasses","summaryIconClassesVNext","detailDescription","detailPitching","detailHelpId","sampleInsight","sampleActionHeaders","primaryEstimateType","secondaryEstimateType","costEstimateType","isPrimaryFromToEnabled","visualType","insightTitle","actionDataInForm","actionGrid","dataBuilder","isIncrease","autoHide","enableCheckedIcon","singleSelection","hasLastRowAsCurrent","postprocessor","targetGroupId","actionDataInGrid","actionTitleExtraForm","visualTableHeaders","visualData","enum","recommendedLoc","location","searchQueryVolume","imprIncrease","impressionsIncrease","costIncrease","helpTopics","useProgressBar","helpQuery","visualTableScope","primaryIncreaseNullable","isEstimate","detailLinkType","isDynamicText","useNewI18n","configs","BlockedKeywordsColumn","recommendationInProductUpdateConfigs","available","notification","additionalPitching","additionalPitchingEnabledBy","helpTopic","needAdditionalArgs","neverExpired","recommendationDynamicTextConfigs","defaultConfig","additionDetailPitchingConfig","formatEstimateValue","formatEstimates","estimates","inDetailsView","_recommendationConfig2","secondPrimaryEstimateType","isDoublePrimary","tertiaryEstimateType","bindedFormatValue","primaryEstimate","secondPrimaryEstimate","secondPrimaryString","secondPrimaryIncrease","primaryString","primaryIncreaseNumber","primaryIncrease","increaseSymbol","primaryIncreaseSymbol","primaryPts","hasFrom","primaryFrom","primaryFromString","primaryTo","primaryToString","isPositivePrimary","secondaryIncrease","secondaryString","isPositiveSecondary","tertiaryIncrease","tertiaryString","spendIncrease","spendString","estimateNote","showEstimates","formatted","formatLocaledSourceType","source","convertedSource","formatLocaledSeasonalEventType","seasonEvent","convertedSeasonEvent","word","charAt","formatKeyword","formatCoupon","coupon","couponConfig","FeatureId","titleAction","descriptionTitle","description","tagMessage","getCurrencyText","currencyCode","amount","floor","CouponValue","maxFractionDigits","hideCurrencyCode","cost","ceil","CouponUpfrontSpend","expirationDate","toLocaleDateString","descriptionShort","formatSummary","sample","_options$isHighConver","_options$isSeasonal","isSeasonal","isNrt","hasAIAssetRecommendation","isFeedbackPersonalized","showAutoApplyBanner","thirdPartyInfos","recommendationConfig","i18nToUse","entity_type","descriptionKey","pitchingKey","isScopeToThis","n","seasonalEvent","iconClasses","iconClassesVNext","pitching","clicks","withThis","cpcCondition","cpcIncrease","cpcStatus","paramWithoutEstimates","paramWithEstimates","ctrLift","abs","sources","source1","source2","source3","SampleContent","formatPictchingSource","seasonalEntity","linkType","needNRTDisclaimer","chartTypes","formatVisualDataChart","formatOutOf","formatActions","actions","fromString","budgetFrom","budgetCurrent","budgetTo","budgetIncrease","bidFrom","bidTo","bidSuggested","bidBoostFrom","bidBoostTo","device","formatCampaignBulkApiError","errors","addedValue","ErrorNumber","ErrorCode","ErrorMessage","Property","getModelForAllRecommendations","recommendations","getModelForInsight","commonOptionsForAction","fields","getModelForFormAction","localizedHeaders","selectedRowIndex","isDefault","selectedRow","getModelForGridAction","getDetailsSummary","getDetailsViewModel","withAdsAutoApply","componentDidMount","reload","componentWillUnmount","loadToken","getAutoApplyOptInStatus","RecommendationType","IsOptIn","showIntermediateView","withImgAutoRetrieve","allowCrawlImagesFromLandingPage","AllowCrawlImagesFromLandingPage","withGetAutoApplyOptInStatus","parsedData","propsId","generateGuid","filterCategory","recommendationCustomizedDataFilterFunc","matcher","withFilterCategory","getEstimates","EstimatedIncreaseInCost","EstimatedIncreaseInClicks","CurSelfImprShare","EstimatedIncreaseInImprShare","imprShareTotal","EstimatedIncreaseInConversionsInt","clicksCurrent","CurrentClicks","EstimatedIncreaseInImpressions","ctrCurrent","CurrentCtr","ctrIncrease","EstimatedIncreaseInCtr","CtrLift","EstimatedIncreaseInCpc","convCurrent","CurrentConversionsInt","impressionsCurrent","CurrentImpressions","weeklySearchesIncrease","EstimatedIncreaseInSearches","CurrentCost","NumberRejectedAds","NumberRejectedKeywords","missingConvIncrease","targetedProductsIncrease","SumofTotalUntargetedOfferCnt","day","GetImpressionSharePoints","points","Hour","AuctionNumber","ImpressionNumber","normalizeLocation","estimatedIncreaseInImpressions","estimatedIncreaseInClicks","queriesFiltered","queriesPassedLocationFiltering","Criterion","LocationCriterion","CountryCode","LocationId","Latitude","Longitude","LocationType","ExpandedName","QueriesFiltered","QueriesPassedLocationFiltering","getBidBoostChartData","isDeviceBidBoost","firstOpportunity","youData","CompetitiveInsights","youPoint","competitorData","CompetitorDomain","Device","getDetailsVisualData","ReferenceCompetitor","getBudgetChartData","IsHighConverting","ClickNumber","ConversionNumber","getCompetitiveBidChartData","included","ExistingLocations","excluded","ExcludedLocations","recommended","Location","getNewLocationMapData","getBudgetOpportunityTable","isShared","rows","topOpportunity","Shared","BudgetName","sortOpportunitiesInRecommendation","sortedOpportunities","getRecommendedOpportunity","sortedRecommendation","DefaultOpportunityId","_slicedToArray","getRecommendation","recommendedOpportunity","SeasonalEvents","getSampleVisualData","topRecommendation","_ref3$primaryEstimate","_ref3$rawSamples","rawSamples","suggestedKeyword","SuggestedKeyword","monthlyQueryVolume","MonthlyQueryVolume","SuggestedBid","getNewKeywordTable","adoptionPercentage","CompetitorAdoptionPercentage","getSyndicationTable","recommendedKeyword","MatchType","recommendedSource","SourcesForBingAdsWebUi","getNewKeywordOpportunityTable","searchVolumeIncrease","WoWInDecimal","WoW","getTrendingQueryTable","searchExamples","SearchExamples","getDynamicSearchAdsTable","getExtensionTable","getRepairTable","samples","getBroadMatchKeywordTable","negativeKeyword","NegativeKeyword","blockedKeyword","BlockedKeywordList","NegativeKeywordMatchTypeId","blockedKeywordMatchType","MatchTypeId","getRemoveConflictingNegativeKeywordTable","getResponsiveSearchAdsTable","fromCampaign","SuggestedCampaignBudgets","campaign","BudgetStatus","toCampaign","suggestBudget","BudgetDeficit","getReallocateBudgetTable","UrlOrLandingPage","getFixAdDestinationTable","FlagId","numberRejectedAds","NumberRejectedDisapprovedAds","NumberRejectedLimitedApprovedAds","numberRejectedKeywords","NumberRejectedDisapprovedKeywords","NumberRejectedLimitedApprovedKeywords","getFixAdTextTable","getMultiMediaAdsTable","getImageExtensionTable","getRepairMissingKeywordParamsTable","Source","getFixNoImpressionBidTable","GridData","TotalUntargetedOfferCnt","getRepairUntargetedOfferTable","Images","Headlines","LongHeadlines","Descriptions","getImproveMultiMediaAdsTable","getSSC2PMaxMigrationTable","getDSA2PMaxMigrationTable","getSyndicationGapTable","getRecommendationWithDetails","CurrentBidBoost","CurrentBid","TargetGroupId","rawOpportunity","defaultOpId","CurrentBudget","EstimatedIncreaseInBudget","TargetSelfImprShare","CompetitorImprShare","SuggestedBidBoost","adoptionPercent","monthlySearchVolume","MonthlySearchVolume","weekoverWeek","ReferenceKeyword","rejectedAd","RejectedAd","rejectionCode","rejectedAds","RejectedAds","rejectedKeywords","RejectedKeywords","inactiveTagCount","NumInactiveUetTags","affectedGoal","NumAffectedConversionGoals","numImpressions","NumImpressions","numClicks","NumClicks","getOpportunity","Object","assign","getGridData","getRecommendationSample","_ref4$rawSummary","rawSummary","Samples","Recommendations","GeoLocationId","getActionData","withDetails","hasDismissedSummaries","DismissTabSummaries","dismissedSummaries","filteredSummaries","RecommendationsCount","includes","OpportunityType","topPositionSummaries","summaries","rawSummaries","AggregateLevel","opportunityCount","OpportunitiesCount","version","Version","Coupon","accounts","optimizationScore","ScoreUpLift","IsNrt","StatusId","HasAIAssetRecommendationCount","isAutoApplyOptIn","IsAutoApplyOptIn","ThirdPartyInfos","rawRecommendation","TrackId","IsFeedbackPersonalized","Sources","NearestApplyDate","AarOptInRecommendationCount","AarNearestApplyDate","Dismissed","withGetSummary","needExamples","campaignAdGroups","viewType","perfMarker","willFetchData","defaultOptions","componentDidUpdate","prevState","perfMarkerDone","done","vnextDeps","eventDispatcher","setDataFromDetails","overallOptimizationScoreBar","OverallOptimizationScoreBar","categoryScoreUpLifts","CategoryScoreUpLifts","availableCategories","AvailableCategories","hasLoadToken","preferencesName","defaultPageNumber","defaultPageSize","categoryType","topOption","p$Initialized","spread","pagination","filterQuery","getCombinedFilter","pageNumber","skip","shouldShowAlertHandler","isFromApplyOrDismiss","getSummary","withBlocker","willRender","hasFilter","_this$state","normalizedData","eventDispatcherDone","dismissedData","willInit","createChild","withGetCount","isGetCountByCampaignAdGroups","getCountByCampaignAdGroups","getCount","withTrack","withAll","WithTrack","track","applyOpportunitiesLevel","ApplyOpportunitiesLevel","userAction","closeUiBlock","stopStatusPoll","rest","ref","forwardedRef","withCoupon","rawCouponData","rec","getCoupon","RecommendationDownloadService","alertCenter","asyncScheduler","cacheManager","_ref$downloadService","downloadService","downloadServiceSharedComponent","getODataErrors","pageContext","_ref$isMCC","_ref$recommendationSe","repository","InlineDownloadReportDataRepository","ReportColumns","_this$pageContext","CultureLcid","CustomerId","CurrentCustomer","_this$pageContext$Cur","CurrentAccount","AccountNumber","_this$pageContext2","CurrentCampaign","CurrentAdGroup","adGroupId","CampaignReportScopes","getCampaignReportScopes","AdGroupReportScopes","getAdGroupReportScopes","download","ReportType","Channel","CampaignTypeId","Format","ReportTime","DateRangePreset","LCID","catch","filteredCampaigns","str","filteredAdGroups","adGroup","PollTask","task","isCompleted","isFailed","maxPollCount","pollIntervalTimeout","recurringTask","stopTask","pollCount","createTask","schedule","setRecommendationCache","getRecommendationCache","applyNotificationInfo","failedRecommendationCount","urlPrefix","urlPrefixMCC","getSummaryAPI","getSummaryTypeOnly","getSummaryAPIOptimizationScoreNoExpand","getSummaryAPIOptimizationScore","getSummaryAPIOptimizationScoreWithDismissedTab","getSummaryAPIMCC","getHistoryAPI","getHistoryAPIMCC","getAutoApplyOptInStatusAPI","setAutoApplyOptInStatusAPI","getCountAPI","getBulkAarUploadBlobAPI","submitBulkAarOptInStatusTaskAPI","pollBulkEditAAROptInStatusTaskAPI","fetchDownloadIdAPI","FAC_STATUS_NOT_IN_PROGRESS","CCUIConstants","RecommendationAdoptionStatus","NotInProgess","FAC_STATUS_ACTIVE","Active","getOptions","lcid","orderby","getRequestScope","_getFilteredEntitiesA","RecommendationService","ccJsData","accountIdsPromise","_ref$alertCenter","_ref$odata","_ref$isNoExpand","isNoExpand","_ref$cacheManager","startCouponAdoption","adoption","FeatureAdoptionCoupon","update","Status","tapCatch","errorMessageKey","Errors","Code","getSummaryPromiseFromOption","includeCoupons","fetchDataPromise","getCouponPromise","isWithDFM","previousRoute","history","isDFMEnabled","withDFMCache","getCouponsActivity","getCoupons","coupons","TypeError","getSummaryActivity","isOptimizationScoreOn","overallScoreIncrease","_applyNotificationInf","allExpiredInSummary","totalRecommendationCount","Gained","Summaries","rawRecommendationData","couponFeatureId","priorities","couponEligibleRec","first","addCouponToRecommendations","isRecommendationSummaryPage","IsRecommendationCacheDetailPageDataEnabled","handleAjaxError","ignoreCoupons","optionPromise","generateGetSummaryRequest","hasAccountIdsPromise","getSummaryRequestFromAccountIds","accountIds","paginationQueryOptions","filterOpportunity","detailPageSetting","$orderby","$top","$skip","getOptimizationScore","OpportunityTypes","Request","RecommendationTypes","DetailPageSetting","RawFilterQueryExpression","PaginationQueryOptions","CampaignAdGroups","SettingOptions","settingOptions","isDismissedTabEnabled","cappedAccountIdsPromise","getHistory","generateGetHistoryRequest","getHistoryActivity","generateGetCountRequest","getCountActivity","generateGetCountByCampaignAdGroupsRequest","getCountByCampaignAdGroupsActivity","logRecommendationFailedResults","AggregatedResults","res","each","OpportunityIds","countError","singleCodeResult","RecommendationCount","successfulCount","failedCount","expiredCount","ExpiredCount","reduce","getErrors","dealWithInlineError","hasInlineError","aggregateResult","Results","groupBy","Expired","dealApplyResponse","total","fail","localizedkey","setApplyNotificationInfo","handleRecommendationNotification","pollStatusTask","isAsync","generateApplyRequest","getApplyActivity","IsAsync","generateApplyStatusRequest","adoptionId","AdoptionId","AdoptionStatus","showAsyncApplyModal","closeAsyncApplyModal","IsRecommendationDataCacheEnabled","invalidate","getApplyAPI","asyncEnabled","suffix","isTrackingOnly","getOdataType","isAll","_Request","IsBAARecommendationsAsyncApplyEnabled","isFromDismissTab","IsFromDismissTab","functionName","stack","fetchDownloadIdHistory","fetchDownloadIdRecommendation","recommendationTypes","uniqParams","campaignScope","adgroupScope","scopes","AdGroupScopes","CampaignScopes","pollFileName","generatePollFileNameRequest","downloadWithDownloadId","downloadId","alertId","showConfirmation","pollTask","dismiss","ResultFile","downloadHistory","generateGetAutoApplyOptInStatusRequest","getAutoApplyOptInStatusActivity","setAutoApplyOptInStatus","isOptInStatusDelta","generateSetAutoApplyOptInStatusRequest","setAutoApplyOptInStatusActivity","isSetAutoApplyOptInStatusSuccess","AAROptInStatusList","getStockImageUrl","queryString","culture","appName","$search","language","includevertical","getBulkAarUploadBlobUrl","fileName","generateBulkAarUploadBlobUrlRequest","getBulkAarUploadBlobUrlActivity","UploadedFileName","setBulkAarUploadBlob","Headers","append","fetch","method","body","submitBulkAarOptInStatusTask","generateSubmitBulkAarOptInStatusTaskRequest","submitBulkAarOptInStatusTaskActivity","responseJSON","pollBulkAarOptInStatusTask","reqID","generatepollBulkAarOptInStatusTaskRequest","BulkUpdateStatus","dealBulkAarOptInStatusResponse","reqId","aggregateBulkAarResult","resu","Count","countBulkError","successCount","accountInfoCache","ONE_COLUMN_IN_TABLE","TWO_COLUMNS_IN_TABLE","THREE_COLUMNS_IN_TABLE","FOUR_COLUMNS_IN_TABLE","formatSample","moreRecommendations","viewRecommendations","out_of","getCompetitionSampleInsightTitle","_getModelForCompetiti","headerKey","highlights","values","getModelForCompetitionSampleAction","formattedVisualData","alignments","formattedAdoptionPercentage","adoptionValue","percentValue","formatCompetitionSampleVisualDataTable","columnWidths","maxNumberOfRecommendationSamples","nullableArrow","example","enabledToolTip","toolTipClass","insight","insightKey","ad_group","formatInsight","formatDecimalToInteger","getSummaryCardModel","mapScope","withRecommendationsScope","_createElement","sharedComponentFunctionStateStore","StateStore","reasonsMapping","_reasonsMapping","reasonsMappingNewI18n","FixRepairMissingKeywordParamsFixItLater","FixRepairMissingKeywordParamsDoNotLikeSuggestedParamValues","FixRepairMissingKeywordParamsNotSignificant","FixRepairMissingKeywordParamsAlreadyFixedThisIssue","FixRepairMissingKeywordParamsOther","FixNoImpressionBidSuggestTooHigh","FixNoImpressionBidSuggestNotSignificant","FixNoImpressionBidHaveAdjusted","FixNoImpressionBidOther","FixImproveResponsiveSearchAdsImproveLater","FixImproveResponsiveSearchAdsNotSignificant","FixImproveResponsiveSearchAdsDoNotLikeHeadlineDescription","FixImproveResponsiveSearchAdsSpendIncreaseTooMuch","FixImproveResponsiveSearchAdsOther","FixRepairUntargetedOfferNotRelevant","FixRepairUntargetedOfferManageInconvenient","FixRepairUntargetedOfferExcludedIntentionally","FixRepairUntargetedOfferNotUnderstand","FixRepairUntargetedOfferImprovementLater","FixRepairUntargetedOfferOther","ImproveMultiMediaAdsImprovementLater","ImproveMultiMediaAdsNotSignificant","ImproveMultiMediaAdsNotLikeRecommendedImages","ImproveMultiMediaAdsNotLikeRecommendedTextOrHeadlines","ImproveMultiMediaAdsIncreaseMySpendTooMuch","ImproveMultiMediaAdsOther","DSA2PMaxMigrationNoApplyUntilAttributesReviewed","DSA2PMaxMigrationUnsureRecommendedCampaignIsImprovement","DSA2PMaxMigrationCreatePerformanceMaxCampaignByMyOwn","DSA2PMAxMigrationOther","SyndicationGapCannotDisplayOnMicrosoftAdsNetwork","SyndicationGapNotInterestedOnEntireMicrosoftAdsNetwork","SyndicationGapOther","reasonsMappingAutoApplyFeedback","DismissFeedbackForm","reasonIds","reasonNote","notshowagain","onReasonChange","submitStateChange","onSubmit","reasons","reasonWithNewI18n","onCommentChange","onPreferenceChange","renderCheckbox","reasonId","changeState","submitDisabled","isAccountSettings","CheckboxGroup","renderItem","getItemValue","onChange","blurb","renderReasons","CommentsField","isProvideFeedbackOnly","disabled","htmlFor","OTHER_REASON","REASON_TABLE","PERCENT_INPUT_REASON_LIST","NUMBER_INPUT_REASON_LIST","COMMENT_ONLY_REASON_LIST","COMMENT_WITH_URL_REASON_LIST","URL_FOR_COMMENT_WITH_URL_REASON_LIST","FixConvGoalNeedAssistanceToFix","RECOMMENDATION_TYPES_SUPPORT_NEW_DISMISS_FORM","RECOMMENDATION_REASON_TO_COMMENT_TRANSLATOR","BudgetTooHigh","BudgetCpcTooHigh","RecommendedBudgetHigh","CPCHigh","FixConvGoalGoalNotUse","PercentInput","onValidate","percent","handleChange","percentValidator","errorText","isNewI18n","numStr","comment","Input","validationProps","validator","placeholder","NumberInput","blockInput","maxLength","ValidationGroup","SingleChoiceDismissFeedbackForm","reasonString","submittedReason","reasonSuggestedValue","onReasonNoteChange","setReasonSuggestedValue","handleReasonChange","_this$state2","isForBudgetLandscape","Radio","isProductFeedbackLoop","href","rel","FeedbackView","onYes","isNavigateModalOpen","viewDetails","navigateToDetailType","onNo","isShowNewDismissForm","hide","navigateBasedOnReasonId","NAVIGATE_REASON","NoBudget","BudgetNoBudget","recommendationTypesAvailable","isOpen","timer","onclick","IsRecommendationInProductFeedbackLoopEnabled","isCloseClickOverlay","isAutoClose","current","contains","clearTimeout","setTimeout","navigateModal","NavigateModal","showDismissFeedbackPopup","querySelector","showDismissFeedbackPopupForBudgetLandscape","budgetLandscapePopup","budgetTemplate","EstimationTile","primaryAndSecondPrimaryFontSize","isPrimaryReady","isSecondPrimaryReady","primaryFontSize","secondPrimaryFontSize","fitPrimaryAndSecondPrimary","minFontSize","fromTo","primaryIncreaseStr","noPrimaryIncrease","isLongText","Textfit","forceSingleModeWidth","onReady","primaryReady","mode","secondPrimaryReady","getSecondarySymbol","SummaryEstimation","characterCount","maxCharacterCount","onFocus","FEEDBACK_LOOP_REASON_TABLE","_REASON_TABLE","REASON_TABLE_NEW_I18N","FixRepairMissingKeywordParamsNotKnowingWhyFix","FixNoImpressionBidAdjustLater","FixNoImpressionBidManagedByAgency","FixImproveResponsiveSearchAdsManagedByMyself","FixImproveResponsiveSearchImprovementLater","FixImproveResponsiveSearchAdsNotUnderstand","ImproveMultiMediaAdsManagedByMyself","ImproveMultiMediaAdsCostTooHigh","ImproveMultiMediaAdsNotUnderstand","SyndicationGapAdPerfLowerThanExpected","SyndicationGapOnlyDisplayedOnMicrosoftSitesSelected","RECOMMENDATION_DISMISS_ALL_MT_REASONID_CONFIGS","excludedReason","prefix","defaultReasonIds","FeedbackForm","handleCommentsChange","handleCommentsFocus","recommendationDescription","readOnly","submitText","ReasonId","ReasonNote","DismissAllFeedbackForm","ApplyFeedbackForm","onApply","stopPropagation","onAutoApplyCancel","isFromImgExtV2","autoApplyChecked","patch","handleAutoApplyOptionChange","instruction","IsRSAAutoApplyEnabled","border","valign","Checkbox","reasonToMtTranslator","feedbackModal","logOpportunityEvent","isReject","isFromAutoApplyDialog","isDismissAll","useCallbackAsSubmit","formatedReason","getFormatedReason","trackId","ApplyMode","navigateBasedOnReason","isApplyFeedBackFormShow","useNavigateModal","ReactModal","onRequestClose","overlayClassName","FeedbackModal","handleFeedbackCancel","isModalOpen","showApplyConfirmModal","isCrossPageApplyAll","titleConfig","showRejectFeedbackPopup","rejectFeedbackTemplate","feedbackOptions","showApplyFeedbackPopup","autoApplyFeedbackTemplate","ImgAutoFeedbackView","AdsAutoFeedbackView","popupWidth","RecommendationAlertPopup","showText","hiddenText","hideText","popover","alertMsg","iconClass","alertPopupContariner","alertIcon","onBlur","onMouseOut","onMouseEnter","alertPopup","hidden","StyledRecommendationAlertPopup","boxShadow","transform","padding","lineHeight","minHeight","left","arrowWidth","bottom","right","COLUMNS_METRICS","defaultColumnMetric","interpolation","y1","y2","x1","x2","landscapes","suggestedIndex","defaultColumnIndex","defaultRowIndex","inputRowIndex","defaultBudgetValue","rawLandscapeData","currentDataRowIndex","minBudget","maxBudget","_ref$isSharedBudget","isSharedBudget","rawSuggestedBudget","suggestedBudgetCellValue","isForecasting","inputRowSelected","currentRowIndex","isCurrentDataRowSelected","inputBudget","estimationKPIArray","getEstimationsRowData","estimationKPIFormattedArray","showTipMessage","fromBudgetColumn","userInputDisplayVal","currentBudget","isInputing","tipMessage","selectedColumnIndex","conversionSelected","chartTitle","selectedHeader","selectedColumnData","subscribe","isValidDecimal","parseDecimal","validate","isValid","_this$getEstimationsR","KoSchema","validators","range","decimalLength","errorMessage","showErrorMessage","landscape","columnIndexExcludeRadio","isSuggested","isCurrent","columnIndex","rowIndex","estimationHeaders","sorted","minPoint","maxPoint","nextPointIndex","previousPoint","nextPoint","getFormattedTableCell","COMMENT_TYPES","BudgetLandScapeTable","opportunityData","conversionSummaryStatus","_ref$currentBudget","_ref$fromBudgetColumn","_ref$fromCampaignTab","fromCampaignTab","_ref$view","_ref$budgetRange","budgetRange","_ref$permissions","landscapeData","Landscapes","Comment","IsForecasting","getTableConfig","_this$config","feedbackPersonalizedPopup","isInProductFeedbackLoopOn","ko_model","currentTarget","cellIndex","which","preventDefault","templateForInlineEditor","currencySymbolClassName","getCurrencySymbol","currencySymbol","notAvailableStr","placeHolderText","addRecommendationAlertPopup","triggerContainerResizing","formatIntegerValue","EstimatedBudget","rawBudget","barChartOptions","bar","animation","cursor","events","click","states","hover","inactive","BudgetLandScapeChart","tableViewmodel","legacyRouter","navigateToRoute","noUET","noData","uetLink","uetLinkTemplate","redraw","isBudgetColumnSelected","estimations","budgetPoint","selectedEstimationPoint","budgetPoints","highcharts","seriesName","onPointClicked","pointWidthWithPadding","seriesColorChanged","stylesChartColor","mappedResult","dataMax","positions","increment","tick","stopImmediatePropagation","tooltipTemplate","primaryMetricName","primaryMetricValue","showPrimaryMetric","initChart","bind","RecommendationInlineBudgetView","router","gridService","ConversionSummaryStatus","tableView","chartView","getViewModel","timerForPopupContextualAttribute","_this$opportunityData","BudgetType","BudgetId","AccountName","budgetType","NewBudget","getSelectedNewBudget","WarnNotificationBanner","uid","warnNotification","warnNotificationInMCC","MessageBar","messageBarType","MessageBarType","severeWarning","delayedRender","warnHelpInfo","isShowNotificationBannerInTargetRecommendations","firstViewTime","IN_PRODUCT_UPDATE_RECOMMENDATIONS_VIEW_TIME","FirstViewTime","isInProductUpdateBannerAvailable","isAdditionalPitchingAvailable","InProdUpdateNotificationBanner","additionalArgs","judgeWhetherUserFirstViewNotificationBanner","recordUserFirstViewTimeOfNotificationBanner","TooltipHost","content","overflowMode","TooltipOverflowMode","Parent","directionalHint","DirectionalHint","bottomCenter","HelpPopup","formatNotificationLocalizedKey","isSuccess","actionType","_ref$otherInfo","otherInfo","zeroSucceedScenario","_otherInfo$SuccessAds","SuccessAdsCount","_otherInfo$SuccessKey","SuccessKeywordsCount","_otherInfo$FailedAdsC","FailedAdsCount","_otherInfo$FailedKeyw","FailedKeywordsCount","getImportScheduleAndHistoryLink","targetAccountId","preferenceType","userId","_ref3$isOptimizationS","_ref3$setApplyNotific","_ref3$newI18n","_ref3$scope","expiredRecommendationCount","successfulEntityCount","BatchErrorCode","allExpired","_ref2$newI18n","_ref2$scope","ImportTaskId","getNotificationMessage","aggregatedResult","getSessionStorage","set","results","from","statusLightBox","showLightboxNotification","PopupSummary","_this$props$overallOp","scoreLabelText","gained","dismissed","scoreValue","popupSummaryContainer","scoreDetail","scoreLabel","scoreHint","StyledPopupSummary","borderRadius","paddingBottom","paddingTop","gainedScoreLabelIcon","dismissedScoreLabelIcon","borderTop","minWidth","RecOptimizationOverallScore","borderColor","stacking","Available","renderOverallScore","handleMouseEnter","handleMouseLeave","isHovering","timerForPopupSummary","renderAutoApplyButton","renderDownloadButton","renderHistoryButton","isAsyncApplyEnabled","showDownloadButton","overallScore","calloutContent","tooltipProps","maxWidth","root","delay","TooltipDelay","zero","recOverallScoreContainer","betaTagContainer","StyledMenuItemTag","tagContent","tagClass","calloutProps","gapSpace","scoreBarChartContainer","onMouseLeave","StyledRecOptimizationOverallScore","neutralLighterAlt","borderBottom","neutralQuaternaryAlt","themeDarkAlt","neutralPrimary","RecommendationOptimizationScoreTag","optimizationScoreTagContent","formatedScore","optimization_score","long","Badge","appearance","RECOMMENDATION_PREFERENCES","RECOMMENDATION_PREFERENCES_ACCOUNT_LEVEL","AutoRefresh","OptimizationScoreOnboard","AAROnBoard","findByName","dataPackage","SummaryContextMenu","dismissPopover","threeDots","Popover","placement","funcsInMenu","func","SummaryHeader","headerMenuItems","autoApplyToolTipText","showAutoApply","CouponTagNew","calloutMaxWidth","Glyphicon","glyph","SummaryFooter","autoApplyDialogInSummary","applyAll","countRecommendation","confirmApplyAll","confirm","isInlineView","logExpInfo","contextWithTrackingId","contextWithApplyMode","isOptimizationScoreUsed","viewAll","OVERVIEWPAGE","buttonActionWithCoupon","showLightbox","lightboxAction","viewAllButtonAction","applyAllButtonAction","hideLightbox","CouponLightboxNew","SamplePanel","actionDetails","ActionTable","OverallOptimizationScore","HelpPopupInline","FuncWithName","summaryCard","getHeaderMenuItems","onDownload","handleDownload","handleHideCard","handleUndismissAll","handleDismissAll","handleReject","handleFeedback","handleSubmit","onFeedbackModalOpen","_this$props3$sample","locationMap","inProductUpdateConfig","BingMapView","AdsPreview","AutoApplyBanner","_this$props$summary","tagManager","ThirdPartyName","showSummarySample","showFooterInDescription","banner","summaryEstimates","summaryOptimizationScore","summaryEstimation","footer","overviewEstimationOrSummary","summaryDescription","gridColumn","noLink","SSC_2_PMAX_MIGRATIO","gridTemplateColumns","msGridColumns","SummaryCard","passthroughArray","SummaryCardList","logImpression","ClickToCategory","currentCategory","clickToCategory","pathname","isAARSection","Section","cards","cardData","summaryCardModel","combineText","adDisplayUrlService","childPerfMarker","applyAllCallback","_SummaryCardList","renderLearnMore","EmptyView","viewAccountRecommendations","isDismissedDataEmpty","viewDismissedRecommendations","showOptimizationScoreEmptyView","titleContent","subTitleContent","actionText","totalRecommendations","tally","actionKey","hasSubTitle","hasAction","bubbleImg","summaryView","DownloadScope","handleFeedbackModalOpen","modal","HideLevel","hideCardCallback","handleFeedbackSubmit","viewSummary","viewCategory","_ref2$type","_ref2$position","_ref2$input","_ref2$context","updateToolbar","toolbarConfig","has","appliedFilter","editableFilter","forceUpdate","resetToolbarVisibility","forceHideToolbar","hideToolbar","summaryCardDataOptOut","summaryCardDataOptIn","_this$props$deps","constants","hasDataCallback","summaryCards","autoApplySummaryCards","autoApplyHeader","emptyView","toolbar","isDataEmpty","downloadButton","DownloadToolbarButton","initialToolbarConfig","ToolbarFilterbarSet","toolbarItemDownload","toolbarItemFilter","upperToolBarInstance","emptyViewSharedParam","EmptyViewWithCount","summaryCardsProps","allRecommendationTypes","OverridableToolbarView","Minigrid","gutter","mount","FilteredSummaryView","SummaryView","InlineRecommendationCardView","isShowCard","Level","AdGroupIds","containerEl","ProgressBar","useLabelOnTheRight","rightLabel","progressbarLabel","columnCount","columnWidth","textAlignArr","headerIndex","columnWidthArr","headerRow","dataSection","dataRow","valueIndex","cell","rightCenter","refreshData","mapView","includedPoint","addRadiusTargetToMap","excludedPoint","updateRecommendedLocations","MapView","disableInfoBoxGroupList","disableActionGroupList","mapHeight","ToolbarButton","handleDownloadAll","buttonProps","setAutoRotate","e2eTestEnvironment","clearAutoRotateListener","indicators","previewCount","childElementCount","nextIndex","autoRotateListener","handleSelect","selectedIndex","getLandScapeImageMediaUrl","imageUrl","Carousel","activeIndex","onSelect","controls","nextLabel","prevLabel","Item","pug","module","exports","locals","pug_interp","pug_html","locals_for_with","escape","call","$$obj","$$l","resxKey","statusStr","pug_index0","pug_mixins","block","attributes","budget_type"],"sourceRoot":""}